summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2015-03-27 20:35:37 -0400
committerNirbhay Choubey <nirbhay@mariadb.com>2015-03-27 20:35:37 -0400
commitd7445ea6dfbd3be390792c636f755d3bb40d5fbf (patch)
tree7ed61ce2f39cac0f4de0fa63925c1e44d9073104 /mysql-test/suite
parent6a204546ef91aa90dedb6b47353bbb568f0531b0 (diff)
downloadmariadb-git-d7445ea6dfbd3be390792c636f755d3bb40d5fbf.tar.gz
MDEV-7194: galera fails to replicate DDL queries when using binlog_checksum
Restore fix for MDEV-4328 (revno: 3391) that got accidentally overwritten while merging : http://bazaar.launchpad.net/~codership/codership-mysql/5.5-23/revision/3900 Added a test case.
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/galera/r/binlog_checksum.result36
-rw-r--r--mysql-test/suite/galera/t/binlog_checksum.test36
2 files changed, 72 insertions, 0 deletions
diff --git a/mysql-test/suite/galera/r/binlog_checksum.result b/mysql-test/suite/galera/r/binlog_checksum.result
new file mode 100644
index 00000000000..5c1981fc17f
--- /dev/null
+++ b/mysql-test/suite/galera/r/binlog_checksum.result
@@ -0,0 +1,36 @@
+# On node_1
+SET @binlog_checksum_saved= @@GLOBAL.BINLOG_CHECKSUM;
+SET @@GLOBAL.BINLOG_CHECKSUM=CRC32;
+# On node_2
+SET @binlog_checksum_saved= @@GLOBAL.BINLOG_CHECKSUM;
+SET @@GLOBAL.BINLOG_CHECKSUM=CRC32;
+USE test;
+CREATE TABLE t1(c1 INT PRIMARY KEY) ENGINE=INNODB;
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
+SELECT * FROM t1;
+c1
+1
+2
+3
+4
+5
+SELECT * FROM test.t1;
+c1
+1
+2
+3
+4
+5
+
+# On node_2
+SELECT * FROM test.t1;
+c1
+1
+2
+3
+4
+5
+DROP TABLE t1;
+SET @@GLOBAL.BINLOG_CHECKSUM = @binlog_checksum_saved;
+SET @@GLOBAL.BINLOG_CHECKSUM = @binlog_checksum_saved;
+# End of test
diff --git a/mysql-test/suite/galera/t/binlog_checksum.test b/mysql-test/suite/galera/t/binlog_checksum.test
new file mode 100644
index 00000000000..5aab68a7746
--- /dev/null
+++ b/mysql-test/suite/galera/t/binlog_checksum.test
@@ -0,0 +1,36 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--echo # On node_1
+--connection node_1
+SET @binlog_checksum_saved= @@GLOBAL.BINLOG_CHECKSUM;
+SET @@GLOBAL.BINLOG_CHECKSUM=CRC32;
+
+--echo # On node_2
+--connection node_2
+SET @binlog_checksum_saved= @@GLOBAL.BINLOG_CHECKSUM;
+SET @@GLOBAL.BINLOG_CHECKSUM=CRC32;
+
+USE test;
+CREATE TABLE t1(c1 INT PRIMARY KEY) ENGINE=INNODB;
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
+SELECT * FROM t1;
+SELECT * FROM test.t1;
+
+--echo
+--echo # On node_2
+--connection node_2
+SELECT * FROM test.t1;
+
+--let $galera_diff_statement = SELECT * FROM t1
+--source include/galera_diff.inc
+
+# Cleanup
+DROP TABLE t1;
+--connection node_1
+SET @@GLOBAL.BINLOG_CHECKSUM = @binlog_checksum_saved;
+--connection node_2
+SET @@GLOBAL.BINLOG_CHECKSUM = @binlog_checksum_saved;
+
+--source include/galera_end.inc
+--echo # End of test