diff options
Diffstat (limited to 'storage/tokudb/mysql-test/tokudb_bugs/t')
9 files changed, 295 insertions, 0 deletions
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/lock_uniq_key_empty.test b/storage/tokudb/mysql-test/tokudb_bugs/t/lock_uniq_key_empty.test new file mode 100644 index 00000000000..3f8d7113dff --- /dev/null +++ b/storage/tokudb/mysql-test/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/storage/tokudb/mysql-test/tokudb_bugs/t/lock_uniq_key_left.test b/storage/tokudb/mysql-test/tokudb_bugs/t/lock_uniq_key_left.test new file mode 100644 index 00000000000..44d5aef3e99 --- /dev/null +++ b/storage/tokudb/mysql-test/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/storage/tokudb/mysql-test/tokudb_bugs/t/lock_uniq_key_middle.test b/storage/tokudb/mysql-test/tokudb_bugs/t/lock_uniq_key_middle.test new file mode 100644 index 00000000000..03a31ba4978 --- /dev/null +++ b/storage/tokudb/mysql-test/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/storage/tokudb/mysql-test/tokudb_bugs/t/lock_uniq_key_right.test b/storage/tokudb/mysql-test/tokudb_bugs/t/lock_uniq_key_right.test new file mode 100644 index 00000000000..a62241df66c --- /dev/null +++ b/storage/tokudb/mysql-test/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; + diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/mdev4533.test b/storage/tokudb/mysql-test/tokudb_bugs/t/mdev4533.test new file mode 100644 index 00000000000..87f64dc704f --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_bugs/t/mdev4533.test @@ -0,0 +1,9 @@ +source include/have_tokudb.inc; +source include/have_binlog_format_row.inc; +disable_warnings; +DROP TABLE IF EXISTS t1; +enable_warnings; +CREATE TABLE t1 (a INT(11), b CHAR(8)) ENGINE=TokuDB; +INSERT INTO t1 (a,b) VALUES (10000,'foobar'),(1,'a'),(2,'b'),(3,'c'),(4,'d'),(5,'e'); +DELETE IGNORE FROM t1; +drop table t1;
\ No newline at end of file diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/mdev5932.test b/storage/tokudb/mysql-test/tokudb_bugs/t/mdev5932.test new file mode 100644 index 00000000000..34a1f7eab82 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_bugs/t/mdev5932.test @@ -0,0 +1,41 @@ +source include/have_tokudb.inc; +source include/have_innodb.inc; + +disable_warnings; +drop table if exists t1,t2; +drop table if exists t1i,t2i; +enable_warnings; + +CREATE TABLE t1 (a CHAR(3), INDEX(a)) ENGINE=TokuDB; +INSERT INTO t1 VALUES ('foo'),( NULL); + +SELECT * FROM t1 WHERE 'bar' NOT IN ( SELECT t1_1.a FROM t1 AS t1_1, t1 AS t1_2 ); + +CREATE TABLE t2 AS + SELECT * FROM t1 WHERE 'bar' NOT IN ( SELECT t1_1.a FROM t1 AS t1_1, t1 AS t1_2 ); + +SELECT * FROM t2; + +CREATE TABLE tsub AS SELECT t1_1.a FROM t1 AS t1_1, t1 AS t1_2; + +CREATE TABLE t3 AS + SELECT * FROM t1 WHERE 'bar' NOT IN ( SELECT * FROM tsub ); + +SELECT * FROM t3; + +DROP TABLE tsub, t3; + +CREATE TABLE t1i (a CHAR(3), INDEX(a)) ENGINE=InnoDB; +INSERT INTO t1i VALUES ('foo'),( NULL); + +SELECT * FROM t1i WHERE 'bar' NOT IN ( SELECT t1_1.a FROM t1i AS t1_1, t1i AS t1_2 ); + +CREATE TABLE t2i AS + SELECT * FROM t1i WHERE 'bar' NOT IN ( SELECT t1_1.a FROM t1i AS t1_1, t1i AS t1_2 ); + +SELECT * FROM t2i; + +let $diff_tables = t2,t2i; +source include/diff_tables.inc; + +drop table t1,t2,t1i,t2i;
\ No newline at end of file diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/rpl_mixed_replace_into.test b/storage/tokudb/mysql-test/tokudb_bugs/t/rpl_mixed_replace_into.test new file mode 100644 index 00000000000..05e6e2fb228 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_bugs/t/rpl_mixed_replace_into.test @@ -0,0 +1,25 @@ +source include/have_tokudb.inc; +source include/master-slave.inc; +source include/have_binlog_format_mixed.inc; + +set default_storage_engine='tokudb'; + +disable_warnings; +drop table if exists testr; +enable_warnings; + +CREATE TABLE testr (pk int(11) NOT NULL AUTO_INCREMENT, num int(11) DEFAULT NULL, txt varchar(32) DEFAULT NULL, PRIMARY KEY (pk) ); +INSERT INTO testr VALUES (1,1,'one'),(2,2,'two'),(3,3,'three'),(4,4,'four'); +replace into testr values (2,2,'twotwo'); +select * from testr; + +save_master_pos; +connection slave; +sync_with_master; +select * from testr; + +connection master; + +drop table testr; + +source include/rpl_end.inc; diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/rpl_row_replace_into.test b/storage/tokudb/mysql-test/tokudb_bugs/t/rpl_row_replace_into.test new file mode 100644 index 00000000000..062f11e0ed9 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_bugs/t/rpl_row_replace_into.test @@ -0,0 +1,25 @@ +source include/have_tokudb.inc; +source include/master-slave.inc; +source include/have_binlog_format_row.inc; + +set default_storage_engine='tokudb'; + +disable_warnings; +drop table if exists testr; +enable_warnings; + +CREATE TABLE testr (pk int(11) NOT NULL AUTO_INCREMENT, num int(11) DEFAULT NULL, txt varchar(32) DEFAULT NULL, PRIMARY KEY (pk) ); +INSERT INTO testr VALUES (1,1,'one'),(2,2,'two'),(3,3,'three'),(4,4,'four'); +replace into testr values (2,2,'twotwo'); +select * from testr; + +save_master_pos; +connection slave; +sync_with_master; +select * from testr; + +connection master; + +drop table testr; + +source include/rpl_end.inc; diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/rpl_stmt_replace_into.test b/storage/tokudb/mysql-test/tokudb_bugs/t/rpl_stmt_replace_into.test new file mode 100644 index 00000000000..f7e4c7a09e0 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_bugs/t/rpl_stmt_replace_into.test @@ -0,0 +1,25 @@ +source include/have_tokudb.inc; +source include/master-slave.inc; +source include/have_binlog_format_statement.inc; + +set default_storage_engine='tokudb'; + +disable_warnings; +drop table if exists testr; +enable_warnings; + +CREATE TABLE testr (pk int(11) NOT NULL AUTO_INCREMENT, num int(11) DEFAULT NULL, txt varchar(32) DEFAULT NULL, PRIMARY KEY (pk) ); +INSERT INTO testr VALUES (1,1,'one'),(2,2,'two'),(3,3,'three'),(4,4,'four'); +replace into testr values (2,2,'twotwo'); +select * from testr; + +save_master_pos; +connection slave; +sync_with_master; +select * from testr; + +connection master; + +drop table testr; + +source include/rpl_end.inc; |