summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/r/innodb-lock.result
diff options
context:
space:
mode:
authorVasil Dimov <vasil.dimov@oracle.com>2010-04-12 14:56:24 +0300
committerVasil Dimov <vasil.dimov@oracle.com>2010-04-12 14:56:24 +0300
commitf5692f21f98ed81de4b5f8e95a6e9c68a1665fb5 (patch)
tree36e01efdfa663bedeb31ce6987dbb62209d3b3b8 /mysql-test/suite/innodb/r/innodb-lock.result
parent666039be77c8eb2b7784033cbaa6a3892094cc08 (diff)
downloadmariadb-git-f5692f21f98ed81de4b5f8e95a6e9c68a1665fb5.tar.gz
Remove outdated InnoDB Plugin tests from mysql-test/suite/innodb,
the InnoDB Plugin tests are now in mysql-test/suite/innodb_plugin. Move InnoDB tests to the innodb suite at mysql-test/suite/innodb.
Diffstat (limited to 'mysql-test/suite/innodb/r/innodb-lock.result')
-rw-r--r--mysql-test/suite/innodb/r/innodb-lock.result57
1 files changed, 57 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/r/innodb-lock.result b/mysql-test/suite/innodb/r/innodb-lock.result
new file mode 100644
index 00000000000..4ace4065c34
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb-lock.result
@@ -0,0 +1,57 @@
+set global innodb_table_locks=1;
+select @@innodb_table_locks;
+@@innodb_table_locks
+1
+drop table if exists t1;
+set @@innodb_table_locks=1;
+create table t1 (id integer, x integer) engine=INNODB;
+insert into t1 values(0, 0);
+set autocommit=0;
+SELECT * from t1 where id = 0 FOR UPDATE;
+id x
+0 0
+set autocommit=0;
+lock table t1 write;
+update t1 set x=1 where id = 0;
+select * from t1;
+id x
+0 1
+commit;
+update t1 set x=2 where id = 0;
+commit;
+unlock tables;
+select * from t1;
+id x
+0 2
+commit;
+drop table t1;
+set @@innodb_table_locks=0;
+create table t1 (id integer primary key, x integer) engine=INNODB;
+insert into t1 values(0, 0),(1,1),(2,2);
+commit;
+SELECT * from t1 where id = 0 FOR UPDATE;
+id x
+0 0
+set autocommit=0;
+set @@innodb_table_locks=0;
+lock table t1 write;
+update t1 set x=10 where id = 2;
+SELECT * from t1 where id = 2;
+id x
+2 2
+UPDATE t1 set x=3 where id = 2;
+commit;
+SELECT * from t1;
+id x
+0 0
+1 1
+2 3
+commit;
+unlock tables;
+commit;
+select * from t1;
+id x
+0 0
+1 1
+2 10
+drop table t1;