Commit 5007633c authored by Jan Lindström's avatar Jan Lindström

MDEV-21601 : Cleanup Galera disabled tests

* Remove those tests that will not be supported on that release.
* Make sure that correct tests are disabled and have MDEVs
* Sort test names

This should not be merged upwards.
parent 9f718041
......@@ -18,22 +18,14 @@ MW-286 : MDEV-18464 Killing thread can cause mutex deadlock if done concurrently
MW-328A : MDEV-21483 galera.MW-328A galera.MW-328B
MW-328B : MDEV-21483 galera.MW-328A galera.MW-328B
MW-329 : MDEV-19962 Galera test failure on MW-329
MW-360 : needs rewrite to be MariaDB gtid compatible
galera.galera_defaults : MDEV-21494 Galera test sporadic failure on galera.galera_defaults
galera_account_management : MariaDB 10.0 does not support ALTER USER
galera_as_master_gtid : Requires MySQL GTID
galera_as_master_gtid_change_master : Requires MySQL GTID
galera_as_slave_gtid_myisam : MDEV-21421 galera.galera_as_slave_gtid_myisam
galera_as_slave_gtid_replicate_do_db_cc : Requires MySQL GTID
galera_as_slave_preordered : wsrep-preordered feature not merged to MariaDB
galera_as_slave_replication_bundle : MDEV-15785 OPTION_GTID_BEGIN is set in Gtid_log_event::do_apply_event()
galera_autoinc_sst_mariabackup : Known issue, may require porting MDEV-17458 from later versions
galera_bf_abort_group_commit : MDEV-18282 Galera test failure on galera.galera_bf_abort_group_commit
galera_binlog_rows_query_log_events: MariaDB does not support binlog_rows_query_log_events
galera_binlog_stmt_autoinc : MDEV-19959 Galera test failure on galera_binlog_stmt_autoinc
galera_concurrent_ctas : MDEV-18180 Galera test failure on galera.galera_concurrent_ctas
galera_encrypt_tmp_files : Get error failed to enable encryption of temporary files
galera_flush : MariaDB does not have global.thread_statistics
galera_ftwrl : MDEV-21525 galera.galera_ftwrl
galera_gcache_recover_manytrx : MDEV-18834 Galera test failure
galera_ist_mariabackup : MDEV-18829 test leaves port open
......@@ -43,7 +35,6 @@ galera_kill_nochanges : MDEV-18280 Galera test failure on galera_split_brain and
galera_load_data : MDEV-19968 galera.galera_load_data
galera_many_tables_nopk : MDEV-18182 Galera test failure on galera.galera_many_tables_nopk
galera_mdl_race : MDEV-21524 galera.galera_mdl_race
galera_migrate : MariaDB does not support START SLAVE USER
galera_parallel_autoinc_largetrx : MDEV-20916 galera.galera_parallel_autoinc_largetrx
galera_parallel_simple : MDEV-20318 galera.galera_parallel_simple fails
galera_pc_ignore_sb : MDEV-20888 galera.galera_pc_ignore_sb
......
SET GLOBAL wsrep_on=OFF;
RESET MASTER;
SET GLOBAL wsrep_on=ON;
SET GLOBAL wsrep_on=OFF;
RESET MASTER;
SET GLOBAL wsrep_on=ON;
CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
DROP TABLE t1;
CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t2 VALUES (2);
DROP TABLE t1, t2;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
CREATE TEMPORARY TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t2 VALUES (2);
DROP TABLE t1, t2;
CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t2 VALUES (2);
CREATE TEMPORARY TABLE t3 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t3 VALUES (3);
DROP TABLE t1, t2, t3;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
CREATE TEMPORARY TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t2 VALUES (2);
CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t3 VALUES (3);
DROP TABLE t1, t2, t3;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (2);
DROP TABLE t1;
DROP TABLE t1;
gtid_executed_equal
1
connection node_1;
CREATE USER user1, user2 IDENTIFIED BY 'password';
connection node_2;
SELECT COUNT(*) = 2 FROM mysql.user WHERE user IN ('user1', 'user2');
COUNT(*) = 2
1
connection node_1;
ALTER USER user1 PASSWORD EXPIRE;
SELECT password_expired = 'Y' FROM mysql.user WHERE user = 'user1';
password_expired = 'Y'
1
connection node_2;
SELECT password_expired = 'Y' FROM mysql.user WHERE user = 'user1';
password_expired = 'Y'
1
connection node_1;
RENAME USER user2 TO user3;
connection node_2;
SELECT COUNT(*) = 0 FROM mysql.user WHERE user = 'user2';
COUNT(*) = 0
1
SELECT COUNT(*) = 1 FROM mysql.user WHERE user = 'user3';
COUNT(*) = 1
1
connection node_1;
SET PASSWORD FOR user3 = PASSWORD('foo');
connection node_1;
SELECT password != '' FROM mysql.user WHERE user = 'user3';
password != ''
1
connection node_1;
DROP USER user1, user3;
connection node_2;
SELECT COUNT(*) = 0 FROM mysql.user WHERE user IN ('user1', 'user2');
COUNT(*) = 0
1
connection node_1;
GRANT ALL ON *.* TO user4 IDENTIFIED BY 'password';
connection node_2;
SELECT COUNT(*) = 1 FROM mysql.user WHERE user = 'user4';
COUNT(*) = 1
1
SELECT Select_priv = 'Y' FROM mysql.user WHERE user = 'user4';
Select_priv = 'Y'
1
connection node_1;
CREATE USER user5;
GRANT PROXY ON user4 TO user5;
connection node_2;
SELECT COUNT(*) = 1 FROM mysql.proxies_priv WHERE user = 'user5';
COUNT(*) = 1
1
connection node_1;
REVOKE ALL PRIVILEGES ON *.* FROM user4;
connection node_2;
SELECT Select_priv = 'N' FROM mysql.user WHERE user = 'user4';
Select_priv = 'N'
1
connection node_1;
REVOKE PROXY ON user4 FROM user5;
connection node_2;
SELECT COUNT(*) = 0 FROM mysql.proxies_priv WHERE user = 'user5';
COUNT(*) = 0
1
DROP USER user4, user5;
START SLAVE USER='root';
Warnings:
Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
uuids_do_not_match
1
INSERT INTO t1 VALUES(2);
uuids_do_not_match
1
uuids_match
1
uuids_do_not_match
1
uuids_match
1
DROP TABLE t1;
gtid_executed_equal
1
gtid_executed_equal
1
STOP SLAVE;
RESET SLAVE ALL;
START SLAVE USER='root';
Warnings:
Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
INSERT INTO t1 VALUES(2);
STOP SLAVE;
START SLAVE USER='root';
Warnings:
Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
INSERT INTO t1 VALUES(3);
INSERT INTO t1 VALUES(4);
DROP TABLE t1;
STOP SLAVE;
RESET SLAVE ALL;
connection node_2;
connection node_1;
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connection node_1;
SET global wsrep_on=OFF;
RESET MASTER;
SET global wsrep_on=ON;
connection node_3;
RESET MASTER;
connection node_2;
SET global wsrep_on=OFF;
RESET MASTER;
SET global wsrep_on=ON;
START SLAVE;
connection node_3;
CREATE SCHEMA test1;
CREATE SCHEMA test2;
USE test1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY,f2 CHAR(5) DEFAULT 'abc') ENGINE=InnoDB;
USE test2;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY,f2 CHAR(5) DEFAULT 'abc') ENGINE=InnoDB;
INSERT INTO test1.t1 (f1) VALUES (1);
INSERT INTO test2.t1 (f1) VALUES (1);
INSERT INTO test1.t1 (f1) VALUES (2);
INSERT INTO test2.t1 (f1) VALUES (2);
INSERT INTO test1.t1 (f1) VALUES (3);
INSERT INTO test2.t1 (f1) VALUES (3);
UPDATE test2.t1 SET test2.t1.f2 = 'cde';
UPDATE test1.t1, test2.t1 SET test1.t1.f2 = 'klm', test2.t1.f2 = 'xyz';
DELETE test1.t1, test2.t1 FROM test1.t1 INNER JOIN test2.t1 WHERE test1.t1.f1 = test2.t1.f1 AND test1.t1.f1 = 3;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO test2.t1 (f1) VALUES (999);
INSERT INTO test2.t1 (f1) VALUES (9999);
COMMIT;
START TRANSACTION;
INSERT INTO test1.t1 (f1) VALUES (111);
INSERT INTO test1.t1 (f1) VALUES (222);
COMMIT;
START TRANSACTION;
INSERT INTO test1.t1 (f1) VALUES (333);
INSERT INTO test2.t1 (f1) VALUES (99999);
COMMIT;
connection node_2;
SHOW BINLOG EVENTS IN 'master-bin.000001' FROM 256;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 256 Gtid_list 2 285 []
master-bin.000001 285 Binlog_checkpoint 2 329 master-bin.000001
master-bin.000001 329 Gtid 3 371 GTID 0-3-1
master-bin.000001 371 Query 3 458 CREATE SCHEMA test1
master-bin.000001 458 Gtid 3 500 GTID 0-3-3
master-bin.000001 500 Query 3 647 use `test1`; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY,f2 CHAR(5) DEFAULT 'abc') ENGINE=InnoDB
master-bin.000001 647 Gtid 3 689 BEGIN GTID 0-3-5
master-bin.000001 689 Annotate_rows 3 748 INSERT INTO test1.t1 (f1) VALUES (1)
master-bin.000001 748 Table_map 3 797 table_id: ### (test1.t1)
master-bin.000001 797 Write_rows_v1 3 839 table_id: ### flags: STMT_END_F
master-bin.000001 839 Xid 3 870 COMMIT /* xid=### */
master-bin.000001 870 Gtid 3 912 BEGIN GTID 0-3-7
master-bin.000001 912 Annotate_rows 3 971 INSERT INTO test1.t1 (f1) VALUES (2)
master-bin.000001 971 Table_map 3 1020 table_id: ### (test1.t1)
master-bin.000001 1020 Write_rows_v1 3 1062 table_id: ### flags: STMT_END_F
master-bin.000001 1062 Xid 3 1093 COMMIT /* xid=### */
master-bin.000001 1093 Gtid 3 1135 BEGIN GTID 0-3-9
master-bin.000001 1135 Annotate_rows 3 1194 INSERT INTO test1.t1 (f1) VALUES (3)
master-bin.000001 1194 Table_map 3 1243 table_id: ### (test1.t1)
master-bin.000001 1243 Write_rows_v1 3 1285 table_id: ### flags: STMT_END_F
master-bin.000001 1285 Xid 3 1316 COMMIT /* xid=### */
master-bin.000001 1316 Gtid 3 1358 BEGIN GTID 0-3-12
master-bin.000001 1358 Annotate_rows 3 1451 UPDATE test1.t1, test2.t1 SET test1.t1.f2 = 'klm', test2.t1.f2 = 'xyz'
master-bin.000001 1451 Table_map 3 1500 table_id: ### (test1.t1)
master-bin.000001 1500 Update_rows_v1 3 1588 table_id: ### flags: STMT_END_F
master-bin.000001 1588 Xid 3 1619 COMMIT /* xid=### */
master-bin.000001 1619 Gtid 3 1661 BEGIN GTID 0-3-13
master-bin.000001 1661 Annotate_rows 3 1795 DELETE test1.t1, test2.t1 FROM test1.t1 INNER JOIN test2.t1 WHERE test1.t1.f1 = test2.t1.f1 AND test1.t1.f1 = 3
master-bin.000001 1795 Table_map 3 1844 table_id: ### (test1.t1)
master-bin.000001 1844 Delete_rows_v1 3 1886 table_id: ### flags: STMT_END_F
master-bin.000001 1886 Xid 3 1917 COMMIT /* xid=### */
master-bin.000001 1917 Gtid 3 1959 BEGIN GTID 0-3-15
master-bin.000001 1959 Annotate_rows 3 2020 INSERT INTO test1.t1 (f1) VALUES (111)
master-bin.000001 2020 Table_map 3 2069 table_id: ### (test1.t1)
master-bin.000001 2069 Write_rows_v1 3 2111 table_id: ### flags: STMT_END_F
master-bin.000001 2111 Annotate_rows 3 2172 INSERT INTO test1.t1 (f1) VALUES (222)
master-bin.000001 2172 Table_map 3 2221 table_id: ### (test1.t1)
master-bin.000001 2221 Write_rows_v1 3 2263 table_id: ### flags: STMT_END_F
master-bin.000001 2263 Xid 3 2294 COMMIT /* xid=### */
master-bin.000001 2294 Gtid 3 2336 BEGIN GTID <effective_uuid>
master-bin.000001 2336 Annotate_rows 3 2397 INSERT INTO test1.t1 (f1) VALUES (333)
master-bin.000001 2397 Table_map 3 2446 table_id: ### (test1.t1)
master-bin.000001 2446 Write_rows_v1 3 2488 table_id: ### flags: STMT_END_F
master-bin.000001 2488 Xid 3 2519 COMMIT /* xid=### */
connection node_1;
gtid_executed_equal
0
SHOW BINLOG EVENTS IN 'master-bin.000001' FROM 256;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 256 Gtid_list 1 285 []
master-bin.000001 285 Binlog_checkpoint 1 329 master-bin.000001
master-bin.000001 329 Gtid 3 371 GTID 0-3-1
master-bin.000001 371 Query 3 458 CREATE SCHEMA test1
master-bin.000001 458 Gtid 3 500 GTID 0-3-2
master-bin.000001 500 Query 3 647 use `test1`; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY,f2 CHAR(5) DEFAULT 'abc') ENGINE=InnoDB
master-bin.000001 647 Gtid 3 689 BEGIN GTID 0-3-3
master-bin.000001 689 Annotate_rows 3 748 INSERT INTO test1.t1 (f1) VALUES (1)
master-bin.000001 748 Table_map 3 797 table_id: ### (test1.t1)
master-bin.000001 797 Write_rows_v1 3 839 table_id: ### flags: STMT_END_F
master-bin.000001 839 Xid 3 870 COMMIT /* xid=### */
master-bin.000001 870 Gtid 3 912 BEGIN GTID 0-3-4
master-bin.000001 912 Annotate_rows 3 971 INSERT INTO test1.t1 (f1) VALUES (2)
master-bin.000001 971 Table_map 3 1020 table_id: ### (test1.t1)
master-bin.000001 1020 Write_rows_v1 3 1062 table_id: ### flags: STMT_END_F
master-bin.000001 1062 Xid 3 1093 COMMIT /* xid=### */
master-bin.000001 1093 Gtid 3 1135 BEGIN GTID 0-3-5
master-bin.000001 1135 Annotate_rows 3 1194 INSERT INTO test1.t1 (f1) VALUES (3)
master-bin.000001 1194 Table_map 3 1243 table_id: ### (test1.t1)
master-bin.000001 1243 Write_rows_v1 3 1285 table_id: ### flags: STMT_END_F
master-bin.000001 1285 Xid 3 1316 COMMIT /* xid=### */
master-bin.000001 1316 Gtid 3 1358 BEGIN GTID 0-3-6
master-bin.000001 1358 Annotate_rows 3 1451 UPDATE test1.t1, test2.t1 SET test1.t1.f2 = 'klm', test2.t1.f2 = 'xyz'
master-bin.000001 1451 Table_map 3 1500 table_id: ### (test1.t1)
master-bin.000001 1500 Update_rows_v1 3 1588 table_id: ### flags: STMT_END_F
master-bin.000001 1588 Xid 3 1619 COMMIT /* xid=### */
master-bin.000001 1619 Gtid 3 1661 BEGIN GTID 0-3-7
master-bin.000001 1661 Annotate_rows 3 1795 DELETE test1.t1, test2.t1 FROM test1.t1 INNER JOIN test2.t1 WHERE test1.t1.f1 = test2.t1.f1 AND test1.t1.f1 = 3
master-bin.000001 1795 Table_map 3 1844 table_id: ### (test1.t1)
master-bin.000001 1844 Delete_rows_v1 3 1886 table_id: ### flags: STMT_END_F
master-bin.000001 1886 Xid 3 1917 COMMIT /* xid=### */
master-bin.000001 1917 Gtid 3 1959 BEGIN GTID 0-3-8
master-bin.000001 1959 Annotate_rows 3 2020 INSERT INTO test1.t1 (f1) VALUES (111)
master-bin.000001 2020 Table_map 3 2069 table_id: ### (test1.t1)
master-bin.000001 2069 Write_rows_v1 3 2111 table_id: ### flags: STMT_END_F
master-bin.000001 2111 Annotate_rows 3 2172 INSERT INTO test1.t1 (f1) VALUES (222)
master-bin.000001 2172 Table_map 3 2221 table_id: ### (test1.t1)
master-bin.000001 2221 Write_rows_v1 3 2263 table_id: ### flags: STMT_END_F
master-bin.000001 2263 Xid 3 2294 COMMIT /* xid=### */
master-bin.000001 2294 Gtid 3 2336 BEGIN GTID 0-3-9
master-bin.000001 2336 Annotate_rows 3 2397 INSERT INTO test1.t1 (f1) VALUES (333)
master-bin.000001 2397 Table_map 3 2446 table_id: ### (test1.t1)
master-bin.000001 2446 Write_rows_v1 3 2488 table_id: ### flags: STMT_END_F
master-bin.000001 2488 Xid 3 2519 COMMIT /* xid=### */
include/diff_servers.inc [servers=1 2]
connection node_1;
SELECT COUNT(*) = 2 FROM test1.t1 WHERE f1 IN (1,2);
COUNT(*) = 2
1
SELECT COUNT(*) = 3 FROM test1.t1 WHERE f1 IN (111,222,333);
COUNT(*) = 3
1
SELECT COUNT(*) = 2 FROM test1.t1 WHERE f2 = 'klm';
COUNT(*) = 2
1
USE test2;
ERROR 42000: Unknown database 'test2'
connection node_3;
DROP SCHEMA test1;
DROP SCHEMA test2;
connection node_1;
connection node_2;
STOP SLAVE;
RESET SLAVE ALL;
START SLAVE USER='root';
Warnings:
Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=InnoDB;
SELECT COUNT(DISTINCT f1) = 2 * 100 * 10 * 10 FROM t1;
COUNT(DISTINCT f1) = 2 * 100 * 10 * 10
1
SELECT COUNT(*) = 2 * 100 * 10 * 10 FROM t1;
COUNT(*) = 2 * 100 * 10 * 10
1
SELECT COUNT(DISTINCT f1) = 2 * 100 * 10 * 10 FROM t1;
COUNT(DISTINCT f1) = 2 * 100 * 10 * 10
1
DROP TABLE t1;
DROP TABLE ten;
STOP SLAVE;
RESET SLAVE ALL;
SET GLOBAL binlog_rows_query_log_events=TRUE;
CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
UPDATE t1 SET f1 = 2 WHERE f1 = 1;
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
COUNT(*) = 1
1
SET GLOBAL binlog_rows_query_log_events = 0;
DROP TABLE t1;
DROP TABLE IF EXISTS t1, t2;
FLUSH DES_KEY_FILE;
wsrep_last_committed_diff
1
FLUSH HOSTS;
wsrep_last_committed_diff
1
SET GLOBAL wsrep_replicate_myisam = TRUE;
INSERT INTO mysql.user VALUES('localhost','user1',PASSWORD('pass1'), 'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'mysql_native_password','','N','N','',0);
FLUSH PRIVILEGES;
DELETE FROM mysql.user WHERE user = 'user1';
SET GLOBAL wsrep_replicate_myisam = FALSE;
FLUSH PRIVILEGES;
FLUSH QUERY CACHE;
wsrep_last_committed_diff
1
FLUSH STATUS;
wsrep_last_committed_diff
1
FLUSH USER_RESOURCES;
wsrep_last_committed_diff
1
FLUSH TABLES;
wsrep_last_committed_diff
1
CREATE TABLE t2 (f1 INTEGER);
FLUSH TABLES t2;
wsrep_last_committed_diff
1
FLUSH ERROR LOGS;
wsrep_last_committed_diff
1
FLUSH SLOW LOGS;
wsrep_last_committed_diff
1
FLUSH GENERAL LOGS;
wsrep_last_committed_diff
1
FLUSH ENGINE LOGS;
wsrep_last_committed_diff
1
FLUSH RELAY LOGS;
wsrep_last_committed_diff
1
SET @userstat_old= @@userstat;
SET GLOBAL userstat=ON;
FLUSH CLIENT_STATISTICS;
FLUSH INDEX_STATISTICS;
FLUSH TABLE_STATISTICS;
FLUSH USER_STATISTICS;
wsrep_last_committed_diff
1
SET @old_thread_statistics= @@global.thread_statistics;
SET GLOBAL thread_statistics= ON;
FLUSH THREAD_STATISTICS;
wsrep_last_committed_diff
1
FLUSH CHANGED_PAGE_BITMAPS;
wsrep_last_committed_diff
1
CREATE TABLE t1 (f1 INTEGER);
FLUSH LOGS;
FLUSH TABLES WITH READ LOCK;
UNLOCK TABLES;
FLUSH TABLES t1 WITH READ LOCK;
UNLOCK TABLES;
FLUSH TABLES t1 FOR EXPORT;
UNLOCK TABLES;
wsrep_last_committed_diff
1
LOCK TABLES t1 WRITE;
FLUSH TABLES t1;
UNLOCK TABLES;
wsrep_last_committed_diff
1
LOCK TABLES t1 READ;
FLUSH TABLES t1;
ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
UNLOCK TABLES;
wsrep_last_committed_diff
1
FLUSH TABLES t1;
wsrep_last_committed_diff
1
DROP TABLE t1;
DROP TABLE t2;
SET GLOBAL userstat= @userstat_old;
SET GLOBAL thread_statistics= @old_thread_statistics;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
START SLAVE USER='root';
Warnings:
Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
INSERT INTO t1 VALUES (2);
START SLAVE USER='root';
Warnings:
Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4);
SET GLOBAL wsrep_cluster_address='gcomm://';
INSERT INTO t1 VALUES (5);
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
VARIABLE_VALUE = 'Primary'
1
SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 1
1
INSERT INTO t1 VALUES (6);
GRANT ALL PRIVILEGES ON *.* TO 'sst';
SET GLOBAL wsrep_sst_auth = 'sst:';
GRANT ALL PRIVILEGES ON *.* TO 'sst';
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
VARIABLE_VALUE = 'Primary'
1
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
STOP SLAVE;
RESET SLAVE ALL;
STOP SLAVE;
RESET SLAVE ALL;
INSERT INTO t1 VALUES (7);
INSERT INTO t1 VALUES (8);
SELECT COUNT(*) = 8 FROM t1;
COUNT(*) = 8
1
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
VARIABLE_VALUE = 'Primary'
1
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
SELECT COUNT(*) = 8 FROM t1;
COUNT(*) = 8
1
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
VARIABLE_VALUE = 'Primary'
1
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
DROP TABLE t1;
DROP TABLE t1;
SET GLOBAL wsrep_provider = 'none';
SET GLOBAL wsrep_sst_auth = '';
SET GLOBAL wsrep_provider_options = '';
DROP TABLE t1;
DROP USER sst;
SET GLOBAL wsrep_provider = 'none';
SET GLOBAL wsrep_sst_method = 'rsync';
SET GLOBAL wsrep_provider_options = '';
SET GLOBAL wsrep_sst_receive_address = 'AUTO';
DROP TABLE t1;
DROP USER sst;
CALL mtr.add_suppression("InnoDB: Error: Table \"mysql\"\\.\"innodb_index_stats\" not found");
#
# MW-360 DROP TABLE containing temporary tables results in binlog divergence
#
--source include/galera_cluster.inc
--source include/have_binlog_format_row.inc
--connection node_1
SET GLOBAL wsrep_on=OFF;
RESET MASTER;
SET GLOBAL wsrep_on=ON;
--connection node_2
SET GLOBAL wsrep_on=OFF;
RESET MASTER;
SET GLOBAL wsrep_on=ON;
--connection node_1
#
# Straightforward temporary table
#
CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
DROP TABLE t1;
--let $local_uuid = `SELECT LEFT(@@global.gtid_executed, 36)`
#
# A mix of normal and temporary tables
#
# Temp table first, normal table second
CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t2 VALUES (2);
DROP TABLE t1, t2;
# Normal table first, temporary table second
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
CREATE TEMPORARY TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t2 VALUES (2);
DROP TABLE t1, t2;
# Temporary table first, normal table second, temp table third
CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t2 VALUES (2);
CREATE TEMPORARY TABLE t3 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t3 VALUES (3);
DROP TABLE t1, t2, t3;
# Normal table first, temporary table second, normal table third
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
CREATE TEMPORARY TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t2 VALUES (2);
CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t3 VALUES (3);
DROP TABLE t1, t2, t3;
#
# A temporary table masking a normal one
#
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (2);
DROP TABLE t1;
DROP TABLE t1;
--connection node_2
--let $gtid_executed_node2 = `SELECT @@global.gtid_executed;`
--connection node_1
--disable_query_log
# Node 1 has extra GTID set generated by the temporary table drop
--eval SELECT GTID_SUBSET('$gtid_executed_node2', @@global.gtid_executed) AS gtid_executed_equal;
--enable_query_log
#
# Test the account management statements - GRANT, REVOKE, etc.
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
#
# CREATE USER
#
--connection node_1
CREATE USER user1, user2 IDENTIFIED BY 'password';
--connection node_2
SELECT COUNT(*) = 2 FROM mysql.user WHERE user IN ('user1', 'user2');
#
# ALTER USER
#
--connection node_1
ALTER USER user1 PASSWORD EXPIRE;
SELECT password_expired = 'Y' FROM mysql.user WHERE user = 'user1';
--connection node_2
SELECT password_expired = 'Y' FROM mysql.user WHERE user = 'user1';
#
# RENAME USER
#
--connection node_1
RENAME USER user2 TO user3;
--connection node_2
SELECT COUNT(*) = 0 FROM mysql.user WHERE user = 'user2';
SELECT COUNT(*) = 1 FROM mysql.user WHERE user = 'user3';
#
# SET PASSWORD
#
--connection node_1
SET PASSWORD FOR user3 = PASSWORD('foo');
--connection node_1
SELECT password != '' FROM mysql.user WHERE user = 'user3';
#
# DROP USER
#
--connection node_1
DROP USER user1, user3;
--connection node_2
SELECT COUNT(*) = 0 FROM mysql.user WHERE user IN ('user1', 'user2');
#
# GRANT
#
--connection node_1
GRANT ALL ON *.* TO user4 IDENTIFIED BY 'password';
--connection node_2
SELECT COUNT(*) = 1 FROM mysql.user WHERE user = 'user4';
SELECT Select_priv = 'Y' FROM mysql.user WHERE user = 'user4';
#
# GRANT PROXY ON
#
--connection node_1
CREATE USER user5;
GRANT PROXY ON user4 TO user5;
--connection node_2
SELECT COUNT(*) = 1 FROM mysql.proxies_priv WHERE user = 'user5';
#
# REVOKE
#
--connection node_1
REVOKE ALL PRIVILEGES ON *.* FROM user4;
--connection node_2
SELECT Select_priv = 'N' FROM mysql.user WHERE user = 'user4';
#
# REVOKE PROXY
#
--connection node_1
REVOKE PROXY ON user4 FROM user5;
--connection node_2
SELECT COUNT(*) = 0 FROM mysql.proxies_priv WHERE user = 'user5';
DROP USER user4, user5;
!include ../galera_2nodes_as_master.cnf
[mysqld]
log-bin=mysqld-bin
log-slave-updates
binlog-format=ROW
#
# Test Galera as a master to a MySQL slave with GTID
#
# The galera/galera_2node_master.cnf describes the setup of the nodes
#
# We check that all transactions originating from within Galera use a UUID that is
# different from the server_uuid of either node
#
#
--source include/have_innodb.inc
--source include/have_log_bin.inc
--source include/galera_cluster.inc
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--disable_query_log
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_1;
--enable_query_log
START SLAVE USER='root';
--connection node_1
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
--let $effective_uuid = `SELECT LEFT(@@global.gtid_executed, 36)`
--disable_query_log
--eval SELECT '$effective_uuid' != @@global.server_uuid AS uuids_do_not_match;
--enable_query_log
--connection node_2
INSERT INTO t1 VALUES(2);
--disable_query_log
--eval SELECT '$effective_uuid' != @@global.server_uuid AS uuids_do_not_match;
--eval SELECT '$effective_uuid' = LEFT(@@global.gtid_executed, 36) AS uuids_match;
--enable_query_log
--connection node_3
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 2 FROM t1;
--source include/wait_condition.inc
--disable_query_log
--eval SELECT '$effective_uuid' != @@global.server_uuid AS uuids_do_not_match;
--eval SELECT '$effective_uuid' = LEFT(@@global.gtid_executed, 36) AS uuids_match;
--enable_query_log
--connection node_1
DROP TABLE t1;
--connection node_3
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
--connection node_1
--let $gtid_executed_node1 = `SELECT @@global.gtid_executed;`
--connection node_2
--disable_query_log
--eval SELECT '$gtid_executed_node1' = @@global.gtid_executed AS gtid_executed_equal
--enable_query_log
--connection node_3
--disable_query_log
--eval SELECT '$gtid_executed_node1' = @@global.gtid_executed AS gtid_executed_equal
--enable_query_log
STOP SLAVE;
RESET SLAVE ALL;
!include ../galera_2nodes_as_master.cnf
[mysqld]
log-bin=mysqld-bin
log-slave-updates
binlog-format=ROW
#
# Test that a MySQL slave can use CHANGE MASTER MASTER_AUTO_POSITION to begin replicating
# from another Galera node
#
# The galera/galera_2node_master.cnf describes the setup of the nodes
#
#
--source include/have_innodb.inc
--source include/have_log_bin.inc
--source include/galera_cluster.inc
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--disable_query_log
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_1;
--enable_query_log
START SLAVE USER='root';
--connection node_1
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
--connection node_2
INSERT INTO t1 VALUES(2);
--connection node_3
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
STOP SLAVE;
--disable_query_log
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_2, MASTER_AUTO_POSITION=1;
--enable_query_log
START SLAVE USER='root';
--connection node_1
INSERT INTO t1 VALUES(3);
--connection node_2
INSERT INTO t1 VALUES(4);
--connection node_3
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 4 FROM t1;
--source include/wait_condition.inc
--connection node_1
DROP TABLE t1;
--connection node_3
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
STOP SLAVE;
RESET SLAVE ALL;
!include ../galera_2nodes_as_slave.cnf
[mysqld]
#gtid-mode=ON
log-bin=master-bin
log-bin-index=master-bin
log-slave-updates
#enforce-gtid-consistency
binlog-format=ROW
[mysqld.2]
replicate-do-db=test1
replicate-wild-do-table=test1.%
[mysqld.3]
replicate-do-db=test1
replicate-wild-do-table=test1.%
#
# Test Galera as a slave to a MySQL master using GTIDs
#
--source include/have_innodb.inc
--source include/galera_cluster.inc
--source include/have_log_bin.inc
# As node #3 is not a Galera node, and galera_cluster.inc does not open connetion to it
# we open the node_3 connection here
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connection node_1
SET global wsrep_on=OFF;
RESET MASTER;
SET global wsrep_on=ON;
--connection node_3
RESET MASTER;
--connection node_2
SET global wsrep_on=OFF;
RESET MASTER;
SET global wsrep_on=ON;
--disable_query_log
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_3, MASTER_USER='root';
--enable_query_log
START SLAVE;
--connection node_3
CREATE SCHEMA test1;
CREATE SCHEMA test2;
USE test1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY,f2 CHAR(5) DEFAULT 'abc') ENGINE=InnoDB;
USE test2;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY,f2 CHAR(5) DEFAULT 'abc') ENGINE=InnoDB;
#
# First , some autocommit stuff
#
# Simple inserts
INSERT INTO test1.t1 (f1) VALUES (1);
INSERT INTO test2.t1 (f1) VALUES (1);
INSERT INTO test1.t1 (f1) VALUES (2);
INSERT INTO test2.t1 (f1) VALUES (2);
INSERT INTO test1.t1 (f1) VALUES (3);
INSERT INTO test2.t1 (f1) VALUES (3);
# Update that only covers test2.t1
UPDATE test2.t1 SET test2.t1.f2 = 'cde';
# Multi-table UPDATE
UPDATE test1.t1, test2.t1 SET test1.t1.f2 = 'klm', test2.t1.f2 = 'xyz';
# Multi-table DELETE
DELETE test1.t1, test2.t1 FROM test1.t1 INNER JOIN test2.t1 WHERE test1.t1.f1 = test2.t1.f1 AND test1.t1.f1 = 3;
#
# Multi-statement transactions
#
# Transaction which is not replicated at all
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO test2.t1 (f1) VALUES (999);
INSERT INTO test2.t1 (f1) VALUES (9999);
COMMIT;
# Transaction that is completely replicated
START TRANSACTION;
INSERT INTO test1.t1 (f1) VALUES (111);
INSERT INTO test1.t1 (f1) VALUES (222);
COMMIT;
# Transaction that is partially replicated
START TRANSACTION;
INSERT INTO test1.t1 (f1) VALUES (333);
INSERT INTO test2.t1 (f1) VALUES (99999);
COMMIT;
#
# Make sure binary logs and gtid_executed strings are equal
#
--sleep 2
--connection node_2
--let $effective_uuid = `SELECT LEFT(@@global.gtid_current_pos, 36)`
--let $gtid_executed_node2 = `SELECT @@global.gtid_current_pos;`
--replace_result $effective_uuid <effective_uuid>
--replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/
SHOW BINLOG EVENTS IN 'master-bin.000001' FROM 256;
--connection node_1
--disable_query_log
--eval SELECT '$gtid_executed_node2' = @@global.gtid_current_pos AS gtid_executed_equal;
--enable_query_log
--replace_result $effective_uuid <effective_uuid>
--replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/
SHOW BINLOG EVENTS IN 'master-bin.000001' FROM 256;
#
# Final consistency checks
#
--let $diff_servers = 1 2
--source include/diff_servers.inc
--connection node_1
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
SELECT COUNT(*) = 2 FROM test1.t1 WHERE f1 IN (1,2);
SELECT COUNT(*) = 3 FROM test1.t1 WHERE f1 IN (111,222,333);
SELECT COUNT(*) = 2 FROM test1.t1 WHERE f2 = 'klm';
--error 1049
USE test2;
#
# Cleanup
#
--connection node_3
DROP SCHEMA test1;
DROP SCHEMA test2;
--sleep 1
--connection node_1
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
STOP SLAVE;
RESET SLAVE ALL;
#
# Test the case where a Galera slave to async replication goes non-prim while
# a stream of replication events including filtered events is arriving
#
--source include/have_innodb.inc
--source include/have_log_bin.inc
--source include/big_test.inc
# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--source include/galera_cluster.inc
--connection node_1
SET GLOBAL wsrep_on=OFF;
RESET MASTER;
SET GLOBAL wsrep_on=ON;
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connection node_3
RESET MASTER;
--connection node_2
SET global wsrep_on=OFF;
RESET MASTER;
SET global wsrep_on=ON;
--connection node_2
--disable_query_log
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_1;
--enable_query_log
START SLAVE USER='root';
--connection node_1
CREATE SCHEMA test1;
CREATE SCHEMA test2;
USE test1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
USE test2;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO test1.t1 (f1) VALUES (1);
INSERT INTO test2.t1 (f1) VALUES (1);
INSERT INTO test1.t1 (f1) VALUES (2);
INSERT INTO test2.t1 (f1) VALUES (2);
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 2 FROM test1.t1;
--source include/wait_condition.inc
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
--connection node_1
INSERT INTO test1.t1 (f1) VALUES (3);
INSERT INTO test2.t1 (f1) VALUES (3);
INSERT INTO test1.t1 (f1) VALUES (3);
INSERT INTO test2.t1 (f1) VALUES (3);
INSERT INTO test1.t1 (f1) VALUES (3);
INSERT INTO test2.t1 (f1) VALUES (3);
INSERT INTO test1.t1 (f1) VALUES (3);
INSERT INTO test2.t1 (f1) VALUES (3);
--connection node_2
SET SESSION wsrep_on=OFF;
--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_cluster_status';
--source include/wait_condition.inc
--let $slave_sql_errno = 1047
--source include/wait_for_slave_sql_error.inc
--connection node_1
INSERT INTO test1.t1 (f1) VALUES (4);
INSERT INTO test2.t1 (f1) VALUES (4);
INSERT INTO test1.t1 (f1) VALUES (4);
INSERT INTO test2.t1 (f1) VALUES (4);
INSERT INTO test1.t1 (f1) VALUES (4);
INSERT INTO test2.t1 (f1) VALUES (4);
INSERT INTO test1.t1 (f1) VALUES (4);
INSERT INTO test2.t1 (f1) VALUES (4);
INSERT INTO test1.t1 (f1) VALUES (4);
INSERT INTO test2.t1 (f1) VALUES (4);
--connection node_2
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
--connection node_1
INSERT INTO test1.t1 (f1) VALUES (5);
INSERT INTO test2.t1 (f1) VALUES (5);
--connection node_2
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_cluster_status';
--source include/wait_condition.inc
SET SESSION wsrep_on=ON;
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_ready';
--source include/wait_condition.inc
--connection node_1
INSERT INTO test1.t1 (f1) VALUES (6);
INSERT INTO test2.t1 (f1) VALUES (6);
--connection node_2
START SLAVE;
#
# Consistency checks
#
--sleep 2
--connection node_2
--let $wait_condition = SELECT COUNT(DISTINCT f1) = 6 FROM test1.t1;
--source include/wait_condition.inc
--connection node_3
--let $wait_condition = SELECT COUNT(DISTINCT f1) = 6 FROM test1.t1;
--source include/wait_condition.inc
--connection node_2
--let $gtid_executed_node2 = `SELECT @@global.gtid_executed;`
--let $effective_uuid_1 = `SELECT SUBSTRING_INDEX(@@global.gtid_executed, ':', 1)`
--let $effective_uuid_2 = `SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(@@global.gtid_executed, '\n', -1), ':', 1)`
--replace_result $effective_uuid_1 <effective_uuid_1> $effective_uuid_2 <effective_uuid_2>
--replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/
SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120;
--error 1049
USE test2;
--connection node_3
--disable_query_log
--eval SELECT '$gtid_executed_node2' = @@global.gtid_executed AS gtid_executed_equal;
--enable_query_log
--error 1049
USE test2;
--replace_result $effective_uuid_1 <effective_uuid_1> $effective_uuid_2 <effective_uuid_2>
--replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/
SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120;
#
# Cleanup
#
--connection node_1
DROP SCHEMA test1;
DROP SCHEMA test2;
--sleep 1
--connection node_3
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
--connection node_2
STOP SLAVE;
RESET SLAVE ALL;
CALL mtr.add_suppression("GTID replication failed");
CALL mtr.add_suppression("Slave SQL: Error in Xid_log_event: Commit could not be completed");
CALL mtr.add_suppression("Slave SQL: Node has dropped from cluster, Error_code: 1047");
CALL mtr.add_suppression("TO isolation failed for");
CALL mtr.add_suppression("Slave SQL: Error 'Deadlock found when trying to get lock; try restarting transaction' on query");
CALL mtr.add_suppression("Slave SQL: Error 'WSREP has not yet prepared node for application use' on query");
CALL mtr.add_suppression("Slave: WSREP has not yet prepared node for application use Error_code: 1047");
!include ../galera_2nodes_as_slave.cnf
[mysqld]
wsrep-preordered=TRUE
#
# Test Galera as a slave to a MySQL master with --wsrep-preordered=TRUE
#
# The galera/galera_2node_slave.cnf describes the setup of the nodes
#
--source include/have_innodb.inc
--source include/have_log_bin.inc
--source include/galera_cluster.inc
# As node #3 is not a Galera node, and galera_cluster.inc does not open connetion to it
# we open the node_3 connection here
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connection node_2
--disable_query_log
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_3;
--enable_query_log
START SLAVE USER='root';
#
# Issue many large-ish transaction on the async master
#
--connection node_3
CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=InnoDB;
--disable_query_log
--let $count = 100
while ($count)
{
--eval INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2;
--dec $count
}
--enable_query_log
#
# While the async transactions are being applied, issue another set of transactions
# on the Galera node.
#
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
--let $count = 100
--disable_query_log
while ($count)
{
--eval INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2;
--dec $count
}
--enable_query_log
#
# Confirm that all transactions successfully committed
#
--let $wait_condition = SELECT COUNT(*) = 2 * 100 * 10 * 10 FROM t1;
--source include/wait_condition.inc
SELECT COUNT(DISTINCT f1) = 2 * 100 * 10 * 10 FROM t1;
--connection node_1
SELECT COUNT(*) = 2 * 100 * 10 * 10 FROM t1;
SELECT COUNT(DISTINCT f1) = 2 * 100 * 10 * 10 FROM t1;
#
# Cleanup
#
--connection node_3
DROP TABLE t1;
DROP TABLE ten;
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'ten';
--source include/wait_condition.inc
STOP SLAVE;
RESET SLAVE ALL;
#
# Test that Galera continues to run even with binlog-rows-query-log-events=TRUE
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
--let $binlog_rows_query_log_events_orig = `SELECT @@binlog_rows_query_log_events`
SET GLOBAL binlog_rows_query_log_events=TRUE;
CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
--connection node_2
SELECT COUNT(*) = 1 FROM t1;
--connection node_1
UPDATE t1 SET f1 = 2 WHERE f1 = 1;
--connection node_2
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
--connection node_1
--eval SET GLOBAL binlog_rows_query_log_events = $binlog_rows_query_log_events_orig
DROP TABLE t1;
!include ../galera_2nodes.cnf
[mysqld.1]
query_cache_type=1
query_cache_size=1000000
[mysqld.2]
query_cache_type=1
query_cache_size=1000000
This diff is collapsed.
#
# This .cnf file starts 4 servers without enabling Galera.
# The galera_migrate.test will set wsrep_provider and the other settings as needed.
#
!include include/default_mysqld.cnf
[mysqld]
binlog-format=row
innodb_autoinc_lock_mode=2
innodb_flush_log_at_trx_commit=2
log-bin=mysqld-bin
wsrep_node_address=127.0.0.1
wsrep_causal_reads=ON
wsrep_sync_wait = 15
[mysqld.1]
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
[mysqld.2]
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
[mysqld.3]
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
log-slave-updates
[mysqld.4]
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
log-slave-updates
[ENV]
NODE_MYPORT_1= @mysqld.1.port
NODE_MYSOCK_1= @mysqld.1.socket
NODE_MYPORT_2= @mysqld.2.port
NODE_MYSOCK_2= @mysqld.2.socket
NODE_MYPORT_3= @mysqld.3.port
NODE_MYSOCK_3= @mysqld.3.socket
NODE_MYPORT_4= @mysqld.4.port
NODE_MYSOCK_4= @mysqld.4.socket
NODE_GALERAPORT_1= @mysqld.1.#galera_port
NODE_GALERAPORT_2= @mysqld.2.#galera_port
NODE_GALERAPORT_3= @mysqld.3.#galera_port
NODE_GALERAPORT_4= @mysqld.4.#galera_port
NODE_SSTPORT_1= @mysqld.1.#sst_port
NODE_SSTPORT_2= @mysqld.2.#sst_port
NODE_SSTPORT_3= @mysqld.3.#sst_port
NODE_SSTPORT_4= @mysqld.4.#sst_port
#
# Execute a migration from MariaDB replication to Galera replication.
# The test starts with 4 stand-alone servers defined by galera_migrate.cnf and then
# performs the following steps:
#
# 1. Begin with a single MySQL server
# 2. Establish traditional MySQL master-slave replication
# 3. Attach a new sever to serve as a MySQL replication slave
# 4. Enable Galera on the new slave and create a single-node Galera cluster
# 5. Attach a second Galera node
# 6. Turn off the traditional replication parts of the system
# 7. Continue replicating within Galera only
#
--source include/big_test.inc
--source include/have_innodb.inc
--source include/have_log_bin.inc
#
# Step #1 Begin with a single server
#
--connect node_1, 127.0.0.1, root, , test, $NODE_MYPORT_1
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
#
# Step #2. Establish traditional MySQL replication
#
--connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2
--disable_query_log
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT = $NODE_MYPORT_1;
--enable_query_log
START SLAVE;
--connection node_1
INSERT INTO t1 VALUES (2);
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 2 FROM t1;
--source include/wait_condition.inc
#
# Step #3. Attach a second slave, later to be converted to Galera
#
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--disable_query_log
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT = $NODE_MYPORT_1;
--enable_query_log
START SLAVE USER='root';
--connection node_1
INSERT INTO t1 VALUES (3);
--connection node_3
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 3 FROM t1;
--source include/wait_condition.inc
#
# Step #4. Convert this MySQL slave into a Galera node
#
--connection node_1
INSERT INTO t1 VALUES (4);
--connection node_3
--disable_query_log
--eval SET GLOBAL wsrep_provider='$WSREP_PROVIDER'
--eval SET GLOBAL wsrep_provider_options='base_port=$NODE_GALERAPORT_3'
--enable_query_log
SET GLOBAL wsrep_cluster_address='gcomm://';
--connection node_1
INSERT INTO t1 VALUES (5);
--connection node_3
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 5 FROM t1;
--source include/wait_condition.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
--source include/wait_condition.inc
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--connection node_1
INSERT INTO t1 VALUES (6);
#
# Step #5. Attach a second Galera node using mysqldump SST
#
--connection node_3
# We need a user with a password for mysqldump SST
GRANT ALL PRIVILEGES ON *.* TO 'sst';
SET GLOBAL wsrep_sst_auth = 'sst:';
--connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4
GRANT ALL PRIVILEGES ON *.* TO 'sst';
--disable_query_log
--eval SET GLOBAL wsrep_sst_method = 'mysqldump';
--eval SET GLOBAL wsrep_provider='$WSREP_PROVIDER'
--eval SET GLOBAL wsrep_provider_options='base_port=$NODE_GALERAPORT_4'
--eval SET GLOBAL wsrep_sst_receive_address = '127.0.0.2:$NODE_MYPORT_4';
--eval SET GLOBAL wsrep_cluster_address='gcomm://127.0.0.1:$NODE_GALERAPORT_3'
--enable_query_log
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 6 FROM t1;
--source include/wait_condition.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
--source include/wait_condition.inc
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
#
# Step #6. Turn off traditional replication
#
--connection node_2
STOP SLAVE;
RESET SLAVE ALL;
--connection node_3
STOP SLAVE;
RESET SLAVE ALL;
#
# Step #7. Continue replicating within Galera only
#
# We need fresh connections due to galera#191
--connect node_3a, 127.0.0.1, root, , test, $NODE_MYPORT_3
INSERT INTO t1 VALUES (7);
--connect node_4a, 127.0.0.1, root, , test, $NODE_MYPORT_4
INSERT INTO t1 VALUES (8);
--connection node_4a
SELECT COUNT(*) = 8 FROM t1;
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
--source include/wait_condition.inc
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--connection node_3a
SELECT COUNT(*) = 8 FROM t1;
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
--source include/wait_condition.inc
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
#
# Teardown
#
--connection node_1
DROP TABLE t1;
--connection node_2
DROP TABLE t1;
--connection node_3
SET GLOBAL wsrep_provider = 'none';
SET GLOBAL wsrep_sst_auth = '';
SET GLOBAL wsrep_provider_options = '';
DROP TABLE t1;
DROP USER sst;
--connection node_4
SET GLOBAL wsrep_provider = 'none';
SET GLOBAL wsrep_sst_method = 'rsync';
SET GLOBAL wsrep_provider_options = '';
SET GLOBAL wsrep_sst_receive_address = 'AUTO';
DROP TABLE t1;
DROP USER sst;
CALL mtr.add_suppression("InnoDB: Error: Table \"mysql\"\\.\"innodb_index_stats\" not found");
......@@ -10,9 +10,8 @@
#
##############################################################################
GCF-1018B : MDEV-21613 galera_sr.GCF-1018B MTR failed: Failed to open table mysql.wsrep_streaming_log for writing
GCF-1043A : MDEV-21170 Galera test failure on galera_sr.GCF-1043A
GCF-437 : test relies on InnoDB redo log size limitation
GCF-561 : MDEV-21517 galera_sr.GCF-561
GCF_1060 : MDEV-20848 galera_sr.GCF_1060
GCF-1060 : MDEV-20848 galera_sr.GCF_1060
galera-features#56 : MDEV-18542 galera_sr.galera-features#56
galera_sr_table_contents : missing file
CREATE TABLE ten (f1 INTEGER) ENGINE=MyISAM;
INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(512)) ENGINE=InnoDB;
SET SESSION wsrep_trx_fragment_size = 2 * 1024 * 1024;
INSERT INTO t1 (f2) SELECT REPEAT('x', 512) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
ERROR HY000: Writing one row to the row-based binary log failed
CALL mtr.add_suppression("InnoDB: The total blob data length*");
CALL mtr.add_suppression("WSREP: Error writing into mysql.wsrep_streaming_log: 139");
CALL mtr.add_suppression("WSREP: Failed to write to frag table: 1");
CALL mtr.add_suppression("WSREP: Failed to append frag to persistent storage");
DROP TABLE t1;
DROP table ten;
connection node_2;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2),(3);
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t2 VALUES (1),(2),(3);
SET SESSION wsrep_trx_fragment_size = 1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
Start of Simple Insert
INSERT INTO t1 VALUES (4);
DELIMITER /*!*/;
# at 256
# at 300
<ISO TIMESTAMP> server id 1 end_log_pos 85 CRC32 0x00000301 Table_map: `test`.`t1` mapped to number <TABLE_ID>
# at 341
<ISO TIMESTAMP> server id 1 end_log_pos 119 CRC32 0x00000004 Write_rows: table id <TABLE_ID> flags: STMT_END_F
# Number of rows: 1
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
End of Simple Insert
ROLLBACK;
Start of Multi-row Update
UPDATE t1 SET f1 = f1 + 10;
DELIMITER /*!*/;
# at 256
# at 301
<ISO TIMESTAMP> server id 1 end_log_pos 86 CRC32 0x00000301 Table_map: `test`.`t1` mapped to number <TABLE_ID>
# at 342
<ISO TIMESTAMP> server id 1 end_log_pos 126 CRC32 0x0000000b Update_rows: table id <TABLE_ID> flags: STMT_END_F
# Number of rows: 1
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
DELIMITER /*!*/;
# at 256
# at 301
<ISO TIMESTAMP> server id 1 end_log_pos 212 CRC32 0x00000301 Table_map: `test`.`t1` mapped to number <TABLE_ID>
# at 342
<ISO TIMESTAMP> server id 1 end_log_pos 252 CRC32 0x0000000c Update_rows: table id <TABLE_ID> flags: STMT_END_F
# Number of rows: 1
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
DELIMITER /*!*/;
# at 256
# at 301
<ISO TIMESTAMP> server id 1 end_log_pos 338 CRC32 0x00000301 Table_map: `test`.`t1` mapped to number <TABLE_ID>
# at 342
<ISO TIMESTAMP> server id 1 end_log_pos 378 CRC32 0x0000000d Update_rows: table id <TABLE_ID> flags: STMT_END_F
# Number of rows: 1
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
End of Multi-row Update
ROLLBACK;
Start of Multi-table Update
UPDATE t1, t2 SET t1.f1 = t1.f1 + 100, t2.f1 = t2.f1 + 100;
DELIMITER /*!*/;
# at 256
# at 333
<ISO TIMESTAMP> server id 1 end_log_pos 118 CRC32 0x00000301 Table_map: `test`.`t1` mapped to number <TABLE_ID>
# at 374
<ISO TIMESTAMP> server id 1 end_log_pos 159 CRC32 0x00000301 Table_map: `test`.`t2` mapped to number <TABLE_ID>
# at 415
<ISO TIMESTAMP> server id 1 end_log_pos 199 CRC32 0x00000065 Update_rows: table id <TABLE_ID> flags: STMT_END_F
# Number of rows: 1
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
DELIMITER /*!*/;
# at 256
# at 333
<ISO TIMESTAMP> server id 1 end_log_pos 317 CRC32 0x00000301 Table_map: `test`.`t1` mapped to number <TABLE_ID>
# at 374
<ISO TIMESTAMP> server id 1 end_log_pos 358 CRC32 0x00000301 Table_map: `test`.`t2` mapped to number <TABLE_ID>
# at 415
<ISO TIMESTAMP> server id 1 end_log_pos 398 CRC32 0x00000066 Update_rows: table id <TABLE_ID> flags: STMT_END_F
# Number of rows: 1
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
DELIMITER /*!*/;
# at 256
# at 333
<ISO TIMESTAMP> server id 1 end_log_pos 516 CRC32 0x00000301 Table_map: `test`.`t1` mapped to number <TABLE_ID>
# at 374
<ISO TIMESTAMP> server id 1 end_log_pos 557 CRC32 0x00000301 Table_map: `test`.`t2` mapped to number <TABLE_ID>
# at 415
<ISO TIMESTAMP> server id 1 end_log_pos 597 CRC32 0x00000067 Update_rows: table id <TABLE_ID> flags: STMT_END_F
# Number of rows: 1
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
DELIMITER /*!*/;
# at 256
# at 333
<ISO TIMESTAMP> server id 1 end_log_pos 715 CRC32 0x00000301 Table_map: `test`.`t1` mapped to number <TABLE_ID>
# at 374
<ISO TIMESTAMP> server id 1 end_log_pos 756 CRC32 0x00000301 Table_map: `test`.`t2` mapped to number <TABLE_ID>
# at 415
<ISO TIMESTAMP> server id 1 end_log_pos 796 CRC32 0x00000065 Update_rows: table id <TABLE_ID> flags: STMT_END_F
# Number of rows: 1
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
DELIMITER /*!*/;
# at 256
# at 333
<ISO TIMESTAMP> server id 1 end_log_pos 914 CRC32 0x00000301 Table_map: `test`.`t1` mapped to number <TABLE_ID>
# at 374
<ISO TIMESTAMP> server id 1 end_log_pos 955 CRC32 0x00000301 Table_map: `test`.`t2` mapped to number <TABLE_ID>
# at 415
<ISO TIMESTAMP> server id 1 end_log_pos 995 CRC32 0x00000066 Update_rows: table id <TABLE_ID> flags: STMT_END_F
# Number of rows: 1
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
DELIMITER /*!*/;
# at 256
# at 333
<ISO TIMESTAMP> server id 1 end_log_pos 1113 CRC32 0x00000301 Table_map: `test`.`t1` mapped to number <TABLE_ID>
# at 374
<ISO TIMESTAMP> server id 1 end_log_pos 1154 CRC32 0x00000301 Table_map: `test`.`t2` mapped to number <TABLE_ID>
# at 415
<ISO TIMESTAMP> server id 1 end_log_pos 1194 CRC32 0x00000067 Update_rows: table id <TABLE_ID> flags: STMT_END_F
# Number of rows: 1
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
End of Multi-table Update
ROLLBACK;
Start of Savepoint
INSERT INTO t1 VALUES (1000);
SAVEPOINT X;
INSERT INTO t1 VALUES (2000);
ROLLBACK TO SAVEPOINT X;
DELIMITER /*!*/;
# at 256
# at 303
<ISO TIMESTAMP> server id 1 end_log_pos 88 CRC32 0x00000301 Table_map: `test`.`t1` mapped to number <TABLE_ID>
# at 344
<ISO TIMESTAMP> server id 1 end_log_pos 122 CRC32 0x000003e8 Write_rows: table id <TABLE_ID> flags: STMT_END_F
# Number of rows: 1
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
DELIMITER /*!*/;
# at 256
# at 303
<ISO TIMESTAMP> server id 1 end_log_pos 210 CRC32 0x00000301 Table_map: `test`.`t1` mapped to number <TABLE_ID>
# at 344
<ISO TIMESTAMP> server id 1 end_log_pos 244 CRC32 0x000007d0 Write_rows: table id <TABLE_ID> flags: STMT_END_F
# Number of rows: 1
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
End of Savepoint
ROLLBACK;
DROP TABLE t1, t2;
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/big_test.inc
CREATE TABLE ten (f1 INTEGER) ENGINE=MyISAM;
INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(512)) ENGINE=InnoDB;
SET SESSION wsrep_trx_fragment_size = 2 * 1024 * 1024;
--error ER_BINLOG_ROW_LOGGING_FAILED
INSERT INTO t1 (f2) SELECT REPEAT('x', 512) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
CALL mtr.add_suppression("InnoDB: The total blob data length*");
CALL mtr.add_suppression("WSREP: Error writing into mysql.wsrep_streaming_log: 139");
CALL mtr.add_suppression("WSREP: Failed to write to frag table: 1");
CALL mtr.add_suppression("WSREP: Failed to append frag to persistent storage");
DROP TABLE t1;
DROP table ten;
#
# This test dumps the contents of the SR table under various circumstances
#
--source include/galera_cluster.inc
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2),(3);
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t2 VALUES (1),(2),(3);
SET SESSION wsrep_trx_fragment_size = 1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
--echo
--echo Start of Simple Insert
INSERT INTO t1 VALUES (4);
--source suite/galera/include/galera_dump_sr_table.inc
--echo End of Simple Insert
--echo
ROLLBACK;
--echo Start of Multi-row Update
UPDATE t1 SET f1 = f1 + 10;
--source suite/galera/include/galera_dump_sr_table.inc
--echo End of Multi-row Update
--echo
ROLLBACK;
--echo Start of Multi-table Update
UPDATE t1, t2 SET t1.f1 = t1.f1 + 100, t2.f1 = t2.f1 + 100;
--source suite/galera/include/galera_dump_sr_table.inc
--echo End of Multi-table Update
--echo
ROLLBACK;
--echo Start of Savepoint
INSERT INTO t1 VALUES (1000);
SAVEPOINT X;
INSERT INTO t1 VALUES (2000);
ROLLBACK TO SAVEPOINT X;
--source suite/galera/include/galera_dump_sr_table.inc
--echo End of Savepoint
--echo
ROLLBACK;
DROP TABLE t1, t2;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment