1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-15106 Unexpected ER_WRONG_INSERT_INTO_SEQUENCE upon INSERT with multiple locks on sequences

Fixed by removing the check of single lock in sequence insert and let MDL
code handle deadlock detection
This commit is contained in:
Monty
2018-05-03 17:49:16 +03:00
parent 6c43068d63
commit 57c3dd991b
5 changed files with 50 additions and 19 deletions

View File

@ -38,10 +38,6 @@ create sequence s2;
insert into s1 (next_not_cached_value, minimum_value) values (100,1000);
--error ER_UPDATE_TABLE_USED
insert into s1 values (next value for s1, 1,9223372036854775806,1,1,1000,0,0);
--error ER_WRONG_INSERT_INTO_SEQUENCE
insert into s1 values (next value for s2, 1,9223372036854775806,1,1,1000,0,0);
--error ER_WRONG_INSERT_INTO_SEQUENCE
insert into s1 select * from s2;
--error ER_SEQUENCE_INVALID_DATA
insert into s1 values(1000,9223372036854775806,1,1,1,1000,0,0);
--error ER_SEQUENCE_INVALID_DATA
@ -53,6 +49,13 @@ select next value for s1;
select * from s1;
--error ER_SEQUENCE_INVALID_DATA
insert into s2 values(0, 1, 10, 1, 2, 1, 1, 0);
select * from s1;
insert into s1 values (next value for s2, 1,9223372036854775806,1,1,1000,0,0);
select * from s1;
select * from s2;
insert into s1 select * from s2;
select * from s1;
drop sequence s1,s2;
--echo #