mariadb/mysql-test/suite/innodb/r/innodb_mysql_rbk.result
Marko Mäkelä c440ee8676 Merge a change from mysql-5.1-innodb:
------------------------------------------------------------
revno: 3500
revision-id: marko.makela@oracle.com-20100603095032-v5ptkkzt1bhz0m1d
parent: marko.makela@oracle.com-20100603094859-8cibt7xns239jjvc
committer: Marko Mäkelä <marko.makela@oracle.com>
branch nick: 5.1-innodb
timestamp: Thu 2010-06-03 12:50:32 +0300
message:
  Move some InnoDB tests to mysql-test/suite/innodb.
2010-06-03 13:28:40 +03:00

21 lines
629 B
Text

CREATE TABLE t1(a INT, b INT NOT NULL, PRIMARY KEY (a)) ENGINE=innodb
DEFAULT CHARSET=latin1;
INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7);
START TRANSACTION;
SELECT * FROM t1 WHERE b=3 LIMIT 1 FOR UPDATE;
a b
3 3
START TRANSACTION;
UPDATE t1 SET b=b+12 WHERE a > 2 ORDER BY a;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
ROLLBACK;
START TRANSACTION;
SELECT * FROM t1 WHERE b=3 LIMIT 1 FOR UPDATE;
a b
3 3
START TRANSACTION;
UPDATE t1 SET b=10 WHERE a > 1 ORDER BY a;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
SELECT * FROM t1 WHERE b = 10;
a b
DROP TABLE t1;