diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-06-01 15:51:25 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-06-01 15:51:25 +0200 |
commit | 5091a4ba755250ed8e35f4f5a39a118d476cd8f1 (patch) | |
tree | 370ba468d78204544b56e9d967d8d09e1317a1ed /storage/spider | |
parent | 84eaf0911f311acba797c265ef7508ab6c108b35 (diff) | |
parent | 0880284bf715b4916cc735e19b76d1062c2bfdcf (diff) | |
download | mariadb-git-5091a4ba755250ed8e35f4f5a39a118d476cd8f1.tar.gz |
Merge tag 'mariadb-10.0.19' into 10.1
Diffstat (limited to 'storage/spider')
134 files changed, 9149 insertions, 9039 deletions
diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc index 40d5c0e8450..b4602e5aa4f 100644 --- a/storage/spider/ha_spider.cc +++ b/storage/spider/ha_spider.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2014 Kentoku Shiba +/* Copyright (C) 2008-2015 Kentoku Shiba This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -8529,12 +8529,16 @@ int ha_spider::info( } else if (tmp_auto_increment_mode == 1 && !share->lgtm_tblhnd_share->auto_increment_init) { + DBUG_PRINT("info",("spider auto_increment_value=%llu", + share->lgtm_tblhnd_share->auto_increment_value)); share->lgtm_tblhnd_share->auto_increment_lclval = share->lgtm_tblhnd_share->auto_increment_value; share->lgtm_tblhnd_share->auto_increment_init = TRUE; stats.auto_increment_value = share->lgtm_tblhnd_share->auto_increment_value; } else { + DBUG_PRINT("info",("spider auto_increment_value=%llu", + share->lgtm_tblhnd_share->auto_increment_value)); stats.auto_increment_value = share->lgtm_tblhnd_share->auto_increment_value; } @@ -9198,12 +9202,18 @@ bool ha_spider::need_info_for_auto_inc() DBUG_ENTER("ha_spider::need_info_for_auto_inc"); DBUG_PRINT("info",("spider this=%p", this)); DBUG_PRINT("info",("spider return=%s", ( - !spider_param_auto_increment_mode(thd, share->auto_increment_mode) && - !info_auto_called + !share->lgtm_tblhnd_share->auto_increment_init || + ( + !spider_param_auto_increment_mode(thd, share->auto_increment_mode) && + !info_auto_called + ) ) ? "TRUE" : "FALSE")); DBUG_RETURN(( - !spider_param_auto_increment_mode(thd, share->auto_increment_mode) && - !info_auto_called + !share->lgtm_tblhnd_share->auto_increment_init || + ( + !spider_param_auto_increment_mode(thd, share->auto_increment_mode) && + !info_auto_called + ) )); } #endif @@ -9245,6 +9255,10 @@ int ha_spider::update_auto_increment() DBUG_PRINT("info",("spider force_auto_increment=FALSE")); } */ + DBUG_PRINT("info",("spider auto_increment_mode=%d", + auto_increment_mode)); + DBUG_PRINT("info",("spider next_number_field=%lld", + table->next_number_field->val_int())); if ( auto_increment_mode == 1 && !( @@ -9256,6 +9270,8 @@ int ha_spider::update_auto_increment() lock_here = TRUE; pthread_mutex_lock(&share->lgtm_tblhnd_share->auto_increment_mutex); next_insert_id = share->lgtm_tblhnd_share->auto_increment_value; + DBUG_PRINT("info",("spider auto_increment_value=%llu", + share->lgtm_tblhnd_share->auto_increment_value)); } if ((error_num = handler::update_auto_increment())) { @@ -10843,6 +10859,9 @@ int ha_spider::rename_table( pthread_mutex_unlock(&spider_lgtm_tblhnd_share_mutex); goto error; } + DBUG_PRINT("info", + ("spider auto_increment_init=%s", + from_lgtm_tblhnd_share->auto_increment_init ? "TRUE" : "FALSE")); to_lgtm_tblhnd_share->auto_increment_init = from_lgtm_tblhnd_share->auto_increment_init; to_lgtm_tblhnd_share->auto_increment_lclval = diff --git a/storage/spider/mysql-test/spider/bg/include/ha_deinit_child3_1.inc b/storage/spider/mysql-test/spider/bg/include/ha_deinit_child3_1.inc index 8fd2ff8a777..c19e376d10a 100644 --- a/storage/spider/mysql-test/spider/bg/include/ha_deinit_child3_1.inc +++ b/storage/spider/mysql-test/spider/bg/include/ha_deinit_child3_1.inc @@ -1 +1 @@ ---source ../../include/deinit_spider.inc
+--source ../../include/deinit_spider.inc diff --git a/storage/spider/mysql-test/spider/bg/include/ha_deinit_child3_2.inc b/storage/spider/mysql-test/spider/bg/include/ha_deinit_child3_2.inc index 8fd2ff8a777..c19e376d10a 100644 --- a/storage/spider/mysql-test/spider/bg/include/ha_deinit_child3_2.inc +++ b/storage/spider/mysql-test/spider/bg/include/ha_deinit_child3_2.inc @@ -1 +1 @@ ---source ../../include/deinit_spider.inc
+--source ../../include/deinit_spider.inc diff --git a/storage/spider/mysql-test/spider/bg/include/ha_deinit_child3_3.inc b/storage/spider/mysql-test/spider/bg/include/ha_deinit_child3_3.inc index 8fd2ff8a777..c19e376d10a 100644 --- a/storage/spider/mysql-test/spider/bg/include/ha_deinit_child3_3.inc +++ b/storage/spider/mysql-test/spider/bg/include/ha_deinit_child3_3.inc @@ -1 +1 @@ ---source ../../include/deinit_spider.inc
+--source ../../include/deinit_spider.inc diff --git a/storage/spider/mysql-test/spider/bg/include/ha_init_child2_1.inc b/storage/spider/mysql-test/spider/bg/include/ha_init_child2_1.inc index 59c0175d349..2684829408d 100644 --- a/storage/spider/mysql-test/spider/bg/include/ha_init_child2_1.inc +++ b/storage/spider/mysql-test/spider/bg/include/ha_init_child2_1.inc @@ -1,8 +1,8 @@ -let $CHILD2_1_HA_AS_DROP_TABLES=
- $CHILD2_1_DROP_TABLES;
-let $CHILD2_1_HA_AS_CREATE_TABLES=
- $CHILD2_1_CREATE_TABLES;
-let $CHILD2_1_HA_AS_DROP_TABLES2=
- $CHILD2_1_DROP_TABLES2;
-let $CHILD2_1_HA_AS_CREATE_TABLES2=
- $CHILD2_1_CREATE_TABLES2;
+let $CHILD2_1_HA_AS_DROP_TABLES= + $CHILD2_1_DROP_TABLES; +let $CHILD2_1_HA_AS_CREATE_TABLES= + $CHILD2_1_CREATE_TABLES; +let $CHILD2_1_HA_AS_DROP_TABLES2= + $CHILD2_1_DROP_TABLES2; +let $CHILD2_1_HA_AS_CREATE_TABLES2= + $CHILD2_1_CREATE_TABLES2; diff --git a/storage/spider/mysql-test/spider/bg/include/ha_init_child2_2.inc b/storage/spider/mysql-test/spider/bg/include/ha_init_child2_2.inc index 90d27ed704d..205eaa6fe35 100644 --- a/storage/spider/mysql-test/spider/bg/include/ha_init_child2_2.inc +++ b/storage/spider/mysql-test/spider/bg/include/ha_init_child2_2.inc @@ -1,4 +1,4 @@ -let $CHILD2_2_HA_DROP_TABLES=
- $CHILD2_2_DROP_TABLES;
-let $CHILD2_2_HA_CREATE_TABLES=
- $CHILD2_2_CREATE_TABLES;
+let $CHILD2_2_HA_DROP_TABLES= + $CHILD2_2_DROP_TABLES; +let $CHILD2_2_HA_CREATE_TABLES= + $CHILD2_2_CREATE_TABLES; diff --git a/storage/spider/mysql-test/spider/bg/include/ha_init_child2_3.inc b/storage/spider/mysql-test/spider/bg/include/ha_init_child2_3.inc index 11abf112b1f..55cb858372c 100644 --- a/storage/spider/mysql-test/spider/bg/include/ha_init_child2_3.inc +++ b/storage/spider/mysql-test/spider/bg/include/ha_init_child2_3.inc @@ -1,4 +1,4 @@ -let $CHILD2_3_HA_DROP_TABLES=
- $CHILD2_3_DROP_TABLES;
-let $CHILD2_3_HA_CREATE_TABLES=
- $CHILD2_3_CREATE_TABLES;
+let $CHILD2_3_HA_DROP_TABLES= + $CHILD2_3_DROP_TABLES; +let $CHILD2_3_HA_CREATE_TABLES= + $CHILD2_3_CREATE_TABLES; diff --git a/storage/spider/mysql-test/spider/bg/include/ha_init_child3_1.inc b/storage/spider/mysql-test/spider/bg/include/ha_init_child3_1.inc index 56de7df4e52..3ac4f97b1e0 100644 --- a/storage/spider/mysql-test/spider/bg/include/ha_init_child3_1.inc +++ b/storage/spider/mysql-test/spider/bg/include/ha_init_child3_1.inc @@ -1,140 +1,140 @@ ---let $CHILD3_1_ENGINE_TYPE=Spider
---let $CHILD3_1_ENGINE=ENGINE=Spider
---source ../../include/init_spider.inc
-eval INSERT INTO mysql.spider_link_mon_servers
-(db_name, table_name, link_id, sid, server, scheme, host, port, socket,
- username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key,
- ssl_verify_server_cert, default_file, default_group) VALUES
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL);
-let $CHILD3_1_CHECK_LINK_STATUS=
- SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
- ORDER BY db_name, table_name, link_id;
-let $CHILD3_1_CHECK_LINK_FAILED_LOG=
- SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log;
-let $CHILD3_1_SET_RECOVERY_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 2"';
-let $CHILD3_1_SET_OK_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 1"';
-let $CHILD3_1_SET_OK_STATUS_AS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2", lst "1 0"';
-
-let $CHILD3_1_DROP_TABLES_HA_2_1=
- DROP TABLE IF EXISTS ta_l;
-if ($VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_1_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_1_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-if (!$VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_1_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_1_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-let $CHILD3_1_DROP_TABLES_HA_P_2_1=
- DROP TABLE IF EXISTS ta_l2;
-let $CHILD3_1_CREATE_TABLES_HA_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_1_CREATE_TABLES_HA_AS_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_1_SET_RECOVERY_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 2"'
- );
-let $CHILD3_1_SET_OK_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 1"'
- );
-let $CHILD3_1_SET_OK_STATUS_AS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "1 0"'
- );
+--let $CHILD3_1_ENGINE_TYPE=Spider +--let $CHILD3_1_ENGINE=ENGINE=Spider +--source ../../include/init_spider.inc +eval INSERT INTO mysql.spider_link_mon_servers +(db_name, table_name, link_id, sid, server, scheme, host, port, socket, + username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key, + ssl_verify_server_cert, default_file, default_group) VALUES +('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +let $CHILD3_1_CHECK_LINK_STATUS= + SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables + ORDER BY db_name, table_name, link_id; +let $CHILD3_1_CHECK_LINK_FAILED_LOG= + SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log; +let $CHILD3_1_SET_RECOVERY_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 2"'; +let $CHILD3_1_SET_OK_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 1"'; +let $CHILD3_1_SET_OK_STATUS_AS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2", lst "1 0"'; + +let $CHILD3_1_DROP_TABLES_HA_2_1= + DROP TABLE IF EXISTS ta_l; +if ($VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_1_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_1_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +if (!$VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_1_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_1_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +let $CHILD3_1_DROP_TABLES_HA_P_2_1= + DROP TABLE IF EXISTS ta_l2; +let $CHILD3_1_CREATE_TABLES_HA_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_1_CREATE_TABLES_HA_AS_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_1_SET_RECOVERY_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 2"' + ); +let $CHILD3_1_SET_OK_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 1"' + ); +let $CHILD3_1_SET_OK_STATUS_AS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "1 0"' + ); diff --git a/storage/spider/mysql-test/spider/bg/include/ha_init_child3_2.inc b/storage/spider/mysql-test/spider/bg/include/ha_init_child3_2.inc index fdb3a84cca7..cf47099f439 100644 --- a/storage/spider/mysql-test/spider/bg/include/ha_init_child3_2.inc +++ b/storage/spider/mysql-test/spider/bg/include/ha_init_child3_2.inc @@ -1,140 +1,140 @@ ---let $CHILD3_2_ENGINE_TYPE=Spider
---let $CHILD3_2_ENGINE=ENGINE=Spider
---source ../../include/init_spider.inc
-eval INSERT INTO mysql.spider_link_mon_servers
-(db_name, table_name, link_id, sid, server, scheme, host, port, socket,
- username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key,
- ssl_verify_server_cert, default_file, default_group) VALUES
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL);
-let $CHILD3_2_CHECK_LINK_STATUS=
- SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
- ORDER BY db_name, table_name, link_id;
-let $CHILD3_2_CHECK_LINK_FAILED_LOG=
- SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log;
-let $CHILD3_2_SET_RECOVERY_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 2"';
-let $CHILD3_2_SET_OK_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 1"';
-let $CHILD3_2_SET_OK_STATUS_AS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2", lst "1 0"';
-
-let $CHILD3_2_DROP_TABLES_HA_2_1=
- DROP TABLE IF EXISTS ta_l;
-if ($VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_2_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_2_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-if (!$VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_2_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_2_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-let $CHILD3_2_DROP_TABLES_HA_P_2_1=
- DROP TABLE IF EXISTS ta_l2;
-let $CHILD3_2_CREATE_TABLES_HA_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_2_CREATE_TABLES_HA_AS_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_2_SET_RECOVERY_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 2"'
- );
-let $CHILD3_2_SET_OK_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 1"'
- );
-let $CHILD3_2_SET_OK_STATUS_AS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "1 0"'
- );
+--let $CHILD3_2_ENGINE_TYPE=Spider +--let $CHILD3_2_ENGINE=ENGINE=Spider +--source ../../include/init_spider.inc +eval INSERT INTO mysql.spider_link_mon_servers +(db_name, table_name, link_id, sid, server, scheme, host, port, socket, + username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key, + ssl_verify_server_cert, default_file, default_group) VALUES +('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +let $CHILD3_2_CHECK_LINK_STATUS= + SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables + ORDER BY db_name, table_name, link_id; +let $CHILD3_2_CHECK_LINK_FAILED_LOG= + SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log; +let $CHILD3_2_SET_RECOVERY_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 2"'; +let $CHILD3_2_SET_OK_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 1"'; +let $CHILD3_2_SET_OK_STATUS_AS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2", lst "1 0"'; + +let $CHILD3_2_DROP_TABLES_HA_2_1= + DROP TABLE IF EXISTS ta_l; +if ($VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_2_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_2_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +if (!$VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_2_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_2_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +let $CHILD3_2_DROP_TABLES_HA_P_2_1= + DROP TABLE IF EXISTS ta_l2; +let $CHILD3_2_CREATE_TABLES_HA_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_2_CREATE_TABLES_HA_AS_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_2_SET_RECOVERY_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 2"' + ); +let $CHILD3_2_SET_OK_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 1"' + ); +let $CHILD3_2_SET_OK_STATUS_AS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "1 0"' + ); diff --git a/storage/spider/mysql-test/spider/bg/include/ha_init_child3_3.inc b/storage/spider/mysql-test/spider/bg/include/ha_init_child3_3.inc index d08ff4d0d34..094d26b62c6 100644 --- a/storage/spider/mysql-test/spider/bg/include/ha_init_child3_3.inc +++ b/storage/spider/mysql-test/spider/bg/include/ha_init_child3_3.inc @@ -1,140 +1,140 @@ ---let $CHILD3_3_ENGINE_TYPE=Spider
---let $CHILD3_3_ENGINE=ENGINE=Spider
---source ../../include/init_spider.inc
-eval INSERT INTO mysql.spider_link_mon_servers
-(db_name, table_name, link_id, sid, server, scheme, host, port, socket,
- username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key,
- ssl_verify_server_cert, default_file, default_group) VALUES
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL);
-let $CHILD3_3_CHECK_LINK_STATUS=
- SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
- ORDER BY db_name, table_name, link_id;
-let $CHILD3_3_CHECK_LINK_FAILED_LOG=
- SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log;
-let $CHILD3_3_SET_RECOVERY_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 2"';
-let $CHILD3_3_SET_OK_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 1"';
-let $CHILD3_3_SET_OK_STATUS_AS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2", lst "1 0"';
-
-let $CHILD3_3_DROP_TABLES_HA_2_1=
- DROP TABLE IF EXISTS ta_l;
-if ($VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_3_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_3_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-if (!$VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_3_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_3_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-let $CHILD3_3_DROP_TABLES_HA_P_2_1=
- DROP TABLE IF EXISTS ta_l2;
-let $CHILD3_3_CREATE_TABLES_HA_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_3_CREATE_TABLES_HA_AS_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_3_SET_RECOVERY_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 2"'
- );
-let $CHILD3_3_SET_OK_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 1"'
- );
-let $CHILD3_3_SET_OK_STATUS_AS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "1 0"'
- );
+--let $CHILD3_3_ENGINE_TYPE=Spider +--let $CHILD3_3_ENGINE=ENGINE=Spider +--source ../../include/init_spider.inc +eval INSERT INTO mysql.spider_link_mon_servers +(db_name, table_name, link_id, sid, server, scheme, host, port, socket, + username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key, + ssl_verify_server_cert, default_file, default_group) VALUES +('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +let $CHILD3_3_CHECK_LINK_STATUS= + SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables + ORDER BY db_name, table_name, link_id; +let $CHILD3_3_CHECK_LINK_FAILED_LOG= + SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log; +let $CHILD3_3_SET_RECOVERY_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 2"'; +let $CHILD3_3_SET_OK_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 1"'; +let $CHILD3_3_SET_OK_STATUS_AS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2", lst "1 0"'; + +let $CHILD3_3_DROP_TABLES_HA_2_1= + DROP TABLE IF EXISTS ta_l; +if ($VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_3_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_3_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +if (!$VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_3_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_3_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +let $CHILD3_3_DROP_TABLES_HA_P_2_1= + DROP TABLE IF EXISTS ta_l2; +let $CHILD3_3_CREATE_TABLES_HA_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_3_CREATE_TABLES_HA_AS_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_3_SET_RECOVERY_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 2"' + ); +let $CHILD3_3_SET_OK_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 1"' + ); +let $CHILD3_3_SET_OK_STATUS_AS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "1 0"' + ); diff --git a/storage/spider/mysql-test/spider/bg/include/hs_init_child2_1.inc b/storage/spider/mysql-test/spider/bg/include/hs_init_child2_1.inc index 2ea1c0c9cd6..ee006858b06 100644 --- a/storage/spider/mysql-test/spider/bg/include/hs_init_child2_1.inc +++ b/storage/spider/mysql-test/spider/bg/include/hs_init_child2_1.inc @@ -1,24 +1,24 @@ -let $CHILD2_1_HS_DROP_TABLES=
- DROP TABLE IF EXISTS hs_r;
-let $CHILD2_1_HS_CREATE_TABLES=
- CREATE TABLE hs_r (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- d INT DEFAULT 11,
- PRIMARY KEY(a)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_HS_SELECT_TABLES=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s'), d FROM hs_r ORDER BY a;
-let $CHILD2_1_HS_DROP_TABLES2=
- DROP TABLE IF EXISTS hs_r2;
-let $CHILD2_1_HS_CREATE_TABLES2=
- CREATE TABLE hs_r2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- d INT DEFAULT 11,
- PRIMARY KEY(a)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_HS_SELECT_TABLES2=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s'), d FROM hs_r2 ORDER BY a;
+let $CHILD2_1_HS_DROP_TABLES= + DROP TABLE IF EXISTS hs_r; +let $CHILD2_1_HS_CREATE_TABLES= + CREATE TABLE hs_r ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + d INT DEFAULT 11, + PRIMARY KEY(a) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_HS_SELECT_TABLES= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s'), d FROM hs_r ORDER BY a; +let $CHILD2_1_HS_DROP_TABLES2= + DROP TABLE IF EXISTS hs_r2; +let $CHILD2_1_HS_CREATE_TABLES2= + CREATE TABLE hs_r2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + d INT DEFAULT 11, + PRIMARY KEY(a) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_HS_SELECT_TABLES2= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s'), d FROM hs_r2 ORDER BY a; diff --git a/storage/spider/mysql-test/spider/bg/include/hs_init_child2_2.inc b/storage/spider/mysql-test/spider/bg/include/hs_init_child2_2.inc index 7c69d73ced6..1c5a02d50c8 100644 --- a/storage/spider/mysql-test/spider/bg/include/hs_init_child2_2.inc +++ b/storage/spider/mysql-test/spider/bg/include/hs_init_child2_2.inc @@ -1,12 +1,12 @@ -let $CHILD2_2_HS_DROP_TABLES=
- DROP TABLE IF EXISTS hs_r3;
-let $CHILD2_2_HS_CREATE_TABLES=
- CREATE TABLE hs_r3 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- d INT DEFAULT 11,
- PRIMARY KEY(a)
- ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET;
-let $CHILD2_2_HS_SELECT_TABLES=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s'), d FROM hs_r3 ORDER BY a;
+let $CHILD2_2_HS_DROP_TABLES= + DROP TABLE IF EXISTS hs_r3; +let $CHILD2_2_HS_CREATE_TABLES= + CREATE TABLE hs_r3 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + d INT DEFAULT 11, + PRIMARY KEY(a) + ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET; +let $CHILD2_2_HS_SELECT_TABLES= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s'), d FROM hs_r3 ORDER BY a; diff --git a/storage/spider/mysql-test/spider/bg/include/init_child2_1.inc b/storage/spider/mysql-test/spider/bg/include/init_child2_1.inc index 6e25765f25e..611ce6012a8 100644 --- a/storage/spider/mysql-test/spider/bg/include/init_child2_1.inc +++ b/storage/spider/mysql-test/spider/bg/include/init_child2_1.inc @@ -1,175 +1,175 @@ -let $CHILD2_1_DROP_TABLES=
- DROP TABLE IF EXISTS ta_r;
-let $CHILD2_1_CREATE_TABLES=
- CREATE TABLE ta_r (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a),
- KEY idx1(b)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_SELECT_TABLES=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r ORDER BY a;
-let $CHILD2_1_DROP_TABLES2=
- DROP TABLE IF EXISTS ta_r2;
-let $CHILD2_1_CREATE_TABLES2=
- CREATE TABLE ta_r2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_SELECT_TABLES2=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r2 ORDER BY a;
-let $CHILD2_1_DROP_TABLES3=
- DROP TABLE IF EXISTS ta_r_no_idx;
-let $CHILD2_1_CREATE_TABLES3=
- CREATE TABLE ta_r_no_idx (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10'
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_SELECT_TABLES3=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r_no_idx ORDER BY a;
-let $CHILD2_1_DROP_TABLES4=
- DROP TABLE IF EXISTS ta_r_auto_inc;
-let $CHILD2_1_CREATE_TABLES4=
- CREATE TABLE ta_r_auto_inc (
- a INT AUTO_INCREMENT,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_SELECT_TABLES4=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r_auto_inc
- ORDER BY a;
-let $CHILD2_1_DROP_TABLES5=
- DROP TABLE IF EXISTS ta_r_int;
-let $CHILD2_1_CREATE_TABLES5=
- CREATE TABLE ta_r_int (
- a INT AUTO_INCREMENT,
- b INT DEFAULT 10,
- c INT DEFAULT 11,
- PRIMARY KEY(a),
- KEY idx1(b),
- KEY idx2(c)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_SELECT_TABLES5=
- SELECT a, b, c FROM ta_r_int ORDER BY a;
-let $CHILD2_1_DROP_TABLES6=
- DROP TABLE IF EXISTS ta_r_3;
-let $CHILD2_1_CREATE_TABLES6=
- CREATE TABLE ta_r_3 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10'
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_SELECT_TABLES6=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r_3 ORDER BY a;
-let $CHILD2_1_DROP_FT_TABLES=
- DROP TABLE IF EXISTS ft_r;
-let $CHILD2_1_CREATE_FT_TABLES=
- CREATE TABLE ft_r (
- a INT DEFAULT 0,
- b TEXT,
- c TEXT,
- d TEXT,
- PRIMARY KEY(a),
- FULLTEXT INDEX ft_idx1(b),
- FULLTEXT INDEX ft_idx2(c)
- ) $CHILD2_1_FT_ENGINE $CHILD2_1_FT_CHARSET;
-let $CHILD2_1_SELECT_FT_TABLES=
- SELECT a, b, c, d FROM ft_r ORDER BY a;
-let $CHILD2_1_DROP_FT_TABLES2=
- DROP TABLE IF EXISTS ft_r2;
-let $CHILD2_1_CREATE_FT_TABLES2=
- CREATE TABLE ft_r2 (
- a INT DEFAULT 0,
- b TEXT,
- c TEXT,
- d TEXT,
- PRIMARY KEY(a),
- FULLTEXT INDEX ft_idx1(b),
- FULLTEXT INDEX ft_idx2(c)
- ) $CHILD2_1_FT_ENGINE $CHILD2_1_FT_CHARSET;
-let $CHILD2_1_SELECT_FT_TABLES2=
- SELECT a, b, c, d FROM ft_r2 ORDER BY a;
-let $CHILD2_1_DROP_GM_TABLES=
- DROP TABLE IF EXISTS gm_r;
-let $CHILD2_1_CREATE_GM_TABLES=
- CREATE TABLE gm_r (
- a INT DEFAULT 0,
- b GEOMETRY NOT NULL,
- c GEOMETRY NOT NULL,
- PRIMARY KEY(a),
- SPATIAL INDEX sp_idx1(b),
- SPATIAL INDEX sp_idx2(c)
- ) $CHILD2_1_GM_ENGINE $CHILD2_1_GM_CHARSET;
-let $CHILD2_1_SELECT_GM_TABLES=
- SELECT a, b, c FROM gm_r ORDER BY a;
-let $CHILD2_1_DROP_GM_TABLES2=
- DROP TABLE IF EXISTS gm_r2;
-let $CHILD2_1_CREATE_GM_TABLES2=
- CREATE TABLE gm_r2 (
- a INT DEFAULT 0,
- b GEOMETRY NOT NULL,
- c GEOMETRY NOT NULL,
- PRIMARY KEY(a),
- SPATIAL INDEX sp_idx1(b),
- SPATIAL INDEX sp_idx2(c)
- ) $CHILD2_1_GM_ENGINE $CHILD2_1_GM_CHARSET;
-let $CHILD2_1_SELECT_GM_TABLES2=
- SELECT a, b, c FROM gm_r2 ORDER BY a;
-let $CHILD2_1_DROP_LOCK_TABLES1=
- DROP TABLE IF EXISTS t1_1;
-let $CHILD2_1_CREATE_LOCK_TABLES1=
- CREATE TABLE t1_1 (
- id int(11) NOT NULL,
- PRIMARY KEY (id)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_DROP_LOCK_TABLES2=
- DROP TABLE IF EXISTS t2_2;
-let $CHILD2_1_CREATE_LOCK_TABLES2=
- CREATE TABLE t2_2 (
- id int(11) NOT NULL,
- PRIMARY KEY (id)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_DROP_INCREMENT_TABLES1=
- DROP TABLE IF EXISTS t1_1;
-let $CHILD2_1_CREATE_INCREMENT_TABLES1=
- CREATE TABLE t1_1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_SELECT_INCREMENT_TABLES1=
- SELECT id FROM t1_1 ORDER BY id;
-let $CHILD2_1_DROP_TEXT_PK_TABLES1=
- DROP TABLE IF EXISTS t1;
-let $CHILD2_1_CREATE_TEXT_PK_TABLES1=
- CREATE TABLE t1 (
- a VARCHAR(255),
- PRIMARY KEY (a)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET2;
-let $CHILD2_1_SELECT_TEXT_PK_TABLES1=
- SELECT a FROM t1 ORDER BY a;
-let $CHILD2_1_DROP_TEXT_KEY_TABLES1=
- DROP TABLE IF EXISTS t1;
-let $CHILD2_1_CREATE_TEXT_KEY_TABLES1=
- CREATE TABLE t1 (
- a VARCHAR(255),
- b VARCHAR(255),
- c VARCHAR(255),
- KEY idx1(a,b),
- KEY idx2(b),
- PRIMARY KEY(c)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_SELECT_TEXT_KEY_TABLES1=
- SELECT a, b FROM t1 ORDER BY a, b;
-let $CHILD2_1_AUTO_INCREMENT_INCREMENT1=
- SET GLOBAL AUTO_INCREMENT_INCREMENT = 1;
-let $CHILD2_1_AUTO_INCREMENT_INCREMENT2=
- SET GLOBAL AUTO_INCREMENT_INCREMENT = 4;
-let $CHILD2_1_AUTO_INCREMENT_OFFSET1=
- SET GLOBAL AUTO_INCREMENT_OFFSET = 1;
-let $CHILD2_1_AUTO_INCREMENT_OFFSET2=
- SET GLOBAL AUTO_INCREMENT_OFFSET = 2;
+let $CHILD2_1_DROP_TABLES= + DROP TABLE IF EXISTS ta_r; +let $CHILD2_1_CREATE_TABLES= + CREATE TABLE ta_r ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a), + KEY idx1(b) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_SELECT_TABLES= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r ORDER BY a; +let $CHILD2_1_DROP_TABLES2= + DROP TABLE IF EXISTS ta_r2; +let $CHILD2_1_CREATE_TABLES2= + CREATE TABLE ta_r2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_SELECT_TABLES2= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r2 ORDER BY a; +let $CHILD2_1_DROP_TABLES3= + DROP TABLE IF EXISTS ta_r_no_idx; +let $CHILD2_1_CREATE_TABLES3= + CREATE TABLE ta_r_no_idx ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10' + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_SELECT_TABLES3= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r_no_idx ORDER BY a; +let $CHILD2_1_DROP_TABLES4= + DROP TABLE IF EXISTS ta_r_auto_inc; +let $CHILD2_1_CREATE_TABLES4= + CREATE TABLE ta_r_auto_inc ( + a INT AUTO_INCREMENT, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_SELECT_TABLES4= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r_auto_inc + ORDER BY a; +let $CHILD2_1_DROP_TABLES5= + DROP TABLE IF EXISTS ta_r_int; +let $CHILD2_1_CREATE_TABLES5= + CREATE TABLE ta_r_int ( + a INT AUTO_INCREMENT, + b INT DEFAULT 10, + c INT DEFAULT 11, + PRIMARY KEY(a), + KEY idx1(b), + KEY idx2(c) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_SELECT_TABLES5= + SELECT a, b, c FROM ta_r_int ORDER BY a; +let $CHILD2_1_DROP_TABLES6= + DROP TABLE IF EXISTS ta_r_3; +let $CHILD2_1_CREATE_TABLES6= + CREATE TABLE ta_r_3 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10' + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_SELECT_TABLES6= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r_3 ORDER BY a; +let $CHILD2_1_DROP_FT_TABLES= + DROP TABLE IF EXISTS ft_r; +let $CHILD2_1_CREATE_FT_TABLES= + CREATE TABLE ft_r ( + a INT DEFAULT 0, + b TEXT, + c TEXT, + d TEXT, + PRIMARY KEY(a), + FULLTEXT INDEX ft_idx1(b), + FULLTEXT INDEX ft_idx2(c) + ) $CHILD2_1_FT_ENGINE $CHILD2_1_FT_CHARSET; +let $CHILD2_1_SELECT_FT_TABLES= + SELECT a, b, c, d FROM ft_r ORDER BY a; +let $CHILD2_1_DROP_FT_TABLES2= + DROP TABLE IF EXISTS ft_r2; +let $CHILD2_1_CREATE_FT_TABLES2= + CREATE TABLE ft_r2 ( + a INT DEFAULT 0, + b TEXT, + c TEXT, + d TEXT, + PRIMARY KEY(a), + FULLTEXT INDEX ft_idx1(b), + FULLTEXT INDEX ft_idx2(c) + ) $CHILD2_1_FT_ENGINE $CHILD2_1_FT_CHARSET; +let $CHILD2_1_SELECT_FT_TABLES2= + SELECT a, b, c, d FROM ft_r2 ORDER BY a; +let $CHILD2_1_DROP_GM_TABLES= + DROP TABLE IF EXISTS gm_r; +let $CHILD2_1_CREATE_GM_TABLES= + CREATE TABLE gm_r ( + a INT DEFAULT 0, + b GEOMETRY NOT NULL, + c GEOMETRY NOT NULL, + PRIMARY KEY(a), + SPATIAL INDEX sp_idx1(b), + SPATIAL INDEX sp_idx2(c) + ) $CHILD2_1_GM_ENGINE $CHILD2_1_GM_CHARSET; +let $CHILD2_1_SELECT_GM_TABLES= + SELECT a, b, c FROM gm_r ORDER BY a; +let $CHILD2_1_DROP_GM_TABLES2= + DROP TABLE IF EXISTS gm_r2; +let $CHILD2_1_CREATE_GM_TABLES2= + CREATE TABLE gm_r2 ( + a INT DEFAULT 0, + b GEOMETRY NOT NULL, + c GEOMETRY NOT NULL, + PRIMARY KEY(a), + SPATIAL INDEX sp_idx1(b), + SPATIAL INDEX sp_idx2(c) + ) $CHILD2_1_GM_ENGINE $CHILD2_1_GM_CHARSET; +let $CHILD2_1_SELECT_GM_TABLES2= + SELECT a, b, c FROM gm_r2 ORDER BY a; +let $CHILD2_1_DROP_LOCK_TABLES1= + DROP TABLE IF EXISTS t1_1; +let $CHILD2_1_CREATE_LOCK_TABLES1= + CREATE TABLE t1_1 ( + id int(11) NOT NULL, + PRIMARY KEY (id) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_DROP_LOCK_TABLES2= + DROP TABLE IF EXISTS t2_2; +let $CHILD2_1_CREATE_LOCK_TABLES2= + CREATE TABLE t2_2 ( + id int(11) NOT NULL, + PRIMARY KEY (id) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_DROP_INCREMENT_TABLES1= + DROP TABLE IF EXISTS t1_1; +let $CHILD2_1_CREATE_INCREMENT_TABLES1= + CREATE TABLE t1_1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_SELECT_INCREMENT_TABLES1= + SELECT id FROM t1_1 ORDER BY id; +let $CHILD2_1_DROP_TEXT_PK_TABLES1= + DROP TABLE IF EXISTS t1; +let $CHILD2_1_CREATE_TEXT_PK_TABLES1= + CREATE TABLE t1 ( + a VARCHAR(255), + PRIMARY KEY (a) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET2; +let $CHILD2_1_SELECT_TEXT_PK_TABLES1= + SELECT a FROM t1 ORDER BY a; +let $CHILD2_1_DROP_TEXT_KEY_TABLES1= + DROP TABLE IF EXISTS t1; +let $CHILD2_1_CREATE_TEXT_KEY_TABLES1= + CREATE TABLE t1 ( + a VARCHAR(255), + b VARCHAR(255), + c VARCHAR(255), + KEY idx1(a,b), + KEY idx2(b), + PRIMARY KEY(c) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_SELECT_TEXT_KEY_TABLES1= + SELECT a, b FROM t1 ORDER BY a, b; +let $CHILD2_1_AUTO_INCREMENT_INCREMENT1= + SET GLOBAL AUTO_INCREMENT_INCREMENT = 1; +let $CHILD2_1_AUTO_INCREMENT_INCREMENT2= + SET GLOBAL AUTO_INCREMENT_INCREMENT = 4; +let $CHILD2_1_AUTO_INCREMENT_OFFSET1= + SET GLOBAL AUTO_INCREMENT_OFFSET = 1; +let $CHILD2_1_AUTO_INCREMENT_OFFSET2= + SET GLOBAL AUTO_INCREMENT_OFFSET = 2; diff --git a/storage/spider/mysql-test/spider/bg/include/init_child2_2.inc b/storage/spider/mysql-test/spider/bg/include/init_child2_2.inc index 3524fc4a2b7..9f0b5e2fe5a 100644 --- a/storage/spider/mysql-test/spider/bg/include/init_child2_2.inc +++ b/storage/spider/mysql-test/spider/bg/include/init_child2_2.inc @@ -1,80 +1,80 @@ -let $CHILD2_2_DROP_TABLES=
- DROP TABLE IF EXISTS ta_r3;
-let $CHILD2_2_CREATE_TABLES=
- CREATE TABLE ta_r3 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET;
-let $CHILD2_2_DROP_TABLES5=
- DROP TABLE IF EXISTS ta_r_int;
-let $CHILD2_2_CREATE_TABLES5=
- CREATE TABLE ta_r_int (
- a INT AUTO_INCREMENT,
- b INT DEFAULT 10,
- c INT DEFAULT 11,
- PRIMARY KEY(a),
- KEY idx1(b),
- KEY idx2(c)
- ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET;
-let $CHILD2_2_SELECT_TABLES=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r3 ORDER BY a;
-let $CHILD2_2_DROP_FT_TABLES=
- DROP TABLE IF EXISTS ft_r3;
-let $CHILD2_2_CREATE_FT_TABLES=
- CREATE TABLE ft_r3 (
- a INT DEFAULT 0,
- b TEXT,
- c TEXT,
- d TEXT,
- PRIMARY KEY(a),
- FULLTEXT INDEX ft_idx1(b),
- FULLTEXT INDEX ft_idx2(c)
- ) $CHILD2_2_FT_ENGINE $CHILD2_2_FT_CHARSET;
-let $CHILD2_2_SELECT_FT_TABLES=
- SELECT a, b, c, d FROM ft_r3 ORDER BY a;
-let $CHILD2_2_DROP_GM_TABLES=
- DROP TABLE IF EXISTS gm_r3;
-let $CHILD2_2_CREATE_GM_TABLES=
- CREATE TABLE gm_r3 (
- a INT DEFAULT 0,
- b GEOMETRY NOT NULL,
- c GEOMETRY NOT NULL,
- PRIMARY KEY(a),
- SPATIAL INDEX sp_idx1(b),
- SPATIAL INDEX sp_idx2(c)
- ) $CHILD2_2_GM_ENGINE $CHILD2_2_GM_CHARSET;
-let $CHILD2_2_SELECT_GM_TABLES=
- SELECT a, b, c FROM gm_r3 ORDER BY a;
-let $CHILD2_2_DROP_LOCK_TABLES1=
- DROP TABLE IF EXISTS t1_2;
-let $CHILD2_2_CREATE_LOCK_TABLES1=
- CREATE TABLE t1_2 (
- id int(11) NOT NULL,
- PRIMARY KEY (id)
- ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET;
-let $CHILD2_2_DROP_LOCK_TABLES2=
- DROP TABLE IF EXISTS t2_1;
-let $CHILD2_2_CREATE_LOCK_TABLES2=
- CREATE TABLE t2_1 (
- id int(11) NOT NULL,
- PRIMARY KEY (id)
- ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET;
-let $CHILD2_2_DROP_INCREMENT_TABLES1=
- DROP TABLE IF EXISTS t1_2;
-let $CHILD2_2_CREATE_INCREMENT_TABLES1=
- CREATE TABLE t1_2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET;
-let $CHILD2_2_SELECT_INCREMENT_TABLES1=
- SELECT id FROM t1_2 ORDER BY id;
-let $CHILD2_2_AUTO_INCREMENT_INCREMENT1=
- SET GLOBAL AUTO_INCREMENT_INCREMENT = 1;
-let $CHILD2_2_AUTO_INCREMENT_INCREMENT2=
- SET GLOBAL AUTO_INCREMENT_INCREMENT = 4;
-let $CHILD2_2_AUTO_INCREMENT_OFFSET1=
- SET GLOBAL AUTO_INCREMENT_OFFSET = 1;
-let $CHILD2_2_AUTO_INCREMENT_OFFSET2=
- SET GLOBAL AUTO_INCREMENT_OFFSET = 3;
+let $CHILD2_2_DROP_TABLES= + DROP TABLE IF EXISTS ta_r3; +let $CHILD2_2_CREATE_TABLES= + CREATE TABLE ta_r3 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET; +let $CHILD2_2_DROP_TABLES5= + DROP TABLE IF EXISTS ta_r_int; +let $CHILD2_2_CREATE_TABLES5= + CREATE TABLE ta_r_int ( + a INT AUTO_INCREMENT, + b INT DEFAULT 10, + c INT DEFAULT 11, + PRIMARY KEY(a), + KEY idx1(b), + KEY idx2(c) + ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET; +let $CHILD2_2_SELECT_TABLES= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r3 ORDER BY a; +let $CHILD2_2_DROP_FT_TABLES= + DROP TABLE IF EXISTS ft_r3; +let $CHILD2_2_CREATE_FT_TABLES= + CREATE TABLE ft_r3 ( + a INT DEFAULT 0, + b TEXT, + c TEXT, + d TEXT, + PRIMARY KEY(a), + FULLTEXT INDEX ft_idx1(b), + FULLTEXT INDEX ft_idx2(c) + ) $CHILD2_2_FT_ENGINE $CHILD2_2_FT_CHARSET; +let $CHILD2_2_SELECT_FT_TABLES= + SELECT a, b, c, d FROM ft_r3 ORDER BY a; +let $CHILD2_2_DROP_GM_TABLES= + DROP TABLE IF EXISTS gm_r3; +let $CHILD2_2_CREATE_GM_TABLES= + CREATE TABLE gm_r3 ( + a INT DEFAULT 0, + b GEOMETRY NOT NULL, + c GEOMETRY NOT NULL, + PRIMARY KEY(a), + SPATIAL INDEX sp_idx1(b), + SPATIAL INDEX sp_idx2(c) + ) $CHILD2_2_GM_ENGINE $CHILD2_2_GM_CHARSET; +let $CHILD2_2_SELECT_GM_TABLES= + SELECT a, b, c FROM gm_r3 ORDER BY a; +let $CHILD2_2_DROP_LOCK_TABLES1= + DROP TABLE IF EXISTS t1_2; +let $CHILD2_2_CREATE_LOCK_TABLES1= + CREATE TABLE t1_2 ( + id int(11) NOT NULL, + PRIMARY KEY (id) + ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET; +let $CHILD2_2_DROP_LOCK_TABLES2= + DROP TABLE IF EXISTS t2_1; +let $CHILD2_2_CREATE_LOCK_TABLES2= + CREATE TABLE t2_1 ( + id int(11) NOT NULL, + PRIMARY KEY (id) + ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET; +let $CHILD2_2_DROP_INCREMENT_TABLES1= + DROP TABLE IF EXISTS t1_2; +let $CHILD2_2_CREATE_INCREMENT_TABLES1= + CREATE TABLE t1_2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET; +let $CHILD2_2_SELECT_INCREMENT_TABLES1= + SELECT id FROM t1_2 ORDER BY id; +let $CHILD2_2_AUTO_INCREMENT_INCREMENT1= + SET GLOBAL AUTO_INCREMENT_INCREMENT = 1; +let $CHILD2_2_AUTO_INCREMENT_INCREMENT2= + SET GLOBAL AUTO_INCREMENT_INCREMENT = 4; +let $CHILD2_2_AUTO_INCREMENT_OFFSET1= + SET GLOBAL AUTO_INCREMENT_OFFSET = 1; +let $CHILD2_2_AUTO_INCREMENT_OFFSET2= + SET GLOBAL AUTO_INCREMENT_OFFSET = 3; diff --git a/storage/spider/mysql-test/spider/bg/include/init_child2_3.inc b/storage/spider/mysql-test/spider/bg/include/init_child2_3.inc index d857a787ac0..05dbb1c3dd1 100644 --- a/storage/spider/mysql-test/spider/bg/include/init_child2_3.inc +++ b/storage/spider/mysql-test/spider/bg/include/init_child2_3.inc @@ -1,11 +1,11 @@ -let $CHILD2_3_DROP_TABLES=
- DROP TABLE IF EXISTS ta_r4;
-let $CHILD2_3_CREATE_TABLES=
- CREATE TABLE ta_r4 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD2_3_ENGINE $CHILD2_3_CHARSET;
-let $CHILD2_3_SELECT_TABLES=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r4 ORDER BY a;
+let $CHILD2_3_DROP_TABLES= + DROP TABLE IF EXISTS ta_r4; +let $CHILD2_3_CREATE_TABLES= + CREATE TABLE ta_r4 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD2_3_ENGINE $CHILD2_3_CHARSET; +let $CHILD2_3_SELECT_TABLES= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r4 ORDER BY a; diff --git a/storage/spider/mysql-test/spider/bg/include/init_slave1_1.inc b/storage/spider/mysql-test/spider/bg/include/init_slave1_1.inc index 87c05f1f690..73c3c6b9ef2 100644 --- a/storage/spider/mysql-test/spider/bg/include/init_slave1_1.inc +++ b/storage/spider/mysql-test/spider/bg/include/init_slave1_1.inc @@ -1,10 +1,10 @@ -let $SLAVE1_1_COMMENT_INCREMENT1_1=
- COMMENT '';
-let $SLAVE1_1_COMMENT_INCREMENT1_P_1=
- COMMENT ''
- PARTITION BY LIST(MOD(id, 2)) (
- PARTITION pt1 VALUES IN (0)
- COMMENT='',
- PARTITION pt2 VALUES IN (1)
- COMMENT=''
- );
+let $SLAVE1_1_COMMENT_INCREMENT1_1= + COMMENT ''; +let $SLAVE1_1_COMMENT_INCREMENT1_P_1= + COMMENT '' + PARTITION BY LIST(MOD(id, 2)) ( + PARTITION pt1 VALUES IN (0) + COMMENT='', + PARTITION pt2 VALUES IN (1) + COMMENT='' + ); diff --git a/storage/spider/mysql-test/spider/bg/t/direct_aggregate.test b/storage/spider/mysql-test/spider/bg/t/direct_aggregate.test index 5f17ac402e2..d65f4c5a624 100644 --- a/storage/spider/mysql-test/spider/bg/t/direct_aggregate.test +++ b/storage/spider/mysql-test/spider/bg/t/direct_aggregate.test @@ -1,179 +1,179 @@ ---disable_warnings
---disable_query_log
---disable_result_log
---source test_init.inc
---enable_result_log
---enable_query_log
-
---echo
---echo drop and create databases
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- CREATE DATABASE auto_test_remote;
- USE auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
- CREATE DATABASE auto_test_remote2;
- USE auto_test_remote2;
-}
---enable_warnings
-
---echo
---echo test select 1
---connection master_1
-SELECT 1;
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- SELECT 1;
- --connection child2_2
- SELECT 1;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo create table select test
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_DROP_TABLES;
- echo CHILD2_1_CREATE_TABLES;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_TABLES;
- --enable_warnings
- eval $CHILD2_1_CREATE_TABLES;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
---disable_warnings
-DROP TABLE IF EXISTS ta_l;
---enable_warnings
---disable_query_log
-echo CREATE TABLE ta_l (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
-eval CREATE TABLE ta_l (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
-) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
---enable_query_log
-INSERT INTO ta_l (a, b, c) VALUES
- (1, 'a', '2008-08-01 10:21:39'),
- (2, 'b', '2000-01-01 00:00:00'),
- (3, 'e', '2007-06-04 20:03:11'),
- (4, 'd', '2003-11-30 05:01:03'),
- (5, 'c', '2001-12-31 23:59:59');
-
---echo
---echo direct_aggregating test
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-SELECT COUNT(*) FROM ta_l;
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-SELECT MAX(a) FROM ta_l;
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-SELECT MIN(a) FROM ta_l;
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-SELECT MAX(a) FROM ta_l WHERE a < 5;
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-SELECT MIN(a) FROM ta_l WHERE a > 1;
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo deinit
---disable_warnings
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
-}
---disable_query_log
---disable_result_log
---source test_deinit.inc
---enable_result_log
---enable_query_log
---enable_warnings
---echo
---echo end of test
+--disable_warnings +--disable_query_log +--disable_result_log +--source test_init.inc +--enable_result_log +--enable_query_log + +--echo +--echo drop and create databases +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +CREATE DATABASE auto_test_local; +USE auto_test_local; +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + CREATE DATABASE auto_test_remote; + USE auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; + CREATE DATABASE auto_test_remote2; + USE auto_test_remote2; +} +--enable_warnings + +--echo +--echo test select 1 +--connection master_1 +SELECT 1; +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + SELECT 1; + --connection child2_2 + SELECT 1; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + +--echo +--echo create table select test +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_DROP_TABLES; + echo CHILD2_1_CREATE_TABLES; + } + --disable_warnings + eval $CHILD2_1_DROP_TABLES; + --enable_warnings + eval $CHILD2_1_CREATE_TABLES; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} +--connection master_1 +--disable_warnings +DROP TABLE IF EXISTS ta_l; +--enable_warnings +--disable_query_log +echo CREATE TABLE ta_l ( + a INT, + b CHAR(1), + c DATETIME, + PRIMARY KEY(a) +) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1; +eval CREATE TABLE ta_l ( + a INT, + b CHAR(1), + c DATETIME, + PRIMARY KEY(a) +) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1; +--enable_query_log +INSERT INTO ta_l (a, b, c) VALUES + (1, 'a', '2008-08-01 10:21:39'), + (2, 'b', '2000-01-01 00:00:00'), + (3, 'e', '2007-06-04 20:03:11'), + (4, 'd', '2003-11-30 05:01:03'), + (5, 'c', '2001-12-31 23:59:59'); + +--echo +--echo direct_aggregating test +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} +--connection master_1 +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +SELECT COUNT(*) FROM ta_l; +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +SELECT MAX(a) FROM ta_l; +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +SELECT MIN(a) FROM ta_l; +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +SELECT MAX(a) FROM ta_l WHERE a < 5; +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +SELECT MIN(a) FROM ta_l WHERE a > 1; +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %'; + } + eval $CHILD2_1_SELECT_TABLES; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + +--echo +--echo deinit +--disable_warnings +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; +} +--disable_query_log +--disable_result_log +--source test_deinit.inc +--enable_result_log +--enable_query_log +--enable_warnings +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/bg/t/direct_aggregate_part.test b/storage/spider/mysql-test/spider/bg/t/direct_aggregate_part.test index 2d67e9af32c..aebf210c745 100644 --- a/storage/spider/mysql-test/spider/bg/t/direct_aggregate_part.test +++ b/storage/spider/mysql-test/spider/bg/t/direct_aggregate_part.test @@ -1,192 +1,192 @@ ---disable_warnings
---disable_query_log
---disable_result_log
---source test_init.inc
---enable_result_log
---enable_query_log
-if (!$HAVE_PARTITION)
-{
- --disable_query_log
- --disable_result_log
- --source test_deinit.inc
- --enable_result_log
- --enable_query_log
- --enable_warnings
- skip Test requires partitioning;
-}
-
---echo
---echo drop and create databases
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- CREATE DATABASE auto_test_remote;
- USE auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
- CREATE DATABASE auto_test_remote2;
- USE auto_test_remote2;
-}
---enable_warnings
-
---echo
---echo test select 1
---connection master_1
-SELECT 1;
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- SELECT 1;
- --connection child2_2
- SELECT 1;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo with partition test
-if ($HAVE_PARTITION)
-{
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_2
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_2_DROP_TABLES;
- echo CHILD2_2_CREATE_TABLES;
- }
- --disable_warnings
- eval $CHILD2_2_DROP_TABLES;
- --enable_warnings
- eval $CHILD2_2_CREATE_TABLES;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_DROP_TABLES2;
- echo CHILD2_1_CREATE_TABLES2;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_TABLES2;
- --enable_warnings
- eval $CHILD2_1_CREATE_TABLES2;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- --connection master_1
- --disable_query_log
- echo CREATE TABLE ta_l2 (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
- ) MASTER_1_ENGINE MASTER_1_COMMENT2_P_2_1;
- eval CREATE TABLE ta_l2 (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
- ) $MASTER_1_ENGINE $MASTER_1_COMMENT2_P_2_1;
- INSERT INTO ta_l2 (a, b, c) VALUES
- (1, 'a', '2008-08-01 10:21:39'),
- (2, 'b', '2000-01-01 00:00:00'),
- (3, 'e', '2007-06-04 20:03:11'),
- (4, 'd', '2003-11-30 05:01:03'),
- (5, 'c', '2001-12-31 23:59:59');
- --enable_query_log
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- SELECT COUNT(*) FROM ta_l2;
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- SELECT MAX(a) FROM ta_l2;
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- SELECT MIN(a) FROM ta_l2;
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- SELECT MAX(a) FROM ta_l2 WHERE a < 5;
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- SELECT MIN(a) FROM ta_l2 WHERE a > 1;
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %';
- }
- eval $CHILD2_2_SELECT_TABLES;
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %';
- }
- eval $CHILD2_1_SELECT_TABLES2;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
-}
-
---echo
---echo deinit
---disable_warnings
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
-}
---disable_query_log
---disable_result_log
---source test_deinit.inc
---enable_result_log
---enable_query_log
---enable_warnings
---echo
---echo end of test
+--disable_warnings +--disable_query_log +--disable_result_log +--source test_init.inc +--enable_result_log +--enable_query_log +if (!$HAVE_PARTITION) +{ + --disable_query_log + --disable_result_log + --source test_deinit.inc + --enable_result_log + --enable_query_log + --enable_warnings + skip Test requires partitioning; +} + +--echo +--echo drop and create databases +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +CREATE DATABASE auto_test_local; +USE auto_test_local; +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + CREATE DATABASE auto_test_remote; + USE auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; + CREATE DATABASE auto_test_remote2; + USE auto_test_remote2; +} +--enable_warnings + +--echo +--echo test select 1 +--connection master_1 +SELECT 1; +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + SELECT 1; + --connection child2_2 + SELECT 1; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + +--echo +--echo with partition test +if ($HAVE_PARTITION) +{ + if ($USE_CHILD_GROUP2) + { + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_2 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_2_DROP_TABLES; + echo CHILD2_2_CREATE_TABLES; + } + --disable_warnings + eval $CHILD2_2_DROP_TABLES; + --enable_warnings + eval $CHILD2_2_CREATE_TABLES; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + --connection child2_1 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_DROP_TABLES2; + echo CHILD2_1_CREATE_TABLES2; + } + --disable_warnings + eval $CHILD2_1_DROP_TABLES2; + --enable_warnings + eval $CHILD2_1_CREATE_TABLES2; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } + } + --connection master_1 + --disable_query_log + echo CREATE TABLE ta_l2 ( + a INT, + b CHAR(1), + c DATETIME, + PRIMARY KEY(a) + ) MASTER_1_ENGINE MASTER_1_COMMENT2_P_2_1; + eval CREATE TABLE ta_l2 ( + a INT, + b CHAR(1), + c DATETIME, + PRIMARY KEY(a) + ) $MASTER_1_ENGINE $MASTER_1_COMMENT2_P_2_1; + INSERT INTO ta_l2 (a, b, c) VALUES + (1, 'a', '2008-08-01 10:21:39'), + (2, 'b', '2000-01-01 00:00:00'), + (3, 'e', '2007-06-04 20:03:11'), + (4, 'd', '2003-11-30 05:01:03'), + (5, 'c', '2001-12-31 23:59:59'); + --enable_query_log + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + SELECT COUNT(*) FROM ta_l2; + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + SELECT MAX(a) FROM ta_l2; + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + SELECT MIN(a) FROM ta_l2; + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + SELECT MAX(a) FROM ta_l2 WHERE a < 5; + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + SELECT MIN(a) FROM ta_l2 WHERE a > 1; + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + if ($USE_CHILD_GROUP2) + { + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_2 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %'; + } + eval $CHILD2_2_SELECT_TABLES; + --connection child2_1 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %'; + } + eval $CHILD2_1_SELECT_TABLES2; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } + } +} + +--echo +--echo deinit +--disable_warnings +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; +} +--disable_query_log +--disable_result_log +--source test_deinit.inc +--enable_result_log +--enable_query_log +--enable_warnings +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/bg/t/have_partition.inc b/storage/spider/mysql-test/spider/bg/t/have_partition.inc index 573c76ab43b..b6e699475db 100644 --- a/storage/spider/mysql-test/spider/bg/t/have_partition.inc +++ b/storage/spider/mysql-test/spider/bg/t/have_partition.inc @@ -1,7 +1,7 @@ -let $HAVE_PARTITION= 0;
-if (`SELECT count(*) FROM information_schema.plugins WHERE
- plugin_status = 'ACTIVE' AND
- plugin_name = 'partition'`)
-{
- let $HAVE_PARTITION= 1;
-}
+let $HAVE_PARTITION= 0; +if (`SELECT count(*) FROM information_schema.plugins WHERE + plugin_status = 'ACTIVE' AND + plugin_name = 'partition'`) +{ + let $HAVE_PARTITION= 1; +} diff --git a/storage/spider/mysql-test/spider/bg/t/have_trigger.inc b/storage/spider/mysql-test/spider/bg/t/have_trigger.inc index 10c0871dd5f..32de484b388 100644 --- a/storage/spider/mysql-test/spider/bg/t/have_trigger.inc +++ b/storage/spider/mysql-test/spider/bg/t/have_trigger.inc @@ -1,2 +1,2 @@ -let $HAVE_TRIGGER= `SELECT COUNT(*) FROM information_schema.tables
- WHERE TABLE_SCHEMA = 'information_schema' AND TABLE_NAME = 'TRIGGERS'`;
+let $HAVE_TRIGGER= `SELECT COUNT(*) FROM information_schema.tables + WHERE TABLE_SCHEMA = 'information_schema' AND TABLE_NAME = 'TRIGGERS'`; diff --git a/storage/spider/mysql-test/spider/bg/t/spider3_fixes.test b/storage/spider/mysql-test/spider/bg/t/spider3_fixes.test index 7530ce97837..13fa6f5fa39 100644 --- a/storage/spider/mysql-test/spider/bg/t/spider3_fixes.test +++ b/storage/spider/mysql-test/spider/bg/t/spider3_fixes.test @@ -1,292 +1,292 @@ -# This test tests for Spider 3.0's bug fixes
-source include/have_log_bin.inc;
---disable_warnings
---disable_query_log
---disable_result_log
---source test_init.inc
---source slave_test_init.inc
---enable_result_log
---enable_query_log
-
---echo
---echo drop and create databases
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-if ($USE_REPLICATION)
-{
- --connection slave1_1
- DROP DATABASE IF EXISTS auto_test_local;
- CREATE DATABASE auto_test_local;
- USE auto_test_local;
-}
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- CREATE DATABASE auto_test_remote;
- USE auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
- CREATE DATABASE auto_test_remote2;
- USE auto_test_remote2;
-}
---enable_warnings
-
---echo
---echo test select 1
---connection master_1
-SELECT 1;
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- SELECT 1;
- --connection child2_2
- SELECT 1;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
-
---echo
---echo 3.1
---echo auto_increment
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_DROP_INCREMENT_TABLES1;
- echo CHILD2_1_CREATE_INCREMENT_TABLES1;
- echo CHILD2_1_AUTO_INCREMENT_INCREMENT2;
- echo CHILD2_1_AUTO_INCREMENT_OFFSET2;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_INCREMENT_TABLES1;
- --enable_warnings
- eval $CHILD2_1_CREATE_INCREMENT_TABLES1;
- eval $CHILD2_1_AUTO_INCREMENT_INCREMENT2;
- eval $CHILD2_1_AUTO_INCREMENT_OFFSET2;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-if ($USE_REPLICATION)
-{
- save_master_pos;
- --connection slave1_1
- sync_with_master;
- --connection master_1
- --disable_query_log
- SET SESSION sql_log_bin= 0;
- --enable_query_log
-}
---disable_warnings
-DROP TABLE IF EXISTS t1, t2;
---enable_warnings
---disable_query_log
-echo CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_1;
-echo CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_1;
-echo MASTER_1_AUTO_INCREMENT_INCREMENT2;
-echo MASTER_1_AUTO_INCREMENT_OFFSET2;
-eval CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
-) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_1;
-eval CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
-) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_1;
-eval $MASTER_1_AUTO_INCREMENT_INCREMENT2;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET2;
-if ($USE_REPLICATION)
-{
- SET SESSION sql_log_bin= 1;
- --connection slave1_1
- --disable_warnings
- DROP TABLE IF EXISTS t1, t2;
- --enable_warnings
- echo CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_1;
- echo CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_1;
- eval CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_1;
- eval CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_1;
- --connection master_1
-}
---enable_query_log
-INSERT INTO t1 () VALUES ();
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
-INSERT INTO t2 () VALUES ();
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t2;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET3;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
---enable_query_log
-INSERT INTO t1 (id) VALUES (null);
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET4;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
---enable_query_log
-INSERT INTO t2 (id) VALUES (null);
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t2;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET3;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
---enable_query_log
-INSERT INTO t1 () VALUES (),(),(),();
-SELECT LAST_INSERT_ID();
-SELECT id FROM t1 ORDER BY id;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET4;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
---enable_query_log
-INSERT INTO t2 () VALUES (),(),(),();
-SELECT LAST_INSERT_ID();
-SELECT id FROM t2 ORDER BY id;
-TRUNCATE TABLE t1;
-TRUNCATE TABLE t2;
-INSERT INTO t1 () VALUES (),(),(),();
-SELECT LAST_INSERT_ID();
-SELECT id FROM t1 ORDER BY id;
-INSERT INTO t2 () VALUES (),(),(),();
-SELECT LAST_INSERT_ID();
-SELECT id FROM t2 ORDER BY id;
-SET INSERT_ID=5000;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET3;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
---enable_query_log
-INSERT INTO t1 () VALUES ();
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET4;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
---enable_query_log
-INSERT INTO t2 () VALUES ();
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t2;
-INSERT INTO t1 (id) VALUES (10000);
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
-INSERT INTO t2 (id) VALUES (1000);
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t2;
-if ($USE_REPLICATION)
-{
- save_master_pos;
- --connection slave1_1
- sync_with_master;
- SELECT id FROM t1 ORDER BY id;
- --connection master_1
- --disable_query_log
- SET SESSION sql_log_bin= 0;
- --enable_query_log
-}
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %';
- }
- eval $CHILD2_1_SELECT_INCREMENT_TABLES1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_AUTO_INCREMENT_INCREMENT1;
- echo CHILD2_1_AUTO_INCREMENT_OFFSET1;
- }
- eval $CHILD2_1_AUTO_INCREMENT_INCREMENT1;
- eval $CHILD2_1_AUTO_INCREMENT_OFFSET1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
-
---echo
---echo deinit
---disable_warnings
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-if ($USE_REPLICATION)
-{
- --connection slave1_1
- DROP DATABASE IF EXISTS auto_test_local;
-}
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
-}
---disable_query_log
---disable_result_log
---source slave_test_deinit.inc
---source test_deinit.inc
---enable_result_log
---enable_query_log
---enable_warnings
---echo
---echo end of test
+# This test tests for Spider 3.0's bug fixes +source include/have_log_bin.inc; +--disable_warnings +--disable_query_log +--disable_result_log +--source test_init.inc +--source slave_test_init.inc +--enable_result_log +--enable_query_log + +--echo +--echo drop and create databases +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +CREATE DATABASE auto_test_local; +USE auto_test_local; +if ($USE_REPLICATION) +{ + --connection slave1_1 + DROP DATABASE IF EXISTS auto_test_local; + CREATE DATABASE auto_test_local; + USE auto_test_local; +} +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + CREATE DATABASE auto_test_remote; + USE auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; + CREATE DATABASE auto_test_remote2; + USE auto_test_remote2; +} +--enable_warnings + +--echo +--echo test select 1 +--connection master_1 +SELECT 1; +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + SELECT 1; + --connection child2_2 + SELECT 1; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + + +--echo +--echo 3.1 +--echo auto_increment +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_DROP_INCREMENT_TABLES1; + echo CHILD2_1_CREATE_INCREMENT_TABLES1; + echo CHILD2_1_AUTO_INCREMENT_INCREMENT2; + echo CHILD2_1_AUTO_INCREMENT_OFFSET2; + } + --disable_warnings + eval $CHILD2_1_DROP_INCREMENT_TABLES1; + --enable_warnings + eval $CHILD2_1_CREATE_INCREMENT_TABLES1; + eval $CHILD2_1_AUTO_INCREMENT_INCREMENT2; + eval $CHILD2_1_AUTO_INCREMENT_OFFSET2; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} +--connection master_1 +if ($USE_REPLICATION) +{ + save_master_pos; + --connection slave1_1 + sync_with_master; + --connection master_1 + --disable_query_log + SET SESSION sql_log_bin= 0; + --enable_query_log +} +--disable_warnings +DROP TABLE IF EXISTS t1, t2; +--enable_warnings +--disable_query_log +echo CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) +) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_1; +echo CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) +) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_1; +echo MASTER_1_AUTO_INCREMENT_INCREMENT2; +echo MASTER_1_AUTO_INCREMENT_OFFSET2; +eval CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) +) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_1; +eval CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) +) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_1; +eval $MASTER_1_AUTO_INCREMENT_INCREMENT2; +eval $MASTER_1_AUTO_INCREMENT_OFFSET2; +if ($USE_REPLICATION) +{ + SET SESSION sql_log_bin= 1; + --connection slave1_1 + --disable_warnings + DROP TABLE IF EXISTS t1, t2; + --enable_warnings + echo CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_1; + echo CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_1; + eval CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_1; + eval CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_1; + --connection master_1 +} +--enable_query_log +INSERT INTO t1 () VALUES (); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t1; +INSERT INTO t2 () VALUES (); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t2; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET3; +eval $MASTER_1_AUTO_INCREMENT_OFFSET3; +--enable_query_log +INSERT INTO t1 (id) VALUES (null); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t1; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET4; +eval $MASTER_1_AUTO_INCREMENT_OFFSET4; +--enable_query_log +INSERT INTO t2 (id) VALUES (null); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t2; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET3; +eval $MASTER_1_AUTO_INCREMENT_OFFSET3; +--enable_query_log +INSERT INTO t1 () VALUES (),(),(),(); +SELECT LAST_INSERT_ID(); +SELECT id FROM t1 ORDER BY id; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET4; +eval $MASTER_1_AUTO_INCREMENT_OFFSET4; +--enable_query_log +INSERT INTO t2 () VALUES (),(),(),(); +SELECT LAST_INSERT_ID(); +SELECT id FROM t2 ORDER BY id; +TRUNCATE TABLE t1; +TRUNCATE TABLE t2; +INSERT INTO t1 () VALUES (),(),(),(); +SELECT LAST_INSERT_ID(); +SELECT id FROM t1 ORDER BY id; +INSERT INTO t2 () VALUES (),(),(),(); +SELECT LAST_INSERT_ID(); +SELECT id FROM t2 ORDER BY id; +SET INSERT_ID=5000; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET3; +eval $MASTER_1_AUTO_INCREMENT_OFFSET3; +--enable_query_log +INSERT INTO t1 () VALUES (); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t1; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET4; +eval $MASTER_1_AUTO_INCREMENT_OFFSET4; +--enable_query_log +INSERT INTO t2 () VALUES (); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t2; +INSERT INTO t1 (id) VALUES (10000); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t1; +INSERT INTO t2 (id) VALUES (1000); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t2; +if ($USE_REPLICATION) +{ + save_master_pos; + --connection slave1_1 + sync_with_master; + SELECT id FROM t1 ORDER BY id; + --connection master_1 + --disable_query_log + SET SESSION sql_log_bin= 0; + --enable_query_log +} +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %'; + } + eval $CHILD2_1_SELECT_INCREMENT_TABLES1; + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_AUTO_INCREMENT_INCREMENT1; + echo CHILD2_1_AUTO_INCREMENT_OFFSET1; + } + eval $CHILD2_1_AUTO_INCREMENT_INCREMENT1; + eval $CHILD2_1_AUTO_INCREMENT_OFFSET1; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + + +--echo +--echo deinit +--disable_warnings +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +if ($USE_REPLICATION) +{ + --connection slave1_1 + DROP DATABASE IF EXISTS auto_test_local; +} +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; +} +--disable_query_log +--disable_result_log +--source slave_test_deinit.inc +--source test_deinit.inc +--enable_result_log +--enable_query_log +--enable_warnings +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/bg/t/spider3_fixes_part.test b/storage/spider/mysql-test/spider/bg/t/spider3_fixes_part.test index f25f000d80c..3288c490a46 100644 --- a/storage/spider/mysql-test/spider/bg/t/spider3_fixes_part.test +++ b/storage/spider/mysql-test/spider/bg/t/spider3_fixes_part.test @@ -1,345 +1,345 @@ -# This test tests for Spider 3.0's bug fixes
-source include/have_log_bin.inc;
---disable_warnings
---disable_query_log
---disable_result_log
---source test_init.inc
---source slave_test_init.inc
---enable_result_log
---enable_query_log
-if (!$HAVE_PARTITION)
-{
- --disable_query_log
- --disable_result_log
- --source slave_test_deinit.inc
- --source test_deinit.inc
- --enable_result_log
- --enable_query_log
- --enable_warnings
- skip Test requires partitioning;
-}
-
---echo
---echo drop and create databases
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-if ($USE_REPLICATION)
-{
- --connection slave1_1
- DROP DATABASE IF EXISTS auto_test_local;
- CREATE DATABASE auto_test_local;
- USE auto_test_local;
-}
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- CREATE DATABASE auto_test_remote;
- USE auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
- CREATE DATABASE auto_test_remote2;
- USE auto_test_remote2;
-}
---enable_warnings
-
---echo
---echo test select 1
---connection master_1
-SELECT 1;
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- SELECT 1;
- --connection child2_2
- SELECT 1;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
-
---echo auto_increment with partition
-if ($HAVE_PARTITION)
-{
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_DROP_INCREMENT_TABLES1;
- echo CHILD2_1_CREATE_INCREMENT_TABLES1;
- echo CHILD2_1_AUTO_INCREMENT_INCREMENT2;
- echo CHILD2_1_AUTO_INCREMENT_OFFSET2;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_INCREMENT_TABLES1;
- --enable_warnings
- eval $CHILD2_1_CREATE_INCREMENT_TABLES1;
- eval $CHILD2_1_AUTO_INCREMENT_INCREMENT2;
- eval $CHILD2_1_AUTO_INCREMENT_OFFSET2;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- --connection child2_2
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_2_DROP_INCREMENT_TABLES1;
- echo CHILD2_2_CREATE_INCREMENT_TABLES1;
- echo CHILD2_2_AUTO_INCREMENT_INCREMENT2;
- echo CHILD2_2_AUTO_INCREMENT_OFFSET2;
- }
- --disable_warnings
- eval $CHILD2_2_DROP_INCREMENT_TABLES1;
- --enable_warnings
- eval $CHILD2_2_CREATE_INCREMENT_TABLES1;
- eval $CHILD2_2_AUTO_INCREMENT_INCREMENT2;
- eval $CHILD2_2_AUTO_INCREMENT_OFFSET2;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- --connection master_1
- if ($USE_REPLICATION)
- {
- save_master_pos;
- --connection slave1_1
- sync_with_master;
- --connection master_1
- --disable_query_log
- SET SESSION sql_log_bin= 0;
- --enable_query_log
- }
- --disable_warnings
- DROP TABLE IF EXISTS t1, t2;
- --enable_warnings
- --disable_query_log
- echo CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_P_1;
- echo CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_P_1;
- echo MASTER_1_AUTO_INCREMENT_INCREMENT2;
- echo MASTER_1_AUTO_INCREMENT_OFFSET2;
- eval CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_P_1;
- eval CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_P_1;
- eval $MASTER_1_AUTO_INCREMENT_INCREMENT2;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET2;
- if ($USE_REPLICATION)
- {
- SET SESSION sql_log_bin= 1;
- --connection slave1_1
- --disable_warnings
- DROP TABLE IF EXISTS t1, t2;
- --enable_warnings
- echo CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_P_1;
- echo CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_P_1;
- eval CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_P_1;
- eval CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_P_1;
- --connection master_1
- }
- --enable_query_log
- INSERT INTO t1 () VALUES ();
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- INSERT INTO t2 () VALUES ();
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t2;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET3;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
- --enable_query_log
- INSERT INTO t1 (id) VALUES (null);
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET4;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
- --enable_query_log
- INSERT INTO t2 (id) VALUES (null);
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t2;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET3;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
- --enable_query_log
- INSERT INTO t1 () VALUES (),(),(),();
- SELECT LAST_INSERT_ID();
- SELECT id FROM t1 ORDER BY id;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET4;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
- --enable_query_log
- INSERT INTO t2 () VALUES (),(),(),();
- SELECT LAST_INSERT_ID();
- SELECT id FROM t2 ORDER BY id;
- TRUNCATE TABLE t1;
- TRUNCATE TABLE t2;
- INSERT INTO t1 () VALUES (),(),(),();
- SELECT LAST_INSERT_ID();
- SELECT id FROM t1 ORDER BY id;
- INSERT INTO t2 () VALUES (),(),(),();
- SELECT LAST_INSERT_ID();
- SELECT id FROM t2 ORDER BY id;
- SET INSERT_ID=5000;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET3;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
- --enable_query_log
- INSERT INTO t1 () VALUES ();
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET4;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
- --enable_query_log
- INSERT INTO t2 () VALUES ();
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t2;
- INSERT INTO t1 (id) VALUES (10000);
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- INSERT INTO t2 (id) VALUES (1000);
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t2;
- if ($USE_REPLICATION)
- {
- save_master_pos;
- --connection slave1_1
- sync_with_master;
- SELECT id FROM t1 ORDER BY id;
- --connection master_1
- --disable_query_log
- SET SESSION sql_log_bin= 0;
- --enable_query_log
- }
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %';
- }
- eval $CHILD2_1_SELECT_INCREMENT_TABLES1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_AUTO_INCREMENT_INCREMENT1;
- echo CHILD2_1_AUTO_INCREMENT_OFFSET1;
- }
- eval $CHILD2_1_AUTO_INCREMENT_INCREMENT1;
- eval $CHILD2_1_AUTO_INCREMENT_OFFSET1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %';
- }
- eval $CHILD2_2_SELECT_INCREMENT_TABLES1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_2_AUTO_INCREMENT_INCREMENT1;
- echo CHILD2_2_AUTO_INCREMENT_OFFSET1;
- }
- eval $CHILD2_2_AUTO_INCREMENT_INCREMENT1;
- eval $CHILD2_2_AUTO_INCREMENT_OFFSET1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
-}
-
-
---echo
---echo deinit
---disable_warnings
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-if ($USE_REPLICATION)
-{
- --connection slave1_1
- DROP DATABASE IF EXISTS auto_test_local;
-}
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
-}
---disable_query_log
---disable_result_log
---source slave_test_deinit.inc
---source test_deinit.inc
---enable_result_log
---enable_query_log
---enable_warnings
---echo
---echo end of test
+# This test tests for Spider 3.0's bug fixes +source include/have_log_bin.inc; +--disable_warnings +--disable_query_log +--disable_result_log +--source test_init.inc +--source slave_test_init.inc +--enable_result_log +--enable_query_log +if (!$HAVE_PARTITION) +{ + --disable_query_log + --disable_result_log + --source slave_test_deinit.inc + --source test_deinit.inc + --enable_result_log + --enable_query_log + --enable_warnings + skip Test requires partitioning; +} + +--echo +--echo drop and create databases +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +CREATE DATABASE auto_test_local; +USE auto_test_local; +if ($USE_REPLICATION) +{ + --connection slave1_1 + DROP DATABASE IF EXISTS auto_test_local; + CREATE DATABASE auto_test_local; + USE auto_test_local; +} +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + CREATE DATABASE auto_test_remote; + USE auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; + CREATE DATABASE auto_test_remote2; + USE auto_test_remote2; +} +--enable_warnings + +--echo +--echo test select 1 +--connection master_1 +SELECT 1; +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + SELECT 1; + --connection child2_2 + SELECT 1; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + + +--echo auto_increment with partition +if ($HAVE_PARTITION) +{ + if ($USE_CHILD_GROUP2) + { + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_DROP_INCREMENT_TABLES1; + echo CHILD2_1_CREATE_INCREMENT_TABLES1; + echo CHILD2_1_AUTO_INCREMENT_INCREMENT2; + echo CHILD2_1_AUTO_INCREMENT_OFFSET2; + } + --disable_warnings + eval $CHILD2_1_DROP_INCREMENT_TABLES1; + --enable_warnings + eval $CHILD2_1_CREATE_INCREMENT_TABLES1; + eval $CHILD2_1_AUTO_INCREMENT_INCREMENT2; + eval $CHILD2_1_AUTO_INCREMENT_OFFSET2; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + --connection child2_2 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_2_DROP_INCREMENT_TABLES1; + echo CHILD2_2_CREATE_INCREMENT_TABLES1; + echo CHILD2_2_AUTO_INCREMENT_INCREMENT2; + echo CHILD2_2_AUTO_INCREMENT_OFFSET2; + } + --disable_warnings + eval $CHILD2_2_DROP_INCREMENT_TABLES1; + --enable_warnings + eval $CHILD2_2_CREATE_INCREMENT_TABLES1; + eval $CHILD2_2_AUTO_INCREMENT_INCREMENT2; + eval $CHILD2_2_AUTO_INCREMENT_OFFSET2; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } + } + --connection master_1 + if ($USE_REPLICATION) + { + save_master_pos; + --connection slave1_1 + sync_with_master; + --connection master_1 + --disable_query_log + SET SESSION sql_log_bin= 0; + --enable_query_log + } + --disable_warnings + DROP TABLE IF EXISTS t1, t2; + --enable_warnings + --disable_query_log + echo CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_P_1; + echo CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_P_1; + echo MASTER_1_AUTO_INCREMENT_INCREMENT2; + echo MASTER_1_AUTO_INCREMENT_OFFSET2; + eval CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_P_1; + eval CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_P_1; + eval $MASTER_1_AUTO_INCREMENT_INCREMENT2; + eval $MASTER_1_AUTO_INCREMENT_OFFSET2; + if ($USE_REPLICATION) + { + SET SESSION sql_log_bin= 1; + --connection slave1_1 + --disable_warnings + DROP TABLE IF EXISTS t1, t2; + --enable_warnings + echo CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_P_1; + echo CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_P_1; + eval CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_P_1; + eval CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_P_1; + --connection master_1 + } + --enable_query_log + INSERT INTO t1 () VALUES (); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t1; + INSERT INTO t2 () VALUES (); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t2; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET3; + eval $MASTER_1_AUTO_INCREMENT_OFFSET3; + --enable_query_log + INSERT INTO t1 (id) VALUES (null); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t1; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET4; + eval $MASTER_1_AUTO_INCREMENT_OFFSET4; + --enable_query_log + INSERT INTO t2 (id) VALUES (null); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t2; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET3; + eval $MASTER_1_AUTO_INCREMENT_OFFSET3; + --enable_query_log + INSERT INTO t1 () VALUES (),(),(),(); + SELECT LAST_INSERT_ID(); + SELECT id FROM t1 ORDER BY id; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET4; + eval $MASTER_1_AUTO_INCREMENT_OFFSET4; + --enable_query_log + INSERT INTO t2 () VALUES (),(),(),(); + SELECT LAST_INSERT_ID(); + SELECT id FROM t2 ORDER BY id; + TRUNCATE TABLE t1; + TRUNCATE TABLE t2; + INSERT INTO t1 () VALUES (),(),(),(); + SELECT LAST_INSERT_ID(); + SELECT id FROM t1 ORDER BY id; + INSERT INTO t2 () VALUES (),(),(),(); + SELECT LAST_INSERT_ID(); + SELECT id FROM t2 ORDER BY id; + SET INSERT_ID=5000; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET3; + eval $MASTER_1_AUTO_INCREMENT_OFFSET3; + --enable_query_log + INSERT INTO t1 () VALUES (); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t1; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET4; + eval $MASTER_1_AUTO_INCREMENT_OFFSET4; + --enable_query_log + INSERT INTO t2 () VALUES (); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t2; + INSERT INTO t1 (id) VALUES (10000); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t1; + INSERT INTO t2 (id) VALUES (1000); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t2; + if ($USE_REPLICATION) + { + save_master_pos; + --connection slave1_1 + sync_with_master; + SELECT id FROM t1 ORDER BY id; + --connection master_1 + --disable_query_log + SET SESSION sql_log_bin= 0; + --enable_query_log + } + if ($USE_CHILD_GROUP2) + { + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %'; + } + eval $CHILD2_1_SELECT_INCREMENT_TABLES1; + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_AUTO_INCREMENT_INCREMENT1; + echo CHILD2_1_AUTO_INCREMENT_OFFSET1; + } + eval $CHILD2_1_AUTO_INCREMENT_INCREMENT1; + eval $CHILD2_1_AUTO_INCREMENT_OFFSET1; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + --connection child2_2 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %'; + } + eval $CHILD2_2_SELECT_INCREMENT_TABLES1; + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_2_AUTO_INCREMENT_INCREMENT1; + echo CHILD2_2_AUTO_INCREMENT_OFFSET1; + } + eval $CHILD2_2_AUTO_INCREMENT_INCREMENT1; + eval $CHILD2_2_AUTO_INCREMENT_OFFSET1; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } + } +} + + +--echo +--echo deinit +--disable_warnings +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +if ($USE_REPLICATION) +{ + --connection slave1_1 + DROP DATABASE IF EXISTS auto_test_local; +} +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; +} +--disable_query_log +--disable_result_log +--source slave_test_deinit.inc +--source test_deinit.inc +--enable_result_log +--enable_query_log +--enable_warnings +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/handler/include/ha_deinit_child3_1.inc b/storage/spider/mysql-test/spider/handler/include/ha_deinit_child3_1.inc index 8fd2ff8a777..c19e376d10a 100644 --- a/storage/spider/mysql-test/spider/handler/include/ha_deinit_child3_1.inc +++ b/storage/spider/mysql-test/spider/handler/include/ha_deinit_child3_1.inc @@ -1 +1 @@ ---source ../../include/deinit_spider.inc
+--source ../../include/deinit_spider.inc diff --git a/storage/spider/mysql-test/spider/handler/include/ha_deinit_child3_2.inc b/storage/spider/mysql-test/spider/handler/include/ha_deinit_child3_2.inc index 8fd2ff8a777..c19e376d10a 100644 --- a/storage/spider/mysql-test/spider/handler/include/ha_deinit_child3_2.inc +++ b/storage/spider/mysql-test/spider/handler/include/ha_deinit_child3_2.inc @@ -1 +1 @@ ---source ../../include/deinit_spider.inc
+--source ../../include/deinit_spider.inc diff --git a/storage/spider/mysql-test/spider/handler/include/ha_deinit_child3_3.inc b/storage/spider/mysql-test/spider/handler/include/ha_deinit_child3_3.inc index 8fd2ff8a777..c19e376d10a 100644 --- a/storage/spider/mysql-test/spider/handler/include/ha_deinit_child3_3.inc +++ b/storage/spider/mysql-test/spider/handler/include/ha_deinit_child3_3.inc @@ -1 +1 @@ ---source ../../include/deinit_spider.inc
+--source ../../include/deinit_spider.inc diff --git a/storage/spider/mysql-test/spider/handler/include/ha_init_child2_1.inc b/storage/spider/mysql-test/spider/handler/include/ha_init_child2_1.inc index 59c0175d349..2684829408d 100644 --- a/storage/spider/mysql-test/spider/handler/include/ha_init_child2_1.inc +++ b/storage/spider/mysql-test/spider/handler/include/ha_init_child2_1.inc @@ -1,8 +1,8 @@ -let $CHILD2_1_HA_AS_DROP_TABLES=
- $CHILD2_1_DROP_TABLES;
-let $CHILD2_1_HA_AS_CREATE_TABLES=
- $CHILD2_1_CREATE_TABLES;
-let $CHILD2_1_HA_AS_DROP_TABLES2=
- $CHILD2_1_DROP_TABLES2;
-let $CHILD2_1_HA_AS_CREATE_TABLES2=
- $CHILD2_1_CREATE_TABLES2;
+let $CHILD2_1_HA_AS_DROP_TABLES= + $CHILD2_1_DROP_TABLES; +let $CHILD2_1_HA_AS_CREATE_TABLES= + $CHILD2_1_CREATE_TABLES; +let $CHILD2_1_HA_AS_DROP_TABLES2= + $CHILD2_1_DROP_TABLES2; +let $CHILD2_1_HA_AS_CREATE_TABLES2= + $CHILD2_1_CREATE_TABLES2; diff --git a/storage/spider/mysql-test/spider/handler/include/ha_init_child2_2.inc b/storage/spider/mysql-test/spider/handler/include/ha_init_child2_2.inc index 90d27ed704d..205eaa6fe35 100644 --- a/storage/spider/mysql-test/spider/handler/include/ha_init_child2_2.inc +++ b/storage/spider/mysql-test/spider/handler/include/ha_init_child2_2.inc @@ -1,4 +1,4 @@ -let $CHILD2_2_HA_DROP_TABLES=
- $CHILD2_2_DROP_TABLES;
-let $CHILD2_2_HA_CREATE_TABLES=
- $CHILD2_2_CREATE_TABLES;
+let $CHILD2_2_HA_DROP_TABLES= + $CHILD2_2_DROP_TABLES; +let $CHILD2_2_HA_CREATE_TABLES= + $CHILD2_2_CREATE_TABLES; diff --git a/storage/spider/mysql-test/spider/handler/include/ha_init_child2_3.inc b/storage/spider/mysql-test/spider/handler/include/ha_init_child2_3.inc index 11abf112b1f..55cb858372c 100644 --- a/storage/spider/mysql-test/spider/handler/include/ha_init_child2_3.inc +++ b/storage/spider/mysql-test/spider/handler/include/ha_init_child2_3.inc @@ -1,4 +1,4 @@ -let $CHILD2_3_HA_DROP_TABLES=
- $CHILD2_3_DROP_TABLES;
-let $CHILD2_3_HA_CREATE_TABLES=
- $CHILD2_3_CREATE_TABLES;
+let $CHILD2_3_HA_DROP_TABLES= + $CHILD2_3_DROP_TABLES; +let $CHILD2_3_HA_CREATE_TABLES= + $CHILD2_3_CREATE_TABLES; diff --git a/storage/spider/mysql-test/spider/handler/include/ha_init_child3_1.inc b/storage/spider/mysql-test/spider/handler/include/ha_init_child3_1.inc index 56de7df4e52..3ac4f97b1e0 100644 --- a/storage/spider/mysql-test/spider/handler/include/ha_init_child3_1.inc +++ b/storage/spider/mysql-test/spider/handler/include/ha_init_child3_1.inc @@ -1,140 +1,140 @@ ---let $CHILD3_1_ENGINE_TYPE=Spider
---let $CHILD3_1_ENGINE=ENGINE=Spider
---source ../../include/init_spider.inc
-eval INSERT INTO mysql.spider_link_mon_servers
-(db_name, table_name, link_id, sid, server, scheme, host, port, socket,
- username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key,
- ssl_verify_server_cert, default_file, default_group) VALUES
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL);
-let $CHILD3_1_CHECK_LINK_STATUS=
- SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
- ORDER BY db_name, table_name, link_id;
-let $CHILD3_1_CHECK_LINK_FAILED_LOG=
- SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log;
-let $CHILD3_1_SET_RECOVERY_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 2"';
-let $CHILD3_1_SET_OK_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 1"';
-let $CHILD3_1_SET_OK_STATUS_AS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2", lst "1 0"';
-
-let $CHILD3_1_DROP_TABLES_HA_2_1=
- DROP TABLE IF EXISTS ta_l;
-if ($VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_1_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_1_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-if (!$VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_1_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_1_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-let $CHILD3_1_DROP_TABLES_HA_P_2_1=
- DROP TABLE IF EXISTS ta_l2;
-let $CHILD3_1_CREATE_TABLES_HA_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_1_CREATE_TABLES_HA_AS_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_1_SET_RECOVERY_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 2"'
- );
-let $CHILD3_1_SET_OK_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 1"'
- );
-let $CHILD3_1_SET_OK_STATUS_AS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "1 0"'
- );
+--let $CHILD3_1_ENGINE_TYPE=Spider +--let $CHILD3_1_ENGINE=ENGINE=Spider +--source ../../include/init_spider.inc +eval INSERT INTO mysql.spider_link_mon_servers +(db_name, table_name, link_id, sid, server, scheme, host, port, socket, + username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key, + ssl_verify_server_cert, default_file, default_group) VALUES +('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +let $CHILD3_1_CHECK_LINK_STATUS= + SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables + ORDER BY db_name, table_name, link_id; +let $CHILD3_1_CHECK_LINK_FAILED_LOG= + SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log; +let $CHILD3_1_SET_RECOVERY_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 2"'; +let $CHILD3_1_SET_OK_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 1"'; +let $CHILD3_1_SET_OK_STATUS_AS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2", lst "1 0"'; + +let $CHILD3_1_DROP_TABLES_HA_2_1= + DROP TABLE IF EXISTS ta_l; +if ($VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_1_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_1_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +if (!$VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_1_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_1_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +let $CHILD3_1_DROP_TABLES_HA_P_2_1= + DROP TABLE IF EXISTS ta_l2; +let $CHILD3_1_CREATE_TABLES_HA_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_1_CREATE_TABLES_HA_AS_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_1_SET_RECOVERY_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 2"' + ); +let $CHILD3_1_SET_OK_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 1"' + ); +let $CHILD3_1_SET_OK_STATUS_AS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "1 0"' + ); diff --git a/storage/spider/mysql-test/spider/handler/include/ha_init_child3_2.inc b/storage/spider/mysql-test/spider/handler/include/ha_init_child3_2.inc index fdb3a84cca7..cf47099f439 100644 --- a/storage/spider/mysql-test/spider/handler/include/ha_init_child3_2.inc +++ b/storage/spider/mysql-test/spider/handler/include/ha_init_child3_2.inc @@ -1,140 +1,140 @@ ---let $CHILD3_2_ENGINE_TYPE=Spider
---let $CHILD3_2_ENGINE=ENGINE=Spider
---source ../../include/init_spider.inc
-eval INSERT INTO mysql.spider_link_mon_servers
-(db_name, table_name, link_id, sid, server, scheme, host, port, socket,
- username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key,
- ssl_verify_server_cert, default_file, default_group) VALUES
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL);
-let $CHILD3_2_CHECK_LINK_STATUS=
- SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
- ORDER BY db_name, table_name, link_id;
-let $CHILD3_2_CHECK_LINK_FAILED_LOG=
- SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log;
-let $CHILD3_2_SET_RECOVERY_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 2"';
-let $CHILD3_2_SET_OK_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 1"';
-let $CHILD3_2_SET_OK_STATUS_AS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2", lst "1 0"';
-
-let $CHILD3_2_DROP_TABLES_HA_2_1=
- DROP TABLE IF EXISTS ta_l;
-if ($VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_2_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_2_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-if (!$VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_2_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_2_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-let $CHILD3_2_DROP_TABLES_HA_P_2_1=
- DROP TABLE IF EXISTS ta_l2;
-let $CHILD3_2_CREATE_TABLES_HA_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_2_CREATE_TABLES_HA_AS_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_2_SET_RECOVERY_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 2"'
- );
-let $CHILD3_2_SET_OK_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 1"'
- );
-let $CHILD3_2_SET_OK_STATUS_AS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "1 0"'
- );
+--let $CHILD3_2_ENGINE_TYPE=Spider +--let $CHILD3_2_ENGINE=ENGINE=Spider +--source ../../include/init_spider.inc +eval INSERT INTO mysql.spider_link_mon_servers +(db_name, table_name, link_id, sid, server, scheme, host, port, socket, + username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key, + ssl_verify_server_cert, default_file, default_group) VALUES +('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +let $CHILD3_2_CHECK_LINK_STATUS= + SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables + ORDER BY db_name, table_name, link_id; +let $CHILD3_2_CHECK_LINK_FAILED_LOG= + SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log; +let $CHILD3_2_SET_RECOVERY_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 2"'; +let $CHILD3_2_SET_OK_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 1"'; +let $CHILD3_2_SET_OK_STATUS_AS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2", lst "1 0"'; + +let $CHILD3_2_DROP_TABLES_HA_2_1= + DROP TABLE IF EXISTS ta_l; +if ($VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_2_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_2_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +if (!$VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_2_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_2_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +let $CHILD3_2_DROP_TABLES_HA_P_2_1= + DROP TABLE IF EXISTS ta_l2; +let $CHILD3_2_CREATE_TABLES_HA_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_2_CREATE_TABLES_HA_AS_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_2_SET_RECOVERY_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 2"' + ); +let $CHILD3_2_SET_OK_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 1"' + ); +let $CHILD3_2_SET_OK_STATUS_AS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "1 0"' + ); diff --git a/storage/spider/mysql-test/spider/handler/include/ha_init_child3_3.inc b/storage/spider/mysql-test/spider/handler/include/ha_init_child3_3.inc index d08ff4d0d34..094d26b62c6 100644 --- a/storage/spider/mysql-test/spider/handler/include/ha_init_child3_3.inc +++ b/storage/spider/mysql-test/spider/handler/include/ha_init_child3_3.inc @@ -1,140 +1,140 @@ ---let $CHILD3_3_ENGINE_TYPE=Spider
---let $CHILD3_3_ENGINE=ENGINE=Spider
---source ../../include/init_spider.inc
-eval INSERT INTO mysql.spider_link_mon_servers
-(db_name, table_name, link_id, sid, server, scheme, host, port, socket,
- username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key,
- ssl_verify_server_cert, default_file, default_group) VALUES
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL);
-let $CHILD3_3_CHECK_LINK_STATUS=
- SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
- ORDER BY db_name, table_name, link_id;
-let $CHILD3_3_CHECK_LINK_FAILED_LOG=
- SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log;
-let $CHILD3_3_SET_RECOVERY_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 2"';
-let $CHILD3_3_SET_OK_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 1"';
-let $CHILD3_3_SET_OK_STATUS_AS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2", lst "1 0"';
-
-let $CHILD3_3_DROP_TABLES_HA_2_1=
- DROP TABLE IF EXISTS ta_l;
-if ($VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_3_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_3_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-if (!$VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_3_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_3_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-let $CHILD3_3_DROP_TABLES_HA_P_2_1=
- DROP TABLE IF EXISTS ta_l2;
-let $CHILD3_3_CREATE_TABLES_HA_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_3_CREATE_TABLES_HA_AS_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_3_SET_RECOVERY_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 2"'
- );
-let $CHILD3_3_SET_OK_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 1"'
- );
-let $CHILD3_3_SET_OK_STATUS_AS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "1 0"'
- );
+--let $CHILD3_3_ENGINE_TYPE=Spider +--let $CHILD3_3_ENGINE=ENGINE=Spider +--source ../../include/init_spider.inc +eval INSERT INTO mysql.spider_link_mon_servers +(db_name, table_name, link_id, sid, server, scheme, host, port, socket, + username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key, + ssl_verify_server_cert, default_file, default_group) VALUES +('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +let $CHILD3_3_CHECK_LINK_STATUS= + SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables + ORDER BY db_name, table_name, link_id; +let $CHILD3_3_CHECK_LINK_FAILED_LOG= + SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log; +let $CHILD3_3_SET_RECOVERY_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 2"'; +let $CHILD3_3_SET_OK_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 1"'; +let $CHILD3_3_SET_OK_STATUS_AS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2", lst "1 0"'; + +let $CHILD3_3_DROP_TABLES_HA_2_1= + DROP TABLE IF EXISTS ta_l; +if ($VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_3_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_3_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +if (!$VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_3_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_3_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +let $CHILD3_3_DROP_TABLES_HA_P_2_1= + DROP TABLE IF EXISTS ta_l2; +let $CHILD3_3_CREATE_TABLES_HA_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_3_CREATE_TABLES_HA_AS_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_3_SET_RECOVERY_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 2"' + ); +let $CHILD3_3_SET_OK_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 1"' + ); +let $CHILD3_3_SET_OK_STATUS_AS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "1 0"' + ); diff --git a/storage/spider/mysql-test/spider/handler/include/hs_init_child2_1.inc b/storage/spider/mysql-test/spider/handler/include/hs_init_child2_1.inc index 2ea1c0c9cd6..ee006858b06 100644 --- a/storage/spider/mysql-test/spider/handler/include/hs_init_child2_1.inc +++ b/storage/spider/mysql-test/spider/handler/include/hs_init_child2_1.inc @@ -1,24 +1,24 @@ -let $CHILD2_1_HS_DROP_TABLES=
- DROP TABLE IF EXISTS hs_r;
-let $CHILD2_1_HS_CREATE_TABLES=
- CREATE TABLE hs_r (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- d INT DEFAULT 11,
- PRIMARY KEY(a)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_HS_SELECT_TABLES=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s'), d FROM hs_r ORDER BY a;
-let $CHILD2_1_HS_DROP_TABLES2=
- DROP TABLE IF EXISTS hs_r2;
-let $CHILD2_1_HS_CREATE_TABLES2=
- CREATE TABLE hs_r2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- d INT DEFAULT 11,
- PRIMARY KEY(a)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_HS_SELECT_TABLES2=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s'), d FROM hs_r2 ORDER BY a;
+let $CHILD2_1_HS_DROP_TABLES= + DROP TABLE IF EXISTS hs_r; +let $CHILD2_1_HS_CREATE_TABLES= + CREATE TABLE hs_r ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + d INT DEFAULT 11, + PRIMARY KEY(a) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_HS_SELECT_TABLES= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s'), d FROM hs_r ORDER BY a; +let $CHILD2_1_HS_DROP_TABLES2= + DROP TABLE IF EXISTS hs_r2; +let $CHILD2_1_HS_CREATE_TABLES2= + CREATE TABLE hs_r2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + d INT DEFAULT 11, + PRIMARY KEY(a) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_HS_SELECT_TABLES2= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s'), d FROM hs_r2 ORDER BY a; diff --git a/storage/spider/mysql-test/spider/handler/include/hs_init_child2_2.inc b/storage/spider/mysql-test/spider/handler/include/hs_init_child2_2.inc index 7c69d73ced6..1c5a02d50c8 100644 --- a/storage/spider/mysql-test/spider/handler/include/hs_init_child2_2.inc +++ b/storage/spider/mysql-test/spider/handler/include/hs_init_child2_2.inc @@ -1,12 +1,12 @@ -let $CHILD2_2_HS_DROP_TABLES=
- DROP TABLE IF EXISTS hs_r3;
-let $CHILD2_2_HS_CREATE_TABLES=
- CREATE TABLE hs_r3 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- d INT DEFAULT 11,
- PRIMARY KEY(a)
- ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET;
-let $CHILD2_2_HS_SELECT_TABLES=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s'), d FROM hs_r3 ORDER BY a;
+let $CHILD2_2_HS_DROP_TABLES= + DROP TABLE IF EXISTS hs_r3; +let $CHILD2_2_HS_CREATE_TABLES= + CREATE TABLE hs_r3 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + d INT DEFAULT 11, + PRIMARY KEY(a) + ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET; +let $CHILD2_2_HS_SELECT_TABLES= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s'), d FROM hs_r3 ORDER BY a; diff --git a/storage/spider/mysql-test/spider/handler/include/init_child2_1.inc b/storage/spider/mysql-test/spider/handler/include/init_child2_1.inc index 7773f0e2dde..b8b8ceb9875 100644 --- a/storage/spider/mysql-test/spider/handler/include/init_child2_1.inc +++ b/storage/spider/mysql-test/spider/handler/include/init_child2_1.inc @@ -1,176 +1,176 @@ -let $CHILD2_1_DROP_TABLES=
- DROP TABLE IF EXISTS ta_r;
-let $CHILD2_1_CREATE_TABLES=
- CREATE TABLE ta_r (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a),
- KEY idx1(b)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_SELECT_TABLES=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r ORDER BY a;
-let $CHILD2_1_DROP_TABLES2=
- DROP TABLE IF EXISTS ta_r2;
-let $CHILD2_1_CREATE_TABLES2=
- CREATE TABLE ta_r2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_SELECT_TABLES2=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r2 ORDER BY a;
-let $CHILD2_1_DROP_TABLES3=
- DROP TABLE IF EXISTS ta_r_no_idx;
-let $CHILD2_1_CREATE_TABLES3=
- CREATE TABLE ta_r_no_idx (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10'
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_SELECT_TABLES3=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r_no_idx ORDER BY a;
-let $CHILD2_1_DROP_TABLES4=
- DROP TABLE IF EXISTS ta_r_auto_inc;
-let $CHILD2_1_CREATE_TABLES4=
- CREATE TABLE ta_r_auto_inc (
- a INT AUTO_INCREMENT,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_SELECT_TABLES4=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r_auto_inc
- ORDER BY a;
-let $CHILD2_1_DROP_TABLES5=
- DROP TABLE IF EXISTS ta_r_int;
-let $CHILD2_1_CREATE_TABLES5=
- CREATE TABLE ta_r_int (
- a INT AUTO_INCREMENT,
- b INT DEFAULT 10,
- c INT DEFAULT 11,
- PRIMARY KEY(a),
- KEY idx1(b),
- KEY idx2(c)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_SELECT_TABLES5=
- SELECT a, b, c FROM ta_r_int ORDER BY a;
-let $CHILD2_1_DROP_TABLES6=
- DROP TABLE IF EXISTS ta_r_3;
-let $CHILD2_1_CREATE_TABLES6=
- CREATE TABLE ta_r_3 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_SELECT_TABLES6=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r_3 ORDER BY a;
-let $CHILD2_1_DROP_FT_TABLES=
- DROP TABLE IF EXISTS ft_r;
-let $CHILD2_1_CREATE_FT_TABLES=
- CREATE TABLE ft_r (
- a INT DEFAULT 0,
- b TEXT,
- c TEXT,
- d TEXT,
- PRIMARY KEY(a),
- FULLTEXT INDEX ft_idx1(b),
- FULLTEXT INDEX ft_idx2(c)
- ) $CHILD2_1_FT_ENGINE $CHILD2_1_FT_CHARSET;
-let $CHILD2_1_SELECT_FT_TABLES=
- SELECT a, b, c, d FROM ft_r ORDER BY a;
-let $CHILD2_1_DROP_FT_TABLES2=
- DROP TABLE IF EXISTS ft_r2;
-let $CHILD2_1_CREATE_FT_TABLES2=
- CREATE TABLE ft_r2 (
- a INT DEFAULT 0,
- b TEXT,
- c TEXT,
- d TEXT,
- PRIMARY KEY(a),
- FULLTEXT INDEX ft_idx1(b),
- FULLTEXT INDEX ft_idx2(c)
- ) $CHILD2_1_FT_ENGINE $CHILD2_1_FT_CHARSET;
-let $CHILD2_1_SELECT_FT_TABLES2=
- SELECT a, b, c, d FROM ft_r2 ORDER BY a;
-let $CHILD2_1_DROP_GM_TABLES=
- DROP TABLE IF EXISTS gm_r;
-let $CHILD2_1_CREATE_GM_TABLES=
- CREATE TABLE gm_r (
- a INT DEFAULT 0,
- b GEOMETRY NOT NULL,
- c GEOMETRY NOT NULL,
- PRIMARY KEY(a),
- SPATIAL INDEX sp_idx1(b),
- SPATIAL INDEX sp_idx2(c)
- ) $CHILD2_1_GM_ENGINE $CHILD2_1_GM_CHARSET;
-let $CHILD2_1_SELECT_GM_TABLES=
- SELECT a, b, c FROM gm_r ORDER BY a;
-let $CHILD2_1_DROP_GM_TABLES2=
- DROP TABLE IF EXISTS gm_r2;
-let $CHILD2_1_CREATE_GM_TABLES2=
- CREATE TABLE gm_r2 (
- a INT DEFAULT 0,
- b GEOMETRY NOT NULL,
- c GEOMETRY NOT NULL,
- PRIMARY KEY(a),
- SPATIAL INDEX sp_idx1(b),
- SPATIAL INDEX sp_idx2(c)
- ) $CHILD2_1_GM_ENGINE $CHILD2_1_GM_CHARSET;
-let $CHILD2_1_SELECT_GM_TABLES2=
- SELECT a, b, c FROM gm_r2 ORDER BY a;
-let $CHILD2_1_DROP_LOCK_TABLES1=
- DROP TABLE IF EXISTS t1_1;
-let $CHILD2_1_CREATE_LOCK_TABLES1=
- CREATE TABLE t1_1 (
- id int(11) NOT NULL,
- PRIMARY KEY (id)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_DROP_LOCK_TABLES2=
- DROP TABLE IF EXISTS t2_2;
-let $CHILD2_1_CREATE_LOCK_TABLES2=
- CREATE TABLE t2_2 (
- id int(11) NOT NULL,
- PRIMARY KEY (id)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_DROP_INCREMENT_TABLES1=
- DROP TABLE IF EXISTS t1_1;
-let $CHILD2_1_CREATE_INCREMENT_TABLES1=
- CREATE TABLE t1_1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_SELECT_INCREMENT_TABLES1=
- SELECT id FROM t1_1 ORDER BY id;
-let $CHILD2_1_DROP_TEXT_PK_TABLES1=
- DROP TABLE IF EXISTS t1;
-let $CHILD2_1_CREATE_TEXT_PK_TABLES1=
- CREATE TABLE t1 (
- a VARCHAR(255),
- PRIMARY KEY (a)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET2;
-let $CHILD2_1_SELECT_TEXT_PK_TABLES1=
- SELECT a FROM t1 ORDER BY a;
-let $CHILD2_1_DROP_TEXT_KEY_TABLES1=
- DROP TABLE IF EXISTS t1;
-let $CHILD2_1_CREATE_TEXT_KEY_TABLES1=
- CREATE TABLE t1 (
- a VARCHAR(255),
- b VARCHAR(255),
- c VARCHAR(255),
- KEY idx1(a,b),
- KEY idx2(b),
- PRIMARY KEY(c)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_SELECT_TEXT_KEY_TABLES1=
- SELECT a, b FROM t1 ORDER BY a, b;
-let $CHILD2_1_AUTO_INCREMENT_INCREMENT1=
- SET GLOBAL AUTO_INCREMENT_INCREMENT = 1;
-let $CHILD2_1_AUTO_INCREMENT_INCREMENT2=
- SET GLOBAL AUTO_INCREMENT_INCREMENT = 4;
-let $CHILD2_1_AUTO_INCREMENT_OFFSET1=
- SET GLOBAL AUTO_INCREMENT_OFFSET = 1;
-let $CHILD2_1_AUTO_INCREMENT_OFFSET2=
- SET GLOBAL AUTO_INCREMENT_OFFSET = 2;
+let $CHILD2_1_DROP_TABLES= + DROP TABLE IF EXISTS ta_r; +let $CHILD2_1_CREATE_TABLES= + CREATE TABLE ta_r ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a), + KEY idx1(b) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_SELECT_TABLES= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r ORDER BY a; +let $CHILD2_1_DROP_TABLES2= + DROP TABLE IF EXISTS ta_r2; +let $CHILD2_1_CREATE_TABLES2= + CREATE TABLE ta_r2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_SELECT_TABLES2= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r2 ORDER BY a; +let $CHILD2_1_DROP_TABLES3= + DROP TABLE IF EXISTS ta_r_no_idx; +let $CHILD2_1_CREATE_TABLES3= + CREATE TABLE ta_r_no_idx ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10' + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_SELECT_TABLES3= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r_no_idx ORDER BY a; +let $CHILD2_1_DROP_TABLES4= + DROP TABLE IF EXISTS ta_r_auto_inc; +let $CHILD2_1_CREATE_TABLES4= + CREATE TABLE ta_r_auto_inc ( + a INT AUTO_INCREMENT, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_SELECT_TABLES4= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r_auto_inc + ORDER BY a; +let $CHILD2_1_DROP_TABLES5= + DROP TABLE IF EXISTS ta_r_int; +let $CHILD2_1_CREATE_TABLES5= + CREATE TABLE ta_r_int ( + a INT AUTO_INCREMENT, + b INT DEFAULT 10, + c INT DEFAULT 11, + PRIMARY KEY(a), + KEY idx1(b), + KEY idx2(c) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_SELECT_TABLES5= + SELECT a, b, c FROM ta_r_int ORDER BY a; +let $CHILD2_1_DROP_TABLES6= + DROP TABLE IF EXISTS ta_r_3; +let $CHILD2_1_CREATE_TABLES6= + CREATE TABLE ta_r_3 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_SELECT_TABLES6= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r_3 ORDER BY a; +let $CHILD2_1_DROP_FT_TABLES= + DROP TABLE IF EXISTS ft_r; +let $CHILD2_1_CREATE_FT_TABLES= + CREATE TABLE ft_r ( + a INT DEFAULT 0, + b TEXT, + c TEXT, + d TEXT, + PRIMARY KEY(a), + FULLTEXT INDEX ft_idx1(b), + FULLTEXT INDEX ft_idx2(c) + ) $CHILD2_1_FT_ENGINE $CHILD2_1_FT_CHARSET; +let $CHILD2_1_SELECT_FT_TABLES= + SELECT a, b, c, d FROM ft_r ORDER BY a; +let $CHILD2_1_DROP_FT_TABLES2= + DROP TABLE IF EXISTS ft_r2; +let $CHILD2_1_CREATE_FT_TABLES2= + CREATE TABLE ft_r2 ( + a INT DEFAULT 0, + b TEXT, + c TEXT, + d TEXT, + PRIMARY KEY(a), + FULLTEXT INDEX ft_idx1(b), + FULLTEXT INDEX ft_idx2(c) + ) $CHILD2_1_FT_ENGINE $CHILD2_1_FT_CHARSET; +let $CHILD2_1_SELECT_FT_TABLES2= + SELECT a, b, c, d FROM ft_r2 ORDER BY a; +let $CHILD2_1_DROP_GM_TABLES= + DROP TABLE IF EXISTS gm_r; +let $CHILD2_1_CREATE_GM_TABLES= + CREATE TABLE gm_r ( + a INT DEFAULT 0, + b GEOMETRY NOT NULL, + c GEOMETRY NOT NULL, + PRIMARY KEY(a), + SPATIAL INDEX sp_idx1(b), + SPATIAL INDEX sp_idx2(c) + ) $CHILD2_1_GM_ENGINE $CHILD2_1_GM_CHARSET; +let $CHILD2_1_SELECT_GM_TABLES= + SELECT a, b, c FROM gm_r ORDER BY a; +let $CHILD2_1_DROP_GM_TABLES2= + DROP TABLE IF EXISTS gm_r2; +let $CHILD2_1_CREATE_GM_TABLES2= + CREATE TABLE gm_r2 ( + a INT DEFAULT 0, + b GEOMETRY NOT NULL, + c GEOMETRY NOT NULL, + PRIMARY KEY(a), + SPATIAL INDEX sp_idx1(b), + SPATIAL INDEX sp_idx2(c) + ) $CHILD2_1_GM_ENGINE $CHILD2_1_GM_CHARSET; +let $CHILD2_1_SELECT_GM_TABLES2= + SELECT a, b, c FROM gm_r2 ORDER BY a; +let $CHILD2_1_DROP_LOCK_TABLES1= + DROP TABLE IF EXISTS t1_1; +let $CHILD2_1_CREATE_LOCK_TABLES1= + CREATE TABLE t1_1 ( + id int(11) NOT NULL, + PRIMARY KEY (id) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_DROP_LOCK_TABLES2= + DROP TABLE IF EXISTS t2_2; +let $CHILD2_1_CREATE_LOCK_TABLES2= + CREATE TABLE t2_2 ( + id int(11) NOT NULL, + PRIMARY KEY (id) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_DROP_INCREMENT_TABLES1= + DROP TABLE IF EXISTS t1_1; +let $CHILD2_1_CREATE_INCREMENT_TABLES1= + CREATE TABLE t1_1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_SELECT_INCREMENT_TABLES1= + SELECT id FROM t1_1 ORDER BY id; +let $CHILD2_1_DROP_TEXT_PK_TABLES1= + DROP TABLE IF EXISTS t1; +let $CHILD2_1_CREATE_TEXT_PK_TABLES1= + CREATE TABLE t1 ( + a VARCHAR(255), + PRIMARY KEY (a) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET2; +let $CHILD2_1_SELECT_TEXT_PK_TABLES1= + SELECT a FROM t1 ORDER BY a; +let $CHILD2_1_DROP_TEXT_KEY_TABLES1= + DROP TABLE IF EXISTS t1; +let $CHILD2_1_CREATE_TEXT_KEY_TABLES1= + CREATE TABLE t1 ( + a VARCHAR(255), + b VARCHAR(255), + c VARCHAR(255), + KEY idx1(a,b), + KEY idx2(b), + PRIMARY KEY(c) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_SELECT_TEXT_KEY_TABLES1= + SELECT a, b FROM t1 ORDER BY a, b; +let $CHILD2_1_AUTO_INCREMENT_INCREMENT1= + SET GLOBAL AUTO_INCREMENT_INCREMENT = 1; +let $CHILD2_1_AUTO_INCREMENT_INCREMENT2= + SET GLOBAL AUTO_INCREMENT_INCREMENT = 4; +let $CHILD2_1_AUTO_INCREMENT_OFFSET1= + SET GLOBAL AUTO_INCREMENT_OFFSET = 1; +let $CHILD2_1_AUTO_INCREMENT_OFFSET2= + SET GLOBAL AUTO_INCREMENT_OFFSET = 2; diff --git a/storage/spider/mysql-test/spider/handler/include/init_child2_2.inc b/storage/spider/mysql-test/spider/handler/include/init_child2_2.inc index 3524fc4a2b7..9f0b5e2fe5a 100644 --- a/storage/spider/mysql-test/spider/handler/include/init_child2_2.inc +++ b/storage/spider/mysql-test/spider/handler/include/init_child2_2.inc @@ -1,80 +1,80 @@ -let $CHILD2_2_DROP_TABLES=
- DROP TABLE IF EXISTS ta_r3;
-let $CHILD2_2_CREATE_TABLES=
- CREATE TABLE ta_r3 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET;
-let $CHILD2_2_DROP_TABLES5=
- DROP TABLE IF EXISTS ta_r_int;
-let $CHILD2_2_CREATE_TABLES5=
- CREATE TABLE ta_r_int (
- a INT AUTO_INCREMENT,
- b INT DEFAULT 10,
- c INT DEFAULT 11,
- PRIMARY KEY(a),
- KEY idx1(b),
- KEY idx2(c)
- ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET;
-let $CHILD2_2_SELECT_TABLES=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r3 ORDER BY a;
-let $CHILD2_2_DROP_FT_TABLES=
- DROP TABLE IF EXISTS ft_r3;
-let $CHILD2_2_CREATE_FT_TABLES=
- CREATE TABLE ft_r3 (
- a INT DEFAULT 0,
- b TEXT,
- c TEXT,
- d TEXT,
- PRIMARY KEY(a),
- FULLTEXT INDEX ft_idx1(b),
- FULLTEXT INDEX ft_idx2(c)
- ) $CHILD2_2_FT_ENGINE $CHILD2_2_FT_CHARSET;
-let $CHILD2_2_SELECT_FT_TABLES=
- SELECT a, b, c, d FROM ft_r3 ORDER BY a;
-let $CHILD2_2_DROP_GM_TABLES=
- DROP TABLE IF EXISTS gm_r3;
-let $CHILD2_2_CREATE_GM_TABLES=
- CREATE TABLE gm_r3 (
- a INT DEFAULT 0,
- b GEOMETRY NOT NULL,
- c GEOMETRY NOT NULL,
- PRIMARY KEY(a),
- SPATIAL INDEX sp_idx1(b),
- SPATIAL INDEX sp_idx2(c)
- ) $CHILD2_2_GM_ENGINE $CHILD2_2_GM_CHARSET;
-let $CHILD2_2_SELECT_GM_TABLES=
- SELECT a, b, c FROM gm_r3 ORDER BY a;
-let $CHILD2_2_DROP_LOCK_TABLES1=
- DROP TABLE IF EXISTS t1_2;
-let $CHILD2_2_CREATE_LOCK_TABLES1=
- CREATE TABLE t1_2 (
- id int(11) NOT NULL,
- PRIMARY KEY (id)
- ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET;
-let $CHILD2_2_DROP_LOCK_TABLES2=
- DROP TABLE IF EXISTS t2_1;
-let $CHILD2_2_CREATE_LOCK_TABLES2=
- CREATE TABLE t2_1 (
- id int(11) NOT NULL,
- PRIMARY KEY (id)
- ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET;
-let $CHILD2_2_DROP_INCREMENT_TABLES1=
- DROP TABLE IF EXISTS t1_2;
-let $CHILD2_2_CREATE_INCREMENT_TABLES1=
- CREATE TABLE t1_2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET;
-let $CHILD2_2_SELECT_INCREMENT_TABLES1=
- SELECT id FROM t1_2 ORDER BY id;
-let $CHILD2_2_AUTO_INCREMENT_INCREMENT1=
- SET GLOBAL AUTO_INCREMENT_INCREMENT = 1;
-let $CHILD2_2_AUTO_INCREMENT_INCREMENT2=
- SET GLOBAL AUTO_INCREMENT_INCREMENT = 4;
-let $CHILD2_2_AUTO_INCREMENT_OFFSET1=
- SET GLOBAL AUTO_INCREMENT_OFFSET = 1;
-let $CHILD2_2_AUTO_INCREMENT_OFFSET2=
- SET GLOBAL AUTO_INCREMENT_OFFSET = 3;
+let $CHILD2_2_DROP_TABLES= + DROP TABLE IF EXISTS ta_r3; +let $CHILD2_2_CREATE_TABLES= + CREATE TABLE ta_r3 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET; +let $CHILD2_2_DROP_TABLES5= + DROP TABLE IF EXISTS ta_r_int; +let $CHILD2_2_CREATE_TABLES5= + CREATE TABLE ta_r_int ( + a INT AUTO_INCREMENT, + b INT DEFAULT 10, + c INT DEFAULT 11, + PRIMARY KEY(a), + KEY idx1(b), + KEY idx2(c) + ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET; +let $CHILD2_2_SELECT_TABLES= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r3 ORDER BY a; +let $CHILD2_2_DROP_FT_TABLES= + DROP TABLE IF EXISTS ft_r3; +let $CHILD2_2_CREATE_FT_TABLES= + CREATE TABLE ft_r3 ( + a INT DEFAULT 0, + b TEXT, + c TEXT, + d TEXT, + PRIMARY KEY(a), + FULLTEXT INDEX ft_idx1(b), + FULLTEXT INDEX ft_idx2(c) + ) $CHILD2_2_FT_ENGINE $CHILD2_2_FT_CHARSET; +let $CHILD2_2_SELECT_FT_TABLES= + SELECT a, b, c, d FROM ft_r3 ORDER BY a; +let $CHILD2_2_DROP_GM_TABLES= + DROP TABLE IF EXISTS gm_r3; +let $CHILD2_2_CREATE_GM_TABLES= + CREATE TABLE gm_r3 ( + a INT DEFAULT 0, + b GEOMETRY NOT NULL, + c GEOMETRY NOT NULL, + PRIMARY KEY(a), + SPATIAL INDEX sp_idx1(b), + SPATIAL INDEX sp_idx2(c) + ) $CHILD2_2_GM_ENGINE $CHILD2_2_GM_CHARSET; +let $CHILD2_2_SELECT_GM_TABLES= + SELECT a, b, c FROM gm_r3 ORDER BY a; +let $CHILD2_2_DROP_LOCK_TABLES1= + DROP TABLE IF EXISTS t1_2; +let $CHILD2_2_CREATE_LOCK_TABLES1= + CREATE TABLE t1_2 ( + id int(11) NOT NULL, + PRIMARY KEY (id) + ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET; +let $CHILD2_2_DROP_LOCK_TABLES2= + DROP TABLE IF EXISTS t2_1; +let $CHILD2_2_CREATE_LOCK_TABLES2= + CREATE TABLE t2_1 ( + id int(11) NOT NULL, + PRIMARY KEY (id) + ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET; +let $CHILD2_2_DROP_INCREMENT_TABLES1= + DROP TABLE IF EXISTS t1_2; +let $CHILD2_2_CREATE_INCREMENT_TABLES1= + CREATE TABLE t1_2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET; +let $CHILD2_2_SELECT_INCREMENT_TABLES1= + SELECT id FROM t1_2 ORDER BY id; +let $CHILD2_2_AUTO_INCREMENT_INCREMENT1= + SET GLOBAL AUTO_INCREMENT_INCREMENT = 1; +let $CHILD2_2_AUTO_INCREMENT_INCREMENT2= + SET GLOBAL AUTO_INCREMENT_INCREMENT = 4; +let $CHILD2_2_AUTO_INCREMENT_OFFSET1= + SET GLOBAL AUTO_INCREMENT_OFFSET = 1; +let $CHILD2_2_AUTO_INCREMENT_OFFSET2= + SET GLOBAL AUTO_INCREMENT_OFFSET = 3; diff --git a/storage/spider/mysql-test/spider/handler/include/init_child2_3.inc b/storage/spider/mysql-test/spider/handler/include/init_child2_3.inc index d857a787ac0..05dbb1c3dd1 100644 --- a/storage/spider/mysql-test/spider/handler/include/init_child2_3.inc +++ b/storage/spider/mysql-test/spider/handler/include/init_child2_3.inc @@ -1,11 +1,11 @@ -let $CHILD2_3_DROP_TABLES=
- DROP TABLE IF EXISTS ta_r4;
-let $CHILD2_3_CREATE_TABLES=
- CREATE TABLE ta_r4 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD2_3_ENGINE $CHILD2_3_CHARSET;
-let $CHILD2_3_SELECT_TABLES=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r4 ORDER BY a;
+let $CHILD2_3_DROP_TABLES= + DROP TABLE IF EXISTS ta_r4; +let $CHILD2_3_CREATE_TABLES= + CREATE TABLE ta_r4 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD2_3_ENGINE $CHILD2_3_CHARSET; +let $CHILD2_3_SELECT_TABLES= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r4 ORDER BY a; diff --git a/storage/spider/mysql-test/spider/handler/include/init_slave1_1.inc b/storage/spider/mysql-test/spider/handler/include/init_slave1_1.inc index 87c05f1f690..73c3c6b9ef2 100644 --- a/storage/spider/mysql-test/spider/handler/include/init_slave1_1.inc +++ b/storage/spider/mysql-test/spider/handler/include/init_slave1_1.inc @@ -1,10 +1,10 @@ -let $SLAVE1_1_COMMENT_INCREMENT1_1=
- COMMENT '';
-let $SLAVE1_1_COMMENT_INCREMENT1_P_1=
- COMMENT ''
- PARTITION BY LIST(MOD(id, 2)) (
- PARTITION pt1 VALUES IN (0)
- COMMENT='',
- PARTITION pt2 VALUES IN (1)
- COMMENT=''
- );
+let $SLAVE1_1_COMMENT_INCREMENT1_1= + COMMENT ''; +let $SLAVE1_1_COMMENT_INCREMENT1_P_1= + COMMENT '' + PARTITION BY LIST(MOD(id, 2)) ( + PARTITION pt1 VALUES IN (0) + COMMENT='', + PARTITION pt2 VALUES IN (1) + COMMENT='' + ); diff --git a/storage/spider/mysql-test/spider/handler/t/direct_aggregate.test b/storage/spider/mysql-test/spider/handler/t/direct_aggregate.test index 5f17ac402e2..d65f4c5a624 100644 --- a/storage/spider/mysql-test/spider/handler/t/direct_aggregate.test +++ b/storage/spider/mysql-test/spider/handler/t/direct_aggregate.test @@ -1,179 +1,179 @@ ---disable_warnings
---disable_query_log
---disable_result_log
---source test_init.inc
---enable_result_log
---enable_query_log
-
---echo
---echo drop and create databases
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- CREATE DATABASE auto_test_remote;
- USE auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
- CREATE DATABASE auto_test_remote2;
- USE auto_test_remote2;
-}
---enable_warnings
-
---echo
---echo test select 1
---connection master_1
-SELECT 1;
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- SELECT 1;
- --connection child2_2
- SELECT 1;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo create table select test
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_DROP_TABLES;
- echo CHILD2_1_CREATE_TABLES;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_TABLES;
- --enable_warnings
- eval $CHILD2_1_CREATE_TABLES;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
---disable_warnings
-DROP TABLE IF EXISTS ta_l;
---enable_warnings
---disable_query_log
-echo CREATE TABLE ta_l (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
-eval CREATE TABLE ta_l (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
-) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
---enable_query_log
-INSERT INTO ta_l (a, b, c) VALUES
- (1, 'a', '2008-08-01 10:21:39'),
- (2, 'b', '2000-01-01 00:00:00'),
- (3, 'e', '2007-06-04 20:03:11'),
- (4, 'd', '2003-11-30 05:01:03'),
- (5, 'c', '2001-12-31 23:59:59');
-
---echo
---echo direct_aggregating test
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-SELECT COUNT(*) FROM ta_l;
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-SELECT MAX(a) FROM ta_l;
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-SELECT MIN(a) FROM ta_l;
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-SELECT MAX(a) FROM ta_l WHERE a < 5;
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-SELECT MIN(a) FROM ta_l WHERE a > 1;
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo deinit
---disable_warnings
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
-}
---disable_query_log
---disable_result_log
---source test_deinit.inc
---enable_result_log
---enable_query_log
---enable_warnings
---echo
---echo end of test
+--disable_warnings +--disable_query_log +--disable_result_log +--source test_init.inc +--enable_result_log +--enable_query_log + +--echo +--echo drop and create databases +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +CREATE DATABASE auto_test_local; +USE auto_test_local; +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + CREATE DATABASE auto_test_remote; + USE auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; + CREATE DATABASE auto_test_remote2; + USE auto_test_remote2; +} +--enable_warnings + +--echo +--echo test select 1 +--connection master_1 +SELECT 1; +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + SELECT 1; + --connection child2_2 + SELECT 1; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + +--echo +--echo create table select test +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_DROP_TABLES; + echo CHILD2_1_CREATE_TABLES; + } + --disable_warnings + eval $CHILD2_1_DROP_TABLES; + --enable_warnings + eval $CHILD2_1_CREATE_TABLES; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} +--connection master_1 +--disable_warnings +DROP TABLE IF EXISTS ta_l; +--enable_warnings +--disable_query_log +echo CREATE TABLE ta_l ( + a INT, + b CHAR(1), + c DATETIME, + PRIMARY KEY(a) +) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1; +eval CREATE TABLE ta_l ( + a INT, + b CHAR(1), + c DATETIME, + PRIMARY KEY(a) +) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1; +--enable_query_log +INSERT INTO ta_l (a, b, c) VALUES + (1, 'a', '2008-08-01 10:21:39'), + (2, 'b', '2000-01-01 00:00:00'), + (3, 'e', '2007-06-04 20:03:11'), + (4, 'd', '2003-11-30 05:01:03'), + (5, 'c', '2001-12-31 23:59:59'); + +--echo +--echo direct_aggregating test +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} +--connection master_1 +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +SELECT COUNT(*) FROM ta_l; +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +SELECT MAX(a) FROM ta_l; +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +SELECT MIN(a) FROM ta_l; +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +SELECT MAX(a) FROM ta_l WHERE a < 5; +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +SELECT MIN(a) FROM ta_l WHERE a > 1; +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %'; + } + eval $CHILD2_1_SELECT_TABLES; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + +--echo +--echo deinit +--disable_warnings +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; +} +--disable_query_log +--disable_result_log +--source test_deinit.inc +--enable_result_log +--enable_query_log +--enable_warnings +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/handler/t/direct_aggregate_part.test b/storage/spider/mysql-test/spider/handler/t/direct_aggregate_part.test index 2d67e9af32c..aebf210c745 100644 --- a/storage/spider/mysql-test/spider/handler/t/direct_aggregate_part.test +++ b/storage/spider/mysql-test/spider/handler/t/direct_aggregate_part.test @@ -1,192 +1,192 @@ ---disable_warnings
---disable_query_log
---disable_result_log
---source test_init.inc
---enable_result_log
---enable_query_log
-if (!$HAVE_PARTITION)
-{
- --disable_query_log
- --disable_result_log
- --source test_deinit.inc
- --enable_result_log
- --enable_query_log
- --enable_warnings
- skip Test requires partitioning;
-}
-
---echo
---echo drop and create databases
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- CREATE DATABASE auto_test_remote;
- USE auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
- CREATE DATABASE auto_test_remote2;
- USE auto_test_remote2;
-}
---enable_warnings
-
---echo
---echo test select 1
---connection master_1
-SELECT 1;
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- SELECT 1;
- --connection child2_2
- SELECT 1;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo with partition test
-if ($HAVE_PARTITION)
-{
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_2
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_2_DROP_TABLES;
- echo CHILD2_2_CREATE_TABLES;
- }
- --disable_warnings
- eval $CHILD2_2_DROP_TABLES;
- --enable_warnings
- eval $CHILD2_2_CREATE_TABLES;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_DROP_TABLES2;
- echo CHILD2_1_CREATE_TABLES2;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_TABLES2;
- --enable_warnings
- eval $CHILD2_1_CREATE_TABLES2;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- --connection master_1
- --disable_query_log
- echo CREATE TABLE ta_l2 (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
- ) MASTER_1_ENGINE MASTER_1_COMMENT2_P_2_1;
- eval CREATE TABLE ta_l2 (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
- ) $MASTER_1_ENGINE $MASTER_1_COMMENT2_P_2_1;
- INSERT INTO ta_l2 (a, b, c) VALUES
- (1, 'a', '2008-08-01 10:21:39'),
- (2, 'b', '2000-01-01 00:00:00'),
- (3, 'e', '2007-06-04 20:03:11'),
- (4, 'd', '2003-11-30 05:01:03'),
- (5, 'c', '2001-12-31 23:59:59');
- --enable_query_log
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- SELECT COUNT(*) FROM ta_l2;
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- SELECT MAX(a) FROM ta_l2;
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- SELECT MIN(a) FROM ta_l2;
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- SELECT MAX(a) FROM ta_l2 WHERE a < 5;
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- SELECT MIN(a) FROM ta_l2 WHERE a > 1;
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %';
- }
- eval $CHILD2_2_SELECT_TABLES;
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %';
- }
- eval $CHILD2_1_SELECT_TABLES2;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
-}
-
---echo
---echo deinit
---disable_warnings
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
-}
---disable_query_log
---disable_result_log
---source test_deinit.inc
---enable_result_log
---enable_query_log
---enable_warnings
---echo
---echo end of test
+--disable_warnings +--disable_query_log +--disable_result_log +--source test_init.inc +--enable_result_log +--enable_query_log +if (!$HAVE_PARTITION) +{ + --disable_query_log + --disable_result_log + --source test_deinit.inc + --enable_result_log + --enable_query_log + --enable_warnings + skip Test requires partitioning; +} + +--echo +--echo drop and create databases +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +CREATE DATABASE auto_test_local; +USE auto_test_local; +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + CREATE DATABASE auto_test_remote; + USE auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; + CREATE DATABASE auto_test_remote2; + USE auto_test_remote2; +} +--enable_warnings + +--echo +--echo test select 1 +--connection master_1 +SELECT 1; +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + SELECT 1; + --connection child2_2 + SELECT 1; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + +--echo +--echo with partition test +if ($HAVE_PARTITION) +{ + if ($USE_CHILD_GROUP2) + { + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_2 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_2_DROP_TABLES; + echo CHILD2_2_CREATE_TABLES; + } + --disable_warnings + eval $CHILD2_2_DROP_TABLES; + --enable_warnings + eval $CHILD2_2_CREATE_TABLES; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + --connection child2_1 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_DROP_TABLES2; + echo CHILD2_1_CREATE_TABLES2; + } + --disable_warnings + eval $CHILD2_1_DROP_TABLES2; + --enable_warnings + eval $CHILD2_1_CREATE_TABLES2; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } + } + --connection master_1 + --disable_query_log + echo CREATE TABLE ta_l2 ( + a INT, + b CHAR(1), + c DATETIME, + PRIMARY KEY(a) + ) MASTER_1_ENGINE MASTER_1_COMMENT2_P_2_1; + eval CREATE TABLE ta_l2 ( + a INT, + b CHAR(1), + c DATETIME, + PRIMARY KEY(a) + ) $MASTER_1_ENGINE $MASTER_1_COMMENT2_P_2_1; + INSERT INTO ta_l2 (a, b, c) VALUES + (1, 'a', '2008-08-01 10:21:39'), + (2, 'b', '2000-01-01 00:00:00'), + (3, 'e', '2007-06-04 20:03:11'), + (4, 'd', '2003-11-30 05:01:03'), + (5, 'c', '2001-12-31 23:59:59'); + --enable_query_log + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + SELECT COUNT(*) FROM ta_l2; + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + SELECT MAX(a) FROM ta_l2; + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + SELECT MIN(a) FROM ta_l2; + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + SELECT MAX(a) FROM ta_l2 WHERE a < 5; + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + SELECT MIN(a) FROM ta_l2 WHERE a > 1; + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + if ($USE_CHILD_GROUP2) + { + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_2 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %'; + } + eval $CHILD2_2_SELECT_TABLES; + --connection child2_1 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %'; + } + eval $CHILD2_1_SELECT_TABLES2; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } + } +} + +--echo +--echo deinit +--disable_warnings +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; +} +--disable_query_log +--disable_result_log +--source test_deinit.inc +--enable_result_log +--enable_query_log +--enable_warnings +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/handler/t/have_partition.inc b/storage/spider/mysql-test/spider/handler/t/have_partition.inc index 573c76ab43b..b6e699475db 100644 --- a/storage/spider/mysql-test/spider/handler/t/have_partition.inc +++ b/storage/spider/mysql-test/spider/handler/t/have_partition.inc @@ -1,7 +1,7 @@ -let $HAVE_PARTITION= 0;
-if (`SELECT count(*) FROM information_schema.plugins WHERE
- plugin_status = 'ACTIVE' AND
- plugin_name = 'partition'`)
-{
- let $HAVE_PARTITION= 1;
-}
+let $HAVE_PARTITION= 0; +if (`SELECT count(*) FROM information_schema.plugins WHERE + plugin_status = 'ACTIVE' AND + plugin_name = 'partition'`) +{ + let $HAVE_PARTITION= 1; +} diff --git a/storage/spider/mysql-test/spider/handler/t/have_trigger.inc b/storage/spider/mysql-test/spider/handler/t/have_trigger.inc index 10c0871dd5f..32de484b388 100644 --- a/storage/spider/mysql-test/spider/handler/t/have_trigger.inc +++ b/storage/spider/mysql-test/spider/handler/t/have_trigger.inc @@ -1,2 +1,2 @@ -let $HAVE_TRIGGER= `SELECT COUNT(*) FROM information_schema.tables
- WHERE TABLE_SCHEMA = 'information_schema' AND TABLE_NAME = 'TRIGGERS'`;
+let $HAVE_TRIGGER= `SELECT COUNT(*) FROM information_schema.tables + WHERE TABLE_SCHEMA = 'information_schema' AND TABLE_NAME = 'TRIGGERS'`; diff --git a/storage/spider/mysql-test/spider/handler/t/spider3_fixes.test b/storage/spider/mysql-test/spider/handler/t/spider3_fixes.test index 7530ce97837..13fa6f5fa39 100644 --- a/storage/spider/mysql-test/spider/handler/t/spider3_fixes.test +++ b/storage/spider/mysql-test/spider/handler/t/spider3_fixes.test @@ -1,292 +1,292 @@ -# This test tests for Spider 3.0's bug fixes
-source include/have_log_bin.inc;
---disable_warnings
---disable_query_log
---disable_result_log
---source test_init.inc
---source slave_test_init.inc
---enable_result_log
---enable_query_log
-
---echo
---echo drop and create databases
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-if ($USE_REPLICATION)
-{
- --connection slave1_1
- DROP DATABASE IF EXISTS auto_test_local;
- CREATE DATABASE auto_test_local;
- USE auto_test_local;
-}
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- CREATE DATABASE auto_test_remote;
- USE auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
- CREATE DATABASE auto_test_remote2;
- USE auto_test_remote2;
-}
---enable_warnings
-
---echo
---echo test select 1
---connection master_1
-SELECT 1;
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- SELECT 1;
- --connection child2_2
- SELECT 1;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
-
---echo
---echo 3.1
---echo auto_increment
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_DROP_INCREMENT_TABLES1;
- echo CHILD2_1_CREATE_INCREMENT_TABLES1;
- echo CHILD2_1_AUTO_INCREMENT_INCREMENT2;
- echo CHILD2_1_AUTO_INCREMENT_OFFSET2;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_INCREMENT_TABLES1;
- --enable_warnings
- eval $CHILD2_1_CREATE_INCREMENT_TABLES1;
- eval $CHILD2_1_AUTO_INCREMENT_INCREMENT2;
- eval $CHILD2_1_AUTO_INCREMENT_OFFSET2;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-if ($USE_REPLICATION)
-{
- save_master_pos;
- --connection slave1_1
- sync_with_master;
- --connection master_1
- --disable_query_log
- SET SESSION sql_log_bin= 0;
- --enable_query_log
-}
---disable_warnings
-DROP TABLE IF EXISTS t1, t2;
---enable_warnings
---disable_query_log
-echo CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_1;
-echo CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_1;
-echo MASTER_1_AUTO_INCREMENT_INCREMENT2;
-echo MASTER_1_AUTO_INCREMENT_OFFSET2;
-eval CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
-) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_1;
-eval CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
-) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_1;
-eval $MASTER_1_AUTO_INCREMENT_INCREMENT2;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET2;
-if ($USE_REPLICATION)
-{
- SET SESSION sql_log_bin= 1;
- --connection slave1_1
- --disable_warnings
- DROP TABLE IF EXISTS t1, t2;
- --enable_warnings
- echo CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_1;
- echo CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_1;
- eval CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_1;
- eval CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_1;
- --connection master_1
-}
---enable_query_log
-INSERT INTO t1 () VALUES ();
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
-INSERT INTO t2 () VALUES ();
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t2;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET3;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
---enable_query_log
-INSERT INTO t1 (id) VALUES (null);
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET4;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
---enable_query_log
-INSERT INTO t2 (id) VALUES (null);
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t2;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET3;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
---enable_query_log
-INSERT INTO t1 () VALUES (),(),(),();
-SELECT LAST_INSERT_ID();
-SELECT id FROM t1 ORDER BY id;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET4;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
---enable_query_log
-INSERT INTO t2 () VALUES (),(),(),();
-SELECT LAST_INSERT_ID();
-SELECT id FROM t2 ORDER BY id;
-TRUNCATE TABLE t1;
-TRUNCATE TABLE t2;
-INSERT INTO t1 () VALUES (),(),(),();
-SELECT LAST_INSERT_ID();
-SELECT id FROM t1 ORDER BY id;
-INSERT INTO t2 () VALUES (),(),(),();
-SELECT LAST_INSERT_ID();
-SELECT id FROM t2 ORDER BY id;
-SET INSERT_ID=5000;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET3;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
---enable_query_log
-INSERT INTO t1 () VALUES ();
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET4;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
---enable_query_log
-INSERT INTO t2 () VALUES ();
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t2;
-INSERT INTO t1 (id) VALUES (10000);
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
-INSERT INTO t2 (id) VALUES (1000);
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t2;
-if ($USE_REPLICATION)
-{
- save_master_pos;
- --connection slave1_1
- sync_with_master;
- SELECT id FROM t1 ORDER BY id;
- --connection master_1
- --disable_query_log
- SET SESSION sql_log_bin= 0;
- --enable_query_log
-}
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %';
- }
- eval $CHILD2_1_SELECT_INCREMENT_TABLES1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_AUTO_INCREMENT_INCREMENT1;
- echo CHILD2_1_AUTO_INCREMENT_OFFSET1;
- }
- eval $CHILD2_1_AUTO_INCREMENT_INCREMENT1;
- eval $CHILD2_1_AUTO_INCREMENT_OFFSET1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
-
---echo
---echo deinit
---disable_warnings
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-if ($USE_REPLICATION)
-{
- --connection slave1_1
- DROP DATABASE IF EXISTS auto_test_local;
-}
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
-}
---disable_query_log
---disable_result_log
---source slave_test_deinit.inc
---source test_deinit.inc
---enable_result_log
---enable_query_log
---enable_warnings
---echo
---echo end of test
+# This test tests for Spider 3.0's bug fixes +source include/have_log_bin.inc; +--disable_warnings +--disable_query_log +--disable_result_log +--source test_init.inc +--source slave_test_init.inc +--enable_result_log +--enable_query_log + +--echo +--echo drop and create databases +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +CREATE DATABASE auto_test_local; +USE auto_test_local; +if ($USE_REPLICATION) +{ + --connection slave1_1 + DROP DATABASE IF EXISTS auto_test_local; + CREATE DATABASE auto_test_local; + USE auto_test_local; +} +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + CREATE DATABASE auto_test_remote; + USE auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; + CREATE DATABASE auto_test_remote2; + USE auto_test_remote2; +} +--enable_warnings + +--echo +--echo test select 1 +--connection master_1 +SELECT 1; +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + SELECT 1; + --connection child2_2 + SELECT 1; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + + +--echo +--echo 3.1 +--echo auto_increment +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_DROP_INCREMENT_TABLES1; + echo CHILD2_1_CREATE_INCREMENT_TABLES1; + echo CHILD2_1_AUTO_INCREMENT_INCREMENT2; + echo CHILD2_1_AUTO_INCREMENT_OFFSET2; + } + --disable_warnings + eval $CHILD2_1_DROP_INCREMENT_TABLES1; + --enable_warnings + eval $CHILD2_1_CREATE_INCREMENT_TABLES1; + eval $CHILD2_1_AUTO_INCREMENT_INCREMENT2; + eval $CHILD2_1_AUTO_INCREMENT_OFFSET2; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} +--connection master_1 +if ($USE_REPLICATION) +{ + save_master_pos; + --connection slave1_1 + sync_with_master; + --connection master_1 + --disable_query_log + SET SESSION sql_log_bin= 0; + --enable_query_log +} +--disable_warnings +DROP TABLE IF EXISTS t1, t2; +--enable_warnings +--disable_query_log +echo CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) +) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_1; +echo CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) +) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_1; +echo MASTER_1_AUTO_INCREMENT_INCREMENT2; +echo MASTER_1_AUTO_INCREMENT_OFFSET2; +eval CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) +) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_1; +eval CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) +) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_1; +eval $MASTER_1_AUTO_INCREMENT_INCREMENT2; +eval $MASTER_1_AUTO_INCREMENT_OFFSET2; +if ($USE_REPLICATION) +{ + SET SESSION sql_log_bin= 1; + --connection slave1_1 + --disable_warnings + DROP TABLE IF EXISTS t1, t2; + --enable_warnings + echo CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_1; + echo CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_1; + eval CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_1; + eval CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_1; + --connection master_1 +} +--enable_query_log +INSERT INTO t1 () VALUES (); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t1; +INSERT INTO t2 () VALUES (); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t2; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET3; +eval $MASTER_1_AUTO_INCREMENT_OFFSET3; +--enable_query_log +INSERT INTO t1 (id) VALUES (null); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t1; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET4; +eval $MASTER_1_AUTO_INCREMENT_OFFSET4; +--enable_query_log +INSERT INTO t2 (id) VALUES (null); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t2; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET3; +eval $MASTER_1_AUTO_INCREMENT_OFFSET3; +--enable_query_log +INSERT INTO t1 () VALUES (),(),(),(); +SELECT LAST_INSERT_ID(); +SELECT id FROM t1 ORDER BY id; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET4; +eval $MASTER_1_AUTO_INCREMENT_OFFSET4; +--enable_query_log +INSERT INTO t2 () VALUES (),(),(),(); +SELECT LAST_INSERT_ID(); +SELECT id FROM t2 ORDER BY id; +TRUNCATE TABLE t1; +TRUNCATE TABLE t2; +INSERT INTO t1 () VALUES (),(),(),(); +SELECT LAST_INSERT_ID(); +SELECT id FROM t1 ORDER BY id; +INSERT INTO t2 () VALUES (),(),(),(); +SELECT LAST_INSERT_ID(); +SELECT id FROM t2 ORDER BY id; +SET INSERT_ID=5000; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET3; +eval $MASTER_1_AUTO_INCREMENT_OFFSET3; +--enable_query_log +INSERT INTO t1 () VALUES (); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t1; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET4; +eval $MASTER_1_AUTO_INCREMENT_OFFSET4; +--enable_query_log +INSERT INTO t2 () VALUES (); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t2; +INSERT INTO t1 (id) VALUES (10000); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t1; +INSERT INTO t2 (id) VALUES (1000); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t2; +if ($USE_REPLICATION) +{ + save_master_pos; + --connection slave1_1 + sync_with_master; + SELECT id FROM t1 ORDER BY id; + --connection master_1 + --disable_query_log + SET SESSION sql_log_bin= 0; + --enable_query_log +} +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %'; + } + eval $CHILD2_1_SELECT_INCREMENT_TABLES1; + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_AUTO_INCREMENT_INCREMENT1; + echo CHILD2_1_AUTO_INCREMENT_OFFSET1; + } + eval $CHILD2_1_AUTO_INCREMENT_INCREMENT1; + eval $CHILD2_1_AUTO_INCREMENT_OFFSET1; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + + +--echo +--echo deinit +--disable_warnings +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +if ($USE_REPLICATION) +{ + --connection slave1_1 + DROP DATABASE IF EXISTS auto_test_local; +} +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; +} +--disable_query_log +--disable_result_log +--source slave_test_deinit.inc +--source test_deinit.inc +--enable_result_log +--enable_query_log +--enable_warnings +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/handler/t/spider3_fixes_part.test b/storage/spider/mysql-test/spider/handler/t/spider3_fixes_part.test index f25f000d80c..3288c490a46 100644 --- a/storage/spider/mysql-test/spider/handler/t/spider3_fixes_part.test +++ b/storage/spider/mysql-test/spider/handler/t/spider3_fixes_part.test @@ -1,345 +1,345 @@ -# This test tests for Spider 3.0's bug fixes
-source include/have_log_bin.inc;
---disable_warnings
---disable_query_log
---disable_result_log
---source test_init.inc
---source slave_test_init.inc
---enable_result_log
---enable_query_log
-if (!$HAVE_PARTITION)
-{
- --disable_query_log
- --disable_result_log
- --source slave_test_deinit.inc
- --source test_deinit.inc
- --enable_result_log
- --enable_query_log
- --enable_warnings
- skip Test requires partitioning;
-}
-
---echo
---echo drop and create databases
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-if ($USE_REPLICATION)
-{
- --connection slave1_1
- DROP DATABASE IF EXISTS auto_test_local;
- CREATE DATABASE auto_test_local;
- USE auto_test_local;
-}
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- CREATE DATABASE auto_test_remote;
- USE auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
- CREATE DATABASE auto_test_remote2;
- USE auto_test_remote2;
-}
---enable_warnings
-
---echo
---echo test select 1
---connection master_1
-SELECT 1;
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- SELECT 1;
- --connection child2_2
- SELECT 1;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
-
---echo auto_increment with partition
-if ($HAVE_PARTITION)
-{
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_DROP_INCREMENT_TABLES1;
- echo CHILD2_1_CREATE_INCREMENT_TABLES1;
- echo CHILD2_1_AUTO_INCREMENT_INCREMENT2;
- echo CHILD2_1_AUTO_INCREMENT_OFFSET2;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_INCREMENT_TABLES1;
- --enable_warnings
- eval $CHILD2_1_CREATE_INCREMENT_TABLES1;
- eval $CHILD2_1_AUTO_INCREMENT_INCREMENT2;
- eval $CHILD2_1_AUTO_INCREMENT_OFFSET2;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- --connection child2_2
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_2_DROP_INCREMENT_TABLES1;
- echo CHILD2_2_CREATE_INCREMENT_TABLES1;
- echo CHILD2_2_AUTO_INCREMENT_INCREMENT2;
- echo CHILD2_2_AUTO_INCREMENT_OFFSET2;
- }
- --disable_warnings
- eval $CHILD2_2_DROP_INCREMENT_TABLES1;
- --enable_warnings
- eval $CHILD2_2_CREATE_INCREMENT_TABLES1;
- eval $CHILD2_2_AUTO_INCREMENT_INCREMENT2;
- eval $CHILD2_2_AUTO_INCREMENT_OFFSET2;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- --connection master_1
- if ($USE_REPLICATION)
- {
- save_master_pos;
- --connection slave1_1
- sync_with_master;
- --connection master_1
- --disable_query_log
- SET SESSION sql_log_bin= 0;
- --enable_query_log
- }
- --disable_warnings
- DROP TABLE IF EXISTS t1, t2;
- --enable_warnings
- --disable_query_log
- echo CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_P_1;
- echo CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_P_1;
- echo MASTER_1_AUTO_INCREMENT_INCREMENT2;
- echo MASTER_1_AUTO_INCREMENT_OFFSET2;
- eval CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_P_1;
- eval CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_P_1;
- eval $MASTER_1_AUTO_INCREMENT_INCREMENT2;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET2;
- if ($USE_REPLICATION)
- {
- SET SESSION sql_log_bin= 1;
- --connection slave1_1
- --disable_warnings
- DROP TABLE IF EXISTS t1, t2;
- --enable_warnings
- echo CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_P_1;
- echo CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_P_1;
- eval CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_P_1;
- eval CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_P_1;
- --connection master_1
- }
- --enable_query_log
- INSERT INTO t1 () VALUES ();
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- INSERT INTO t2 () VALUES ();
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t2;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET3;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
- --enable_query_log
- INSERT INTO t1 (id) VALUES (null);
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET4;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
- --enable_query_log
- INSERT INTO t2 (id) VALUES (null);
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t2;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET3;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
- --enable_query_log
- INSERT INTO t1 () VALUES (),(),(),();
- SELECT LAST_INSERT_ID();
- SELECT id FROM t1 ORDER BY id;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET4;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
- --enable_query_log
- INSERT INTO t2 () VALUES (),(),(),();
- SELECT LAST_INSERT_ID();
- SELECT id FROM t2 ORDER BY id;
- TRUNCATE TABLE t1;
- TRUNCATE TABLE t2;
- INSERT INTO t1 () VALUES (),(),(),();
- SELECT LAST_INSERT_ID();
- SELECT id FROM t1 ORDER BY id;
- INSERT INTO t2 () VALUES (),(),(),();
- SELECT LAST_INSERT_ID();
- SELECT id FROM t2 ORDER BY id;
- SET INSERT_ID=5000;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET3;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
- --enable_query_log
- INSERT INTO t1 () VALUES ();
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET4;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
- --enable_query_log
- INSERT INTO t2 () VALUES ();
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t2;
- INSERT INTO t1 (id) VALUES (10000);
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- INSERT INTO t2 (id) VALUES (1000);
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t2;
- if ($USE_REPLICATION)
- {
- save_master_pos;
- --connection slave1_1
- sync_with_master;
- SELECT id FROM t1 ORDER BY id;
- --connection master_1
- --disable_query_log
- SET SESSION sql_log_bin= 0;
- --enable_query_log
- }
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %';
- }
- eval $CHILD2_1_SELECT_INCREMENT_TABLES1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_AUTO_INCREMENT_INCREMENT1;
- echo CHILD2_1_AUTO_INCREMENT_OFFSET1;
- }
- eval $CHILD2_1_AUTO_INCREMENT_INCREMENT1;
- eval $CHILD2_1_AUTO_INCREMENT_OFFSET1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %';
- }
- eval $CHILD2_2_SELECT_INCREMENT_TABLES1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_2_AUTO_INCREMENT_INCREMENT1;
- echo CHILD2_2_AUTO_INCREMENT_OFFSET1;
- }
- eval $CHILD2_2_AUTO_INCREMENT_INCREMENT1;
- eval $CHILD2_2_AUTO_INCREMENT_OFFSET1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
-}
-
-
---echo
---echo deinit
---disable_warnings
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-if ($USE_REPLICATION)
-{
- --connection slave1_1
- DROP DATABASE IF EXISTS auto_test_local;
-}
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
-}
---disable_query_log
---disable_result_log
---source slave_test_deinit.inc
---source test_deinit.inc
---enable_result_log
---enable_query_log
---enable_warnings
---echo
---echo end of test
+# This test tests for Spider 3.0's bug fixes +source include/have_log_bin.inc; +--disable_warnings +--disable_query_log +--disable_result_log +--source test_init.inc +--source slave_test_init.inc +--enable_result_log +--enable_query_log +if (!$HAVE_PARTITION) +{ + --disable_query_log + --disable_result_log + --source slave_test_deinit.inc + --source test_deinit.inc + --enable_result_log + --enable_query_log + --enable_warnings + skip Test requires partitioning; +} + +--echo +--echo drop and create databases +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +CREATE DATABASE auto_test_local; +USE auto_test_local; +if ($USE_REPLICATION) +{ + --connection slave1_1 + DROP DATABASE IF EXISTS auto_test_local; + CREATE DATABASE auto_test_local; + USE auto_test_local; +} +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + CREATE DATABASE auto_test_remote; + USE auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; + CREATE DATABASE auto_test_remote2; + USE auto_test_remote2; +} +--enable_warnings + +--echo +--echo test select 1 +--connection master_1 +SELECT 1; +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + SELECT 1; + --connection child2_2 + SELECT 1; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + + +--echo auto_increment with partition +if ($HAVE_PARTITION) +{ + if ($USE_CHILD_GROUP2) + { + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_DROP_INCREMENT_TABLES1; + echo CHILD2_1_CREATE_INCREMENT_TABLES1; + echo CHILD2_1_AUTO_INCREMENT_INCREMENT2; + echo CHILD2_1_AUTO_INCREMENT_OFFSET2; + } + --disable_warnings + eval $CHILD2_1_DROP_INCREMENT_TABLES1; + --enable_warnings + eval $CHILD2_1_CREATE_INCREMENT_TABLES1; + eval $CHILD2_1_AUTO_INCREMENT_INCREMENT2; + eval $CHILD2_1_AUTO_INCREMENT_OFFSET2; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + --connection child2_2 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_2_DROP_INCREMENT_TABLES1; + echo CHILD2_2_CREATE_INCREMENT_TABLES1; + echo CHILD2_2_AUTO_INCREMENT_INCREMENT2; + echo CHILD2_2_AUTO_INCREMENT_OFFSET2; + } + --disable_warnings + eval $CHILD2_2_DROP_INCREMENT_TABLES1; + --enable_warnings + eval $CHILD2_2_CREATE_INCREMENT_TABLES1; + eval $CHILD2_2_AUTO_INCREMENT_INCREMENT2; + eval $CHILD2_2_AUTO_INCREMENT_OFFSET2; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } + } + --connection master_1 + if ($USE_REPLICATION) + { + save_master_pos; + --connection slave1_1 + sync_with_master; + --connection master_1 + --disable_query_log + SET SESSION sql_log_bin= 0; + --enable_query_log + } + --disable_warnings + DROP TABLE IF EXISTS t1, t2; + --enable_warnings + --disable_query_log + echo CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_P_1; + echo CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_P_1; + echo MASTER_1_AUTO_INCREMENT_INCREMENT2; + echo MASTER_1_AUTO_INCREMENT_OFFSET2; + eval CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_P_1; + eval CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_P_1; + eval $MASTER_1_AUTO_INCREMENT_INCREMENT2; + eval $MASTER_1_AUTO_INCREMENT_OFFSET2; + if ($USE_REPLICATION) + { + SET SESSION sql_log_bin= 1; + --connection slave1_1 + --disable_warnings + DROP TABLE IF EXISTS t1, t2; + --enable_warnings + echo CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_P_1; + echo CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_P_1; + eval CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_P_1; + eval CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_P_1; + --connection master_1 + } + --enable_query_log + INSERT INTO t1 () VALUES (); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t1; + INSERT INTO t2 () VALUES (); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t2; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET3; + eval $MASTER_1_AUTO_INCREMENT_OFFSET3; + --enable_query_log + INSERT INTO t1 (id) VALUES (null); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t1; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET4; + eval $MASTER_1_AUTO_INCREMENT_OFFSET4; + --enable_query_log + INSERT INTO t2 (id) VALUES (null); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t2; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET3; + eval $MASTER_1_AUTO_INCREMENT_OFFSET3; + --enable_query_log + INSERT INTO t1 () VALUES (),(),(),(); + SELECT LAST_INSERT_ID(); + SELECT id FROM t1 ORDER BY id; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET4; + eval $MASTER_1_AUTO_INCREMENT_OFFSET4; + --enable_query_log + INSERT INTO t2 () VALUES (),(),(),(); + SELECT LAST_INSERT_ID(); + SELECT id FROM t2 ORDER BY id; + TRUNCATE TABLE t1; + TRUNCATE TABLE t2; + INSERT INTO t1 () VALUES (),(),(),(); + SELECT LAST_INSERT_ID(); + SELECT id FROM t1 ORDER BY id; + INSERT INTO t2 () VALUES (),(),(),(); + SELECT LAST_INSERT_ID(); + SELECT id FROM t2 ORDER BY id; + SET INSERT_ID=5000; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET3; + eval $MASTER_1_AUTO_INCREMENT_OFFSET3; + --enable_query_log + INSERT INTO t1 () VALUES (); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t1; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET4; + eval $MASTER_1_AUTO_INCREMENT_OFFSET4; + --enable_query_log + INSERT INTO t2 () VALUES (); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t2; + INSERT INTO t1 (id) VALUES (10000); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t1; + INSERT INTO t2 (id) VALUES (1000); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t2; + if ($USE_REPLICATION) + { + save_master_pos; + --connection slave1_1 + sync_with_master; + SELECT id FROM t1 ORDER BY id; + --connection master_1 + --disable_query_log + SET SESSION sql_log_bin= 0; + --enable_query_log + } + if ($USE_CHILD_GROUP2) + { + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %'; + } + eval $CHILD2_1_SELECT_INCREMENT_TABLES1; + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_AUTO_INCREMENT_INCREMENT1; + echo CHILD2_1_AUTO_INCREMENT_OFFSET1; + } + eval $CHILD2_1_AUTO_INCREMENT_INCREMENT1; + eval $CHILD2_1_AUTO_INCREMENT_OFFSET1; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + --connection child2_2 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %'; + } + eval $CHILD2_2_SELECT_INCREMENT_TABLES1; + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_2_AUTO_INCREMENT_INCREMENT1; + echo CHILD2_2_AUTO_INCREMENT_OFFSET1; + } + eval $CHILD2_2_AUTO_INCREMENT_INCREMENT1; + eval $CHILD2_2_AUTO_INCREMENT_OFFSET1; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } + } +} + + +--echo +--echo deinit +--disable_warnings +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +if ($USE_REPLICATION) +{ + --connection slave1_1 + DROP DATABASE IF EXISTS auto_test_local; +} +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; +} +--disable_query_log +--disable_result_log +--source slave_test_deinit.inc +--source test_deinit.inc +--enable_result_log +--enable_query_log +--enable_warnings +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/include/deinit_child2_1.inc b/storage/spider/mysql-test/spider/include/deinit_child2_1.inc index cee137a6aeb..6e7fefe5f6f 100644 --- a/storage/spider/mysql-test/spider/include/deinit_child2_1.inc +++ b/storage/spider/mysql-test/spider/include/deinit_child2_1.inc @@ -1,3 +1,3 @@ ---let $TEST_ENGINE_TYPE= $CHILD2_1_ENGINE_TYPE
---let $INIT_TEST_ENGINE= $INIT_CHILD2_1_ENGINE
---source ../include/deinit_engine.inc
+--let $TEST_ENGINE_TYPE= $CHILD2_1_ENGINE_TYPE +--let $INIT_TEST_ENGINE= $INIT_CHILD2_1_ENGINE +--source ../include/deinit_engine.inc diff --git a/storage/spider/mysql-test/spider/include/deinit_child2_2.inc b/storage/spider/mysql-test/spider/include/deinit_child2_2.inc index a1f9fe3fb19..0f770f9b800 100644 --- a/storage/spider/mysql-test/spider/include/deinit_child2_2.inc +++ b/storage/spider/mysql-test/spider/include/deinit_child2_2.inc @@ -1,3 +1,3 @@ ---let $TEST_ENGINE_TYPE= $CHILD2_2_ENGINE_TYPE
---let $INIT_TEST_ENGINE= $INIT_CHILD2_2_ENGINE
---source ../include/deinit_engine.inc
+--let $TEST_ENGINE_TYPE= $CHILD2_2_ENGINE_TYPE +--let $INIT_TEST_ENGINE= $INIT_CHILD2_2_ENGINE +--source ../include/deinit_engine.inc diff --git a/storage/spider/mysql-test/spider/include/deinit_child2_3.inc b/storage/spider/mysql-test/spider/include/deinit_child2_3.inc index f996a40e786..4ed97224f3f 100644 --- a/storage/spider/mysql-test/spider/include/deinit_child2_3.inc +++ b/storage/spider/mysql-test/spider/include/deinit_child2_3.inc @@ -1,3 +1,3 @@ ---let $TEST_ENGINE_TYPE= $CHILD2_3_ENGINE_TYPE
---let $INIT_TEST_ENGINE= $INIT_CHILD2_3_ENGINE
---source ../include/deinit_engine.inc
+--let $TEST_ENGINE_TYPE= $CHILD2_3_ENGINE_TYPE +--let $INIT_TEST_ENGINE= $INIT_CHILD2_3_ENGINE +--source ../include/deinit_engine.inc diff --git a/storage/spider/mysql-test/spider/include/deinit_child3_1.inc b/storage/spider/mysql-test/spider/include/deinit_child3_1.inc index e0e3a4c41f4..079b4b3e157 100644 --- a/storage/spider/mysql-test/spider/include/deinit_child3_1.inc +++ b/storage/spider/mysql-test/spider/include/deinit_child3_1.inc @@ -1,3 +1,3 @@ ---let $TEST_ENGINE_TYPE= $CHILD3_1_ENGINE_TYPE
---let $INIT_TEST_ENGINE= $INIT_CHILD3_1_ENGINE
---source ../include/deinit_engine.inc
+--let $TEST_ENGINE_TYPE= $CHILD3_1_ENGINE_TYPE +--let $INIT_TEST_ENGINE= $INIT_CHILD3_1_ENGINE +--source ../include/deinit_engine.inc diff --git a/storage/spider/mysql-test/spider/include/deinit_child3_2.inc b/storage/spider/mysql-test/spider/include/deinit_child3_2.inc index 82eb70d331f..e495bf513db 100644 --- a/storage/spider/mysql-test/spider/include/deinit_child3_2.inc +++ b/storage/spider/mysql-test/spider/include/deinit_child3_2.inc @@ -1,3 +1,3 @@ ---let $TEST_ENGINE_TYPE= $CHILD3_2_ENGINE_TYPE
---let $INIT_TEST_ENGINE= $INIT_CHILD3_2_ENGINE
---source ../include/deinit_engine.inc
+--let $TEST_ENGINE_TYPE= $CHILD3_2_ENGINE_TYPE +--let $INIT_TEST_ENGINE= $INIT_CHILD3_2_ENGINE +--source ../include/deinit_engine.inc diff --git a/storage/spider/mysql-test/spider/include/deinit_child3_3.inc b/storage/spider/mysql-test/spider/include/deinit_child3_3.inc index 3741ef76c3c..b197faa0e0f 100644 --- a/storage/spider/mysql-test/spider/include/deinit_child3_3.inc +++ b/storage/spider/mysql-test/spider/include/deinit_child3_3.inc @@ -1,3 +1,3 @@ ---let $TEST_ENGINE_TYPE= $CHILD3_3_ENGINE_TYPE
---let $INIT_TEST_ENGINE= $INIT_CHILD3_3_ENGINE
---source ../include/deinit_engine.inc
+--let $TEST_ENGINE_TYPE= $CHILD3_3_ENGINE_TYPE +--let $INIT_TEST_ENGINE= $INIT_CHILD3_3_ENGINE +--source ../include/deinit_engine.inc diff --git a/storage/spider/mysql-test/spider/include/deinit_engine.inc b/storage/spider/mysql-test/spider/include/deinit_engine.inc index f3b6b3189f5..e7bdab411c4 100644 --- a/storage/spider/mysql-test/spider/include/deinit_engine.inc +++ b/storage/spider/mysql-test/spider/include/deinit_engine.inc @@ -1,4 +1,4 @@ -if ($INIT_TEST_ENGINE)
-{
- --echo Deinit $TEST_ENGINE_TYPE engine
-}
+if ($INIT_TEST_ENGINE) +{ + --echo Deinit $TEST_ENGINE_TYPE engine +} diff --git a/storage/spider/mysql-test/spider/include/ha_deinit_child3_1.inc b/storage/spider/mysql-test/spider/include/ha_deinit_child3_1.inc index f5f7db7e3fa..482c8013734 100644 --- a/storage/spider/mysql-test/spider/include/ha_deinit_child3_1.inc +++ b/storage/spider/mysql-test/spider/include/ha_deinit_child3_1.inc @@ -1 +1 @@ ---source ../include/deinit_spider.inc
+--source ../include/deinit_spider.inc diff --git a/storage/spider/mysql-test/spider/include/ha_deinit_child3_2.inc b/storage/spider/mysql-test/spider/include/ha_deinit_child3_2.inc index f5f7db7e3fa..482c8013734 100644 --- a/storage/spider/mysql-test/spider/include/ha_deinit_child3_2.inc +++ b/storage/spider/mysql-test/spider/include/ha_deinit_child3_2.inc @@ -1 +1 @@ ---source ../include/deinit_spider.inc
+--source ../include/deinit_spider.inc diff --git a/storage/spider/mysql-test/spider/include/ha_deinit_child3_3.inc b/storage/spider/mysql-test/spider/include/ha_deinit_child3_3.inc index f5f7db7e3fa..482c8013734 100644 --- a/storage/spider/mysql-test/spider/include/ha_deinit_child3_3.inc +++ b/storage/spider/mysql-test/spider/include/ha_deinit_child3_3.inc @@ -1 +1 @@ ---source ../include/deinit_spider.inc
+--source ../include/deinit_spider.inc diff --git a/storage/spider/mysql-test/spider/include/ha_init_child2_1.inc b/storage/spider/mysql-test/spider/include/ha_init_child2_1.inc index 59c0175d349..2684829408d 100644 --- a/storage/spider/mysql-test/spider/include/ha_init_child2_1.inc +++ b/storage/spider/mysql-test/spider/include/ha_init_child2_1.inc @@ -1,8 +1,8 @@ -let $CHILD2_1_HA_AS_DROP_TABLES=
- $CHILD2_1_DROP_TABLES;
-let $CHILD2_1_HA_AS_CREATE_TABLES=
- $CHILD2_1_CREATE_TABLES;
-let $CHILD2_1_HA_AS_DROP_TABLES2=
- $CHILD2_1_DROP_TABLES2;
-let $CHILD2_1_HA_AS_CREATE_TABLES2=
- $CHILD2_1_CREATE_TABLES2;
+let $CHILD2_1_HA_AS_DROP_TABLES= + $CHILD2_1_DROP_TABLES; +let $CHILD2_1_HA_AS_CREATE_TABLES= + $CHILD2_1_CREATE_TABLES; +let $CHILD2_1_HA_AS_DROP_TABLES2= + $CHILD2_1_DROP_TABLES2; +let $CHILD2_1_HA_AS_CREATE_TABLES2= + $CHILD2_1_CREATE_TABLES2; diff --git a/storage/spider/mysql-test/spider/include/ha_init_child2_2.inc b/storage/spider/mysql-test/spider/include/ha_init_child2_2.inc index 90d27ed704d..205eaa6fe35 100644 --- a/storage/spider/mysql-test/spider/include/ha_init_child2_2.inc +++ b/storage/spider/mysql-test/spider/include/ha_init_child2_2.inc @@ -1,4 +1,4 @@ -let $CHILD2_2_HA_DROP_TABLES=
- $CHILD2_2_DROP_TABLES;
-let $CHILD2_2_HA_CREATE_TABLES=
- $CHILD2_2_CREATE_TABLES;
+let $CHILD2_2_HA_DROP_TABLES= + $CHILD2_2_DROP_TABLES; +let $CHILD2_2_HA_CREATE_TABLES= + $CHILD2_2_CREATE_TABLES; diff --git a/storage/spider/mysql-test/spider/include/ha_init_child2_3.inc b/storage/spider/mysql-test/spider/include/ha_init_child2_3.inc index 11abf112b1f..55cb858372c 100644 --- a/storage/spider/mysql-test/spider/include/ha_init_child2_3.inc +++ b/storage/spider/mysql-test/spider/include/ha_init_child2_3.inc @@ -1,4 +1,4 @@ -let $CHILD2_3_HA_DROP_TABLES=
- $CHILD2_3_DROP_TABLES;
-let $CHILD2_3_HA_CREATE_TABLES=
- $CHILD2_3_CREATE_TABLES;
+let $CHILD2_3_HA_DROP_TABLES= + $CHILD2_3_DROP_TABLES; +let $CHILD2_3_HA_CREATE_TABLES= + $CHILD2_3_CREATE_TABLES; diff --git a/storage/spider/mysql-test/spider/include/ha_init_child3_1.inc b/storage/spider/mysql-test/spider/include/ha_init_child3_1.inc index 67f6676a07a..8357f0bdbc2 100644 --- a/storage/spider/mysql-test/spider/include/ha_init_child3_1.inc +++ b/storage/spider/mysql-test/spider/include/ha_init_child3_1.inc @@ -1,140 +1,140 @@ ---let $CHILD3_1_ENGINE_TYPE=Spider
---let $CHILD3_1_ENGINE=ENGINE=Spider
---source ../include/init_spider.inc
-eval INSERT INTO mysql.spider_link_mon_servers
-(db_name, table_name, link_id, sid, server, scheme, host, port, socket,
- username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key,
- ssl_verify_server_cert, default_file, default_group) VALUES
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL);
-let $CHILD3_1_CHECK_LINK_STATUS=
- SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
- ORDER BY db_name, table_name, link_id;
-let $CHILD3_1_CHECK_LINK_FAILED_LOG=
- SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log;
-let $CHILD3_1_SET_RECOVERY_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 2"';
-let $CHILD3_1_SET_OK_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 1"';
-let $CHILD3_1_SET_OK_STATUS_AS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2", lst "1 0"';
-
-let $CHILD3_1_DROP_TABLES_HA_2_1=
- DROP TABLE IF EXISTS ta_l;
-if ($VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_1_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_1_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-if (!$VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_1_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_1_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-let $CHILD3_1_DROP_TABLES_HA_P_2_1=
- DROP TABLE IF EXISTS ta_l2;
-let $CHILD3_1_CREATE_TABLES_HA_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_1_CREATE_TABLES_HA_AS_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_1_SET_RECOVERY_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 2"'
- );
-let $CHILD3_1_SET_OK_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 1"'
- );
-let $CHILD3_1_SET_OK_STATUS_AS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "1 0"'
- );
+--let $CHILD3_1_ENGINE_TYPE=Spider +--let $CHILD3_1_ENGINE=ENGINE=Spider +--source ../include/init_spider.inc +eval INSERT INTO mysql.spider_link_mon_servers +(db_name, table_name, link_id, sid, server, scheme, host, port, socket, + username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key, + ssl_verify_server_cert, default_file, default_group) VALUES +('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +let $CHILD3_1_CHECK_LINK_STATUS= + SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables + ORDER BY db_name, table_name, link_id; +let $CHILD3_1_CHECK_LINK_FAILED_LOG= + SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log; +let $CHILD3_1_SET_RECOVERY_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 2"'; +let $CHILD3_1_SET_OK_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 1"'; +let $CHILD3_1_SET_OK_STATUS_AS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2", lst "1 0"'; + +let $CHILD3_1_DROP_TABLES_HA_2_1= + DROP TABLE IF EXISTS ta_l; +if ($VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_1_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_1_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +if (!$VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_1_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_1_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +let $CHILD3_1_DROP_TABLES_HA_P_2_1= + DROP TABLE IF EXISTS ta_l2; +let $CHILD3_1_CREATE_TABLES_HA_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_1_CREATE_TABLES_HA_AS_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_1_SET_RECOVERY_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 2"' + ); +let $CHILD3_1_SET_OK_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 1"' + ); +let $CHILD3_1_SET_OK_STATUS_AS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "1 0"' + ); diff --git a/storage/spider/mysql-test/spider/include/ha_init_child3_2.inc b/storage/spider/mysql-test/spider/include/ha_init_child3_2.inc index 9b61a2e2b73..3ffcec24f51 100644 --- a/storage/spider/mysql-test/spider/include/ha_init_child3_2.inc +++ b/storage/spider/mysql-test/spider/include/ha_init_child3_2.inc @@ -1,140 +1,140 @@ ---let $CHILD3_2_ENGINE_TYPE=Spider
---let $CHILD3_2_ENGINE=ENGINE=Spider
---source ../include/init_spider.inc
-eval INSERT INTO mysql.spider_link_mon_servers
-(db_name, table_name, link_id, sid, server, scheme, host, port, socket,
- username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key,
- ssl_verify_server_cert, default_file, default_group) VALUES
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL);
-let $CHILD3_2_CHECK_LINK_STATUS=
- SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
- ORDER BY db_name, table_name, link_id;
-let $CHILD3_2_CHECK_LINK_FAILED_LOG=
- SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log;
-let $CHILD3_2_SET_RECOVERY_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 2"';
-let $CHILD3_2_SET_OK_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 1"';
-let $CHILD3_2_SET_OK_STATUS_AS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2", lst "1 0"';
-
-let $CHILD3_2_DROP_TABLES_HA_2_1=
- DROP TABLE IF EXISTS ta_l;
-if ($VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_2_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_2_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-if (!$VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_2_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_2_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-let $CHILD3_2_DROP_TABLES_HA_P_2_1=
- DROP TABLE IF EXISTS ta_l2;
-let $CHILD3_2_CREATE_TABLES_HA_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_2_CREATE_TABLES_HA_AS_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_2_SET_RECOVERY_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 2"'
- );
-let $CHILD3_2_SET_OK_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 1"'
- );
-let $CHILD3_2_SET_OK_STATUS_AS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "1 0"'
- );
+--let $CHILD3_2_ENGINE_TYPE=Spider +--let $CHILD3_2_ENGINE=ENGINE=Spider +--source ../include/init_spider.inc +eval INSERT INTO mysql.spider_link_mon_servers +(db_name, table_name, link_id, sid, server, scheme, host, port, socket, + username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key, + ssl_verify_server_cert, default_file, default_group) VALUES +('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +let $CHILD3_2_CHECK_LINK_STATUS= + SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables + ORDER BY db_name, table_name, link_id; +let $CHILD3_2_CHECK_LINK_FAILED_LOG= + SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log; +let $CHILD3_2_SET_RECOVERY_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 2"'; +let $CHILD3_2_SET_OK_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 1"'; +let $CHILD3_2_SET_OK_STATUS_AS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2", lst "1 0"'; + +let $CHILD3_2_DROP_TABLES_HA_2_1= + DROP TABLE IF EXISTS ta_l; +if ($VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_2_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_2_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +if (!$VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_2_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_2_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +let $CHILD3_2_DROP_TABLES_HA_P_2_1= + DROP TABLE IF EXISTS ta_l2; +let $CHILD3_2_CREATE_TABLES_HA_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_2_CREATE_TABLES_HA_AS_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_2_SET_RECOVERY_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 2"' + ); +let $CHILD3_2_SET_OK_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 1"' + ); +let $CHILD3_2_SET_OK_STATUS_AS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "1 0"' + ); diff --git a/storage/spider/mysql-test/spider/include/ha_init_child3_3.inc b/storage/spider/mysql-test/spider/include/ha_init_child3_3.inc index 5724a50b3d9..67bd00109f5 100644 --- a/storage/spider/mysql-test/spider/include/ha_init_child3_3.inc +++ b/storage/spider/mysql-test/spider/include/ha_init_child3_3.inc @@ -1,140 +1,140 @@ ---let $CHILD3_3_ENGINE_TYPE=Spider
---let $CHILD3_3_ENGINE=ENGINE=Spider
---source ../include/init_spider.inc
-eval INSERT INTO mysql.spider_link_mon_servers
-(db_name, table_name, link_id, sid, server, scheme, host, port, socket,
- username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key,
- ssl_verify_server_cert, default_file, default_group) VALUES
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL);
-let $CHILD3_3_CHECK_LINK_STATUS=
- SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
- ORDER BY db_name, table_name, link_id;
-let $CHILD3_3_CHECK_LINK_FAILED_LOG=
- SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log;
-let $CHILD3_3_SET_RECOVERY_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 2"';
-let $CHILD3_3_SET_OK_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 1"';
-let $CHILD3_3_SET_OK_STATUS_AS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2", lst "1 0"';
-
-let $CHILD3_3_DROP_TABLES_HA_2_1=
- DROP TABLE IF EXISTS ta_l;
-if ($VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_3_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_3_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-if (!$VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_3_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_3_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-let $CHILD3_3_DROP_TABLES_HA_P_2_1=
- DROP TABLE IF EXISTS ta_l2;
-let $CHILD3_3_CREATE_TABLES_HA_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_3_CREATE_TABLES_HA_AS_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_3_SET_RECOVERY_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 2"'
- );
-let $CHILD3_3_SET_OK_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 1"'
- );
-let $CHILD3_3_SET_OK_STATUS_AS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "1 0"'
- );
+--let $CHILD3_3_ENGINE_TYPE=Spider +--let $CHILD3_3_ENGINE=ENGINE=Spider +--source ../include/init_spider.inc +eval INSERT INTO mysql.spider_link_mon_servers +(db_name, table_name, link_id, sid, server, scheme, host, port, socket, + username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key, + ssl_verify_server_cert, default_file, default_group) VALUES +('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +let $CHILD3_3_CHECK_LINK_STATUS= + SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables + ORDER BY db_name, table_name, link_id; +let $CHILD3_3_CHECK_LINK_FAILED_LOG= + SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log; +let $CHILD3_3_SET_RECOVERY_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 2"'; +let $CHILD3_3_SET_OK_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 1"'; +let $CHILD3_3_SET_OK_STATUS_AS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2", lst "1 0"'; + +let $CHILD3_3_DROP_TABLES_HA_2_1= + DROP TABLE IF EXISTS ta_l; +if ($VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_3_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_3_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +if (!$VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_3_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_3_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +let $CHILD3_3_DROP_TABLES_HA_P_2_1= + DROP TABLE IF EXISTS ta_l2; +let $CHILD3_3_CREATE_TABLES_HA_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_3_CREATE_TABLES_HA_AS_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_3_SET_RECOVERY_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 2"' + ); +let $CHILD3_3_SET_OK_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 1"' + ); +let $CHILD3_3_SET_OK_STATUS_AS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "1 0"' + ); diff --git a/storage/spider/mysql-test/spider/include/hs_init_child2_1.inc b/storage/spider/mysql-test/spider/include/hs_init_child2_1.inc index 2ea1c0c9cd6..ee006858b06 100644 --- a/storage/spider/mysql-test/spider/include/hs_init_child2_1.inc +++ b/storage/spider/mysql-test/spider/include/hs_init_child2_1.inc @@ -1,24 +1,24 @@ -let $CHILD2_1_HS_DROP_TABLES=
- DROP TABLE IF EXISTS hs_r;
-let $CHILD2_1_HS_CREATE_TABLES=
- CREATE TABLE hs_r (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- d INT DEFAULT 11,
- PRIMARY KEY(a)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_HS_SELECT_TABLES=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s'), d FROM hs_r ORDER BY a;
-let $CHILD2_1_HS_DROP_TABLES2=
- DROP TABLE IF EXISTS hs_r2;
-let $CHILD2_1_HS_CREATE_TABLES2=
- CREATE TABLE hs_r2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- d INT DEFAULT 11,
- PRIMARY KEY(a)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_HS_SELECT_TABLES2=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s'), d FROM hs_r2 ORDER BY a;
+let $CHILD2_1_HS_DROP_TABLES= + DROP TABLE IF EXISTS hs_r; +let $CHILD2_1_HS_CREATE_TABLES= + CREATE TABLE hs_r ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + d INT DEFAULT 11, + PRIMARY KEY(a) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_HS_SELECT_TABLES= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s'), d FROM hs_r ORDER BY a; +let $CHILD2_1_HS_DROP_TABLES2= + DROP TABLE IF EXISTS hs_r2; +let $CHILD2_1_HS_CREATE_TABLES2= + CREATE TABLE hs_r2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + d INT DEFAULT 11, + PRIMARY KEY(a) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_HS_SELECT_TABLES2= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s'), d FROM hs_r2 ORDER BY a; diff --git a/storage/spider/mysql-test/spider/include/hs_init_child2_2.inc b/storage/spider/mysql-test/spider/include/hs_init_child2_2.inc index 7c69d73ced6..1c5a02d50c8 100644 --- a/storage/spider/mysql-test/spider/include/hs_init_child2_2.inc +++ b/storage/spider/mysql-test/spider/include/hs_init_child2_2.inc @@ -1,12 +1,12 @@ -let $CHILD2_2_HS_DROP_TABLES=
- DROP TABLE IF EXISTS hs_r3;
-let $CHILD2_2_HS_CREATE_TABLES=
- CREATE TABLE hs_r3 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- d INT DEFAULT 11,
- PRIMARY KEY(a)
- ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET;
-let $CHILD2_2_HS_SELECT_TABLES=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s'), d FROM hs_r3 ORDER BY a;
+let $CHILD2_2_HS_DROP_TABLES= + DROP TABLE IF EXISTS hs_r3; +let $CHILD2_2_HS_CREATE_TABLES= + CREATE TABLE hs_r3 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + d INT DEFAULT 11, + PRIMARY KEY(a) + ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET; +let $CHILD2_2_HS_SELECT_TABLES= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s'), d FROM hs_r3 ORDER BY a; diff --git a/storage/spider/mysql-test/spider/include/init_child2_1.inc b/storage/spider/mysql-test/spider/include/init_child2_1.inc index ff4e1666ee1..10793649f94 100644 --- a/storage/spider/mysql-test/spider/include/init_child2_1.inc +++ b/storage/spider/mysql-test/spider/include/init_child2_1.inc @@ -1,178 +1,178 @@ ---let $TEST_ENGINE_TYPE= $CHILD2_1_ENGINE_TYPE
---source ../include/init_engine.inc
---let $INIT_CHILD2_1_ENGINE= $INIT_TEST_ENGINE
-let $CHILD2_1_DROP_TABLES=
- DROP TABLE IF EXISTS ta_r;
-let $CHILD2_1_CREATE_TABLES=
- CREATE TABLE ta_r (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a),
- KEY idx1(b)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_SELECT_TABLES=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r ORDER BY a;
-let $CHILD2_1_DROP_TABLES2=
- DROP TABLE IF EXISTS ta_r2;
-let $CHILD2_1_CREATE_TABLES2=
- CREATE TABLE ta_r2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_SELECT_TABLES2=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r2 ORDER BY a;
-let $CHILD2_1_DROP_TABLES3=
- DROP TABLE IF EXISTS ta_r_no_idx;
-let $CHILD2_1_CREATE_TABLES3=
- CREATE TABLE ta_r_no_idx (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10'
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_SELECT_TABLES3=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r_no_idx ORDER BY a;
-let $CHILD2_1_DROP_TABLES4=
- DROP TABLE IF EXISTS ta_r_auto_inc;
-let $CHILD2_1_CREATE_TABLES4=
- CREATE TABLE ta_r_auto_inc (
- a INT AUTO_INCREMENT,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_SELECT_TABLES4=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r_auto_inc
- ORDER BY a;
-let $CHILD2_1_DROP_TABLES5=
- DROP TABLE IF EXISTS ta_r_int;
-let $CHILD2_1_CREATE_TABLES5=
- CREATE TABLE ta_r_int (
- a INT AUTO_INCREMENT,
- b INT DEFAULT 10,
- c INT DEFAULT 11,
- PRIMARY KEY(a),
- KEY idx1(b),
- KEY idx2(c)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_SELECT_TABLES5=
- SELECT a, b, c FROM ta_r_int ORDER BY a;
-let $CHILD2_1_DROP_TABLES6=
- DROP TABLE IF EXISTS ta_r_3;
-let $CHILD2_1_CREATE_TABLES6=
- CREATE TABLE ta_r_3 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10'
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_SELECT_TABLES6=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r_3 ORDER BY a;
-let $CHILD2_1_DROP_FT_TABLES=
- DROP TABLE IF EXISTS ft_r;
-let $CHILD2_1_CREATE_FT_TABLES=
- CREATE TABLE ft_r (
- a INT DEFAULT 0,
- b TEXT,
- c TEXT,
- d TEXT,
- PRIMARY KEY(a),
- FULLTEXT INDEX ft_idx1(b),
- FULLTEXT INDEX ft_idx2(c)
- ) $CHILD2_1_FT_ENGINE $CHILD2_1_FT_CHARSET;
-let $CHILD2_1_SELECT_FT_TABLES=
- SELECT a, b, c, d FROM ft_r ORDER BY a;
-let $CHILD2_1_DROP_FT_TABLES2=
- DROP TABLE IF EXISTS ft_r2;
-let $CHILD2_1_CREATE_FT_TABLES2=
- CREATE TABLE ft_r2 (
- a INT DEFAULT 0,
- b TEXT,
- c TEXT,
- d TEXT,
- PRIMARY KEY(a),
- FULLTEXT INDEX ft_idx1(b),
- FULLTEXT INDEX ft_idx2(c)
- ) $CHILD2_1_FT_ENGINE $CHILD2_1_FT_CHARSET;
-let $CHILD2_1_SELECT_FT_TABLES2=
- SELECT a, b, c, d FROM ft_r2 ORDER BY a;
-let $CHILD2_1_DROP_GM_TABLES=
- DROP TABLE IF EXISTS gm_r;
-let $CHILD2_1_CREATE_GM_TABLES=
- CREATE TABLE gm_r (
- a INT DEFAULT 0,
- b GEOMETRY NOT NULL,
- c GEOMETRY NOT NULL,
- PRIMARY KEY(a),
- SPATIAL INDEX sp_idx1(b),
- SPATIAL INDEX sp_idx2(c)
- ) $CHILD2_1_GM_ENGINE $CHILD2_1_GM_CHARSET;
-let $CHILD2_1_SELECT_GM_TABLES=
- SELECT a, b, c FROM gm_r ORDER BY a;
-let $CHILD2_1_DROP_GM_TABLES2=
- DROP TABLE IF EXISTS gm_r2;
-let $CHILD2_1_CREATE_GM_TABLES2=
- CREATE TABLE gm_r2 (
- a INT DEFAULT 0,
- b GEOMETRY NOT NULL,
- c GEOMETRY NOT NULL,
- PRIMARY KEY(a),
- SPATIAL INDEX sp_idx1(b),
- SPATIAL INDEX sp_idx2(c)
- ) $CHILD2_1_GM_ENGINE $CHILD2_1_GM_CHARSET;
-let $CHILD2_1_SELECT_GM_TABLES2=
- SELECT a, b, c FROM gm_r2 ORDER BY a;
-let $CHILD2_1_DROP_LOCK_TABLES1=
- DROP TABLE IF EXISTS t1_1;
-let $CHILD2_1_CREATE_LOCK_TABLES1=
- CREATE TABLE t1_1 (
- id int(11) NOT NULL,
- PRIMARY KEY (id)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_DROP_LOCK_TABLES2=
- DROP TABLE IF EXISTS t2_2;
-let $CHILD2_1_CREATE_LOCK_TABLES2=
- CREATE TABLE t2_2 (
- id int(11) NOT NULL,
- PRIMARY KEY (id)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_DROP_INCREMENT_TABLES1=
- DROP TABLE IF EXISTS t1_1;
-let $CHILD2_1_CREATE_INCREMENT_TABLES1=
- CREATE TABLE t1_1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_SELECT_INCREMENT_TABLES1=
- SELECT id FROM t1_1 ORDER BY id;
-let $CHILD2_1_DROP_TEXT_PK_TABLES1=
- DROP TABLE IF EXISTS t1;
-let $CHILD2_1_CREATE_TEXT_PK_TABLES1=
- CREATE TABLE t1 (
- a VARCHAR(255),
- PRIMARY KEY (a)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET2;
-let $CHILD2_1_SELECT_TEXT_PK_TABLES1=
- SELECT a FROM t1 ORDER BY a;
-let $CHILD2_1_DROP_TEXT_KEY_TABLES1=
- DROP TABLE IF EXISTS t1;
-let $CHILD2_1_CREATE_TEXT_KEY_TABLES1=
- CREATE TABLE t1 (
- a VARCHAR(255),
- b VARCHAR(255),
- c VARCHAR(255),
- KEY idx1(a,b),
- KEY idx2(b),
- PRIMARY KEY(c)
- ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
-let $CHILD2_1_SELECT_TEXT_KEY_TABLES1=
- SELECT a, b FROM t1 ORDER BY a, b;
-let $CHILD2_1_AUTO_INCREMENT_INCREMENT1=
- SET GLOBAL AUTO_INCREMENT_INCREMENT = 1;
-let $CHILD2_1_AUTO_INCREMENT_INCREMENT2=
- SET GLOBAL AUTO_INCREMENT_INCREMENT = 4;
-let $CHILD2_1_AUTO_INCREMENT_OFFSET1=
- SET GLOBAL AUTO_INCREMENT_OFFSET = 1;
-let $CHILD2_1_AUTO_INCREMENT_OFFSET2=
- SET GLOBAL AUTO_INCREMENT_OFFSET = 2;
+--let $TEST_ENGINE_TYPE= $CHILD2_1_ENGINE_TYPE +--source ../include/init_engine.inc +--let $INIT_CHILD2_1_ENGINE= $INIT_TEST_ENGINE +let $CHILD2_1_DROP_TABLES= + DROP TABLE IF EXISTS ta_r; +let $CHILD2_1_CREATE_TABLES= + CREATE TABLE ta_r ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a), + KEY idx1(b) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_SELECT_TABLES= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r ORDER BY a; +let $CHILD2_1_DROP_TABLES2= + DROP TABLE IF EXISTS ta_r2; +let $CHILD2_1_CREATE_TABLES2= + CREATE TABLE ta_r2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_SELECT_TABLES2= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r2 ORDER BY a; +let $CHILD2_1_DROP_TABLES3= + DROP TABLE IF EXISTS ta_r_no_idx; +let $CHILD2_1_CREATE_TABLES3= + CREATE TABLE ta_r_no_idx ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10' + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_SELECT_TABLES3= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r_no_idx ORDER BY a; +let $CHILD2_1_DROP_TABLES4= + DROP TABLE IF EXISTS ta_r_auto_inc; +let $CHILD2_1_CREATE_TABLES4= + CREATE TABLE ta_r_auto_inc ( + a INT AUTO_INCREMENT, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_SELECT_TABLES4= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r_auto_inc + ORDER BY a; +let $CHILD2_1_DROP_TABLES5= + DROP TABLE IF EXISTS ta_r_int; +let $CHILD2_1_CREATE_TABLES5= + CREATE TABLE ta_r_int ( + a INT AUTO_INCREMENT, + b INT DEFAULT 10, + c INT DEFAULT 11, + PRIMARY KEY(a), + KEY idx1(b), + KEY idx2(c) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_SELECT_TABLES5= + SELECT a, b, c FROM ta_r_int ORDER BY a; +let $CHILD2_1_DROP_TABLES6= + DROP TABLE IF EXISTS ta_r_3; +let $CHILD2_1_CREATE_TABLES6= + CREATE TABLE ta_r_3 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10' + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_SELECT_TABLES6= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r_3 ORDER BY a; +let $CHILD2_1_DROP_FT_TABLES= + DROP TABLE IF EXISTS ft_r; +let $CHILD2_1_CREATE_FT_TABLES= + CREATE TABLE ft_r ( + a INT DEFAULT 0, + b TEXT, + c TEXT, + d TEXT, + PRIMARY KEY(a), + FULLTEXT INDEX ft_idx1(b), + FULLTEXT INDEX ft_idx2(c) + ) $CHILD2_1_FT_ENGINE $CHILD2_1_FT_CHARSET; +let $CHILD2_1_SELECT_FT_TABLES= + SELECT a, b, c, d FROM ft_r ORDER BY a; +let $CHILD2_1_DROP_FT_TABLES2= + DROP TABLE IF EXISTS ft_r2; +let $CHILD2_1_CREATE_FT_TABLES2= + CREATE TABLE ft_r2 ( + a INT DEFAULT 0, + b TEXT, + c TEXT, + d TEXT, + PRIMARY KEY(a), + FULLTEXT INDEX ft_idx1(b), + FULLTEXT INDEX ft_idx2(c) + ) $CHILD2_1_FT_ENGINE $CHILD2_1_FT_CHARSET; +let $CHILD2_1_SELECT_FT_TABLES2= + SELECT a, b, c, d FROM ft_r2 ORDER BY a; +let $CHILD2_1_DROP_GM_TABLES= + DROP TABLE IF EXISTS gm_r; +let $CHILD2_1_CREATE_GM_TABLES= + CREATE TABLE gm_r ( + a INT DEFAULT 0, + b GEOMETRY NOT NULL, + c GEOMETRY NOT NULL, + PRIMARY KEY(a), + SPATIAL INDEX sp_idx1(b), + SPATIAL INDEX sp_idx2(c) + ) $CHILD2_1_GM_ENGINE $CHILD2_1_GM_CHARSET; +let $CHILD2_1_SELECT_GM_TABLES= + SELECT a, b, c FROM gm_r ORDER BY a; +let $CHILD2_1_DROP_GM_TABLES2= + DROP TABLE IF EXISTS gm_r2; +let $CHILD2_1_CREATE_GM_TABLES2= + CREATE TABLE gm_r2 ( + a INT DEFAULT 0, + b GEOMETRY NOT NULL, + c GEOMETRY NOT NULL, + PRIMARY KEY(a), + SPATIAL INDEX sp_idx1(b), + SPATIAL INDEX sp_idx2(c) + ) $CHILD2_1_GM_ENGINE $CHILD2_1_GM_CHARSET; +let $CHILD2_1_SELECT_GM_TABLES2= + SELECT a, b, c FROM gm_r2 ORDER BY a; +let $CHILD2_1_DROP_LOCK_TABLES1= + DROP TABLE IF EXISTS t1_1; +let $CHILD2_1_CREATE_LOCK_TABLES1= + CREATE TABLE t1_1 ( + id int(11) NOT NULL, + PRIMARY KEY (id) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_DROP_LOCK_TABLES2= + DROP TABLE IF EXISTS t2_2; +let $CHILD2_1_CREATE_LOCK_TABLES2= + CREATE TABLE t2_2 ( + id int(11) NOT NULL, + PRIMARY KEY (id) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_DROP_INCREMENT_TABLES1= + DROP TABLE IF EXISTS t1_1; +let $CHILD2_1_CREATE_INCREMENT_TABLES1= + CREATE TABLE t1_1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_SELECT_INCREMENT_TABLES1= + SELECT id FROM t1_1 ORDER BY id; +let $CHILD2_1_DROP_TEXT_PK_TABLES1= + DROP TABLE IF EXISTS t1; +let $CHILD2_1_CREATE_TEXT_PK_TABLES1= + CREATE TABLE t1 ( + a VARCHAR(255), + PRIMARY KEY (a) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET2; +let $CHILD2_1_SELECT_TEXT_PK_TABLES1= + SELECT a FROM t1 ORDER BY a; +let $CHILD2_1_DROP_TEXT_KEY_TABLES1= + DROP TABLE IF EXISTS t1; +let $CHILD2_1_CREATE_TEXT_KEY_TABLES1= + CREATE TABLE t1 ( + a VARCHAR(255), + b VARCHAR(255), + c VARCHAR(255), + KEY idx1(a,b), + KEY idx2(b), + PRIMARY KEY(c) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_SELECT_TEXT_KEY_TABLES1= + SELECT a, b FROM t1 ORDER BY a, b; +let $CHILD2_1_AUTO_INCREMENT_INCREMENT1= + SET GLOBAL AUTO_INCREMENT_INCREMENT = 1; +let $CHILD2_1_AUTO_INCREMENT_INCREMENT2= + SET GLOBAL AUTO_INCREMENT_INCREMENT = 4; +let $CHILD2_1_AUTO_INCREMENT_OFFSET1= + SET GLOBAL AUTO_INCREMENT_OFFSET = 1; +let $CHILD2_1_AUTO_INCREMENT_OFFSET2= + SET GLOBAL AUTO_INCREMENT_OFFSET = 2; diff --git a/storage/spider/mysql-test/spider/include/init_child2_2.inc b/storage/spider/mysql-test/spider/include/init_child2_2.inc index b20783cc42b..5d7227e43ad 100644 --- a/storage/spider/mysql-test/spider/include/init_child2_2.inc +++ b/storage/spider/mysql-test/spider/include/init_child2_2.inc @@ -1,83 +1,83 @@ ---let $TEST_ENGINE_TYPE= $CHILD2_2_ENGINE_TYPE
---source ../include/init_engine.inc
---let $INIT_CHILD2_2_ENGINE= $INIT_TEST_ENGINE
-let $CHILD2_2_DROP_TABLES=
- DROP TABLE IF EXISTS ta_r3;
-let $CHILD2_2_CREATE_TABLES=
- CREATE TABLE ta_r3 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET;
-let $CHILD2_2_DROP_TABLES5=
- DROP TABLE IF EXISTS ta_r_int;
-let $CHILD2_2_CREATE_TABLES5=
- CREATE TABLE ta_r_int (
- a INT AUTO_INCREMENT,
- b INT DEFAULT 10,
- c INT DEFAULT 11,
- PRIMARY KEY(a),
- KEY idx1(b),
- KEY idx2(c)
- ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET;
-let $CHILD2_2_SELECT_TABLES=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r3 ORDER BY a;
-let $CHILD2_2_DROP_FT_TABLES=
- DROP TABLE IF EXISTS ft_r3;
-let $CHILD2_2_CREATE_FT_TABLES=
- CREATE TABLE ft_r3 (
- a INT DEFAULT 0,
- b TEXT,
- c TEXT,
- d TEXT,
- PRIMARY KEY(a),
- FULLTEXT INDEX ft_idx1(b),
- FULLTEXT INDEX ft_idx2(c)
- ) $CHILD2_2_FT_ENGINE $CHILD2_2_FT_CHARSET;
-let $CHILD2_2_SELECT_FT_TABLES=
- SELECT a, b, c, d FROM ft_r3 ORDER BY a;
-let $CHILD2_2_DROP_GM_TABLES=
- DROP TABLE IF EXISTS gm_r3;
-let $CHILD2_2_CREATE_GM_TABLES=
- CREATE TABLE gm_r3 (
- a INT DEFAULT 0,
- b GEOMETRY NOT NULL,
- c GEOMETRY NOT NULL,
- PRIMARY KEY(a),
- SPATIAL INDEX sp_idx1(b),
- SPATIAL INDEX sp_idx2(c)
- ) $CHILD2_2_GM_ENGINE $CHILD2_2_GM_CHARSET;
-let $CHILD2_2_SELECT_GM_TABLES=
- SELECT a, b, c FROM gm_r3 ORDER BY a;
-let $CHILD2_2_DROP_LOCK_TABLES1=
- DROP TABLE IF EXISTS t1_2;
-let $CHILD2_2_CREATE_LOCK_TABLES1=
- CREATE TABLE t1_2 (
- id int(11) NOT NULL,
- PRIMARY KEY (id)
- ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET;
-let $CHILD2_2_DROP_LOCK_TABLES2=
- DROP TABLE IF EXISTS t2_1;
-let $CHILD2_2_CREATE_LOCK_TABLES2=
- CREATE TABLE t2_1 (
- id int(11) NOT NULL,
- PRIMARY KEY (id)
- ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET;
-let $CHILD2_2_DROP_INCREMENT_TABLES1=
- DROP TABLE IF EXISTS t1_2;
-let $CHILD2_2_CREATE_INCREMENT_TABLES1=
- CREATE TABLE t1_2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET;
-let $CHILD2_2_SELECT_INCREMENT_TABLES1=
- SELECT id FROM t1_2 ORDER BY id;
-let $CHILD2_2_AUTO_INCREMENT_INCREMENT1=
- SET GLOBAL AUTO_INCREMENT_INCREMENT = 1;
-let $CHILD2_2_AUTO_INCREMENT_INCREMENT2=
- SET GLOBAL AUTO_INCREMENT_INCREMENT = 4;
-let $CHILD2_2_AUTO_INCREMENT_OFFSET1=
- SET GLOBAL AUTO_INCREMENT_OFFSET = 1;
-let $CHILD2_2_AUTO_INCREMENT_OFFSET2=
- SET GLOBAL AUTO_INCREMENT_OFFSET = 3;
+--let $TEST_ENGINE_TYPE= $CHILD2_2_ENGINE_TYPE +--source ../include/init_engine.inc +--let $INIT_CHILD2_2_ENGINE= $INIT_TEST_ENGINE +let $CHILD2_2_DROP_TABLES= + DROP TABLE IF EXISTS ta_r3; +let $CHILD2_2_CREATE_TABLES= + CREATE TABLE ta_r3 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET; +let $CHILD2_2_DROP_TABLES5= + DROP TABLE IF EXISTS ta_r_int; +let $CHILD2_2_CREATE_TABLES5= + CREATE TABLE ta_r_int ( + a INT AUTO_INCREMENT, + b INT DEFAULT 10, + c INT DEFAULT 11, + PRIMARY KEY(a), + KEY idx1(b), + KEY idx2(c) + ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET; +let $CHILD2_2_SELECT_TABLES= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r3 ORDER BY a; +let $CHILD2_2_DROP_FT_TABLES= + DROP TABLE IF EXISTS ft_r3; +let $CHILD2_2_CREATE_FT_TABLES= + CREATE TABLE ft_r3 ( + a INT DEFAULT 0, + b TEXT, + c TEXT, + d TEXT, + PRIMARY KEY(a), + FULLTEXT INDEX ft_idx1(b), + FULLTEXT INDEX ft_idx2(c) + ) $CHILD2_2_FT_ENGINE $CHILD2_2_FT_CHARSET; +let $CHILD2_2_SELECT_FT_TABLES= + SELECT a, b, c, d FROM ft_r3 ORDER BY a; +let $CHILD2_2_DROP_GM_TABLES= + DROP TABLE IF EXISTS gm_r3; +let $CHILD2_2_CREATE_GM_TABLES= + CREATE TABLE gm_r3 ( + a INT DEFAULT 0, + b GEOMETRY NOT NULL, + c GEOMETRY NOT NULL, + PRIMARY KEY(a), + SPATIAL INDEX sp_idx1(b), + SPATIAL INDEX sp_idx2(c) + ) $CHILD2_2_GM_ENGINE $CHILD2_2_GM_CHARSET; +let $CHILD2_2_SELECT_GM_TABLES= + SELECT a, b, c FROM gm_r3 ORDER BY a; +let $CHILD2_2_DROP_LOCK_TABLES1= + DROP TABLE IF EXISTS t1_2; +let $CHILD2_2_CREATE_LOCK_TABLES1= + CREATE TABLE t1_2 ( + id int(11) NOT NULL, + PRIMARY KEY (id) + ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET; +let $CHILD2_2_DROP_LOCK_TABLES2= + DROP TABLE IF EXISTS t2_1; +let $CHILD2_2_CREATE_LOCK_TABLES2= + CREATE TABLE t2_1 ( + id int(11) NOT NULL, + PRIMARY KEY (id) + ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET; +let $CHILD2_2_DROP_INCREMENT_TABLES1= + DROP TABLE IF EXISTS t1_2; +let $CHILD2_2_CREATE_INCREMENT_TABLES1= + CREATE TABLE t1_2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET; +let $CHILD2_2_SELECT_INCREMENT_TABLES1= + SELECT id FROM t1_2 ORDER BY id; +let $CHILD2_2_AUTO_INCREMENT_INCREMENT1= + SET GLOBAL AUTO_INCREMENT_INCREMENT = 1; +let $CHILD2_2_AUTO_INCREMENT_INCREMENT2= + SET GLOBAL AUTO_INCREMENT_INCREMENT = 4; +let $CHILD2_2_AUTO_INCREMENT_OFFSET1= + SET GLOBAL AUTO_INCREMENT_OFFSET = 1; +let $CHILD2_2_AUTO_INCREMENT_OFFSET2= + SET GLOBAL AUTO_INCREMENT_OFFSET = 3; diff --git a/storage/spider/mysql-test/spider/include/init_child2_3.inc b/storage/spider/mysql-test/spider/include/init_child2_3.inc index 4e8d289bdc9..0ae240626fe 100644 --- a/storage/spider/mysql-test/spider/include/init_child2_3.inc +++ b/storage/spider/mysql-test/spider/include/init_child2_3.inc @@ -1,14 +1,14 @@ ---let $TEST_ENGINE_TYPE= $CHILD2_3_ENGINE_TYPE
---source ../include/init_engine.inc
---let $INIT_CHILD2_3_ENGINE= $INIT_TEST_ENGINE
-let $CHILD2_3_DROP_TABLES=
- DROP TABLE IF EXISTS ta_r4;
-let $CHILD2_3_CREATE_TABLES=
- CREATE TABLE ta_r4 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD2_3_ENGINE $CHILD2_3_CHARSET;
-let $CHILD2_3_SELECT_TABLES=
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r4 ORDER BY a;
+--let $TEST_ENGINE_TYPE= $CHILD2_3_ENGINE_TYPE +--source ../include/init_engine.inc +--let $INIT_CHILD2_3_ENGINE= $INIT_TEST_ENGINE +let $CHILD2_3_DROP_TABLES= + DROP TABLE IF EXISTS ta_r4; +let $CHILD2_3_CREATE_TABLES= + CREATE TABLE ta_r4 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD2_3_ENGINE $CHILD2_3_CHARSET; +let $CHILD2_3_SELECT_TABLES= + SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r4 ORDER BY a; diff --git a/storage/spider/mysql-test/spider/include/init_child3_1.inc b/storage/spider/mysql-test/spider/include/init_child3_1.inc index 7e4c05d9500..0c83d926cfe 100644 --- a/storage/spider/mysql-test/spider/include/init_child3_1.inc +++ b/storage/spider/mysql-test/spider/include/init_child3_1.inc @@ -1,3 +1,3 @@ ---let $TEST_ENGINE_TYPE= $CHILD3_1_ENGINE_TYPE
---source ../include/init_engine.inc
---let $INIT_CHILD3_1_ENGINE= $INIT_TEST_ENGINE
+--let $TEST_ENGINE_TYPE= $CHILD3_1_ENGINE_TYPE +--source ../include/init_engine.inc +--let $INIT_CHILD3_1_ENGINE= $INIT_TEST_ENGINE diff --git a/storage/spider/mysql-test/spider/include/init_child3_2.inc b/storage/spider/mysql-test/spider/include/init_child3_2.inc index 246a7985984..29abb5c8493 100644 --- a/storage/spider/mysql-test/spider/include/init_child3_2.inc +++ b/storage/spider/mysql-test/spider/include/init_child3_2.inc @@ -1,3 +1,3 @@ ---let $TEST_ENGINE_TYPE= $CHILD3_2_ENGINE_TYPE
---source ../include/init_engine.inc
---let $INIT_CHILD3_2_ENGINE= $INIT_TEST_ENGINE
+--let $TEST_ENGINE_TYPE= $CHILD3_2_ENGINE_TYPE +--source ../include/init_engine.inc +--let $INIT_CHILD3_2_ENGINE= $INIT_TEST_ENGINE diff --git a/storage/spider/mysql-test/spider/include/init_child3_3.inc b/storage/spider/mysql-test/spider/include/init_child3_3.inc index a0e5fdf6981..9fee4d34f98 100644 --- a/storage/spider/mysql-test/spider/include/init_child3_3.inc +++ b/storage/spider/mysql-test/spider/include/init_child3_3.inc @@ -1,3 +1,3 @@ ---let $TEST_ENGINE_TYPE= $CHILD3_3_ENGINE_TYPE
---source ../include/init_engine.inc
---let $INIT_CHILD3_3_ENGINE= $INIT_TEST_ENGINE
+--let $TEST_ENGINE_TYPE= $CHILD3_3_ENGINE_TYPE +--source ../include/init_engine.inc +--let $INIT_CHILD3_3_ENGINE= $INIT_TEST_ENGINE diff --git a/storage/spider/mysql-test/spider/include/init_slave1_1.inc b/storage/spider/mysql-test/spider/include/init_slave1_1.inc index 87c05f1f690..73c3c6b9ef2 100644 --- a/storage/spider/mysql-test/spider/include/init_slave1_1.inc +++ b/storage/spider/mysql-test/spider/include/init_slave1_1.inc @@ -1,10 +1,10 @@ -let $SLAVE1_1_COMMENT_INCREMENT1_1=
- COMMENT '';
-let $SLAVE1_1_COMMENT_INCREMENT1_P_1=
- COMMENT ''
- PARTITION BY LIST(MOD(id, 2)) (
- PARTITION pt1 VALUES IN (0)
- COMMENT='',
- PARTITION pt2 VALUES IN (1)
- COMMENT=''
- );
+let $SLAVE1_1_COMMENT_INCREMENT1_1= + COMMENT ''; +let $SLAVE1_1_COMMENT_INCREMENT1_P_1= + COMMENT '' + PARTITION BY LIST(MOD(id, 2)) ( + PARTITION pt1 VALUES IN (0) + COMMENT='', + PARTITION pt2 VALUES IN (1) + COMMENT='' + ); diff --git a/storage/spider/mysql-test/spider/oracle/include/deinit_child3_1.inc b/storage/spider/mysql-test/spider/oracle/include/deinit_child3_1.inc index 9b6a9851ccb..74c8efa90aa 100644 --- a/storage/spider/mysql-test/spider/oracle/include/deinit_child3_1.inc +++ b/storage/spider/mysql-test/spider/oracle/include/deinit_child3_1.inc @@ -1,3 +1,3 @@ ---let $TEST_ENGINE_TYPE= $CHILD3_1_ENGINE_TYPE
---let $INIT_TEST_ENGINE= $INIT_CHILD3_1_ENGINE
---source ../../include/deinit_engine.inc
+--let $TEST_ENGINE_TYPE= $CHILD3_1_ENGINE_TYPE +--let $INIT_TEST_ENGINE= $INIT_CHILD3_1_ENGINE +--source ../../include/deinit_engine.inc diff --git a/storage/spider/mysql-test/spider/oracle/include/deinit_child3_2.inc b/storage/spider/mysql-test/spider/oracle/include/deinit_child3_2.inc index ac0bcdaa938..f42a980ad23 100644 --- a/storage/spider/mysql-test/spider/oracle/include/deinit_child3_2.inc +++ b/storage/spider/mysql-test/spider/oracle/include/deinit_child3_2.inc @@ -1,3 +1,3 @@ ---let $TEST_ENGINE_TYPE= $CHILD3_2_ENGINE_TYPE
---let $INIT_TEST_ENGINE= $INIT_CHILD3_2_ENGINE
---source ../../include/deinit_engine.inc
+--let $TEST_ENGINE_TYPE= $CHILD3_2_ENGINE_TYPE +--let $INIT_TEST_ENGINE= $INIT_CHILD3_2_ENGINE +--source ../../include/deinit_engine.inc diff --git a/storage/spider/mysql-test/spider/oracle/include/deinit_child3_3.inc b/storage/spider/mysql-test/spider/oracle/include/deinit_child3_3.inc index c93a9822d90..0696fb991cf 100644 --- a/storage/spider/mysql-test/spider/oracle/include/deinit_child3_3.inc +++ b/storage/spider/mysql-test/spider/oracle/include/deinit_child3_3.inc @@ -1,3 +1,3 @@ ---let $TEST_ENGINE_TYPE= $CHILD3_3_ENGINE_TYPE
---let $INIT_TEST_ENGINE= $INIT_CHILD3_3_ENGINE
---source ../../include/deinit_engine.inc
+--let $TEST_ENGINE_TYPE= $CHILD3_3_ENGINE_TYPE +--let $INIT_TEST_ENGINE= $INIT_CHILD3_3_ENGINE +--source ../../include/deinit_engine.inc diff --git a/storage/spider/mysql-test/spider/oracle/include/ha_deinit_child3_1.inc b/storage/spider/mysql-test/spider/oracle/include/ha_deinit_child3_1.inc index 8fd2ff8a777..c19e376d10a 100644 --- a/storage/spider/mysql-test/spider/oracle/include/ha_deinit_child3_1.inc +++ b/storage/spider/mysql-test/spider/oracle/include/ha_deinit_child3_1.inc @@ -1 +1 @@ ---source ../../include/deinit_spider.inc
+--source ../../include/deinit_spider.inc diff --git a/storage/spider/mysql-test/spider/oracle/include/ha_deinit_child3_2.inc b/storage/spider/mysql-test/spider/oracle/include/ha_deinit_child3_2.inc index 8fd2ff8a777..c19e376d10a 100644 --- a/storage/spider/mysql-test/spider/oracle/include/ha_deinit_child3_2.inc +++ b/storage/spider/mysql-test/spider/oracle/include/ha_deinit_child3_2.inc @@ -1 +1 @@ ---source ../../include/deinit_spider.inc
+--source ../../include/deinit_spider.inc diff --git a/storage/spider/mysql-test/spider/oracle/include/ha_deinit_child3_3.inc b/storage/spider/mysql-test/spider/oracle/include/ha_deinit_child3_3.inc index 8fd2ff8a777..c19e376d10a 100644 --- a/storage/spider/mysql-test/spider/oracle/include/ha_deinit_child3_3.inc +++ b/storage/spider/mysql-test/spider/oracle/include/ha_deinit_child3_3.inc @@ -1 +1 @@ ---source ../../include/deinit_spider.inc
+--source ../../include/deinit_spider.inc diff --git a/storage/spider/mysql-test/spider/oracle/include/ha_init_child2_1.inc b/storage/spider/mysql-test/spider/oracle/include/ha_init_child2_1.inc index 59c0175d349..2684829408d 100644 --- a/storage/spider/mysql-test/spider/oracle/include/ha_init_child2_1.inc +++ b/storage/spider/mysql-test/spider/oracle/include/ha_init_child2_1.inc @@ -1,8 +1,8 @@ -let $CHILD2_1_HA_AS_DROP_TABLES=
- $CHILD2_1_DROP_TABLES;
-let $CHILD2_1_HA_AS_CREATE_TABLES=
- $CHILD2_1_CREATE_TABLES;
-let $CHILD2_1_HA_AS_DROP_TABLES2=
- $CHILD2_1_DROP_TABLES2;
-let $CHILD2_1_HA_AS_CREATE_TABLES2=
- $CHILD2_1_CREATE_TABLES2;
+let $CHILD2_1_HA_AS_DROP_TABLES= + $CHILD2_1_DROP_TABLES; +let $CHILD2_1_HA_AS_CREATE_TABLES= + $CHILD2_1_CREATE_TABLES; +let $CHILD2_1_HA_AS_DROP_TABLES2= + $CHILD2_1_DROP_TABLES2; +let $CHILD2_1_HA_AS_CREATE_TABLES2= + $CHILD2_1_CREATE_TABLES2; diff --git a/storage/spider/mysql-test/spider/oracle/include/ha_init_child2_2.inc b/storage/spider/mysql-test/spider/oracle/include/ha_init_child2_2.inc index 90d27ed704d..205eaa6fe35 100644 --- a/storage/spider/mysql-test/spider/oracle/include/ha_init_child2_2.inc +++ b/storage/spider/mysql-test/spider/oracle/include/ha_init_child2_2.inc @@ -1,4 +1,4 @@ -let $CHILD2_2_HA_DROP_TABLES=
- $CHILD2_2_DROP_TABLES;
-let $CHILD2_2_HA_CREATE_TABLES=
- $CHILD2_2_CREATE_TABLES;
+let $CHILD2_2_HA_DROP_TABLES= + $CHILD2_2_DROP_TABLES; +let $CHILD2_2_HA_CREATE_TABLES= + $CHILD2_2_CREATE_TABLES; diff --git a/storage/spider/mysql-test/spider/oracle/include/ha_init_child2_3.inc b/storage/spider/mysql-test/spider/oracle/include/ha_init_child2_3.inc index 11abf112b1f..55cb858372c 100644 --- a/storage/spider/mysql-test/spider/oracle/include/ha_init_child2_3.inc +++ b/storage/spider/mysql-test/spider/oracle/include/ha_init_child2_3.inc @@ -1,4 +1,4 @@ -let $CHILD2_3_HA_DROP_TABLES=
- $CHILD2_3_DROP_TABLES;
-let $CHILD2_3_HA_CREATE_TABLES=
- $CHILD2_3_CREATE_TABLES;
+let $CHILD2_3_HA_DROP_TABLES= + $CHILD2_3_DROP_TABLES; +let $CHILD2_3_HA_CREATE_TABLES= + $CHILD2_3_CREATE_TABLES; diff --git a/storage/spider/mysql-test/spider/oracle/include/ha_init_child3_1.inc b/storage/spider/mysql-test/spider/oracle/include/ha_init_child3_1.inc index 67f6676a07a..8357f0bdbc2 100644 --- a/storage/spider/mysql-test/spider/oracle/include/ha_init_child3_1.inc +++ b/storage/spider/mysql-test/spider/oracle/include/ha_init_child3_1.inc @@ -1,140 +1,140 @@ ---let $CHILD3_1_ENGINE_TYPE=Spider
---let $CHILD3_1_ENGINE=ENGINE=Spider
---source ../include/init_spider.inc
-eval INSERT INTO mysql.spider_link_mon_servers
-(db_name, table_name, link_id, sid, server, scheme, host, port, socket,
- username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key,
- ssl_verify_server_cert, default_file, default_group) VALUES
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL);
-let $CHILD3_1_CHECK_LINK_STATUS=
- SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
- ORDER BY db_name, table_name, link_id;
-let $CHILD3_1_CHECK_LINK_FAILED_LOG=
- SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log;
-let $CHILD3_1_SET_RECOVERY_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 2"';
-let $CHILD3_1_SET_OK_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 1"';
-let $CHILD3_1_SET_OK_STATUS_AS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2", lst "1 0"';
-
-let $CHILD3_1_DROP_TABLES_HA_2_1=
- DROP TABLE IF EXISTS ta_l;
-if ($VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_1_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_1_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-if (!$VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_1_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_1_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-let $CHILD3_1_DROP_TABLES_HA_P_2_1=
- DROP TABLE IF EXISTS ta_l2;
-let $CHILD3_1_CREATE_TABLES_HA_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_1_CREATE_TABLES_HA_AS_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_1_SET_RECOVERY_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 2"'
- );
-let $CHILD3_1_SET_OK_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 1"'
- );
-let $CHILD3_1_SET_OK_STATUS_AS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "1 0"'
- );
+--let $CHILD3_1_ENGINE_TYPE=Spider +--let $CHILD3_1_ENGINE=ENGINE=Spider +--source ../include/init_spider.inc +eval INSERT INTO mysql.spider_link_mon_servers +(db_name, table_name, link_id, sid, server, scheme, host, port, socket, + username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key, + ssl_verify_server_cert, default_file, default_group) VALUES +('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +let $CHILD3_1_CHECK_LINK_STATUS= + SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables + ORDER BY db_name, table_name, link_id; +let $CHILD3_1_CHECK_LINK_FAILED_LOG= + SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log; +let $CHILD3_1_SET_RECOVERY_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 2"'; +let $CHILD3_1_SET_OK_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 1"'; +let $CHILD3_1_SET_OK_STATUS_AS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2", lst "1 0"'; + +let $CHILD3_1_DROP_TABLES_HA_2_1= + DROP TABLE IF EXISTS ta_l; +if ($VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_1_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_1_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +if (!$VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_1_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_1_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +let $CHILD3_1_DROP_TABLES_HA_P_2_1= + DROP TABLE IF EXISTS ta_l2; +let $CHILD3_1_CREATE_TABLES_HA_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_1_CREATE_TABLES_HA_AS_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_1_SET_RECOVERY_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 2"' + ); +let $CHILD3_1_SET_OK_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 1"' + ); +let $CHILD3_1_SET_OK_STATUS_AS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "1 0"' + ); diff --git a/storage/spider/mysql-test/spider/oracle/include/ha_init_child3_2.inc b/storage/spider/mysql-test/spider/oracle/include/ha_init_child3_2.inc index 9b61a2e2b73..3ffcec24f51 100644 --- a/storage/spider/mysql-test/spider/oracle/include/ha_init_child3_2.inc +++ b/storage/spider/mysql-test/spider/oracle/include/ha_init_child3_2.inc @@ -1,140 +1,140 @@ ---let $CHILD3_2_ENGINE_TYPE=Spider
---let $CHILD3_2_ENGINE=ENGINE=Spider
---source ../include/init_spider.inc
-eval INSERT INTO mysql.spider_link_mon_servers
-(db_name, table_name, link_id, sid, server, scheme, host, port, socket,
- username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key,
- ssl_verify_server_cert, default_file, default_group) VALUES
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL);
-let $CHILD3_2_CHECK_LINK_STATUS=
- SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
- ORDER BY db_name, table_name, link_id;
-let $CHILD3_2_CHECK_LINK_FAILED_LOG=
- SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log;
-let $CHILD3_2_SET_RECOVERY_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 2"';
-let $CHILD3_2_SET_OK_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 1"';
-let $CHILD3_2_SET_OK_STATUS_AS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2", lst "1 0"';
-
-let $CHILD3_2_DROP_TABLES_HA_2_1=
- DROP TABLE IF EXISTS ta_l;
-if ($VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_2_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_2_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-if (!$VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_2_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_2_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-let $CHILD3_2_DROP_TABLES_HA_P_2_1=
- DROP TABLE IF EXISTS ta_l2;
-let $CHILD3_2_CREATE_TABLES_HA_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_2_CREATE_TABLES_HA_AS_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_2_SET_RECOVERY_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 2"'
- );
-let $CHILD3_2_SET_OK_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 1"'
- );
-let $CHILD3_2_SET_OK_STATUS_AS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "1 0"'
- );
+--let $CHILD3_2_ENGINE_TYPE=Spider +--let $CHILD3_2_ENGINE=ENGINE=Spider +--source ../include/init_spider.inc +eval INSERT INTO mysql.spider_link_mon_servers +(db_name, table_name, link_id, sid, server, scheme, host, port, socket, + username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key, + ssl_verify_server_cert, default_file, default_group) VALUES +('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +let $CHILD3_2_CHECK_LINK_STATUS= + SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables + ORDER BY db_name, table_name, link_id; +let $CHILD3_2_CHECK_LINK_FAILED_LOG= + SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log; +let $CHILD3_2_SET_RECOVERY_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 2"'; +let $CHILD3_2_SET_OK_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 1"'; +let $CHILD3_2_SET_OK_STATUS_AS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2", lst "1 0"'; + +let $CHILD3_2_DROP_TABLES_HA_2_1= + DROP TABLE IF EXISTS ta_l; +if ($VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_2_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_2_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +if (!$VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_2_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_2_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +let $CHILD3_2_DROP_TABLES_HA_P_2_1= + DROP TABLE IF EXISTS ta_l2; +let $CHILD3_2_CREATE_TABLES_HA_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_2_CREATE_TABLES_HA_AS_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_2_SET_RECOVERY_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 2"' + ); +let $CHILD3_2_SET_OK_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 1"' + ); +let $CHILD3_2_SET_OK_STATUS_AS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "1 0"' + ); diff --git a/storage/spider/mysql-test/spider/oracle/include/ha_init_child3_3.inc b/storage/spider/mysql-test/spider/oracle/include/ha_init_child3_3.inc index 5724a50b3d9..67bd00109f5 100644 --- a/storage/spider/mysql-test/spider/oracle/include/ha_init_child3_3.inc +++ b/storage/spider/mysql-test/spider/oracle/include/ha_init_child3_3.inc @@ -1,140 +1,140 @@ ---let $CHILD3_3_ENGINE_TYPE=Spider
---let $CHILD3_3_ENGINE=ENGINE=Spider
---source ../include/init_spider.inc
-eval INSERT INTO mysql.spider_link_mon_servers
-(db_name, table_name, link_id, sid, server, scheme, host, port, socket,
- username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key,
- ssl_verify_server_cert, default_file, default_group) VALUES
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL);
-let $CHILD3_3_CHECK_LINK_STATUS=
- SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
- ORDER BY db_name, table_name, link_id;
-let $CHILD3_3_CHECK_LINK_FAILED_LOG=
- SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log;
-let $CHILD3_3_SET_RECOVERY_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 2"';
-let $CHILD3_3_SET_OK_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 1"';
-let $CHILD3_3_SET_OK_STATUS_AS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2", lst "1 0"';
-
-let $CHILD3_3_DROP_TABLES_HA_2_1=
- DROP TABLE IF EXISTS ta_l;
-if ($VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_3_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_3_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-if (!$VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_3_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_3_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-let $CHILD3_3_DROP_TABLES_HA_P_2_1=
- DROP TABLE IF EXISTS ta_l2;
-let $CHILD3_3_CREATE_TABLES_HA_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_3_CREATE_TABLES_HA_AS_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_3_SET_RECOVERY_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 2"'
- );
-let $CHILD3_3_SET_OK_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 1"'
- );
-let $CHILD3_3_SET_OK_STATUS_AS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "1 0"'
- );
+--let $CHILD3_3_ENGINE_TYPE=Spider +--let $CHILD3_3_ENGINE=ENGINE=Spider +--source ../include/init_spider.inc +eval INSERT INTO mysql.spider_link_mon_servers +(db_name, table_name, link_id, sid, server, scheme, host, port, socket, + username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key, + ssl_verify_server_cert, default_file, default_group) VALUES +('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +let $CHILD3_3_CHECK_LINK_STATUS= + SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables + ORDER BY db_name, table_name, link_id; +let $CHILD3_3_CHECK_LINK_FAILED_LOG= + SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log; +let $CHILD3_3_SET_RECOVERY_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 2"'; +let $CHILD3_3_SET_OK_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 1"'; +let $CHILD3_3_SET_OK_STATUS_AS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2", lst "1 0"'; + +let $CHILD3_3_DROP_TABLES_HA_2_1= + DROP TABLE IF EXISTS ta_l; +if ($VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_3_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_3_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +if (!$VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_3_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_3_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +let $CHILD3_3_DROP_TABLES_HA_P_2_1= + DROP TABLE IF EXISTS ta_l2; +let $CHILD3_3_CREATE_TABLES_HA_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_3_CREATE_TABLES_HA_AS_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_3_SET_RECOVERY_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 2"' + ); +let $CHILD3_3_SET_OK_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 1"' + ); +let $CHILD3_3_SET_OK_STATUS_AS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "1 0"' + ); diff --git a/storage/spider/mysql-test/spider/oracle/include/hs_init_child2_1.inc b/storage/spider/mysql-test/spider/oracle/include/hs_init_child2_1.inc index e0467b92307..f3f92a61e6f 100644 --- a/storage/spider/mysql-test/spider/oracle/include/hs_init_child2_1.inc +++ b/storage/spider/mysql-test/spider/oracle/include/hs_init_child2_1.inc @@ -1,24 +1,24 @@ -let $CHILD2_1_HS_DROP_TABLES=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "hs_r"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_HS_CREATE_TABLES=
- SELECT spider_direct_sql('CREATE TABLE "hs_r" (
- "a" INT DEFAULT 10,
- "b" CHAR(1) DEFAULT \'c\',
- "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'),
- "d" INT DEFAULT 11,
- CONSTRAINT "pk_s_2_1_hs_r" PRIMARY KEY("a")
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_HS_SELECT_TABLES=
- SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\'), "d" FROM "hs_r" ORDER BY "a"', '', 'srv "s_2_1"');
-let $CHILD2_1_HS_DROP_TABLES2=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "hs_r2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_HS_CREATE_TABLES2=
- SELECT spider_direct_sql('CREATE TABLE "hs_r2" (
- "a" INT DEFAULT 10,
- "b" CHAR(1) DEFAULT \'c\',
- "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'),
- "d" INT DEFAULT 11,
- CONSTRAINT "pk_s_2_1_hs_r2" PRIMARY KEY("a")
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_HS_SELECT_TABLES2=
- SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\'), "d" FROM "hs_r2" ORDER BY "a"', '', 'srv "s_2_1"');
+let $CHILD2_1_HS_DROP_TABLES= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "hs_r"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_HS_CREATE_TABLES= + SELECT spider_direct_sql('CREATE TABLE "hs_r" ( + "a" INT DEFAULT 10, + "b" CHAR(1) DEFAULT \'c\', + "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'), + "d" INT DEFAULT 11, + CONSTRAINT "pk_s_2_1_hs_r" PRIMARY KEY("a") + )', '', 'srv "s_2_1"'); +let $CHILD2_1_HS_SELECT_TABLES= + SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\'), "d" FROM "hs_r" ORDER BY "a"', '', 'srv "s_2_1"'); +let $CHILD2_1_HS_DROP_TABLES2= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "hs_r2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_HS_CREATE_TABLES2= + SELECT spider_direct_sql('CREATE TABLE "hs_r2" ( + "a" INT DEFAULT 10, + "b" CHAR(1) DEFAULT \'c\', + "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'), + "d" INT DEFAULT 11, + CONSTRAINT "pk_s_2_1_hs_r2" PRIMARY KEY("a") + )', '', 'srv "s_2_1"'); +let $CHILD2_1_HS_SELECT_TABLES2= + SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\'), "d" FROM "hs_r2" ORDER BY "a"', '', 'srv "s_2_1"'); diff --git a/storage/spider/mysql-test/spider/oracle/include/hs_init_child2_2.inc b/storage/spider/mysql-test/spider/oracle/include/hs_init_child2_2.inc index 0466acbc66b..4bd8d49c17c 100644 --- a/storage/spider/mysql-test/spider/oracle/include/hs_init_child2_2.inc +++ b/storage/spider/mysql-test/spider/oracle/include/hs_init_child2_2.inc @@ -1,12 +1,12 @@ -let $CHILD2_2_HS_DROP_TABLES=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "hs_r3"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"');
-let $CHILD2_2_HS_CREATE_TABLES=
- SELECT spider_direct_sql('CREATE TABLE "hs_r3" (
- "a" INT DEFAULT 10,
- "b" CHAR(1) DEFAULT \'c\',
- "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'),
- "d" INT DEFAULT 11,
- CONSTRAINT "pk_s_2_2_hs_r3" PRIMARY KEY("a")
- )', '', 'srv "s_2_2"');
-let $CHILD2_2_HS_SELECT_TABLES=
- SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\'), "d" FROM "hs_r3" ORDER BY "a"', '', 'srv "s_2_2"');
+let $CHILD2_2_HS_DROP_TABLES= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "hs_r3"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"'); +let $CHILD2_2_HS_CREATE_TABLES= + SELECT spider_direct_sql('CREATE TABLE "hs_r3" ( + "a" INT DEFAULT 10, + "b" CHAR(1) DEFAULT \'c\', + "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'), + "d" INT DEFAULT 11, + CONSTRAINT "pk_s_2_2_hs_r3" PRIMARY KEY("a") + )', '', 'srv "s_2_2"'); +let $CHILD2_2_HS_SELECT_TABLES= + SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\'), "d" FROM "hs_r3" ORDER BY "a"', '', 'srv "s_2_2"'); diff --git a/storage/spider/mysql-test/spider/oracle/include/init_child2_1.inc b/storage/spider/mysql-test/spider/oracle/include/init_child2_1.inc index 18dcc7159cc..c24736eefca 100644 --- a/storage/spider/mysql-test/spider/oracle/include/init_child2_1.inc +++ b/storage/spider/mysql-test/spider/oracle/include/init_child2_1.inc @@ -1,192 +1,192 @@ ---connection master_1
-SELECT spider_direct_sql('ALTER SESSION SET NLS_DATE_FORMAT=\'YYYY-MM-DD HH24:MI:SS\'', '', 'srv "s_2_1"');
-SELECT spider_direct_sql('ALTER SESSION SET NLS_TIME_FORMAT=\'HH24:MI:SSXFF\'', '', 'srv "s_2_1"');
-SELECT spider_direct_sql('ALTER SESSION SET NLS_TIMESTAMP_FORMAT=\'YYYY-MM-DD HH24:MI:SSXFF\'', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_TABLES=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_TABLES=
- SELECT spider_direct_sql('CREATE TABLE "ta_r" (
- "a" INT DEFAULT 10,
- "b" CHAR(1) DEFAULT \'c\',
- "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'),
- CONSTRAINT "pk_s_2_1_ta_r" PRIMARY KEY("a")
- )', '', 'srv "s_2_1"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE INDEX "idx1" ON "ta_r"("b")', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_TABLES=
- SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r" ORDER BY "a"', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_TABLES2=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_TABLES2=
- SELECT spider_direct_sql('CREATE TABLE "ta_r2" (
- "a" INT DEFAULT 10,
- "b" CHAR(1) DEFAULT \'c\',
- "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'),
- CONSTRAINT "pk_s_2_1_ta_r2" PRIMARY KEY("a")
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_TABLES2=
- SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r2" ORDER BY "a"', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_TABLES3=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r_no_idx"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_TABLES3=
- SELECT spider_direct_sql('CREATE TABLE "ta_r_no_idx" (
- "a" INT DEFAULT 10,
- "b" CHAR(1) DEFAULT \'c\',
- "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\')
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_TABLES3=
- SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r_no_idx" ORDER BY "a"', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_TABLES4=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r_auto_inc"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_TABLES4=
- SELECT spider_direct_sql('CREATE TABLE "ta_r_auto_inc" (
- "a" INT DEFAULT 10,
- "b" CHAR(1) DEFAULT \'c\',
- "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'),
- CONSTRAINT "pk_s_2_1_ta_r_auto_inc" PRIMARY KEY("a")
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_TABLES4=
- SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r_auto_inc"
- ORDER BY "a"', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_TABLES5=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "s_2_1_ta_r_int"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_TABLES5=
- SELECT spider_direct_sql('CREATE TABLE "s_2_1_ta_r_int" (
- "a" INT DEFAULT 3,
- "b" INT DEFAULT 10,
- "c" INT DEFAULT 11,
- CONSTRAINT "pk_s_2_1_ta_r_int" PRIMARY KEY("a")
- )', '', 'srv "s_2_1"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE INDEX "idx1_s_2_1_ta_r_int" ON "s_2_1_ta_r_int"("b")', '', 'srv "s_2_1"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE INDEX "idx2_s_2_1_ta_r_int" ON "s_2_1_ta_r_int"("c")', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_TABLES5=
- SELECT spider_direct_sql('SELECT "a", "b", "c" FROM "s_2_1_ta_r_int" ORDER BY "a"', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_TABLES6=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r_3"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_TABLES6=
- SELECT spider_direct_sql('CREATE TABLE "ta_r_3" (
- "a" INT DEFAULT 10,
- "b" CHAR(1) DEFAULT \'c\',
- "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\')
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_TABLES6=
- SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r_3" ORDER BY "a"', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_FT_TABLES=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ft_r"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_FT_TABLES=
- SELECT spider_direct_sql('CREATE TABLE "ft_r" (
- "a" INT DEFAULT 0,
- "b" TEXT,
- "c" TEXT,
- "d" TEXT,
- CONSTRAINT "pk_s_2_1_ft_r" PRIMARY KEY("a"),
- FULLTEXT INDEX "ft_idx1"("b"),
- FULLTEXT INDEX "ft_idx2"("c")
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_FT_TABLES=
- SELECT spider_direct_sql('SELECT "a", "b", "c", "d" FROM "ft_r" ORDER BY "a"', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_FT_TABLES2=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ft_r2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_FT_TABLES2=
- SELECT spider_direct_sql('CREATE TABLE "ft_r2" (
- "a" INT DEFAULT 0,
- "b" TEXT,
- "c" TEXT,
- "d" TEXT,
- CONSTRAINT "pk_s_2_1_ft_r2" PRIMARY KEY("a"),
- FULLTEXT INDEX "ft_idx1"("b"),
- FULLTEXT INDEX "ft_idx2"("c")
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_FT_TABLES2=
- SELECT spider_direct_sql('SELECT "a", "b", "c", "d" FROM "ft_r2" ORDER BY "a"', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_GM_TABLES=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "gm_r"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_GM_TABLES=
- SELECT spider_direct_sql('CREATE TABLE "gm_r" (
- "a" INT DEFAULT 0,
- "b" GEOMETRY NOT NULL,
- "c" GEOMETRY NOT NULL,
- CONSTRAINT "pk_s_2_1_gm_r" PRIMARY KEY("a"),
- SPATIAL INDEX "sp_idx1"("b"),
- SPATIAL INDEX "sp_idx2"("c")
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_GM_TABLES=
- SELECT spider_direct_sql('SELECT "a", "b", "c" FROM "gm_r" ORDER BY "a"', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_GM_TABLES2=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "gm_r2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_GM_TABLES2=
- SELECT spider_direct_sql('CREATE TABLE "gm_r2" (
- "a" INT DEFAULT 0,
- "b" GEOMETRY NOT NULL,
- "c" GEOMETRY NOT NULL,
- CONSTRAINT "pk_s_2_1_gm_r2" PRIMARY KEY("a"),
- SPATIAL INDEX "sp_idx1"("b"),
- SPATIAL INDEX "sp_idx2"("c")
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_GM_TABLES2=
- SELECT spider_direct_sql('SELECT "a", "b", "c" FROM "gm_r2" ORDER BY "a"', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_LOCK_TABLES1=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t1_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_LOCK_TABLES1=
- SELECT spider_direct_sql('CREATE TABLE "t1_1" (
- "id" INT NOT NULL,
- CONSTRAINT "pk_s_2_1_t1_1" PRIMARY KEY ("id")
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_LOCK_TABLES2=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t2_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_LOCK_TABLES2=
- SELECT spider_direct_sql('CREATE TABLE "t2_2" (
- "id" INT NOT NULL,
- CONSTRAINT "pk_s_2_1_t2_2" PRIMARY KEY ("id")
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_INCREMENT_TABLES1=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t1_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_INCREMENT_TABLES1=
- SELECT spider_direct_sql('CREATE TABLE "t1_1" (
- "id" INT NOT NULL,
- CONSTRAINT "pk_s_2_1_t1_1" PRIMARY KEY ("id")
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_INCREMENT_TABLES1=
- SELECT spider_direct_sql('SELECT "id" FROM "t1_1" ORDER BY "id"', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_TEXT_PK_TABLES1=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_TEXT_PK_TABLES1=
- SELECT spider_direct_sql('CREATE TABLE "t1" (
- "a" VARCHAR(255),
- CONSTRAINT "pk_s_2_1_t1" PRIMARY KEY ("a")
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_TEXT_PK_TABLES1=
- SELECT spider_direct_sql('SELECT "a" FROM "t1" ORDER BY "a"', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_TEXT_KEY_TABLES1=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_TEXT_KEY_TABLES1=
- SELECT spider_direct_sql('CREATE TABLE "t1" (
- "a" VARCHAR(255),
- "b" VARCHAR(255),
- "c" VARCHAR(255),
- CONSTRAINT "pk_s_2_1_t1" PRIMARY KEY ("c")
- )', '', 'srv "s_2_1"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE INDEX "idx1_t1" ON "t1"("a","b")', '', 'srv "s_2_1"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE INDEX "idx2_t1" ON "t1"("b")', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_TEXT_KEY_TABLES1=
- SELECT spider_direct_sql('SELECT "a", "b", "c" FROM "t1" ORDER BY "c"', '', 'srv "s_2_1"');
-let $CHILD2_1_AUTO_INCREMENT_INCREMENT1=
- SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_1" START WITH 1 INCREMENT BY 1', '', 'srv "s_2_1"');
-let $CHILD2_1_AUTO_INCREMENT_INCREMENT2=
- SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_1" START WITH 2 INCREMENT BY 4', '', 'srv "s_2_1"');
-let $CHILD2_1_AUTO_INCREMENT_OFFSET1=
- SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_1" START WITH 1 INCREMENT BY 1', '', 'srv "s_2_1"');
-let $CHILD2_1_AUTO_INCREMENT_OFFSET2=
- SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_1" START WITH 2 INCREMENT BY 4', '', 'srv "s_2_1"');
+--connection master_1 +SELECT spider_direct_sql('ALTER SESSION SET NLS_DATE_FORMAT=\'YYYY-MM-DD HH24:MI:SS\'', '', 'srv "s_2_1"'); +SELECT spider_direct_sql('ALTER SESSION SET NLS_TIME_FORMAT=\'HH24:MI:SSXFF\'', '', 'srv "s_2_1"'); +SELECT spider_direct_sql('ALTER SESSION SET NLS_TIMESTAMP_FORMAT=\'YYYY-MM-DD HH24:MI:SSXFF\'', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_TABLES= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_TABLES= + SELECT spider_direct_sql('CREATE TABLE "ta_r" ( + "a" INT DEFAULT 10, + "b" CHAR(1) DEFAULT \'c\', + "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'), + CONSTRAINT "pk_s_2_1_ta_r" PRIMARY KEY("a") + )', '', 'srv "s_2_1"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE INDEX "idx1" ON "ta_r"("b")', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_TABLES= + SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r" ORDER BY "a"', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_TABLES2= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_TABLES2= + SELECT spider_direct_sql('CREATE TABLE "ta_r2" ( + "a" INT DEFAULT 10, + "b" CHAR(1) DEFAULT \'c\', + "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'), + CONSTRAINT "pk_s_2_1_ta_r2" PRIMARY KEY("a") + )', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_TABLES2= + SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r2" ORDER BY "a"', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_TABLES3= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r_no_idx"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_TABLES3= + SELECT spider_direct_sql('CREATE TABLE "ta_r_no_idx" ( + "a" INT DEFAULT 10, + "b" CHAR(1) DEFAULT \'c\', + "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\') + )', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_TABLES3= + SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r_no_idx" ORDER BY "a"', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_TABLES4= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r_auto_inc"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_TABLES4= + SELECT spider_direct_sql('CREATE TABLE "ta_r_auto_inc" ( + "a" INT DEFAULT 10, + "b" CHAR(1) DEFAULT \'c\', + "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'), + CONSTRAINT "pk_s_2_1_ta_r_auto_inc" PRIMARY KEY("a") + )', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_TABLES4= + SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r_auto_inc" + ORDER BY "a"', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_TABLES5= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "s_2_1_ta_r_int"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_TABLES5= + SELECT spider_direct_sql('CREATE TABLE "s_2_1_ta_r_int" ( + "a" INT DEFAULT 3, + "b" INT DEFAULT 10, + "c" INT DEFAULT 11, + CONSTRAINT "pk_s_2_1_ta_r_int" PRIMARY KEY("a") + )', '', 'srv "s_2_1"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE INDEX "idx1_s_2_1_ta_r_int" ON "s_2_1_ta_r_int"("b")', '', 'srv "s_2_1"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE INDEX "idx2_s_2_1_ta_r_int" ON "s_2_1_ta_r_int"("c")', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_TABLES5= + SELECT spider_direct_sql('SELECT "a", "b", "c" FROM "s_2_1_ta_r_int" ORDER BY "a"', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_TABLES6= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r_3"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_TABLES6= + SELECT spider_direct_sql('CREATE TABLE "ta_r_3" ( + "a" INT DEFAULT 10, + "b" CHAR(1) DEFAULT \'c\', + "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\') + )', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_TABLES6= + SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r_3" ORDER BY "a"', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_FT_TABLES= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ft_r"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_FT_TABLES= + SELECT spider_direct_sql('CREATE TABLE "ft_r" ( + "a" INT DEFAULT 0, + "b" TEXT, + "c" TEXT, + "d" TEXT, + CONSTRAINT "pk_s_2_1_ft_r" PRIMARY KEY("a"), + FULLTEXT INDEX "ft_idx1"("b"), + FULLTEXT INDEX "ft_idx2"("c") + )', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_FT_TABLES= + SELECT spider_direct_sql('SELECT "a", "b", "c", "d" FROM "ft_r" ORDER BY "a"', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_FT_TABLES2= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ft_r2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_FT_TABLES2= + SELECT spider_direct_sql('CREATE TABLE "ft_r2" ( + "a" INT DEFAULT 0, + "b" TEXT, + "c" TEXT, + "d" TEXT, + CONSTRAINT "pk_s_2_1_ft_r2" PRIMARY KEY("a"), + FULLTEXT INDEX "ft_idx1"("b"), + FULLTEXT INDEX "ft_idx2"("c") + )', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_FT_TABLES2= + SELECT spider_direct_sql('SELECT "a", "b", "c", "d" FROM "ft_r2" ORDER BY "a"', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_GM_TABLES= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "gm_r"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_GM_TABLES= + SELECT spider_direct_sql('CREATE TABLE "gm_r" ( + "a" INT DEFAULT 0, + "b" GEOMETRY NOT NULL, + "c" GEOMETRY NOT NULL, + CONSTRAINT "pk_s_2_1_gm_r" PRIMARY KEY("a"), + SPATIAL INDEX "sp_idx1"("b"), + SPATIAL INDEX "sp_idx2"("c") + )', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_GM_TABLES= + SELECT spider_direct_sql('SELECT "a", "b", "c" FROM "gm_r" ORDER BY "a"', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_GM_TABLES2= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "gm_r2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_GM_TABLES2= + SELECT spider_direct_sql('CREATE TABLE "gm_r2" ( + "a" INT DEFAULT 0, + "b" GEOMETRY NOT NULL, + "c" GEOMETRY NOT NULL, + CONSTRAINT "pk_s_2_1_gm_r2" PRIMARY KEY("a"), + SPATIAL INDEX "sp_idx1"("b"), + SPATIAL INDEX "sp_idx2"("c") + )', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_GM_TABLES2= + SELECT spider_direct_sql('SELECT "a", "b", "c" FROM "gm_r2" ORDER BY "a"', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_LOCK_TABLES1= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t1_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_LOCK_TABLES1= + SELECT spider_direct_sql('CREATE TABLE "t1_1" ( + "id" INT NOT NULL, + CONSTRAINT "pk_s_2_1_t1_1" PRIMARY KEY ("id") + )', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_LOCK_TABLES2= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t2_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_LOCK_TABLES2= + SELECT spider_direct_sql('CREATE TABLE "t2_2" ( + "id" INT NOT NULL, + CONSTRAINT "pk_s_2_1_t2_2" PRIMARY KEY ("id") + )', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_INCREMENT_TABLES1= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t1_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_INCREMENT_TABLES1= + SELECT spider_direct_sql('CREATE TABLE "t1_1" ( + "id" INT NOT NULL, + CONSTRAINT "pk_s_2_1_t1_1" PRIMARY KEY ("id") + )', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_INCREMENT_TABLES1= + SELECT spider_direct_sql('SELECT "id" FROM "t1_1" ORDER BY "id"', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_TEXT_PK_TABLES1= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_TEXT_PK_TABLES1= + SELECT spider_direct_sql('CREATE TABLE "t1" ( + "a" VARCHAR(255), + CONSTRAINT "pk_s_2_1_t1" PRIMARY KEY ("a") + )', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_TEXT_PK_TABLES1= + SELECT spider_direct_sql('SELECT "a" FROM "t1" ORDER BY "a"', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_TEXT_KEY_TABLES1= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_TEXT_KEY_TABLES1= + SELECT spider_direct_sql('CREATE TABLE "t1" ( + "a" VARCHAR(255), + "b" VARCHAR(255), + "c" VARCHAR(255), + CONSTRAINT "pk_s_2_1_t1" PRIMARY KEY ("c") + )', '', 'srv "s_2_1"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE INDEX "idx1_t1" ON "t1"("a","b")', '', 'srv "s_2_1"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE INDEX "idx2_t1" ON "t1"("b")', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_TEXT_KEY_TABLES1= + SELECT spider_direct_sql('SELECT "a", "b", "c" FROM "t1" ORDER BY "c"', '', 'srv "s_2_1"'); +let $CHILD2_1_AUTO_INCREMENT_INCREMENT1= + SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_1" START WITH 1 INCREMENT BY 1', '', 'srv "s_2_1"'); +let $CHILD2_1_AUTO_INCREMENT_INCREMENT2= + SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_1" START WITH 2 INCREMENT BY 4', '', 'srv "s_2_1"'); +let $CHILD2_1_AUTO_INCREMENT_OFFSET1= + SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_1" START WITH 1 INCREMENT BY 1', '', 'srv "s_2_1"'); +let $CHILD2_1_AUTO_INCREMENT_OFFSET2= + SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_1" START WITH 2 INCREMENT BY 4', '', 'srv "s_2_1"'); diff --git a/storage/spider/mysql-test/spider/oracle/include/init_child2_2.inc b/storage/spider/mysql-test/spider/oracle/include/init_child2_2.inc index 117040dcca6..fd4497c0b59 100644 --- a/storage/spider/mysql-test/spider/oracle/include/init_child2_2.inc +++ b/storage/spider/mysql-test/spider/oracle/include/init_child2_2.inc @@ -1,94 +1,94 @@ ---connection master_1
-SELECT spider_direct_sql('ALTER SESSION SET NLS_DATE_FORMAT=\'YYYY-MM-DD HH24:MI:SS\'', '', 'srv "s_2_2"');
-SELECT spider_direct_sql('ALTER SESSION SET NLS_TIME_FORMAT=\'HH24:MI:SSXFF\'', '', 'srv "s_2_2"');
-SELECT spider_direct_sql('ALTER SESSION SET NLS_TIMESTAMP_FORMAT=\'YYYY-MM-DD HH24:MI:SSXFF\'', '', 'srv "s_2_2"');
-let $CHILD2_2_DROP_TABLES=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r3"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"');
-let $CHILD2_2_CREATE_TABLES=
- SELECT spider_direct_sql('CREATE TABLE "ta_r3" (
- "a" INT DEFAULT 10,
- "b" CHAR(1) DEFAULT \'c\',
- "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'),
- CONSTRAINT "pk_s_2_2_ta_r3" PRIMARY KEY("a")
- )', '', 'srv "s_2_2"');
-let $CHILD2_2_DROP_TABLES5=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "s_2_2_ta_r_int"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"');
-let $CHILD2_2_CREATE_TABLES5=
- SELECT spider_direct_sql('CREATE TABLE "s_2_2_ta_r_int" (
- "a" INT DEFAULT 3,
- "b" INT DEFAULT 10,
- "c" INT DEFAULT 11,
- CONSTRAINT "pk_s_2_2_ta_r_int" PRIMARY KEY("a")
- )', '', 'srv "s_2_2"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE INDEX "idx1_s_2_2_ta_r_int" ON "s_2_2_ta_r_int"("b")', '', 'srv "s_2_2"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE INDEX "idx2_s_2_2_ta_r_int" ON "s_2_2_ta_r_int"("c")', '', 'srv "s_2_2"');
-let $CHILD2_2_SELECT_TABLES=
- SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r3" ORDER BY "a"', '', 'srv "s_2_2"');
-let $CHILD2_2_DROP_FT_TABLES=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ft_r3"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"');
-let $CHILD2_2_CREATE_FT_TABLES=
- SELECT spider_direct_sql('CREATE TABLE "ft_r3" (
- "a" INT DEFAULT 0,
- "b" TEXT,
- "c" TEXT,
- "d" TEXT,
- CONSTRAINT "pk_s_2_2_ft_r3" PRIMARY KEY("a"),
- FULLTEXT INDEX "ft_idx1"("b"),
- FULLTEXT INDEX "ft_idx2"("c")
- )', '', 'srv "s_2_2"');
-let $CHILD2_2_SELECT_FT_TABLES=
- SELECT spider_direct_sql('SELECT "a", "b", "c", "d" FROM "ft_r3" ORDER BY "a"', '', 'srv "s_2_2"');
-let $CHILD2_2_DROP_GM_TABLES=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "gm_r3"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"');
-let $CHILD2_2_CREATE_GM_TABLES=
- SELECT spider_direct_sql('CREATE TABLE "gm_r3" (
- "a" INT DEFAULT 0,
- "b" GEOMETRY NOT NULL,
- "c" GEOMETRY NOT NULL,
- CONSTRAINT "pk_s_2_2_gm_r3" PRIMARY KEY("a"),
- SPATIAL INDEX "sp_idx1"("b"),
- SPATIAL INDEX "sp_idx2"("c")
- )', '', 'srv "s_2_2"');
-let $CHILD2_2_SELECT_GM_TABLES=
- SELECT spider_direct_sql('SELECT "a", "b", "c" FROM "gm_r3" ORDER BY "a"', '', 'srv "s_2_2"');
-let $CHILD2_2_DROP_LOCK_TABLES1=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t1_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"');
-let $CHILD2_2_CREATE_LOCK_TABLES1=
- SELECT spider_direct_sql('CREATE TABLE "t1_2" (
- "id" INT NOT NULL,
- CONSTRAINT "pk_s_2_2_t1_2" PRIMARY KEY ("id")
- )', '', 'srv "s_2_2"');
-let $CHILD2_2_DROP_LOCK_TABLES2=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t2_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"');
-let $CHILD2_2_CREATE_LOCK_TABLES2=
- SELECT spider_direct_sql('CREATE TABLE "t2_1" (
- "id" INT NOT NULL,
- CONSTRAINT "pk_s_2_2_t2_1" PRIMARY KEY ("id")
- )', '', 'srv "s_2_2"');
-let $CHILD2_2_DROP_INCREMENT_TABLES1=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t1_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"');
-let $CHILD2_2_CREATE_INCREMENT_TABLES1=
- SELECT spider_direct_sql('CREATE TABLE "t1_2" (
- "id" INT NOT NULL,
- CONSTRAINT "pk_s_2_2_t1_2" PRIMARY KEY ("id")
- )', '', 'srv "s_2_2"');
-let $CHILD2_2_SELECT_INCREMENT_TABLES1=
- SELECT spider_direct_sql('SELECT "id" FROM "t1_2" ORDER BY "id"', '', 'srv "s_2_2"');
-let $CHILD2_2_AUTO_INCREMENT_INCREMENT1=
- SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_2" START WITH 1 INCREMENT BY 1', '', 'srv "s_2_2"');
-let $CHILD2_2_AUTO_INCREMENT_INCREMENT2=
- SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_2" START WITH 3 INCREMENT BY 4', '', 'srv "s_2_2"');
-let $CHILD2_2_AUTO_INCREMENT_OFFSET1=
- SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_2" START WITH 1 INCREMENT BY 1', '', 'srv "s_2_2"');
-let $CHILD2_2_AUTO_INCREMENT_OFFSET2=
- SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_2" START WITH 3 INCREMENT BY 4', '', 'srv "s_2_2"');
+--connection master_1 +SELECT spider_direct_sql('ALTER SESSION SET NLS_DATE_FORMAT=\'YYYY-MM-DD HH24:MI:SS\'', '', 'srv "s_2_2"'); +SELECT spider_direct_sql('ALTER SESSION SET NLS_TIME_FORMAT=\'HH24:MI:SSXFF\'', '', 'srv "s_2_2"'); +SELECT spider_direct_sql('ALTER SESSION SET NLS_TIMESTAMP_FORMAT=\'YYYY-MM-DD HH24:MI:SSXFF\'', '', 'srv "s_2_2"'); +let $CHILD2_2_DROP_TABLES= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r3"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"'); +let $CHILD2_2_CREATE_TABLES= + SELECT spider_direct_sql('CREATE TABLE "ta_r3" ( + "a" INT DEFAULT 10, + "b" CHAR(1) DEFAULT \'c\', + "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'), + CONSTRAINT "pk_s_2_2_ta_r3" PRIMARY KEY("a") + )', '', 'srv "s_2_2"'); +let $CHILD2_2_DROP_TABLES5= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "s_2_2_ta_r_int"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"'); +let $CHILD2_2_CREATE_TABLES5= + SELECT spider_direct_sql('CREATE TABLE "s_2_2_ta_r_int" ( + "a" INT DEFAULT 3, + "b" INT DEFAULT 10, + "c" INT DEFAULT 11, + CONSTRAINT "pk_s_2_2_ta_r_int" PRIMARY KEY("a") + )', '', 'srv "s_2_2"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE INDEX "idx1_s_2_2_ta_r_int" ON "s_2_2_ta_r_int"("b")', '', 'srv "s_2_2"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE INDEX "idx2_s_2_2_ta_r_int" ON "s_2_2_ta_r_int"("c")', '', 'srv "s_2_2"'); +let $CHILD2_2_SELECT_TABLES= + SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r3" ORDER BY "a"', '', 'srv "s_2_2"'); +let $CHILD2_2_DROP_FT_TABLES= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ft_r3"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"'); +let $CHILD2_2_CREATE_FT_TABLES= + SELECT spider_direct_sql('CREATE TABLE "ft_r3" ( + "a" INT DEFAULT 0, + "b" TEXT, + "c" TEXT, + "d" TEXT, + CONSTRAINT "pk_s_2_2_ft_r3" PRIMARY KEY("a"), + FULLTEXT INDEX "ft_idx1"("b"), + FULLTEXT INDEX "ft_idx2"("c") + )', '', 'srv "s_2_2"'); +let $CHILD2_2_SELECT_FT_TABLES= + SELECT spider_direct_sql('SELECT "a", "b", "c", "d" FROM "ft_r3" ORDER BY "a"', '', 'srv "s_2_2"'); +let $CHILD2_2_DROP_GM_TABLES= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "gm_r3"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"'); +let $CHILD2_2_CREATE_GM_TABLES= + SELECT spider_direct_sql('CREATE TABLE "gm_r3" ( + "a" INT DEFAULT 0, + "b" GEOMETRY NOT NULL, + "c" GEOMETRY NOT NULL, + CONSTRAINT "pk_s_2_2_gm_r3" PRIMARY KEY("a"), + SPATIAL INDEX "sp_idx1"("b"), + SPATIAL INDEX "sp_idx2"("c") + )', '', 'srv "s_2_2"'); +let $CHILD2_2_SELECT_GM_TABLES= + SELECT spider_direct_sql('SELECT "a", "b", "c" FROM "gm_r3" ORDER BY "a"', '', 'srv "s_2_2"'); +let $CHILD2_2_DROP_LOCK_TABLES1= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t1_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"'); +let $CHILD2_2_CREATE_LOCK_TABLES1= + SELECT spider_direct_sql('CREATE TABLE "t1_2" ( + "id" INT NOT NULL, + CONSTRAINT "pk_s_2_2_t1_2" PRIMARY KEY ("id") + )', '', 'srv "s_2_2"'); +let $CHILD2_2_DROP_LOCK_TABLES2= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t2_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"'); +let $CHILD2_2_CREATE_LOCK_TABLES2= + SELECT spider_direct_sql('CREATE TABLE "t2_1" ( + "id" INT NOT NULL, + CONSTRAINT "pk_s_2_2_t2_1" PRIMARY KEY ("id") + )', '', 'srv "s_2_2"'); +let $CHILD2_2_DROP_INCREMENT_TABLES1= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t1_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"'); +let $CHILD2_2_CREATE_INCREMENT_TABLES1= + SELECT spider_direct_sql('CREATE TABLE "t1_2" ( + "id" INT NOT NULL, + CONSTRAINT "pk_s_2_2_t1_2" PRIMARY KEY ("id") + )', '', 'srv "s_2_2"'); +let $CHILD2_2_SELECT_INCREMENT_TABLES1= + SELECT spider_direct_sql('SELECT "id" FROM "t1_2" ORDER BY "id"', '', 'srv "s_2_2"'); +let $CHILD2_2_AUTO_INCREMENT_INCREMENT1= + SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_2" START WITH 1 INCREMENT BY 1', '', 'srv "s_2_2"'); +let $CHILD2_2_AUTO_INCREMENT_INCREMENT2= + SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_2" START WITH 3 INCREMENT BY 4', '', 'srv "s_2_2"'); +let $CHILD2_2_AUTO_INCREMENT_OFFSET1= + SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_2" START WITH 1 INCREMENT BY 1', '', 'srv "s_2_2"'); +let $CHILD2_2_AUTO_INCREMENT_OFFSET2= + SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_2" START WITH 3 INCREMENT BY 4', '', 'srv "s_2_2"'); diff --git a/storage/spider/mysql-test/spider/oracle/include/init_child2_3.inc b/storage/spider/mysql-test/spider/oracle/include/init_child2_3.inc index 5c06a9f6a73..e16dfeffd81 100644 --- a/storage/spider/mysql-test/spider/oracle/include/init_child2_3.inc +++ b/storage/spider/mysql-test/spider/oracle/include/init_child2_3.inc @@ -1,15 +1,15 @@ ---connection master_1
-SELECT spider_direct_sql('ALTER SESSION SET NLS_DATE_FORMAT=\'YYYY-MM-DD HH24:MI:SS\'', '', 'srv "s_2_3"');
-SELECT spider_direct_sql('ALTER SESSION SET NLS_TIME_FORMAT=\'HH24:MI:SSXFF\'', '', 'srv "s_2_3"');
-SELECT spider_direct_sql('ALTER SESSION SET NLS_TIMESTAMP_FORMAT=\'YYYY-MM-DD HH24:MI:SSXFF\'', '', 'srv "s_2_3"');
-let $CHILD2_3_DROP_TABLES=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r4"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_3"');
-let $CHILD2_3_CREATE_TABLES=
- SELECT spider_direct_sql('CREATE TABLE "ta_r4" (
- "a" INT DEFAULT 10,
- "b" CHAR(1) DEFAULT \'c\',
- "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'),
- CONSTRAINT "pk_s_2_3_ta_r4" PRIMARY KEY("a")
- )', '', 'srv "s_2_3"');
-let $CHILD2_3_SELECT_TABLES=
- SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r4" ORDER BY "a"', '', 'srv "s_2_3"');
+--connection master_1 +SELECT spider_direct_sql('ALTER SESSION SET NLS_DATE_FORMAT=\'YYYY-MM-DD HH24:MI:SS\'', '', 'srv "s_2_3"'); +SELECT spider_direct_sql('ALTER SESSION SET NLS_TIME_FORMAT=\'HH24:MI:SSXFF\'', '', 'srv "s_2_3"'); +SELECT spider_direct_sql('ALTER SESSION SET NLS_TIMESTAMP_FORMAT=\'YYYY-MM-DD HH24:MI:SSXFF\'', '', 'srv "s_2_3"'); +let $CHILD2_3_DROP_TABLES= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r4"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_3"'); +let $CHILD2_3_CREATE_TABLES= + SELECT spider_direct_sql('CREATE TABLE "ta_r4" ( + "a" INT DEFAULT 10, + "b" CHAR(1) DEFAULT \'c\', + "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'), + CONSTRAINT "pk_s_2_3_ta_r4" PRIMARY KEY("a") + )', '', 'srv "s_2_3"'); +let $CHILD2_3_SELECT_TABLES= + SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r4" ORDER BY "a"', '', 'srv "s_2_3"'); diff --git a/storage/spider/mysql-test/spider/oracle/include/init_child3_1.inc b/storage/spider/mysql-test/spider/oracle/include/init_child3_1.inc index f70afeb58de..d2d308cbefe 100644 --- a/storage/spider/mysql-test/spider/oracle/include/init_child3_1.inc +++ b/storage/spider/mysql-test/spider/oracle/include/init_child3_1.inc @@ -1,3 +1,3 @@ ---let $TEST_ENGINE_TYPE= $CHILD3_1_ENGINE_TYPE
---source ../../include/init_engine.inc
---let $INIT_CHILD3_1_ENGINE= $INIT_TEST_ENGINE
+--let $TEST_ENGINE_TYPE= $CHILD3_1_ENGINE_TYPE +--source ../../include/init_engine.inc +--let $INIT_CHILD3_1_ENGINE= $INIT_TEST_ENGINE diff --git a/storage/spider/mysql-test/spider/oracle/include/init_child3_2.inc b/storage/spider/mysql-test/spider/oracle/include/init_child3_2.inc index e84567f2243..3fbe1bd55bb 100644 --- a/storage/spider/mysql-test/spider/oracle/include/init_child3_2.inc +++ b/storage/spider/mysql-test/spider/oracle/include/init_child3_2.inc @@ -1,3 +1,3 @@ ---let $TEST_ENGINE_TYPE= $CHILD3_2_ENGINE_TYPE
---source ../../include/init_engine.inc
---let $INIT_CHILD3_2_ENGINE= $INIT_TEST_ENGINE
+--let $TEST_ENGINE_TYPE= $CHILD3_2_ENGINE_TYPE +--source ../../include/init_engine.inc +--let $INIT_CHILD3_2_ENGINE= $INIT_TEST_ENGINE diff --git a/storage/spider/mysql-test/spider/oracle/include/init_child3_3.inc b/storage/spider/mysql-test/spider/oracle/include/init_child3_3.inc index d3f31049ff6..3c7aaa8af84 100644 --- a/storage/spider/mysql-test/spider/oracle/include/init_child3_3.inc +++ b/storage/spider/mysql-test/spider/oracle/include/init_child3_3.inc @@ -1,3 +1,3 @@ ---let $TEST_ENGINE_TYPE= $CHILD3_3_ENGINE_TYPE
---source ../../include/init_engine.inc
---let $INIT_CHILD3_3_ENGINE= $INIT_TEST_ENGINE
+--let $TEST_ENGINE_TYPE= $CHILD3_3_ENGINE_TYPE +--source ../../include/init_engine.inc +--let $INIT_CHILD3_3_ENGINE= $INIT_TEST_ENGINE diff --git a/storage/spider/mysql-test/spider/oracle/include/init_slave1_1.inc b/storage/spider/mysql-test/spider/oracle/include/init_slave1_1.inc index 87c05f1f690..73c3c6b9ef2 100644 --- a/storage/spider/mysql-test/spider/oracle/include/init_slave1_1.inc +++ b/storage/spider/mysql-test/spider/oracle/include/init_slave1_1.inc @@ -1,10 +1,10 @@ -let $SLAVE1_1_COMMENT_INCREMENT1_1=
- COMMENT '';
-let $SLAVE1_1_COMMENT_INCREMENT1_P_1=
- COMMENT ''
- PARTITION BY LIST(MOD(id, 2)) (
- PARTITION pt1 VALUES IN (0)
- COMMENT='',
- PARTITION pt2 VALUES IN (1)
- COMMENT=''
- );
+let $SLAVE1_1_COMMENT_INCREMENT1_1= + COMMENT ''; +let $SLAVE1_1_COMMENT_INCREMENT1_P_1= + COMMENT '' + PARTITION BY LIST(MOD(id, 2)) ( + PARTITION pt1 VALUES IN (0) + COMMENT='', + PARTITION pt2 VALUES IN (1) + COMMENT='' + ); diff --git a/storage/spider/mysql-test/spider/oracle/t/direct_aggregate.test b/storage/spider/mysql-test/spider/oracle/t/direct_aggregate.test index 5f17ac402e2..d65f4c5a624 100644 --- a/storage/spider/mysql-test/spider/oracle/t/direct_aggregate.test +++ b/storage/spider/mysql-test/spider/oracle/t/direct_aggregate.test @@ -1,179 +1,179 @@ ---disable_warnings
---disable_query_log
---disable_result_log
---source test_init.inc
---enable_result_log
---enable_query_log
-
---echo
---echo drop and create databases
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- CREATE DATABASE auto_test_remote;
- USE auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
- CREATE DATABASE auto_test_remote2;
- USE auto_test_remote2;
-}
---enable_warnings
-
---echo
---echo test select 1
---connection master_1
-SELECT 1;
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- SELECT 1;
- --connection child2_2
- SELECT 1;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo create table select test
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_DROP_TABLES;
- echo CHILD2_1_CREATE_TABLES;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_TABLES;
- --enable_warnings
- eval $CHILD2_1_CREATE_TABLES;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
---disable_warnings
-DROP TABLE IF EXISTS ta_l;
---enable_warnings
---disable_query_log
-echo CREATE TABLE ta_l (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
-eval CREATE TABLE ta_l (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
-) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
---enable_query_log
-INSERT INTO ta_l (a, b, c) VALUES
- (1, 'a', '2008-08-01 10:21:39'),
- (2, 'b', '2000-01-01 00:00:00'),
- (3, 'e', '2007-06-04 20:03:11'),
- (4, 'd', '2003-11-30 05:01:03'),
- (5, 'c', '2001-12-31 23:59:59');
-
---echo
---echo direct_aggregating test
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-SELECT COUNT(*) FROM ta_l;
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-SELECT MAX(a) FROM ta_l;
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-SELECT MIN(a) FROM ta_l;
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-SELECT MAX(a) FROM ta_l WHERE a < 5;
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-SELECT MIN(a) FROM ta_l WHERE a > 1;
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo deinit
---disable_warnings
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
-}
---disable_query_log
---disable_result_log
---source test_deinit.inc
---enable_result_log
---enable_query_log
---enable_warnings
---echo
---echo end of test
+--disable_warnings +--disable_query_log +--disable_result_log +--source test_init.inc +--enable_result_log +--enable_query_log + +--echo +--echo drop and create databases +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +CREATE DATABASE auto_test_local; +USE auto_test_local; +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + CREATE DATABASE auto_test_remote; + USE auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; + CREATE DATABASE auto_test_remote2; + USE auto_test_remote2; +} +--enable_warnings + +--echo +--echo test select 1 +--connection master_1 +SELECT 1; +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + SELECT 1; + --connection child2_2 + SELECT 1; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + +--echo +--echo create table select test +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_DROP_TABLES; + echo CHILD2_1_CREATE_TABLES; + } + --disable_warnings + eval $CHILD2_1_DROP_TABLES; + --enable_warnings + eval $CHILD2_1_CREATE_TABLES; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} +--connection master_1 +--disable_warnings +DROP TABLE IF EXISTS ta_l; +--enable_warnings +--disable_query_log +echo CREATE TABLE ta_l ( + a INT, + b CHAR(1), + c DATETIME, + PRIMARY KEY(a) +) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1; +eval CREATE TABLE ta_l ( + a INT, + b CHAR(1), + c DATETIME, + PRIMARY KEY(a) +) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1; +--enable_query_log +INSERT INTO ta_l (a, b, c) VALUES + (1, 'a', '2008-08-01 10:21:39'), + (2, 'b', '2000-01-01 00:00:00'), + (3, 'e', '2007-06-04 20:03:11'), + (4, 'd', '2003-11-30 05:01:03'), + (5, 'c', '2001-12-31 23:59:59'); + +--echo +--echo direct_aggregating test +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} +--connection master_1 +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +SELECT COUNT(*) FROM ta_l; +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +SELECT MAX(a) FROM ta_l; +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +SELECT MIN(a) FROM ta_l; +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +SELECT MAX(a) FROM ta_l WHERE a < 5; +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +SELECT MIN(a) FROM ta_l WHERE a > 1; +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %'; + } + eval $CHILD2_1_SELECT_TABLES; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + +--echo +--echo deinit +--disable_warnings +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; +} +--disable_query_log +--disable_result_log +--source test_deinit.inc +--enable_result_log +--enable_query_log +--enable_warnings +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/oracle/t/direct_aggregate_part.test b/storage/spider/mysql-test/spider/oracle/t/direct_aggregate_part.test index 2d67e9af32c..aebf210c745 100644 --- a/storage/spider/mysql-test/spider/oracle/t/direct_aggregate_part.test +++ b/storage/spider/mysql-test/spider/oracle/t/direct_aggregate_part.test @@ -1,192 +1,192 @@ ---disable_warnings
---disable_query_log
---disable_result_log
---source test_init.inc
---enable_result_log
---enable_query_log
-if (!$HAVE_PARTITION)
-{
- --disable_query_log
- --disable_result_log
- --source test_deinit.inc
- --enable_result_log
- --enable_query_log
- --enable_warnings
- skip Test requires partitioning;
-}
-
---echo
---echo drop and create databases
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- CREATE DATABASE auto_test_remote;
- USE auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
- CREATE DATABASE auto_test_remote2;
- USE auto_test_remote2;
-}
---enable_warnings
-
---echo
---echo test select 1
---connection master_1
-SELECT 1;
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- SELECT 1;
- --connection child2_2
- SELECT 1;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo with partition test
-if ($HAVE_PARTITION)
-{
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_2
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_2_DROP_TABLES;
- echo CHILD2_2_CREATE_TABLES;
- }
- --disable_warnings
- eval $CHILD2_2_DROP_TABLES;
- --enable_warnings
- eval $CHILD2_2_CREATE_TABLES;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_DROP_TABLES2;
- echo CHILD2_1_CREATE_TABLES2;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_TABLES2;
- --enable_warnings
- eval $CHILD2_1_CREATE_TABLES2;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- --connection master_1
- --disable_query_log
- echo CREATE TABLE ta_l2 (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
- ) MASTER_1_ENGINE MASTER_1_COMMENT2_P_2_1;
- eval CREATE TABLE ta_l2 (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
- ) $MASTER_1_ENGINE $MASTER_1_COMMENT2_P_2_1;
- INSERT INTO ta_l2 (a, b, c) VALUES
- (1, 'a', '2008-08-01 10:21:39'),
- (2, 'b', '2000-01-01 00:00:00'),
- (3, 'e', '2007-06-04 20:03:11'),
- (4, 'd', '2003-11-30 05:01:03'),
- (5, 'c', '2001-12-31 23:59:59');
- --enable_query_log
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- SELECT COUNT(*) FROM ta_l2;
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- SELECT MAX(a) FROM ta_l2;
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- SELECT MIN(a) FROM ta_l2;
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- SELECT MAX(a) FROM ta_l2 WHERE a < 5;
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- SELECT MIN(a) FROM ta_l2 WHERE a > 1;
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %';
- }
- eval $CHILD2_2_SELECT_TABLES;
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %';
- }
- eval $CHILD2_1_SELECT_TABLES2;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
-}
-
---echo
---echo deinit
---disable_warnings
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
-}
---disable_query_log
---disable_result_log
---source test_deinit.inc
---enable_result_log
---enable_query_log
---enable_warnings
---echo
---echo end of test
+--disable_warnings +--disable_query_log +--disable_result_log +--source test_init.inc +--enable_result_log +--enable_query_log +if (!$HAVE_PARTITION) +{ + --disable_query_log + --disable_result_log + --source test_deinit.inc + --enable_result_log + --enable_query_log + --enable_warnings + skip Test requires partitioning; +} + +--echo +--echo drop and create databases +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +CREATE DATABASE auto_test_local; +USE auto_test_local; +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + CREATE DATABASE auto_test_remote; + USE auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; + CREATE DATABASE auto_test_remote2; + USE auto_test_remote2; +} +--enable_warnings + +--echo +--echo test select 1 +--connection master_1 +SELECT 1; +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + SELECT 1; + --connection child2_2 + SELECT 1; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + +--echo +--echo with partition test +if ($HAVE_PARTITION) +{ + if ($USE_CHILD_GROUP2) + { + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_2 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_2_DROP_TABLES; + echo CHILD2_2_CREATE_TABLES; + } + --disable_warnings + eval $CHILD2_2_DROP_TABLES; + --enable_warnings + eval $CHILD2_2_CREATE_TABLES; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + --connection child2_1 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_DROP_TABLES2; + echo CHILD2_1_CREATE_TABLES2; + } + --disable_warnings + eval $CHILD2_1_DROP_TABLES2; + --enable_warnings + eval $CHILD2_1_CREATE_TABLES2; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } + } + --connection master_1 + --disable_query_log + echo CREATE TABLE ta_l2 ( + a INT, + b CHAR(1), + c DATETIME, + PRIMARY KEY(a) + ) MASTER_1_ENGINE MASTER_1_COMMENT2_P_2_1; + eval CREATE TABLE ta_l2 ( + a INT, + b CHAR(1), + c DATETIME, + PRIMARY KEY(a) + ) $MASTER_1_ENGINE $MASTER_1_COMMENT2_P_2_1; + INSERT INTO ta_l2 (a, b, c) VALUES + (1, 'a', '2008-08-01 10:21:39'), + (2, 'b', '2000-01-01 00:00:00'), + (3, 'e', '2007-06-04 20:03:11'), + (4, 'd', '2003-11-30 05:01:03'), + (5, 'c', '2001-12-31 23:59:59'); + --enable_query_log + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + SELECT COUNT(*) FROM ta_l2; + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + SELECT MAX(a) FROM ta_l2; + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + SELECT MIN(a) FROM ta_l2; + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + SELECT MAX(a) FROM ta_l2 WHERE a < 5; + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + SELECT MIN(a) FROM ta_l2 WHERE a > 1; + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + if ($USE_CHILD_GROUP2) + { + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_2 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %'; + } + eval $CHILD2_2_SELECT_TABLES; + --connection child2_1 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %'; + } + eval $CHILD2_1_SELECT_TABLES2; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } + } +} + +--echo +--echo deinit +--disable_warnings +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; +} +--disable_query_log +--disable_result_log +--source test_deinit.inc +--enable_result_log +--enable_query_log +--enable_warnings +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/oracle/t/have_partition.inc b/storage/spider/mysql-test/spider/oracle/t/have_partition.inc index 573c76ab43b..b6e699475db 100644 --- a/storage/spider/mysql-test/spider/oracle/t/have_partition.inc +++ b/storage/spider/mysql-test/spider/oracle/t/have_partition.inc @@ -1,7 +1,7 @@ -let $HAVE_PARTITION= 0;
-if (`SELECT count(*) FROM information_schema.plugins WHERE
- plugin_status = 'ACTIVE' AND
- plugin_name = 'partition'`)
-{
- let $HAVE_PARTITION= 1;
-}
+let $HAVE_PARTITION= 0; +if (`SELECT count(*) FROM information_schema.plugins WHERE + plugin_status = 'ACTIVE' AND + plugin_name = 'partition'`) +{ + let $HAVE_PARTITION= 1; +} diff --git a/storage/spider/mysql-test/spider/oracle/t/have_trigger.inc b/storage/spider/mysql-test/spider/oracle/t/have_trigger.inc index 10c0871dd5f..32de484b388 100644 --- a/storage/spider/mysql-test/spider/oracle/t/have_trigger.inc +++ b/storage/spider/mysql-test/spider/oracle/t/have_trigger.inc @@ -1,2 +1,2 @@ -let $HAVE_TRIGGER= `SELECT COUNT(*) FROM information_schema.tables
- WHERE TABLE_SCHEMA = 'information_schema' AND TABLE_NAME = 'TRIGGERS'`;
+let $HAVE_TRIGGER= `SELECT COUNT(*) FROM information_schema.tables + WHERE TABLE_SCHEMA = 'information_schema' AND TABLE_NAME = 'TRIGGERS'`; diff --git a/storage/spider/mysql-test/spider/oracle/t/spider3_fixes.test b/storage/spider/mysql-test/spider/oracle/t/spider3_fixes.test index 7530ce97837..13fa6f5fa39 100644 --- a/storage/spider/mysql-test/spider/oracle/t/spider3_fixes.test +++ b/storage/spider/mysql-test/spider/oracle/t/spider3_fixes.test @@ -1,292 +1,292 @@ -# This test tests for Spider 3.0's bug fixes
-source include/have_log_bin.inc;
---disable_warnings
---disable_query_log
---disable_result_log
---source test_init.inc
---source slave_test_init.inc
---enable_result_log
---enable_query_log
-
---echo
---echo drop and create databases
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-if ($USE_REPLICATION)
-{
- --connection slave1_1
- DROP DATABASE IF EXISTS auto_test_local;
- CREATE DATABASE auto_test_local;
- USE auto_test_local;
-}
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- CREATE DATABASE auto_test_remote;
- USE auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
- CREATE DATABASE auto_test_remote2;
- USE auto_test_remote2;
-}
---enable_warnings
-
---echo
---echo test select 1
---connection master_1
-SELECT 1;
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- SELECT 1;
- --connection child2_2
- SELECT 1;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
-
---echo
---echo 3.1
---echo auto_increment
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_DROP_INCREMENT_TABLES1;
- echo CHILD2_1_CREATE_INCREMENT_TABLES1;
- echo CHILD2_1_AUTO_INCREMENT_INCREMENT2;
- echo CHILD2_1_AUTO_INCREMENT_OFFSET2;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_INCREMENT_TABLES1;
- --enable_warnings
- eval $CHILD2_1_CREATE_INCREMENT_TABLES1;
- eval $CHILD2_1_AUTO_INCREMENT_INCREMENT2;
- eval $CHILD2_1_AUTO_INCREMENT_OFFSET2;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-if ($USE_REPLICATION)
-{
- save_master_pos;
- --connection slave1_1
- sync_with_master;
- --connection master_1
- --disable_query_log
- SET SESSION sql_log_bin= 0;
- --enable_query_log
-}
---disable_warnings
-DROP TABLE IF EXISTS t1, t2;
---enable_warnings
---disable_query_log
-echo CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_1;
-echo CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_1;
-echo MASTER_1_AUTO_INCREMENT_INCREMENT2;
-echo MASTER_1_AUTO_INCREMENT_OFFSET2;
-eval CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
-) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_1;
-eval CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
-) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_1;
-eval $MASTER_1_AUTO_INCREMENT_INCREMENT2;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET2;
-if ($USE_REPLICATION)
-{
- SET SESSION sql_log_bin= 1;
- --connection slave1_1
- --disable_warnings
- DROP TABLE IF EXISTS t1, t2;
- --enable_warnings
- echo CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_1;
- echo CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_1;
- eval CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_1;
- eval CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_1;
- --connection master_1
-}
---enable_query_log
-INSERT INTO t1 () VALUES ();
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
-INSERT INTO t2 () VALUES ();
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t2;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET3;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
---enable_query_log
-INSERT INTO t1 (id) VALUES (null);
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET4;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
---enable_query_log
-INSERT INTO t2 (id) VALUES (null);
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t2;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET3;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
---enable_query_log
-INSERT INTO t1 () VALUES (),(),(),();
-SELECT LAST_INSERT_ID();
-SELECT id FROM t1 ORDER BY id;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET4;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
---enable_query_log
-INSERT INTO t2 () VALUES (),(),(),();
-SELECT LAST_INSERT_ID();
-SELECT id FROM t2 ORDER BY id;
-TRUNCATE TABLE t1;
-TRUNCATE TABLE t2;
-INSERT INTO t1 () VALUES (),(),(),();
-SELECT LAST_INSERT_ID();
-SELECT id FROM t1 ORDER BY id;
-INSERT INTO t2 () VALUES (),(),(),();
-SELECT LAST_INSERT_ID();
-SELECT id FROM t2 ORDER BY id;
-SET INSERT_ID=5000;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET3;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
---enable_query_log
-INSERT INTO t1 () VALUES ();
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET4;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
---enable_query_log
-INSERT INTO t2 () VALUES ();
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t2;
-INSERT INTO t1 (id) VALUES (10000);
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
-INSERT INTO t2 (id) VALUES (1000);
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t2;
-if ($USE_REPLICATION)
-{
- save_master_pos;
- --connection slave1_1
- sync_with_master;
- SELECT id FROM t1 ORDER BY id;
- --connection master_1
- --disable_query_log
- SET SESSION sql_log_bin= 0;
- --enable_query_log
-}
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %';
- }
- eval $CHILD2_1_SELECT_INCREMENT_TABLES1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_AUTO_INCREMENT_INCREMENT1;
- echo CHILD2_1_AUTO_INCREMENT_OFFSET1;
- }
- eval $CHILD2_1_AUTO_INCREMENT_INCREMENT1;
- eval $CHILD2_1_AUTO_INCREMENT_OFFSET1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
-
---echo
---echo deinit
---disable_warnings
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-if ($USE_REPLICATION)
-{
- --connection slave1_1
- DROP DATABASE IF EXISTS auto_test_local;
-}
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
-}
---disable_query_log
---disable_result_log
---source slave_test_deinit.inc
---source test_deinit.inc
---enable_result_log
---enable_query_log
---enable_warnings
---echo
---echo end of test
+# This test tests for Spider 3.0's bug fixes +source include/have_log_bin.inc; +--disable_warnings +--disable_query_log +--disable_result_log +--source test_init.inc +--source slave_test_init.inc +--enable_result_log +--enable_query_log + +--echo +--echo drop and create databases +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +CREATE DATABASE auto_test_local; +USE auto_test_local; +if ($USE_REPLICATION) +{ + --connection slave1_1 + DROP DATABASE IF EXISTS auto_test_local; + CREATE DATABASE auto_test_local; + USE auto_test_local; +} +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + CREATE DATABASE auto_test_remote; + USE auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; + CREATE DATABASE auto_test_remote2; + USE auto_test_remote2; +} +--enable_warnings + +--echo +--echo test select 1 +--connection master_1 +SELECT 1; +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + SELECT 1; + --connection child2_2 + SELECT 1; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + + +--echo +--echo 3.1 +--echo auto_increment +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_DROP_INCREMENT_TABLES1; + echo CHILD2_1_CREATE_INCREMENT_TABLES1; + echo CHILD2_1_AUTO_INCREMENT_INCREMENT2; + echo CHILD2_1_AUTO_INCREMENT_OFFSET2; + } + --disable_warnings + eval $CHILD2_1_DROP_INCREMENT_TABLES1; + --enable_warnings + eval $CHILD2_1_CREATE_INCREMENT_TABLES1; + eval $CHILD2_1_AUTO_INCREMENT_INCREMENT2; + eval $CHILD2_1_AUTO_INCREMENT_OFFSET2; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} +--connection master_1 +if ($USE_REPLICATION) +{ + save_master_pos; + --connection slave1_1 + sync_with_master; + --connection master_1 + --disable_query_log + SET SESSION sql_log_bin= 0; + --enable_query_log +} +--disable_warnings +DROP TABLE IF EXISTS t1, t2; +--enable_warnings +--disable_query_log +echo CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) +) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_1; +echo CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) +) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_1; +echo MASTER_1_AUTO_INCREMENT_INCREMENT2; +echo MASTER_1_AUTO_INCREMENT_OFFSET2; +eval CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) +) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_1; +eval CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) +) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_1; +eval $MASTER_1_AUTO_INCREMENT_INCREMENT2; +eval $MASTER_1_AUTO_INCREMENT_OFFSET2; +if ($USE_REPLICATION) +{ + SET SESSION sql_log_bin= 1; + --connection slave1_1 + --disable_warnings + DROP TABLE IF EXISTS t1, t2; + --enable_warnings + echo CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_1; + echo CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_1; + eval CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_1; + eval CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_1; + --connection master_1 +} +--enable_query_log +INSERT INTO t1 () VALUES (); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t1; +INSERT INTO t2 () VALUES (); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t2; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET3; +eval $MASTER_1_AUTO_INCREMENT_OFFSET3; +--enable_query_log +INSERT INTO t1 (id) VALUES (null); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t1; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET4; +eval $MASTER_1_AUTO_INCREMENT_OFFSET4; +--enable_query_log +INSERT INTO t2 (id) VALUES (null); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t2; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET3; +eval $MASTER_1_AUTO_INCREMENT_OFFSET3; +--enable_query_log +INSERT INTO t1 () VALUES (),(),(),(); +SELECT LAST_INSERT_ID(); +SELECT id FROM t1 ORDER BY id; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET4; +eval $MASTER_1_AUTO_INCREMENT_OFFSET4; +--enable_query_log +INSERT INTO t2 () VALUES (),(),(),(); +SELECT LAST_INSERT_ID(); +SELECT id FROM t2 ORDER BY id; +TRUNCATE TABLE t1; +TRUNCATE TABLE t2; +INSERT INTO t1 () VALUES (),(),(),(); +SELECT LAST_INSERT_ID(); +SELECT id FROM t1 ORDER BY id; +INSERT INTO t2 () VALUES (),(),(),(); +SELECT LAST_INSERT_ID(); +SELECT id FROM t2 ORDER BY id; +SET INSERT_ID=5000; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET3; +eval $MASTER_1_AUTO_INCREMENT_OFFSET3; +--enable_query_log +INSERT INTO t1 () VALUES (); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t1; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET4; +eval $MASTER_1_AUTO_INCREMENT_OFFSET4; +--enable_query_log +INSERT INTO t2 () VALUES (); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t2; +INSERT INTO t1 (id) VALUES (10000); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t1; +INSERT INTO t2 (id) VALUES (1000); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t2; +if ($USE_REPLICATION) +{ + save_master_pos; + --connection slave1_1 + sync_with_master; + SELECT id FROM t1 ORDER BY id; + --connection master_1 + --disable_query_log + SET SESSION sql_log_bin= 0; + --enable_query_log +} +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %'; + } + eval $CHILD2_1_SELECT_INCREMENT_TABLES1; + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_AUTO_INCREMENT_INCREMENT1; + echo CHILD2_1_AUTO_INCREMENT_OFFSET1; + } + eval $CHILD2_1_AUTO_INCREMENT_INCREMENT1; + eval $CHILD2_1_AUTO_INCREMENT_OFFSET1; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + + +--echo +--echo deinit +--disable_warnings +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +if ($USE_REPLICATION) +{ + --connection slave1_1 + DROP DATABASE IF EXISTS auto_test_local; +} +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; +} +--disable_query_log +--disable_result_log +--source slave_test_deinit.inc +--source test_deinit.inc +--enable_result_log +--enable_query_log +--enable_warnings +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/oracle/t/spider3_fixes_part.test b/storage/spider/mysql-test/spider/oracle/t/spider3_fixes_part.test index f25f000d80c..3288c490a46 100644 --- a/storage/spider/mysql-test/spider/oracle/t/spider3_fixes_part.test +++ b/storage/spider/mysql-test/spider/oracle/t/spider3_fixes_part.test @@ -1,345 +1,345 @@ -# This test tests for Spider 3.0's bug fixes
-source include/have_log_bin.inc;
---disable_warnings
---disable_query_log
---disable_result_log
---source test_init.inc
---source slave_test_init.inc
---enable_result_log
---enable_query_log
-if (!$HAVE_PARTITION)
-{
- --disable_query_log
- --disable_result_log
- --source slave_test_deinit.inc
- --source test_deinit.inc
- --enable_result_log
- --enable_query_log
- --enable_warnings
- skip Test requires partitioning;
-}
-
---echo
---echo drop and create databases
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-if ($USE_REPLICATION)
-{
- --connection slave1_1
- DROP DATABASE IF EXISTS auto_test_local;
- CREATE DATABASE auto_test_local;
- USE auto_test_local;
-}
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- CREATE DATABASE auto_test_remote;
- USE auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
- CREATE DATABASE auto_test_remote2;
- USE auto_test_remote2;
-}
---enable_warnings
-
---echo
---echo test select 1
---connection master_1
-SELECT 1;
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- SELECT 1;
- --connection child2_2
- SELECT 1;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
-
---echo auto_increment with partition
-if ($HAVE_PARTITION)
-{
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_DROP_INCREMENT_TABLES1;
- echo CHILD2_1_CREATE_INCREMENT_TABLES1;
- echo CHILD2_1_AUTO_INCREMENT_INCREMENT2;
- echo CHILD2_1_AUTO_INCREMENT_OFFSET2;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_INCREMENT_TABLES1;
- --enable_warnings
- eval $CHILD2_1_CREATE_INCREMENT_TABLES1;
- eval $CHILD2_1_AUTO_INCREMENT_INCREMENT2;
- eval $CHILD2_1_AUTO_INCREMENT_OFFSET2;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- --connection child2_2
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_2_DROP_INCREMENT_TABLES1;
- echo CHILD2_2_CREATE_INCREMENT_TABLES1;
- echo CHILD2_2_AUTO_INCREMENT_INCREMENT2;
- echo CHILD2_2_AUTO_INCREMENT_OFFSET2;
- }
- --disable_warnings
- eval $CHILD2_2_DROP_INCREMENT_TABLES1;
- --enable_warnings
- eval $CHILD2_2_CREATE_INCREMENT_TABLES1;
- eval $CHILD2_2_AUTO_INCREMENT_INCREMENT2;
- eval $CHILD2_2_AUTO_INCREMENT_OFFSET2;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- --connection master_1
- if ($USE_REPLICATION)
- {
- save_master_pos;
- --connection slave1_1
- sync_with_master;
- --connection master_1
- --disable_query_log
- SET SESSION sql_log_bin= 0;
- --enable_query_log
- }
- --disable_warnings
- DROP TABLE IF EXISTS t1, t2;
- --enable_warnings
- --disable_query_log
- echo CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_P_1;
- echo CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_P_1;
- echo MASTER_1_AUTO_INCREMENT_INCREMENT2;
- echo MASTER_1_AUTO_INCREMENT_OFFSET2;
- eval CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_P_1;
- eval CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_P_1;
- eval $MASTER_1_AUTO_INCREMENT_INCREMENT2;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET2;
- if ($USE_REPLICATION)
- {
- SET SESSION sql_log_bin= 1;
- --connection slave1_1
- --disable_warnings
- DROP TABLE IF EXISTS t1, t2;
- --enable_warnings
- echo CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_P_1;
- echo CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_P_1;
- eval CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_P_1;
- eval CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_P_1;
- --connection master_1
- }
- --enable_query_log
- INSERT INTO t1 () VALUES ();
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- INSERT INTO t2 () VALUES ();
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t2;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET3;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
- --enable_query_log
- INSERT INTO t1 (id) VALUES (null);
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET4;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
- --enable_query_log
- INSERT INTO t2 (id) VALUES (null);
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t2;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET3;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
- --enable_query_log
- INSERT INTO t1 () VALUES (),(),(),();
- SELECT LAST_INSERT_ID();
- SELECT id FROM t1 ORDER BY id;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET4;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
- --enable_query_log
- INSERT INTO t2 () VALUES (),(),(),();
- SELECT LAST_INSERT_ID();
- SELECT id FROM t2 ORDER BY id;
- TRUNCATE TABLE t1;
- TRUNCATE TABLE t2;
- INSERT INTO t1 () VALUES (),(),(),();
- SELECT LAST_INSERT_ID();
- SELECT id FROM t1 ORDER BY id;
- INSERT INTO t2 () VALUES (),(),(),();
- SELECT LAST_INSERT_ID();
- SELECT id FROM t2 ORDER BY id;
- SET INSERT_ID=5000;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET3;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
- --enable_query_log
- INSERT INTO t1 () VALUES ();
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET4;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
- --enable_query_log
- INSERT INTO t2 () VALUES ();
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t2;
- INSERT INTO t1 (id) VALUES (10000);
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- INSERT INTO t2 (id) VALUES (1000);
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t2;
- if ($USE_REPLICATION)
- {
- save_master_pos;
- --connection slave1_1
- sync_with_master;
- SELECT id FROM t1 ORDER BY id;
- --connection master_1
- --disable_query_log
- SET SESSION sql_log_bin= 0;
- --enable_query_log
- }
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %';
- }
- eval $CHILD2_1_SELECT_INCREMENT_TABLES1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_AUTO_INCREMENT_INCREMENT1;
- echo CHILD2_1_AUTO_INCREMENT_OFFSET1;
- }
- eval $CHILD2_1_AUTO_INCREMENT_INCREMENT1;
- eval $CHILD2_1_AUTO_INCREMENT_OFFSET1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %';
- }
- eval $CHILD2_2_SELECT_INCREMENT_TABLES1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_2_AUTO_INCREMENT_INCREMENT1;
- echo CHILD2_2_AUTO_INCREMENT_OFFSET1;
- }
- eval $CHILD2_2_AUTO_INCREMENT_INCREMENT1;
- eval $CHILD2_2_AUTO_INCREMENT_OFFSET1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
-}
-
-
---echo
---echo deinit
---disable_warnings
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-if ($USE_REPLICATION)
-{
- --connection slave1_1
- DROP DATABASE IF EXISTS auto_test_local;
-}
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
-}
---disable_query_log
---disable_result_log
---source slave_test_deinit.inc
---source test_deinit.inc
---enable_result_log
---enable_query_log
---enable_warnings
---echo
---echo end of test
+# This test tests for Spider 3.0's bug fixes +source include/have_log_bin.inc; +--disable_warnings +--disable_query_log +--disable_result_log +--source test_init.inc +--source slave_test_init.inc +--enable_result_log +--enable_query_log +if (!$HAVE_PARTITION) +{ + --disable_query_log + --disable_result_log + --source slave_test_deinit.inc + --source test_deinit.inc + --enable_result_log + --enable_query_log + --enable_warnings + skip Test requires partitioning; +} + +--echo +--echo drop and create databases +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +CREATE DATABASE auto_test_local; +USE auto_test_local; +if ($USE_REPLICATION) +{ + --connection slave1_1 + DROP DATABASE IF EXISTS auto_test_local; + CREATE DATABASE auto_test_local; + USE auto_test_local; +} +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + CREATE DATABASE auto_test_remote; + USE auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; + CREATE DATABASE auto_test_remote2; + USE auto_test_remote2; +} +--enable_warnings + +--echo +--echo test select 1 +--connection master_1 +SELECT 1; +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + SELECT 1; + --connection child2_2 + SELECT 1; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + + +--echo auto_increment with partition +if ($HAVE_PARTITION) +{ + if ($USE_CHILD_GROUP2) + { + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_DROP_INCREMENT_TABLES1; + echo CHILD2_1_CREATE_INCREMENT_TABLES1; + echo CHILD2_1_AUTO_INCREMENT_INCREMENT2; + echo CHILD2_1_AUTO_INCREMENT_OFFSET2; + } + --disable_warnings + eval $CHILD2_1_DROP_INCREMENT_TABLES1; + --enable_warnings + eval $CHILD2_1_CREATE_INCREMENT_TABLES1; + eval $CHILD2_1_AUTO_INCREMENT_INCREMENT2; + eval $CHILD2_1_AUTO_INCREMENT_OFFSET2; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + --connection child2_2 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_2_DROP_INCREMENT_TABLES1; + echo CHILD2_2_CREATE_INCREMENT_TABLES1; + echo CHILD2_2_AUTO_INCREMENT_INCREMENT2; + echo CHILD2_2_AUTO_INCREMENT_OFFSET2; + } + --disable_warnings + eval $CHILD2_2_DROP_INCREMENT_TABLES1; + --enable_warnings + eval $CHILD2_2_CREATE_INCREMENT_TABLES1; + eval $CHILD2_2_AUTO_INCREMENT_INCREMENT2; + eval $CHILD2_2_AUTO_INCREMENT_OFFSET2; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } + } + --connection master_1 + if ($USE_REPLICATION) + { + save_master_pos; + --connection slave1_1 + sync_with_master; + --connection master_1 + --disable_query_log + SET SESSION sql_log_bin= 0; + --enable_query_log + } + --disable_warnings + DROP TABLE IF EXISTS t1, t2; + --enable_warnings + --disable_query_log + echo CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_P_1; + echo CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_P_1; + echo MASTER_1_AUTO_INCREMENT_INCREMENT2; + echo MASTER_1_AUTO_INCREMENT_OFFSET2; + eval CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_P_1; + eval CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_P_1; + eval $MASTER_1_AUTO_INCREMENT_INCREMENT2; + eval $MASTER_1_AUTO_INCREMENT_OFFSET2; + if ($USE_REPLICATION) + { + SET SESSION sql_log_bin= 1; + --connection slave1_1 + --disable_warnings + DROP TABLE IF EXISTS t1, t2; + --enable_warnings + echo CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_P_1; + echo CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_P_1; + eval CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_P_1; + eval CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_P_1; + --connection master_1 + } + --enable_query_log + INSERT INTO t1 () VALUES (); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t1; + INSERT INTO t2 () VALUES (); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t2; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET3; + eval $MASTER_1_AUTO_INCREMENT_OFFSET3; + --enable_query_log + INSERT INTO t1 (id) VALUES (null); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t1; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET4; + eval $MASTER_1_AUTO_INCREMENT_OFFSET4; + --enable_query_log + INSERT INTO t2 (id) VALUES (null); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t2; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET3; + eval $MASTER_1_AUTO_INCREMENT_OFFSET3; + --enable_query_log + INSERT INTO t1 () VALUES (),(),(),(); + SELECT LAST_INSERT_ID(); + SELECT id FROM t1 ORDER BY id; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET4; + eval $MASTER_1_AUTO_INCREMENT_OFFSET4; + --enable_query_log + INSERT INTO t2 () VALUES (),(),(),(); + SELECT LAST_INSERT_ID(); + SELECT id FROM t2 ORDER BY id; + TRUNCATE TABLE t1; + TRUNCATE TABLE t2; + INSERT INTO t1 () VALUES (),(),(),(); + SELECT LAST_INSERT_ID(); + SELECT id FROM t1 ORDER BY id; + INSERT INTO t2 () VALUES (),(),(),(); + SELECT LAST_INSERT_ID(); + SELECT id FROM t2 ORDER BY id; + SET INSERT_ID=5000; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET3; + eval $MASTER_1_AUTO_INCREMENT_OFFSET3; + --enable_query_log + INSERT INTO t1 () VALUES (); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t1; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET4; + eval $MASTER_1_AUTO_INCREMENT_OFFSET4; + --enable_query_log + INSERT INTO t2 () VALUES (); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t2; + INSERT INTO t1 (id) VALUES (10000); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t1; + INSERT INTO t2 (id) VALUES (1000); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t2; + if ($USE_REPLICATION) + { + save_master_pos; + --connection slave1_1 + sync_with_master; + SELECT id FROM t1 ORDER BY id; + --connection master_1 + --disable_query_log + SET SESSION sql_log_bin= 0; + --enable_query_log + } + if ($USE_CHILD_GROUP2) + { + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %'; + } + eval $CHILD2_1_SELECT_INCREMENT_TABLES1; + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_AUTO_INCREMENT_INCREMENT1; + echo CHILD2_1_AUTO_INCREMENT_OFFSET1; + } + eval $CHILD2_1_AUTO_INCREMENT_INCREMENT1; + eval $CHILD2_1_AUTO_INCREMENT_OFFSET1; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + --connection child2_2 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %'; + } + eval $CHILD2_2_SELECT_INCREMENT_TABLES1; + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_2_AUTO_INCREMENT_INCREMENT1; + echo CHILD2_2_AUTO_INCREMENT_OFFSET1; + } + eval $CHILD2_2_AUTO_INCREMENT_INCREMENT1; + eval $CHILD2_2_AUTO_INCREMENT_OFFSET1; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } + } +} + + +--echo +--echo deinit +--disable_warnings +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +if ($USE_REPLICATION) +{ + --connection slave1_1 + DROP DATABASE IF EXISTS auto_test_local; +} +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; +} +--disable_query_log +--disable_result_log +--source slave_test_deinit.inc +--source test_deinit.inc +--enable_result_log +--enable_query_log +--enable_warnings +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/oracle2/include/deinit_child3_1.inc b/storage/spider/mysql-test/spider/oracle2/include/deinit_child3_1.inc index 9b6a9851ccb..74c8efa90aa 100644 --- a/storage/spider/mysql-test/spider/oracle2/include/deinit_child3_1.inc +++ b/storage/spider/mysql-test/spider/oracle2/include/deinit_child3_1.inc @@ -1,3 +1,3 @@ ---let $TEST_ENGINE_TYPE= $CHILD3_1_ENGINE_TYPE
---let $INIT_TEST_ENGINE= $INIT_CHILD3_1_ENGINE
---source ../../include/deinit_engine.inc
+--let $TEST_ENGINE_TYPE= $CHILD3_1_ENGINE_TYPE +--let $INIT_TEST_ENGINE= $INIT_CHILD3_1_ENGINE +--source ../../include/deinit_engine.inc diff --git a/storage/spider/mysql-test/spider/oracle2/include/deinit_child3_2.inc b/storage/spider/mysql-test/spider/oracle2/include/deinit_child3_2.inc index ac0bcdaa938..f42a980ad23 100644 --- a/storage/spider/mysql-test/spider/oracle2/include/deinit_child3_2.inc +++ b/storage/spider/mysql-test/spider/oracle2/include/deinit_child3_2.inc @@ -1,3 +1,3 @@ ---let $TEST_ENGINE_TYPE= $CHILD3_2_ENGINE_TYPE
---let $INIT_TEST_ENGINE= $INIT_CHILD3_2_ENGINE
---source ../../include/deinit_engine.inc
+--let $TEST_ENGINE_TYPE= $CHILD3_2_ENGINE_TYPE +--let $INIT_TEST_ENGINE= $INIT_CHILD3_2_ENGINE +--source ../../include/deinit_engine.inc diff --git a/storage/spider/mysql-test/spider/oracle2/include/deinit_child3_3.inc b/storage/spider/mysql-test/spider/oracle2/include/deinit_child3_3.inc index c93a9822d90..0696fb991cf 100644 --- a/storage/spider/mysql-test/spider/oracle2/include/deinit_child3_3.inc +++ b/storage/spider/mysql-test/spider/oracle2/include/deinit_child3_3.inc @@ -1,3 +1,3 @@ ---let $TEST_ENGINE_TYPE= $CHILD3_3_ENGINE_TYPE
---let $INIT_TEST_ENGINE= $INIT_CHILD3_3_ENGINE
---source ../../include/deinit_engine.inc
+--let $TEST_ENGINE_TYPE= $CHILD3_3_ENGINE_TYPE +--let $INIT_TEST_ENGINE= $INIT_CHILD3_3_ENGINE +--source ../../include/deinit_engine.inc diff --git a/storage/spider/mysql-test/spider/oracle2/include/ha_deinit_child3_1.inc b/storage/spider/mysql-test/spider/oracle2/include/ha_deinit_child3_1.inc index 8fd2ff8a777..c19e376d10a 100644 --- a/storage/spider/mysql-test/spider/oracle2/include/ha_deinit_child3_1.inc +++ b/storage/spider/mysql-test/spider/oracle2/include/ha_deinit_child3_1.inc @@ -1 +1 @@ ---source ../../include/deinit_spider.inc
+--source ../../include/deinit_spider.inc diff --git a/storage/spider/mysql-test/spider/oracle2/include/ha_deinit_child3_2.inc b/storage/spider/mysql-test/spider/oracle2/include/ha_deinit_child3_2.inc index 8fd2ff8a777..c19e376d10a 100644 --- a/storage/spider/mysql-test/spider/oracle2/include/ha_deinit_child3_2.inc +++ b/storage/spider/mysql-test/spider/oracle2/include/ha_deinit_child3_2.inc @@ -1 +1 @@ ---source ../../include/deinit_spider.inc
+--source ../../include/deinit_spider.inc diff --git a/storage/spider/mysql-test/spider/oracle2/include/ha_deinit_child3_3.inc b/storage/spider/mysql-test/spider/oracle2/include/ha_deinit_child3_3.inc index 8fd2ff8a777..c19e376d10a 100644 --- a/storage/spider/mysql-test/spider/oracle2/include/ha_deinit_child3_3.inc +++ b/storage/spider/mysql-test/spider/oracle2/include/ha_deinit_child3_3.inc @@ -1 +1 @@ ---source ../../include/deinit_spider.inc
+--source ../../include/deinit_spider.inc diff --git a/storage/spider/mysql-test/spider/oracle2/include/ha_init_child2_1.inc b/storage/spider/mysql-test/spider/oracle2/include/ha_init_child2_1.inc index 59c0175d349..2684829408d 100644 --- a/storage/spider/mysql-test/spider/oracle2/include/ha_init_child2_1.inc +++ b/storage/spider/mysql-test/spider/oracle2/include/ha_init_child2_1.inc @@ -1,8 +1,8 @@ -let $CHILD2_1_HA_AS_DROP_TABLES=
- $CHILD2_1_DROP_TABLES;
-let $CHILD2_1_HA_AS_CREATE_TABLES=
- $CHILD2_1_CREATE_TABLES;
-let $CHILD2_1_HA_AS_DROP_TABLES2=
- $CHILD2_1_DROP_TABLES2;
-let $CHILD2_1_HA_AS_CREATE_TABLES2=
- $CHILD2_1_CREATE_TABLES2;
+let $CHILD2_1_HA_AS_DROP_TABLES= + $CHILD2_1_DROP_TABLES; +let $CHILD2_1_HA_AS_CREATE_TABLES= + $CHILD2_1_CREATE_TABLES; +let $CHILD2_1_HA_AS_DROP_TABLES2= + $CHILD2_1_DROP_TABLES2; +let $CHILD2_1_HA_AS_CREATE_TABLES2= + $CHILD2_1_CREATE_TABLES2; diff --git a/storage/spider/mysql-test/spider/oracle2/include/ha_init_child2_2.inc b/storage/spider/mysql-test/spider/oracle2/include/ha_init_child2_2.inc index 90d27ed704d..205eaa6fe35 100644 --- a/storage/spider/mysql-test/spider/oracle2/include/ha_init_child2_2.inc +++ b/storage/spider/mysql-test/spider/oracle2/include/ha_init_child2_2.inc @@ -1,4 +1,4 @@ -let $CHILD2_2_HA_DROP_TABLES=
- $CHILD2_2_DROP_TABLES;
-let $CHILD2_2_HA_CREATE_TABLES=
- $CHILD2_2_CREATE_TABLES;
+let $CHILD2_2_HA_DROP_TABLES= + $CHILD2_2_DROP_TABLES; +let $CHILD2_2_HA_CREATE_TABLES= + $CHILD2_2_CREATE_TABLES; diff --git a/storage/spider/mysql-test/spider/oracle2/include/ha_init_child2_3.inc b/storage/spider/mysql-test/spider/oracle2/include/ha_init_child2_3.inc index 11abf112b1f..55cb858372c 100644 --- a/storage/spider/mysql-test/spider/oracle2/include/ha_init_child2_3.inc +++ b/storage/spider/mysql-test/spider/oracle2/include/ha_init_child2_3.inc @@ -1,4 +1,4 @@ -let $CHILD2_3_HA_DROP_TABLES=
- $CHILD2_3_DROP_TABLES;
-let $CHILD2_3_HA_CREATE_TABLES=
- $CHILD2_3_CREATE_TABLES;
+let $CHILD2_3_HA_DROP_TABLES= + $CHILD2_3_DROP_TABLES; +let $CHILD2_3_HA_CREATE_TABLES= + $CHILD2_3_CREATE_TABLES; diff --git a/storage/spider/mysql-test/spider/oracle2/include/ha_init_child3_1.inc b/storage/spider/mysql-test/spider/oracle2/include/ha_init_child3_1.inc index 67f6676a07a..8357f0bdbc2 100644 --- a/storage/spider/mysql-test/spider/oracle2/include/ha_init_child3_1.inc +++ b/storage/spider/mysql-test/spider/oracle2/include/ha_init_child3_1.inc @@ -1,140 +1,140 @@ ---let $CHILD3_1_ENGINE_TYPE=Spider
---let $CHILD3_1_ENGINE=ENGINE=Spider
---source ../include/init_spider.inc
-eval INSERT INTO mysql.spider_link_mon_servers
-(db_name, table_name, link_id, sid, server, scheme, host, port, socket,
- username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key,
- ssl_verify_server_cert, default_file, default_group) VALUES
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL);
-let $CHILD3_1_CHECK_LINK_STATUS=
- SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
- ORDER BY db_name, table_name, link_id;
-let $CHILD3_1_CHECK_LINK_FAILED_LOG=
- SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log;
-let $CHILD3_1_SET_RECOVERY_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 2"';
-let $CHILD3_1_SET_OK_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 1"';
-let $CHILD3_1_SET_OK_STATUS_AS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2", lst "1 0"';
-
-let $CHILD3_1_DROP_TABLES_HA_2_1=
- DROP TABLE IF EXISTS ta_l;
-if ($VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_1_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_1_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-if (!$VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_1_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_1_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-let $CHILD3_1_DROP_TABLES_HA_P_2_1=
- DROP TABLE IF EXISTS ta_l2;
-let $CHILD3_1_CREATE_TABLES_HA_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_1_CREATE_TABLES_HA_AS_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_1_SET_RECOVERY_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 2"'
- );
-let $CHILD3_1_SET_OK_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 1"'
- );
-let $CHILD3_1_SET_OK_STATUS_AS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "1 0"'
- );
+--let $CHILD3_1_ENGINE_TYPE=Spider +--let $CHILD3_1_ENGINE=ENGINE=Spider +--source ../include/init_spider.inc +eval INSERT INTO mysql.spider_link_mon_servers +(db_name, table_name, link_id, sid, server, scheme, host, port, socket, + username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key, + ssl_verify_server_cert, default_file, default_group) VALUES +('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +let $CHILD3_1_CHECK_LINK_STATUS= + SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables + ORDER BY db_name, table_name, link_id; +let $CHILD3_1_CHECK_LINK_FAILED_LOG= + SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log; +let $CHILD3_1_SET_RECOVERY_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 2"'; +let $CHILD3_1_SET_OK_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 1"'; +let $CHILD3_1_SET_OK_STATUS_AS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2", lst "1 0"'; + +let $CHILD3_1_DROP_TABLES_HA_2_1= + DROP TABLE IF EXISTS ta_l; +if ($VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_1_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_1_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +if (!$VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_1_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_1_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +let $CHILD3_1_DROP_TABLES_HA_P_2_1= + DROP TABLE IF EXISTS ta_l2; +let $CHILD3_1_CREATE_TABLES_HA_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_1_CREATE_TABLES_HA_AS_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_1_ENGINE $CHILD3_1_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_1_SET_RECOVERY_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 2"' + ); +let $CHILD3_1_SET_OK_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 1"' + ); +let $CHILD3_1_SET_OK_STATUS_AS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "1 0"' + ); diff --git a/storage/spider/mysql-test/spider/oracle2/include/ha_init_child3_2.inc b/storage/spider/mysql-test/spider/oracle2/include/ha_init_child3_2.inc index 9b61a2e2b73..3ffcec24f51 100644 --- a/storage/spider/mysql-test/spider/oracle2/include/ha_init_child3_2.inc +++ b/storage/spider/mysql-test/spider/oracle2/include/ha_init_child3_2.inc @@ -1,140 +1,140 @@ ---let $CHILD3_2_ENGINE_TYPE=Spider
---let $CHILD3_2_ENGINE=ENGINE=Spider
---source ../include/init_spider.inc
-eval INSERT INTO mysql.spider_link_mon_servers
-(db_name, table_name, link_id, sid, server, scheme, host, port, socket,
- username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key,
- ssl_verify_server_cert, default_file, default_group) VALUES
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL);
-let $CHILD3_2_CHECK_LINK_STATUS=
- SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
- ORDER BY db_name, table_name, link_id;
-let $CHILD3_2_CHECK_LINK_FAILED_LOG=
- SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log;
-let $CHILD3_2_SET_RECOVERY_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 2"';
-let $CHILD3_2_SET_OK_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 1"';
-let $CHILD3_2_SET_OK_STATUS_AS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2", lst "1 0"';
-
-let $CHILD3_2_DROP_TABLES_HA_2_1=
- DROP TABLE IF EXISTS ta_l;
-if ($VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_2_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_2_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-if (!$VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_2_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_2_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-let $CHILD3_2_DROP_TABLES_HA_P_2_1=
- DROP TABLE IF EXISTS ta_l2;
-let $CHILD3_2_CREATE_TABLES_HA_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_2_CREATE_TABLES_HA_AS_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_2_SET_RECOVERY_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 2"'
- );
-let $CHILD3_2_SET_OK_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 1"'
- );
-let $CHILD3_2_SET_OK_STATUS_AS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "1 0"'
- );
+--let $CHILD3_2_ENGINE_TYPE=Spider +--let $CHILD3_2_ENGINE=ENGINE=Spider +--source ../include/init_spider.inc +eval INSERT INTO mysql.spider_link_mon_servers +(db_name, table_name, link_id, sid, server, scheme, host, port, socket, + username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key, + ssl_verify_server_cert, default_file, default_group) VALUES +('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +let $CHILD3_2_CHECK_LINK_STATUS= + SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables + ORDER BY db_name, table_name, link_id; +let $CHILD3_2_CHECK_LINK_FAILED_LOG= + SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log; +let $CHILD3_2_SET_RECOVERY_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 2"'; +let $CHILD3_2_SET_OK_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 1"'; +let $CHILD3_2_SET_OK_STATUS_AS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2", lst "1 0"'; + +let $CHILD3_2_DROP_TABLES_HA_2_1= + DROP TABLE IF EXISTS ta_l; +if ($VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_2_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_2_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +if (!$VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_2_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_2_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +let $CHILD3_2_DROP_TABLES_HA_P_2_1= + DROP TABLE IF EXISTS ta_l2; +let $CHILD3_2_CREATE_TABLES_HA_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_2_CREATE_TABLES_HA_AS_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_2_ENGINE $CHILD3_2_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_2_SET_RECOVERY_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 2"' + ); +let $CHILD3_2_SET_OK_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 1"' + ); +let $CHILD3_2_SET_OK_STATUS_AS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "1 0"' + ); diff --git a/storage/spider/mysql-test/spider/oracle2/include/ha_init_child3_3.inc b/storage/spider/mysql-test/spider/oracle2/include/ha_init_child3_3.inc index 5724a50b3d9..67bd00109f5 100644 --- a/storage/spider/mysql-test/spider/oracle2/include/ha_init_child3_3.inc +++ b/storage/spider/mysql-test/spider/oracle2/include/ha_init_child3_3.inc @@ -1,140 +1,140 @@ ---let $CHILD3_3_ENGINE_TYPE=Spider
---let $CHILD3_3_ENGINE=ENGINE=Spider
---source ../include/init_spider.inc
-eval INSERT INTO mysql.spider_link_mon_servers
-(db_name, table_name, link_id, sid, server, scheme, host, port, socket,
- username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key,
- ssl_verify_server_cert, default_file, default_group) VALUES
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL),
-('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL);
-let $CHILD3_3_CHECK_LINK_STATUS=
- SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
- ORDER BY db_name, table_name, link_id;
-let $CHILD3_3_CHECK_LINK_FAILED_LOG=
- SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log;
-let $CHILD3_3_SET_RECOVERY_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 2"';
-let $CHILD3_3_SET_OK_STATUS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 1"';
-let $CHILD3_3_SET_OK_STATUS_AS_2_1=
- ALTER TABLE ta_l
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2", lst "1 0"';
-
-let $CHILD3_3_DROP_TABLES_HA_2_1=
- DROP TABLE IF EXISTS ta_l;
-if ($VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_3_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_3_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-if (!$VERSION_COMPILE_OS_WIN)
-{
- let $CHILD3_3_CREATE_TABLES_HA_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2",
- database "auto_test_remote auto_test_remote2"';
- let $CHILD3_3_CREATE_TABLES_HA_AS_2_1=
- CREATE TABLE ta_l (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"'
- CONNECTION='host "localhost", user "root", password "",
- msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2"';
-}
-let $CHILD3_3_DROP_TABLES_HA_P_2_1=
- DROP TABLE IF EXISTS ta_l2;
-let $CHILD3_3_CREATE_TABLES_HA_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_3_CREATE_TABLES_HA_AS_P_2_1=
- CREATE TABLE ta_l2 (
- a INT DEFAULT 10,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET
- COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001"'
- );
-let $CHILD3_3_SET_RECOVERY_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 2"'
- );
-let $CHILD3_3_SET_OK_STATUS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "0 1"'
- );
-let $CHILD3_3_SET_OK_STATUS_AS_P_2_1=
- ALTER TABLE ta_l2
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
- priority "1000001", lst "1 0"'
- );
+--let $CHILD3_3_ENGINE_TYPE=Spider +--let $CHILD3_3_ENGINE=ENGINE=Spider +--source ../include/init_spider.inc +eval INSERT INTO mysql.spider_link_mon_servers +(db_name, table_name, link_id, sid, server, scheme, host, port, socket, + username, password, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_key, + ssl_verify_server_cert, default_file, default_group) VALUES +('%auto_test_local%', '%ta_l%', '%', $CHILD3_1_SERVER_ID, 's_3_1', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_2_SERVER_ID, 's_3_2', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), +('%auto_test_local%', '%ta_l%', '%', $CHILD3_3_SERVER_ID, 's_3_3', NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +let $CHILD3_3_CHECK_LINK_STATUS= + SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables + ORDER BY db_name, table_name, link_id; +let $CHILD3_3_CHECK_LINK_FAILED_LOG= + SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log; +let $CHILD3_3_SET_RECOVERY_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 2"'; +let $CHILD3_3_SET_OK_STATUS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2", lst "0 1"'; +let $CHILD3_3_SET_OK_STATUS_AS_2_1= + ALTER TABLE ta_l + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2", lst "1 0"'; + +let $CHILD3_3_DROP_TABLES_HA_2_1= + DROP TABLE IF EXISTS ta_l; +if ($VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_3_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_3_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='port "$CHILD2_1_MYPORT $CHILD2_2_MYPORT", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +if (!$VERSION_COMPILE_OS_WIN) +{ + let $CHILD3_3_CREATE_TABLES_HA_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", + database "auto_test_remote auto_test_remote2"'; + let $CHILD3_3_CREATE_TABLES_HA_AS_2_1= + CREATE TABLE ta_l ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='socket "$CHILD2_1_MYSOCK $CHILD2_2_MYSOCK", table "ta_r ta_r3"' + CONNECTION='host "localhost", user "root", password "", + msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1", + database "auto_test_remote auto_test_remote2"'; +} +let $CHILD3_3_DROP_TABLES_HA_P_2_1= + DROP TABLE IF EXISTS ta_l2; +let $CHILD3_3_CREATE_TABLES_HA_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_3_CREATE_TABLES_HA_AS_P_2_1= + CREATE TABLE ta_l2 ( + a INT DEFAULT 10, + b CHAR(1) DEFAULT 'c', + c DATETIME DEFAULT '1999-10-10 10:10:10', + PRIMARY KEY(a) + ) $CHILD3_3_ENGINE $CHILD3_3_CHARSET + COMMENT='msi "$CHILD3_1_SERVER_ID", mkd "2", alc "1"' + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001"' + ); +let $CHILD3_3_SET_RECOVERY_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 2"' + ); +let $CHILD3_3_SET_OK_STATUS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "0 1"' + ); +let $CHILD3_3_SET_OK_STATUS_AS_P_2_1= + ALTER TABLE ta_l2 + PARTITION BY KEY(a) ( + PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3", + priority "1000"', + PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4", + priority "1000001", lst "1 0"' + ); diff --git a/storage/spider/mysql-test/spider/oracle2/include/hs_init_child2_1.inc b/storage/spider/mysql-test/spider/oracle2/include/hs_init_child2_1.inc index e0467b92307..f3f92a61e6f 100644 --- a/storage/spider/mysql-test/spider/oracle2/include/hs_init_child2_1.inc +++ b/storage/spider/mysql-test/spider/oracle2/include/hs_init_child2_1.inc @@ -1,24 +1,24 @@ -let $CHILD2_1_HS_DROP_TABLES=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "hs_r"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_HS_CREATE_TABLES=
- SELECT spider_direct_sql('CREATE TABLE "hs_r" (
- "a" INT DEFAULT 10,
- "b" CHAR(1) DEFAULT \'c\',
- "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'),
- "d" INT DEFAULT 11,
- CONSTRAINT "pk_s_2_1_hs_r" PRIMARY KEY("a")
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_HS_SELECT_TABLES=
- SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\'), "d" FROM "hs_r" ORDER BY "a"', '', 'srv "s_2_1"');
-let $CHILD2_1_HS_DROP_TABLES2=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "hs_r2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_HS_CREATE_TABLES2=
- SELECT spider_direct_sql('CREATE TABLE "hs_r2" (
- "a" INT DEFAULT 10,
- "b" CHAR(1) DEFAULT \'c\',
- "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'),
- "d" INT DEFAULT 11,
- CONSTRAINT "pk_s_2_1_hs_r2" PRIMARY KEY("a")
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_HS_SELECT_TABLES2=
- SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\'), "d" FROM "hs_r2" ORDER BY "a"', '', 'srv "s_2_1"');
+let $CHILD2_1_HS_DROP_TABLES= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "hs_r"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_HS_CREATE_TABLES= + SELECT spider_direct_sql('CREATE TABLE "hs_r" ( + "a" INT DEFAULT 10, + "b" CHAR(1) DEFAULT \'c\', + "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'), + "d" INT DEFAULT 11, + CONSTRAINT "pk_s_2_1_hs_r" PRIMARY KEY("a") + )', '', 'srv "s_2_1"'); +let $CHILD2_1_HS_SELECT_TABLES= + SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\'), "d" FROM "hs_r" ORDER BY "a"', '', 'srv "s_2_1"'); +let $CHILD2_1_HS_DROP_TABLES2= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "hs_r2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_HS_CREATE_TABLES2= + SELECT spider_direct_sql('CREATE TABLE "hs_r2" ( + "a" INT DEFAULT 10, + "b" CHAR(1) DEFAULT \'c\', + "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'), + "d" INT DEFAULT 11, + CONSTRAINT "pk_s_2_1_hs_r2" PRIMARY KEY("a") + )', '', 'srv "s_2_1"'); +let $CHILD2_1_HS_SELECT_TABLES2= + SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\'), "d" FROM "hs_r2" ORDER BY "a"', '', 'srv "s_2_1"'); diff --git a/storage/spider/mysql-test/spider/oracle2/include/hs_init_child2_2.inc b/storage/spider/mysql-test/spider/oracle2/include/hs_init_child2_2.inc index 0466acbc66b..4bd8d49c17c 100644 --- a/storage/spider/mysql-test/spider/oracle2/include/hs_init_child2_2.inc +++ b/storage/spider/mysql-test/spider/oracle2/include/hs_init_child2_2.inc @@ -1,12 +1,12 @@ -let $CHILD2_2_HS_DROP_TABLES=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "hs_r3"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"');
-let $CHILD2_2_HS_CREATE_TABLES=
- SELECT spider_direct_sql('CREATE TABLE "hs_r3" (
- "a" INT DEFAULT 10,
- "b" CHAR(1) DEFAULT \'c\',
- "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'),
- "d" INT DEFAULT 11,
- CONSTRAINT "pk_s_2_2_hs_r3" PRIMARY KEY("a")
- )', '', 'srv "s_2_2"');
-let $CHILD2_2_HS_SELECT_TABLES=
- SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\'), "d" FROM "hs_r3" ORDER BY "a"', '', 'srv "s_2_2"');
+let $CHILD2_2_HS_DROP_TABLES= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "hs_r3"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"'); +let $CHILD2_2_HS_CREATE_TABLES= + SELECT spider_direct_sql('CREATE TABLE "hs_r3" ( + "a" INT DEFAULT 10, + "b" CHAR(1) DEFAULT \'c\', + "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'), + "d" INT DEFAULT 11, + CONSTRAINT "pk_s_2_2_hs_r3" PRIMARY KEY("a") + )', '', 'srv "s_2_2"'); +let $CHILD2_2_HS_SELECT_TABLES= + SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\'), "d" FROM "hs_r3" ORDER BY "a"', '', 'srv "s_2_2"'); diff --git a/storage/spider/mysql-test/spider/oracle2/include/init_child2_1.inc b/storage/spider/mysql-test/spider/oracle2/include/init_child2_1.inc index 18dcc7159cc..c24736eefca 100644 --- a/storage/spider/mysql-test/spider/oracle2/include/init_child2_1.inc +++ b/storage/spider/mysql-test/spider/oracle2/include/init_child2_1.inc @@ -1,192 +1,192 @@ ---connection master_1
-SELECT spider_direct_sql('ALTER SESSION SET NLS_DATE_FORMAT=\'YYYY-MM-DD HH24:MI:SS\'', '', 'srv "s_2_1"');
-SELECT spider_direct_sql('ALTER SESSION SET NLS_TIME_FORMAT=\'HH24:MI:SSXFF\'', '', 'srv "s_2_1"');
-SELECT spider_direct_sql('ALTER SESSION SET NLS_TIMESTAMP_FORMAT=\'YYYY-MM-DD HH24:MI:SSXFF\'', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_TABLES=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_TABLES=
- SELECT spider_direct_sql('CREATE TABLE "ta_r" (
- "a" INT DEFAULT 10,
- "b" CHAR(1) DEFAULT \'c\',
- "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'),
- CONSTRAINT "pk_s_2_1_ta_r" PRIMARY KEY("a")
- )', '', 'srv "s_2_1"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE INDEX "idx1" ON "ta_r"("b")', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_TABLES=
- SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r" ORDER BY "a"', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_TABLES2=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_TABLES2=
- SELECT spider_direct_sql('CREATE TABLE "ta_r2" (
- "a" INT DEFAULT 10,
- "b" CHAR(1) DEFAULT \'c\',
- "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'),
- CONSTRAINT "pk_s_2_1_ta_r2" PRIMARY KEY("a")
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_TABLES2=
- SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r2" ORDER BY "a"', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_TABLES3=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r_no_idx"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_TABLES3=
- SELECT spider_direct_sql('CREATE TABLE "ta_r_no_idx" (
- "a" INT DEFAULT 10,
- "b" CHAR(1) DEFAULT \'c\',
- "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\')
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_TABLES3=
- SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r_no_idx" ORDER BY "a"', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_TABLES4=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r_auto_inc"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_TABLES4=
- SELECT spider_direct_sql('CREATE TABLE "ta_r_auto_inc" (
- "a" INT DEFAULT 10,
- "b" CHAR(1) DEFAULT \'c\',
- "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'),
- CONSTRAINT "pk_s_2_1_ta_r_auto_inc" PRIMARY KEY("a")
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_TABLES4=
- SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r_auto_inc"
- ORDER BY "a"', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_TABLES5=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "s_2_1_ta_r_int"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_TABLES5=
- SELECT spider_direct_sql('CREATE TABLE "s_2_1_ta_r_int" (
- "a" INT DEFAULT 3,
- "b" INT DEFAULT 10,
- "c" INT DEFAULT 11,
- CONSTRAINT "pk_s_2_1_ta_r_int" PRIMARY KEY("a")
- )', '', 'srv "s_2_1"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE INDEX "idx1_s_2_1_ta_r_int" ON "s_2_1_ta_r_int"("b")', '', 'srv "s_2_1"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE INDEX "idx2_s_2_1_ta_r_int" ON "s_2_1_ta_r_int"("c")', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_TABLES5=
- SELECT spider_direct_sql('SELECT "a", "b", "c" FROM "s_2_1_ta_r_int" ORDER BY "a"', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_TABLES6=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r_3"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_TABLES6=
- SELECT spider_direct_sql('CREATE TABLE "ta_r_3" (
- "a" INT DEFAULT 10,
- "b" CHAR(1) DEFAULT \'c\',
- "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\')
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_TABLES6=
- SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r_3" ORDER BY "a"', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_FT_TABLES=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ft_r"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_FT_TABLES=
- SELECT spider_direct_sql('CREATE TABLE "ft_r" (
- "a" INT DEFAULT 0,
- "b" TEXT,
- "c" TEXT,
- "d" TEXT,
- CONSTRAINT "pk_s_2_1_ft_r" PRIMARY KEY("a"),
- FULLTEXT INDEX "ft_idx1"("b"),
- FULLTEXT INDEX "ft_idx2"("c")
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_FT_TABLES=
- SELECT spider_direct_sql('SELECT "a", "b", "c", "d" FROM "ft_r" ORDER BY "a"', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_FT_TABLES2=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ft_r2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_FT_TABLES2=
- SELECT spider_direct_sql('CREATE TABLE "ft_r2" (
- "a" INT DEFAULT 0,
- "b" TEXT,
- "c" TEXT,
- "d" TEXT,
- CONSTRAINT "pk_s_2_1_ft_r2" PRIMARY KEY("a"),
- FULLTEXT INDEX "ft_idx1"("b"),
- FULLTEXT INDEX "ft_idx2"("c")
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_FT_TABLES2=
- SELECT spider_direct_sql('SELECT "a", "b", "c", "d" FROM "ft_r2" ORDER BY "a"', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_GM_TABLES=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "gm_r"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_GM_TABLES=
- SELECT spider_direct_sql('CREATE TABLE "gm_r" (
- "a" INT DEFAULT 0,
- "b" GEOMETRY NOT NULL,
- "c" GEOMETRY NOT NULL,
- CONSTRAINT "pk_s_2_1_gm_r" PRIMARY KEY("a"),
- SPATIAL INDEX "sp_idx1"("b"),
- SPATIAL INDEX "sp_idx2"("c")
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_GM_TABLES=
- SELECT spider_direct_sql('SELECT "a", "b", "c" FROM "gm_r" ORDER BY "a"', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_GM_TABLES2=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "gm_r2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_GM_TABLES2=
- SELECT spider_direct_sql('CREATE TABLE "gm_r2" (
- "a" INT DEFAULT 0,
- "b" GEOMETRY NOT NULL,
- "c" GEOMETRY NOT NULL,
- CONSTRAINT "pk_s_2_1_gm_r2" PRIMARY KEY("a"),
- SPATIAL INDEX "sp_idx1"("b"),
- SPATIAL INDEX "sp_idx2"("c")
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_GM_TABLES2=
- SELECT spider_direct_sql('SELECT "a", "b", "c" FROM "gm_r2" ORDER BY "a"', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_LOCK_TABLES1=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t1_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_LOCK_TABLES1=
- SELECT spider_direct_sql('CREATE TABLE "t1_1" (
- "id" INT NOT NULL,
- CONSTRAINT "pk_s_2_1_t1_1" PRIMARY KEY ("id")
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_LOCK_TABLES2=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t2_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_LOCK_TABLES2=
- SELECT spider_direct_sql('CREATE TABLE "t2_2" (
- "id" INT NOT NULL,
- CONSTRAINT "pk_s_2_1_t2_2" PRIMARY KEY ("id")
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_INCREMENT_TABLES1=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t1_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_INCREMENT_TABLES1=
- SELECT spider_direct_sql('CREATE TABLE "t1_1" (
- "id" INT NOT NULL,
- CONSTRAINT "pk_s_2_1_t1_1" PRIMARY KEY ("id")
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_INCREMENT_TABLES1=
- SELECT spider_direct_sql('SELECT "id" FROM "t1_1" ORDER BY "id"', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_TEXT_PK_TABLES1=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_TEXT_PK_TABLES1=
- SELECT spider_direct_sql('CREATE TABLE "t1" (
- "a" VARCHAR(255),
- CONSTRAINT "pk_s_2_1_t1" PRIMARY KEY ("a")
- )', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_TEXT_PK_TABLES1=
- SELECT spider_direct_sql('SELECT "a" FROM "t1" ORDER BY "a"', '', 'srv "s_2_1"');
-let $CHILD2_1_DROP_TEXT_KEY_TABLES1=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"');
-let $CHILD2_1_CREATE_TEXT_KEY_TABLES1=
- SELECT spider_direct_sql('CREATE TABLE "t1" (
- "a" VARCHAR(255),
- "b" VARCHAR(255),
- "c" VARCHAR(255),
- CONSTRAINT "pk_s_2_1_t1" PRIMARY KEY ("c")
- )', '', 'srv "s_2_1"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE INDEX "idx1_t1" ON "t1"("a","b")', '', 'srv "s_2_1"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE INDEX "idx2_t1" ON "t1"("b")', '', 'srv "s_2_1"');
-let $CHILD2_1_SELECT_TEXT_KEY_TABLES1=
- SELECT spider_direct_sql('SELECT "a", "b", "c" FROM "t1" ORDER BY "c"', '', 'srv "s_2_1"');
-let $CHILD2_1_AUTO_INCREMENT_INCREMENT1=
- SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_1" START WITH 1 INCREMENT BY 1', '', 'srv "s_2_1"');
-let $CHILD2_1_AUTO_INCREMENT_INCREMENT2=
- SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_1" START WITH 2 INCREMENT BY 4', '', 'srv "s_2_1"');
-let $CHILD2_1_AUTO_INCREMENT_OFFSET1=
- SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_1" START WITH 1 INCREMENT BY 1', '', 'srv "s_2_1"');
-let $CHILD2_1_AUTO_INCREMENT_OFFSET2=
- SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_1" START WITH 2 INCREMENT BY 4', '', 'srv "s_2_1"');
+--connection master_1 +SELECT spider_direct_sql('ALTER SESSION SET NLS_DATE_FORMAT=\'YYYY-MM-DD HH24:MI:SS\'', '', 'srv "s_2_1"'); +SELECT spider_direct_sql('ALTER SESSION SET NLS_TIME_FORMAT=\'HH24:MI:SSXFF\'', '', 'srv "s_2_1"'); +SELECT spider_direct_sql('ALTER SESSION SET NLS_TIMESTAMP_FORMAT=\'YYYY-MM-DD HH24:MI:SSXFF\'', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_TABLES= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_TABLES= + SELECT spider_direct_sql('CREATE TABLE "ta_r" ( + "a" INT DEFAULT 10, + "b" CHAR(1) DEFAULT \'c\', + "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'), + CONSTRAINT "pk_s_2_1_ta_r" PRIMARY KEY("a") + )', '', 'srv "s_2_1"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE INDEX "idx1" ON "ta_r"("b")', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_TABLES= + SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r" ORDER BY "a"', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_TABLES2= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_TABLES2= + SELECT spider_direct_sql('CREATE TABLE "ta_r2" ( + "a" INT DEFAULT 10, + "b" CHAR(1) DEFAULT \'c\', + "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'), + CONSTRAINT "pk_s_2_1_ta_r2" PRIMARY KEY("a") + )', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_TABLES2= + SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r2" ORDER BY "a"', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_TABLES3= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r_no_idx"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_TABLES3= + SELECT spider_direct_sql('CREATE TABLE "ta_r_no_idx" ( + "a" INT DEFAULT 10, + "b" CHAR(1) DEFAULT \'c\', + "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\') + )', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_TABLES3= + SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r_no_idx" ORDER BY "a"', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_TABLES4= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r_auto_inc"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_TABLES4= + SELECT spider_direct_sql('CREATE TABLE "ta_r_auto_inc" ( + "a" INT DEFAULT 10, + "b" CHAR(1) DEFAULT \'c\', + "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'), + CONSTRAINT "pk_s_2_1_ta_r_auto_inc" PRIMARY KEY("a") + )', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_TABLES4= + SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r_auto_inc" + ORDER BY "a"', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_TABLES5= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "s_2_1_ta_r_int"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_TABLES5= + SELECT spider_direct_sql('CREATE TABLE "s_2_1_ta_r_int" ( + "a" INT DEFAULT 3, + "b" INT DEFAULT 10, + "c" INT DEFAULT 11, + CONSTRAINT "pk_s_2_1_ta_r_int" PRIMARY KEY("a") + )', '', 'srv "s_2_1"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE INDEX "idx1_s_2_1_ta_r_int" ON "s_2_1_ta_r_int"("b")', '', 'srv "s_2_1"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE INDEX "idx2_s_2_1_ta_r_int" ON "s_2_1_ta_r_int"("c")', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_TABLES5= + SELECT spider_direct_sql('SELECT "a", "b", "c" FROM "s_2_1_ta_r_int" ORDER BY "a"', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_TABLES6= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r_3"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_TABLES6= + SELECT spider_direct_sql('CREATE TABLE "ta_r_3" ( + "a" INT DEFAULT 10, + "b" CHAR(1) DEFAULT \'c\', + "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\') + )', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_TABLES6= + SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r_3" ORDER BY "a"', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_FT_TABLES= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ft_r"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_FT_TABLES= + SELECT spider_direct_sql('CREATE TABLE "ft_r" ( + "a" INT DEFAULT 0, + "b" TEXT, + "c" TEXT, + "d" TEXT, + CONSTRAINT "pk_s_2_1_ft_r" PRIMARY KEY("a"), + FULLTEXT INDEX "ft_idx1"("b"), + FULLTEXT INDEX "ft_idx2"("c") + )', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_FT_TABLES= + SELECT spider_direct_sql('SELECT "a", "b", "c", "d" FROM "ft_r" ORDER BY "a"', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_FT_TABLES2= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ft_r2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_FT_TABLES2= + SELECT spider_direct_sql('CREATE TABLE "ft_r2" ( + "a" INT DEFAULT 0, + "b" TEXT, + "c" TEXT, + "d" TEXT, + CONSTRAINT "pk_s_2_1_ft_r2" PRIMARY KEY("a"), + FULLTEXT INDEX "ft_idx1"("b"), + FULLTEXT INDEX "ft_idx2"("c") + )', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_FT_TABLES2= + SELECT spider_direct_sql('SELECT "a", "b", "c", "d" FROM "ft_r2" ORDER BY "a"', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_GM_TABLES= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "gm_r"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_GM_TABLES= + SELECT spider_direct_sql('CREATE TABLE "gm_r" ( + "a" INT DEFAULT 0, + "b" GEOMETRY NOT NULL, + "c" GEOMETRY NOT NULL, + CONSTRAINT "pk_s_2_1_gm_r" PRIMARY KEY("a"), + SPATIAL INDEX "sp_idx1"("b"), + SPATIAL INDEX "sp_idx2"("c") + )', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_GM_TABLES= + SELECT spider_direct_sql('SELECT "a", "b", "c" FROM "gm_r" ORDER BY "a"', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_GM_TABLES2= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "gm_r2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_GM_TABLES2= + SELECT spider_direct_sql('CREATE TABLE "gm_r2" ( + "a" INT DEFAULT 0, + "b" GEOMETRY NOT NULL, + "c" GEOMETRY NOT NULL, + CONSTRAINT "pk_s_2_1_gm_r2" PRIMARY KEY("a"), + SPATIAL INDEX "sp_idx1"("b"), + SPATIAL INDEX "sp_idx2"("c") + )', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_GM_TABLES2= + SELECT spider_direct_sql('SELECT "a", "b", "c" FROM "gm_r2" ORDER BY "a"', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_LOCK_TABLES1= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t1_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_LOCK_TABLES1= + SELECT spider_direct_sql('CREATE TABLE "t1_1" ( + "id" INT NOT NULL, + CONSTRAINT "pk_s_2_1_t1_1" PRIMARY KEY ("id") + )', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_LOCK_TABLES2= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t2_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_LOCK_TABLES2= + SELECT spider_direct_sql('CREATE TABLE "t2_2" ( + "id" INT NOT NULL, + CONSTRAINT "pk_s_2_1_t2_2" PRIMARY KEY ("id") + )', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_INCREMENT_TABLES1= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t1_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_INCREMENT_TABLES1= + SELECT spider_direct_sql('CREATE TABLE "t1_1" ( + "id" INT NOT NULL, + CONSTRAINT "pk_s_2_1_t1_1" PRIMARY KEY ("id") + )', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_INCREMENT_TABLES1= + SELECT spider_direct_sql('SELECT "id" FROM "t1_1" ORDER BY "id"', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_TEXT_PK_TABLES1= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_TEXT_PK_TABLES1= + SELECT spider_direct_sql('CREATE TABLE "t1" ( + "a" VARCHAR(255), + CONSTRAINT "pk_s_2_1_t1" PRIMARY KEY ("a") + )', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_TEXT_PK_TABLES1= + SELECT spider_direct_sql('SELECT "a" FROM "t1" ORDER BY "a"', '', 'srv "s_2_1"'); +let $CHILD2_1_DROP_TEXT_KEY_TABLES1= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"'); +let $CHILD2_1_CREATE_TEXT_KEY_TABLES1= + SELECT spider_direct_sql('CREATE TABLE "t1" ( + "a" VARCHAR(255), + "b" VARCHAR(255), + "c" VARCHAR(255), + CONSTRAINT "pk_s_2_1_t1" PRIMARY KEY ("c") + )', '', 'srv "s_2_1"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE INDEX "idx1_t1" ON "t1"("a","b")', '', 'srv "s_2_1"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE INDEX "idx2_t1" ON "t1"("b")', '', 'srv "s_2_1"'); +let $CHILD2_1_SELECT_TEXT_KEY_TABLES1= + SELECT spider_direct_sql('SELECT "a", "b", "c" FROM "t1" ORDER BY "c"', '', 'srv "s_2_1"'); +let $CHILD2_1_AUTO_INCREMENT_INCREMENT1= + SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_1" START WITH 1 INCREMENT BY 1', '', 'srv "s_2_1"'); +let $CHILD2_1_AUTO_INCREMENT_INCREMENT2= + SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_1" START WITH 2 INCREMENT BY 4', '', 'srv "s_2_1"'); +let $CHILD2_1_AUTO_INCREMENT_OFFSET1= + SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_1" START WITH 1 INCREMENT BY 1', '', 'srv "s_2_1"'); +let $CHILD2_1_AUTO_INCREMENT_OFFSET2= + SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_1"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_1" START WITH 2 INCREMENT BY 4', '', 'srv "s_2_1"'); diff --git a/storage/spider/mysql-test/spider/oracle2/include/init_child2_2.inc b/storage/spider/mysql-test/spider/oracle2/include/init_child2_2.inc index 117040dcca6..fd4497c0b59 100644 --- a/storage/spider/mysql-test/spider/oracle2/include/init_child2_2.inc +++ b/storage/spider/mysql-test/spider/oracle2/include/init_child2_2.inc @@ -1,94 +1,94 @@ ---connection master_1
-SELECT spider_direct_sql('ALTER SESSION SET NLS_DATE_FORMAT=\'YYYY-MM-DD HH24:MI:SS\'', '', 'srv "s_2_2"');
-SELECT spider_direct_sql('ALTER SESSION SET NLS_TIME_FORMAT=\'HH24:MI:SSXFF\'', '', 'srv "s_2_2"');
-SELECT spider_direct_sql('ALTER SESSION SET NLS_TIMESTAMP_FORMAT=\'YYYY-MM-DD HH24:MI:SSXFF\'', '', 'srv "s_2_2"');
-let $CHILD2_2_DROP_TABLES=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r3"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"');
-let $CHILD2_2_CREATE_TABLES=
- SELECT spider_direct_sql('CREATE TABLE "ta_r3" (
- "a" INT DEFAULT 10,
- "b" CHAR(1) DEFAULT \'c\',
- "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'),
- CONSTRAINT "pk_s_2_2_ta_r3" PRIMARY KEY("a")
- )', '', 'srv "s_2_2"');
-let $CHILD2_2_DROP_TABLES5=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "s_2_2_ta_r_int"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"');
-let $CHILD2_2_CREATE_TABLES5=
- SELECT spider_direct_sql('CREATE TABLE "s_2_2_ta_r_int" (
- "a" INT DEFAULT 3,
- "b" INT DEFAULT 10,
- "c" INT DEFAULT 11,
- CONSTRAINT "pk_s_2_2_ta_r_int" PRIMARY KEY("a")
- )', '', 'srv "s_2_2"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE INDEX "idx1_s_2_2_ta_r_int" ON "s_2_2_ta_r_int"("b")', '', 'srv "s_2_2"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE INDEX "idx2_s_2_2_ta_r_int" ON "s_2_2_ta_r_int"("c")', '', 'srv "s_2_2"');
-let $CHILD2_2_SELECT_TABLES=
- SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r3" ORDER BY "a"', '', 'srv "s_2_2"');
-let $CHILD2_2_DROP_FT_TABLES=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ft_r3"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"');
-let $CHILD2_2_CREATE_FT_TABLES=
- SELECT spider_direct_sql('CREATE TABLE "ft_r3" (
- "a" INT DEFAULT 0,
- "b" TEXT,
- "c" TEXT,
- "d" TEXT,
- CONSTRAINT "pk_s_2_2_ft_r3" PRIMARY KEY("a"),
- FULLTEXT INDEX "ft_idx1"("b"),
- FULLTEXT INDEX "ft_idx2"("c")
- )', '', 'srv "s_2_2"');
-let $CHILD2_2_SELECT_FT_TABLES=
- SELECT spider_direct_sql('SELECT "a", "b", "c", "d" FROM "ft_r3" ORDER BY "a"', '', 'srv "s_2_2"');
-let $CHILD2_2_DROP_GM_TABLES=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "gm_r3"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"');
-let $CHILD2_2_CREATE_GM_TABLES=
- SELECT spider_direct_sql('CREATE TABLE "gm_r3" (
- "a" INT DEFAULT 0,
- "b" GEOMETRY NOT NULL,
- "c" GEOMETRY NOT NULL,
- CONSTRAINT "pk_s_2_2_gm_r3" PRIMARY KEY("a"),
- SPATIAL INDEX "sp_idx1"("b"),
- SPATIAL INDEX "sp_idx2"("c")
- )', '', 'srv "s_2_2"');
-let $CHILD2_2_SELECT_GM_TABLES=
- SELECT spider_direct_sql('SELECT "a", "b", "c" FROM "gm_r3" ORDER BY "a"', '', 'srv "s_2_2"');
-let $CHILD2_2_DROP_LOCK_TABLES1=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t1_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"');
-let $CHILD2_2_CREATE_LOCK_TABLES1=
- SELECT spider_direct_sql('CREATE TABLE "t1_2" (
- "id" INT NOT NULL,
- CONSTRAINT "pk_s_2_2_t1_2" PRIMARY KEY ("id")
- )', '', 'srv "s_2_2"');
-let $CHILD2_2_DROP_LOCK_TABLES2=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t2_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"');
-let $CHILD2_2_CREATE_LOCK_TABLES2=
- SELECT spider_direct_sql('CREATE TABLE "t2_1" (
- "id" INT NOT NULL,
- CONSTRAINT "pk_s_2_2_t2_1" PRIMARY KEY ("id")
- )', '', 'srv "s_2_2"');
-let $CHILD2_2_DROP_INCREMENT_TABLES1=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t1_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"');
-let $CHILD2_2_CREATE_INCREMENT_TABLES1=
- SELECT spider_direct_sql('CREATE TABLE "t1_2" (
- "id" INT NOT NULL,
- CONSTRAINT "pk_s_2_2_t1_2" PRIMARY KEY ("id")
- )', '', 'srv "s_2_2"');
-let $CHILD2_2_SELECT_INCREMENT_TABLES1=
- SELECT spider_direct_sql('SELECT "id" FROM "t1_2" ORDER BY "id"', '', 'srv "s_2_2"');
-let $CHILD2_2_AUTO_INCREMENT_INCREMENT1=
- SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_2" START WITH 1 INCREMENT BY 1', '', 'srv "s_2_2"');
-let $CHILD2_2_AUTO_INCREMENT_INCREMENT2=
- SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_2" START WITH 3 INCREMENT BY 4', '', 'srv "s_2_2"');
-let $CHILD2_2_AUTO_INCREMENT_OFFSET1=
- SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_2" START WITH 1 INCREMENT BY 1', '', 'srv "s_2_2"');
-let $CHILD2_2_AUTO_INCREMENT_OFFSET2=
- SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"')
- $STR_SEMICOLON
- SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_2" START WITH 3 INCREMENT BY 4', '', 'srv "s_2_2"');
+--connection master_1 +SELECT spider_direct_sql('ALTER SESSION SET NLS_DATE_FORMAT=\'YYYY-MM-DD HH24:MI:SS\'', '', 'srv "s_2_2"'); +SELECT spider_direct_sql('ALTER SESSION SET NLS_TIME_FORMAT=\'HH24:MI:SSXFF\'', '', 'srv "s_2_2"'); +SELECT spider_direct_sql('ALTER SESSION SET NLS_TIMESTAMP_FORMAT=\'YYYY-MM-DD HH24:MI:SSXFF\'', '', 'srv "s_2_2"'); +let $CHILD2_2_DROP_TABLES= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r3"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"'); +let $CHILD2_2_CREATE_TABLES= + SELECT spider_direct_sql('CREATE TABLE "ta_r3" ( + "a" INT DEFAULT 10, + "b" CHAR(1) DEFAULT \'c\', + "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'), + CONSTRAINT "pk_s_2_2_ta_r3" PRIMARY KEY("a") + )', '', 'srv "s_2_2"'); +let $CHILD2_2_DROP_TABLES5= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "s_2_2_ta_r_int"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"'); +let $CHILD2_2_CREATE_TABLES5= + SELECT spider_direct_sql('CREATE TABLE "s_2_2_ta_r_int" ( + "a" INT DEFAULT 3, + "b" INT DEFAULT 10, + "c" INT DEFAULT 11, + CONSTRAINT "pk_s_2_2_ta_r_int" PRIMARY KEY("a") + )', '', 'srv "s_2_2"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE INDEX "idx1_s_2_2_ta_r_int" ON "s_2_2_ta_r_int"("b")', '', 'srv "s_2_2"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE INDEX "idx2_s_2_2_ta_r_int" ON "s_2_2_ta_r_int"("c")', '', 'srv "s_2_2"'); +let $CHILD2_2_SELECT_TABLES= + SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r3" ORDER BY "a"', '', 'srv "s_2_2"'); +let $CHILD2_2_DROP_FT_TABLES= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ft_r3"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"'); +let $CHILD2_2_CREATE_FT_TABLES= + SELECT spider_direct_sql('CREATE TABLE "ft_r3" ( + "a" INT DEFAULT 0, + "b" TEXT, + "c" TEXT, + "d" TEXT, + CONSTRAINT "pk_s_2_2_ft_r3" PRIMARY KEY("a"), + FULLTEXT INDEX "ft_idx1"("b"), + FULLTEXT INDEX "ft_idx2"("c") + )', '', 'srv "s_2_2"'); +let $CHILD2_2_SELECT_FT_TABLES= + SELECT spider_direct_sql('SELECT "a", "b", "c", "d" FROM "ft_r3" ORDER BY "a"', '', 'srv "s_2_2"'); +let $CHILD2_2_DROP_GM_TABLES= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "gm_r3"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"'); +let $CHILD2_2_CREATE_GM_TABLES= + SELECT spider_direct_sql('CREATE TABLE "gm_r3" ( + "a" INT DEFAULT 0, + "b" GEOMETRY NOT NULL, + "c" GEOMETRY NOT NULL, + CONSTRAINT "pk_s_2_2_gm_r3" PRIMARY KEY("a"), + SPATIAL INDEX "sp_idx1"("b"), + SPATIAL INDEX "sp_idx2"("c") + )', '', 'srv "s_2_2"'); +let $CHILD2_2_SELECT_GM_TABLES= + SELECT spider_direct_sql('SELECT "a", "b", "c" FROM "gm_r3" ORDER BY "a"', '', 'srv "s_2_2"'); +let $CHILD2_2_DROP_LOCK_TABLES1= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t1_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"'); +let $CHILD2_2_CREATE_LOCK_TABLES1= + SELECT spider_direct_sql('CREATE TABLE "t1_2" ( + "id" INT NOT NULL, + CONSTRAINT "pk_s_2_2_t1_2" PRIMARY KEY ("id") + )', '', 'srv "s_2_2"'); +let $CHILD2_2_DROP_LOCK_TABLES2= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t2_1"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"'); +let $CHILD2_2_CREATE_LOCK_TABLES2= + SELECT spider_direct_sql('CREATE TABLE "t2_1" ( + "id" INT NOT NULL, + CONSTRAINT "pk_s_2_2_t2_1" PRIMARY KEY ("id") + )', '', 'srv "s_2_2"'); +let $CHILD2_2_DROP_INCREMENT_TABLES1= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "t1_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"'); +let $CHILD2_2_CREATE_INCREMENT_TABLES1= + SELECT spider_direct_sql('CREATE TABLE "t1_2" ( + "id" INT NOT NULL, + CONSTRAINT "pk_s_2_2_t1_2" PRIMARY KEY ("id") + )', '', 'srv "s_2_2"'); +let $CHILD2_2_SELECT_INCREMENT_TABLES1= + SELECT spider_direct_sql('SELECT "id" FROM "t1_2" ORDER BY "id"', '', 'srv "s_2_2"'); +let $CHILD2_2_AUTO_INCREMENT_INCREMENT1= + SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_2" START WITH 1 INCREMENT BY 1', '', 'srv "s_2_2"'); +let $CHILD2_2_AUTO_INCREMENT_INCREMENT2= + SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_2" START WITH 3 INCREMENT BY 4', '', 'srv "s_2_2"'); +let $CHILD2_2_AUTO_INCREMENT_OFFSET1= + SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_2" START WITH 1 INCREMENT BY 1', '', 'srv "s_2_2"'); +let $CHILD2_2_AUTO_INCREMENT_OFFSET2= + SELECT spider_direct_sql('begin execute immediate \'DROP SEQUENCE "seq_t1_2"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_2"') + $STR_SEMICOLON + SELECT spider_direct_sql('CREATE SEQUENCE "seq_t1_2" START WITH 3 INCREMENT BY 4', '', 'srv "s_2_2"'); diff --git a/storage/spider/mysql-test/spider/oracle2/include/init_child2_3.inc b/storage/spider/mysql-test/spider/oracle2/include/init_child2_3.inc index 5c06a9f6a73..e16dfeffd81 100644 --- a/storage/spider/mysql-test/spider/oracle2/include/init_child2_3.inc +++ b/storage/spider/mysql-test/spider/oracle2/include/init_child2_3.inc @@ -1,15 +1,15 @@ ---connection master_1
-SELECT spider_direct_sql('ALTER SESSION SET NLS_DATE_FORMAT=\'YYYY-MM-DD HH24:MI:SS\'', '', 'srv "s_2_3"');
-SELECT spider_direct_sql('ALTER SESSION SET NLS_TIME_FORMAT=\'HH24:MI:SSXFF\'', '', 'srv "s_2_3"');
-SELECT spider_direct_sql('ALTER SESSION SET NLS_TIMESTAMP_FORMAT=\'YYYY-MM-DD HH24:MI:SSXFF\'', '', 'srv "s_2_3"');
-let $CHILD2_3_DROP_TABLES=
- SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r4"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_3"');
-let $CHILD2_3_CREATE_TABLES=
- SELECT spider_direct_sql('CREATE TABLE "ta_r4" (
- "a" INT DEFAULT 10,
- "b" CHAR(1) DEFAULT \'c\',
- "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'),
- CONSTRAINT "pk_s_2_3_ta_r4" PRIMARY KEY("a")
- )', '', 'srv "s_2_3"');
-let $CHILD2_3_SELECT_TABLES=
- SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r4" ORDER BY "a"', '', 'srv "s_2_3"');
+--connection master_1 +SELECT spider_direct_sql('ALTER SESSION SET NLS_DATE_FORMAT=\'YYYY-MM-DD HH24:MI:SS\'', '', 'srv "s_2_3"'); +SELECT spider_direct_sql('ALTER SESSION SET NLS_TIME_FORMAT=\'HH24:MI:SSXFF\'', '', 'srv "s_2_3"'); +SELECT spider_direct_sql('ALTER SESSION SET NLS_TIMESTAMP_FORMAT=\'YYYY-MM-DD HH24:MI:SSXFF\'', '', 'srv "s_2_3"'); +let $CHILD2_3_DROP_TABLES= + SELECT spider_direct_sql('begin execute immediate \'DROP TABLE "ta_r4"\'$STR_SEMICOLON exception when others then null$STR_SEMICOLON end$STR_SEMICOLON', '', 'srv "s_2_3"'); +let $CHILD2_3_CREATE_TABLES= + SELECT spider_direct_sql('CREATE TABLE "ta_r4" ( + "a" INT DEFAULT 10, + "b" CHAR(1) DEFAULT \'c\', + "c" DATE DEFAULT TO_DATE(\'1999-10-10 10:10:10\', \'YYYY-MM-DD HH24:MI:SS\'), + CONSTRAINT "pk_s_2_3_ta_r4" PRIMARY KEY("a") + )', '', 'srv "s_2_3"'); +let $CHILD2_3_SELECT_TABLES= + SELECT spider_direct_sql('SELECT "a", "b", TO_CHAR("c", \'YYYY-MM-DD HH24:MI:SS\') FROM "ta_r4" ORDER BY "a"', '', 'srv "s_2_3"'); diff --git a/storage/spider/mysql-test/spider/oracle2/include/init_child3_1.inc b/storage/spider/mysql-test/spider/oracle2/include/init_child3_1.inc index f70afeb58de..d2d308cbefe 100644 --- a/storage/spider/mysql-test/spider/oracle2/include/init_child3_1.inc +++ b/storage/spider/mysql-test/spider/oracle2/include/init_child3_1.inc @@ -1,3 +1,3 @@ ---let $TEST_ENGINE_TYPE= $CHILD3_1_ENGINE_TYPE
---source ../../include/init_engine.inc
---let $INIT_CHILD3_1_ENGINE= $INIT_TEST_ENGINE
+--let $TEST_ENGINE_TYPE= $CHILD3_1_ENGINE_TYPE +--source ../../include/init_engine.inc +--let $INIT_CHILD3_1_ENGINE= $INIT_TEST_ENGINE diff --git a/storage/spider/mysql-test/spider/oracle2/include/init_child3_2.inc b/storage/spider/mysql-test/spider/oracle2/include/init_child3_2.inc index e84567f2243..3fbe1bd55bb 100644 --- a/storage/spider/mysql-test/spider/oracle2/include/init_child3_2.inc +++ b/storage/spider/mysql-test/spider/oracle2/include/init_child3_2.inc @@ -1,3 +1,3 @@ ---let $TEST_ENGINE_TYPE= $CHILD3_2_ENGINE_TYPE
---source ../../include/init_engine.inc
---let $INIT_CHILD3_2_ENGINE= $INIT_TEST_ENGINE
+--let $TEST_ENGINE_TYPE= $CHILD3_2_ENGINE_TYPE +--source ../../include/init_engine.inc +--let $INIT_CHILD3_2_ENGINE= $INIT_TEST_ENGINE diff --git a/storage/spider/mysql-test/spider/oracle2/include/init_child3_3.inc b/storage/spider/mysql-test/spider/oracle2/include/init_child3_3.inc index d3f31049ff6..3c7aaa8af84 100644 --- a/storage/spider/mysql-test/spider/oracle2/include/init_child3_3.inc +++ b/storage/spider/mysql-test/spider/oracle2/include/init_child3_3.inc @@ -1,3 +1,3 @@ ---let $TEST_ENGINE_TYPE= $CHILD3_3_ENGINE_TYPE
---source ../../include/init_engine.inc
---let $INIT_CHILD3_3_ENGINE= $INIT_TEST_ENGINE
+--let $TEST_ENGINE_TYPE= $CHILD3_3_ENGINE_TYPE +--source ../../include/init_engine.inc +--let $INIT_CHILD3_3_ENGINE= $INIT_TEST_ENGINE diff --git a/storage/spider/mysql-test/spider/oracle2/include/init_slave1_1.inc b/storage/spider/mysql-test/spider/oracle2/include/init_slave1_1.inc index 87c05f1f690..73c3c6b9ef2 100644 --- a/storage/spider/mysql-test/spider/oracle2/include/init_slave1_1.inc +++ b/storage/spider/mysql-test/spider/oracle2/include/init_slave1_1.inc @@ -1,10 +1,10 @@ -let $SLAVE1_1_COMMENT_INCREMENT1_1=
- COMMENT '';
-let $SLAVE1_1_COMMENT_INCREMENT1_P_1=
- COMMENT ''
- PARTITION BY LIST(MOD(id, 2)) (
- PARTITION pt1 VALUES IN (0)
- COMMENT='',
- PARTITION pt2 VALUES IN (1)
- COMMENT=''
- );
+let $SLAVE1_1_COMMENT_INCREMENT1_1= + COMMENT ''; +let $SLAVE1_1_COMMENT_INCREMENT1_P_1= + COMMENT '' + PARTITION BY LIST(MOD(id, 2)) ( + PARTITION pt1 VALUES IN (0) + COMMENT='', + PARTITION pt2 VALUES IN (1) + COMMENT='' + ); diff --git a/storage/spider/mysql-test/spider/oracle2/t/direct_aggregate.test b/storage/spider/mysql-test/spider/oracle2/t/direct_aggregate.test index 5f17ac402e2..d65f4c5a624 100644 --- a/storage/spider/mysql-test/spider/oracle2/t/direct_aggregate.test +++ b/storage/spider/mysql-test/spider/oracle2/t/direct_aggregate.test @@ -1,179 +1,179 @@ ---disable_warnings
---disable_query_log
---disable_result_log
---source test_init.inc
---enable_result_log
---enable_query_log
-
---echo
---echo drop and create databases
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- CREATE DATABASE auto_test_remote;
- USE auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
- CREATE DATABASE auto_test_remote2;
- USE auto_test_remote2;
-}
---enable_warnings
-
---echo
---echo test select 1
---connection master_1
-SELECT 1;
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- SELECT 1;
- --connection child2_2
- SELECT 1;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo create table select test
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_DROP_TABLES;
- echo CHILD2_1_CREATE_TABLES;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_TABLES;
- --enable_warnings
- eval $CHILD2_1_CREATE_TABLES;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
---disable_warnings
-DROP TABLE IF EXISTS ta_l;
---enable_warnings
---disable_query_log
-echo CREATE TABLE ta_l (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
-eval CREATE TABLE ta_l (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
-) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
---enable_query_log
-INSERT INTO ta_l (a, b, c) VALUES
- (1, 'a', '2008-08-01 10:21:39'),
- (2, 'b', '2000-01-01 00:00:00'),
- (3, 'e', '2007-06-04 20:03:11'),
- (4, 'd', '2003-11-30 05:01:03'),
- (5, 'c', '2001-12-31 23:59:59');
-
---echo
---echo direct_aggregating test
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-SELECT COUNT(*) FROM ta_l;
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-SELECT MAX(a) FROM ta_l;
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-SELECT MIN(a) FROM ta_l;
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-SELECT MAX(a) FROM ta_l WHERE a < 5;
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-SELECT MIN(a) FROM ta_l WHERE a > 1;
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo deinit
---disable_warnings
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
-}
---disable_query_log
---disable_result_log
---source test_deinit.inc
---enable_result_log
---enable_query_log
---enable_warnings
---echo
---echo end of test
+--disable_warnings +--disable_query_log +--disable_result_log +--source test_init.inc +--enable_result_log +--enable_query_log + +--echo +--echo drop and create databases +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +CREATE DATABASE auto_test_local; +USE auto_test_local; +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + CREATE DATABASE auto_test_remote; + USE auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; + CREATE DATABASE auto_test_remote2; + USE auto_test_remote2; +} +--enable_warnings + +--echo +--echo test select 1 +--connection master_1 +SELECT 1; +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + SELECT 1; + --connection child2_2 + SELECT 1; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + +--echo +--echo create table select test +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_DROP_TABLES; + echo CHILD2_1_CREATE_TABLES; + } + --disable_warnings + eval $CHILD2_1_DROP_TABLES; + --enable_warnings + eval $CHILD2_1_CREATE_TABLES; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} +--connection master_1 +--disable_warnings +DROP TABLE IF EXISTS ta_l; +--enable_warnings +--disable_query_log +echo CREATE TABLE ta_l ( + a INT, + b CHAR(1), + c DATETIME, + PRIMARY KEY(a) +) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1; +eval CREATE TABLE ta_l ( + a INT, + b CHAR(1), + c DATETIME, + PRIMARY KEY(a) +) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1; +--enable_query_log +INSERT INTO ta_l (a, b, c) VALUES + (1, 'a', '2008-08-01 10:21:39'), + (2, 'b', '2000-01-01 00:00:00'), + (3, 'e', '2007-06-04 20:03:11'), + (4, 'd', '2003-11-30 05:01:03'), + (5, 'c', '2001-12-31 23:59:59'); + +--echo +--echo direct_aggregating test +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} +--connection master_1 +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +SELECT COUNT(*) FROM ta_l; +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +SELECT MAX(a) FROM ta_l; +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +SELECT MIN(a) FROM ta_l; +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +SELECT MAX(a) FROM ta_l WHERE a < 5; +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +SELECT MIN(a) FROM ta_l WHERE a > 1; +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %'; + } + eval $CHILD2_1_SELECT_TABLES; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + +--echo +--echo deinit +--disable_warnings +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; +} +--disable_query_log +--disable_result_log +--source test_deinit.inc +--enable_result_log +--enable_query_log +--enable_warnings +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/oracle2/t/direct_aggregate_part.test b/storage/spider/mysql-test/spider/oracle2/t/direct_aggregate_part.test index 2d67e9af32c..aebf210c745 100644 --- a/storage/spider/mysql-test/spider/oracle2/t/direct_aggregate_part.test +++ b/storage/spider/mysql-test/spider/oracle2/t/direct_aggregate_part.test @@ -1,192 +1,192 @@ ---disable_warnings
---disable_query_log
---disable_result_log
---source test_init.inc
---enable_result_log
---enable_query_log
-if (!$HAVE_PARTITION)
-{
- --disable_query_log
- --disable_result_log
- --source test_deinit.inc
- --enable_result_log
- --enable_query_log
- --enable_warnings
- skip Test requires partitioning;
-}
-
---echo
---echo drop and create databases
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- CREATE DATABASE auto_test_remote;
- USE auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
- CREATE DATABASE auto_test_remote2;
- USE auto_test_remote2;
-}
---enable_warnings
-
---echo
---echo test select 1
---connection master_1
-SELECT 1;
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- SELECT 1;
- --connection child2_2
- SELECT 1;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo with partition test
-if ($HAVE_PARTITION)
-{
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_2
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_2_DROP_TABLES;
- echo CHILD2_2_CREATE_TABLES;
- }
- --disable_warnings
- eval $CHILD2_2_DROP_TABLES;
- --enable_warnings
- eval $CHILD2_2_CREATE_TABLES;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_DROP_TABLES2;
- echo CHILD2_1_CREATE_TABLES2;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_TABLES2;
- --enable_warnings
- eval $CHILD2_1_CREATE_TABLES2;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- --connection master_1
- --disable_query_log
- echo CREATE TABLE ta_l2 (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
- ) MASTER_1_ENGINE MASTER_1_COMMENT2_P_2_1;
- eval CREATE TABLE ta_l2 (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
- ) $MASTER_1_ENGINE $MASTER_1_COMMENT2_P_2_1;
- INSERT INTO ta_l2 (a, b, c) VALUES
- (1, 'a', '2008-08-01 10:21:39'),
- (2, 'b', '2000-01-01 00:00:00'),
- (3, 'e', '2007-06-04 20:03:11'),
- (4, 'd', '2003-11-30 05:01:03'),
- (5, 'c', '2001-12-31 23:59:59');
- --enable_query_log
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- SELECT COUNT(*) FROM ta_l2;
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- SELECT MAX(a) FROM ta_l2;
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- SELECT MIN(a) FROM ta_l2;
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- SELECT MAX(a) FROM ta_l2 WHERE a < 5;
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- SELECT MIN(a) FROM ta_l2 WHERE a > 1;
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %';
- }
- eval $CHILD2_2_SELECT_TABLES;
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %';
- }
- eval $CHILD2_1_SELECT_TABLES2;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
-}
-
---echo
---echo deinit
---disable_warnings
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
-}
---disable_query_log
---disable_result_log
---source test_deinit.inc
---enable_result_log
---enable_query_log
---enable_warnings
---echo
---echo end of test
+--disable_warnings +--disable_query_log +--disable_result_log +--source test_init.inc +--enable_result_log +--enable_query_log +if (!$HAVE_PARTITION) +{ + --disable_query_log + --disable_result_log + --source test_deinit.inc + --enable_result_log + --enable_query_log + --enable_warnings + skip Test requires partitioning; +} + +--echo +--echo drop and create databases +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +CREATE DATABASE auto_test_local; +USE auto_test_local; +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + CREATE DATABASE auto_test_remote; + USE auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; + CREATE DATABASE auto_test_remote2; + USE auto_test_remote2; +} +--enable_warnings + +--echo +--echo test select 1 +--connection master_1 +SELECT 1; +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + SELECT 1; + --connection child2_2 + SELECT 1; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + +--echo +--echo with partition test +if ($HAVE_PARTITION) +{ + if ($USE_CHILD_GROUP2) + { + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_2 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_2_DROP_TABLES; + echo CHILD2_2_CREATE_TABLES; + } + --disable_warnings + eval $CHILD2_2_DROP_TABLES; + --enable_warnings + eval $CHILD2_2_CREATE_TABLES; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + --connection child2_1 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_DROP_TABLES2; + echo CHILD2_1_CREATE_TABLES2; + } + --disable_warnings + eval $CHILD2_1_DROP_TABLES2; + --enable_warnings + eval $CHILD2_1_CREATE_TABLES2; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } + } + --connection master_1 + --disable_query_log + echo CREATE TABLE ta_l2 ( + a INT, + b CHAR(1), + c DATETIME, + PRIMARY KEY(a) + ) MASTER_1_ENGINE MASTER_1_COMMENT2_P_2_1; + eval CREATE TABLE ta_l2 ( + a INT, + b CHAR(1), + c DATETIME, + PRIMARY KEY(a) + ) $MASTER_1_ENGINE $MASTER_1_COMMENT2_P_2_1; + INSERT INTO ta_l2 (a, b, c) VALUES + (1, 'a', '2008-08-01 10:21:39'), + (2, 'b', '2000-01-01 00:00:00'), + (3, 'e', '2007-06-04 20:03:11'), + (4, 'd', '2003-11-30 05:01:03'), + (5, 'c', '2001-12-31 23:59:59'); + --enable_query_log + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + SELECT COUNT(*) FROM ta_l2; + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + SELECT MAX(a) FROM ta_l2; + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + SELECT MIN(a) FROM ta_l2; + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + SELECT MAX(a) FROM ta_l2 WHERE a < 5; + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + SELECT MIN(a) FROM ta_l2 WHERE a > 1; + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + if ($USE_CHILD_GROUP2) + { + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_2 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %'; + } + eval $CHILD2_2_SELECT_TABLES; + --connection child2_1 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %'; + } + eval $CHILD2_1_SELECT_TABLES2; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } + } +} + +--echo +--echo deinit +--disable_warnings +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; +} +--disable_query_log +--disable_result_log +--source test_deinit.inc +--enable_result_log +--enable_query_log +--enable_warnings +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/oracle2/t/have_partition.inc b/storage/spider/mysql-test/spider/oracle2/t/have_partition.inc index 573c76ab43b..b6e699475db 100644 --- a/storage/spider/mysql-test/spider/oracle2/t/have_partition.inc +++ b/storage/spider/mysql-test/spider/oracle2/t/have_partition.inc @@ -1,7 +1,7 @@ -let $HAVE_PARTITION= 0;
-if (`SELECT count(*) FROM information_schema.plugins WHERE
- plugin_status = 'ACTIVE' AND
- plugin_name = 'partition'`)
-{
- let $HAVE_PARTITION= 1;
-}
+let $HAVE_PARTITION= 0; +if (`SELECT count(*) FROM information_schema.plugins WHERE + plugin_status = 'ACTIVE' AND + plugin_name = 'partition'`) +{ + let $HAVE_PARTITION= 1; +} diff --git a/storage/spider/mysql-test/spider/oracle2/t/have_trigger.inc b/storage/spider/mysql-test/spider/oracle2/t/have_trigger.inc index 10c0871dd5f..32de484b388 100644 --- a/storage/spider/mysql-test/spider/oracle2/t/have_trigger.inc +++ b/storage/spider/mysql-test/spider/oracle2/t/have_trigger.inc @@ -1,2 +1,2 @@ -let $HAVE_TRIGGER= `SELECT COUNT(*) FROM information_schema.tables
- WHERE TABLE_SCHEMA = 'information_schema' AND TABLE_NAME = 'TRIGGERS'`;
+let $HAVE_TRIGGER= `SELECT COUNT(*) FROM information_schema.tables + WHERE TABLE_SCHEMA = 'information_schema' AND TABLE_NAME = 'TRIGGERS'`; diff --git a/storage/spider/mysql-test/spider/oracle2/t/spider3_fixes.test b/storage/spider/mysql-test/spider/oracle2/t/spider3_fixes.test index 7530ce97837..13fa6f5fa39 100644 --- a/storage/spider/mysql-test/spider/oracle2/t/spider3_fixes.test +++ b/storage/spider/mysql-test/spider/oracle2/t/spider3_fixes.test @@ -1,292 +1,292 @@ -# This test tests for Spider 3.0's bug fixes
-source include/have_log_bin.inc;
---disable_warnings
---disable_query_log
---disable_result_log
---source test_init.inc
---source slave_test_init.inc
---enable_result_log
---enable_query_log
-
---echo
---echo drop and create databases
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-if ($USE_REPLICATION)
-{
- --connection slave1_1
- DROP DATABASE IF EXISTS auto_test_local;
- CREATE DATABASE auto_test_local;
- USE auto_test_local;
-}
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- CREATE DATABASE auto_test_remote;
- USE auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
- CREATE DATABASE auto_test_remote2;
- USE auto_test_remote2;
-}
---enable_warnings
-
---echo
---echo test select 1
---connection master_1
-SELECT 1;
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- SELECT 1;
- --connection child2_2
- SELECT 1;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
-
---echo
---echo 3.1
---echo auto_increment
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_DROP_INCREMENT_TABLES1;
- echo CHILD2_1_CREATE_INCREMENT_TABLES1;
- echo CHILD2_1_AUTO_INCREMENT_INCREMENT2;
- echo CHILD2_1_AUTO_INCREMENT_OFFSET2;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_INCREMENT_TABLES1;
- --enable_warnings
- eval $CHILD2_1_CREATE_INCREMENT_TABLES1;
- eval $CHILD2_1_AUTO_INCREMENT_INCREMENT2;
- eval $CHILD2_1_AUTO_INCREMENT_OFFSET2;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-if ($USE_REPLICATION)
-{
- save_master_pos;
- --connection slave1_1
- sync_with_master;
- --connection master_1
- --disable_query_log
- SET SESSION sql_log_bin= 0;
- --enable_query_log
-}
---disable_warnings
-DROP TABLE IF EXISTS t1, t2;
---enable_warnings
---disable_query_log
-echo CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_1;
-echo CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_1;
-echo MASTER_1_AUTO_INCREMENT_INCREMENT2;
-echo MASTER_1_AUTO_INCREMENT_OFFSET2;
-eval CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
-) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_1;
-eval CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
-) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_1;
-eval $MASTER_1_AUTO_INCREMENT_INCREMENT2;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET2;
-if ($USE_REPLICATION)
-{
- SET SESSION sql_log_bin= 1;
- --connection slave1_1
- --disable_warnings
- DROP TABLE IF EXISTS t1, t2;
- --enable_warnings
- echo CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_1;
- echo CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_1;
- eval CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_1;
- eval CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_1;
- --connection master_1
-}
---enable_query_log
-INSERT INTO t1 () VALUES ();
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
-INSERT INTO t2 () VALUES ();
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t2;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET3;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
---enable_query_log
-INSERT INTO t1 (id) VALUES (null);
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET4;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
---enable_query_log
-INSERT INTO t2 (id) VALUES (null);
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t2;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET3;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
---enable_query_log
-INSERT INTO t1 () VALUES (),(),(),();
-SELECT LAST_INSERT_ID();
-SELECT id FROM t1 ORDER BY id;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET4;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
---enable_query_log
-INSERT INTO t2 () VALUES (),(),(),();
-SELECT LAST_INSERT_ID();
-SELECT id FROM t2 ORDER BY id;
-TRUNCATE TABLE t1;
-TRUNCATE TABLE t2;
-INSERT INTO t1 () VALUES (),(),(),();
-SELECT LAST_INSERT_ID();
-SELECT id FROM t1 ORDER BY id;
-INSERT INTO t2 () VALUES (),(),(),();
-SELECT LAST_INSERT_ID();
-SELECT id FROM t2 ORDER BY id;
-SET INSERT_ID=5000;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET3;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
---enable_query_log
-INSERT INTO t1 () VALUES ();
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET4;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
---enable_query_log
-INSERT INTO t2 () VALUES ();
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t2;
-INSERT INTO t1 (id) VALUES (10000);
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
-INSERT INTO t2 (id) VALUES (1000);
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t2;
-if ($USE_REPLICATION)
-{
- save_master_pos;
- --connection slave1_1
- sync_with_master;
- SELECT id FROM t1 ORDER BY id;
- --connection master_1
- --disable_query_log
- SET SESSION sql_log_bin= 0;
- --enable_query_log
-}
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %';
- }
- eval $CHILD2_1_SELECT_INCREMENT_TABLES1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_AUTO_INCREMENT_INCREMENT1;
- echo CHILD2_1_AUTO_INCREMENT_OFFSET1;
- }
- eval $CHILD2_1_AUTO_INCREMENT_INCREMENT1;
- eval $CHILD2_1_AUTO_INCREMENT_OFFSET1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
-
---echo
---echo deinit
---disable_warnings
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-if ($USE_REPLICATION)
-{
- --connection slave1_1
- DROP DATABASE IF EXISTS auto_test_local;
-}
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
-}
---disable_query_log
---disable_result_log
---source slave_test_deinit.inc
---source test_deinit.inc
---enable_result_log
---enable_query_log
---enable_warnings
---echo
---echo end of test
+# This test tests for Spider 3.0's bug fixes +source include/have_log_bin.inc; +--disable_warnings +--disable_query_log +--disable_result_log +--source test_init.inc +--source slave_test_init.inc +--enable_result_log +--enable_query_log + +--echo +--echo drop and create databases +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +CREATE DATABASE auto_test_local; +USE auto_test_local; +if ($USE_REPLICATION) +{ + --connection slave1_1 + DROP DATABASE IF EXISTS auto_test_local; + CREATE DATABASE auto_test_local; + USE auto_test_local; +} +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + CREATE DATABASE auto_test_remote; + USE auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; + CREATE DATABASE auto_test_remote2; + USE auto_test_remote2; +} +--enable_warnings + +--echo +--echo test select 1 +--connection master_1 +SELECT 1; +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + SELECT 1; + --connection child2_2 + SELECT 1; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + + +--echo +--echo 3.1 +--echo auto_increment +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_DROP_INCREMENT_TABLES1; + echo CHILD2_1_CREATE_INCREMENT_TABLES1; + echo CHILD2_1_AUTO_INCREMENT_INCREMENT2; + echo CHILD2_1_AUTO_INCREMENT_OFFSET2; + } + --disable_warnings + eval $CHILD2_1_DROP_INCREMENT_TABLES1; + --enable_warnings + eval $CHILD2_1_CREATE_INCREMENT_TABLES1; + eval $CHILD2_1_AUTO_INCREMENT_INCREMENT2; + eval $CHILD2_1_AUTO_INCREMENT_OFFSET2; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} +--connection master_1 +if ($USE_REPLICATION) +{ + save_master_pos; + --connection slave1_1 + sync_with_master; + --connection master_1 + --disable_query_log + SET SESSION sql_log_bin= 0; + --enable_query_log +} +--disable_warnings +DROP TABLE IF EXISTS t1, t2; +--enable_warnings +--disable_query_log +echo CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) +) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_1; +echo CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) +) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_1; +echo MASTER_1_AUTO_INCREMENT_INCREMENT2; +echo MASTER_1_AUTO_INCREMENT_OFFSET2; +eval CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) +) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_1; +eval CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) +) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_1; +eval $MASTER_1_AUTO_INCREMENT_INCREMENT2; +eval $MASTER_1_AUTO_INCREMENT_OFFSET2; +if ($USE_REPLICATION) +{ + SET SESSION sql_log_bin= 1; + --connection slave1_1 + --disable_warnings + DROP TABLE IF EXISTS t1, t2; + --enable_warnings + echo CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_1; + echo CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_1; + eval CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_1; + eval CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_1; + --connection master_1 +} +--enable_query_log +INSERT INTO t1 () VALUES (); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t1; +INSERT INTO t2 () VALUES (); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t2; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET3; +eval $MASTER_1_AUTO_INCREMENT_OFFSET3; +--enable_query_log +INSERT INTO t1 (id) VALUES (null); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t1; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET4; +eval $MASTER_1_AUTO_INCREMENT_OFFSET4; +--enable_query_log +INSERT INTO t2 (id) VALUES (null); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t2; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET3; +eval $MASTER_1_AUTO_INCREMENT_OFFSET3; +--enable_query_log +INSERT INTO t1 () VALUES (),(),(),(); +SELECT LAST_INSERT_ID(); +SELECT id FROM t1 ORDER BY id; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET4; +eval $MASTER_1_AUTO_INCREMENT_OFFSET4; +--enable_query_log +INSERT INTO t2 () VALUES (),(),(),(); +SELECT LAST_INSERT_ID(); +SELECT id FROM t2 ORDER BY id; +TRUNCATE TABLE t1; +TRUNCATE TABLE t2; +INSERT INTO t1 () VALUES (),(),(),(); +SELECT LAST_INSERT_ID(); +SELECT id FROM t1 ORDER BY id; +INSERT INTO t2 () VALUES (),(),(),(); +SELECT LAST_INSERT_ID(); +SELECT id FROM t2 ORDER BY id; +SET INSERT_ID=5000; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET3; +eval $MASTER_1_AUTO_INCREMENT_OFFSET3; +--enable_query_log +INSERT INTO t1 () VALUES (); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t1; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET4; +eval $MASTER_1_AUTO_INCREMENT_OFFSET4; +--enable_query_log +INSERT INTO t2 () VALUES (); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t2; +INSERT INTO t1 (id) VALUES (10000); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t1; +INSERT INTO t2 (id) VALUES (1000); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t2; +if ($USE_REPLICATION) +{ + save_master_pos; + --connection slave1_1 + sync_with_master; + SELECT id FROM t1 ORDER BY id; + --connection master_1 + --disable_query_log + SET SESSION sql_log_bin= 0; + --enable_query_log +} +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %'; + } + eval $CHILD2_1_SELECT_INCREMENT_TABLES1; + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_AUTO_INCREMENT_INCREMENT1; + echo CHILD2_1_AUTO_INCREMENT_OFFSET1; + } + eval $CHILD2_1_AUTO_INCREMENT_INCREMENT1; + eval $CHILD2_1_AUTO_INCREMENT_OFFSET1; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + + +--echo +--echo deinit +--disable_warnings +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +if ($USE_REPLICATION) +{ + --connection slave1_1 + DROP DATABASE IF EXISTS auto_test_local; +} +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; +} +--disable_query_log +--disable_result_log +--source slave_test_deinit.inc +--source test_deinit.inc +--enable_result_log +--enable_query_log +--enable_warnings +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/oracle2/t/spider3_fixes_part.test b/storage/spider/mysql-test/spider/oracle2/t/spider3_fixes_part.test index f25f000d80c..3288c490a46 100644 --- a/storage/spider/mysql-test/spider/oracle2/t/spider3_fixes_part.test +++ b/storage/spider/mysql-test/spider/oracle2/t/spider3_fixes_part.test @@ -1,345 +1,345 @@ -# This test tests for Spider 3.0's bug fixes
-source include/have_log_bin.inc;
---disable_warnings
---disable_query_log
---disable_result_log
---source test_init.inc
---source slave_test_init.inc
---enable_result_log
---enable_query_log
-if (!$HAVE_PARTITION)
-{
- --disable_query_log
- --disable_result_log
- --source slave_test_deinit.inc
- --source test_deinit.inc
- --enable_result_log
- --enable_query_log
- --enable_warnings
- skip Test requires partitioning;
-}
-
---echo
---echo drop and create databases
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-if ($USE_REPLICATION)
-{
- --connection slave1_1
- DROP DATABASE IF EXISTS auto_test_local;
- CREATE DATABASE auto_test_local;
- USE auto_test_local;
-}
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- CREATE DATABASE auto_test_remote;
- USE auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
- CREATE DATABASE auto_test_remote2;
- USE auto_test_remote2;
-}
---enable_warnings
-
---echo
---echo test select 1
---connection master_1
-SELECT 1;
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- SELECT 1;
- --connection child2_2
- SELECT 1;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
-
---echo auto_increment with partition
-if ($HAVE_PARTITION)
-{
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_DROP_INCREMENT_TABLES1;
- echo CHILD2_1_CREATE_INCREMENT_TABLES1;
- echo CHILD2_1_AUTO_INCREMENT_INCREMENT2;
- echo CHILD2_1_AUTO_INCREMENT_OFFSET2;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_INCREMENT_TABLES1;
- --enable_warnings
- eval $CHILD2_1_CREATE_INCREMENT_TABLES1;
- eval $CHILD2_1_AUTO_INCREMENT_INCREMENT2;
- eval $CHILD2_1_AUTO_INCREMENT_OFFSET2;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- --connection child2_2
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_2_DROP_INCREMENT_TABLES1;
- echo CHILD2_2_CREATE_INCREMENT_TABLES1;
- echo CHILD2_2_AUTO_INCREMENT_INCREMENT2;
- echo CHILD2_2_AUTO_INCREMENT_OFFSET2;
- }
- --disable_warnings
- eval $CHILD2_2_DROP_INCREMENT_TABLES1;
- --enable_warnings
- eval $CHILD2_2_CREATE_INCREMENT_TABLES1;
- eval $CHILD2_2_AUTO_INCREMENT_INCREMENT2;
- eval $CHILD2_2_AUTO_INCREMENT_OFFSET2;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- --connection master_1
- if ($USE_REPLICATION)
- {
- save_master_pos;
- --connection slave1_1
- sync_with_master;
- --connection master_1
- --disable_query_log
- SET SESSION sql_log_bin= 0;
- --enable_query_log
- }
- --disable_warnings
- DROP TABLE IF EXISTS t1, t2;
- --enable_warnings
- --disable_query_log
- echo CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_P_1;
- echo CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_P_1;
- echo MASTER_1_AUTO_INCREMENT_INCREMENT2;
- echo MASTER_1_AUTO_INCREMENT_OFFSET2;
- eval CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_P_1;
- eval CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_P_1;
- eval $MASTER_1_AUTO_INCREMENT_INCREMENT2;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET2;
- if ($USE_REPLICATION)
- {
- SET SESSION sql_log_bin= 1;
- --connection slave1_1
- --disable_warnings
- DROP TABLE IF EXISTS t1, t2;
- --enable_warnings
- echo CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_P_1;
- echo CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_P_1;
- eval CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_P_1;
- eval CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_P_1;
- --connection master_1
- }
- --enable_query_log
- INSERT INTO t1 () VALUES ();
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- INSERT INTO t2 () VALUES ();
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t2;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET3;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
- --enable_query_log
- INSERT INTO t1 (id) VALUES (null);
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET4;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
- --enable_query_log
- INSERT INTO t2 (id) VALUES (null);
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t2;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET3;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
- --enable_query_log
- INSERT INTO t1 () VALUES (),(),(),();
- SELECT LAST_INSERT_ID();
- SELECT id FROM t1 ORDER BY id;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET4;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
- --enable_query_log
- INSERT INTO t2 () VALUES (),(),(),();
- SELECT LAST_INSERT_ID();
- SELECT id FROM t2 ORDER BY id;
- TRUNCATE TABLE t1;
- TRUNCATE TABLE t2;
- INSERT INTO t1 () VALUES (),(),(),();
- SELECT LAST_INSERT_ID();
- SELECT id FROM t1 ORDER BY id;
- INSERT INTO t2 () VALUES (),(),(),();
- SELECT LAST_INSERT_ID();
- SELECT id FROM t2 ORDER BY id;
- SET INSERT_ID=5000;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET3;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
- --enable_query_log
- INSERT INTO t1 () VALUES ();
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET4;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
- --enable_query_log
- INSERT INTO t2 () VALUES ();
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t2;
- INSERT INTO t1 (id) VALUES (10000);
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- INSERT INTO t2 (id) VALUES (1000);
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t2;
- if ($USE_REPLICATION)
- {
- save_master_pos;
- --connection slave1_1
- sync_with_master;
- SELECT id FROM t1 ORDER BY id;
- --connection master_1
- --disable_query_log
- SET SESSION sql_log_bin= 0;
- --enable_query_log
- }
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %';
- }
- eval $CHILD2_1_SELECT_INCREMENT_TABLES1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_AUTO_INCREMENT_INCREMENT1;
- echo CHILD2_1_AUTO_INCREMENT_OFFSET1;
- }
- eval $CHILD2_1_AUTO_INCREMENT_INCREMENT1;
- eval $CHILD2_1_AUTO_INCREMENT_OFFSET1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %';
- }
- eval $CHILD2_2_SELECT_INCREMENT_TABLES1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_2_AUTO_INCREMENT_INCREMENT1;
- echo CHILD2_2_AUTO_INCREMENT_OFFSET1;
- }
- eval $CHILD2_2_AUTO_INCREMENT_INCREMENT1;
- eval $CHILD2_2_AUTO_INCREMENT_OFFSET1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
-}
-
-
---echo
---echo deinit
---disable_warnings
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-if ($USE_REPLICATION)
-{
- --connection slave1_1
- DROP DATABASE IF EXISTS auto_test_local;
-}
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
-}
---disable_query_log
---disable_result_log
---source slave_test_deinit.inc
---source test_deinit.inc
---enable_result_log
---enable_query_log
---enable_warnings
---echo
---echo end of test
+# This test tests for Spider 3.0's bug fixes +source include/have_log_bin.inc; +--disable_warnings +--disable_query_log +--disable_result_log +--source test_init.inc +--source slave_test_init.inc +--enable_result_log +--enable_query_log +if (!$HAVE_PARTITION) +{ + --disable_query_log + --disable_result_log + --source slave_test_deinit.inc + --source test_deinit.inc + --enable_result_log + --enable_query_log + --enable_warnings + skip Test requires partitioning; +} + +--echo +--echo drop and create databases +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +CREATE DATABASE auto_test_local; +USE auto_test_local; +if ($USE_REPLICATION) +{ + --connection slave1_1 + DROP DATABASE IF EXISTS auto_test_local; + CREATE DATABASE auto_test_local; + USE auto_test_local; +} +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + CREATE DATABASE auto_test_remote; + USE auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; + CREATE DATABASE auto_test_remote2; + USE auto_test_remote2; +} +--enable_warnings + +--echo +--echo test select 1 +--connection master_1 +SELECT 1; +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + SELECT 1; + --connection child2_2 + SELECT 1; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + + +--echo auto_increment with partition +if ($HAVE_PARTITION) +{ + if ($USE_CHILD_GROUP2) + { + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_DROP_INCREMENT_TABLES1; + echo CHILD2_1_CREATE_INCREMENT_TABLES1; + echo CHILD2_1_AUTO_INCREMENT_INCREMENT2; + echo CHILD2_1_AUTO_INCREMENT_OFFSET2; + } + --disable_warnings + eval $CHILD2_1_DROP_INCREMENT_TABLES1; + --enable_warnings + eval $CHILD2_1_CREATE_INCREMENT_TABLES1; + eval $CHILD2_1_AUTO_INCREMENT_INCREMENT2; + eval $CHILD2_1_AUTO_INCREMENT_OFFSET2; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + --connection child2_2 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_2_DROP_INCREMENT_TABLES1; + echo CHILD2_2_CREATE_INCREMENT_TABLES1; + echo CHILD2_2_AUTO_INCREMENT_INCREMENT2; + echo CHILD2_2_AUTO_INCREMENT_OFFSET2; + } + --disable_warnings + eval $CHILD2_2_DROP_INCREMENT_TABLES1; + --enable_warnings + eval $CHILD2_2_CREATE_INCREMENT_TABLES1; + eval $CHILD2_2_AUTO_INCREMENT_INCREMENT2; + eval $CHILD2_2_AUTO_INCREMENT_OFFSET2; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } + } + --connection master_1 + if ($USE_REPLICATION) + { + save_master_pos; + --connection slave1_1 + sync_with_master; + --connection master_1 + --disable_query_log + SET SESSION sql_log_bin= 0; + --enable_query_log + } + --disable_warnings + DROP TABLE IF EXISTS t1, t2; + --enable_warnings + --disable_query_log + echo CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_P_1; + echo CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_P_1; + echo MASTER_1_AUTO_INCREMENT_INCREMENT2; + echo MASTER_1_AUTO_INCREMENT_OFFSET2; + eval CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_P_1; + eval CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_P_1; + eval $MASTER_1_AUTO_INCREMENT_INCREMENT2; + eval $MASTER_1_AUTO_INCREMENT_OFFSET2; + if ($USE_REPLICATION) + { + SET SESSION sql_log_bin= 1; + --connection slave1_1 + --disable_warnings + DROP TABLE IF EXISTS t1, t2; + --enable_warnings + echo CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_P_1; + echo CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_P_1; + eval CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_P_1; + eval CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_P_1; + --connection master_1 + } + --enable_query_log + INSERT INTO t1 () VALUES (); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t1; + INSERT INTO t2 () VALUES (); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t2; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET3; + eval $MASTER_1_AUTO_INCREMENT_OFFSET3; + --enable_query_log + INSERT INTO t1 (id) VALUES (null); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t1; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET4; + eval $MASTER_1_AUTO_INCREMENT_OFFSET4; + --enable_query_log + INSERT INTO t2 (id) VALUES (null); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t2; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET3; + eval $MASTER_1_AUTO_INCREMENT_OFFSET3; + --enable_query_log + INSERT INTO t1 () VALUES (),(),(),(); + SELECT LAST_INSERT_ID(); + SELECT id FROM t1 ORDER BY id; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET4; + eval $MASTER_1_AUTO_INCREMENT_OFFSET4; + --enable_query_log + INSERT INTO t2 () VALUES (),(),(),(); + SELECT LAST_INSERT_ID(); + SELECT id FROM t2 ORDER BY id; + TRUNCATE TABLE t1; + TRUNCATE TABLE t2; + INSERT INTO t1 () VALUES (),(),(),(); + SELECT LAST_INSERT_ID(); + SELECT id FROM t1 ORDER BY id; + INSERT INTO t2 () VALUES (),(),(),(); + SELECT LAST_INSERT_ID(); + SELECT id FROM t2 ORDER BY id; + SET INSERT_ID=5000; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET3; + eval $MASTER_1_AUTO_INCREMENT_OFFSET3; + --enable_query_log + INSERT INTO t1 () VALUES (); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t1; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET4; + eval $MASTER_1_AUTO_INCREMENT_OFFSET4; + --enable_query_log + INSERT INTO t2 () VALUES (); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t2; + INSERT INTO t1 (id) VALUES (10000); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t1; + INSERT INTO t2 (id) VALUES (1000); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t2; + if ($USE_REPLICATION) + { + save_master_pos; + --connection slave1_1 + sync_with_master; + SELECT id FROM t1 ORDER BY id; + --connection master_1 + --disable_query_log + SET SESSION sql_log_bin= 0; + --enable_query_log + } + if ($USE_CHILD_GROUP2) + { + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %'; + } + eval $CHILD2_1_SELECT_INCREMENT_TABLES1; + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_AUTO_INCREMENT_INCREMENT1; + echo CHILD2_1_AUTO_INCREMENT_OFFSET1; + } + eval $CHILD2_1_AUTO_INCREMENT_INCREMENT1; + eval $CHILD2_1_AUTO_INCREMENT_OFFSET1; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + --connection child2_2 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %'; + } + eval $CHILD2_2_SELECT_INCREMENT_TABLES1; + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_2_AUTO_INCREMENT_INCREMENT1; + echo CHILD2_2_AUTO_INCREMENT_OFFSET1; + } + eval $CHILD2_2_AUTO_INCREMENT_INCREMENT1; + eval $CHILD2_2_AUTO_INCREMENT_OFFSET1; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } + } +} + + +--echo +--echo deinit +--disable_warnings +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +if ($USE_REPLICATION) +{ + --connection slave1_1 + DROP DATABASE IF EXISTS auto_test_local; +} +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; +} +--disable_query_log +--disable_result_log +--source slave_test_deinit.inc +--source test_deinit.inc +--enable_result_log +--enable_query_log +--enable_warnings +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/t/direct_aggregate.test b/storage/spider/mysql-test/spider/t/direct_aggregate.test index 5f17ac402e2..d65f4c5a624 100644 --- a/storage/spider/mysql-test/spider/t/direct_aggregate.test +++ b/storage/spider/mysql-test/spider/t/direct_aggregate.test @@ -1,179 +1,179 @@ ---disable_warnings
---disable_query_log
---disable_result_log
---source test_init.inc
---enable_result_log
---enable_query_log
-
---echo
---echo drop and create databases
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- CREATE DATABASE auto_test_remote;
- USE auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
- CREATE DATABASE auto_test_remote2;
- USE auto_test_remote2;
-}
---enable_warnings
-
---echo
---echo test select 1
---connection master_1
-SELECT 1;
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- SELECT 1;
- --connection child2_2
- SELECT 1;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo create table select test
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_DROP_TABLES;
- echo CHILD2_1_CREATE_TABLES;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_TABLES;
- --enable_warnings
- eval $CHILD2_1_CREATE_TABLES;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
---disable_warnings
-DROP TABLE IF EXISTS ta_l;
---enable_warnings
---disable_query_log
-echo CREATE TABLE ta_l (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
-eval CREATE TABLE ta_l (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
-) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
---enable_query_log
-INSERT INTO ta_l (a, b, c) VALUES
- (1, 'a', '2008-08-01 10:21:39'),
- (2, 'b', '2000-01-01 00:00:00'),
- (3, 'e', '2007-06-04 20:03:11'),
- (4, 'd', '2003-11-30 05:01:03'),
- (5, 'c', '2001-12-31 23:59:59');
-
---echo
---echo direct_aggregating test
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-SELECT COUNT(*) FROM ta_l;
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-SELECT MAX(a) FROM ta_l;
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-SELECT MIN(a) FROM ta_l;
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-SELECT MAX(a) FROM ta_l WHERE a < 5;
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-SELECT MIN(a) FROM ta_l WHERE a > 1;
-eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo deinit
---disable_warnings
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
-}
---disable_query_log
---disable_result_log
---source test_deinit.inc
---enable_result_log
---enable_query_log
---enable_warnings
---echo
---echo end of test
+--disable_warnings +--disable_query_log +--disable_result_log +--source test_init.inc +--enable_result_log +--enable_query_log + +--echo +--echo drop and create databases +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +CREATE DATABASE auto_test_local; +USE auto_test_local; +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + CREATE DATABASE auto_test_remote; + USE auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; + CREATE DATABASE auto_test_remote2; + USE auto_test_remote2; +} +--enable_warnings + +--echo +--echo test select 1 +--connection master_1 +SELECT 1; +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + SELECT 1; + --connection child2_2 + SELECT 1; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + +--echo +--echo create table select test +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_DROP_TABLES; + echo CHILD2_1_CREATE_TABLES; + } + --disable_warnings + eval $CHILD2_1_DROP_TABLES; + --enable_warnings + eval $CHILD2_1_CREATE_TABLES; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} +--connection master_1 +--disable_warnings +DROP TABLE IF EXISTS ta_l; +--enable_warnings +--disable_query_log +echo CREATE TABLE ta_l ( + a INT, + b CHAR(1), + c DATETIME, + PRIMARY KEY(a) +) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1; +eval CREATE TABLE ta_l ( + a INT, + b CHAR(1), + c DATETIME, + PRIMARY KEY(a) +) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1; +--enable_query_log +INSERT INTO ta_l (a, b, c) VALUES + (1, 'a', '2008-08-01 10:21:39'), + (2, 'b', '2000-01-01 00:00:00'), + (3, 'e', '2007-06-04 20:03:11'), + (4, 'd', '2003-11-30 05:01:03'), + (5, 'c', '2001-12-31 23:59:59'); + +--echo +--echo direct_aggregating test +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} +--connection master_1 +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +SELECT COUNT(*) FROM ta_l; +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +SELECT MAX(a) FROM ta_l; +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +SELECT MIN(a) FROM ta_l; +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +SELECT MAX(a) FROM ta_l WHERE a < 5; +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +SELECT MIN(a) FROM ta_l WHERE a > 1; +eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %'; + } + eval $CHILD2_1_SELECT_TABLES; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + +--echo +--echo deinit +--disable_warnings +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; +} +--disable_query_log +--disable_result_log +--source test_deinit.inc +--enable_result_log +--enable_query_log +--enable_warnings +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/t/direct_aggregate_part.test b/storage/spider/mysql-test/spider/t/direct_aggregate_part.test index 2d67e9af32c..aebf210c745 100644 --- a/storage/spider/mysql-test/spider/t/direct_aggregate_part.test +++ b/storage/spider/mysql-test/spider/t/direct_aggregate_part.test @@ -1,192 +1,192 @@ ---disable_warnings
---disable_query_log
---disable_result_log
---source test_init.inc
---enable_result_log
---enable_query_log
-if (!$HAVE_PARTITION)
-{
- --disable_query_log
- --disable_result_log
- --source test_deinit.inc
- --enable_result_log
- --enable_query_log
- --enable_warnings
- skip Test requires partitioning;
-}
-
---echo
---echo drop and create databases
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- CREATE DATABASE auto_test_remote;
- USE auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
- CREATE DATABASE auto_test_remote2;
- USE auto_test_remote2;
-}
---enable_warnings
-
---echo
---echo test select 1
---connection master_1
-SELECT 1;
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- SELECT 1;
- --connection child2_2
- SELECT 1;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo with partition test
-if ($HAVE_PARTITION)
-{
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_2
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_2_DROP_TABLES;
- echo CHILD2_2_CREATE_TABLES;
- }
- --disable_warnings
- eval $CHILD2_2_DROP_TABLES;
- --enable_warnings
- eval $CHILD2_2_CREATE_TABLES;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_DROP_TABLES2;
- echo CHILD2_1_CREATE_TABLES2;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_TABLES2;
- --enable_warnings
- eval $CHILD2_1_CREATE_TABLES2;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- --connection master_1
- --disable_query_log
- echo CREATE TABLE ta_l2 (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
- ) MASTER_1_ENGINE MASTER_1_COMMENT2_P_2_1;
- eval CREATE TABLE ta_l2 (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
- ) $MASTER_1_ENGINE $MASTER_1_COMMENT2_P_2_1;
- INSERT INTO ta_l2 (a, b, c) VALUES
- (1, 'a', '2008-08-01 10:21:39'),
- (2, 'b', '2000-01-01 00:00:00'),
- (3, 'e', '2007-06-04 20:03:11'),
- (4, 'd', '2003-11-30 05:01:03'),
- (5, 'c', '2001-12-31 23:59:59');
- --enable_query_log
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- SELECT COUNT(*) FROM ta_l2;
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- SELECT MAX(a) FROM ta_l2;
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- SELECT MIN(a) FROM ta_l2;
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- SELECT MAX(a) FROM ta_l2 WHERE a < 5;
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- SELECT MIN(a) FROM ta_l2 WHERE a > 1;
- eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS;
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %';
- }
- eval $CHILD2_2_SELECT_TABLES;
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %';
- }
- eval $CHILD2_1_SELECT_TABLES2;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
-}
-
---echo
---echo deinit
---disable_warnings
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
-}
---disable_query_log
---disable_result_log
---source test_deinit.inc
---enable_result_log
---enable_query_log
---enable_warnings
---echo
---echo end of test
+--disable_warnings +--disable_query_log +--disable_result_log +--source test_init.inc +--enable_result_log +--enable_query_log +if (!$HAVE_PARTITION) +{ + --disable_query_log + --disable_result_log + --source test_deinit.inc + --enable_result_log + --enable_query_log + --enable_warnings + skip Test requires partitioning; +} + +--echo +--echo drop and create databases +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +CREATE DATABASE auto_test_local; +USE auto_test_local; +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + CREATE DATABASE auto_test_remote; + USE auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; + CREATE DATABASE auto_test_remote2; + USE auto_test_remote2; +} +--enable_warnings + +--echo +--echo test select 1 +--connection master_1 +SELECT 1; +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + SELECT 1; + --connection child2_2 + SELECT 1; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + +--echo +--echo with partition test +if ($HAVE_PARTITION) +{ + if ($USE_CHILD_GROUP2) + { + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_2 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_2_DROP_TABLES; + echo CHILD2_2_CREATE_TABLES; + } + --disable_warnings + eval $CHILD2_2_DROP_TABLES; + --enable_warnings + eval $CHILD2_2_CREATE_TABLES; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + --connection child2_1 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_DROP_TABLES2; + echo CHILD2_1_CREATE_TABLES2; + } + --disable_warnings + eval $CHILD2_1_DROP_TABLES2; + --enable_warnings + eval $CHILD2_1_CREATE_TABLES2; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } + } + --connection master_1 + --disable_query_log + echo CREATE TABLE ta_l2 ( + a INT, + b CHAR(1), + c DATETIME, + PRIMARY KEY(a) + ) MASTER_1_ENGINE MASTER_1_COMMENT2_P_2_1; + eval CREATE TABLE ta_l2 ( + a INT, + b CHAR(1), + c DATETIME, + PRIMARY KEY(a) + ) $MASTER_1_ENGINE $MASTER_1_COMMENT2_P_2_1; + INSERT INTO ta_l2 (a, b, c) VALUES + (1, 'a', '2008-08-01 10:21:39'), + (2, 'b', '2000-01-01 00:00:00'), + (3, 'e', '2007-06-04 20:03:11'), + (4, 'd', '2003-11-30 05:01:03'), + (5, 'c', '2001-12-31 23:59:59'); + --enable_query_log + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + SELECT COUNT(*) FROM ta_l2; + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + SELECT MAX(a) FROM ta_l2; + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + SELECT MIN(a) FROM ta_l2; + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + SELECT MAX(a) FROM ta_l2 WHERE a < 5; + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + SELECT MIN(a) FROM ta_l2 WHERE a > 1; + eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + if ($USE_CHILD_GROUP2) + { + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_2 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %'; + } + eval $CHILD2_2_SELECT_TABLES; + --connection child2_1 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%handler %'; + } + eval $CHILD2_1_SELECT_TABLES2; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } + } +} + +--echo +--echo deinit +--disable_warnings +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; +} +--disable_query_log +--disable_result_log +--source test_deinit.inc +--enable_result_log +--enable_query_log +--enable_warnings +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/t/have_partition.inc b/storage/spider/mysql-test/spider/t/have_partition.inc index 573c76ab43b..b6e699475db 100644 --- a/storage/spider/mysql-test/spider/t/have_partition.inc +++ b/storage/spider/mysql-test/spider/t/have_partition.inc @@ -1,7 +1,7 @@ -let $HAVE_PARTITION= 0;
-if (`SELECT count(*) FROM information_schema.plugins WHERE
- plugin_status = 'ACTIVE' AND
- plugin_name = 'partition'`)
-{
- let $HAVE_PARTITION= 1;
-}
+let $HAVE_PARTITION= 0; +if (`SELECT count(*) FROM information_schema.plugins WHERE + plugin_status = 'ACTIVE' AND + plugin_name = 'partition'`) +{ + let $HAVE_PARTITION= 1; +} diff --git a/storage/spider/mysql-test/spider/t/have_trigger.inc b/storage/spider/mysql-test/spider/t/have_trigger.inc index 10c0871dd5f..32de484b388 100644 --- a/storage/spider/mysql-test/spider/t/have_trigger.inc +++ b/storage/spider/mysql-test/spider/t/have_trigger.inc @@ -1,2 +1,2 @@ -let $HAVE_TRIGGER= `SELECT COUNT(*) FROM information_schema.tables
- WHERE TABLE_SCHEMA = 'information_schema' AND TABLE_NAME = 'TRIGGERS'`;
+let $HAVE_TRIGGER= `SELECT COUNT(*) FROM information_schema.tables + WHERE TABLE_SCHEMA = 'information_schema' AND TABLE_NAME = 'TRIGGERS'`; diff --git a/storage/spider/mysql-test/spider/t/spider3_fixes.test b/storage/spider/mysql-test/spider/t/spider3_fixes.test index 7530ce97837..13fa6f5fa39 100644 --- a/storage/spider/mysql-test/spider/t/spider3_fixes.test +++ b/storage/spider/mysql-test/spider/t/spider3_fixes.test @@ -1,292 +1,292 @@ -# This test tests for Spider 3.0's bug fixes
-source include/have_log_bin.inc;
---disable_warnings
---disable_query_log
---disable_result_log
---source test_init.inc
---source slave_test_init.inc
---enable_result_log
---enable_query_log
-
---echo
---echo drop and create databases
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-if ($USE_REPLICATION)
-{
- --connection slave1_1
- DROP DATABASE IF EXISTS auto_test_local;
- CREATE DATABASE auto_test_local;
- USE auto_test_local;
-}
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- CREATE DATABASE auto_test_remote;
- USE auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
- CREATE DATABASE auto_test_remote2;
- USE auto_test_remote2;
-}
---enable_warnings
-
---echo
---echo test select 1
---connection master_1
-SELECT 1;
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- SELECT 1;
- --connection child2_2
- SELECT 1;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
-
---echo
---echo 3.1
---echo auto_increment
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_DROP_INCREMENT_TABLES1;
- echo CHILD2_1_CREATE_INCREMENT_TABLES1;
- echo CHILD2_1_AUTO_INCREMENT_INCREMENT2;
- echo CHILD2_1_AUTO_INCREMENT_OFFSET2;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_INCREMENT_TABLES1;
- --enable_warnings
- eval $CHILD2_1_CREATE_INCREMENT_TABLES1;
- eval $CHILD2_1_AUTO_INCREMENT_INCREMENT2;
- eval $CHILD2_1_AUTO_INCREMENT_OFFSET2;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-if ($USE_REPLICATION)
-{
- save_master_pos;
- --connection slave1_1
- sync_with_master;
- --connection master_1
- --disable_query_log
- SET SESSION sql_log_bin= 0;
- --enable_query_log
-}
---disable_warnings
-DROP TABLE IF EXISTS t1, t2;
---enable_warnings
---disable_query_log
-echo CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_1;
-echo CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_1;
-echo MASTER_1_AUTO_INCREMENT_INCREMENT2;
-echo MASTER_1_AUTO_INCREMENT_OFFSET2;
-eval CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
-) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_1;
-eval CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
-) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_1;
-eval $MASTER_1_AUTO_INCREMENT_INCREMENT2;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET2;
-if ($USE_REPLICATION)
-{
- SET SESSION sql_log_bin= 1;
- --connection slave1_1
- --disable_warnings
- DROP TABLE IF EXISTS t1, t2;
- --enable_warnings
- echo CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_1;
- echo CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_1;
- eval CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_1;
- eval CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_1;
- --connection master_1
-}
---enable_query_log
-INSERT INTO t1 () VALUES ();
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
-INSERT INTO t2 () VALUES ();
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t2;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET3;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
---enable_query_log
-INSERT INTO t1 (id) VALUES (null);
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET4;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
---enable_query_log
-INSERT INTO t2 (id) VALUES (null);
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t2;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET3;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
---enable_query_log
-INSERT INTO t1 () VALUES (),(),(),();
-SELECT LAST_INSERT_ID();
-SELECT id FROM t1 ORDER BY id;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET4;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
---enable_query_log
-INSERT INTO t2 () VALUES (),(),(),();
-SELECT LAST_INSERT_ID();
-SELECT id FROM t2 ORDER BY id;
-TRUNCATE TABLE t1;
-TRUNCATE TABLE t2;
-INSERT INTO t1 () VALUES (),(),(),();
-SELECT LAST_INSERT_ID();
-SELECT id FROM t1 ORDER BY id;
-INSERT INTO t2 () VALUES (),(),(),();
-SELECT LAST_INSERT_ID();
-SELECT id FROM t2 ORDER BY id;
-SET INSERT_ID=5000;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET3;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
---enable_query_log
-INSERT INTO t1 () VALUES ();
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
---disable_query_log
-echo MASTER_1_AUTO_INCREMENT_OFFSET4;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
---enable_query_log
-INSERT INTO t2 () VALUES ();
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t2;
-INSERT INTO t1 (id) VALUES (10000);
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
-INSERT INTO t2 (id) VALUES (1000);
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t2;
-if ($USE_REPLICATION)
-{
- save_master_pos;
- --connection slave1_1
- sync_with_master;
- SELECT id FROM t1 ORDER BY id;
- --connection master_1
- --disable_query_log
- SET SESSION sql_log_bin= 0;
- --enable_query_log
-}
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %';
- }
- eval $CHILD2_1_SELECT_INCREMENT_TABLES1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_AUTO_INCREMENT_INCREMENT1;
- echo CHILD2_1_AUTO_INCREMENT_OFFSET1;
- }
- eval $CHILD2_1_AUTO_INCREMENT_INCREMENT1;
- eval $CHILD2_1_AUTO_INCREMENT_OFFSET1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
-
---echo
---echo deinit
---disable_warnings
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-if ($USE_REPLICATION)
-{
- --connection slave1_1
- DROP DATABASE IF EXISTS auto_test_local;
-}
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
-}
---disable_query_log
---disable_result_log
---source slave_test_deinit.inc
---source test_deinit.inc
---enable_result_log
---enable_query_log
---enable_warnings
---echo
---echo end of test
+# This test tests for Spider 3.0's bug fixes +source include/have_log_bin.inc; +--disable_warnings +--disable_query_log +--disable_result_log +--source test_init.inc +--source slave_test_init.inc +--enable_result_log +--enable_query_log + +--echo +--echo drop and create databases +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +CREATE DATABASE auto_test_local; +USE auto_test_local; +if ($USE_REPLICATION) +{ + --connection slave1_1 + DROP DATABASE IF EXISTS auto_test_local; + CREATE DATABASE auto_test_local; + USE auto_test_local; +} +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + CREATE DATABASE auto_test_remote; + USE auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; + CREATE DATABASE auto_test_remote2; + USE auto_test_remote2; +} +--enable_warnings + +--echo +--echo test select 1 +--connection master_1 +SELECT 1; +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + SELECT 1; + --connection child2_2 + SELECT 1; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + + +--echo +--echo 3.1 +--echo auto_increment +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_DROP_INCREMENT_TABLES1; + echo CHILD2_1_CREATE_INCREMENT_TABLES1; + echo CHILD2_1_AUTO_INCREMENT_INCREMENT2; + echo CHILD2_1_AUTO_INCREMENT_OFFSET2; + } + --disable_warnings + eval $CHILD2_1_DROP_INCREMENT_TABLES1; + --enable_warnings + eval $CHILD2_1_CREATE_INCREMENT_TABLES1; + eval $CHILD2_1_AUTO_INCREMENT_INCREMENT2; + eval $CHILD2_1_AUTO_INCREMENT_OFFSET2; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} +--connection master_1 +if ($USE_REPLICATION) +{ + save_master_pos; + --connection slave1_1 + sync_with_master; + --connection master_1 + --disable_query_log + SET SESSION sql_log_bin= 0; + --enable_query_log +} +--disable_warnings +DROP TABLE IF EXISTS t1, t2; +--enable_warnings +--disable_query_log +echo CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) +) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_1; +echo CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) +) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_1; +echo MASTER_1_AUTO_INCREMENT_INCREMENT2; +echo MASTER_1_AUTO_INCREMENT_OFFSET2; +eval CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) +) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_1; +eval CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) +) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_1; +eval $MASTER_1_AUTO_INCREMENT_INCREMENT2; +eval $MASTER_1_AUTO_INCREMENT_OFFSET2; +if ($USE_REPLICATION) +{ + SET SESSION sql_log_bin= 1; + --connection slave1_1 + --disable_warnings + DROP TABLE IF EXISTS t1, t2; + --enable_warnings + echo CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_1; + echo CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_1; + eval CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_1; + eval CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_1; + --connection master_1 +} +--enable_query_log +INSERT INTO t1 () VALUES (); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t1; +INSERT INTO t2 () VALUES (); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t2; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET3; +eval $MASTER_1_AUTO_INCREMENT_OFFSET3; +--enable_query_log +INSERT INTO t1 (id) VALUES (null); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t1; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET4; +eval $MASTER_1_AUTO_INCREMENT_OFFSET4; +--enable_query_log +INSERT INTO t2 (id) VALUES (null); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t2; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET3; +eval $MASTER_1_AUTO_INCREMENT_OFFSET3; +--enable_query_log +INSERT INTO t1 () VALUES (),(),(),(); +SELECT LAST_INSERT_ID(); +SELECT id FROM t1 ORDER BY id; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET4; +eval $MASTER_1_AUTO_INCREMENT_OFFSET4; +--enable_query_log +INSERT INTO t2 () VALUES (),(),(),(); +SELECT LAST_INSERT_ID(); +SELECT id FROM t2 ORDER BY id; +TRUNCATE TABLE t1; +TRUNCATE TABLE t2; +INSERT INTO t1 () VALUES (),(),(),(); +SELECT LAST_INSERT_ID(); +SELECT id FROM t1 ORDER BY id; +INSERT INTO t2 () VALUES (),(),(),(); +SELECT LAST_INSERT_ID(); +SELECT id FROM t2 ORDER BY id; +SET INSERT_ID=5000; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET3; +eval $MASTER_1_AUTO_INCREMENT_OFFSET3; +--enable_query_log +INSERT INTO t1 () VALUES (); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t1; +--disable_query_log +echo MASTER_1_AUTO_INCREMENT_OFFSET4; +eval $MASTER_1_AUTO_INCREMENT_OFFSET4; +--enable_query_log +INSERT INTO t2 () VALUES (); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t2; +INSERT INTO t1 (id) VALUES (10000); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t1; +INSERT INTO t2 (id) VALUES (1000); +SELECT LAST_INSERT_ID(); +SELECT MAX(id) FROM t2; +if ($USE_REPLICATION) +{ + save_master_pos; + --connection slave1_1 + sync_with_master; + SELECT id FROM t1 ORDER BY id; + --connection master_1 + --disable_query_log + SET SESSION sql_log_bin= 0; + --enable_query_log +} +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %'; + } + eval $CHILD2_1_SELECT_INCREMENT_TABLES1; + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_AUTO_INCREMENT_INCREMENT1; + echo CHILD2_1_AUTO_INCREMENT_OFFSET1; + } + eval $CHILD2_1_AUTO_INCREMENT_INCREMENT1; + eval $CHILD2_1_AUTO_INCREMENT_OFFSET1; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + + +--echo +--echo deinit +--disable_warnings +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +if ($USE_REPLICATION) +{ + --connection slave1_1 + DROP DATABASE IF EXISTS auto_test_local; +} +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; +} +--disable_query_log +--disable_result_log +--source slave_test_deinit.inc +--source test_deinit.inc +--enable_result_log +--enable_query_log +--enable_warnings +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/t/spider3_fixes_part.test b/storage/spider/mysql-test/spider/t/spider3_fixes_part.test index f25f000d80c..3288c490a46 100644 --- a/storage/spider/mysql-test/spider/t/spider3_fixes_part.test +++ b/storage/spider/mysql-test/spider/t/spider3_fixes_part.test @@ -1,345 +1,345 @@ -# This test tests for Spider 3.0's bug fixes
-source include/have_log_bin.inc;
---disable_warnings
---disable_query_log
---disable_result_log
---source test_init.inc
---source slave_test_init.inc
---enable_result_log
---enable_query_log
-if (!$HAVE_PARTITION)
-{
- --disable_query_log
- --disable_result_log
- --source slave_test_deinit.inc
- --source test_deinit.inc
- --enable_result_log
- --enable_query_log
- --enable_warnings
- skip Test requires partitioning;
-}
-
---echo
---echo drop and create databases
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-if ($USE_REPLICATION)
-{
- --connection slave1_1
- DROP DATABASE IF EXISTS auto_test_local;
- CREATE DATABASE auto_test_local;
- USE auto_test_local;
-}
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- CREATE DATABASE auto_test_remote;
- USE auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
- CREATE DATABASE auto_test_remote2;
- USE auto_test_remote2;
-}
---enable_warnings
-
---echo
---echo test select 1
---connection master_1
-SELECT 1;
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- SELECT 1;
- --connection child2_2
- SELECT 1;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
-
---echo auto_increment with partition
-if ($HAVE_PARTITION)
-{
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_DROP_INCREMENT_TABLES1;
- echo CHILD2_1_CREATE_INCREMENT_TABLES1;
- echo CHILD2_1_AUTO_INCREMENT_INCREMENT2;
- echo CHILD2_1_AUTO_INCREMENT_OFFSET2;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_INCREMENT_TABLES1;
- --enable_warnings
- eval $CHILD2_1_CREATE_INCREMENT_TABLES1;
- eval $CHILD2_1_AUTO_INCREMENT_INCREMENT2;
- eval $CHILD2_1_AUTO_INCREMENT_OFFSET2;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- --connection child2_2
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_2_DROP_INCREMENT_TABLES1;
- echo CHILD2_2_CREATE_INCREMENT_TABLES1;
- echo CHILD2_2_AUTO_INCREMENT_INCREMENT2;
- echo CHILD2_2_AUTO_INCREMENT_OFFSET2;
- }
- --disable_warnings
- eval $CHILD2_2_DROP_INCREMENT_TABLES1;
- --enable_warnings
- eval $CHILD2_2_CREATE_INCREMENT_TABLES1;
- eval $CHILD2_2_AUTO_INCREMENT_INCREMENT2;
- eval $CHILD2_2_AUTO_INCREMENT_OFFSET2;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- --connection master_1
- if ($USE_REPLICATION)
- {
- save_master_pos;
- --connection slave1_1
- sync_with_master;
- --connection master_1
- --disable_query_log
- SET SESSION sql_log_bin= 0;
- --enable_query_log
- }
- --disable_warnings
- DROP TABLE IF EXISTS t1, t2;
- --enable_warnings
- --disable_query_log
- echo CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_P_1;
- echo CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_P_1;
- echo MASTER_1_AUTO_INCREMENT_INCREMENT2;
- echo MASTER_1_AUTO_INCREMENT_OFFSET2;
- eval CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_P_1;
- eval CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_P_1;
- eval $MASTER_1_AUTO_INCREMENT_INCREMENT2;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET2;
- if ($USE_REPLICATION)
- {
- SET SESSION sql_log_bin= 1;
- --connection slave1_1
- --disable_warnings
- DROP TABLE IF EXISTS t1, t2;
- --enable_warnings
- echo CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_P_1;
- echo CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_P_1;
- eval CREATE TABLE t1 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_P_1;
- eval CREATE TABLE t2 (
- id int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (id)
- ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_P_1;
- --connection master_1
- }
- --enable_query_log
- INSERT INTO t1 () VALUES ();
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- INSERT INTO t2 () VALUES ();
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t2;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET3;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
- --enable_query_log
- INSERT INTO t1 (id) VALUES (null);
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET4;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
- --enable_query_log
- INSERT INTO t2 (id) VALUES (null);
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t2;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET3;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
- --enable_query_log
- INSERT INTO t1 () VALUES (),(),(),();
- SELECT LAST_INSERT_ID();
- SELECT id FROM t1 ORDER BY id;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET4;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
- --enable_query_log
- INSERT INTO t2 () VALUES (),(),(),();
- SELECT LAST_INSERT_ID();
- SELECT id FROM t2 ORDER BY id;
- TRUNCATE TABLE t1;
- TRUNCATE TABLE t2;
- INSERT INTO t1 () VALUES (),(),(),();
- SELECT LAST_INSERT_ID();
- SELECT id FROM t1 ORDER BY id;
- INSERT INTO t2 () VALUES (),(),(),();
- SELECT LAST_INSERT_ID();
- SELECT id FROM t2 ORDER BY id;
- SET INSERT_ID=5000;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET3;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET3;
- --enable_query_log
- INSERT INTO t1 () VALUES ();
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- --disable_query_log
- echo MASTER_1_AUTO_INCREMENT_OFFSET4;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET4;
- --enable_query_log
- INSERT INTO t2 () VALUES ();
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t2;
- INSERT INTO t1 (id) VALUES (10000);
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- INSERT INTO t2 (id) VALUES (1000);
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t2;
- if ($USE_REPLICATION)
- {
- save_master_pos;
- --connection slave1_1
- sync_with_master;
- SELECT id FROM t1 ORDER BY id;
- --connection master_1
- --disable_query_log
- SET SESSION sql_log_bin= 0;
- --enable_query_log
- }
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %';
- }
- eval $CHILD2_1_SELECT_INCREMENT_TABLES1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_AUTO_INCREMENT_INCREMENT1;
- echo CHILD2_1_AUTO_INCREMENT_OFFSET1;
- }
- eval $CHILD2_1_AUTO_INCREMENT_INCREMENT1;
- eval $CHILD2_1_AUTO_INCREMENT_OFFSET1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %';
- }
- eval $CHILD2_2_SELECT_INCREMENT_TABLES1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_2_AUTO_INCREMENT_INCREMENT1;
- echo CHILD2_2_AUTO_INCREMENT_OFFSET1;
- }
- eval $CHILD2_2_AUTO_INCREMENT_INCREMENT1;
- eval $CHILD2_2_AUTO_INCREMENT_OFFSET1;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
-}
-
-
---echo
---echo deinit
---disable_warnings
---connection master_1
-DROP DATABASE IF EXISTS auto_test_local;
-if ($USE_REPLICATION)
-{
- --connection slave1_1
- DROP DATABASE IF EXISTS auto_test_local;
-}
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- DROP DATABASE IF EXISTS auto_test_remote;
- --connection child2_2
- DROP DATABASE IF EXISTS auto_test_remote2;
-}
---disable_query_log
---disable_result_log
---source slave_test_deinit.inc
---source test_deinit.inc
---enable_result_log
---enable_query_log
---enable_warnings
---echo
---echo end of test
+# This test tests for Spider 3.0's bug fixes +source include/have_log_bin.inc; +--disable_warnings +--disable_query_log +--disable_result_log +--source test_init.inc +--source slave_test_init.inc +--enable_result_log +--enable_query_log +if (!$HAVE_PARTITION) +{ + --disable_query_log + --disable_result_log + --source slave_test_deinit.inc + --source test_deinit.inc + --enable_result_log + --enable_query_log + --enable_warnings + skip Test requires partitioning; +} + +--echo +--echo drop and create databases +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +CREATE DATABASE auto_test_local; +USE auto_test_local; +if ($USE_REPLICATION) +{ + --connection slave1_1 + DROP DATABASE IF EXISTS auto_test_local; + CREATE DATABASE auto_test_local; + USE auto_test_local; +} +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + CREATE DATABASE auto_test_remote; + USE auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; + CREATE DATABASE auto_test_remote2; + USE auto_test_remote2; +} +--enable_warnings + +--echo +--echo test select 1 +--connection master_1 +SELECT 1; +if ($USE_CHILD_GROUP2) +{ + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + SELECT 1; + --connection child2_2 + SELECT 1; + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } +} + + +--echo auto_increment with partition +if ($HAVE_PARTITION) +{ + if ($USE_CHILD_GROUP2) + { + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_DROP_INCREMENT_TABLES1; + echo CHILD2_1_CREATE_INCREMENT_TABLES1; + echo CHILD2_1_AUTO_INCREMENT_INCREMENT2; + echo CHILD2_1_AUTO_INCREMENT_OFFSET2; + } + --disable_warnings + eval $CHILD2_1_DROP_INCREMENT_TABLES1; + --enable_warnings + eval $CHILD2_1_CREATE_INCREMENT_TABLES1; + eval $CHILD2_1_AUTO_INCREMENT_INCREMENT2; + eval $CHILD2_1_AUTO_INCREMENT_OFFSET2; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + --connection child2_2 + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_2_DROP_INCREMENT_TABLES1; + echo CHILD2_2_CREATE_INCREMENT_TABLES1; + echo CHILD2_2_AUTO_INCREMENT_INCREMENT2; + echo CHILD2_2_AUTO_INCREMENT_OFFSET2; + } + --disable_warnings + eval $CHILD2_2_DROP_INCREMENT_TABLES1; + --enable_warnings + eval $CHILD2_2_CREATE_INCREMENT_TABLES1; + eval $CHILD2_2_AUTO_INCREMENT_INCREMENT2; + eval $CHILD2_2_AUTO_INCREMENT_OFFSET2; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if ($USE_GENERAL_LOG) + { + TRUNCATE TABLE mysql.general_log; + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } + } + --connection master_1 + if ($USE_REPLICATION) + { + save_master_pos; + --connection slave1_1 + sync_with_master; + --connection master_1 + --disable_query_log + SET SESSION sql_log_bin= 0; + --enable_query_log + } + --disable_warnings + DROP TABLE IF EXISTS t1, t2; + --enable_warnings + --disable_query_log + echo CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_P_1; + echo CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_P_1; + echo MASTER_1_AUTO_INCREMENT_INCREMENT2; + echo MASTER_1_AUTO_INCREMENT_OFFSET2; + eval CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_P_1; + eval CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_INCREMENT1_P_1; + eval $MASTER_1_AUTO_INCREMENT_INCREMENT2; + eval $MASTER_1_AUTO_INCREMENT_OFFSET2; + if ($USE_REPLICATION) + { + SET SESSION sql_log_bin= 1; + --connection slave1_1 + --disable_warnings + DROP TABLE IF EXISTS t1, t2; + --enable_warnings + echo CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_P_1; + echo CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_P_1; + eval CREATE TABLE t1 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_P_1; + eval CREATE TABLE t2 ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) + ) $SLAVE1_1_ENGINE $SLAVE1_1_CHARSET $SLAVE1_1_COMMENT_INCREMENT1_P_1; + --connection master_1 + } + --enable_query_log + INSERT INTO t1 () VALUES (); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t1; + INSERT INTO t2 () VALUES (); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t2; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET3; + eval $MASTER_1_AUTO_INCREMENT_OFFSET3; + --enable_query_log + INSERT INTO t1 (id) VALUES (null); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t1; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET4; + eval $MASTER_1_AUTO_INCREMENT_OFFSET4; + --enable_query_log + INSERT INTO t2 (id) VALUES (null); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t2; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET3; + eval $MASTER_1_AUTO_INCREMENT_OFFSET3; + --enable_query_log + INSERT INTO t1 () VALUES (),(),(),(); + SELECT LAST_INSERT_ID(); + SELECT id FROM t1 ORDER BY id; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET4; + eval $MASTER_1_AUTO_INCREMENT_OFFSET4; + --enable_query_log + INSERT INTO t2 () VALUES (),(),(),(); + SELECT LAST_INSERT_ID(); + SELECT id FROM t2 ORDER BY id; + TRUNCATE TABLE t1; + TRUNCATE TABLE t2; + INSERT INTO t1 () VALUES (),(),(),(); + SELECT LAST_INSERT_ID(); + SELECT id FROM t1 ORDER BY id; + INSERT INTO t2 () VALUES (),(),(),(); + SELECT LAST_INSERT_ID(); + SELECT id FROM t2 ORDER BY id; + SET INSERT_ID=5000; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET3; + eval $MASTER_1_AUTO_INCREMENT_OFFSET3; + --enable_query_log + INSERT INTO t1 () VALUES (); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t1; + --disable_query_log + echo MASTER_1_AUTO_INCREMENT_OFFSET4; + eval $MASTER_1_AUTO_INCREMENT_OFFSET4; + --enable_query_log + INSERT INTO t2 () VALUES (); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t2; + INSERT INTO t1 (id) VALUES (10000); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t1; + INSERT INTO t2 (id) VALUES (1000); + SELECT LAST_INSERT_ID(); + SELECT MAX(id) FROM t2; + if ($USE_REPLICATION) + { + save_master_pos; + --connection slave1_1 + sync_with_master; + SELECT id FROM t1 ORDER BY id; + --connection master_1 + --disable_query_log + SET SESSION sql_log_bin= 0; + --enable_query_log + } + if ($USE_CHILD_GROUP2) + { + if (!$OUTPUT_CHILD_GROUP2) + { + --disable_query_log + --disable_result_log + } + --connection child2_1 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %'; + } + eval $CHILD2_1_SELECT_INCREMENT_TABLES1; + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_1_AUTO_INCREMENT_INCREMENT1; + echo CHILD2_1_AUTO_INCREMENT_OFFSET1; + } + eval $CHILD2_1_AUTO_INCREMENT_INCREMENT1; + eval $CHILD2_1_AUTO_INCREMENT_OFFSET1; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + --connection child2_2 + if ($USE_GENERAL_LOG) + { + SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %'; + } + eval $CHILD2_2_SELECT_INCREMENT_TABLES1; + if ($OUTPUT_CHILD_GROUP2) + { + --disable_query_log + echo CHILD2_2_AUTO_INCREMENT_INCREMENT1; + echo CHILD2_2_AUTO_INCREMENT_OFFSET1; + } + eval $CHILD2_2_AUTO_INCREMENT_INCREMENT1; + eval $CHILD2_2_AUTO_INCREMENT_OFFSET1; + if ($OUTPUT_CHILD_GROUP2) + { + --enable_query_log + } + if (!$OUTPUT_CHILD_GROUP2) + { + --enable_query_log + --enable_result_log + } + } +} + + +--echo +--echo deinit +--disable_warnings +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; +if ($USE_REPLICATION) +{ + --connection slave1_1 + DROP DATABASE IF EXISTS auto_test_local; +} +if ($USE_CHILD_GROUP2) +{ + --connection child2_1 + DROP DATABASE IF EXISTS auto_test_remote; + --connection child2_2 + DROP DATABASE IF EXISTS auto_test_remote2; +} +--disable_query_log +--disable_result_log +--source slave_test_deinit.inc +--source test_deinit.inc +--enable_result_log +--enable_query_log +--enable_warnings +--echo +--echo end of test diff --git a/storage/spider/spd_db_mysql.cc b/storage/spider/spd_db_mysql.cc index e4d9d150bcd..1b40265e9b6 100644 --- a/storage/spider/spd_db_mysql.cc +++ b/storage/spider/spd_db_mysql.cc @@ -5384,28 +5384,46 @@ void spider_mysql_handler::create_tmp_bka_table_name( int *tmp_table_name_length, int link_idx ) { - uint adjust_length = - mysql_share->db_nm_max_length - - mysql_share->db_names_str[spider->conn_link_idx[link_idx]].length() + - mysql_share->table_nm_max_length - - mysql_share->table_names_str[spider->conn_link_idx[link_idx]].length(), - length; + uint adjust_length, length; DBUG_ENTER("spider_mysql_handler::create_tmp_bka_table_name"); - *tmp_table_name_length = mysql_share->db_nm_max_length + - mysql_share->table_nm_max_length; - memset(tmp_table_name, ' ', adjust_length); - tmp_table_name += adjust_length; - memcpy(tmp_table_name, mysql_share->db_names_str[link_idx].c_ptr(), - mysql_share->db_names_str[link_idx].length()); - tmp_table_name += mysql_share->db_names_str[link_idx].length(); - length = my_sprintf(tmp_table_name, (tmp_table_name, - "%s%s%p%s", SPIDER_SQL_DOT_STR, SPIDER_SQL_TMP_BKA_STR, spider, - SPIDER_SQL_UNDERSCORE_STR)); - *tmp_table_name_length += length; - tmp_table_name += length; - memcpy(tmp_table_name, - mysql_share->table_names_str[spider->conn_link_idx[link_idx]].c_ptr(), - mysql_share->table_names_str[spider->conn_link_idx[link_idx]].length()); + if (spider_param_bka_table_name_type(current_thd, + mysql_share->spider_share-> + bka_table_name_types[spider->conn_link_idx[link_idx]]) == 1) + { + adjust_length = + mysql_share->db_nm_max_length - + mysql_share->db_names_str[spider->conn_link_idx[link_idx]].length() + + mysql_share->table_nm_max_length - + mysql_share->table_names_str[spider->conn_link_idx[link_idx]].length(); + *tmp_table_name_length = mysql_share->db_nm_max_length + + mysql_share->table_nm_max_length; + memset(tmp_table_name, ' ', adjust_length); + tmp_table_name += adjust_length; + memcpy(tmp_table_name, mysql_share->db_names_str[link_idx].c_ptr(), + mysql_share->db_names_str[link_idx].length()); + tmp_table_name += mysql_share->db_names_str[link_idx].length(); + length = my_sprintf(tmp_table_name, (tmp_table_name, + "%s%s%p%s", SPIDER_SQL_DOT_STR, SPIDER_SQL_TMP_BKA_STR, spider, + SPIDER_SQL_UNDERSCORE_STR)); + *tmp_table_name_length += length; + tmp_table_name += length; + memcpy(tmp_table_name, + mysql_share->table_names_str[spider->conn_link_idx[link_idx]].c_ptr(), + mysql_share->table_names_str[spider->conn_link_idx[link_idx]].length()); + } else { + adjust_length = + mysql_share->db_nm_max_length - + mysql_share->db_names_str[spider->conn_link_idx[link_idx]].length(); + *tmp_table_name_length = mysql_share->db_nm_max_length; + memset(tmp_table_name, ' ', adjust_length); + tmp_table_name += adjust_length; + memcpy(tmp_table_name, mysql_share->db_names_str[link_idx].c_ptr(), + mysql_share->db_names_str[link_idx].length()); + tmp_table_name += mysql_share->db_names_str[link_idx].length(); + length = my_sprintf(tmp_table_name, (tmp_table_name, + "%s%s%p", SPIDER_SQL_DOT_STR, SPIDER_SQL_TMP_BKA_STR, spider)); + *tmp_table_name_length += length; + } DBUG_VOID_RETURN; } diff --git a/storage/spider/spd_db_oracle.cc b/storage/spider/spd_db_oracle.cc index d536020e513..d86da799bee 100644 --- a/storage/spider/spd_db_oracle.cc +++ b/storage/spider/spd_db_oracle.cc @@ -5103,28 +5103,46 @@ void spider_oracle_handler::create_tmp_bka_table_name( int *tmp_table_name_length, int link_idx ) { - uint adjust_length = - oracle_share->db_nm_max_length - - oracle_share->db_names_str[spider->conn_link_idx[link_idx]].length() + - oracle_share->table_nm_max_length - - oracle_share->table_names_str[spider->conn_link_idx[link_idx]].length(), - length; + uint adjust_length, length; DBUG_ENTER("spider_oracle_handler::create_tmp_bka_table_name"); - *tmp_table_name_length = oracle_share->db_nm_max_length + - oracle_share->table_nm_max_length; - memset(tmp_table_name, ' ', adjust_length); - tmp_table_name += adjust_length; - memcpy(tmp_table_name, oracle_share->db_names_str[link_idx].c_ptr(), - oracle_share->db_names_str[link_idx].length()); - tmp_table_name += oracle_share->db_names_str[link_idx].length(); - length = my_sprintf(tmp_table_name, (tmp_table_name, - "%s%s%p%s", SPIDER_SQL_DOT_STR, SPIDER_SQL_TMP_BKA_STR, spider, - SPIDER_SQL_UNDERSCORE_STR)); - *tmp_table_name_length += length; - tmp_table_name += length; - memcpy(tmp_table_name, - oracle_share->table_names_str[spider->conn_link_idx[link_idx]].c_ptr(), - oracle_share->table_names_str[spider->conn_link_idx[link_idx]].length()); + if (spider_param_bka_table_name_type(current_thd, + mysql_share->spider_share-> + bka_table_name_types[spider->conn_link_idx[link_idx]]) == 1) + { + adjust_length = + oracle_share->db_nm_max_length - + oracle_share->db_names_str[spider->conn_link_idx[link_idx]].length() + + oracle_share->table_nm_max_length - + oracle_share->table_names_str[spider->conn_link_idx[link_idx]].length(); + *tmp_table_name_length = oracle_share->db_nm_max_length + + oracle_share->table_nm_max_length; + memset(tmp_table_name, ' ', adjust_length); + tmp_table_name += adjust_length; + memcpy(tmp_table_name, oracle_share->db_names_str[link_idx].c_ptr(), + oracle_share->db_names_str[link_idx].length()); + tmp_table_name += oracle_share->db_names_str[link_idx].length(); + length = my_sprintf(tmp_table_name, (tmp_table_name, + "%s%s%p%s", SPIDER_SQL_DOT_STR, SPIDER_SQL_TMP_BKA_STR, spider, + SPIDER_SQL_UNDERSCORE_STR)); + *tmp_table_name_length += length; + tmp_table_name += length; + memcpy(tmp_table_name, + oracle_share->table_names_str[spider->conn_link_idx[link_idx]].c_ptr(), + oracle_share->table_names_str[spider->conn_link_idx[link_idx]].length()); + } else { + adjust_length = + oracle_share->db_nm_max_length - + oracle_share->db_names_str[spider->conn_link_idx[link_idx]].length(); + *tmp_table_name_length = oracle_share->db_nm_max_length; + memset(tmp_table_name, ' ', adjust_length); + tmp_table_name += adjust_length; + memcpy(tmp_table_name, oracle_share->db_names_str[link_idx].c_ptr(), + oracle_share->db_names_str[link_idx].length()); + tmp_table_name += oracle_share->db_names_str[link_idx].length(); + length = my_sprintf(tmp_table_name, (tmp_table_name, + "%s%s%p", SPIDER_SQL_DOT_STR, SPIDER_SQL_TMP_BKA_STR, spider)); + *tmp_table_name_length += length; + } DBUG_VOID_RETURN; } diff --git a/storage/spider/spd_include.h b/storage/spider/spd_include.h index 9c7eebb65c8..9f27bd6acf8 100644 --- a/storage/spider/spd_include.h +++ b/storage/spider/spd_include.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2014 Kentoku Shiba +/* Copyright (C) 2008-2015 Kentoku Shiba This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -13,7 +13,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#define SPIDER_DETAIL_VERSION "3.2.18" +#define SPIDER_DETAIL_VERSION "3.2.21" #define SPIDER_HEX_VERSION 0x0302 #if MYSQL_VERSION_ID < 50500 @@ -141,7 +141,7 @@ #define SPIDER_TMP_SHARE_CHAR_PTR_COUNT 19 #define SPIDER_TMP_SHARE_UINT_COUNT 17 -#define SPIDER_TMP_SHARE_LONG_COUNT 15 +#define SPIDER_TMP_SHARE_LONG_COUNT 16 #define SPIDER_TMP_SHARE_LONGLONG_COUNT 3 #define SPIDER_MEM_CALC_LIST_NUM 247 @@ -864,6 +864,7 @@ typedef struct st_spider_share long *net_read_timeouts; long *net_write_timeouts; long *access_balances; + long *bka_table_name_types; uint *server_names_lengths; uint *tgt_table_names_lengths; @@ -967,6 +968,7 @@ typedef struct st_spider_share uint net_read_timeouts_length; uint net_write_timeouts_length; uint access_balances_length; + uint bka_table_name_types_length; /* for dbton */ uchar dbton_bitmap[spider_bitmap_size(SPIDER_DBTON_SIZE)]; diff --git a/storage/spider/spd_param.cc b/storage/spider/spd_param.cc index 2b1e87313d1..7376bfc0499 100644 --- a/storage/spider/spd_param.cc +++ b/storage/spider/spd_param.cc @@ -2960,6 +2960,32 @@ int spider_param_delete_all_rows_type( delete_all_rows_type : THDVAR(thd, delete_all_rows_type)); } +/* + -1 :use table parameter + 0 :compact + 1 :add original table name + */ +static MYSQL_THDVAR_INT( + bka_table_name_type, /* name */ + PLUGIN_VAR_RQCMDARG, /* opt */ + "The type of temporary table name for bka", /* comment */ + NULL, /* check */ + NULL, /* update */ + -1, /* def */ + -1, /* min */ + 1, /* max */ + 0 /* blk */ +); + +int spider_param_bka_table_name_type( + THD *thd, + int bka_table_name_type +) { + DBUG_ENTER("spider_param_bka_table_name_type"); + DBUG_RETURN(THDVAR(thd, bka_table_name_type) == -1 ? + bka_table_name_type : THDVAR(thd, bka_table_name_type)); +} + static struct st_mysql_storage_engine spider_storage_engine = { MYSQL_HANDLERTON_INTERFACE_VERSION }; @@ -3093,6 +3119,7 @@ static struct st_mysql_sys_var* spider_system_variables[] = { MYSQL_SYSVAR(casual_read), MYSQL_SYSVAR(dry_access), MYSQL_SYSVAR(delete_all_rows_type), + MYSQL_SYSVAR(bka_table_name_type), NULL }; diff --git a/storage/spider/spd_param.h b/storage/spider/spd_param.h index e68143aa774..32db0403159 100644 --- a/storage/spider/spd_param.h +++ b/storage/spider/spd_param.h @@ -383,3 +383,7 @@ int spider_param_delete_all_rows_type( THD *thd, int delete_all_rows_type ); +int spider_param_bka_table_name_type( + THD *thd, + int bka_table_name_type +); diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc index 411c7ae675d..bb3cb139231 100644 --- a/storage/spider/spd_table.cc +++ b/storage/spider/spd_table.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2014 Kentoku Shiba +/* Copyright (C) 2008-2015 Kentoku Shiba This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -773,6 +773,8 @@ int spider_free_share_alloc( spider_free(spider_current_trx, share->net_write_timeouts, MYF(0)); if (share->access_balances) spider_free(spider_current_trx, share->access_balances, MYF(0)); + if (share->bka_table_name_types) + spider_free(spider_current_trx, share->bka_table_name_types, MYF(0)); #ifndef WITHOUT_SPIDER_BG_SEARCH if (share->monitoring_bg_interval) spider_free(spider_current_trx, share->monitoring_bg_interval, MYF(0)); @@ -1989,6 +1991,8 @@ int spider_parse_connect_info( SPIDER_PARAM_STR("bke", bka_engine); SPIDER_PARAM_INT_WITH_MAX("bkm", bka_mode, 0, 2); SPIDER_PARAM_INT("bsz", bulk_size, 0); + SPIDER_PARAM_LONG_LIST_WITH_MAX("btt", bka_table_name_types, + 0, 1); SPIDER_PARAM_INT_WITH_MAX("bum", bulk_update_mode, 0, 2); SPIDER_PARAM_INT("bus", bulk_update_size, 0); #ifndef WITHOUT_SPIDER_BG_SEARCH @@ -2337,6 +2341,8 @@ int spider_parse_connect_info( #if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET) SPIDER_PARAM_LONGLONG("hs_result_free_size", hs_result_free_size, 0); #endif + SPIDER_PARAM_LONG_LIST_WITH_MAX("bka_table_name_type", + bka_table_name_types, 0, 1); error_num = ER_SPIDER_INVALID_CONNECT_INFO_NUM; my_printf_error(error_num, ER_SPIDER_INVALID_CONNECT_INFO_STR, MYF(0), tmp_ptr); @@ -2484,6 +2490,8 @@ int spider_parse_connect_info( share->all_link_count = share->net_write_timeouts_length; if (share->all_link_count < share->access_balances_length) share->all_link_count = share->access_balances_length; + if (share->all_link_count < share->bka_table_name_types_length) + share->all_link_count = share->bka_table_name_types_length; if ((error_num = spider_increase_string_list( &share->server_names, &share->server_names_lengths, @@ -2713,6 +2721,11 @@ int spider_parse_connect_info( &share->access_balances_length, share->all_link_count))) goto error; + if ((error_num = spider_increase_long_list( + &share->bka_table_name_types, + &share->bka_table_name_types_length, + share->all_link_count))) + goto error; /* copy for tables start */ share_alter = &share->alter_table; @@ -3402,6 +3415,8 @@ int spider_set_connect_info_default( share->net_write_timeouts[roop_count] = 600; if (share->access_balances[roop_count] == -1) share->access_balances[roop_count] = 100; + if (share->bka_table_name_types[roop_count] == -1) + share->bka_table_name_types[roop_count] = 0; } #ifndef WITHOUT_SPIDER_BG_SEARCH @@ -7496,6 +7511,7 @@ void spider_set_tmp_share_pointer( tmp_share->net_write_timeouts = &tmp_long[13]; tmp_long[13] = -1; tmp_share->access_balances = &tmp_long[14]; + tmp_share->bka_table_name_types = &tmp_long[15]; tmp_share->monitoring_limit = &tmp_longlong[0]; tmp_share->monitoring_sid = &tmp_longlong[1]; #ifndef WITHOUT_SPIDER_BG_SEARCH @@ -7565,6 +7581,7 @@ void spider_set_tmp_share_pointer( tmp_share->net_read_timeouts_length = 1; tmp_share->net_write_timeouts_length = 1; tmp_share->access_balances_length = 1; + tmp_share->bka_table_name_types_length = 1; #ifndef WITHOUT_SPIDER_BG_SEARCH tmp_share->monitoring_bg_kind[0] = -1; @@ -8132,10 +8149,15 @@ bool spider_check_index_merge( DBUG_PRINT("info",("spider join is null")); DBUG_RETURN(FALSE); } + if (!join->join_tab) + { + DBUG_PRINT("info",("spider join->join_tab is null")); + DBUG_RETURN(FALSE); + } for (roop_count = 0; roop_count < spider_join_table_count(join); ++roop_count) { JOIN_TAB *join_tab = &join->join_tab[roop_count]; - if (join_tab && join_tab->table == table) + if (join_tab->table == table) { DBUG_PRINT("info",("spider join_tab->type=%u", join_tab->type)); if ( |