diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-11-26 14:05:15 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-11-26 14:05:15 +0200 |
commit | 1afed2077491329797dd577c5b1e6594e4a82f65 (patch) | |
tree | a6869ae2e32dc2a7db8e01e2a69f3e350da831ee | |
parent | 06972b2fbc3d3ae77e8a7ca4558d2e9ee64eba6d (diff) | |
parent | 9669536c2355efb6f71babc9d2e615e9125c816b (diff) | |
download | mariadb-git-1afed2077491329797dd577c5b1e6594e4a82f65.tar.gz |
Merge 10.2 into 10.3
The test galera_sst_mariabackup_table_options was disabled,
because the server refuses to start up due to wrong parameters.
43 files changed, 2465 insertions, 185 deletions
diff --git a/mysql-test/include/innodb_encrypt_tables.combinations b/mysql-test/include/innodb_encrypt_tables.combinations new file mode 100644 index 00000000000..cb32fea998a --- /dev/null +++ b/mysql-test/include/innodb_encrypt_tables.combinations @@ -0,0 +1,14 @@ +[crypt] +innodb_encrypt_tables=ON +plugin-load-add=$FILE_KEY_MANAGEMENT_SO +loose-file-key-management +loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys.txt +file-key-management-encryption-algorithm=aes_ctr + +[clear] +innodb_encrypt_tables=OFF +plugin-load-add=$FILE_KEY_MANAGEMENT_SO +loose-file-key-management +loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys.txt +file-key-management-encryption-algorithm=aes_ctr + diff --git a/mysql-test/include/innodb_encrypt_tables.inc b/mysql-test/include/innodb_encrypt_tables.inc new file mode 100644 index 00000000000..31ab7999aef --- /dev/null +++ b/mysql-test/include/innodb_encrypt_tables.inc @@ -0,0 +1,4 @@ +# The goal of including this file is to enable innodb_encrypt_tables combinations +# (see include/innodb_encrypt_tables.combinations) + +--source include/have_innodb.inc diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index e84832458a3..8be4f7e4748 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -44,8 +44,16 @@ galera_kill_ddl : MDEV-17108 Test failure on galera.galera_kill_ddl galera_var_node_address : MDEV-17151 Galera test failure on galera.galera_var_node_address galera_binlog_stmt_autoinc: MDEV-17106 Test failure on galera.galera_binlog_stmt_autoinc galera_gc_fc_limit : MDEV-17061 Test failure on galera.galera_gc_fc_limit -partition : MDEV-13881 galera.partition failed in buildbot with wrong result galera_as_slave_replication_budle : MDEV-15785 Test case galera_as_slave_replication_bundle caused debug assertion galera_wan : MDEV-17259: Test failure on galera.galera_wan galera_pc_ignore_sb : MDEV-17357 Test failure on galera.galera_pc_ignore_sb galera_drop_database : test +galera_autoinc_sst_xtrabackup : xtrabackup is deprecated +galera_ist_xtrabackup-v2 : xtrabackup is deprecated +galera_sst_xtrabackup-v2_data_dir : xtrabackup is deprecated +galera_sst_xtrabackup-v2_encrypt_with_key : xtrabackup is deprecated +galera_sst_xtrabackup-v2-options : xtrabackup is deprecated +galera_ist_innodb_flush_logs : xtrabackup is deprecated +galera_sst_xtrabackup-v2 : xtrabackup is deprecated + +galera_sst_mariabackup_table_options : refuses to start due to encryption diff --git a/mysql-test/suite/galera/include/have_xtrabackup.inc b/mysql-test/suite/galera/include/have_xtrabackup.inc deleted file mode 100644 index 0dd693f2c63..00000000000 --- a/mysql-test/suite/galera/include/have_xtrabackup.inc +++ /dev/null @@ -1,4 +0,0 @@ -# -# suite.pm will make sure that all tests including this file -# will be skipped as needed -# diff --git a/mysql-test/suite/galera/r/galera_autoinc_sst_mariabackup.result b/mysql-test/suite/galera/r/galera_autoinc_sst_mariabackup.result new file mode 100644 index 00000000000..d0fac1e3d14 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_autoinc_sst_mariabackup.result @@ -0,0 +1,47 @@ +connection node_1; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; +CREATE PROCEDURE p1 () +BEGIN +DECLARE x INT DEFAULT 1; +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END; +WHILE 1 DO +INSERT INTO t1 VALUES (DEFAULT); +COMMIT; +END WHILE; +END| +CALL p1();; +connection node_2; +CALL p1();; +connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; +connection node_2a; +Killing server ... +INSERT INTO t1 VALUES (DEFAULT); +connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; +connection node_1a; +INSERT INTO t1 VALUES (DEFAULT); +connection node_1; +Got one of the listed errors +connection node_2; +Got one of the listed errors +connection node_1a; +connection node_2a; +count_equal +1 +CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member 0"); +SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +VARIABLE_VALUE +2 +SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +VARIABLE_VALUE = 2 +1 +connection node_1a; +SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +VARIABLE_VALUE +2 +SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +VARIABLE_VALUE = 2 +1 +DROP PROCEDURE p1; +DROP TABLE t1; +CALL mtr.add_suppression("gcs_caused\\(\\) returned -1 \\(Operation not permitted\\)"); +CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member 0"); diff --git a/mysql-test/suite/galera/r/galera_ist_mariabackup,debug.rdiff b/mysql-test/suite/galera/r/galera_ist_mariabackup,debug.rdiff new file mode 100644 index 00000000000..9684e290778 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_ist_mariabackup,debug.rdiff @@ -0,0 +1,114 @@ +--- r/galera_ist_mariabackup.result 2018-11-21 22:30:21.968817468 +0200 ++++ r/galera_ist_mariabackup.reject 2018-11-22 09:16:27.832601754 +0200 +@@ -285,3 +285,111 @@ + DROP TABLE t1; + COMMIT; + SET AUTOCOMMIT=ON; ++Performing State Transfer on a server that has been killed and restarted ++while a DDL was in progress on it ++connection node_1; ++CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++connection node_2; ++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'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++COMMIT; ++SET GLOBAL debug_dbug = 'd,sync.alter_opened_table'; ++connection node_1; ++ALTER TABLE t1 ADD COLUMN f2 INTEGER; ++connection node_2; ++SET wsrep_sync_wait = 0; ++Killing server ... ++connection node_1; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++COMMIT; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++connection node_2; ++Performing --wsrep-recover ... ++connection node_2; ++Starting server ... ++Using --wsrep-start-position when starting mysqld ... ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++COMMIT; ++connection node_1; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++COMMIT; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++COMMIT; ++connection node_1a_galera_st_kill_slave_ddl; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++ROLLBACK; ++SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++COUNT(*) = 2 ++1 ++SELECT COUNT(*) = 35 FROM t1; ++COUNT(*) = 35 ++1 ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++COMMIT; ++SET AUTOCOMMIT=ON; ++connection node_1; ++SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++COUNT(*) = 2 ++1 ++SELECT COUNT(*) = 35 FROM t1; ++COUNT(*) = 35 ++1 ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++DROP TABLE t1; ++COMMIT; ++SET AUTOCOMMIT=ON; ++SET GLOBAL debug_dbug = $debug_orig; diff --git a/mysql-test/suite/galera/r/galera_ist_mariabackup.result b/mysql-test/suite/galera/r/galera_ist_mariabackup.result new file mode 100644 index 00000000000..8a7c02ab1b6 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_ist_mariabackup.result @@ -0,0 +1,287 @@ +connection node_1; +connection node_2; +Performing State Transfer on a server that has been temporarily disconnected +connection node_1; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +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'); +INSERT INTO t1 VALUES ('node2_committed_before'); +COMMIT; +Unloading wsrep provider ... +SET GLOBAL wsrep_provider = 'none'; +connection node_1; +SET AUTOCOMMIT=OFF; +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'); +INSERT INTO t1 VALUES ('node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +connect node_1a_galera_st_disconnect_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +connection node_2; +Loading wsrep provider ... +SET AUTOCOMMIT=OFF; +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'); +INSERT INTO t1 VALUES ('node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +COMMIT; +connection node_1a_galera_st_disconnect_slave; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +ROLLBACK; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +SET AUTOCOMMIT=ON; +connection node_1; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +SET AUTOCOMMIT=ON; +Performing State Transfer on a server that has been shut down cleanly and restarted +connection node_1; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +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'); +INSERT INTO t1 VALUES ('node2_committed_before'); +COMMIT; +Shutting down server ... +connection node_1; +SET AUTOCOMMIT=OFF; +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'); +INSERT INTO t1 VALUES ('node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +connection node_2; +Starting server ... +SET AUTOCOMMIT=OFF; +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'); +INSERT INTO t1 VALUES ('node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +COMMIT; +connection node_1a_galera_st_shutdown_slave; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +ROLLBACK; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +SET AUTOCOMMIT=ON; +connection node_1; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +SET AUTOCOMMIT=ON; +Performing State Transfer on a server that has been killed and restarted +connection node_1; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +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'); +INSERT INTO t1 VALUES ('node2_committed_before'); +COMMIT; +Killing server ... +connection node_1; +SET AUTOCOMMIT=OFF; +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'); +INSERT INTO t1 VALUES ('node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +connection node_2; +Performing --wsrep-recover ... +Starting server ... +Using --wsrep-start-position when starting mysqld ... +SET AUTOCOMMIT=OFF; +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'); +INSERT INTO t1 VALUES ('node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +COMMIT; +connection node_1a_galera_st_kill_slave; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +ROLLBACK; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +SET AUTOCOMMIT=ON; +connection node_1; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +SET AUTOCOMMIT=ON; diff --git a/mysql-test/suite/galera/r/galera_ist_mariabackup_innodb_flush_logs,debug.rdiff b/mysql-test/suite/galera/r/galera_ist_mariabackup_innodb_flush_logs,debug.rdiff new file mode 100644 index 00000000000..792f98b4427 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_ist_mariabackup_innodb_flush_logs,debug.rdiff @@ -0,0 +1,114 @@ +--- r/galera_ist_mariabackup_innodb_flush_logs.result 2018-11-21 21:34:20.157054441 +0200 ++++ r/galera_ist_mariabackup_innodb_flush_logs.reject 2018-11-22 09:16:16.824604445 +0200 +@@ -94,3 +94,111 @@ + DROP TABLE t1; + COMMIT; + SET AUTOCOMMIT=ON; ++Performing State Transfer on a server that has been killed and restarted ++while a DDL was in progress on it ++connection node_1; ++CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++connection node_2; ++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'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++COMMIT; ++SET GLOBAL debug_dbug = 'd,sync.alter_opened_table'; ++connection node_1; ++ALTER TABLE t1 ADD COLUMN f2 INTEGER; ++connection node_2; ++SET wsrep_sync_wait = 0; ++Killing server ... ++connection node_1; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++COMMIT; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++connection node_2; ++Performing --wsrep-recover ... ++connection node_2; ++Starting server ... ++Using --wsrep-start-position when starting mysqld ... ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++COMMIT; ++connection node_1; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++COMMIT; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++COMMIT; ++connection node_1a_galera_st_kill_slave_ddl; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++ROLLBACK; ++SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++COUNT(*) = 2 ++1 ++SELECT COUNT(*) = 35 FROM t1; ++COUNT(*) = 35 ++1 ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++COMMIT; ++SET AUTOCOMMIT=ON; ++connection node_1; ++SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++COUNT(*) = 2 ++1 ++SELECT COUNT(*) = 35 FROM t1; ++COUNT(*) = 35 ++1 ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++DROP TABLE t1; ++COMMIT; ++SET AUTOCOMMIT=ON; ++SET GLOBAL debug_dbug = $debug_orig; diff --git a/mysql-test/suite/galera/r/galera_ist_mariabackup_innodb_flush_logs.result b/mysql-test/suite/galera/r/galera_ist_mariabackup_innodb_flush_logs.result new file mode 100644 index 00000000000..7813b5a58fc --- /dev/null +++ b/mysql-test/suite/galera/r/galera_ist_mariabackup_innodb_flush_logs.result @@ -0,0 +1,96 @@ +Performing State Transfer on a server that has been killed and restarted +connection node_1; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +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'); +INSERT INTO t1 VALUES ('node2_committed_before'); +COMMIT; +Killing server ... +connection node_1; +SET AUTOCOMMIT=OFF; +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'); +INSERT INTO t1 VALUES ('node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +connection node_2; +Performing --wsrep-recover ... +Starting server ... +Using --wsrep-start-position when starting mysqld ... +SET AUTOCOMMIT=OFF; +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'); +INSERT INTO t1 VALUES ('node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +COMMIT; +connection node_1a_galera_st_kill_slave; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +ROLLBACK; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +SET AUTOCOMMIT=ON; +connection node_1; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +SET AUTOCOMMIT=ON; diff --git a/mysql-test/suite/galera/r/galera_ist_mysqldump,debug.rdiff b/mysql-test/suite/galera/r/galera_ist_mysqldump,debug.rdiff index 74e6abd713f..141b1ebd25f 100644 --- a/mysql-test/suite/galera/r/galera_ist_mysqldump,debug.rdiff +++ b/mysql-test/suite/galera/r/galera_ist_mysqldump,debug.rdiff @@ -1,11 +1,12 @@ ---- r/galera_ist_mysqldump.result 2018-09-11 12:38:42.027479411 +0300 -+++ r/galera_ist_mysqldump.reject 2018-09-17 10:28:44.483441364 +0300 -@@ -180,6 +180,103 @@ +--- r/galera_ist_mysqldump.result 2018-11-22 14:25:28.551554055 +0200 ++++ r/galera_ist_mysqldump.reject 2018-11-22 15:46:33.119441931 +0200 +@@ -200,6 +200,114 @@ DROP TABLE t1; COMMIT; SET AUTOCOMMIT=ON; +Performing State Transfer on a server that has been killed and restarted +while a DDL was in progress on it ++connection node_1; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; @@ -14,6 +15,7 @@ +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); ++connection node_2; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); @@ -22,9 +24,12 @@ +INSERT INTO t1 VALUES ('node2_committed_before'); +COMMIT; +SET GLOBAL debug_dbug = 'd,sync.alter_opened_table'; ++connection node_1; +ALTER TABLE t1 ADD COLUMN f2 INTEGER; ++connection node_2; +SET wsrep_sync_wait = 0; +Killing server ... ++connection node_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 (f1) VALUES ('node1_committed_during'); @@ -39,6 +44,7 @@ +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); @@ -46,7 +52,9 @@ +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++connection node_2; +Performing --wsrep-recover ... ++connection node_2; +Starting server ... +Using --wsrep-start-position when starting mysqld ... +SET AUTOCOMMIT=OFF; @@ -57,6 +65,7 @@ +INSERT INTO t1 (f1) VALUES ('node2_committed_after'); +INSERT INTO t1 (f1) VALUES ('node2_committed_after'); +COMMIT; ++connection node_1; +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); @@ -71,6 +80,7 @@ +INSERT INTO t1 (f1) VALUES ('node1_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_committed_after'); +COMMIT; ++connection node_1a_galera_st_kill_slave_ddl; +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); @@ -88,6 +98,7 @@ +1 +COMMIT; +SET AUTOCOMMIT=ON; ++connection node_1; +SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; +COUNT(*) = 2 +1 @@ -101,6 +112,6 @@ +COMMIT; +SET AUTOCOMMIT=ON; +SET GLOBAL debug_dbug = $debug_orig; + connection node_1; CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query"); DROP USER sst; - CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query"); diff --git a/mysql-test/suite/galera/r/galera_sst_mariabackup,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_mariabackup,debug.rdiff index 8b091eb370a..819bcba7cac 100644 --- a/mysql-test/suite/galera/r/galera_sst_mariabackup,debug.rdiff +++ b/mysql-test/suite/galera/r/galera_sst_mariabackup,debug.rdiff @@ -1,5 +1,5 @@ ---- galera_sst_mariabackup.result -+++ galera_sst_mariabackup,debug.reject +--- r/galera_sst_mariabackup.result 2018-11-21 16:50:35.766982279 +0200 ++++ r/galera_sst_mariabackup.reject 2018-11-22 09:20:10.344408266 +0200 @@ -286,5 +286,113 @@ DROP TABLE t1; COMMIT; diff --git a/mysql-test/suite/galera/r/galera_sst_mariabackup_encrypt_with_key.result b/mysql-test/suite/galera/r/galera_sst_mariabackup_encrypt_with_key.result new file mode 100644 index 00000000000..990e0a29506 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_sst_mariabackup_encrypt_with_key.result @@ -0,0 +1,3 @@ +SELECT 1; +1 +1 diff --git a/mysql-test/suite/galera/r/galera_sst_mariabackup_table_options.result b/mysql-test/suite/galera/r/galera_sst_mariabackup_table_options.result new file mode 100644 index 00000000000..9180ed5e421 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_sst_mariabackup_table_options.result @@ -0,0 +1,997 @@ +connection node_1; +connection node_2; +Performing State Transfer on a server that starts from a clean var directory +This is accomplished by shutting down node #2 and removing its var directory before restarting it +connection node_1; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +CREATE TABLE t2 (f1 CHAR(255)) ENGINE=InnoDB PAGE_COMPRESSED=1; +CREATE TABLE t3 (f1 CHAR(255)) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=NO; +CREATE TABLE t4 (f1 CHAR(255)) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=YES; +CREATE TABLE t5 (f1 CHAR(255)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; +CREATE TABLE t6 (f1 CHAR(255)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED ENCRYPTED=NO; +CREATE TABLE t7 (f1 CHAR(255)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED ENCRYPTED=YES; +CREATE TABLE t8 (f1 CHAR(255)) ENGINE=InnoDB ENCRYPTED=NO; +CREATE TABLE t9 (f1 CHAR(255)) ENGINE=InnoDB ENCRYPTED=YES; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +insert into t9 values ('node1_committed_before'); +insert into t9 values ('node1_committed_before'); +insert into t9 values ('node1_committed_before'); +insert into t9 values ('node1_committed_before'); +insert into t9 values ('node1_committed_before'); +insert into t8 values ('node1_committed_before'); +insert into t8 values ('node1_committed_before'); +insert into t8 values ('node1_committed_before'); +insert into t8 values ('node1_committed_before'); +insert into t8 values ('node1_committed_before'); +insert into t7 values ('node1_committed_before'); +insert into t7 values ('node1_committed_before'); +insert into t7 values ('node1_committed_before'); +insert into t7 values ('node1_committed_before'); +insert into t7 values ('node1_committed_before'); +insert into t6 values ('node1_committed_before'); +insert into t6 values ('node1_committed_before'); +insert into t6 values ('node1_committed_before'); +insert into t6 values ('node1_committed_before'); +insert into t6 values ('node1_committed_before'); +insert into t5 values ('node1_committed_before'); +insert into t5 values ('node1_committed_before'); +insert into t5 values ('node1_committed_before'); +insert into t5 values ('node1_committed_before'); +insert into t5 values ('node1_committed_before'); +insert into t4 values ('node1_committed_before'); +insert into t4 values ('node1_committed_before'); +insert into t4 values ('node1_committed_before'); +insert into t4 values ('node1_committed_before'); +insert into t4 values ('node1_committed_before'); +insert into t3 values ('node1_committed_before'); +insert into t3 values ('node1_committed_before'); +insert into t3 values ('node1_committed_before'); +insert into t3 values ('node1_committed_before'); +insert into t3 values ('node1_committed_before'); +insert into t2 values ('node1_committed_before'); +insert into t2 values ('node1_committed_before'); +insert into t2 values ('node1_committed_before'); +insert into t2 values ('node1_committed_before'); +insert into t2 values ('node1_committed_before'); +insert into t1 values ('node1_committed_before'); +insert into t1 values ('node1_committed_before'); +insert into t1 values ('node1_committed_before'); +insert into t1 values ('node1_committed_before'); +insert into t1 values ('node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +insert into t9 values ('node2_committed_before'); +insert into t9 values ('node2_committed_before'); +insert into t9 values ('node2_committed_before'); +insert into t9 values ('node2_committed_before'); +insert into t9 values ('node2_committed_before'); +insert into t8 values ('node2_committed_before'); +insert into t8 values ('node2_committed_before'); +insert into t8 values ('node2_committed_before'); +insert into t8 values ('node2_committed_before'); +insert into t8 values ('node2_committed_before'); +insert into t7 values ('node2_committed_before'); +insert into t7 values ('node2_committed_before'); +insert into t7 values ('node2_committed_before'); +insert into t7 values ('node2_committed_before'); +insert into t7 values ('node2_committed_before'); +insert into t6 values ('node2_committed_before'); +insert into t6 values ('node2_committed_before'); +insert into t6 values ('node2_committed_before'); +insert into t6 values ('node2_committed_before'); +insert into t6 values ('node2_committed_before'); +insert into t5 values ('node2_committed_before'); +insert into t5 values ('node2_committed_before'); +insert into t5 values ('node2_committed_before'); +insert into t5 values ('node2_committed_before'); +insert into t5 values ('node2_committed_before'); +insert into t4 values ('node2_committed_before'); +insert into t4 values ('node2_committed_before'); +insert into t4 values ('node2_committed_before'); +insert into t4 values ('node2_committed_before'); +insert into t4 values ('node2_committed_before'); +insert into t3 values ('node2_committed_before'); +insert into t3 values ('node2_committed_before'); +insert into t3 values ('node2_committed_before'); +insert into t3 values ('node2_committed_before'); +insert into t3 values ('node2_committed_before'); +insert into t2 values ('node2_committed_before'); +insert into t2 values ('node2_committed_before'); +insert into t2 values ('node2_committed_before'); +insert into t2 values ('node2_committed_before'); +insert into t2 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'); +insert into t1 values ('node2_committed_before'); +insert into t1 values ('node2_committed_before'); +COMMIT; +Shutting down server ... +connection node_1; +Cleaning var directory ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +insert into t9 values ('node1_committed_during'); +insert into t9 values ('node1_committed_during'); +insert into t9 values ('node1_committed_during'); +insert into t9 values ('node1_committed_during'); +insert into t9 values ('node1_committed_during'); +insert into t8 values ('node1_committed_during'); +insert into t8 values ('node1_committed_during'); +insert into t8 values ('node1_committed_during'); +insert into t8 values ('node1_committed_during'); +insert into t8 values ('node1_committed_during'); +insert into t7 values ('node1_committed_during'); +insert into t7 values ('node1_committed_during'); +insert into t7 values ('node1_committed_during'); +insert into t7 values ('node1_committed_during'); +insert into t7 values ('node1_committed_during'); +insert into t6 values ('node1_committed_during'); +insert into t6 values ('node1_committed_during'); +insert into t6 values ('node1_committed_during'); +insert into t6 values ('node1_committed_during'); +insert into t6 values ('node1_committed_during'); +insert into t5 values ('node1_committed_during'); +insert into t5 values ('node1_committed_during'); +insert into t5 values ('node1_committed_during'); +insert into t5 values ('node1_committed_during'); +insert into t5 values ('node1_committed_during'); +insert into t4 values ('node1_committed_during'); +insert into t4 values ('node1_committed_during'); +insert into t4 values ('node1_committed_during'); +insert into t4 values ('node1_committed_during'); +insert into t4 values ('node1_committed_during'); +insert into t3 values ('node1_committed_during'); +insert into t3 values ('node1_committed_during'); +insert into t3 values ('node1_committed_during'); +insert into t3 values ('node1_committed_during'); +insert into t3 values ('node1_committed_during'); +insert into t2 values ('node1_committed_during'); +insert into t2 values ('node1_committed_during'); +insert into t2 values ('node1_committed_during'); +insert into t2 values ('node1_committed_during'); +insert into t2 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'); +insert into t1 values ('node1_committed_during'); +insert into t1 values ('node1_committed_during'); +COMMIT; +START TRANSACTION; +insert into t9 values ('node1_to_be_committed_after'); +insert into t9 values ('node1_to_be_committed_after'); +insert into t9 values ('node1_to_be_committed_after'); +insert into t9 values ('node1_to_be_committed_after'); +insert into t9 values ('node1_to_be_committed_after'); +insert into t8 values ('node1_to_be_committed_after'); +insert into t8 values ('node1_to_be_committed_after'); +insert into t8 values ('node1_to_be_committed_after'); +insert into t8 values ('node1_to_be_committed_after'); +insert into t8 values ('node1_to_be_committed_after'); +insert into t7 values ('node1_to_be_committed_after'); +insert into t7 values ('node1_to_be_committed_after'); +insert into t7 values ('node1_to_be_committed_after'); +insert into t7 values ('node1_to_be_committed_after'); +insert into t7 values ('node1_to_be_committed_after'); +insert into t6 values ('node1_to_be_committed_after'); +insert into t6 values ('node1_to_be_committed_after'); +insert into t6 values ('node1_to_be_committed_after'); +insert into t6 values ('node1_to_be_committed_after'); +insert into t6 values ('node1_to_be_committed_after'); +insert into t5 values ('node1_to_be_committed_after'); +insert into t5 values ('node1_to_be_committed_after'); +insert into t5 values ('node1_to_be_committed_after'); +insert into t5 values ('node1_to_be_committed_after'); +insert into t5 values ('node1_to_be_committed_after'); +insert into t4 values ('node1_to_be_committed_after'); +insert into t4 values ('node1_to_be_committed_after'); +insert into t4 values ('node1_to_be_committed_after'); +insert into t4 values ('node1_to_be_committed_after'); +insert into t4 values ('node1_to_be_committed_after'); +insert into t3 values ('node1_to_be_committed_after'); +insert into t3 values ('node1_to_be_committed_after'); +insert into t3 values ('node1_to_be_committed_after'); +insert into t3 values ('node1_to_be_committed_after'); +insert into t3 values ('node1_to_be_committed_after'); +insert into t2 values ('node1_to_be_committed_after'); +insert into t2 values ('node1_to_be_committed_after'); +insert into t2 values ('node1_to_be_committed_after'); +insert into t2 values ('node1_to_be_committed_after'); +insert into t2 values ('node1_to_be_committed_after'); +insert into t1 values ('node1_to_be_committed_after'); +insert into t1 values ('node1_to_be_committed_after'); +insert into t1 values ('node1_to_be_committed_after'); +insert into t1 values ('node1_to_be_committed_after'); +insert into t1 values ('node1_to_be_committed_after'); +connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +insert into t9 values ('node1_to_be_rollbacked_after'); +insert into t9 values ('node1_to_be_rollbacked_after'); +insert into t9 values ('node1_to_be_rollbacked_after'); +insert into t9 values ('node1_to_be_rollbacked_after'); +insert into t9 values ('node1_to_be_rollbacked_after'); +insert into t8 values ('node1_to_be_rollbacked_after'); +insert into t8 values ('node1_to_be_rollbacked_after'); +insert into t8 values ('node1_to_be_rollbacked_after'); +insert into t8 values ('node1_to_be_rollbacked_after'); +insert into t8 values ('node1_to_be_rollbacked_after'); +insert into t7 values ('node1_to_be_rollbacked_after'); +insert into t7 values ('node1_to_be_rollbacked_after'); +insert into t7 values ('node1_to_be_rollbacked_after'); +insert into t7 values ('node1_to_be_rollbacked_after'); +insert into t7 values ('node1_to_be_rollbacked_after'); +insert into t6 values ('node1_to_be_rollbacked_after'); +insert into t6 values ('node1_to_be_rollbacked_after'); +insert into t6 values ('node1_to_be_rollbacked_after'); +insert into t6 values ('node1_to_be_rollbacked_after'); +insert into t6 values ('node1_to_be_rollbacked_after'); +insert into t5 values ('node1_to_be_rollbacked_after'); +insert into t5 values ('node1_to_be_rollbacked_after'); +insert into t5 values ('node1_to_be_rollbacked_after'); +insert into t5 values ('node1_to_be_rollbacked_after'); +insert into t5 values ('node1_to_be_rollbacked_after'); +insert into t4 values ('node1_to_be_rollbacked_after'); +insert into t4 values ('node1_to_be_rollbacked_after'); +insert into t4 values ('node1_to_be_rollbacked_after'); +insert into t4 values ('node1_to_be_rollbacked_after'); +insert into t4 values ('node1_to_be_rollbacked_after'); +insert into t3 values ('node1_to_be_rollbacked_after'); +insert into t3 values ('node1_to_be_rollbacked_after'); +insert into t3 values ('node1_to_be_rollbacked_after'); +insert into t3 values ('node1_to_be_rollbacked_after'); +insert into t3 values ('node1_to_be_rollbacked_after'); +insert into t2 values ('node1_to_be_rollbacked_after'); +insert into t2 values ('node1_to_be_rollbacked_after'); +insert into t2 values ('node1_to_be_rollbacked_after'); +insert into t2 values ('node1_to_be_rollbacked_after'); +insert into t2 values ('node1_to_be_rollbacked_after'); +insert into t1 values ('node1_to_be_rollbacked_after'); +insert into t1 values ('node1_to_be_rollbacked_after'); +insert into t1 values ('node1_to_be_rollbacked_after'); +insert into t1 values ('node1_to_be_rollbacked_after'); +insert into t1 values ('node1_to_be_rollbacked_after'); +connection node_2; +Starting server ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +COMMIT; +connection node_1; +insert into t9 values ('node1_to_be_committed_after'); +insert into t9 values ('node1_to_be_committed_after'); +insert into t9 values ('node1_to_be_committed_after'); +insert into t9 values ('node1_to_be_committed_after'); +insert into t9 values ('node1_to_be_committed_after'); +insert into t8 values ('node1_to_be_committed_after'); +insert into t8 values ('node1_to_be_committed_after'); +insert into t8 values ('node1_to_be_committed_after'); +insert into t8 values ('node1_to_be_committed_after'); +insert into t8 values ('node1_to_be_committed_after'); +insert into t7 values ('node1_to_be_committed_after'); +insert into t7 values ('node1_to_be_committed_after'); +insert into t7 values ('node1_to_be_committed_after'); +insert into t7 values ('node1_to_be_committed_after'); +insert into t7 values ('node1_to_be_committed_after'); +insert into t6 values ('node1_to_be_committed_after'); +insert into t6 values ('node1_to_be_committed_after'); +insert into t6 values ('node1_to_be_committed_after'); +insert into t6 values ('node1_to_be_committed_after'); +insert into t6 values ('node1_to_be_committed_after'); +insert into t5 values ('node1_to_be_committed_after'); +insert into t5 values ('node1_to_be_committed_after'); +insert into t5 values ('node1_to_be_committed_after'); +insert into t5 values ('node1_to_be_committed_after'); +insert into t5 values ('node1_to_be_committed_after'); +insert into t4 values ('node1_to_be_committed_after'); +insert into t4 values ('node1_to_be_committed_after'); +insert into t4 values ('node1_to_be_committed_after'); +insert into t4 values ('node1_to_be_committed_after'); +insert into t4 values ('node1_to_be_committed_after'); +insert into t3 values ('node1_to_be_committed_after'); +insert into t3 values ('node1_to_be_committed_after'); +insert into t3 values ('node1_to_be_committed_after'); +insert into t3 values ('node1_to_be_committed_after'); +insert into t3 values ('node1_to_be_committed_after'); +insert into t2 values ('node1_to_be_committed_after'); +insert into t2 values ('node1_to_be_committed_after'); +insert into t2 values ('node1_to_be_committed_after'); +insert into t2 values ('node1_to_be_committed_after'); +insert into t2 values ('node1_to_be_committed_after'); +insert into t1 values ('node1_to_be_committed_after'); +insert into t1 values ('node1_to_be_committed_after'); +insert into t1 values ('node1_to_be_committed_after'); +insert into t1 values ('node1_to_be_committed_after'); +insert into t1 values ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +insert into t9 values ('node1_committed_after'); +insert into t9 values ('node1_committed_after'); +insert into t9 values ('node1_committed_after'); +insert into t9 values ('node1_committed_after'); +insert into t9 values ('node1_committed_after'); +insert into t8 values ('node1_committed_after'); +insert into t8 values ('node1_committed_after'); +insert into t8 values ('node1_committed_after'); +insert into t8 values ('node1_committed_after'); +insert into t8 values ('node1_committed_after'); +insert into t7 values ('node1_committed_after'); +insert into t7 values ('node1_committed_after'); +insert into t7 values ('node1_committed_after'); +insert into t7 values ('node1_committed_after'); +insert into t7 values ('node1_committed_after'); +insert into t6 values ('node1_committed_after'); +insert into t6 values ('node1_committed_after'); +insert into t6 values ('node1_committed_after'); +insert into t6 values ('node1_committed_after'); +insert into t6 values ('node1_committed_after'); +insert into t5 values ('node1_committed_after'); +insert into t5 values ('node1_committed_after'); +insert into t5 values ('node1_committed_after'); +insert into t5 values ('node1_committed_after'); +insert into t5 values ('node1_committed_after'); +insert into t4 values ('node1_committed_after'); +insert into t4 values ('node1_committed_after'); +insert into t4 values ('node1_committed_after'); +insert into t4 values ('node1_committed_after'); +insert into t4 values ('node1_committed_after'); +insert into t3 values ('node1_committed_after'); +insert into t3 values ('node1_committed_after'); +insert into t3 values ('node1_committed_after'); +insert into t3 values ('node1_committed_after'); +insert into t3 values ('node1_committed_after'); +insert into t2 values ('node1_committed_after'); +insert into t2 values ('node1_committed_after'); +insert into t2 values ('node1_committed_after'); +insert into t2 values ('node1_committed_after'); +insert into t2 values ('node1_committed_after'); +insert into t1 values ('node1_committed_after'); +insert into t1 values ('node1_committed_after'); +insert into t1 values ('node1_committed_after'); +insert into t1 values ('node1_committed_after'); +insert into t1 values ('node1_committed_after'); +COMMIT; +connection node_1a_galera_st_clean_slave; +ROLLBACK; +SELECT COUNT(*) FROM t1; +COUNT(*) +30 +SELECT COUNT(*) FROM t2; +COUNT(*) +30 +SELECT COUNT(*) FROM t3; +COUNT(*) +30 +SELECT COUNT(*) FROM t4; +COUNT(*) +30 +SELECT COUNT(*) FROM t5; +COUNT(*) +30 +SELECT COUNT(*) FROM t6; +COUNT(*) +30 +SELECT COUNT(*) FROM t7; +COUNT(*) +30 +SELECT COUNT(*) FROM t8; +COUNT(*) +30 +SELECT COUNT(*) FROM t9; +COUNT(*) +30 +SELECT * FROM t1; +f1 +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +SELECT * FROM t2; +f1 +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +SELECT * FROM t3; +f1 +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +SELECT * FROM t4; +f1 +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +SELECT * FROM t5; +f1 +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +SELECT * FROM t6; +f1 +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +SELECT * FROM t7; +f1 +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +SELECT * FROM t8; +f1 +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +SELECT * FROM t9; +f1 +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +COMMIT; +SET AUTOCOMMIT=ON; +connection node_1; +SELECT COUNT(*) FROM t1; +COUNT(*) +30 +SELECT COUNT(*) FROM t2; +COUNT(*) +30 +SELECT COUNT(*) FROM t3; +COUNT(*) +30 +SELECT COUNT(*) FROM t4; +COUNT(*) +30 +SELECT COUNT(*) FROM t5; +COUNT(*) +30 +SELECT COUNT(*) FROM t6; +COUNT(*) +30 +SELECT COUNT(*) FROM t7; +COUNT(*) +30 +SELECT COUNT(*) FROM t8; +COUNT(*) +30 +SELECT COUNT(*) FROM t9; +COUNT(*) +30 +SELECT * FROM t1; +f1 +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +SELECT * FROM t2; +f1 +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +SELECT * FROM t3; +f1 +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +SELECT * FROM t4; +f1 +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +SELECT * FROM t5; +f1 +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +SELECT * FROM t6; +f1 +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +SELECT * FROM t7; +f1 +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +SELECT * FROM t8; +f1 +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +SELECT * FROM t9; +f1 +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node1_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node2_committed_before +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_committed_during +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_to_be_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +node1_committed_after +COMMIT; +DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9; +COMMIT; +SET AUTOCOMMIT=ON; +disconnect node_2; +disconnect node_1; diff --git a/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key,debug.rdiff new file mode 100644 index 00000000000..4a7db96dc22 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key,debug.rdiff @@ -0,0 +1,106 @@ +--- r/galera_sst_mysqldump_with_key.result 2018-11-19 09:56:30.081976558 +0200 ++++ r/galera_sst_mysqldump_with_key.reject 2018-11-19 10:47:41.609299365 +0200 +@@ -183,6 +183,103 @@ + DROP TABLE t1; + COMMIT; + SET AUTOCOMMIT=ON; ++Performing State Transfer on a server that has been killed and restarted ++while a DDL was in progress on it ++CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++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'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++COMMIT; ++SET GLOBAL debug_dbug = 'd,sync.alter_opened_table'; ++ALTER TABLE t1 ADD COLUMN f2 INTEGER; ++SET wsrep_sync_wait = 0; ++Killing server ... ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++COMMIT; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++Performing --wsrep-recover ... ++Starting server ... ++Using --wsrep-start-position when starting mysqld ... ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++COMMIT; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++COMMIT; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++COMMIT; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++ROLLBACK; ++SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++COUNT(*) = 2 ++1 ++SELECT COUNT(*) = 35 FROM t1; ++COUNT(*) = 35 ++1 ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++COMMIT; ++SET AUTOCOMMIT=ON; ++SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++COUNT(*) = 2 ++1 ++SELECT COUNT(*) = 35 FROM t1; ++COUNT(*) = 35 ++1 ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++DROP TABLE t1; ++COMMIT; ++SET AUTOCOMMIT=ON; ++SET GLOBAL debug_dbug = $debug_orig; + CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query"); + DROP USER sst; + CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query"); diff --git a/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result b/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result index 02dde169911..3de446fec32 100644 --- a/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result +++ b/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result @@ -204,114 +204,17 @@ COUNT(*) = 0 DROP TABLE t1; COMMIT; SET AUTOCOMMIT=ON; -Performing State Transfer on a server that has been killed and restarted -while a DDL was in progress on it connection node_1; -CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 VALUES ('node1_committed_before'); -INSERT INTO t1 VALUES ('node1_committed_before'); -INSERT INTO t1 VALUES ('node1_committed_before'); -INSERT INTO t1 VALUES ('node1_committed_before'); -INSERT INTO t1 VALUES ('node1_committed_before'); connection node_2; -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'); -INSERT INTO t1 VALUES ('node2_committed_before'); -COMMIT; -SET GLOBAL debug_dbug = 'd,sync.alter_opened_table'; connection node_1; -ALTER TABLE t1 ADD COLUMN f2 INTEGER; connection node_2; -SET wsrep_sync_wait = 0; -Killing server ... connection node_1; -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 (f1) VALUES ('node1_committed_during'); -INSERT INTO t1 (f1) VALUES ('node1_committed_during'); -INSERT INTO t1 (f1) VALUES ('node1_committed_during'); -INSERT INTO t1 (f1) VALUES ('node1_committed_during'); -INSERT INTO t1 (f1) VALUES ('node1_committed_during'); -COMMIT; -START TRANSACTION; -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1; -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); connection node_2; -Performing --wsrep-recover ... connection node_2; -Starting server ... -Using --wsrep-start-position when starting mysqld ... -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 (f1) VALUES ('node2_committed_after'); -INSERT INTO t1 (f1) VALUES ('node2_committed_after'); -INSERT INTO t1 (f1) VALUES ('node2_committed_after'); -INSERT INTO t1 (f1) VALUES ('node2_committed_after'); -INSERT INTO t1 (f1) VALUES ('node2_committed_after'); -COMMIT; connection node_1; -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -COMMIT; -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 (f1) VALUES ('node1_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_committed_after'); -COMMIT; connection node_1a_galera_st_kill_slave_ddl; -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -ROLLBACK; -SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; -COUNT(*) = 2 -1 -SELECT COUNT(*) = 35 FROM t1; -COUNT(*) = 35 -1 -SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; -COUNT(*) = 0 -1 -COMMIT; -SET AUTOCOMMIT=ON; connection node_1; -SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; -COUNT(*) = 2 -1 -SELECT COUNT(*) = 35 FROM t1; -COUNT(*) = 35 -1 -SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; -COUNT(*) = 0 -1 -DROP TABLE t1; -COMMIT; -SET AUTOCOMMIT=ON; -SET GLOBAL debug_dbug = $debug_orig; connection node_1; CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query"); DROP USER sst; diff --git a/mysql-test/suite/galera/r/galera_sst_xtrabackup-v2_data_dir,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_xtrabackup-v2_data_dir,debug.rdiff new file mode 100644 index 00000000000..ac232020037 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_sst_xtrabackup-v2_data_dir,debug.rdiff @@ -0,0 +1,103 @@ +--- r/galera_sst_xtrabackup-v2_data_dir.result 2018-11-19 12:27:24.795221479 +0200 ++++ r/galera_sst_xtrabackup-v2_data_dir.reject 2018-11-19 19:15:38.774008404 +0200 +@@ -260,3 +260,100 @@ + DROP TABLE t1; + COMMIT; + SET AUTOCOMMIT=ON; ++Performing State Transfer on a server that has been killed and restarted ++while a DDL was in progress on it ++CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++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'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++COMMIT; ++SET GLOBAL debug_dbug = 'd,sync.alter_opened_table'; ++ALTER TABLE t1 ADD COLUMN f2 INTEGER; ++SET wsrep_sync_wait = 0; ++Killing server ... ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++COMMIT; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++Performing --wsrep-recover ... ++Starting server ... ++Using --wsrep-start-position when starting mysqld ... ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++COMMIT; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++COMMIT; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++COMMIT; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++ROLLBACK; ++SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++COUNT(*) = 2 ++1 ++SELECT COUNT(*) = 35 FROM t1; ++COUNT(*) = 35 ++1 ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++COMMIT; ++SET AUTOCOMMIT=ON; ++SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++COUNT(*) = 2 ++1 ++SELECT COUNT(*) = 35 FROM t1; ++COUNT(*) = 35 ++1 ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++DROP TABLE t1; ++COMMIT; ++SET AUTOCOMMIT=ON; ++SET GLOBAL debug_dbug = $debug_orig; diff --git a/mysql-test/suite/galera/r/galera_var_reject_queries.result b/mysql-test/suite/galera/r/galera_var_reject_queries.result index 98380238fcb..caf98566595 100644 --- a/mysql-test/suite/galera/r/galera_var_reject_queries.result +++ b/mysql-test/suite/galera/r/galera_var_reject_queries.result @@ -7,7 +7,6 @@ SET GLOBAL wsrep_reject_queries = ALL; SELECT * FROM t1; ERROR 08S01: WSREP has not yet prepared node for application use SET GLOBAL wsrep_reject_queries = ALL_KILL; -ERROR HY000: Lost connection to MySQL server during query connection node_1a; SELECT * FROM t1; Got one of the listed errors diff --git a/mysql-test/suite/galera/r/partition.result b/mysql-test/suite/galera/r/partition.result index 3835de514aa..bdf6df25589 100644 --- a/mysql-test/suite/galera/r/partition.result +++ b/mysql-test/suite/galera/r/partition.result @@ -119,9 +119,9 @@ SET GLOBAL wsrep_load_data_splitting = ON; CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; connection node_2; -SELECT COUNT(*) = 20002 FROM t1; -COUNT(*) = 20002 -1 +SELECT COUNT(*) FROM t1; +COUNT(*) +20002 wsrep_last_committed_diff 1 DROP TABLE t1; @@ -131,9 +131,9 @@ SET GLOBAL wsrep_load_data_splitting = ON; CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; connection node_2; -SELECT COUNT(*) = 101 FROM t1; -COUNT(*) = 101 -1 +SELECT COUNT(*) FROM t1; +COUNT(*) +101 wsrep_last_committed_diff 1 DROP TABLE t1; @@ -144,9 +144,9 @@ SET GLOBAL wsrep_load_data_splitting = OFF; CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; connection node_2; -SELECT COUNT(*) = 20002 FROM t1; -COUNT(*) = 20002 -1 +SELECT COUNT(*) FROM t1; +COUNT(*) +20002 wsrep_last_committed_diff 1 DROP TABLE t1; diff --git a/mysql-test/suite/galera/suite.pm b/mysql-test/suite/galera/suite.pm index 233aa020a94..c3ae4d358f2 100644 --- a/mysql-test/suite/galera/suite.pm +++ b/mysql-test/suite/galera/suite.pm @@ -98,10 +98,6 @@ if (which(socat)) { sub skip_combinations { my %skip = (); - $skip{'include/have_xtrabackup.inc'} = 'Need innobackupex' - unless which(innobackupex); - $skip{'include/have_xtrabackup.inc'} = 'Need socat or nc' - unless $ENV{MTR_GALERA_TFMT}; $skip{'include/have_mariabackup.inc'} = 'Need mariabackup' unless which(mariabackup); $skip{'include/have_mariabackup.inc'} = 'Need ss' diff --git a/mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.cnf b/mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.cnf new file mode 100644 index 00000000000..7e557717744 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.cnf @@ -0,0 +1,12 @@ +!include ../galera_2nodes.cnf + +[mysqld] +wsrep_sst_method=mariabackup +wsrep_sst_auth="root:" + +[mysqld.1] +wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true' + +[mysqld.2] +wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true' + diff --git a/mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.test b/mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.test new file mode 100644 index 00000000000..731059dc584 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.test @@ -0,0 +1,96 @@ +# +# Test that autoincrement works correctly while the cluster membership +# is changing and SST takes place. +# + +--source include/big_test.inc +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_mariabackup.inc + +--connection node_1 +--let $connection_id = `SELECT CONNECTION_ID()` + +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; + +# Issue an endless stream of autoincrement inserts + +DELIMITER |; +CREATE PROCEDURE p1 () +BEGIN + DECLARE x INT DEFAULT 1; + DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END; + + WHILE 1 DO + INSERT INTO t1 VALUES (DEFAULT); + COMMIT; + END WHILE; +END| +DELIMITER ;| + +--send CALL p1(); +--sleep 2 + +--connection node_2 +--send CALL p1(); +--sleep 2 + +# Kill and restart node #2 + +--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 +--connection node_2a +--source include/kill_galera.inc + +--sleep 10 +--source include/start_mysqld.inc +--sleep 25 +--source include/wait_until_connected_again.inc + +INSERT INTO t1 VALUES (DEFAULT); + +# Terminate the stored procedure + +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--connection node_1a +--disable_query_log +--eval KILL CONNECTION $connection_id +--enable_query_log + +INSERT INTO t1 VALUES (DEFAULT); + +--connection node_1 +# CR_SERVER_LOST +--error 2013,2006 +--reap + +--connection node_2 +# CR_SERVER_LOST +--error 2013,2006 +--reap + +--sleep 10 + +# Confirm that the count is correct and that the cluster is intact + +--connection node_1a +--let $count = `SELECT COUNT(*) FROM t1` + +--connection node_2a +--disable_query_log +--eval SELECT COUNT(*) = $count AS count_equal FROM t1 +--enable_query_log + +CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member 0"); + +SELECT VARIABLE_VALUE 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'; + +--connection node_1a +SELECT VARIABLE_VALUE 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'; + +DROP PROCEDURE p1; +DROP TABLE t1; + +CALL mtr.add_suppression("gcs_caused\\(\\) returned -1 \\(Operation not permitted\\)"); +CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member 0"); diff --git a/mysql-test/suite/galera/t/galera_ist_mariabackup.cnf b/mysql-test/suite/galera/t/galera_ist_mariabackup.cnf new file mode 100644 index 00000000000..75dff78149d --- /dev/null +++ b/mysql-test/suite/galera/t/galera_ist_mariabackup.cnf @@ -0,0 +1,12 @@ +!include ../galera_2nodes.cnf + +[mysqld] +wsrep_sst_method=mariabackup +wsrep_sst_auth=root: + +[mysqld.1] +wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.ignore_sb=true' + +[mysqld.2] +wsrep_provider_options='base_port=@mysqld.2.#galera_port;pc.ignore_sb=true' + diff --git a/mysql-test/suite/galera/t/galera_ist_mariabackup.test b/mysql-test/suite/galera/t/galera_ist_mariabackup.test new file mode 100644 index 00000000000..6ef4f65ccd4 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_ist_mariabackup.test @@ -0,0 +1,16 @@ +--source include/big_test.inc +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_mariabackup.inc + +--let $node_1=node_1 +--let $node_2=node_2 +--source include/auto_increment_offset_save.inc + +--source suite/galera/include/galera_st_disconnect_slave.inc +--source suite/galera/include/galera_st_shutdown_slave.inc + +--source suite/galera/include/galera_st_kill_slave.inc +--source suite/galera/include/galera_st_kill_slave_ddl.inc + +--source include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera/t/galera_ist_mariabackup_innodb_flush_logs.cnf b/mysql-test/suite/galera/t/galera_ist_mariabackup_innodb_flush_logs.cnf new file mode 100644 index 00000000000..1542376b2b8 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_ist_mariabackup_innodb_flush_logs.cnf @@ -0,0 +1,14 @@ +!include ../galera_2nodes.cnf + +[mysqld] +wsrep_sst_method=mariabackup +wsrep_sst_auth=root: + +innodb_flush_log_at_trx_commit=0 + +[mysqld.1] +wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.ignore_sb=true' + +[mysqld.2] +wsrep_provider_options='base_port=@mysqld.2.#galera_port;pc.ignore_sb=true' + diff --git a/mysql-test/suite/galera/t/galera_ist_mariabackup_innodb_flush_logs.test b/mysql-test/suite/galera/t/galera_ist_mariabackup_innodb_flush_logs.test new file mode 100644 index 00000000000..07838702deb --- /dev/null +++ b/mysql-test/suite/galera/t/galera_ist_mariabackup_innodb_flush_logs.test @@ -0,0 +1,12 @@ +# +# This test performs server kill and IST while innodb_flush_logs_on_trx_commit = 0 +# This confirms that IST can properly catch up even in the face of relaxed single-node durability +# +# + +--source include/big_test.inc +--source include/galera_cluster.inc +--source include/have_innodb.inc + +--source suite/galera/include/galera_st_kill_slave.inc +--source suite/galera/include/galera_st_kill_slave_ddl.inc diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key.cnf b/mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key.cnf new file mode 100644 index 00000000000..5a989ea8177 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key.cnf @@ -0,0 +1,12 @@ +!include ../galera_2nodes.cnf + +[mysqld] +wsrep_sst_method=mariabackup +wsrep_sst_auth="root:" +wsrep_debug=ON + +[SST] +tkey=@ENV.MYSQL_TEST_DIR/std_data/galera-key.pem +tcert=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem +encrypt=3 +transferfmt=@ENV.MTR_GALERA_TFMT diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key.test b/mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key.test new file mode 100644 index 00000000000..4449ea43c43 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key.test @@ -0,0 +1,14 @@ +# +# This test checks that key and cert encryption options can be passed to mariabackup via the my.cnf file +# Initial SST happens via mariabackup, so there is not much to do in the body of the test +# + +--source include/big_test.inc +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_mariabackup.inc + +SELECT 1; + +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.cnf b/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.cnf new file mode 100644 index 00000000000..336296e9bfe --- /dev/null +++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.cnf @@ -0,0 +1,16 @@ +!include ../galera_2nodes.cnf + +[mysqld] +wsrep_sst_method=mariabackup +wsrep_sst_auth="root:" +wsrep_debug=ON + +[mysqld.1] +wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true' + +[mysqld.2] +wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true' + +[sst] +transferfmt=@ENV.MTR_GALERA_TFMT +streamfmt=xbstream diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test b/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test new file mode 100644 index 00000000000..267ec9ce681 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test @@ -0,0 +1,228 @@ +--source include/big_test.inc +--source include/galera_cluster.inc +--source include/innodb_encrypt_tables.inc +--source include/innodb_page_size_small.inc +--source include/have_mariabackup.inc + +# Save original auto_increment_offset values. +--let $node_1=node_1 +--let $node_2=node_2 +--source include/auto_increment_offset_save.inc + +--echo Performing State Transfer on a server that starts from a clean var directory +--echo This is accomplished by shutting down node #2 and removing its var directory before restarting it + +--connection node_1 +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +CREATE TABLE t2 (f1 CHAR(255)) ENGINE=InnoDB PAGE_COMPRESSED=1; +CREATE TABLE t3 (f1 CHAR(255)) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=NO; +CREATE TABLE t4 (f1 CHAR(255)) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=YES; +CREATE TABLE t5 (f1 CHAR(255)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; +CREATE TABLE t6 (f1 CHAR(255)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED ENCRYPTED=NO; +CREATE TABLE t7 (f1 CHAR(255)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED ENCRYPTED=YES; +CREATE TABLE t8 (f1 CHAR(255)) ENGINE=InnoDB ENCRYPTED=NO; +CREATE TABLE t9 (f1 CHAR(255)) ENGINE=InnoDB ENCRYPTED=YES; + +SET AUTOCOMMIT=OFF; +START TRANSACTION; +let $tables = 9; +while ($tables) +{ + let $rows = 5; + while($rows) + { + eval insert into t$tables values ('node1_committed_before'); + dec $rows; + } + dec $tables; +} +COMMIT; + +--connection node_2 +--let $wait_condition = SELECT COUNT(*) = 5 FROM t7; +--source include/wait_condition.inc + +SET AUTOCOMMIT=OFF; +START TRANSACTION; +let $tables = 9; +while ($tables) +{ + let $rows = 5; + while($rows) + { + eval insert into t$tables values ('node2_committed_before'); + dec $rows; + } + dec $tables; +} +COMMIT; + +--echo Shutting down server ... +--source include/shutdown_mysqld.inc + +--connection node_1 +--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' +--source include/wait_condition.inc + +--echo Cleaning var directory ... +--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/mtr +--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/performance_schema +--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/test +--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/mysql +--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data + +SET AUTOCOMMIT=OFF; +START TRANSACTION; +let $tables = 9; +while ($tables) +{ + let $rows = 5; + while($rows) + { + eval insert into t$tables values ('node1_committed_during'); + dec $rows; + } + dec $tables; +} +COMMIT; + +START TRANSACTION; +let $tables = 9; +while ($tables) +{ + let $rows = 5; + while($rows) + { + eval insert into t$tables values ('node1_to_be_committed_after'); + dec $rows; + } + dec $tables; +} + +--connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1 +SET AUTOCOMMIT=OFF; +START TRANSACTION; +let $tables = 9; +while ($tables) +{ + let $rows = 5; + while($rows) + { + eval insert into t$tables values ('node1_to_be_rollbacked_after'); + dec $rows; + } + dec $tables; +} + +--connection node_2 +--echo Starting server ... +--source include/start_mysqld.inc + +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' +--source include/wait_condition.inc + +SET AUTOCOMMIT=OFF; +START TRANSACTION; +while ($tables) +{ + let $rows = 5; + while($rows) + { + eval insert into t$tables values ('node2_committed_after'); + dec $rows; + } + dec $tables; +} +COMMIT; + +--connection node_1 +let $tables = 9; +while ($tables) +{ + let $rows = 5; + while($rows) + { + eval insert into t$tables values ('node1_to_be_committed_after'); + dec $rows; + } + dec $tables; +} +COMMIT; + +SET AUTOCOMMIT=OFF; +START TRANSACTION; +let $tables = 9; +while ($tables) +{ + let $rows = 5; + while($rows) + { + eval insert into t$tables values ('node1_committed_after'); + dec $rows; + } + dec $tables; +} +COMMIT; + +--connection node_1a_galera_st_clean_slave +while ($tables) +{ + let $rows = 5; + while($rows) + { + eval insert into t$tables values ('node1_to_be_rollbacked_after'); + dec $rows; + } + dec $tables; +} +ROLLBACK; + +SELECT COUNT(*) FROM t1; +SELECT COUNT(*) FROM t2; +SELECT COUNT(*) FROM t3; +SELECT COUNT(*) FROM t4; +SELECT COUNT(*) FROM t5; +SELECT COUNT(*) FROM t6; +SELECT COUNT(*) FROM t7; +SELECT COUNT(*) FROM t8; +SELECT COUNT(*) FROM t9; +SELECT * FROM t1; +SELECT * FROM t2; +SELECT * FROM t3; +SELECT * FROM t4; +SELECT * FROM t5; +SELECT * FROM t6; +SELECT * FROM t7; +SELECT * FROM t8; +SELECT * FROM t9; +COMMIT; +SET AUTOCOMMIT=ON; + +--connection node_1 +SELECT COUNT(*) FROM t1; +SELECT COUNT(*) FROM t2; +SELECT COUNT(*) FROM t3; +SELECT COUNT(*) FROM t4; +SELECT COUNT(*) FROM t5; +SELECT COUNT(*) FROM t6; +SELECT COUNT(*) FROM t7; +SELECT COUNT(*) FROM t8; +SELECT COUNT(*) FROM t9; +SELECT * FROM t1; +SELECT * FROM t2; +SELECT * FROM t3; +SELECT * FROM t4; +SELECT * FROM t5; +SELECT * FROM t6; +SELECT * FROM t7; +SELECT * FROM t8; +SELECT * FROM t9; +COMMIT; + +DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9; +COMMIT; +SET AUTOCOMMIT=ON; + +# Restore original auto_increment_offset values. +--source include/auto_increment_offset_restore.inc +--source include/galera_end.inc diff --git a/mysql-test/suite/galera/t/galera_var_reject_queries.test b/mysql-test/suite/galera/t/galera_var_reject_queries.test index 6859855c35f..8b80c04e3be 100644 --- a/mysql-test/suite/galera/t/galera_var_reject_queries.test +++ b/mysql-test/suite/galera/t/galera_var_reject_queries.test @@ -18,8 +18,11 @@ SET GLOBAL wsrep_reject_queries = ALL; --error ER_UNKNOWN_COM_ERROR SELECT * FROM t1; -# Lost connection ---error 2013 +# +# Original behavior was lost connection, +# but since 10.1, we allow controlling connection to remain alive +# +--error 0,2013 SET GLOBAL wsrep_reject_queries = ALL_KILL; --connection node_1a diff --git a/mysql-test/suite/galera/t/partition.test b/mysql-test/suite/galera/t/partition.test index bb5a02411c3..0159ef8f607 100644 --- a/mysql-test/suite/galera/t/partition.test +++ b/mysql-test/suite/galera/t/partition.test @@ -129,7 +129,10 @@ CREATE TABLE t1 (pk INT PRIMARY KEY) --let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` --connection node_2 -SELECT COUNT(*) = 20002 FROM t1; +--let $wait_condition = SELECT COUNT(*) = 20002 FROM t1; +--source include/wait_condition.inc + +SELECT COUNT(*) FROM t1; # LOAD-ing 20002 rows causes 3 commits to be registered --disable_query_log @@ -157,7 +160,10 @@ CREATE TABLE t1 (pk INT PRIMARY KEY) --let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` --connection node_2 -SELECT COUNT(*) = 101 FROM t1; +--let $wait_condition = SELECT COUNT(*) = 101 FROM t1; +--source include/wait_condition.inc + +SELECT COUNT(*) FROM t1; # LOAD-ing 101 rows causes 1 commit to be registered --disable_query_log @@ -186,7 +192,9 @@ CREATE TABLE t1 (pk INT PRIMARY KEY) --let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` --connection node_2 -SELECT COUNT(*) = 20002 FROM t1; +--let $wait_condition = SELECT COUNT(*) = 20002 FROM t1; +--source include/wait_condition.inc +SELECT COUNT(*) FROM t1; # LOAD-ing 20002 rows causes 1 commit to be registered --disable_query_log diff --git a/mysql-test/suite/galera_3nodes/disabled.def b/mysql-test/suite/galera_3nodes/disabled.def index a9b9b00b40c..e640baebf7d 100644 --- a/mysql-test/suite/galera_3nodes/disabled.def +++ b/mysql-test/suite/galera_3nodes/disabled.def @@ -1,3 +1,4 @@ galera_slave_options_do :MDEV-8798 galera_slave_options_ignore : MDEV-8798 - +galera_innobackupex_backup : xtrabackup is deprecated +galera_ipv6_xtrabackup-v2 : xtrabackup is deprecated diff --git a/mysql-test/suite/innodb/r/truncate.result b/mysql-test/suite/innodb/r/truncate.result index 3ade1e7f8de..c8a81256d79 100644 --- a/mysql-test/suite/innodb/r/truncate.result +++ b/mysql-test/suite/innodb/r/truncate.result @@ -6,3 +6,15 @@ connection default; TRUNCATE TABLE t; disconnect dml; DROP TABLE t; +# +# MDEV-17816 Crash in TRUNCATE TABLE when table creation fails +# +CREATE TABLE t1 (c VARCHAR(1024), KEY(c)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +INSERT INTO t1 SET c='character'; +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +TRUNCATE TABLE t1; +ERROR HY000: Index column size too large. The maximum column size is 767 bytes +SELECT * FROM t1; +c +character +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/truncate.test b/mysql-test/suite/innodb/t/truncate.test index cf71ca83c4c..f0cfd3a5be1 100644 --- a/mysql-test/suite/innodb/t/truncate.test +++ b/mysql-test/suite/innodb/t/truncate.test @@ -15,3 +15,15 @@ TRUNCATE TABLE t; disconnect dml; DROP TABLE t; + +--echo # +--echo # MDEV-17816 Crash in TRUNCATE TABLE when table creation fails +--echo # +CREATE TABLE t1 (c VARCHAR(1024), KEY(c)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +INSERT INTO t1 SET c='character'; +# FIXME: MDEV-17833 ALTER TABLE is not enforcing prefix index size limit +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +--error ER_INDEX_COLUMN_TOO_LONG +TRUNCATE TABLE t1; +SELECT * FROM t1; +DROP TABLE t1; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index d6473d58821..544ae1e4f8c 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2384,7 +2384,8 @@ com_multi_end: /* wsrep BF abort in query exec phase */ mysql_mutex_lock(&thd->LOCK_thd_data); do_end_of_statement= thd->wsrep_conflict_state != REPLAYING && - thd->wsrep_conflict_state != RETRY_AUTOCOMMIT; + thd->wsrep_conflict_state != RETRY_AUTOCOMMIT && + !thd->killed; mysql_mutex_unlock(&thd->LOCK_thd_data); } else diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 89eac6b3d00..e60fa94ba2a 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -2262,7 +2262,7 @@ int wsrep_wait_committing_connections_close(int wait_time) } -void wsrep_close_client_connections(my_bool wait_to_end) +void wsrep_close_client_connections(my_bool wait_to_end, THD *except_caller_thd) { /* First signal all threads that it's time to die @@ -2284,6 +2284,12 @@ void wsrep_close_client_connections(my_bool wait_to_end) if (!is_client_connection(tmp)) continue; + if (tmp == except_caller_thd) + { + DBUG_ASSERT(is_client_connection(tmp)); + continue; + } + if (is_replaying_connection(tmp)) { tmp->set_killed(KILL_CONNECTION); @@ -2295,7 +2301,16 @@ void wsrep_close_client_connections(my_bool wait_to_end) continue; WSREP_DEBUG("closing connection %lld", (longlong) tmp->thread_id); - wsrep_close_thread(tmp); + + /* + instead of wsrep_close_thread() we do now soft kill by THD::awake + */ + mysql_mutex_lock(&tmp->LOCK_thd_data); + + tmp->awake(KILL_CONNECTION); + + mysql_mutex_unlock(&tmp->LOCK_thd_data); + } mysql_mutex_unlock(&LOCK_thread_count); @@ -2313,7 +2328,8 @@ void wsrep_close_client_connections(my_bool wait_to_end) #ifndef __bsdi__ // Bug in BSDI kernel if (is_client_connection(tmp) && !abort_replicated(tmp) && - !is_replaying_connection(tmp)) + !is_replaying_connection(tmp) && + tmp != except_caller_thd) { WSREP_INFO("killing local connection: %lld", (longlong) tmp->thread_id); close_connection(tmp,0); diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h index 819a56b9f23..b434c248347 100644 --- a/sql/wsrep_mysqld.h +++ b/sql/wsrep_mysqld.h @@ -160,7 +160,6 @@ extern "C" query_id_t wsrep_thd_query_id(THD *thd); extern "C" query_id_t wsrep_thd_wsrep_last_query_id(THD *thd); extern "C" void wsrep_thd_set_wsrep_last_query_id(THD *thd, query_id_t id); -extern void wsrep_close_client_connections(my_bool wait_to_end); extern int wsrep_wait_committing_connections_close(int wait_time); extern void wsrep_close_applier(THD *thd); extern void wsrep_wait_appliers_close(THD *thd); @@ -308,7 +307,8 @@ void thd_binlog_trx_reset(THD * thd); typedef void (*wsrep_thd_processor_fun)(THD *); pthread_handler_t start_wsrep_THD(void *arg); int wsrep_wait_committing_connections_close(int wait_time); -void wsrep_close_client_connections(my_bool wait_to_end); +extern void wsrep_close_client_connections(my_bool wait_to_end, + THD *except_caller_thd = NULL); void wsrep_close_applier(THD *thd); void wsrep_close_applier_threads(int count); void wsrep_wait_appliers_close(THD *thd); diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc index f8a494416e2..1471ad91a96 100644 --- a/sql/wsrep_var.cc +++ b/sql/wsrep_var.cc @@ -428,7 +428,8 @@ bool wsrep_reject_queries_update(sys_var *self, THD* thd, enum_var_type type) WSREP_INFO("Rejecting client queries due to manual setting"); break; case WSREP_REJECT_ALL_KILL: - wsrep_close_client_connections(FALSE); + /* close all client connections, but this one */ + wsrep_close_client_connections(FALSE, thd); WSREP_INFO("Rejecting client queries and killing connections due to manual setting"); break; default: diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc index d76e9805d30..f63ae9d82d7 100644 --- a/storage/innobase/fts/fts0fts.cc +++ b/storage/innobase/fts/fts0fts.cc @@ -1770,7 +1770,7 @@ fts_create_one_common_table( const char* fts_suffix, mem_heap_t* heap) { - dict_table_t* new_table = NULL; + dict_table_t* new_table; dberr_t error; bool is_config = strcmp(fts_suffix, "CONFIG") == 0; @@ -1823,11 +1823,13 @@ fts_create_one_common_table( } if (error != DB_SUCCESS) { - trx->error_state = error; dict_mem_table_free(new_table); new_table = NULL; ib::warn() << "Failed to create FTS common table " << fts_table_name; + trx->error_state = DB_SUCCESS; + row_drop_table_for_mysql(fts_table_name, trx, SQLCOM_DROP_DB); + trx->error_state = error; } return(new_table); } @@ -1968,7 +1970,7 @@ fts_create_one_index_table( mem_heap_t* heap) { dict_field_t* field; - dict_table_t* new_table = NULL; + dict_table_t* new_table; char table_name[MAX_FULL_NAME_LEN]; dberr_t error; CHARSET_INFO* charset; @@ -2032,11 +2034,13 @@ fts_create_one_index_table( } if (error != DB_SUCCESS) { - trx->error_state = error; dict_mem_table_free(new_table); new_table = NULL; ib::warn() << "Failed to create FTS index table " << table_name; + trx->error_state = DB_SUCCESS; + row_drop_table_for_mysql(table_name, trx, SQLCOM_DROP_DB); + trx->error_state = error; } return(new_table); diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index ca74868d742..1e9084905dc 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -145,8 +145,8 @@ void close_thread_tables(THD* thd); #ifdef WITH_WSREP #include "dict0priv.h" -#include "ut0byte.h" #include <mysql/service_md5.h> +#include "wsrep_sst.h" extern MYSQL_PLUGIN_IMPORT MYSQL_BIN_LOG mysql_bin_log; @@ -3733,6 +3733,15 @@ static int innodb_init_params() ib::info() << "For Galera, using innodb_lock_schedule_algorithm=fcfs"; innodb_lock_schedule_algorithm = INNODB_LOCK_SCHEDULE_ALGORITHM_FCFS; } + + /* Print deprecation info if xtrabackup is used for SST method */ + if (global_system_variables.wsrep_on + && wsrep_sst_method + && (!strcmp(wsrep_sst_method, "xtrabackup") + || !strcmp(wsrep_sst_method, "xtrabackup-v2"))) { + ib::info() << "Galera SST method xtrabackup is deprecated and the " + " support for it may be removed in future releases."; + } #endif /* WITH_WSREP */ #ifndef HAVE_LZ4 @@ -12345,11 +12354,14 @@ int create_table_info_t::create_table(bool create_fk) error = convert_error_code_to_mysql(err, 0, NULL); if (error) { - trx_rollback_to_savepoint(m_trx, NULL); + /* Drop the being-created table before rollback, + so that rollback can possibly rename back a table + that could have been renamed before + the failed creation. */ m_trx->error_state = DB_SUCCESS; - row_drop_table_for_mysql(m_table_name, m_trx, SQLCOM_DROP_DB); + trx_rollback_to_savepoint(m_trx, NULL); m_trx->error_state = DB_SUCCESS; DBUG_RETURN(error); @@ -12575,12 +12587,18 @@ ha_innobase::create( } if ((error = info.create_table(own_trx))) { + /* Drop the being-created table before rollback, + so that rollback can possibly rename back a table + that could have been renamed before the failed creation. */ + trx->error_state = DB_SUCCESS; + row_drop_table_for_mysql(info.table_name(), trx, + SQLCOM_DROP_DB, true); trx_rollback_for_mysql(trx); row_mysql_unlock_data_dictionary(trx); if (own_trx) { trx_free(trx); - DBUG_RETURN(error); } + DBUG_RETURN(error); } innobase_commit_low(trx); diff --git a/storage/innobase/include/row0mysql.h b/storage/innobase/include/row0mysql.h index 1accfd858be..8130f733806 100644 --- a/storage/innobase/include/row0mysql.h +++ b/storage/innobase/include/row0mysql.h @@ -372,9 +372,8 @@ row_create_table_for_mysql( MY_ATTRIBUTE((warn_unused_result)); /*********************************************************************//** -Does an index creation operation for MySQL. TODO: currently failure -to create an index results in dropping the whole table! This is no problem -currently as all indexes must be created at the same time as the table. +Create an index when creating a table. +On failure, the caller must drop the table! @return error number or DB_SUCCESS */ dberr_t row_create_index_for_mysql( diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index f513e42937c..c8707955a5d 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -4912,6 +4912,8 @@ lock_rec_queue_validate( goto func_exit; } + ut_ad(page_rec_is_leaf(rec)); + if (index == NULL) { /* Nothing we can do */ @@ -5074,11 +5076,13 @@ loop: if (!sync_check_find(SYNC_FSP)) for (i = nth_bit; i < lock_rec_get_n_bits(lock); i++) { - if (i == 1 || lock_rec_get_nth_bit(lock, i)) { + if (i == PAGE_HEAP_NO_SUPREMUM + || lock_rec_get_nth_bit(lock, i)) { rec = page_find_rec_with_heap_no(block->frame, i); ut_a(rec); - ut_ad(page_rec_is_leaf(rec)); + ut_ad(!lock_rec_get_nth_bit(lock, i) + || page_rec_is_leaf(rec)); offsets = rec_get_offsets(rec, lock->index, offsets, true, ULINT_UNDEFINED, &heap); @@ -5297,7 +5301,7 @@ lock_rec_insert_check_and_lock( { ut_ad(block->frame == page_align(rec)); ut_ad(!dict_index_is_online_ddl(index) - || dict_index_is_clust(index) + || index->is_primary() || (flags & BTR_CREATE_FLAG)); ut_ad(mtr->is_named_space(index->table->space)); ut_ad(page_rec_is_leaf(rec)); @@ -5308,6 +5312,7 @@ lock_rec_insert_check_and_lock( } ut_ad(!index->table->is_temporary()); + ut_ad(page_is_leaf(block->frame)); dberr_t err; lock_t* lock; diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc index 4d1683d8325..b7c1e509b61 100644 --- a/storage/innobase/row/row0mysql.cc +++ b/storage/innobase/row/row0mysql.cc @@ -2485,9 +2485,8 @@ err_exit: } /*********************************************************************//** -Does an index creation operation for MySQL. TODO: currently failure -to create an index results in dropping the whole table! This is no problem -currently as all indexes must be created at the same time as the table. +Create an index when creating a table. +On failure, the caller must drop the table! @return error number or DB_SUCCESS */ dberr_t row_create_index_for_mysql( @@ -2510,16 +2509,9 @@ row_create_index_for_mysql( ulint len; dict_table_t* table = index->table; - trx->op_info = "creating index"; - ut_ad(rw_lock_own(dict_operation_lock, RW_LOCK_X)); ut_ad(mutex_own(&dict_sys->mutex)); - - if (!table->is_temporary()) { - trx_start_if_not_started_xa(trx, true); - } - for (i = 0; i < index->n_def; i++) { /* Check that prefix_len and actual length < DICT_MAX_INDEX_COL_LEN */ @@ -2537,19 +2529,19 @@ row_create_index_for_mysql( /* Column or prefix length exceeds maximum column length */ if (len > (ulint) DICT_MAX_FIELD_LEN_BY_FORMAT(table)) { - err = DB_TOO_BIG_INDEX_COL; - dict_mem_index_free(index); - goto error_handling; + return DB_TOO_BIG_INDEX_COL; } } - trx_set_dict_operation(trx, TRX_DICT_OP_TABLE); + trx->op_info = "creating index"; /* For temp-table we avoid insertion into SYSTEM TABLES to maintain performance and so we have separate path that directly just updates dictonary cache. */ if (!table->is_temporary()) { + trx_start_if_not_started_xa(trx, true); + trx_set_dict_operation(trx, TRX_DICT_OP_TABLE); /* Note that the space id where we store the index is inherited from the table in dict_build_index_def_step() in dict0crea.cc. */ @@ -2596,28 +2588,6 @@ row_create_index_for_mysql( } } - if (err != DB_SUCCESS) { -error_handling: - /* We have special error handling here */ - - trx->error_state = DB_SUCCESS; - - if (trx_is_started(trx)) { - - trx_rollback_to_savepoint(trx, NULL); - } - - row_drop_table_for_mysql(table->name.m_name, trx, - SQLCOM_DROP_TABLE, true); - - if (trx_is_started(trx)) { - - trx_commit_for_mysql(trx); - } - - trx->error_state = DB_SUCCESS; - } - trx->op_info = ""; return(err); |