mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
#3557 merge write locking test bug fixes from 5.0.5 to main refs[t:3557]
git-svn-id: file:///svn/mysql/tests/mysql-test@32094 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
@@ -2,7 +2,6 @@ set storage_engine='tokudb';
|
||||
drop table if exists t;
|
||||
create table t (a int primary key, b int);
|
||||
insert into t values (1,0),(2,1),(3,0);
|
||||
set tokudb_use_write_locks=1;
|
||||
begin;
|
||||
delete from t where b>0;
|
||||
set transaction isolation level serializable;
|
||||
|
||||
@@ -2,14 +2,12 @@ set storage_engine='tokudb';
|
||||
drop table if exists t;
|
||||
create table t (a int primary key, b int);
|
||||
insert into t values (1,0);
|
||||
set tokudb_use_write_locks=1;
|
||||
set session transaction isolation level repeatable read;
|
||||
begin;
|
||||
select * from t where a=1 for update;
|
||||
a b
|
||||
1 0
|
||||
update t set b=b+1 where a=1;
|
||||
set tokudb_use_write_locks=1;
|
||||
set session transaction isolation level repeatable read;
|
||||
begin;
|
||||
select * from t where a=1 for update;
|
||||
|
||||
@@ -2,14 +2,12 @@ set storage_engine='tokudb';
|
||||
drop table if exists t;
|
||||
create table t (a int primary key, b int);
|
||||
insert into t values (1,0);
|
||||
set tokudb_use_write_locks=1;
|
||||
set session transaction isolation level serializable;
|
||||
begin;
|
||||
select * from t where a=1 for update;
|
||||
a b
|
||||
1 0
|
||||
update t set b=b+1 where a=1;
|
||||
set tokudb_use_write_locks=1;
|
||||
set session transaction isolation level serializable;
|
||||
begin;
|
||||
select * from t where a=1 for update;
|
||||
|
||||
@@ -2,14 +2,12 @@ set storage_engine='tokudb';
|
||||
drop table if exists t;
|
||||
create table t (a int primary key, b int);
|
||||
insert into t values (1,0);
|
||||
set tokudb_use_write_locks=1;
|
||||
set session transaction isolation level read committed;
|
||||
begin;
|
||||
select * from t where a=1 for update;
|
||||
a b
|
||||
1 0
|
||||
update t set b=b+1 where a=1;
|
||||
set tokudb_use_write_locks=1;
|
||||
set session transaction isolation level read committed;
|
||||
begin;
|
||||
select * from t where a=1 for update;
|
||||
|
||||
@@ -2,7 +2,6 @@ set storage_engine='tokudb';
|
||||
drop table if exists t;
|
||||
create table t (a int primary key, b int);
|
||||
insert into t values (1,0),(2,1),(3,0);
|
||||
set tokudb_use_write_locks=1;
|
||||
begin;
|
||||
update t set b=b+1 where b>0;
|
||||
set transaction isolation level serializable;
|
||||
|
||||
@@ -15,7 +15,6 @@ 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);
|
||||
set tokudb_use_write_locks=1;
|
||||
begin;
|
||||
delete from t where b>0;
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ drop table if exists t;
|
||||
--enable_warnings
|
||||
create table t (a int primary key, b int);
|
||||
insert into t values (1,0);
|
||||
set tokudb_use_write_locks=1;
|
||||
set session transaction isolation level repeatable read;
|
||||
begin;
|
||||
# t1 select for update
|
||||
@@ -15,7 +14,6 @@ select * from t where a=1 for update;
|
||||
# t2 update
|
||||
update t set b=b+1 where a=1;
|
||||
connect(conn1,localhost,root);
|
||||
set tokudb_use_write_locks=1;
|
||||
set session transaction isolation level repeatable read;
|
||||
begin;
|
||||
# t2 select for update, should hang until t1 commits
|
||||
|
||||
@@ -7,7 +7,6 @@ drop table if exists t;
|
||||
--enable_warnings
|
||||
create table t (a int primary key, b int);
|
||||
insert into t values (1,0);
|
||||
set tokudb_use_write_locks=1;
|
||||
set session transaction isolation level serializable;
|
||||
begin;
|
||||
# t1 select for update
|
||||
@@ -15,7 +14,6 @@ select * from t where a=1 for update;
|
||||
# t2 update
|
||||
update t set b=b+1 where a=1;
|
||||
connect(conn1,localhost,root);
|
||||
set tokudb_use_write_locks=1;
|
||||
set session transaction isolation level serializable;
|
||||
begin;
|
||||
# t2 select for update, should hang until t1 commits
|
||||
|
||||
@@ -7,7 +7,6 @@ drop table if exists t;
|
||||
--enable_warnings
|
||||
create table t (a int primary key, b int);
|
||||
insert into t values (1,0);
|
||||
set tokudb_use_write_locks=1;
|
||||
set session transaction isolation level read committed;
|
||||
begin;
|
||||
# t1 select for update
|
||||
@@ -15,7 +14,6 @@ select * from t where a=1 for update;
|
||||
# t2 update
|
||||
update t set b=b+1 where a=1;
|
||||
connect(conn1,localhost,root);
|
||||
set tokudb_use_write_locks=1;
|
||||
set session transaction isolation level read committed;
|
||||
begin;
|
||||
# t2 select for update, should hang until t1 commits
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# test that update only takes write locks when tokudb_use_write_locks is asserted
|
||||
# test that update only take write locks
|
||||
# t1 scans all of the rows in a table and updates 1 of them
|
||||
# t1 grabs a write range lock on -infinity +infinity
|
||||
# t2 scans all of the rows in a table except the one updated by t1
|
||||
@@ -15,7 +15,6 @@ 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);
|
||||
set tokudb_use_write_locks=1;
|
||||
begin;
|
||||
update t set b=b+1 where b>0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user