diff options
Diffstat (limited to 'mysql-test/main/concurrent_innodb_unsafelog.result')
-rw-r--r-- | mysql-test/main/concurrent_innodb_unsafelog.result | 50 |
1 files changed, 24 insertions, 26 deletions
diff --git a/mysql-test/main/concurrent_innodb_unsafelog.result b/mysql-test/main/concurrent_innodb_unsafelog.result index 39e757aeeb1..9ae80328c0b 100644 --- a/mysql-test/main/concurrent_innodb_unsafelog.result +++ b/mysql-test/main/concurrent_innodb_unsafelog.result @@ -1,15 +1,14 @@ -SET GLOBAL TRANSACTION ISOLATION LEVEL REPEATABLE READ; +SET @save_timeout = @@GLOBAL.innodb_lock_wait_timeout; +SET GLOBAL innodb_lock_wait_timeout = 1; +SET @save_isolation = @@GLOBAL.tx_isolation; +SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED; connection default; SET SQL_MODE=""; SELECT @@global.tx_isolation; @@global.tx_isolation -REPEATABLE-READ -SELECT @@global.innodb_locks_unsafe_for_binlog; -@@global.innodb_locks_unsafe_for_binlog -1 +READ-COMMITTED # keep_locks == 0 GRANT USAGE ON test.* TO mysqltest@localhost; -drop table if exists t1; ** ** two UPDATE's running and both changing distinct result sets @@ -17,7 +16,7 @@ drop table if exists t1; connect thread1, localhost, mysqltest,,; connection thread1; ** Set up table -SET SESSION STORAGE_ENGINE = InnoDB; +SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB; create table t1(eta int(11) not null, tipo int(11), c varchar(255)); insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"); @@ -47,7 +46,7 @@ begin; ** Update on t1 will cause a table scan which will be blocked because ** the previously initiated table scan applied exclusive key locks on ** all primary keys. -** Not so if innodb_locks_unsafe_for_binlog is set. The locks that +** Not so for READ UNCOMMITTED or READ COMMITTED. The locks that ** do not match the WHERE condition are released. update t1 set eta=2 where tipo=22; ** Release user level name lock from thread 1. This will cause the ULL @@ -101,7 +100,7 @@ eta tipo c 60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh 70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 2 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj -90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk +1 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk ** And send final commit on thread 1. commit; ** Table should now be updated by both updates in the order of @@ -156,7 +155,7 @@ drop table t1; ** connection thread1; ** Set up table -SET SESSION STORAGE_ENGINE = InnoDB; +SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB; create table t1(eta int(11) not null, tipo int(11), c varchar(255)); insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"); @@ -186,7 +185,7 @@ begin; ** Update on t1 will cause a table scan which will be blocked because ** the previously initiated table scan applied exclusive key locks on ** all primary keys. -** Not so if innodb_locks_unsafe_for_binlog is set. The locks that +** Not so for READ UNCOMMITTED or READ COMMITTED. The locks that ** do not match the WHERE condition are released. update t1 set tipo=1 where tipo=2; ** Release ULL. This will release the next waiting ULL on thread 2. @@ -231,13 +230,13 @@ select * from t1; eta tipo c 7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb -10 1 ccccccccccccccccccccccccccccccccccccccccccc +1 1 ccccccccccccccccccccccccccccccccccccccccccc 20 1 ddddddddddddddddddddddddddddddddddddddddddd -30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee +1 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee 40 1 fffffffffffffffffffffffffffffffffffffffffff -50 1 ggggggggggggggggggggggggggggggggggggggggggg +1 1 ggggggggggggggggggggggggggggggggggggggggggg 60 1 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii +1 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj 90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk commit; @@ -293,7 +292,7 @@ drop table t1; ** connection thread1; ** Set up table -SET SESSION STORAGE_ENGINE = InnoDB; +SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB; create table t1 (a int not null, b int not null); insert into t1 values (1,1),(2,1),(3,1),(4,1); ** Create ULL 'hello2' @@ -342,7 +341,7 @@ drop table t1; ** connection thread1; ** Set up table -SET SESSION STORAGE_ENGINE = InnoDB; +SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB; create table t1(eta int(11) not null, tipo int(11), c varchar(255)); insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"); @@ -445,7 +444,7 @@ drop table t1; ** connection thread1; ** Set up table -SET SESSION STORAGE_ENGINE = InnoDB; +SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB; create table t1(eta int(11) not null, tipo int(11), c varchar(255)); insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"); @@ -474,7 +473,7 @@ begin; ** Updating single row using a table scan. This will time out ** because of ongoing transaction on thread 1 holding lock on ** all primary keys in the scan. -** Not so if innodb_locks_unsafe_for_binlog is set. The locks that +** Not so for READ UNCOMMITTED or READ COMMITTED. The locks that ** do not match the WHERE condition are released. update t1 set tipo=11 where tipo=22; ** After the time out the transaction is aborted; no rows should @@ -548,7 +547,7 @@ drop table t1; ** connection thread1; ** Set up table -SET SESSION STORAGE_ENGINE = InnoDB; +SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB; create table t1(eta int(11) not null, tipo int(11), c varchar(255)); insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"); @@ -635,7 +634,7 @@ drop table t1; ** connection thread1; ** Set up table -SET SESSION STORAGE_ENGINE = InnoDB; +SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB; create table t1(eta int(11) not null, tipo int(11), c varchar(255)); insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"); @@ -712,7 +711,7 @@ drop table t1; ** connection thread1; ** Set up table -SET SESSION STORAGE_ENGINE = InnoDB; +SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB; create table t1(eta int(11) not null, tipo int(11), c varchar(255)); insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"); @@ -733,7 +732,7 @@ begin; ** Update on t1 will cause a table scan which will be blocked because ** the previously initiated table scan applied exclusive key locks on ** all primary keys. -** Not so if innodb_locks_unsafe_for_binlog is set. The locks that +** Not so for READ UNCOMMITTED or READ COMMITTED. The locks that ** do not match the WHERE condition are released. update t1 set tipo=1 where tipo=22; select * from t1; @@ -785,12 +784,11 @@ eta tipo c 70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 80 1 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj 90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk -** Cleanup -connection thread1; disconnect thread1; -connection thread2; disconnect thread2; connection default; drop table t1; drop user mysqltest@localhost; SET SQL_MODE=default; +SET GLOBAL innodb_lock_wait_timeout = @save_timeout; +SET GLOBAL tx_isolation = @save_isolation; |