diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
commit | 3f619478f796eddbba6e39502fe941b285dd97b1 (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/galera/t/MW-86-wait1.test | |
parent | Initial commit. (diff) | |
download | mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/galera/t/MW-86-wait1.test')
-rw-r--r-- | mysql-test/suite/galera/t/MW-86-wait1.test | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/mysql-test/suite/galera/t/MW-86-wait1.test b/mysql-test/suite/galera/t/MW-86-wait1.test new file mode 100644 index 00000000..7ebd3ba9 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-86-wait1.test @@ -0,0 +1,109 @@ +# +# SHOW commands no longer obey wsrep_sync_wait = 1 (WSREP_SYNC_WAIT_BEFORE_READ) +# (they do not wait for the background INSERT in the applier in node_2 to +# complete) +# +--source include/galera_cluster.inc +--source include/have_binlog_format_row.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc +--source include/galera_have_debug_sync.inc + +SET @orig_debug=@@debug_dbug; + +--connection node_2 +# Make sure no signals have been leftover from previous tests to surprise us. +SELECT @@debug_sync; +set debug_sync='RESET'; + +SET SESSION wsrep_sync_wait = 1; +SET GLOBAL debug_dbug = "+d,sync.wsrep_apply_cb"; + +--connection node_1 +CREATE TABLE t_wait1 (f1 INTEGER) ENGINE=InnoDB; +# This will complete in node_1 but will start a background apply in node_2 +# which will stop because of sync.wsrep_apply_cb we set above. +INSERT INTO t_wait1 VALUES (1); + +--connection node_2 + +SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached"; + +--disable_result_log + +SHOW BINARY LOGS; + +SHOW BINLOG EVENTS; + +--error ER_NO_SUCH_TABLE +SHOW COLUMNS FROM t1; + +--error ER_EVENT_DOES_NOT_EXIST +SHOW CREATE EVENT e1; + +--error ER_SP_DOES_NOT_EXIST +SHOW CREATE FUNCTION f1; + +--error ER_SP_DOES_NOT_EXIST +SHOW CREATE PROCEDURE p1; + +--error ER_NO_SUCH_TABLE +SHOW CREATE TABLE t1; + +--error ER_TRG_DOES_NOT_EXIST +SHOW CREATE TRIGGER tr1; + +--error ER_NO_SUCH_TABLE +SHOW CREATE VIEW v1; + +SHOW DATABASES; + +SHOW ENGINE InnoDB STATUS; + +--error ER_SP_DOES_NOT_EXIST +SHOW FUNCTION CODE f1; + +SHOW FUNCTION STATUS; + +SHOW GRANTS FOR 'root'@'localhost'; + +--error ER_NO_SUCH_TABLE +SHOW INDEX FROM t1; + +SHOW OPEN TABLES; + +--error ER_SP_DOES_NOT_EXIST +SHOW PROCEDURE CODE p1; + +SHOW PROCEDURE STATUS; + +SHOW PRIVILEGES; + +SHOW STATUS LIKE 'wsrep_cluster_size'; + +SHOW TABLE STATUS; + +SHOW TABLES; + +SHOW TRIGGERS; + +SHOW GLOBAL VARIABLES LIKE 'foo_bar'; + +--error 0 +SHOW WARNINGS; + +--enable_result_log + +# Unblock the background INSERT and remove the sync point. +SET GLOBAL debug_dbug = @orig_debug; + +SET SESSION debug_sync = "now SIGNAL signal.wsrep_apply_cb"; +SET debug_sync='RESET'; +SET SESSION wsrep_sync_wait = default; + +# This will wait for the background INSERT to complete before we quit +# from the test. +DROP TABLE t_wait1; + +# Make sure no pending signals are leftover to surprise subsequent tests. +SELECT @@debug_sync; |