mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 21:42:35 +01:00
#3497 fix locking tests refs[t:3497]
git-svn-id: file:///svn/mysql/tests/mysql-test@31590 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
e3abbd94b6
commit
910dafd691
5 changed files with 12 additions and 6 deletions
|
@ -1,10 +1,16 @@
|
|||
# test that delete only takes write locks when tokudb_use_write_locks is asserted
|
||||
# t1 scans all of the rows in a table and deletes 1 of them
|
||||
# t1 grabs a write range lock on -infinity +infinity
|
||||
# t2 scans all of the rows in a table except the one deleted by t1
|
||||
# t2 should hang until t1 commits
|
||||
|
||||
set storage_engine='tokudb';
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t;
|
||||
--enable_warnings
|
||||
|
||||
connect(conn1,localhost);
|
||||
connect(conn1,localhost,root);
|
||||
|
||||
connection default;
|
||||
create table t (a int primary key, b int);
|
||||
|
|
|
@ -14,7 +14,7 @@ begin;
|
|||
select * from t where a=1 for update;
|
||||
# t2 update
|
||||
update t set b=b+1 where a=1;
|
||||
connect(conn1,localhost);
|
||||
connect(conn1,localhost,root);
|
||||
set tokudb_use_write_locks=1;
|
||||
set session transaction isolation level repeatable read;
|
||||
begin;
|
||||
|
|
|
@ -14,7 +14,7 @@ begin;
|
|||
select * from t where a=1 for update;
|
||||
# t2 update
|
||||
update t set b=b+1 where a=1;
|
||||
connect(conn1,localhost);
|
||||
connect(conn1,localhost,root);
|
||||
set tokudb_use_write_locks=1;
|
||||
set session transaction isolation level serializable;
|
||||
begin;
|
||||
|
|
|
@ -14,7 +14,7 @@ begin;
|
|||
select * from t where a=1 for update;
|
||||
# t2 update
|
||||
update t set b=b+1 where a=1;
|
||||
connect(conn1,localhost);
|
||||
connect(conn1,localhost,root);
|
||||
set tokudb_use_write_locks=1;
|
||||
set session transaction isolation level read committed;
|
||||
begin;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# test that update only take write locks when tokudb_use_write_locks is asserted
|
||||
# test that update only takes write locks when tokudb_use_write_locks is asserted
|
||||
# t1 scans all of the rows in a table and updates 1 of them
|
||||
# t1 grabs a write range lock on -infinity +infinity
|
||||
# t2 scans all of the rows in a table except the one updated by t1
|
||||
|
@ -10,7 +10,7 @@ set storage_engine='tokudb';
|
|||
drop table if exists t;
|
||||
--enable_warnings
|
||||
|
||||
connect(conn1,localhost);
|
||||
connect(conn1,localhost,root);
|
||||
|
||||
connection default;
|
||||
create table t (a int primary key, b int);
|
||||
|
|
Loading…
Reference in a new issue