summaryrefslogtreecommitdiff
path: root/mysql-test/suite/percona/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/percona/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test')
-rw-r--r--mysql-test/suite/percona/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test53
1 files changed, 53 insertions, 0 deletions
diff --git a/mysql-test/suite/percona/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test b/mysql-test/suite/percona/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test
new file mode 100644
index 00000000000..dcb2eb26a3e
--- /dev/null
+++ b/mysql-test/suite/percona/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test
@@ -0,0 +1,53 @@
+--source include/master-slave.inc
+--source include/have_binlog_format_statement.inc
+--disable_query_log
+call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. Statement:");
+call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
+--enable_query_log
+connection master;
+ --disable_warnings
+ DROP TABLE IF EXISTS t;
+ --enable_warnings
+ CREATE TABLE t(id INT);
+ sync_slave_with_master;
+
+connection master;
+ send INSERT INTO t SELECT SLEEP(10);
+
+connection slave;
+ sleep 15;
+ send STOP SLAVE;
+
+connection master;
+ reap;
+
+ --disable_query_log
+ select "master",count(*) from t;
+ --enable_query_log
+
+connection slave1;
+ --disable_query_log
+ select "slave",count(*) from t;
+ --enable_query_log
+
+ --disable_result_log
+ SHOW SLAVE STATUS NOLOCK;
+ --enable_result_log
+
+connection slave;
+ reap;
+
+ --source include/wait_for_slave_to_stop.inc
+ START SLAVE;
+ --source include/wait_for_slave_to_start.inc
+
+ --disable_query_log
+ select "slave",count(*) from t;
+ --enable_query_log
+
+connection master;
+ DROP TABLE t;
+sync_slave_with_master;
+STOP SLAVE;
+--source include/wait_for_slave_to_stop.inc
+