mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
Add the testcase for Bug#59410 to 5.1/builtin
Bug#59410 read uncommitted: unlock row could not find a 3 mode lock on the record This bug is present only in 5.6 but I am adding the test case to earlier versions to ensure it never appears in earlier versions too.
This commit is contained in:
parent
26af7f5737
commit
402217544e
2 changed files with 41 additions and 0 deletions
17
mysql-test/suite/innodb/r/innodb_bug59410.result
Normal file
17
mysql-test/suite/innodb/r/innodb_bug59410.result
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
create table `bug59410_1`(`a` int)engine=innodb;
|
||||||
|
insert into `bug59410_1` values (1),(2),(3);
|
||||||
|
select 1 from `bug59410_1` where `a` <> any (
|
||||||
|
select 1 from `bug59410_1` where `a` <> 1 for update)
|
||||||
|
for update;
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
drop table bug59410_1;
|
||||||
|
create table bug59410_2(`a` char(1),`b` int)engine=innodb;
|
||||||
|
insert into bug59410_2 values('0',0);
|
||||||
|
set transaction isolation level read uncommitted;
|
||||||
|
start transaction;
|
||||||
|
set @a=(select b from bug59410_2 where
|
||||||
|
(select 1 from bug59410_2 where a group by @a=b)
|
||||||
|
group by @a:=b);
|
||||||
|
drop table bug59410_2;
|
24
mysql-test/suite/innodb/t/innodb_bug59410.test
Normal file
24
mysql-test/suite/innodb/t/innodb_bug59410.test
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
#
|
||||||
|
# Bug#59410 read uncommitted: unlock row could not find a 3 mode lock on the record
|
||||||
|
#
|
||||||
|
-- source include/have_innodb.inc
|
||||||
|
|
||||||
|
# only interested that the following do not produce something like
|
||||||
|
# InnoDB: Error: unlock row could not find a 2 mode lock on the record
|
||||||
|
# in the error log
|
||||||
|
|
||||||
|
create table `bug59410_1`(`a` int)engine=innodb;
|
||||||
|
insert into `bug59410_1` values (1),(2),(3);
|
||||||
|
select 1 from `bug59410_1` where `a` <> any (
|
||||||
|
select 1 from `bug59410_1` where `a` <> 1 for update)
|
||||||
|
for update;
|
||||||
|
drop table bug59410_1;
|
||||||
|
|
||||||
|
create table bug59410_2(`a` char(1),`b` int)engine=innodb;
|
||||||
|
insert into bug59410_2 values('0',0);
|
||||||
|
set transaction isolation level read uncommitted;
|
||||||
|
start transaction;
|
||||||
|
set @a=(select b from bug59410_2 where
|
||||||
|
(select 1 from bug59410_2 where a group by @a=b)
|
||||||
|
group by @a:=b);
|
||||||
|
drop table bug59410_2;
|
Loading…
Reference in a new issue