diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2016-08-25 15:39:39 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2016-08-25 15:39:39 -0400 |
commit | 90266e8a0eb46867c990930fa4d305d2424929ba (patch) | |
tree | 787918cf537c678ab4f7a949520c847fa3fd8442 /mysql-test | |
parent | dfa3046db48d8439cf3eb02ba6623fe2f6e44f91 (diff) | |
parent | b506d9527b4303b91f69fe6b6f21f911e5bfef72 (diff) | |
download | mariadb-git-90266e8a0eb46867c990930fa4d305d2424929ba.tar.gz |
Merge branch '10.0-galera' into bb-10.1-serg
Diffstat (limited to 'mysql-test')
88 files changed, 1456 insertions, 255 deletions
diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index 25f20e01521..4aa15d27661 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -28,3 +28,4 @@ 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
\ No newline at end of file diff --git a/mysql-test/suite/galera/galera_2nodes.cnf b/mysql-test/suite/galera/galera_2nodes.cnf index b8c61bc814d..e5cf769a910 100644 --- a/mysql-test/suite/galera/galera_2nodes.cnf +++ b/mysql-test/suite/galera/galera_2nodes.cnf @@ -16,7 +16,7 @@ wsrep-sync-wait=7 #ist_port=@OPT.port #sst_port=@OPT.port wsrep-cluster-address=gcomm:// -wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;gcache.size=10M' +wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;gcache.size=10M;evs.suspect_timeout=PT10S' wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port' @@ -25,7 +25,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port' #ist_port=@OPT.port #sst_port=@OPT.port wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port' -wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;gcache.size=10M' +wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;gcache.size=10M;evs.suspect_timeout=PT10S' wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port' diff --git a/mysql-test/suite/galera/include/auto_increment_offset_restore.inc b/mysql-test/suite/galera/include/auto_increment_offset_restore.inc new file mode 100644 index 00000000000..6218dfd6f2c --- /dev/null +++ b/mysql-test/suite/galera/include/auto_increment_offset_restore.inc @@ -0,0 +1,35 @@ +# See auto_increment_offset_restore.inc for details. + +if (!$node_1) +{ + --die ERROR IN TEST: $node_1 must be set before sourcing auto_increment_offset_save.inc +} + +if (!$node_2) +{ + --die ERROR IN TEST: $node_2 must be set before sourcing auto_increment_offset_save.inc +} + +if (!$auto_increment_offset_node_1) +{ + --die ERROR IN TEST: $auto_increment_offset_node_1 must be set before sourcing auto_increment_offset_save.inc +} + +if (!$auto_increment_offset_node_2) +{ + --die ERROR IN TEST: $auto_increment_offset_node_2 must be set before sourcing auto_increment_offset_save.inc +} + +# Restore original auto_increment_offset values. +--disable_query_log +--connection $node_1 +--eval SET @@global.auto_increment_offset = $auto_increment_offset_node_1; +--connection $node_2 +--eval SET @@global.auto_increment_offset = $auto_increment_offset_node_2; + +if ($node_3) +{ +--connection $node_3 +--eval SET @@global.auto_increment_offset = $auto_increment_offset_node_3; +} +--enable_query_log diff --git a/mysql-test/suite/galera/include/auto_increment_offset_save.inc b/mysql-test/suite/galera/include/auto_increment_offset_save.inc new file mode 100644 index 00000000000..3c4db3f381c --- /dev/null +++ b/mysql-test/suite/galera/include/auto_increment_offset_save.inc @@ -0,0 +1,37 @@ +# This file can be used to save the @@global.auto_increment_offset value at +# the beginning of any test that intends to restart any of the participating +# nodes. This is required as the node may get auto-assigned a different +# auto_increment_offset value on restart, which could cause MTR's internal +# post-check to fail. auto_increment_offset_restore.inc can be used at the +# end of the test to restore these saved values. + +# Parameters +# ---------- +# $node_1 +# Connection handle for 1st node +# $node_2 +# Connection handle for 2nd node +# $node_3 (optional) +# Connection handle for 3rd node + +if (!$node_1) +{ + --die ERROR IN TEST: $node_1 must be set before sourcing auto_increment_offset_save.inc +} + +if (!$node_2) +{ + --die ERROR IN TEST: $node_2 must be set before sourcing auto_increment_offset_save.inc +} + +--connection $node_1 +let $auto_increment_offset_node_1 = `SELECT @@global.auto_increment_offset`; +--connection $node_2 +let $auto_increment_offset_node_2 = `SELECT @@global.auto_increment_offset`; + +if ($node_3) +{ + --connection $node_3 + let $auto_increment_offset_node_3 = `SELECT @@global.auto_increment_offset`; +} + diff --git a/mysql-test/suite/galera/r/GAL-382.result b/mysql-test/suite/galera/r/GAL-382.result new file mode 100644 index 00000000000..0c7365f3005 --- /dev/null +++ b/mysql-test/suite/galera/r/GAL-382.result @@ -0,0 +1,6 @@ +create table t1 (i int, j int, k int, primary key pk(i)) engine=innodb; +insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); +create table t2 (i int, j int, k int, primary key pk(i, j, k), index idx(i, k, j)) engine=innodb; +replace into t2 (i, j, k) select /*!99997 */ i, k, j from t1; +DROP TABLE t1; +DROP TABLE t2; diff --git a/mysql-test/suite/galera/r/MW-252.result b/mysql-test/suite/galera/r/MW-252.result new file mode 100644 index 00000000000..c422edcb82a --- /dev/null +++ b/mysql-test/suite/galera/r/MW-252.result @@ -0,0 +1,7 @@ +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +FLUSH TABLES WITH READ LOCK; +SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +VARIABLE_VALUE = 2 +1 +UNLOCK TABLES; +DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/MW-258.result b/mysql-test/suite/galera/r/MW-258.result new file mode 100644 index 00000000000..1b4d4ae0de8 --- /dev/null +++ b/mysql-test/suite/galera/r/MW-258.result @@ -0,0 +1,34 @@ +CREATE TABLE t1 (f1 INTEGER); +LOCK TABLE t1 WRITE; +value prior to RSU: +SHOW STATUS LIKE 'wsrep_desync_count'; +Variable_name Value +wsrep_desync_count 0 +SHOW VARIABLES LIKE 'wsrep_desync'; +Variable_name Value +wsrep_desync OFF +SET SESSION wsrep_sync_wait = 0; +SET SESSION wsrep_osu_method = RSU; +ALTER TABLE t1 ADD COLUMN f2 INTEGER;; +SET SESSION wsrep_sync_wait = 0; +SET SESSION wsrep_osu_method = RSU; +ALTER TABLE t1 ADD COLUMN f3 INTEGER;; +value during RSU: +SHOW STATUS LIKE 'wsrep_desync_count'; +Variable_name Value +wsrep_desync_count 2 +SHOW VARIABLES LIKE 'wsrep_desync'; +Variable_name Value +wsrep_desync OFF +UNLOCK TABLES; +value after RSU: +SHOW STATUS LIKE 'wsrep_desync_count'; +Variable_name Value +wsrep_desync_count 0 +SHOW VARIABLES LIKE 'wsrep_desync'; +Variable_name Value +wsrep_desync OFF +SET GLOBAL wsrep_desync=0; +Warnings: +Warning 1231 'wsrep_desync' is already OFF. +DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/MW-259.result b/mysql-test/suite/galera/r/MW-259.result new file mode 100644 index 00000000000..df76e959de5 --- /dev/null +++ b/mysql-test/suite/galera/r/MW-259.result @@ -0,0 +1,12 @@ +CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB; +SET GLOBAL wsrep_desync=0; +Warnings: +Warning 1231 'wsrep_desync' is already OFF. +SET wsrep_OSU_method=RSU; +SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue'; +ALTER TABLE t1 ADD COLUMN f2 INTEGER;; +SET GLOBAL wsrep_desync=1;; +SET DEBUG_SYNC= 'now SIGNAL continue'; +DROP TABLE t1; +SET GLOBAL wsrep_desync=0; +SET DEBUG_SYNC= 'RESET'; diff --git a/mysql-test/suite/galera/r/MW-284.result b/mysql-test/suite/galera/r/MW-284.result index 8b5119663ce..3ff131674ea 100644 --- a/mysql-test/suite/galera/r/MW-284.result +++ b/mysql-test/suite/galera/r/MW-284.result @@ -11,3 +11,4 @@ DROP TABLE t1; 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'); diff --git a/mysql-test/suite/galera/r/MW-285.result b/mysql-test/suite/galera/r/MW-285.result new file mode 100644 index 00000000000..8c5a21fcbee --- /dev/null +++ b/mysql-test/suite/galera/r/MW-285.result @@ -0,0 +1,19 @@ +CREATE TABLE parent1 ( id INT PRIMARY KEY, KEY (id) ) ENGINE=InnoDB; +CREATE TABLE parent2 ( id INT PRIMARY KEY, KEY (id) ) ENGINE=InnoDB; +CREATE TABLE child ( +id INT PRIMARY KEY, +parent1_id INT, +parent2_id INT, +FOREIGN KEY (parent1_id) REFERENCES parent1(id), +FOREIGN KEY (parent1_id) REFERENCES parent2(id) +) ENGINE=InnoDB; +INSERT INTO parent1 VALUES (1); +INSERT INTO parent2 VALUES (1); +INSERT INTO child VALUES (1,1,1); +INSERT INTO child VALUES (2,1,1); +SET foreign_key_checks=OFF; +DROP TABLE parent1; +UPDATE child SET parent1_id=2 WHERE id=1; +DROP TABLE child; +DROP TABLE parent2; +SET foreign_key_checks=ON; diff --git a/mysql-test/suite/galera/r/MW-286.result b/mysql-test/suite/galera/r/MW-286.result new file mode 100644 index 00000000000..adc996c1cbe --- /dev/null +++ b/mysql-test/suite/galera/r/MW-286.result @@ -0,0 +1,13 @@ +CREATE TABLE ten (f1 INTEGER); +INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB; +INSERT INTO t1 (f1) SELECT 000000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; +INSERT INTO t1 (f1) SELECT 100000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;; +SET GLOBAL wsrep_desync = TRUE; +SET wsrep_on = FALSE; +ALTER TABLE t1 ADD PRIMARY KEY (f1); +ERROR 70100: Query execution was interrupted +SET wsrep_on = TRUE; +SET GLOBAL wsrep_desync = FALSE; +DROP TABLE t1; +DROP TABLE ten; diff --git a/mysql-test/suite/galera/r/MW-292.result b/mysql-test/suite/galera/r/MW-292.result new file mode 100644 index 00000000000..f038f880efa --- /dev/null +++ b/mysql-test/suite/galera/r/MW-292.result @@ -0,0 +1,30 @@ +CREATE TABLE rand_table (f1 FLOAT); +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)); +INSERT INTO t1 VALUES (1, 'a'); +INSERT INTO t1 VALUES (2, 'a'); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE t1 SET f2 = 'b' WHERE f1 = 1; +SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE; +f1 f2 +2 a +SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync'; +COMMIT;; +SET SESSION wsrep_sync_wait = 0; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +UPDATE t1 SET f2 = 'c' WHERE f1 = 2; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync'; +SELECT TIMEDIFF(SYSDATE(), NOW()) < 2; +TIMEDIFF(SYSDATE(), NOW()) < 2 +1 +INSERT INTO rand_table VALUES (RAND()),(RAND()),(RAND()),(RAND()),(RAND()); +INSERT INTO rand_table VALUES (RAND()),(RAND()),(RAND()),(RAND()),(RAND()); +SELECT COUNT(DISTINCT f1) = 10 FROM rand_table; +COUNT(DISTINCT f1) = 10 +1 +wsrep_local_replays +1 +DROP TABLE t1; +DROP TABLE rand_table; diff --git a/mysql-test/suite/galera/r/MW-44.result b/mysql-test/suite/galera/r/MW-44.result new file mode 100644 index 00000000000..28a6f1ac8dd --- /dev/null +++ b/mysql-test/suite/galera/r/MW-44.result @@ -0,0 +1,14 @@ +TRUNCATE TABLE mysql.general_log; +TRUNCATE TABLE mysql.general_log; +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; +SELECT COUNT(*) = 2 FROM mysql.general_log WHERE argument LIKE 'CREATE%' OR argument LIKE 'ALTER%'; +COUNT(*) = 2 +1 +SELECT COUNT(*) = 0 FROM mysql.general_log WHERE argument NOT LIKE 'SELECT%'; +COUNT(*) = 0 +1 +DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera#414.result b/mysql-test/suite/galera/r/galera#414.result new file mode 100644 index 00000000000..029961f9463 --- /dev/null +++ b/mysql-test/suite/galera/r/galera#414.result @@ -0,0 +1,5 @@ +SET SESSION wsrep_sync_wait = 0; +SET SESSION wsrep_on = OFF; +SET SESSION wsrep_on = ON; +CALL mtr.add_suppression("Failed to set packet size"); +CALL mtr.add_suppression("Failed to set packet size"); diff --git a/mysql-test/suite/galera/r/galera_as_master.result b/mysql-test/suite/galera/r/galera_as_master.result index d87a744000c..e96d39aea0c 100644 --- a/mysql-test/suite/galera/r/galera_as_master.result +++ b/mysql-test/suite/galera/r/galera_as_master.result @@ -46,3 +46,4 @@ SET SQL_LOG_BIN=OFF; DROP TABLE t2, t3; STOP SLAVE; RESET SLAVE ALL; +CALL mtr.add_suppression('You need to use --log-bin to make --binlog-format work'); diff --git a/mysql-test/suite/galera/r/galera_as_slave_autoinc.result b/mysql-test/suite/galera/r/galera_as_slave_autoinc.result new file mode 100644 index 00000000000..b6314b862c2 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_as_slave_autoinc.result @@ -0,0 +1,82 @@ +START SLAVE; +SET SESSION binlog_format='STATEMENT'; +CREATE TABLE t1 ( +i int(11) NOT NULL AUTO_INCREMENT, +c char(32) DEFAULT 'dummy_text', +PRIMARY KEY (i) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +insert into t1(i) values(null); +select * from t1; +i c +1 dummy_text +insert into t1(i) values(null), (null), (null); +select * from t1; +i c +1 dummy_text +2 dummy_text +3 dummy_text +4 dummy_text +SET SESSION auto_increment_increment=7; +insert into t1(i) values(null), (null), (null); +SET SESSION auto_increment_offset=5; +insert into t1(i) values(null), (null), (null); +select * from t1; +i c +1 dummy_text +2 dummy_text +3 dummy_text +4 dummy_text +8 dummy_text +15 dummy_text +22 dummy_text +33 dummy_text +40 dummy_text +47 dummy_text +show variables like 'binlog_format'; +Variable_name Value +binlog_format STATEMENT +show variables like '%auto_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 +2 dummy_text +3 dummy_text +4 dummy_text +8 dummy_text +15 dummy_text +22 dummy_text +33 dummy_text +40 dummy_text +47 dummy_text +show variables like 'binlog_format'; +Variable_name Value +binlog_format ROW +show variables like 'auto_increment_increment'; +Variable_name Value +auto_increment_increment 2 +select * from t1; +i c +1 dummy_text +2 dummy_text +3 dummy_text +4 dummy_text +8 dummy_text +15 dummy_text +22 dummy_text +33 dummy_text +40 dummy_text +47 dummy_text +show variables like 'binlog_format'; +Variable_name Value +binlog_format ROW +show variables like 'auto_increment_increment'; +Variable_name Value +auto_increment_increment 2 +DROP TABLE t1; +STOP SLAVE; +RESET SLAVE ALL; +RESET MASTER; diff --git a/mysql-test/suite/galera/r/galera_as_slave_nonprim.result b/mysql-test/suite/galera/r/galera_as_slave_nonprim.result index fd20f8db2f9..365ea31f292 100644 --- a/mysql-test/suite/galera/r/galera_as_slave_nonprim.result +++ b/mysql-test/suite/galera/r/galera_as_slave_nonprim.result @@ -12,7 +12,7 @@ STOP SLAVE; RESET SLAVE ALL; CALL mtr.add_suppression("Slave SQL: Error 'Unknown command' on query"); CALL mtr.add_suppression("Slave: Unknown command Error_code: 1047"); -CALL mtr.add_suppression("Send action {\\(nil\\), 328, TORDERED} returned -107 \\(Transport endpoint is not connected\\)"); +CALL mtr.add_suppression("Transport endpoint is not connected"); CALL mtr.add_suppression("Slave SQL: Error in Xid_log_event: Commit could not be completed, 'Deadlock found when trying to get lock; try restarting transaction', Error_code: 1213"); CALL mtr.add_suppression("Slave SQL: Node has dropped from cluster, Error_code: 1047"); RESET MASTER; 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 8c07d87eec3..96ed226c3ab 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,9 +6,10 @@ SET SESSION wsrep_sync_wait = 0; UNLOCK TABLES; COMMIT; SET AUTOCOMMIT=ON; -SELECT * FROM t1; -f1 -2 +SET SESSION wsrep_sync_wait = 7; +SELECT COUNT(*) = 1 FROM t1; +COUNT(*) = 1 +1 wsrep_local_aborts_increment 1 DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_defaults.result b/mysql-test/suite/galera/r/galera_defaults.result index 6879ecf67fc..b6a16f72ec3 100644 --- a/mysql-test/suite/galera/r/galera_defaults.result +++ b/mysql-test/suite/galera/r/galera_defaults.result @@ -32,8 +32,8 @@ WSREP_GTID_DOMAIN_ID 0 WSREP_GTID_MODE OFF WSREP_LOAD_DATA_SPLITTING ON WSREP_LOG_CONFLICTS OFF -WSREP_MAX_WS_ROWS 131072 -WSREP_MAX_WS_SIZE 1073741824 +WSREP_MAX_WS_ROWS 0 +WSREP_MAX_WS_SIZE 2147483647 WSREP_MYSQL_REPLICATION_BUNDLE 0 WSREP_NOTIFY_CMD WSREP_ON ON @@ -50,12 +50,12 @@ WSREP_SST_DONOR WSREP_SST_DONOR_REJECTS_QUERIES OFF WSREP_SST_METHOD rsync WSREP_SYNC_WAIT 7 -<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 = PT5S; 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.size = 10M; 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 = P30S; 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; +<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.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 = P30S; 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_%' AND VARIABLE_NAME != 'wsrep_debug_sync_waiters'; COUNT(*) -57 +58 SELECT VARIABLE_NAME FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME LIKE 'wsrep_%' AND VARIABLE_NAME != 'wsrep_debug_sync_waiters' @@ -76,6 +76,7 @@ WSREP_COMMIT_OOOE WSREP_COMMIT_OOOL WSREP_COMMIT_WINDOW WSREP_CONNECTED +WSREP_DESYNC_COUNT WSREP_EVS_DELAYED WSREP_EVS_EVICT_LIST WSREP_EVS_REPL_LATENCY diff --git a/mysql-test/suite/galera/r/galera_gcs_fc_limit.result b/mysql-test/suite/galera/r/galera_gcs_fc_limit.result index ad60ead4b8a..9463b5f8eef 100644 --- a/mysql-test/suite/galera/r/galera_gcs_fc_limit.result +++ b/mysql-test/suite/galera/r/galera_gcs_fc_limit.result @@ -4,7 +4,7 @@ SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1'; -FLUSH TABLES WITH READ LOCK; +LOCK TABLE t1 WRITE; INSERT INTO t1 VALUES (2); INSERT INTO t1 VALUES (3); INSERT INTO t1 VALUES (4); diff --git a/mysql-test/suite/galera/r/galera_ist_recv_bind.result b/mysql-test/suite/galera/r/galera_ist_recv_bind.result new file mode 100644 index 00000000000..de4e07fbe41 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_ist_recv_bind.result @@ -0,0 +1,13 @@ +SELECT @@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%'; +@@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%' +1 +SELECT @@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%'; +@@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%' +1 +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); +SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0'; +DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_kill_ddl.result b/mysql-test/suite/galera/r/galera_kill_ddl.result index 8dd36497dfb..b83226bbd42 100644 --- a/mysql-test/suite/galera/r/galera_kill_ddl.result +++ b/mysql-test/suite/galera/r/galera_kill_ddl.result @@ -5,7 +5,4 @@ ALTER TABLE t1 ADD COLUMN f2 INTEGER; SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1'; COUNT(*) = 2 1 -SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; -VARIABLE_VALUE = 2 -1 DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_log_output_csv.result b/mysql-test/suite/galera/r/galera_log_output_csv.result index 07a78469578..cdb5ee49f3e 100644 --- a/mysql-test/suite/galera/r/galera_log_output_csv.result +++ b/mysql-test/suite/galera/r/galera_log_output_csv.result @@ -9,9 +9,6 @@ SELECT 1 = 1 FROM t1; SELECT COUNT(*) = 1 FROM mysql.slow_log WHERE sql_text = 'SELECT 1 = 1 FROM t1'; COUNT(*) = 1 1 -SELECT COUNT(*) > 0 FROM mysql.general_log WHERE argument = 'CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB'; -COUNT(*) > 0 -1 SELECT 2 = 2 FROM t1; 2 = 2 1 diff --git a/mysql-test/suite/galera/r/galera_parallel_simple.result b/mysql-test/suite/galera/r/galera_parallel_simple.result index 294a94baed3..6d023c38a57 100644 --- a/mysql-test/suite/galera/r/galera_parallel_simple.result +++ b/mysql-test/suite/galera/r/galera_parallel_simple.result @@ -1,6 +1,7 @@ CREATE TABLE t1 (id INT) ENGINE=InnoDB; CREATE TABLE t2 (id INT) ENGINE=InnoDB; SET GLOBAL wsrep_slave_threads = 2; +LOCK TABLE t1 WRITE; INSERT INTO t1 VALUES (1); INSERT INTO t2 VALUES (1); INSERT INTO t1 VALUES (1); @@ -13,15 +14,15 @@ INSERT INTO t1 VALUES (1); INSERT INTO t2 VALUES (1); INSERT INTO t1 VALUES (1); INSERT INTO t2 VALUES (1); +SET SESSION wsrep_sync_wait = 0; +UNLOCK TABLES; +SET SESSION wsrep_sync_wait = 7; SELECT COUNT(*) = 10 FROM t1; COUNT(*) = 10 0 SELECT COUNT(*) = 10 FROM t2; COUNT(*) = 10 0 -SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'committed%'; -COUNT(*) = 2 -1 SET GLOBAL wsrep_slave_threads = 1;; DROP TABLE t1; DROP TABLE t2; diff --git a/mysql-test/suite/galera/r/galera_repl_max_ws_size.result b/mysql-test/suite/galera/r/galera_repl_max_ws_size.result index 6e245b44462..f7914a1b803 100644 --- a/mysql-test/suite/galera/r/galera_repl_max_ws_size.result +++ b/mysql-test/suite/galera/r/galera_repl_max_ws_size.result @@ -6,3 +6,7 @@ SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 DROP TABLE t1; +CALL mtr.add_suppression("Maximum writeset size exceeded by"); +CALL mtr.add_suppression("transaction size limit"); +CALL mtr.add_suppression("transaction size exceeded"); +CALL mtr.add_suppression("rbr write fail"); diff --git a/mysql-test/suite/galera/r/galera_roles.result b/mysql-test/suite/galera/r/galera_roles.result index c0cdbc0e338..d8c13758797 100644 --- a/mysql-test/suite/galera/r/galera_roles.result +++ b/mysql-test/suite/galera/r/galera_roles.result @@ -69,8 +69,8 @@ SET ROLE role1; FLUSH TABLES; SELECT * FROM mysql.roles_mapping; Host User Role Admin_option - role1 Y localhost foo role1 N +localhost root role1 Y SHOW TABLES FROM test1; Tables_in_test1 t1 @@ -153,4 +153,43 @@ role1 # Connect with node_1 DROP USER foo@localhost; DROP DATABASE test1; +# +# MDEV-10566: Create role statement replicated inconsistently in Galera Cluster +# + +# On node_1 +CREATE USER foo@localhost; +CREATE ROLE role1; +CREATE ROLE role2 WITH ADMIN CURRENT_USER; +CREATE ROLE role3 WITH ADMIN foo@localhost; +CREATE ROLE role4 WITH ADMIN role1; +SELECT * FROM mysql.roles_mapping; +Host User Role Admin_option + role1 role4 Y +localhost foo role3 Y +localhost root role1 Y +localhost root role2 Y +SELECT * FROM INFORMATION_SCHEMA.APPLICABLE_ROLES; +GRANTEE ROLE_NAME IS_GRANTABLE +role1 role4 YES +root@localhost role1 YES +root@localhost role2 YES + +# On node_2 +SELECT * FROM mysql.roles_mapping; +Host User Role Admin_option + role1 role4 Y +localhost foo role3 Y +localhost root role1 Y +localhost root role2 Y +SELECT * FROM INFORMATION_SCHEMA.APPLICABLE_ROLES; +GRANTEE ROLE_NAME IS_GRANTABLE +role1 role4 YES +root@localhost role1 YES +root@localhost role2 YES +DROP ROLE role1; +DROP ROLE role2; +DROP ROLE role3; +DROP ROLE role4; +DROP USER foo@localhost; # End of test diff --git a/mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result b/mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result index 62e327ffdee..08980389392 100644 --- a/mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result +++ b/mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result @@ -22,12 +22,11 @@ SET GLOBAL wsrep_desync=0; Warnings: Warning 1231 'wsrep_desync' is already OFF. SET wsrep_OSU_method=RSU; -SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue'; +SET DEBUG_SYNC = 'alter_table_before_create_table_no_lock WAIT_FOR continue'; ALTER TABLE t1 ADD COLUMN f2 INTEGER;; -SET GLOBAL wsrep_desync=1; -ERROR HY000: Operation 'desync' failed for SET GLOBAL wsrep_desync=1 -SET GLOBAL wsrep_desync=0; +SET GLOBAL wsrep_desync=1;; SET DEBUG_SYNC= 'now SIGNAL continue'; +SET GLOBAL wsrep_desync=0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/galera/r/galera_ssl_upgrade.result b/mysql-test/suite/galera/r/galera_ssl_upgrade.result index c0f2e84dc6f..b24671d120d 100644 --- a/mysql-test/suite/galera/r/galera_ssl_upgrade.result +++ b/mysql-test/suite/galera/r/galera_ssl_upgrade.result @@ -4,21 +4,12 @@ VARIABLE_VALUE = 'Synced' SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 2 1 -SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; -VARIABLE_VALUE = 'Synced' -1 SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 2 1 -SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; -VARIABLE_VALUE = 'Synced' -1 SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 2 1 -SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; -VARIABLE_VALUE = 'Synced' -1 SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 2 1 diff --git a/mysql-test/suite/galera/r/galera_transaction_replay.result b/mysql-test/suite/galera/r/galera_transaction_replay.result index bfafa506fe6..eec9ba03ef5 100644 --- a/mysql-test/suite/galera/r/galera_transaction_replay.result +++ b/mysql-test/suite/galera/r/galera_transaction_replay.result @@ -30,3 +30,30 @@ SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c'; COUNT(*) = 1 1 DROP TABLE t1; +CREATE TABLE t1 (i int primary key, j int) ENGINE=INNODB; +INSERT INTO t1 VALUES (1, 0), (3, 0); +SELECT * FROM t1; +i j +1 0 +3 0 +PREPARE stmt1 FROM "UPDATE t1 SET j = 1 where i > 0"; +SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync'; +EXECUTE stmt1;; +SET SESSION wsrep_sync_wait = 0; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +INSERT INTO t1 VALUES(2,2); +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync'; +SELECT * FROM t1; +i j +1 1 +2 2 +3 1 +SELECT * FROM t1; +i j +1 1 +2 2 +3 1 +DEALLOCATE PREPARE stmt1; +DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_var_desync_on.result b/mysql-test/suite/galera/r/galera_var_desync_on.result index 0b5f34688b7..f286ae72308 100644 --- a/mysql-test/suite/galera/r/galera_var_desync_on.result +++ b/mysql-test/suite/galera/r/galera_var_desync_on.result @@ -26,4 +26,6 @@ INSERT INTO t1 VALUES (11); SELECT COUNT(*) = 11 FROM t1; COUNT(*) = 11 1 +CALL mtr.add_suppression("Protocol violation"); DROP TABLE t1; +CALL mtr.add_suppression("Protocol violation"); diff --git a/mysql-test/suite/galera/r/galera_var_max_ws_rows.result b/mysql-test/suite/galera/r/galera_var_max_ws_rows.result new file mode 100644 index 00000000000..6e239c70a3e --- /dev/null +++ b/mysql-test/suite/galera/r/galera_var_max_ws_rows.result @@ -0,0 +1,115 @@ +CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB; +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; +SET GLOBAL wsrep_max_ws_rows = 4; +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +INSERT INTO t1 (f2) VALUES (2); +INSERT INTO t1 (f2) VALUES (3); +INSERT INTO t1 (f2) VALUES (4); +INSERT INTO t1 (f2) VALUES (5); +ERROR HY000: wsrep_max_ws_rows exceeded +COMMIT; +SELECT COUNT(*) = 0 FROM t1; +COUNT(*) = 0 +1 +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +INSERT INTO t1 (f2) VALUES (2); +INSERT INTO t1 (f2) VALUES (3); +INSERT INTO t1 (f2) VALUES (4); +UPDATE t1 SET f2 = 10 WHERE f2 = 4; +ERROR HY000: wsrep_max_ws_rows exceeded +COMMIT; +SELECT COUNT(*) = 0 FROM t1; +COUNT(*) = 0 +1 +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +INSERT INTO t1 (f2) VALUES (2); +INSERT INTO t1 (f2) VALUES (3); +INSERT INTO t1 (f2) VALUES (4); +DELETE FROM t1 WHERE f2 = 1; +ERROR HY000: wsrep_max_ws_rows exceeded +COMMIT; +SELECT COUNT(*) = 0 FROM t1; +COUNT(*) = 0 +1 +SET GLOBAL wsrep_max_ws_rows = 5; +INSERT INTO t1 (f2) VALUES (1),(2),(3),(4),(5); +SET GLOBAL wsrep_max_ws_rows = 4; +UPDATE t1 SET f2 = f2 + 10; +ERROR HY000: wsrep_max_ws_rows exceeded +SELECT COUNT(*) = 5 FROM t1; +COUNT(*) = 5 +1 +DELETE FROM t1 WHERE f2 < 10; +ERROR HY000: wsrep_max_ws_rows exceeded +SELECT COUNT(*) = 5 FROM t1; +COUNT(*) = 5 +1 +INSERT INTO t1 (f2) SELECT * FROM ten; +ERROR HY000: wsrep_max_ws_rows exceeded +SELECT COUNT(*) = 5 FROM t1; +COUNT(*) = 5 +1 +INSERT INTO t1 (f2) VALUES (10),(20),(30),(40),(50); +ERROR HY000: wsrep_max_ws_rows exceeded +SELECT COUNT(*) = 5 FROM t1; +COUNT(*) = 5 +1 +SET GLOBAL wsrep_max_ws_rows = 10; +DELETE FROM t1 WHERE f2 < 10; +SELECT COUNT(*) = 0 FROM t1; +COUNT(*) = 0 +1 +SET GLOBAL wsrep_max_ws_rows = 100; +SELECT COUNT(*) = 100 FROM t1; +COUNT(*) = 100 +1 +DELETE FROM t1 WHERE f2 < 101; +SELECT COUNT(*) = 0 FROM t1; +COUNT(*) = 0 +1 +SET GLOBAL wsrep_max_ws_rows = 9999; +INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4; +ERROR HY000: wsrep_max_ws_rows exceeded +SET GLOBAL wsrep_max_ws_rows = 10000; +INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4; +SET GLOBAL wsrep_max_ws_rows = 9999; +UPDATE t1 SET f2 = 2 WHERE f2 = 1; +ERROR HY000: wsrep_max_ws_rows exceeded +SET GLOBAL wsrep_max_ws_rows = 10000; +UPDATE t1 SET f2 = 2 WHERE f2 = 1; +SET GLOBAL wsrep_max_ws_rows = 9999; +DELETE FROM t1 WHERE f2 = 2; +ERROR HY000: wsrep_max_ws_rows exceeded +SET GLOBAL wsrep_max_ws_rows = 10000; +DELETE FROM t1 WHERE f2 = 2; +SELECT COUNT(*) = 0 FROM t1; +COUNT(*) = 0 +1 +SET AUTOCOMMIT = ON; +SET GLOBAL wsrep_max_ws_rows = 1; +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +INSERT INTO t1 (f2) VALUES (2); +ERROR HY000: wsrep_max_ws_rows exceeded +INSERT INTO t1 (f2) VALUES (1); +INSERT INTO t1 (f2) VALUES (2); +SET AUTOCOMMIT = OFF; +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +INSERT INTO t1 (f2) VALUES (2); +ERROR HY000: wsrep_max_ws_rows exceeded +INSERT INTO t1 (f2) VALUES (1); +INSERT INTO t1 (f2) VALUES (2); +ERROR HY000: wsrep_max_ws_rows exceeded +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +INSERT INTO t1 (f2) VALUES (2); +ERROR HY000: wsrep_max_ws_rows exceeded +DROP TABLE t1; +DROP TABLE ten; diff --git a/mysql-test/suite/galera/r/galera_var_max_ws_size.result b/mysql-test/suite/galera/r/galera_var_max_ws_size.result index d0bf7deafa5..fe92fd888e5 100644 --- a/mysql-test/suite/galera/r/galera_var_max_ws_size.result +++ b/mysql-test/suite/galera/r/galera_var_max_ws_size.result @@ -5,4 +5,13 @@ ERROR HY000: Got error 90 "Message too long" during COMMIT SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 +SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=10000'; +SELECT @@wsrep_max_ws_size = 10000; +@@wsrep_max_ws_size = 10000 +1 +SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=20000'; +SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=10000'; +SET GLOBAL wsrep_max_ws_size = 20000; +provider_options_match +1 DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/GAL-382.test b/mysql-test/suite/galera/t/GAL-382.test new file mode 100644 index 00000000000..05cc7346055 --- /dev/null +++ b/mysql-test/suite/galera/t/GAL-382.test @@ -0,0 +1,16 @@ +# +# GAL-382 InnoDB: Failing assertion: xid_seqno > trx_sys_cur_xid_seqno in trx0sys.cc line 356 +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc + +--connection node_1 + +create table t1 (i int, j int, k int, primary key pk(i)) engine=innodb; +insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); +create table t2 (i int, j int, k int, primary key pk(i, j, k), index idx(i, k, j)) engine=innodb; +replace into t2 (i, j, k) select /*!99997 */ i, k, j from t1; + +DROP TABLE t1; +DROP TABLE t2; diff --git a/mysql-test/suite/galera/t/MW-252.test b/mysql-test/suite/galera/t/MW-252.test new file mode 100644 index 00000000000..dfb82e8070a --- /dev/null +++ b/mysql-test/suite/galera/t/MW-252.test @@ -0,0 +1,42 @@ +# +# MW-252 - Check that FTWRL causes the node to become desynced +# and not subject to flow control +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc + +--connection node_1 +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; + +FLUSH TABLES WITH READ LOCK; + +# Node #1 is now desynced +--let $wait_condition = SELECT VARIABLE_VALUE = 'Donor/Desynced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment' +--source include/wait_condition.inc + +SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; + +# Node #2 can issue updates without flow control kicking in +--connection node_2 + +--let $count = 100 +--disable_query_log +while ($count) +{ + INSERT INTO t1 VALUES (1); + --dec $count +} +--enable_query_log + +# Restore cluster +--connection node_1 +UNLOCK TABLES; + +--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment' +--source include/wait_condition.inc + +--let $wait_condition = SELECT COUNT(*) = 100 FROM t1 +--source include/wait_condition.inc + +DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/MW-258.test b/mysql-test/suite/galera/t/MW-258.test new file mode 100644 index 00000000000..f5519f8a081 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-258.test @@ -0,0 +1,41 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc + +--connection node_1 +CREATE TABLE t1 (f1 INTEGER); +LOCK TABLE t1 WRITE; +--echo value prior to RSU: +SHOW STATUS LIKE 'wsrep_desync_count'; +SHOW VARIABLES LIKE 'wsrep_desync'; + +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--connection node_1a +SET SESSION wsrep_sync_wait = 0; +SET SESSION wsrep_osu_method = RSU; +--send ALTER TABLE t1 ADD COLUMN f2 INTEGER; + +--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--connection node_1b +SET SESSION wsrep_sync_wait = 0; +SET SESSION wsrep_osu_method = RSU; +--send ALTER TABLE t1 ADD COLUMN f3 INTEGER; + +--sleep 5 +--connection node_1 +--echo value during RSU: +SHOW STATUS LIKE 'wsrep_desync_count'; +SHOW VARIABLES LIKE 'wsrep_desync'; +UNLOCK TABLES; + +--connection node_1a +--reap +--connection node_1b +--reap + +--connection node_1 +--echo value after RSU: +SHOW STATUS LIKE 'wsrep_desync_count'; +SHOW VARIABLES LIKE 'wsrep_desync'; +SET GLOBAL wsrep_desync=0; + +DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/MW-259.test b/mysql-test/suite/galera/t/MW-259.test new file mode 100644 index 00000000000..ff9a30deed3 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-259.test @@ -0,0 +1,42 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_debug_sync.inc + +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1 + +--connection node_1 +CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB; + +SET GLOBAL wsrep_desync=0; +SET wsrep_OSU_method=RSU; + +SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue'; +--send ALTER TABLE t1 ADD COLUMN f2 INTEGER; + +--connection node_1a + +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'debug sync point: alter_table_before_open_tables' +--source include/wait_condition.inc + +# wsrep_desync=1 will block +--send SET GLOBAL wsrep_desync=1; + +--connection node_1b +--sleep 2 +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'exit open_tables()' and INFO = 'SET GLOBAL wsrep_desync=1' +--source include/wait_condition.inc + +SET DEBUG_SYNC= 'now SIGNAL continue'; +DROP TABLE t1; +SET GLOBAL wsrep_desync=0; + +--connection node_1 +--reap + +--connection node_1a +--reap + +# Cleanup +SET DEBUG_SYNC= 'RESET'; + diff --git a/mysql-test/suite/galera/t/MW-284.test b/mysql-test/suite/galera/t/MW-284.test index 5998e22ed1e..f3ce1b0dc91 100644 --- a/mysql-test/suite/galera/t/MW-284.test +++ b/mysql-test/suite/galera/t/MW-284.test @@ -55,3 +55,4 @@ 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'); diff --git a/mysql-test/suite/galera/t/MW-285.test b/mysql-test/suite/galera/t/MW-285.test new file mode 100644 index 00000000000..1c567f7b250 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-285.test @@ -0,0 +1,31 @@ +# +# Broken FK constraints cause assertions +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc + +CREATE TABLE parent1 ( id INT PRIMARY KEY, KEY (id) ) ENGINE=InnoDB; +CREATE TABLE parent2 ( id INT PRIMARY KEY, KEY (id) ) ENGINE=InnoDB; + +CREATE TABLE child ( + id INT PRIMARY KEY, + parent1_id INT, + parent2_id INT, + FOREIGN KEY (parent1_id) REFERENCES parent1(id), + FOREIGN KEY (parent1_id) REFERENCES parent2(id) +) ENGINE=InnoDB; + +INSERT INTO parent1 VALUES (1); +INSERT INTO parent2 VALUES (1); +INSERT INTO child VALUES (1,1,1); +INSERT INTO child VALUES (2,1,1); + +SET foreign_key_checks=OFF; +DROP TABLE parent1; + +UPDATE child SET parent1_id=2 WHERE id=1; + +DROP TABLE child; +DROP TABLE parent2; +SET foreign_key_checks=ON; diff --git a/mysql-test/suite/galera/t/MW-286.test b/mysql-test/suite/galera/t/MW-286.test new file mode 100644 index 00000000000..1b2e322f078 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-286.test @@ -0,0 +1,32 @@ +# +# MW-286 Spurious deadlock error after error with wsrep_desync and wsrep_on +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/big_test.inc + +--connection node_1 +CREATE TABLE ten (f1 INTEGER); +INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); + +CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB; + +# Insert some values before the ALTER +INSERT INTO t1 (f1) SELECT 000000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; + +# Insert more values while the ALTER is running +--send INSERT INTO t1 (f1) SELECT 100000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; + +--connection node_2 +SET GLOBAL wsrep_desync = TRUE; +SET wsrep_on = FALSE; + +--error ER_QUERY_INTERRUPTED +ALTER TABLE t1 ADD PRIMARY KEY (f1); + +SET wsrep_on = TRUE; +SET GLOBAL wsrep_desync = FALSE; + +DROP TABLE t1; +DROP TABLE ten; diff --git a/mysql-test/suite/galera/t/MW-292.test b/mysql-test/suite/galera/t/MW-292.test new file mode 100644 index 00000000000..ecb1273759e --- /dev/null +++ b/mysql-test/suite/galera/t/MW-292.test @@ -0,0 +1,79 @@ +# +# MW-292 Reset timestamp after transaction replay +# +# We force transaction replay to happen and then we check that NOW() is not stuck in time. +# As a bonus we also check that RAND() continues to return random values after replay +# +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_debug_sync.inc +--source suite/galera/include/galera_have_debug_sync.inc + +--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'` + +CREATE TABLE rand_table (f1 FLOAT); +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)); +INSERT INTO t1 VALUES (1, 'a'); +INSERT INTO t1 VALUES (2, 'a'); + +--connection node_1 +SET AUTOCOMMIT=ON; +START TRANSACTION; + +UPDATE t1 SET f2 = 'b' WHERE f1 = 1; +SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE; + +# Block the commit +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--let $galera_sync_point = commit_monitor_enter_sync +--source include/galera_set_sync_point.inc + +--connection node_1 +--send COMMIT; + +# Wait until commit is blocked +--connection node_1a +SET SESSION wsrep_sync_wait = 0; +--source include/galera_wait_sync_point.inc + +# Issue a conflicting update on node #2 +--connection node_2 +UPDATE t1 SET f2 = 'c' WHERE f1 = 2; + +# Wait for both transactions to be blocked +--connection node_1a +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Update_rows_log_event::find_row%'; +--source include/wait_condition.inc + +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'init' AND INFO = 'COMMIT'; +--source include/wait_condition.inc + +# Unblock the commit +--connection node_1a +--source include/galera_clear_sync_point.inc +--source include/galera_signal_sync_point.inc + +# Commit succeeds via replay +--connection node_1 +--reap + +# Confirm that NOW() is not stuck in time relative to SYSDATE(); +--sleep 3 +SELECT TIMEDIFF(SYSDATE(), NOW()) < 2; + +INSERT INTO rand_table VALUES (RAND()),(RAND()),(RAND()),(RAND()),(RAND()); +INSERT INTO rand_table VALUES (RAND()),(RAND()),(RAND()),(RAND()),(RAND()); + +SELECT COUNT(DISTINCT f1) = 10 FROM rand_table; + +# wsrep_local_replays has increased by 1 +--let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'` +--disable_query_log +--eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old = 1 AS wsrep_local_replays; +--enable_query_log + +--connection node_2 +DROP TABLE t1; +DROP TABLE rand_table; diff --git a/mysql-test/suite/galera/t/MW-44-master.opt b/mysql-test/suite/galera/t/MW-44-master.opt new file mode 100644 index 00000000000..a15aa0a99d9 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-44-master.opt @@ -0,0 +1 @@ +--log-output=TABLE diff --git a/mysql-test/suite/galera/t/MW-44.test b/mysql-test/suite/galera/t/MW-44.test new file mode 100644 index 00000000000..55a3fd57f80 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-44.test @@ -0,0 +1,25 @@ +# +# MW-44: DDL is logged in the general_log on the slave +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc + +--connection node_1 +TRUNCATE TABLE mysql.general_log; + +--connection node_2 +TRUNCATE TABLE mysql.general_log; + +--connection node_1 +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; + +SELECT COUNT(*) = 2 FROM mysql.general_log WHERE argument LIKE 'CREATE%' OR argument LIKE 'ALTER%'; + +--connection node_2 +SELECT COUNT(*) = 0 FROM mysql.general_log WHERE argument NOT LIKE 'SELECT%'; +DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/galera#414.cnf b/mysql-test/suite/galera/t/galera#414.cnf new file mode 100644 index 00000000000..fbd1c58754f --- /dev/null +++ b/mysql-test/suite/galera/t/galera#414.cnf @@ -0,0 +1,8 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcs.max_packet_size=2' + +[mysqld.2] +wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcs.max_packet_size=2' + diff --git a/mysql-test/suite/galera/t/galera#414.test b/mysql-test/suite/galera/t/galera#414.test new file mode 100644 index 00000000000..b426e6510b6 --- /dev/null +++ b/mysql-test/suite/galera/t/galera#414.test @@ -0,0 +1,32 @@ +# +# codership/galera#414 Shutdown crashes node if the node started with `gcs.max_packet_size=2` +# + +--source include/big_test.inc +--source include/galera_cluster.inc + +# We perform the shutdown/restart sequence in here. If there was a crash during shutdown, MTR will detect it + +--connection node_2 +--source include/shutdown_mysqld.inc + +--connection node_1 +SET SESSION wsrep_sync_wait = 0; +SET SESSION wsrep_on = OFF; +--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 +--source include/start_mysqld.inc + +--connection node_1 +SET SESSION wsrep_on = ON; +--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_1 +CALL mtr.add_suppression("Failed to set packet size"); + +--connection node_2 +CALL mtr.add_suppression("Failed to set packet size"); + diff --git a/mysql-test/suite/galera/t/galera_as_master.test b/mysql-test/suite/galera/t/galera_as_master.test index c5d4db9f192..93f9224b258 100644 --- a/mysql-test/suite/galera/t/galera_as_master.test +++ b/mysql-test/suite/galera/t/galera_as_master.test @@ -60,3 +60,6 @@ DROP TABLE t2, t3; STOP SLAVE; RESET SLAVE ALL; + +CALL mtr.add_suppression('You need to use --log-bin to make --binlog-format work'); + diff --git a/mysql-test/suite/galera/t/galera_as_slave_autoinc.cnf b/mysql-test/suite/galera/t/galera_as_slave_autoinc.cnf new file mode 100644 index 00000000000..9449ec9cf40 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_as_slave_autoinc.cnf @@ -0,0 +1 @@ +!include ../galera_2nodes_as_slave.cnf diff --git a/mysql-test/suite/galera/t/galera_as_slave_autoinc.test b/mysql-test/suite/galera/t/galera_as_slave_autoinc.test new file mode 100644 index 00000000000..9292badc480 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_as_slave_autoinc.test @@ -0,0 +1,83 @@ +# +# Test Galera as a slave to a MySQL master +# +# The galera/galera_2node_slave.cnf describes the setup of the nodes +# + +--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 +--source include/galera_cluster.inc + +--connection node_2 +--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 node_1 + +## +## Verify the correct operation of the auto-increment when +## the binlog format set to the 'STATEMENT' on the master node: +## + +SET SESSION binlog_format='STATEMENT'; + +CREATE TABLE t1 ( + i int(11) NOT NULL AUTO_INCREMENT, + c char(32) DEFAULT 'dummy_text', + PRIMARY KEY (i) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +insert into t1(i) values(null); + +select * from t1; + +insert into t1(i) values(null), (null), (null); + +select * from t1; + +SET SESSION auto_increment_increment=7; +insert into t1(i) values(null), (null), (null); + +SET SESSION auto_increment_offset=5; +insert into t1(i) values(null), (null), (null); + +select * from t1; + +show variables like 'binlog_format'; +show variables like '%auto_increment%'; + +--connection node_2 +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; +--source include/wait_condition.inc + +--let $wait_condition = SELECT COUNT(*) = 10 FROM t1; +--source include/wait_condition.inc + +select * from t1; + +show variables like 'binlog_format'; +show variables like 'auto_increment_increment'; + +--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 + +select * from t1; + +show variables like 'binlog_format'; +show variables like 'auto_increment_increment'; + +--connection node_1 +DROP TABLE t1; + +--connection node_2 +--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; +--source include/wait_condition.inc + +STOP SLAVE; +RESET SLAVE ALL; + +--connection node_1 +RESET MASTER; diff --git a/mysql-test/suite/galera/t/galera_as_slave_nonprim.test b/mysql-test/suite/galera/t/galera_as_slave_nonprim.test index 5914e52d851..46a93458271 100644 --- a/mysql-test/suite/galera/t/galera_as_slave_nonprim.test +++ b/mysql-test/suite/galera/t/galera_as_slave_nonprim.test @@ -87,7 +87,7 @@ RESET SLAVE ALL; CALL mtr.add_suppression("Slave SQL: Error 'Unknown command' on query"); CALL mtr.add_suppression("Slave: Unknown command Error_code: 1047"); -CALL mtr.add_suppression("Send action {\\(nil\\), 328, TORDERED} returned -107 \\(Transport endpoint is not connected\\)"); +CALL mtr.add_suppression("Transport endpoint is not connected"); CALL mtr.add_suppression("Slave SQL: Error in Xid_log_event: Commit could not be completed, 'Deadlock found when trying to get lock; try restarting transaction', Error_code: 1213"); CALL mtr.add_suppression("Slave SQL: Node has dropped from cluster, Error_code: 1047"); 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 dbbe3b3c483..e32089ce21e 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,9 +27,8 @@ UNLOCK TABLES; COMMIT; SET AUTOCOMMIT=ON; ---let $wait_condition = SELECT COUNT(*) = 1 FROM t1 ---source include/wait_condition.inc -SELECT * FROM t1; +SET SESSION wsrep_sync_wait = 7; +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_defaults.test b/mysql-test/suite/galera/t/galera_defaults.test index 1cbb19cc405..3b1cb7b8650 100644 --- a/mysql-test/suite/galera/t/galera_defaults.test +++ b/mysql-test/suite/galera/t/galera_defaults.test @@ -13,7 +13,7 @@ # Make sure that the test is operating on the right version of galera library. --disable_query_log ---let $galera_version=3.9 +--let $galera_version=25.3.17 source ../wsrep/include/check_galera_version.inc; --enable_query_log 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 fd77ec0a0eb..721d84ecb05 100644 --- a/mysql-test/suite/galera/t/galera_gcs_fc_limit.test +++ b/mysql-test/suite/galera/t/galera_gcs_fc_limit.test @@ -16,7 +16,7 @@ SELECT COUNT(*) = 1 FROM t1; SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1'; # Block the slave applier thread -FLUSH TABLES WITH READ LOCK; +LOCK TABLE t1 WRITE; --connection node_1 diff --git a/mysql-test/suite/galera/t/galera_ist_recv_bind.cnf b/mysql-test/suite/galera/t/galera_ist_recv_bind.cnf new file mode 100644 index 00000000000..2628f05eaef --- /dev/null +++ b/mysql-test/suite/galera/t/galera_ist_recv_bind.cnf @@ -0,0 +1,8 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +wsrep_provider_options='base_port=@mysqld.1.#galera_port;ist.recv_bind=127.0.0.1;pc.ignore_sb=true' + +[mysqld.2] +wsrep_provider_options='base_port=@mysqld.2.#galera_port;ist.recv_bind=127.0.0.1' + diff --git a/mysql-test/suite/galera/t/galera_ist_recv_bind.test b/mysql-test/suite/galera/t/galera_ist_recv_bind.test new file mode 100644 index 00000000000..cb7329073ad --- /dev/null +++ b/mysql-test/suite/galera/t/galera_ist_recv_bind.test @@ -0,0 +1,54 @@ +# +# Test ist.recv_bind option. Since MTR can not do proper testing with multiple interfaces and such, we +# simply confirm that the option can be set (in the galera_ist_recv_bind.cnf file) and that IST works as expected +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc + +--connection node_1 +SELECT @@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%'; + +--connection node_2 +SELECT @@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%'; + +# Isolate 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); + +# Restore node #2 + +--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 + +# Confirm that IST has taken place + +--let $wait_condition = SELECT COUNT(*) = 1 FROM t1; +--source include/wait_condition.inc + +# Cleanup + +DROP TABLE t1; 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 eae28bdbcd7..931daaad30d 100644 --- a/mysql-test/suite/galera/t/galera_ist_restart_joiner.test +++ b/mysql-test/suite/galera/t/galera_ist_restart_joiner.test @@ -9,6 +9,11 @@ --source include/have_debug_sync.inc --source suite/galera/include/galera_have_debug_sync.inc +# Save original auto_increment_offset values. +--let $node_1=node_1 +--let $node_2=node_2 +--source include/auto_increment_offset_save.inc + CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)); INSERT INTO t1 VALUES (1, 'a'), (2, 'a'), (3, 'a'), (4, 'a'), (5, 'a'),(6, 'a'); @@ -106,3 +111,9 @@ SELECT COUNT(*) = 0 FROM t3; --connection node_1 DROP TABLE t1, t2, t3; + +# 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_kill_ddl.test b/mysql-test/suite/galera/t/galera_kill_ddl.test index 3c2bce5b9c9..90f3f30cc76 100644 --- a/mysql-test/suite/galera/t/galera_kill_ddl.test +++ b/mysql-test/suite/galera/t/galera_kill_ddl.test @@ -28,8 +28,13 @@ ALTER TABLE t1 ADD COLUMN f2 INTEGER; --source include/galera_connect.inc --connection node_2a +--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 = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; +--source include/wait_condition.inc + SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1'; -SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; --connection node_1 --disable_query_log diff --git a/mysql-test/suite/galera/t/galera_log_output_csv.test b/mysql-test/suite/galera/t/galera_log_output_csv.test index 00009396f6a..94ae3dd6168 100644 --- a/mysql-test/suite/galera/t/galera_log_output_csv.test +++ b/mysql-test/suite/galera/t/galera_log_output_csv.test @@ -17,9 +17,6 @@ SELECT COUNT(*) = 1 FROM mysql.slow_log WHERE sql_text = 'SELECT 1 = 1 FROM t1'; --connection node_2 -# CREATE TABLE from master is also present in the slave query log, but is logged twice, mysql-wsrep#44 -SELECT COUNT(*) > 0 FROM mysql.general_log WHERE argument = 'CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB'; - SELECT 2 = 2 FROM t1; SELECT COUNT(*) = 1 FROM mysql.slow_log WHERE sql_text = 'SELECT 2 = 2 FROM t1'; diff --git a/mysql-test/suite/galera/t/galera_parallel_simple.test b/mysql-test/suite/galera/t/galera_parallel_simple.test index b1dc14deb5b..e078a342c16 100644 --- a/mysql-test/suite/galera/t/galera_parallel_simple.test +++ b/mysql-test/suite/galera/t/galera_parallel_simple.test @@ -13,6 +13,7 @@ CREATE TABLE t2 (id INT) ENGINE=InnoDB; --connection node_2 SET GLOBAL wsrep_slave_threads = 2; +LOCK TABLE t1 WRITE; --connection node_1 INSERT INTO t1 VALUES (1); @@ -34,10 +35,20 @@ INSERT INTO t1 VALUES (1); INSERT INTO t2 VALUES (1); --connection node_2 +SET SESSION wsrep_sync_wait = 0; + +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Waiting for table metadata lock%'; +--source include/wait_condition.inc + +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'applied write set%'; +--source include/wait_condition.inc + +UNLOCK TABLES; + +SET SESSION wsrep_sync_wait = 7; SELECT COUNT(*) = 10 FROM t1; SELECT COUNT(*) = 10 FROM t2; -SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'committed%'; --eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig; diff --git a/mysql-test/suite/galera/t/galera_pc_ignore_sb.test b/mysql-test/suite/galera/t/galera_pc_ignore_sb.test index f63215ebe4a..84fd3a91857 100644 --- a/mysql-test/suite/galera/t/galera_pc_ignore_sb.test +++ b/mysql-test/suite/galera/t/galera_pc_ignore_sb.test @@ -6,10 +6,9 @@ --source include/have_innodb.inc # Save original auto_increment_offset values. ---connection node_1 -let $auto_increment_offset_node_1 = `SELECT @@global.auto_increment_offset`; ---connection node_2 -let $auto_increment_offset_node_2 = `SELECT @@global.auto_increment_offset`; +--let $node_1=node_1 +--let $node_2=node_2 +--source include/auto_increment_offset_save.inc --connection node_1 --let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address` @@ -40,10 +39,8 @@ SET GLOBAL wsrep_cluster_address = ''; --source include/start_mysqld.inc --source include/wait_until_connected_again.inc ---disable_query_log # Restore original auto_increment_offset values. ---connection node_1 ---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_1; ---connection node_2 ---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_2; ---enable_query_log +--source include/auto_increment_offset_restore.inc + +--source include/galera_end.inc + diff --git a/mysql-test/suite/galera/t/galera_repl_max_ws_size.test b/mysql-test/suite/galera/t/galera_repl_max_ws_size.test index 37a2f7d4ce3..60b866ae018 100644 --- a/mysql-test/suite/galera/t/galera_repl_max_ws_size.test +++ b/mysql-test/suite/galera/t/galera_repl_max_ws_size.test @@ -23,3 +23,7 @@ SELECT COUNT(*) = 0 FROM t1; DROP TABLE t1; +CALL mtr.add_suppression("Maximum writeset size exceeded by"); +CALL mtr.add_suppression("transaction size limit"); +CALL mtr.add_suppression("transaction size exceeded"); +CALL mtr.add_suppression("rbr write fail"); diff --git a/mysql-test/suite/galera/t/galera_restart_nochanges.test b/mysql-test/suite/galera/t/galera_restart_nochanges.test index a61332cefd6..0a6a0c5ccbe 100644 --- a/mysql-test/suite/galera/t/galera_restart_nochanges.test +++ b/mysql-test/suite/galera/t/galera_restart_nochanges.test @@ -6,10 +6,9 @@ --source include/have_innodb.inc # Save original auto_increment_offset values. ---connection node_1 -let $auto_increment_offset_node_1 = `SELECT @@global.auto_increment_offset`; ---connection node_2 -let $auto_increment_offset_node_2 = `SELECT @@global.auto_increment_offset`; +--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; @@ -18,6 +17,10 @@ INSERT INTO t1 VALUES (1); --connection node_2 --source include/restart_mysqld.inc +--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 + --let $galera_connection_name = node_2a --let $galera_server_number = 2 --source include/galera_connect.inc @@ -29,11 +32,9 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N DROP TABLE t1; ---disable_query_log # Restore original auto_increment_offset values. ---connection node_1 ---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_1; ---connection node_2a ---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_2; ---enable_query_log +--let $node_2=node_2a +--source include/auto_increment_offset_restore.inc + +--source include/galera_end.inc diff --git a/mysql-test/suite/galera/t/galera_roles.test b/mysql-test/suite/galera/t/galera_roles.test index f9a15126e5e..16e417d1fdb 100644 --- a/mysql-test/suite/galera/t/galera_roles.test +++ b/mysql-test/suite/galera/t/galera_roles.test @@ -163,5 +163,37 @@ disconnect foo_node_2; DROP USER foo@localhost; DROP DATABASE test1; +--echo # +--echo # MDEV-10566: Create role statement replicated inconsistently in Galera Cluster +--echo # +--echo +--echo # On node_1 +--connection node_1 +CREATE USER foo@localhost; +CREATE ROLE role1; +CREATE ROLE role2 WITH ADMIN CURRENT_USER; +CREATE ROLE role3 WITH ADMIN foo@localhost; +CREATE ROLE role4 WITH ADMIN role1; + +--sorted_result +SELECT * FROM mysql.roles_mapping; +--sorted_result +SELECT * FROM INFORMATION_SCHEMA.APPLICABLE_ROLES; + +--echo +--echo # On node_2 +--connection node_2 +--sorted_result +SELECT * FROM mysql.roles_mapping; +--sorted_result +SELECT * FROM INFORMATION_SCHEMA.APPLICABLE_ROLES; + +# Cleanup +DROP ROLE role1; +DROP ROLE role2; +DROP ROLE role3; +DROP ROLE role4; +DROP USER foo@localhost; + --source include/galera_end.inc --echo # End of test diff --git a/mysql-test/suite/galera/t/galera_rsu_wsrep_desync.test b/mysql-test/suite/galera/t/galera_rsu_wsrep_desync.test index 36ec8563cbe..dc7ff11a9f5 100644 --- a/mysql-test/suite/galera/t/galera_rsu_wsrep_desync.test +++ b/mysql-test/suite/galera/t/galera_rsu_wsrep_desync.test @@ -17,9 +17,11 @@ SET wsrep_OSU_method=RSU; SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue'; --send ALTER TABLE t1 ADD COLUMN f2 INTEGER; + --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 ---connection node_1a +--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--connection node_1a --let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'debug sync point: alter_table_before_open_tables' --source include/wait_condition.inc @@ -44,24 +46,32 @@ CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB; SET GLOBAL wsrep_desync=0; SET wsrep_OSU_method=RSU; -SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue'; +SET DEBUG_SYNC = 'alter_table_before_create_table_no_lock WAIT_FOR continue'; --send ALTER TABLE t1 ADD COLUMN f2 INTEGER; --connection node_1a ---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'debug sync point: alter_table_before_open_tables' +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'debug sync point: alter_table_before_create_table_no_lock' --source include/wait_condition.inc -# This transition is currently not allowed ---error ER_CANNOT_USER -SET GLOBAL wsrep_desync=1; -SET GLOBAL wsrep_desync=0; +# wsrep_desync=1 will block +--send SET GLOBAL wsrep_desync=1; + + +--connection node_1b +--sleep 2 +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'exit open_tables()' and INFO = 'SET GLOBAL wsrep_desync=1' +--source include/wait_condition.inc SET DEBUG_SYNC= 'now SIGNAL continue'; --connection node_1 --reap +--connection node_1a +--reap +SET GLOBAL wsrep_desync=0; + SHOW CREATE TABLE t1; # Restore old state @@ -74,5 +84,3 @@ CALL mtr.add_suppression("desync failed"); --connection node_2 CALL mtr.add_suppression("Protocol violation"); - - diff --git a/mysql-test/suite/galera/t/galera_split_brain.test b/mysql-test/suite/galera/t/galera_split_brain.test index e0298e55422..22f6370241c 100644 --- a/mysql-test/suite/galera/t/galera_split_brain.test +++ b/mysql-test/suite/galera/t/galera_split_brain.test @@ -6,17 +6,16 @@ --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 + call mtr.add_suppression("WSREP: TO isolation failed for: "); --connection node_1 --let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address` -# Save original auto_increment_offset values. ---connection node_1 -let $auto_increment_offset_node_1 = `SELECT @@global.auto_increment_offset`; ---connection node_2 -let $auto_increment_offset_node_2 = `SELECT @@global.auto_increment_offset`; - --connection node_2 --source include/kill_galera.inc @@ -44,10 +43,8 @@ SET GLOBAL wsrep_cluster_address = ''; --source include/wait_until_connected_again.inc # Restore original auto_increment_offset values. ---disable_query_log ---connection node_1 ---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_1; ---connection node_2a ---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_2; ---enable_query_log +--let $node_2=node_2a +--source include/auto_increment_offset_restore.inc + +--source include/galera_end.inc diff --git a/mysql-test/suite/galera/t/galera_ssl_upgrade.test b/mysql-test/suite/galera/t/galera_ssl_upgrade.test index 07aac0fbe92..a424942da30 100644 --- a/mysql-test/suite/galera/t/galera_ssl_upgrade.test +++ b/mysql-test/suite/galera/t/galera_ssl_upgrade.test @@ -18,7 +18,8 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N --source include/start_mysqld.inc --source include/wait_until_connected_again.inc -SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; +--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; +--source include/wait_condition.inc SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; # 3. Restart node #2 with the new socket.ssl_ca , socket.ssl_cert and socket.ssl_key @@ -29,7 +30,8 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N --source include/start_mysqld.inc --source include/wait_until_connected_again.inc -SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; +--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; +--source include/wait_condition.inc SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; # 4. Restart node #1 with the new socket.ssl_ca , socket.ssl_cert and socket.ssl_key @@ -40,7 +42,8 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N --source include/start_mysqld.inc --source include/wait_until_connected_again.inc -SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; +--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; +--source include/wait_condition.inc SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; # Upgrade complete. Both nodes now use the new key and certificate diff --git a/mysql-test/suite/galera/t/galera_suspend_slave.test b/mysql-test/suite/galera/t/galera_suspend_slave.test index b4302f7d195..353a7c38a73 100644 --- a/mysql-test/suite/galera/t/galera_suspend_slave.test +++ b/mysql-test/suite/galera/t/galera_suspend_slave.test @@ -8,10 +8,9 @@ --source include/have_innodb.inc # Save original auto_increment_offset values. ---connection node_1 -let $auto_increment_offset_node_1 = `SELECT @@global.auto_increment_offset`; ---connection node_2 -let $auto_increment_offset_node_2 = `SELECT @@global.auto_increment_offset`; +--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 PRIMARY KEY) ENGINE=InnoDB; @@ -56,11 +55,7 @@ SELECT COUNT(*) = 1 FROM t1; DROP TABLE t1; ---disable_query_log # Restore original auto_increment_offset values. ---connection node_1 ---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_1; ---connection node_2a ---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_2; ---enable_query_log +--let $node_2=node_2a +--source include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera/t/galera_transaction_replay.test b/mysql-test/suite/galera/t/galera_transaction_replay.test index bd5288a51c6..29870829ba3 100644 --- a/mysql-test/suite/galera/t/galera_transaction_replay.test +++ b/mysql-test/suite/galera/t/galera_transaction_replay.test @@ -40,7 +40,7 @@ UPDATE t1 SET f2 = 'c' WHERE f1 = 2; # Wait for both transactions to be blocked --connection node_1a ---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'System lock'; +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Update_rows_log_event::find_row%'; --source include/wait_condition.inc --let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'init' AND INFO = 'COMMIT'; @@ -69,3 +69,56 @@ SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b'; SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c'; DROP TABLE t1; + +#echo "# test for PS replaying" + +# +# test replaying of prepared statements +# +--connection node_1 +CREATE TABLE t1 (i int primary key, j int) ENGINE=INNODB; +INSERT INTO t1 VALUES (1, 0), (3, 0); +SELECT * FROM t1; + +PREPARE stmt1 FROM "UPDATE t1 SET j = 1 where i > 0"; + +# block the commit of PS +--connection node_1a +--let $galera_sync_point = commit_monitor_enter_sync +--source include/galera_set_sync_point.inc + +--connection node_1 +--send EXECUTE stmt1; + +# Wait until commit is blocked +--connection node_1a +SET SESSION wsrep_sync_wait = 0; +--source include/galera_wait_sync_point.inc + +# Issue a conflicting update on node_2 +--connection node_2 +#UPDATE t1 SET j=2; +INSERT INTO t1 VALUES(2,2); + + +# Wait until applying begins in node_1 +--connection node_1a +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Write_rows_log_event::write_row%'; +--source include/wait_condition.inc + +# Unblock the PS commit +--connection node_1a +--source include/galera_clear_sync_point.inc +--source include/galera_signal_sync_point.inc + +# Commit succeeds +--connection node_1 +--reap +SELECT * FROM t1; + +--connection node_2 +SELECT * FROM t1; + +--connection node_1 +DEALLOCATE PREPARE stmt1; +DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/galera_var_desync_on.test b/mysql-test/suite/galera/t/galera_var_desync_on.test index fb0fb9f762a..06c5d30a769 100644 --- a/mysql-test/suite/galera/t/galera_var_desync_on.test +++ b/mysql-test/suite/galera/t/galera_var_desync_on.test @@ -55,4 +55,8 @@ INSERT INTO t1 VALUES (11); # Replication continues normally SELECT COUNT(*) = 11 FROM t1; +CALL mtr.add_suppression("Protocol violation"); DROP TABLE t1; + +--connection node_1 +CALL mtr.add_suppression("Protocol violation"); 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 9eea8efdaf3..dfd8d5ecf29 100644 --- a/mysql-test/suite/galera/t/galera_var_dirty_reads.test +++ b/mysql-test/suite/galera/t/galera_var_dirty_reads.test @@ -5,13 +5,10 @@ --source include/galera_cluster.inc --source include/have_innodb.inc ---disable_query_log # Save original auto_increment_offset values. ---connection node_1 -let $auto_increment_offset_node_1 = `SELECT @@global.auto_increment_offset`; ---connection node_2 -let $auto_increment_offset_node_2 = `SELECT @@global.auto_increment_offset`; ---enable_query_log +--let $node_1=node_1 +--let $node_2=node_2 +--source include/auto_increment_offset_save.inc --connection node_2 --let $wsrep_cluster_address_saved = `SELECT @@global.wsrep_cluster_address` @@ -49,13 +46,8 @@ SELECT * FROM t1; # Cleanup DROP TABLE t1; ---disable_query_log # Restore original auto_increment_offset values. ---connection node_1 ---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_1; ---connection node_2 ---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_2; ---enable_query_log +--source include/auto_increment_offset_restore.inc --source include/galera_end.inc --echo # End of test diff --git a/mysql-test/suite/galera/t/galera_var_max_ws_rows.test b/mysql-test/suite/galera/t/galera_var_max_ws_rows.test new file mode 100644 index 00000000000..944238bf1aa --- /dev/null +++ b/mysql-test/suite/galera/t/galera_var_max_ws_rows.test @@ -0,0 +1,155 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc + +CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB; +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; + +--let $wsrep_max_ws_rows_orig = `SELECT @@wsrep_max_ws_rows` +SET GLOBAL wsrep_max_ws_rows = 4; + +# Test that wsrep_max_ws_rows is enforced with multi statement transactions + +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +INSERT INTO t1 (f2) VALUES (2); +INSERT INTO t1 (f2) VALUES (3); +INSERT INTO t1 (f2) VALUES (4); +--error ER_ERROR_DURING_COMMIT +INSERT INTO t1 (f2) VALUES (5); +COMMIT; +SELECT COUNT(*) = 0 FROM t1; + +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +INSERT INTO t1 (f2) VALUES (2); +INSERT INTO t1 (f2) VALUES (3); +INSERT INTO t1 (f2) VALUES (4); +--error ER_ERROR_DURING_COMMIT +UPDATE t1 SET f2 = 10 WHERE f2 = 4; +COMMIT; +SELECT COUNT(*) = 0 FROM t1; + +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +INSERT INTO t1 (f2) VALUES (2); +INSERT INTO t1 (f2) VALUES (3); +INSERT INTO t1 (f2) VALUES (4); +--error ER_ERROR_DURING_COMMIT +DELETE FROM t1 WHERE f2 = 1; +COMMIT; +SELECT COUNT(*) = 0 FROM t1; + + +# Test that wsrep_max_ws_rows is enforced on sigle statements + +SET GLOBAL wsrep_max_ws_rows = 5; +INSERT INTO t1 (f2) VALUES (1),(2),(3),(4),(5); +SET GLOBAL wsrep_max_ws_rows = 4; + +--error ER_ERROR_DURING_COMMIT +UPDATE t1 SET f2 = f2 + 10; +SELECT COUNT(*) = 5 FROM t1; + +--error ER_ERROR_DURING_COMMIT +DELETE FROM t1 WHERE f2 < 10; +SELECT COUNT(*) = 5 FROM t1; + +--error ER_ERROR_DURING_COMMIT +INSERT INTO t1 (f2) SELECT * FROM ten; +SELECT COUNT(*) = 5 FROM t1; + +--error ER_ERROR_DURING_COMMIT +INSERT INTO t1 (f2) VALUES (10),(20),(30),(40),(50); +SELECT COUNT(*) = 5 FROM t1; + +# Fewer than wsrep_max_ws_rows is OK + +SET GLOBAL wsrep_max_ws_rows = 10; +DELETE FROM t1 WHERE f2 < 10; +SELECT COUNT(*) = 0 FROM t1; + +# Test a series of transactions + +--disable_query_log +SET GLOBAL wsrep_max_ws_rows = 5; +let $i= 100; +while ($i) +{ + START TRANSACTION; + --eval INSERT INTO t1 (f2) VALUES ($i); + COMMIT; + dec $i; +} +--enable_query_log +SET GLOBAL wsrep_max_ws_rows = 100; +SELECT COUNT(*) = 100 FROM t1; +DELETE FROM t1 WHERE f2 < 101; +SELECT COUNT(*) = 0 FROM t1; + +# Test large statements + +SET GLOBAL wsrep_max_ws_rows = 9999; +--error ER_ERROR_DURING_COMMIT +INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4; +SET GLOBAL wsrep_max_ws_rows = 10000; +INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4; + +SET GLOBAL wsrep_max_ws_rows = 9999; +--error ER_ERROR_DURING_COMMIT +UPDATE t1 SET f2 = 2 WHERE f2 = 1; +SET GLOBAL wsrep_max_ws_rows = 10000; +UPDATE t1 SET f2 = 2 WHERE f2 = 1; + +SET GLOBAL wsrep_max_ws_rows = 9999; +--error ER_ERROR_DURING_COMMIT +DELETE FROM t1 WHERE f2 = 2; +SET GLOBAL wsrep_max_ws_rows = 10000; +DELETE FROM t1 WHERE f2 = 2; + +SELECT COUNT(*) = 0 FROM t1; + + +# Test that wsrep_max_ws_rows is reset when switching autocommit mode + +SET AUTOCOMMIT = ON; +SET GLOBAL wsrep_max_ws_rows = 1; + +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +--error ER_ERROR_DURING_COMMIT +INSERT INTO t1 (f2) VALUES (2); + +INSERT INTO t1 (f2) VALUES (1); +INSERT INTO t1 (f2) VALUES (2); + + +SET AUTOCOMMIT = OFF; +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +--error ER_ERROR_DURING_COMMIT +INSERT INTO t1 (f2) VALUES (2); + +INSERT INTO t1 (f2) VALUES (1); +--error ER_ERROR_DURING_COMMIT +INSERT INTO t1 (f2) VALUES (2); + + +# Test that wsrep_max_ws_rows is reset on implicit commits + +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); + +START TRANSACTION; +INSERT INTO t1 (f2) VALUES (1); +--error ER_ERROR_DURING_COMMIT +INSERT INTO t1 (f2) VALUES (2); + + +--disable_query_log +--eval SET GLOBAL wsrep_max_ws_rows = $wsrep_max_ws_rows_orig +--enable_query_log + +DROP TABLE t1; +DROP TABLE ten; diff --git a/mysql-test/suite/galera/t/galera_var_max_ws_size.test b/mysql-test/suite/galera/t/galera_var_max_ws_size.test index b66ef2d5ee2..8eb93bda9be 100644 --- a/mysql-test/suite/galera/t/galera_var_max_ws_size.test +++ b/mysql-test/suite/galera/t/galera_var_max_ws_size.test @@ -16,6 +16,29 @@ SET GLOBAL wsrep_max_ws_size = 1024; INSERT INTO t1 VALUES (DEFAULT, REPEAT('X', 1024)); SELECT COUNT(*) = 0 FROM t1; +# +# Changing repl.max_ws_size also changes wsrep_max_ws_size +# + +SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=10000'; +SELECT @@wsrep_max_ws_size = 10000; + + +# +# Changing wsrep_max_ws_size is equivalent to changing repl.max_ws_size +# + +SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=20000'; +--let $provider_options = `SELECT @@wsrep_provider_options` +SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=10000'; + +SET GLOBAL wsrep_max_ws_size = 20000; +--let $provider_options_updated = `SELECT @@wsrep_provider_options` + +--disable_query_log +--eval SELECT STRCMP('$provider_options', '$provider_options_updated') = 0 AS provider_options_match +--enable_query_log + --disable_query_log --eval SET GLOBAL wsrep_max_ws_size = $wsrep_max_ws_size_orig --enable_query_log diff --git a/mysql-test/suite/galera/t/mysql-wsrep#31.test b/mysql-test/suite/galera/t/mysql-wsrep#31.test index eaace5d50dd..c669d4834ba 100644 --- a/mysql-test/suite/galera/t/mysql-wsrep#31.test +++ b/mysql-test/suite/galera/t/mysql-wsrep#31.test @@ -1,6 +1,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 CHAR(255)) ENGINE=InnoDB; @@ -36,4 +41,13 @@ if ($galera_wsrep_start_position != $expected_position) DROP TABLE t1; DROP DATABASE db; +--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 +--source include/wait_until_connected_again.inc + +# Restore original auto_increment_offset values. +--let $node_2=node_2a +--source include/auto_increment_offset_restore.inc + +--source include/galera_end.inc + diff --git a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf index 2a06c1cd5a9..eaa2899968c 100644 --- a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf +++ b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf @@ -18,7 +18,7 @@ wsrep-sync-wait=7 #ist_port=@OPT.port #sst_port=@OPT.port wsrep-cluster-address=gcomm:// -wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M' +wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M;evs.suspect_timeout=PT10S' wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port' @@ -27,7 +27,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port' #ist_port=@OPT.port #sst_port=@OPT.port wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port' -wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M' +wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M;evs.suspect_timeout=PT10S' wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port' @@ -36,7 +36,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port' #ist_port=@OPT.port #sst_port=@OPT.port wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port' -wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M' +wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M;evs.suspect_timeout=PT10S' wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port' diff --git a/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result b/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result index f5a4cad4a23..69995acb982 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result +++ b/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result @@ -3,9 +3,6 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1'; SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1'; SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1'; SET SESSION wsrep_sync_wait = 0; -SHOW STATUS LIKE 'wsrep_cluster_status'; -Variable_name Value -wsrep_cluster_status non-Primary SET GLOBAL wsrep_provider_options = 'pc.bootstrap=1'; SHOW STATUS LIKE 'wsrep_cluster_size'; Variable_name Value diff --git a/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result b/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result index 85f923ad55e..6fb931638ef 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result +++ b/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result @@ -1,6 +1,8 @@ SET GLOBAL wsrep_provider_options = 'pc.weight=3'; Suspending node ... SET SESSION wsrep_sync_wait=0; +SET SESSION wsrep_on=OFF; +SET SESSION wsrep_on=ON; SHOW STATUS LIKE 'wsrep_cluster_size'; Variable_name Value wsrep_cluster_size 2 diff --git a/mysql-test/suite/galera_3nodes/t/galera_certification_ccc.test b/mysql-test/suite/galera_3nodes/t/galera_certification_ccc.test index e19169a350c..b4fe10bff0d 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_certification_ccc.test +++ b/mysql-test/suite/galera_3nodes/t/galera_certification_ccc.test @@ -10,12 +10,10 @@ --source include/galera_connect.inc # Save original auto_increment_offset values. ---connection node_1 -let $auto_increment_offset_node_1 = `SELECT @@global.auto_increment_offset`; ---connection node_2 -let $auto_increment_offset_node_2 = `SELECT @@global.auto_increment_offset`; ---connection node_3 -let $auto_increment_offset_node_3 = `SELECT @@global.auto_increment_offset`; +--let $node_1=node_1 +--let $node_2=node_2 +--let $node_3=node_3 +--source ../galera/include/auto_increment_offset_save.inc --connection node_1 CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; @@ -49,12 +47,7 @@ SELECT COUNT(*) = 2 FROM t1; DROP TABLE t1; # Restore original auto_increment_offset values. ---disable_query_log ---connection node_1 ---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_1; ---connection node_2 ---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_2; ---connection node_3 ---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_3; ---enable_query_log +--source ../galera/include/auto_increment_offset_restore.inc + +--source include/galera_end.inc diff --git a/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test b/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test index af4a5fbf9d6..a6660bd08d1 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test +++ b/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test @@ -13,8 +13,8 @@ INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); SELECT COUNT(*) = 10 FROM t1; --exec rm -rf $MYSQL_TMP_DIR/innobackupex_backup ---exec innobackupex $MYSQL_TMP_DIR/innobackupex_backup --galera-info --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 --port=$NODE_MYPORT_2 --host=127.0.0.1 --no-timestamp > $MYSQL_TMP_DIR/innobackupex-backup.log ---exec innobackupex $MYSQL_TMP_DIR/innobackupex_backup --apply-log --galera-info --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 --port=$NODE_MYPORT_2 --host=127.0.0.1 --no-timestamp > $MYSQL_TMP_DIR/innobackupex-apply.log +--exec innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 $MYSQL_TMP_DIR/innobackupex_backup --galera-info --port=$NODE_MYPORT_2 --host=127.0.0.1 --no-timestamp > $MYSQL_TMP_DIR/innobackupex-backup.log +--exec innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 $MYSQL_TMP_DIR/innobackupex_backup --apply-log --galera-info --port=$NODE_MYPORT_2 --host=127.0.0.1 --no-timestamp > $MYSQL_TMP_DIR/innobackupex-apply.log --source include/kill_galera.inc --sleep 1 @@ -23,7 +23,7 @@ SELECT COUNT(*) = 10 FROM t1; INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20); --exec rm -rf $MYSQLTEST_VARDIR/mysqld.2/data/* ---exec innobackupex --copy-back $MYSQL_TMP_DIR/innobackupex_backup --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 --port=$NODE_MYPORT_2 --host=127.0.0.1 > $MYSQL_TMP_DIR/innobackupex-restore.log +--exec innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 --copy-back $MYSQL_TMP_DIR/innobackupex_backup --port=$NODE_MYPORT_2 --host=127.0.0.1 > $MYSQL_TMP_DIR/innobackupex-restore.log # # Convert the xtrabackup_galera_info into a grastate.dat file diff --git a/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test b/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test index 7d8bbb39e35..8575d99f066 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test +++ b/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test @@ -82,6 +82,8 @@ INSERT INTO t1 VALUES (51), (52), (53), (54), (55); --connection node_3 --source include/wait_until_connected_again.inc +sleep 5; + # Final checks --connection node_2 SELECT COUNT(*) = 30 FROM t1; diff --git a/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.cnf b/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.cnf new file mode 100644 index 00000000000..d560b675427 --- /dev/null +++ b/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.cnf @@ -0,0 +1,5 @@ +# We need a dedicated .cnf file, even if empty, in order to force this test to run +# alone on a freshly started cluster. Otherwise there are adverse interactions with +# prior tests such as galera_3nodes.galera_innobackupex_backup + +!include ../galera_3nodes.cnf diff --git a/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test b/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test index 6172ffcc743..f8381a3324b 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test +++ b/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test @@ -23,7 +23,8 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1'; # Node #2 should be non-primary SET SESSION wsrep_sync_wait = 0; -SHOW STATUS LIKE 'wsrep_cluster_status'; +--let $wait_condition = SELECT variable_value = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_cluster_status'; +--source include/wait_condition.inc # Signal node #2 to bootstrap --connection node_2 diff --git a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf new file mode 100644 index 00000000000..57026ce6928 --- /dev/null +++ b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf @@ -0,0 +1,5 @@ +# We need a dedicated .cnf file, even if empty, in order to force this test to run +# alone on a freshly started cluster. Otherwise there are adverse interactions with +# following tests such as galera_3nodes.galera_var_dirty_reads2 + +!include ../galera_3nodes.cnf diff --git a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test index 6585f1934a4..c118b7481bc 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test +++ b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test @@ -19,6 +19,11 @@ SET GLOBAL wsrep_provider_options = 'pc.weight=3'; SET SESSION wsrep_sync_wait=0; --source include/wait_until_connected_again.inc +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; + # We can not use SELECT queries here, as only SHOW is allowed to run. # For nodes #2 and #3, we expect a non-primary component of size 2 @@ -45,7 +50,7 @@ SHOW STATUS LIKE 'wsrep_local_state_comment'; --connection node_1 --source include/galera_resume.inc ---sleep 5 +--sleep 10 --source include/wait_until_connected_again.inc # For Node #1, we expect a primary component of size 1 diff --git a/mysql-test/suite/sys_vars/r/wsrep_desync_basic.result b/mysql-test/suite/sys_vars/r/wsrep_desync_basic.result index 52fede2f538..e4d452c11b5 100644 --- a/mysql-test/suite/sys_vars/r/wsrep_desync_basic.result +++ b/mysql-test/suite/sys_vars/r/wsrep_desync_basic.result @@ -20,10 +20,12 @@ SET @@global.wsrep_desync=ON; Got one of the listed errors SELECT @@global.wsrep_desync; @@global.wsrep_desync -1 +0 # valid values SET @@global.wsrep_desync='OFF'; +Warnings: +Warning 1231 'wsrep_desync' is already OFF. SELECT @@global.wsrep_desync; @@global.wsrep_desync 0 @@ -31,8 +33,10 @@ SET @@global.wsrep_desync=ON; Got one of the listed errors SELECT @@global.wsrep_desync; @@global.wsrep_desync -1 +0 SET @@global.wsrep_desync=default; +Warnings: +Warning 1231 'wsrep_desync' is already OFF. SELECT @@global.wsrep_desync; @@global.wsrep_desync 0 diff --git a/mysql-test/suite/sys_vars/r/wsrep_max_ws_rows_basic.result b/mysql-test/suite/sys_vars/r/wsrep_max_ws_rows_basic.result index 15438a2afd5..d96bc8708c5 100644 --- a/mysql-test/suite/sys_vars/r/wsrep_max_ws_rows_basic.result +++ b/mysql-test/suite/sys_vars/r/wsrep_max_ws_rows_basic.result @@ -6,7 +6,7 @@ SET @wsrep_max_ws_rows_global_saved = @@global.wsrep_max_ws_rows; # default SELECT @@global.wsrep_max_ws_rows; @@global.wsrep_max_ws_rows -131072 +0 # scope SELECT @@session.wsrep_max_ws_rows; @@ -26,11 +26,9 @@ SELECT @@global.wsrep_max_ws_rows; @@global.wsrep_max_ws_rows 131073 SET @@global.wsrep_max_ws_rows=0; -Warnings: -Warning 1292 Truncated incorrect wsrep_max_ws_rows value: '0' SELECT @@global.wsrep_max_ws_rows; @@global.wsrep_max_ws_rows -1 +0 SET @@global.wsrep_max_ws_rows=default; SELECT @global.wsrep_max_ws_rows; @global.wsrep_max_ws_rows diff --git a/mysql-test/suite/sys_vars/r/wsrep_max_ws_size_basic.result b/mysql-test/suite/sys_vars/r/wsrep_max_ws_size_basic.result index 26d8d823a5c..d7e72869be3 100644 --- a/mysql-test/suite/sys_vars/r/wsrep_max_ws_size_basic.result +++ b/mysql-test/suite/sys_vars/r/wsrep_max_ws_size_basic.result @@ -3,10 +3,11 @@ # # save the initial value SET @wsrep_max_ws_size_global_saved = @@global.wsrep_max_ws_size; +SET @wsrep_provider_options_saved = @@global.wsrep_provider_options; # default SELECT @@global.wsrep_max_ws_size; @@global.wsrep_max_ws_size -1073741824 +2147483647 # scope SELECT @@session.wsrep_max_ws_size; @@ -55,4 +56,5 @@ NULL # restore the initial value SET @@global.wsrep_max_ws_size = @wsrep_max_ws_size_global_saved; +SET @@global.wsrep_provider_options = @wsrep_provider_options_saved; # End of test diff --git a/mysql-test/suite/sys_vars/t/wsrep_max_ws_size_basic.test b/mysql-test/suite/sys_vars/t/wsrep_max_ws_size_basic.test index e7af4558f24..2e302015136 100644 --- a/mysql-test/suite/sys_vars/t/wsrep_max_ws_size_basic.test +++ b/mysql-test/suite/sys_vars/t/wsrep_max_ws_size_basic.test @@ -6,6 +6,7 @@ --echo # save the initial value SET @wsrep_max_ws_size_global_saved = @@global.wsrep_max_ws_size; +SET @wsrep_provider_options_saved = @@global.wsrep_provider_options; --echo # default SELECT @@global.wsrep_max_ws_size; @@ -41,5 +42,6 @@ SELECT @global.wsrep_max_ws_size; --echo --echo # restore the initial value SET @@global.wsrep_max_ws_size = @wsrep_max_ws_size_global_saved; +SET @@global.wsrep_provider_options = @wsrep_provider_options_saved; --echo # End of test diff --git a/mysql-test/suite/wsrep/r/variables.result b/mysql-test/suite/wsrep/r/variables.result index 62d7f62440f..928f1995072 100644 --- a/mysql-test/suite/wsrep/r/variables.result +++ b/mysql-test/suite/wsrep/r/variables.result @@ -36,6 +36,7 @@ wsrep_commit_oooe # wsrep_commit_oool # wsrep_commit_window # wsrep_connected # +wsrep_debug_sync_waiters # wsrep_flow_control_paused # wsrep_flow_control_paused_ns # wsrep_flow_control_recv # @@ -91,6 +92,7 @@ wsrep_commit_oooe # wsrep_commit_oool # wsrep_commit_window # wsrep_connected # +wsrep_debug_sync_waiters # wsrep_flow_control_paused # wsrep_flow_control_paused_ns # wsrep_flow_control_recv # diff --git a/mysql-test/suite/wsrep/t/variables.test b/mysql-test/suite/wsrep/t/variables.test index d77dc4e66f9..1769f567848 100644 --- a/mysql-test/suite/wsrep/t/variables.test +++ b/mysql-test/suite/wsrep/t/variables.test @@ -29,7 +29,7 @@ CALL mtr.add_suppression("WSREP: Could not open saved state file for reading.*") --disable_query_log eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER'; ---let $galera_version=3.9 +--let $galera_version=25.3.17 source include/check_galera_version.inc; --enable_query_log diff --git a/mysql-test/valgrind.supp b/mysql-test/valgrind.supp index c3e7d1c65ec..b2b264e17fa 100644 --- a/mysql-test/valgrind.supp +++ b/mysql-test/valgrind.supp @@ -1223,25 +1223,6 @@ } { - GitHub codership/mysql-wsrep#176 - Memcheck:Leak - fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE - fun:galera_parameters_get - fun:_ZL24refresh_provider_optionsv - fun:_Z29wsrep_provider_options_updateP7sys_varP3THD13enum_var_type - fun:_ZN7sys_var6updateEP3THDP7set_var - fun:_ZN7set_var6updateEP3THD - fun:_Z17sql_set_variablesP3THDP4ListI12set_var_baseE - fun:_Z21mysql_execute_commandP3THD - fun:_Z11mysql_parseP3THDPcjP12Parser_state - fun:_ZL17wsrep_mysql_parseP3THDPcjP12Parser_state - fun:_Z16dispatch_command19enum_server_commandP3THDPcj - fun:_Z10do_commandP3THD - fun:_Z24do_handle_one_connectionP3THD - fun:handle_one_connection -} - -{ GitHub codership/galera#330 Memcheck:Leak match-leak-kinds: reachable @@ -1337,31 +1318,6 @@ g codership/mysql-wsrep/issues#176 { codership/mysql-wsrep/issues#176 Memcheck:Leak - fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE -} - -{ - codership/mysql-wsrep/issues#176 - Memcheck:Leak - fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE - fun:galera_parameters_get - fun:_ZL24refresh_provider_optionsv - fun:_Z21wsrep_provider_updateP7sys_varP3THD13enum_var_type - fun:_ZN7sys_var6updateEP3THDP7set_var - fun:_ZN7set_var6updateEP3THD - fun:_Z17sql_set_variablesP3THDP4ListI12set_var_baseE - fun:_Z21mysql_execute_commandP3THD - fun:_Z11mysql_parseP3THDPcjP12Parser_state - fun:_ZL17wsrep_mysql_parseP3THDPcjP12Parser_state - fun:_Z16dispatch_command19enum_server_commandP3THDPcj - fun:_Z10do_commandP3THD - fun:_Z24do_handle_one_connectionP3THD - fun:handle_one_connection -} - -{ - codership/mysql-wsrep/issues#176 - Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:DbugMalloc @@ -1470,72 +1426,6 @@ g codership/mysql-wsrep/issues#176 } { - codership/mysql-wsrep/issues#176 - Memcheck:Leak - match-leak-kinds: possible - fun:malloc - fun:strdup - fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE - fun:galera_parameters_get - fun:_ZL24refresh_provider_optionsv - fun:_Z29wsrep_provider_options_updateP7sys_varP3THD13enum_var_type - fun:_ZN7sys_var6updateEP3THDP7set_var - fun:_ZN7set_var6updateEP3THD - fun:_Z17sql_set_variablesP3THDP4ListI12set_var_baseE - fun:_Z21mysql_execute_commandP3THD - fun:_Z11mysql_parseP3THDPcjP12Parser_state - fun:_ZL17wsrep_mysql_parseP3THDPcjP12Parser_state - fun:_Z16dispatch_command19enum_server_commandP3THDPcj - fun:_Z10do_commandP3THD - fun:_Z24do_handle_one_connectionP3THD - fun:handle_one_connection -} - -{ - codership/mysql-wsrep/issues#176 - Memcheck:Leak - match-leak-kinds: definite - fun:malloc - fun:strdup - fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE - fun:galera_parameters_get - fun:_ZL24refresh_provider_optionsv - fun:_Z29wsrep_provider_options_updateP7sys_varP3THD13enum_var_type - fun:_ZN7sys_var6updateEP3THDP7set_var - fun:_ZN7set_var6updateEP3THD - fun:_Z17sql_set_variablesP3THDP4ListI12set_var_baseE - fun:_Z21mysql_execute_commandP3THD - fun:_Z11mysql_parseP3THDPcjP12Parser_state - fun:_ZL17wsrep_mysql_parseP3THDPcjP12Parser_state - fun:_Z16dispatch_command19enum_server_commandP3THDPcj - fun:_Z10do_commandP3THD - fun:_Z24do_handle_one_connectionP3THD - fun:handle_one_connection -} - -{ - codership/mysql-wsrep/issues#176 - Memcheck:Leak - match-leak-kinds: definite - fun:malloc - fun:strdup - fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE - fun:galera_parameters_get - fun:_ZL24refresh_provider_optionsv - fun:_Z21wsrep_provider_updateP7sys_varP3THD13enum_var_type - fun:_ZN7sys_var6updateEP3THDP7set_var - fun:_ZN7set_var6updateEP3THD - fun:_Z17sql_set_variablesP3THDP4ListI12set_var_baseE - fun:_Z21mysql_execute_commandP3THD - fun:_Z11mysql_parseP3THDPcjP12Parser_state - fun:_ZL17wsrep_mysql_parseP3THDPcjP12Parser_state - fun:_Z16dispatch_command19enum_server_commandP3THDPcj - fun:_Z10do_commandP3THD - fun:_Z24do_handle_one_connectionP3THD - fun:handle_one_connection -} - -{ codership/galera#331 Memcheck:Leak match-leak-kinds: reachable |