diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-06-06 16:22:09 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-06-06 16:22:09 +0300 |
commit | 57d4a242dac0238dd63ac05cd9d65a38d75a5d5f (patch) | |
tree | 323a71a864c38fe00502bd95926b4d05ab6854d6 /mysql-test/suite | |
parent | e097abfa662751cc337febad9d8584159f23cc92 (diff) | |
parent | 7e39470e337aeeab4ee3e73336c2fff88609529f (diff) | |
download | mariadb-git-57d4a242dac0238dd63ac05cd9d65a38d75a5d5f.tar.gz |
Merge 10.7 into 10.8
Diffstat (limited to 'mysql-test/suite')
37 files changed, 699 insertions, 1177 deletions
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change.result b/mysql-test/suite/encryption/r/innodb-bad-key-change.result index 3c83a23b4be..e2034f14e31 100644 --- a/mysql-test/suite/encryption/r/innodb-bad-key-change.result +++ b/mysql-test/suite/encryption/r/innodb-bad-key-change.result @@ -2,8 +2,8 @@ call mtr.add_suppression("Plugin 'file_key_management' init function returned er call mtr.add_suppression("Plugin 'file_key_management' registration.*failed"); call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` has an unreadable root page"); call mtr.add_suppression("Table .*t[12].* is corrupted"); -call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[12]\\.ibd' cannot be decrypted\\."); -call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]"); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[12]\\.ibd' cannot be decrypted; key_version=1"); +call mtr.add_suppression("failed to read \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]"); call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t1.ibd looks corrupted; key_version=1"); call mtr.add_suppression("File '.*mysql-test.std_data.keysbad3\\.txt' not found"); call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space="); diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change2.result b/mysql-test/suite/encryption/r/innodb-bad-key-change2.result index ca73643ba83..d2ea45dc949 100644 --- a/mysql-test/suite/encryption/r/innodb-bad-key-change2.result +++ b/mysql-test/suite/encryption/r/innodb-bad-key-change2.result @@ -1,5 +1,5 @@ call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|does not exist.*is trying to rename)"); -call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1(new)?\\.ibd' cannot be decrypted\\."); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1(new)?\\.ibd' cannot be decrypted; key_version=1"); call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]"); call mtr.add_suppression("Couldn't load plugins from 'file_key_management"); call mtr.add_suppression("InnoDB: Tablespace for table \`test\`.\`t1\` is set as discarded\\."); diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change4.result b/mysql-test/suite/encryption/r/innodb-bad-key-change4.result index 90b24799808..a5a6d65e4a2 100644 --- a/mysql-test/suite/encryption/r/innodb-bad-key-change4.result +++ b/mysql-test/suite/encryption/r/innodb-bad-key-change4.result @@ -1,5 +1,5 @@ -call mtr.add_suppression("InnoDB: Table `test`\\.`t1` has an unreadable root page"); -call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1\\.ibd' cannot be decrypted\\."); +call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page)"); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1\\.ibd' cannot be decrypted; key_version=1"); call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]"); call mtr.add_suppression("Couldn't load plugins from 'file_key_management"); call mtr.add_suppression("Table .*t1.* is corrupted"); diff --git a/mysql-test/suite/encryption/r/innodb-compressed-blob.result b/mysql-test/suite/encryption/r/innodb-compressed-blob.result index de20b554a67..39f482b2422 100644 --- a/mysql-test/suite/encryption/r/innodb-compressed-blob.result +++ b/mysql-test/suite/encryption/r/innodb-compressed-blob.result @@ -1,4 +1,4 @@ -call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\."); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted; key_version=1"); call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]"); call mtr.add_suppression("InnoDB: Unable to decompress ..test.t[1-3]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]"); call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` is corrupted"); diff --git a/mysql-test/suite/encryption/r/innodb-redo-badkey.result b/mysql-test/suite/encryption/r/innodb-redo-badkey.result index 87377a01479..b1c4ae913fa 100644 --- a/mysql-test/suite/encryption/r/innodb-redo-badkey.result +++ b/mysql-test/suite/encryption/r/innodb-redo-badkey.result @@ -1,6 +1,7 @@ call mtr.add_suppression("Plugin 'file_key_management'"); call mtr.add_suppression("Plugin 'InnoDB' init function returned error."); -call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[1-4]\\.ibd' cannot be decrypted"); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[1-4]\\.ibd' cannot be decrypted; key_version=1"); +call mtr.add_suppression("InnoDB: File '.*test/t[1234]\\.ibd' is corrupted"); call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]"); call mtr.add_suppression("InnoDB: Unable to decompress .*.test.t[12]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]"); call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t[12]\\.ibd'"); diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change.test b/mysql-test/suite/encryption/t/innodb-bad-key-change.test index 942038dedc4..05a3b5f4d06 100644 --- a/mysql-test/suite/encryption/t/innodb-bad-key-change.test +++ b/mysql-test/suite/encryption/t/innodb-bad-key-change.test @@ -12,8 +12,8 @@ call mtr.add_suppression("Plugin 'file_key_management' init function returned er call mtr.add_suppression("Plugin 'file_key_management' registration.*failed"); call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` has an unreadable root page"); call mtr.add_suppression("Table .*t[12].* is corrupted"); -call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[12]\\.ibd' cannot be decrypted\\."); -call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]"); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[12]\\.ibd' cannot be decrypted; key_version=1"); +call mtr.add_suppression("failed to read \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]"); call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t1.ibd looks corrupted; key_version=1"); call mtr.add_suppression("File '.*mysql-test.std_data.keysbad3\\.txt' not found"); # for innodb_checksum_algorithm=full_crc32 only diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change2.test b/mysql-test/suite/encryption/t/innodb-bad-key-change2.test index ad0f06ab5ff..8a3ecf9deb0 100644 --- a/mysql-test/suite/encryption/t/innodb-bad-key-change2.test +++ b/mysql-test/suite/encryption/t/innodb-bad-key-change2.test @@ -9,7 +9,7 @@ # MDEV-8727: Server/InnoDB hangs on shutdown after trying to read an encrypted table with a wrong key # call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|does not exist.*is trying to rename)"); -call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1(new)?\\.ibd' cannot be decrypted\\."); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1(new)?\\.ibd' cannot be decrypted; key_version=1"); call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]"); # Suppression for builds where file_key_management plugin is linked statically call mtr.add_suppression("Couldn't load plugins from 'file_key_management"); diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change4.test b/mysql-test/suite/encryption/t/innodb-bad-key-change4.test index bc060776ecd..3b4dfb8c1f2 100644 --- a/mysql-test/suite/encryption/t/innodb-bad-key-change4.test +++ b/mysql-test/suite/encryption/t/innodb-bad-key-change4.test @@ -7,8 +7,8 @@ # MDEV-8768: Server crash at file btr0btr.ic line 122 when checking encrypted table using incorrect keys # -call mtr.add_suppression("InnoDB: Table `test`\\.`t1` has an unreadable root page"); -call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1\\.ibd' cannot be decrypted\\."); +call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page)"); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1\\.ibd' cannot be decrypted; key_version=1"); call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]"); # Suppression for builds where file_key_management plugin is linked statically call mtr.add_suppression("Couldn't load plugins from 'file_key_management"); diff --git a/mysql-test/suite/encryption/t/innodb-compressed-blob.test b/mysql-test/suite/encryption/t/innodb-compressed-blob.test index 261fdd73aa1..1bc9e2a879a 100644 --- a/mysql-test/suite/encryption/t/innodb-compressed-blob.test +++ b/mysql-test/suite/encryption/t/innodb-compressed-blob.test @@ -4,7 +4,7 @@ # embedded does not support restart -- source include/not_embedded.inc -call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\."); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted; key_version=1"); call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]"); call mtr.add_suppression("InnoDB: Unable to decompress ..test.t[1-3]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]"); call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` is corrupted"); diff --git a/mysql-test/suite/encryption/t/innodb-redo-badkey.test b/mysql-test/suite/encryption/t/innodb-redo-badkey.test index 09ad7a7d5a3..81febb92c5b 100644 --- a/mysql-test/suite/encryption/t/innodb-redo-badkey.test +++ b/mysql-test/suite/encryption/t/innodb-redo-badkey.test @@ -9,7 +9,8 @@ call mtr.add_suppression("Plugin 'file_key_management'"); call mtr.add_suppression("Plugin 'InnoDB' init function returned error."); -call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[1-4]\\.ibd' cannot be decrypted"); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[1-4]\\.ibd' cannot be decrypted; key_version=1"); +call mtr.add_suppression("InnoDB: File '.*test/t[1234]\\.ibd' is corrupted"); call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]"); call mtr.add_suppression("InnoDB: Unable to decompress .*.test.t[12]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]"); call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t[12]\\.ibd'"); diff --git a/mysql-test/suite/galera/r/MDEV-18832.result b/mysql-test/suite/galera/r/MDEV-18832.result index 700a0bbefb1..2e0872b9f2e 100644 --- a/mysql-test/suite/galera/r/MDEV-18832.result +++ b/mysql-test/suite/galera/r/MDEV-18832.result @@ -12,3 +12,6 @@ INSERT INTO t1 VALUES (NEXT VALUE FOR Seq1_1); ERROR 23000: Duplicate entry '1' for key 'PRIMARY' DROP SEQUENCE Seq1_1; DROP TABLE t1; +CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster."); +connection node_2; +CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster."); diff --git a/mysql-test/suite/galera/r/MDEV-27862.result b/mysql-test/suite/galera/r/MDEV-27862.result new file mode 100644 index 00000000000..25b7bc6cfd2 --- /dev/null +++ b/mysql-test/suite/galera/r/MDEV-27862.result @@ -0,0 +1,54 @@ +connection node_2; +connection node_1; +CREATE SEQUENCE seq_nocache ENGINE=InnoDB; +DROP SEQUENCE seq_nocache; +CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster."); +connection node_2; +CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster."); +connection node_1; +CREATE SEQUENCE seq NOCACHE ENGINE=InnoDB; +SELECT NEXTVAL(seq) = 1; +NEXTVAL(seq) = 1 +1 +connection node_2; +SELECT NEXTVAL(seq) = 2; +NEXTVAL(seq) = 2 +1 +connection node_1; +SELECT NEXTVAL(seq) = 3; +NEXTVAL(seq) = 3 +1 +SELECT SETVAL(seq, 100); +SETVAL(seq, 100) +100 +connection node_2; +SELECT NEXTVAL(seq) = 101; +NEXTVAL(seq) = 101 +1 +connection node_1; +SELECT NEXTVAL(seq) = 102; +NEXTVAL(seq) = 102 +1 +DROP SEQUENCE seq; +CREATE TABLE t1(f1 INT); +CREATE SEQUENCE seq_transaction NOCACHE ENGINE=InnoDB; +START TRANSACTION; +INSERT INTO t1 VALUES (0); +SELECT NEXTVAL(seq_transaction); +NEXTVAL(seq_transaction) +1 +INSERT INTO t1 VALUES (NEXTVAL(seq_transaction)); +COMMIT; +connection node_2; +SELECT COUNT(*) = 2 FROM t1; +COUNT(*) = 2 +1 +SELECT NEXTVAL(seq_transaction) = 3; +NEXTVAL(seq_transaction) = 3 +1 +connection node_1; +SELECT NEXTVAL(seq_transaction) = 4; +NEXTVAL(seq_transaction) = 4 +1 +DROP SEQUENCE seq_transaction; +DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_ist_MDEV-28423,debug.rdiff b/mysql-test/suite/galera/r/galera_ist_MDEV-28423,debug.rdiff index 8c84321e774..f9f81ea3b40 100644 --- a/mysql-test/suite/galera/r/galera_ist_MDEV-28423,debug.rdiff +++ b/mysql-test/suite/galera/r/galera_ist_MDEV-28423,debug.rdiff @@ -1,27 +1,27 @@ --- r/galera_ist_MDEV-28423.result -+++ r/galera_ist_MDEV-28423,debug.reject -@@ -517,3 +517,187 @@ - 1 ++++ r/galera_ist_MDEV-28423.reject +@@ -286,3 +286,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 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB; ++CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; -+INSERT INTO t1 VALUES (1,'node1_committed_before'); -+INSERT INTO t1 VALUES (2,'node1_committed_before'); -+INSERT INTO t1 VALUES (3,'node1_committed_before'); -+INSERT INTO t1 VALUES (4,'node1_committed_before'); -+INSERT INTO t1 VALUES (5,'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'); +connection node_2; +START TRANSACTION; -+INSERT INTO t1 VALUES (6,'node2_committed_before'); -+INSERT INTO t1 VALUES (7,'node2_committed_before'); -+INSERT INTO t1 VALUES (8,'node2_committed_before'); -+INSERT INTO t1 VALUES (9,'node2_committed_before'); -+INSERT INTO t1 VALUES (10,'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; +SET GLOBAL debug_dbug = 'd,sync.alter_opened_table'; +connection node_1; @@ -32,26 +32,26 @@ +connection node_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; -+INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during'); -+INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during'); -+INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during'); -+INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during'); -+INSERT INTO t1 (id,f1) VALUES (15,'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'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); +COMMIT; +START TRANSACTION; -+INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (20,'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'); ++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 (id,f1) VALUES (21,'node1_to_be_rollbacked_after'); -+INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after'); -+INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after'); -+INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after'); -+INSERT INTO t1 (id,f1) VALUES (25,'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'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +connection node_2; +Performing --wsrep-recover ... +connection node_2; @@ -59,132 +59,56 @@ +Using --wsrep-start-position when starting mysqld ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; -+INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (30,'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'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); +COMMIT; +connection node_1; -+INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (35,'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'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; -+INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (40,'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'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); +COMMIT; +connection node_1a_galera_st_kill_slave_ddl; -+INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after'); -+INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after'); -+INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after'); -+INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after'); -+INSERT INTO t1 (id,f1) VALUES (45,'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'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +ROLLBACK; -+SET AUTOCOMMIT=ON; -+SET SESSION wsrep_sync_wait=15; -+SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; -+EXPECT_3 -+3 -+SELECT COUNT(*) AS EXPECT_35 FROM t1; -+EXPECT_35 -+35 -+SELECT * FROM t1; -+id f1 f2 -+1 node1_committed_before NULL -+2 node1_committed_before NULL -+3 node1_committed_before NULL -+4 node1_committed_before NULL -+5 node1_committed_before NULL -+6 node2_committed_before NULL -+7 node2_committed_before NULL -+8 node2_committed_before NULL -+9 node2_committed_before NULL -+10 node2_committed_before NULL -+11 node1_committed_during NULL -+12 node1_committed_during NULL -+13 node1_committed_during NULL -+14 node1_committed_during NULL -+15 node1_committed_during NULL -+16 node1_to_be_committed_after NULL -+17 node1_to_be_committed_after NULL -+18 node1_to_be_committed_after NULL -+19 node1_to_be_committed_after NULL -+20 node1_to_be_committed_after NULL -+26 node2_committed_after NULL -+27 node2_committed_after NULL -+28 node2_committed_after NULL -+29 node2_committed_after NULL -+30 node2_committed_after NULL -+31 node1_to_be_committed_after NULL -+32 node1_to_be_committed_after NULL -+33 node1_to_be_committed_after NULL -+34 node1_to_be_committed_after NULL -+35 node1_to_be_committed_after NULL -+36 node1_committed_after NULL -+37 node1_committed_after NULL -+38 node1_committed_after NULL -+39 node1_committed_after NULL -+40 node1_committed_after NULL ++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; -+connection node_1; +SET AUTOCOMMIT=ON; -+SET SESSION wsrep_sync_wait=15; -+SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; -+EXPECT_3 -+3 -+SELECT COUNT(*) AS EXPECT_35 FROM t1; -+EXPECT_35 -+35 -+SELECT * FROM t1; -+id f1 f2 -+1 node1_committed_before NULL -+2 node1_committed_before NULL -+3 node1_committed_before NULL -+4 node1_committed_before NULL -+5 node1_committed_before NULL -+6 node2_committed_before NULL -+7 node2_committed_before NULL -+8 node2_committed_before NULL -+9 node2_committed_before NULL -+10 node2_committed_before NULL -+11 node1_committed_during NULL -+12 node1_committed_during NULL -+13 node1_committed_during NULL -+14 node1_committed_during NULL -+15 node1_committed_during NULL -+16 node1_to_be_committed_after NULL -+17 node1_to_be_committed_after NULL -+18 node1_to_be_committed_after NULL -+19 node1_to_be_committed_after NULL -+20 node1_to_be_committed_after NULL -+26 node2_committed_after NULL -+27 node2_committed_after NULL -+28 node2_committed_after NULL -+29 node2_committed_after NULL -+30 node2_committed_after NULL -+31 node1_to_be_committed_after NULL -+32 node1_to_be_committed_after NULL -+33 node1_to_be_committed_after NULL -+34 node1_to_be_committed_after NULL -+35 node1_to_be_committed_after NULL -+36 node1_committed_after NULL -+37 node1_committed_after NULL -+38 node1_committed_after NULL -+39 node1_committed_after NULL -+40 node1_committed_after NULL ++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_MDEV-28423.result b/mysql-test/suite/galera/r/galera_ist_MDEV-28423.result index 5a71b490a80..80a28d349ba 100644 --- a/mysql-test/suite/galera/r/galera_ist_MDEV-28423.result +++ b/mysql-test/suite/galera/r/galera_ist_MDEV-28423.result @@ -1,519 +1,287 @@ -connection node_2; -connection node_1; connection node_1; connection node_2; Performing State Transfer on a server that has been temporarily disconnected connection node_1; -CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; SET AUTOCOMMIT=OFF; START TRANSACTION; -INSERT INTO t1 VALUES (1,'node1_committed_before'); -INSERT INTO t1 VALUES (2,'node1_committed_before'); -INSERT INTO t1 VALUES (3,'node1_committed_before'); -INSERT INTO t1 VALUES (4,'node1_committed_before'); -INSERT INTO t1 VALUES (5,'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 t1 VALUES (6,'node2_committed_before'); -INSERT INTO t1 VALUES (7,'node2_committed_before'); -INSERT INTO t1 VALUES (8,'node2_committed_before'); -INSERT INTO t1 VALUES (9,'node2_committed_before'); -INSERT INTO t1 VALUES (10,'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; Unloading wsrep provider ... SET GLOBAL wsrep_cluster_address = ''; connection node_1; SET AUTOCOMMIT=OFF; START TRANSACTION; -INSERT INTO t1 VALUES (11,'node1_committed_during'); -INSERT INTO t1 VALUES (12,'node1_committed_during'); -INSERT INTO t1 VALUES (13,'node1_committed_during'); -INSERT INTO t1 VALUES (14,'node1_committed_during'); -INSERT INTO t1 VALUES (15,'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 t1 VALUES (16,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (17,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (18,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (19,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (20,'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_disconnect_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; SET AUTOCOMMIT=OFF; START TRANSACTION; -INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (25,'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; Loading wsrep provider ... -disconnect node_2; -connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2; -connection node_2; SET AUTOCOMMIT=OFF; START TRANSACTION; -INSERT INTO t1 VALUES (26,'node2_committed_after'); -INSERT INTO t1 VALUES (27,'node2_committed_after'); -INSERT INTO t1 VALUES (28,'node2_committed_after'); -INSERT INTO t1 VALUES (29,'node2_committed_after'); -INSERT INTO t1 VALUES (30,'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'); +INSERT INTO t1 VALUES ('node2_committed_after'); COMMIT; connection node_1; -INSERT INTO t1 VALUES (31,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (32,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (33,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (34,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (35,'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 t1 VALUES (36,'node1_committed_after'); -INSERT INTO t1 VALUES (37,'node1_committed_after'); -INSERT INTO t1 VALUES (38,'node1_committed_after'); -INSERT INTO t1 VALUES (39,'node1_committed_after'); -INSERT INTO t1 VALUES (40,'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_disconnect_slave; -INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (45,'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'); ROLLBACK; -SET AUTOCOMMIT=ON; -SET SESSION wsrep_sync_wait=15; -SELECT COUNT(*) AS EXPECT_35 FROM t1; -EXPECT_35 -35 -SELECT * FROM t1; -id f1 -1 node1_committed_before -2 node1_committed_before -3 node1_committed_before -4 node1_committed_before -5 node1_committed_before -6 node2_committed_before -7 node2_committed_before -8 node2_committed_before -9 node2_committed_before -10 node2_committed_before -11 node1_committed_during -12 node1_committed_during -13 node1_committed_during -14 node1_committed_during -15 node1_committed_during -16 node1_to_be_committed_after -17 node1_to_be_committed_after -18 node1_to_be_committed_after -19 node1_to_be_committed_after -20 node1_to_be_committed_after -26 node2_committed_after -27 node2_committed_after -28 node2_committed_after -29 node2_committed_after -30 node2_committed_after -31 node1_to_be_committed_after -32 node1_to_be_committed_after -33 node1_to_be_committed_after -34 node1_to_be_committed_after -35 node1_to_be_committed_after -36 node1_committed_after -37 node1_committed_after -38 node1_committed_after -39 node1_committed_after -40 node1_committed_after +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 -connection node_1; +COMMIT; SET AUTOCOMMIT=ON; -SET SESSION wsrep_sync_wait=15; -SELECT COUNT(*) AS EXPECT_35 FROM t1; -EXPECT_35 -35 -SELECT * FROM t1; -id f1 -1 node1_committed_before -2 node1_committed_before -3 node1_committed_before -4 node1_committed_before -5 node1_committed_before -6 node2_committed_before -7 node2_committed_before -8 node2_committed_before -9 node2_committed_before -10 node2_committed_before -11 node1_committed_during -12 node1_committed_during -13 node1_committed_during -14 node1_committed_during -15 node1_committed_during -16 node1_to_be_committed_after -17 node1_to_be_committed_after -18 node1_to_be_committed_after -19 node1_to_be_committed_after -20 node1_to_be_committed_after -26 node2_committed_after -27 node2_committed_after -28 node2_committed_after -29 node2_committed_after -30 node2_committed_after -31 node1_to_be_committed_after -32 node1_to_be_committed_after -33 node1_to_be_committed_after -34 node1_to_be_committed_after -35 node1_to_be_committed_after -36 node1_committed_after -37 node1_committed_after -38 node1_committed_after -39 node1_committed_after -40 node1_committed_after +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 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; SET AUTOCOMMIT=OFF; START TRANSACTION; -INSERT INTO t1 VALUES (1,'node1_committed_before'); -INSERT INTO t1 VALUES (2,'node1_committed_before'); -INSERT INTO t1 VALUES (3,'node1_committed_before'); -INSERT INTO t1 VALUES (4,'node1_committed_before'); -INSERT INTO t1 VALUES (5,'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 t1 VALUES (6,'node2_committed_before'); -INSERT INTO t1 VALUES (7,'node2_committed_before'); -INSERT INTO t1 VALUES (8,'node2_committed_before'); -INSERT INTO t1 VALUES (9,'node2_committed_before'); -INSERT INTO t1 VALUES (10,'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; SET AUTOCOMMIT=OFF; START TRANSACTION; -INSERT INTO t1 VALUES (11,'node1_committed_during'); -INSERT INTO t1 VALUES (12,'node1_committed_during'); -INSERT INTO t1 VALUES (13,'node1_committed_during'); -INSERT INTO t1 VALUES (14,'node1_committed_during'); -INSERT INTO t1 VALUES (15,'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 t1 VALUES (16,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (17,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (18,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (19,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (20,'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_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; SET AUTOCOMMIT=OFF; START TRANSACTION; -INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (25,'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; -INSERT INTO t1 VALUES (26,'node2_committed_after'); -INSERT INTO t1 VALUES (27,'node2_committed_after'); -INSERT INTO t1 VALUES (28,'node2_committed_after'); -INSERT INTO t1 VALUES (29,'node2_committed_after'); -INSERT INTO t1 VALUES (30,'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'); +INSERT INTO t1 VALUES ('node2_committed_after'); COMMIT; connection node_1; -INSERT INTO t1 VALUES (31,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (32,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (33,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (34,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (35,'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 t1 VALUES (36,'node1_committed_after'); -INSERT INTO t1 VALUES (37,'node1_committed_after'); -INSERT INTO t1 VALUES (38,'node1_committed_after'); -INSERT INTO t1 VALUES (39,'node1_committed_after'); -INSERT INTO t1 VALUES (40,'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_shutdown_slave; -INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (45,'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'); ROLLBACK; -SET AUTOCOMMIT=ON; -SET SESSION wsrep_sync_wait=15; -SELECT COUNT(*) AS EXPECT_15 FROM t1; -EXPECT_15 -35 -SELECT * from t1; -id f1 -1 node1_committed_before -2 node1_committed_before -3 node1_committed_before -4 node1_committed_before -5 node1_committed_before -6 node2_committed_before -7 node2_committed_before -8 node2_committed_before -9 node2_committed_before -10 node2_committed_before -11 node1_committed_during -12 node1_committed_during -13 node1_committed_during -14 node1_committed_during -15 node1_committed_during -16 node1_to_be_committed_after -17 node1_to_be_committed_after -18 node1_to_be_committed_after -19 node1_to_be_committed_after -20 node1_to_be_committed_after -26 node2_committed_after -27 node2_committed_after -28 node2_committed_after -29 node2_committed_after -30 node2_committed_after -31 node1_to_be_committed_after -32 node1_to_be_committed_after -33 node1_to_be_committed_after -34 node1_to_be_committed_after -35 node1_to_be_committed_after -36 node1_committed_after -37 node1_committed_after -38 node1_committed_after -39 node1_committed_after -40 node1_committed_after +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; -connection node_1; SET AUTOCOMMIT=ON; -SET SESSION wsrep_sync_wait=15; -SELECT COUNT(*) AS EXPECT_15 FROM t1; -EXPECT_15 -35 -SELECT * from t1; -id f1 -1 node1_committed_before -2 node1_committed_before -3 node1_committed_before -4 node1_committed_before -5 node1_committed_before -6 node2_committed_before -7 node2_committed_before -8 node2_committed_before -9 node2_committed_before -10 node2_committed_before -11 node1_committed_during -12 node1_committed_during -13 node1_committed_during -14 node1_committed_during -15 node1_committed_during -16 node1_to_be_committed_after -17 node1_to_be_committed_after -18 node1_to_be_committed_after -19 node1_to_be_committed_after -20 node1_to_be_committed_after -26 node2_committed_after -27 node2_committed_after -28 node2_committed_after -29 node2_committed_after -30 node2_committed_after -31 node1_to_be_committed_after -32 node1_to_be_committed_after -33 node1_to_be_committed_after -34 node1_to_be_committed_after -35 node1_to_be_committed_after -36 node1_committed_after -37 node1_committed_after -38 node1_committed_after -39 node1_committed_after -40 node1_committed_after +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 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; SET AUTOCOMMIT=OFF; START TRANSACTION; -INSERT INTO t1 VALUES (1,'node1_committed_before'); -INSERT INTO t1 VALUES (2,'node1_committed_before'); -INSERT INTO t1 VALUES (3,'node1_committed_before'); -INSERT INTO t1 VALUES (4,'node1_committed_before'); -INSERT INTO t1 VALUES (5,'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 t1 VALUES (6,'node2_committed_before'); -INSERT INTO t1 VALUES (7,'node2_committed_before'); -INSERT INTO t1 VALUES (8,'node2_committed_before'); -INSERT INTO t1 VALUES (9,'node2_committed_before'); -INSERT INTO t1 VALUES (10,'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; Killing server ... connection node_1; SET AUTOCOMMIT=OFF; START TRANSACTION; -INSERT INTO t1 VALUES (11,'node1_committed_during'); -INSERT INTO t1 VALUES (12,'node1_committed_during'); -INSERT INTO t1 VALUES (13,'node1_committed_during'); -INSERT INTO t1 VALUES (14,'node1_committed_during'); -INSERT INTO t1 VALUES (15,'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 t1 VALUES (16,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (17,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (18,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (19,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (20,'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_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; SET AUTOCOMMIT=OFF; START TRANSACTION; -INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (25,'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; Performing --wsrep-recover ... Starting server ... Using --wsrep-start-position when starting mysqld ... SET AUTOCOMMIT=OFF; START TRANSACTION; -INSERT INTO t1 VALUES (26,'node2_committed_after'); -INSERT INTO t1 VALUES (27,'node2_committed_after'); -INSERT INTO t1 VALUES (28,'node2_committed_after'); -INSERT INTO t1 VALUES (29,'node2_committed_after'); -INSERT INTO t1 VALUES (30,'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'); +INSERT INTO t1 VALUES ('node2_committed_after'); COMMIT; connection node_1; -INSERT INTO t1 VALUES (31,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (32,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (33,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (34,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (35,'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 t1 VALUES (36,'node1_committed_after'); -INSERT INTO t1 VALUES (37,'node1_committed_after'); -INSERT INTO t1 VALUES (38,'node1_committed_after'); -INSERT INTO t1 VALUES (39,'node1_committed_after'); -INSERT INTO t1 VALUES (40,'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_kill_slave; -INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (46,'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'); ROLLBACK; -SET AUTOCOMMIT=ON; -SET SESSION wsrep_sync_wait=15; -SELECT COUNT(*) AS EXPECT_35 FROM t1; -EXPECT_35 -35 -SELECT * FROM t1; -id f1 -1 node1_committed_before -2 node1_committed_before -3 node1_committed_before -4 node1_committed_before -5 node1_committed_before -6 node2_committed_before -7 node2_committed_before -8 node2_committed_before -9 node2_committed_before -10 node2_committed_before -11 node1_committed_during -12 node1_committed_during -13 node1_committed_during -14 node1_committed_during -15 node1_committed_during -16 node1_to_be_committed_after -17 node1_to_be_committed_after -18 node1_to_be_committed_after -19 node1_to_be_committed_after -20 node1_to_be_committed_after -26 node2_committed_after -27 node2_committed_after -28 node2_committed_after -29 node2_committed_after -30 node2_committed_after -31 node1_to_be_committed_after -32 node1_to_be_committed_after -33 node1_to_be_committed_after -34 node1_to_be_committed_after -35 node1_to_be_committed_after -36 node1_committed_after -37 node1_committed_after -38 node1_committed_after -39 node1_committed_after -40 node1_committed_after +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; -connection node_1; SET AUTOCOMMIT=ON; -SET SESSION wsrep_sync_wait=15; -SELECT COUNT(*) AS EXPECT_35 FROM t1; -EXPECT_35 -35 -SELECT * FROM t1; -id f1 -1 node1_committed_before -2 node1_committed_before -3 node1_committed_before -4 node1_committed_before -5 node1_committed_before -6 node2_committed_before -7 node2_committed_before -8 node2_committed_before -9 node2_committed_before -10 node2_committed_before -11 node1_committed_during -12 node1_committed_during -13 node1_committed_during -14 node1_committed_during -15 node1_committed_during -16 node1_to_be_committed_after -17 node1_to_be_committed_after -18 node1_to_be_committed_after -19 node1_to_be_committed_after -20 node1_to_be_committed_after -26 node2_committed_after -27 node2_committed_after -28 node2_committed_after -29 node2_committed_after -30 node2_committed_after -31 node1_to_be_committed_after -32 node1_to_be_committed_after -33 node1_to_be_committed_after -34 node1_to_be_committed_after -35 node1_to_be_committed_after -36 node1_committed_after -37 node1_committed_after -38 node1_committed_after -39 node1_committed_after -40 node1_committed_after +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_MDEV-28583,debug.rdiff b/mysql-test/suite/galera/r/galera_ist_MDEV-28583,debug.rdiff index 51d2a6bf157..ce78050538d 100644 --- a/mysql-test/suite/galera/r/galera_ist_MDEV-28583,debug.rdiff +++ b/mysql-test/suite/galera/r/galera_ist_MDEV-28583,debug.rdiff @@ -1,27 +1,27 @@ --- r/galera_ist_MDEV-28583.result -+++ r/galera_ist_MDEV-28583,debug.reject -@@ -517,3 +517,187 @@ - 1 ++++ r/galera_ist_MDEV-28583.reject +@@ -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 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB; ++CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; -+INSERT INTO t1 VALUES (1,'node1_committed_before'); -+INSERT INTO t1 VALUES (2,'node1_committed_before'); -+INSERT INTO t1 VALUES (3,'node1_committed_before'); -+INSERT INTO t1 VALUES (4,'node1_committed_before'); -+INSERT INTO t1 VALUES (5,'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'); +connection node_2; +START TRANSACTION; -+INSERT INTO t1 VALUES (6,'node2_committed_before'); -+INSERT INTO t1 VALUES (7,'node2_committed_before'); -+INSERT INTO t1 VALUES (8,'node2_committed_before'); -+INSERT INTO t1 VALUES (9,'node2_committed_before'); -+INSERT INTO t1 VALUES (10,'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; +SET GLOBAL debug_dbug = 'd,sync.alter_opened_table'; +connection node_1; @@ -32,26 +32,26 @@ +connection node_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; -+INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during'); -+INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during'); -+INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during'); -+INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during'); -+INSERT INTO t1 (id,f1) VALUES (15,'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'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); +COMMIT; +START TRANSACTION; -+INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (20,'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'); ++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 (id,f1) VALUES (21,'node1_to_be_rollbacked_after'); -+INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after'); -+INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after'); -+INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after'); -+INSERT INTO t1 (id,f1) VALUES (25,'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'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +connection node_2; +Performing --wsrep-recover ... +connection node_2; @@ -59,132 +59,56 @@ +Using --wsrep-start-position when starting mysqld ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; -+INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (30,'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'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); +COMMIT; +connection node_1; -+INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (35,'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'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; -+INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after'); -+INSERT INTO t1 (id,f1) VALUES (40,'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'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); +COMMIT; +connection node_1a_galera_st_kill_slave_ddl; -+INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after'); -+INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after'); -+INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after'); -+INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after'); -+INSERT INTO t1 (id,f1) VALUES (45,'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'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +ROLLBACK; -+SET AUTOCOMMIT=ON; -+SET SESSION wsrep_sync_wait=15; -+SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; -+EXPECT_3 -+3 -+SELECT COUNT(*) AS EXPECT_35 FROM t1; -+EXPECT_35 -+35 -+SELECT * FROM t1; -+id f1 f2 -+1 node1_committed_before NULL -+2 node1_committed_before NULL -+3 node1_committed_before NULL -+4 node1_committed_before NULL -+5 node1_committed_before NULL -+6 node2_committed_before NULL -+7 node2_committed_before NULL -+8 node2_committed_before NULL -+9 node2_committed_before NULL -+10 node2_committed_before NULL -+11 node1_committed_during NULL -+12 node1_committed_during NULL -+13 node1_committed_during NULL -+14 node1_committed_during NULL -+15 node1_committed_during NULL -+16 node1_to_be_committed_after NULL -+17 node1_to_be_committed_after NULL -+18 node1_to_be_committed_after NULL -+19 node1_to_be_committed_after NULL -+20 node1_to_be_committed_after NULL -+26 node2_committed_after NULL -+27 node2_committed_after NULL -+28 node2_committed_after NULL -+29 node2_committed_after NULL -+30 node2_committed_after NULL -+31 node1_to_be_committed_after NULL -+32 node1_to_be_committed_after NULL -+33 node1_to_be_committed_after NULL -+34 node1_to_be_committed_after NULL -+35 node1_to_be_committed_after NULL -+36 node1_committed_after NULL -+37 node1_committed_after NULL -+38 node1_committed_after NULL -+39 node1_committed_after NULL -+40 node1_committed_after NULL ++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; -+connection node_1; +SET AUTOCOMMIT=ON; -+SET SESSION wsrep_sync_wait=15; -+SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; -+EXPECT_3 -+3 -+SELECT COUNT(*) AS EXPECT_35 FROM t1; -+EXPECT_35 -+35 -+SELECT * FROM t1; -+id f1 f2 -+1 node1_committed_before NULL -+2 node1_committed_before NULL -+3 node1_committed_before NULL -+4 node1_committed_before NULL -+5 node1_committed_before NULL -+6 node2_committed_before NULL -+7 node2_committed_before NULL -+8 node2_committed_before NULL -+9 node2_committed_before NULL -+10 node2_committed_before NULL -+11 node1_committed_during NULL -+12 node1_committed_during NULL -+13 node1_committed_during NULL -+14 node1_committed_during NULL -+15 node1_committed_during NULL -+16 node1_to_be_committed_after NULL -+17 node1_to_be_committed_after NULL -+18 node1_to_be_committed_after NULL -+19 node1_to_be_committed_after NULL -+20 node1_to_be_committed_after NULL -+26 node2_committed_after NULL -+27 node2_committed_after NULL -+28 node2_committed_after NULL -+29 node2_committed_after NULL -+30 node2_committed_after NULL -+31 node1_to_be_committed_after NULL -+32 node1_to_be_committed_after NULL -+33 node1_to_be_committed_after NULL -+34 node1_to_be_committed_after NULL -+35 node1_to_be_committed_after NULL -+36 node1_committed_after NULL -+37 node1_committed_after NULL -+38 node1_committed_after NULL -+39 node1_committed_after NULL -+40 node1_committed_after NULL ++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_MDEV-28583.result b/mysql-test/suite/galera/r/galera_ist_MDEV-28583.result index 5a71b490a80..80a28d349ba 100644 --- a/mysql-test/suite/galera/r/galera_ist_MDEV-28583.result +++ b/mysql-test/suite/galera/r/galera_ist_MDEV-28583.result @@ -1,519 +1,287 @@ -connection node_2; -connection node_1; connection node_1; connection node_2; Performing State Transfer on a server that has been temporarily disconnected connection node_1; -CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; SET AUTOCOMMIT=OFF; START TRANSACTION; -INSERT INTO t1 VALUES (1,'node1_committed_before'); -INSERT INTO t1 VALUES (2,'node1_committed_before'); -INSERT INTO t1 VALUES (3,'node1_committed_before'); -INSERT INTO t1 VALUES (4,'node1_committed_before'); -INSERT INTO t1 VALUES (5,'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 t1 VALUES (6,'node2_committed_before'); -INSERT INTO t1 VALUES (7,'node2_committed_before'); -INSERT INTO t1 VALUES (8,'node2_committed_before'); -INSERT INTO t1 VALUES (9,'node2_committed_before'); -INSERT INTO t1 VALUES (10,'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; Unloading wsrep provider ... SET GLOBAL wsrep_cluster_address = ''; connection node_1; SET AUTOCOMMIT=OFF; START TRANSACTION; -INSERT INTO t1 VALUES (11,'node1_committed_during'); -INSERT INTO t1 VALUES (12,'node1_committed_during'); -INSERT INTO t1 VALUES (13,'node1_committed_during'); -INSERT INTO t1 VALUES (14,'node1_committed_during'); -INSERT INTO t1 VALUES (15,'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 t1 VALUES (16,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (17,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (18,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (19,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (20,'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_disconnect_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; SET AUTOCOMMIT=OFF; START TRANSACTION; -INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (25,'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; Loading wsrep provider ... -disconnect node_2; -connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2; -connection node_2; SET AUTOCOMMIT=OFF; START TRANSACTION; -INSERT INTO t1 VALUES (26,'node2_committed_after'); -INSERT INTO t1 VALUES (27,'node2_committed_after'); -INSERT INTO t1 VALUES (28,'node2_committed_after'); -INSERT INTO t1 VALUES (29,'node2_committed_after'); -INSERT INTO t1 VALUES (30,'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'); +INSERT INTO t1 VALUES ('node2_committed_after'); COMMIT; connection node_1; -INSERT INTO t1 VALUES (31,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (32,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (33,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (34,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (35,'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 t1 VALUES (36,'node1_committed_after'); -INSERT INTO t1 VALUES (37,'node1_committed_after'); -INSERT INTO t1 VALUES (38,'node1_committed_after'); -INSERT INTO t1 VALUES (39,'node1_committed_after'); -INSERT INTO t1 VALUES (40,'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_disconnect_slave; -INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (45,'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'); ROLLBACK; -SET AUTOCOMMIT=ON; -SET SESSION wsrep_sync_wait=15; -SELECT COUNT(*) AS EXPECT_35 FROM t1; -EXPECT_35 -35 -SELECT * FROM t1; -id f1 -1 node1_committed_before -2 node1_committed_before -3 node1_committed_before -4 node1_committed_before -5 node1_committed_before -6 node2_committed_before -7 node2_committed_before -8 node2_committed_before -9 node2_committed_before -10 node2_committed_before -11 node1_committed_during -12 node1_committed_during -13 node1_committed_during -14 node1_committed_during -15 node1_committed_during -16 node1_to_be_committed_after -17 node1_to_be_committed_after -18 node1_to_be_committed_after -19 node1_to_be_committed_after -20 node1_to_be_committed_after -26 node2_committed_after -27 node2_committed_after -28 node2_committed_after -29 node2_committed_after -30 node2_committed_after -31 node1_to_be_committed_after -32 node1_to_be_committed_after -33 node1_to_be_committed_after -34 node1_to_be_committed_after -35 node1_to_be_committed_after -36 node1_committed_after -37 node1_committed_after -38 node1_committed_after -39 node1_committed_after -40 node1_committed_after +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 -connection node_1; +COMMIT; SET AUTOCOMMIT=ON; -SET SESSION wsrep_sync_wait=15; -SELECT COUNT(*) AS EXPECT_35 FROM t1; -EXPECT_35 -35 -SELECT * FROM t1; -id f1 -1 node1_committed_before -2 node1_committed_before -3 node1_committed_before -4 node1_committed_before -5 node1_committed_before -6 node2_committed_before -7 node2_committed_before -8 node2_committed_before -9 node2_committed_before -10 node2_committed_before -11 node1_committed_during -12 node1_committed_during -13 node1_committed_during -14 node1_committed_during -15 node1_committed_during -16 node1_to_be_committed_after -17 node1_to_be_committed_after -18 node1_to_be_committed_after -19 node1_to_be_committed_after -20 node1_to_be_committed_after -26 node2_committed_after -27 node2_committed_after -28 node2_committed_after -29 node2_committed_after -30 node2_committed_after -31 node1_to_be_committed_after -32 node1_to_be_committed_after -33 node1_to_be_committed_after -34 node1_to_be_committed_after -35 node1_to_be_committed_after -36 node1_committed_after -37 node1_committed_after -38 node1_committed_after -39 node1_committed_after -40 node1_committed_after +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 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; SET AUTOCOMMIT=OFF; START TRANSACTION; -INSERT INTO t1 VALUES (1,'node1_committed_before'); -INSERT INTO t1 VALUES (2,'node1_committed_before'); -INSERT INTO t1 VALUES (3,'node1_committed_before'); -INSERT INTO t1 VALUES (4,'node1_committed_before'); -INSERT INTO t1 VALUES (5,'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 t1 VALUES (6,'node2_committed_before'); -INSERT INTO t1 VALUES (7,'node2_committed_before'); -INSERT INTO t1 VALUES (8,'node2_committed_before'); -INSERT INTO t1 VALUES (9,'node2_committed_before'); -INSERT INTO t1 VALUES (10,'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; SET AUTOCOMMIT=OFF; START TRANSACTION; -INSERT INTO t1 VALUES (11,'node1_committed_during'); -INSERT INTO t1 VALUES (12,'node1_committed_during'); -INSERT INTO t1 VALUES (13,'node1_committed_during'); -INSERT INTO t1 VALUES (14,'node1_committed_during'); -INSERT INTO t1 VALUES (15,'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 t1 VALUES (16,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (17,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (18,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (19,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (20,'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_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; SET AUTOCOMMIT=OFF; START TRANSACTION; -INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (25,'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; -INSERT INTO t1 VALUES (26,'node2_committed_after'); -INSERT INTO t1 VALUES (27,'node2_committed_after'); -INSERT INTO t1 VALUES (28,'node2_committed_after'); -INSERT INTO t1 VALUES (29,'node2_committed_after'); -INSERT INTO t1 VALUES (30,'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'); +INSERT INTO t1 VALUES ('node2_committed_after'); COMMIT; connection node_1; -INSERT INTO t1 VALUES (31,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (32,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (33,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (34,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (35,'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 t1 VALUES (36,'node1_committed_after'); -INSERT INTO t1 VALUES (37,'node1_committed_after'); -INSERT INTO t1 VALUES (38,'node1_committed_after'); -INSERT INTO t1 VALUES (39,'node1_committed_after'); -INSERT INTO t1 VALUES (40,'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_shutdown_slave; -INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (45,'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'); ROLLBACK; -SET AUTOCOMMIT=ON; -SET SESSION wsrep_sync_wait=15; -SELECT COUNT(*) AS EXPECT_15 FROM t1; -EXPECT_15 -35 -SELECT * from t1; -id f1 -1 node1_committed_before -2 node1_committed_before -3 node1_committed_before -4 node1_committed_before -5 node1_committed_before -6 node2_committed_before -7 node2_committed_before -8 node2_committed_before -9 node2_committed_before -10 node2_committed_before -11 node1_committed_during -12 node1_committed_during -13 node1_committed_during -14 node1_committed_during -15 node1_committed_during -16 node1_to_be_committed_after -17 node1_to_be_committed_after -18 node1_to_be_committed_after -19 node1_to_be_committed_after -20 node1_to_be_committed_after -26 node2_committed_after -27 node2_committed_after -28 node2_committed_after -29 node2_committed_after -30 node2_committed_after -31 node1_to_be_committed_after -32 node1_to_be_committed_after -33 node1_to_be_committed_after -34 node1_to_be_committed_after -35 node1_to_be_committed_after -36 node1_committed_after -37 node1_committed_after -38 node1_committed_after -39 node1_committed_after -40 node1_committed_after +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; -connection node_1; SET AUTOCOMMIT=ON; -SET SESSION wsrep_sync_wait=15; -SELECT COUNT(*) AS EXPECT_15 FROM t1; -EXPECT_15 -35 -SELECT * from t1; -id f1 -1 node1_committed_before -2 node1_committed_before -3 node1_committed_before -4 node1_committed_before -5 node1_committed_before -6 node2_committed_before -7 node2_committed_before -8 node2_committed_before -9 node2_committed_before -10 node2_committed_before -11 node1_committed_during -12 node1_committed_during -13 node1_committed_during -14 node1_committed_during -15 node1_committed_during -16 node1_to_be_committed_after -17 node1_to_be_committed_after -18 node1_to_be_committed_after -19 node1_to_be_committed_after -20 node1_to_be_committed_after -26 node2_committed_after -27 node2_committed_after -28 node2_committed_after -29 node2_committed_after -30 node2_committed_after -31 node1_to_be_committed_after -32 node1_to_be_committed_after -33 node1_to_be_committed_after -34 node1_to_be_committed_after -35 node1_to_be_committed_after -36 node1_committed_after -37 node1_committed_after -38 node1_committed_after -39 node1_committed_after -40 node1_committed_after +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 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; SET AUTOCOMMIT=OFF; START TRANSACTION; -INSERT INTO t1 VALUES (1,'node1_committed_before'); -INSERT INTO t1 VALUES (2,'node1_committed_before'); -INSERT INTO t1 VALUES (3,'node1_committed_before'); -INSERT INTO t1 VALUES (4,'node1_committed_before'); -INSERT INTO t1 VALUES (5,'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 t1 VALUES (6,'node2_committed_before'); -INSERT INTO t1 VALUES (7,'node2_committed_before'); -INSERT INTO t1 VALUES (8,'node2_committed_before'); -INSERT INTO t1 VALUES (9,'node2_committed_before'); -INSERT INTO t1 VALUES (10,'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; Killing server ... connection node_1; SET AUTOCOMMIT=OFF; START TRANSACTION; -INSERT INTO t1 VALUES (11,'node1_committed_during'); -INSERT INTO t1 VALUES (12,'node1_committed_during'); -INSERT INTO t1 VALUES (13,'node1_committed_during'); -INSERT INTO t1 VALUES (14,'node1_committed_during'); -INSERT INTO t1 VALUES (15,'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 t1 VALUES (16,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (17,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (18,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (19,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (20,'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_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; SET AUTOCOMMIT=OFF; START TRANSACTION; -INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (25,'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; Performing --wsrep-recover ... Starting server ... Using --wsrep-start-position when starting mysqld ... SET AUTOCOMMIT=OFF; START TRANSACTION; -INSERT INTO t1 VALUES (26,'node2_committed_after'); -INSERT INTO t1 VALUES (27,'node2_committed_after'); -INSERT INTO t1 VALUES (28,'node2_committed_after'); -INSERT INTO t1 VALUES (29,'node2_committed_after'); -INSERT INTO t1 VALUES (30,'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'); +INSERT INTO t1 VALUES ('node2_committed_after'); COMMIT; connection node_1; -INSERT INTO t1 VALUES (31,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (32,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (33,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (34,'node1_to_be_committed_after'); -INSERT INTO t1 VALUES (35,'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 t1 VALUES (36,'node1_committed_after'); -INSERT INTO t1 VALUES (37,'node1_committed_after'); -INSERT INTO t1 VALUES (38,'node1_committed_after'); -INSERT INTO t1 VALUES (39,'node1_committed_after'); -INSERT INTO t1 VALUES (40,'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_kill_slave; -INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after'); -INSERT INTO t1 VALUES (46,'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'); ROLLBACK; -SET AUTOCOMMIT=ON; -SET SESSION wsrep_sync_wait=15; -SELECT COUNT(*) AS EXPECT_35 FROM t1; -EXPECT_35 -35 -SELECT * FROM t1; -id f1 -1 node1_committed_before -2 node1_committed_before -3 node1_committed_before -4 node1_committed_before -5 node1_committed_before -6 node2_committed_before -7 node2_committed_before -8 node2_committed_before -9 node2_committed_before -10 node2_committed_before -11 node1_committed_during -12 node1_committed_during -13 node1_committed_during -14 node1_committed_during -15 node1_committed_during -16 node1_to_be_committed_after -17 node1_to_be_committed_after -18 node1_to_be_committed_after -19 node1_to_be_committed_after -20 node1_to_be_committed_after -26 node2_committed_after -27 node2_committed_after -28 node2_committed_after -29 node2_committed_after -30 node2_committed_after -31 node1_to_be_committed_after -32 node1_to_be_committed_after -33 node1_to_be_committed_after -34 node1_to_be_committed_after -35 node1_to_be_committed_after -36 node1_committed_after -37 node1_committed_after -38 node1_committed_after -39 node1_committed_after -40 node1_committed_after +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; -connection node_1; SET AUTOCOMMIT=ON; -SET SESSION wsrep_sync_wait=15; -SELECT COUNT(*) AS EXPECT_35 FROM t1; -EXPECT_35 -35 -SELECT * FROM t1; -id f1 -1 node1_committed_before -2 node1_committed_before -3 node1_committed_before -4 node1_committed_before -5 node1_committed_before -6 node2_committed_before -7 node2_committed_before -8 node2_committed_before -9 node2_committed_before -10 node2_committed_before -11 node1_committed_during -12 node1_committed_during -13 node1_committed_during -14 node1_committed_during -15 node1_committed_during -16 node1_to_be_committed_after -17 node1_to_be_committed_after -18 node1_to_be_committed_after -19 node1_to_be_committed_after -20 node1_to_be_committed_after -26 node2_committed_after -27 node2_committed_after -28 node2_committed_after -29 node2_committed_after -30 node2_committed_after -31 node1_to_be_committed_after -32 node1_to_be_committed_after -33 node1_to_be_committed_after -34 node1_to_be_committed_after -35 node1_to_be_committed_after -36 node1_committed_after -37 node1_committed_after -38 node1_committed_after -39 node1_committed_after -40 node1_committed_after +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_sequences.result b/mysql-test/suite/galera/r/galera_sequences.result index 48593d2a258..7276cb8dbde 100644 --- a/mysql-test/suite/galera/r/galera_sequences.result +++ b/mysql-test/suite/galera/r/galera_sequences.result @@ -44,6 +44,9 @@ Table Create Table Seq1_1 CREATE SEQUENCE `Seq1_1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB select NEXT VALUE FOR Seq1_1; NEXT VALUE FOR Seq1_1 -1 +3001 connection node_1; DROP SEQUENCE Seq1_1; +CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster."); +connection node_2; +CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster."); diff --git a/mysql-test/suite/galera/t/MDEV-18832.test b/mysql-test/suite/galera/t/MDEV-18832.test index e2f1b2afd45..ba93761435a 100644 --- a/mysql-test/suite/galera/t/MDEV-18832.test +++ b/mysql-test/suite/galera/t/MDEV-18832.test @@ -13,3 +13,11 @@ CREATE SEQUENCE Seq1_1 START WITH 1 INCREMENT BY 1; INSERT INTO t1 VALUES (NEXT VALUE FOR Seq1_1); DROP SEQUENCE Seq1_1; DROP TABLE t1; + +# Supress warning for SEQUENCES that are declared without `NOCACHE` introduced with MDEV-27862 + +CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster."); + +--connection node_2 + +CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster."); diff --git a/mysql-test/suite/galera/t/MDEV-27862.combinations b/mysql-test/suite/galera/t/MDEV-27862.combinations new file mode 100644 index 00000000000..1eeb8fb4614 --- /dev/null +++ b/mysql-test/suite/galera/t/MDEV-27862.combinations @@ -0,0 +1,4 @@ +[binlogoff] + +[binlogon] +log-bin diff --git a/mysql-test/suite/galera/t/MDEV-27862.test b/mysql-test/suite/galera/t/MDEV-27862.test new file mode 100644 index 00000000000..89d3465b91f --- /dev/null +++ b/mysql-test/suite/galera/t/MDEV-27862.test @@ -0,0 +1,67 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc + +# Report WARNING when SEQUENCE is created without `NOCACHE` + +CREATE SEQUENCE seq_nocache ENGINE=InnoDB; +DROP SEQUENCE seq_nocache; + +CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster."); + +--connection node_2 + +CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster."); + +# NEXTVAL + +--connection node_1 + +CREATE SEQUENCE seq NOCACHE ENGINE=InnoDB; + +SELECT NEXTVAL(seq) = 1; + +--connection node_2 + +SELECT NEXTVAL(seq) = 2; + +--connection node_1 + +SELECT NEXTVAL(seq) = 3; + + +# SETVAL + +SELECT SETVAL(seq, 100); + +--connection node_2 + +SELECT NEXTVAL(seq) = 101; + +--connection node_1 + +SELECT NEXTVAL(seq) = 102; + +DROP SEQUENCE seq; + +# TRANSACTIONS + +CREATE TABLE t1(f1 INT); +CREATE SEQUENCE seq_transaction NOCACHE ENGINE=InnoDB; + +START TRANSACTION; +INSERT INTO t1 VALUES (0); +SELECT NEXTVAL(seq_transaction); +INSERT INTO t1 VALUES (NEXTVAL(seq_transaction)); +COMMIT; + +--connection node_2 + +SELECT COUNT(*) = 2 FROM t1; +SELECT NEXTVAL(seq_transaction) = 3; + +--connection node_1 +SELECT NEXTVAL(seq_transaction) = 4; + +DROP SEQUENCE seq_transaction; +DROP TABLE t1; + diff --git a/mysql-test/suite/galera/t/galera_sequences.test b/mysql-test/suite/galera/t/galera_sequences.test index 480366f6a6f..d469cc73516 100644 --- a/mysql-test/suite/galera/t/galera_sequences.test +++ b/mysql-test/suite/galera/t/galera_sequences.test @@ -44,3 +44,9 @@ select NEXT VALUE FOR Seq1_1; --connection node_1 DROP SEQUENCE Seq1_1; + +CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster."); + +--connection node_2 + +CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster."); diff --git a/mysql-test/suite/innodb/disabled.def b/mysql-test/suite/innodb/disabled.def deleted file mode 100644 index 35c941f8af7..00000000000 --- a/mysql-test/suite/innodb/disabled.def +++ /dev/null @@ -1,13 +0,0 @@ -############################################################################## -# -# List the test cases that are to be disabled temporarily. -# -# Separate the test case name and the comment with ':'. -# -# <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment> -# -# Do not use any TAB characters for whitespace. -# -############################################################################## - -create-index-debug : MDEV-13680 InnoDB may crash when btr_page_alloc() fails diff --git a/mysql-test/suite/innodb/r/create-index-debug.result b/mysql-test/suite/innodb/r/create-index-debug.result deleted file mode 100644 index 9d266c68af3..00000000000 --- a/mysql-test/suite/innodb/r/create-index-debug.result +++ /dev/null @@ -1,23 +0,0 @@ -SET @saved_debug_dbug = @@SESSION.debug_dbug; -# -#BUG#21326304 INNODB ONLINE ALTER TABLE ENDS IN CRASH ON DISK FULL -# -CREATE TABLE t1(f1 CHAR(255) NOT NULL, f2 CHAR(255) NOT NULL, f3 -CHAR(255) NOT NULL, f4 CHAR(255) NOT NULL, f5 CHAR(255) NOT NULL,f6 -CHAR(255) NOT NULL, f7 CHAR(255) NOT NULL, f8 CHAR(255) NOT NULL,f9 -CHAR(255) NOT NULL, f10 CHAR(255) NOT NULL, f11 CHAR(255) NOT NULL,f12 -CHAR(255) NOT NULL, f13 CHAR(255) NOT NULL, f14 CHAR(255) NOT NULL,f15 -CHAR(255) NOT NULL, f16 CHAR(255) NOT NULL, f17 CHAR(255) NOT NULL,f18 -CHAR(255) NOT NULL) -ENGINE=INNODB ROW_FORMAT=DYNAMIC; -INSERT INTO t1 -VALUES('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r'); -INSERT INTO t1 SELECT * FROM t1; -INSERT INTO t1 SELECT * FROM t1; -INSERT INTO t1 SELECT * FROM t1; -INSERT INTO t1 SELECT * FROM t1; -SET debug_dbug = '+d,disk_is_full'; -ALTER TABLE t1 FORCE, ALGORITHM=INPLACE; -ERROR HY000: The table 't1' is full -SET debug_dbug= @saved_debug_dbug; -DROP TABLE t1; diff --git a/mysql-test/suite/innodb/r/import_corrupted.result b/mysql-test/suite/innodb/r/import_corrupted.result index 149a48dccfe..bc24a28f22f 100644 --- a/mysql-test/suite/innodb/r/import_corrupted.result +++ b/mysql-test/suite/innodb/r/import_corrupted.result @@ -1,6 +1,7 @@ call mtr.add_suppression("Table `test`.`t2` should have 2 indexes but the tablespace has 1 indexes"); call mtr.add_suppression("Index for table 't2' is corrupt; try to repair it"); call mtr.add_suppression("Trying to read .* bytes at .* outside the bounds of the file: \\..test.t2\\.ibd"); +call mtr.add_suppression("InnoDB: File '.*test/t2\\.ibd' is corrupted"); CREATE TABLE t1 ( id INT AUTO_INCREMENT PRIMARY KEY, not_id INT, diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result index 4c1b35ac1e4..8a6c49c79c9 100644 --- a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result +++ b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result @@ -9,6 +9,8 @@ call mtr.add_suppression("InnoDB: Page for tablespace "); call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS="); call mtr.add_suppression("InnoDB: Unknown index id .* on page"); call mtr.add_suppression("InnoDB: Cannot save statistics for table `test`\\.`t1` because the \\.ibd file is missing"); +call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*ibdata1' page"); +call mtr.add_suppression("InnoDB: File '.*ibdata1' is corrupted"); FLUSH TABLES; SET GLOBAL innodb_file_per_table = 1; CREATE TABLE t1 (c1 INT) ENGINE = InnoDB; @@ -862,10 +864,8 @@ ALTER TABLE t1 DISCARD TABLESPACE; SELECT COUNT(*) FROM t1; ERROR HY000: Tablespace has been discarded for table `t1` restore: t1 .ibd and .cfg files -SET SESSION debug_dbug="+d,buf_page_import_corrupt_failure"; ALTER TABLE t1 IMPORT TABLESPACE; -ERROR HY000: Internal error: Cannot reset LSNs in table `test`.`t1` : Data structure corruption -SET SESSION debug_dbug=@saved_debug_dbug; +ERROR HY000: Index for table 't1' is corrupt; try to repair it DROP TABLE t1; unlink: t1.ibd unlink: t1.cfg diff --git a/mysql-test/suite/innodb/r/page_id_innochecksum.result b/mysql-test/suite/innodb/r/page_id_innochecksum.result index e2c13442fe6..7a5f44b21e6 100644 --- a/mysql-test/suite/innodb/r/page_id_innochecksum.result +++ b/mysql-test/suite/innodb/r/page_id_innochecksum.result @@ -3,4 +3,7 @@ create table t1(f1 int not null)engine=innodb; insert into t1 values(1), (2), (3); # Change the page offset FOUND 1 /page id mismatch/ in result.log +SET GLOBAL innodb_purge_rseg_truncate_frequency=1; +InnoDB 0 transactions not purged drop table t1; +call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test/t1\\.ibd': Page read from tablespace is corrupted\\."); diff --git a/mysql-test/suite/innodb/t/corrupted_during_recovery.test b/mysql-test/suite/innodb/t/corrupted_during_recovery.test index 4893a638dda..a7858dd1e26 100644 --- a/mysql-test/suite/innodb/t/corrupted_during_recovery.test +++ b/mysql-test/suite/innodb/t/corrupted_during_recovery.test @@ -6,8 +6,8 @@ call mtr.add_suppression("Plugin 'InnoDB' init function returned error"); call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed"); call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page"); call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test.t1\\.ibd': Page read from tablespace is corrupted."); -call mtr.add_suppression("InnoDB: Background Page read failed to read or decrypt \\[page id: space=\\d+, page number=3\\]"); -call mtr.add_suppression("Table .*t1.* is corrupted. Please drop the table and recreate."); +call mtr.add_suppression("Table test/t1 is corrupted. Please drop the table and recreate\\."); +call mtr.add_suppression("InnoDB: File '.*test/t1\\.ibd' is corrupted"); --enable_query_log let INNODB_PAGE_SIZE=`select @@innodb_page_size`; diff --git a/mysql-test/suite/innodb/t/create-index-debug.test b/mysql-test/suite/innodb/t/create-index-debug.test deleted file mode 100644 index 9ea416fbe1e..00000000000 --- a/mysql-test/suite/innodb/t/create-index-debug.test +++ /dev/null @@ -1,34 +0,0 @@ ---source include/have_innodb.inc ---source include/have_innodb_16k.inc ---source include/have_debug.inc - -SET @saved_debug_dbug = @@SESSION.debug_dbug; - ---echo # ---echo #BUG#21326304 INNODB ONLINE ALTER TABLE ENDS IN CRASH ON DISK FULL ---echo # -CREATE TABLE t1(f1 CHAR(255) NOT NULL, f2 CHAR(255) NOT NULL, f3 -CHAR(255) NOT NULL, f4 CHAR(255) NOT NULL, f5 CHAR(255) NOT NULL,f6 -CHAR(255) NOT NULL, f7 CHAR(255) NOT NULL, f8 CHAR(255) NOT NULL,f9 -CHAR(255) NOT NULL, f10 CHAR(255) NOT NULL, f11 CHAR(255) NOT NULL,f12 -CHAR(255) NOT NULL, f13 CHAR(255) NOT NULL, f14 CHAR(255) NOT NULL,f15 -CHAR(255) NOT NULL, f16 CHAR(255) NOT NULL, f17 CHAR(255) NOT NULL,f18 -CHAR(255) NOT NULL) -ENGINE=INNODB ROW_FORMAT=DYNAMIC; - -INSERT INTO t1 -VALUES('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r'); - -INSERT INTO t1 SELECT * FROM t1; -INSERT INTO t1 SELECT * FROM t1; -INSERT INTO t1 SELECT * FROM t1; -INSERT INTO t1 SELECT * FROM t1; - -SET debug_dbug = '+d,disk_is_full'; - ---error ER_RECORD_FILE_FULL -ALTER TABLE t1 FORCE, ALGORITHM=INPLACE; - -SET debug_dbug= @saved_debug_dbug; - -DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/import_corrupted.test b/mysql-test/suite/innodb/t/import_corrupted.test index 3a9b9a40493..57c8c6dd9be 100644 --- a/mysql-test/suite/innodb/t/import_corrupted.test +++ b/mysql-test/suite/innodb/t/import_corrupted.test @@ -3,6 +3,7 @@ call mtr.add_suppression("Table `test`.`t2` should have 2 indexes but the tablespace has 1 indexes"); call mtr.add_suppression("Index for table 't2' is corrupt; try to repair it"); call mtr.add_suppression("Trying to read .* bytes at .* outside the bounds of the file: \\..test.t2\\.ibd"); +call mtr.add_suppression("InnoDB: File '.*test/t2\\.ibd' is corrupted"); let MYSQLD_DATADIR = `SELECT @@datadir`; diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test index e7a39f23e11..efa2b1ea403 100644 --- a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test +++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test @@ -29,6 +29,8 @@ call mtr.add_suppression("InnoDB: Page for tablespace "); call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS="); call mtr.add_suppression("InnoDB: Unknown index id .* on page"); call mtr.add_suppression("InnoDB: Cannot save statistics for table `test`\\.`t1` because the \\.ibd file is missing"); +call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*ibdata1' page"); +call mtr.add_suppression("InnoDB: File '.*ibdata1' is corrupted"); FLUSH TABLES; let MYSQLD_DATADIR =`SELECT @@datadir`; @@ -1173,20 +1175,29 @@ ALTER TABLE t1 DISCARD TABLESPACE; SELECT COUNT(*) FROM t1; # Restore files +let INNODB_PAGE_SIZE=`select @@innodb_page_size`; + perl; do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; ib_restore_tablespaces("test", "t1"); +my $page; +my $ps = $ENV{INNODB_PAGE_SIZE}; +my $file = "$ENV{MYSQLD_DATADIR}/test/t1.ibd"; +open(FILE, "+<$file") || die "Unable to open $file"; +binmode FILE; +sysseek(FILE, 3*$ps, 0) || die "Unable to seek $file\n"; +die "Unable to read $file" unless sysread(FILE, $page, $ps) == $ps; +substr($page,24,2)='42'; +sysseek(FILE, 3*$ps, 0) || die "Unable to rewind $file\n"; +syswrite(FILE, $page, $ps)==$ps || die "Unable to write $file\n"; +close(FILE) || die "Unable to close $file"; EOF -SET SESSION debug_dbug="+d,buf_page_import_corrupt_failure"; - --replace_regex /'.*t1.cfg'/'t1.cfg'/ ---error ER_INTERNAL_ERROR +--error ER_NOT_KEYFILE ALTER TABLE t1 IMPORT TABLESPACE; -SET SESSION debug_dbug=@saved_debug_dbug; - DROP TABLE t1; perl; diff --git a/mysql-test/suite/innodb/t/innodb_bug14147491.test b/mysql-test/suite/innodb/t/innodb_bug14147491.test index c6e4f01a642..3c37f1b7cce 100644 --- a/mysql-test/suite/innodb/t/innodb_bug14147491.test +++ b/mysql-test/suite/innodb/t/innodb_bug14147491.test @@ -12,6 +12,7 @@ call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted\\. Please dro call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page"); call mtr.add_suppression("InnoDB: We detected index corruption in an InnoDB type table"); call mtr.add_suppression("Index for table 't1' is corrupt; try to repair it"); +call mtr.add_suppression("InnoDB: File '.*test/t1\\.ibd' is corrupted"); --enable_query_log --echo # Ensure that purge will not crash on the table after we corrupt it. @@ -70,13 +71,13 @@ EOF --echo # Now t1 is corrupted but we should not crash ---error 1030,1712,1932 +--error ER_GET_ERRNO,ER_NOT_KEYFILE,ER_INDEX_CORRUPT,ER_NO_SUCH_TABLE_IN_ENGINE SELECT * FROM t1; ---error 126,1030,1034,1712,1932 +--error 126,ER_GET_ERRNO,ER_NOT_KEYFILE,ER_INDEX_CORRUPT,ER_NO_SUCH_TABLE_IN_ENGINE INSERT INTO t1(b) VALUES('abcdef'); ---error 1030,1712,1932 +--error ER_GET_ERRNO,ER_NOT_KEYFILE,ER_INDEX_CORRUPT,ER_NO_SUCH_TABLE_IN_ENGINE UPDATE t1 set b = 'deadbeef' where a = 1; --echo # Cleanup, this must be possible diff --git a/mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.test b/mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.test index ac5f14ba9ad..d4391f89ec1 100644 --- a/mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.test +++ b/mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.test @@ -3,13 +3,13 @@ --disable_query_log call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page"); -call mtr.add_suppression("InnoDB: Background Page read failed to read or decrypt \\[page id: space=\\d+, page number=19\\]"); call mtr.add_suppression("\\[ERROR\\] InnoDB: Failed to read page 19 from file '.*test.t1\\.ibd': Page read from tablespace is corrupted\\."); call mtr.add_suppression("\\[ERROR\\] InnoDB: Plugin initialization aborted at srv0start\\.cc.* with error Data structure corruption"); call mtr.add_suppression("\\[ERROR\\] Plugin 'InnoDB' (init function|registration)"); call mtr.add_suppression("\\[ERROR\\] InnoDB: We detected index corruption"); call mtr.add_suppression("\\[ERROR\\] (mysqld|mariadbd).*: Index for table 't1' is corrupt; try to repair it"); call mtr.add_suppression("InnoDB: btr_pcur_open_low level: 0 table: `test`\\.`t1` index: `PRIMARY`"); +call mtr.add_suppression("InnoDB: File '.*test/t1\\.ibd' is corrupted"); --enable_query_log CREATE TABLE t1 (pk INT PRIMARY KEY, c CHAR(255))ENGINE=InnoDB STATS_PERSISTENT=0; diff --git a/mysql-test/suite/innodb/t/page_id_innochecksum.test b/mysql-test/suite/innodb/t/page_id_innochecksum.test index f5166018dd1..2a2c14844fa 100644 --- a/mysql-test/suite/innodb/t/page_id_innochecksum.test +++ b/mysql-test/suite/innodb/t/page_id_innochecksum.test @@ -61,9 +61,11 @@ let SEARCH_PATTERN=page id mismatch; --source include/search_pattern_in_file.inc --remove_file $resultlog -# prevent purge from crashing on page ID mismatch -let $restart_parameters=--innodb-force-recovery=2; +let $restart_parameters=--innodb-force-recovery=1; --source include/start_mysqld.inc +SET GLOBAL innodb_purge_rseg_truncate_frequency=1; +--source include/wait_all_purged.inc drop table t1; +call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test/t1\\.ibd': Page read from tablespace is corrupted\\."); let $restart_parameters=; --source include/restart_mysqld.inc diff --git a/mysql-test/suite/innodb_fts/r/fulltext.result b/mysql-test/suite/innodb_fts/r/fulltext.result index ce72d797ac1..38df74f6939 100644 --- a/mysql-test/suite/innodb_fts/r/fulltext.result +++ b/mysql-test/suite/innodb_fts/r/fulltext.result @@ -716,4 +716,18 @@ t1 CREATE TABLE `t1` ( FULLTEXT KEY `a_2` (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 DROP TABLE t1; +# +# MDEV-25257 SEGV in fts_get_next_doc_id upon some INSERT +# +SET @save = @@global.innodb_file_per_table; +SET @@global.innodb_file_per_table = 0; +CREATE TABLE t1 ( +col_int INTEGER, col_text TEXT, +col_int_g INTEGER GENERATED ALWAYS AS (col_int) +) ENGINE = InnoDB ROW_FORMAT = Redundant ; +ALTER TABLE t1 ADD FULLTEXT KEY `ftidx` ( col_text ) ; +ALTER TABLE t1 DROP KEY `ftidx` ; +INSERT INTO t1 (col_int, col_text) VALUES ( 1255, NULL); +DROP TABLE t1; +SET @@global.innodb_file_per_table = @save; # End of 10.3 tests diff --git a/mysql-test/suite/innodb_fts/t/fulltext.test b/mysql-test/suite/innodb_fts/t/fulltext.test index 18baf56281f..4b73e2ea15b 100644 --- a/mysql-test/suite/innodb_fts/t/fulltext.test +++ b/mysql-test/suite/innodb_fts/t/fulltext.test @@ -743,4 +743,20 @@ SHOW CREATE TABLE t1; DROP TABLE t1; --enable_warnings +--echo # +--echo # MDEV-25257 SEGV in fts_get_next_doc_id upon some INSERT +--echo # +SET @save = @@global.innodb_file_per_table; +SET @@global.innodb_file_per_table = 0; + +CREATE TABLE t1 ( + col_int INTEGER, col_text TEXT, + col_int_g INTEGER GENERATED ALWAYS AS (col_int) +) ENGINE = InnoDB ROW_FORMAT = Redundant ; +ALTER TABLE t1 ADD FULLTEXT KEY `ftidx` ( col_text ) ; +ALTER TABLE t1 DROP KEY `ftidx` ; +INSERT INTO t1 (col_int, col_text) VALUES ( 1255, NULL); +DROP TABLE t1; +SET @@global.innodb_file_per_table = @save; + --echo # End of 10.3 tests diff --git a/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result b/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result index 86e56b4904b..16e78465b03 100644 --- a/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result +++ b/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result @@ -9,6 +9,8 @@ call mtr.add_suppression("InnoDB: Error number \\d+ means"); call mtr.add_suppression("InnoDB: Cannot open datafile .*t1\\.ibd"); call mtr.add_suppression("InnoDB: Ignoring tablespace for test/t1 "); call mtr.add_suppression("InnoDB: Cannot save statistics for table `test`\\.`t1` because the \\.ibd file is missing"); +call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*ibdata1' page"); +call mtr.add_suppression("InnoDB: File '.*ibdata1' is corrupted"); FLUSH TABLES; SET SESSION innodb_strict_mode=1; CREATE TABLE t1 (c1 INT) ENGINE = Innodb @@ -325,10 +327,8 @@ ALTER TABLE t1 DISCARD TABLESPACE; SELECT COUNT(*) FROM t1; ERROR HY000: Tablespace has been discarded for table `t1` restore: t1 .ibd and .cfg files -SET SESSION debug_dbug="+d,buf_page_import_corrupt_failure"; ALTER TABLE t1 IMPORT TABLESPACE; -ERROR HY000: Internal error: Cannot reset LSNs in table `test`.`t1` : Data structure corruption -SET SESSION debug_dbug=@saved_debug_dbug; +Got one of the listed errors DROP TABLE t1; unlink: t1.ibd unlink: t1.cfg diff --git a/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test b/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test index 1f436fafeb5..36dcd1e454b 100644 --- a/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test +++ b/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test @@ -25,6 +25,8 @@ call mtr.add_suppression("InnoDB: Error number \\d+ means"); call mtr.add_suppression("InnoDB: Cannot open datafile .*t1\\.ibd"); call mtr.add_suppression("InnoDB: Ignoring tablespace for test/t1 "); call mtr.add_suppression("InnoDB: Cannot save statistics for table `test`\\.`t1` because the \\.ibd file is missing"); +call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*ibdata1' page"); +call mtr.add_suppression("InnoDB: File '.*ibdata1' is corrupted"); FLUSH TABLES; let MYSQLD_DATADIR =`SELECT @@datadir`; @@ -435,19 +437,29 @@ ALTER TABLE t1 DISCARD TABLESPACE; SELECT COUNT(*) FROM t1; # Restore files +let INNODB_PAGE_SIZE=`select @@innodb_page_size`; +let MYSQLD_DATADIR=`select @@datadir`; + perl; do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test", "t1"); +my $page; +my $ps = $ENV{INNODB_PAGE_SIZE}; +my $file = "$ENV{MYSQLD_DATADIR}/test/t1.ibd"; +open(FILE, "+<$file") || die "Unable to open $file"; +binmode FILE; +sysseek(FILE, 4*$ps, 0) || die "Unable to seek $file\n"; +die "Unable to read $file" unless sysread(FILE, $page, $ps) == $ps; +substr($page,24,2)='42'; +sysseek(FILE, 4*$ps, 0) || die "Unable to rewind $file\n"; +syswrite(FILE, $page, $ps)==$ps || die "Unable to write $file\n"; +close(FILE) || die "Unable to close $file"; EOF -SET SESSION debug_dbug="+d,buf_page_import_corrupt_failure"; - # Following alter is failing ---error ER_INTERNAL_ERROR +--error ER_INTERNAL_ERROR,ER_NOT_KEYFILE ALTER TABLE t1 IMPORT TABLESPACE; -SET SESSION debug_dbug=@saved_debug_dbug; - DROP TABLE t1; perl; |