mirror of
https://github.com/MariaDB/server.git
synced 2025-12-19 22:42:44 +03:00
git-svn-id: file:///svn/mysql/tests/mysql-test@35021 c7de825b-a66e-492c-adef-691d508d4ae1
38 lines
876 B
Plaintext
38 lines
876 B
Plaintext
# 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;
|