Commit 099bbf94 authored by Rich Prohaska's avatar Rich Prohaska

#3497 fix locking tests refs[t:3497]

git-svn-id: file:///svn/mysql/tests/mysql-test@31590 c7de825b-a66e-492c-adef-691d508d4ae1
parent cd6ad0a1
# 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'; set storage_engine='tokudb';
--disable_warnings --disable_warnings
drop table if exists t; drop table if exists t;
--enable_warnings --enable_warnings
connect(conn1,localhost); connect(conn1,localhost,root);
connection default; connection default;
create table t (a int primary key, b int); create table t (a int primary key, b int);
......
...@@ -14,7 +14,7 @@ begin; ...@@ -14,7 +14,7 @@ begin;
select * from t where a=1 for update; select * from t where a=1 for update;
# t2 update # t2 update
update t set b=b+1 where a=1; update t set b=b+1 where a=1;
connect(conn1,localhost); connect(conn1,localhost,root);
set tokudb_use_write_locks=1; set tokudb_use_write_locks=1;
set session transaction isolation level repeatable read; set session transaction isolation level repeatable read;
begin; begin;
......
...@@ -14,7 +14,7 @@ begin; ...@@ -14,7 +14,7 @@ begin;
select * from t where a=1 for update; select * from t where a=1 for update;
# t2 update # t2 update
update t set b=b+1 where a=1; update t set b=b+1 where a=1;
connect(conn1,localhost); connect(conn1,localhost,root);
set tokudb_use_write_locks=1; set tokudb_use_write_locks=1;
set session transaction isolation level serializable; set session transaction isolation level serializable;
begin; begin;
......
...@@ -14,7 +14,7 @@ begin; ...@@ -14,7 +14,7 @@ begin;
select * from t where a=1 for update; select * from t where a=1 for update;
# t2 update # t2 update
update t set b=b+1 where a=1; update t set b=b+1 where a=1;
connect(conn1,localhost); connect(conn1,localhost,root);
set tokudb_use_write_locks=1; set tokudb_use_write_locks=1;
set session transaction isolation level read committed; set session transaction isolation level read committed;
begin; begin;
......
# 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 scans all of the rows in a table and updates 1 of them
# t1 grabs a write range lock on -infinity +infinity # t1 grabs a write range lock on -infinity +infinity
# t2 scans all of the rows in a table except the one updated by t1 # t2 scans all of the rows in a table except the one updated by t1
...@@ -10,7 +10,7 @@ set storage_engine='tokudb'; ...@@ -10,7 +10,7 @@ set storage_engine='tokudb';
drop table if exists t; drop table if exists t;
--enable_warnings --enable_warnings
connect(conn1,localhost); connect(conn1,localhost,root);
connection default; connection default;
create table t (a int primary key, b int); create table t (a int primary key, b int);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment