mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 23:04:20 +01:00
b882892cea
git-svn-id: file:///svn/mysql/tests/mysql-test@32094 c7de825b-a66e-492c-adef-691d508d4ae1
34 lines
762 B
Text
34 lines
762 B
Text
# 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';
|
|
|
|
--disable_warnings
|
|
drop table if exists t;
|
|
--enable_warnings
|
|
|
|
connect(conn1,localhost,root);
|
|
|
|
connection default;
|
|
create table t (a int primary key, b int);
|
|
insert into t values (1,0),(2,1),(3,0);
|
|
begin;
|
|
delete from t where b>0;
|
|
|
|
connection conn1;
|
|
set transaction isolation level serializable;
|
|
send select * from t where a!=2;
|
|
|
|
connection default;
|
|
commit;
|
|
|
|
connection conn1;
|
|
reap;
|
|
|
|
connection default;
|
|
disconnect conn1;
|
|
|
|
drop table t;
|