diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-12-09 15:09:41 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2019-12-09 15:09:41 +0100 |
commit | a15234bf4bf98d7833996284c033fc53a981f5d4 (patch) | |
tree | d989b448854f9d59de5ca16b962414591c8a5b2e /mysql-test/suite/galera/t | |
parent | 9a6212008999da44b136605c1abf2cc9c7cc4b2c (diff) | |
parent | e5e5877740f248de848219ee3a1d2881cd5c5b82 (diff) | |
download | mariadb-git-a15234bf4bf98d7833996284c033fc53a981f5d4.tar.gz |
Merge branch '10.3' into 10.4
Diffstat (limited to 'mysql-test/suite/galera/t')
67 files changed, 497 insertions, 119 deletions
diff --git a/mysql-test/suite/galera/t/MW-284.test b/mysql-test/suite/galera/t/MW-284.test index b52db4c68b0..99fe305d859 100644 --- a/mysql-test/suite/galera/t/MW-284.test +++ b/mysql-test/suite/galera/t/MW-284.test @@ -2,10 +2,13 @@ # MW-284 Slave I/O retry on ER_COM_UNKNOWN_ERROR # +--source include/have_log_bin.inc --source include/galera_cluster.inc ---source include/have_innodb.inc --connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 +call mtr.add_suppression("\\[ERROR\\] Error reading packet from server: WSREP has not yet prepared node for application use .*"); +call mtr.add_suppression("WSREP has not yet prepared node for application use"); + --disable_query_log --eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_1, MASTER_USER='root', MASTER_CONNECT_RETRY=1; --enable_query_log @@ -18,11 +21,14 @@ 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; + #wsrep_sync_wait is set to zero because when slave tries to connect it it ask for queries like SELECT UNIX_TIMESTAMP() on node 1 which will fail, causing #a warning in slave error log. SET global wsrep_sync_wait=0; --connection node_3 +SELECT @@wsrep_on; +--sleep 1 START SLAVE; --let $slave_param= Slave_IO_Running --let $slave_param_value= Connecting @@ -50,8 +56,8 @@ INSERT INTO t1 VALUES (1); --connection node_1 DROP TABLE t1; - --eval SET global wsrep_sync_wait=$wsrep_sync_wait_state + --connection node_3 --let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1' --source include/wait_condition.inc @@ -60,13 +66,3 @@ STOP SLAVE; RESET SLAVE ALL; CALL mtr.add_suppression('failed registering on master'); -CALL mtr.add_suppression('You need to use --log-bin to make --binlog-format work'); - ---connection node_1 -set global wsrep_on=OFF; -RESET MASTER; -set global wsrep_on=ON; -CALL mtr.add_suppression('WSREP: Last Applied Action message in non-primary configuration from member'); - ---connection node_2 -CALL mtr.add_suppression('WSREP: Last Applied Action message in non-primary configuration from member');
\ No newline at end of file diff --git a/mysql-test/suite/galera/t/MW-313-master.opt b/mysql-test/suite/galera/t/MW-313-master.opt deleted file mode 100644 index 8a755e98b00..00000000000 --- a/mysql-test/suite/galera/t/MW-313-master.opt +++ /dev/null @@ -1 +0,0 @@ ---log-bin --log-slave-updates diff --git a/mysql-test/suite/galera/t/MW-313.cnf b/mysql-test/suite/galera/t/MW-313.cnf new file mode 100644 index 00000000000..184900c58fd --- /dev/null +++ b/mysql-test/suite/galera/t/MW-313.cnf @@ -0,0 +1,12 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +log-bin +log-slave-updates + +[mysqld.2] +log-bin +log-slave-updates + + + diff --git a/mysql-test/suite/galera/t/MW-328C.test b/mysql-test/suite/galera/t/MW-328C.test deleted file mode 100644 index 1594547d0de..00000000000 --- a/mysql-test/suite/galera/t/MW-328C.test +++ /dev/null @@ -1,36 +0,0 @@ -# -# MW-328 Fix unnecessary/silent BF aborts -# - -# -# Make sure that a high value of wsrep_retry_autocommit -# masks all deadlock errors -# - ---source include/galera_cluster.inc ---source include/big_test.inc ---source suite/galera/t/MW-328-header.inc - ---connection node_2 ---let $count = 100 - -SET SESSION wsrep_retry_autocommit = 10000; - ---disable_query_log - -while ($count) -{ - --error 0 - INSERT IGNORE INTO t2 SELECT f2 FROM t1; - - --disable_result_log - --error 0 - SELECT 1 FROM DUAL; - --enable_result_log - - --dec $count -} - ---enable_query_log - ---source suite/galera/t/MW-328-footer.inc diff --git a/mysql-test/suite/galera/t/MW-329-master.opt b/mysql-test/suite/galera/t/MW-329-master.opt deleted file mode 100644 index 6565a6af3c4..00000000000 --- a/mysql-test/suite/galera/t/MW-329-master.opt +++ /dev/null @@ -1 +0,0 @@ ---wsrep-retry-autocommit=0 diff --git a/mysql-test/suite/galera/t/MW-329.cnf b/mysql-test/suite/galera/t/MW-329.cnf new file mode 100644 index 00000000000..10870a81547 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-329.cnf @@ -0,0 +1,9 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +wsrep-retry-autocommit=0 + +[mysqld.2] + + + diff --git a/mysql-test/suite/galera/t/MW-44-master.opt b/mysql-test/suite/galera/t/MW-44-master.opt index 9b086195e8a..a15aa0a99d9 100644 --- a/mysql-test/suite/galera/t/MW-44-master.opt +++ b/mysql-test/suite/galera/t/MW-44-master.opt @@ -1,2 +1 @@ --log-output=TABLE ---general-log=OFF diff --git a/mysql-test/suite/galera/t/MW-44.test b/mysql-test/suite/galera/t/MW-44.test index 8730631edc6..a2acfc57f6c 100644 --- a/mysql-test/suite/galera/t/MW-44.test +++ b/mysql-test/suite/galera/t/MW-44.test @@ -3,40 +3,30 @@ # --source include/galera_cluster.inc ---source include/have_innodb.inc --connection node_1 TRUNCATE TABLE mysql.general_log; ---sleep 1 --connection node_2 ---let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.general_log; ---source include/wait_condition.inc -TRUNCATE TABLE mysql.general_log; +--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.general_log WHERE argument NOT LIKE '%mysql.general_log%' +--let $wait_condition_on_error_output = SELECT * FROM mysql.general_log +--source include/wait_condition_with_debug.inc ---sleep 1 --connection node_1 ---let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.general_log; ---source include/wait_condition.inc -SELECT Argument FROM mysql.general_log; - -SET GLOBAL general_log='ON'; SET SESSION wsrep_osu_method=TOI; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; SET SESSION wsrep_osu_method=RSU; ALTER TABLE t1 ADD COLUMN f2 INTEGER; SET SESSION wsrep_osu_method=TOI; ---let $wait_condition = SELECT COUNT(argument) = 2 FROM mysql.general_log WHERE argument LIKE 'CREATE%' OR argument LIKE 'ALTER%'; ---source include/wait_condition.inc - -SELECT argument FROM mysql.general_log WHERE argument LIKE 'CREATE%' OR argument LIKE 'ALTER%'; +--let $wait_condition = SELECT COUNT(*) = 2 FROM mysql.general_log WHERE argument LIKE "CREATE%" OR argument LIKE "ALTER%" +--let $wait_condition_on_error_output = SELECT * FROM mysql.general_log +--source include/wait_condition_with_debug.inc --connection node_2 -SELECT Argument FROM mysql.general_log; -DROP TABLE t1; -SET GLOBAL general_log='OFF'; ---connection node_1 -SET GLOBAL general_log='OFF'; +--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.general_log WHERE argument LIKE "CREATE%" OR argument LIKE "ALTER%" +--let $wait_condition_on_error_output = SELECT * FROM mysql.general_log +--source include/wait_condition_with_debug.inc +DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/MW-86-wait1-master.opt b/mysql-test/suite/galera/t/MW-86-wait1-master.opt deleted file mode 100644 index 8a755e98b00..00000000000 --- a/mysql-test/suite/galera/t/MW-86-wait1-master.opt +++ /dev/null @@ -1 +0,0 @@ ---log-bin --log-slave-updates diff --git a/mysql-test/suite/galera/t/MW-86-wait8-master.opt b/mysql-test/suite/galera/t/MW-86-wait8-master.opt deleted file mode 100644 index 8a755e98b00..00000000000 --- a/mysql-test/suite/galera/t/MW-86-wait8-master.opt +++ /dev/null @@ -1 +0,0 @@ ---log-bin --log-slave-updates diff --git a/mysql-test/suite/galera/t/MW-86-wait8.cnf b/mysql-test/suite/galera/t/MW-86-wait8.cnf new file mode 100644 index 00000000000..8f6a760def0 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-86-wait8.cnf @@ -0,0 +1,10 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +log-bin +log-slave-updates + +[mysqld.2] +log-bin +log-slave-updates + diff --git a/mysql-test/suite/galera/t/enforce_storage_engine2.cnf b/mysql-test/suite/galera/t/enforce_storage_engine2.cnf new file mode 100644 index 00000000000..b14fce85b36 --- /dev/null +++ b/mysql-test/suite/galera/t/enforce_storage_engine2.cnf @@ -0,0 +1,13 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +enforce_storage_engine=innodb +sql_mode='' + +[mysqld.2] +enforce_storage_engine=innodb +sql_mode='' + + + + diff --git a/mysql-test/suite/galera/t/enforce_storage_engine2.opt b/mysql-test/suite/galera/t/enforce_storage_engine2.opt deleted file mode 100644 index 03f7dc5e527..00000000000 --- a/mysql-test/suite/galera/t/enforce_storage_engine2.opt +++ /dev/null @@ -1,2 +0,0 @@ ---enforce_storage_engine=innodb --sql_mode='' - diff --git a/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.cnf b/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.cnf new file mode 100644 index 00000000000..4d93a1b2509 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.cnf @@ -0,0 +1,14 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +lock_wait_timeout=5 +innodb_lock_wait_timeout=5 +wait_timeout=5 + +[mysqld.2] +lock_wait_timeout=5 +innodb_lock_wait_timeout=5 +wait_timeout=5 + + + diff --git a/mysql-test/suite/galera/t/galera_as_slave_ctas.cnf b/mysql-test/suite/galera/t/galera_as_slave_ctas.cnf new file mode 100644 index 00000000000..eab2a6de90d --- /dev/null +++ b/mysql-test/suite/galera/t/galera_as_slave_ctas.cnf @@ -0,0 +1,5 @@ +!include ../galera_2nodes_as_slave.cnf + +# make sure master server uses ROW format for replication +[mysqld] +binlog-format=row diff --git a/mysql-test/suite/galera/t/galera_as_slave_ctas.test b/mysql-test/suite/galera/t/galera_as_slave_ctas.test new file mode 100644 index 00000000000..b146b1ce3dc --- /dev/null +++ b/mysql-test/suite/galera/t/galera_as_slave_ctas.test @@ -0,0 +1,74 @@ +# +# Test Galera as a slave to a MySQL master +# +# The galera/galera_2node_slave.cnf describes the setup of the nodes +# also, for this test, master server must have binlog_format=ROW +# + +--source include/have_innodb.inc + +# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc +--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 +--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 + +--connection node_2a +--disable_query_log +--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1; +--enable_query_log +START SLAVE; + + +# make sure master server has binlog_format=ROW +--connection default +SHOW VARIABLES LIKE 'binlog_format'; + +# +# test phase one, issue CTAS with empty source table +# +--connection default +CREATE TABLE source (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; + +CREATE TABLE target AS SELECT * FROM source; + +--connection node_2a +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'target'; +--source include/wait_condition.inc + +--connection node_3 +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'target'; +--source include/wait_condition.inc + +# +# test phase two, issue CTAS with populated source table +# +--connection default +DROP TABLE target; +INSERT INTO source VALUES(1); + +CREATE TABLE target AS SELECT * FROM source; + +--connection node_2a +--let $wait_condition = SELECT COUNT(*) = 1 FROM target; +--source include/wait_condition.inc + +--connection node_3 +--let $wait_condition = SELECT COUNT(*) = 1 FROM target; +--source include/wait_condition.inc + +--connection default +DROP TABLE source; +DROP TABLE target; + +--connection node_3 +--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'target'; +--source include/wait_condition.inc + + +--connection node_2a +STOP SLAVE; +RESET SLAVE ALL; + +--connection default +RESET MASTER; + +--disconnect node_2a diff --git a/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.cnf b/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.cnf new file mode 100644 index 00000000000..01d2eb12630 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.cnf @@ -0,0 +1,6 @@ +!include ../galera_2nodes_as_slave.cnf + +[mysqld] +log-bin=mysqld-bin +log-slave-updates +binlog-format=ROW diff --git a/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.test b/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.test new file mode 100644 index 00000000000..2bbf6dfce12 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.test @@ -0,0 +1,74 @@ +# +# Test Galera as a slave to a MariaDB master using GTIDs +# +# suite/galera/galera_2nodes_as_slave.cnf describes the setup of the nodes +# suite/galera/t/galera_as_slave_gtid.cnf has the GTID options +# +# This test will replicate writes to MyISAM table and check that slave node is able +# to apply them. +# mysql.gtid_slave_pos table should be defined as innodb engine, original problem +# by writes to mysql.gtid_slave_pos, whereas the replicated transaction contained +# no innodb writes +# + +--source include/have_innodb.inc + +# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc +--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 + +--connection node_2a +# make sure gtid_slave_pos is of innodb engine, mtr does not currently provide that +ALTER TABLE mysql.gtid_slave_pos engine = InnoDB; + +--disable_query_log +--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1; +--enable_query_log +START SLAVE; + +--connection default +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=MyISAM; +INSERT INTO t1 VALUES(1); + +SELECT LENGTH(@@global.gtid_binlog_state) > 1; +--let $gtid_binlog_state_node1 = `SELECT @@global.gtid_binlog_state;` + +--connection node_2a +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; +--source include/wait_condition.inc + +--let $wait_condition = SELECT COUNT(*) = 1 FROM t1; +--source include/wait_condition.inc + +--disable_query_log +--eval SELECT '$gtid_binlog_state_node1' = @@global.gtid_binlog_state AS gtid_binlog_state_equal; +--enable_query_log + +--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 +SELECT COUNT(*) = 0 FROM t1; + +--disable_query_log +--eval SELECT '$gtid_binlog_state_node1' = @@global.gtid_binlog_state AS gtid_binlog_state_equal; +--enable_query_log + +--echo #cleanup +--connection default +DROP TABLE t1; +reset master; + +--connection node_2a +--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; +--source include/wait_condition.inc +STOP SLAVE; +RESET SLAVE ALL; +set global wsrep_on=OFF; +reset master; +set global wsrep_on=ON; + +--connection node_3 +--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; +--source include/wait_condition.inc + +set global wsrep_on=OFF; +reset master; +set global wsrep_on=ON; + diff --git a/mysql-test/suite/galera/t/galera_bf_background_statistics.cnf b/mysql-test/suite/galera/t/galera_bf_background_statistics.cnf new file mode 100644 index 00000000000..4101b4073ec --- /dev/null +++ b/mysql-test/suite/galera/t/galera_bf_background_statistics.cnf @@ -0,0 +1,9 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +innodb_stats_persistent=ON + +[mysqld.2] +innodb_stats_persistent=ON + + diff --git a/mysql-test/suite/galera/t/galera_bf_background_statistics.opt b/mysql-test/suite/galera/t/galera_bf_background_statistics.opt deleted file mode 100644 index f9b1414a974..00000000000 --- a/mysql-test/suite/galera/t/galera_bf_background_statistics.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb_stats_persistent=ON diff --git a/mysql-test/suite/galera/t/galera_binlog_checksum-master.opt b/mysql-test/suite/galera/t/galera_binlog_checksum-master.opt deleted file mode 100644 index c8e53f07fc2..00000000000 --- a/mysql-test/suite/galera/t/galera_binlog_checksum-master.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog-checksum=CRC32 --master-verify-checksum=1 --slave-sql-verify-checksum=1 diff --git a/mysql-test/suite/galera/t/galera_binlog_checksum.cnf b/mysql-test/suite/galera/t/galera_binlog_checksum.cnf new file mode 100644 index 00000000000..bd61ee67406 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_binlog_checksum.cnf @@ -0,0 +1,13 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +binlog-checksum=CRC32 +master-verify-checksum=1 +slave-sql-verify-checksum=1 + +[mysqld.2] +binlog-checksum=CRC32 +master-verify-checksum=1 +slave-sql-verify-checksum=1 + + diff --git a/mysql-test/suite/galera/t/galera_binlog_event_max_size_max-master.opt b/mysql-test/suite/galera/t/galera_binlog_event_max_size_max-master.opt deleted file mode 100644 index 576829cfef8..00000000000 --- a/mysql-test/suite/galera/t/galera_binlog_event_max_size_max-master.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog-row-event-max-size=4294967040 diff --git a/mysql-test/suite/galera/t/galera_binlog_event_max_size_max.cnf b/mysql-test/suite/galera/t/galera_binlog_event_max_size_max.cnf new file mode 100644 index 00000000000..9315086a3cc --- /dev/null +++ b/mysql-test/suite/galera/t/galera_binlog_event_max_size_max.cnf @@ -0,0 +1,9 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +binlog-row-event-max-size=4294967040 + +[mysqld.2] + + + diff --git a/mysql-test/suite/galera/t/galera_binlog_event_max_size_min-master.opt b/mysql-test/suite/galera/t/galera_binlog_event_max_size_min-master.opt deleted file mode 100644 index 22174756652..00000000000 --- a/mysql-test/suite/galera/t/galera_binlog_event_max_size_min-master.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog-row-event-max-size=256 diff --git a/mysql-test/suite/galera/t/galera_binlog_event_max_size_min.cnf b/mysql-test/suite/galera/t/galera_binlog_event_max_size_min.cnf new file mode 100644 index 00000000000..798435d8e54 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_binlog_event_max_size_min.cnf @@ -0,0 +1,9 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +binlog-row-event-max-size=256 + +[mysqld.2] + + + diff --git a/mysql-test/suite/galera/t/galera_flush-master.opt b/mysql-test/suite/galera/t/galera_flush-master.opt deleted file mode 100644 index 5a1fb6748d9..00000000000 --- a/mysql-test/suite/galera/t/galera_flush-master.opt +++ /dev/null @@ -1 +0,0 @@ ---query_cache_type=1 --query_cache_size=1000000 diff --git a/mysql-test/suite/galera/t/galera_flush.cnf b/mysql-test/suite/galera/t/galera_flush.cnf new file mode 100644 index 00000000000..e2d869ab364 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_flush.cnf @@ -0,0 +1,10 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +query_cache_type=1 +query_cache_size=1000000 + +[mysqld.2] +query_cache_type=1 +query_cache_size=1000000 + diff --git a/mysql-test/suite/galera/t/galera_flush_local.cnf b/mysql-test/suite/galera/t/galera_flush_local.cnf new file mode 100644 index 00000000000..c92cb58f484 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_flush_local.cnf @@ -0,0 +1,12 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +query_cache_type=1 +query_cache_size=1000000 +wsrep_replicate_myisam=ON + +[mysqld.2] +query_cache_type=1 +query_cache_size=1000000 +wsrep_replicate_myisam=ON + diff --git a/mysql-test/suite/galera/t/galera_flush_local.opt b/mysql-test/suite/galera/t/galera_flush_local.opt deleted file mode 100644 index a084db15c5d..00000000000 --- a/mysql-test/suite/galera/t/galera_flush_local.opt +++ /dev/null @@ -1,3 +0,0 @@ ---query_cache_type=1 ---query_cache_size=1000000 ---wsrep_replicate_myisam=ON diff --git a/mysql-test/suite/galera/t/galera_forced_binlog_format.test b/mysql-test/suite/galera/t/galera_forced_binlog_format.test index e9d7fa1c3a3..786837239ed 100644 --- a/mysql-test/suite/galera/t/galera_forced_binlog_format.test +++ b/mysql-test/suite/galera/t/galera_forced_binlog_format.test @@ -7,17 +7,21 @@ --source include/galera_cluster.inc --connection node_1 -SEt GLOBAL wsrep_on=OFF; +SET GLOBAL wsrep_on=OFF; RESET MASTER; -SEt GLOBAL wsrep_on=ON; +SET GLOBAL wsrep_on=ON; FLUSH BINARY LOGS; +--disable_warnings SET SESSION binlog_format = 'STATEMENT'; +--enable_warnings CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); +--disable_warnings SET SESSION binlog_format = 'MIXED'; +--enable_warnings INSERT INTO t1 VALUES (2); diff --git a/mysql-test/suite/galera/t/galera_gtid.cnf b/mysql-test/suite/galera/t/galera_gtid.cnf new file mode 100644 index 00000000000..8f6a760def0 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_gtid.cnf @@ -0,0 +1,10 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +log-bin +log-slave-updates + +[mysqld.2] +log-bin +log-slave-updates + diff --git a/mysql-test/suite/galera/t/galera_gtid.test b/mysql-test/suite/galera/t/galera_gtid.test index e8369be62e6..560a320255f 100644 --- a/mysql-test/suite/galera/t/galera_gtid.test +++ b/mysql-test/suite/galera/t/galera_gtid.test @@ -11,14 +11,18 @@ CREATE TABLE t1 (f1 INT PRIMARY KEY); INSERT INTO t1 VALUES (1); --connection node_2 -SELECT COUNT(*) = 1 FROM t1; +--let $wait_condition = SELECT COUNT(*) = 1 FROM t1 +--source include/wait_condition.inc UPDATE t1 SET f1 = 2; --let $gtid_binlog_state_node2 = `SELECT @@global.gtid_binlog_state;` --connection node_1 -SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2; +SET SESSION wsrep_sync_wait = 15; +--let $wait_condition = SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2 +--source include/wait_condition.inc +SELECT * from t1; --disable_query_log --eval SELECT '$gtid_binlog_state_node2' = @@global.gtid_binlog_state AS gtid_binlog_state_equal; diff --git a/mysql-test/suite/galera/t/galera_load_data.cnf b/mysql-test/suite/galera/t/galera_load_data.cnf index fd0327e0ecb..14d894fc7d0 100644 --- a/mysql-test/suite/galera/t/galera_load_data.cnf +++ b/mysql-test/suite/galera/t/galera_load_data.cnf @@ -1,6 +1,15 @@ !include ../galera_2nodes.cnf -[mysqld] +[mysqld.1] +secure-file-priv = "" +innodb_file_format ='Barracuda' +innodb_file_per_table = ON +innodb_stats_persistent=ON +innodb_stats_auto_recalc=ON +innodb_stats_persistent_sample_pages=20 +innodb_stats_sample_pages=8 + +[mysqld.2] secure-file-priv = "" innodb_file_format ='Barracuda' innodb_file_per_table = ON diff --git a/mysql-test/suite/galera/t/galera_log_bin-master.opt b/mysql-test/suite/galera/t/galera_log_bin-master.opt deleted file mode 100644 index 8a755e98b00..00000000000 --- a/mysql-test/suite/galera/t/galera_log_bin-master.opt +++ /dev/null @@ -1 +0,0 @@ ---log-bin --log-slave-updates diff --git a/mysql-test/suite/galera/t/galera_log_bin.cnf b/mysql-test/suite/galera/t/galera_log_bin.cnf new file mode 100644 index 00000000000..8f6a760def0 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_log_bin.cnf @@ -0,0 +1,10 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +log-bin +log-slave-updates + +[mysqld.2] +log-bin +log-slave-updates + diff --git a/mysql-test/suite/galera/t/galera_log_bin.test b/mysql-test/suite/galera/t/galera_log_bin.test index 828869a7e0f..cc78367b510 100644 --- a/mysql-test/suite/galera/t/galera_log_bin.test +++ b/mysql-test/suite/galera/t/galera_log_bin.test @@ -1,5 +1,5 @@ --source include/galera_cluster.inc ---source include/have_innodb.inc +--source include/force_restart.inc --connection node_1 set global wsrep_on=OFF; @@ -44,8 +44,3 @@ DROP TABLE t2; --connection node_1 SET GLOBAL wsrep_on=OFF; RESET MASTER; -SET GLOBAL wsrep_on=ON; ---connection node_2 -SET GLOBAL wsrep_on=OFF; -reset master; -SET GLOBAL wsrep_on=ON; diff --git a/mysql-test/suite/galera/t/galera_mdev_13787.cnf b/mysql-test/suite/galera/t/galera_mdev_13787.cnf new file mode 100644 index 00000000000..ada78e1db2a --- /dev/null +++ b/mysql-test/suite/galera/t/galera_mdev_13787.cnf @@ -0,0 +1,9 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +innodb-stats-persistent=1 + +[mysqld.2] +innodb-stats-persistent=1 + + diff --git a/mysql-test/suite/galera/t/galera_mdev_13787.opt b/mysql-test/suite/galera/t/galera_mdev_13787.opt deleted file mode 100644 index 27ec1e3f00e..00000000000 --- a/mysql-test/suite/galera/t/galera_mdev_13787.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb-stats-persistent=1 diff --git a/mysql-test/suite/galera/t/galera_query_cache-master.opt b/mysql-test/suite/galera/t/galera_query_cache-master.opt deleted file mode 100644 index 915a36c0937..00000000000 --- a/mysql-test/suite/galera/t/galera_query_cache-master.opt +++ /dev/null @@ -1 +0,0 @@ ---query_cache_type=1 --query_cache_size=1355776 diff --git a/mysql-test/suite/galera/t/galera_query_cache.cnf b/mysql-test/suite/galera/t/galera_query_cache.cnf new file mode 100644 index 00000000000..80f40b0997e --- /dev/null +++ b/mysql-test/suite/galera/t/galera_query_cache.cnf @@ -0,0 +1,10 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +query_cache_type=1 +query_cache_size=1355776 + +[mysqld.2] +query_cache_type=1 +query_cache_size=1355776 + diff --git a/mysql-test/suite/galera/t/galera_query_cache_sync_wait-master.opt b/mysql-test/suite/galera/t/galera_query_cache_sync_wait-master.opt deleted file mode 100644 index 915a36c0937..00000000000 --- a/mysql-test/suite/galera/t/galera_query_cache_sync_wait-master.opt +++ /dev/null @@ -1 +0,0 @@ ---query_cache_type=1 --query_cache_size=1355776 diff --git a/mysql-test/suite/galera/t/galera_query_cache_sync_wait.cnf b/mysql-test/suite/galera/t/galera_query_cache_sync_wait.cnf new file mode 100644 index 00000000000..80f40b0997e --- /dev/null +++ b/mysql-test/suite/galera/t/galera_query_cache_sync_wait.cnf @@ -0,0 +1,10 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +query_cache_type=1 +query_cache_size=1355776 + +[mysqld.2] +query_cache_type=1 +query_cache_size=1355776 + diff --git a/mysql-test/suite/galera/t/galera_sbr_binlog-master.opt b/mysql-test/suite/galera/t/galera_sbr_binlog-master.opt deleted file mode 100644 index beae84b3862..00000000000 --- a/mysql-test/suite/galera/t/galera_sbr_binlog-master.opt +++ /dev/null @@ -1 +0,0 @@ ---log-bin diff --git a/mysql-test/suite/galera/t/galera_sbr_binlog.cnf b/mysql-test/suite/galera/t/galera_sbr_binlog.cnf new file mode 100644 index 00000000000..9dbd81f758d --- /dev/null +++ b/mysql-test/suite/galera/t/galera_sbr_binlog.cnf @@ -0,0 +1,7 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +log-bin + +[mysqld.2] +log-bin diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.cnf b/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.cnf index be2ca0d1f09..a5c269b74e2 100644 --- a/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.cnf +++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.cnf @@ -4,6 +4,8 @@ wsrep_sst_method=mariabackup wsrep_sst_auth="root:" wsrep_debug=1 +innodb-file-format='Barracuda' +innodb-file-per-table=ON [mysqld.1] wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true' diff --git a/mysql-test/suite/galera/t/galera_udf-master.opt b/mysql-test/suite/galera/t/galera_udf-master.opt deleted file mode 100644 index 14dfe3e20bc..00000000000 --- a/mysql-test/suite/galera/t/galera_udf-master.opt +++ /dev/null @@ -1,2 +0,0 @@ -$UDF_EXAMPLE_LIB_OPT ---query_cache_type=1 diff --git a/mysql-test/suite/galera/t/galera_udf.cnf b/mysql-test/suite/galera/t/galera_udf.cnf new file mode 100644 index 00000000000..69d5acd65f3 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_udf.cnf @@ -0,0 +1,15 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +$UDF_EXAMPLE_LIB_OPT +query_cache_type=1 + +[mysqld.2] +query_cache_type=1 + + + + + + + diff --git a/mysql-test/suite/galera/t/galera_v1_row_events-master.opt b/mysql-test/suite/galera/t/galera_v1_row_events-master.opt deleted file mode 100644 index dc82542128e..00000000000 --- a/mysql-test/suite/galera/t/galera_v1_row_events-master.opt +++ /dev/null @@ -1 +0,0 @@ ---log-bin-use-v1-row-events=1 diff --git a/mysql-test/suite/galera/t/galera_v1_row_events.cnf b/mysql-test/suite/galera/t/galera_v1_row_events.cnf new file mode 100644 index 00000000000..b95e321ad4f --- /dev/null +++ b/mysql-test/suite/galera/t/galera_v1_row_events.cnf @@ -0,0 +1,13 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +log-bin-use-v1-row-events=1 + +[mysqld.2] + + + + + + + diff --git a/mysql-test/suite/galera/t/galera_var_auto_inc_control_on.cnf b/mysql-test/suite/galera/t/galera_var_auto_inc_control_on.cnf new file mode 100644 index 00000000000..523bae68763 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_var_auto_inc_control_on.cnf @@ -0,0 +1,13 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +wsrep-auto-increment-control=ON + +[mysqld.2] +wsrep-auto-increment-control=ON + + + + + + diff --git a/mysql-test/suite/galera/t/galera_var_auto_inc_control_on.opt b/mysql-test/suite/galera/t/galera_var_auto_inc_control_on.opt deleted file mode 100644 index 0a03610888c..00000000000 --- a/mysql-test/suite/galera/t/galera_var_auto_inc_control_on.opt +++ /dev/null @@ -1 +0,0 @@ ---wsrep-auto-increment-control=ON 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 859642a6fdf..85f72e633dc 100644 --- a/mysql-test/suite/galera/t/galera_var_dirty_reads.test +++ b/mysql-test/suite/galera/t/galera_var_dirty_reads.test @@ -3,9 +3,10 @@ # --source include/galera_cluster.inc ---source include/have_innodb.inc --source include/have_perfschema.inc +call mtr.add_suppression("WSREP has not yet prepared node for application use"); + # Save original auto_increment_offset values. --let $node_1=node_1 --let $node_2=node_2 @@ -30,10 +31,10 @@ SHOW STATUS LIKE 'wsrep_ready'; # Must return 'Disconnected' SHOW STATUS LIKE 'wsrep_cluster_status'; ---error ER_UNKNOWN_COM_ERROR +--error ER_UNKNOWN_COM_ERROR,1047 SELECT * FROM t1; ---error ER_UNKNOWN_COM_ERROR +--error ER_UNKNOWN_COM_ERROR,1047 SELECT 1 FROM t1; SET @@session.wsrep_dirty_reads=ON; @@ -45,7 +46,7 @@ SELECT i, variable_name, variable_value FROM t1, information_schema.session_vari SET @@session.wsrep_dirty_reads=OFF; ---error ER_UNKNOWN_COM_ERROR +--error ER_UNKNOWN_COM_ERROR,1047 SELECT i, variable_name, variable_value FROM t1, information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads" AND i = 1; diff --git a/mysql-test/suite/galera/t/galera_var_notify_cmd-master.opt b/mysql-test/suite/galera/t/galera_var_notify_cmd-master.opt deleted file mode 100644 index 70dfc98736b..00000000000 --- a/mysql-test/suite/galera/t/galera_var_notify_cmd-master.opt +++ /dev/null @@ -1 +0,0 @@ ---wsrep_notify_cmd=$MYSQL_TEST_DIR/std_data/wsrep_notify.sh --wsrep-sync-wait=0 diff --git a/mysql-test/suite/galera/t/galera_var_notify_cmd.cnf b/mysql-test/suite/galera/t/galera_var_notify_cmd.cnf new file mode 100644 index 00000000000..69df4f0e7e0 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_var_notify_cmd.cnf @@ -0,0 +1,13 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +wsrep_notify_cmd=$MYSQL_TEST_DIR/std_data/wsrep_notify.sh +wsrep-sync-wait=0 + +[mysqld.2] + + + + + + diff --git a/mysql-test/suite/galera/t/galera_var_notify_cmd.test b/mysql-test/suite/galera/t/galera_var_notify_cmd.test index b261f878ced..2b0852b4870 100644 --- a/mysql-test/suite/galera/t/galera_var_notify_cmd.test +++ b/mysql-test/suite/galera/t/galera_var_notify_cmd.test @@ -3,10 +3,10 @@ # notifications into a table. # ---source include/have_innodb.inc --source include/galera_cluster.inc --connection node_1 -SELECT COUNT(DISTINCT uuid) = 2 FROM mtr_wsrep_notify.membership; -SELECT MAX(size) = 2 FROM mtr_wsrep_notify.status; -SELECT COUNT(DISTINCT idx) = 2 FROM mtr_wsrep_notify.status; +SET SESSION wsrep_sync_wait=15; +SELECT COUNT(DISTINCT uuid) FROM mtr_wsrep_notify.membership; +SELECT MAX(size) FROM mtr_wsrep_notify.status; +SELECT COUNT(DISTINCT idx) FROM mtr_wsrep_notify.status; diff --git a/mysql-test/suite/galera/t/galera_var_reject_queries.test b/mysql-test/suite/galera/t/galera_var_reject_queries.test index 8b80c04e3be..aa31b94d6e0 100644 --- a/mysql-test/suite/galera/t/galera_var_reject_queries.test +++ b/mysql-test/suite/galera/t/galera_var_reject_queries.test @@ -5,6 +5,8 @@ --source include/galera_cluster.inc --source include/have_innodb.inc +call mtr.add_suppression("WSREP has not yet prepared node for application use"); + CREATE TABLE t1 (f1 INTEGER); --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 @@ -15,7 +17,7 @@ SET SESSION wsrep_reject_queries = ALL; SET GLOBAL wsrep_reject_queries = ALL; ---error ER_UNKNOWN_COM_ERROR +--error ER_UNKNOWN_COM_ERROR,1047 SELECT * FROM t1; # @@ -30,7 +32,7 @@ SET GLOBAL wsrep_reject_queries = ALL_KILL; SELECT * FROM t1; --connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1 ---error ER_UNKNOWN_COM_ERROR +--error ER_UNKNOWN_COM_ERROR,1047 SELECT * FROM t1; # Confirm that replication continues diff --git a/mysql-test/suite/galera/t/galera_var_sst_auth.cnf b/mysql-test/suite/galera/t/galera_var_sst_auth.cnf new file mode 100644 index 00000000000..ff29db2306b --- /dev/null +++ b/mysql-test/suite/galera/t/galera_var_sst_auth.cnf @@ -0,0 +1,12 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +wsrep_sst_auth=root: + +[mysqld.2] +wsrep_sst_auth=root: + + + + + diff --git a/mysql-test/suite/galera/t/galera_var_sst_auth.opt b/mysql-test/suite/galera/t/galera_var_sst_auth.opt deleted file mode 100644 index 67babbb1ae7..00000000000 --- a/mysql-test/suite/galera/t/galera_var_sst_auth.opt +++ /dev/null @@ -1 +0,0 @@ ---wsrep_sst_auth=root: diff --git a/mysql-test/suite/galera/t/galera_wsrep_log_conficts-master.opt b/mysql-test/suite/galera/t/galera_wsrep_log_conficts-master.opt deleted file mode 100644 index 930c483bd64..00000000000 --- a/mysql-test/suite/galera/t/galera_wsrep_log_conficts-master.opt +++ /dev/null @@ -1 +0,0 @@ ---wsrep_log_conflicts=ON diff --git a/mysql-test/suite/galera/t/galera_wsrep_log_conficts.cnf b/mysql-test/suite/galera/t/galera_wsrep_log_conficts.cnf new file mode 100644 index 00000000000..440c37bea81 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_wsrep_log_conficts.cnf @@ -0,0 +1,12 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +wsrep_log_conflicts=ON + +[mysqld.2] +wsrep_log_conflicts=ON + + + + + diff --git a/mysql-test/suite/galera/t/galera_wsrep_new_cluster-master.opt b/mysql-test/suite/galera/t/galera_wsrep_new_cluster-master.opt deleted file mode 100644 index c31150c46af..00000000000 --- a/mysql-test/suite/galera/t/galera_wsrep_new_cluster-master.opt +++ /dev/null @@ -1 +0,0 @@ ---wsrep-new-cluster diff --git a/mysql-test/suite/galera/t/galera_wsrep_new_cluster.cnf b/mysql-test/suite/galera/t/galera_wsrep_new_cluster.cnf new file mode 100644 index 00000000000..0acbcfb7843 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_wsrep_new_cluster.cnf @@ -0,0 +1,10 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +wsrep-new-cluster + +[mysqld.2] + + + + diff --git a/mysql-test/suite/galera/t/mysql-wsrep#201-master.opt b/mysql-test/suite/galera/t/mysql-wsrep#201-master.opt deleted file mode 100644 index a00258bc48c..00000000000 --- a/mysql-test/suite/galera/t/mysql-wsrep#201-master.opt +++ /dev/null @@ -1 +0,0 @@ ---query_cache_type=1 diff --git a/mysql-test/suite/galera/t/mysql-wsrep#201.cnf b/mysql-test/suite/galera/t/mysql-wsrep#201.cnf new file mode 100644 index 00000000000..4a82e9fa037 --- /dev/null +++ b/mysql-test/suite/galera/t/mysql-wsrep#201.cnf @@ -0,0 +1,9 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +query_cache_type=1 + +[mysqld.2] +query_cache_type=1 + + diff --git a/mysql-test/suite/galera/t/query_cache.cnf b/mysql-test/suite/galera/t/query_cache.cnf new file mode 100644 index 00000000000..4a82e9fa037 --- /dev/null +++ b/mysql-test/suite/galera/t/query_cache.cnf @@ -0,0 +1,9 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +query_cache_type=1 + +[mysqld.2] +query_cache_type=1 + + diff --git a/mysql-test/suite/galera/t/query_cache.opt b/mysql-test/suite/galera/t/query_cache.opt deleted file mode 100644 index a00258bc48c..00000000000 --- a/mysql-test/suite/galera/t/query_cache.opt +++ /dev/null @@ -1 +0,0 @@ ---query_cache_type=1 |