summaryrefslogtreecommitdiff
path: root/mysql-test/suite/wsrep/t
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2016-09-01 12:59:11 -0400
committerNirbhay Choubey <nirbhay@mariadb.com>2016-09-01 12:59:11 -0400
commit3dd88fbd1132ae36c00adb67cbe2fc4ff97a6789 (patch)
treec8f599af72a4cae9c546c9718984d0bf1fc5e88e /mysql-test/suite/wsrep/t
parent616271b7c9f69596df740a8fec5a4f39b959d064 (diff)
downloadmariadb-git-3dd88fbd1132ae36c00adb67cbe2fc4ff97a6789.tar.gz
MDEV-10714: Could not execute Delete_rows event on table; wsrep_max_ws_rows exceeded. Error_Code 1180
The wsrep_max_ws_rows related implementation should be skipped when server is running with wsrep disabled.
Diffstat (limited to 'mysql-test/suite/wsrep/t')
-rw-r--r--mysql-test/suite/wsrep/t/wsrep_rpl.cnf1
-rw-r--r--mysql-test/suite/wsrep/t/wsrep_rpl.test50
2 files changed, 51 insertions, 0 deletions
diff --git a/mysql-test/suite/wsrep/t/wsrep_rpl.cnf b/mysql-test/suite/wsrep/t/wsrep_rpl.cnf
new file mode 100644
index 00000000000..56e874f22e1
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/wsrep_rpl.cnf
@@ -0,0 +1 @@
+!include ../../rpl/my.cnf
diff --git a/mysql-test/suite/wsrep/t/wsrep_rpl.test b/mysql-test/suite/wsrep/t/wsrep_rpl.test
new file mode 100644
index 00000000000..1cc7214325d
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/wsrep_rpl.test
@@ -0,0 +1,50 @@
+--source include/have_wsrep.inc
+--source include/have_innodb.inc
+--source include/master-slave.inc
+
+--echo #
+--echo # MDEV-10714: Could not execute Delete_rows event on table;
+--echo # wsrep_max_ws_rows exceeded. Error_Code 1180
+--echo #
+# Save wsrep_max_ws_rows on master and slave.
+connection master;
+let $wsrep_max_ws_rows_master = `SELECT @@GLOBAL.wsrep_max_ws_rows`;
+connection slave;
+let $wsrep_max_ws_rows_slave = `SELECT @@GLOBAL.wsrep_max_ws_rows`;
+
+connection master;
+CREATE TABLE t1(i INT) ENGINE = INNODB;
+
+# Setting wsrep_max_ws_rows should have no impact on replication master
+# unless its a cluster node.
+SET @@GLOBAL.wsrep_max_ws_rows = 1;
+INSERT INTO t1 VALUES(1), (2);
+
+sync_slave_with_master;
+SELECT COUNT(*) = 2 FROM t1;
+
+connection slave;
+# Setting wsrep_max_ws_rows should have no impact on replication slave
+# unless its a cluster node.
+SET @@GLOBAL.wsrep_max_ws_rows = 1;
+
+connection master;
+DELETE FROM t1;
+
+sync_slave_with_master;
+SELECT COUNT(*) = 0 FROM t1;
+
+connection master;
+DROP TABLE t1;
+
+sync_slave_with_master;
+
+# Restore wsrep_max_ws_rows on master and slave
+connection master;
+eval SET @@GLOBAL.wsrep_max_ws_rows = $wsrep_max_ws_rows_master;
+connection slave;
+eval SET @@GLOBAL.wsrep_max_ws_rows = $wsrep_max_ws_rows_slave;
+
+--source include/rpl_end.inc
+--echo # End of test.
+