mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
MDEV-21421 : Galera test sporadic failure on galera.galera_as_slave_gtid_myisam: Result length mismatch
In Galera 4 nodes 1 and 2 are galera nodes and node_3 should be non galera.
This commit is contained in:
parent
4b99358953
commit
6cc819b413
4 changed files with 71 additions and 71 deletions
|
@ -19,7 +19,6 @@ MW-328A : MDEV-21483 galera.MW-328A galera.MW-328B
|
|||
MW-328B : MDEV-21483 galera.MW-328A galera.MW-328B
|
||||
MW-329 : MDEV-19962 Galera test failure on MW-329
|
||||
galera.galera_defaults : MDEV-21494 Galera test sporadic failure on galera.galera_defaults
|
||||
galera_as_slave_gtid_myisam : MDEV-21421 galera.galera_as_slave_gtid_myisam
|
||||
galera_as_slave_replication_bundle : MDEV-15785 OPTION_GTID_BEGIN is set in Gtid_log_event::do_apply_event()
|
||||
galera_autoinc_sst_mariabackup : Known issue, may require porting MDEV-17458 from later versions
|
||||
galera_bf_abort_group_commit : MDEV-18282 Galera test failure on galera.galera_bf_abort_group_commit
|
||||
|
|
|
@ -9,18 +9,13 @@
|
|||
binlog-format=row
|
||||
|
||||
[mysqld.1]
|
||||
log-bin
|
||||
server-id=1
|
||||
wsrep-on=0
|
||||
|
||||
[mysqld.2]
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
|
||||
wsrep-on=1
|
||||
|
||||
log-bin
|
||||
log-bin=master-bin
|
||||
log-bin-index=master-bin
|
||||
log-slave-updates
|
||||
|
||||
innodb-autoinc-lock-mode=2
|
||||
|
@ -28,6 +23,33 @@ default-storage-engine=innodb
|
|||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_node_address=127.0.0.1
|
||||
wsrep-cluster-address=gcomm://
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
|
||||
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep-causal-reads=ON
|
||||
wsrep-sync-wait=15
|
||||
server-id=1
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[mysqld.2]
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep-on=1
|
||||
|
||||
log-bin=master-bin
|
||||
log-bin-index=master-bin
|
||||
log-slave-updates
|
||||
|
||||
innodb-autoinc-lock-mode=2
|
||||
default-storage-engine=innodb
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_node_address=127.0.0.1
|
||||
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_node_incoming_address=127.0.0.1:@mysqld.2.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
|
||||
|
@ -38,28 +60,10 @@ wsrep-sync-wait=15
|
|||
server-id=2
|
||||
|
||||
[mysqld.3]
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
|
||||
wsrep-on=1
|
||||
|
||||
log-bin
|
||||
log-slave-updates
|
||||
|
||||
innodb-autoinc-lock-mode=2
|
||||
default-storage-engine=innodb
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_node_address=127.0.0.1
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.2.#galera_port'
|
||||
wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
|
||||
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep-causal-reads=ON
|
||||
wsrep-sync-wait=15
|
||||
log-bin=master-bin
|
||||
log-bin-index=master-bin
|
||||
server-id=3
|
||||
wsrep-on=OFF
|
||||
|
||||
[ENV]
|
||||
NODE_MYPORT_1= @mysqld.1.port
|
||||
|
@ -70,9 +74,3 @@ NODE_MYSOCK_2= @mysqld.2.socket
|
|||
|
||||
NODE_MYPORT_3= @mysqld.3.port
|
||||
NODE_MYSOCK_3= @mysqld.3.socket
|
||||
|
||||
NODE_GALERAPORT_2= @mysqld.2.#galera_port
|
||||
NODE_GALERAPORT_3= @mysqld.3.#galera_port
|
||||
|
||||
NODE_SSTPORT_2= @mysqld.2.#sst_port
|
||||
NODE_SSTPORT_3= @mysqld.3.#sst_port
|
||||
|
|
|
@ -1,33 +1,38 @@
|
|||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
connection node_2a;
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
||||
SELECT @@wsrep_on;
|
||||
@@wsrep_on
|
||||
0
|
||||
connection node_1;
|
||||
ALTER TABLE mysql.gtid_slave_pos engine = InnoDB;
|
||||
START SLAVE;
|
||||
connection default;
|
||||
connection node_3;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES(1);
|
||||
SELECT LENGTH(@@global.gtid_binlog_state) > 1;
|
||||
LENGTH(@@global.gtid_binlog_state) > 1
|
||||
1
|
||||
connection node_2a;
|
||||
connection node_1;
|
||||
gtid_binlog_state_equal
|
||||
0
|
||||
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) AS EXPECT_0 FROM t1;
|
||||
EXPECT_0
|
||||
0
|
||||
gtid_binlog_state_equal
|
||||
0
|
||||
#cleanup
|
||||
connection default;
|
||||
connection node_3;
|
||||
DROP TABLE t1;
|
||||
reset master;
|
||||
connection node_2a;
|
||||
connection node_1;
|
||||
STOP SLAVE;
|
||||
RESET SLAVE ALL;
|
||||
set global wsrep_on=OFF;
|
||||
SET GLOBAL WSREP_ON=OFF;
|
||||
reset master;
|
||||
set global wsrep_on=ON;
|
||||
connection node_3;
|
||||
set global wsrep_on=OFF;
|
||||
SET GLOBAL WSREP_ON=ON;
|
||||
connection node_2;
|
||||
SET GLOBAL WSREP_ON=OFF;
|
||||
reset master;
|
||||
set global wsrep_on=ON;
|
||||
SET GLOBAL WSREP_ON=ON;
|
||||
|
|
|
@ -12,27 +12,31 @@
|
|||
#
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_log_bin.inc
|
||||
--source include/galera_cluster.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
|
||||
# As node #3 is not a Galera node, and galera_cluster.inc does not open connetion to it
|
||||
# we open the node_3 connection here
|
||||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||
SELECT @@wsrep_on;
|
||||
|
||||
--connection node_2a
|
||||
--connection node_1
|
||||
# make sure gtid_slave_pos is of innodb engine, mtr does not currently provide that
|
||||
ALTER TABLE mysql.gtid_slave_pos engine = InnoDB;
|
||||
|
||||
--disable_query_log
|
||||
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1;
|
||||
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3;
|
||||
--enable_query_log
|
||||
START SLAVE;
|
||||
|
||||
--connection default
|
||||
--connection node_3
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES(1);
|
||||
|
||||
SELECT LENGTH(@@global.gtid_binlog_state) > 1;
|
||||
--let $gtid_binlog_state_node1 = `SELECT @@global.gtid_binlog_state;`
|
||||
|
||||
--connection node_2a
|
||||
--connection node_1
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
|
@ -43,32 +47,26 @@ SELECT LENGTH(@@global.gtid_binlog_state) > 1;
|
|||
--eval SELECT '$gtid_binlog_state_node1' = @@global.gtid_binlog_state AS gtid_binlog_state_equal;
|
||||
--enable_query_log
|
||||
|
||||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
--connection node_2
|
||||
SELECT COUNT(*) AS EXPECT_0 FROM t1;
|
||||
|
||||
--disable_query_log
|
||||
--eval SELECT '$gtid_binlog_state_node1' = @@global.gtid_binlog_state AS gtid_binlog_state_equal;
|
||||
--enable_query_log
|
||||
|
||||
--echo #cleanup
|
||||
--connection default
|
||||
--connection node_3
|
||||
DROP TABLE t1;
|
||||
reset master;
|
||||
|
||||
--connection node_2a
|
||||
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
|
||||
--source include/wait_condition.inc
|
||||
--connection node_1
|
||||
STOP SLAVE;
|
||||
RESET SLAVE ALL;
|
||||
set global wsrep_on=OFF;
|
||||
SET GLOBAL WSREP_ON=OFF;
|
||||
reset master;
|
||||
set global wsrep_on=ON;
|
||||
SET GLOBAL WSREP_ON=ON;
|
||||
|
||||
--connection node_3
|
||||
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
set global wsrep_on=OFF;
|
||||
--connection node_2
|
||||
SET GLOBAL WSREP_ON=OFF;
|
||||
reset master;
|
||||
set global wsrep_on=ON;
|
||||
|
||||
SET GLOBAL WSREP_ON=ON;
|
||||
|
|
Loading…
Add table
Reference in a new issue