summaryrefslogtreecommitdiff
path: root/mysql-test/suite/rpl/include
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/rpl/include')
-rw-r--r--mysql-test/suite/rpl/include/rpl_binlog_max_cache_size.test2
-rw-r--r--mysql-test/suite/rpl/include/rpl_row_img_sequence.inc90
2 files changed, 92 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/include/rpl_binlog_max_cache_size.test b/mysql-test/suite/rpl/include/rpl_binlog_max_cache_size.test
index 4c93ad86209..d750554b4ec 100644
--- a/mysql-test/suite/rpl/include/rpl_binlog_max_cache_size.test
+++ b/mysql-test/suite/rpl/include/rpl_binlog_max_cache_size.test
@@ -22,6 +22,8 @@
#
########################################################################################
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
+call mtr.add_suppression("Write to binary log failed: Multi-row statements required more than .max_binlog_stmt_cache_size");
+call mtr.add_suppression("Write to binary log failed: Multi-statement transaction required more than .max_binlog_cache_size");
let $old_max_binlog_cache_size= query_get_value(SHOW VARIABLES LIKE "max_binlog_cache_size", Value, 1);
let $old_binlog_cache_size= query_get_value(SHOW VARIABLES LIKE "binlog_cache_size", Value, 1);
diff --git a/mysql-test/suite/rpl/include/rpl_row_img_sequence.inc b/mysql-test/suite/rpl/include/rpl_row_img_sequence.inc
new file mode 100644
index 00000000000..be5b7600f0a
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_row_img_sequence.inc
@@ -0,0 +1,90 @@
+#
+# This include file validates that sequence events are properly binlogged
+# and replicated.
+#
+# Parameters:
+# expected_columns (list<uint>, in) : A list of positive integers which
+# correspond to the column numbers that should be output in a binary
+# log's write_rows event
+#
+
+--echo # Create sequences with specific engines per server
+--connection server_1
+--eval SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=$server_1_engine
+--source include/save_master_gtid.inc
+
+--connection server_2
+--eval SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=$server_2_engine
+--source include/sync_with_master_gtid.inc
+
+--connection server_3
+--eval SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=$server_3_engine
+--source include/sync_with_master_gtid.inc
+
+
+--echo # Pt.1 Ensure SETVAL replicates and binlogs correctly
+--connection server_1
+SELECT SETVAL(s1, 10);
+--source include/save_master_gtid.inc
+
+--echo # Validate SETVAL replicated correctly to other servers
+--connection server_3
+--source include/sync_with_master_gtid.inc
+--let $diff_tables= server_1:test.s1,server_2:test.s1,server_3:test.s1
+--source include/diff_tables.inc
+
+--echo # Validate server_1 binlogged SETVAL with the correct columns
+--connection server_1
+--let binlog_filenamE= query_get_value(SHOW MASTER STATUS, File, 1)
+FLUSH LOGS;
+--source include/ensure_binlog_row_event_columns.inc
+
+--echo # Validate server_2 binlogged SETVAL with the correct columns
+--connection server_2
+--let binlog_filename= query_get_value(SHOW MASTER STATUS, File, 1)
+FLUSH LOGS;
+--source include/ensure_binlog_row_event_columns.inc
+
+--echo # Validate server_3 binlogged SETVAL with the correct columns
+--connection server_3
+--let binlog_filename= query_get_value(SHOW MASTER STATUS, File, 1)
+FLUSH LOGS;
+--source include/ensure_binlog_row_event_columns.inc
+
+
+--echo # Pt.2 Ensure NEXTVAL replicates and binlogs correctly
+--connection server_1
+SELECT NEXTVAL(s1);
+--source include/save_master_gtid.inc
+
+--echo # Validate NEXTVAL replicated correctly to other servers
+--connection server_3
+--source include/sync_with_master_gtid.inc
+--let $diff_tables= server_1:test.s1,server_2:test.s1,server_3:test.s1
+--source include/diff_tables.inc
+
+--echo # Validate server_1 binlogged NEXTVAL with the correct columns
+--connection server_1
+--let binlog_filename= query_get_value(SHOW MASTER STATUS, File, 1)
+FLUSH LOGS;
+--source include/ensure_binlog_row_event_columns.inc
+
+--echo # Validate server_2 binlogged NEXTVAL with the correct columns
+--connection server_2
+--let binlog_filename= query_get_value(SHOW MASTER STATUS, File, 1)
+FLUSH LOGS;
+--source include/ensure_binlog_row_event_columns.inc
+
+--echo # Validate server_3 binlogged NEXTVAL with the correct columns
+--connection server_3
+--let binlog_filename= query_get_value(SHOW MASTER STATUS, File, 1)
+FLUSH LOGS;
+--source include/ensure_binlog_row_event_columns.inc
+
+
+--echo # Cleanup
+--connection server_1
+DROP TABLE s1;
+--source include/save_master_gtid.inc
+--connection server_3
+--source include/sync_with_master_gtid.inc