Commit 6a148af4 authored by John Esmet's avatar John Esmet

[t:3453] cleanup


git-svn-id: file:///svn/mysql/tests/mysql-test@35019 c7de825b-a66e-492c-adef-691d508d4ae1
parent 2a6019b2
# 9/22/2011
# Test that blocking row locks work correctly.
set storage_engine='tokudb';
set global tokudb_lock_timeout=1000000;
--disable_warnings
drop table if exists t;
--enable_warnings
create table t (a int primary key, b int);
insert into t values (1, 1);
insert into t values (2, 4);
insert into t values (3, 9);
insert into t values (4, 16);
set autocommit=off;
# READ/WRITE CONFLICTS WITH SERIALIZABLE TRANSACTIONS
connect(conn1, localhost, root);
set session transaction isolation level serializable;
# point lock, select for update
begin;
select * from t where a=1 for update;
connect(conn2, localhost, root);
set session transaction isolation level serializable;
--error ER_LOCK_WAIT_TIMEOUT
select * from t where a=1;
select * from t where a=2;
select * from t where a=3;
select * from t where a=4;
connection conn1;
commit;
connection conn2;
select * from t;
# range lock, select for update
connection conn1;
begin;
select * from t where a<=2 for update;
connection conn2;
--error ER_LOCK_WAIT_TIMEOUT
select * from t where a=1;
--error ER_LOCK_WAIT_TIMEOUT
select * from t where a=1 for update;
--error ER_LOCK_WAIT_TIMEOUT
select * from t where a>1;
--error ER_LOCK_WAIT_TIMEOUT
select * from t;
select * from t where a=4;
connection conn1;
commit;
connection conn2;
select * from t;
# point lock, replace into
connection conn1;
begin;
replace into t values(1, 10),(3,30);
connection conn2;
--error ER_LOCK_WAIT_TIMEOUT
select * from t where a=1;
--error ER_LOCK_WAIT_TIMEOUT
select * from t where a=3;
select * from t where a=2;
select * from t where a=4;
connection conn1;
commit;
connection conn2;
select * from t;
# range lock, replace into
connection conn1;
begin;
insert on duplicate ke
# Make sure we drop table and reset the default lock timeout.
connection conn1;
drop table t;
set global tokudb_lock_timeout=30000000;
select @@tokudb_lock_timeout;
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