mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge branch '10.5' into '10.6'
This commit is contained in:
@@ -2635,6 +2635,15 @@ my_bool regex_list_check_match(
|
|||||||
const regex_list_t& list,
|
const regex_list_t& list,
|
||||||
const char* name)
|
const char* name)
|
||||||
{
|
{
|
||||||
|
if (list.empty()) return (FALSE);
|
||||||
|
|
||||||
|
/*
|
||||||
|
regexec/pcre2_regexec is not threadsafe, also documented.
|
||||||
|
Serialize access from multiple threads to compiled regexes.
|
||||||
|
*/
|
||||||
|
static std::mutex regex_match_mutex;
|
||||||
|
std::lock_guard<std::mutex> lock(regex_match_mutex);
|
||||||
|
|
||||||
regmatch_t tables_regmatch[1];
|
regmatch_t tables_regmatch[1];
|
||||||
for (regex_list_t::const_iterator i = list.begin(), end = list.end();
|
for (regex_list_t::const_iterator i = list.begin(), end = list.end();
|
||||||
i != end; ++i) {
|
i != end; ++i) {
|
||||||
|
@@ -259,3 +259,24 @@ CHECK TABLE `t1` EXTENDED;
|
|||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 check status OK
|
test.t1 check status OK
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# MDEV-31122 Server crash in get_lock_data / mysql_lock_abort_for_thread
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a INT);
|
||||||
|
CREATE TABLE t2 (b INT, c varchar(5))
|
||||||
|
PARTITION BY RANGE COLUMNS(c)
|
||||||
|
SUBPARTITION by key(b) SUBPARTITIONS 2 (
|
||||||
|
PARTITION p0 VALUES LESS THAN ('m'),
|
||||||
|
PARTITION p1 VALUES LESS THAN ('z')
|
||||||
|
);
|
||||||
|
connect con1,localhost,root,,;
|
||||||
|
HANDLER t1 OPEN;
|
||||||
|
SELECT b FROM t2 PARTITION (p0);
|
||||||
|
connection default;
|
||||||
|
SET lock_wait_timeout= 1;
|
||||||
|
ALTER TABLE t1 FORCE;
|
||||||
|
connection con1;
|
||||||
|
b
|
||||||
|
disconnect con1;
|
||||||
|
connection default;
|
||||||
|
DROP TABLE t2, t1;
|
||||||
|
@@ -249,3 +249,31 @@ ALTER TABLE `t1` ADD PRIMARY KEY (`a`);
|
|||||||
ALTER TABLE `t1` REMOVE PARTITIONING;
|
ALTER TABLE `t1` REMOVE PARTITIONING;
|
||||||
CHECK TABLE `t1` EXTENDED;
|
CHECK TABLE `t1` EXTENDED;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-31122 Server crash in get_lock_data / mysql_lock_abort_for_thread
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t1 (a INT);
|
||||||
|
|
||||||
|
CREATE TABLE t2 (b INT, c varchar(5))
|
||||||
|
PARTITION BY RANGE COLUMNS(c)
|
||||||
|
SUBPARTITION by key(b) SUBPARTITIONS 2 (
|
||||||
|
PARTITION p0 VALUES LESS THAN ('m'),
|
||||||
|
PARTITION p1 VALUES LESS THAN ('z')
|
||||||
|
);
|
||||||
|
|
||||||
|
--connect (con1,localhost,root,,)
|
||||||
|
HANDLER t1 OPEN;
|
||||||
|
--send
|
||||||
|
SELECT b FROM t2 PARTITION (p0);
|
||||||
|
|
||||||
|
--connection default
|
||||||
|
SET lock_wait_timeout= 1;
|
||||||
|
--error 0,ER_STATEMENT_TIMEOUT,ER_LOCK_WAIT_TIMEOUT
|
||||||
|
ALTER TABLE t1 FORCE;
|
||||||
|
|
||||||
|
--connection con1
|
||||||
|
--reap
|
||||||
|
--disconnect con1
|
||||||
|
--connection default
|
||||||
|
DROP TABLE t2, t1;
|
||||||
|
@@ -10,7 +10,6 @@
|
|||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
galera_sequences : MDEV-35934/MDEV-33850 For Galera, create sequence with low cache got signal 6 error: [ERROR] WSREP: FSM: no such a transition REPLICATING -> COMMITTED
|
|
||||||
galera_wan : MDEV-35940 Unallowed state transition: donor -> synced in galera_wan
|
galera_wan : MDEV-35940 Unallowed state transition: donor -> synced in galera_wan
|
||||||
galera_vote_rejoin_ddl : MDEV-35940 Unallowed state transition: donor -> synced in galera_wan
|
galera_vote_rejoin_ddl : MDEV-35940 Unallowed state transition: donor -> synced in galera_wan
|
||||||
MW-329 : MDEV-35951 Complete freeze during MW-329 test
|
MW-329 : MDEV-35951 Complete freeze during MW-329 test
|
||||||
|
@@ -42,4 +42,3 @@ if ($node_4)
|
|||||||
--connection $node_4
|
--connection $node_4
|
||||||
let $auto_increment_offset_node_4 = `SELECT @@global.auto_increment_offset`;
|
let $auto_increment_offset_node_4 = `SELECT @@global.auto_increment_offset`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -25,4 +25,3 @@ while ($seqno <= $sr_max)
|
|||||||
|
|
||||||
--inc $seqno
|
--inc $seqno
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -118,4 +118,3 @@ SELECT * from t1;
|
|||||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
|
@@ -9,14 +9,14 @@ if (!$wsrep_recover_additional)
|
|||||||
}
|
}
|
||||||
|
|
||||||
--perl
|
--perl
|
||||||
use strict;
|
use strict;
|
||||||
my $wsrep_start_position_str = "grep -a 'WSREP: Recovered position:' $ENV{MYSQL_TMP_DIR}/galera_wsrep_recover.log | sed 's/.*WSREP\:\ Recovered\ position://' | sed 's/^[ \t]*//'";
|
my $wsrep_start_position_str = "grep -a 'WSREP: Recovered position:' $ENV{MYSQL_TMP_DIR}/galera_wsrep_recover.log | sed 's/.*WSREP\:\ Recovered\ position://' | sed 's/^[ \t]*//'";
|
||||||
my $wsrep_start_position = `grep -a 'WSREP: Recovered position:' $ENV{MYSQL_TMP_DIR}/galera_wsrep_recover.log | sed 's/.*WSREP\:\ Recovered\ position://' | sed 's/^[ \t]*//'`;
|
my $wsrep_start_position = `grep -a 'WSREP: Recovered position:' $ENV{MYSQL_TMP_DIR}/galera_wsrep_recover.log | sed 's/.*WSREP\:\ Recovered\ position://' | sed 's/^[ \t]*//'`;
|
||||||
chomp($wsrep_start_position);
|
chomp($wsrep_start_position);
|
||||||
|
|
||||||
die if $wsrep_start_position eq '';
|
die if $wsrep_start_position eq '';
|
||||||
|
|
||||||
open(FILE, ">", "$ENV{MYSQL_TMP_DIR}/galera_wsrep_start_position.inc") or die;
|
open(FILE, ">", "$ENV{MYSQL_TMP_DIR}/galera_wsrep_start_position.inc") or die;
|
||||||
print FILE "--let \$galera_wsrep_start_position = $wsrep_start_position\n";
|
print FILE "--let \$galera_wsrep_start_position = $wsrep_start_position\n";
|
||||||
close FILE;
|
close FILE;
|
||||||
EOF
|
EOF
|
||||||
|
@@ -24,6 +24,6 @@ t1 CREATE TABLE `t1` (
|
|||||||
PRIMARY KEY (`f1`)
|
PRIMARY KEY (`f1`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender (.*) is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender .+ ?is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
||||||
connection node_1;
|
connection node_1;
|
||||||
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=false';
|
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=false';
|
||||||
|
@@ -66,7 +66,7 @@ SHOW STATUS LIKE 'wsrep_desync_count';
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
wsrep_desync_count 0
|
wsrep_desync_count 0
|
||||||
SET @@global.wsrep_desync = 0;
|
SET @@global.wsrep_desync = 0;
|
||||||
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender (.*) is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender .+ ?is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
||||||
connection node_1;
|
connection node_1;
|
||||||
# Wait until both nodes are back to cluster
|
# Wait until both nodes are back to cluster
|
||||||
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=false';
|
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=false';
|
||||||
|
@@ -13,4 +13,4 @@ SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME
|
|||||||
VARIABLE_VALUE
|
VARIABLE_VALUE
|
||||||
Primary
|
Primary
|
||||||
SET SESSION wsrep_sync_wait=DEFAULT;
|
SET SESSION wsrep_sync_wait=DEFAULT;
|
||||||
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender (.*) is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender .+ ?is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
||||||
|
22
mysql-test/suite/galera/r/MDEV-36116.result
Normal file
22
mysql-test/suite/galera/r/MDEV-36116.result
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
connection node_2;
|
||||||
|
connection node_1;
|
||||||
|
connect con1,127.0.0.1,root,,test,$NODE_MYPORT_1;
|
||||||
|
connection node_1;
|
||||||
|
CALL mtr.add_suppression("CREATE TABLE isolation failure");
|
||||||
|
SET DEBUG_SYNC = 'wsrep_kill_thd_before_enter_toi SIGNAL may_kill WAIT_FOR continue';
|
||||||
|
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||||
|
connection con1;
|
||||||
|
SET DEBUG_SYNC = 'now WAIT_FOR may_kill';
|
||||||
|
SET DEBUG_SYNC = 'now SIGNAL continue';
|
||||||
|
connection node_1;
|
||||||
|
ERROR HY000: Lost connection to MySQL server during query
|
||||||
|
connection node_2;
|
||||||
|
SHOW TABLES LIKE 't1';
|
||||||
|
Tables_in_test (t1)
|
||||||
|
connection con1;
|
||||||
|
SHOW TABLES LIKE 't1';
|
||||||
|
Tables_in_test (t1)
|
||||||
|
SET DEBUG_SYNC = 'RESET';
|
||||||
|
disconnect con1;
|
||||||
|
disconnect node_2;
|
||||||
|
disconnect node_1;
|
@@ -13,7 +13,7 @@ connection node_3;
|
|||||||
SELECT @@wsrep_on;
|
SELECT @@wsrep_on;
|
||||||
@@wsrep_on
|
@@wsrep_on
|
||||||
0
|
0
|
||||||
call mtr.add_suppression("Error reading packet from server: WSREP has not yet prepared node for application use (server_errno=1047)");
|
call mtr.add_suppression("Error reading packet from server: WSREP has not yet prepared node for application use \\(server_errno ?= ?1047\\)");
|
||||||
START SLAVE;
|
START SLAVE;
|
||||||
include/wait_for_slave_param.inc [Slave_IO_Running]
|
include/wait_for_slave_param.inc [Slave_IO_Running]
|
||||||
connection node_1;
|
connection node_1;
|
||||||
|
@@ -13,10 +13,13 @@ grant all on *.* to repl2@'%';
|
|||||||
connect replica, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
connect replica, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||||
connection replica;
|
connection replica;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
|
connection primary1;
|
||||||
|
connection primary2;
|
||||||
connection replica;
|
connection replica;
|
||||||
# Galera replica changing master to primary1
|
# Galera replica changing master to primary1
|
||||||
SET @@default_master_connection='stream2';
|
SET @@default_master_connection='stream1';
|
||||||
# Primary node changing master to primary2
|
# Primary node changing master to primary2
|
||||||
|
SET @@default_master_connection='stream2';
|
||||||
START ALL SLAVES;
|
START ALL SLAVES;
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1937 SLAVE 'stream1' started
|
Note 1937 SLAVE 'stream1' started
|
||||||
|
@@ -27,4 +27,5 @@ i
|
|||||||
1
|
1
|
||||||
connection node_1;
|
connection node_1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
SET @@global.wsrep_mode=DEFAULT;
|
||||||
# End of tests.
|
# End of tests.
|
||||||
|
@@ -12,6 +12,7 @@ ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
|||||||
connection replica1;
|
connection replica1;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
connection primary2;
|
connection primary2;
|
||||||
|
connection primary1;
|
||||||
connection replica1;
|
connection replica1;
|
||||||
# Galera replica changing master to primary1
|
# Galera replica changing master to primary1
|
||||||
START SLAVE;
|
START SLAVE;
|
||||||
|
@@ -1,5 +1,8 @@
|
|||||||
connection node_2;
|
connection node_2;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
|
call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to ");
|
||||||
|
connection node_1;
|
||||||
|
connection node_2;
|
||||||
Setting SST method to mysqldump ...
|
Setting SST method to mysqldump ...
|
||||||
call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127\\.0\\.0\\.1'");
|
call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127\\.0\\.0\\.1'");
|
||||||
call mtr.add_suppression("Failed to load slave replication state from table mysql\\.gtid_slave_pos");
|
call mtr.add_suppression("Failed to load slave replication state from table mysql\\.gtid_slave_pos");
|
||||||
@@ -9,9 +12,6 @@ GRANT ALL PRIVILEGES ON *.* TO 'sst';
|
|||||||
SET GLOBAL wsrep_sst_auth = 'sst:';
|
SET GLOBAL wsrep_sst_auth = 'sst:';
|
||||||
connection node_2;
|
connection node_2;
|
||||||
SET GLOBAL wsrep_sst_method = 'mysqldump';
|
SET GLOBAL wsrep_sst_method = 'mysqldump';
|
||||||
call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to ");
|
|
||||||
connection node_1;
|
|
||||||
connection node_2;
|
|
||||||
Performing State Transfer on a server that has been shut down cleanly and restarted
|
Performing State Transfer on a server that has been shut down cleanly and restarted
|
||||||
connection node_1;
|
connection node_1;
|
||||||
CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
|
CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
|
||||||
|
@@ -7,6 +7,7 @@ grant all on *.* to repl@'%';
|
|||||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
connection replica;
|
connection replica;
|
||||||
|
connection primary;
|
||||||
connection replica;
|
connection replica;
|
||||||
START SLAVE;
|
START SLAVE;
|
||||||
connection primary;
|
connection primary;
|
||||||
|
@@ -47,6 +47,9 @@ select NEXT VALUE FOR Seq1_1;
|
|||||||
NEXT VALUE FOR Seq1_1
|
NEXT VALUE FOR Seq1_1
|
||||||
4
|
4
|
||||||
connection node_1;
|
connection node_1;
|
||||||
|
SHOW CREATE SEQUENCE Seq1_1;
|
||||||
|
Table Create Table
|
||||||
|
Seq1_1 CREATE SEQUENCE `Seq1_1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 nocache nocycle ENGINE=InnoDB
|
||||||
DROP SEQUENCE Seq1_1;
|
DROP SEQUENCE Seq1_1;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
CREATE TABLE t2 (d CHAR(1)KEY);
|
CREATE TABLE t2 (d CHAR(1)KEY);
|
||||||
|
152
mysql-test/suite/galera/r/galera_sequences_bf_kill.result
Normal file
152
mysql-test/suite/galera/r/galera_sequences_bf_kill.result
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
connection node_2;
|
||||||
|
connection node_1;
|
||||||
|
connection node_1;
|
||||||
|
CREATE SEQUENCE s INCREMENT=0 CACHE=5 ENGINE=InnoDB;
|
||||||
|
CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 INT) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 VALUES (1, 0), (3, 0);
|
||||||
|
connection node_1;
|
||||||
|
START TRANSACTION;
|
||||||
|
INSERT INTO t1 VALUES (4, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (5, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (6, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (7, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (8, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (9, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (10, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (11, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (12, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (13, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (14, next value for s);
|
||||||
|
SELECT * FROM t1 WHERE f1 > 0 FOR UPDATE;
|
||||||
|
f1 f2
|
||||||
|
1 0
|
||||||
|
3 0
|
||||||
|
4 1
|
||||||
|
5 3
|
||||||
|
6 5
|
||||||
|
7 7
|
||||||
|
8 9
|
||||||
|
9 11
|
||||||
|
10 13
|
||||||
|
11 15
|
||||||
|
12 17
|
||||||
|
13 19
|
||||||
|
14 21
|
||||||
|
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||||
|
SET SESSION wsrep_sync_wait=0;
|
||||||
|
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||||
|
connection node_2;
|
||||||
|
INSERT INTO t1 VALUES (2, 2);
|
||||||
|
connection node_1a;
|
||||||
|
SET SESSION wsrep_on = 0;
|
||||||
|
SET SESSION wsrep_on = 1;
|
||||||
|
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||||
|
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
|
||||||
|
connection node_1;
|
||||||
|
COMMIT;
|
||||||
|
connection node_1a;
|
||||||
|
SET SESSION wsrep_on = 0;
|
||||||
|
SET SESSION wsrep_on = 1;
|
||||||
|
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||||
|
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
|
||||||
|
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||||
|
SET SESSION wsrep_on = 0;
|
||||||
|
SET SESSION wsrep_on = 1;
|
||||||
|
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||||
|
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||||
|
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
|
||||||
|
connection node_1;
|
||||||
|
wsrep_local_replays
|
||||||
|
1
|
||||||
|
INSERT INTO t1 VALUES (22, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (23, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (24, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (25, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (26, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (27, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (28, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (29, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (30, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (31, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (32, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (33, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (34, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (35, next value for s);
|
||||||
|
connection node_1;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
f1 f2
|
||||||
|
1 0
|
||||||
|
2 2
|
||||||
|
3 0
|
||||||
|
4 1
|
||||||
|
5 3
|
||||||
|
6 5
|
||||||
|
7 7
|
||||||
|
8 9
|
||||||
|
9 11
|
||||||
|
10 13
|
||||||
|
11 15
|
||||||
|
12 17
|
||||||
|
13 19
|
||||||
|
14 21
|
||||||
|
22 31
|
||||||
|
23 33
|
||||||
|
24 35
|
||||||
|
25 37
|
||||||
|
26 39
|
||||||
|
27 41
|
||||||
|
28 43
|
||||||
|
29 45
|
||||||
|
30 47
|
||||||
|
31 49
|
||||||
|
32 51
|
||||||
|
33 53
|
||||||
|
34 55
|
||||||
|
35 57
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
LASTVAL(s)
|
||||||
|
57
|
||||||
|
connection node_2;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
f1 f2
|
||||||
|
1 0
|
||||||
|
2 2
|
||||||
|
3 0
|
||||||
|
4 1
|
||||||
|
5 3
|
||||||
|
6 5
|
||||||
|
7 7
|
||||||
|
8 9
|
||||||
|
9 11
|
||||||
|
10 13
|
||||||
|
11 15
|
||||||
|
12 17
|
||||||
|
13 19
|
||||||
|
14 21
|
||||||
|
22 31
|
||||||
|
23 33
|
||||||
|
24 35
|
||||||
|
25 37
|
||||||
|
26 39
|
||||||
|
27 41
|
||||||
|
28 43
|
||||||
|
29 45
|
||||||
|
30 47
|
||||||
|
31 49
|
||||||
|
32 51
|
||||||
|
33 53
|
||||||
|
34 55
|
||||||
|
35 57
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
LASTVAL(s)
|
||||||
|
NULL
|
||||||
|
connection node_1;
|
||||||
|
SELECT NEXTVAL(s);
|
||||||
|
NEXTVAL(s)
|
||||||
|
59
|
||||||
|
connection node_2;
|
||||||
|
SELECT NEXTVAL(s);
|
||||||
|
NEXTVAL(s)
|
||||||
|
62
|
||||||
|
DROP SEQUENCE s;
|
||||||
|
DROP TABLE t1;
|
350
mysql-test/suite/galera/r/galera_sequences_transaction.result
Normal file
350
mysql-test/suite/galera/r/galera_sequences_transaction.result
Normal file
@@ -0,0 +1,350 @@
|
|||||||
|
connection node_2;
|
||||||
|
connection node_1;
|
||||||
|
connection node_1;
|
||||||
|
CREATE SEQUENCE s INCREMENT=0 CACHE=5 ENGINE=InnoDB;
|
||||||
|
CREATE TABLE t1 (f1 INT PRIMARY KEY DEFAULT NEXTVAL(s), f2 INT) ENGINE=InnoDB;
|
||||||
|
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||||
|
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||||
|
connection node_1;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
COMMIT;
|
||||||
|
connection node_2;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
COMMIT;
|
||||||
|
connection node_2a;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
COMMIT;
|
||||||
|
connection node_1a;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
COMMIT;
|
||||||
|
connection node_2;
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
LASTVAL(s)
|
||||||
|
40
|
||||||
|
connection node_1;
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
LASTVAL(s)
|
||||||
|
19
|
||||||
|
connection node_2a;
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
LASTVAL(s)
|
||||||
|
60
|
||||||
|
connection node_1a;
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
LASTVAL(s)
|
||||||
|
79
|
||||||
|
connection node_1;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
f1 f2
|
||||||
|
1 1
|
||||||
|
3 1
|
||||||
|
5 1
|
||||||
|
7 1
|
||||||
|
9 1
|
||||||
|
11 1
|
||||||
|
13 1
|
||||||
|
15 1
|
||||||
|
17 1
|
||||||
|
19 1
|
||||||
|
22 1
|
||||||
|
24 1
|
||||||
|
26 1
|
||||||
|
28 1
|
||||||
|
30 1
|
||||||
|
32 1
|
||||||
|
34 1
|
||||||
|
36 1
|
||||||
|
38 1
|
||||||
|
40 1
|
||||||
|
42 1
|
||||||
|
44 1
|
||||||
|
46 1
|
||||||
|
48 1
|
||||||
|
50 1
|
||||||
|
52 1
|
||||||
|
54 1
|
||||||
|
56 1
|
||||||
|
58 1
|
||||||
|
60 1
|
||||||
|
61 1
|
||||||
|
63 1
|
||||||
|
65 1
|
||||||
|
67 1
|
||||||
|
69 1
|
||||||
|
71 1
|
||||||
|
73 1
|
||||||
|
75 1
|
||||||
|
77 1
|
||||||
|
79 1
|
||||||
|
connection node_2;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
f1 f2
|
||||||
|
1 1
|
||||||
|
3 1
|
||||||
|
5 1
|
||||||
|
7 1
|
||||||
|
9 1
|
||||||
|
11 1
|
||||||
|
13 1
|
||||||
|
15 1
|
||||||
|
17 1
|
||||||
|
19 1
|
||||||
|
22 1
|
||||||
|
24 1
|
||||||
|
26 1
|
||||||
|
28 1
|
||||||
|
30 1
|
||||||
|
32 1
|
||||||
|
34 1
|
||||||
|
36 1
|
||||||
|
38 1
|
||||||
|
40 1
|
||||||
|
42 1
|
||||||
|
44 1
|
||||||
|
46 1
|
||||||
|
48 1
|
||||||
|
50 1
|
||||||
|
52 1
|
||||||
|
54 1
|
||||||
|
56 1
|
||||||
|
58 1
|
||||||
|
60 1
|
||||||
|
61 1
|
||||||
|
63 1
|
||||||
|
65 1
|
||||||
|
67 1
|
||||||
|
69 1
|
||||||
|
71 1
|
||||||
|
73 1
|
||||||
|
75 1
|
||||||
|
77 1
|
||||||
|
79 1
|
||||||
|
connection node_1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
DROP SEQUENCE s;
|
||||||
|
connection node_1;
|
||||||
|
CREATE SEQUENCE s INCREMENT=0 CACHE=5 ENGINE=InnoDB;
|
||||||
|
CREATE TABLE t1 (f1 INT PRIMARY KEY DEFAULT NEXTVAL(s), f2 INT) ENGINE=InnoDB;
|
||||||
|
connection node_1;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
ROLLBACK;
|
||||||
|
connection node_2;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
ROLLBACK;
|
||||||
|
connection node_2a;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
ROLLBACK;
|
||||||
|
connection node_1a;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
ROLLBACK;
|
||||||
|
connection node_2;
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
LASTVAL(s)
|
||||||
|
20
|
||||||
|
connection node_1;
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
LASTVAL(s)
|
||||||
|
19
|
||||||
|
connection node_2a;
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
LASTVAL(s)
|
||||||
|
40
|
||||||
|
connection node_1a;
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
LASTVAL(s)
|
||||||
|
39
|
||||||
|
connection node_1;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
f1 f2
|
||||||
|
connection node_2;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
f1 f2
|
||||||
|
connection node_1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
DROP SEQUENCE s;
|
||||||
|
connection node_1;
|
||||||
|
CREATE SEQUENCE s INCREMENT=0 CACHE=5 ENGINE=InnoDB;
|
||||||
|
CREATE TABLE t1 (f1 INT PRIMARY KEY DEFAULT NEXTVAL(s), f2 INT) ENGINE=InnoDB;
|
||||||
|
connection node_1;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
connection node_1a;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
connection node_2a;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
connection node_2;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
connection node_1;
|
||||||
|
COMMIT;
|
||||||
|
connection node_1a;
|
||||||
|
ROLLBACK;
|
||||||
|
connection node_2;
|
||||||
|
COMMIT;
|
||||||
|
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||||
|
connection node_2a;
|
||||||
|
ROLLBACK;
|
||||||
|
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||||
|
connection node_2;
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
LASTVAL(s)
|
||||||
|
40
|
||||||
|
connection node_1;
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
LASTVAL(s)
|
||||||
|
19
|
||||||
|
connection node_2a;
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
LASTVAL(s)
|
||||||
|
20
|
||||||
|
connection node_1a;
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
LASTVAL(s)
|
||||||
|
39
|
||||||
|
connection node_1;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
f1 f2
|
||||||
|
1 1
|
||||||
|
3 1
|
||||||
|
5 1
|
||||||
|
7 1
|
||||||
|
9 1
|
||||||
|
11 1
|
||||||
|
13 1
|
||||||
|
15 1
|
||||||
|
17 1
|
||||||
|
19 1
|
||||||
|
connection node_2;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
f1 f2
|
||||||
|
1 1
|
||||||
|
3 1
|
||||||
|
5 1
|
||||||
|
7 1
|
||||||
|
9 1
|
||||||
|
11 1
|
||||||
|
13 1
|
||||||
|
15 1
|
||||||
|
17 1
|
||||||
|
19 1
|
||||||
|
connection node_1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
DROP SEQUENCE s;
|
@@ -1,7 +1,7 @@
|
|||||||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
|
||||||
connection node_2a;
|
|
||||||
connection node_2;
|
connection node_2;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
|
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||||
|
connection node_2a;
|
||||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||||
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
||||||
connection node_3;
|
connection node_3;
|
||||||
|
@@ -2,6 +2,7 @@ connection node_2;
|
|||||||
connection node_1;
|
connection node_1;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
|
connection node_2;
|
||||||
call mtr.add_suppression("WSREP: TO isolation failed for: ");
|
call mtr.add_suppression("WSREP: TO isolation failed for: ");
|
||||||
connection node_1;
|
connection node_1;
|
||||||
call mtr.add_suppression("CREATE TABLE isolation failure");
|
call mtr.add_suppression("CREATE TABLE isolation failure");
|
||||||
|
@@ -1,5 +1,8 @@
|
|||||||
connection node_2;
|
connection node_2;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
|
SELECT COUNT(*) `expect 0` FROM performance_schema.socket_instances WHERE EVENT_NAME LIKE '%wsrep%';
|
||||||
|
expect 0
|
||||||
|
0
|
||||||
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
|
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
|
||||||
VARIABLE_VALUE = 'Synced'
|
VARIABLE_VALUE = 'Synced'
|
||||||
1
|
1
|
||||||
|
@@ -1,5 +1,8 @@
|
|||||||
connection node_2;
|
connection node_2;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
|
SELECT COUNT(*) `expect 0` FROM performance_schema.socket_instances WHERE EVENT_NAME LIKE '%wsrep%';
|
||||||
|
expect 0
|
||||||
|
0
|
||||||
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
|
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
|
||||||
VARIABLE_VALUE = 'Synced'
|
VARIABLE_VALUE = 'Synced'
|
||||||
1
|
1
|
||||||
|
@@ -1,5 +1,8 @@
|
|||||||
connection node_2;
|
connection node_2;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
|
SELECT COUNT(*) `expect 0` FROM performance_schema.socket_instances WHERE EVENT_NAME LIKE '%wsrep%';
|
||||||
|
expect 0
|
||||||
|
0
|
||||||
connection node_1;
|
connection node_1;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
|
@@ -52,8 +52,8 @@ EXPECT_0
|
|||||||
0
|
0
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM;
|
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=MyISAM;
|
||||||
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
|
CREATE TABLE t2 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
INSERT INTO t1 VALUES (1);
|
INSERT INTO t1 VALUES (1);
|
||||||
@@ -224,15 +224,26 @@ id b
|
|||||||
DROP TRIGGER tr1;
|
DROP TRIGGER tr1;
|
||||||
DROP TRIGGER tr2;
|
DROP TRIGGER tr2;
|
||||||
DROP TRIGGER tr3;
|
DROP TRIGGER tr3;
|
||||||
DROP TABLE t1,t2;
|
DROP TABLE t1, t2;
|
||||||
|
CREATE TABLE t1 (a INT, b INT, UNIQUE(a)) ENGINE=MyISAM;
|
||||||
|
CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.a=1;
|
||||||
|
INSERT INTO t1 (a,b) VALUES (10,20);
|
||||||
|
connection node_2;
|
||||||
|
SELECT * from t1;
|
||||||
|
a b
|
||||||
|
1 20
|
||||||
|
connection node_1;
|
||||||
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
# MDEV-11152: wsrep_replicate_myisam: SELECT gets replicated using TO
|
# MDEV-11152: wsrep_replicate_myisam: SELECT gets replicated using TO
|
||||||
#
|
#
|
||||||
connection node_1;
|
connection node_1;
|
||||||
CREATE TABLE t1 (i INT) ENGINE=INNODB;
|
CREATE TABLE t1 (i INT NOT NULL PRIMARY KEY) ENGINE=INNODB;
|
||||||
INSERT INTO t1 VALUES(1);
|
INSERT INTO t1 VALUES(1);
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
i
|
i
|
||||||
1
|
1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
connection node_1;
|
SET GLOBAL wsrep_mode = DEFAULT;
|
||||||
|
connection node_2;
|
||||||
|
SET GLOBAL wsrep_mode = DEFAULT;
|
||||||
|
@@ -2,7 +2,7 @@ connection node_2;
|
|||||||
connection node_1;
|
connection node_1;
|
||||||
CALL mtr.add_suppression("WSREP: Stray state UUID msg: ");
|
CALL mtr.add_suppression("WSREP: Stray state UUID msg: ");
|
||||||
CALL mtr.add_suppression("WSREP: .*Sending JOIN failed: ");
|
CALL mtr.add_suppression("WSREP: .*Sending JOIN failed: ");
|
||||||
CALL mtr.add_suppression("WSREP: .*sending install message failed: Socket is not connected");
|
CALL mtr.add_suppression("WSREP: .*sending install message failed: (Transport endpoint|Socket) is not connected");
|
||||||
CALL mtr.add_suppression("WSREP: .*There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
|
CALL mtr.add_suppression("WSREP: .*There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
|
||||||
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||||
VARIABLE_VALUE = 4
|
VARIABLE_VALUE = 4
|
||||||
|
@@ -48,7 +48,7 @@ SET @@global.wsrep_desync = 0;
|
|||||||
SET SESSION wsrep_sync_wait=15;
|
SET SESSION wsrep_sync_wait=15;
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender (.*) is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender .+ ?is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
||||||
|
|
||||||
--connection node_1
|
--connection node_1
|
||||||
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
--source include/galera_cluster.inc
|
--source include/galera_cluster.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
--exec rm -rf $MYSQLTEST_VARDIR/mysqld.2/data/GRA_*.log
|
--exec rm -rf $MYSQLTEST_VARDIR/mysqld.2/data/GRA_*.log
|
||||||
|
|
||||||
@@ -30,5 +31,6 @@ SELECT * FROM t1;
|
|||||||
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
CALL mtr.add_suppression("Ignoring error 'Unknown table 'test\\.t1'' on query");
|
CALL mtr.add_suppression("Ignoring error 'Unknown table 'test\\.t1'' on query");
|
||||||
|
|
||||||
--connection node_2
|
--connection node_2
|
||||||
CALL mtr.add_suppression("Error 'Unknown table 'test\\.t1'' on query");
|
CALL mtr.add_suppression("Error 'Unknown table 'test\\.t1'' on query");
|
||||||
|
@@ -77,7 +77,7 @@ SET @@global.wsrep_desync = 0;
|
|||||||
--let $wait_condition = 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
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender (.*) is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender .+ ?is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
||||||
|
|
||||||
--connection node_1
|
--connection node_1
|
||||||
--echo # Wait until both nodes are back to cluster
|
--echo # Wait until both nodes are back to cluster
|
||||||
|
@@ -33,5 +33,4 @@ INSERT INTO t2 VALUES (4);
|
|||||||
INSERT INTO t2 VALUES (5);
|
INSERT INTO t2 VALUES (5);
|
||||||
--error ER_LOCK_DEADLOCK
|
--error ER_LOCK_DEADLOCK
|
||||||
CREATE VIEW v1 AS SELECT c1 FROM t1 WHERE c1 IN (SELECT a FROM t2) GROUP BY c1;
|
CREATE VIEW v1 AS SELECT c1 FROM t1 WHERE c1 IN (SELECT a FROM t2) GROUP BY c1;
|
||||||
|
|
||||||
DROP TABLE t1,t2;
|
DROP TABLE t1,t2;
|
||||||
|
@@ -39,6 +39,7 @@ while ($counter) {
|
|||||||
--disable_result_log
|
--disable_result_log
|
||||||
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3;
|
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3;
|
||||||
START SLAVE;
|
START SLAVE;
|
||||||
|
|
||||||
--eval SELECT MASTER_GTID_WAIT('$gtid', 600)
|
--eval SELECT MASTER_GTID_WAIT('$gtid', 600)
|
||||||
--enable_result_log
|
--enable_result_log
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
@@ -25,7 +25,6 @@ SET SESSION wsrep_sync_wait=DEFAULT;
|
|||||||
--error ER_LOCK_WAIT_TIMEOUT
|
--error ER_LOCK_WAIT_TIMEOUT
|
||||||
DELETE FROM mysql.wsrep_streaming_log;
|
DELETE FROM mysql.wsrep_streaming_log;
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Reconnect to the cluster
|
# Reconnect to the cluster
|
||||||
#
|
#
|
||||||
@@ -36,6 +35,5 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
|
|||||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
|
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
|
||||||
SET SESSION wsrep_sync_wait=DEFAULT;
|
SET SESSION wsrep_sync_wait=DEFAULT;
|
||||||
|
|
||||||
|
|
||||||
--source include/auto_increment_offset_restore.inc
|
--source include/auto_increment_offset_restore.inc
|
||||||
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender (.*) is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender .+ ?is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
||||||
|
43
mysql-test/suite/galera/t/MDEV-36116.test
Normal file
43
mysql-test/suite/galera/t/MDEV-36116.test
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
#
|
||||||
|
# MDEV-36116: TOI crashes in debug assert if executing thread is killed.
|
||||||
|
#
|
||||||
|
|
||||||
|
--source include/galera_cluster.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
--source include/have_debug_sync.inc
|
||||||
|
--source include/have_debug.inc
|
||||||
|
|
||||||
|
--connect con1,127.0.0.1,root,,test,$NODE_MYPORT_1
|
||||||
|
|
||||||
|
# Start TOI operation and wait for the thread to be killed.
|
||||||
|
--connection node_1
|
||||||
|
CALL mtr.add_suppression("CREATE TABLE isolation failure");
|
||||||
|
|
||||||
|
--let $connection_id = `SELECT CONNECTION_ID()`
|
||||||
|
SET DEBUG_SYNC = 'wsrep_kill_thd_before_enter_toi SIGNAL may_kill WAIT_FOR continue';
|
||||||
|
--send
|
||||||
|
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
# Kill the thread and let it continue.
|
||||||
|
--connection con1
|
||||||
|
SET DEBUG_SYNC = 'now WAIT_FOR may_kill';
|
||||||
|
--disable_query_log
|
||||||
|
--eval KILL CONNECTION $connection_id
|
||||||
|
--enable_query_log
|
||||||
|
SET DEBUG_SYNC = 'now SIGNAL continue';
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
--error 2013
|
||||||
|
--reap
|
||||||
|
|
||||||
|
# Verify no tables created on either nodes.
|
||||||
|
--connection node_2
|
||||||
|
SHOW TABLES LIKE 't1';
|
||||||
|
|
||||||
|
--connection con1
|
||||||
|
SHOW TABLES LIKE 't1';
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
SET DEBUG_SYNC = 'RESET';
|
||||||
|
--disconnect con1
|
||||||
|
--source include/galera_end.inc
|
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
--connection node_2
|
--connection node_2
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3, MASTER_USE_GTID=slave_pos;
|
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3, master_use_gtid=slave_pos;
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
START SLAVE;
|
START SLAVE;
|
||||||
|
|
||||||
|
@@ -2,15 +2,16 @@
|
|||||||
# MW-284 Slave I/O retry on ER_COM_UNKNOWN_ERROR
|
# MW-284 Slave I/O retry on ER_COM_UNKNOWN_ERROR
|
||||||
#
|
#
|
||||||
|
|
||||||
--source include/have_log_bin.inc
|
|
||||||
--source include/galera_cluster.inc
|
--source include/galera_cluster.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
--source include/have_log_bin.inc
|
||||||
|
|
||||||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||||
call mtr.add_suppression("\\[ERROR\\] Error reading packet from server: WSREP has not yet prepared node for application use ");
|
call mtr.add_suppression("\\[ERROR\\] Error reading packet from server: WSREP has not yet prepared node for application use ");
|
||||||
call mtr.add_suppression("WSREP has not yet prepared node for application use");
|
call mtr.add_suppression("WSREP has not yet prepared node for application use");
|
||||||
|
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_1, MASTER_USER='root', MASTER_CONNECT_RETRY=1;
|
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1, master_connect_retry=1;
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
|
||||||
--connection node_1
|
--connection node_1
|
||||||
@@ -29,7 +30,7 @@ SET global wsrep_sync_wait=0;
|
|||||||
--connection node_3
|
--connection node_3
|
||||||
SELECT @@wsrep_on;
|
SELECT @@wsrep_on;
|
||||||
--sleep 1
|
--sleep 1
|
||||||
call mtr.add_suppression("Error reading packet from server: WSREP has not yet prepared node for application use (server_errno=1047)");
|
call mtr.add_suppression("Error reading packet from server: WSREP has not yet prepared node for application use \\(server_errno ?= ?1047\\)");
|
||||||
START SLAVE;
|
START SLAVE;
|
||||||
--let $slave_param= Slave_IO_Running
|
--let $slave_param= Slave_IO_Running
|
||||||
--let $slave_param_value= Connecting
|
--let $slave_param_value= Connecting
|
||||||
|
@@ -41,17 +41,19 @@ grant all on *.* to repl2@'%';
|
|||||||
|
|
||||||
--let $node_1 = replica
|
--let $node_1 = replica
|
||||||
--let $node_2 = node_2
|
--let $node_2 = node_2
|
||||||
|
--let $node_3 = primary1
|
||||||
|
--let $node_4 = primary2
|
||||||
--source include/auto_increment_offset_save.inc
|
--source include/auto_increment_offset_save.inc
|
||||||
|
|
||||||
--connection replica
|
--connection replica
|
||||||
--echo # Galera replica changing master to primary1
|
--echo # Galera replica changing master to primary1
|
||||||
--disable_query_log
|
|
||||||
SET @@default_master_connection='stream1';
|
SET @@default_master_connection='stream1';
|
||||||
|
--disable_query_log
|
||||||
--eval CHANGE MASTER 'stream1' TO master_host='127.0.0.1', master_user='repl', master_password='repl', master_port=$NODE_MYPORT_3, master_use_gtid=slave_pos;
|
--eval CHANGE MASTER 'stream1' TO master_host='127.0.0.1', master_user='repl', master_password='repl', master_port=$NODE_MYPORT_3, master_use_gtid=slave_pos;
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
|
||||||
SET @@default_master_connection='stream2';
|
|
||||||
--echo # Primary node changing master to primary2
|
--echo # Primary node changing master to primary2
|
||||||
|
SET @@default_master_connection='stream2';
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
--eval CHANGE MASTER 'stream2' TO master_host='127.0.0.1', master_user='repl2', master_password='repl2', master_port=$NODE_MYPORT_4, master_use_gtid=slave_pos;
|
--eval CHANGE MASTER 'stream2' TO master_host='127.0.0.1', master_user='repl2', master_password='repl2', master_port=$NODE_MYPORT_4, master_use_gtid=slave_pos;
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
@@ -17,9 +17,10 @@
|
|||||||
|
|
||||||
--connection node_2
|
--connection node_2
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_4, MASTER_USER='root';
|
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_4;
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
START SLAVE;
|
START SLAVE;
|
||||||
|
|
||||||
SET SESSION wsrep_sync_wait = 0;
|
SET SESSION wsrep_sync_wait = 0;
|
||||||
|
|
||||||
--connection node_4
|
--connection node_4
|
||||||
|
@@ -38,8 +38,6 @@ SELECT * FROM t1;
|
|||||||
--connection node_1
|
--connection node_1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
--disable_query_log
|
|
||||||
SET @@global.wsrep_mode=DEFAULT;
|
SET @@global.wsrep_mode=DEFAULT;
|
||||||
--enable_query_log
|
|
||||||
|
|
||||||
--echo # End of tests.
|
--echo # End of tests.
|
||||||
|
@@ -45,6 +45,7 @@ ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
|||||||
--let $node_1 = replica1
|
--let $node_1 = replica1
|
||||||
--let $node_2 = node_2
|
--let $node_2 = node_2
|
||||||
--let $node_3 = primary2
|
--let $node_3 = primary2
|
||||||
|
--let $node_4 = primary1
|
||||||
--source include/auto_increment_offset_save.inc
|
--source include/auto_increment_offset_save.inc
|
||||||
|
|
||||||
--connection replica1
|
--connection replica1
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
--source include/force_restart.inc
|
--source include/force_restart.inc
|
||||||
|
|
||||||
# Make sure that the test is operating on the right version of galera library.
|
# Make sure that the test is operating on the right version of galera library.
|
||||||
--let $galera_version=26.4.11
|
--let $galera_version=26.4.21
|
||||||
source ../wsrep/include/check_galera_version.inc;
|
source ../wsrep/include/check_galera_version.inc;
|
||||||
|
|
||||||
# Global Variables
|
# Global Variables
|
||||||
|
9
mysql-test/suite/galera/t/galera_fk_truncate.cnf
Normal file
9
mysql-test/suite/galera/t/galera_fk_truncate.cnf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
!include ../galera_2nodes.cnf
|
||||||
|
|
||||||
|
[mysqld.1]
|
||||||
|
auto_increment_offset=1
|
||||||
|
auto_increment_increment=1
|
||||||
|
|
||||||
|
[mysqld.2]
|
||||||
|
auto_increment_offset=2
|
||||||
|
auto_increment_increment=1
|
@@ -3,6 +3,7 @@
|
|||||||
# PXC-391
|
# PXC-391
|
||||||
|
|
||||||
--source include/galera_cluster.inc
|
--source include/galera_cluster.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
--source include/have_query_cache.inc
|
--source include/have_query_cache.inc
|
||||||
|
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
@@ -72,7 +73,6 @@ SELECT COUNT(*) AS EXPECT_10 FROM x1;
|
|||||||
SELECT COUNT(*) AS EXPECT_10000 FROM t2;
|
SELECT COUNT(*) AS EXPECT_10000 FROM t2;
|
||||||
SELECT COUNT(*) AS EXPECT_10 FROM x2;
|
SELECT COUNT(*) AS EXPECT_10 FROM x2;
|
||||||
|
|
||||||
|
|
||||||
--connection node_1
|
--connection node_1
|
||||||
DROP TABLE t1, t2, x1, x2;
|
DROP TABLE t1, t2, x1, x2;
|
||||||
CREATE TABLE t1 (f1 INTEGER);
|
CREATE TABLE t1 (f1 INTEGER);
|
||||||
@@ -144,4 +144,3 @@ DROP TABLE t1, t2, x1, x2;
|
|||||||
--disable_query_log
|
--disable_query_log
|
||||||
SET GLOBAL wsrep_mode = DEFAULT;
|
SET GLOBAL wsrep_mode = DEFAULT;
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
!include ../galera_2nodes.cnf
|
!include ../galera_2nodes.cnf
|
||||||
|
|
||||||
[mysqld.1]
|
[mysqld.1]
|
||||||
wsrep_provider_options='gcache.recover=yes;pc.ignore_sb=true;repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;pc.wait_prim_timeout=PT60S'
|
wsrep_provider_options='gcache.recover=yes;gcache.size=128M;pc.ignore_sb=true;repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;pc.wait_prim_timeout=PT60S'
|
||||||
|
|
||||||
[mysqld.2]
|
[mysqld.2]
|
||||||
wsrep_provider_options='gcache.recover=yes;repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;pc.wait_prim_timeout=PT60S'
|
wsrep_provider_options='gcache.recover=yes;gcache.size=128M;repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;pc.wait_prim_timeout=PT60S'
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
--source include/galera_cluster.inc
|
--source include/galera_cluster.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
--source include/big_test.inc
|
--source include/big_test.inc
|
||||||
|
|
||||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
[mysqld.1]
|
[mysqld.1]
|
||||||
max_allowed_packet=10M
|
max_allowed_packet=10M
|
||||||
innodb_log_file_size=220M
|
innodb_log_file_size=220M
|
||||||
wsrep_provider_options='gcache.recover=yes;pc.ignore_sb=true;repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;pc.wait_prim_timeout=PT60S;gcache.size=10M'
|
wsrep_provider_options='gcache.recover=yes;gcache.size=10M;pc.ignore_sb=true;repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;pc.wait_prim_timeout=PT60S'
|
||||||
|
|
||||||
[mysqld.2]
|
[mysqld.2]
|
||||||
wsrep_provider_options='gcache.recover=yes;pc.ignore_sb=true;repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;pc.wait_prim_timeout=PT60S;gcache.size=10M'
|
wsrep_provider_options='gcache.recover=yes;gcache.size=10M;pc.ignore_sb=true;repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;pc.wait_prim_timeout=PT60S'
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
--source include/galera_cluster.inc
|
--source include/galera_cluster.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
--source include/big_test.inc
|
--source include/big_test.inc
|
||||||
|
|
||||||
SET SESSION wsrep_sync_wait = 0;
|
SET SESSION wsrep_sync_wait = 0;
|
||||||
|
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
[mysqld.1]
|
[mysqld.1]
|
||||||
innodb_log_file_size=220M
|
innodb_log_file_size=220M
|
||||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.recover=yes;pc.ignore_sb=true;'
|
wsrep_provider_options='gcache.recover=yes;gcache.size=128M;pc.ignore_sb=true;repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;pc.wait_prim_timeout=PT60S'
|
||||||
|
|
||||||
[mysqld.2]
|
[mysqld.2]
|
||||||
innodb_log_file_size=220M
|
innodb_log_file_size=220M
|
||||||
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.recover=yes;pc.ignore_sb=true;'
|
wsrep_provider_options='gcache.recover=yes;gcache.size=128M;pc.ignore_sb=true;repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;pc.wait_prim_timeout=PT60S'
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
--source include/galera_cluster.inc
|
--source include/galera_cluster.inc
|
||||||
--source include/big_test.inc
|
--source include/big_test.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
--source include/have_log_bin.inc
|
--source include/have_log_bin.inc
|
||||||
|
|
||||||
SET SESSION wsrep_sync_wait = 0;
|
SET SESSION wsrep_sync_wait = 0;
|
||||||
|
@@ -13,6 +13,7 @@
|
|||||||
# As node #3 is not a Galera node, and galera_cluster.inc does not open connetion to it
|
# 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
|
# we open the node_3 connection here
|
||||||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||||
|
|
||||||
--echo #Connection 2
|
--echo #Connection 2
|
||||||
--connection node_2
|
--connection node_2
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
@@ -30,6 +31,7 @@ INSERT INTO t2 VALUES(3,33);
|
|||||||
|
|
||||||
SELECT @@global.gtid_binlog_state;
|
SELECT @@global.gtid_binlog_state;
|
||||||
--source include/save_master_gtid.inc
|
--source include/save_master_gtid.inc
|
||||||
|
|
||||||
--echo #Connection 2
|
--echo #Connection 2
|
||||||
--connection node_2
|
--connection node_2
|
||||||
--source include/sync_with_master_gtid.inc
|
--source include/sync_with_master_gtid.inc
|
||||||
@@ -39,6 +41,7 @@ INSERT INTO t2 VALUES(4,44);
|
|||||||
INSERT INTO t2 VALUES(5,55);
|
INSERT INTO t2 VALUES(5,55);
|
||||||
INSERT INTO t2 VALUES(6,66);
|
INSERT INTO t2 VALUES(6,66);
|
||||||
SELECT @@global.gtid_binlog_state;
|
SELECT @@global.gtid_binlog_state;
|
||||||
|
|
||||||
--echo #Connection 1
|
--echo #Connection 1
|
||||||
--connection node_1
|
--connection node_1
|
||||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME= 't2';
|
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME= 't2';
|
||||||
@@ -60,6 +63,7 @@ INSERT INTO t1 VALUES ('node1_committed_before');
|
|||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
--source include/save_master_gtid.inc
|
--source include/save_master_gtid.inc
|
||||||
|
|
||||||
--echo #Connection 2
|
--echo #Connection 2
|
||||||
--connection node_2
|
--connection node_2
|
||||||
--source include/sync_with_master_gtid.inc
|
--source include/sync_with_master_gtid.inc
|
||||||
@@ -68,6 +72,7 @@ START TRANSACTION;
|
|||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
--echo #Connection 1
|
--echo #Connection 1
|
||||||
--connection node_1
|
--connection node_1
|
||||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME= 't1';
|
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME= 't1';
|
||||||
@@ -77,10 +82,12 @@ COMMIT;
|
|||||||
--let $node_1= node_1
|
--let $node_1= node_1
|
||||||
--let $node_2= node_2
|
--let $node_2= node_2
|
||||||
--source include/auto_increment_offset_save.inc
|
--source include/auto_increment_offset_save.inc
|
||||||
|
|
||||||
--echo #Connection 2
|
--echo #Connection 2
|
||||||
--connection node_2
|
--connection node_2
|
||||||
--echo Shutting down server ...
|
--echo Shutting down server ...
|
||||||
--source include/shutdown_mysqld.inc
|
--source include/shutdown_mysqld.inc
|
||||||
|
|
||||||
--echo #Connection 1
|
--echo #Connection 1
|
||||||
--connection node_1
|
--connection node_1
|
||||||
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
|
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
|
||||||
@@ -90,6 +97,7 @@ START TRANSACTION;
|
|||||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
--echo #Connection 2
|
--echo #Connection 2
|
||||||
--connection node_2
|
--connection node_2
|
||||||
--echo Starting server ...
|
--echo Starting server ...
|
||||||
@@ -103,11 +111,13 @@ START TRANSACTION;
|
|||||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
--echo #Connection 1
|
--echo #Connection 1
|
||||||
--connection node_1
|
--connection node_1
|
||||||
--let $wait_condition = SELECT COUNT(*) = 8 FROM t1;
|
--let $wait_condition = SELECT COUNT(*) = 8 FROM t1;
|
||||||
--source include/wait_condition.inc
|
--source include/wait_condition.inc
|
||||||
Select * from t1 order by f1;
|
Select * from t1 order by f1;
|
||||||
|
|
||||||
--echo #Connection 2
|
--echo #Connection 2
|
||||||
--connection node_2
|
--connection node_2
|
||||||
Select * from t1 order by f1;
|
Select * from t1 order by f1;
|
||||||
@@ -153,12 +163,14 @@ start slave;
|
|||||||
INSERT INTO t1 VALUES ('node2_slave_started');
|
INSERT INTO t1 VALUES ('node2_slave_started');
|
||||||
SELECT count(*) from t1;
|
SELECT count(*) from t1;
|
||||||
SELECT @@global.gtid_binlog_state;
|
SELECT @@global.gtid_binlog_state;
|
||||||
|
|
||||||
--echo #Connection 1
|
--echo #Connection 1
|
||||||
--connection node_1
|
--connection node_1
|
||||||
--let $wait_condition = SELECT COUNT(*) = 12 FROM t1;
|
--let $wait_condition = SELECT COUNT(*) = 12 FROM t1;
|
||||||
--source include/wait_condition.inc
|
--source include/wait_condition.inc
|
||||||
SELECT count(*) from t1;
|
SELECT count(*) from t1;
|
||||||
SELECT @@global.gtid_binlog_state;
|
SELECT @@global.gtid_binlog_state;
|
||||||
|
|
||||||
--echo #Connection 3
|
--echo #Connection 3
|
||||||
--connection node_3
|
--connection node_3
|
||||||
DROP TABLE t2,t1;
|
DROP TABLE t2,t1;
|
||||||
@@ -173,10 +185,12 @@ DROP TABLE t2,t1;
|
|||||||
--connection node_2
|
--connection node_2
|
||||||
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2';
|
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2';
|
||||||
--source include/wait_condition.inc
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
--echo #Connection 1
|
--echo #Connection 1
|
||||||
--connection node_1
|
--connection node_1
|
||||||
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
|
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
|
||||||
--source include/wait_condition.inc
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
--echo #Connection 2
|
--echo #Connection 2
|
||||||
--connection node_2
|
--connection node_2
|
||||||
STOP SLAVE;
|
STOP SLAVE;
|
||||||
@@ -194,6 +208,7 @@ set global gtid_slave_pos="";
|
|||||||
set global wsrep_on=OFF;
|
set global wsrep_on=OFF;
|
||||||
reset master;
|
reset master;
|
||||||
set global wsrep_on=ON;
|
set global wsrep_on=ON;
|
||||||
|
|
||||||
--echo #Connection 3
|
--echo #Connection 3
|
||||||
--connection node_3
|
--connection node_3
|
||||||
reset master;
|
reset master;
|
||||||
|
@@ -2,14 +2,14 @@
|
|||||||
--source include/galera_cluster.inc
|
--source include/galera_cluster.inc
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
--source suite/galera/include/galera_sst_set_mysqldump.inc
|
|
||||||
|
|
||||||
call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to ");
|
call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to ");
|
||||||
|
|
||||||
--let $node_1=node_1
|
--let $node_1=node_1
|
||||||
--let $node_2=node_2
|
--let $node_2=node_2
|
||||||
--source include/auto_increment_offset_save.inc
|
--source include/auto_increment_offset_save.inc
|
||||||
|
|
||||||
|
--source suite/galera/include/galera_sst_set_mysqldump.inc
|
||||||
|
|
||||||
# mysql-wsrep#33 - nnoDB: Failing assertion: xid_seqno > trx_sys_cur_xid_seqno in trx_sys_update_wsrep_checkpoint with mysqldump IST
|
# mysql-wsrep#33 - nnoDB: Failing assertion: xid_seqno > trx_sys_cur_xid_seqno in trx_sys_update_wsrep_checkpoint with mysqldump IST
|
||||||
# --source suite/galera/include/galera_st_disconnect_slave.inc
|
# --source suite/galera/include/galera_st_disconnect_slave.inc
|
||||||
|
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
--source include/galera_cluster.inc
|
--source include/galera_cluster.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
# Save original auto_increment_offset values.
|
# Save original auto_increment_offset values.
|
||||||
--let $node_1=node_1
|
--let $node_1=node_1
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
--source include/big_test.inc
|
--source include/big_test.inc
|
||||||
--source include/galera_cluster.inc
|
--source include/galera_cluster.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
# Save original auto_increment_offset values.
|
# Save original auto_increment_offset values.
|
||||||
--let $node_1=node_1
|
--let $node_1=node_1
|
||||||
|
@@ -29,7 +29,7 @@ call mtr.add_suppression("WSREP: Ignoring server id .* for non bootstrap node");
|
|||||||
--connection node_3
|
--connection node_3
|
||||||
|
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
--eval CHANGE MASTER TO master_host='127.0.0.1', master_user='root', MASTER_PORT=$NODE_MYPORT_1, master_use_gtid=current_pos
|
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1, master_use_gtid=current_pos;
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
START SLAVE;
|
START SLAVE;
|
||||||
--source include/wait_for_slave_to_start.inc
|
--source include/wait_for_slave_to_start.inc
|
||||||
|
@@ -40,6 +40,7 @@ ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
|||||||
|
|
||||||
--let $node_1 = node_1
|
--let $node_1 = node_1
|
||||||
--let $node_2 = replica
|
--let $node_2 = replica
|
||||||
|
--let $node_3 = primary
|
||||||
--source include/auto_increment_offset_save.inc
|
--source include/auto_increment_offset_save.inc
|
||||||
|
|
||||||
--connection replica
|
--connection replica
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
--source include/have_sequence.inc
|
--source include/have_sequence.inc
|
||||||
--source include/have_aria.inc
|
--source include/have_aria.inc
|
||||||
|
|
||||||
|
--disable_ps2_protocol
|
||||||
#
|
#
|
||||||
# MDEV-19353 : Alter Sequence do not replicate to another nodes with in Galera Cluster
|
# MDEV-19353 : Alter Sequence do not replicate to another nodes with in Galera Cluster
|
||||||
#
|
#
|
||||||
@@ -47,6 +48,7 @@ SHOW CREATE SEQUENCE Seq1_1;
|
|||||||
select NEXT VALUE FOR Seq1_1;
|
select NEXT VALUE FOR Seq1_1;
|
||||||
|
|
||||||
--connection node_1
|
--connection node_1
|
||||||
|
SHOW CREATE SEQUENCE Seq1_1;
|
||||||
DROP SEQUENCE Seq1_1;
|
DROP SEQUENCE Seq1_1;
|
||||||
|
|
||||||
#
|
#
|
||||||
|
9
mysql-test/suite/galera/t/galera_sequences_bf_kill.cnf
Normal file
9
mysql-test/suite/galera/t/galera_sequences_bf_kill.cnf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
!include ../galera_2nodes.cnf
|
||||||
|
|
||||||
|
[mysqld.1]
|
||||||
|
auto-increment-increment=2
|
||||||
|
auto-increment-offset=1
|
||||||
|
|
||||||
|
[mysqld.2]
|
||||||
|
auto-increment-increment=2
|
||||||
|
auto-increment-offset=2
|
@@ -0,0 +1,5 @@
|
|||||||
|
[binlogon]
|
||||||
|
log-bin
|
||||||
|
log-slave-updates
|
||||||
|
|
||||||
|
[binlogoff]
|
115
mysql-test/suite/galera/t/galera_sequences_bf_kill.test
Normal file
115
mysql-test/suite/galera/t/galera_sequences_bf_kill.test
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
--source include/galera_cluster.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
--source include/have_debug.inc
|
||||||
|
--source include/have_debug_sync.inc
|
||||||
|
--source include/galera_have_debug_sync.inc
|
||||||
|
|
||||||
|
--disable_ps2_protocol
|
||||||
|
#
|
||||||
|
# We create InnoDB seqeuence with small cache that is then
|
||||||
|
# used as default value for column in table.
|
||||||
|
#
|
||||||
|
--connection node_1
|
||||||
|
--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
|
||||||
|
CREATE SEQUENCE s INCREMENT=0 CACHE=5 ENGINE=InnoDB;
|
||||||
|
CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 INT) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 VALUES (1, 0), (3, 0);
|
||||||
|
--connection node_1
|
||||||
|
START TRANSACTION;
|
||||||
|
INSERT INTO t1 VALUES (4, next value for s); # No conflict in cert
|
||||||
|
INSERT INTO t1 VALUES (5, next value for s); # No conflict in cert
|
||||||
|
INSERT INTO t1 VALUES (6, next value for s); # No conflict in cert
|
||||||
|
INSERT INTO t1 VALUES (7, next value for s); # No conflict in cert
|
||||||
|
INSERT INTO t1 VALUES (8, next value for s); # No conflict in cert
|
||||||
|
INSERT INTO t1 VALUES (9, next value for s); # No conflict in cert
|
||||||
|
INSERT INTO t1 VALUES (10, next value for s); # No conflict in cert
|
||||||
|
INSERT INTO t1 VALUES (11, next value for s); # No conflict in cert
|
||||||
|
INSERT INTO t1 VALUES (12, next value for s); # No conflict in cert
|
||||||
|
INSERT INTO t1 VALUES (13, next value for s); # No conflict in cert
|
||||||
|
INSERT INTO t1 VALUES (14, next value for s); # No conflict in cert
|
||||||
|
SELECT * FROM t1 WHERE f1 > 0 FOR UPDATE; # Should cause GAP lock between 1 and 3
|
||||||
|
|
||||||
|
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||||
|
SET SESSION wsrep_sync_wait=0;
|
||||||
|
# Block the applier on node #1 and issue a conflicting update on node #2
|
||||||
|
--let $galera_sync_point = apply_monitor_slave_enter_sync
|
||||||
|
--source include/galera_set_sync_point.inc
|
||||||
|
|
||||||
|
#
|
||||||
|
# Send conflicting INSERT
|
||||||
|
#
|
||||||
|
--connection node_2
|
||||||
|
INSERT INTO t1 VALUES (2, 2); # This should BF abort because of GAP lock
|
||||||
|
|
||||||
|
--connection node_1a
|
||||||
|
--source include/galera_wait_sync_point.inc
|
||||||
|
--source include/galera_clear_sync_point.inc
|
||||||
|
|
||||||
|
# Block the commit, send the COMMIT and wait until it gets blocked
|
||||||
|
--let $galera_sync_point = commit_monitor_master_enter_sync
|
||||||
|
--source include/galera_set_sync_point.inc
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
--send COMMIT
|
||||||
|
|
||||||
|
--connection node_1a
|
||||||
|
|
||||||
|
--let $galera_sync_point = apply_monitor_slave_enter_sync commit_monitor_master_enter_sync
|
||||||
|
--source include/galera_wait_sync_point.inc
|
||||||
|
--source include/galera_clear_sync_point.inc
|
||||||
|
|
||||||
|
--let $galera_sync_point = abort_trx_end
|
||||||
|
--source include/galera_set_sync_point.inc
|
||||||
|
--let $galera_sync_point = apply_monitor_slave_enter_sync
|
||||||
|
--source include/galera_signal_sync_point.inc
|
||||||
|
--let $galera_sync_point = abort_trx_end commit_monitor_master_enter_sync
|
||||||
|
--source include/galera_wait_sync_point.inc
|
||||||
|
|
||||||
|
# Let the transactions proceed
|
||||||
|
--source include/galera_clear_sync_point.inc
|
||||||
|
--let $galera_sync_point = abort_trx_end
|
||||||
|
--source include/galera_signal_sync_point.inc
|
||||||
|
--let $galera_sync_point = commit_monitor_master_enter_sync
|
||||||
|
--source include/galera_signal_sync_point.inc
|
||||||
|
|
||||||
|
# Commit succeeds
|
||||||
|
--connection node_1
|
||||||
|
--reap
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
INSERT INTO t1 VALUES (22, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (23, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (24, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (25, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (26, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (27, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (28, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (29, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (30, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (31, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (32, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (33, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (34, next value for s);
|
||||||
|
INSERT INTO t1 VALUES (35, next value for s);
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
SELECT * FROM t1;
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
SELECT * FROM t1;
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
SELECT NEXTVAL(s);
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
SELECT NEXTVAL(s);
|
||||||
|
|
||||||
|
DROP SEQUENCE s;
|
||||||
|
DROP TABLE t1;
|
@@ -0,0 +1,9 @@
|
|||||||
|
!include ../galera_2nodes.cnf
|
||||||
|
|
||||||
|
[mysqld.1]
|
||||||
|
auto-increment-increment=2
|
||||||
|
auto-increment-offset=1
|
||||||
|
|
||||||
|
[mysqld.2]
|
||||||
|
auto-increment-increment=2
|
||||||
|
auto-increment-offset=2
|
@@ -0,0 +1,5 @@
|
|||||||
|
[binlogon]
|
||||||
|
log-bin
|
||||||
|
log-slave-updates
|
||||||
|
|
||||||
|
[binlogoff]
|
255
mysql-test/suite/galera/t/galera_sequences_transaction.test
Normal file
255
mysql-test/suite/galera/t/galera_sequences_transaction.test
Normal file
@@ -0,0 +1,255 @@
|
|||||||
|
--source include/galera_cluster.inc
|
||||||
|
--source include/have_sequence.inc
|
||||||
|
|
||||||
|
--disable_ps2_protocol
|
||||||
|
#
|
||||||
|
# Case 1: Separate transactions from few connections
|
||||||
|
#
|
||||||
|
--connection node_1
|
||||||
|
CREATE SEQUENCE s INCREMENT=0 CACHE=5 ENGINE=InnoDB;
|
||||||
|
CREATE TABLE t1 (f1 INT PRIMARY KEY DEFAULT NEXTVAL(s), f2 INT) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||||
|
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
--connection node_2a
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
--connection node_1a
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
--connection node_1
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
--connection node_2a
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
--connection node_1a
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
SELECT * FROM t1;
|
||||||
|
--connection node_2
|
||||||
|
SELECT * FROM t1;
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
DROP TABLE t1;
|
||||||
|
DROP SEQUENCE s;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Case 2: All rollback
|
||||||
|
#
|
||||||
|
--connection node_1
|
||||||
|
CREATE SEQUENCE s INCREMENT=0 CACHE=5 ENGINE=InnoDB;
|
||||||
|
CREATE TABLE t1 (f1 INT PRIMARY KEY DEFAULT NEXTVAL(s), f2 INT) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
ROLLBACK;
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
ROLLBACK;
|
||||||
|
|
||||||
|
--connection node_2a
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
ROLLBACK;
|
||||||
|
|
||||||
|
--connection node_1a
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
ROLLBACK;
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
--connection node_1
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
--connection node_2a
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
--connection node_1a
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
SELECT * FROM t1;
|
||||||
|
--connection node_2
|
||||||
|
SELECT * FROM t1;
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
DROP TABLE t1;
|
||||||
|
DROP SEQUENCE s;
|
||||||
|
#
|
||||||
|
# Case 3: Mixed transactions
|
||||||
|
#
|
||||||
|
--connection node_1
|
||||||
|
CREATE SEQUENCE s INCREMENT=0 CACHE=5 ENGINE=InnoDB;
|
||||||
|
CREATE TABLE t1 (f1 INT PRIMARY KEY DEFAULT NEXTVAL(s), f2 INT) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
|
||||||
|
--connection node_1a
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
|
||||||
|
--connection node_2a
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
INSERT INTO t1(f2) values (1);
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
COMMIT;
|
||||||
|
--connection node_1a
|
||||||
|
ROLLBACK;
|
||||||
|
--connection node_2
|
||||||
|
--error ER_LOCK_DEADLOCK
|
||||||
|
COMMIT;
|
||||||
|
--connection node_2a
|
||||||
|
--error ER_LOCK_DEADLOCK
|
||||||
|
ROLLBACK;
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
--connection node_1
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
--connection node_2a
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
--connection node_1a
|
||||||
|
SELECT LASTVAL(s);
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
SELECT * FROM t1;
|
||||||
|
--connection node_2
|
||||||
|
SELECT * FROM t1;
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
DROP TABLE t1;
|
||||||
|
DROP SEQUENCE s;
|
@@ -6,6 +6,7 @@
|
|||||||
# or rollback and replay (depending on the nature of lock conflict).
|
# or rollback and replay (depending on the nature of lock conflict).
|
||||||
#
|
#
|
||||||
|
|
||||||
|
--source include/galera_cluster.inc
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
--source include/have_log_bin.inc
|
--source include/have_log_bin.inc
|
||||||
--source include/have_debug.inc
|
--source include/have_debug.inc
|
||||||
@@ -13,9 +14,7 @@
|
|||||||
--source include/galera_have_debug_sync.inc
|
--source include/galera_have_debug_sync.inc
|
||||||
|
|
||||||
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
|
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
|
||||||
|
|
||||||
--connection node_2a
|
--connection node_2a
|
||||||
--source include/galera_cluster.inc
|
|
||||||
|
|
||||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||||
|
|
||||||
|
@@ -13,6 +13,7 @@
|
|||||||
--let $node_2=node_2
|
--let $node_2=node_2
|
||||||
--source include/auto_increment_offset_save.inc
|
--source include/auto_increment_offset_save.inc
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
call mtr.add_suppression("WSREP: TO isolation failed for: ");
|
call mtr.add_suppression("WSREP: TO isolation failed for: ");
|
||||||
|
|
||||||
--connection node_1
|
--connection node_1
|
||||||
|
@@ -9,6 +9,10 @@
|
|||||||
--source include/galera_cluster.inc
|
--source include/galera_cluster.inc
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
--source include/big_test.inc
|
--source include/big_test.inc
|
||||||
|
--source include/have_perfschema.inc
|
||||||
|
|
||||||
|
# Verify that SSL is handled by the provider.
|
||||||
|
SELECT COUNT(*) `expect 0` FROM performance_schema.socket_instances WHERE EVENT_NAME LIKE '%wsrep%';
|
||||||
|
|
||||||
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
|
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
|
||||||
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||||
|
@@ -8,6 +8,10 @@
|
|||||||
--source include/galera_cluster.inc
|
--source include/galera_cluster.inc
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
--source include/big_test.inc
|
--source include/big_test.inc
|
||||||
|
--source include/have_perfschema.inc
|
||||||
|
|
||||||
|
# Verify that SSL is handled by the provider.
|
||||||
|
SELECT COUNT(*) `expect 0` FROM performance_schema.socket_instances WHERE EVENT_NAME LIKE '%wsrep%';
|
||||||
|
|
||||||
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
|
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
|
||||||
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||||
|
@@ -10,6 +10,9 @@
|
|||||||
--source include/have_openssl.inc
|
--source include/have_openssl.inc
|
||||||
--source include/force_restart.inc
|
--source include/force_restart.inc
|
||||||
|
|
||||||
|
# Verify that SSL is handled by the provider.
|
||||||
|
SELECT COUNT(*) `expect 0` FROM performance_schema.socket_instances WHERE EVENT_NAME LIKE '%wsrep%';
|
||||||
|
|
||||||
# Save original auto_increment_offset values.
|
# Save original auto_increment_offset values.
|
||||||
--let $node_1=node_1
|
--let $node_1=node_1
|
||||||
--let $node_2=node_2
|
--let $node_2=node_2
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
--source include/galera_cluster.inc
|
--source include/galera_cluster.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
--source include/have_debug.inc
|
--source include/have_debug.inc
|
||||||
|
|
||||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||||
|
@@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
--let $node_1 = node_1
|
--let $node_1 = node_1
|
||||||
--let $node_2 = node_2
|
--let $node_2 = node_2
|
||||||
|
|
||||||
--source ../galera/include/auto_increment_offset_save.inc
|
--source ../galera/include/auto_increment_offset_save.inc
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@@ -77,8 +77,8 @@ DROP TABLE t1;
|
|||||||
#
|
#
|
||||||
|
|
||||||
--connection node_1
|
--connection node_1
|
||||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM;
|
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=MyISAM;
|
||||||
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
|
CREATE TABLE t2 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
INSERT INTO t1 VALUES (1);
|
INSERT INTO t1 VALUES (1);
|
||||||
@@ -126,6 +126,7 @@ INSERT INTO t1 VALUES (1);
|
|||||||
--connection node_1
|
--connection node_1
|
||||||
COMMIT;
|
COMMIT;
|
||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
|
|
||||||
#
|
#
|
||||||
# Test prepared staments
|
# Test prepared staments
|
||||||
#
|
#
|
||||||
@@ -200,21 +201,28 @@ SELECT * FROM t2 ORDER BY id;
|
|||||||
DROP TRIGGER tr1;
|
DROP TRIGGER tr1;
|
||||||
DROP TRIGGER tr2;
|
DROP TRIGGER tr2;
|
||||||
DROP TRIGGER tr3;
|
DROP TRIGGER tr3;
|
||||||
DROP TABLE t1,t2;
|
DROP TABLE t1, t2;
|
||||||
|
|
||||||
|
CREATE TABLE t1 (a INT, b INT, UNIQUE(a)) ENGINE=MyISAM;
|
||||||
|
CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.a=1;
|
||||||
|
INSERT INTO t1 (a,b) VALUES (10,20);
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
SELECT * from t1;
|
||||||
|
--connection node_1
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # MDEV-11152: wsrep_replicate_myisam: SELECT gets replicated using TO
|
--echo # MDEV-11152: wsrep_replicate_myisam: SELECT gets replicated using TO
|
||||||
--echo #
|
--echo #
|
||||||
--connection node_1
|
--connection node_1
|
||||||
CREATE TABLE t1 (i INT) ENGINE=INNODB;
|
CREATE TABLE t1 (i INT NOT NULL PRIMARY KEY) ENGINE=INNODB;
|
||||||
INSERT INTO t1 VALUES(1);
|
INSERT INTO t1 VALUES(1);
|
||||||
# This command should not get replicated.
|
# This command should not get replicated.
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
--connection node_1
|
|
||||||
--disable_query_log
|
|
||||||
SET GLOBAL wsrep_mode = DEFAULT;
|
SET GLOBAL wsrep_mode = DEFAULT;
|
||||||
|
|
||||||
--connection node_2
|
--connection node_2
|
||||||
SET GLOBAL wsrep_mode = DEFAULT;
|
SET GLOBAL wsrep_mode = DEFAULT;
|
||||||
--enable_query_log
|
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
CALL mtr.add_suppression("WSREP: Stray state UUID msg: ");
|
CALL mtr.add_suppression("WSREP: Stray state UUID msg: ");
|
||||||
CALL mtr.add_suppression("WSREP: .*Sending JOIN failed: ");
|
CALL mtr.add_suppression("WSREP: .*Sending JOIN failed: ");
|
||||||
CALL mtr.add_suppression("WSREP: .*sending install message failed: Socket is not connected");
|
CALL mtr.add_suppression("WSREP: .*sending install message failed: (Transport endpoint|Socket) is not connected");
|
||||||
CALL mtr.add_suppression("WSREP: .*There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
|
CALL mtr.add_suppression("WSREP: .*There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
|
||||||
|
|
||||||
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||||
|
@@ -20,7 +20,7 @@ LOCK TABLE t2 WRITE;
|
|||||||
|
|
||||||
--connection node_2
|
--connection node_2
|
||||||
SET SESSION wsrep_sync_wait = 0;
|
SET SESSION wsrep_sync_wait = 0;
|
||||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Waiting for table metadata lock%' OR STATE LIKE 'Waiting to execute in isolation%';
|
--let $wait_condition = SELECT COUNT(*) BETWEEN 1 AND 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Waiting for table metadata lock%' OR STATE LIKE 'Waiting to execute in isolation%';
|
||||||
--let $wait_condition_on_error_output = SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
|
--let $wait_condition_on_error_output = SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
|
||||||
--source include/wait_condition_with_debug_and_kill.inc
|
--source include/wait_condition_with_debug_and_kill.inc
|
||||||
|
|
||||||
|
@@ -2,8 +2,6 @@ connection node_2;
|
|||||||
connection node_1;
|
connection node_1;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
connection node_1;
|
|
||||||
connection node_2;
|
|
||||||
connection node_3;
|
connection node_3;
|
||||||
Killing node #3 to free ports for garbd ...
|
Killing node #3 to free ports for garbd ...
|
||||||
connection node_3;
|
connection node_3;
|
||||||
@@ -26,8 +24,8 @@ DROP TABLE t1;
|
|||||||
Restarting node #3 to satisfy MTR's end-of-test checks
|
Restarting node #3 to satisfy MTR's end-of-test checks
|
||||||
connection node_3;
|
connection node_3;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)");
|
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0( \\(.*\\))? is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
||||||
connection node_2;
|
connection node_2;
|
||||||
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)");
|
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0( \\(.*\\))? is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
||||||
connection node_3;
|
connection node_3;
|
||||||
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)");
|
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0( \\(.*\\))? is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
connection node_2;
|
connection node_2;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
connection node_1;
|
|
||||||
connection node_2;
|
connection node_2;
|
||||||
connection node_3;
|
connection node_3;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
@@ -12,7 +11,6 @@ CREATE TABLE t1 (f1 INTEGER, f2 varchar(1024)) Engine=InnoDB;
|
|||||||
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
|
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
|
||||||
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
||||||
INSERT INTO t1 (f2) SELECT REPEAT('x', 1024) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
|
INSERT INTO t1 (f2) SELECT REPEAT('x', 1024) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
|
||||||
connection node_2;
|
|
||||||
Killing node #3 to free ports for garbd ...
|
Killing node #3 to free ports for garbd ...
|
||||||
connection node_3;
|
connection node_3;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
@@ -34,8 +32,8 @@ Restarting node #3 to satisfy MTR's end-of-test checks
|
|||||||
connection node_3;
|
connection node_3;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)");
|
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0( \\(.*\\))? is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
||||||
connection node_2;
|
connection node_2;
|
||||||
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)");
|
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0( \\(.*\\))? is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
||||||
connection node_3;
|
connection node_3;
|
||||||
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)");
|
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0( \\(.*\\))? is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
||||||
|
@@ -57,7 +57,6 @@ Table Create Table
|
|||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`f1` int(11) DEFAULT NULL
|
`f1` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
CALL mtr.add_suppression("is inconsistent with group");
|
|
||||||
connection node_3;
|
connection node_3;
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@@ -80,4 +79,5 @@ CALL mtr.add_suppression("Native table .* has the wrong structure");
|
|||||||
CALL mtr.add_suppression("Table 'mysql\\.gtid_slave_pos' doesn't exist");
|
CALL mtr.add_suppression("Table 'mysql\\.gtid_slave_pos' doesn't exist");
|
||||||
connection node_2;
|
connection node_2;
|
||||||
# restart
|
# restart
|
||||||
|
CALL mtr.add_suppression("WSREP: .+ is inconsistent with group");
|
||||||
connection node_1;
|
connection node_1;
|
||||||
|
@@ -9,14 +9,9 @@
|
|||||||
--source include/big_test.inc
|
--source include/big_test.inc
|
||||||
|
|
||||||
# Save galera ports
|
# Save galera ports
|
||||||
--connection node_1
|
|
||||||
--source suite/galera/include/galera_base_port.inc
|
--source suite/galera/include/galera_base_port.inc
|
||||||
--let $NODE_GALERAPORT_1 = $_NODE_GALERAPORT
|
--let $NODE_GALERAPORT_1 = $_NODE_GALERAPORT
|
||||||
|
|
||||||
--connection node_2
|
|
||||||
--source suite/galera/include/galera_base_port.inc
|
|
||||||
--let $NODE_GALERAPORT_2 = $_NODE_GALERAPORT
|
|
||||||
|
|
||||||
--let $galera_connection_name = node_3
|
--let $galera_connection_name = node_3
|
||||||
--let $galera_server_number = 3
|
--let $galera_server_number = 3
|
||||||
--source include/galera_connect.inc
|
--source include/galera_connect.inc
|
||||||
@@ -81,10 +76,10 @@ let $restart_noprint=2;
|
|||||||
# Workaround for galera#101
|
# Workaround for galera#101
|
||||||
|
|
||||||
--connection node_1
|
--connection node_1
|
||||||
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)");
|
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0( \\(.*\\))? is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
||||||
|
|
||||||
--connection node_2
|
--connection node_2
|
||||||
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)");
|
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0( \\(.*\\))? is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
||||||
|
|
||||||
--connection node_3
|
--connection node_3
|
||||||
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)");
|
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0( \\(.*\\))? is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
||||||
|
@@ -10,11 +10,9 @@
|
|||||||
--source include/have_debug.inc
|
--source include/have_debug.inc
|
||||||
--source include/have_debug_sync.inc
|
--source include/have_debug_sync.inc
|
||||||
|
|
||||||
--connection node_1
|
# Save galera ports
|
||||||
# Save original auto_increment_offset values.
|
--source suite/galera/include/galera_base_port.inc
|
||||||
--let $node_1=node_1
|
--let $NODE_GALERAPORT_1 = $_NODE_GALERAPORT
|
||||||
--let $node_2=node_2
|
|
||||||
--let $node_3=node_3
|
|
||||||
|
|
||||||
--let $galera_connection_name = node_3
|
--let $galera_connection_name = node_3
|
||||||
--let $galera_server_number = 3
|
--let $galera_server_number = 3
|
||||||
@@ -22,12 +20,13 @@
|
|||||||
--source suite/galera/include/galera_base_port.inc
|
--source suite/galera/include/galera_base_port.inc
|
||||||
--let $NODE_GALERAPORT_3 = $_NODE_GALERAPORT
|
--let $NODE_GALERAPORT_3 = $_NODE_GALERAPORT
|
||||||
|
|
||||||
|
# Save original auto_increment_offset values.
|
||||||
|
--let $node_1=node_1
|
||||||
|
--let $node_2=node_2
|
||||||
|
--let $node_3=node_3
|
||||||
--source ../galera/include/auto_increment_offset_save.inc
|
--source ../galera/include/auto_increment_offset_save.inc
|
||||||
|
|
||||||
# Save galera ports
|
|
||||||
--connection node_1
|
--connection node_1
|
||||||
--source suite/galera/include/galera_base_port.inc
|
|
||||||
--let $NODE_GALERAPORT_1 = $_NODE_GALERAPORT
|
|
||||||
--let $datadir= `SELECT @@datadir`
|
--let $datadir= `SELECT @@datadir`
|
||||||
|
|
||||||
--let $innodb_max_dirty_pages_pct = `SELECT @@innodb_max_dirty_pages_pct`
|
--let $innodb_max_dirty_pages_pct = `SELECT @@innodb_max_dirty_pages_pct`
|
||||||
@@ -42,10 +41,6 @@ CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
|
|||||||
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
||||||
INSERT INTO t1 (f2) SELECT REPEAT('x', 1024) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
|
INSERT INTO t1 (f2) SELECT REPEAT('x', 1024) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
|
||||||
|
|
||||||
--connection node_2
|
|
||||||
--source suite/galera/include/galera_base_port.inc
|
|
||||||
--let $NODE_GALERAPORT_2 = $_NODE_GALERAPORT
|
|
||||||
|
|
||||||
--echo Killing node #3 to free ports for garbd ...
|
--echo Killing node #3 to free ports for garbd ...
|
||||||
--connection node_3
|
--connection node_3
|
||||||
--source include/shutdown_mysqld.inc
|
--source include/shutdown_mysqld.inc
|
||||||
@@ -124,13 +119,16 @@ let $restart_noprint=2;
|
|||||||
--eval SET GLOBAL innodb_max_dirty_pages_pct_lwm = $innodb_max_dirty_pages_pct_lwm
|
--eval SET GLOBAL innodb_max_dirty_pages_pct_lwm = $innodb_max_dirty_pages_pct_lwm
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
|
||||||
|
# Restore original auto_increment_offset values.
|
||||||
--source ../galera/include/auto_increment_offset_restore.inc
|
--source ../galera/include/auto_increment_offset_restore.inc
|
||||||
|
|
||||||
|
# Workaround for galera#101
|
||||||
|
|
||||||
--connection node_1
|
--connection node_1
|
||||||
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)");
|
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0( \\(.*\\))? is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
||||||
|
|
||||||
--connection node_2
|
--connection node_2
|
||||||
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)");
|
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0( \\(.*\\))? is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
||||||
|
|
||||||
--connection node_3
|
--connection node_3
|
||||||
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)");
|
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0( \\(.*\\))? is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
||||||
|
@@ -17,7 +17,6 @@ call mtr.add_suppression("WSREP: gcs/src/gcs_core\\.cpp:core_handle_uuid_msg\\(\
|
|||||||
--let $node_1 = node_1
|
--let $node_1 = node_1
|
||||||
--let $node_2 = node_2
|
--let $node_2 = node_2
|
||||||
--let $node_3 = node_3
|
--let $node_3 = node_3
|
||||||
|
|
||||||
--source ../galera/include/auto_increment_offset_save.inc
|
--source ../galera/include/auto_increment_offset_save.inc
|
||||||
|
|
||||||
--connection node_1
|
--connection node_1
|
||||||
|
@@ -14,7 +14,6 @@
|
|||||||
--let $node_1 = node_1
|
--let $node_1 = node_1
|
||||||
--let $node_2 = node_2
|
--let $node_2 = node_2
|
||||||
--let $node_3 = node_3
|
--let $node_3 = node_3
|
||||||
|
|
||||||
--source ../galera/include/auto_increment_offset_save.inc
|
--source ../galera/include/auto_increment_offset_save.inc
|
||||||
|
|
||||||
--connection node_1
|
--connection node_1
|
||||||
|
@@ -69,7 +69,6 @@ SHOW CREATE TABLE t1;
|
|||||||
|
|
||||||
--connection node_2
|
--connection node_2
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
CALL mtr.add_suppression("is inconsistent with group");
|
|
||||||
|
|
||||||
--connection node_3
|
--connection node_3
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
@@ -83,6 +82,7 @@ CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'PRIMARY'; check that col
|
|||||||
# restart node so we don't fail on WSREP_START_POSITION internal check
|
# restart node so we don't fail on WSREP_START_POSITION internal check
|
||||||
--source include/restart_mysqld.inc
|
--source include/restart_mysqld.inc
|
||||||
--source include/wait_until_connected_again.inc
|
--source include/wait_until_connected_again.inc
|
||||||
|
CALL mtr.add_suppression("WSREP: .+ is inconsistent with group");
|
||||||
|
|
||||||
--connection node_1
|
--connection node_1
|
||||||
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||||
--connection node_1
|
--connection node_1
|
||||||
|
|
||||||
# Save original auto_increment_offset values.
|
# Save original auto_increment_offset values.
|
||||||
--let $node_1=node_1
|
--let $node_1=node_1
|
||||||
--let $node_2=node_2
|
--let $node_2=node_2
|
||||||
|
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||||
--connection node_1
|
--connection node_1
|
||||||
|
|
||||||
# Save original auto_increment_offset values.
|
# Save original auto_increment_offset values.
|
||||||
--let $node_1=node_1
|
--let $node_1=node_1
|
||||||
--let $node_2=node_2
|
--let $node_2=node_2
|
||||||
|
@@ -2,7 +2,7 @@ connection node_2;
|
|||||||
connection node_1;
|
connection node_1;
|
||||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||||
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
||||||
connect node_3a, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
connect node_3a, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
@@ -74,15 +74,15 @@ connection node_3a;
|
|||||||
SET SESSION wsrep_sync_wait = 0;
|
SET SESSION wsrep_sync_wait = 0;
|
||||||
SET SESSION wsrep_sync_wait = DEFAULT;
|
SET SESSION wsrep_sync_wait = DEFAULT;
|
||||||
connection node_1a;
|
connection node_1a;
|
||||||
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
|
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
|
||||||
EXPECT_0
|
EXPECT_0
|
||||||
0
|
0
|
||||||
connection node_2a;
|
connection node_2a;
|
||||||
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
|
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
|
||||||
EXPECT_0
|
EXPECT_0
|
||||||
0
|
0
|
||||||
connection node_3a;
|
connection node_3a;
|
||||||
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
|
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
|
||||||
EXPECT_0
|
EXPECT_0
|
||||||
0
|
0
|
||||||
connection node_1;
|
connection node_1;
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
--source include/galera_cluster.inc
|
--source include/galera_cluster.inc
|
||||||
|
|
||||||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||||
|
|
||||||
# Save original auto_increment_offset values.
|
# Save original auto_increment_offset values.
|
||||||
--let $node_1=node_1
|
--let $node_1=node_1
|
||||||
--let $node_2=node_2
|
--let $node_2=node_2
|
||||||
|
@@ -7,6 +7,7 @@
|
|||||||
--source include/force_restart.inc
|
--source include/force_restart.inc
|
||||||
|
|
||||||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||||
|
|
||||||
# Save original auto_increment_offset values.
|
# Save original auto_increment_offset values.
|
||||||
--let $node_1=node_1
|
--let $node_1=node_1
|
||||||
--let $node_2=node_2
|
--let $node_2=node_2
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||||
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
|
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
|
||||||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||||
--connect node_3a, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
--connect node_3a, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||||
|
|
||||||
# Save original auto_increment_offset values.
|
# Save original auto_increment_offset values.
|
||||||
@@ -158,15 +158,15 @@ SET SESSION wsrep_sync_wait = DEFAULT;
|
|||||||
--connection node_1a
|
--connection node_1a
|
||||||
--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log
|
--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log
|
||||||
--source include/wait_condition.inc
|
--source include/wait_condition.inc
|
||||||
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
|
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
|
||||||
--connection node_2a
|
--connection node_2a
|
||||||
--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log
|
--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log
|
||||||
--source include/wait_condition.inc
|
--source include/wait_condition.inc
|
||||||
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
|
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
|
||||||
--connection node_3a
|
--connection node_3a
|
||||||
--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log
|
--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log
|
||||||
--source include/wait_condition.inc
|
--source include/wait_condition.inc
|
||||||
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
|
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
|
||||||
|
|
||||||
|
|
||||||
--connection node_1
|
--connection node_1
|
||||||
|
@@ -6,6 +6,7 @@
|
|||||||
# Test the effect of gmcast.isolate on master during an SR transaction
|
# Test the effect of gmcast.isolate on master during an SR transaction
|
||||||
#
|
#
|
||||||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||||
|
|
||||||
# Save original auto_increment_offset values.
|
# Save original auto_increment_offset values.
|
||||||
--let $node_1=node_1
|
--let $node_1=node_1
|
||||||
--let $node_2=node_2
|
--let $node_2=node_2
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||||
--connection node_1
|
--connection node_1
|
||||||
|
|
||||||
# Save original auto_increment_offset values.
|
# Save original auto_increment_offset values.
|
||||||
--let $node_1=node_1
|
--let $node_1=node_1
|
||||||
--let $node_2=node_2
|
--let $node_2=node_2
|
||||||
|
@@ -6,6 +6,7 @@
|
|||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||||
|
|
||||||
# Save original auto_increment_offset values.
|
# Save original auto_increment_offset values.
|
||||||
--let $node_1=node_1
|
--let $node_1=node_1
|
||||||
--let $node_2=node_2
|
--let $node_2=node_2
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||||
|
|
||||||
# Save original auto_increment_offset values.
|
# Save original auto_increment_offset values.
|
||||||
--let $node_1=node_1
|
--let $node_1=node_1
|
||||||
--let $node_2=node_2
|
--let $node_2=node_2
|
||||||
|
@@ -8,6 +8,7 @@
|
|||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||||
|
|
||||||
# Save original auto_increment_offset values.
|
# Save original auto_increment_offset values.
|
||||||
--let $node_1=node_1
|
--let $node_1=node_1
|
||||||
--let $node_2=node_2
|
--let $node_2=node_2
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
--source include/force_restart.inc
|
--source include/force_restart.inc
|
||||||
|
|
||||||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||||
|
|
||||||
# Save original auto_increment_offset values.
|
# Save original auto_increment_offset values.
|
||||||
--let $node_1=node_1
|
--let $node_1=node_1
|
||||||
--let $node_2=node_2
|
--let $node_2=node_2
|
||||||
|
@@ -7,6 +7,7 @@
|
|||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||||
|
|
||||||
# Save original auto_increment_offset values.
|
# Save original auto_increment_offset values.
|
||||||
--let $node_1=node_1
|
--let $node_1=node_1
|
||||||
--let $node_2=node_2
|
--let $node_2=node_2
|
||||||
|
@@ -37,9 +37,6 @@ f1 f2
|
|||||||
SET SESSION wsrep_trx_fragment_size = 10000;
|
SET SESSION wsrep_trx_fragment_size = 10000;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
INSERT INTO t1 VALUE (10, 'node1');
|
INSERT INTO t1 VALUE (10, 'node1');
|
||||||
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
|
|
||||||
COUNT(*)
|
|
||||||
0
|
|
||||||
connection node_1a;
|
connection node_1a;
|
||||||
INSERT INTO t1 VALUES(15, 'node2');
|
INSERT INTO t1 VALUES(15, 'node2');
|
||||||
connection node_1;
|
connection node_1;
|
||||||
|
@@ -2,6 +2,7 @@ connection node_2;
|
|||||||
connection node_1;
|
connection node_1;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
|
connection node_1;
|
||||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||||
SET SESSION wsrep_trx_fragment_size = 1;
|
SET SESSION wsrep_trx_fragment_size = 1;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
|
@@ -61,7 +61,6 @@ SET SESSION wsrep_trx_fragment_size = 10000;
|
|||||||
|
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
INSERT INTO t1 VALUE (10, 'node1');
|
INSERT INTO t1 VALUE (10, 'node1');
|
||||||
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
|
|
||||||
|
|
||||||
--connection node_1a
|
--connection node_1a
|
||||||
INSERT INTO t1 VALUES(15, 'node2');
|
INSERT INTO t1 VALUES(15, 'node2');
|
||||||
|
@@ -11,6 +11,8 @@
|
|||||||
--let $node_2=node_2
|
--let $node_2=node_2
|
||||||
--source ../../galera/include/auto_increment_offset_save.inc
|
--source ../../galera/include/auto_increment_offset_save.inc
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
|
||||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||||
SET SESSION wsrep_trx_fragment_size = 1;
|
SET SESSION wsrep_trx_fragment_size = 1;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
@@ -26,7 +28,6 @@ INSERT INTO t1 VALUES (5);
|
|||||||
--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
|
--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
|
||||||
--source include/wait_condition.inc
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Kill the entire cluster and restart
|
# Kill the entire cluster and restart
|
||||||
#
|
#
|
||||||
|
@@ -8,6 +8,7 @@
|
|||||||
--let $node_1=node_1
|
--let $node_1=node_1
|
||||||
--let $node_2=node_2
|
--let $node_2=node_2
|
||||||
--source ../galera/include/auto_increment_offset_save.inc
|
--source ../galera/include/auto_increment_offset_save.inc
|
||||||
|
|
||||||
--connection node_2
|
--connection node_2
|
||||||
call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: ");
|
call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: ");
|
||||||
|
|
||||||
|
@@ -1791,6 +1791,20 @@ drop table t;
|
|||||||
create table t (a int) with system versioning partition by system_time partitions 3;
|
create table t (a int) with system versioning partition by system_time partitions 3;
|
||||||
ERROR HY000: Maybe missing parameters: no rotation condition for multiple HISTORY partitions.
|
ERROR HY000: Maybe missing parameters: no rotation condition for multiple HISTORY partitions.
|
||||||
#
|
#
|
||||||
|
# MDEV-36115 InnoDB: assertion: node->pcur->rel_pos == BTR_PCUR_ON
|
||||||
|
# in row_update_for_mysql
|
||||||
|
#
|
||||||
|
create table t (a int key) engine=innodb
|
||||||
|
with system versioning
|
||||||
|
partition by key() partitions 3;
|
||||||
|
start transaction;
|
||||||
|
insert into t values (1),(2),(3),(4),(5),(6),(7),(8);
|
||||||
|
set timestamp=+1;
|
||||||
|
delete from t;
|
||||||
|
insert into t values (1),(2);
|
||||||
|
DELETE from t;
|
||||||
|
drop table t;
|
||||||
|
#
|
||||||
# End of 10.5 tests
|
# End of 10.5 tests
|
||||||
#
|
#
|
||||||
set global innodb_stats_persistent= @save_persistent;
|
set global innodb_stats_persistent= @save_persistent;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user