diff options
author | unknown <mskold@mysql.com> | 2006-06-12 15:35:46 +0200 |
---|---|---|
committer | unknown <mskold@mysql.com> | 2006-06-12 15:35:46 +0200 |
commit | 7b207a8301e9adc7191c2771f57f309005eea86f (patch) | |
tree | bcaec50cc03bd83a0281f38a9862d3d89ae53814 /mysql-test/r/ndb_lock.result | |
parent | 1d522eb77de2680aaf9432b6e3627aeaa2081197 (diff) | |
parent | a3f3696697f1ef991ea856fc9dd7bb113309555a (diff) | |
download | mariadb-git-7b207a8301e9adc7191c2771f57f309005eea86f.tar.gz |
Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/marty/MySQL/mysql-4.1
Diffstat (limited to 'mysql-test/r/ndb_lock.result')
-rw-r--r-- | mysql-test/r/ndb_lock.result | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/mysql-test/r/ndb_lock.result b/mysql-test/r/ndb_lock.result index b8c2c58aac4..281b02b8228 100644 --- a/mysql-test/r/ndb_lock.result +++ b/mysql-test/r/ndb_lock.result @@ -63,3 +63,89 @@ pk u o 5 5 5 insert into t1 values (1,1,1); drop table t1; +create table t1 (x integer not null primary key, y varchar(32), z integer, key(z)) engine = ndb; +insert into t1 values (1,'one',1), (2,'two',2),(3,"three",3); +begin; +select * from t1 where x = 1 for update; +x y z +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; +commit; +begin; +select * from t1 where y = 'one' or y = 'three' for update; +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; +commit; +begin; +select * from t1 where z > 1 and z < 3 for update; +x y z +2 two 2 +begin; +select * from t1 where x = 1 for update; +x y z +1 one 1 +select * from t1 where x = 2 for update; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +rollback; +commit; +begin; +select * from t1 where x = 1 lock in share mode; +x y z +1 one 1 +begin; +select * from t1 where x = 1 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; +commit; +begin; +select * from t1 where y = 'one' or y = 'three' lock in share mode; +x y z +3 three 3 +1 one 1 +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; +commit; +begin; +select * from t1 where z > 1 and z < 3 lock in share mode; +x y z +2 two 2 +begin; +select * from t1 where z = 1 lock in share mode; +x y z +1 one 1 +select * from t1 where x = 1 for update; +x y z +1 one 1 +select * from t1 where x = 2 for update; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +rollback; +commit; +drop table t1; |