summaryrefslogtreecommitdiff
path: root/mysql-test/r/ndb_lock.result
diff options
context:
space:
mode:
authorunknown <mskold@mysql.com>2006-06-08 16:12:38 +0200
committerunknown <mskold@mysql.com>2006-06-08 16:12:38 +0200
commit20e54ae6c579167c38ae9183e465f19ef0e60169 (patch)
tree1691889ea4d2b9b2210bdc28239c30042ad3df27 /mysql-test/r/ndb_lock.result
parent22e3b0c66f695e18269e2fc221461611fa5132c3 (diff)
downloadmariadb-git-20e54ae6c579167c38ae9183e465f19ef0e60169.tar.gz
Fix for Bug #18184 SELECT ... FOR UPDATE does not work..: implemented ha_ndblcuster::unlock_row() and explicitly lock all rows that are not being unlocked
Diffstat (limited to 'mysql-test/r/ndb_lock.result')
-rw-r--r--mysql-test/r/ndb_lock.result59
1 files changed, 59 insertions, 0 deletions
diff --git a/mysql-test/r/ndb_lock.result b/mysql-test/r/ndb_lock.result
index b8c2c58aac4..0267d092047 100644
--- a/mysql-test/r/ndb_lock.result
+++ b/mysql-test/r/ndb_lock.result
@@ -63,3 +63,62 @@ 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)) engine = ndb;
+insert into t1 values (1,'one'), (2,'two'),(3,"three");
+begin;
+select * from t1 where x = 1 for update;
+x y
+1 one
+begin;
+select * from t1 where x = 2 for update;
+x y
+2 two
+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
+3 three
+1 one
+begin;
+select * from t1 where x = 2 for update;
+x y
+2 two
+select * from t1 where x = 1 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
+1 one
+begin;
+select * from t1 where x = 1 lock in share mode;
+x y
+1 one
+select * from t1 where x = 2 for update;
+x y
+2 two
+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
+3 three
+1 one
+begin;
+select * from t1 where y = 'one' lock in share mode;
+x y
+1 one
+select * from t1 where x = 2 for update;
+x y
+2 two
+select * from t1 where x = 1 for update;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+rollback;
+commit;
+drop table t1;