~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/diagnostics_area.cc

Merged Eric from lp:~eday/drizzle/eday-merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
  m_sql_errno= 0;
35
35
  m_server_status= 0;
36
36
  m_affected_rows= 0;
 
37
  m_found_rows= 0;
37
38
  m_last_insert_id= 0;
38
39
  m_total_warn_count= 0;
39
40
  is_sent= false;
63
64
ha_rows Diagnostics_area::affected_rows() const
64
65
{ assert(m_status == DA_OK); return m_affected_rows; }
65
66
 
 
67
ha_rows Diagnostics_area::found_rows() const
 
68
{ assert(m_status == DA_OK); return m_found_rows; }
 
69
 
66
70
uint64_t Diagnostics_area::last_insert_id() const
67
71
{ assert(m_status == DA_OK); return m_last_insert_id; }
68
72
 
76
80
  Set OK status -- ends commands that do not return a
77
81
  result set, e.g. INSERT/UPDATE/DELETE.
78
82
*/
79
 
void Diagnostics_area::set_ok_status(Session *session, ha_rows affected_rows_arg,
80
 
                                uint64_t last_insert_id_arg,
81
 
                                const char *message_arg)
 
83
void Diagnostics_area::set_ok_status(Session *session,
 
84
                                     ha_rows affected_rows_arg,
 
85
                                     ha_rows found_rows_arg,
 
86
                                     uint64_t last_insert_id_arg,
 
87
                                     const char *message_arg)
82
88
{
83
89
  assert(! is_set());
84
90
  /*
92
98
  m_server_status= session->server_status;
93
99
  m_total_warn_count= session->total_warn_count;
94
100
  m_affected_rows= affected_rows_arg;
 
101
  m_found_rows= found_rows_arg;
95
102
  m_last_insert_id= last_insert_id_arg;
96
103
  if (message_arg)
97
104
    strncpy(m_message, message_arg, sizeof(m_message) - 1);