Commit 2789a12b authored by kostja@bodhi.(none)'s avatar kostja@bodhi.(none)

Fix a compilation warning and a subtle bug with truncation of the

last_insert_id introduced by the patch for Bug#12713 (part 1)
parent 572ab7a6
...@@ -383,7 +383,7 @@ Diagnostics_area::reset_diagnostics_area() ...@@ -383,7 +383,7 @@ Diagnostics_area::reset_diagnostics_area()
void void
Diagnostics_area::set_ok_status(THD *thd, ha_rows affected_rows_arg, Diagnostics_area::set_ok_status(THD *thd, ha_rows affected_rows_arg,
ulong last_insert_id_arg, ulonglong last_insert_id_arg,
const char *message_arg) const char *message_arg)
{ {
DBUG_ASSERT(! is_set()); DBUG_ASSERT(! is_set());
......
...@@ -1003,7 +1003,7 @@ public: ...@@ -1003,7 +1003,7 @@ public:
bool can_overwrite_status; bool can_overwrite_status;
void set_ok_status(THD *thd, ha_rows affected_rows_arg, void set_ok_status(THD *thd, ha_rows affected_rows_arg,
ulong last_insert_id_arg, ulonglong last_insert_id_arg,
const char *message); const char *message);
void set_eof_status(THD *thd); void set_eof_status(THD *thd);
void set_error_status(THD *thd, uint sql_errno_arg, const char *message_arg); void set_error_status(THD *thd, uint sql_errno_arg, const char *message_arg);
...@@ -1034,7 +1034,7 @@ public: ...@@ -1034,7 +1034,7 @@ public:
ha_rows affected_rows() const ha_rows affected_rows() const
{ DBUG_ASSERT(m_status == DA_OK); return m_affected_rows; } { DBUG_ASSERT(m_status == DA_OK); return m_affected_rows; }
ulong last_insert_id() const ulonglong last_insert_id() const
{ DBUG_ASSERT(m_status == DA_OK); return m_last_insert_id; } { DBUG_ASSERT(m_status == DA_OK); return m_last_insert_id; }
uint total_warn_count() const uint total_warn_count() const
...@@ -1080,7 +1080,7 @@ private: ...@@ -1080,7 +1080,7 @@ private:
thd->first_successful_insert_id_in_prev_stmt, which is used thd->first_successful_insert_id_in_prev_stmt, which is used
to implement LAST_INSERT_ID(). to implement LAST_INSERT_ID().
*/ */
ulong m_last_insert_id; ulonglong m_last_insert_id;
/** The total number of warnings. */ /** The total number of warnings. */
uint m_total_warn_count; uint m_total_warn_count;
enum_diagnostics_status m_status; enum_diagnostics_status m_status;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment