|
| 1 | +--source include/galera_cluster.inc |
| 2 | +--source include/have_sequence.inc |
| 3 | + |
| 4 | +# Save original auto_increment_offset values. |
| 5 | +--let $node_1=node_1 |
| 6 | +--let $node_2=node_2 |
| 7 | +--source include/auto_increment_offset_save.inc |
| 8 | + |
| 9 | +--connection node_1 |
| 10 | +SET GLOBAL wsrep_provider_options ='pc.ignore_sb=true;pc.weight=2'; |
| 11 | + |
| 12 | +--connection node_2 |
| 13 | +--let $wsrep_cluster_address_saved = `SELECT @@global.wsrep_cluster_address` |
| 14 | +SET GLOBAL read_only=1; |
| 15 | +SET SESSION wsrep_trx_fragment_size = 64; |
| 16 | +set default_storage_engine=SEQUENCE; |
| 17 | +SET AUTOCOMMIT = OFF; |
| 18 | +--error 1005 |
| 19 | +CREATE TABLE t1(c1 NUMERIC NOT NULL); |
| 20 | +CREATE TABLE t1 (id INT PRIMARY KEY) engine=innodb; |
| 21 | +SET SESSION SQL_MODE='HIGH_NOT_PRECEDENCE'; |
| 22 | +INSERT INTO t1 VALUES (1),(2),(3); |
| 23 | +SET GLOBAL SQL_MODE='NO_ENGINE_SUBSTITUTION'; |
| 24 | +--error 1051 |
| 25 | +DROP TABLE dummy; |
| 26 | +INSERT INTO t1 VALUES('a'); |
| 27 | +--echo # In this point there should be one fragment |
| 28 | +select count(*) AS EXPECT_1 from mysql.wsrep_streaming_log; |
| 29 | +SET @@global.wsrep_cluster_address='gcomm://'; |
| 30 | +SET SESSION SQL_MODE='TRADITIONAL '; |
| 31 | + |
| 32 | +# |
| 33 | +# Kill the entire cluster and restart |
| 34 | +# |
| 35 | +--echo # Killing cluster because we have messed with wsrep_cluster_address |
| 36 | +--connection node_2 |
| 37 | +SET SESSION wsrep_sync_wait = 0; |
| 38 | +--source include/kill_galera.inc |
| 39 | + |
| 40 | +--connection node_1 |
| 41 | +SET SESSION wsrep_sync_wait = 0; |
| 42 | +--source include/kill_galera.inc |
| 43 | + |
| 44 | +--remove_file $MYSQLTEST_VARDIR/mysqld.1/data/grastate.dat |
| 45 | +--let $start_mysqld_params =--wsrep-new-cluster |
| 46 | +--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
| 47 | +--source include/start_mysqld.inc |
| 48 | +--source include/wait_until_ready.inc |
| 49 | + |
| 50 | +--connection node_2 |
| 51 | +--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat |
| 52 | +--let $start_mysqld_params = |
| 53 | +--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect |
| 54 | +--source include/start_mysqld.inc |
| 55 | +--source include/wait_until_ready.inc |
| 56 | + |
| 57 | +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' |
| 58 | +--source include/wait_condition.inc |
| 59 | + |
| 60 | +call mtr.add_suppression("WSREP: BF applier thread"); |
| 61 | +call mtr.add_suppression("WSREP: Event"); |
| 62 | +call mtr.add_suppression("WSREP: SR trx recovery applying returned 1290"); |
| 63 | +call mtr.add_suppression("WSREP: Adopting a transaction"); |
| 64 | +call mtr.add_suppression("WSREP: Could not find applier context for"); |
| 65 | +call mtr.add_suppression("WSREP: It may not be safe to bootstrap the cluster"); |
| 66 | +call mtr.add_suppression("WSREP: Failed to vote on request for"); |
| 67 | + |
| 68 | +select count(*) AS EXPECT_0 from mysql.wsrep_streaming_log; |
| 69 | + |
| 70 | +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1' |
| 71 | +--source include/wait_condition.inc |
| 72 | + |
| 73 | +SELECT * FROM t1; |
| 74 | + |
| 75 | +--connection node_1 |
| 76 | +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' |
| 77 | +--source include/wait_condition.inc |
| 78 | +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1' |
| 79 | +--source include/wait_condition.inc |
| 80 | +select count(*) AS EXPECT_0 from mysql.wsrep_streaming_log; |
| 81 | +SELECT * FROM t1; |
| 82 | +DROP TABLE t1; |
| 83 | +SET GLOBAL wsrep_provider_options ='pc.ignore_sb=false;pc.weight=1'; |
| 84 | + |
| 85 | +--connection node_2 |
| 86 | +--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1' |
| 87 | +--source include/wait_condition.inc |
| 88 | + |
| 89 | +--connection node_1 |
| 90 | +call mtr.add_suppression("WSREP: Event"); |
| 91 | +call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on"); |
| 92 | +call mtr.add_suppression("WSREP: Failed to apply write set: gtid"); |
| 93 | +call mtr.add_suppression("WSREP: It may not be safe to bootstrap the cluster"); |
| 94 | +call mtr.add_suppression("WSREP: Could not find applier context for"); |
| 95 | +call mtr.add_suppression("WSREP: Failed to vote on request for"); |
| 96 | + |
| 97 | +# Restore original auto_increment_offset values. |
| 98 | +--source include/auto_increment_offset_restore.inc |
| 99 | + |
| 100 | +--source include/galera_end.inc |
0 commit comments