diff options
author | unknown <kostja@bodhi.(none)> | 2007-12-13 05:37:38 +0300 |
---|---|---|
committer | unknown <kostja@bodhi.(none)> | 2007-12-13 05:37:38 +0300 |
commit | a3a0d4359fef580a30704797ceeed613600deedc (patch) | |
tree | 41fec9a7bbadd6d9ab6bef4c2350e0a4c2fb414a | |
parent | ec206b4caea4b031056822f43cfe0ecf0fab86ea (diff) | |
download | mariadb-git-a3a0d4359fef580a30704797ceeed613600deedc.tar.gz |
Fix a compilation warning and a subtle bug with truncation of the
last_insert_id introduced by the patch for Bug#12713 (part 1)
-rw-r--r-- | sql/sql_class.cc | 2 | ||||
-rw-r--r-- | sql/sql_class.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index b68a532a2dc..3d3f6e4a965 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -383,7 +383,7 @@ Diagnostics_area::reset_diagnostics_area() void 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) { DBUG_ASSERT(! is_set()); diff --git a/sql/sql_class.h b/sql/sql_class.h index 0df6fd47dca..3808fb68a01 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1003,7 +1003,7 @@ public: bool can_overwrite_status; void set_ok_status(THD *thd, ha_rows affected_rows_arg, - ulong last_insert_id_arg, + ulonglong last_insert_id_arg, const char *message); void set_eof_status(THD *thd); void set_error_status(THD *thd, uint sql_errno_arg, const char *message_arg); @@ -1034,7 +1034,7 @@ public: ha_rows affected_rows() const { 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; } uint total_warn_count() const @@ -1080,7 +1080,7 @@ private: thd->first_successful_insert_id_in_prev_stmt, which is used to implement LAST_INSERT_ID(). */ - ulong m_last_insert_id; + ulonglong m_last_insert_id; /** The total number of warnings. */ uint m_total_warn_count; enum_diagnostics_status m_status; |