summaryrefslogtreecommitdiff
path: root/mysql-test/t/innodb-semi-consistent.test
diff options
context:
space:
mode:
authorTimothy Smith <timothy.smith@sun.com>2009-01-13 15:14:11 +0100
committerTimothy Smith <timothy.smith@sun.com>2009-01-13 15:14:11 +0100
commit96415bb39da6cafaf2059de6d9b58dbc115c7f92 (patch)
tree52386ea6d5d7150ae50430b04e3966b4c6364a91 /mysql-test/t/innodb-semi-consistent.test
parent13927f53c5603f13b9f5a462140e3ae13877ff2a (diff)
downloadmariadb-git-96415bb39da6cafaf2059de6d9b58dbc115c7f92.tar.gz
Applying InnoDB snapshot innodb-5.1-ss3603
Detailed description of changes: r3601 | marko | 2008-12-22 16:05:19 +0200 (Mon, 22 Dec 2008) | 9 lines branches/5.1: Make SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED a true replacement of SET GLOBAL INNODB_LOCKS_UNSAFE_FOR_BINLOG=1. This fixes an error that was introduced in r370, causing semi-consistent read not to not unlock rows in READ UNCOMMITTED mode. (Bug #41671, Issue #146) rb://67 approved by Heikki Tuuri
Diffstat (limited to 'mysql-test/t/innodb-semi-consistent.test')
-rw-r--r--mysql-test/t/innodb-semi-consistent.test7
1 files changed, 5 insertions, 2 deletions
diff --git a/mysql-test/t/innodb-semi-consistent.test b/mysql-test/t/innodb-semi-consistent.test
index a3496625e95..6d3020bb560 100644
--- a/mysql-test/t/innodb-semi-consistent.test
+++ b/mysql-test/t/innodb-semi-consistent.test
@@ -11,7 +11,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;
insert into t1 values (1),(2),(3),(4),(5),(6),(7);
set autocommit=0;
@@ -19,13 +19,15 @@ 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;
connection a;
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
@@ -33,6 +35,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;