summaryrefslogtreecommitdiff
path: root/storage/tokudb/mysql-test/rpl
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2018-09-14 08:47:22 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2018-09-14 08:47:22 +0200
commit28f08d3753eb10a1393a63e6c581d43aad9f93b9 (patch)
tree86c9df8c3fb6d4ebd99d431697c84f06ef242989 /storage/tokudb/mysql-test/rpl
parent38665893087e20c3ad65d5b0e227a75185a4865e (diff)
parentf1bcfbb4373e40dda2c18c137f76fc6ff32e1a45 (diff)
downloadmariadb-git-28f08d3753eb10a1393a63e6c581d43aad9f93b9.tar.gz
Merge branch '10.1' into 10.2
Diffstat (limited to 'storage/tokudb/mysql-test/rpl')
-rw-r--r--storage/tokudb/mysql-test/rpl/disabled.def1
-rw-r--r--storage/tokudb/mysql-test/rpl/r/rpl_mixed_replace_into.result23
-rw-r--r--storage/tokudb/mysql-test/rpl/r/rpl_parallel_tokudb_delete_pk.result5
-rw-r--r--storage/tokudb/mysql-test/rpl/r/rpl_parallel_tokudb_update_pk_uc0_lookup0.result5
-rw-r--r--storage/tokudb/mysql-test/rpl/r/rpl_parallel_tokudb_write_pk.result2
-rw-r--r--storage/tokudb/mysql-test/rpl/r/rpl_row_replace_into.result23
-rw-r--r--storage/tokudb/mysql-test/rpl/r/rpl_stmt_replace_into.result23
-rw-r--r--storage/tokudb/mysql-test/rpl/r/rpl_xa_interleave.result78
-rw-r--r--storage/tokudb/mysql-test/rpl/t/rpl_mixed_replace_into.test25
-rw-r--r--storage/tokudb/mysql-test/rpl/t/rpl_row_replace_into.test25
-rw-r--r--storage/tokudb/mysql-test/rpl/t/rpl_stmt_replace_into.test25
-rw-r--r--storage/tokudb/mysql-test/rpl/t/rpl_xa_interleave.test103
12 files changed, 326 insertions, 12 deletions
diff --git a/storage/tokudb/mysql-test/rpl/disabled.def b/storage/tokudb/mysql-test/rpl/disabled.def
index 4c1a9a3e785..282e343d57f 100644
--- a/storage/tokudb/mysql-test/rpl/disabled.def
+++ b/storage/tokudb/mysql-test/rpl/disabled.def
@@ -13,3 +13,4 @@ rpl_tokudb_write_unique_uc1: unreliable, uses timestamp differences
rpl_tokudb_read_only_ff: unreliable, uses timestamp differences
rpl_tokudb_read_only_tf: unreliable, uses timestamp differences
rpl_tokudb_read_only_tt: unreliable, uses timestamp differences
+rpl_tokudb_read_only_ft: no TOKU_INCLUDE_RFR
diff --git a/storage/tokudb/mysql-test/rpl/r/rpl_mixed_replace_into.result b/storage/tokudb/mysql-test/rpl/r/rpl_mixed_replace_into.result
new file mode 100644
index 00000000000..abe80743f62
--- /dev/null
+++ b/storage/tokudb/mysql-test/rpl/r/rpl_mixed_replace_into.result
@@ -0,0 +1,23 @@
+include/master-slave.inc
+[connection master]
+set default_storage_engine='tokudb';
+drop table if exists testr;
+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;
+pk num txt
+1 1 one
+2 2 twotwo
+3 3 three
+4 4 four
+connection slave;
+select * from testr;
+pk num txt
+1 1 one
+2 2 twotwo
+3 3 three
+4 4 four
+connection master;
+drop table testr;
+include/rpl_end.inc
diff --git a/storage/tokudb/mysql-test/rpl/r/rpl_parallel_tokudb_delete_pk.result b/storage/tokudb/mysql-test/rpl/r/rpl_parallel_tokudb_delete_pk.result
index a85d2155725..9ad7708a11d 100644
--- a/storage/tokudb/mysql-test/rpl/r/rpl_parallel_tokudb_delete_pk.result
+++ b/storage/tokudb/mysql-test/rpl/r/rpl_parallel_tokudb_delete_pk.result
@@ -5,11 +5,6 @@ drop table if exists t;
connection slave;
show variables like 'tokudb_rpl_%';
Variable_name Value
-tokudb_rpl_check_readonly ON
-tokudb_rpl_lookup_rows OFF
-tokudb_rpl_lookup_rows_delay 10000
-tokudb_rpl_unique_checks OFF
-tokudb_rpl_unique_checks_delay 10000
connection master;
create table t (a bigint not null, primary key(a)) engine=tokudb;
insert into t values (1);
diff --git a/storage/tokudb/mysql-test/rpl/r/rpl_parallel_tokudb_update_pk_uc0_lookup0.result b/storage/tokudb/mysql-test/rpl/r/rpl_parallel_tokudb_update_pk_uc0_lookup0.result
index 991ad8d1c48..10ab579de27 100644
--- a/storage/tokudb/mysql-test/rpl/r/rpl_parallel_tokudb_update_pk_uc0_lookup0.result
+++ b/storage/tokudb/mysql-test/rpl/r/rpl_parallel_tokudb_update_pk_uc0_lookup0.result
@@ -5,11 +5,6 @@ drop table if exists t;
connection slave;
show variables like 'tokudb_rpl_%';
Variable_name Value
-tokudb_rpl_check_readonly ON
-tokudb_rpl_lookup_rows OFF
-tokudb_rpl_lookup_rows_delay 10000
-tokudb_rpl_unique_checks OFF
-tokudb_rpl_unique_checks_delay 10000
connection master;
create table t (a bigint not null, b bigint not null, primary key(a)) engine=tokudb;
insert into t values (1,0);
diff --git a/storage/tokudb/mysql-test/rpl/r/rpl_parallel_tokudb_write_pk.result b/storage/tokudb/mysql-test/rpl/r/rpl_parallel_tokudb_write_pk.result
index 1de619eb4ec..0ae63f0d02f 100644
--- a/storage/tokudb/mysql-test/rpl/r/rpl_parallel_tokudb_write_pk.result
+++ b/storage/tokudb/mysql-test/rpl/r/rpl_parallel_tokudb_write_pk.result
@@ -5,8 +5,6 @@ drop table if exists t;
connection slave;
show variables like 'tokudb_rpl_unique_checks%';
Variable_name Value
-tokudb_rpl_unique_checks OFF
-tokudb_rpl_unique_checks_delay 5000
connection master;
create table t (a bigint not null, primary key(a)) engine=tokudb;
insert into t values (1);
diff --git a/storage/tokudb/mysql-test/rpl/r/rpl_row_replace_into.result b/storage/tokudb/mysql-test/rpl/r/rpl_row_replace_into.result
new file mode 100644
index 00000000000..abe80743f62
--- /dev/null
+++ b/storage/tokudb/mysql-test/rpl/r/rpl_row_replace_into.result
@@ -0,0 +1,23 @@
+include/master-slave.inc
+[connection master]
+set default_storage_engine='tokudb';
+drop table if exists testr;
+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;
+pk num txt
+1 1 one
+2 2 twotwo
+3 3 three
+4 4 four
+connection slave;
+select * from testr;
+pk num txt
+1 1 one
+2 2 twotwo
+3 3 three
+4 4 four
+connection master;
+drop table testr;
+include/rpl_end.inc
diff --git a/storage/tokudb/mysql-test/rpl/r/rpl_stmt_replace_into.result b/storage/tokudb/mysql-test/rpl/r/rpl_stmt_replace_into.result
new file mode 100644
index 00000000000..abe80743f62
--- /dev/null
+++ b/storage/tokudb/mysql-test/rpl/r/rpl_stmt_replace_into.result
@@ -0,0 +1,23 @@
+include/master-slave.inc
+[connection master]
+set default_storage_engine='tokudb';
+drop table if exists testr;
+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;
+pk num txt
+1 1 one
+2 2 twotwo
+3 3 three
+4 4 four
+connection slave;
+select * from testr;
+pk num txt
+1 1 one
+2 2 twotwo
+3 3 three
+4 4 four
+connection master;
+drop table testr;
+include/rpl_end.inc
diff --git a/storage/tokudb/mysql-test/rpl/r/rpl_xa_interleave.result b/storage/tokudb/mysql-test/rpl/r/rpl_xa_interleave.result
new file mode 100644
index 00000000000..98ded9d2097
--- /dev/null
+++ b/storage/tokudb/mysql-test/rpl/r/rpl_xa_interleave.result
@@ -0,0 +1,78 @@
+include/master-slave.inc
+[connection master]
+CREATE TABLE t1(`a` INT) ENGINE=TokuDB;
+connection master;
+XA START 'x1';
+INSERT INTO t1 VALUES (1);
+XA END 'x1';
+XA PREPARE 'x1';
+connection master1;
+BEGIN;
+INSERT INTO t1 VALUES (10);
+COMMIT;
+XA START 'y1';
+INSERT INTO t1 VALUES (2);
+XA END 'y1';
+XA PREPARE 'y1';
+connection master;
+XA COMMIT 'x1';
+connection master1;
+XA COMMIT 'y1';
+connection master;
+BEGIN;
+INSERT INTO t1 VALUES (11);
+COMMIT;
+XA START 'x2';
+INSERT INTO t1 VALUES (3);
+XA END 'x2';
+XA PREPARE 'x2';
+connection master1;
+XA START 'y2';
+INSERT INTO t1 VALUES (4);
+XA END 'y2';
+XA PREPARE 'y2';
+connection master;
+XA COMMIT 'x2';
+connection master1;
+XA COMMIT 'y2';
+connection master;
+XA START 'x1';
+INSERT INTO t1 VALUES (1);
+XA END 'x1';
+XA PREPARE 'x1';
+connection master1;
+BEGIN;
+INSERT INTO t1 VALUES (10);
+COMMIT;
+XA START 'y1';
+INSERT INTO t1 VALUES (2);
+XA END 'y1';
+XA PREPARE 'y1';
+connection master;
+XA ROLLBACK 'x1';
+connection master1;
+XA ROLLBACK 'y1';
+connection master;
+BEGIN;
+INSERT INTO t1 VALUES (11);
+COMMIT;
+XA START 'x2';
+INSERT INTO t1 VALUES (3);
+XA END 'x2';
+XA PREPARE 'x2';
+connection master1;
+XA START 'y2';
+INSERT INTO t1 VALUES (4);
+XA END 'y2';
+XA PREPARE 'y2';
+connection master;
+XA ROLLBACK 'x2';
+connection master1;
+XA ROLLBACK 'y2';
+connection master;
+connection slave;
+TABLES t1 and t2 must be equal otherwise an error will be thrown.
+include/diff_tables.inc [master:test.t1, slave:test.t1]
+connection master;
+DROP TABLE t1;
+include/rpl_end.inc
diff --git a/storage/tokudb/mysql-test/rpl/t/rpl_mixed_replace_into.test b/storage/tokudb/mysql-test/rpl/t/rpl_mixed_replace_into.test
new file mode 100644
index 00000000000..05e6e2fb228
--- /dev/null
+++ b/storage/tokudb/mysql-test/rpl/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/rpl/t/rpl_row_replace_into.test b/storage/tokudb/mysql-test/rpl/t/rpl_row_replace_into.test
new file mode 100644
index 00000000000..062f11e0ed9
--- /dev/null
+++ b/storage/tokudb/mysql-test/rpl/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/rpl/t/rpl_stmt_replace_into.test b/storage/tokudb/mysql-test/rpl/t/rpl_stmt_replace_into.test
new file mode 100644
index 00000000000..f7e4c7a09e0
--- /dev/null
+++ b/storage/tokudb/mysql-test/rpl/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;
diff --git a/storage/tokudb/mysql-test/rpl/t/rpl_xa_interleave.test b/storage/tokudb/mysql-test/rpl/t/rpl_xa_interleave.test
new file mode 100644
index 00000000000..3941604c855
--- /dev/null
+++ b/storage/tokudb/mysql-test/rpl/t/rpl_xa_interleave.test
@@ -0,0 +1,103 @@
+--source include/have_tokudb.inc
+--source include/have_binlog_format_mixed_or_row.inc
+--source include/master-slave.inc
+
+CREATE TABLE t1(`a` INT) ENGINE=TokuDB;
+
+## XA interleave commit
+--connection master
+XA START 'x1';
+INSERT INTO t1 VALUES (1);
+XA END 'x1';
+XA PREPARE 'x1';
+
+--connection master1
+BEGIN;
+INSERT INTO t1 VALUES (10);
+COMMIT;
+XA START 'y1';
+INSERT INTO t1 VALUES (2);
+XA END 'y1';
+XA PREPARE 'y1';
+
+--connection master
+XA COMMIT 'x1';
+
+--connection master1
+XA COMMIT 'y1';
+
+--connection master
+BEGIN;
+INSERT INTO t1 VALUES (11);
+COMMIT;
+XA START 'x2';
+INSERT INTO t1 VALUES (3);
+XA END 'x2';
+XA PREPARE 'x2';
+
+--connection master1
+XA START 'y2';
+INSERT INTO t1 VALUES (4);
+XA END 'y2';
+XA PREPARE 'y2';
+
+--connection master
+XA COMMIT 'x2';
+
+--connection master1
+XA COMMIT 'y2';
+
+## XA interleave rollback
+--connection master
+XA START 'x1';
+INSERT INTO t1 VALUES (1);
+XA END 'x1';
+XA PREPARE 'x1';
+
+--connection master1
+BEGIN;
+INSERT INTO t1 VALUES (10);
+COMMIT;
+XA START 'y1';
+INSERT INTO t1 VALUES (2);
+XA END 'y1';
+XA PREPARE 'y1';
+
+--connection master
+XA ROLLBACK 'x1';
+
+--connection master1
+XA ROLLBACK 'y1';
+
+--connection master
+BEGIN;
+INSERT INTO t1 VALUES (11);
+COMMIT;
+XA START 'x2';
+INSERT INTO t1 VALUES (3);
+XA END 'x2';
+XA PREPARE 'x2';
+
+--connection master1
+XA START 'y2';
+INSERT INTO t1 VALUES (4);
+XA END 'y2';
+XA PREPARE 'y2';
+
+--connection master
+XA ROLLBACK 'x2';
+
+--connection master1
+XA ROLLBACK 'y2';
+
+--connection master
+
+--sync_slave_with_master
+
+--echo TABLES t1 and t2 must be equal otherwise an error will be thrown.
+--let $diff_tables= master:test.t1, slave:test.t1
+--source include/diff_tables.inc
+
+--connection master
+DROP TABLE t1;
+--source include/rpl_end.inc