diff options
author | unknown <bar@mysql.com> | 2006-06-22 19:10:11 +0500 |
---|---|---|
committer | unknown <bar@mysql.com> | 2006-06-22 19:10:11 +0500 |
commit | 4af5e597ef8c22fdf8c4b88ba7d12d113e56e81f (patch) | |
tree | c3f6d852e20a5295c0717546027c3bef5459e476 /sql/set_var.cc | |
parent | 95d042771491313346286ff31bd7128cbe3629db (diff) | |
download | mariadb-git-4af5e597ef8c22fdf8c4b88ba7d12d113e56e81f.tar.gz |
Bugs#20392: INSERT_ID session variable has weird value
sys_var_insert_id returned LAST_INSERT_ID instead of INSERT_ID.
mysql-test/r/variables.result:
Adding test case
mysql-test/t/variables.test:
Adding test case
sql/set_var.cc:
Fixed that sys_var_insert_id returned last_indert_id instead of insert_id.
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r-- | sql/set_var.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc index 003dd4a8ab3..51317dec50d 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -2578,7 +2578,7 @@ bool sys_var_insert_id::update(THD *thd, set_var *var) byte *sys_var_insert_id::value_ptr(THD *thd, enum_var_type type, LEX_STRING *base) { - return (byte*) &thd->current_insert_id; + return (byte*) &thd->next_insert_id; } |