summaryrefslogtreecommitdiffstats
path: root/storage/spider/mysql-test/spider/bugfix/t/checksum_table_with_quick_mode_3.test
diff options
context:
space:
mode:
Diffstat (limited to 'storage/spider/mysql-test/spider/bugfix/t/checksum_table_with_quick_mode_3.test')
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/checksum_table_with_quick_mode_3.test74
1 files changed, 74 insertions, 0 deletions
diff --git a/storage/spider/mysql-test/spider/bugfix/t/checksum_table_with_quick_mode_3.test b/storage/spider/mysql-test/spider/bugfix/t/checksum_table_with_quick_mode_3.test
new file mode 100644
index 00000000..de2dd90a
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/checksum_table_with_quick_mode_3.test
@@ -0,0 +1,74 @@
+--source ../include/checksum_table_with_quick_mode_3_init.inc
+--echo
+--echo this test is for MDEV-16279
+--echo
+--echo drop and create databases
+
+--connection master_1
+--disable_warnings
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+--connection child2_1
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+--enable_warnings
+
+--echo
+--echo create table and insert
+
+--connection child2_1
+--disable_query_log
+echo CHILD2_1_CREATE_TABLES;
+eval $CHILD2_1_CREATE_TABLES;
+--enable_query_log
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+--disable_query_log
+echo CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
+eval CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ PRIMARY KEY (pkey)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
+--enable_query_log
+INSERT INTO tbl_a (pkey) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+INSERT INTO tbl_a (pkey) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19);
+INSERT INTO tbl_a (pkey) VALUES (20),(21),(22),(23),(24),(25),(26),(27),(28),(29);
+FLUSH TABLES;
+
+--echo
+--echo select test 1
+
+--connection child2_1
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+CHECKSUM TABLE tbl_a EXTENDED;
+
+--connection child2_1
+--disable_ps2_protocol
+eval $CHILD2_1_SELECT_ARGUMENT1;
+--enable_ps2_protocol
+eval $CHILD2_1_SELECT_TABLES;
+
+--echo
+--echo deinit
+--disable_warnings
+
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_local;
+
+--connection child2_1
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+
+--enable_warnings
+--source ../include/checksum_table_with_quick_mode_3_deinit.inc
+--echo
+--echo end of test