1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-30 05:23:50 +03:00
Files
mariadb/mysql-test/suite/galera/t/galera_sync_wait_upto.test
mkaruza 53173709b3 MDEV-26223 Galera cluster node consider old server_id value even after modification of server_id [wsrep_gtid_mode=ON]
Variable `wsrep_new_cluster` now will be TRUE also when there is only `gcomm://` used
in configuration. This configuration, even without --wsrep-new-cluster,
is considered to bootstrap new cluster.

Updated galera GTID test to ignore warning message when non bootstrap
node have server-id different thant one cluster is initialized with.

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
2022-01-27 08:22:46 +02:00

76 lines
1.9 KiB
Plaintext

#
# Tests the wsrep_sync_wait_upto variable.
#
--source include/galera_cluster.inc
--source include/have_debug_sync.inc
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
# Test with invalid values
--error ER_WRONG_ARGUMENTS
SELECT WSREP_SYNC_WAIT_UPTO_GTID(NULL);
--error ER_INCORRECT_GTID_STATE
SELECT WSREP_SYNC_WAIT_UPTO_GTID('a');
--error ER_INCORRECT_GTID_STATE
SELECT WSREP_SYNC_WAIT_UPTO_GTID(2);
--error ER_WRONG_ARGUMENTS
SELECT WSREP_SYNC_WAIT_UPTO_GTID('1-1-1,1-1-2');
# Expected starting seqno
--let $last_seen_gtid = `SELECT WSREP_LAST_SEEN_GTID()`
--let $s1 = `SELECT SUBSTR('$last_seen_gtid', LOCATE('-', '$last_seen_gtid') + LENGTH('-'))`
--let $start_seqno = `SELECT SUBSTR('$s1', LOCATE('-', '$s1') + LENGTH('-'))`
# If set to low value, expect no waiting
--disable_query_log
--let $lower_seqno = $start_seqno
--dec $lower_seqno
--eval SELECT WSREP_SYNC_WAIT_UPTO_GTID('100-1-$lower_seqno') AS WSREP_SYNC_WAIT_UPTO;
--enable_query_log
# If set to current last_committed value no waiting
--disable_query_log
--let $wsrep_last_committed_gtid = `SELECT WSREP_LAST_SEEN_GTID()`
--eval SELECT WSREP_SYNC_WAIT_UPTO_GTID('$wsrep_last_committed_gtid') AS WSREP_SYNC_WAIT_UPTO;
--enable_query_log
# Timeout if GTID is not received on time
--disable_query_log
--let $high_seqno = $start_seqno
--inc $high_seqno
--error ER_LOCK_WAIT_TIMEOUT
--eval SELECT WSREP_SYNC_WAIT_UPTO_GTID('100-1-$high_seqno', 1) AS WSREP_SYNC_WAIT_UPTO;
--enable_query_log
# Wait for GTID value
--connection node_2
--disable_query_log
--let $wait_seqno = $start_seqno
--inc $wait_seqno
--send_eval SELECT WSREP_SYNC_WAIT_UPTO_GTID('100-1-$wait_seqno') AS WSREP_SYNC_WAIT_UPTO
--enable_query_log
--connection node_1
INSERT INTO t1 VALUES (2);
--connection node_2
--reap
--connection node_1
DROP TABLE t1;
--connection node_2
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");