diff options
| author | Monty <monty@mariadb.org> | 2021-02-08 21:03:04 +0200 |
|---|---|---|
| committer | Monty <monty@mariadb.org> | 2021-02-08 21:03:04 +0200 |
| commit | ffc5d064895cadbc42711efd7dbb6ae1b323f050 (patch) | |
| tree | 2c795b9d5f1c5e572ebbca5aea6531f328391156 /mysql-test | |
| parent | bd5ac03896fa6e126690c76c1a9d2246c723f786 (diff) | |
| download | mariadb-git-ffc5d064895cadbc42711efd7dbb6ae1b323f050.tar.gz | |
MDEV-24087 s3.replication_partition fails in buildbot wiht replication failure
A few of the failures was because of missing sync_slave_to_master in
the test suite.
However, the biggest reason for most faulures was that in case of
ALTER PARTITION the master writes the query to the binary log before
it has updated the .frm and .par files. This causes a problem for an
S3 slave as it will start execute the ALTER PARTITION but get old .frm and
.par files from S3 which causes "open table" to fail, either with an error
or in some case with a crash.
Fixed
Diffstat (limited to 'mysql-test')
| -rw-r--r-- | mysql-test/suite/s3/replication.inc | 2 | ||||
| -rw-r--r-- | mysql-test/suite/s3/replication_mixed.result | 2 | ||||
| -rw-r--r-- | mysql-test/suite/s3/replication_partition.result | 6 | ||||
| -rw-r--r-- | mysql-test/suite/s3/replication_partition.test | 6 | ||||
| -rw-r--r-- | mysql-test/suite/s3/replication_stmt.result | 2 |
5 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/suite/s3/replication.inc b/mysql-test/suite/s3/replication.inc index d30733a4396..cfa38d93f98 100644 --- a/mysql-test/suite/s3/replication.inc +++ b/mysql-test/suite/s3/replication.inc @@ -81,6 +81,8 @@ show create table t2; connection master; drop table t2; +sync_slave_with_master; +connection master; --echo # --echo # Test RENAME diff --git a/mysql-test/suite/s3/replication_mixed.result b/mysql-test/suite/s3/replication_mixed.result index 66ed24d2626..6b9b87a7891 100644 --- a/mysql-test/suite/s3/replication_mixed.result +++ b/mysql-test/suite/s3/replication_mixed.result @@ -105,6 +105,8 @@ t2 CREATE TABLE `t2` ( ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 connection master; drop table t2; +connection slave; +connection master; # # Test RENAME # diff --git a/mysql-test/suite/s3/replication_partition.result b/mysql-test/suite/s3/replication_partition.result index 2b9297ea9a0..0a57a1b872d 100644 --- a/mysql-test/suite/s3/replication_partition.result +++ b/mysql-test/suite/s3/replication_partition.result @@ -13,10 +13,14 @@ PARTITION BY HASH (c1) PARTITIONS 3; INSERT INTO t1 VALUE (1), (2), (101), (102), (201), (202); ALTER TABLE t1 ENGINE=S3; +connection slave; +connection master; ALTER TABLE t1 ADD PARTITION PARTITIONS 6; select sum(c1) from t1; sum(c1) 609 +connection slave; +connection master; ALTER TABLE t1 ADD COLUMN c INT; select sum(c1) from t1; sum(c1) @@ -108,6 +112,8 @@ select sum(c1) from t1; ERROR 42S02: Table 'database.t1' doesn't exist start slave; connection master; +connection slave; +connection master; # # Check altering partitioned table to S3 and back # Checks also rename partitoned table and drop partition diff --git a/mysql-test/suite/s3/replication_partition.test b/mysql-test/suite/s3/replication_partition.test index 8a8699920bf..254924f9051 100644 --- a/mysql-test/suite/s3/replication_partition.test +++ b/mysql-test/suite/s3/replication_partition.test @@ -29,8 +29,12 @@ CREATE TABLE t1 ( PARTITIONS 3; INSERT INTO t1 VALUE (1), (2), (101), (102), (201), (202); ALTER TABLE t1 ENGINE=S3; +sync_slave_with_master; +connection master; ALTER TABLE t1 ADD PARTITION PARTITIONS 6; select sum(c1) from t1; +sync_slave_with_master; +connection master; ALTER TABLE t1 ADD COLUMN c INT; select sum(c1) from t1; sync_slave_with_master; @@ -85,6 +89,8 @@ select sum(c1) from t1; --file_exists $MYSQLD_DATADIR/$database/t1.par start slave; connection master; +sync_slave_with_master; +connection master; --echo # --echo # Check altering partitioned table to S3 and back diff --git a/mysql-test/suite/s3/replication_stmt.result b/mysql-test/suite/s3/replication_stmt.result index 077029e2d7d..4b8306687db 100644 --- a/mysql-test/suite/s3/replication_stmt.result +++ b/mysql-test/suite/s3/replication_stmt.result @@ -105,6 +105,8 @@ t2 CREATE TABLE `t2` ( ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 connection master; drop table t2; +connection slave; +connection master; # # Test RENAME # |
