Commit 9040e4a9 authored by unknown's avatar unknown

Additional test for Bugs#20392: INSERT_ID session variable has weird value

sys_var_insert_id returned LAST_INSERT_ID instead of INSERT_ID,
as Guilhem suggested.


mysql-test/r/variables.result:
  Additional test
mysql-test/t/variables.test:
  Additional test
parent 4af5e597
...@@ -429,6 +429,16 @@ set session insert_id=20; ...@@ -429,6 +429,16 @@ set session insert_id=20;
select @@session.insert_id; select @@session.insert_id;
@@session.insert_id @@session.insert_id
20 20
set session last_insert_id=100;
select @@session.insert_id;
@@session.insert_id
20
select @@session.last_insert_id;
@@session.last_insert_id
100
select @@session.insert_id;
@@session.insert_id
20
set @@session.insert_id=@save_insert_id; set @@session.insert_id=@save_insert_id;
select @@session.insert_id; select @@session.insert_id;
@@session.insert_id @@session.insert_id
......
...@@ -308,6 +308,12 @@ select @@session.insert_id; ...@@ -308,6 +308,12 @@ select @@session.insert_id;
set @save_insert_id=@@session.insert_id; set @save_insert_id=@@session.insert_id;
set session insert_id=20; set session insert_id=20;
select @@session.insert_id; select @@session.insert_id;
set session last_insert_id=100;
select @@session.insert_id;
select @@session.last_insert_id;
select @@session.insert_id;
set @@session.insert_id=@save_insert_id; set @@session.insert_id=@save_insert_id;
select @@session.insert_id; select @@session.insert_id;
......
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