diff options
Diffstat (limited to 'storage/spider/mysql-test/spider/feature')
34 files changed, 852 insertions, 0 deletions
diff --git a/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_deinit.inc b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_deinit.inc new file mode 100644 index 00000000000..52b0625ed9a --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_deinit.inc @@ -0,0 +1,16 @@ +--let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP +--let $CHILD2_1_DROP_TABLES= $CHILD2_1_DROP_TABLES_BACKUP +--let $CHILD2_1_CREATE_TABLES= $CHILD2_1_CREATE_TABLES_BACKUP +--let $CHILD2_1_SELECT_TABLES= $CHILD2_1_SELECT_TABLES_BACKUP +--let $CHILD2_2_DROP_TABLES= $CHILD2_2_DROP_TABLES_BACKUP +--let $CHILD2_2_CREATE_TABLES= $CHILD2_2_CREATE_TABLES_BACKUP +--let $CHILD2_2_SELECT_TABLES= $CHILD2_2_SELECT_TABLES_BACKUP +--connection master_1 +set session spider_bgs_mode= @old_spider_bgs_mode; +--disable_warnings +--disable_query_log +--disable_result_log +--source ../t/test_deinit.inc +--enable_result_log +--enable_query_log +--enable_warnings diff --git a/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_extended_deinit.inc b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_extended_deinit.inc new file mode 100644 index 00000000000..799bd983393 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_extended_deinit.inc @@ -0,0 +1 @@ +--source checksum_table_parallel_deinit.inc diff --git a/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_extended_init.inc b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_extended_init.inc new file mode 100644 index 00000000000..f17a532d53b --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_extended_init.inc @@ -0,0 +1,2 @@ +--source checksum_table_parallel_init.inc +--let $MASTER_1_CHECKSUM_TABLE= CHECKSUM TABLE tbl_a EXTENDED diff --git a/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_init.inc b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_init.inc new file mode 100644 index 00000000000..7aab82515a0 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_init.inc @@ -0,0 +1,53 @@ +--disable_warnings +--disable_query_log +--disable_result_log +--source ../t/test_init.inc +if (!$HAVE_PARTITION) +{ + --source checksum_table_parallel_deinit.inc + --enable_result_log + --enable_query_log + --enable_warnings + skip Test requires partitioning; +} +--enable_result_log +--enable_query_log +--enable_warnings +--let $MASTER_1_COMMENT_2_1_BACKUP= $MASTER_1_COMMENT_2_1 +let $MASTER_1_COMMENT_2_1= + COMMENT='table "tbl_a"' + PARTITION BY KEY(pkey) ( + PARTITION pt1 COMMENT='srv "s_2_1"', + PARTITION pt2 COMMENT='srv "s_2_2"' + ); +--let $CHILD2_1_DROP_TABLES_BACKUP= $CHILD2_1_DROP_TABLES +let $CHILD2_1_DROP_TABLES= + DROP TABLE IF EXISTS tbl_a; +--let $CHILD2_1_CREATE_TABLES_BACKUP= $CHILD2_1_CREATE_TABLES +let $CHILD2_1_CREATE_TABLES= + CREATE TABLE tbl_a ( + pkey int NOT NULL, + PRIMARY KEY (pkey) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +--let $CHILD2_1_SELECT_TABLES_BACKUP= $CHILD2_1_SELECT_TABLES +let $CHILD2_1_SELECT_TABLES= + SELECT pkey FROM tbl_a ORDER BY pkey; +let $CHILD2_1_SELECT_ARGUMENT1= + SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'; +--let $CHILD2_2_DROP_TABLES_BACKUP= $CHILD2_2_DROP_TABLES +let $CHILD2_2_DROP_TABLES= + DROP TABLE IF EXISTS tbl_a; +--let $CHILD2_2_CREATE_TABLES_BACKUP= $CHILD2_2_CREATE_TABLES +let $CHILD2_2_CREATE_TABLES= + CREATE TABLE tbl_a ( + pkey int NOT NULL, + PRIMARY KEY (pkey) + ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET; +--let $CHILD2_2_SELECT_TABLES_BACKUP= $CHILD2_2_SELECT_TABLES +let $CHILD2_2_SELECT_TABLES= + SELECT pkey FROM tbl_a ORDER BY pkey; +let $CHILD2_2_SELECT_ARGUMENT1= + SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'; +--connection master_1 +set @old_spider_bgs_mode= @@spider_bgs_mode; +set session spider_bgs_mode= 1; diff --git a/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_no_opt_deinit.inc b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_no_opt_deinit.inc new file mode 100644 index 00000000000..799bd983393 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_no_opt_deinit.inc @@ -0,0 +1 @@ +--source checksum_table_parallel_deinit.inc diff --git a/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_no_opt_init.inc b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_no_opt_init.inc new file mode 100644 index 00000000000..230b6432a01 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_no_opt_init.inc @@ -0,0 +1,2 @@ +--source checksum_table_parallel_init.inc +--let $MASTER_1_CHECKSUM_TABLE= CHECKSUM TABLE tbl_a diff --git a/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_quick_deinit.inc b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_quick_deinit.inc new file mode 100644 index 00000000000..799bd983393 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_quick_deinit.inc @@ -0,0 +1 @@ +--source checksum_table_parallel_deinit.inc diff --git a/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_quick_init.inc b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_quick_init.inc new file mode 100644 index 00000000000..66f6ecbe0ef --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_quick_init.inc @@ -0,0 +1,2 @@ +--source checksum_table_parallel_init.inc +--let $MASTER_1_CHECKSUM_TABLE= CHECKSUM TABLE tbl_a QUICK diff --git a/storage/spider/mysql-test/spider/feature/include/slave_transaction_retry_errors_deinit.inc b/storage/spider/mysql-test/spider/feature/include/slave_transaction_retry_errors_deinit.inc new file mode 100644 index 00000000000..5ac67cdf783 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/include/slave_transaction_retry_errors_deinit.inc @@ -0,0 +1,10 @@ +--connection slave1_1 +--disable_warnings +--disable_query_log +--disable_result_log +--source ../include/deinit_spider.inc +--source ../t/slave_test_deinit.inc +--source ../t/test_deinit.inc +--enable_result_log +--enable_query_log +--enable_warnings diff --git a/storage/spider/mysql-test/spider/feature/include/slave_transaction_retry_errors_init.inc b/storage/spider/mysql-test/spider/feature/include/slave_transaction_retry_errors_init.inc new file mode 100644 index 00000000000..052d6ebb2eb --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/include/slave_transaction_retry_errors_init.inc @@ -0,0 +1,10 @@ +--disable_warnings +--disable_query_log +--disable_result_log +--source ../t/test_init.inc +--source ../t/slave_test_init.inc +--connection slave1_1 +--source ../include/init_spider.inc +--enable_result_log +--enable_query_log +--enable_warnings diff --git a/storage/spider/mysql-test/spider/feature/my.cnf b/storage/spider/mysql-test/spider/feature/my.cnf new file mode 100644 index 00000000000..b7f76a630cc --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/my.cnf @@ -0,0 +1,2 @@ +!include include/default_mysqld.cnf +!include my_1_1.cnf diff --git a/storage/spider/mysql-test/spider/feature/my_1_1.cnf b/storage/spider/mysql-test/spider/feature/my_1_1.cnf new file mode 100644 index 00000000000..5f17295d895 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/my_1_1.cnf @@ -0,0 +1,44 @@ +[mysqld.1.1] +log-bin= master-bin +loose_handlersocket_port= 20000 +loose_handlersocket_port_wr= 20001 +loose_handlersocket_threads= 2 +loose_handlersocket_threads_wr= 1 +loose_handlersocket_support_merge_table= 0 +loose_handlersocket_direct_update_mode= 2 +loose_handlersocket_unlimited_boundary= 65536 +loose_handlersocket_bulk_insert= 0 +loose_handlersocket_bulk_insert_timeout= 0 +loose_handlersocket_general_log= 1 +loose_handlersocket_timeout= 30 +loose_handlersocket_close_table_interval=2 +open_files_limit= 4096 +loose_partition= 1 + +[ENV] +USE_GEOMETRY_TEST= 1 +USE_FULLTEXT_TEST= 1 +USE_HA_TEST= 1 +USE_GENERAL_LOG= 1 +USE_REPLICATION= 1 +MASTER_1_MYPORT= @mysqld.1.1.port +MASTER_1_HSRPORT= 20000 +MASTER_1_HSWPORT= 20001 +MASTER_1_MYSOCK= @mysqld.1.1.socket +MASTER_1_ENGINE_TYPE= Spider +#MASTER_1_ENGINE_TYPE= MyISAM +MASTER_1_ENGINE= ENGINE=Spider +MASTER_1_CHARSET= DEFAULT CHARSET=utf8 +MASTER_1_ENGINE2= ENGINE=MyISAM +MASTER_1_CHARSET2= DEFAULT CHARSET=utf8 +MASTER_1_CHARSET3= DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci + +STR_SEMICOLON= ; + +#The followings are set in include/init_xxx.inc files +# MASTER_1_COMMENT_2_1 +# MASTER_1_COMMENT2_2_1 +# MASTER_1_COMMENT3_2_1 +# MASTER_1_COMMENT4_2_1 +# MASTER_1_COMMENT5_2_1 +# MASTER_1_COMMENT_P_2_1 diff --git a/storage/spider/mysql-test/spider/feature/my_2_1.cnf b/storage/spider/mysql-test/spider/feature/my_2_1.cnf new file mode 100644 index 00000000000..24161645607 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/my_2_1.cnf @@ -0,0 +1,56 @@ +[mysqld.2.1] +loose_handlersocket_port= 20002 +loose_handlersocket_port_wr= 20003 +loose_handlersocket_threads= 2 +loose_handlersocket_threads_wr= 1 +loose_handlersocket_support_merge_table= 0 +loose_handlersocket_direct_update_mode= 2 +loose_handlersocket_unlimited_boundary= 65536 +loose_handlersocket_bulk_insert= 0 +loose_handlersocket_bulk_insert_timeout= 0 +loose_handlersocket_general_log= 1 +loose_handlersocket_timeout= 30 +loose_handlersocket_close_table_interval=2 +open_files_limit= 4096 + +[ENV] +USE_CHILD_GROUP2= 1 +OUTPUT_CHILD_GROUP2= 0 +CHILD2_1_MYPORT= @mysqld.2.1.port +CHILD2_1_HSRPORT= 20002 +CHILD2_1_HSWPORT= 20003 +CHILD2_1_MYSOCK= @mysqld.2.1.socket +CHILD2_1_ENGINE_TYPE= InnoDB +CHILD2_1_ENGINE= ENGINE=InnoDB +CHILD2_1_CHARSET= DEFAULT CHARSET=utf8 +CHILD2_1_CHARSET2= DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci +CHILD2_1_FT_MYPORT= @mysqld.2.1.port +CHILD2_1_FT_MYSOCK= @mysqld.2.1.socket +CHILD2_1_FT_ENGINE_TYPE= MyISAM +CHILD2_1_FT_ENGINE= ENGINE=MyISAM +CHILD2_1_FT_CHARSET= DEFAULT CHARSET=utf8 +CHILD2_1_GM_MYPORT= @mysqld.2.1.port +CHILD2_1_GM_MYSOCK= @mysqld.2.1.socket +CHILD2_1_GM_ENGINE_TYPE= MyISAM +CHILD2_1_GM_ENGINE= ENGINE=MyISAM +CHILD2_1_GM_CHARSET= DEFAULT CHARSET=utf8 + +#The followings are set in include/init_xxx.inc files +# CHILD2_1_DROP_TABLES +# CHILD2_1_CREATE_TABLES +# CHILD2_1_SELECT_TABLES +# CHILD2_1_DROP_TABLES2 +# CHILD2_1_CREATE_TABLES2 +# CHILD2_1_SELECT_TABLES2 +# CHILD2_1_DROP_TABLES3 +# CHILD2_1_CREATE_TABLES3 +# CHILD2_1_SELECT_TABLES3 +# CHILD2_1_DROP_TABLES4 +# CHILD2_1_CREATE_TABLES4 +# CHILD2_1_SELECT_TABLES4 +# CHILD2_1_DROP_TABLES5 +# CHILD2_1_CREATE_TABLES5 +# CHILD2_1_SELECT_TABLES5 +# CHILD2_1_DROP_TABLES6 +# CHILD2_1_CREATE_TABLES6 +# CHILD2_1_SELECT_TABLES6 diff --git a/storage/spider/mysql-test/spider/feature/my_2_2.cnf b/storage/spider/mysql-test/spider/feature/my_2_2.cnf new file mode 100644 index 00000000000..2d3c2a89a7d --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/my_2_2.cnf @@ -0,0 +1,38 @@ +[mysqld.2.2] +loose_handlersocket_port= 20004 +loose_handlersocket_port_wr= 20005 +loose_handlersocket_threads= 2 +loose_handlersocket_threads_wr= 1 +loose_handlersocket_support_merge_table= 0 +loose_handlersocket_direct_update_mode= 2 +loose_handlersocket_unlimited_boundary= 65536 +loose_handlersocket_bulk_insert= 0 +loose_handlersocket_bulk_insert_timeout= 0 +loose_handlersocket_general_log= 1 +loose_handlersocket_timeout= 30 +loose_handlersocket_close_table_interval=2 +open_files_limit= 4096 + +[ENV] +CHILD2_2_MYPORT= @mysqld.2.2.port +CHILD2_2_HSRPORT= 20004 +CHILD2_2_HSWPORT= 20005 +CHILD2_2_MYSOCK= @mysqld.2.2.socket +CHILD2_2_ENGINE_TYPE= InnoDB +CHILD2_2_ENGINE= ENGINE=InnoDB +CHILD2_2_CHARSET= DEFAULT CHARSET=utf8 +CHILD2_2_FT_MYPORT= @mysqld.2.2.port +CHILD2_2_FT_MYSOCK= @mysqld.2.2.socket +CHILD2_2_FT_ENGINE_TYPE= MyISAM +CHILD2_2_FT_ENGINE= ENGINE=MyISAM +CHILD2_2_FT_CHARSET= DEFAULT CHARSET=utf8 +CHILD2_2_GM_MYPORT= @mysqld.2.2.port +CHILD2_2_GM_MYSOCK= @mysqld.2.2.socket +CHILD2_2_GM_ENGINE_TYPE= MyISAM +CHILD2_2_GM_ENGINE= ENGINE=MyISAM +CHILD2_2_GM_CHARSET= DEFAULT CHARSET=utf8 + +#The followings are set in include/init_xxx.inc files +# CHILD2_2_DROP_TABLES +# CHILD2_2_CREATE_TABLES +# CHILD2_2_SELECT_TABLES diff --git a/storage/spider/mysql-test/spider/feature/my_2_3.cnf b/storage/spider/mysql-test/spider/feature/my_2_3.cnf new file mode 100644 index 00000000000..024da651e0c --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/my_2_3.cnf @@ -0,0 +1,8 @@ +[mysqld.2.3] + +[ENV] +CHILD2_3_MYPORT= @mysqld.2.3.port +CHILD2_3_MYSOCK= @mysqld.2.3.socket +CHILD2_3_ENGINE_TYPE= InnoDB +CHILD2_3_ENGINE= ENGINE=InnoDB +CHILD2_3_CHARSET= DEFAULT CHARSET=utf8 diff --git a/storage/spider/mysql-test/spider/feature/my_3_1.cnf b/storage/spider/mysql-test/spider/feature/my_3_1.cnf new file mode 100644 index 00000000000..fad21607789 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/my_3_1.cnf @@ -0,0 +1,11 @@ +[mysqld.3.1] +loose_partition= 1 + +[ENV] +USE_CHILD_GROUP3= 1 +OUTPUT_CHILD_GROUP3= 0 +CHILD3_1_MYPORT= @mysqld.3.1.port +CHILD3_1_MYSOCK= @mysqld.3.1.socket +CHILD3_1_ENGINE_TYPE= InnoDB +CHILD3_1_ENGINE= ENGINE=InnoDB +CHILD3_1_CHARSET= DEFAULT CHARSET=utf8 diff --git a/storage/spider/mysql-test/spider/feature/my_3_2.cnf b/storage/spider/mysql-test/spider/feature/my_3_2.cnf new file mode 100644 index 00000000000..6f027b6f525 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/my_3_2.cnf @@ -0,0 +1,9 @@ +[mysqld.3.2] +loose_partition= 1 + +[ENV] +CHILD3_2_MYPORT= @mysqld.3.2.port +CHILD3_2_MYSOCK= @mysqld.3.2.socket +CHILD3_2_ENGINE_TYPE= InnoDB +CHILD3_2_ENGINE= ENGINE=InnoDB +CHILD3_2_CHARSET= DEFAULT CHARSET=utf8 diff --git a/storage/spider/mysql-test/spider/feature/my_3_3.cnf b/storage/spider/mysql-test/spider/feature/my_3_3.cnf new file mode 100644 index 00000000000..fbb33694738 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/my_3_3.cnf @@ -0,0 +1,9 @@ +[mysqld.3.3] +loose_partition= 1 + +[ENV] +CHILD3_3_MYPORT= @mysqld.3.3.port +CHILD3_3_MYSOCK= @mysqld.3.3.socket +CHILD3_3_ENGINE_TYPE= InnoDB +CHILD3_3_ENGINE= ENGINE=InnoDB +CHILD3_3_CHARSET= DEFAULT CHARSET=utf8 diff --git a/storage/spider/mysql-test/spider/feature/my_4_1.cnf b/storage/spider/mysql-test/spider/feature/my_4_1.cnf new file mode 100644 index 00000000000..d1812a48b68 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/my_4_1.cnf @@ -0,0 +1,9 @@ +[mysqld.4.1] +loose_partition= 1 + +[ENV] +SLAVE1_1_MYPORT= @mysqld.4.1.port +SLAVE1_1_MYSOCK= @mysqld.4.1.socket +SLAVE1_1_ENGINE_TYPE= MyISAM +SLAVE1_1_ENGINE= ENGINE=MyISAM +SLAVE1_1_CHARSET= DEFAULT CHARSET=utf8 diff --git a/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_extended.result b/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_extended.result new file mode 100644 index 00000000000..34587052181 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_extended.result @@ -0,0 +1,130 @@ +for master_1 +for child2 +child2_1 +child2_2 +child2_3 +for child3 +connection master_1; +set @old_spider_bgs_mode= @@spider_bgs_mode; +set session spider_bgs_mode= 1; + +this test is for MDEV-16967 + +drop and create databases +connection master_1; +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; +connection child2_1_2; +USE auto_test_remote; +connection child2_2; +SET @old_log_output = @@global.log_output; +SET GLOBAL log_output = 'TABLE,FILE'; +CREATE DATABASE auto_test_remote2; +USE auto_test_remote2; +connection child2_2_2; +USE auto_test_remote2; + +create table and insert +connection child2_1; +CHILD2_1_CREATE_TABLES +TRUNCATE TABLE mysql.general_log; +connection child2_2; +CHILD2_2_CREATE_TABLES +TRUNCATE TABLE mysql.general_log; +connection master_1; +CREATE TABLE tbl_a ( +pkey int NOT NULL, +PRIMARY KEY (pkey) +) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1 +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); + +select test 1 +connection child2_1; +TRUNCATE TABLE mysql.general_log; +LOCK TABLE tbl_a WRITE; +connection child2_2; +TRUNCATE TABLE mysql.general_log; +LOCK TABLE tbl_a WRITE; +connection master_1; +CHECKSUM TABLE tbl_a EXTENDED; +connection child2_1_2; +SELECT SLEEP(1); +SLEEP(1) +0 +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'; +argument +checksum table `auto_test_remote`.`tbl_a` extended +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %' +connection child2_2_2; +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'; +argument +checksum table `auto_test_remote2`.`tbl_a` extended +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %' +connection child2_1; +UNLOCK TABLES; +SELECT pkey FROM tbl_a ORDER BY pkey; +pkey +1 +3 +5 +7 +9 +11 +13 +15 +17 +19 +21 +23 +25 +27 +29 +connection child2_2; +UNLOCK TABLES; +SELECT pkey FROM tbl_a ORDER BY pkey; +pkey +0 +2 +4 +6 +8 +10 +12 +14 +16 +18 +20 +22 +24 +26 +28 +connection master_1; +Table Checksum +auto_test_local.tbl_a 1061386331 + +deinit +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; +connection child2_2; +DROP DATABASE IF EXISTS auto_test_remote2; +SET GLOBAL log_output = @old_log_output; +connection master_1; +set session spider_bgs_mode= @old_spider_bgs_mode; +for master_1 +for child2 +child2_1 +child2_2 +child2_3 +for child3 + +end of test diff --git a/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_no_opt.result b/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_no_opt.result new file mode 100644 index 00000000000..4e44bd4cc73 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_no_opt.result @@ -0,0 +1,128 @@ +for master_1 +for child2 +child2_1 +child2_2 +child2_3 +for child3 +connection master_1; +set @old_spider_bgs_mode= @@spider_bgs_mode; +set session spider_bgs_mode= 1; + +this test is for MDEV-16967 + +drop and create databases +connection master_1; +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; +connection child2_1_2; +USE auto_test_remote; +connection child2_2; +SET @old_log_output = @@global.log_output; +SET GLOBAL log_output = 'TABLE,FILE'; +CREATE DATABASE auto_test_remote2; +USE auto_test_remote2; +connection child2_2_2; +USE auto_test_remote2; + +create table and insert +connection child2_1; +CHILD2_1_CREATE_TABLES +TRUNCATE TABLE mysql.general_log; +connection child2_2; +CHILD2_2_CREATE_TABLES +TRUNCATE TABLE mysql.general_log; +connection master_1; +CREATE TABLE tbl_a ( +pkey int NOT NULL, +PRIMARY KEY (pkey) +) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1 +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); + +select test 1 +connection child2_1; +TRUNCATE TABLE mysql.general_log; +LOCK TABLE tbl_a WRITE; +connection child2_2; +TRUNCATE TABLE mysql.general_log; +LOCK TABLE tbl_a WRITE; +connection master_1; +CHECKSUM TABLE tbl_a; +connection child2_1_2; +SELECT SLEEP(1); +SLEEP(1) +0 +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'; +argument +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %' +connection child2_2_2; +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'; +argument +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %' +connection child2_1; +UNLOCK TABLES; +SELECT pkey FROM tbl_a ORDER BY pkey; +pkey +1 +3 +5 +7 +9 +11 +13 +15 +17 +19 +21 +23 +25 +27 +29 +connection child2_2; +UNLOCK TABLES; +SELECT pkey FROM tbl_a ORDER BY pkey; +pkey +0 +2 +4 +6 +8 +10 +12 +14 +16 +18 +20 +22 +24 +26 +28 +connection master_1; +Table Checksum +auto_test_local.tbl_a NULL + +deinit +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; +connection child2_2; +DROP DATABASE IF EXISTS auto_test_remote2; +SET GLOBAL log_output = @old_log_output; +connection master_1; +set session spider_bgs_mode= @old_spider_bgs_mode; +for master_1 +for child2 +child2_1 +child2_2 +child2_3 +for child3 + +end of test diff --git a/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_quick.result b/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_quick.result new file mode 100644 index 00000000000..b2c55b34130 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_quick.result @@ -0,0 +1,128 @@ +for master_1 +for child2 +child2_1 +child2_2 +child2_3 +for child3 +connection master_1; +set @old_spider_bgs_mode= @@spider_bgs_mode; +set session spider_bgs_mode= 1; + +this test is for MDEV-16967 + +drop and create databases +connection master_1; +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; +connection child2_1_2; +USE auto_test_remote; +connection child2_2; +SET @old_log_output = @@global.log_output; +SET GLOBAL log_output = 'TABLE,FILE'; +CREATE DATABASE auto_test_remote2; +USE auto_test_remote2; +connection child2_2_2; +USE auto_test_remote2; + +create table and insert +connection child2_1; +CHILD2_1_CREATE_TABLES +TRUNCATE TABLE mysql.general_log; +connection child2_2; +CHILD2_2_CREATE_TABLES +TRUNCATE TABLE mysql.general_log; +connection master_1; +CREATE TABLE tbl_a ( +pkey int NOT NULL, +PRIMARY KEY (pkey) +) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1 +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); + +select test 1 +connection child2_1; +TRUNCATE TABLE mysql.general_log; +LOCK TABLE tbl_a WRITE; +connection child2_2; +TRUNCATE TABLE mysql.general_log; +LOCK TABLE tbl_a WRITE; +connection master_1; +CHECKSUM TABLE tbl_a QUICK; +connection child2_1_2; +SELECT SLEEP(1); +SLEEP(1) +0 +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'; +argument +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %' +connection child2_2_2; +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'; +argument +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %' +connection child2_1; +UNLOCK TABLES; +SELECT pkey FROM tbl_a ORDER BY pkey; +pkey +1 +3 +5 +7 +9 +11 +13 +15 +17 +19 +21 +23 +25 +27 +29 +connection child2_2; +UNLOCK TABLES; +SELECT pkey FROM tbl_a ORDER BY pkey; +pkey +0 +2 +4 +6 +8 +10 +12 +14 +16 +18 +20 +22 +24 +26 +28 +connection master_1; +Table Checksum +auto_test_local.tbl_a NULL + +deinit +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; +connection child2_2; +DROP DATABASE IF EXISTS auto_test_remote2; +SET GLOBAL log_output = @old_log_output; +connection master_1; +set session spider_bgs_mode= @old_spider_bgs_mode; +for master_1 +for child2 +child2_1 +child2_2 +child2_3 +for child3 + +end of test diff --git a/storage/spider/mysql-test/spider/feature/r/slave_transaction_retry_errors.result b/storage/spider/mysql-test/spider/feature/r/slave_transaction_retry_errors.result new file mode 100644 index 00000000000..0a147c0356a --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/r/slave_transaction_retry_errors.result @@ -0,0 +1,22 @@ +for master_1 +for child2 +child2_1 +child2_2 +child2_3 +for child3 +for slave1_1 + +connection slave1_1; +SHOW VARIABLES LIKE 'slave_transaction_retry_errors'; +Variable_name Value +slave_transaction_retry_errors 1158,1159,1160,1161,1205,1213,1429,2013,12701 +connection slave1_1; +for slave1_1 +for master_1 +for child2 +child2_1 +child2_2 +child2_3 +for child3 + +end of test diff --git a/storage/spider/mysql-test/spider/feature/suite.opt b/storage/spider/mysql-test/spider/feature/suite.opt new file mode 100644 index 00000000000..672a3b37d4f --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/suite.opt @@ -0,0 +1 @@ +--loose-innodb --loose-skip-performance-schema diff --git a/storage/spider/mysql-test/spider/feature/suite.pm b/storage/spider/mysql-test/spider/feature/suite.pm new file mode 100644 index 00000000000..f106147deb6 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/suite.pm @@ -0,0 +1,12 @@ +package My::Suite::Spider; + +@ISA = qw(My::Suite); + +return "No Spider engine" unless $ENV{HA_SPIDER_SO}; +return "Not run for embedded server" if $::opt_embedded_server; +return "Test needs --big-test" unless $::opt_big_test; + +sub is_default { 1 } + +bless { }; + diff --git a/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel.inc b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel.inc new file mode 100644 index 00000000000..13e5053d64c --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel.inc @@ -0,0 +1,107 @@ +--echo +--echo this test is for MDEV-16967 +--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; +--connection child2_1_2 +USE auto_test_remote; + +--connection child2_2 +SET @old_log_output = @@global.log_output; +SET GLOBAL log_output = 'TABLE,FILE'; +CREATE DATABASE auto_test_remote2; +USE auto_test_remote2; +--connection child2_2_2 +USE auto_test_remote2; +--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 child2_2 +--disable_query_log +echo CHILD2_2_CREATE_TABLES; +eval $CHILD2_2_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); + +--echo +--echo select test 1 + +--connection child2_1 +TRUNCATE TABLE mysql.general_log; +LOCK TABLE tbl_a WRITE; + +--connection child2_2 +TRUNCATE TABLE mysql.general_log; +LOCK TABLE tbl_a WRITE; + +--connection master_1 +send_eval $MASTER_1_CHECKSUM_TABLE; + +--connection child2_1_2 +SELECT SLEEP(1); +eval $CHILD2_1_SELECT_ARGUMENT1; + +--connection child2_2_2 +eval $CHILD2_2_SELECT_ARGUMENT1; + +--connection child2_1 +UNLOCK TABLES; +eval $CHILD2_1_SELECT_TABLES; + +--connection child2_2 +UNLOCK TABLES; +eval $CHILD2_2_SELECT_TABLES; + +--connection master_1 +reap; + +--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; + +--connection child2_2 +DROP DATABASE IF EXISTS auto_test_remote2; +SET GLOBAL log_output = @old_log_output; + +--enable_warnings diff --git a/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_extended.cnf b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_extended.cnf new file mode 100644 index 00000000000..e0ffb99c38e --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_extended.cnf @@ -0,0 +1,4 @@ +!include include/default_mysqld.cnf +!include ../my_1_1.cnf +!include ../my_2_1.cnf +!include ../my_2_2.cnf diff --git a/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_extended.test b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_extended.test new file mode 100644 index 00000000000..871e1e868ad --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_extended.test @@ -0,0 +1,5 @@ +--source ../include/checksum_table_parallel_extended_init.inc +--source checksum_table_parallel.inc +--source ../include/checksum_table_parallel_extended_deinit.inc +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_no_opt.cnf b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_no_opt.cnf new file mode 100644 index 00000000000..e0ffb99c38e --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_no_opt.cnf @@ -0,0 +1,4 @@ +!include include/default_mysqld.cnf +!include ../my_1_1.cnf +!include ../my_2_1.cnf +!include ../my_2_2.cnf diff --git a/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_no_opt.test b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_no_opt.test new file mode 100644 index 00000000000..0352d598df6 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_no_opt.test @@ -0,0 +1,5 @@ +--source ../include/checksum_table_parallel_no_opt_init.inc +--source checksum_table_parallel.inc +--source ../include/checksum_table_parallel_no_opt_deinit.inc +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_quick.cnf b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_quick.cnf new file mode 100644 index 00000000000..e0ffb99c38e --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_quick.cnf @@ -0,0 +1,4 @@ +!include include/default_mysqld.cnf +!include ../my_1_1.cnf +!include ../my_2_1.cnf +!include ../my_2_2.cnf diff --git a/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_quick.test b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_quick.test new file mode 100644 index 00000000000..f08f782e7c0 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_quick.test @@ -0,0 +1,5 @@ +--source ../include/checksum_table_parallel_quick_init.inc +--source checksum_table_parallel.inc +--source ../include/checksum_table_parallel_quick_deinit.inc +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/feature/t/slave_transaction_retry_errors.cnf b/storage/spider/mysql-test/spider/feature/t/slave_transaction_retry_errors.cnf new file mode 100644 index 00000000000..45019d6c537 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/t/slave_transaction_retry_errors.cnf @@ -0,0 +1,4 @@ +!include include/default_mysqld.cnf +!include ../my_1_1.cnf +!include ../my_2_1.cnf +!include ../my_4_1.cnf diff --git a/storage/spider/mysql-test/spider/feature/t/slave_transaction_retry_errors.test b/storage/spider/mysql-test/spider/feature/t/slave_transaction_retry_errors.test new file mode 100644 index 00000000000..436bc3fb761 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/t/slave_transaction_retry_errors.test @@ -0,0 +1,9 @@ +--source ../include/slave_transaction_retry_errors_init.inc +--echo + +--connection slave1_1 +SHOW VARIABLES LIKE 'slave_transaction_retry_errors'; + +--source ../include/slave_transaction_retry_errors_deinit.inc +--echo +--echo end of test |