mirror of
https://github.com/MariaDB/server.git
synced 2026-05-04 22:25:32 +02:00
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.
This commit is contained in:
parent
95d0427714
commit
4af5e597ef
3 changed files with 23 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue