diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-09-26 20:49:51 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-09-28 16:37:06 +0200 |
commit | 57e0da50bbef8164635317785b67dd468a908327 (patch) | |
tree | 89d1ed179afce8b040c8f2dfcfe179042ff27b2e /storage/tokudb/mysql-test/rpl/t | |
parent | 7aba6f8f8853acd18d471793f8b72aa1412b8151 (diff) | |
parent | dcbd51cee628d8d8fec9ff5476a6afc855b007aa (diff) | |
download | mariadb-git-57e0da50bbef8164635317785b67dd468a908327.tar.gz |
Merge branch '10.2' into 10.3
Diffstat (limited to 'storage/tokudb/mysql-test/rpl/t')
4 files changed, 178 insertions, 0 deletions
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 |