Commit 87b93d48 authored by John Esmet's avatar John Esmet

[t:3453] results, take 1


git-svn-id: file:///svn/mysql/tests/mysql-test@34971 c7de825b-a66e-492c-adef-691d508d4ae1
parent a191166c
set storage_engine='tokudb';
select @@tokudb_lock_timeout;
@@tokudb_lock_timeout
30000000
set global tokudb_lock_timeout=1234567;
select @@tokudb_lock_timeout;
@@tokudb_lock_timeout
1234567
set global tokudb_lock_timeout=5000000;
select @@tokudb_lock_timeout;
@@tokudb_lock_timeout
5000000
set global tokudb_lock_timeout=1000000;
select @@tokudb_lock_timeout;
@@tokudb_lock_timeout
1000000
set storage_engine='tokudb';
set global tokudb_lock_timeout=1000000;
drop table if exists t;
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;
set session transaction isolation level serializable;
begin;
select * from t where a=1 for update;
a b
1 1
set session transaction isolation level serializable;
select * from t where a=1;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
select * from t where a=2;
a b
2 4
select * from t where a=3;
a b
3 9
select * from t where a=4;
a b
4 16
commit;
select * from t;
a b
1 1
2 4
3 9
4 16
begin;
select * from t where a<=2 for update;
a b
1 1
2 4
select * from t where a=1;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
select * from t where a>1;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
select * from t;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
select * from t where a=4;
a b
4 16
commit;
select * from t;
a b
1 1
2 4
3 9
4 16
begin;
replace into t values(1, 10),(3,30);
select * from t where a=1;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
select * from t where a=3;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
select * from t where a=2;
a b
2 4
select * from t where a=4;
a b
4 16
commit;
select * from t;
a b
1 10
2 4
3 30
4 16
drop table t;
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