summaryrefslogtreecommitdiff
path: root/mysql-test/t/ndb_lock.test
diff options
context:
space:
mode:
authorjoreland@mysql.com <>2004-10-13 10:08:18 +0200
committerjoreland@mysql.com <>2004-10-13 10:08:18 +0200
commit29c270c13e9ef906a5a4ac94ab3bac6bc7525799 (patch)
tree3d1ed1b1091cf7d2c0277e1fdeb3cbb0d63b2d48 /mysql-test/t/ndb_lock.test
parentb40261262ae2c4c3051f5f22b92edfa084dc8acd (diff)
downloadmariadb-git-29c270c13e9ef906a5a4ac94ab3bac6bc7525799.tar.gz
Bug#6020, any lock >= write_allow_write is a write lock
Diffstat (limited to 'mysql-test/t/ndb_lock.test')
-rw-r--r--mysql-test/t/ndb_lock.test29
1 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/t/ndb_lock.test b/mysql-test/t/ndb_lock.test
index c0389dced44..39a8655b972 100644
--- a/mysql-test/t/ndb_lock.test
+++ b/mysql-test/t/ndb_lock.test
@@ -39,3 +39,32 @@ commit;
connection con2;
select * from t1 order by x;
commit;
+
+drop table t1;
+
+###
+# Bug#6020
+create table t1 (pk integer not null primary key, u int not null, o int not null,
+ unique(u), key(o)) engine = ndb;
+insert into t1 values (1,1,1), (2,2,2), (3,3,3), (4,4,4), (5,5,5);
+
+lock tables t1 write;
+delete from t1 where pk = 1;
+unlock tables;
+select * from t1 order by pk;
+insert into t1 values (1,1,1);
+
+lock tables t1 write;
+delete from t1 where u = 1;
+unlock tables;
+select * from t1 order by pk;
+insert into t1 values (1,1,1);
+
+lock tables t1 write;
+delete from t1 where o = 1;
+unlock tables;
+select * from t1 order by pk;
+insert into t1 values (1,1,1);
+
+drop table t1;
+