diff options
author | Rich Prohaska <prohaska@tokutek.com> | 2014-04-07 13:34:58 -0400 |
---|---|---|
committer | Rich Prohaska <prohaska@tokutek.com> | 2014-04-07 13:34:58 -0400 |
commit | 1dce2eaa2fafa27fa0019ec9c8f30c1f9c7097f3 (patch) | |
tree | 19835264cec0d8020888edc90c6ce15c1b8d1ded /mysql-test | |
parent | 6f6a1289948357b46d16f9f51858535ed995e186 (diff) | |
download | mariadb-git-1dce2eaa2fafa27fa0019ec9c8f30c1f9c7097f3.tar.gz |
#133 dont overlock key ranges for unique secondary keys
Diffstat (limited to 'mysql-test')
8 files changed, 292 insertions, 0 deletions
diff --git a/mysql-test/suite/tokudb.bugs/r/lock_uniq_key_empty.result b/mysql-test/suite/tokudb.bugs/r/lock_uniq_key_empty.result new file mode 100644 index 00000000000..6966aa24ff8 --- /dev/null +++ b/mysql-test/suite/tokudb.bugs/r/lock_uniq_key_empty.result @@ -0,0 +1,26 @@ +set default_storage_engine=tokudb; +drop table if exists t; +create table t (id int, unique key(id)); +begin; +insert into t values (1); +begin; +insert into t values (2); +commit; +commit; +select * from t; +id +1 +2 +drop table if exists t; +create table t (id int not null, unique key(id)); +begin; +insert into t values (1); +begin; +insert into t values (2); +commit; +commit; +select * from t; +id +1 +2 +drop table if exists t; diff --git a/mysql-test/suite/tokudb.bugs/r/lock_uniq_key_left.result b/mysql-test/suite/tokudb.bugs/r/lock_uniq_key_left.result new file mode 100644 index 00000000000..b94dbbbd1b5 --- /dev/null +++ b/mysql-test/suite/tokudb.bugs/r/lock_uniq_key_left.result @@ -0,0 +1,32 @@ +set default_storage_engine=tokudb; +drop table if exists t; +create table t (id int, unique key(id)); +insert into t values (10),(100); +begin; +insert into t values (5); +begin; +insert into t values (6); +commit; +commit; +select * from t; +id +5 +6 +10 +100 +drop table if exists t; +create table t (id int not null, unique key(id)); +insert into t values (10),(100); +begin; +insert into t values (5); +begin; +insert into t values (6); +commit; +commit; +select * from t; +id +5 +6 +10 +100 +drop table if exists t; diff --git a/mysql-test/suite/tokudb.bugs/r/lock_uniq_key_middle.result b/mysql-test/suite/tokudb.bugs/r/lock_uniq_key_middle.result new file mode 100644 index 00000000000..763cfc88812 --- /dev/null +++ b/mysql-test/suite/tokudb.bugs/r/lock_uniq_key_middle.result @@ -0,0 +1,32 @@ +set default_storage_engine=tokudb; +drop table if exists t; +create table t (id int, unique key(id)); +insert into t values (10),(100); +begin; +insert into t values (50); +begin; +insert into t values (60); +commit; +commit; +select * from t; +id +10 +50 +60 +100 +drop table if exists t; +create table t (id int not null, unique key(id)); +insert into t values (10),(100); +begin; +insert into t values (50); +begin; +insert into t values (60); +commit; +commit; +select * from t; +id +10 +50 +60 +100 +drop table if exists t; diff --git a/mysql-test/suite/tokudb.bugs/r/lock_uniq_key_right.result b/mysql-test/suite/tokudb.bugs/r/lock_uniq_key_right.result new file mode 100644 index 00000000000..b820a4f0806 --- /dev/null +++ b/mysql-test/suite/tokudb.bugs/r/lock_uniq_key_right.result @@ -0,0 +1,32 @@ +set default_storage_engine=tokudb; +drop table if exists t; +create table t (id int, unique key(id)); +insert into t values (10),(100); +begin; +insert into t values (500); +begin; +insert into t values (600); +commit; +commit; +select * from t; +id +10 +100 +500 +600 +drop table if exists t; +create table t (id int not null, unique key(id)); +insert into t values (10),(100); +begin; +insert into t values (500); +begin; +insert into t values (600); +commit; +commit; +select * from t; +id +10 +100 +500 +600 +drop table if exists t; diff --git a/mysql-test/suite/tokudb.bugs/t/lock_uniq_key_empty.test b/mysql-test/suite/tokudb.bugs/t/lock_uniq_key_empty.test new file mode 100644 index 00000000000..3f8d7113dff --- /dev/null +++ b/mysql-test/suite/tokudb.bugs/t/lock_uniq_key_empty.test @@ -0,0 +1,41 @@ +# test case for overlocking unique secondary keys +source include/have_tokudb.inc; +set default_storage_engine=tokudb; +disable_warnings; +drop table if exists t; +enable_warnings; + +create table t (id int, unique key(id)); +connect(c1,localhost,root,,); +begin; +insert into t values (1); +connect(c2,localhost,root,,); +begin; +insert into t values (2); +connection c1; +commit; +connection c2; +commit; +connection default; +select * from t; +disconnect c1; +disconnect c2; +drop table if exists t; + +create table t (id int not null, unique key(id)); +connect(c1,localhost,root,,); +begin; +insert into t values (1); +connect(c2,localhost,root,,); +begin; +insert into t values (2); +connection c1; +commit; +connection c2; +commit; +connection default; +select * from t; +disconnect c1; +disconnect c2; +drop table if exists t; + diff --git a/mysql-test/suite/tokudb.bugs/t/lock_uniq_key_left.test b/mysql-test/suite/tokudb.bugs/t/lock_uniq_key_left.test new file mode 100644 index 00000000000..44d5aef3e99 --- /dev/null +++ b/mysql-test/suite/tokudb.bugs/t/lock_uniq_key_left.test @@ -0,0 +1,43 @@ +# test case for overlocking unique secondary keys +source include/have_tokudb.inc; +set default_storage_engine=tokudb; +disable_warnings; +drop table if exists t; +enable_warnings; + +create table t (id int, unique key(id)); +insert into t values (10),(100); +connect(c1,localhost,root,,); +begin; +insert into t values (5); +connect(c2,localhost,root,,); +begin; +insert into t values (6); +connection c1; +commit; +connection c2; +commit; +connection default; +select * from t; +disconnect c1; +disconnect c2; +drop table if exists t; + +create table t (id int not null, unique key(id)); +insert into t values (10),(100); +connect(c1,localhost,root,,); +begin; +insert into t values (5); +connect(c2,localhost,root,,); +begin; +insert into t values (6); +connection c1; +commit; +connection c2; +commit; +connection default; +select * from t; +disconnect c1; +disconnect c2; +drop table if exists t; + diff --git a/mysql-test/suite/tokudb.bugs/t/lock_uniq_key_middle.test b/mysql-test/suite/tokudb.bugs/t/lock_uniq_key_middle.test new file mode 100644 index 00000000000..03a31ba4978 --- /dev/null +++ b/mysql-test/suite/tokudb.bugs/t/lock_uniq_key_middle.test @@ -0,0 +1,43 @@ +# test case for overlocking unique secondary keys +source include/have_tokudb.inc; +set default_storage_engine=tokudb; +disable_warnings; +drop table if exists t; +enable_warnings; + +create table t (id int, unique key(id)); +insert into t values (10),(100); +connect(c1,localhost,root,,); +begin; +insert into t values (50); +connect(c2,localhost,root,,); +begin; +insert into t values (60); +connection c1; +commit; +connection c2; +commit; +connection default; +select * from t; +disconnect c1; +disconnect c2; +drop table if exists t; + +create table t (id int not null, unique key(id)); +insert into t values (10),(100); +connect(c1,localhost,root,,); +begin; +insert into t values (50); +connect(c2,localhost,root,,); +begin; +insert into t values (60); +connection c1; +commit; +connection c2; +commit; +connection default; +select * from t; +disconnect c1; +disconnect c2; +drop table if exists t; + diff --git a/mysql-test/suite/tokudb.bugs/t/lock_uniq_key_right.test b/mysql-test/suite/tokudb.bugs/t/lock_uniq_key_right.test new file mode 100644 index 00000000000..a62241df66c --- /dev/null +++ b/mysql-test/suite/tokudb.bugs/t/lock_uniq_key_right.test @@ -0,0 +1,43 @@ +# test case for overlocking unique secondary keys +source include/have_tokudb.inc; +set default_storage_engine=tokudb; +disable_warnings; +drop table if exists t; +enable_warnings; + +create table t (id int, unique key(id)); +insert into t values (10),(100); +connect(c1,localhost,root,,); +begin; +insert into t values (500); +connect(c2,localhost,root,,); +begin; +insert into t values (600); +connection c1; +commit; +connection c2; +commit; +connection default; +select * from t; +disconnect c1; +disconnect c2; +drop table if exists t; + +create table t (id int not null, unique key(id)); +insert into t values (10),(100); +connect(c1,localhost,root,,); +begin; +insert into t values (500); +connect(c2,localhost,root,,); +begin; +insert into t values (600); +connection c1; +commit; +connection c2; +commit; +connection default; +select * from t; +disconnect c1; +disconnect c2; +drop table if exists t; + |