Commit 69d52db9 authored by mskold@mysql.com's avatar mskold@mysql.com

Added order by

parent 4242beb3
...@@ -78,10 +78,10 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction ...@@ -78,10 +78,10 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction
rollback; rollback;
commit; commit;
begin; begin;
select * from t1 where y = 'one' or y = 'three' for update; select * from t1 where y = 'one' or y = 'three' order by x for update;
x y z x y z
3 three 3
1 one 1 1 one 1
3 three 3
begin; begin;
select * from t1 where x = 1 for update; select * from t1 where x = 1 for update;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction ERROR HY000: Lock wait timeout exceeded; try restarting transaction
...@@ -115,10 +115,10 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction ...@@ -115,10 +115,10 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction
rollback; rollback;
commit; commit;
begin; begin;
select * from t1 where y = 'one' or y = 'three' lock in share mode; select * from t1 where y = 'one' or y = 'three' order by x lock in share mode;
x y z x y z
3 three 3
1 one 1 1 one 1
3 three 3
begin; begin;
select * from t1 where y = 'one' lock in share mode; select * from t1 where y = 'one' lock in share mode;
x y z x y z
......
...@@ -93,7 +93,7 @@ commit; ...@@ -93,7 +93,7 @@ commit;
# table scan # table scan
connection con1; connection con1;
begin; begin;
select * from t1 where y = 'one' or y = 'three' for update; select * from t1 where y = 'one' or y = 'three' order by x for update;
connection con2; connection con2;
begin; begin;
...@@ -146,7 +146,7 @@ commit; ...@@ -146,7 +146,7 @@ commit;
# table scan # table scan
connection con1; connection con1;
begin; begin;
select * from t1 where y = 'one' or y = 'three' lock in share mode; select * from t1 where y = 'one' or y = 'three' order by x lock in share mode;
connection con2; connection con2;
begin; begin;
......
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