summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/stat_tables_repl.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
commit06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/stat_tables_repl.test
parentInitial commit. (diff)
downloadmariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz
mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/stat_tables_repl.test')
-rw-r--r--mysql-test/main/stat_tables_repl.test58
1 files changed, 58 insertions, 0 deletions
diff --git a/mysql-test/main/stat_tables_repl.test b/mysql-test/main/stat_tables_repl.test
new file mode 100644
index 00000000..ac24c9dc
--- /dev/null
+++ b/mysql-test/main/stat_tables_repl.test
@@ -0,0 +1,58 @@
+--source include/have_stat_tables.inc
+--source include/have_binlog_format_row.inc
+--source include/master-slave.inc
+
+--echo #
+--echo # Bug mdev-485: unexpected failure with replication of DROP/ALTER table
+--echo # when RBR is on
+--echo #
+
+CREATE TABLE t1 ( a int, b int ) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (2,20), (1,20), (3,30);
+ANALYZE TABLE t1;
+DROP TABLE t1;
+
+--sync_slave_with_master
+--connection master
+
+CREATE TABLE t1 ( a int, b int, INDEX idx1(b) ) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (2,20), (1,20), (3,30);
+ANALYZE TABLE t1;
+DROP INDEX idx1 ON t1;
+
+--sync_slave_with_master
+--connection master
+
+DROP TABLE t1;
+
+CREATE TABLE t1 ( a int, b int, INDEX idx1(b) ) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (2,20), (1,20), (3,30);
+ANALYZE TABLE t1;
+ALTER TABLE t1 DROP COLUMN b;
+
+--sync_slave_with_master
+--connection master
+
+DROP TABLE t1;
+
+CREATE TABLE t1 ( a int, b int, INDEX idx1(b) ) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (2,20), (1,20), (3,30);
+ANALYZE TABLE t1;
+ALTER TABLE t1 RENAME to s;
+
+--sync_slave_with_master
+--connection master
+
+DROP TABLE s;
+
+CREATE TABLE t1 ( a int, b int, INDEX idx1(b) ) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (2,20), (1,20), (3,30);
+ANALYZE TABLE t1;
+ALTER TABLE t1 CHANGE COLUMN b c int ;
+
+--sync_slave_with_master
+--connection master
+
+DROP TABLE t1;
+
+--source include/rpl_end.inc