summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2017-08-21 13:35:00 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2017-08-21 13:35:00 +0300
commitc23efc7d50530570e6c13207f3c76adcb9237346 (patch)
tree7c57ca7a1dc61590019abb5608c2b19327f8ed7c /mysql-test/suite/galera
parent06106c01481401b6d7ef4309391ca2f66242cc85 (diff)
parentf1af2114993f884b1a6dc34fb1d972ead08f1966 (diff)
downloadmariadb-git-c23efc7d50530570e6c13207f3c76adcb9237346.tar.gz
Merge remote-tracking branch 'origin/10.0-galera' into 10.1
Diffstat (limited to 'mysql-test/suite/galera')
-rw-r--r--mysql-test/suite/galera/disabled.def109
-rw-r--r--mysql-test/suite/galera/galera_2nodes.cnf4
-rw-r--r--mysql-test/suite/galera/galera_2nodes_as_master.cnf4
-rw-r--r--mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf4
-rw-r--r--mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf4
-rw-r--r--mysql-test/suite/galera/galera_2nodes_as_slave.cnf4
-rw-r--r--mysql-test/suite/galera/galera_3nodes_as_slave.cnf6
-rw-r--r--mysql-test/suite/galera/galera_4nodes.cnf2
-rw-r--r--mysql-test/suite/galera/r/GAL-401.result3
-rw-r--r--mysql-test/suite/galera/r/MW-284.result2
-rw-r--r--mysql-test/suite/galera/r/MW-329.result1
-rw-r--r--mysql-test/suite/galera/r/MW-336.result42
-rw-r--r--mysql-test/suite/galera/r/MW-357.result6
-rw-r--r--mysql-test/suite/galera/r/MW-86-wait1.result48
-rw-r--r--mysql-test/suite/galera/r/MW-86-wait8.result50
-rw-r--r--mysql-test/suite/galera/r/galera_applier_ftwrl_table.result2
-rw-r--r--mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result2
-rw-r--r--mysql-test/suite/galera/r/galera_as_slave_autoinc.result4
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result2
-rw-r--r--mysql-test/suite/galera/r/galera_ddl_multiline.result80
-rw-r--r--mysql-test/suite/galera/r/galera_defaults.result2
-rw-r--r--mysql-test/suite/galera/r/galera_insert_ignore.result4
-rw-r--r--mysql-test/suite/galera/r/galera_ist_progress.result19
-rw-r--r--mysql-test/suite/galera/r/galera_ist_restart_joiner.result17
-rw-r--r--mysql-test/suite/galera/r/galera_many_rows.result2
-rw-r--r--mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result2
-rw-r--r--mysql-test/suite/galera/r/galera_parallel_simple.result2
-rw-r--r--mysql-test/suite/galera/r/galera_query_cache_sync_wait.result5
-rw-r--r--mysql-test/suite/galera/r/galera_suspend_slave.result3
-rw-r--r--mysql-test/suite/galera/r/galera_sync_wait_show.result2
-rw-r--r--mysql-test/suite/galera/r/galera_unicode_identifiers.result4
-rw-r--r--mysql-test/suite/galera/r/galera_var_dirty_reads.result84
-rw-r--r--mysql-test/suite/galera/r/galera_var_node_address.result1
-rw-r--r--mysql-test/suite/galera/r/galera_var_sync_wait.result7
-rw-r--r--mysql-test/suite/galera/r/galera_wsrep_provider_unset_set.result1
-rw-r--r--mysql-test/suite/galera/r/mysql-wsrep#198.result3
-rw-r--r--mysql-test/suite/galera/r/mysql-wsrep#201.result1
-rw-r--r--mysql-test/suite/galera/r/pxc-421.result3
-rw-r--r--mysql-test/suite/galera/suite.pm8
-rw-r--r--mysql-test/suite/galera/t/GAL-401.test5
-rw-r--r--mysql-test/suite/galera/t/MW-286.test1
-rw-r--r--mysql-test/suite/galera/t/MW-329.test3
-rw-r--r--mysql-test/suite/galera/t/MW-336.test64
-rw-r--r--mysql-test/suite/galera/t/MW-357.test13
-rw-r--r--mysql-test/suite/galera/t/MW-369.test1
-rw-r--r--mysql-test/suite/galera/t/MW-86-wait1-master.opt1
-rw-r--r--mysql-test/suite/galera/t/MW-86-wait1.test106
-rw-r--r--mysql-test/suite/galera/t/MW-86-wait8-master.opt1
-rw-r--r--mysql-test/suite/galera/t/MW-86-wait8.test128
-rw-r--r--mysql-test/suite/galera/t/galera#414.test6
-rw-r--r--mysql-test/suite/galera/t/galera_applier_ftwrl_table.test2
-rw-r--r--mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.test2
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_autoinc.test2
-rw-r--r--mysql-test/suite/galera/t/galera_bf_abort_flush_for_export.test2
-rw-r--r--mysql-test/suite/galera/t/galera_ddl_multiline.test54
-rw-r--r--mysql-test/suite/galera/t/galera_gcs_fc_limit.test6
-rw-r--r--mysql-test/suite/galera/t/galera_insert_ignore.test4
-rw-r--r--mysql-test/suite/galera/t/galera_ist_mysqldump.cnf1
-rw-r--r--mysql-test/suite/galera/t/galera_ist_progress.cnf5
-rw-r--r--mysql-test/suite/galera/t/galera_ist_progress.test76
-rw-r--r--mysql-test/suite/galera/t/galera_ist_recv_bind.test1
-rw-r--r--mysql-test/suite/galera/t/galera_ist_restart_joiner.test34
-rw-r--r--mysql-test/suite/galera/t/galera_ist_rsync.cnf2
-rw-r--r--mysql-test/suite/galera/t/galera_ist_rsync.test5
-rw-r--r--mysql-test/suite/galera/t/galera_many_rows.test2
-rw-r--r--mysql-test/suite/galera/t/galera_migrate.cnf2
-rw-r--r--mysql-test/suite/galera/t/galera_parallel_simple.test2
-rw-r--r--mysql-test/suite/galera/t/galera_query_cache_sync_wait.test5
-rw-r--r--mysql-test/suite/galera/t/galera_restart_on_unknown_option.test7
-rw-r--r--mysql-test/suite/galera/t/galera_ssl.test1
-rw-r--r--mysql-test/suite/galera/t/galera_ssl_compression.test1
-rw-r--r--mysql-test/suite/galera/t/galera_suspend_slave.test3
-rw-r--r--mysql-test/suite/galera/t/galera_sync_wait_show.test3
-rw-r--r--mysql-test/suite/galera/t/galera_unicode_identifiers.test4
-rw-r--r--mysql-test/suite/galera/t/galera_var_dirty_reads.test77
-rw-r--r--mysql-test/suite/galera/t/galera_var_node_address.test2
-rw-r--r--mysql-test/suite/galera/t/galera_var_sync_wait.test5
-rw-r--r--mysql-test/suite/galera/t/galera_wsrep_provider_unset_set.test9
-rw-r--r--mysql-test/suite/galera/t/lp1376747-4.test2
-rw-r--r--mysql-test/suite/galera/t/mysql-wsrep#198.test3
-rw-r--r--mysql-test/suite/galera/t/mysql-wsrep#201.test1
-rw-r--r--mysql-test/suite/galera/t/pxc-421.test5
-rw-r--r--mysql-test/suite/galera/t/query_cache.opt1
83 files changed, 917 insertions, 292 deletions
diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def
index 3b4698a7849..1e628b99644 100644
--- a/mysql-test/suite/galera/disabled.def
+++ b/mysql-test/suite/galera/disabled.def
@@ -1,58 +1,51 @@
-galera_wsrep_provider_unset_set : lp1379204 'Unsupported protocol downgrade: incremental data collection disabled. Expect abort.'
-galera_kill_nochanges : mysql-wsrep#24 Galera server does not restart properly if killed
-galera_bf_abort_for_update : mysql-wsrep#26 SELECT FOR UPDATE sometimes allowed to proceed in the face of a concurrent update
-galera_toi_ddl_fk_insert : qa#39 galera_toi_ddl_fk_insert fails sporadically
-galera_binlog_row_image : MDEV-7471 - Enable binlog_row_image parameter in MariaDB
-galera_binlog_rows_query_log_events : Unknown system variable 'binlog_rows_query_log_events' (see annotate_rows_log_event)
-
-galera_ist_mysqldump : Lost connection to MySQL server during query
-galera_ist_xtrabackup-v2 : mysqltest failed but provided no output
-galera_ist_innodb_flush_logs : mysqltest failed but provided no output
-galera_sst_mysqldump : query 'show status' failed with wrong errno 1927
-galera_as_master_gtid : Needs to be re-worked
-galera_as_master_gtid_change_master : Needs to be re-worked
-galera_migrate : query 'let $success= `$wait_condition`' failed: 1146
-galera_var_notify_cmd : Result content mismatch
-query_cache : Fails intermittently due to content mismatch. Needs to be investigated
-basic : Fails intermittently without providing any output. Needs to be investigated
-galera_var_auto_inc_control_on : Failing sporadically with content mismatch
-galera_parallel_simple : Failing sporadically
-galera_bf_abort : Failing sporadically
-galera_log_output_csv : Failing sporadically
-galera_as_slave_preordered : wsrep-preordered is not available in MariaDB Galera cluster
-galera_gra_log : TODO: investigate
-galera_as_slave_replication_bundle : TODO: investigate
-galera_ssl_upgrade : TODO: investigate
-mysql-wsrep#90 : TODO: investigate
-galera_flush : mysql-wsrep/issues/229
-galera_transaction_read_only : mysql-wsrep/issues/229
-galera_gcs_fragment : Incorrect arguments to SET
-galera_flush_local : Fails sporadically
-galera_binlog_stmt_autoinc : TODO: investigate
-galera_concurrent_ctas : Test times out, investigate
-MW-286 : TODO: investigate
-galera_sst_xtrabackup-v2-options : TODO: Fix test case
-galera_sst_xtrabackup-v2 : TODO: Fix test case
-galera_sst_xtrabackup-v2_encrypt_with_key : TODO: Fix test case
-mysql-wsrep#33 : TODO: investigate
-MW-258 : MDEV-11229
-galera_as_master : MDEV-11229
-MW-44 : MDEV-11229
-galera_gcs_fc_limit : MDEV-11229
-galera_roles : MDEV-11229
-galera_lock_table : MDEV-11229
-GAL-480 : Investigate
-galera_fk_no_pk :Investigate
-galera_account_management : Investigate
-galera.galera_var_retry_autocommit : MDEV-12319 #Sparodic Faliure
-galera.galera_gcs_fc_limit : MDEV-12319 #Sparodic Faliure
-galera.galera_toi_ddl_nonconflicting : MDEV-12319 #Sparodic Faliure
-galera.mysql-wsrep#198 : MDEV-12319 #Sparodic Faliure
-galera.galera_pc_ignore_sb : MDEV-12319 #Sparodic Faliure
-galera.MW-329 : MDEV-12319 #Sparodic Faliure
-galera.galera_ist_recv_bind : MDEV-12319 #Failed to start mysqld
-galera.galera_ist_restart_joiner : MDEV-12319 #Failed to start mysqld
-galera.galera_ssl_compression : MDEV-12319 #Failed to start mysqld
-galera.galera_wan : MDEV-12319 #Failed to start mysqld
-galera.rpl_row_annotate : MDEV-12319 #Failed to start mysqld
-galera_restart_on_unknown_option : Solve
+##############################################################################
+#
+# List the test cases that are to be disabled temporarily.
+#
+# Separate the test case name and the comment with ':'.
+#
+# <testcasename> : MDEV-<xxxx> <comment>
+#
+# Do not use any TAB characters for whitespace.
+#
+##############################################################################
+MW-336 : MDEV-13549 Galera test failures
+galera_gra_log : MDEV-13549 Galera test failures
+galera_flush_local : MDEV-13549 Galera test failures
+galera_flush : MDEV-13549 Galera test failures
+MW-329 : MDEV-13549 Galera test failures
+galera_account_management : MariaDB 10.0 does not support ALTER USER
+galera_binlog_row_image : MariaDB 10.0 does not support binlog_row_image
+galera_binlog_rows_query_log_events: MariaDB does not support binlog_rows_query_log_events
+GAL-419 : MDEV-13549 Galera test failures
+galera_toi_ddl_fk_insert : MDEV-13549 Galera test failures
+galera_var_notify_cmd : MDEV-13549 Galera test failures
+galera_var_slave_threads : MDEV-13549 Galera test failures
+mysql-wsrep#90 : MDEV-13549 Galera test failures
+galera_as_master_gtid : Requires MySQL GTID
+galera_as_master_gtid_change_master : Requires MySQL GTID
+galera_as_slave_replication_bundle : MDEV-13549 Galera test failures
+galera_as_slave_preordered : wsrep-preordered feature not merged to MariaDB
+galera_gcs_fragment : MDEV-13549 Galera test failures
+galera_gcache_recover : MDEV-13549 Galera test failures
+galera_gcache_recover_full_gcache : MDEV-13549 Galera test failures
+galera_gcache_recover_manytrx : MDEV-13549 Galera test failures
+galera_ist_mysqldump : MDEV-13549 Galera test failures
+mysql-wsrep#31 : MDEV-13549 Galera test failures
+galera_migrate : MariaDB 10.0 does not support START SLAVE USER
+galera_concurrent_ctas : MDEV-13549 Galera test failures
+galera_bf_abort_for_update : MDEV-13549 Galera test failures
+galera_wsrep_desync_wsrep_on : MDEV-13549 Galera test failures
+galera_ssl_upgrade : MDEV-13549 Galera test failures
+mysql-wsrep#33 : MDEV-13549 Galera test failures
+galera_var_auto_inc_control_on : MDEV-13549 Galera test failures
+MW-44 : MDEV-13549 Galera test failures
+galera_var_retry_autocommit : MDEV-13549 Galera test failures
+pxc-421 : MDEV-13549 Galera test failures
+lp1376747-2 : MDEV-13549 Galera test failures
+lp1376747 : MDEV-13549 Galera test failures
+galera_toi_ddl_nonconflicting : MDEV-13549 Galera test failures
+galera_parallel_simple : MDEV-13549 Galera test failures
+galera_admin : MDEV-13549 Galera test failures
+galera_var_max_ws_rows : MDEV-13549 Galera test failures 10.1
+MW-286 : MDEV-13549 Galera test failures 10.1
diff --git a/mysql-test/suite/galera/galera_2nodes.cnf b/mysql-test/suite/galera/galera_2nodes.cnf
index f120775d433..b24f3603894 100644
--- a/mysql-test/suite/galera/galera_2nodes.cnf
+++ b/mysql-test/suite/galera/galera_2nodes.cnf
@@ -9,7 +9,7 @@ default-storage-engine=innodb
wsrep-provider=@ENV.WSREP_PROVIDER
wsrep_node_address=127.0.0.1
# enforce read-committed characteristics across the cluster
-wsrep-sync-wait=7
+wsrep-sync-wait=15
[mysqld.1]
#galera_port=@OPT.port
@@ -29,7 +29,7 @@ wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#gale
# enforce read-committed characteristics across the cluster
wsrep_causal_reads=ON
-wsrep_sync_wait = 7
+wsrep_sync_wait = 15
wsrep_node_address=127.0.0.1
wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port
diff --git a/mysql-test/suite/galera/galera_2nodes_as_master.cnf b/mysql-test/suite/galera/galera_2nodes_as_master.cnf
index 68c0cca29a2..33bfc475721 100644
--- a/mysql-test/suite/galera/galera_2nodes_as_master.cnf
+++ b/mysql-test/suite/galera/galera_2nodes_as_master.cnf
@@ -29,7 +29,7 @@ wsrep_node_address=127.0.0.1
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
# enforce read-committed characteristics across the cluster
wsrep-causal-reads=ON
-wsrep-sync-wait=7
+wsrep-sync-wait=15
[mysqld.2]
#galera_port=@OPT.port
@@ -48,7 +48,7 @@ wsrep_node_address=127.0.0.1
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
# enforce read-committed characteristics across the cluster
wsrep-causal-reads=ON
-wsrep-sync-wait=7
+wsrep-sync-wait=15
[mysqld.3]
server-id=3
diff --git a/mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf b/mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf
index 716a790fea6..f68fe524904 100644
--- a/mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf
+++ b/mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf
@@ -29,7 +29,7 @@ wsrep_provider_options='base_port=@mysqld.2.#galera_port;evs.install_timeout = P
# enforce read-committed characteristics across the cluster
wsrep_causal_reads=ON
-wsrep_sync_wait = 7
+wsrep_sync_wait = 15
wsrep_node_address=127.0.0.1
wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port
@@ -49,7 +49,7 @@ wsrep_provider_options='base_port=@mysqld.3.#galera_port;evs.install_timeout = P
# enforce read-committed characteristics across the cluster
wsrep_causal_reads=ON
-wsrep_sync_wait = 7
+wsrep_sync_wait = 15
wsrep_node_address=127.0.0.1
wsrep_sst_receive_address=127.0.0.2:@mysqld.3.#sst_port
diff --git a/mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf b/mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf
index 5f0af2e58e5..d5490280ab2 100644
--- a/mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf
+++ b/mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf
@@ -23,7 +23,7 @@ wsrep_provider_options='base_port=@mysqld.1.#galera_port'
# enforce read-committed characteristics across the cluster
wsrep_causal_reads=ON
-wsrep_sync_wait = 7
+wsrep_sync_wait = 15
wsrep_node_address=127.0.0.1
wsrep_sst_receive_address=127.0.0.2:@mysqld.1.#sst_port
@@ -49,7 +49,7 @@ wsrep_provider_options='base_port=@mysqld.2.#galera_port'
# enforce read-committed characteristics across the cluster
wsrep_causal_reads=ON
-wsrep_sync_wait = 7
+wsrep_sync_wait = 15
wsrep_node_address=127.0.0.1
wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port
diff --git a/mysql-test/suite/galera/galera_2nodes_as_slave.cnf b/mysql-test/suite/galera/galera_2nodes_as_slave.cnf
index 6d71649c274..4d9e39d2aae 100644
--- a/mysql-test/suite/galera/galera_2nodes_as_slave.cnf
+++ b/mysql-test/suite/galera/galera_2nodes_as_slave.cnf
@@ -33,7 +33,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
# enforce read-committed characteristics across the cluster
wsrep-causal-reads=ON
-wsrep-sync-wait=7
+wsrep-sync-wait=15
server-id=2
[mysqld.3]
@@ -57,7 +57,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
# enforce read-committed characteristics across the cluster
wsrep-causal-reads=ON
-wsrep-sync-wait=7
+wsrep-sync-wait=15
server-id=3
[ENV]
diff --git a/mysql-test/suite/galera/galera_3nodes_as_slave.cnf b/mysql-test/suite/galera/galera_3nodes_as_slave.cnf
index aed33ba365b..ac1ca34e242 100644
--- a/mysql-test/suite/galera/galera_3nodes_as_slave.cnf
+++ b/mysql-test/suite/galera/galera_3nodes_as_slave.cnf
@@ -30,7 +30,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
# enforce read-committed characteristics across the cluster
wsrep-causal-reads=ON
-wsrep-sync-wait=7
+wsrep-sync-wait=15
server-id=2
[mysqld.3]
@@ -51,7 +51,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
# enforce read-committed characteristics across the cluster
wsrep-causal-reads=ON
-wsrep-sync-wait=7
+wsrep-sync-wait=15
server-id=3
[mysqld.4]
@@ -72,7 +72,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.4.#sst_port'
# enforce read-committed characteristics across the cluster
wsrep-causal-reads=ON
-wsrep-sync-wait=7
+wsrep-sync-wait=15
server-id=4
[ENV]
diff --git a/mysql-test/suite/galera/galera_4nodes.cnf b/mysql-test/suite/galera/galera_4nodes.cnf
index c93282e6c47..1c195afd54b 100644
--- a/mysql-test/suite/galera/galera_4nodes.cnf
+++ b/mysql-test/suite/galera/galera_4nodes.cnf
@@ -10,7 +10,7 @@ wsrep-provider=@ENV.WSREP_PROVIDER
wsrep_node_address=127.0.0.1
# enforce read-committed characteristics across the cluster
wsrep-causal-reads=ON
-wsrep-sync-wait=7
+wsrep-sync-wait=15
[mysqld.1]
#galera_port=@OPT.port
diff --git a/mysql-test/suite/galera/r/GAL-401.result b/mysql-test/suite/galera/r/GAL-401.result
index de08fbb5799..03509cb0e29 100644
--- a/mysql-test/suite/galera/r/GAL-401.result
+++ b/mysql-test/suite/galera/r/GAL-401.result
@@ -1,13 +1,16 @@
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
SET @@global.wsrep_desync = 1;
SET SESSION wsrep_dirty_reads=1;
+SET SESSION wsrep_sync_wait=0;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
+SET wsrep_dirty_reads=0;
SHOW STATUS LIKE 'wsrep_desync_count';
Variable_name Value
wsrep_desync_count 0
SET @@global.wsrep_desync = 0;
+SET SESSION wsrep_sync_wait=15;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/suite/galera/r/MW-284.result b/mysql-test/suite/galera/r/MW-284.result
index 9465370c25b..9d1c3e5660d 100644
--- a/mysql-test/suite/galera/r/MW-284.result
+++ b/mysql-test/suite/galera/r/MW-284.result
@@ -9,7 +9,7 @@ SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
include/wait_for_slave_to_start.inc
INSERT INTO t1 VALUES (1);
DROP TABLE t1;
-SET global wsrep_sync_wait=7;
+SET global wsrep_sync_wait=15;
STOP SLAVE;
RESET SLAVE ALL;
CALL mtr.add_suppression('failed registering on master');
diff --git a/mysql-test/suite/galera/r/MW-329.result b/mysql-test/suite/galera/r/MW-329.result
index 655d8e9e291..a79ba598d69 100644
--- a/mysql-test/suite/galera/r/MW-329.result
+++ b/mysql-test/suite/galera/r/MW-329.result
@@ -18,3 +18,4 @@ VARIABLE_VALUE > 0
1
DROP PROCEDURE proc_insert;
DROP TABLE t1;
+CALL mtr.add_suppression("conflict state 3 after post commit");
diff --git a/mysql-test/suite/galera/r/MW-336.result b/mysql-test/suite/galera/r/MW-336.result
new file mode 100644
index 00000000000..9bdb61c1a9c
--- /dev/null
+++ b/mysql-test/suite/galera/r/MW-336.result
@@ -0,0 +1,42 @@
+CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
+SET GLOBAL wsrep_slave_threads = 10;
+SET GLOBAL wsrep_slave_threads = 1;
+INSERT INTO t1 VALUES (1);
+SET GLOBAL wsrep_slave_threads = 10;
+SELECT COUNT(*) = 11 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
+COUNT(*) = 11
+1
+SET GLOBAL wsrep_slave_threads = 20;
+SELECT COUNT(*) = 21 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
+COUNT(*) = 21
+1
+SET GLOBAL wsrep_slave_threads = 1;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+SET GLOBAL wsrep_slave_threads = 10;
+SET GLOBAL wsrep_slave_threads = 0;
+Warnings:
+Warning 1292 Truncated incorrect wsrep_slave_threads value: '0'
+INSERT INTO t1 VALUES (10);
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+INSERT INTO t1 VALUES (13);
+INSERT INTO t1 VALUES (14);
+INSERT INTO t1 VALUES (15);
+INSERT INTO t1 VALUES (16);
+INSERT INTO t1 VALUES (17);
+INSERT INTO t1 VALUES (18);
+INSERT INTO t1 VALUES (19);
+INSERT INTO t1 VALUES (20);
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
+COUNT(*) = 2
+1
+SET GLOBAL wsrep_slave_threads = 1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/MW-357.result b/mysql-test/suite/galera/r/MW-357.result
new file mode 100644
index 00000000000..d249d5997f7
--- /dev/null
+++ b/mysql-test/suite/galera/r/MW-357.result
@@ -0,0 +1,6 @@
+SET GLOBAL wsrep_slave_threads = 0;
+Warnings:
+Warning 1292 Truncated incorrect wsrep_slave_threads value: '0'
+CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB;
+INSERT INTO t1 VALUES (1);
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/MW-86-wait1.result b/mysql-test/suite/galera/r/MW-86-wait1.result
new file mode 100644
index 00000000000..a38255eff8f
--- /dev/null
+++ b/mysql-test/suite/galera/r/MW-86-wait1.result
@@ -0,0 +1,48 @@
+SELECT @@debug_sync;
+@@debug_sync
+ON - current signal: ''
+SET SESSION wsrep_sync_wait = 1;
+SET GLOBAL debug = "+d,sync.wsrep_apply_cb";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+CREATE TABLE t_wait1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t_wait1 VALUES (1);
+SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+SHOW BINARY LOGS;
+SHOW BINLOG EVENTS;
+SHOW COLUMNS FROM t1;
+SHOW CREATE EVENT e1;
+SHOW CREATE FUNCTION f1;
+SHOW CREATE PROCEDURE p1;
+SHOW CREATE TABLE t1;
+SHOW CREATE TRIGGER tr1;
+SHOW CREATE VIEW v1;
+SHOW DATABASES;
+SHOW ENGINE InnoDB STATUS;
+SHOW FUNCTION CODE f1;
+SHOW FUNCTION STATUS;
+SHOW GRANTS FOR 'root'@'localhost';
+SHOW INDEX FROM t1;
+SHOW OPEN TABLES;
+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';
+SHOW WARNINGS;
+SET GLOBAL debug = "-d,sync.wsrep_apply_cb";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET SESSION debug_sync = "now SIGNAL signal.wsrep_apply_cb";
+SET SESSION wsrep_sync_wait = default;
+DROP TABLE t_wait1;
+SET GLOBAL debug = NULL;
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET debug_sync='RESET';
+SELECT @@debug_sync;
+@@debug_sync
+ON - current signal: ''
diff --git a/mysql-test/suite/galera/r/MW-86-wait8.result b/mysql-test/suite/galera/r/MW-86-wait8.result
new file mode 100644
index 00000000000..04c93e9a9f2
--- /dev/null
+++ b/mysql-test/suite/galera/r/MW-86-wait8.result
@@ -0,0 +1,50 @@
+SELECT @@debug_sync;
+@@debug_sync
+ON - current signal: ''
+SET SESSION wsrep_sync_wait = 8;
+SET GLOBAL debug = "+d,sync.wsrep_apply_cb";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+CREATE TABLE t_wait8 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t_wait8 VALUES (1);
+SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S";
+SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+SHOW BINARY LOGS;
+SHOW BINLOG EVENTS;
+SHOW COLUMNS FROM t1;
+SHOW CREATE DATABASE db1;
+SHOW CREATE EVENT e1;
+SHOW CREATE FUNCTION f1;
+SHOW CREATE PROCEDURE p1;
+SHOW CREATE TABLE t1;
+SHOW CREATE TRIGGER tr1;
+SHOW CREATE VIEW v1;
+SHOW DATABASES;
+SHOW ENGINE InnoDB STATUS;
+SHOW FUNCTION CODE f1;
+SHOW FUNCTION STATUS;
+SHOW GRANTS FOR 'root'@'localhost';
+SHOW INDEX FROM t1;
+SHOW OPEN TABLES;
+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';
+SHOW WARNINGS;
+SET GLOBAL debug = "-d,sync.wsrep_apply_cb";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+SET SESSION wsrep_sync_wait = default;
+DROP TABLE t_wait8;
+SET GLOBAL debug = NULL;
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET debug_sync='RESET';
+SELECT @@debug_sync;
+@@debug_sync
+ON - current signal: ''
diff --git a/mysql-test/suite/galera/r/galera_applier_ftwrl_table.result b/mysql-test/suite/galera/r/galera_applier_ftwrl_table.result
index cecbfc1f3cf..1b2a3b937bb 100644
--- a/mysql-test/suite/galera/r/galera_applier_ftwrl_table.result
+++ b/mysql-test/suite/galera/r/galera_applier_ftwrl_table.result
@@ -8,7 +8,7 @@ SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
UNLOCK TABLES;
-SET SESSION wsrep_sync_wait = 7;
+SET SESSION wsrep_sync_wait = 15;
SELECT COUNT(*) = 2 FROM t1;
COUNT(*) = 2
1
diff --git a/mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result b/mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result
index ee967356c85..c30f78896e5 100644
--- a/mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result
+++ b/mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result
@@ -12,7 +12,7 @@ SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system use
COUNT(*) = 1
1
UNLOCK TABLES;
-SET SESSION wsrep_sync_wait = 7;
+SET SESSION wsrep_sync_wait = 15;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/suite/galera/r/galera_as_slave_autoinc.result b/mysql-test/suite/galera/r/galera_as_slave_autoinc.result
index b6314b862c2..3c5319a6126 100644
--- a/mysql-test/suite/galera/r/galera_as_slave_autoinc.result
+++ b/mysql-test/suite/galera/r/galera_as_slave_autoinc.result
@@ -35,11 +35,9 @@ i c
show variables like 'binlog_format';
Variable_name Value
binlog_format STATEMENT
-show variables like '%auto_increment%';
+show variables like 'auto_increment_increment';
Variable_name Value
auto_increment_increment 7
-auto_increment_offset 5
-wsrep_auto_increment_control ON
select * from t1;
i c
1 dummy_text
diff --git a/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result b/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result
index 96ed226c3ab..3c5c07ae396 100644
--- a/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result
+++ b/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result
@@ -6,7 +6,7 @@ SET SESSION wsrep_sync_wait = 0;
UNLOCK TABLES;
COMMIT;
SET AUTOCOMMIT=ON;
-SET SESSION wsrep_sync_wait = 7;
+SET SESSION wsrep_sync_wait = 15;
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
diff --git a/mysql-test/suite/galera/r/galera_ddl_multiline.result b/mysql-test/suite/galera/r/galera_ddl_multiline.result
new file mode 100644
index 00000000000..602f18326e8
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_ddl_multiline.result
@@ -0,0 +1,80 @@
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `f1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `f1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB; CREATE TABLE t4 (f1 INTEGER) ENGINE=InnoDB;;
+SHOW CREATE TABLE t3;
+Table Create Table
+t3 CREATE TABLE `t3` (
+ `f1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SHOW CREATE TABLE t4;
+Table Create Table
+t4 CREATE TABLE `t4` (
+ `f1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SHOW CREATE TABLE t3;
+Table Create Table
+t3 CREATE TABLE `t3` (
+ `f1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SHOW CREATE TABLE t4;
+Table Create Table
+t4 CREATE TABLE `t4` (
+ `f1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+INSERT INTO t1 VALUES (1);
+CREATE TABLE t5 (f1 INTEGER) ENGINE=InnoDB;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+SHOW CREATE TABLE t5;
+Table Create Table
+t5 CREATE TABLE `t5` (
+ `f1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+SHOW CREATE TABLE t5;
+Table Create Table
+t5 CREATE TABLE `t5` (
+ `f1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+CREATE TABLE t6 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t2 VALUES (1);;
+SELECT COUNT(*) = 1 FROM t2;
+COUNT(*) = 1
+1
+SHOW CREATE TABLE t6;
+Table Create Table
+t6 CREATE TABLE `t6` (
+ `f1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT COUNT(*) = 1 FROM t2;
+COUNT(*) = 1
+1
+SHOW CREATE TABLE t6;
+Table Create Table
+t6 CREATE TABLE `t6` (
+ `f1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+include/diff_servers.inc [servers=1 2]
+DROP TABLE t1, t2, t3, t4, t5, t6;
diff --git a/mysql-test/suite/galera/r/galera_defaults.result b/mysql-test/suite/galera/r/galera_defaults.result
index 9a0cd03d153..d8f4698a48d 100644
--- a/mysql-test/suite/galera/r/galera_defaults.result
+++ b/mysql-test/suite/galera/r/galera_defaults.result
@@ -50,7 +50,7 @@ WSREP_SST_AUTH
WSREP_SST_DONOR
WSREP_SST_DONOR_REJECTS_QUERIES OFF
WSREP_SST_METHOD rsync
-WSREP_SYNC_WAIT 7
+WSREP_SYNC_WAIT 15
<BASE_DIR>; <BASE_HOST>; <BASE_PORT>; cert.log_conflicts = no; debug = no; evs.auto_evict = 0; evs.causal_keepalive_period = PT1S; evs.debug_log_mask = 0x1; evs.delay_margin = PT1S; evs.delayed_keep_period = PT30S; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT15S; evs.info_log_mask = 0; evs.install_timeout = PT7.5S; evs.join_retrans_period = PT1S; evs.keepalive_period = PT1S; evs.max_install_timeouts = 3; evs.send_window = 4; evs.stats_report_period = PT1M; evs.suspect_timeout = PT10S; evs.use_aggregate = true; evs.user_send_window = 2; evs.version = 0; evs.view_forget_timeout = P1D; <GCACHE_DIR>; gcache.keep_pages_size = 0; gcache.mem_size = 0; <GCACHE_NAME>; gcache.page_size = 128M; gcache.recover = no; gcache.size = 10M; gcomm.thread_prio = ; gcs.fc_debug = 0; gcs.fc_factor = 1.0; gcs.fc_limit = 16; gcs.fc_master_slave = no; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; <GCS_RECV_Q_HARD_LIMIT>; gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; <GMCAST_LISTEN_ADDR>; gmcast.mcast_addr = ; gmcast.mcast_ttl = 1; gmcast.peer_timeout = PT3S; gmcast.segment = 0; gmcast.time_wait = PT5S; gmcast.version = 0; <IST_RECV_ADDR>; pc.announce_timeout = PT3S; pc.checksum = false; pc.ignore_quorum = false; pc.ignore_sb = false; pc.linger = PT20S; pc.npvo = false; pc.recovery = true; pc.version = 0; pc.wait_prim = true; pc.wait_prim_timeout = PT30S; pc.weight = 1; protonet.backend = asio; protonet.version = 0; repl.causal_read_timeout = PT90S; repl.commit_order = 3; repl.key_format = FLAT8; repl.max_ws_size = 2147483647; repl.proto_max = 7; socket.checksum = 2; socket.recv_buf_size = 212992;
SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_STATUS
WHERE VARIABLE_NAME LIKE 'wsrep_%'
diff --git a/mysql-test/suite/galera/r/galera_insert_ignore.result b/mysql-test/suite/galera/r/galera_insert_ignore.result
index b53b5795416..b98a308efb5 100644
--- a/mysql-test/suite/galera/r/galera_insert_ignore.result
+++ b/mysql-test/suite/galera/r/galera_insert_ignore.result
@@ -1,5 +1,5 @@
-SET GLOBAL wsrep_sync_wait = 7;
-SET GLOBAL wsrep_sync_wait = 7;
+SET GLOBAL wsrep_sync_wait = 15;
+SET GLOBAL wsrep_sync_wait = 15;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
INSERT IGNORE INTO t1 VALUES (1), (2);
diff --git a/mysql-test/suite/galera/r/galera_ist_progress.result b/mysql-test/suite/galera/r/galera_ist_progress.result
new file mode 100644
index 00000000000..9fc7febbea5
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_ist_progress.result
@@ -0,0 +1,19 @@
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
+SET SESSION wsrep_on = OFF;
+SET SESSION wsrep_on = ON;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (10);
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
+include/assert_grep.inc [Receiving IST: 11 writesets, seqnos]
+include/assert_grep.inc [Receiving IST\.\.\. 0\.0% \( 0/11 events\) complete]
+include/assert_grep.inc [Receiving IST\.\.\.100\.0% \(11/11 events\) complete]
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_ist_restart_joiner.result b/mysql-test/suite/galera/r/galera_ist_restart_joiner.result
index f7a1386e7f8..ca6848fb925 100644
--- a/mysql-test/suite/galera/r/galera_ist_restart_joiner.result
+++ b/mysql-test/suite/galera/r/galera_ist_restart_joiner.result
@@ -4,16 +4,11 @@ Unloading wsrep provider ...
SET GLOBAL wsrep_provider = 'none';
UPDATE t1 SET f2 = 'b' WHERE f1 > 1;
UPDATE t1 SET f2 = 'c' WHERE f1 > 2;
-SET GLOBAL wsrep_provider_options = 'dbug=d,recv_IST_after_apply_trx';
-SET SESSION wsrep_sync_wait = 0;
Loading wsrep_provider ...
-SHOW STATUS LIKE 'wsrep_debug_sync_waiters';
-Variable_name Value
-wsrep_debug_sync_waiters recv_IST_after_apply_trx
+SET SESSION wsrep_on=OFF;
+SET SESSION wsrep_on=ON;
UPDATE t1 SET f2 = 'd' WHERE f1 > 3;
-CREATE TABLE t2 (f1 INTEGER);
UPDATE t1 SET f2 = 'e' WHERE f1 > 4;
-CREATE TABLE t3 (f1 INTEGER);
Performing --wsrep-recover ...
Starting server ...
Using --wsrep-start-position when starting mysqld ...
@@ -34,10 +29,4 @@ f1 f2
4 d
5 e
6 f
-SELECT COUNT(*) = 0 FROM t2;
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM t3;
-COUNT(*) = 0
-1
-DROP TABLE t1, t2, t3;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_many_rows.result b/mysql-test/suite/galera/r/galera_many_rows.result
index a34367d6e46..e650dd6f5de 100644
--- a/mysql-test/suite/galera/r/galera_many_rows.result
+++ b/mysql-test/suite/galera/r/galera_many_rows.result
@@ -5,7 +5,7 @@ INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB;
INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
SET SESSION wsrep_sync_wait = 0;
-SET SESSION wsrep_sync_wait = 7;
+SET SESSION wsrep_sync_wait = 15;
SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT1H';
SELECT COUNT(*) = 100000 FROM t1;
COUNT(*) = 100000
diff --git a/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result b/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result
index db4528ac22d..27768dc441a 100644
--- a/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result
+++ b/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result
@@ -18,7 +18,7 @@ SELECT COUNT(*) = 0 FROM t2;
COUNT(*) = 0
1
UNLOCK TABLES;
-SET SESSION wsrep_sync_wait = 7;;
+SET SESSION wsrep_sync_wait = 15;;
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
diff --git a/mysql-test/suite/galera/r/galera_parallel_simple.result b/mysql-test/suite/galera/r/galera_parallel_simple.result
index 6d023c38a57..3b10815c63d 100644
--- a/mysql-test/suite/galera/r/galera_parallel_simple.result
+++ b/mysql-test/suite/galera/r/galera_parallel_simple.result
@@ -16,7 +16,7 @@ INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
SET SESSION wsrep_sync_wait = 0;
UNLOCK TABLES;
-SET SESSION wsrep_sync_wait = 7;
+SET SESSION wsrep_sync_wait = 15;
SELECT COUNT(*) = 10 FROM t1;
COUNT(*) = 10
0
diff --git a/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result b/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result
index 856abbb43be..5fe382048fb 100644
--- a/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result
+++ b/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result
@@ -4,7 +4,6 @@ SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT1S";
SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
-SET SESSION wsrep_sync_wait = 7;
SELECT MAX(id) FROM t1;
MAX(id)
1
@@ -16,7 +15,6 @@ Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
FLUSH QUERY CACHE;
-SET SESSION wsrep_sync_wait = 7;
SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
@@ -29,11 +27,9 @@ Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
INSERT INTO t1 VALUES (4);
-SET SESSION wsrep_sync_wait = 7;
SELECT MAX(id) FROM t1;
MAX(id)
4
-SET SESSION wsrep_sync_wait = 7;
FLUSH STATUS;
SELECT MAX(id) FROM t1;
MAX(id)
@@ -45,7 +41,6 @@ SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
INSERT INTO t1 VALUES (5);
-SET SESSION wsrep_sync_wait = 7;
SELECT MAX(id) FROM t1 ;
SET GLOBAL DEBUG = "";
Warnings:
diff --git a/mysql-test/suite/galera/r/galera_suspend_slave.result b/mysql-test/suite/galera/r/galera_suspend_slave.result
index 02904812dd5..357a0d4f78e 100644
--- a/mysql-test/suite/galera/r/galera_suspend_slave.result
+++ b/mysql-test/suite/galera/r/galera_suspend_slave.result
@@ -3,8 +3,11 @@ Suspending node_2 ...
INSERT INTO t1 VALUES (1);
Got one of the listed errors
Resuming node_2 ...
+SET SESSION wsrep_sync_wait = 1;
INSERT INTO t1 VALUES (1);
+SET SESSION wsrep_sync_wait = 1;
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
+SET SESSION wsrep_sync_wait = 15;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_sync_wait_show.result b/mysql-test/suite/galera/r/galera_sync_wait_show.result
index 2f030c26bb8..bc6e5fe5752 100644
--- a/mysql-test/suite/galera/r/galera_sync_wait_show.result
+++ b/mysql-test/suite/galera/r/galera_sync_wait_show.result
@@ -1,4 +1,4 @@
-SET SESSION wsrep_sync_wait = 1;
+SET SESSION wsrep_sync_wait = 8;
CREATE DATABASE db1;
SHOW CREATE DATABASE db1;
Database Create Database
diff --git a/mysql-test/suite/galera/r/galera_unicode_identifiers.result b/mysql-test/suite/galera/r/galera_unicode_identifiers.result
index 8bea105c77e..9aee4616ec5 100644
--- a/mysql-test/suite/galera/r/galera_unicode_identifiers.result
+++ b/mysql-test/suite/galera/r/galera_unicode_identifiers.result
@@ -1,5 +1,5 @@
-SET GLOBAL wsrep_sync_wait = 7;
-SET GLOBAL wsrep_sync_wait = 7;
+SET GLOBAL wsrep_sync_wait = 15;
+SET GLOBAL wsrep_sync_wait = 15;
CREATE DATABASE `database with space`;
USE `database with space`;
CREATE TABLE `table with space` (
diff --git a/mysql-test/suite/galera/r/galera_var_dirty_reads.result b/mysql-test/suite/galera/r/galera_var_dirty_reads.result
index 52729395b19..f141b332b6c 100644
--- a/mysql-test/suite/galera/r/galera_var_dirty_reads.result
+++ b/mysql-test/suite/galera/r/galera_var_dirty_reads.result
@@ -3,10 +3,6 @@ INSERT INTO t1 VALUES(1);
SELECT * FROM t1;
i
1
-create user user1;
-grant all privileges on *.* to user1;
-create user user2;
-grant all privileges on *.* to user2;
SET @@global.wsrep_cluster_address = '';
SET @@session.wsrep_dirty_reads=OFF;
SET SESSION wsrep_sync_wait=0;
@@ -18,87 +14,33 @@ Variable_name Value
wsrep_cluster_status non-Primary
SELECT * FROM t1;
ERROR 08S01: WSREP has not yet prepared node for application use
-SELECT @@wsrep_dirty_reads;
-@@wsrep_dirty_reads
-0
-SELECT 2;
-2
-2
-SELECT 2+2 FROM DUAL;
-2+2
-4
+SELECT 1 FROM t1;
+ERROR 08S01: WSREP has not yet prepared node for application use
SET @@session.wsrep_dirty_reads=ON;
SELECT * FROM t1;
i
1
-connect con1, localhost, user1,,test,$NODE_MYPORT_2,$NODE_MYSOCK_2;
-SET SESSION wsrep_sync_wait=0;
-set session wsrep_dirty_reads=1;
-prepare stmt_show from 'select 1';
-prepare stmt_select from 'select * from t1';
-prepare stmt_insert from 'insert into t1 values(1)';
-set session wsrep_dirty_reads=0;
-execute stmt_show;
-ERROR 08S01: WSREP has not yet prepared node for application use
-execute stmt_select;
-ERROR 08S01: WSREP has not yet prepared node for application use
-execute stmt_insert;
-ERROR 08S01: WSREP has not yet prepared node for application use
-SET wsrep_dirty_reads=ON;
-select @@session.wsrep_dirty_reads;
-@@session.wsrep_dirty_reads
-1
-execute stmt_show;
-1
+SELECT 1 FROM t1;
1
-execute stmt_select;
-i
1
-execute stmt_insert;
+SELECT i, variable_name, variable_value FROM t1, information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads" AND i = 1;
+i variable_name variable_value
+1 WSREP_DIRTY_READS ON
+SET @@session.wsrep_dirty_reads=OFF;
+SELECT i, variable_name, variable_value FROM t1, information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads" AND i = 1;
ERROR 08S01: WSREP has not yet prepared node for application use
-SET @@global.wsrep_dirty_reads=ON;
-connect con2, localhost, user2,,test,$NODE_MYPORT_2,$NODE_MYSOCK_2;
-select @@session.wsrep_dirty_reads;
-@@session.wsrep_dirty_reads
-1
-prepare stmt_show from 'select 1';
-prepare stmt_select from 'select * from t1';
-prepare stmt_insert from 'insert into t1 values(1)';
-execute stmt_show;
+SELECT 1;
1
1
-execute stmt_select;
-i
-1
-execute stmt_insert;
+USE information_schema;
ERROR 08S01: WSREP has not yet prepared node for application use
-SET SESSION wsrep_sync_wait=1;
-execute stmt_show;
-1
-1
-execute stmt_select;
-i
-1
-execute stmt_insert;
+SELECT * FROM information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads";
ERROR 08S01: WSREP has not yet prepared node for application use
-SET SESSION wsrep_sync_wait=7;
-execute stmt_show;
-1
-1
-execute stmt_select;
-i
-1
-execute stmt_insert;
+SELECT COUNT(*) >= 10 FROM performance_schema.events_statements_history;
ERROR 08S01: WSREP has not yet prepared node for application use
-connection node_2;
-SET @@global.wsrep_dirty_reads=OFF;
-connection node_1;
+USE test;
SELECT * FROM t1;
i
1
DROP TABLE t1;
-drop user user1;
-drop user user2;
-disconnect node_2;
-disconnect node_1;
# End of test
diff --git a/mysql-test/suite/galera/r/galera_var_node_address.result b/mysql-test/suite/galera/r/galera_var_node_address.result
index b562883176a..cf36e964f93 100644
--- a/mysql-test/suite/galera/r/galera_var_node_address.result
+++ b/mysql-test/suite/galera/r/galera_var_node_address.result
@@ -1,4 +1,5 @@
call mtr.add_suppression("WSREP: Stray state UUID msg: .* current group state WAIT_STATE_UUID .*");
+call mtr.add_suppression("WSREP: Protocol violation. JOIN message sender .* is not in state transfer (.*). Message ignored.");
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 4
1
diff --git a/mysql-test/suite/galera/r/galera_var_sync_wait.result b/mysql-test/suite/galera/r/galera_var_sync_wait.result
index df9cdfbd159..51c1fb3662b 100644
--- a/mysql-test/suite/galera/r/galera_var_sync_wait.result
+++ b/mysql-test/suite/galera/r/galera_var_sync_wait.result
@@ -3,15 +3,12 @@
#
SELECT @@global.wsrep_sync_wait;
@@global.wsrep_sync_wait
-7
+15
SELECT @@global.wsrep_causal_reads;
@@global.wsrep_causal_reads
1
CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB;
SET GLOBAL wsrep_sync_wait = 1;
-SHOW TABLES LIKE '%t1';
-Tables_in_test (%t1)
-t1
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
@@ -24,7 +21,7 @@ SET GLOBAL wsrep_sync_wait = 2;
UPDATE t3 SET f1 = 2;
affected rows: 1
info: Rows matched: 1 Changed: 1 Warnings: 0
-SET GLOBAL wsrep_sync_wait = 7;
+SET GLOBAL wsrep_sync_wait = 15;
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
diff --git a/mysql-test/suite/galera/r/galera_wsrep_provider_unset_set.result b/mysql-test/suite/galera/r/galera_wsrep_provider_unset_set.result
index 681e4606b38..89110b48def 100644
--- a/mysql-test/suite/galera/r/galera_wsrep_provider_unset_set.result
+++ b/mysql-test/suite/galera/r/galera_wsrep_provider_unset_set.result
@@ -3,6 +3,7 @@ INSERT INTO t1 VALUES (1);
SET GLOBAL wsrep_provider='none';
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
+SET SESSION wsrep_sync_wait = 0;
INSERT INTO t1 VALUES (4);
SELECT COUNT(*) = 4 FROM t1;
COUNT(*) = 4
diff --git a/mysql-test/suite/galera/r/mysql-wsrep#198.result b/mysql-test/suite/galera/r/mysql-wsrep#198.result
index 25ba2cb615c..a278c492372 100644
--- a/mysql-test/suite/galera/r/mysql-wsrep#198.result
+++ b/mysql-test/suite/galera/r/mysql-wsrep#198.result
@@ -1,5 +1,8 @@
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB;
+SELECT 1 FROM DUAL;
+1
+1
LOCK TABLE t2 WRITE;
OPTIMIZE TABLE t1,t2;;
REPAIR TABLE t1,t2;;
diff --git a/mysql-test/suite/galera/r/mysql-wsrep#201.result b/mysql-test/suite/galera/r/mysql-wsrep#201.result
index 1c0998e35ac..34d184d8ec1 100644
--- a/mysql-test/suite/galera/r/mysql-wsrep#201.result
+++ b/mysql-test/suite/galera/r/mysql-wsrep#201.result
@@ -1,4 +1,3 @@
CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (DEFAULT);
SET GLOBAL query_cache_size=1355776;
-SET SESSION wsrep_sync_wait = 7;
diff --git a/mysql-test/suite/galera/r/pxc-421.result b/mysql-test/suite/galera/r/pxc-421.result
index 1822201f338..f5c0fabcd6e 100644
--- a/mysql-test/suite/galera/r/pxc-421.result
+++ b/mysql-test/suite/galera/r/pxc-421.result
@@ -6,6 +6,7 @@ set GLOBAL wsrep_slave_threads=16;
SET GLOBAL wsrep_provider='none';
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
+set SESSION wsrep_sync_wait=0;
INSERT INTO t1 VALUES (4);
set GLOBAL wsrep_slave_threads=5;
SELECT COUNT(*) = 5 FROM t1;
@@ -25,6 +26,7 @@ SET GLOBAL wsrep_slave_threads = 1;
SELECT COUNT(*) FROM t1;
COUNT(*)
16
+SET GLOBAL auto_increment_offset = 2;
SELECT COUNT(*) FROM t1;
COUNT(*)
15
@@ -33,3 +35,4 @@ Variable_name Value
wsrep_slave_threads 12
SET GLOBAL wsrep_slave_threads = 1;
DROP TABLE t1;
+SET GLOBAL auto_increment_offset = 1;
diff --git a/mysql-test/suite/galera/suite.pm b/mysql-test/suite/galera/suite.pm
index a161301d8ff..31593b654ea 100644
--- a/mysql-test/suite/galera/suite.pm
+++ b/mysql-test/suite/galera/suite.pm
@@ -19,6 +19,9 @@ $ENV{WSREP_PROVIDER} = $provider;
my ($spath) = grep { -f "$_/wsrep_sst_rsync"; } "$::bindir/scripts", $::path_client_bindir;
return "No SST scripts" unless $spath;
+my ($cpath) = grep { -f "$_/mysql"; } "$::bindir/scripts", $::path_client_bindir;
+return "No scritps" unless $cpath;
+
my ($epath) = grep { -f "$_/my_print_defaults"; } "$::bindir/extra", $::path_client_bindir;
return "No my_print_defaults" unless $epath;
@@ -65,13 +68,18 @@ push @::global_suppressions,
qr(WSREP: TO isolation failed for: .*),
qr|WSREP: gcs_caused\(\) returned .*|,
qr|WSREP: Protocol violation. JOIN message sender .* is not in state transfer \(SYNCED\). Message ignored.|,
+ qr|WSREP: Protocol violation. JOIN message sender .* is not in state transfer \(JOINED\). Message ignored.|,
+ qr|WSREP: Unsupported protocol downgrade: incremental data collection disabled. Expect abort.|,
qr(WSREP: Action message in non-primary configuration from member [0-9]*),
qr(WSREP: discarding established .*),
+ qr(WSREP: gcs\/src\/gcs_core.cpp:core_handle_uuid_msg\(\):.*),
+ qr(WSREP: --wsrep-causal-reads=ON takes precedence over --wsrep-sync-wait=0. WSREP_SYNC_WAIT_BEFORE_READ is on),
);
$ENV{PATH}="$epath:$ENV{PATH}";
$ENV{PATH}="$spath:$ENV{PATH}" unless $epath eq $spath;
+$ENV{PATH}="$cpath:$ENV{PATH}" unless $cpath eq $spath;
bless { };
diff --git a/mysql-test/suite/galera/t/GAL-401.test b/mysql-test/suite/galera/t/GAL-401.test
index 66015f970c9..06ce37dc81f 100644
--- a/mysql-test/suite/galera/t/GAL-401.test
+++ b/mysql-test/suite/galera/t/GAL-401.test
@@ -10,6 +10,7 @@ SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
--connection node_2
SET @@global.wsrep_desync = 1;
SET SESSION wsrep_dirty_reads=1;
+SET SESSION wsrep_sync_wait=0;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--source include/wait_condition.inc
@@ -27,10 +28,13 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
# Reconnect node 2 to the PC:
--connection node_2
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
+SET wsrep_dirty_reads=0;
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--source include/wait_condition.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
+--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
+--source include/wait_condition.inc
# Must return 0:
SHOW STATUS LIKE 'wsrep_desync_count';
@@ -41,6 +45,7 @@ SET @@global.wsrep_desync = 0;
--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
--source include/wait_condition.inc
+SET SESSION wsrep_sync_wait=15;
SHOW CREATE TABLE t1;
DROP TABLE t1;
CALL mtr.add_suppression("WSREP: Protocol violation. JOIN message sender (.*) is not in state transfer \\(SYNCED\\). Message ignored.");
diff --git a/mysql-test/suite/galera/t/MW-286.test b/mysql-test/suite/galera/t/MW-286.test
index 1b2e322f078..08deb317fbe 100644
--- a/mysql-test/suite/galera/t/MW-286.test
+++ b/mysql-test/suite/galera/t/MW-286.test
@@ -25,6 +25,7 @@ SET wsrep_on = FALSE;
--error ER_QUERY_INTERRUPTED
ALTER TABLE t1 ADD PRIMARY KEY (f1);
+SET SESSION wsrep_sync_wait = 0;
SET wsrep_on = TRUE;
SET GLOBAL wsrep_desync = FALSE;
diff --git a/mysql-test/suite/galera/t/MW-329.test b/mysql-test/suite/galera/t/MW-329.test
index acf6763b396..d9f9a787442 100644
--- a/mysql-test/suite/galera/t/MW-329.test
+++ b/mysql-test/suite/galera/t/MW-329.test
@@ -80,3 +80,6 @@ SELECT VARIABLE_VALUE > 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N
--connection node_1
DROP PROCEDURE proc_insert;
DROP TABLE t1;
+
+# Due to MW-330, Multiple "conflict state 3 after post commit" warnings if table is dropped while SP is running
+CALL mtr.add_suppression("conflict state 3 after post commit");
diff --git a/mysql-test/suite/galera/t/MW-336.test b/mysql-test/suite/galera/t/MW-336.test
new file mode 100644
index 00000000000..79d8951a822
--- /dev/null
+++ b/mysql-test/suite/galera/t/MW-336.test
@@ -0,0 +1,64 @@
+#
+# MW-336 Slave threads may leak if variable wsrep_slave_threads is set repeatedly
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
+
+--connection node_1
+SET GLOBAL wsrep_slave_threads = 10;
+SET GLOBAL wsrep_slave_threads = 1;
+
+--connection node_2
+INSERT INTO t1 VALUES (1);
+
+--connection node_1
+--sleep 0.5
+SET GLOBAL wsrep_slave_threads = 10;
+--sleep 0.5
+SELECT COUNT(*) = 11 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
+
+SET GLOBAL wsrep_slave_threads = 20;
+--sleep 0.5
+SELECT COUNT(*) = 21 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
+
+
+SET GLOBAL wsrep_slave_threads = 1;
+
+--connection node_2
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+
+
+--connection node_1
+SET GLOBAL wsrep_slave_threads = 10;
+SET GLOBAL wsrep_slave_threads = 0;
+
+--connection node_2
+INSERT INTO t1 VALUES (10);
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+INSERT INTO t1 VALUES (13);
+INSERT INTO t1 VALUES (14);
+INSERT INTO t1 VALUES (15);
+INSERT INTO t1 VALUES (16);
+INSERT INTO t1 VALUES (17);
+INSERT INTO t1 VALUES (18);
+INSERT INTO t1 VALUES (19);
+INSERT INTO t1 VALUES (20);
+
+--connection node_1
+--sleep 0.5
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
+
+SET GLOBAL wsrep_slave_threads = 1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/MW-357.test b/mysql-test/suite/galera/t/MW-357.test
new file mode 100644
index 00000000000..d13cf058aeb
--- /dev/null
+++ b/mysql-test/suite/galera/t/MW-357.test
@@ -0,0 +1,13 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_2
+SET GLOBAL wsrep_slave_threads = 0;
+
+--connection node_1
+CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB;
+
+--connection node_1
+INSERT INTO t1 VALUES (1);
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/MW-369.test b/mysql-test/suite/galera/t/MW-369.test
index bfb9460b411..720d6daf518 100644
--- a/mysql-test/suite/galera/t/MW-369.test
+++ b/mysql-test/suite/galera/t/MW-369.test
@@ -244,4 +244,3 @@ SELECT * FROM c;
DROP TABLE c;
DROP TABLE p;
---sleep 3
diff --git a/mysql-test/suite/galera/t/MW-86-wait1-master.opt b/mysql-test/suite/galera/t/MW-86-wait1-master.opt
new file mode 100644
index 00000000000..8a755e98b00
--- /dev/null
+++ b/mysql-test/suite/galera/t/MW-86-wait1-master.opt
@@ -0,0 +1 @@
+--log-bin --log-slave-updates
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 00000000000..6c0982ad8b3
--- /dev/null
+++ b/mysql-test/suite/galera/t/MW-86-wait1.test
@@ -0,0 +1,106 @@
+#
+# 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_sync.inc
+
+--connection node_2
+# Make sure no signals have been leftover from previous tests to surprise us.
+SELECT @@debug_sync;
+
+SET SESSION wsrep_sync_wait = 1;
+SET GLOBAL debug = "+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 = "-d,sync.wsrep_apply_cb";
+SET SESSION debug_sync = "now SIGNAL signal.wsrep_apply_cb";
+
+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;
+
+SET GLOBAL debug = NULL;
+SET debug_sync='RESET';
+
+# Make sure no pending signals are leftover to surprise subsequent tests.
+SELECT @@debug_sync;
diff --git a/mysql-test/suite/galera/t/MW-86-wait8-master.opt b/mysql-test/suite/galera/t/MW-86-wait8-master.opt
new file mode 100644
index 00000000000..8a755e98b00
--- /dev/null
+++ b/mysql-test/suite/galera/t/MW-86-wait8-master.opt
@@ -0,0 +1 @@
+--log-bin --log-slave-updates
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 00000000000..65e612c5c8e
--- /dev/null
+++ b/mysql-test/suite/galera/t/MW-86-wait8.test
@@ -0,0 +1,128 @@
+#
+# 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_sync.inc
+
+--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 = "+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 = "-d,sync.wsrep_apply_cb";
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+
+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;
+
+SET GLOBAL debug = NULL;
+SET debug_sync='RESET';
+
+# Make sure no pending signals are leftover to surprise subsequent tests.
+SELECT @@debug_sync;
diff --git a/mysql-test/suite/galera/t/galera#414.test b/mysql-test/suite/galera/t/galera#414.test
index dccb28e4054..de10898df42 100644
--- a/mysql-test/suite/galera/t/galera#414.test
+++ b/mysql-test/suite/galera/t/galera#414.test
@@ -6,6 +6,11 @@
--source include/have_innodb.inc
--source include/galera_cluster.inc
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
+
# We perform the shutdown/restart sequence in here. If there was a crash during shutdown, MTR will detect it
--connection node_2
@@ -35,3 +40,4 @@ CALL mtr.add_suppression("Failed to set packet size");
--source include/wait_condition.inc
CALL mtr.add_suppression("Failed to set packet size");
+--source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/galera_applier_ftwrl_table.test b/mysql-test/suite/galera/t/galera_applier_ftwrl_table.test
index 6747977812b..97819384a75 100644
--- a/mysql-test/suite/galera/t/galera_applier_ftwrl_table.test
+++ b/mysql-test/suite/galera/t/galera_applier_ftwrl_table.test
@@ -28,7 +28,7 @@ SELECT COUNT(*) = 0 FROM t1;
--connection node_1
UNLOCK TABLES;
-SET SESSION wsrep_sync_wait = 7;
+SET SESSION wsrep_sync_wait = 15;
SELECT COUNT(*) = 2 FROM t1;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.test b/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.test
index 99c45c04ba0..67f2108d263 100644
--- a/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.test
+++ b/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.test
@@ -29,7 +29,7 @@ SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system use
UNLOCK TABLES;
-SET SESSION wsrep_sync_wait = 7;
+SET SESSION wsrep_sync_wait = 15;
SHOW CREATE TABLE t1;
SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'Waiting for table metadata lock';
diff --git a/mysql-test/suite/galera/t/galera_as_slave_autoinc.test b/mysql-test/suite/galera/t/galera_as_slave_autoinc.test
index 9292badc480..59483d0591c 100644
--- a/mysql-test/suite/galera/t/galera_as_slave_autoinc.test
+++ b/mysql-test/suite/galera/t/galera_as_slave_autoinc.test
@@ -48,7 +48,7 @@ insert into t1(i) values(null), (null), (null);
select * from t1;
show variables like 'binlog_format';
-show variables like '%auto_increment%';
+show variables like 'auto_increment_increment';
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
diff --git a/mysql-test/suite/galera/t/galera_bf_abort_flush_for_export.test b/mysql-test/suite/galera/t/galera_bf_abort_flush_for_export.test
index e32089ce21e..fde783e2cef 100644
--- a/mysql-test/suite/galera/t/galera_bf_abort_flush_for_export.test
+++ b/mysql-test/suite/galera/t/galera_bf_abort_flush_for_export.test
@@ -27,7 +27,7 @@ UNLOCK TABLES;
COMMIT;
SET AUTOCOMMIT=ON;
-SET SESSION wsrep_sync_wait = 7;
+SET SESSION wsrep_sync_wait = 15;
SELECT COUNT(*) = 1 FROM t1;
--let $wsrep_local_bf_aborts_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
diff --git a/mysql-test/suite/galera/t/galera_ddl_multiline.test b/mysql-test/suite/galera/t/galera_ddl_multiline.test
new file mode 100644
index 00000000000..c7155d066fa
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_ddl_multiline.test
@@ -0,0 +1,54 @@
+#
+# Test that Galera works correctly with multiline statements, in particular involving DDLs
+#
+
+--source include/galera_cluster.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+
+SHOW CREATE TABLE t1;
+SHOW CREATE TABLE t2;
+
+--connection node_2
+SHOW CREATE TABLE t1;
+SHOW CREATE TABLE t2;
+
+--connection node_1
+--send CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB; CREATE TABLE t4 (f1 INTEGER) ENGINE=InnoDB;
+--reap
+
+SHOW CREATE TABLE t3;
+SHOW CREATE TABLE t4;
+
+--connection node_2
+SHOW CREATE TABLE t3;
+SHOW CREATE TABLE t4;
+
+--connection node_1
+INSERT INTO t1 VALUES (1); CREATE TABLE t5 (f1 INTEGER) ENGINE=InnoDB;
+
+SELECT COUNT(*) = 1 FROM t1;
+SHOW CREATE TABLE t5;
+
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1;
+SHOW CREATE TABLE t5;
+
+--connection node_1
+--send CREATE TABLE t6 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t2 VALUES (1);
+--reap
+
+SELECT COUNT(*) = 1 FROM t2;
+SHOW CREATE TABLE t6;
+
+--connection node_2
+SELECT COUNT(*) = 1 FROM t2;
+SHOW CREATE TABLE t6;
+
+--let $diff_servers = 1 2
+--source include/diff_servers.inc
+
+--connection node_1
+DROP TABLE t1, t2, t3, t4, t5, t6;
+
diff --git a/mysql-test/suite/galera/t/galera_gcs_fc_limit.test b/mysql-test/suite/galera/t/galera_gcs_fc_limit.test
index dc65a452d7c..61576a39316 100644
--- a/mysql-test/suite/galera/t/galera_gcs_fc_limit.test
+++ b/mysql-test/suite/galera/t/galera_gcs_fc_limit.test
@@ -21,11 +21,11 @@ LOCK TABLE t1 WRITE;
--connection node_1
--sleep 1
INSERT INTO t1 VALUES (2);
---sleep 1
+--sleep 2
INSERT INTO t1 VALUES (3);
---sleep 1
+--sleep 2
INSERT INTO t1 VALUES (4);
---sleep 1
+--sleep 2
# This query will hang because flow control will kick in
--send
diff --git a/mysql-test/suite/galera/t/galera_insert_ignore.test b/mysql-test/suite/galera/t/galera_insert_ignore.test
index 4b4b0a6e9fb..027f70e96d9 100644
--- a/mysql-test/suite/galera/t/galera_insert_ignore.test
+++ b/mysql-test/suite/galera/t/galera_insert_ignore.test
@@ -2,10 +2,10 @@
--source include/have_innodb.inc
--let $wsrep_sync_wait_orig = (SELECT @@wsrep_sync_wait)
-SET GLOBAL wsrep_sync_wait = 7;
+SET GLOBAL wsrep_sync_wait = 15;
--connection node_2
-SET GLOBAL wsrep_sync_wait = 7;
+SET GLOBAL wsrep_sync_wait = 15;
#
diff --git a/mysql-test/suite/galera/t/galera_ist_mysqldump.cnf b/mysql-test/suite/galera/t/galera_ist_mysqldump.cnf
index db6b7d5e129..357c8678658 100644
--- a/mysql-test/suite/galera/t/galera_ist_mysqldump.cnf
+++ b/mysql-test/suite/galera/t/galera_ist_mysqldump.cnf
@@ -9,3 +9,4 @@ wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.ignore_sb=true'
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;pc.ignore_sb=true'
+
diff --git a/mysql-test/suite/galera/t/galera_ist_progress.cnf b/mysql-test/suite/galera/t/galera_ist_progress.cnf
new file mode 100644
index 00000000000..0a26f6d6c83
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_ist_progress.cnf
@@ -0,0 +1,5 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.ignore_sb=true'
+
diff --git a/mysql-test/suite/galera/t/galera_ist_progress.test b/mysql-test/suite/galera/t/galera_ist_progress.test
new file mode 100644
index 00000000000..3ba63415c28
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_ist_progress.test
@@ -0,0 +1,76 @@
+#
+# Test progress output during IST
+#
+
+--source include/galera_cluster.inc
+# This could cause out of storage if run /dev/shm
+--source include/big_test.inc
+
+# Isolate node #2
+--connection node_2
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
+
+--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+--connection node_2
+SET SESSION wsrep_on = OFF;
+--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--source include/wait_condition.inc
+SET SESSION wsrep_on = ON;
+
+# Node #2 is now isolated. Run some transactions to accumulate writesets for IST
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (10);
+
+# Restore node #2, IST is performed
+
+--connection node_2
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
+
+--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+--connection node_2
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--source include/wait_condition.inc
+
+#
+# Grep for expected IST output in joiner log
+#
+
+--connection node_1
+
+--let $assert_count = 1
+--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.2.err
+--let $assert_only_after = Need state transfer
+
+--let $assert_text = Receiving IST: 11 writesets, seqnos
+--let $assert_select = Receiving IST: 11 writesets, seqnos
+--source include/assert_grep.inc
+
+--let $assert_text = Receiving IST\.\.\. 0\.0% \( 0/11 events\) complete
+--let $assert_select = Receiving IST\.\.\. 0\.0% \( 0/11 events\) complete
+--source include/assert_grep.inc
+
+--let $assert_text = Receiving IST\.\.\.100\.0% \(11/11 events\) complete
+--let $assert_select = Receiving IST\.\.\.100\.0% \(11/11 events\) complete
+--source include/assert_grep.inc
+
+# Cleanup
+
+--connection node_1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_ist_recv_bind.test b/mysql-test/suite/galera/t/galera_ist_recv_bind.test
index cb7329073ad..a339684c158 100644
--- a/mysql-test/suite/galera/t/galera_ist_recv_bind.test
+++ b/mysql-test/suite/galera/t/galera_ist_recv_bind.test
@@ -5,6 +5,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
+--source include/big_test.inc
--connection node_1
SELECT @@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%';
diff --git a/mysql-test/suite/galera/t/galera_ist_restart_joiner.test b/mysql-test/suite/galera/t/galera_ist_restart_joiner.test
index 931daaad30d..633318629a6 100644
--- a/mysql-test/suite/galera/t/galera_ist_restart_joiner.test
+++ b/mysql-test/suite/galera/t/galera_ist_restart_joiner.test
@@ -8,6 +8,8 @@
--source include/have_innodb.inc
--source include/have_debug_sync.inc
--source suite/galera/include/galera_have_debug_sync.inc
+# This could cause out of storage if run /dev/shm
+--source include/big_test.inc
# Save original auto_increment_offset values.
--let $node_1=node_1
@@ -31,13 +33,6 @@ UPDATE t1 SET f2 = 'b' WHERE f1 > 1;
UPDATE t1 SET f2 = 'c' WHERE f1 > 2;
--connection node_2
-# Make sure IST will block ...
---let $galera_sync_point = recv_IST_after_apply_trx
---source include/galera_set_sync_point.inc
-
-SET SESSION wsrep_sync_wait = 0;
-
-
# Write file to make mysql-test-run.pl expect the crash, but don't start it
--let $_server_id= `SELECT @@server_id`
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
@@ -48,21 +43,23 @@ SET SESSION wsrep_sync_wait = 0;
# ... and restart provider to force IST
--echo Loading wsrep_provider ...
--disable_query_log
+# base_port setting is lost for some reason when unloading provider, so we need to restore it
+--eval SET GLOBAL wsrep_provider_options= 'base_port=$NODE_GALERAPORT_2';
--eval SET GLOBAL wsrep_provider = '$wsrep_provider_orig';
+# Make sure IST will block ...
+--let $galera_sync_point = recv_IST_after_apply_trx
+--source include/galera_set_sync_point.inc
--eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_orig';
--enable_query_log
-# We can not use a wait_condition on SELECT * FROM INFORMATION_SCHEMA.GLOBAL_STATUS as such queries are blocked during IST
-# so we perform a simple sleep and SHOW instead
-
---sleep 5
-SHOW STATUS LIKE 'wsrep_debug_sync_waiters';
+SET SESSION wsrep_on=OFF;
+--let $wait_condition = SELECT VARIABLE_VALUE = 'recv_IST_after_apply_trx' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_debug_sync_waiters';
+--source include/wait_condition.inc
+SET SESSION wsrep_on=ON;
--connection node_1
-# Perform DML and DDL while IST is in progress
---connection node_1
+# Perform DML while IST is in progress
UPDATE t1 SET f2 = 'd' WHERE f1 > 3;
-CREATE TABLE t2 (f1 INTEGER);
# Kill node #2 while IST is in progress
--connection node_2
@@ -85,9 +82,8 @@ EOF
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
-# Perform DML and DDL while node #2 is down
+# Perform DML while node #2 is down
UPDATE t1 SET f2 = 'e' WHERE f1 > 4;
-CREATE TABLE t3 (f1 INTEGER);
--connection node_2
@@ -106,11 +102,9 @@ SELECT * FROM t1;
--connection node_2
SELECT * FROM t1;
-SELECT COUNT(*) = 0 FROM t2;
-SELECT COUNT(*) = 0 FROM t3;
--connection node_1
-DROP TABLE t1, t2, t3;
+DROP TABLE t1;
# Restore original auto_increment_offset values.
--source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/galera_ist_rsync.cnf b/mysql-test/suite/galera/t/galera_ist_rsync.cnf
index bbe0f6047fb..797e3651967 100644
--- a/mysql-test/suite/galera/t/galera_ist_rsync.cnf
+++ b/mysql-test/suite/galera/t/galera_ist_rsync.cnf
@@ -5,7 +5,9 @@ wsrep_sst_method=rsync
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.ignore_sb=true'
+wsrep_sync_wait=1
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;pc.ignore_sb=true'
+wsrep_sync_wait=1
diff --git a/mysql-test/suite/galera/t/galera_ist_rsync.test b/mysql-test/suite/galera/t/galera_ist_rsync.test
index 41d1a0c1fc2..1da79cd4214 100644
--- a/mysql-test/suite/galera/t/galera_ist_rsync.test
+++ b/mysql-test/suite/galera/t/galera_ist_rsync.test
@@ -2,7 +2,12 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
--source suite/galera/include/galera_st_disconnect_slave.inc
--source suite/galera/include/galera_st_shutdown_slave.inc
--source suite/galera/include/galera_st_kill_slave.inc
--source suite/galera/include/galera_st_kill_slave_ddl.inc
+--source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/galera_many_rows.test b/mysql-test/suite/galera/t/galera_many_rows.test
index 653dc2dd75a..58ba85e1b9e 100644
--- a/mysql-test/suite/galera/t/galera_many_rows.test
+++ b/mysql-test/suite/galera/t/galera_many_rows.test
@@ -16,7 +16,7 @@ INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4
--connection node_2
SET SESSION wsrep_sync_wait = 0;
--let $wsrep_provider_options_node2 = `SELECT @@wsrep_provider_options`
-SET SESSION wsrep_sync_wait = 7;
+SET SESSION wsrep_sync_wait = 15;
SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT1H';
diff --git a/mysql-test/suite/galera/t/galera_migrate.cnf b/mysql-test/suite/galera/t/galera_migrate.cnf
index 47bdf53afef..ed48f208e52 100644
--- a/mysql-test/suite/galera/t/galera_migrate.cnf
+++ b/mysql-test/suite/galera/t/galera_migrate.cnf
@@ -13,7 +13,7 @@ log-bin=mysqld-bin
wsrep_node_address=127.0.0.1
wsrep_causal_reads=ON
-wsrep_sync_wait = 7
+wsrep_sync_wait = 15
[mysqld.1]
#galera_port=@OPT.port
diff --git a/mysql-test/suite/galera/t/galera_parallel_simple.test b/mysql-test/suite/galera/t/galera_parallel_simple.test
index e078a342c16..41cd0c8e6fa 100644
--- a/mysql-test/suite/galera/t/galera_parallel_simple.test
+++ b/mysql-test/suite/galera/t/galera_parallel_simple.test
@@ -45,7 +45,7 @@ SET SESSION wsrep_sync_wait = 0;
UNLOCK TABLES;
-SET SESSION wsrep_sync_wait = 7;
+SET SESSION wsrep_sync_wait = 15;
SELECT COUNT(*) = 10 FROM t1;
SELECT COUNT(*) = 10 FROM t2;
diff --git a/mysql-test/suite/galera/t/galera_query_cache_sync_wait.test b/mysql-test/suite/galera/t/galera_query_cache_sync_wait.test
index 6b14118d5fc..87afc2d7bb2 100644
--- a/mysql-test/suite/galera/t/galera_query_cache_sync_wait.test
+++ b/mysql-test/suite/galera/t/galera_query_cache_sync_wait.test
@@ -10,7 +10,6 @@ INSERT INTO t1 VALUES (1);
--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT1S";
SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
-SET SESSION wsrep_sync_wait = 7;
SELECT MAX(id) FROM t1; # first lookup miss
#
@@ -27,7 +26,6 @@ SET GLOBAL DEBUG = "";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
FLUSH QUERY CACHE;
-SET SESSION wsrep_sync_wait = 7;
SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
SET DEBUG_SYNC = "RESET";
@@ -52,9 +50,7 @@ SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
INSERT INTO t1 VALUES (4);
--connection node_2
-SET SESSION wsrep_sync_wait = 7;
SELECT MAX(id) FROM t1;
-SET SESSION wsrep_sync_wait = 7;
#
# Query cache hit
@@ -73,7 +69,6 @@ SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
INSERT INTO t1 VALUES (5);
--connection node_2
-SET SESSION wsrep_sync_wait = 7;
--send SELECT MAX(id) FROM t1
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
diff --git a/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test b/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test
index 2f27678b547..a8ea639415d 100644
--- a/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test
+++ b/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test
@@ -6,6 +6,11 @@
CALL mtr.add_suppression("Aborting");
CALL mtr.add_suppression("unknown option '--galera-unknown-option'");
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
+
#
# We should count the number of "Assertion failed" warnings
# in the log file before and after testing. To do this we need
@@ -148,3 +153,5 @@ DROP TABLE t1;
}
EOF
--remove_file $TEST_LOG.copy
+
+--source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/galera_ssl.test b/mysql-test/suite/galera/t/galera_ssl.test
index 8dc94dc1966..e6346aa2151 100644
--- a/mysql-test/suite/galera/t/galera_ssl.test
+++ b/mysql-test/suite/galera/t/galera_ssl.test
@@ -8,6 +8,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
+--source include/big_test.inc
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
diff --git a/mysql-test/suite/galera/t/galera_ssl_compression.test b/mysql-test/suite/galera/t/galera_ssl_compression.test
index cdecf4807d4..75f92c5b2f4 100644
--- a/mysql-test/suite/galera/t/galera_ssl_compression.test
+++ b/mysql-test/suite/galera/t/galera_ssl_compression.test
@@ -7,6 +7,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
+--source include/big_test.inc
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
diff --git a/mysql-test/suite/galera/t/galera_suspend_slave.test b/mysql-test/suite/galera/t/galera_suspend_slave.test
index 353a7c38a73..dcc4a8d14c3 100644
--- a/mysql-test/suite/galera/t/galera_suspend_slave.test
+++ b/mysql-test/suite/galera/t/galera_suspend_slave.test
@@ -41,6 +41,7 @@ INSERT INTO t1 VALUES (1);
exit(0);
EOF
+SET SESSION wsrep_sync_wait = 1;
--sleep 10
--source include/wait_until_ready.inc
INSERT INTO t1 VALUES (1);
@@ -50,9 +51,11 @@ INSERT INTO t1 VALUES (1);
--source include/galera_connect.inc
--connection node_2a
+SET SESSION wsrep_sync_wait = 1;
--source include/wait_until_ready.inc
SELECT COUNT(*) = 1 FROM t1;
+SET SESSION wsrep_sync_wait = 15;
DROP TABLE t1;
# Restore original auto_increment_offset values.
diff --git a/mysql-test/suite/galera/t/galera_sync_wait_show.test b/mysql-test/suite/galera/t/galera_sync_wait_show.test
index 250b1f76e98..58de5433030 100644
--- a/mysql-test/suite/galera/t/galera_sync_wait_show.test
+++ b/mysql-test/suite/galera/t/galera_sync_wait_show.test
@@ -7,7 +7,8 @@
--source include/have_debug.inc
--connection node_2
-SET SESSION wsrep_sync_wait = 1;
+# MW-86 SHOW commands have now bitmap value 8
+SET SESSION wsrep_sync_wait = 8;
--connection node_1
diff --git a/mysql-test/suite/galera/t/galera_unicode_identifiers.test b/mysql-test/suite/galera/t/galera_unicode_identifiers.test
index 9adac1aa555..f3df60a6415 100644
--- a/mysql-test/suite/galera/t/galera_unicode_identifiers.test
+++ b/mysql-test/suite/galera/t/galera_unicode_identifiers.test
@@ -6,10 +6,10 @@
--source include/have_innodb.inc
--let $wsrep_sync_wait_orig = (SELECT @@wsrep_sync_wait)
-SET GLOBAL wsrep_sync_wait = 7;
+SET GLOBAL wsrep_sync_wait = 15;
--connection node_2
-SET GLOBAL wsrep_sync_wait = 7;
+SET GLOBAL wsrep_sync_wait = 15;
--connection node_1
diff --git a/mysql-test/suite/galera/t/galera_var_dirty_reads.test b/mysql-test/suite/galera/t/galera_var_dirty_reads.test
index 1fd30c69a7b..cba8488b879 100644
--- a/mysql-test/suite/galera/t/galera_var_dirty_reads.test
+++ b/mysql-test/suite/galera/t/galera_var_dirty_reads.test
@@ -17,15 +17,10 @@ CREATE TABLE t1(i INT) ENGINE=INNODB;
INSERT INTO t1 VALUES(1);
SELECT * FROM t1;
-create user user1;
-grant all privileges on *.* to user1;
-create user user2;
-grant all privileges on *.* to user2;
-
SET @@global.wsrep_cluster_address = '';
SET @@session.wsrep_dirty_reads=OFF;
-# Set wsrep_sync_wait to avoid ER_LOCK_WAIT_TIMEOUT (MDEV-6832).
+# Set wsrep_sync_wait to avoid ER_LOCK_WAIT_TIMEOUT.
SET SESSION wsrep_sync_wait=0;
# Must return 'OFF'
@@ -37,75 +32,31 @@ SHOW STATUS LIKE 'wsrep_cluster_status';
--error ER_UNKNOWN_COM_ERROR
SELECT * FROM t1;
-#Select query which does not access table should be allowed MDEV-11016
-SELECT @@wsrep_dirty_reads;
-SELECT 2;
-SELECT 2+2 FROM DUAL;
+--error ER_UNKNOWN_COM_ERROR
+SELECT 1 FROM t1;
SET @@session.wsrep_dirty_reads=ON;
SELECT * FROM t1;
+SELECT 1 FROM t1;
---enable_connect_log
---connect (con1, localhost, user1,,test,$NODE_MYPORT_2,$NODE_MYSOCK_2)
-#Just test the session behavior
-SET SESSION wsrep_sync_wait=0;
-
-set session wsrep_dirty_reads=1;
-#Prepared statement creation should be allowed MDEV-11479
-prepare stmt_show from 'select 1';
-prepare stmt_select from 'select * from t1';
-prepare stmt_insert from 'insert into t1 values(1)';
-set session wsrep_dirty_reads=0;
+SELECT i, variable_name, variable_value FROM t1, information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads" AND i = 1;
-#No Preapare stmt/proceure will be allowed
---error ER_UNKNOWN_COM_ERROR
-execute stmt_show;
---error ER_UNKNOWN_COM_ERROR
-execute stmt_select;
---error ER_UNKNOWN_COM_ERROR
-execute stmt_insert;
+SET @@session.wsrep_dirty_reads=OFF;
-SET wsrep_dirty_reads=ON;
-select @@session.wsrep_dirty_reads;
-#Only prepare statement which does not change data should be allowed
-execute stmt_show;
-execute stmt_select;
--error ER_UNKNOWN_COM_ERROR
-execute stmt_insert;
-SET @@global.wsrep_dirty_reads=ON;
-
---connect (con2, localhost, user2,,test,$NODE_MYPORT_2,$NODE_MYSOCK_2)
-#Just test the session behavior
-select @@session.wsrep_dirty_reads;
+SELECT i, variable_name, variable_value FROM t1, information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads" AND i = 1;
-prepare stmt_show from 'select 1';
-prepare stmt_select from 'select * from t1';
-prepare stmt_insert from 'insert into t1 values(1)';
+SELECT 1;
-#Only prepare statement which does not change data should be allowed
-execute stmt_show;
-execute stmt_select;
--error ER_UNKNOWN_COM_ERROR
-execute stmt_insert;
-
-#wsrep_dirty_read should work when wsrep_sync_wait is 1 or non zero
-#because we already are disconnected , So It does not make any sense
-#to wait for other nodes
-SET SESSION wsrep_sync_wait=1;
-execute stmt_show;
-execute stmt_select;
---error ER_UNKNOWN_COM_ERROR
-execute stmt_insert;
+USE information_schema;
-SET SESSION wsrep_sync_wait=7;
-execute stmt_show;
-execute stmt_select;
--error ER_UNKNOWN_COM_ERROR
-execute stmt_insert;
+SELECT * FROM information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads";
---connection node_2
-SET @@global.wsrep_dirty_reads=OFF;
+--error ER_UNKNOWN_COM_ERROR
+SELECT COUNT(*) >= 10 FROM performance_schema.events_statements_history;
--disable_query_log
--eval SET @@global.wsrep_cluster_address = '$wsrep_cluster_address_saved'
@@ -113,13 +64,11 @@ SET @@global.wsrep_dirty_reads=OFF;
--source include/wait_until_connected_again.inc
--connection node_1
+USE test;
SELECT * FROM t1;
# Cleanup
DROP TABLE t1;
-drop user user1;
-drop user user2;
-# Restore original auto_increment_offset values.
--source include/auto_increment_offset_restore.inc
--source include/galera_end.inc
diff --git a/mysql-test/suite/galera/t/galera_var_node_address.test b/mysql-test/suite/galera/t/galera_var_node_address.test
index c2105823326..3353652d8b9 100644
--- a/mysql-test/suite/galera/t/galera_var_node_address.test
+++ b/mysql-test/suite/galera/t/galera_var_node_address.test
@@ -7,6 +7,8 @@
--source include/have_innodb.inc
call mtr.add_suppression("WSREP: Stray state UUID msg: .* current group state WAIT_STATE_UUID .*");
+call mtr.add_suppression("WSREP: Protocol violation. JOIN message sender .* is not in state transfer (.*). Message ignored.");
+
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--connection node_1
diff --git a/mysql-test/suite/galera/t/galera_var_sync_wait.test b/mysql-test/suite/galera/t/galera_var_sync_wait.test
index 288ad62226f..ecb0d92b891 100644
--- a/mysql-test/suite/galera/t/galera_var_sync_wait.test
+++ b/mysql-test/suite/galera/t/galera_var_sync_wait.test
@@ -20,7 +20,10 @@ CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB;
--connection node_2
SET GLOBAL wsrep_sync_wait = 1;
# Those statements should see the table
-SHOW TABLES LIKE '%t1';
+
+# MW-86 SHOW commands have now their own bitmask
+# SHOW TABLES LIKE '%t1';
+
SELECT COUNT(*) = 0 FROM t1;
--connection node_1
diff --git a/mysql-test/suite/galera/t/galera_wsrep_provider_unset_set.test b/mysql-test/suite/galera/t/galera_wsrep_provider_unset_set.test
index fe4c358bd89..7f91495fcc4 100644
--- a/mysql-test/suite/galera/t/galera_wsrep_provider_unset_set.test
+++ b/mysql-test/suite/galera/t/galera_wsrep_provider_unset_set.test
@@ -6,6 +6,11 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
+
--connection node_1
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
@@ -26,6 +31,8 @@ INSERT INTO t1 VALUES (3);
--eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_orig';
--enable_query_log
+SET SESSION wsrep_sync_wait = 0;
+
--source include/wait_until_connected_again.inc
--source include/galera_wait_ready.inc
@@ -39,3 +46,5 @@ SELECT COUNT(*) = 4 FROM t1;
SELECT COUNT(*) = 3 FROM t1;
DROP TABLE t1;
+
+--source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/lp1376747-4.test b/mysql-test/suite/galera/t/lp1376747-4.test
index be56ee5edc1..0c707d6d681 100644
--- a/mysql-test/suite/galera/t/lp1376747-4.test
+++ b/mysql-test/suite/galera/t/lp1376747-4.test
@@ -45,7 +45,7 @@ SHOW CREATE TABLE t1;
--connection node_2a
--reap
UNLOCK TABLES;
---sleep 1
+--sleep 2
SHOW CREATE TABLE t1;
SELECT * from t1;
diff --git a/mysql-test/suite/galera/t/mysql-wsrep#198.test b/mysql-test/suite/galera/t/mysql-wsrep#198.test
index 2b05c4ff4d9..a80d030a8b0 100644
--- a/mysql-test/suite/galera/t/mysql-wsrep#198.test
+++ b/mysql-test/suite/galera/t/mysql-wsrep#198.test
@@ -5,6 +5,9 @@ CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB;
--connection node_2
+# Ensure that the tables have been created on node #2
+SELECT 1 FROM DUAL;
+
LOCK TABLE t2 WRITE;
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
diff --git a/mysql-test/suite/galera/t/mysql-wsrep#201.test b/mysql-test/suite/galera/t/mysql-wsrep#201.test
index e9327540195..21cf05db008 100644
--- a/mysql-test/suite/galera/t/mysql-wsrep#201.test
+++ b/mysql-test/suite/galera/t/mysql-wsrep#201.test
@@ -8,7 +8,6 @@ INSERT INTO t1 VALUES (DEFAULT);
--connection node_2
--let $qcache_size_orig = `SELECT @@GLOBAL.query_cache_size`
SET GLOBAL query_cache_size=1355776;
-SET SESSION wsrep_sync_wait = 7;
--disable_query_log
diff --git a/mysql-test/suite/galera/t/pxc-421.test b/mysql-test/suite/galera/t/pxc-421.test
index 8a360b12f4c..381f9bb4494 100644
--- a/mysql-test/suite/galera/t/pxc-421.test
+++ b/mysql-test/suite/galera/t/pxc-421.test
@@ -31,6 +31,7 @@ INSERT INTO t1 VALUES (3);
--eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_orig';
--enable_query_log
+set SESSION wsrep_sync_wait=0;
--source include/wait_until_connected_again.inc
--source include/galera_wait_ready.inc
@@ -53,8 +54,12 @@ show global variables like 'wsrep_slave_threads';
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_2
SELECT COUNT(*) FROM t1;
+SET GLOBAL auto_increment_offset = 2;
+
--connection node_1
SELECT COUNT(*) FROM t1;
show global variables like 'wsrep_slave_threads';
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_1
DROP TABLE t1;
+
+SET GLOBAL auto_increment_offset = 1;
diff --git a/mysql-test/suite/galera/t/query_cache.opt b/mysql-test/suite/galera/t/query_cache.opt
new file mode 100644
index 00000000000..a00258bc48c
--- /dev/null
+++ b/mysql-test/suite/galera/t/query_cache.opt
@@ -0,0 +1 @@
+--query_cache_type=1