mirror of
https://github.com/MariaDB/server.git
synced 2026-02-04 01:39:08 +01:00
Problem was that wrong level of Sql_condition was used on push_warning_printf and error handling of REFRESH_HOSTS (and similar) was broken. Fixed warning printing in wsrep_TOI_begin after enter_toi_local is called. Fixed also error handling after REFRESH_HOSTS (and others) if TOI begin failed.
49 lines
1.5 KiB
Text
49 lines
1.5 KiB
Text
--source include/galera_cluster.inc
|
|
|
|
--source include/force_restart.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
|
|
# Set higher weight for node_1 to keep it in primary
|
|
# while node_2 is inconsistent
|
|
|
|
SET GLOBAL wsrep_provider_options ='pc.ignore_sb=true;pc.weight=2';
|
|
|
|
--connection node_2
|
|
CREATE TABLE t1 (f1 INT) ENGINE=InnoDB;
|
|
SET GLOBAL wsrep_IGNORE_apply_errors=1;
|
|
SET SESSION wsrep_dirty_reads=1;
|
|
SHOW CREATE TABLE t1;
|
|
FLUSH HOSTS;
|
|
--error ER_TABLE_EXISTS_ERROR
|
|
CREATE TABLE t1 (f1 INT) ENGINE=InnoDB;
|
|
# This will cause inconsistency
|
|
--error ER_GALERA_REPLICATION_NOT_SUPPORTED
|
|
FLUSH HOSTS;
|
|
SHOW WARNINGS;
|
|
|
|
--connection node_1
|
|
--echo # Wait until inconsistent node_2 leaves from cluster
|
|
--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
|
|
--echo # Restart node_2
|
|
--source include/restart_mysqld.inc
|
|
|
|
call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on");
|
|
|
|
--connection node_1
|
|
--echo # Wait until node_2 is back in the cluster
|
|
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
|
--source include/wait_condition.inc
|
|
|
|
SET GLOBAL wsrep_provider_options ='pc.ignore_sb=false;pc.weight=1';
|
|
|
|
DROP TABLE t1;
|
|
--source include/auto_increment_offset_restore.inc
|
|
--source include/galera_end.inc
|