Commit bfc113c9 authored by John Esmet's avatar John Esmet

[t:3453] getting rid of old test results, adding new ones


git-svn-id: file:///svn/mysql/tests/mysql-test@35021 c7de825b-a66e-492c-adef-691d508d4ae1
parent 6a148af4
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;
set global tokudb_lock_timeout=30000000;
select @@tokudb_lock_timeout;
@@tokudb_lock_timeout
30000000
set storage_engine='tokudb';
set global tokudb_lock_timeout=0;
select @@tokudb_lock_timeout;
@@tokudb_lock_timeout
0
drop table if exists t;
create table t (a int primary key, b int);
insert into t values (1,0),(2,0),(3,0),(4,0);
commit;
select @@autocommit;
@@autocommit
1
set autocommit=off;
select @@autocommit;
@@autocommit
1
set autocommit=off;
select * from t where a=1 for update;
a b
1 0
select * from t where a=1 for update;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
commit;
commit;
set global tokudb_lock_timeout=30000000;
drop table t;
# test that select for update is executed with serializable isolation
set storage_engine='tokudb';
set global tokudb_lock_timeout=0;
select @@tokudb_lock_timeout;
--disable_warnings
drop table if exists t;
--enable_warnings
create table t (a int primary key, b int);
insert into t values (1,0),(2,0),(3,0),(4,0);
commit;
select @@autocommit;
set autocommit=off;
#set session transaction isolation level read committed;
connect(conn1,localhost,root);
#set session transaction isolation level read committed;
select @@autocommit;
set autocommit=off;
connection default;
# t1 select for update
select * from t where a=1 for update;
connection conn1;
# t2 select for update, should get get lock timeout
--error ER_LOCK_WAIT_TIMEOUT
select * from t where a=1 for update;
commit;
connection default;
# t1 commit
commit;
set global tokudb_lock_timeout=30000000;
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