summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authormonty@mashka.mysql.fi <>2003-06-30 13:28:36 +0300
committermonty@mashka.mysql.fi <>2003-06-30 13:28:36 +0300
commit6bc7b3a6be246f67b06c1e5e15ea0de97bf637f4 (patch)
tree933b2046e69eb6088530f9f8b1d15d8919a876d5 /sql/sql_class.h
parentdbebed97e4fe5b0aed8f4b67d259519e1ab59b7a (diff)
downloadmariadb-git-6bc7b3a6be246f67b06c1e5e15ea0de97bf637f4.tar.gz
LAST_INSERT_ID() should not be set if we couldn't generate an auto_increment id.
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 33767bc4226..22956f16c83 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -503,8 +503,23 @@ public:
#ifdef SIGNAL_WITH_VIO_CLOSE
Vio* active_vio;
#endif
- ulonglong next_insert_id,last_insert_id,current_insert_id,
- limit_found_rows;
+ /*
+ next_insert_id is set on SET INSERT_ID= #. This is used as the next
+ generated auto_increment value in handler.cc
+ */
+ ulonglong next_insert_id;
+ /*
+ The insert_id used for the last statement or set by SET LAST_INSERT_ID=#
+ or SELECT LAST_INSERT_ID(#). Used for binary log and returned by
+ LAST_INSERT_ID()
+ */
+ ulonglong last_insert_id;
+ /*
+ Set to the first value that LAST_INSERT_ID() returned for the last
+ statement. When this is set, last_insert_id_used is set to true.
+ */
+ ulonglong current_insert_id;
+ ulonglong limit_found_rows;
ha_rows select_limit, offset_limit, cuted_fields,
sent_row_count, examined_row_count;
table_map used_tables;