diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
commit | 06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/galera/t/MW-86-wait8.test | |
parent | Initial commit. (diff) | |
download | mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/galera/t/MW-86-wait8.test')
-rw-r--r-- | mysql-test/suite/galera/t/MW-86-wait8.test | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/mysql-test/suite/galera/t/MW-86-wait8.test b/mysql-test/suite/galera/t/MW-86-wait8.test new file mode 100644 index 00000000..1b3f355e --- /dev/null +++ b/mysql-test/suite/galera/t/MW-86-wait8.test @@ -0,0 +1,131 @@ +# +# SHOW commands now obey wsrep_sync_wait = 8 (WSREP_SYNC_WAIT_BEFORE_SHOW) +# +--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 SESSION wsrep_sync_wait = 8; +SET GLOBAL debug_dbug = "+d,sync.wsrep_apply_cb"; + +--connection node_1 +CREATE TABLE t_wait8 (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_wait8 VALUES (1); + +--connection node_2 + +--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options` +SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S"; + +SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached"; + +--disable_result_log + +--error ER_LOCK_WAIT_TIMEOUT +SHOW BINARY LOGS; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW BINLOG EVENTS; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW COLUMNS FROM t1; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW CREATE DATABASE db1; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW CREATE EVENT e1; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW CREATE FUNCTION f1; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW CREATE PROCEDURE p1; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW CREATE TABLE t1; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW CREATE TRIGGER tr1; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW CREATE VIEW v1; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW DATABASES; + +--error 0 +SHOW ENGINE InnoDB STATUS; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW FUNCTION CODE f1; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW FUNCTION STATUS; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW GRANTS FOR 'root'@'localhost'; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW INDEX FROM t1; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW OPEN TABLES; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW PROCEDURE CODE p1; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW PROCEDURE STATUS; + +--error 0 +SHOW PRIVILEGES; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW STATUS LIKE 'wsrep_cluster_size'; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW TABLE STATUS; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW TABLES; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW TRIGGERS; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW GLOBAL VARIABLES LIKE 'foo_bar'; + +--error 0 +SHOW WARNINGS; + +--enable_result_log + +--disable_query_log +--eval SET GLOBAL wsrep_provider_options = "$wsrep_provider_options_orig" +--enable_query_log + +# Unblock the background INSERT and remove the sync point. +SET GLOBAL debug_dbug = @orig_debug; + +SET 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_wait8; + +# Make sure no pending signals are leftover to surprise subsequent tests. +SELECT @@debug_sync; |