~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/diagnostics_area.h

  • Committer: Brian Aker
  • Date: 2009-06-08 16:51:22 UTC
  • mto: This revision was merged to the branch mainline in revision 1058.
  • Revision ID: brian@gaz-20090608165122-4zvh22zgsaqadcjy
Remove lock_tables list from session.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
 
20
 
20
21
#ifndef DRIZZLED_DIAGNOSTICS_AREA_H
21
22
#define DRIZZLED_DIAGNOSTICS_AREA_H
22
23
 
23
 
namespace drizzled
24
 
{
25
24
 
26
25
/**
27
26
  Stores status of the currently executed statement.
29
28
  can hold either OK, ERROR, or EOF status.
30
29
  Can not be assigned twice per statement.
31
30
*/
 
31
 
32
32
class Diagnostics_area
33
33
{
34
34
public:
51
51
  bool can_overwrite_status;
52
52
 
53
53
  void set_ok_status(Session *session, ha_rows affected_rows_arg,
54
 
                     ha_rows found_rows_arg, uint64_t last_insert_id_arg,
 
54
                     uint64_t last_insert_id_arg,
55
55
                     const char *message);
56
56
  void set_eof_status(Session *session);
57
57
  void set_error_status(uint32_t sql_errno_arg, const char *message_arg);
71
71
  uint32_t sql_errno() const;
72
72
  uint32_t server_status() const;
73
73
  ha_rows affected_rows() const;
74
 
  ha_rows found_rows() const;
75
74
  uint64_t last_insert_id() const;
76
75
  uint32_t total_warn_count() const;
77
76
 
106
105
    We could possibly merge the two, but life cycle of session->row_count_func
107
106
    can not be changed.
108
107
  */
109
 
  ha_rows m_affected_rows;
110
 
  /**
111
 
    This is like m_affected_rows, but contains the number of rows found, not
112
 
    only affected.
113
 
  */
114
 
  ha_rows m_found_rows;
 
108
  ha_rows    m_affected_rows;
115
109
  /**
116
110
    Similarly to the previous member, this is a replacement of
117
111
    session->first_successful_insert_id_in_prev_stmt, which is used
118
112
    to implement LAST_INSERT_ID().
119
113
  */
120
 
  uint64_t m_last_insert_id;
 
114
  uint64_t   m_last_insert_id;
121
115
  /** The total number of warnings. */
122
 
  uint32_t m_total_warn_count;
 
116
  uint       m_total_warn_count;
123
117
  enum_diagnostics_status m_status;
124
118
  /**
125
119
    @todo: the following Session members belong here:
127
121
  */
128
122
};
129
123
 
130
 
} /* namespace drizzled */
131
 
 
132
124
#endif /* DRIZZLED_DIAGNOSTICS_AREA_H */