Commit bd09c5ca authored by Monty's avatar Monty

Added test case for MDEV-13007 ALTER .. ENGINE on temporary sequence may go wrong

Looks like the bug was fixed some time ago (at least I can't repeat it).
I added the test case just have this case tested properly.
parent d405bee0
......@@ -17,3 +17,27 @@ drop temporary sequence s1;
CREATE TEMPORARY SEQUENCE s1 ENGINE=InnoDB;
INSERT INTO s1 VALUES (1, 1, 1000, 1, 1, 1, 1, 0);
DROP TEMPORARY SEQUENCE s1;
#
# MDEV-13007 ALTER .. ENGINE on temporary sequence may go wrong
#
create temporary sequence s1 engine=aria;
alter table s1 engine myisam;
select nextval(s1);
nextval(s1)
1
drop temporary sequence s1;
create temporary sequence s1 engine=innodb;
alter table s1 engine myisam;
select nextval(s1);
nextval(s1)
1
drop temporary sequence s1;
create temporary sequence s1;
alter table s1 engine innodb;
select nextval(s1);
nextval(s1)
1
select nextval(s1);
nextval(s1)
2
drop temporary sequence s1;
......@@ -23,3 +23,21 @@ drop temporary sequence s1;
CREATE TEMPORARY SEQUENCE s1 ENGINE=InnoDB;
INSERT INTO s1 VALUES (1, 1, 1000, 1, 1, 1, 1, 0);
DROP TEMPORARY SEQUENCE s1;
--echo #
--echo # MDEV-13007 ALTER .. ENGINE on temporary sequence may go wrong
--echo #
create temporary sequence s1 engine=aria;
alter table s1 engine myisam;
select nextval(s1);
drop temporary sequence s1;
create temporary sequence s1 engine=innodb;
alter table s1 engine myisam;
select nextval(s1);
drop temporary sequence s1;
create temporary sequence s1;
alter table s1 engine innodb;
select nextval(s1);
select nextval(s1);
drop temporary sequence s1;
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