Commit 55d554bd authored by unknown's avatar unknown
Browse files

Fix for Bug #18184 SELECT ... FOR UPDATE does not work..: Skipped lock check...

 Fix for Bug #18184  SELECT ... FOR UPDATE does not work..: Skipped lock check for full table scan due to bug #20390 SELECT FOR UPDATE does not release locks of untouched rows in full table scans


parent d043b5ea
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -83,9 +83,6 @@ x y z
3	three	3
1	one	1
begin;
select * from t1 where x = 2 for update;
x	y	z
2	two	2
select * from t1 where x = 1 for update;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
rollback;
@@ -126,9 +123,6 @@ begin;
select * from t1 where y = 'one' lock in share mode;
x	y	z
1	one	1
select * from t1 where x = 2 for update;
x	y	z
2	two	2
select * from t1 where x = 1 for update;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
rollback;
+4 −2
Original line number Diff line number Diff line
@@ -99,7 +99,8 @@ connection con2;
begin;
# Have to check with pk access here since scans take locks on
# all rows and then release them in chunks
select * from t1 where x = 2 for update;
# Bug #20390 SELECT FOR UPDATE does not release locks of untouched rows in full table scans
#select * from t1 where x = 2 for update;
--error 1205
select * from t1 where x = 1 for update;
rollback;
@@ -152,7 +153,8 @@ begin;
select * from t1 where y = 'one' lock in share mode;
# Have to check with pk access here since scans take locks on
# all rows and then release them in chunks
select * from t1 where x = 2 for update;
# Bug #20390 SELECT FOR UPDATE does not release locks of untouched rows in full table scans
#select * from t1 where x = 2 for update;
--error 1205
select * from t1 where x = 1 for update;
rollback;