diff options
author | Timothy Smith <timothy.smith@sun.com> | 2009-01-13 23:12:16 +0100 |
---|---|---|
committer | Timothy Smith <timothy.smith@sun.com> | 2009-01-13 23:12:16 +0100 |
commit | 50958a346a1b79610defb74fcfffbcd73e8e6326 (patch) | |
tree | 70df7b00efc539608c5f05b7fef5e10919485869 | |
parent | 96415bb39da6cafaf2059de6d9b58dbc115c7f92 (diff) | |
download | mariadb-git-50958a346a1b79610defb74fcfffbcd73e8e6326.tar.gz |
Apply test case changes for Bug #41671 (innodb-semi-consistent.test) also to
partition_innodb_semi_consistent.test, which was overlooked in the
innodb-5.1-ss3603 snapshot.
-rw-r--r-- | mysql-test/r/partition_innodb_semi_consistent.result | 5 | ||||
-rw-r--r-- | mysql-test/t/partition_innodb_semi_consistent.test | 7 |
2 files changed, 8 insertions, 4 deletions
diff --git a/mysql-test/r/partition_innodb_semi_consistent.result b/mysql-test/r/partition_innodb_semi_consistent.result index 1bb39af043a..471da4c1c2e 100644 --- a/mysql-test/r/partition_innodb_semi_consistent.result +++ b/mysql-test/r/partition_innodb_semi_consistent.result @@ -1,6 +1,6 @@ drop table if exists t1; set binlog_format=mixed; -set session transaction isolation level read committed; +set session transaction isolation level repeatable read; create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1 @@ -13,11 +13,12 @@ select * from t1 where a=3 lock in share mode; a 3 set binlog_format=mixed; -set session transaction isolation level read committed; +set session transaction isolation level repeatable read; set autocommit=0; update t1 set a=10 where a=5; ERROR HY000: Lock wait timeout exceeded; try restarting transaction commit; +set session transaction isolation level read committed; update t1 set a=10 where a=5; select * from t1 where a=2 for update; ERROR HY000: Lock wait timeout exceeded; try restarting transaction diff --git a/mysql-test/t/partition_innodb_semi_consistent.test b/mysql-test/t/partition_innodb_semi_consistent.test index cfa170f575b..6a6a7cf958e 100644 --- a/mysql-test/t/partition_innodb_semi_consistent.test +++ b/mysql-test/t/partition_innodb_semi_consistent.test @@ -14,7 +14,7 @@ connect (a,localhost,root,,); connect (b,localhost,root,,); connection a; set binlog_format=mixed; -set session transaction isolation level read committed; +set session transaction isolation level repeatable read; create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1 @@ -27,7 +27,7 @@ set autocommit=0; select * from t1 where a=3 lock in share mode; connection b; set binlog_format=mixed; -set session transaction isolation level read committed; +set session transaction isolation level repeatable read; set autocommit=0; -- error ER_LOCK_WAIT_TIMEOUT update t1 set a=10 where a=5; @@ -35,6 +35,8 @@ connection a; #DELETE FROM t1 WHERE a=5; commit; connection b; +# perform a semi-consisent read (and unlock non-matching rows) +set session transaction isolation level read committed; update t1 set a=10 where a=5; connection a; -- error ER_LOCK_WAIT_TIMEOUT @@ -42,6 +44,7 @@ select * from t1 where a=2 for update; # this should lock the records (1),(2) select * from t1 where a=2 limit 1 for update; connection b; +# semi-consistent read will skip non-matching locked rows a=1, a=2 update t1 set a=11 where a=6; -- error ER_LOCK_WAIT_TIMEOUT update t1 set a=12 where a=2; |