summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/handler/ha_innodb.cc59
-rw-r--r--storage/innobase/handler/i_s.cc436
-rw-r--r--storage/innobase/ibuf/ibuf0ibuf.cc42
-rw-r--r--storage/innobase/include/srv0mon.h13
-rw-r--r--storage/innobase/include/srv0srv.h47
-rw-r--r--storage/innobase/include/univ.i19
-rw-r--r--storage/innobase/log/log0log.cc22
-rw-r--r--storage/innobase/row/row0mysql.cc22
-rw-r--r--storage/innobase/row/row0sel.cc14
-rw-r--r--storage/innobase/srv/srv0mon.cc106
-rw-r--r--storage/innobase/srv/srv0srv.cc169
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/create_table_TODO_SPLIT_ME.result2
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_TODO_SPLIT_ME.result2
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/r/insert_on_duplicate_key_update_multiple_column_primary_key_myisam.result2
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/r/insert_on_duplicate_key_update_multiple_column_unique_index_myisam.result2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/innodb_i_s_tables_disabled.result10
-rw-r--r--storage/spider/ha_spider.cc698
-rw-r--r--storage/spider/ha_spider.h30
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/index.result9
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/index.test3
-rw-r--r--storage/spider/mysql-test/spider/handler/include/deinit_child2_1.inc0
-rw-r--r--storage/spider/mysql-test/spider/handler/include/deinit_child2_2.inc0
-rw-r--r--storage/spider/mysql-test/spider/handler/include/deinit_child2_3.inc0
-rw-r--r--storage/spider/mysql-test/spider/handler/include/deinit_child3_1.inc0
-rw-r--r--storage/spider/mysql-test/spider/handler/include/deinit_child3_2.inc0
-rw-r--r--storage/spider/mysql-test/spider/handler/include/deinit_child3_3.inc0
-rw-r--r--storage/spider/mysql-test/spider/handler/include/deinit_master_1.inc1
-rw-r--r--storage/spider/mysql-test/spider/handler/include/deinit_slave1_1.inc0
-rw-r--r--storage/spider/mysql-test/spider/handler/include/ha_deinit_child2_1.inc0
-rw-r--r--storage/spider/mysql-test/spider/handler/include/ha_deinit_child2_2.inc0
-rw-r--r--storage/spider/mysql-test/spider/handler/include/ha_deinit_child2_3.inc0
-rw-r--r--storage/spider/mysql-test/spider/handler/include/ha_deinit_child3_1.inc1
-rw-r--r--storage/spider/mysql-test/spider/handler/include/ha_deinit_child3_2.inc1
-rw-r--r--storage/spider/mysql-test/spider/handler/include/ha_deinit_child3_3.inc1
-rw-r--r--storage/spider/mysql-test/spider/handler/include/ha_deinit_master_1.inc0
-rw-r--r--storage/spider/mysql-test/spider/handler/include/ha_init_child2_1.inc8
-rw-r--r--storage/spider/mysql-test/spider/handler/include/ha_init_child2_2.inc4
-rw-r--r--storage/spider/mysql-test/spider/handler/include/ha_init_child2_3.inc4
-rw-r--r--storage/spider/mysql-test/spider/handler/include/ha_init_child3_1.inc140
-rw-r--r--storage/spider/mysql-test/spider/handler/include/ha_init_child3_2.inc140
-rw-r--r--storage/spider/mysql-test/spider/handler/include/ha_init_child3_3.inc140
-rw-r--r--storage/spider/mysql-test/spider/handler/include/ha_init_master_1.inc105
-rw-r--r--storage/spider/mysql-test/spider/handler/include/hs_deinit_child2_1.inc0
-rw-r--r--storage/spider/mysql-test/spider/handler/include/hs_deinit_child2_2.inc0
-rw-r--r--storage/spider/mysql-test/spider/handler/include/hs_deinit_child2_3.inc0
-rw-r--r--storage/spider/mysql-test/spider/handler/include/hs_deinit_master_1.inc0
-rw-r--r--storage/spider/mysql-test/spider/handler/include/hs_init_child2_1.inc24
-rw-r--r--storage/spider/mysql-test/spider/handler/include/hs_init_child2_2.inc12
-rw-r--r--storage/spider/mysql-test/spider/handler/include/hs_init_child2_3.inc0
-rw-r--r--storage/spider/mysql-test/spider/handler/include/hs_init_master_1.inc12
-rw-r--r--storage/spider/mysql-test/spider/handler/include/init_child2_1.inc176
-rw-r--r--storage/spider/mysql-test/spider/handler/include/init_child2_2.inc80
-rw-r--r--storage/spider/mysql-test/spider/handler/include/init_child2_3.inc11
-rw-r--r--storage/spider/mysql-test/spider/handler/include/init_child3_1.inc0
-rw-r--r--storage/spider/mysql-test/spider/handler/include/init_child3_2.inc0
-rw-r--r--storage/spider/mysql-test/spider/handler/include/init_child3_3.inc0
-rw-r--r--storage/spider/mysql-test/spider/handler/include/init_master_1.inc186
-rw-r--r--storage/spider/mysql-test/spider/handler/include/init_slave1_1.inc10
-rw-r--r--storage/spider/mysql-test/spider/handler/my.cnf176
-rw-r--r--storage/spider/mysql-test/spider/handler/r/basic_sql.result738
-rw-r--r--storage/spider/mysql-test/spider/handler/r/basic_sql_part.result141
-rw-r--r--storage/spider/mysql-test/spider/handler/r/direct_aggregate.result100
-rw-r--r--storage/spider/mysql-test/spider/handler/r/direct_aggregate_part.result90
-rw-r--r--storage/spider/mysql-test/spider/handler/r/direct_update.result155
-rw-r--r--storage/spider/mysql-test/spider/handler/r/direct_update_part.result145
-rw-r--r--storage/spider/mysql-test/spider/handler/r/function.result160
-rw-r--r--storage/spider/mysql-test/spider/handler/r/ha.result286
-rw-r--r--storage/spider/mysql-test/spider/handler/r/ha_part.result311
-rw-r--r--storage/spider/mysql-test/spider/handler/r/spider3_fixes.result245
-rw-r--r--storage/spider/mysql-test/spider/handler/r/spider3_fixes_part.result243
-rw-r--r--storage/spider/mysql-test/spider/handler/r/spider_fixes.result640
-rw-r--r--storage/spider/mysql-test/spider/handler/r/spider_fixes_part.result246
-rw-r--r--storage/spider/mysql-test/spider/handler/r/vp_fixes.result93
-rw-r--r--storage/spider/mysql-test/spider/handler/suite.opt1
-rw-r--r--storage/spider/mysql-test/spider/handler/suite.pm10
-rw-r--r--storage/spider/mysql-test/spider/handler/t/basic_sql.test2699
-rw-r--r--storage/spider/mysql-test/spider/handler/t/basic_sql_part.test571
-rw-r--r--storage/spider/mysql-test/spider/handler/t/connect_child2_1.inc1
-rw-r--r--storage/spider/mysql-test/spider/handler/t/connect_child2_2.inc1
-rw-r--r--storage/spider/mysql-test/spider/handler/t/connect_child2_3.inc1
-rw-r--r--storage/spider/mysql-test/spider/handler/t/connect_child3_1.inc1
-rw-r--r--storage/spider/mysql-test/spider/handler/t/connect_child3_2.inc1
-rw-r--r--storage/spider/mysql-test/spider/handler/t/connect_child3_3.inc1
-rw-r--r--storage/spider/mysql-test/spider/handler/t/connect_master_1.inc1
-rw-r--r--storage/spider/mysql-test/spider/handler/t/connect_slave1_1.inc1
-rw-r--r--storage/spider/mysql-test/spider/handler/t/direct_aggregate.test179
-rw-r--r--storage/spider/mysql-test/spider/handler/t/direct_aggregate_part.test192
-rw-r--r--storage/spider/mysql-test/spider/handler/t/direct_update.test198
-rw-r--r--storage/spider/mysql-test/spider/handler/t/direct_update_part.test211
-rw-r--r--storage/spider/mysql-test/spider/handler/t/function.test253
-rw-r--r--storage/spider/mysql-test/spider/handler/t/ha.test878
-rw-r--r--storage/spider/mysql-test/spider/handler/t/ha_part.test1017
-rw-r--r--storage/spider/mysql-test/spider/handler/t/ha_test_deinit.inc30
-rw-r--r--storage/spider/mysql-test/spider/handler/t/ha_test_init.inc30
-rw-r--r--storage/spider/mysql-test/spider/handler/t/have_engine.inc7
-rw-r--r--storage/spider/mysql-test/spider/handler/t/have_func.inc5
-rw-r--r--storage/spider/mysql-test/spider/handler/t/have_partition.inc7
-rw-r--r--storage/spider/mysql-test/spider/handler/t/have_trigger.inc2
-rw-r--r--storage/spider/mysql-test/spider/handler/t/hs_test_deinit.inc17
-rw-r--r--storage/spider/mysql-test/spider/handler/t/hs_test_init.inc17
-rw-r--r--storage/spider/mysql-test/spider/handler/t/slave_test_deinit.inc6
-rw-r--r--storage/spider/mysql-test/spider/handler/t/slave_test_init.inc44
-rw-r--r--storage/spider/mysql-test/spider/handler/t/spider3_fixes.test297
-rw-r--r--storage/spider/mysql-test/spider/handler/t/spider3_fixes_part.test350
-rw-r--r--storage/spider/mysql-test/spider/handler/t/spider_fixes.test1433
-rw-r--r--storage/spider/mysql-test/spider/handler/t/spider_fixes_part.test650
-rw-r--r--storage/spider/mysql-test/spider/handler/t/test_deinit.inc37
-rw-r--r--storage/spider/mysql-test/spider/handler/t/test_init.inc74
-rw-r--r--storage/spider/mysql-test/spider/handler/t/vp_fixes.test335
-rw-r--r--storage/spider/mysql-test/spider/r/variable_deprecation.result46
-rw-r--r--storage/spider/mysql-test/spider/t/variable_deprecation.test24
-rw-r--r--storage/spider/spd_conn.cc118
-rw-r--r--storage/spider/spd_conn.h12
-rw-r--r--storage/spider/spd_copy_tables.cc3
-rw-r--r--storage/spider/spd_db_conn.cc1103
-rw-r--r--storage/spider/spd_db_conn.h20
-rw-r--r--storage/spider/spd_db_include.h35
-rw-r--r--storage/spider/spd_db_mysql.cc453
-rw-r--r--storage/spider/spd_db_mysql.h39
-rw-r--r--storage/spider/spd_direct_sql.cc7
-rw-r--r--storage/spider/spd_environ.h3
-rw-r--r--storage/spider/spd_group_by_handler.cc24
-rw-r--r--storage/spider/spd_i_s.cc33
-rw-r--r--storage/spider/spd_include.h8
-rw-r--r--storage/spider/spd_param.cc210
-rw-r--r--storage/spider/spd_param.h27
-rw-r--r--storage/spider/spd_ping_table.cc8
-rw-r--r--storage/spider/spd_table.cc105
-rw-r--r--storage/spider/spd_trx.cc9
129 files changed, 456 insertions, 17921 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 6c75cb86752..e201df1229b 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -201,8 +201,6 @@ static my_bool innobase_create_status_file;
my_bool innobase_stats_on_metadata;
static my_bool innodb_optimize_fulltext_only;
-static char* innodb_version_str = (char*) INNODB_VERSION_STR;
-
extern uint srv_fil_crypt_rotate_key_age;
extern uint srv_n_fil_crypt_iops;
@@ -899,6 +897,8 @@ static MYSQL_THDVAR_STR(tmpdir,
"Directory for temporary non-tablespace files.",
innodb_tmpdir_validate, NULL, NULL);
+static size_t truncated_status_writes;
+
static SHOW_VAR innodb_status_variables[]= {
#ifdef BTR_CUR_HASH_ADAPT
{"adaptive_hash_hash_searches", &export_vars.innodb_ahi_hit, SHOW_SIZE_T},
@@ -1007,19 +1007,8 @@ static SHOW_VAR innodb_status_variables[]= {
{"row_lock_time_avg", &export_vars.innodb_row_lock_time_avg, SHOW_SIZE_T},
{"row_lock_time_max", &export_vars.innodb_row_lock_time_max, SHOW_SIZE_T},
{"row_lock_waits", &export_vars.innodb_row_lock_waits, SHOW_SIZE_T},
- {"rows_deleted", &export_vars.innodb_rows_deleted, SHOW_SIZE_T},
- {"rows_inserted", &export_vars.innodb_rows_inserted, SHOW_SIZE_T},
- {"rows_read", &export_vars.innodb_rows_read, SHOW_SIZE_T},
- {"rows_updated", &export_vars.innodb_rows_updated, SHOW_SIZE_T},
- {"system_rows_deleted", &export_vars.innodb_system_rows_deleted,SHOW_SIZE_T},
- {"system_rows_inserted", &export_vars.innodb_system_rows_inserted,
- SHOW_SIZE_T},
- {"system_rows_read", &export_vars.innodb_system_rows_read, SHOW_SIZE_T},
- {"system_rows_updated", &export_vars.innodb_system_rows_updated,
- SHOW_SIZE_T},
{"num_open_files", &fil_system.n_open, SHOW_SIZE_T},
- {"truncated_status_writes", &export_vars.innodb_truncated_status_writes,
- SHOW_SIZE_T},
+ {"truncated_status_writes", &truncated_status_writes, SHOW_SIZE_T},
{"available_undo_logs", &srv_available_undo_logs, SHOW_ULONG},
{"undo_truncations", &export_vars.innodb_undo_truncations, SHOW_ULONG},
@@ -1062,13 +1051,6 @@ static SHOW_VAR innodb_status_variables[]= {
{"onlineddl_pct_progress",
&export_vars.innodb_onlineddl_pct_progress, SHOW_SIZE_T},
- /* Times secondary index lookup triggered cluster lookup and
- times prefix optimization avoided triggering cluster lookup */
- {"secondary_index_triggered_cluster_reads",
- &export_vars.innodb_sec_rec_cluster_reads, SHOW_SIZE_T},
- {"secondary_index_triggered_cluster_reads_avoided",
- &export_vars.innodb_sec_rec_cluster_reads_avoided, SHOW_SIZE_T},
-
/* Encryption */
{"encryption_rotation_pages_read_from_cache",
&export_vars.innodb_encryption_rotation_pages_read_from_cache, SHOW_SIZE_T},
@@ -9011,13 +8993,6 @@ ha_innobase::index_read(
case DB_SUCCESS:
error = 0;
table->status = 0;
- if (m_prebuilt->table->is_system_db) {
- srv_stats.n_system_rows_read.add(
- thd_get_thread_id(m_prebuilt->trx->mysql_thd), 1);
- } else {
- srv_stats.n_rows_read.add(
- thd_get_thread_id(m_prebuilt->trx->mysql_thd), 1);
- }
break;
case DB_RECORD_NOT_FOUND:
@@ -9272,13 +9247,6 @@ ha_innobase::general_fetch(
case DB_SUCCESS:
error = 0;
table->status = 0;
- if (m_prebuilt->table->is_system_db) {
- srv_stats.n_system_rows_read.add(
- thd_get_thread_id(trx->mysql_thd), 1);
- } else {
- srv_stats.n_rows_read.add(
- thd_get_thread_id(trx->mysql_thd), 1);
- }
break;
case DB_RECORD_NOT_FOUND:
error = HA_ERR_END_OF_FILE;
@@ -16212,7 +16180,7 @@ innodb_show_status(
if (flen > MAX_STATUS_SIZE) {
usable_len = MAX_STATUS_SIZE;
- srv_truncated_status_writes++;
+ truncated_status_writes++;
} else {
usable_len = flen;
}
@@ -19364,11 +19332,13 @@ static MYSQL_SYSVAR_UINT(spin_wait_delay, srv_spin_wait_delay,
"Maximum delay between polling for a spin lock (4 by default)",
NULL, NULL, 4, 0, 6000, 0);
+static my_bool innodb_prefix_index_cluster_optimization;
+
static MYSQL_SYSVAR_BOOL(prefix_index_cluster_optimization,
- srv_prefix_index_cluster_optimization,
- PLUGIN_VAR_OPCMDARG,
- "Enable prefix optimization to sometimes avoid cluster index lookups.",
- NULL, NULL, FALSE);
+ innodb_prefix_index_cluster_optimization,
+ PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_DEPRECATED,
+ "Deprecated parameter with no effect",
+ nullptr, nullptr, TRUE);
static MYSQL_SYSVAR_STR(data_file_path, innobase_data_file_path,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
@@ -19423,10 +19393,6 @@ static MYSQL_SYSVAR_LONG(autoinc_lock_mode, innobase_autoinc_lock_mode,
AUTOINC_OLD_STYLE_LOCKING, /* Minimum value */
AUTOINC_NO_LOCKING, 0); /* Maximum value */
-static MYSQL_SYSVAR_STR(version, innodb_version_str,
- PLUGIN_VAR_NOCMDOPT | PLUGIN_VAR_READONLY,
- "InnoDB version", NULL, NULL, INNODB_VERSION_STR);
-
#ifdef HAVE_URING
# include <sys/utsname.h>
static utsname uname_for_io_uring;
@@ -19820,7 +19786,6 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(prefix_index_cluster_optimization),
MYSQL_SYSVAR(tmpdir),
MYSQL_SYSVAR(autoinc_lock_mode),
- MYSQL_SYSVAR(version),
MYSQL_SYSVAR(use_native_aio),
#ifdef HAVE_LIBNUMA
MYSQL_SYSVAR(numa_interleave),
@@ -19900,10 +19865,10 @@ maria_declare_plugin(innobase)
PLUGIN_LICENSE_GPL,
innodb_init, /* Plugin Init */
NULL, /* Plugin Deinit */
- INNODB_VERSION_SHORT,
+ MYSQL_VERSION_MAJOR << 8 | MYSQL_VERSION_MINOR,
innodb_status_variables_export,/* status variables */
innobase_system_variables, /* system variables */
- INNODB_VERSION_STR, /* string version */
+ PACKAGE_VERSION,
MariaDB_PLUGIN_MATURITY_STABLE /* maturity */
},
i_s_innodb_trx,
diff --git a/storage/innobase/handler/i_s.cc b/storage/innobase/handler/i_s.cc
index 82b8968876f..663e4ba8887 100644
--- a/storage/innobase/handler/i_s.cc
+++ b/storage/innobase/handler/i_s.cc
@@ -534,6 +534,9 @@ static struct st_mysql_information_schema i_s_info =
MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION
};
+/** version number reported by SHOW PLUGINS */
+constexpr unsigned i_s_version= MYSQL_VERSION_MAJOR << 8 | MYSQL_VERSION_MINOR;
+
struct st_maria_plugin i_s_innodb_trx =
{
/* the plugin type (a MYSQL_XXX_PLUGIN value) */
@@ -568,19 +571,8 @@ struct st_maria_plugin i_s_innodb_trx =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
static const LEX_CSTRING lock_mode_values[] =
@@ -792,19 +784,8 @@ struct st_maria_plugin i_s_innodb_locks =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
@@ -955,19 +936,8 @@ struct st_maria_plugin i_s_innodb_lock_waits =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
namespace Show {
@@ -1144,19 +1114,8 @@ struct st_maria_plugin i_s_innodb_cmp =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
struct st_maria_plugin i_s_innodb_cmp_reset =
@@ -1194,19 +1153,8 @@ struct st_maria_plugin i_s_innodb_cmp_reset =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
@@ -1449,19 +1397,8 @@ struct st_maria_plugin i_s_innodb_cmp_per_index =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
struct st_maria_plugin i_s_innodb_cmp_per_index_reset =
@@ -1499,19 +1436,8 @@ struct st_maria_plugin i_s_innodb_cmp_per_index_reset =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
@@ -1694,19 +1620,8 @@ struct st_maria_plugin i_s_innodb_cmpmem =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
struct st_maria_plugin i_s_innodb_cmpmem_reset =
@@ -1744,19 +1659,8 @@ struct st_maria_plugin i_s_innodb_cmpmem_reset =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
@@ -2176,19 +2080,8 @@ struct st_maria_plugin i_s_innodb_metrics =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
namespace Show {
@@ -2285,19 +2178,8 @@ struct st_maria_plugin i_s_innodb_ft_default_stopword =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
namespace Show {
@@ -2454,19 +2336,8 @@ struct st_maria_plugin i_s_innodb_ft_deleted =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
/*******************************************************************//**
@@ -2537,19 +2408,8 @@ struct st_maria_plugin i_s_innodb_ft_being_deleted =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
@@ -2800,19 +2660,8 @@ struct st_maria_plugin i_s_innodb_ft_index_cache =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
/*******************************************************************//**
@@ -3230,19 +3079,8 @@ struct st_maria_plugin i_s_innodb_ft_index_table =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
@@ -3423,19 +3261,8 @@ struct st_maria_plugin i_s_innodb_ft_config =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
namespace Show {
@@ -3723,19 +3550,8 @@ struct st_maria_plugin i_s_innodb_buffer_stats =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
/** These must correspond to the first values of buf_page_state */
@@ -4259,19 +4075,8 @@ struct st_maria_plugin i_s_innodb_buffer_page =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
namespace Show {
@@ -4612,19 +4417,8 @@ struct st_maria_plugin i_s_innodb_buffer_page_lru =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
/*******************************************************************//**
@@ -4900,19 +4694,8 @@ struct st_maria_plugin i_s_innodb_sys_tables =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
namespace Show {
@@ -5127,19 +4910,8 @@ struct st_maria_plugin i_s_innodb_sys_tablestats =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
namespace Show {
@@ -5366,19 +5138,8 @@ struct st_maria_plugin i_s_innodb_sys_indexes =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
namespace Show {
@@ -5579,19 +5340,8 @@ struct st_maria_plugin i_s_innodb_sys_columns =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
namespace Show {
@@ -5766,19 +5516,8 @@ struct st_maria_plugin i_s_innodb_sys_virtual =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
@@ -5961,19 +5700,8 @@ struct st_maria_plugin i_s_innodb_sys_fields =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
namespace Show {
@@ -6157,19 +5885,8 @@ struct st_maria_plugin i_s_innodb_sys_foreign =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
namespace Show {
@@ -6353,19 +6070,8 @@ struct st_maria_plugin i_s_innodb_sys_foreign_cols =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
namespace Show {
@@ -6561,19 +6267,8 @@ struct st_maria_plugin i_s_innodb_sys_tablespaces =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
- MariaDB_PLUGIN_MATURITY_STABLE,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
+ MariaDB_PLUGIN_MATURITY_STABLE
};
namespace Show {
@@ -6788,17 +6483,6 @@ struct st_maria_plugin i_s_innodb_tablespaces_encryption =
/* int (*)(void*); */
i_s_common_deinit,
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- INNODB_VERSION_SHORT,
-
- /* struct st_mysql_show_var* */
- NULL,
-
- /* struct st_mysql_sys_var** */
- NULL,
-
- /* Maria extension */
- INNODB_VERSION_STR,
+ i_s_version, nullptr, nullptr, PACKAGE_VERSION,
MariaDB_PLUGIN_MATURITY_STABLE
};
diff --git a/storage/innobase/ibuf/ibuf0ibuf.cc b/storage/innobase/ibuf/ibuf0ibuf.cc
index 7a80d3470d4..fc4284778d6 100644
--- a/storage/innobase/ibuf/ibuf0ibuf.cc
+++ b/storage/innobase/ibuf/ibuf0ibuf.cc
@@ -1207,6 +1207,7 @@ static
void
ibuf_print_ops(
/*===========*/
+ const char* op_name,/*!< in: operation name */
const Atomic_counter<ulint>* ops, /*!< in: operation counts */
FILE* file) /*!< in: file where to print */
{
@@ -1215,11 +1216,11 @@ ibuf_print_ops(
"delete mark",
"delete"
};
- ulint i;
- ut_a(UT_ARR_SIZE(op_names) == IBUF_OP_COUNT);
+ static_assert(array_elements(op_names) == IBUF_OP_COUNT, "");
+ fputs(op_name, file);
- for (i = 0; i < IBUF_OP_COUNT; i++) {
+ for (ulint i = 0; i < IBUF_OP_COUNT; i++) {
fprintf(file, "%s " ULINTPF "%s", op_names[i],
ulint{ops[i]}, (i < (IBUF_OP_COUNT - 1)) ? ", " : "");
}
@@ -4569,23 +4570,28 @@ ibuf_print(
/*=======*/
FILE* file) /*!< in: file where to print */
{
- mysql_mutex_lock(&ibuf_mutex);
-
- fprintf(file,
- "Ibuf: size " ULINTPF ", free list len " ULINTPF ","
- " seg size " ULINTPF ", " ULINTPF " merges\n",
- ibuf.size,
- ibuf.free_list_len,
- ibuf.seg_size,
- ulint{ibuf.n_merges});
-
- fputs("merged operations:\n ", file);
- ibuf_print_ops(ibuf.n_merged_ops, file);
- fputs("discarded operations:\n ", file);
- ibuf_print_ops(ibuf.n_discarded_ops, file);
+ mysql_mutex_lock(&ibuf_mutex);
+ if (ibuf.empty)
+ {
+ mysql_mutex_unlock(&ibuf_mutex);
+ return;
+ }
- mysql_mutex_unlock(&ibuf_mutex);
+ const ulint size= ibuf.size;
+ const ulint free_list_len= ibuf.free_list_len;
+ const ulint seg_size= ibuf.seg_size;
+ mysql_mutex_unlock(&ibuf_mutex);
+
+ fprintf(file,
+ "-------------\n"
+ "INSERT BUFFER\n"
+ "-------------\n"
+ "size " ULINTPF ", free list len " ULINTPF ","
+ " seg size " ULINTPF ", " ULINTPF " merges\n",
+ size, free_list_len, seg_size, ulint{ibuf.n_merges});
+ ibuf_print_ops("merged operations:\n", ibuf.n_merged_ops, file);
+ ibuf_print_ops("discarded operations:\n", ibuf.n_discarded_ops, file);
}
/** Check the insert buffer bitmaps on IMPORT TABLESPACE.
diff --git a/storage/innobase/include/srv0mon.h b/storage/innobase/include/srv0mon.h
index 1ca2d7a429f..51f3049b81a 100644
--- a/storage/innobase/include/srv0mon.h
+++ b/storage/innobase/include/srv0mon.h
@@ -175,8 +175,6 @@ enum monitor_id_t {
MONITOR_OVLD_PAGE_CREATED,
MONITOR_OVLD_PAGES_WRITTEN,
MONITOR_OVLD_PAGES_READ,
- MONITOR_OVLD_INDEX_SEC_REC_CLUSTER_READS,
- MONITOR_OVLD_INDEX_SEC_REC_CLUSTER_READS_AVOIDED,
MONITOR_OVLD_BYTE_READ,
MONITOR_OVLD_BYTE_WRITTEN,
MONITOR_FLUSH_BATCH_SCANNED,
@@ -374,17 +372,6 @@ enum monitor_id_t {
MONITOR_OVLD_SRV_DBLWR_PAGES_WRITTEN,
MONITOR_OVLD_SRV_PAGE_SIZE,
- /* Data DML related counters */
- MONITOR_MODULE_DML_STATS,
- MONITOR_OLVD_ROW_READ,
- MONITOR_OLVD_ROW_INSERTED,
- MONITOR_OLVD_ROW_DELETED,
- MONITOR_OLVD_ROW_UPDTATED,
- MONITOR_OLVD_SYSTEM_ROW_READ,
- MONITOR_OLVD_SYSTEM_ROW_INSERTED,
- MONITOR_OLVD_SYSTEM_ROW_DELETED,
- MONITOR_OLVD_SYSTEM_ROW_UPDATED,
-
/* Data DDL related counters */
MONITOR_MODULE_DDL_STATS,
MONITOR_BACKGROUND_DROP_INDEX,
diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
index 41f61567b53..cc78696ee77 100644
--- a/storage/innobase/include/srv0srv.h
+++ b/storage/innobase/include/srv0srv.h
@@ -116,36 +116,6 @@ struct srv_stats_t
/** Number of data read in total (in bytes) */
ulint_ctr_1_t data_read;
- /** Number of rows read. */
- ulint_ctr_n_t n_rows_read;
-
- /** Number of rows updated */
- ulint_ctr_n_t n_rows_updated;
-
- /** Number of rows deleted */
- ulint_ctr_n_t n_rows_deleted;
-
- /** Number of rows inserted */
- ulint_ctr_n_t n_rows_inserted;
-
- /** Number of system rows read. */
- ulint_ctr_n_t n_system_rows_read;
-
- /** Number of system rows updated */
- ulint_ctr_n_t n_system_rows_updated;
-
- /** Number of system rows deleted */
- ulint_ctr_n_t n_system_rows_deleted;
-
- /** Number of system rows inserted */
- ulint_ctr_n_t n_system_rows_inserted;
-
- /** Number of times secondary index lookup triggered cluster lookup */
- ulint_ctr_n_t n_sec_rec_cluster_reads;
-
- /** Number of times prefix optimization avoided triggering cluster lookup */
- ulint_ctr_n_t n_sec_rec_cluster_reads_avoided;
-
/** Number of encryption_get_latest_key_version calls */
ulint_ctr_n_t n_key_requests;
@@ -251,10 +221,6 @@ extern ulong srv_purge_rseg_truncate_frequency;
/** Enable or Disable Truncate of UNDO tablespace. */
extern my_bool srv_undo_log_truncate;
-/* Optimize prefix index queries to skip cluster index lookup when possible */
-/* Enables or disables this prefix optimization. Disabled by default. */
-extern my_bool srv_prefix_index_cluster_optimization;
-
/** Default size of UNDO tablespace (10MiB for innodb_page_size=16k) */
constexpr ulint SRV_UNDO_TABLESPACE_SIZE_IN_PAGES= (10U << 20) /
UNIV_PAGE_SIZE_DEF;
@@ -399,7 +365,6 @@ extern bool srv_monitor_active;
extern ulong srv_n_spin_wait_rounds;
extern uint srv_spin_wait_delay;
-extern ulint srv_truncated_status_writes;
/** Number of initialized rollback segments for persistent undo log */
extern ulong srv_available_undo_logs;
/** Iterations of the loop bounded by 'srv_active' label. */
@@ -701,15 +666,6 @@ struct export_var_t{
/ srv_n_lock_wait_count */
ulint innodb_row_lock_time_max; /*!< srv_n_lock_max_wait_time
/ 1000 */
- ulint innodb_rows_read; /*!< srv_n_rows_read */
- ulint innodb_rows_inserted; /*!< srv_n_rows_inserted */
- ulint innodb_rows_updated; /*!< srv_n_rows_updated */
- ulint innodb_rows_deleted; /*!< srv_n_rows_deleted */
- ulint innodb_system_rows_read; /*!< srv_n_system_rows_read */
- ulint innodb_system_rows_inserted; /*!< srv_n_system_rows_inserted */
- ulint innodb_system_rows_updated; /*!< srv_n_system_rows_updated */
- ulint innodb_system_rows_deleted; /*!< srv_n_system_rows_deleted*/
- ulint innodb_truncated_status_writes; /*!< srv_truncated_status_writes */
/** Number of undo tablespace truncation operations */
ulong innodb_undo_truncations;
@@ -761,9 +717,6 @@ struct export_var_t{
/* Number of temporary tablespace pages decrypted */
ib_int64_t innodb_n_temp_blocks_decrypted;
- ulint innodb_sec_rec_cluster_reads; /*!< srv_sec_rec_cluster_reads */
- ulint innodb_sec_rec_cluster_reads_avoided;/*!< srv_sec_rec_cluster_reads_avoided */
-
ulint innodb_encryption_rotation_pages_read_from_cache;
ulint innodb_encryption_rotation_pages_read_from_disk;
ulint innodb_encryption_rotation_pages_modified;
diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i
index 5ab4ca0f0a3..373c97e5078 100644
--- a/storage/innobase/include/univ.i
+++ b/storage/innobase/include/univ.i
@@ -33,25 +33,6 @@ Created 1/20/1994 Heikki Tuuri
#pragma once
-/* aux macros to convert M into "123" (string) if M is defined like
-#define M 123 */
-#define _IB_TO_STR(s) #s
-#define IB_TO_STR(s) _IB_TO_STR(s)
-
-/* The following is the InnoDB version as shown in
-SELECT plugin_version FROM information_schema.plugins;
-calculated in make_version_string() in sql/sql_show.cc like this:
-"version >> 8" . "version & 0xff"
-because the version is shown with only one dot, we skip the last
-component, i.e. we show M.N.P as M.N */
-#define INNODB_VERSION_SHORT \
- (MYSQL_VERSION_MAJOR << 8 | MYSQL_VERSION_MINOR)
-
-#define INNODB_VERSION_STR \
- IB_TO_STR(MYSQL_VERSION_MAJOR) "." \
- IB_TO_STR(MYSQL_VERSION_MINOR) "." \
- IB_TO_STR(MYSQL_VERSION_PATCH)
-
/** How far ahead should we tell the service manager the timeout
(time in seconds) */
#define INNODB_EXTEND_TIMEOUT_INTERVAL 30
diff --git a/storage/innobase/log/log0log.cc b/storage/innobase/log/log0log.cc
index 4a92b7ee102..bed39837a0f 100644
--- a/storage/innobase/log/log0log.cc
+++ b/storage/innobase/log/log0log.cc
@@ -255,16 +255,18 @@ void log_t::header_write(byte *buf, lsn_t lsn, bool encrypted)
mach_write_to_4(my_assume_aligned<4>(buf) + LOG_HEADER_FORMAT,
log_sys.FORMAT_10_8);
mach_write_to_8(my_assume_aligned<8>(buf + LOG_HEADER_START_LSN), lsn);
- static constexpr const char LOG_HEADER_CREATOR_CURRENT[]=
- "MariaDB "
- IB_TO_STR(MYSQL_VERSION_MAJOR) "."
- IB_TO_STR(MYSQL_VERSION_MINOR) "."
- IB_TO_STR(MYSQL_VERSION_PATCH);
-
- strcpy(reinterpret_cast<char*>(buf) + LOG_HEADER_CREATOR,
- LOG_HEADER_CREATOR_CURRENT);
- static_assert(LOG_HEADER_CREATOR_END - LOG_HEADER_CREATOR >=
- sizeof LOG_HEADER_CREATOR_CURRENT, "compatibility");
+
+#if defined __GNUC__ && __GNUC__ > 7
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wstringop-truncation"
+#endif
+ strncpy(reinterpret_cast<char*>(buf) + LOG_HEADER_CREATOR,
+ "MariaDB " PACKAGE_VERSION,
+ LOG_HEADER_CREATOR_END - LOG_HEADER_CREATOR);
+#if defined __GNUC__ && __GNUC__ > 7
+# pragma GCC diagnostic pop
+#endif
+
if (encrypted)
log_crypt_write_header(buf + LOG_HEADER_CREATOR_END);
mach_write_to_4(my_assume_aligned<4>(508 + buf), my_crc32c(0, buf, 508));
diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc
index de469c5b088..db302426605 100644
--- a/storage/innobase/row/row0mysql.cc
+++ b/storage/innobase/row/row0mysql.cc
@@ -1383,12 +1383,6 @@ error_exit:
}
}
- if (table->is_system_db) {
- srv_stats.n_system_rows_inserted.inc(size_t(trx->id));
- } else {
- srv_stats.n_rows_inserted.inc(size_t(trx->id));
- }
-
/* Not protected by dict_sys.latch or table->stats_mutex_lock()
for performance
reasons, we would rather get garbage in stat_n_rows (which is
@@ -1734,20 +1728,8 @@ row_update_for_mysql(row_prebuilt_t* prebuilt)
with a latch. */
dict_table_n_rows_dec(prebuilt->table);
- if (table->is_system_db) {
- srv_stats.n_system_rows_deleted.inc(size_t(trx->id));
- } else {
- srv_stats.n_rows_deleted.inc(size_t(trx->id));
- }
-
update_statistics = !srv_stats_include_delete_marked;
} else {
- if (table->is_system_db) {
- srv_stats.n_system_rows_updated.inc(size_t(trx->id));
- } else {
- srv_stats.n_rows_updated.inc(size_t(trx->id));
- }
-
update_statistics
= !(node->cmpl_info & UPD_NODE_NO_ORD_CHANGE);
}
@@ -1960,8 +1942,6 @@ static dberr_t row_update_vers_insert(que_thr_t* thr, upd_node_t* node)
goto exit;
case DB_SUCCESS:
- srv_stats.n_rows_inserted.inc(
- static_cast<size_t>(trx->id));
dict_stats_update_if_needed(table, *trx);
goto exit;
}
@@ -2045,11 +2025,9 @@ row_update_cascade_for_mysql(
dict_table_n_rows_dec(node->table);
stats = !srv_stats_include_delete_marked;
- srv_stats.n_rows_deleted.inc(size_t(trx->id));
} else {
stats = !(node->cmpl_info
& UPD_NODE_NO_ORD_CHANGE);
- srv_stats.n_rows_updated.inc(size_t(trx->id));
}
if (stats) {
diff --git a/storage/innobase/row/row0sel.cc b/storage/innobase/row/row0sel.cc
index cf1aaedf240..aa0beb8f00b 100644
--- a/storage/innobase/row/row0sel.cc
+++ b/storage/innobase/row/row0sel.cc
@@ -3373,9 +3373,6 @@ Row_sel_get_clust_rec_for_mysql::operator()(
*out_rec = NULL;
trx = thr_get_trx(thr);
- srv_stats.n_sec_rec_cluster_reads.inc(
- thd_get_thread_id(trx->mysql_thd));
-
row_build_row_ref_in_tuple(prebuilt->clust_ref, rec,
sec_index, *offsets);
@@ -4238,11 +4235,11 @@ bool row_search_with_covering_prefix(
const dict_index_t* index = prebuilt->index;
ut_ad(!dict_index_is_clust(index));
- if (dict_index_is_spatial(index)) {
- return false;
- }
-
- if (!srv_prefix_index_cluster_optimization) {
+ /* In ha_innobase::build_template() we choose to access the
+ whole row when using exclusive row locks or In case of fts
+ query, we need to read from clustered index */
+ if (prebuilt->select_lock_type == LOCK_X || prebuilt->in_fts_query
+ || !index->is_btree()) {
return false;
}
@@ -4309,7 +4306,6 @@ bool row_search_with_covering_prefix(
ut_a(templ->rec_field_no != ULINT_UNDEFINED);
}
- srv_stats.n_sec_rec_cluster_reads_avoided.inc();
return true;
}
diff --git a/storage/innobase/srv/srv0mon.cc b/storage/innobase/srv/srv0mon.cc
index 581fd199195..f362708093a 100644
--- a/storage/innobase/srv/srv0mon.cc
+++ b/storage/innobase/srv/srv0mon.cc
@@ -278,18 +278,6 @@ static monitor_info_t innodb_counter_info[] =
MONITOR_EXISTING | MONITOR_DEFAULT_ON),
MONITOR_DEFAULT_START, MONITOR_OVLD_PAGES_READ},
- {"buffer_index_sec_rec_cluster_reads", "buffer",
- "Number of secondary record reads triggered cluster read",
- static_cast<monitor_type_t>(
- MONITOR_EXISTING | MONITOR_DEFAULT_ON),
- MONITOR_DEFAULT_START, MONITOR_OVLD_INDEX_SEC_REC_CLUSTER_READS},
-
- {"buffer_index_sec_rec_cluster_reads_avoided", "buffer",
- "Number of secondary record reads avoided triggering cluster read",
- static_cast<monitor_type_t>(
- MONITOR_EXISTING | MONITOR_DEFAULT_ON),
- MONITOR_DEFAULT_START, MONITOR_OVLD_INDEX_SEC_REC_CLUSTER_READS_AVOIDED},
-
{"buffer_data_reads", "buffer",
"Amount of data read in bytes (innodb_data_reads)",
static_cast<monitor_type_t>(
@@ -1078,50 +1066,6 @@ static monitor_info_t innodb_counter_info[] =
MONITOR_EXISTING | MONITOR_DEFAULT_ON | MONITOR_DISPLAY_CURRENT),
MONITOR_DEFAULT_START, MONITOR_OVLD_SRV_PAGE_SIZE},
- /* ========== Counters for DML operations ========== */
- {"module_dml", "dml", "Statistics for DMLs",
- MONITOR_MODULE,
- MONITOR_DEFAULT_START, MONITOR_MODULE_DML_STATS},
-
- {"dml_reads", "dml", "Number of rows read",
- static_cast<monitor_type_t>(MONITOR_EXISTING),
- MONITOR_DEFAULT_START, MONITOR_OLVD_ROW_READ},
-
- {"dml_inserts", "dml", "Number of rows inserted",
- static_cast<monitor_type_t>(
- MONITOR_EXISTING | MONITOR_DEFAULT_ON),
- MONITOR_DEFAULT_START, MONITOR_OLVD_ROW_INSERTED},
-
- {"dml_deletes", "dml", "Number of rows deleted",
- static_cast<monitor_type_t>(
- MONITOR_EXISTING | MONITOR_DEFAULT_ON),
- MONITOR_DEFAULT_START, MONITOR_OLVD_ROW_DELETED},
-
- {"dml_updates", "dml", "Number of rows updated",
- static_cast<monitor_type_t>(
- MONITOR_EXISTING | MONITOR_DEFAULT_ON),
- MONITOR_DEFAULT_START, MONITOR_OLVD_ROW_UPDTATED},
-
- {"dml_system_reads", "dml", "Number of system rows read",
- static_cast<monitor_type_t>(
- MONITOR_EXISTING | MONITOR_DEFAULT_ON),
- MONITOR_DEFAULT_START, MONITOR_OLVD_SYSTEM_ROW_READ},
-
- {"dml_system_inserts", "dml", "Number of system rows inserted",
- static_cast<monitor_type_t>(
- MONITOR_EXISTING | MONITOR_DEFAULT_ON),
- MONITOR_DEFAULT_START, MONITOR_OLVD_SYSTEM_ROW_INSERTED},
-
- {"dml_system_deletes", "dml", "Number of system rows deleted",
- static_cast<monitor_type_t>(
- MONITOR_EXISTING | MONITOR_DEFAULT_ON),
- MONITOR_DEFAULT_START, MONITOR_OLVD_SYSTEM_ROW_DELETED},
-
- {"dml_system_updates", "dml", "Number of system rows updated",
- static_cast<monitor_type_t>(
- MONITOR_EXISTING | MONITOR_DEFAULT_ON),
- MONITOR_DEFAULT_START, MONITOR_OLVD_SYSTEM_ROW_UPDATED},
-
/* ========== Counters for DDL operations ========== */
{"module_ddl", "ddl", "Statistics for DDLs",
MONITOR_MODULE,
@@ -1469,16 +1413,6 @@ srv_mon_process_existing_counter(
value = buf_pool.stat.n_pages_read;
break;
- /* Number of times secondary index lookup triggered cluster lookup */
- case MONITOR_OVLD_INDEX_SEC_REC_CLUSTER_READS:
- value = srv_stats.n_sec_rec_cluster_reads;
- break;
- /* Number of times prefix optimization avoided triggering cluster
- lookup */
- case MONITOR_OVLD_INDEX_SEC_REC_CLUSTER_READS_AVOIDED:
- value = srv_stats.n_sec_rec_cluster_reads_avoided;
- break;
-
/* innodb_data_reads, the total number of data reads */
case MONITOR_OVLD_BYTE_READ:
value = srv_stats.data_read;
@@ -1547,46 +1481,6 @@ srv_mon_process_existing_counter(
value = srv_buf_pool_size;
break;
- /* innodb_rows_read */
- case MONITOR_OLVD_ROW_READ:
- value = srv_stats.n_rows_read;
- break;
-
- /* innodb_rows_inserted */
- case MONITOR_OLVD_ROW_INSERTED:
- value = srv_stats.n_rows_inserted;
- break;
-
- /* innodb_rows_deleted */
- case MONITOR_OLVD_ROW_DELETED:
- value = srv_stats.n_rows_deleted;
- break;
-
- /* innodb_rows_updated */
- case MONITOR_OLVD_ROW_UPDTATED:
- value = srv_stats.n_rows_updated;
- break;
-
- /* innodb_system_rows_read */
- case MONITOR_OLVD_SYSTEM_ROW_READ:
- value = srv_stats.n_system_rows_read;
- break;
-
- /* innodb_system_rows_inserted */
- case MONITOR_OLVD_SYSTEM_ROW_INSERTED:
- value = srv_stats.n_system_rows_inserted;
- break;
-
- /* innodb_system_rows_deleted */
- case MONITOR_OLVD_SYSTEM_ROW_DELETED:
- value = srv_stats.n_system_rows_deleted;
- break;
-
- /* innodb_system_rows_updated */
- case MONITOR_OLVD_SYSTEM_ROW_UPDATED:
- value = srv_stats.n_system_rows_updated;
- break;
-
/* innodb_row_lock_current_waits */
case MONITOR_OVLD_ROW_LOCK_CURRENT_WAIT:
// dirty read without lock_sys.wait_mutex
diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc
index 827c02592f2..56a52c02f4b 100644
--- a/storage/innobase/srv/srv0srv.cc
+++ b/storage/innobase/srv/srv0srv.cc
@@ -291,10 +291,6 @@ uint srv_fast_shutdown;
/** copy of innodb_status_file; generate a innodb_status.<pid> file */
ibool srv_innodb_status;
-/** innodb_prefix_index_cluster_optimization; whether to optimize
-prefix index queries to skip cluster index lookup when possible */
-my_bool srv_prefix_index_cluster_optimization;
-
/** innodb_stats_transient_sample_pages;
When estimating number of different key values in an index, sample
this many index pages, there are 2 ways to calculate statistics:
@@ -327,16 +323,6 @@ ulong srv_n_spin_wait_rounds;
/** innodb_spin_wait_delay */
uint srv_spin_wait_delay;
-static ulint srv_n_rows_inserted_old;
-static ulint srv_n_rows_updated_old;
-static ulint srv_n_rows_deleted_old;
-static ulint srv_n_rows_read_old;
-static ulint srv_n_system_rows_inserted_old;
-static ulint srv_n_system_rows_updated_old;
-static ulint srv_n_system_rows_deleted_old;
-static ulint srv_n_system_rows_read_old;
-
-ulint srv_truncated_status_writes;
/** Number of initialized rollback segments for persistent undo log */
ulong srv_available_undo_logs;
@@ -392,9 +378,6 @@ mysql_mutex_t srv_misc_tmpfile_mutex;
/** Temporary file for miscellanous diagnostic output */
FILE* srv_misc_tmpfile;
-static ulint srv_main_thread_process_no;
-static ulint srv_main_thread_id;
-
/* The following counts are used by the srv_master_callback. */
/** Iterations of the loop bounded by 'srv_active' label. */
@@ -695,7 +678,7 @@ static void srv_refresh_innodb_monitor_stats(time_t current_time)
mysql_mutex_lock(&srv_innodb_monitor_mutex);
if (difftime(current_time, srv_last_monitor_time) < 60) {
- /* We referesh InnoDB Monitor values so that averages are
+ /* We refresh InnoDB Monitor values so that averages are
printed from at most 60 last seconds */
mysql_mutex_unlock(&srv_innodb_monitor_mutex);
return;
@@ -712,16 +695,6 @@ static void srv_refresh_innodb_monitor_stats(time_t current_time)
buf_refresh_io_stats();
- srv_n_rows_inserted_old = srv_stats.n_rows_inserted;
- srv_n_rows_updated_old = srv_stats.n_rows_updated;
- srv_n_rows_deleted_old = srv_stats.n_rows_deleted;
- srv_n_rows_read_old = srv_stats.n_rows_read;
-
- srv_n_system_rows_inserted_old = srv_stats.n_system_rows_inserted;
- srv_n_system_rows_updated_old = srv_stats.n_system_rows_updated;
- srv_n_system_rows_deleted_old = srv_stats.n_system_rows_deleted;
- srv_n_system_rows_read_old = srv_stats.n_system_rows_read;
-
mysql_mutex_unlock(&srv_innodb_monitor_mutex);
}
@@ -828,34 +801,36 @@ srv_printf_innodb_monitor(
"--------\n", file);
os_aio_print(file);
- fputs("-------------------------------------\n"
- "INSERT BUFFER AND ADAPTIVE HASH INDEX\n"
- "-------------------------------------\n", file);
ibuf_print(file);
#ifdef BTR_CUR_HASH_ADAPT
- for (ulint i = 0; i < btr_ahi_parts && btr_search_enabled; ++i) {
- const auto part= &btr_search_sys.parts[i];
- part->latch.rd_lock(SRW_LOCK_CALL);
- ut_ad(part->heap->type == MEM_HEAP_FOR_BTR_SEARCH);
- fprintf(file, "Hash table size " ULINTPF
- ", node heap has " ULINTPF " buffer(s)\n",
- part->table.n_cells,
- part->heap->base.count - !part->heap->free_block);
- part->latch.rd_unlock();
- }
+ if (btr_search_enabled) {
+ fputs("-------------------\n"
+ "ADAPTIVE HASH INDEX\n"
+ "-------------------\n", file);
+ for (ulint i = 0; i < btr_ahi_parts; ++i) {
+ const auto part= &btr_search_sys.parts[i];
+ part->latch.rd_lock(SRW_LOCK_CALL);
+ ut_ad(part->heap->type == MEM_HEAP_FOR_BTR_SEARCH);
+ fprintf(file, "Hash table size " ULINTPF
+ ", node heap has " ULINTPF " buffer(s)\n",
+ part->table.n_cells,
+ part->heap->base.count
+ - !part->heap->free_block);
+ part->latch.rd_unlock();
+ }
- /* btr_cur_n_sea_old and btr_cur_n_non_sea_old are protected by
- srv_innodb_monitor_mutex (srv_refresh_innodb_monitor_stats) */
- const ulint with_ahi = btr_cur_n_sea, without_ahi = btr_cur_n_non_sea;
- fprintf(file,
- "%.2f hash searches/s, %.2f non-hash searches/s\n",
- static_cast<double>(with_ahi - btr_cur_n_sea_old)
- / time_elapsed,
- static_cast<double>(without_ahi - btr_cur_n_non_sea_old)
- / time_elapsed);
- btr_cur_n_sea_old = with_ahi;
- btr_cur_n_non_sea_old = without_ahi;
+ const ulint with_ahi = btr_cur_n_sea;
+ const ulint without_ahi = btr_cur_n_non_sea;
+ fprintf(file,
+ "%.2f hash searches/s, %.2f non-hash searches/s\n",
+ static_cast<double>(with_ahi - btr_cur_n_sea_old)
+ / time_elapsed,
+ static_cast<double>(without_ahi - btr_cur_n_non_sea_old)
+ / time_elapsed);
+ btr_cur_n_sea_old = with_ahi;
+ btr_cur_n_non_sea_old = without_ahi;
+ }
#endif /* BTR_CUR_HASH_ADAPT */
fputs("---\n"
@@ -887,68 +862,7 @@ srv_printf_innodb_monitor(
n_reserved);
}
- fprintf(file,
- "Process ID=" ULINTPF
- ", Main thread ID=" ULINTPF
- ", state: %s\n",
- srv_main_thread_process_no,
- srv_main_thread_id,
- srv_main_thread_op_info);
- fprintf(file,
- "Number of rows inserted " ULINTPF
- ", updated " ULINTPF
- ", deleted " ULINTPF
- ", read " ULINTPF "\n",
- (ulint) srv_stats.n_rows_inserted,
- (ulint) srv_stats.n_rows_updated,
- (ulint) srv_stats.n_rows_deleted,
- (ulint) srv_stats.n_rows_read);
- fprintf(file,
- "%.2f inserts/s, %.2f updates/s,"
- " %.2f deletes/s, %.2f reads/s\n",
- static_cast<double>(srv_stats.n_rows_inserted
- - srv_n_rows_inserted_old)
- / time_elapsed,
- static_cast<double>(srv_stats.n_rows_updated
- - srv_n_rows_updated_old)
- / time_elapsed,
- static_cast<double>(srv_stats.n_rows_deleted
- - srv_n_rows_deleted_old)
- / time_elapsed,
- static_cast<double>(srv_stats.n_rows_read
- - srv_n_rows_read_old)
- / time_elapsed);
- fprintf(file,
- "Number of system rows inserted " ULINTPF
- ", updated " ULINTPF ", deleted " ULINTPF
- ", read " ULINTPF "\n",
- (ulint) srv_stats.n_system_rows_inserted,
- (ulint) srv_stats.n_system_rows_updated,
- (ulint) srv_stats.n_system_rows_deleted,
- (ulint) srv_stats.n_system_rows_read);
- fprintf(file,
- "%.2f inserts/s, %.2f updates/s,"
- " %.2f deletes/s, %.2f reads/s\n",
- static_cast<double>(srv_stats.n_system_rows_inserted
- - srv_n_system_rows_inserted_old)
- / time_elapsed,
- static_cast<double>(srv_stats.n_system_rows_updated
- - srv_n_system_rows_updated_old)
- / time_elapsed,
- static_cast<double>(srv_stats.n_system_rows_deleted
- - srv_n_system_rows_deleted_old)
- / time_elapsed,
- static_cast<double>(srv_stats.n_system_rows_read
- - srv_n_system_rows_read_old)
- / time_elapsed);
- srv_n_rows_inserted_old = srv_stats.n_rows_inserted;
- srv_n_rows_updated_old = srv_stats.n_rows_updated;
- srv_n_rows_deleted_old = srv_stats.n_rows_deleted;
- srv_n_rows_read_old = srv_stats.n_rows_read;
- srv_n_system_rows_inserted_old = srv_stats.n_system_rows_inserted;
- srv_n_system_rows_updated_old = srv_stats.n_system_rows_updated;
- srv_n_system_rows_deleted_old = srv_stats.n_system_rows_deleted;
- srv_n_system_rows_read_old = srv_stats.n_system_rows_read;
+ fprintf(file, ", state: %s\n", srv_main_thread_op_info);
fputs("----------------------------\n"
"END OF INNODB MONITOR OUTPUT\n"
@@ -1086,28 +1000,6 @@ srv_export_innodb_status(void)
/ export_vars.innodb_row_lock_waits)
: 0;
- export_vars.innodb_rows_read = srv_stats.n_rows_read;
-
- export_vars.innodb_rows_inserted = srv_stats.n_rows_inserted;
-
- export_vars.innodb_rows_updated = srv_stats.n_rows_updated;
-
- export_vars.innodb_rows_deleted = srv_stats.n_rows_deleted;
-
- export_vars.innodb_system_rows_read = srv_stats.n_system_rows_read;
-
- export_vars.innodb_system_rows_inserted =
- srv_stats.n_system_rows_inserted;
-
- export_vars.innodb_system_rows_updated =
- srv_stats.n_system_rows_updated;
-
- export_vars.innodb_system_rows_deleted =
- srv_stats.n_system_rows_deleted;
-
- export_vars.innodb_truncated_status_writes =
- srv_truncated_status_writes;
-
export_vars.innodb_page_compression_saved = srv_stats.page_compression_saved;
export_vars.innodb_pages_page_compressed = srv_stats.pages_page_compressed;
export_vars.innodb_page_compressed_trim_op = srv_stats.page_compressed_trim_op;
@@ -1135,11 +1027,6 @@ srv_export_innodb_status(void)
export_vars.innodb_onlineddl_rowlog_pct_used = onlineddl_rowlog_pct_used;
export_vars.innodb_onlineddl_pct_progress = onlineddl_pct_progress;
- export_vars.innodb_sec_rec_cluster_reads =
- srv_stats.n_sec_rec_cluster_reads;
- export_vars.innodb_sec_rec_cluster_reads_avoided =
- srv_stats.n_sec_rec_cluster_reads_avoided;
-
if (!srv_read_only_mode) {
export_vars.innodb_encryption_rotation_pages_read_from_cache =
crypt_stat.pages_read_from_cache;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_TODO_SPLIT_ME.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_TODO_SPLIT_ME.result
index d2a00b777ec..a09c2fe2beb 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_TODO_SPLIT_ME.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_TODO_SPLIT_ME.result
@@ -64,7 +64,7 @@ drop table t1;
create table t1 (c1 timestamp);
desc t1;
Field Type Null Key Default Extra
-c1 timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
+c1 timestamp YES NULL
drop table t1;
create table t1 (c1 datetime);
desc t1;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_TODO_SPLIT_ME.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_TODO_SPLIT_ME.result
index b3814331038..16a7e9e67f3 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_TODO_SPLIT_ME.result
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_TODO_SPLIT_ME.result
@@ -63,7 +63,7 @@ drop table t1;
create table t1 (c1 timestamp primary key) COMMENT = 'engine "innodb"';
desc t1;
Field Type Null Key Default Extra
-c1 timestamp NO PRI CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
+c1 timestamp NO PRI NULL
drop table t1;
create table t1 (c1 datetime primary key) COMMENT = 'engine "innodb"';
desc t1;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_on_duplicate_key_update_multiple_column_primary_key_myisam.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_on_duplicate_key_update_multiple_column_primary_key_myisam.result
index 198eca2a4db..c03e8c14467 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_on_duplicate_key_update_multiple_column_primary_key_myisam.result
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_on_duplicate_key_update_multiple_column_primary_key_myisam.result
@@ -8,7 +8,7 @@ PRIMARY KEY (date, title)
SHOW CREATE TABLE diaries;
Table Create Table
diaries CREATE TABLE `diaries` (
- `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `date` timestamp NOT NULL,
`title` varchar(100) NOT NULL,
`content` text NOT NULL,
PRIMARY KEY (`date`,`title`)
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_on_duplicate_key_update_multiple_column_unique_index_myisam.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_on_duplicate_key_update_multiple_column_unique_index_myisam.result
index 05a9320667f..ee82a9ebd8e 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_on_duplicate_key_update_multiple_column_unique_index_myisam.result
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_on_duplicate_key_update_multiple_column_unique_index_myisam.result
@@ -10,7 +10,7 @@ SHOW CREATE TABLE diaries;
Table Create Table
diaries CREATE TABLE `diaries` (
`id` int(11) NOT NULL AUTO_INCREMENT,
- `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `date` timestamp NOT NULL,
`title` varchar(100) NOT NULL,
`content` text NOT NULL,
PRIMARY KEY (`id`),
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/innodb_i_s_tables_disabled.result b/storage/rocksdb/mysql-test/rocksdb/r/innodb_i_s_tables_disabled.result
index 45c87cc7313..de5ed76ad27 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/innodb_i_s_tables_disabled.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/innodb_i_s_tables_disabled.result
@@ -52,8 +52,6 @@ buffer_pool_pages_free buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL N
buffer_pages_created buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of pages created (innodb_pages_created)
buffer_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of pages written (innodb_pages_written)
buffer_pages_read buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of pages read (innodb_pages_read)
-buffer_index_sec_rec_cluster_reads buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of secondary record reads triggered cluster read
-buffer_index_sec_rec_cluster_reads_avoided buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of secondary record reads avoided triggering cluster read
buffer_data_reads buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Amount of data read in bytes (innodb_data_reads)
buffer_data_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Amount of data written in bytes (innodb_data_written)
buffer_flush_batch_scanned buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_owner Total pages scanned as part of flush batch
@@ -208,14 +206,6 @@ innodb_dict_lru_count_idle server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NU
innodb_dblwr_writes server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of doublewrite operations that have been performed (innodb_dblwr_writes)
innodb_dblwr_pages_written server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of pages that have been written for doublewrite operations (innodb_dblwr_pages_written)
innodb_page_size server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value InnoDB page size in bytes (innodb_page_size)
-dml_reads dml 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of rows read
-dml_inserts dml 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of rows inserted
-dml_deletes dml 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of rows deleted
-dml_updates dml 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of rows updated
-dml_system_reads dml 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of system rows read
-dml_system_inserts dml 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of system rows inserted
-dml_system_deletes dml 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of system rows deleted
-dml_system_updates dml 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of system rows updated
ddl_background_drop_indexes ddl 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of indexes waiting to be dropped after failed index creation
ddl_online_create_index ddl 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of indexes being created online
ddl_pending_alter_table ddl 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of ALTER TABLE, CREATE INDEX, DROP INDEX in progress
diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc
index 7b1b50d7d8f..b8d33e38c4e 100644
--- a/storage/spider/ha_spider.cc
+++ b/storage/spider/ha_spider.cc
@@ -81,7 +81,6 @@ ha_spider::ha_spider(
ft_current = NULL;
ft_count = 0;
ft_init_without_index_init = FALSE;
- sql_kinds = 0;
error_mode = 0;
use_spatial_index = FALSE;
use_fields = FALSE;
@@ -92,7 +91,6 @@ ha_spider::ha_spider(
prev_index_rnd_init = SPD_NONE;
direct_aggregate_item_first = NULL;
result_link_idx = 0;
- result_list.have_sql_kind_backup = FALSE;
result_list.sqls = NULL;
result_list.insert_sqls = NULL;
result_list.update_sqls = NULL;
@@ -143,7 +141,6 @@ ha_spider::ha_spider(
ft_current = NULL;
ft_count = 0;
ft_init_without_index_init = FALSE;
- sql_kinds = 0;
error_mode = 0;
use_spatial_index = FALSE;
use_fields = FALSE;
@@ -154,7 +151,6 @@ ha_spider::ha_spider(
prev_index_rnd_init = SPD_NONE;
direct_aggregate_item_first = NULL;
result_link_idx = 0;
- result_list.have_sql_kind_backup = FALSE;
result_list.sqls = NULL;
result_list.insert_sqls = NULL;
result_list.update_sqls = NULL;
@@ -486,7 +482,7 @@ error_wide_handler_alloc:
int ha_spider::close()
{
- int error_num = 0, roop_count, error_num2;
+ int error_num= 0, roop_count;
THD *thd = ha_thd();
backup_error_status();
DBUG_ENTER("ha_spider::close");
@@ -513,17 +509,6 @@ int ha_spider::close()
spider_free(spider_current_trx, direct_aggregate_item_first, MYF(0));
direct_aggregate_item_first = direct_aggregate_item_current;
}
- if (is_clone)
- {
- for (roop_count = 0; roop_count < (int) share->link_count; roop_count++)
- {
- if ((error_num2 = close_opened_handler(roop_count, FALSE)))
- {
- if (check_error_mode(error_num2))
- error_num = error_num2;
- }
- }
- }
for (roop_count = share->use_dbton_count - 1; roop_count >= 0; roop_count--)
{
uint dbton_id = share->use_dbton_ids[roop_count];
@@ -982,13 +967,11 @@ int ha_spider::reset()
{
delete direct_aggregate_item_current->item;
direct_aggregate_item_current->item = NULL;
-#ifdef SPIDER_ITEM_STRING_WITHOUT_SET_STR_WITH_COPY_AND_THDPTR
if (direct_aggregate_item_current->init_mem_root)
{
free_root(&direct_aggregate_item_current->mem_root, MYF(0));
direct_aggregate_item_current->init_mem_root = FALSE;
}
-#endif
}
direct_aggregate_item_current = direct_aggregate_item_current->next;
}
@@ -1055,12 +1038,6 @@ int ha_spider::reset()
{
result_list.update_sqls[roop_count].length(0);
- if ((error_num2 = close_opened_handler(roop_count, TRUE)))
- {
- if (check_error_mode(error_num2))
- error_num = error_num2;
- }
-
conn_kind[roop_count] = SPIDER_CONN_KIND_MYSQL;
}
result_list.bulk_update_mode = 0;
@@ -1101,10 +1078,8 @@ int ha_spider::reset()
ft_current = NULL;
ft_count = 0;
ft_init_without_index_init = FALSE;
- sql_kinds = 0;
do_direct_update = FALSE;
prev_index_rnd_init = SPD_NONE;
- result_list.have_sql_kind_backup = FALSE;
result_list.direct_order_limit = FALSE;
result_list.direct_limit_offset = FALSE;
result_list.set_split_read = FALSE;
@@ -1263,8 +1238,7 @@ int ha_spider::index_init(
set_select_column_mode();
}
- if ((error_num = reset_sql_sql(
- SPIDER_SQL_TYPE_SELECT_SQL | SPIDER_SQL_TYPE_HANDLER)))
+ if ((error_num= reset_sql_sql(SPIDER_SQL_TYPE_SELECT_SQL)))
DBUG_RETURN(error_num);
result_list.check_direct_order_limit = FALSE;
prev_index_rnd_init = SPD_INDEX;
@@ -1322,8 +1296,6 @@ int ha_spider::index_read_map_internal(
)
use_spatial_index = TRUE;
- if ((error_num = index_handler_init()))
- DBUG_RETURN(check_error_mode_eof(error_num));
if (is_clone)
{
DBUG_PRINT("info",("spider set pt_clone_last_searcher to %p",
@@ -1336,8 +1308,7 @@ int ha_spider::index_read_map_internal(
start_key.key = key;
start_key.keypart_map = keypart_map;
start_key.flag = find_flag;
- if ((error_num = reset_sql_sql(
- SPIDER_SQL_TYPE_SELECT_SQL | SPIDER_SQL_TYPE_HANDLER)))
+ if ((error_num= reset_sql_sql(SPIDER_SQL_TYPE_SELECT_SQL)))
DBUG_RETURN(error_num);
if ((error_num = spider_set_conn_bg_param(this)))
DBUG_RETURN(error_num);
@@ -1385,7 +1356,6 @@ int ha_spider::index_read_map_internal(
result_list.split_read));
DBUG_PRINT("info",("spider result_list.limit_num=%lld",
result_list.limit_num));
- if (sql_kinds & SPIDER_SQL_KIND_SQL)
{
if (result_list.direct_order_limit)
{
@@ -1412,16 +1382,6 @@ int ha_spider::index_read_map_internal(
DBUG_RETURN(error_num);
}
}
- if (sql_kinds & SPIDER_SQL_KIND_HANDLER)
- {
- if ((error_num = append_limit_sql_part(
- result_list.internal_offset,
- result_list.limit_num,
- SPIDER_SQL_TYPE_HANDLER)))
- {
- DBUG_RETURN(error_num);
- }
- }
int roop_start, roop_end, lock_mode, link_ok;
lock_mode = spider_conn_lock_mode(this);
@@ -1480,13 +1440,8 @@ int ha_spider::index_read_map_internal(
}
} else {
ulong sql_type;
- conn = conns[roop_count];
- if (sql_kind[roop_count] == SPIDER_SQL_KIND_SQL)
- {
- sql_type = SPIDER_SQL_TYPE_SELECT_SQL;
- } else {
- sql_type = SPIDER_SQL_TYPE_HANDLER;
- }
+ conn= conns[roop_count];
+ sql_type= SPIDER_SQL_TYPE_SELECT_SQL;
spider_db_handler *dbton_hdl = dbton_handler[conn->dbton_id];
pthread_mutex_assert_not_owner(&conn->mta_conn_mutex);
if (dbton_hdl->need_lock_before_set_sql_for_exec(sql_type))
@@ -1694,8 +1649,6 @@ int ha_spider::index_read_last_map_internal(
DBUG_RETURN(ER_QUERY_INTERRUPTED);
}
do_direct_update = FALSE;
- if ((error_num = index_handler_init()))
- DBUG_RETURN(check_error_mode_eof(error_num));
if (is_clone)
{
DBUG_PRINT("info",("spider set pt_clone_last_searcher to %p",
@@ -1716,8 +1669,7 @@ int ha_spider::index_read_last_map_internal(
start_key.key = key;
start_key.keypart_map = keypart_map;
start_key.flag = HA_READ_KEY_EXACT;
- if ((error_num = reset_sql_sql(
- SPIDER_SQL_TYPE_SELECT_SQL | SPIDER_SQL_TYPE_HANDLER)))
+ if ((error_num= reset_sql_sql(SPIDER_SQL_TYPE_SELECT_SQL)))
DBUG_RETURN(error_num);
if ((error_num = spider_set_conn_bg_param(this)))
DBUG_RETURN(error_num);
@@ -1753,7 +1705,6 @@ int ha_spider::index_read_last_map_internal(
&start_key, NULL, this))
)
DBUG_RETURN(error_num);
- if (sql_kinds & SPIDER_SQL_KIND_SQL)
{
if (result_list.direct_order_limit)
{
@@ -1780,16 +1731,6 @@ int ha_spider::index_read_last_map_internal(
DBUG_RETURN(error_num);
}
}
- if (sql_kinds & SPIDER_SQL_KIND_HANDLER)
- {
- if ((error_num = append_limit_sql_part(
- result_list.internal_offset,
- result_list.limit_num,
- SPIDER_SQL_TYPE_HANDLER)))
- {
- DBUG_RETURN(error_num);
- }
- }
int roop_start, roop_end, roop_count, tmp_lock_mode, link_ok;
tmp_lock_mode = spider_conn_lock_mode(this);
@@ -1848,13 +1789,8 @@ int ha_spider::index_read_last_map_internal(
}
} else {
ulong sql_type;
- conn = conns[roop_count];
- if (sql_kind[roop_count] == SPIDER_SQL_KIND_SQL)
- {
- sql_type = SPIDER_SQL_TYPE_SELECT_SQL;
- } else {
- sql_type = SPIDER_SQL_TYPE_HANDLER;
- }
+ conn= conns[roop_count];
+ sql_type= SPIDER_SQL_TYPE_SELECT_SQL;
spider_db_handler *dbton_hdl = dbton_handler[conn->dbton_id];
pthread_mutex_assert_not_owner(&conn->mta_conn_mutex);
if (dbton_hdl->need_lock_before_set_sql_for_exec(sql_type))
@@ -2113,25 +2049,20 @@ int ha_spider::index_first_internal(
DBUG_RETURN(ER_QUERY_INTERRUPTED);
}
do_direct_update = FALSE;
- if ((error_num = index_handler_init()))
- DBUG_RETURN(check_error_mode_eof(error_num));
if (is_clone)
{
DBUG_PRINT("info",("spider set pt_clone_last_searcher to %p",
pt_clone_source_handler));
pt_clone_source_handler->pt_clone_last_searcher = this;
}
- if (
- sql_is_empty(SPIDER_SQL_TYPE_HANDLER) ||
- sql_is_empty(SPIDER_SQL_TYPE_SELECT_SQL)
- ) {
-/*
- spider_db_free_one_result_for_start_next(this);
-*/
+ if (sql_is_empty(SPIDER_SQL_TYPE_SELECT_SQL))
+ {
+ /*
+ spider_db_free_one_result_for_start_next(this);
+ */
if ((error_num = spider_db_free_result(this, FALSE)))
DBUG_RETURN(error_num);
- if ((error_num = reset_sql_sql(
- SPIDER_SQL_TYPE_SELECT_SQL | SPIDER_SQL_TYPE_HANDLER)))
+ if ((error_num= reset_sql_sql(SPIDER_SQL_TYPE_SELECT_SQL)))
DBUG_RETURN(error_num);
check_direct_order_limit();
@@ -2170,7 +2101,6 @@ int ha_spider::index_first_internal(
NULL, NULL, this))
)
DBUG_RETURN(error_num);
- if (sql_kinds & SPIDER_SQL_KIND_SQL)
{
if (result_list.direct_order_limit)
{
@@ -2197,16 +2127,6 @@ int ha_spider::index_first_internal(
DBUG_RETURN(error_num);
}
}
- if (sql_kinds & SPIDER_SQL_KIND_HANDLER)
- {
- if ((error_num = append_limit_sql_part(
- result_list.internal_offset,
- result_list.limit_num,
- SPIDER_SQL_TYPE_HANDLER)))
- {
- DBUG_RETURN(error_num);
- }
- }
int roop_start, roop_end, roop_count, tmp_lock_mode, link_ok;
tmp_lock_mode = spider_conn_lock_mode(this);
@@ -2265,13 +2185,8 @@ int ha_spider::index_first_internal(
}
} else {
ulong sql_type;
- conn = conns[roop_count];
- if (sql_kind[roop_count] == SPIDER_SQL_KIND_SQL)
- {
- sql_type = SPIDER_SQL_TYPE_SELECT_SQL;
- } else {
- sql_type = SPIDER_SQL_TYPE_HANDLER;
- }
+ conn= conns[roop_count];
+ sql_type= SPIDER_SQL_TYPE_SELECT_SQL;
spider_db_handler *dbton_hdl = dbton_handler[conn->dbton_id];
pthread_mutex_assert_not_owner(&conn->mta_conn_mutex);
if (dbton_hdl->need_lock_before_set_sql_for_exec(sql_type))
@@ -2478,25 +2393,20 @@ int ha_spider::index_last_internal(
DBUG_RETURN(ER_QUERY_INTERRUPTED);
}
do_direct_update = FALSE;
- if ((error_num = index_handler_init()))
- DBUG_RETURN(check_error_mode_eof(error_num));
if (is_clone)
{
DBUG_PRINT("info",("spider set pt_clone_last_searcher to %p",
pt_clone_source_handler));
pt_clone_source_handler->pt_clone_last_searcher = this;
}
- if (
- sql_is_empty(SPIDER_SQL_TYPE_HANDLER) ||
- sql_is_empty(SPIDER_SQL_TYPE_SELECT_SQL)
- ) {
-/*
- spider_db_free_one_result_for_start_next(this);
-*/
+ if (sql_is_empty(SPIDER_SQL_TYPE_SELECT_SQL))
+ {
+ /*
+ spider_db_free_one_result_for_start_next(this);
+ */
if ((error_num = spider_db_free_result(this, FALSE)))
DBUG_RETURN(error_num);
- if ((error_num = reset_sql_sql(
- SPIDER_SQL_TYPE_SELECT_SQL | SPIDER_SQL_TYPE_HANDLER)))
+ if ((error_num= reset_sql_sql(SPIDER_SQL_TYPE_SELECT_SQL)))
DBUG_RETURN(error_num);
check_direct_order_limit();
@@ -2535,7 +2445,6 @@ int ha_spider::index_last_internal(
NULL, NULL, this))
)
DBUG_RETURN(error_num);
- if (sql_kinds & SPIDER_SQL_KIND_SQL)
{
if (result_list.direct_order_limit)
{
@@ -2562,16 +2471,6 @@ int ha_spider::index_last_internal(
DBUG_RETURN(error_num);
}
}
- if (sql_kinds & SPIDER_SQL_KIND_HANDLER)
- {
- if ((error_num = append_limit_sql_part(
- result_list.internal_offset,
- result_list.limit_num,
- SPIDER_SQL_TYPE_HANDLER)))
- {
- DBUG_RETURN(error_num);
- }
- }
int roop_start, roop_end, roop_count, tmp_lock_mode, link_ok;
tmp_lock_mode = spider_conn_lock_mode(this);
@@ -2630,13 +2529,8 @@ int ha_spider::index_last_internal(
}
} else {
ulong sql_type;
- conn = conns[roop_count];
- if (sql_kind[roop_count] == SPIDER_SQL_KIND_SQL)
- {
- sql_type = SPIDER_SQL_TYPE_SELECT_SQL;
- } else {
- sql_type = SPIDER_SQL_TYPE_HANDLER;
- }
+ conn= conns[roop_count];
+ sql_type= SPIDER_SQL_TYPE_SELECT_SQL;
spider_db_handler *dbton_hdl = dbton_handler[conn->dbton_id];
pthread_mutex_assert_not_owner(&conn->mta_conn_mutex);
if (dbton_hdl->need_lock_before_set_sql_for_exec(sql_type))
@@ -2895,8 +2789,6 @@ int ha_spider::read_range_first_internal(
}
range_key_part = table->key_info[active_index].key_part;
- if ((error_num = index_handler_init()))
- DBUG_RETURN(check_error_mode_eof(error_num));
if (is_clone)
{
DBUG_PRINT("info",("spider set pt_clone_last_searcher to %p",
@@ -2905,8 +2797,7 @@ int ha_spider::read_range_first_internal(
}
spider_db_free_one_result_for_start_next(this);
check_direct_order_limit();
- if ((error_num = reset_sql_sql(
- SPIDER_SQL_TYPE_SELECT_SQL | SPIDER_SQL_TYPE_HANDLER)))
+ if ((error_num= reset_sql_sql(SPIDER_SQL_TYPE_SELECT_SQL)))
DBUG_RETURN(error_num);
if ((error_num = spider_set_conn_bg_param(this)))
DBUG_RETURN(error_num);
@@ -2943,7 +2834,6 @@ int ha_spider::read_range_first_internal(
start_key, eq_range ? NULL : end_key, this))
)
DBUG_RETURN(error_num);
- if (sql_kinds & SPIDER_SQL_KIND_SQL)
{
if (result_list.direct_order_limit)
{
@@ -2970,16 +2860,6 @@ int ha_spider::read_range_first_internal(
DBUG_RETURN(error_num);
}
}
- if (sql_kinds & SPIDER_SQL_KIND_HANDLER)
- {
- if ((error_num = append_limit_sql_part(
- result_list.internal_offset,
- result_list.limit_num,
- SPIDER_SQL_TYPE_HANDLER)))
- {
- DBUG_RETURN(error_num);
- }
- }
int roop_start, roop_end, roop_count, tmp_lock_mode, link_ok;
tmp_lock_mode = spider_conn_lock_mode(this);
@@ -3038,13 +2918,8 @@ int ha_spider::read_range_first_internal(
}
} else {
ulong sql_type;
- conn = conns[roop_count];
- if (sql_kind[roop_count] == SPIDER_SQL_KIND_SQL)
- {
- sql_type = SPIDER_SQL_TYPE_SELECT_SQL;
- } else {
- sql_type = SPIDER_SQL_TYPE_HANDLER;
- }
+ conn= conns[roop_count];
+ sql_type= SPIDER_SQL_TYPE_SELECT_SQL;
spider_db_handler *dbton_hdl = dbton_handler[conn->dbton_id];
pthread_mutex_assert_not_owner(&conn->mta_conn_mutex);
if (dbton_hdl->need_lock_before_set_sql_for_exec(sql_type))
@@ -3227,12 +3102,12 @@ int ha_spider::read_range_first(
use_pre_call = FALSE;
if ((error_num = read_range_next()))
DBUG_RETURN(error_num);
- DBUG_RETURN(check_ha_range_eof());
+ DBUG_RETURN(0);
}
if ((error_num = read_range_first_internal(table->record[0], start_key,
end_key, eq_range, sorted)))
DBUG_RETURN(error_num);
- DBUG_RETURN(check_ha_range_eof());
+ DBUG_RETURN(0);
}
int ha_spider::read_range_next()
@@ -3263,7 +3138,7 @@ int ha_spider::read_range_next()
if ((error_num = spider_db_seek_next(table->record[0], this, search_link_idx,
table)))
DBUG_RETURN(check_error_mode_eof(error_num));
- DBUG_RETURN(check_ha_range_eof());
+ DBUG_RETURN(0);
}
void ha_spider::reset_no_where_cond()
@@ -3440,8 +3315,6 @@ int ha_spider::multi_range_read_next_first(
DBUG_RETURN(ER_QUERY_INTERRUPTED);
}
do_direct_update = FALSE;
- if ((error_num = index_handler_init()))
- DBUG_RETURN(check_error_mode_eof(error_num));
if (is_clone)
{
DBUG_PRINT("info",("spider set pt_clone_last_searcher to %p",
@@ -3457,17 +3330,13 @@ int ha_spider::multi_range_read_next_first(
DBUG_PRINT("info",("spider result_list.finish_flg = FALSE"));
result_list.finish_flg = FALSE;
result_list.record_num = 0;
- if ((error_num = reset_sql_sql(
- SPIDER_SQL_TYPE_SELECT_SQL | SPIDER_SQL_TYPE_HANDLER)))
+ if ((error_num= reset_sql_sql(SPIDER_SQL_TYPE_SELECT_SQL)))
DBUG_RETURN(error_num);
result_list.desc_flg = FALSE;
result_list.sorted = mrr_is_output_sorted;
result_list.key_info = &table->key_info[active_index];
- if (
- multi_range_num == 1 ||
- result_list.multi_split_read <= 1 ||
- (sql_kinds & SPIDER_SQL_KIND_HANDLER)
- ) {
+ if (multi_range_num == 1 || result_list.multi_split_read <= 1)
+ {
if (wide_handler->keyread)
result_list.keyread = TRUE;
else
@@ -3502,7 +3371,6 @@ int ha_spider::multi_range_read_next_first(
NULL : &mrr_cur_range.end_key, this))
)
DBUG_RETURN(error_num);
- if (sql_kinds & SPIDER_SQL_KIND_SQL)
{
if (result_list.direct_order_limit)
{
@@ -3529,16 +3397,6 @@ int ha_spider::multi_range_read_next_first(
DBUG_RETURN(error_num);
}
}
- if (sql_kinds & SPIDER_SQL_KIND_HANDLER)
- {
- if ((error_num = append_limit_sql_part(
- result_list.internal_offset + result_list.record_num,
- result_list.limit_num,
- SPIDER_SQL_TYPE_HANDLER)))
- {
- DBUG_RETURN(error_num);
- }
- }
int roop_start, roop_end, tmp_lock_mode, link_ok;
tmp_lock_mode = spider_conn_lock_mode(this);
@@ -3595,13 +3453,8 @@ int ha_spider::multi_range_read_next_first(
}
} else {
ulong sql_type;
- conn = conns[roop_count];
- if (sql_kind[roop_count] == SPIDER_SQL_KIND_SQL)
- {
- sql_type = SPIDER_SQL_TYPE_SELECT_SQL;
- } else {
- sql_type = SPIDER_SQL_TYPE_HANDLER;
- }
+ conn= conns[roop_count];
+ sql_type= SPIDER_SQL_TYPE_SELECT_SQL;
spider_db_handler *dbton_hdl = dbton_handler[conn->dbton_id];
pthread_mutex_assert_not_owner(&conn->mta_conn_mutex);
if (dbton_hdl->need_lock_before_set_sql_for_exec(sql_type))
@@ -3771,7 +3624,7 @@ int ha_spider::multi_range_read_next_first(
if (!(error_num = spider_db_fetch(table->record[0], this, table)))
{
*range_info = (char *) mrr_cur_range.ptr;
- DBUG_RETURN(check_ha_range_eof());
+ DBUG_RETURN(0);
}
if (
error_num != HA_ERR_END_OF_FILE &&
@@ -3799,7 +3652,6 @@ int ha_spider::multi_range_read_next_first(
DBUG_RETURN(check_error_mode_eof(0));
}
set_where_to_pos_sql(SPIDER_SQL_TYPE_SELECT_SQL);
- set_where_to_pos_sql(SPIDER_SQL_TYPE_HANDLER);
}
DBUG_PRINT("info",("spider range_res2=%d", range_res));
if (error_num)
@@ -3910,34 +3762,11 @@ int ha_spider::multi_range_read_next_first(
if ((error_num = reset_sql_sql(
SPIDER_SQL_TYPE_SELECT_SQL | SPIDER_SQL_TYPE_TMP_SQL)))
DBUG_RETURN(error_num);
- if ((sql_kinds & SPIDER_SQL_KIND_SQL))
- {
- for (roop_count = 0; roop_count < (int) share->link_count;
- roop_count++)
- {
- result_list.sql_kind_backup[roop_count] = sql_kind[roop_count];
- sql_kind[roop_count] = SPIDER_SQL_KIND_SQL;
- }
- result_list.sql_kinds_backup = sql_kinds;
- sql_kinds = SPIDER_SQL_KIND_SQL;
- result_list.have_sql_kind_backup = TRUE;
- }
}
memset(result_list.tmp_table_join_first, 0xFF,
share->link_bitmap_size);
} else {
result_list.tmp_table_join = FALSE;
- if (result_list.have_sql_kind_backup)
- {
- for (roop_count = 0; roop_count < (int) share->link_count;
- roop_count++)
- {
- sql_kind[roop_count] =
- result_list.sql_kind_backup[roop_count];
- }
- sql_kinds = result_list.sql_kinds_backup;
- result_list.have_sql_kind_backup = FALSE;
- }
}
result_list.tmp_table_join_break_after_get_next = FALSE;
@@ -4252,13 +4081,8 @@ int ha_spider::multi_range_read_next_first(
}
} else {
ulong sql_type;
- conn = conns[roop_count];
- if (sql_kind[roop_count] == SPIDER_SQL_KIND_SQL)
- {
- sql_type = SPIDER_SQL_TYPE_SELECT_SQL | SPIDER_SQL_TYPE_TMP_SQL;
- } else {
- sql_type = SPIDER_SQL_TYPE_HANDLER;
- }
+ conn= conns[roop_count];
+ sql_type= SPIDER_SQL_TYPE_SELECT_SQL | SPIDER_SQL_TYPE_TMP_SQL;
spider_db_handler *dbton_hdl = dbton_handler[conn->dbton_id];
pthread_mutex_assert_not_owner(&conn->mta_conn_mutex);
if (dbton_hdl->need_lock_before_set_sql_for_exec(sql_type))
@@ -4532,8 +4356,7 @@ int ha_spider::multi_range_read_next_first(
DBUG_RETURN(check_error_mode_eof(0));
}
multi_range_cnt = 0;
- if ((error_num = reset_sql_sql(
- SPIDER_SQL_TYPE_SELECT_SQL | SPIDER_SQL_TYPE_HANDLER)))
+ if ((error_num= reset_sql_sql(SPIDER_SQL_TYPE_SELECT_SQL)))
DBUG_RETURN(error_num);
} while (!error_num);
}
@@ -4606,11 +4429,8 @@ int ha_spider::multi_range_read_next_next(
pt_clone_source_handler));
pt_clone_source_handler->pt_clone_last_searcher = this;
}
- if (
- multi_range_num == 1 ||
- result_list.multi_split_read <= 1 ||
- (sql_kinds & SPIDER_SQL_KIND_HANDLER)
- ) {
+ if (multi_range_num == 1 || result_list.multi_split_read <= 1)
+ {
if (!(error_num = spider_db_seek_next(table->record[0], this,
search_link_idx, table)))
{
@@ -4650,7 +4470,6 @@ int ha_spider::multi_range_read_next_next(
DBUG_RETURN(check_error_mode_eof(0));
}
set_where_to_pos_sql(SPIDER_SQL_TYPE_SELECT_SQL);
- set_where_to_pos_sql(SPIDER_SQL_TYPE_HANDLER);
result_list.limit_num =
result_list.internal_limit - result_list.record_num >=
result_list.split_read ?
@@ -4663,7 +4482,6 @@ int ha_spider::multi_range_read_next_next(
NULL : &mrr_cur_range.end_key, this))
)
DBUG_RETURN(error_num);
- if (sql_kinds & SPIDER_SQL_KIND_SQL)
{
if (result_list.direct_order_limit)
{
@@ -4690,16 +4508,6 @@ int ha_spider::multi_range_read_next_next(
DBUG_RETURN(error_num);
}
}
- if (sql_kinds & SPIDER_SQL_KIND_HANDLER)
- {
- if ((error_num = append_limit_sql_part(
- result_list.internal_offset + result_list.record_num,
- result_list.limit_num,
- SPIDER_SQL_TYPE_HANDLER)))
- {
- DBUG_RETURN(error_num);
- }
- }
int roop_start, roop_end, tmp_lock_mode, link_ok;
tmp_lock_mode = spider_conn_lock_mode(this);
@@ -4756,13 +4564,8 @@ int ha_spider::multi_range_read_next_next(
}
} else {
ulong sql_type;
- conn = conns[roop_count];
- if (sql_kind[roop_count] == SPIDER_SQL_KIND_SQL)
- {
- sql_type = SPIDER_SQL_TYPE_SELECT_SQL;
- } else {
- sql_type = SPIDER_SQL_TYPE_HANDLER;
- }
+ conn= conns[roop_count];
+ sql_type= SPIDER_SQL_TYPE_SELECT_SQL;
spider_db_handler *dbton_hdl = dbton_handler[conn->dbton_id];
pthread_mutex_assert_not_owner(&conn->mta_conn_mutex);
if (dbton_hdl->need_lock_before_set_sql_for_exec(sql_type))
@@ -4931,7 +4734,7 @@ int ha_spider::multi_range_read_next_next(
if (!(error_num = spider_db_fetch(table->record[0], this, table)))
{
*range_info = (char *) mrr_cur_range.ptr;
- DBUG_RETURN(check_ha_range_eof());
+ DBUG_RETURN(0);
}
if (
error_num != HA_ERR_END_OF_FILE &&
@@ -5034,8 +4837,7 @@ int ha_spider::multi_range_read_next_next(
}
result_list.record_num = 0;
- if ((error_num = reset_sql_sql(
- SPIDER_SQL_TYPE_SELECT_SQL | SPIDER_SQL_TYPE_HANDLER)))
+ if ((error_num= reset_sql_sql(SPIDER_SQL_TYPE_SELECT_SQL)))
DBUG_RETURN(error_num);
bool tmp_high_priority = wide_handler->high_priority;
@@ -5076,34 +4878,11 @@ int ha_spider::multi_range_read_next_next(
if ((error_num = reset_sql_sql(
SPIDER_SQL_TYPE_SELECT_SQL | SPIDER_SQL_TYPE_TMP_SQL)))
DBUG_RETURN(error_num);
- if ((sql_kinds & SPIDER_SQL_KIND_SQL))
- {
- for (roop_count = 0; roop_count < (int) share->link_count;
- roop_count++)
- {
- result_list.sql_kind_backup[roop_count] = sql_kind[roop_count];
- sql_kind[roop_count] = SPIDER_SQL_KIND_SQL;
- }
- result_list.sql_kinds_backup = sql_kinds;
- sql_kinds = SPIDER_SQL_KIND_SQL;
- result_list.have_sql_kind_backup = TRUE;
- }
}
memset(result_list.tmp_table_join_first, 0xFF,
share->link_bitmap_size);
} else {
result_list.tmp_table_join = FALSE;
- if (result_list.have_sql_kind_backup)
- {
- for (roop_count = 0; roop_count < (int) share->link_count;
- roop_count++)
- {
- sql_kind[roop_count] =
- result_list.sql_kind_backup[roop_count];
- }
- sql_kinds = result_list.sql_kinds_backup;
- result_list.have_sql_kind_backup = FALSE;
- }
}
if (result_list.tmp_table_join)
@@ -5406,13 +5185,8 @@ int ha_spider::multi_range_read_next_next(
}
} else {
ulong sql_type;
- conn = conns[roop_count];
- if (sql_kind[roop_count] == SPIDER_SQL_KIND_SQL)
- {
- sql_type = SPIDER_SQL_TYPE_SELECT_SQL | SPIDER_SQL_TYPE_TMP_SQL;
- } else {
- sql_type = SPIDER_SQL_TYPE_HANDLER;
- }
+ conn= conns[roop_count];
+ sql_type= SPIDER_SQL_TYPE_SELECT_SQL | SPIDER_SQL_TYPE_TMP_SQL;
spider_db_handler *dbton_hdl = dbton_handler[conn->dbton_id];
pthread_mutex_assert_not_owner(&conn->mta_conn_mutex);
if (dbton_hdl->need_lock_before_set_sql_for_exec(sql_type))
@@ -5684,8 +5458,7 @@ int ha_spider::multi_range_read_next_next(
DBUG_RETURN(check_error_mode_eof(0));
}
multi_range_cnt = 0;
- if ((error_num = reset_sql_sql(
- SPIDER_SQL_TYPE_SELECT_SQL | SPIDER_SQL_TYPE_HANDLER)))
+ if ((error_num= reset_sql_sql(SPIDER_SQL_TYPE_SELECT_SQL)))
DBUG_RETURN(error_num);
} while (!error_num);
}
@@ -5790,8 +5563,7 @@ int ha_spider::rnd_init(
result_list.keyread = FALSE;
init_rnd_handler = FALSE;
- if ((error_num = reset_sql_sql(
- SPIDER_SQL_TYPE_SELECT_SQL | SPIDER_SQL_TYPE_HANDLER)))
+ if ((error_num= reset_sql_sql(SPIDER_SQL_TYPE_SELECT_SQL)))
DBUG_RETURN(error_num);
result_list.check_direct_order_limit = FALSE;
}
@@ -5847,8 +5619,6 @@ int ha_spider::rnd_next_internal(
{
if ((error_num = spider_set_conn_bg_param(this)))
DBUG_RETURN(error_num);
- if ((error_num = rnd_handler_init()))
- DBUG_RETURN(check_error_mode_eof(error_num));
check_direct_order_limit();
check_select_column(TRUE);
@@ -5921,7 +5691,6 @@ int ha_spider::rnd_next_internal(
result_list.limit_num =
result_list.internal_limit >= result_list.split_read ?
result_list.split_read : result_list.internal_limit;
- if (sql_kinds & SPIDER_SQL_KIND_SQL)
{
if ((error_num = append_limit_sql_part(
result_list.internal_offset,
@@ -5937,16 +5706,6 @@ int ha_spider::rnd_next_internal(
DBUG_RETURN(error_num);
}
}
- if (sql_kinds & SPIDER_SQL_KIND_HANDLER)
- {
- if ((error_num = append_limit_sql_part(
- result_list.internal_offset,
- result_list.limit_num,
- SPIDER_SQL_TYPE_HANDLER)))
- {
- DBUG_RETURN(error_num);
- }
- }
int roop_start, roop_end, roop_count, tmp_lock_mode, link_ok;
tmp_lock_mode = spider_conn_lock_mode(this);
@@ -6006,12 +5765,7 @@ int ha_spider::rnd_next_internal(
} else {
SPIDER_CONN *conn = conns[roop_count];
ulong sql_type;
- if (sql_kind[roop_count] == SPIDER_SQL_KIND_SQL)
- {
- sql_type = SPIDER_SQL_TYPE_SELECT_SQL;
- } else {
- sql_type = SPIDER_SQL_TYPE_HANDLER;
- }
+ sql_type= SPIDER_SQL_TYPE_SELECT_SQL;
spider_db_handler *dbton_hdl = dbton_handler[conn->dbton_id];
pthread_mutex_assert_not_owner(&conn->mta_conn_mutex);
if (dbton_hdl->need_lock_before_set_sql_for_exec(sql_type))
@@ -6367,7 +6121,7 @@ _ft_vft spider_ft_vft = {
int ha_spider::ft_init()
{
- int roop_count, error_num;
+ int error_num;
DBUG_ENTER("ha_spider::ft_init");
DBUG_PRINT("info",("spider this=%p", this));
if (store_error_num)
@@ -6403,9 +6157,6 @@ int ha_spider::ft_init()
ft_init_and_first = TRUE;
- for (roop_count = 0; roop_count < (int) share->link_count; roop_count++)
- sql_kind[roop_count] = SPIDER_SQL_KIND_SQL;
- sql_kinds = SPIDER_SQL_KIND_SQL;
DBUG_RETURN(0);
}
@@ -6548,7 +6299,6 @@ int ha_spider::ft_read_internal(
append_group_by_sql_part(NULL, 0, SPIDER_SQL_TYPE_SELECT_SQL)))
DBUG_RETURN(error_num);
}
- if (sql_kinds & SPIDER_SQL_KIND_SQL)
{
if ((error_num = append_limit_sql_part(
result_list.internal_offset,
@@ -6564,16 +6314,6 @@ int ha_spider::ft_read_internal(
DBUG_RETURN(error_num);
}
}
- if (sql_kinds & SPIDER_SQL_KIND_HANDLER)
- {
- if ((error_num = append_limit_sql_part(
- result_list.internal_offset,
- result_list.limit_num,
- SPIDER_SQL_TYPE_HANDLER)))
- {
- DBUG_RETURN(error_num);
- }
- }
int roop_start, roop_end, roop_count, tmp_lock_mode, link_ok;
tmp_lock_mode = spider_conn_lock_mode(this);
@@ -8417,7 +8157,6 @@ bool ha_spider::check_direct_update_sql_part(
DBUG_RETURN(FALSE);
}
-#ifdef SPIDER_MDEV_16246
/**
Perform initialization for a direct update request.
@@ -8430,9 +8169,6 @@ bool ha_spider::check_direct_update_sql_part(
int ha_spider::direct_update_rows_init(
List<Item> *update_fields
)
-#else
-int ha_spider::direct_update_rows_init()
-#endif
{
st_select_lex *select_lex;
longlong select_limit;
@@ -8549,11 +8285,8 @@ int ha_spider::direct_update_rows(
table_share->db.str, table_share->table_name.str);
DBUG_RETURN(ER_SPIDER_READ_ONLY_NUM);
}
- if (
- (active_index != MAX_KEY && (error_num = index_handler_init())) ||
- (active_index == MAX_KEY && (error_num = rnd_handler_init())) ||
- (error_num = spider_db_direct_update(this, table, update_rows, found_rows))
- )
+ if ((error_num=
+ spider_db_direct_update(this, table, update_rows, found_rows)))
DBUG_RETURN(check_error_mode(error_num));
DBUG_RETURN(0);
@@ -8695,11 +8428,7 @@ int ha_spider::direct_delete_rows(
table_share->db.str, table_share->table_name.str);
DBUG_RETURN(ER_SPIDER_READ_ONLY_NUM);
}
- if (
- (active_index != MAX_KEY && (error_num = index_handler_init())) ||
- (active_index == MAX_KEY && (error_num = rnd_handler_init())) ||
- (error_num = spider_db_direct_delete(this, table, delete_rows))
- )
+ if ((error_num= spider_db_direct_delete(this, table, delete_rows)))
DBUG_RETURN(check_error_mode(error_num));
DBUG_RETURN(0);
@@ -8708,7 +8437,7 @@ int ha_spider::direct_delete_rows(
int ha_spider::delete_all_rows()
{
- int error_num, roop_count;
+ int error_num;
THD *thd = ha_thd();
backup_error_status();
DBUG_ENTER("ha_spider::delete_all_rows");
@@ -8722,9 +8451,6 @@ int ha_spider::delete_all_rows()
DBUG_RETURN(ER_SPIDER_READ_ONLY_NUM);
}
do_direct_update = FALSE;
- sql_kinds = SPIDER_SQL_KIND_SQL;
- for (roop_count = 0; roop_count < (int) share->link_count; roop_count++)
- sql_kind[roop_count] = SPIDER_SQL_KIND_SQL;
if ((error_num = spider_db_delete_all_rows(this)))
DBUG_RETURN(check_error_mode(error_num));
if (wide_handler->sql_command == SQLCOM_TRUNCATE &&
@@ -8746,7 +8472,7 @@ int ha_spider::delete_all_rows()
int ha_spider::truncate()
{
- int error_num, roop_count;
+ int error_num;
THD *thd = ha_thd();
backup_error_status();
DBUG_ENTER("ha_spider::truncate");
@@ -8763,9 +8489,6 @@ int ha_spider::truncate()
DBUG_RETURN(error_num);
}
do_direct_update = FALSE;
- sql_kinds = SPIDER_SQL_KIND_SQL;
- for (roop_count = 0; roop_count < (int) share->link_count; roop_count++)
- sql_kind[roop_count] = SPIDER_SQL_KIND_SQL;
if ((error_num = spider_db_delete_all_rows(this)))
DBUG_RETURN(check_error_mode(error_num));
if (wide_handler->sql_command == SQLCOM_TRUNCATE &&
@@ -10107,7 +9830,6 @@ uint ha_spider::check_partitioned()
void ha_spider::check_direct_order_limit()
{
- int roop_count;
DBUG_ENTER("ha_spider::check_direct_order_limit");
DBUG_PRINT("info",("spider this=%p", this));
if (!result_list.check_direct_order_limit)
@@ -10115,9 +9837,6 @@ void ha_spider::check_direct_order_limit()
if (spider_check_direct_order_limit(this))
{
result_list.direct_order_limit = TRUE;
- sql_kinds = SPIDER_SQL_KIND_SQL;
- for (roop_count = 0; roop_count < (int) share->link_count; roop_count++)
- sql_kind[roop_count] = SPIDER_SQL_KIND_SQL;
} else
result_list.direct_order_limit = FALSE;
@@ -10203,35 +9922,6 @@ bool ha_spider::is_sole_projection_field(
DBUG_RETURN( TRUE );
}
-int ha_spider::check_ha_range_eof()
-{
- DBUG_ENTER("ha_spider::check_ha_range_eof");
- DBUG_PRINT("info",("spider this=%p", this));
- const key_range *end_key = result_list.end_key;
- DBUG_PRINT("info",("spider use_both_key=%s",
- result_list.use_both_key ? "TRUE" : "FALSE"));
- DBUG_PRINT("info",("spider sql_kind[%u]=%u",
- search_link_idx, sql_kind[search_link_idx]));
- DBUG_PRINT("info",("spider sql_command=%u", wide_handler->sql_command));
- if (
- result_list.use_both_key &&
- (sql_kind[search_link_idx] & SPIDER_SQL_KIND_HANDLER) &&
- wide_handler->sql_command != SQLCOM_HA_READ
- ) {
- int cmp_result = key_cmp(result_list.key_info->key_part,
- end_key->key, end_key->length);
- DBUG_PRINT("info",("spider cmp_result=%d", cmp_result));
- if (
- cmp_result > 0 ||
- (end_key->flag == HA_READ_BEFORE_KEY && !cmp_result)
- ) {
- table->status = STATUS_NOT_FOUND;
- DBUG_RETURN(HA_ERR_END_OF_FILE);
- }
- }
- DBUG_RETURN(0);
-}
-
int ha_spider::drop_tmp_tables()
{
int error_num = 0, tmp_error_num, need_mon;
@@ -10377,262 +10067,6 @@ int ha_spider::drop_tmp_tables()
DBUG_RETURN(error_num);
}
-bool ha_spider::handler_opened(
- int link_idx,
- uint tgt_conn_kind
-) {
- DBUG_ENTER("ha_spider::handler_opened");
- DBUG_PRINT("info",("spider this=%p", this));
- DBUG_PRINT("info",("spider link_idx=%d", link_idx));
- DBUG_PRINT("info",("spider tgt_conn_kind=%u", tgt_conn_kind));
- if (
- spider_bit_is_set(m_handler_opened, link_idx)
- ) {
- DBUG_PRINT("info",("spider TRUE"));
- DBUG_RETURN(TRUE);
- }
- DBUG_PRINT("info",("spider FALSE"));
- DBUG_RETURN(FALSE);
-}
-
-void ha_spider::set_handler_opened(
- int link_idx
-) {
- DBUG_ENTER("ha_spider::set_handler_opened");
- DBUG_PRINT("info",("spider this=%p", this));
- spider_set_bit(m_handler_opened, link_idx);
- DBUG_VOID_RETURN;
-}
-
-void ha_spider::clear_handler_opened(
- int link_idx,
- uint tgt_conn_kind
-) {
- DBUG_ENTER("ha_spider::clear_handler_opened");
- DBUG_PRINT("info",("spider this=%p", this));
- spider_clear_bit(m_handler_opened, link_idx);
- DBUG_VOID_RETURN;
-}
-
-int ha_spider::close_opened_handler(
- int link_idx,
- bool release_conn
-) {
- int error_num = 0, error_num2;
- DBUG_ENTER("ha_spider::close_opened_handler");
- DBUG_PRINT("info",("spider this=%p", this));
-
- if (spider_bit_is_set(m_handler_opened, link_idx))
- {
- if ((error_num2 = spider_db_close_handler(this,
- conns[link_idx], link_idx, SPIDER_CONN_KIND_MYSQL))
- ) {
- if (
- share->monitoring_kind[link_idx] &&
- need_mons[link_idx]
- ) {
- error_num2 = spider_ping_table_mon_from_table(
- wide_handler->trx,
- wide_handler->trx->thd,
- share,
- link_idx,
- (uint32) share->monitoring_sid[link_idx],
- share->table_name,
- share->table_name_length,
- conn_link_idx[link_idx],
- NULL,
- 0,
- share->monitoring_kind[link_idx],
- share->monitoring_limit[link_idx],
- share->monitoring_flag[link_idx],
- TRUE
- );
- }
- error_num = error_num2;
- }
- spider_clear_bit(m_handler_opened, link_idx);
- if (release_conn && !conns[link_idx]->join_trx)
- {
- spider_free_conn_from_trx(wide_handler->trx, conns[link_idx],
- FALSE, FALSE, NULL);
- conns[link_idx] = NULL;
- }
- }
- DBUG_RETURN(error_num);
-}
-
-int ha_spider::index_handler_init()
-{
- int lock_mode, error_num;
- int roop_start, roop_end, roop_count;
- DBUG_ENTER("ha_spider::index_handler_init");
- DBUG_PRINT("info",("spider this=%p", this));
- if (!init_index_handler)
- {
- init_index_handler = TRUE;
- lock_mode = spider_conn_lock_mode(this);
- if (lock_mode)
- {
- /* "for update" or "lock in share mode" */
- roop_start = spider_conn_link_idx_next(share->link_statuses,
- conn_link_idx, -1, share->link_count,
- SPIDER_LINK_STATUS_RECOVERY);
- roop_end = share->link_count;
- } else {
- roop_start = search_link_idx;
- roop_end = search_link_idx + 1;
- }
- sql_kinds = 0;
- direct_update_kinds = 0;
- for (roop_count = roop_start; roop_count < roop_end;
- roop_count = spider_conn_link_idx_next(share->link_statuses,
- conn_link_idx, roop_count, share->link_count,
- SPIDER_LINK_STATUS_RECOVERY)
- ) {
- if (
- spider_conn_use_handler(this, lock_mode, roop_count) &&
- spider_conn_need_open_handler(this, active_index, roop_count)
- ) {
- if ((error_num = spider_db_open_handler(this,
- conns[roop_count]
- , roop_count))
- ) {
- if (
- share->monitoring_kind[roop_count] &&
- need_mons[roop_count]
- ) {
- error_num = spider_ping_table_mon_from_table(
- wide_handler->trx,
- wide_handler->trx->thd,
- share,
- roop_count,
- (uint32) share->monitoring_sid[roop_count],
- share->table_name,
- share->table_name_length,
- conn_link_idx[roop_count],
- NULL,
- 0,
- share->monitoring_kind[roop_count],
- share->monitoring_limit[roop_count],
- share->monitoring_flag[roop_count],
- TRUE
- );
- }
- DBUG_RETURN(error_num);
- }
- set_handler_opened(roop_count);
- }
- }
- if (sql_kinds & SPIDER_SQL_KIND_HANDLER)
- {
- st_select_lex *select_lex;
- longlong select_limit;
- longlong offset_limit;
- spider_get_select_limit(this, &select_lex, &select_limit, &offset_limit);
- DBUG_PRINT("info",("spider SPIDER_SQL_KIND_HANDLER"));
- result_list.semi_split_read = 1;
- result_list.semi_split_read_limit = 9223372036854775807LL;
- if (select_limit == 9223372036854775807LL)
- {
- DBUG_PRINT("info",("spider set limit to 1"));
- result_list.semi_split_read_base = 1;
- result_list.split_read = 1;
- } else {
- DBUG_PRINT("info",("spider set limit to %lld", select_limit));
- result_list.semi_split_read_base = select_limit;
- result_list.split_read = select_limit;
- }
- }
- }
- DBUG_RETURN(0);
-}
-
-int ha_spider::rnd_handler_init()
-{
- int error_num, lock_mode;
- int roop_start, roop_end, roop_count;
- DBUG_ENTER("ha_spider::rnd_handler_init");
- DBUG_PRINT("info",("spider this=%p", this));
- if (!init_rnd_handler)
- {
- init_rnd_handler = TRUE;
- lock_mode = spider_conn_lock_mode(this);
- if (lock_mode)
- {
- /* "for update" or "lock in share mode" */
- roop_start = spider_conn_link_idx_next(share->link_statuses,
- conn_link_idx, -1, share->link_count,
- SPIDER_LINK_STATUS_RECOVERY);
- roop_end = share->link_count;
- } else {
- roop_start = search_link_idx;
- roop_end = search_link_idx + 1;
- }
- sql_kinds = 0;
- direct_update_kinds = 0;
- for (roop_count = roop_start; roop_count < roop_end;
- roop_count = spider_conn_link_idx_next(share->link_statuses,
- conn_link_idx, roop_count, share->link_count,
- SPIDER_LINK_STATUS_RECOVERY)
- ) {
- if (
- spider_conn_use_handler(this, lock_mode, roop_count) &&
- spider_conn_need_open_handler(this, MAX_KEY, roop_count)
- ) {
- if ((error_num = spider_db_open_handler(this,
- conns[roop_count]
- , roop_count))
- ) {
- if (
- share->monitoring_kind[roop_count] &&
- need_mons[roop_count]
- ) {
- error_num = spider_ping_table_mon_from_table(
- wide_handler->trx,
- wide_handler->trx->thd,
- share,
- roop_count,
- (uint32) share->monitoring_sid[roop_count],
- share->table_name,
- share->table_name_length,
- conn_link_idx[roop_count],
- NULL,
- 0,
- share->monitoring_kind[roop_count],
- share->monitoring_limit[roop_count],
- share->monitoring_flag[roop_count],
- TRUE
- );
- }
- DBUG_RETURN(error_num);
- }
- set_handler_opened(roop_count);
- }
- }
- if (sql_kinds & SPIDER_SQL_KIND_HANDLER)
- {
- st_select_lex *select_lex;
- longlong select_limit;
- longlong offset_limit;
- spider_get_select_limit(this, &select_lex, &select_limit, &offset_limit);
- DBUG_PRINT("info",("spider SPIDER_SQL_KIND_HANDLER"));
- result_list.semi_split_read = 1;
- result_list.semi_split_read_limit = 9223372036854775807LL;
- if (select_limit == 9223372036854775807LL)
- {
- DBUG_PRINT("info",("spider set limit to 1"));
- result_list.semi_split_read_base = 1;
- result_list.split_read = 1;
- } else {
- DBUG_PRINT("info",("spider set limit to %lld", select_limit));
- result_list.semi_split_read_base = select_limit;
- result_list.split_read = select_limit;
- }
- }
- }
- DBUG_RETURN(0);
-}
-
void ha_spider::set_error_mode()
{
THD *thd = ha_thd();
@@ -12578,26 +12012,6 @@ int ha_spider::print_item_type(
DBUG_RETURN(0);
}
-bool ha_spider::support_use_handler_sql(
- int use_handler
-) {
- uint roop_count, dbton_id;
- spider_db_handler *dbton_hdl;
- DBUG_ENTER("ha_spider::support_use_handler_sql");
- for (roop_count = 0; roop_count < share->use_sql_dbton_count; roop_count++)
- {
- dbton_id = share->use_sql_dbton_ids[roop_count];
- dbton_hdl = dbton_handler[dbton_id];
- if (
- dbton_hdl->first_link_idx >= 0 &&
- !dbton_hdl->support_use_handler(use_handler)
- ) {
- DBUG_RETURN(FALSE);
- }
- }
- DBUG_RETURN(TRUE);
-}
-
int ha_spider::init_union_table_name_pos_sql()
{
int error_num;
diff --git a/storage/spider/ha_spider.h b/storage/spider/ha_spider.h
index 579700d855b..4dffdf78553 100644
--- a/storage/spider/ha_spider.h
+++ b/storage/spider/ha_spider.h
@@ -59,8 +59,6 @@ public:
const char *mem_calc_func_name;
const char *mem_calc_file_name;
ulong mem_calc_line_no;
- uint sql_kinds;
- uint *sql_kind;
ulonglong *connection_ids;
uint conn_kinds;
uint *conn_kind;
@@ -138,9 +136,6 @@ public:
ulonglong *db_request_id;
uchar *db_request_phase;
- uchar *m_handler_opened;
- uint *m_handler_id;
- char **m_handler_cid;
bool do_direct_update;
uint direct_update_kinds;
spider_index_rnd_init prev_index_rnd_init;
@@ -427,13 +422,9 @@ public:
longlong select_limit,
longlong offset_limit
);
-#ifdef SPIDER_MDEV_16246
int direct_update_rows_init(
List<Item> *update_fields
);
-#else
- int direct_update_rows_init();
-#endif
int direct_update_rows(
ha_rows *update_rows,
ha_rows *found_row
@@ -551,25 +542,7 @@ public:
bool is_sole_projection_field(
uint16 field_index
);
- int check_ha_range_eof();
int drop_tmp_tables();
- bool handler_opened(
- int link_idx,
- uint tgt_conn_kind
- );
- void set_handler_opened(
- int link_idx
- );
- void clear_handler_opened(
- int link_idx,
- uint tgt_conn_kind
- );
- int close_opened_handler(
- int link_idx,
- bool release_conn
- );
- int index_handler_init();
- int rnd_handler_init();
void set_error_mode();
void backup_error_status();
int check_error_mode(
@@ -813,9 +786,6 @@ public:
const char *alias,
uint alias_length
);
- bool support_use_handler_sql(
- int use_handler
- );
int init_union_table_name_pos_sql();
int set_union_table_name_pos_sql();
int append_lock_tables_list();
diff --git a/storage/spider/mysql-test/spider/bugfix/r/index.result b/storage/spider/mysql-test/spider/bugfix/r/index.result
index 2aa0b56ef06..3563744997b 100644
--- a/storage/spider/mysql-test/spider/bugfix/r/index.result
+++ b/storage/spider/mysql-test/spider/bugfix/r/index.result
@@ -64,15 +64,6 @@ create table auto_test_local.t (a int, b char(1), primary key(a desc));
insert into auto_test_local.t VALUES (1,'f'),(2,'g'),(3,'j'), (4,'i'),(5,'h');
create table ts (a int, b char(1), primary key(a desc))
engine=spider comment='wrapper "mysql", srv "s_1", table "t"';
-set spider_use_handler=3;
-Warnings:
-Warning 1287 '@@spider_use_handler' is deprecated and will be removed in a future release
-select a, b from ts where a > 0 and b = 'g' order by a;
-a b
-2 g
-set spider_use_handler=default;
-Warnings:
-Warning 1287 '@@spider_use_handler' is deprecated and will be removed in a future release
select a, b from ts where a > 0 and b = 'g' order by a;
a b
2 g
diff --git a/storage/spider/mysql-test/spider/bugfix/t/index.test b/storage/spider/mysql-test/spider/bugfix/t/index.test
index 5167e40e8c4..10d5025c9c7 100644
--- a/storage/spider/mysql-test/spider/bugfix/t/index.test
+++ b/storage/spider/mysql-test/spider/bugfix/t/index.test
@@ -38,9 +38,6 @@ create table auto_test_local.t (a int, b char(1), primary key(a desc));
insert into auto_test_local.t VALUES (1,'f'),(2,'g'),(3,'j'), (4,'i'),(5,'h');
create table ts (a int, b char(1), primary key(a desc))
engine=spider comment='wrapper "mysql", srv "s_1", table "t"';
-set spider_use_handler=3;
-select a, b from ts where a > 0 and b = 'g' order by a;
-set spider_use_handler=default;
select a, b from ts where a > 0 and b = 'g' order by a;
drop table ts, auto_test_local.t;
diff --git a/storage/spider/mysql-test/spider/handler/include/deinit_child2_1.inc b/storage/spider/mysql-test/spider/handler/include/deinit_child2_1.inc
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/deinit_child2_1.inc
+++ /dev/null
diff --git a/storage/spider/mysql-test/spider/handler/include/deinit_child2_2.inc b/storage/spider/mysql-test/spider/handler/include/deinit_child2_2.inc
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/deinit_child2_2.inc
+++ /dev/null
diff --git a/storage/spider/mysql-test/spider/handler/include/deinit_child2_3.inc b/storage/spider/mysql-test/spider/handler/include/deinit_child2_3.inc
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/deinit_child2_3.inc
+++ /dev/null
diff --git a/storage/spider/mysql-test/spider/handler/include/deinit_child3_1.inc b/storage/spider/mysql-test/spider/handler/include/deinit_child3_1.inc
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/deinit_child3_1.inc
+++ /dev/null
diff --git a/storage/spider/mysql-test/spider/handler/include/deinit_child3_2.inc b/storage/spider/mysql-test/spider/handler/include/deinit_child3_2.inc
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/deinit_child3_2.inc
+++ /dev/null
diff --git a/storage/spider/mysql-test/spider/handler/include/deinit_child3_3.inc b/storage/spider/mysql-test/spider/handler/include/deinit_child3_3.inc
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/deinit_child3_3.inc
+++ /dev/null
diff --git a/storage/spider/mysql-test/spider/handler/include/deinit_master_1.inc b/storage/spider/mysql-test/spider/handler/include/deinit_master_1.inc
deleted file mode 100644
index c19e376d10a..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/deinit_master_1.inc
+++ /dev/null
@@ -1 +0,0 @@
---source ../../include/deinit_spider.inc
diff --git a/storage/spider/mysql-test/spider/handler/include/deinit_slave1_1.inc b/storage/spider/mysql-test/spider/handler/include/deinit_slave1_1.inc
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/deinit_slave1_1.inc
+++ /dev/null
diff --git a/storage/spider/mysql-test/spider/handler/include/ha_deinit_child2_1.inc b/storage/spider/mysql-test/spider/handler/include/ha_deinit_child2_1.inc
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/ha_deinit_child2_1.inc
+++ /dev/null
diff --git a/storage/spider/mysql-test/spider/handler/include/ha_deinit_child2_2.inc b/storage/spider/mysql-test/spider/handler/include/ha_deinit_child2_2.inc
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/ha_deinit_child2_2.inc
+++ /dev/null
diff --git a/storage/spider/mysql-test/spider/handler/include/ha_deinit_child2_3.inc b/storage/spider/mysql-test/spider/handler/include/ha_deinit_child2_3.inc
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/ha_deinit_child2_3.inc
+++ /dev/null
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
deleted file mode 100644
index c19e376d10a..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/ha_deinit_child3_1.inc
+++ /dev/null
@@ -1 +0,0 @@
---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
deleted file mode 100644
index c19e376d10a..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/ha_deinit_child3_2.inc
+++ /dev/null
@@ -1 +0,0 @@
---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
deleted file mode 100644
index c19e376d10a..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/ha_deinit_child3_3.inc
+++ /dev/null
@@ -1 +0,0 @@
---source ../../include/deinit_spider.inc
diff --git a/storage/spider/mysql-test/spider/handler/include/ha_deinit_master_1.inc b/storage/spider/mysql-test/spider/handler/include/ha_deinit_master_1.inc
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/ha_deinit_master_1.inc
+++ /dev/null
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
deleted file mode 100644
index 2684829408d..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/ha_init_child2_1.inc
+++ /dev/null
@@ -1,8 +0,0 @@
-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
deleted file mode 100644
index 205eaa6fe35..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/ha_init_child2_2.inc
+++ /dev/null
@@ -1,4 +0,0 @@
-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
deleted file mode 100644
index 55cb858372c..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/ha_init_child2_3.inc
+++ /dev/null
@@ -1,4 +0,0 @@
-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
deleted file mode 100644
index 3ac4f97b1e0..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/ha_init_child3_1.inc
+++ /dev/null
@@ -1,140 +0,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
deleted file mode 100644
index cf47099f439..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/ha_init_child3_2.inc
+++ /dev/null
@@ -1,140 +0,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
deleted file mode 100644
index 094d26b62c6..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/ha_init_child3_3.inc
+++ /dev/null
@@ -1,140 +0,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/ha_init_master_1.inc b/storage/spider/mysql-test/spider/handler/include/ha_init_master_1.inc
deleted file mode 100644
index 78797d80ce7..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/ha_init_master_1.inc
+++ /dev/null
@@ -1,105 +0,0 @@
-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 $MASTER_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 $MASTER_1_CHECK_LINK_FAILED_LOG=
- SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log;
-let $MASTER_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 $MASTER_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 $MASTER_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 $MASTER_1_COPY_TABLES_2_1=
- SELECT spider_copy_tables('ta_l', '0', '1');
-
-if ($VERSION_COMPILE_OS_WIN)
-{
- let $MASTER_1_COMMENT_HA_2_1=
- 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 $MASTER_1_COMMENT_HA_AS_2_1=
- 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 $MASTER_1_COMMENT_HA_2_1=
- 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 $MASTER_1_COMMENT_HA_AS_2_1=
- 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 $MASTER_1_COMMENT_HA_P_2_1=
- 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 $MASTER_1_COMMENT_HA_AS_P_2_1=
- 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 $MASTER_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 $MASTER_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 $MASTER_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 $MASTER_1_COPY_TABLES_P_2_1=
- SELECT spider_copy_tables('ta_l2#P#pt2', '0', '1');
-let $MASTER_1_CHECK_HA_STATUS=
- SHOW STATUS LIKE 'Spider_mon_table_cache_version%';
-let $MASTER_1_CHANGE_HA_MON=
- SELECT spider_flush_table_mon_cache();
diff --git a/storage/spider/mysql-test/spider/handler/include/hs_deinit_child2_1.inc b/storage/spider/mysql-test/spider/handler/include/hs_deinit_child2_1.inc
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/hs_deinit_child2_1.inc
+++ /dev/null
diff --git a/storage/spider/mysql-test/spider/handler/include/hs_deinit_child2_2.inc b/storage/spider/mysql-test/spider/handler/include/hs_deinit_child2_2.inc
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/hs_deinit_child2_2.inc
+++ /dev/null
diff --git a/storage/spider/mysql-test/spider/handler/include/hs_deinit_child2_3.inc b/storage/spider/mysql-test/spider/handler/include/hs_deinit_child2_3.inc
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/hs_deinit_child2_3.inc
+++ /dev/null
diff --git a/storage/spider/mysql-test/spider/handler/include/hs_deinit_master_1.inc b/storage/spider/mysql-test/spider/handler/include/hs_deinit_master_1.inc
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/hs_deinit_master_1.inc
+++ /dev/null
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
deleted file mode 100644
index ee006858b06..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/hs_init_child2_1.inc
+++ /dev/null
@@ -1,24 +0,0 @@
-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
deleted file mode 100644
index 1c5a02d50c8..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/hs_init_child2_2.inc
+++ /dev/null
@@ -1,12 +0,0 @@
-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/hs_init_child2_3.inc b/storage/spider/mysql-test/spider/handler/include/hs_init_child2_3.inc
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/hs_init_child2_3.inc
+++ /dev/null
diff --git a/storage/spider/mysql-test/spider/handler/include/hs_init_master_1.inc b/storage/spider/mysql-test/spider/handler/include/hs_init_master_1.inc
deleted file mode 100644
index 0ff5e2a10d9..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/hs_init_master_1.inc
+++ /dev/null
@@ -1,12 +0,0 @@
-let $MASTER_1_HS_COMMENT_TMP=
- COMMENT='';
-let $MASTER_1_HS_COMMENT_2_1=
- COMMENT='srv "s_2_1", table "hs_r", uhr "1", uhw "1", hrp "$CHILD2_1_HSRPORT", hwp "$CHILD2_1_HSWPORT"';
-let $MASTER_1_HS_COMMENT_P_2_1=
- COMMENT='uhr "1", uhw "1"'
- PARTITION BY RANGE(a) (
- PARTITION pt1 VALUES LESS THAN (4)
- COMMENT='srv "s_2_1", table "hs_r2", hrp "$CHILD2_1_HSRPORT", hwp "$CHILD2_1_HSWPORT"',
- PARTITION pt2 VALUES LESS THAN MAXVALUE
- COMMENT='srv "s_2_2", table "hs_r3", hrp "$CHILD2_2_HSRPORT", hwp "$CHILD2_2_HSWPORT"'
- );
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
deleted file mode 100644
index b8b8ceb9875..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/init_child2_1.inc
+++ /dev/null
@@ -1,176 +0,0 @@
-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
deleted file mode 100644
index 9f0b5e2fe5a..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/init_child2_2.inc
+++ /dev/null
@@ -1,80 +0,0 @@
-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
deleted file mode 100644
index 05dbb1c3dd1..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/init_child2_3.inc
+++ /dev/null
@@ -1,11 +0,0 @@
-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_child3_1.inc b/storage/spider/mysql-test/spider/handler/include/init_child3_1.inc
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/init_child3_1.inc
+++ /dev/null
diff --git a/storage/spider/mysql-test/spider/handler/include/init_child3_2.inc b/storage/spider/mysql-test/spider/handler/include/init_child3_2.inc
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/init_child3_2.inc
+++ /dev/null
diff --git a/storage/spider/mysql-test/spider/handler/include/init_child3_3.inc b/storage/spider/mysql-test/spider/handler/include/init_child3_3.inc
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/init_child3_3.inc
+++ /dev/null
diff --git a/storage/spider/mysql-test/spider/handler/include/init_master_1.inc b/storage/spider/mysql-test/spider/handler/include/init_master_1.inc
deleted file mode 100644
index 9c487bc73fe..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/init_master_1.inc
+++ /dev/null
@@ -1,186 +0,0 @@
---source ../../include/init_spider.inc
-SET spider_internal_sql_log_off= 0;
-SET spider_use_handler= 3;
-if ($VERSION_COMPILE_OS_WIN)
-{
- let $MASTER_1_COMMENT_2_1=
- COMMENT='database "auto_test_remote", table "ta_r"'
- CONNECTION='host "localhost", port "$CHILD2_1_MYPORT", user "root",
- password ""';
-}
-if (!$VERSION_COMPILE_OS_WIN)
-{
- let $MASTER_1_COMMENT_2_1=
- COMMENT='database "auto_test_remote", table "ta_r"'
- CONNECTION='host "localhost", socket "$CHILD2_1_MYSOCK", user "root",
- password ""';
-}
-if ($VERSION_COMPILE_OS_WIN)
-{
- let $MASTER_1_COMMENT2_2_1=
- COMMENT='database "auto_test_remote", table "ta_r_no_idx"'
- CONNECTION='host "localhost", port "$CHILD2_1_MYPORT", user "root",
- password "", prt "2000000"';
-}
-if (!$VERSION_COMPILE_OS_WIN)
-{
- let $MASTER_1_COMMENT2_2_1=
- COMMENT='database "auto_test_remote", table "ta_r_no_idx"'
- CONNECTION='host "localhost", socket "$CHILD2_1_MYSOCK", user "root",
- password "", prt "2000000"';
-}
-let $MASTER_1_COMMENT_P_2_1=
- COMMENT='table "ta_r3"'
- PARTITION BY KEY(a) (
- PARTITION pt1 COMMENT='srv "s_2_1", table "ta_r2",
- priority "1000"',
- PARTITION pt2 COMMENT='srv "s_2_2", priority "1000001"'
- );
-let $MASTER_1_COMMENT2_P_2_1=
- COMMENT='table "ta_r3"'
- PARTITION BY RANGE(a) (
- PARTITION pt1 VALUES LESS THAN (4) COMMENT='srv "s_2_1",
- table "ta_r2", priority "1000"',
- PARTITION pt2 VALUES LESS THAN MAXVALUE
- COMMENT='srv "s_2_2", priority "1000001"'
- );
-if ($VERSION_COMPILE_OS_WIN)
-{
- let $MASTER_1_COMMENT3_2_1=
- COMMENT='database "auto_test_remote", table "ta_r_auto_inc"'
- CONNECTION='host "localhost", port "$CHILD2_1_MYPORT", user "root",
- password ""';
-}
-if (!$VERSION_COMPILE_OS_WIN)
-{
- let $MASTER_1_COMMENT3_2_1=
- COMMENT='database "auto_test_remote", table "ta_r_auto_inc"'
- CONNECTION='host "localhost", socket "$CHILD2_1_MYSOCK", user "root",
- password ""';
-}
-let $MASTER_1_COMMENT3_P_2_1=
- COMMENT='table "ta_r_int"'
- PARTITION BY LIST(MOD(a, 2)) (
- PARTITION pt1 VALUES IN (0)
- COMMENT='srv "s_2_1", priority "1000"',
- PARTITION pt2 VALUES IN (1)
- COMMENT='srv "s_2_2", priority "1000001"'
- );
-if ($VERSION_COMPILE_OS_WIN)
-{
- let $MASTER_1_COMMENT4_2_1=
- COMMENT='database "auto_test_remote", table "ta_r_int"'
- CONNECTION='host "localhost", port "$CHILD2_1_MYPORT", user "root",
- password ""';
-}
-if (!$VERSION_COMPILE_OS_WIN)
-{
- let $MASTER_1_COMMENT4_2_1=
- COMMENT='database "auto_test_remote", table "ta_r_int"'
- CONNECTION='host "localhost", socket "$CHILD2_1_MYSOCK", user "root",
- password ""';
-}
-if ($VERSION_COMPILE_OS_WIN)
-{
- let $MASTER_1_COMMENT5_2_1=
- COMMENT='database "auto_test_remote", table "ta_r_3"'
- CONNECTION='host "localhost", port "$CHILD2_1_MYPORT", user "root",
- password ""';
-}
-if (!$VERSION_COMPILE_OS_WIN)
-{
- let $MASTER_1_COMMENT5_2_1=
- COMMENT='database "auto_test_remote", table "ta_r_3"'
- CONNECTION='host "localhost", socket "$CHILD2_1_MYSOCK", user "root",
- password ""';
-}
-if ($VERSION_COMPILE_OS_WIN)
-{
- let $MASTER_1_COMMENT_FT_2_1=
- COMMENT='database "auto_test_remote", table "ft_r"'
- CONNECTION='host "localhost", port "$CHILD2_1_MYPORT", user "root",
- password ""';
-}
-if (!$VERSION_COMPILE_OS_WIN)
-{
- let $MASTER_1_COMMENT_FT_2_1=
- COMMENT='database "auto_test_remote", table "ft_r"'
- CONNECTION='host "localhost", socket "$CHILD2_1_MYSOCK", user "root",
- password ""';
-}
-let $MASTER_1_COMMENT2_FT_P_2_1=
- COMMENT='table "ft_r3"'
- PARTITION BY RANGE(a) (
- PARTITION pt1 VALUES LESS THAN (4) COMMENT='srv "s_2_1",
- table "ft_r2", priority "1000"',
- PARTITION pt2 VALUES LESS THAN MAXVALUE
- COMMENT='srv "s_2_2", priority "1000001"'
- );
-let $MASTER_1_COMMENT_GM_2_1=
- COMMENT='srv "s_2_1", table "gm_r"';
-let $MASTER_1_COMMENT2_GM_P_2_1=
- COMMENT='table "gm_r3"'
- PARTITION BY RANGE(a) (
- PARTITION pt1 VALUES LESS THAN (4) COMMENT='srv "s_2_1",
- table "gm_r2", priority "1000"',
- PARTITION pt2 VALUES LESS THAN MAXVALUE
- COMMENT='srv "s_2_2", priority "1000001"'
- );
-let $MASTER_1_COMMENT_LOCK1=
- COMMENT 'tbl "t1_1 t1_2", srv "s_2_1 s_2_2"';
-let $MASTER_1_COMMENT_LOCK2=
- COMMENT 'tbl "t2_1 t2_2", srv "s_2_2 s_2_1"';
-let $MASTER_1_COMMENT_INCREMENT1_1=
- COMMENT 'aim "2", tbl "t1_1", srv "s_2_1"';
-let $MASTER_1_COMMENT_INCREMENT1_P_1=
- COMMENT 'aim "2"'
- PARTITION BY LIST(MOD(id, 2)) (
- PARTITION pt1 VALUES IN (0)
- COMMENT='tbl "t1_1", srv "s_2_1"',
- PARTITION pt2 VALUES IN (1)
- COMMENT='tbl "t1_2", srv "s_2_2"'
- );
-let $MASTER_1_COMMENT_READONLY1_1=
- COMMENT 'read_only_mode "1", tbl "t1_1", srv "s_2_1"';
-let $MASTER_1_COMMENT_ERROR_MODE1_1=
- COMMENT 'erm "1", ewm "1", tbl "ter1_1", srv "s_2_1"';
-let $MASTER_1_COMMENT_TEXT_PK1_1=
- COMMENT 'tbl "t1", srv "s_2_1"';
-let $MASTER_1_COMMENT_TEXT_KEY1_1=
- COMMENT 'tbl "t1", srv "s_2_1"';
-let $MASTER_1_CHECK_DIRECT_UPDATE_STATUS=
- SHOW STATUS LIKE 'Spider_direct_update';
-let $MASTER_1_CHECK_DIRECT_DELETE_STATUS=
- SHOW STATUS LIKE 'Spider_direct_delete';
-let $MASTER_1_CHECK_DIRECT_ORDER_LIMIT_STATUS=
- SHOW STATUS LIKE 'Spider_direct_order_limit';
-let $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS=
- SHOW STATUS LIKE 'Spider_direct_aggregate';
-let $MASTER_1_AUTO_INCREMENT_INCREMENT1=
- SET SESSION AUTO_INCREMENT_INCREMENT = 1 $STR_SEMICOLON
- SELECT spider_direct_sql('SET SESSION AUTO_INCREMENT_INCREMENT = 1', '',
- 'srv "s_2_1"') $STR_SEMICOLON
- SELECT spider_direct_sql('SET SESSION AUTO_INCREMENT_INCREMENT = 1', '',
- 'srv "s_2_2"');
-let $MASTER_1_AUTO_INCREMENT_INCREMENT2=
- SET SESSION AUTO_INCREMENT_INCREMENT = 777 $STR_SEMICOLON
- SELECT spider_direct_sql('SET SESSION AUTO_INCREMENT_INCREMENT = 4', '',
- 'srv "s_2_1"') $STR_SEMICOLON
- SELECT spider_direct_sql('SET SESSION AUTO_INCREMENT_INCREMENT = 4', '',
- 'srv "s_2_2"');
-let $MASTER_1_AUTO_INCREMENT_OFFSET1=
- SET SESSION AUTO_INCREMENT_OFFSET = 1 $STR_SEMICOLON
- SELECT spider_bg_direct_sql('SET SESSION AUTO_INCREMENT_OFFSET = 1', '',
- 'srv "s_2_1"') $STR_SEMICOLON
- SELECT spider_bg_direct_sql('SET SESSION AUTO_INCREMENT_OFFSET = 1', '',
- 'srv "s_2_2"');
-let $MASTER_1_AUTO_INCREMENT_OFFSET2=
- SET SESSION AUTO_INCREMENT_OFFSET = 777 $STR_SEMICOLON
- SELECT spider_bg_direct_sql('SET SESSION AUTO_INCREMENT_OFFSET = 2', '',
- 'srv "s_2_1"') $STR_SEMICOLON
- SELECT spider_bg_direct_sql('SET SESSION AUTO_INCREMENT_OFFSET = 3', '',
- 'srv "s_2_2"');
-let $MASTER_1_AUTO_INCREMENT_OFFSET3=
- SET SESSION AUTO_INCREMENT_OFFSET = 1;
-let $MASTER_1_AUTO_INCREMENT_OFFSET4=
- SET SESSION AUTO_INCREMENT_OFFSET = 777;
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
deleted file mode 100644
index 73c3c6b9ef2..00000000000
--- a/storage/spider/mysql-test/spider/handler/include/init_slave1_1.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-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/my.cnf b/storage/spider/mysql-test/spider/handler/my.cnf
deleted file mode 100644
index 89b91e6a5bd..00000000000
--- a/storage/spider/mysql-test/spider/handler/my.cnf
+++ /dev/null
@@ -1,176 +0,0 @@
-# Use default setting for mysqld processes
-!include include/default_mysqld.cnf
-
-[mysqld.1.1]
-loose_handlersocket_port= 20000
-loose_handlersocket_port_wr= 20001
-loose_handlersocket_threads= 2
-loose_handlersocket_threads_wr= 1
-loose_handlersocket_support_merge_table= 0
-loose_handlersocket_direct_update_mode= 0
-loose_handlersocket_unlimited_boundary= 65536
-loose_handlersocket_bulk_insert= 0
-loose_handlersocket_bulk_insert_timeout= 0
-loose_handlersocket_general_log= 1
-loose_handlersocket_timeout= 30
-loose_handlersocket_close_table_interval=2
-open_files_limit= 4096
-loose_partition= 1
-
-[mysqld.2.1]
-loose_handlersocket_port= 20002
-loose_handlersocket_port_wr= 20003
-loose_handlersocket_threads= 2
-loose_handlersocket_threads_wr= 1
-loose_handlersocket_support_merge_table= 0
-loose_handlersocket_direct_update_mode= 0
-loose_handlersocket_unlimited_boundary= 65536
-loose_handlersocket_bulk_insert= 0
-loose_handlersocket_bulk_insert_timeout= 0
-loose_handlersocket_general_log= 1
-loose_handlersocket_timeout= 30
-loose_handlersocket_close_table_interval=2
-open_files_limit= 4096
-
-[mysqld.2.2]
-loose_handlersocket_port= 20004
-loose_handlersocket_port_wr= 20005
-loose_handlersocket_threads= 2
-loose_handlersocket_threads_wr= 1
-loose_handlersocket_support_merge_table= 0
-loose_handlersocket_direct_update_mode= 0
-loose_handlersocket_unlimited_boundary= 65536
-loose_handlersocket_bulk_insert= 0
-loose_handlersocket_bulk_insert_timeout= 0
-loose_handlersocket_general_log= 1
-loose_handlersocket_timeout= 30
-loose_handlersocket_close_table_interval=2
-open_files_limit= 4096
-
-[mysqld.2.3]
-
-[mysqld.3.1]
-loose_partition= 1
-
-[mysqld.3.2]
-loose_partition= 1
-
-[mysqld.3.3]
-loose_partition= 1
-
-[mysqld.4.1]
-loose_partition= 1
-
-
-[ENV]
-USE_GEOMETRY_TEST= 1
-USE_FULLTEXT_TEST= 1
-USE_HA_TEST= 1
-USE_GENERAL_LOG= 1
-USE_REPLICATION= 1
-MASTER_1_MYPORT= @mysqld.1.1.port
-MASTER_1_HSRPORT= 20000
-MASTER_1_HSWPORT= 20001
-MASTER_1_MYSOCK= @mysqld.1.1.socket
-MASTER_1_ENGINE_TYPE= Spider
-#MASTER_1_ENGINE_TYPE= MyISAM
-MASTER_1_ENGINE= ENGINE=Spider
-MASTER_1_CHARSET= DEFAULT CHARSET=utf8
-MASTER_1_ENGINE2= ENGINE=MyISAM
-MASTER_1_CHARSET2= DEFAULT CHARSET=utf8
-MASTER_1_CHARSET3= DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
-SLAVE1_1_MYPORT= @mysqld.4.1.port
-SLAVE1_1_MYSOCK= @mysqld.4.1.socket
-SLAVE1_1_ENGINE_TYPE= MyISAM
-SLAVE1_1_ENGINE= ENGINE=MyISAM
-SLAVE1_1_CHARSET= DEFAULT CHARSET=utf8
-USE_CHILD_GROUP2= 1
-OUTPUT_CHILD_GROUP2= 0
-CHILD2_1_MYPORT= @mysqld.2.1.port
-CHILD2_1_HSRPORT= 20002
-CHILD2_1_HSWPORT= 20003
-CHILD2_1_MYSOCK= @mysqld.2.1.socket
-CHILD2_1_ENGINE_TYPE= InnoDB
-CHILD2_1_ENGINE= ENGINE=InnoDB
-CHILD2_1_CHARSET= DEFAULT CHARSET=utf8
-CHILD2_1_CHARSET2= DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
-CHILD2_2_MYPORT= @mysqld.2.2.port
-CHILD2_2_HSRPORT= 20004
-CHILD2_2_HSWPORT= 20005
-CHILD2_2_MYSOCK= @mysqld.2.2.socket
-CHILD2_2_ENGINE_TYPE= InnoDB
-CHILD2_2_ENGINE= ENGINE=InnoDB
-CHILD2_2_CHARSET= DEFAULT CHARSET=utf8
-CHILD2_3_MYPORT= @mysqld.2.3.port
-CHILD2_3_MYSOCK= @mysqld.2.3.socket
-CHILD2_3_ENGINE_TYPE= InnoDB
-CHILD2_3_ENGINE= ENGINE=InnoDB
-CHILD2_3_CHARSET= DEFAULT CHARSET=utf8
-CHILD2_1_FT_MYPORT= @mysqld.1.1.port
-CHILD2_1_FT_MYSOCK= @mysqld.1.1.socket
-CHILD2_1_FT_ENGINE_TYPE= MyISAM
-CHILD2_1_FT_ENGINE= ENGINE=MyISAM
-CHILD2_1_FT_CHARSET= DEFAULT CHARSET=utf8
-CHILD2_2_FT_MYPORT= @mysqld.2.2.port
-CHILD2_2_FT_MYSOCK= @mysqld.2.2.socket
-CHILD2_2_FT_ENGINE_TYPE= MyISAM
-CHILD2_2_FT_ENGINE= ENGINE=MyISAM
-CHILD2_2_FT_CHARSET= DEFAULT CHARSET=utf8
-CHILD2_1_GM_MYPORT= @mysqld.2.1.port
-CHILD2_1_GM_MYSOCK= @mysqld.2.1.socket
-CHILD2_1_GM_ENGINE_TYPE= MyISAM
-CHILD2_1_GM_ENGINE= ENGINE=MyISAM
-CHILD2_1_GM_CHARSET= DEFAULT CHARSET=utf8
-CHILD2_2_GM_MYPORT= @mysqld.2.2.port
-CHILD2_2_GM_MYSOCK= @mysqld.2.2.socket
-CHILD2_2_GM_ENGINE_TYPE= MyISAM
-CHILD2_2_GM_ENGINE= ENGINE=MyISAM
-CHILD2_2_GM_CHARSET= DEFAULT CHARSET=utf8
-USE_CHILD_GROUP3= 1
-OUTPUT_CHILD_GROUP3= 0
-CHILD3_1_MYPORT= @mysqld.3.1.port
-CHILD3_1_MYSOCK= @mysqld.3.1.socket
-CHILD3_1_ENGINE_TYPE= InnoDB
-CHILD3_1_ENGINE= ENGINE=InnoDB
-CHILD3_1_CHARSET= DEFAULT CHARSET=utf8
-CHILD3_2_MYPORT= @mysqld.3.2.port
-CHILD3_2_MYSOCK= @mysqld.3.2.socket
-CHILD3_2_ENGINE_TYPE= InnoDB
-CHILD3_2_ENGINE= ENGINE=InnoDB
-CHILD3_2_CHARSET= DEFAULT CHARSET=utf8
-CHILD3_3_MYPORT= @mysqld.3.3.port
-CHILD3_3_MYSOCK= @mysqld.3.3.socket
-CHILD3_3_ENGINE_TYPE= InnoDB
-CHILD3_3_ENGINE= ENGINE=InnoDB
-CHILD3_3_CHARSET= DEFAULT CHARSET=utf8
-
-STR_SEMICOLON= ;
-
-#The followings are set in include/init_xxx.inc files
-# MASTER_1_COMMENT_2_1
-# MASTER_1_COMMENT2_2_1
-# MASTER_1_COMMENT3_2_1
-# MASTER_1_COMMENT4_2_1
-# MASTER_1_COMMENT5_2_1
-# MASTER_1_COMMENT_P_2_1
-# CHILD2_1_DROP_TABLES
-# CHILD2_1_CREATE_TABLES
-# CHILD2_1_SELECT_TABLES
-# CHILD2_1_DROP_TABLES2
-# CHILD2_1_CREATE_TABLES2
-# CHILD2_1_SELECT_TABLES2
-# CHILD2_1_DROP_TABLES3
-# CHILD2_1_CREATE_TABLES3
-# CHILD2_1_SELECT_TABLES3
-# CHILD2_1_DROP_TABLES4
-# CHILD2_1_CREATE_TABLES4
-# CHILD2_1_SELECT_TABLES4
-# CHILD2_1_DROP_TABLES5
-# CHILD2_1_CREATE_TABLES5
-# CHILD2_1_SELECT_TABLES5
-# CHILD2_1_DROP_TABLES6
-# CHILD2_1_CREATE_TABLES6
-# CHILD2_1_SELECT_TABLES6
-# CHILD2_2_DROP_TABLES
-# CHILD2_2_CREATE_TABLES
-# CHILD2_2_SELECT_TABLES
diff --git a/storage/spider/mysql-test/spider/handler/r/basic_sql.result b/storage/spider/mysql-test/spider/handler/r/basic_sql.result
deleted file mode 100644
index 94a09fc317b..00000000000
--- a/storage/spider/mysql-test/spider/handler/r/basic_sql.result
+++ /dev/null
@@ -1,738 +0,0 @@
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-
-drop and create databases
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-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;
-
-test select 1
-connection master_1;
-SELECT 1;
-1
-1
-
-create table select test
-connection master_1;
-DROP TABLE IF EXISTS tb_l;
-CREATE TABLE tb_l (
-a INT,
-b CHAR(1),
-c DATETIME,
-PRIMARY KEY(a)
-) MASTER_1_ENGINE2 MASTER_1_CHARSET2
-INSERT INTO tb_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');
-DROP TABLE IF EXISTS ta_l;
-CREATE TABLE ta_l (
-PRIMARY KEY(a)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
-SELECT a, b, c FROM tb_l
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-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
-
-create table ignore select test
-connection master_1;
-DROP TABLE IF EXISTS ta_l;
-DROP TABLE IF EXISTS tb_l;
-CREATE TABLE tb_l (
-a INT,
-b CHAR(1),
-c DATETIME,
-PRIMARY KEY(a)
-) MASTER_1_ENGINE2 MASTER_1_CHARSET2
-INSERT INTO tb_l (a, b, c) VALUES
-(1, 'f', '2008-07-01 10:21:39'),
-(2, 'g', '2000-02-01 00:00:00'),
-(3, 'j', '2007-05-04 20:03:11'),
-(4, 'i', '2003-10-30 05:01:03'),
-(5, 'h', '2001-10-31 23:59:59');
-CREATE TABLE ta_l (
-PRIMARY KEY(a)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
-IGNORE SELECT a, b, c FROM tb_l
-Warnings:
-Warning 1062 Duplicate entry '1' for key 'PRIMARY'
-Warning 1062 Duplicate entry '2' for key 'PRIMARY'
-Warning 1062 Duplicate entry '3' for key 'PRIMARY'
-Warning 1062 Duplicate entry '4' for key 'PRIMARY'
-Warning 1062 Duplicate entry '5' for key 'PRIMARY'
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-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
-
-create table ignore select test
-connection master_1;
-DROP TABLE IF EXISTS ta_l;
-CREATE TABLE ta_l (
-PRIMARY KEY(a)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
-REPLACE SELECT a, b, c FROM tb_l
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 f 2008-07-01 10:21:39
-2 g 2000-02-01 00:00:00
-3 j 2007-05-04 20:03:11
-4 i 2003-10-30 05:01:03
-5 h 2001-10-31 23:59:59
-
-create no index table
-connection master_1;
-DROP TABLE IF EXISTS ta_l_no_idx;
-CREATE TABLE ta_l_no_idx
-MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT2_2_1
-SELECT a, b, c FROM tb_l
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l_no_idx ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 f 2008-07-01 10:21:39
-2 g 2000-02-01 00:00:00
-3 j 2007-05-04 20:03:11
-4 i 2003-10-30 05:01:03
-5 h 2001-10-31 23:59:59
-
-select table
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 f 2008-07-01 10:21:39
-2 g 2000-02-01 00:00:00
-3 j 2007-05-04 20:03:11
-4 i 2003-10-30 05:01:03
-5 h 2001-10-31 23:59:59
-
-select table shared mode
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a
-LOCK IN SHARE MODE;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 f 2008-07-01 10:21:39
-2 g 2000-02-01 00:00:00
-3 j 2007-05-04 20:03:11
-4 i 2003-10-30 05:01:03
-5 h 2001-10-31 23:59:59
-
-select table for update
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a
-FOR UPDATE;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 f 2008-07-01 10:21:39
-2 g 2000-02-01 00:00:00
-3 j 2007-05-04 20:03:11
-4 i 2003-10-30 05:01:03
-5 h 2001-10-31 23:59:59
-
-select table join
-connection master_1;
-SELECT a.a, a.b, date_format(b.c, '%Y-%m-%d %H:%i:%s') FROM ta_l a, tb_l b
-WHERE a.a = b.a ORDER BY a.a;
-a b date_format(b.c, '%Y-%m-%d %H:%i:%s')
-1 f 2008-07-01 10:21:39
-2 g 2000-02-01 00:00:00
-3 j 2007-05-04 20:03:11
-4 i 2003-10-30 05:01:03
-5 h 2001-10-31 23:59:59
-
-select table straight_join
-connection master_1;
-SELECT STRAIGHT_JOIN a.a, a.b, date_format(b.c, '%Y-%m-%d %H:%i:%s')
-FROM ta_l a, tb_l b WHERE a.a = b.a ORDER BY a.a;
-a b date_format(b.c, '%Y-%m-%d %H:%i:%s')
-1 f 2008-07-01 10:21:39
-2 g 2000-02-01 00:00:00
-3 j 2007-05-04 20:03:11
-4 i 2003-10-30 05:01:03
-5 h 2001-10-31 23:59:59
-
-select sql_small_result
-connection master_1;
-SELECT SQL_SMALL_RESULT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
-ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 f 2008-07-01 10:21:39
-2 g 2000-02-01 00:00:00
-3 j 2007-05-04 20:03:11
-4 i 2003-10-30 05:01:03
-5 h 2001-10-31 23:59:59
-
-select sql_big_result
-connection master_1;
-SELECT SQL_BIG_RESULT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
-ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 f 2008-07-01 10:21:39
-2 g 2000-02-01 00:00:00
-3 j 2007-05-04 20:03:11
-4 i 2003-10-30 05:01:03
-5 h 2001-10-31 23:59:59
-
-select sql_buffer_result
-connection master_1;
-SELECT SQL_BUFFER_RESULT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
-ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 f 2008-07-01 10:21:39
-2 g 2000-02-01 00:00:00
-3 j 2007-05-04 20:03:11
-4 i 2003-10-30 05:01:03
-5 h 2001-10-31 23:59:59
-
-select sql_cache
-connection master_1;
-SELECT SQL_CACHE a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
-ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 f 2008-07-01 10:21:39
-2 g 2000-02-01 00:00:00
-3 j 2007-05-04 20:03:11
-4 i 2003-10-30 05:01:03
-5 h 2001-10-31 23:59:59
-
-select sql_no_cache
-connection master_1;
-SELECT SQL_NO_CACHE a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
-ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 f 2008-07-01 10:21:39
-2 g 2000-02-01 00:00:00
-3 j 2007-05-04 20:03:11
-4 i 2003-10-30 05:01:03
-5 h 2001-10-31 23:59:59
-
-select sql_calc_found_rows
-connection master_1;
-SELECT SQL_CALC_FOUND_ROWS a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
-ORDER BY a LIMIT 4;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 f 2008-07-01 10:21:39
-2 g 2000-02-01 00:00:00
-3 j 2007-05-04 20:03:11
-4 i 2003-10-30 05:01:03
-connection master_1;
-SELECT found_rows();
-found_rows()
-5
-
-select high_priority
-connection master_1;
-SELECT HIGH_PRIORITY a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
-ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 f 2008-07-01 10:21:39
-2 g 2000-02-01 00:00:00
-3 j 2007-05-04 20:03:11
-4 i 2003-10-30 05:01:03
-5 h 2001-10-31 23:59:59
-
-select distinct
-connection master_1;
-SELECT DISTINCT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
-ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 f 2008-07-01 10:21:39
-2 g 2000-02-01 00:00:00
-3 j 2007-05-04 20:03:11
-4 i 2003-10-30 05:01:03
-5 h 2001-10-31 23:59:59
-
-select count
-connection master_1;
-SELECT count(*) FROM ta_l ORDER BY a;
-count(*)
-5
-
-select table join not use index
-connection master_1;
-SELECT a.a, a.b, date_format(a.c, '%Y-%m-%d %H:%i:%s') FROM tb_l a WHERE
-EXISTS (SELECT * FROM ta_l b WHERE b.b = a.b) ORDER BY a.a;
-a b date_format(a.c, '%Y-%m-%d %H:%i:%s')
-1 f 2008-07-01 10:21:39
-2 g 2000-02-01 00:00:00
-3 j 2007-05-04 20:03:11
-4 i 2003-10-30 05:01:03
-5 h 2001-10-31 23:59:59
-
-select using pushdown
-connection master_1;
-SELECT a.a, a.b, date_format(a.c, '%Y-%m-%d %H:%i:%s') FROM ta_l a WHERE
-a.b = 'g' ORDER BY a.a;
-a b date_format(a.c, '%Y-%m-%d %H:%i:%s')
-2 g 2000-02-01 00:00:00
-
-select using index and pushdown
-connection master_1;
-SELECT a.a, a.b, date_format(a.c, '%Y-%m-%d %H:%i:%s') FROM ta_l a WHERE
-a.a > 0 AND a.b = 'g' ORDER BY a.a;
-a b date_format(a.c, '%Y-%m-%d %H:%i:%s')
-2 g 2000-02-01 00:00:00
-
-insert
-connection master_1;
-TRUNCATE TABLE ta_l;
-connection master_1;
-INSERT INTO ta_l (a, b, c) VALUES (2, 'e', '2008-01-01 23:59:59');
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-2 e 2008-01-01 23:59:59
-
-insert select
-connection master_1;
-TRUNCATE TABLE ta_l;
-connection master_1;
-INSERT INTO ta_l (a, b, c) SELECT a, b, c FROM tb_l;
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 f 2008-07-01 10:21:39
-2 g 2000-02-01 00:00:00
-3 j 2007-05-04 20:03:11
-4 i 2003-10-30 05:01:03
-5 h 2001-10-31 23:59:59
-
-insert select a
-connection master_1;
-TRUNCATE TABLE ta_l;
-connection master_1;
-INSERT INTO ta_l (a, b, c) VALUES ((SELECT a FROM tb_l ORDER BY a LIMIT 1),
-'e', '2008-01-01 23:59:59');
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 e 2008-01-01 23:59:59
-
-insert low_priority
-connection master_1;
-TRUNCATE TABLE ta_l;
-connection master_1;
-INSERT LOW_PRIORITY INTO ta_l (a, b, c) values (2, 'e', '2008-01-01 23:59:59');
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-2 e 2008-01-01 23:59:59
-
-insert high_priority
-connection master_1;
-TRUNCATE TABLE ta_l;
-connection master_1;
-INSERT HIGH_PRIORITY INTO ta_l (a, b, c) VALUES (2, 'e',
-'2008-01-01 23:59:59');
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-2 e 2008-01-01 23:59:59
-
-insert ignore
-connection master_1;
-INSERT IGNORE INTO ta_l (a, b, c) VALUES (2, 'd', '2009-02-02 01:01:01');
-Warnings:
-Warning 1062 Duplicate entry '2' for key 'PRIMARY'
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-2 e 2008-01-01 23:59:59
-
-insert update (insert)
-connection master_1;
-TRUNCATE TABLE ta_l;
-connection master_1;
-INSERT INTO ta_l (a, b, c) VALUES (2, 'e', '2008-01-01 23:59:59') ON DUPLICATE
-KEY UPDATE b = 'f', c = '2005-08-08 11:11:11';
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-2 e 2008-01-01 23:59:59
-
-insert update (update)
-connection master_1;
-INSERT INTO ta_l (a, b, c) VALUES (2, 'e', '2008-01-01 23:59:59') ON DUPLICATE
-KEY UPDATE b = 'f', c = '2005-08-08 11:11:11';
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-2 f 2005-08-08 11:11:11
-
-replace
-connection master_1;
-TRUNCATE TABLE ta_l;
-INSERT INTO ta_l (a, b, c) VALUES (2, 'e', '2008-01-01 23:59:59');
-connection master_1;
-REPLACE INTO ta_l (a, b, c) VALUES (2, 'f', '2008-02-02 02:02:02');
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-2 f 2008-02-02 02:02:02
-
-replace select
-connection master_1;
-REPLACE INTO ta_l (a, b, c) SELECT a, b, c FROM tb_l;
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 f 2008-07-01 10:21:39
-2 g 2000-02-01 00:00:00
-3 j 2007-05-04 20:03:11
-4 i 2003-10-30 05:01:03
-5 h 2001-10-31 23:59:59
-
-replace select a
-connection master_1;
-REPLACE INTO ta_l (a, b, c) VALUES ((SELECT a FROM tb_l ORDER BY a LIMIT 1),
-'e', '2008-01-01 23:59:59');
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 e 2008-01-01 23:59:59
-2 g 2000-02-01 00:00:00
-3 j 2007-05-04 20:03:11
-4 i 2003-10-30 05:01:03
-5 h 2001-10-31 23:59:59
-
-replace low_priority
-connection master_1;
-REPLACE LOW_PRIORITY INTO ta_l (a, b, c) VALUES (3, 'g',
-'2009-03-03 03:03:03');
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 e 2008-01-01 23:59:59
-2 g 2000-02-01 00:00:00
-3 g 2009-03-03 03:03:03
-4 i 2003-10-30 05:01:03
-5 h 2001-10-31 23:59:59
-
-update
-TRUNCATE TABLE ta_l;
-INSERT INTO ta_l (a, b, c) VALUES (1, 'e', '2008-01-01 23:59:59'),
-(2, 'e', '2008-01-01 23:59:59');
-connection master_1;
-UPDATE ta_l SET b = 'f', c = '2008-02-02 02:02:02' WHERE a = 2;
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 e 2008-01-01 23:59:59
-2 f 2008-02-02 02:02:02
-
-update select
-connection master_1;
-UPDATE ta_l SET b = 'g', c = '2009-03-03 03:03:03' WHERE a IN (SELECT a FROM
-tb_l);
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 g 2009-03-03 03:03:03
-2 g 2009-03-03 03:03:03
-
-update select a
-connection master_1;
-UPDATE ta_l SET b = 'h', c = '2010-04-04 04:04:04' WHERE a = (SELECT a FROM
-tb_l ORDER BY a LIMIT 1);
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 h 2010-04-04 04:04:04
-2 g 2009-03-03 03:03:03
-
-update join
-connection master_1;
-UPDATE ta_l a, tb_l b SET a.b = b.b, a.c = b.c WHERE a.a = b.a;
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 f 2008-07-01 10:21:39
-2 g 2000-02-01 00:00:00
-
-update join a
-connection master_1;
-UPDATE ta_l a, tb_l b SET a.b = 'g', a.c = '2009-03-03 03:03:03' WHERE
-a.a = b.a;
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 g 2009-03-03 03:03:03
-2 g 2009-03-03 03:03:03
-
-update low_priority
-connection master_1;
-UPDATE LOW_PRIORITY ta_l SET b = 'f', c = '2008-02-02 02:02:02' WHERE a = 2;
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 g 2009-03-03 03:03:03
-2 f 2008-02-02 02:02:02
-
-update ignore
-connection master_1;
-UPDATE IGNORE ta_l SET a = 1, b = 'g', c = '2009-03-03 03:03:03' WHERE a = 2;
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 g 2009-03-03 03:03:03
-2 f 2008-02-02 02:02:02
-
-update pushdown
-connection master_1;
-update ta_l set b = 'j', c = '2009-03-03 03:03:03' where b = 'f';
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 g 2009-03-03 03:03:03
-2 j 2009-03-03 03:03:03
-
-update index pushdown
-connection master_1;
-UPDATE ta_l SET b = 'g', c = '2009-03-03 03:03:03' WHERE a > 0 AND b = 'j';
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 g 2009-03-03 03:03:03
-2 g 2009-03-03 03:03:03
-
-delete
-TRUNCATE TABLE ta_l;
-INSERT INTO ta_l (a, b, c) VALUES (1, 'e', '2008-01-01 23:59:59'),
-(2, 'e', '2008-01-01 23:59:59'), (3, 'e', '2008-01-01 23:59:59'),
-(4, 'e', '2008-01-01 23:59:59'), (5, 'e', '2008-01-01 23:59:59'),
-(6, 'e', '2008-01-01 23:59:59'), (7, 'e', '2008-01-01 23:59:59'),
-(8, 'e', '2008-01-01 23:59:59'), (9, 'e', '2008-01-01 23:59:59'),
-(10, 'j', '2008-01-01 23:59:59');
-connection master_1;
-DELETE FROM ta_l WHERE a = 2;
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 e 2008-01-01 23:59:59
-3 e 2008-01-01 23:59:59
-4 e 2008-01-01 23:59:59
-5 e 2008-01-01 23:59:59
-6 e 2008-01-01 23:59:59
-7 e 2008-01-01 23:59:59
-8 e 2008-01-01 23:59:59
-9 e 2008-01-01 23:59:59
-10 j 2008-01-01 23:59:59
-
-delete all
-connection master_1;
-DELETE FROM ta_l;
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-
-delete select
-TRUNCATE TABLE ta_l;
-INSERT INTO ta_l (a, b, c) VALUES (1, 'e', '2008-01-01 23:59:59'),
-(2, 'e', '2008-01-01 23:59:59'), (3, 'e', '2008-01-01 23:59:59'),
-(4, 'e', '2008-01-01 23:59:59'), (5, 'e', '2008-01-01 23:59:59'),
-(6, 'e', '2008-01-01 23:59:59'), (7, 'e', '2008-01-01 23:59:59'),
-(8, 'e', '2008-01-01 23:59:59'), (9, 'e', '2008-01-01 23:59:59'),
-(10, 'j', '2008-01-01 23:59:59');
-connection master_1;
-DELETE FROM ta_l WHERE a IN (SELECT a FROM tb_l);
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-6 e 2008-01-01 23:59:59
-7 e 2008-01-01 23:59:59
-8 e 2008-01-01 23:59:59
-9 e 2008-01-01 23:59:59
-10 j 2008-01-01 23:59:59
-
-delete select a
-TRUNCATE TABLE ta_l;
-INSERT INTO ta_l (a, b, c) VALUES (1, 'e', '2008-01-01 23:59:59'),
-(2, 'e', '2008-01-01 23:59:59'), (3, 'e', '2008-01-01 23:59:59'),
-(4, 'e', '2008-01-01 23:59:59'), (5, 'e', '2008-01-01 23:59:59'),
-(6, 'e', '2008-01-01 23:59:59'), (7, 'e', '2008-01-01 23:59:59'),
-(8, 'e', '2008-01-01 23:59:59'), (9, 'e', '2008-01-01 23:59:59'),
-(10, 'j', '2008-01-01 23:59:59');
-connection master_1;
-DELETE FROM ta_l WHERE a = (SELECT a FROM tb_l ORDER BY a LIMIT 1);
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-2 e 2008-01-01 23:59:59
-3 e 2008-01-01 23:59:59
-4 e 2008-01-01 23:59:59
-5 e 2008-01-01 23:59:59
-6 e 2008-01-01 23:59:59
-7 e 2008-01-01 23:59:59
-8 e 2008-01-01 23:59:59
-9 e 2008-01-01 23:59:59
-10 j 2008-01-01 23:59:59
-
-delete join
-TRUNCATE TABLE ta_l;
-INSERT INTO ta_l (a, b, c) VALUES (1, 'e', '2008-01-01 23:59:59'),
-(2, 'e', '2008-01-01 23:59:59'), (3, 'e', '2008-01-01 23:59:59'),
-(4, 'e', '2008-01-01 23:59:59'), (5, 'e', '2008-01-01 23:59:59'),
-(6, 'e', '2008-01-01 23:59:59'), (7, 'e', '2008-01-01 23:59:59'),
-(8, 'e', '2008-01-01 23:59:59'), (9, 'e', '2008-01-01 23:59:59'),
-(10, 'j', '2008-01-01 23:59:59');
-connection master_1;
-DELETE a FROM ta_l a, (SELECT a FROM tb_l ORDER BY a) b WHERE a.a = b.a;
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-6 e 2008-01-01 23:59:59
-7 e 2008-01-01 23:59:59
-8 e 2008-01-01 23:59:59
-9 e 2008-01-01 23:59:59
-10 j 2008-01-01 23:59:59
-
-delete low_priority
-TRUNCATE TABLE ta_l;
-INSERT INTO ta_l (a, b, c) VALUES (1, 'e', '2008-01-01 23:59:59'),
-(2, 'e', '2008-01-01 23:59:59'), (3, 'e', '2008-01-01 23:59:59'),
-(4, 'e', '2008-01-01 23:59:59'), (5, 'e', '2008-01-01 23:59:59'),
-(6, 'e', '2008-01-01 23:59:59'), (7, 'e', '2008-01-01 23:59:59'),
-(8, 'e', '2008-01-01 23:59:59'), (9, 'e', '2008-01-01 23:59:59'),
-(10, 'j', '2008-01-01 23:59:59');
-connection master_1;
-DELETE LOW_PRIORITY FROM ta_l WHERE a = 2;
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 e 2008-01-01 23:59:59
-3 e 2008-01-01 23:59:59
-4 e 2008-01-01 23:59:59
-5 e 2008-01-01 23:59:59
-6 e 2008-01-01 23:59:59
-7 e 2008-01-01 23:59:59
-8 e 2008-01-01 23:59:59
-9 e 2008-01-01 23:59:59
-10 j 2008-01-01 23:59:59
-
-delete ignore
-TRUNCATE TABLE ta_l;
-INSERT INTO ta_l (a, b, c) VALUES (1, 'e', '2008-01-01 23:59:59'),
-(2, 'e', '2008-01-01 23:59:59'), (3, 'e', '2008-01-01 23:59:59'),
-(4, 'e', '2008-01-01 23:59:59'), (5, 'e', '2008-01-01 23:59:59'),
-(6, 'e', '2008-01-01 23:59:59'), (7, 'e', '2008-01-01 23:59:59'),
-(8, 'e', '2008-01-01 23:59:59'), (9, 'e', '2008-01-01 23:59:59'),
-(10, 'j', '2008-01-01 23:59:59');
-connection master_1;
-DELETE IGNORE FROM ta_l WHERE a = 2;
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 e 2008-01-01 23:59:59
-3 e 2008-01-01 23:59:59
-4 e 2008-01-01 23:59:59
-5 e 2008-01-01 23:59:59
-6 e 2008-01-01 23:59:59
-7 e 2008-01-01 23:59:59
-8 e 2008-01-01 23:59:59
-9 e 2008-01-01 23:59:59
-10 j 2008-01-01 23:59:59
-
-delete quick
-TRUNCATE TABLE ta_l;
-INSERT INTO ta_l (a, b, c) VALUES (1, 'e', '2008-01-01 23:59:59'),
-(2, 'e', '2008-01-01 23:59:59'), (3, 'e', '2008-01-01 23:59:59'),
-(4, 'e', '2008-01-01 23:59:59'), (5, 'e', '2008-01-01 23:59:59'),
-(6, 'e', '2008-01-01 23:59:59'), (7, 'e', '2008-01-01 23:59:59'),
-(8, 'e', '2008-01-01 23:59:59'), (9, 'e', '2008-01-01 23:59:59'),
-(10, 'j', '2008-01-01 23:59:59');
-connection master_1;
-DELETE QUICK FROM ta_l WHERE a = 2;
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 e 2008-01-01 23:59:59
-3 e 2008-01-01 23:59:59
-4 e 2008-01-01 23:59:59
-5 e 2008-01-01 23:59:59
-6 e 2008-01-01 23:59:59
-7 e 2008-01-01 23:59:59
-8 e 2008-01-01 23:59:59
-9 e 2008-01-01 23:59:59
-10 j 2008-01-01 23:59:59
-
-delete pushdown
-TRUNCATE TABLE ta_l;
-INSERT INTO ta_l (a, b, c) VALUES (1, 'e', '2008-01-01 23:59:59'),
-(2, 'e', '2008-01-01 23:59:59'), (3, 'e', '2008-01-01 23:59:59'),
-(4, 'e', '2008-01-01 23:59:59'), (5, 'e', '2008-01-01 23:59:59'),
-(6, 'e', '2008-01-01 23:59:59'), (7, 'e', '2008-01-01 23:59:59'),
-(8, 'e', '2008-01-01 23:59:59'), (9, 'e', '2008-01-01 23:59:59'),
-(10, 'j', '2008-01-01 23:59:59');
-connection master_1;
-DELETE FROM ta_l WHERE b = 'e';
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-10 j 2008-01-01 23:59:59
-
-delete index pushdown
-TRUNCATE TABLE ta_l;
-INSERT INTO ta_l (a, b, c) VALUES (1, 'e', '2008-01-01 23:59:59'),
-(2, 'e', '2008-01-01 23:59:59'), (3, 'e', '2008-01-01 23:59:59'),
-(4, 'e', '2008-01-01 23:59:59'), (5, 'e', '2008-01-01 23:59:59'),
-(6, 'e', '2008-01-01 23:59:59'), (7, 'e', '2008-01-01 23:59:59'),
-(8, 'e', '2008-01-01 23:59:59'), (9, 'e', '2008-01-01 23:59:59'),
-(10, 'j', '2008-01-01 23:59:59');
-connection master_1;
-DELETE FROM ta_l WHERE a > 0 AND b = 'e';
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-10 j 2008-01-01 23:59:59
-
-truncate
-connection master_1;
-TRUNCATE TABLE ta_l;
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-
-deinit
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-connection child2_1;
-DROP DATABASE IF EXISTS auto_test_remote;
-connection child2_2;
-DROP DATABASE IF EXISTS auto_test_remote2;
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-
-end of test
diff --git a/storage/spider/mysql-test/spider/handler/r/basic_sql_part.result b/storage/spider/mysql-test/spider/handler/r/basic_sql_part.result
deleted file mode 100644
index 0f4029404a7..00000000000
--- a/storage/spider/mysql-test/spider/handler/r/basic_sql_part.result
+++ /dev/null
@@ -1,141 +0,0 @@
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-
-drop and create databases
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-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;
-
-test select 1
-connection master_1;
-SELECT 1;
-1
-1
-connection master_1;
-DROP TABLE IF EXISTS tb_l;
-CREATE TABLE tb_l (
-a INT,
-b CHAR(1),
-c DATETIME,
-PRIMARY KEY(a)
-) MASTER_1_ENGINE2 MASTER_1_CHARSET2
-INSERT INTO tb_l (a, b, c) VALUES
-(1, 'f', '2008-07-01 10:21:39'),
-(2, 'g', '2000-02-01 00:00:00'),
-(3, 'j', '2007-05-04 20:03:11'),
-(4, 'i', '2003-10-30 05:01:03'),
-(5, 'h', '2001-10-31 23:59:59');
-
-create table with partition and select test
-connection master_1;
-CREATE TABLE ta_l2 (
-PRIMARY KEY(a)
-) MASTER_1_ENGINE MASTER_1_COMMENT_P_2_1
-SELECT a, b, c FROM tb_l
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 f 2008-07-01 10:21:39
-2 g 2000-02-01 00:00:00
-3 j 2007-05-04 20:03:11
-4 i 2003-10-30 05:01:03
-5 h 2001-10-31 23:59:59
-
-select partition using pushdown
-connection master_1;
-SELECT a.a, a.b, date_format(a.c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 a WHERE
-a.b = 'g' ORDER BY a.a;
-a b date_format(a.c, '%Y-%m-%d %H:%i:%s')
-2 g 2000-02-01 00:00:00
-
-select partition using index pushdown
-connection master_1;
-SELECT a.a, a.b, date_format(a.c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 a WHERE
-a.a > 0 AND a.b = 'g' ORDER BY a.a;
-a b date_format(a.c, '%Y-%m-%d %H:%i:%s')
-2 g 2000-02-01 00:00:00
-
-update partition pushdown
-connection master_1;
-UPDATE ta_l2 SET b = 'e', c = '2009-03-03 03:03:03' WHERE b = 'j';
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 f 2008-07-01 10:21:39
-2 g 2000-02-01 00:00:00
-3 e 2009-03-03 03:03:03
-4 i 2003-10-30 05:01:03
-5 h 2001-10-31 23:59:59
-
-update partition index pushdown
-connection master_1;
-UPDATE ta_l2 SET b = 'j', c = '2009-03-03 03:03:03' WHERE a > 0 AND b = 'e';
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 f 2008-07-01 10:21:39
-2 g 2000-02-01 00:00:00
-3 j 2009-03-03 03:03:03
-4 i 2003-10-30 05:01:03
-5 h 2001-10-31 23:59:59
-
-delete partition pushdown
-TRUNCATE TABLE ta_l2;
-INSERT INTO ta_l2 SELECT a, b, c FROM tb_l;
-connection master_1;
-DELETE FROM ta_l2 WHERE b = 'g';
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 f 2008-07-01 10:21:39
-3 j 2007-05-04 20:03:11
-4 i 2003-10-30 05:01:03
-5 h 2001-10-31 23:59:59
-
-delete partition index pushdown
-TRUNCATE TABLE ta_l2;
-INSERT INTO ta_l2 SELECT a, b, c FROM tb_l;
-connection master_1;
-DELETE FROM ta_l2 WHERE a > 0 AND b = 'g';
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 f 2008-07-01 10:21:39
-3 j 2007-05-04 20:03:11
-4 i 2003-10-30 05:01:03
-5 h 2001-10-31 23:59:59
-
-deinit
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-connection child2_1;
-DROP DATABASE IF EXISTS auto_test_remote;
-connection child2_2;
-DROP DATABASE IF EXISTS auto_test_remote2;
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-
-end of test
diff --git a/storage/spider/mysql-test/spider/handler/r/direct_aggregate.result b/storage/spider/mysql-test/spider/handler/r/direct_aggregate.result
deleted file mode 100644
index 9a8660ba79e..00000000000
--- a/storage/spider/mysql-test/spider/handler/r/direct_aggregate.result
+++ /dev/null
@@ -1,100 +0,0 @@
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-
-drop and create databases
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-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;
-
-test select 1
-connection master_1;
-SELECT 1;
-1
-1
-
-create table select test
-connection master_1;
-DROP TABLE IF EXISTS ta_l;
-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
-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');
-
-direct_aggregating test
-connection master_1;
-SHOW STATUS LIKE 'Spider_direct_aggregate';
-Variable_name Value
-Spider_direct_aggregate 0
-SELECT COUNT(*) FROM ta_l;
-COUNT(*)
-5
-SHOW STATUS LIKE 'Spider_direct_aggregate';
-Variable_name Value
-Spider_direct_aggregate 0
-SELECT MAX(a) FROM ta_l;
-MAX(a)
-5
-SHOW STATUS LIKE 'Spider_direct_aggregate';
-Variable_name Value
-Spider_direct_aggregate 0
-SELECT MIN(a) FROM ta_l;
-MIN(a)
-1
-SHOW STATUS LIKE 'Spider_direct_aggregate';
-Variable_name Value
-Spider_direct_aggregate 0
-SELECT MAX(a) FROM ta_l WHERE a < 5;
-MAX(a)
-4
-SHOW STATUS LIKE 'Spider_direct_aggregate';
-Variable_name Value
-Spider_direct_aggregate 0
-SELECT MIN(a) FROM ta_l WHERE a > 1;
-MIN(a)
-2
-SHOW STATUS LIKE 'Spider_direct_aggregate';
-Variable_name Value
-Spider_direct_aggregate 0
-
-deinit
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-connection child2_1;
-DROP DATABASE IF EXISTS auto_test_remote;
-connection child2_2;
-DROP DATABASE IF EXISTS auto_test_remote2;
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-
-end of test
diff --git a/storage/spider/mysql-test/spider/handler/r/direct_aggregate_part.result b/storage/spider/mysql-test/spider/handler/r/direct_aggregate_part.result
deleted file mode 100644
index 760b39e16d5..00000000000
--- a/storage/spider/mysql-test/spider/handler/r/direct_aggregate_part.result
+++ /dev/null
@@ -1,90 +0,0 @@
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-
-drop and create databases
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-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;
-
-test select 1
-connection master_1;
-SELECT 1;
-1
-1
-
-with partition test
-connection master_1;
-CREATE TABLE ta_l2 (
-a INT,
-b CHAR(1),
-c DATETIME,
-PRIMARY KEY(a)
-) MASTER_1_ENGINE MASTER_1_COMMENT2_P_2_1
-SHOW STATUS LIKE 'Spider_direct_aggregate';
-Variable_name Value
-Spider_direct_aggregate 0
-SELECT COUNT(*) FROM ta_l2;
-COUNT(*)
-5
-SHOW STATUS LIKE 'Spider_direct_aggregate';
-Variable_name Value
-Spider_direct_aggregate 0
-SELECT MAX(a) FROM ta_l2;
-MAX(a)
-5
-SHOW STATUS LIKE 'Spider_direct_aggregate';
-Variable_name Value
-Spider_direct_aggregate 0
-SELECT MIN(a) FROM ta_l2;
-MIN(a)
-1
-SHOW STATUS LIKE 'Spider_direct_aggregate';
-Variable_name Value
-Spider_direct_aggregate 0
-SELECT MAX(a) FROM ta_l2 WHERE a < 5;
-MAX(a)
-4
-SHOW STATUS LIKE 'Spider_direct_aggregate';
-Variable_name Value
-Spider_direct_aggregate 0
-SELECT MIN(a) FROM ta_l2 WHERE a > 1;
-MIN(a)
-2
-SHOW STATUS LIKE 'Spider_direct_aggregate';
-Variable_name Value
-Spider_direct_aggregate 0
-
-deinit
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-connection child2_1;
-DROP DATABASE IF EXISTS auto_test_remote;
-connection child2_2;
-DROP DATABASE IF EXISTS auto_test_remote2;
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-
-end of test
diff --git a/storage/spider/mysql-test/spider/handler/r/direct_update.result b/storage/spider/mysql-test/spider/handler/r/direct_update.result
deleted file mode 100644
index 0e536d48617..00000000000
--- a/storage/spider/mysql-test/spider/handler/r/direct_update.result
+++ /dev/null
@@ -1,155 +0,0 @@
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-
-drop and create databases
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-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;
-
-test select 1
-connection master_1;
-SELECT 1;
-1
-1
-
-create table select test
-connection master_1;
-DROP TABLE IF EXISTS ta_l;
-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
-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');
-
-direct_updating test
-connection master_1;
-SHOW STATUS LIKE 'Spider_direct_update';
-Variable_name Value
-Spider_direct_update 0
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-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
-update all rows with function
-UPDATE ta_l SET c = ADDDATE(c, 1);
-SHOW STATUS LIKE 'Spider_direct_update';
-Variable_name Value
-Spider_direct_update 1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 a 2008-08-02 10:21:39
-2 b 2000-01-02 00:00:00
-3 e 2007-06-05 20:03:11
-4 d 2003-12-01 05:01:03
-5 c 2002-01-01 23:59:59
-update by primary key
-UPDATE ta_l SET b = 'x' WHERE a = 3;
-SHOW STATUS LIKE 'Spider_direct_update';
-Variable_name Value
-Spider_direct_update 2
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 a 2008-08-02 10:21:39
-2 b 2000-01-02 00:00:00
-3 x 2007-06-05 20:03:11
-4 d 2003-12-01 05:01:03
-5 c 2002-01-01 23:59:59
-update by a column without index
-UPDATE ta_l SET c = '2011-10-17' WHERE b = 'x';
-SHOW STATUS LIKE 'Spider_direct_update';
-Variable_name Value
-Spider_direct_update 3
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 a 2008-08-02 10:21:39
-2 b 2000-01-02 00:00:00
-3 x 2011-10-17 00:00:00
-4 d 2003-12-01 05:01:03
-5 c 2002-01-01 23:59:59
-update by primary key with order and limit
-UPDATE ta_l SET c = ADDDATE(c, 1) WHERE a < 4 ORDER BY b DESC LIMIT 1;
-SHOW STATUS LIKE 'Spider_direct_update';
-Variable_name Value
-Spider_direct_update 4
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 a 2008-08-02 10:21:39
-2 b 2000-01-02 00:00:00
-3 x 2011-10-18 00:00:00
-4 d 2003-12-01 05:01:03
-5 c 2002-01-01 23:59:59
-delete by primary key with order and limit
-DELETE FROM ta_l WHERE a < 4 ORDER BY c LIMIT 1;
-SHOW STATUS LIKE 'Spider_direct_delete';
-Variable_name Value
-Spider_direct_delete 1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 a 2008-08-02 10:21:39
-3 x 2011-10-18 00:00:00
-4 d 2003-12-01 05:01:03
-5 c 2002-01-01 23:59:59
-delete by a column without index
-DELETE FROM ta_l WHERE b = 'c';
-SHOW STATUS LIKE 'Spider_direct_delete';
-Variable_name Value
-Spider_direct_delete 2
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 a 2008-08-02 10:21:39
-3 x 2011-10-18 00:00:00
-4 d 2003-12-01 05:01:03
-delete by primary key
-DELETE FROM ta_l WHERE a = 3;
-SHOW STATUS LIKE 'Spider_direct_delete';
-Variable_name Value
-Spider_direct_delete 3
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 a 2008-08-02 10:21:39
-4 d 2003-12-01 05:01:03
-
-deinit
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-connection child2_1;
-DROP DATABASE IF EXISTS auto_test_remote;
-connection child2_2;
-DROP DATABASE IF EXISTS auto_test_remote2;
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-
-end of test
diff --git a/storage/spider/mysql-test/spider/handler/r/direct_update_part.result b/storage/spider/mysql-test/spider/handler/r/direct_update_part.result
deleted file mode 100644
index 7069cd72fda..00000000000
--- a/storage/spider/mysql-test/spider/handler/r/direct_update_part.result
+++ /dev/null
@@ -1,145 +0,0 @@
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-
-drop and create databases
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-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;
-
-test select 1
-connection master_1;
-SELECT 1;
-1
-1
-
-with partition test
-connection master_1;
-CREATE TABLE ta_l2 (
-a INT,
-b CHAR(1),
-c DATETIME,
-PRIMARY KEY(a)
-) MASTER_1_ENGINE MASTER_1_COMMENT2_P_2_1
-SHOW STATUS LIKE 'Spider_direct_update';
-Variable_name Value
-Spider_direct_update 0
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-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
-update all rows with function
-UPDATE ta_l2 SET c = ADDDATE(c, 1);
-SHOW STATUS LIKE 'Spider_direct_update';
-Variable_name Value
-Spider_direct_update 2
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 a 2008-08-02 10:21:39
-2 b 2000-01-02 00:00:00
-3 e 2007-06-05 20:03:11
-4 d 2003-12-01 05:01:03
-5 c 2002-01-01 23:59:59
-update by primary key
-UPDATE ta_l2 SET b = 'x' WHERE a = 3;
-SHOW STATUS LIKE 'Spider_direct_update';
-Variable_name Value
-Spider_direct_update 3
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 a 2008-08-02 10:21:39
-2 b 2000-01-02 00:00:00
-3 x 2007-06-05 20:03:11
-4 d 2003-12-01 05:01:03
-5 c 2002-01-01 23:59:59
-update by a column without index
-UPDATE ta_l2 SET c = '2011-10-17' WHERE b = 'x';
-SHOW STATUS LIKE 'Spider_direct_update';
-Variable_name Value
-Spider_direct_update 5
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 a 2008-08-02 10:21:39
-2 b 2000-01-02 00:00:00
-3 x 2011-10-17 00:00:00
-4 d 2003-12-01 05:01:03
-5 c 2002-01-01 23:59:59
-update by primary key with order and limit
-UPDATE ta_l2 SET c = ADDDATE(c, 1) WHERE a < 4 ORDER BY b DESC LIMIT 1;
-SHOW STATUS LIKE 'Spider_direct_update';
-Variable_name Value
-Spider_direct_update 6
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 a 2008-08-02 10:21:39
-2 b 2000-01-02 00:00:00
-3 x 2011-10-18 00:00:00
-4 d 2003-12-01 05:01:03
-5 c 2002-01-01 23:59:59
-delete by primary key with order and limit
-DELETE FROM ta_l2 WHERE a < 4 ORDER BY c LIMIT 1;
-SHOW STATUS LIKE 'Spider_direct_delete';
-Variable_name Value
-Spider_direct_delete 1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 a 2008-08-02 10:21:39
-3 x 2011-10-18 00:00:00
-4 d 2003-12-01 05:01:03
-5 c 2002-01-01 23:59:59
-delete by a column without index
-DELETE FROM ta_l2 WHERE b = 'c';
-SHOW STATUS LIKE 'Spider_direct_delete';
-Variable_name Value
-Spider_direct_delete 3
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 a 2008-08-02 10:21:39
-3 x 2011-10-18 00:00:00
-4 d 2003-12-01 05:01:03
-delete by primary key
-DELETE FROM ta_l2 WHERE a = 3;
-SHOW STATUS LIKE 'Spider_direct_delete';
-Variable_name Value
-Spider_direct_delete 4
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 a 2008-08-02 10:21:39
-4 d 2003-12-01 05:01:03
-
-deinit
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-connection child2_1;
-DROP DATABASE IF EXISTS auto_test_remote;
-connection child2_2;
-DROP DATABASE IF EXISTS auto_test_remote2;
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-
-end of test
diff --git a/storage/spider/mysql-test/spider/handler/r/function.result b/storage/spider/mysql-test/spider/handler/r/function.result
deleted file mode 100644
index c088a8a9541..00000000000
--- a/storage/spider/mysql-test/spider/handler/r/function.result
+++ /dev/null
@@ -1,160 +0,0 @@
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-
-drop and create databases
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-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;
-
-test select 1
-connection master_1;
-SELECT 1;
-1
-1
-
-in()
-connection master_1;
-CREATE TABLE t1 (
-a VARCHAR(255),
-PRIMARY KEY(a)
-) MASTER_1_ENGINE MASTER_1_CHARSET3 MASTER_1_COMMENT_TEXT_PK1_1
-insert into t1 values ('1');
-insert into t1 select a + 1 from t1;
-insert into t1 select a + 2 from t1;
-insert into t1 select a + 4 from t1;
-insert into t1 select a + 8 from t1;
-insert into t1 select a + 16 from t1;
-insert into t1 select a + 32 from t1;
-insert into t1 select a + 64 from t1;
-insert into t1 select a + 128 from t1;
-insert into t1 select a + 256 from t1;
-insert into t1 select a + 512 from t1;
-flush tables;
-connection master_1;
-select a from t1 where a in ('15', '120');
-a
-120
-15
-
-date_sub()
-connection master_1;
-DROP TABLE IF EXISTS ta_l;
-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
-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');
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-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
-UPDATE ta_l SET c = DATE_SUB(c, INTERVAL 1 YEAR);
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 a 2007-08-01 10:21:39
-2 b 1999-01-01 00:00:00
-3 e 2006-06-04 20:03:11
-4 d 2002-11-30 05:01:03
-5 c 2000-12-31 23:59:59
-UPDATE ta_l SET c = DATE_ADD(c, INTERVAL 1 QUARTER);
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 a 2007-11-01 10:21:39
-2 b 1999-04-01 00:00:00
-3 e 2006-09-04 20:03:11
-4 d 2003-02-28 05:01:03
-5 c 2001-03-31 23:59:59
-UPDATE ta_l SET c = DATE_SUB(c, INTERVAL 1 MONTH);
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 a 2007-10-01 10:21:39
-2 b 1999-03-01 00:00:00
-3 e 2006-08-04 20:03:11
-4 d 2003-01-28 05:01:03
-5 c 2001-02-28 23:59:59
-UPDATE ta_l SET c = DATE_ADD(c, INTERVAL 1 WEEK);
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 a 2007-10-08 10:21:39
-2 b 1999-03-08 00:00:00
-3 e 2006-08-11 20:03:11
-4 d 2003-02-04 05:01:03
-5 c 2001-03-07 23:59:59
-UPDATE ta_l SET c = DATE_SUB(c, INTERVAL 1 DAY);
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 a 2007-10-07 10:21:39
-2 b 1999-03-07 00:00:00
-3 e 2006-08-10 20:03:11
-4 d 2003-02-03 05:01:03
-5 c 2001-03-06 23:59:59
-UPDATE ta_l SET c = DATE_ADD(c, INTERVAL 1 HOUR);
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 a 2007-10-07 11:21:39
-2 b 1999-03-07 01:00:00
-3 e 2006-08-10 21:03:11
-4 d 2003-02-03 06:01:03
-5 c 2001-03-07 00:59:59
-UPDATE ta_l SET c = DATE_SUB(c, INTERVAL 1 MINUTE);
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 a 2007-10-07 11:20:39
-2 b 1999-03-07 00:59:00
-3 e 2006-08-10 21:02:11
-4 d 2003-02-03 06:00:03
-5 c 2001-03-07 00:58:59
-UPDATE ta_l SET c = DATE_ADD(c, INTERVAL 1 SECOND);
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 a 2007-10-07 11:20:40
-2 b 1999-03-07 00:59:01
-3 e 2006-08-10 21:02:12
-4 d 2003-02-03 06:00:04
-5 c 2001-03-07 00:59:00
-
-deinit
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-connection child2_1;
-DROP DATABASE IF EXISTS auto_test_remote;
-connection child2_2;
-DROP DATABASE IF EXISTS auto_test_remote2;
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-
-end of test
diff --git a/storage/spider/mysql-test/spider/handler/r/ha.result b/storage/spider/mysql-test/spider/handler/r/ha.result
deleted file mode 100644
index 3c37c2d51f0..00000000000
--- a/storage/spider/mysql-test/spider/handler/r/ha.result
+++ /dev/null
@@ -1,286 +0,0 @@
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-
-drop and create databases
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-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;
-connection child2_3;
-DROP DATABASE IF EXISTS auto_test_remote3;
-CREATE DATABASE auto_test_remote3;
-USE auto_test_remote3;
-connection child3_1;
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-connection child3_2;
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-connection child3_3;
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-
-test select 1
-connection master_1;
-SELECT 1;
-1
-1
-
-create table test
-connection master_1;
-DROP TABLE IF EXISTS ta_l;
-CREATE TABLE ta_l (
-a INT,
-b CHAR(1),
-c DATETIME,
-PRIMARY KEY(a)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_HA_2_1
-Warnings:
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-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');
-
-select test
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-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
-
-fail-over test
-connection master_1;
-SHOW STATUS LIKE 'Spider_mon_table_cache_version%';
-Variable_name Value
-Spider_mon_table_cache_version 0
-Spider_mon_table_cache_version_req 1
-INSERT INTO ta_l (a, b, c) VALUES
-(6, 'e', '2011-05-05 20:04:05');
-ERROR HY000: Table 'auto_test_remote2.ta_r3' get a problem
-SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
-ORDER BY db_name, table_name, link_id;
-db_name table_name link_id link_status
-auto_test_local ta_l 0 1
-auto_test_local ta_l 1 3
-SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log;
-db_name table_name link_id
-auto_test_local ta_l 1
-SHOW STATUS LIKE 'Spider_mon_table_cache_version%';
-Variable_name Value
-Spider_mon_table_cache_version 1
-Spider_mon_table_cache_version_req 1
-INSERT INTO ta_l (a, b, c) VALUES
-(6, 'e', '2011-05-05 20:04:05');
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-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
-6 e 2011-05-05 20:04:05
-
-recovery test
-connection master_1;
-ALTER TABLE ta_l
-CONNECTION='host "localhost", user "root", password "",
- msi "5", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 2"';
-Warnings:
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
-ORDER BY db_name, table_name, link_id;
-db_name table_name link_id link_status
-auto_test_local ta_l 0 1
-auto_test_local ta_l 1 2
-SELECT spider_copy_tables('ta_l', '0', '1');
-spider_copy_tables('ta_l', '0', '1')
-1
-connection master_1;
-ALTER TABLE ta_l
-CONNECTION='host "localhost", user "root", password "",
- msi "5", mkd "2",
- database "auto_test_remote auto_test_remote2", lst "0 1"';
-Warnings:
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
-ORDER BY db_name, table_name, link_id;
-db_name table_name link_id link_status
-auto_test_local ta_l 0 1
-auto_test_local ta_l 1 1
-INSERT INTO ta_l (a, b, c) VALUES
-(8, 'g', '2011-05-05 21:33:30');
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-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
-6 e 2011-05-05 20:04:05
-8 g 2011-05-05 21:33:30
-DROP TABLE ta_l;
-connection master_1;
-SELECT spider_flush_table_mon_cache();
-spider_flush_table_mon_cache()
-1
-
-active standby test
-create table test
-connection master_1;
-DROP TABLE IF EXISTS ta_l;
-CREATE TABLE ta_l (
-a INT,
-b CHAR(1),
-c DATETIME,
-PRIMARY KEY(a)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_HA_AS_2_1
-Warnings:
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-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');
-
-select test
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-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
-
-fail-over test
-connection master_1;
-SHOW STATUS LIKE 'Spider_mon_table_cache_version%';
-Variable_name Value
-Spider_mon_table_cache_version 1
-Spider_mon_table_cache_version_req 2
-INSERT INTO ta_l (a, b, c) VALUES
-(6, 'e', '2011-05-05 20:04:05');
-ERROR HY000: Table 'auto_test_remote.ta_r' get a problem
-SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
-ORDER BY db_name, table_name, link_id;
-db_name table_name link_id link_status
-auto_test_local ta_l 0 3
-auto_test_local ta_l 1 1
-SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log;
-db_name table_name link_id
-auto_test_local ta_l 1
-auto_test_local ta_l 0
-SHOW STATUS LIKE 'Spider_mon_table_cache_version%';
-Variable_name Value
-Spider_mon_table_cache_version 2
-Spider_mon_table_cache_version_req 2
-INSERT INTO ta_l (a, b, c) VALUES
-(6, 'e', '2011-05-05 20:04:05');
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-6 e 2011-05-05 20:04:05
-
-recovery test
-connection master_1;
-ALTER TABLE ta_l
-CONNECTION='host "localhost", user "root", password "",
- msi "5", mkd "2", alc "1",
- database "auto_test_remote auto_test_remote2", lst "1 0"';
-Warnings:
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
-ORDER BY db_name, table_name, link_id;
-db_name table_name link_id link_status
-auto_test_local ta_l 0 1
-auto_test_local ta_l 1 1
-INSERT INTO ta_l (a, b, c) VALUES
-(8, 'g', '2011-05-05 21:33:30');
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-8 g 2011-05-05 21:33:30
-DROP TABLE ta_l;
-connection master_1;
-SELECT spider_flush_table_mon_cache();
-spider_flush_table_mon_cache()
-1
-
-deinit
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-connection child2_1;
-DROP DATABASE IF EXISTS auto_test_remote;
-connection child2_2;
-DROP DATABASE IF EXISTS auto_test_remote2;
-connection child2_3;
-DROP DATABASE IF EXISTS auto_test_remote3;
-connection child3_1;
-DROP DATABASE IF EXISTS auto_test_local;
-connection child3_2;
-DROP DATABASE IF EXISTS auto_test_local;
-connection child3_3;
-DROP DATABASE IF EXISTS auto_test_local;
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-
-end of test
diff --git a/storage/spider/mysql-test/spider/handler/r/ha_part.result b/storage/spider/mysql-test/spider/handler/r/ha_part.result
deleted file mode 100644
index 39fa2655892..00000000000
--- a/storage/spider/mysql-test/spider/handler/r/ha_part.result
+++ /dev/null
@@ -1,311 +0,0 @@
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-
-drop and create databases
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-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;
-connection child2_3;
-DROP DATABASE IF EXISTS auto_test_remote3;
-CREATE DATABASE auto_test_remote3;
-USE auto_test_remote3;
-connection child3_1;
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-connection child3_2;
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-connection child3_3;
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-
-test select 1
-connection master_1;
-SELECT 1;
-1
-1
-
-create table with partition test
-connection master_1;
-DROP TABLE IF EXISTS ta_l2;
-CREATE TABLE ta_l2 (
-a INT,
-b CHAR(1),
-c DATETIME,
-PRIMARY KEY(a)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_HA_P_2_1
-Warnings:
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-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');
-
-select test
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-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
-
-fail-over test
-connection master_1;
-SHOW STATUS LIKE 'Spider_mon_table_cache_version%';
-Variable_name Value
-Spider_mon_table_cache_version 0
-Spider_mon_table_cache_version_req 1
-INSERT INTO ta_l2 (a, b, c) VALUES
-(6, 'e', '2011-05-05 20:04:05');
-ERROR HY000: Table 'auto_test_remote3.ta_r4' get a problem
-SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
-ORDER BY db_name, table_name, link_id;
-db_name table_name link_id link_status
-auto_test_local ta_l2#P#pt1 0 1
-auto_test_local ta_l2#P#pt1 1 1
-auto_test_local ta_l2#P#pt2 0 1
-auto_test_local ta_l2#P#pt2 1 3
-SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log;
-db_name table_name link_id
-auto_test_local ta_l2#P#pt2 1
-SHOW STATUS LIKE 'Spider_mon_table_cache_version%';
-Variable_name Value
-Spider_mon_table_cache_version 1
-Spider_mon_table_cache_version_req 1
-INSERT INTO ta_l2 (a, b, c) VALUES
-(6, 'e', '2011-05-05 20:04:05');
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-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
-6 e 2011-05-05 20:04:05
-
-recovery test
-connection master_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"'
- );
-Warnings:
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
-ORDER BY db_name, table_name, link_id;
-db_name table_name link_id link_status
-auto_test_local ta_l2#P#pt1 0 1
-auto_test_local ta_l2#P#pt1 1 1
-auto_test_local ta_l2#P#pt2 0 1
-auto_test_local ta_l2#P#pt2 1 2
-SELECT spider_copy_tables('ta_l2#P#pt2', '0', '1');
-spider_copy_tables('ta_l2#P#pt2', '0', '1')
-1
-connection master_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"'
- );
-Warnings:
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
-ORDER BY db_name, table_name, link_id;
-db_name table_name link_id link_status
-auto_test_local ta_l2#P#pt1 0 1
-auto_test_local ta_l2#P#pt1 1 1
-auto_test_local ta_l2#P#pt2 0 1
-auto_test_local ta_l2#P#pt2 1 1
-INSERT INTO ta_l2 (a, b, c) VALUES
-(8, 'g', '2011-05-05 21:33:30'),
-(9, 'h', '2011-05-05 22:32:10');
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-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
-6 e 2011-05-05 20:04:05
-8 g 2011-05-05 21:33:30
-9 h 2011-05-05 22:32:10
-DROP TABLE ta_l2;
-
-create table with partition test
-connection master_1;
-DROP TABLE IF EXISTS ta_l2;
-CREATE TABLE ta_l2 (
-a INT,
-b CHAR(1),
-c DATETIME,
-PRIMARY KEY(a)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_HA_AS_P_2_1
-Warnings:
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-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');
-
-select test
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-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
-
-fail-over test
-connection master_1;
-SHOW STATUS LIKE 'Spider_mon_table_cache_version%';
-Variable_name Value
-Spider_mon_table_cache_version 1
-Spider_mon_table_cache_version_req 1
-INSERT INTO ta_l2 (a, b, c) VALUES
-(6, 'e', '2011-05-05 20:04:05');
-ERROR HY000: Table 'auto_test_remote.ta_r2' get a problem
-SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
-ORDER BY db_name, table_name, link_id;
-db_name table_name link_id link_status
-auto_test_local ta_l2#P#pt1 0 1
-auto_test_local ta_l2#P#pt1 1 1
-auto_test_local ta_l2#P#pt2 0 3
-auto_test_local ta_l2#P#pt2 1 1
-SELECT db_name, table_name, link_id FROM mysql.spider_link_failed_log;
-db_name table_name link_id
-auto_test_local ta_l2#P#pt2 1
-auto_test_local ta_l2#P#pt2 0
-SHOW STATUS LIKE 'Spider_mon_table_cache_version%';
-Variable_name Value
-Spider_mon_table_cache_version 1
-Spider_mon_table_cache_version_req 1
-INSERT INTO ta_l2 (a, b, c) VALUES
-(6, 'e', '2011-05-05 20:04:05');
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 a 2008-08-01 10:21:39
-3 e 2007-06-04 20:03:11
-5 c 2001-12-31 23:59:59
-6 e 2011-05-05 20:04:05
-
-recovery test
-connection master_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"'
- );
-Warnings:
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
-ORDER BY db_name, table_name, link_id;
-db_name table_name link_id link_status
-auto_test_local ta_l2#P#pt1 0 1
-auto_test_local ta_l2#P#pt1 1 1
-auto_test_local ta_l2#P#pt2 0 1
-auto_test_local ta_l2#P#pt2 1 1
-INSERT INTO ta_l2 (a, b, c) VALUES
-(8, 'g', '2011-05-05 21:33:30'),
-(9, 'h', '2011-05-05 22:32:10');
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 a 2008-08-01 10:21:39
-3 e 2007-06-04 20:03:11
-5 c 2001-12-31 23:59:59
-8 g 2011-05-05 21:33:30
-9 h 2011-05-05 22:32:10
-DROP TABLE ta_l2;
-
-deinit
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-connection child2_1;
-DROP DATABASE IF EXISTS auto_test_remote;
-connection child2_2;
-DROP DATABASE IF EXISTS auto_test_remote2;
-connection child2_3;
-DROP DATABASE IF EXISTS auto_test_remote3;
-connection child3_1;
-DROP DATABASE IF EXISTS auto_test_local;
-connection child3_2;
-DROP DATABASE IF EXISTS auto_test_local;
-connection child3_3;
-DROP DATABASE IF EXISTS auto_test_local;
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-
-end of test
diff --git a/storage/spider/mysql-test/spider/handler/r/spider3_fixes.result b/storage/spider/mysql-test/spider/handler/r/spider3_fixes.result
deleted file mode 100644
index abe543fe193..00000000000
--- a/storage/spider/mysql-test/spider/handler/r/spider3_fixes.result
+++ /dev/null
@@ -1,245 +0,0 @@
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-for slave1_1
-
-drop and create databases
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-connection slave1_1;
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-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;
-
-test select 1
-connection master_1;
-SELECT 1;
-1
-1
-
-3.1
-auto_increment
-connection master_1;
-SET @original_spider_auto_increment_mode = @@SESSION.spider_auto_increment_mode;
-SET SESSION spider_auto_increment_mode = -1;
-Warnings:
-Warning 138 The option value -1 (use table value) is deprecated and will be removed in a future release
-connection slave1_1;
-connection master_1;
-DROP TABLE IF EXISTS t1, t2;
-CREATE TABLE t1 (
-id int(11) NOT NULL AUTO_INCREMENT,
-PRIMARY KEY (id)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_1
-CREATE TABLE t2 (
-id int(11) NOT NULL AUTO_INCREMENT,
-PRIMARY KEY (id)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_1
-MASTER_1_AUTO_INCREMENT_INCREMENT2
-MASTER_1_AUTO_INCREMENT_OFFSET2
-spider_direct_sql('SET SESSION AUTO_INCREMENT_INCREMENT = 4', '',
-'srv "s_2_1"')
-1
-spider_direct_sql('SET SESSION AUTO_INCREMENT_INCREMENT = 4', '',
-'srv "s_2_2"')
-1
-spider_bg_direct_sql('SET SESSION AUTO_INCREMENT_OFFSET = 2', '',
-'srv "s_2_1"')
-1
-spider_bg_direct_sql('SET SESSION AUTO_INCREMENT_OFFSET = 3', '',
-'srv "s_2_2"')
-1
-CREATE TABLE t1 (
-id int(11) NOT NULL AUTO_INCREMENT,
-PRIMARY KEY (id)
-) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_1
-CREATE TABLE t2 (
-id int(11) NOT NULL AUTO_INCREMENT,
-PRIMARY KEY (id)
-) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_1
-INSERT INTO t1 () VALUES ();
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-2
-SELECT MAX(id) FROM t1;
-MAX(id)
-2
-INSERT INTO t2 () VALUES ();
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-6
-SELECT MAX(id) FROM t2;
-MAX(id)
-6
-MASTER_1_AUTO_INCREMENT_OFFSET3
-INSERT INTO t1 (id) VALUES (null);
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-10
-SELECT MAX(id) FROM t1;
-MAX(id)
-10
-MASTER_1_AUTO_INCREMENT_OFFSET4
-INSERT INTO t2 (id) VALUES (null);
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-14
-SELECT MAX(id) FROM t2;
-MAX(id)
-14
-MASTER_1_AUTO_INCREMENT_OFFSET3
-INSERT INTO t1 () VALUES (),(),(),();
-Warnings:
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-18
-SELECT id FROM t1 ORDER BY id;
-id
-2
-6
-10
-14
-18
-22
-26
-30
-MASTER_1_AUTO_INCREMENT_OFFSET4
-INSERT INTO t2 () VALUES (),(),(),();
-Warnings:
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-34
-SELECT id FROM t2 ORDER BY id;
-id
-2
-6
-10
-14
-18
-22
-26
-30
-34
-38
-42
-46
-TRUNCATE TABLE t1;
-TRUNCATE TABLE t2;
-INSERT INTO t1 () VALUES (),(),(),();
-Warnings:
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-2
-SELECT id FROM t1 ORDER BY id;
-id
-2
-6
-10
-14
-INSERT INTO t2 () VALUES (),(),(),();
-Warnings:
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-18
-SELECT id FROM t2 ORDER BY id;
-id
-2
-6
-10
-14
-18
-22
-26
-30
-SET INSERT_ID=5000;
-MASTER_1_AUTO_INCREMENT_OFFSET3
-INSERT INTO t1 () VALUES ();
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-34
-SELECT MAX(id) FROM t1;
-MAX(id)
-34
-MASTER_1_AUTO_INCREMENT_OFFSET4
-INSERT INTO t2 () VALUES ();
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-38
-SELECT MAX(id) FROM t2;
-MAX(id)
-38
-INSERT INTO t1 (id) VALUES (10000);
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-42
-SELECT MAX(id) FROM t1;
-MAX(id)
-42
-INSERT INTO t2 (id) VALUES (1000);
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-46
-SELECT MAX(id) FROM t2;
-MAX(id)
-46
-SET SESSION spider_auto_increment_mode = @original_spider_auto_increment_mode;
-connection slave1_1;
-SELECT id FROM t1 ORDER BY id;
-id
-2
-34
-777
-1554
-2331
-10000
-connection master_1;
-
-deinit
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-connection slave1_1;
-DROP DATABASE IF EXISTS auto_test_local;
-connection child2_1;
-DROP DATABASE IF EXISTS auto_test_remote;
-connection child2_2;
-DROP DATABASE IF EXISTS auto_test_remote2;
-for slave1_1
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-
-end of test
diff --git a/storage/spider/mysql-test/spider/handler/r/spider3_fixes_part.result b/storage/spider/mysql-test/spider/handler/r/spider3_fixes_part.result
deleted file mode 100644
index 6c3a1802f1d..00000000000
--- a/storage/spider/mysql-test/spider/handler/r/spider3_fixes_part.result
+++ /dev/null
@@ -1,243 +0,0 @@
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-for slave1_1
-
-drop and create databases
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-connection slave1_1;
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-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;
-
-test select 1
-connection master_1;
-SELECT 1;
-1
-1
-auto_increment with partition
-connection master_1;
-SET @original_spider_auto_increment_mode = @@SESSION.spider_auto_increment_mode;
-SET SESSION spider_auto_increment_mode = -1;
-Warnings:
-Warning 138 The option value -1 (use table value) is deprecated and will be removed in a future release
-connection slave1_1;
-connection master_1;
-DROP TABLE IF EXISTS t1, t2;
-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
-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
-MASTER_1_AUTO_INCREMENT_INCREMENT2
-MASTER_1_AUTO_INCREMENT_OFFSET2
-spider_direct_sql('SET SESSION AUTO_INCREMENT_INCREMENT = 4', '',
-'srv "s_2_1"')
-1
-spider_direct_sql('SET SESSION AUTO_INCREMENT_INCREMENT = 4', '',
-'srv "s_2_2"')
-1
-spider_bg_direct_sql('SET SESSION AUTO_INCREMENT_OFFSET = 2', '',
-'srv "s_2_1"')
-1
-spider_bg_direct_sql('SET SESSION AUTO_INCREMENT_OFFSET = 3', '',
-'srv "s_2_2"')
-1
-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
-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
-INSERT INTO t1 () VALUES ();
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-3
-SELECT MAX(id) FROM t1;
-MAX(id)
-3
-INSERT INTO t2 () VALUES ();
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-7
-SELECT MAX(id) FROM t2;
-MAX(id)
-7
-MASTER_1_AUTO_INCREMENT_OFFSET3
-INSERT INTO t1 (id) VALUES (null);
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-2
-SELECT MAX(id) FROM t1;
-MAX(id)
-7
-MASTER_1_AUTO_INCREMENT_OFFSET4
-INSERT INTO t2 (id) VALUES (null);
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-6
-SELECT MAX(id) FROM t2;
-MAX(id)
-7
-MASTER_1_AUTO_INCREMENT_OFFSET3
-INSERT INTO t1 () VALUES (),(),(),();
-Warnings:
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-10
-SELECT id FROM t1 ORDER BY id;
-id
-2
-3
-6
-7
-10
-11
-14
-15
-MASTER_1_AUTO_INCREMENT_OFFSET4
-INSERT INTO t2 () VALUES (),(),(),();
-Warnings:
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-18
-SELECT id FROM t2 ORDER BY id;
-id
-2
-3
-6
-7
-10
-11
-14
-15
-18
-19
-22
-23
-TRUNCATE TABLE t1;
-TRUNCATE TABLE t2;
-INSERT INTO t1 () VALUES (),(),(),();
-Warnings:
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-2
-SELECT id FROM t1 ORDER BY id;
-id
-2
-3
-6
-7
-INSERT INTO t2 () VALUES (),(),(),();
-Warnings:
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-10
-SELECT id FROM t2 ORDER BY id;
-id
-2
-3
-6
-7
-10
-11
-14
-15
-SET INSERT_ID=5000;
-MASTER_1_AUTO_INCREMENT_OFFSET3
-INSERT INTO t1 () VALUES ();
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-18
-SELECT MAX(id) FROM t1;
-MAX(id)
-18
-MASTER_1_AUTO_INCREMENT_OFFSET4
-INSERT INTO t2 () VALUES ();
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-19
-SELECT MAX(id) FROM t2;
-MAX(id)
-19
-INSERT INTO t1 (id) VALUES (10000);
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-22
-SELECT MAX(id) FROM t1;
-MAX(id)
-22
-INSERT INTO t2 (id) VALUES (1000);
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-26
-SELECT MAX(id) FROM t2;
-MAX(id)
-26
-SET SESSION spider_auto_increment_mode = @original_spider_auto_increment_mode;
-connection slave1_1;
-SELECT id FROM t1 ORDER BY id;
-id
-2
-18
-777
-1554
-2331
-10000
-connection master_1;
-
-deinit
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-connection slave1_1;
-DROP DATABASE IF EXISTS auto_test_local;
-connection child2_1;
-DROP DATABASE IF EXISTS auto_test_remote;
-connection child2_2;
-DROP DATABASE IF EXISTS auto_test_remote2;
-for slave1_1
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-
-end of test
diff --git a/storage/spider/mysql-test/spider/handler/r/spider_fixes.result b/storage/spider/mysql-test/spider/handler/r/spider_fixes.result
deleted file mode 100644
index aa7d2ea40c1..00000000000
--- a/storage/spider/mysql-test/spider/handler/r/spider_fixes.result
+++ /dev/null
@@ -1,640 +0,0 @@
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-for slave1_1
-
-drop and create databases
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-connection slave1_1;
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-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;
-
-test select 1
-connection master_1;
-SELECT 1;
-1
-1
-
-create table and insert
-connection master_1;
-DROP TABLE IF EXISTS tb_l;
-CREATE TABLE tb_l (
-a INT,
-b CHAR(1),
-c DATETIME,
-PRIMARY KEY(a)
-) MASTER_1_ENGINE2 MASTER_1_CHARSET2
-INSERT INTO tb_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');
-DROP TABLE IF EXISTS ta_l;
-CREATE TABLE ta_l (
-PRIMARY KEY(a)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
-INSERT INTO ta_l SELECT a, b, c FROM tb_l;
-
-2.13
-select table with "order by desc" and "<"
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
-WHERE a < 5 ORDER BY a DESC LIMIT 3;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-4 d 2003-11-30 05:01:03
-3 e 2007-06-04 20:03:11
-2 b 2000-01-01 00:00:00
-
-select table with "order by desc" and "<="
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
-WHERE a <= 5 ORDER BY a DESC LIMIT 3;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-5 c 2001-12-31 23:59:59
-4 d 2003-11-30 05:01:03
-3 e 2007-06-04 20:03:11
-
-2.14
-update table with range scan and split_read
-connection master_1;
-UPDATE ta_l SET c = '2000-02-02 00:00:00' WHERE a > 1;
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 a 2008-08-01 10:21:39
-2 b 2000-02-02 00:00:00
-3 e 2000-02-02 00:00:00
-4 d 2000-02-02 00:00:00
-5 c 2000-02-02 00:00:00
-
-2.15
-select table with range scan
-TRUNCATE TABLE ta_l;
-DROP TABLE IF EXISTS ta_l;
-connection master_1;
-CREATE TABLE ta_l (
-a int(11) NOT NULL DEFAULT '0',
-b char(1) DEFAULT NULL,
-c datetime DEFAULT NULL,
-PRIMARY KEY (a, b, c)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT5_2_1
-INSERT INTO ta_l SELECT a, b, c FROM tb_l;
-connection master_1;
-SELECT a, b, c FROM ta_l FORCE INDEX(PRIMARY) WHERE a = 4 AND b >= 'b'
-AND c = '2003-11-30 05:01:03';
-a b c
-4 d 2003-11-30 05:01:03
-connection master_1;
-SELECT a, b, c FROM ta_l FORCE INDEX(PRIMARY) WHERE a = 4 AND b > 'b'
-AND c = '2003-11-30 05:01:03';
-a b c
-4 d 2003-11-30 05:01:03
-connection master_1;
-SELECT a, b, c FROM ta_l FORCE INDEX(PRIMARY) WHERE a >= 4 AND b = 'd'
-AND c = '2003-11-30 05:01:03';
-a b c
-4 d 2003-11-30 05:01:03
-connection master_1;
-SELECT a, b, c FROM ta_l FORCE INDEX(PRIMARY) WHERE a > 4 AND b = 'c'
-AND c = '2001-12-31 23:59:59';
-a b c
-5 c 2001-12-31 23:59:59
-connection master_1;
-SELECT a, b, c FROM ta_l FORCE INDEX(PRIMARY) WHERE a = 4 AND b <= 'd'
-AND c = '2003-11-30 05:01:03';
-a b c
-4 d 2003-11-30 05:01:03
-connection master_1;
-SELECT a, b, c FROM ta_l FORCE INDEX(PRIMARY) WHERE a = 4 AND b < 'e'
-AND c = '2003-11-30 05:01:03';
-a b c
-4 d 2003-11-30 05:01:03
-connection master_1;
-SELECT a, b, c FROM ta_l FORCE INDEX(PRIMARY) WHERE a <= 4 AND b = 'b'
-AND c = '2000-01-01 00:00:00';
-a b c
-2 b 2000-01-01 00:00:00
-connection master_1;
-SELECT a, b, c FROM ta_l FORCE INDEX(PRIMARY) WHERE a < 4 AND b = 'b'
-AND c = '2000-01-01 00:00:00';
-a b c
-2 b 2000-01-01 00:00:00
-connection master_1;
-SELECT a, b, c FROM ta_l FORCE INDEX(PRIMARY) WHERE a = 4 AND b >= 'b'
-AND b <= 'd' AND c = '2003-11-30 05:01:03';
-a b c
-4 d 2003-11-30 05:01:03
-connection master_1;
-SELECT a, b, c FROM ta_l FORCE INDEX(PRIMARY) WHERE a = 4 AND b > 'b'
-AND b < 'e' AND c = '2003-11-30 05:01:03';
-a b c
-4 d 2003-11-30 05:01:03
-connection master_1;
-SELECT a, b, c FROM ta_l FORCE INDEX(PRIMARY) WHERE a <= 4 AND a >= 1
-AND b >= 'b' AND c = '2003-11-30 05:01:03';
-a b c
-4 d 2003-11-30 05:01:03
-connection master_1;
-SELECT a, b, c FROM ta_l FORCE INDEX(PRIMARY) WHERE a < 4 AND a > 1
-AND b >= 'b' AND c = '2000-01-01 00:00:00';
-a b c
-2 b 2000-01-01 00:00:00
-
-2.16
-auto_increment insert with trigger
-connection master_1;
-CREATE TABLE ta_l_auto_inc (
-a INT AUTO_INCREMENT,
-b CHAR(1) DEFAULT 'c',
-c DATETIME DEFAULT '1999-10-10 10:10:10',
-PRIMARY KEY(a)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT3_2_1
-CREATE TABLE tc_l (
-a INT,
-b CHAR(1),
-c DATETIME,
-PRIMARY KEY(a)
-) MASTER_1_ENGINE2 MASTER_1_CHARSET2
-CREATE TRIGGER ins_ta_l_auto_inc AFTER INSERT ON ta_l_auto_inc FOR EACH ROW BEGIN INSERT INTO tc_l (a, b, c) VALUES (NEW.a, NEW.b, NEW.c); END;;
-connection master_1;
-INSERT INTO ta_l_auto_inc (a, b, c) VALUES
-(NULL, 's', '2008-12-31 20:59:59');
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM tc_l ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-1 s 2008-12-31 20:59:59
-
-2.17
-engine-condition-pushdown with "or" and joining
-connection master_1;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l WHERE a = 1 OR a IN (SELECT a FROM tb_l);
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-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
-
-2.23
-index merge
-connection master_1;
-CREATE TABLE ta_l_int (
-a INT AUTO_INCREMENT,
-b INT DEFAULT 10,
-c INT DEFAULT 11,
-PRIMARY KEY(a),
-KEY idx1(b),
-KEY idx2(c)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT4_2_1
-INSERT INTO ta_l_int (a, b, c) VALUES (1, 2, 3);
-INSERT INTO ta_l_int (a, b, c) SELECT a + 1, b + 1, c + 1 FROM ta_l_int;
-INSERT INTO ta_l_int (a, b, c) SELECT a + 2, b + 2, c + 2 FROM ta_l_int;
-INSERT INTO ta_l_int (a, b, c) SELECT a + 4, b + 4, c + 4 FROM ta_l_int;
-INSERT INTO ta_l_int (a, b, c) SELECT a + 8, b + 8, c + 8 FROM ta_l_int;
-connection master_1;
-SELECT a, b, c FROM ta_l_int force index(primary, idx1, idx2)
-WHERE a = 5 OR b = 5 OR c = 5 ORDER BY a;
-a b c
-3 4 5
-4 5 6
-5 6 7
-
-2.24
-index scan update without PK
-connection master_1;
-DROP TABLE IF EXISTS ta_l_int;
-CREATE TABLE ta_l_int (
-a INT NOT NULL,
-b INT DEFAULT 10,
-c INT DEFAULT 11,
-KEY idx1(b),
-KEY idx2(c)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT4_2_1
-SELECT a, b, c FROM ta_l_int ORDER BY a;
-a b c
-1 2 3
-2 3 4
-3 4 5
-4 5 6
-5 6 7
-6 7 8
-7 8 9
-8 9 10
-9 10 11
-10 11 12
-11 12 13
-12 13 14
-13 14 15
-14 15 16
-15 16 17
-16 17 18
-INSERT INTO ta_l_int (a, b, c) VALUES (0, 2, 3);
-INSERT INTO ta_l_int (a, b, c) VALUES (18, 2, 3);
-connection master_1;
-UPDATE ta_l_int SET c = 4 WHERE b = 2;
-connection master_1;
-SELECT a, b, c FROM ta_l_int ORDER BY a;
-a b c
-1 2 4
-2 3 4
-3 4 5
-4 5 6
-5 6 7
-6 7 8
-7 8 9
-8 9 10
-9 10 11
-10 11 12
-11 12 13
-12 13 14
-13 14 15
-14 15 16
-15 16 17
-16 17 18
-17 2 4
-18 2 4
-
-2.25
-direct order limit
-connection master_1;
-SHOW STATUS LIKE 'Spider_direct_order_limit';
-Variable_name Value
-Spider_direct_order_limit 2
-SELECT a, b, c FROM ta_l_int ORDER BY a LIMIT 3;
-a b c
-1 2 4
-2 3 4
-3 4 5
-SHOW STATUS LIKE 'Spider_direct_order_limit';
-Variable_name Value
-Spider_direct_order_limit 3
-
-2.26
-lock tables
-connection master_1;
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t2;
-CREATE TABLE t1 (
-id int(11) NOT NULL,
-PRIMARY KEY (id)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_LOCK1
-Warnings:
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-CREATE TABLE t2 (
-id int(11) NOT NULL,
-PRIMARY KEY (id)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_LOCK2
-Warnings:
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
-LOCK TABLES t1 READ, t2 READ;
-UNLOCK TABLES;
-
-auto_increment
-connection master_1;
-SET @original_spider_auto_increment_mode = @@SESSION.spider_auto_increment_mode;
-SET SESSION spider_auto_increment_mode = -1;
-Warnings:
-Warning 138 The option value -1 (use table value) is deprecated and will be removed in a future release
-connection slave1_1;
-connection master_1;
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (
-id int(11) NOT NULL AUTO_INCREMENT,
-PRIMARY KEY (id)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_INCREMENT1_1
-MASTER_1_AUTO_INCREMENT_INCREMENT2
-MASTER_1_AUTO_INCREMENT_OFFSET2
-spider_direct_sql('SET SESSION AUTO_INCREMENT_INCREMENT = 4', '',
-'srv "s_2_1"')
-1
-spider_direct_sql('SET SESSION AUTO_INCREMENT_INCREMENT = 4', '',
-'srv "s_2_2"')
-1
-spider_bg_direct_sql('SET SESSION AUTO_INCREMENT_OFFSET = 2', '',
-'srv "s_2_1"')
-1
-spider_bg_direct_sql('SET SESSION AUTO_INCREMENT_OFFSET = 3', '',
-'srv "s_2_2"')
-1
-CREATE TABLE t1 (
-id int(11) NOT NULL AUTO_INCREMENT,
-PRIMARY KEY (id)
-) SLAVE1_1_ENGINE SLAVE1_1_CHARSET SLAVE1_1_COMMENT_INCREMENT1_1
-INSERT INTO t1 () VALUES ();
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-2
-SELECT MAX(id) FROM t1;
-MAX(id)
-2
-INSERT INTO t1 () VALUES ();
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-6
-SELECT MAX(id) FROM t1;
-MAX(id)
-6
-INSERT INTO t1 (id) VALUES (null);
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-10
-SELECT MAX(id) FROM t1;
-MAX(id)
-10
-INSERT INTO t1 (id) VALUES (null);
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-14
-SELECT MAX(id) FROM t1;
-MAX(id)
-14
-INSERT INTO t1 () VALUES (),(),(),();
-Warnings:
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-18
-SELECT id FROM t1 ORDER BY id;
-id
-2
-6
-10
-14
-18
-22
-26
-30
-SET INSERT_ID=5000;
-INSERT INTO t1 () VALUES ();
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-34
-SELECT MAX(id) FROM t1;
-MAX(id)
-34
-INSERT INTO t1 (id) VALUES (10000);
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-38
-SELECT MAX(id) FROM t1;
-MAX(id)
-38
-INSERT INTO t1 (id) VALUES (1000);
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-42
-SELECT MAX(id) FROM t1;
-MAX(id)
-42
-SET SESSION spider_auto_increment_mode = @original_spider_auto_increment_mode;
-connection slave1_1;
-SELECT id FROM t1 ORDER BY id;
-id
-2
-6
-10
-14
-18
-34
-777
-1000
-1554
-2331
-10000
-connection master_1;
-
-read only
-connection master_1;
-SET @original_spider_read_only_mode = @@SESSION.spider_read_only_mode;
-SET SESSION spider_read_only_mode = -1;
-Warnings:
-Warning 138 The option value -1 (use table value) is deprecated and will be removed in a future release
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (
-id int(11) NOT NULL,
-PRIMARY KEY (id)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_READONLY1_1
-SELECT id FROM t1 ORDER BY id;
-id
-2
-6
-10
-14
-18
-22
-26
-30
-34
-38
-42
-INSERT INTO t1 (id) VALUES (1);
-ERROR HY000: Table 'auto_test_local.t1' is read only
-UPDATE t1 SET id = 4 WHERE id = 2;
-ERROR HY000: Table 'auto_test_local.t1' is read only
-DELETE FROM t1 WHERE id = 2;
-ERROR HY000: Table 'auto_test_local.t1' is read only
-DELETE FROM t1;
-ERROR HY000: Table 'auto_test_local.t1' is read only
-TRUNCATE t1;
-ERROR HY000: Table 'auto_test_local.t1' is read only
-SET SESSION spider_read_only_mode = @original_spider_read_only_mode;
-
-2.27
-error mode
-connection master_1;
-SET @original_spider_error_read_mode = @@SESSION.spider_error_read_mode;
-SET @original_spider_error_write_mode = @@SESSION.spider_error_write_mode;
-SET SESSION spider_error_read_mode = -1;
-Warnings:
-Warning 138 The option value -1 (use table value) is deprecated and will be removed in a future release
-SET SESSION spider_error_write_mode = -1;
-Warnings:
-Warning 138 The option value -1 (use table value) is deprecated and will be removed in a future release
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (
-id int(11) NOT NULL,
-PRIMARY KEY (id)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_ERROR_MODE1_1
-SELECT id FROM t1 ORDER BY id;
-id
-Warnings:
-Error 12702 Remote table 'auto_test_remote.ter1_1' is not found
-Error 1146 Table 'auto_test_remote.ter1_1' doesn't exist
-INSERT INTO t1 (id) VALUES (1);
-Warnings:
-Error 1146 Table 'auto_test_remote.ter1_1' doesn't exist
-DELETE FROM t1;
-Warnings:
-Error 12702 Remote table 'auto_test_remote.ter1_1' is not found
-Error 12702 Remote table 'auto_test_remote.ter1_1' is not found
-Error 1146 Table 'auto_test_remote.ter1_1' doesn't exist
-TRUNCATE t1;
-Warnings:
-Error 1146 Table 'auto_test_remote.ter1_1' doesn't exist
-SET SESSION spider_error_read_mode = @original_spider_error_read_mode;
-SET SESSION spider_error_write_mode = @original_spider_error_write_mode;
-
-3.0
-is null
-connection master_1;
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (
-a VARCHAR(255),
-b VARCHAR(255),
-c VARCHAR(255),
-KEY idx1(a,b),
-KEY idx2(b),
-PRIMARY KEY(c)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_TEXT_KEY1_1
-insert into t1 values (null, null, '2048');
-insert into t1 values ('1', '1', '1');
-insert into t1 select a + 1, b + 1, c + 1 from t1;
-insert into t1 select a + 2, b + 2, c + 2 from t1;
-insert into t1 select a + 4, b + 4, c + 4 from t1;
-insert into t1 select a + 8, b + 8, c + 8 from t1;
-insert into t1 select a + 16, b + 16, c + 16 from t1;
-insert into t1 select a + 32, b + 32, c + 32 from t1;
-insert into t1 select a + 64, b + 64, c + 64 from t1;
-insert into t1 select a + 128, b + 128, c + 128 from t1;
-insert into t1 select a + 256, b + 256, c + 256 from t1;
-insert into t1 select a + 512, b + 512, c + 512 from t1;
-flush tables;
-connection master_1;
-select a from t1 where a is null order by a limit 30;
-a
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-select b from t1 where b is null order by b limit 30;
-b
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-
-direct_order_limit
-connection master_1;
-TRUNCATE TABLE t1;
-insert into t1 values ('1', '1', '1');
-insert into t1 select a + 1, b + 1, c + 1 from t1;
-insert into t1 select a + 2, b + 2, c + 2 from t1;
-insert into t1 select a + 4, b + 4, c + 4 from t1;
-insert into t1 select a + 8, b + 8, c + 8 from t1;
-insert into t1 select a + 16, b + 16, c + 16 from t1;
-insert into t1 select a, b + 32, c + 32 from t1;
-insert into t1 select a, b + 64, c + 64 from t1;
-insert into t1 select a, b + 128, c + 128 from t1;
-flush tables;
-connection master_1;
-select a, b, c from t1 where a = '10' and b <> '100' order by c desc limit 5;
-a b c
-10 74 74
-10 42 42
-10 234 234
-10 202 202
-10 170 170
-select a, c from t1 where a = '10' order by b desc limit 5;
-a c
-10 74
-10 42
-10 234
-10 202
-10 170
-
-deinit
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-connection slave1_1;
-DROP DATABASE IF EXISTS auto_test_local;
-connection child2_1;
-DROP DATABASE IF EXISTS auto_test_remote;
-connection child2_2;
-DROP DATABASE IF EXISTS auto_test_remote2;
-for slave1_1
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-
-end of test
diff --git a/storage/spider/mysql-test/spider/handler/r/spider_fixes_part.result b/storage/spider/mysql-test/spider/handler/r/spider_fixes_part.result
deleted file mode 100644
index 249f39520c2..00000000000
--- a/storage/spider/mysql-test/spider/handler/r/spider_fixes_part.result
+++ /dev/null
@@ -1,246 +0,0 @@
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-for slave1_1
-
-drop and create databases
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-connection slave1_1;
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-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;
-
-test select 1
-connection master_1;
-SELECT 1;
-1
-1
-connection master_1;
-DROP TABLE IF EXISTS tb_l;
-CREATE TABLE tb_l (
-a INT,
-b CHAR(1),
-c DATETIME,
-PRIMARY KEY(a)
-) MASTER_1_ENGINE2 MASTER_1_CHARSET2
-INSERT INTO tb_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');
-
-2.17
-partition with sort
-connection master_1;
-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 SELECT a, b, c FROM tb_l;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 WHERE a > 1
-ORDER BY a;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-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
-
-2.23
-partition update with moving partition
-connection master_1;
-DROP TABLE IF EXISTS ta_l2;
-connection master_1;
-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 (3, 'B', '2010-09-26 00:00:00');
-UPDATE ta_l2 SET a = 4 WHERE a = 3;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2;
-a b date_format(c, '%Y-%m-%d %H:%i:%s')
-4 B 2010-09-26 00:00:00
-index merge with partition
-connection master_1;
-DROP TABLE IF EXISTS ta_l_int;
-connection master_1;
-CREATE TABLE ta_l_int (
-a INT AUTO_INCREMENT,
-b INT DEFAULT 10,
-c INT DEFAULT 11,
-PRIMARY KEY(a),
-KEY idx1(b),
-KEY idx2(c)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT3_P_2_1
-INSERT INTO ta_l_int (a, b, c) VALUES (1, 2, 3);
-INSERT INTO ta_l_int (a, b, c) SELECT a + 1, b + 1, c + 1 FROM ta_l_int;
-INSERT INTO ta_l_int (a, b, c) SELECT a + 2, b + 2, c + 2 FROM ta_l_int;
-INSERT INTO ta_l_int (a, b, c) SELECT a + 4, b + 4, c + 4 FROM ta_l_int;
-INSERT INTO ta_l_int (a, b, c) SELECT a + 8, b + 8, c + 8 FROM ta_l_int;
-connection master_1;
-SELECT a, b, c FROM ta_l_int force index(primary, idx1, idx2)
-WHERE a = 5 OR b = 5 OR c = 5 ORDER BY a;
-a b c
-3 4 5
-4 5 6
-5 6 7
-
-2.26
-auto_increment with partition
-connection master_1;
-SET @original_spider_auto_increment_mode = @@SESSION.spider_auto_increment_mode;
-SET SESSION spider_auto_increment_mode = -1;
-Warnings:
-Warning 138 The option value -1 (use table value) is deprecated and will be removed in a future release
-connection slave1_1;
-connection master_1;
-DROP TABLE IF EXISTS t1;
-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
-MASTER_1_AUTO_INCREMENT_INCREMENT2
-MASTER_1_AUTO_INCREMENT_OFFSET2
-spider_direct_sql('SET SESSION AUTO_INCREMENT_INCREMENT = 4', '',
-'srv "s_2_1"')
-1
-spider_direct_sql('SET SESSION AUTO_INCREMENT_INCREMENT = 4', '',
-'srv "s_2_2"')
-1
-spider_bg_direct_sql('SET SESSION AUTO_INCREMENT_OFFSET = 2', '',
-'srv "s_2_1"')
-1
-spider_bg_direct_sql('SET SESSION AUTO_INCREMENT_OFFSET = 3', '',
-'srv "s_2_2"')
-1
-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
-INSERT INTO t1 () VALUES ();
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-3
-SELECT MAX(id) FROM t1;
-MAX(id)
-3
-INSERT INTO t1 () VALUES ();
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-2
-SELECT MAX(id) FROM t1;
-MAX(id)
-3
-INSERT INTO t1 (id) VALUES (null);
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-7
-SELECT MAX(id) FROM t1;
-MAX(id)
-7
-INSERT INTO t1 (id) VALUES (null);
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-6
-SELECT MAX(id) FROM t1;
-MAX(id)
-7
-INSERT INTO t1 () VALUES (),(),(),();
-Warnings:
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-Note 12520 Binlog's auto-inc value is probably different from linked table's auto-inc value
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-10
-SELECT id FROM t1 ORDER BY id;
-id
-2
-3
-6
-7
-10
-11
-14
-15
-SET INSERT_ID=5000;
-INSERT INTO t1 () VALUES ();
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-18
-SELECT MAX(id) FROM t1;
-MAX(id)
-18
-INSERT INTO t1 (id) VALUES (10000);
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-22
-SELECT MAX(id) FROM t1;
-MAX(id)
-22
-INSERT INTO t1 (id) VALUES (1000);
-SELECT LAST_INSERT_ID();
-LAST_INSERT_ID()
-26
-SELECT MAX(id) FROM t1;
-MAX(id)
-26
-SET SESSION spider_auto_increment_mode = @original_spider_auto_increment_mode;
-connection slave1_1;
-SELECT id FROM t1 ORDER BY id;
-id
-2
-3
-6
-7
-10
-18
-777
-1000
-1554
-2331
-10000
-connection master_1;
-
-deinit
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-connection slave1_1;
-DROP DATABASE IF EXISTS auto_test_local;
-connection child2_1;
-DROP DATABASE IF EXISTS auto_test_remote;
-connection child2_2;
-DROP DATABASE IF EXISTS auto_test_remote2;
-for slave1_1
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-
-end of test
diff --git a/storage/spider/mysql-test/spider/handler/r/vp_fixes.result b/storage/spider/mysql-test/spider/handler/r/vp_fixes.result
deleted file mode 100644
index cc0e4105d61..00000000000
--- a/storage/spider/mysql-test/spider/handler/r/vp_fixes.result
+++ /dev/null
@@ -1,93 +0,0 @@
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-
-drop and create databases
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-CREATE DATABASE auto_test_local;
-USE auto_test_local;
-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;
-
-test select 1
-connection master_1;
-SELECT 1;
-1
-1
-
-create table and insert
-connection master_1;
-DROP TABLE IF EXISTS tb_l;
-CREATE TABLE tb_l (
-a INT,
-b CHAR(1),
-c DATETIME,
-PRIMARY KEY(a)
-) MASTER_1_ENGINE2 MASTER_1_CHARSET2
-INSERT INTO tb_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');
-DROP TABLE IF EXISTS ta_l;
-CREATE TABLE ta_l (
-PRIMARY KEY(a)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
-INSERT INTO ta_l SELECT a, b, c FROM tb_l;
-
-0.9
-create different primary key table
-connection master_1;
-CREATE TABLE ta_l_int (
-a INT DEFAULT 10,
-b INT AUTO_INCREMENT,
-c INT DEFAULT 11,
-PRIMARY KEY(b)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT4_2_1
-connection master_1;
-INSERT INTO ta_l_int (a, b, c) VALUES (2, NULL, 3);
-create un-correspond primary key table
-connection master_1;
-DROP TABLE IF EXISTS ta_l_int;
-connection master_1;
-CREATE TABLE ta_l_int (
-a INT DEFAULT 10,
-b INT DEFAULT 12,
-c INT DEFAULT 11,
-PRIMARY KEY(c)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT4_2_1
-connection master_1;
-INSERT INTO ta_l_int (a, b, c) VALUES (2, NULL, 3);
-
-deinit
-connection master_1;
-DROP DATABASE IF EXISTS auto_test_local;
-connection child2_1;
-DROP DATABASE IF EXISTS auto_test_remote;
-connection child2_2;
-DROP DATABASE IF EXISTS auto_test_remote2;
-for master_1
-for child2
-child2_1
-child2_2
-child2_3
-for child3
-child3_1
-child3_2
-child3_3
-
-end of test
diff --git a/storage/spider/mysql-test/spider/handler/suite.opt b/storage/spider/mysql-test/spider/handler/suite.opt
deleted file mode 100644
index 48457b17309..00000000000
--- a/storage/spider/mysql-test/spider/handler/suite.opt
+++ /dev/null
@@ -1 +0,0 @@
---loose-innodb
diff --git a/storage/spider/mysql-test/spider/handler/suite.pm b/storage/spider/mysql-test/spider/handler/suite.pm
deleted file mode 100644
index af267d047a4..00000000000
--- a/storage/spider/mysql-test/spider/handler/suite.pm
+++ /dev/null
@@ -1,10 +0,0 @@
-package My::Suite::Spider;
-
-@ISA = qw(My::Suite);
-
-return "No Spider engine" unless $ENV{HA_SPIDER_SO};
-return "Not run for embedded server" if $::opt_embedded_server;
-
-sub is_default { 1 }
-
-bless { };
diff --git a/storage/spider/mysql-test/spider/handler/t/basic_sql.test b/storage/spider/mysql-test/spider/handler/t/basic_sql.test
deleted file mode 100644
index 9cf4ce99dc3..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/basic_sql.test
+++ /dev/null
@@ -1,2699 +0,0 @@
-# This test tests by executing basic SQL
---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 tb_l;
---enable_warnings
---disable_query_log
-echo CREATE TABLE tb_l (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
-) MASTER_1_ENGINE2 MASTER_1_CHARSET2;
-eval CREATE TABLE tb_l (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
-) $MASTER_1_ENGINE2 $MASTER_1_CHARSET2;
---enable_query_log
-INSERT INTO tb_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');
---disable_warnings
-DROP TABLE IF EXISTS ta_l;
---enable_warnings
---disable_query_log
-echo CREATE TABLE ta_l (
- PRIMARY KEY(a)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
-SELECT a, b, c FROM tb_l;
-if ($MASTER_1_MERGE)
-{
- --error ER_WRONG_OBJECT
- eval CREATE TABLE ta_l (
- PRIMARY KEY(a)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1
- SELECT a, b, c FROM tb_l;
- 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;
- INSERT INTO ta_l SELECT a, b, c FROM tb_l;
-}
-if (!$MASTER_1_MERGE)
-{
- eval CREATE TABLE ta_l (
- PRIMARY KEY(a)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1
- SELECT a, b, c FROM tb_l;
-}
---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 command_type != 'Execute' AND argument LIKE '%insert %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo create table ignore select 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
---disable_warnings
-DROP TABLE IF EXISTS ta_l;
-DROP TABLE IF EXISTS tb_l;
---enable_warnings
---disable_query_log
-echo CREATE TABLE tb_l (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
-) MASTER_1_ENGINE2 MASTER_1_CHARSET2;
-eval CREATE TABLE tb_l (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
-) $MASTER_1_ENGINE2 $MASTER_1_CHARSET2;
---enable_query_log
-INSERT INTO tb_l (a, b, c) VALUES
- (1, 'f', '2008-07-01 10:21:39'),
- (2, 'g', '2000-02-01 00:00:00'),
- (3, 'j', '2007-05-04 20:03:11'),
- (4, 'i', '2003-10-30 05:01:03'),
- (5, 'h', '2001-10-31 23:59:59');
---disable_query_log
-echo CREATE TABLE ta_l (
- PRIMARY KEY(a)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
-IGNORE SELECT a, b, c FROM tb_l;
-if ($MASTER_1_MERGE)
-{
- --error ER_WRONG_OBJECT
- eval CREATE TABLE ta_l (
- PRIMARY KEY(a)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1
- IGNORE SELECT a, b, c FROM tb_l;
- 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;
- INSERT IGNORE INTO ta_l SELECT a, b, c FROM tb_l;
-}
-if (!$MASTER_1_MERGE)
-{
- eval CREATE TABLE ta_l (
- PRIMARY KEY(a)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1
- IGNORE SELECT a, b, c FROM tb_l;
-}
---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 command_type != 'Execute' AND argument LIKE '%insert %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo create table ignore select 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
---disable_warnings
-DROP TABLE IF EXISTS ta_l;
---enable_warnings
---disable_query_log
-echo CREATE TABLE ta_l (
- PRIMARY KEY(a)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
-REPLACE SELECT a, b, c FROM tb_l;
-if ($MASTER_1_MERGE)
-{
- --error ER_WRONG_OBJECT
- eval CREATE TABLE ta_l (
- PRIMARY KEY(a)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1
- REPLACE SELECT a, b, c FROM tb_l;
- 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;
- REPLACE INTO ta_l SELECT a, b, c FROM tb_l;
-}
-if (!$MASTER_1_MERGE)
-{
- eval CREATE TABLE ta_l (
- PRIMARY KEY(a)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1
- REPLACE SELECT a, b, c FROM tb_l;
-}
---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 command_type != 'Execute' AND argument LIKE '%replace %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo create no index table
-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_TABLES3;
- echo CHILD2_1_CREATE_TABLES3;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_TABLES3;
- --enable_warnings
- eval $CHILD2_1_CREATE_TABLES3;
- 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_no_idx;
---enable_warnings
---disable_query_log
-echo CREATE TABLE ta_l_no_idx
-MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT2_2_1
-SELECT a, b, c FROM tb_l;
-if ($MASTER_1_NEEDPK)
-{
- --error ER_REQUIRES_PRIMARY_KEY
- eval CREATE TABLE ta_l_no_idx
- $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT2_2_1
- SELECT a, b, c FROM tb_l;
- eval CREATE TABLE ta_l_no_idx (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT2_2_1;
- INSERT INTO ta_l_no_idx SELECT a, b, c FROM tb_l;
-}
-if (!$MASTER_1_NEEDPK)
-{
- if ($MASTER_1_MERGE)
- {
- --error ER_WRONG_OBJECT
- eval CREATE TABLE ta_l_no_idx
- $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT2_2_1
- SELECT a, b, c FROM tb_l;
- eval CREATE TABLE ta_l_no_idx (
- a INT,
- b CHAR(1),
- c DATETIME
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT2_2_1;
- INSERT INTO ta_l_no_idx SELECT a, b, c FROM tb_l;
- }
- if (!$MASTER_1_MERGE)
- {
- eval CREATE TABLE ta_l_no_idx
- $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT2_2_1
- SELECT a, b, c FROM tb_l;
- }
-}
---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 command_type != 'Execute' AND argument LIKE '%insert %';
- }
- eval $CHILD2_1_SELECT_TABLES3;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l_no_idx ORDER BY a;
-
---echo
---echo select table
-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
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo select table shared mode
-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
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a
-LOCK IN SHARE MODE;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo select table for update
-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
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a
-FOR UPDATE;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo select table join
-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
-SELECT a.a, a.b, date_format(b.c, '%Y-%m-%d %H:%i:%s') FROM ta_l a, tb_l b
-WHERE a.a = b.a ORDER BY a.a;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo select table straight_join
-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
-SELECT STRAIGHT_JOIN a.a, a.b, date_format(b.c, '%Y-%m-%d %H:%i:%s')
-FROM ta_l a, tb_l b WHERE a.a = b.a ORDER BY a.a;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo select sql_small_result
-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
-SELECT SQL_SMALL_RESULT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
-ORDER BY a;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo select sql_big_result
-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
-SELECT SQL_BIG_RESULT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
-ORDER BY a;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo select sql_buffer_result
-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
-SELECT SQL_BUFFER_RESULT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
-ORDER BY a;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo select sql_cache
-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
-SELECT SQL_CACHE a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
-ORDER BY a;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo select sql_no_cache
-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
-SELECT SQL_NO_CACHE a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
-ORDER BY a;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo select sql_calc_found_rows
-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
-SELECT SQL_CALC_FOUND_ROWS a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
-ORDER BY a LIMIT 4;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT found_rows();
-
---echo
---echo select high_priority
-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
-SELECT HIGH_PRIORITY a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
-ORDER BY a;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo select distinct
-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
-SELECT DISTINCT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
-ORDER BY a;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo select count
-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
-SELECT count(*) FROM ta_l ORDER BY a;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo select table join not use index
-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
-SELECT a.a, a.b, date_format(a.c, '%Y-%m-%d %H:%i:%s') FROM tb_l a WHERE
-EXISTS (SELECT * FROM ta_l b WHERE b.b = a.b) ORDER BY a.a;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo select using pushdown
-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
-SELECT a.a, a.b, date_format(a.c, '%Y-%m-%d %H:%i:%s') FROM ta_l a WHERE
-a.b = 'g' ORDER BY a.a;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo select using index and pushdown
-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
-SELECT a.a, a.b, date_format(a.c, '%Y-%m-%d %H:%i:%s') FROM ta_l a WHERE
-a.a > 0 AND a.b = 'g' ORDER BY a.a;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo insert
---connection master_1
-TRUNCATE TABLE ta_l;
-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
-INSERT INTO ta_l (a, b, c) VALUES (2, 'e', '2008-01-01 23:59:59');
-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 command_type != 'Execute' AND argument LIKE 'insert %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo insert select
---connection master_1
-TRUNCATE TABLE ta_l;
-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
-INSERT INTO ta_l (a, b, c) SELECT a, b, c FROM tb_l;
-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 command_type != 'Execute' AND argument LIKE 'insert %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo insert select a
---connection master_1
-TRUNCATE TABLE ta_l;
-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
-INSERT INTO ta_l (a, b, c) VALUES ((SELECT a FROM tb_l ORDER BY a LIMIT 1),
-'e', '2008-01-01 23:59:59');
-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 command_type != 'Execute' AND argument LIKE 'insert %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo insert low_priority
---connection master_1
-TRUNCATE TABLE ta_l;
-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
-INSERT LOW_PRIORITY INTO ta_l (a, b, c) values (2, 'e', '2008-01-01 23:59:59');
-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 command_type != 'Execute' AND argument LIKE 'insert %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo insert high_priority
---connection master_1
-TRUNCATE TABLE ta_l;
-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
-INSERT HIGH_PRIORITY INTO ta_l (a, b, c) VALUES (2, 'e',
-'2008-01-01 23:59:59');
-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 command_type != 'Execute' AND argument LIKE 'insert %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo insert ignore
-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
-INSERT IGNORE INTO ta_l (a, b, c) VALUES (2, 'd', '2009-02-02 01:01:01');
-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 command_type != 'Execute' AND argument LIKE 'insert %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo insert update (insert)
---connection master_1
-TRUNCATE TABLE ta_l;
-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
-INSERT INTO ta_l (a, b, c) VALUES (2, 'e', '2008-01-01 23:59:59') ON DUPLICATE
-KEY UPDATE b = 'f', c = '2005-08-08 11:11:11';
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'insert %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%update %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%delete %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo insert update (update)
-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
-INSERT INTO ta_l (a, b, c) VALUES (2, 'e', '2008-01-01 23:59:59') ON DUPLICATE
-KEY UPDATE b = 'f', c = '2005-08-08 11:11:11';
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'insert %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%update %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%delete %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo replace
---connection master_1
-TRUNCATE TABLE ta_l;
-INSERT INTO ta_l (a, b, c) VALUES (2, 'e', '2008-01-01 23:59:59');
-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
-REPLACE INTO ta_l (a, b, c) VALUES (2, 'f', '2008-02-02 02:02:02');
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'replace %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'insert %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'update %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo replace select
-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
-REPLACE INTO ta_l (a, b, c) SELECT a, b, c FROM tb_l;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'replace %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'insert %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'update %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo replace select a
-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
-REPLACE INTO ta_l (a, b, c) VALUES ((SELECT a FROM tb_l ORDER BY a LIMIT 1),
-'e', '2008-01-01 23:59:59');
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'replace %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'insert %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'update %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo replace low_priority
-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
-REPLACE LOW_PRIORITY INTO ta_l (a, b, c) VALUES (3, 'g',
-'2009-03-03 03:03:03');
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'replace %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'insert %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'update %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo update
-TRUNCATE TABLE ta_l;
-INSERT INTO ta_l (a, b, c) VALUES (1, 'e', '2008-01-01 23:59:59'),
-(2, 'e', '2008-01-01 23:59:59');
-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
-UPDATE ta_l SET b = 'f', c = '2008-02-02 02:02:02' WHERE a = 2;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'update %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo update select
-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
-UPDATE ta_l SET b = 'g', c = '2009-03-03 03:03:03' WHERE a IN (SELECT a FROM
-tb_l);
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'update %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo update select a
-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
-UPDATE ta_l SET b = 'h', c = '2010-04-04 04:04:04' WHERE a = (SELECT a FROM
-tb_l ORDER BY a LIMIT 1);
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'update %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo update join
-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
-UPDATE ta_l a, tb_l b SET a.b = b.b, a.c = b.c WHERE a.a = b.a;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'update %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo update join a
-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
-UPDATE ta_l a, tb_l b SET a.b = 'g', a.c = '2009-03-03 03:03:03' WHERE
-a.a = b.a;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'update %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo update low_priority
-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
-UPDATE LOW_PRIORITY ta_l SET b = 'f', c = '2008-02-02 02:02:02' WHERE a = 2;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'update %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo update ignore
-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
-UPDATE IGNORE ta_l SET a = 1, b = 'g', c = '2009-03-03 03:03:03' WHERE a = 2;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'update %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo update pushdown
-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
-update ta_l set b = 'j', c = '2009-03-03 03:03:03' where b = 'f';
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'update %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo update index pushdown
-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
-UPDATE ta_l SET b = 'g', c = '2009-03-03 03:03:03' WHERE a > 0 AND b = 'j';
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'update %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo delete
-TRUNCATE TABLE ta_l;
-INSERT INTO ta_l (a, b, c) VALUES (1, 'e', '2008-01-01 23:59:59'),
-(2, 'e', '2008-01-01 23:59:59'), (3, 'e', '2008-01-01 23:59:59'),
-(4, 'e', '2008-01-01 23:59:59'), (5, 'e', '2008-01-01 23:59:59'),
-(6, 'e', '2008-01-01 23:59:59'), (7, 'e', '2008-01-01 23:59:59'),
-(8, 'e', '2008-01-01 23:59:59'), (9, 'e', '2008-01-01 23:59:59'),
-(10, 'j', '2008-01-01 23:59:59');
-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
-DELETE FROM ta_l WHERE a = 2;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'delete %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo delete all
-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
-DELETE FROM ta_l;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'delete %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo delete select
-TRUNCATE TABLE ta_l;
-INSERT INTO ta_l (a, b, c) VALUES (1, 'e', '2008-01-01 23:59:59'),
-(2, 'e', '2008-01-01 23:59:59'), (3, 'e', '2008-01-01 23:59:59'),
-(4, 'e', '2008-01-01 23:59:59'), (5, 'e', '2008-01-01 23:59:59'),
-(6, 'e', '2008-01-01 23:59:59'), (7, 'e', '2008-01-01 23:59:59'),
-(8, 'e', '2008-01-01 23:59:59'), (9, 'e', '2008-01-01 23:59:59'),
-(10, 'j', '2008-01-01 23:59:59');
-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
-DELETE FROM ta_l WHERE a IN (SELECT a FROM tb_l);
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'delete %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo delete select a
-TRUNCATE TABLE ta_l;
-INSERT INTO ta_l (a, b, c) VALUES (1, 'e', '2008-01-01 23:59:59'),
-(2, 'e', '2008-01-01 23:59:59'), (3, 'e', '2008-01-01 23:59:59'),
-(4, 'e', '2008-01-01 23:59:59'), (5, 'e', '2008-01-01 23:59:59'),
-(6, 'e', '2008-01-01 23:59:59'), (7, 'e', '2008-01-01 23:59:59'),
-(8, 'e', '2008-01-01 23:59:59'), (9, 'e', '2008-01-01 23:59:59'),
-(10, 'j', '2008-01-01 23:59:59');
-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
-DELETE FROM ta_l WHERE a = (SELECT a FROM tb_l ORDER BY a LIMIT 1);
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'delete %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo delete join
-TRUNCATE TABLE ta_l;
-INSERT INTO ta_l (a, b, c) VALUES (1, 'e', '2008-01-01 23:59:59'),
-(2, 'e', '2008-01-01 23:59:59'), (3, 'e', '2008-01-01 23:59:59'),
-(4, 'e', '2008-01-01 23:59:59'), (5, 'e', '2008-01-01 23:59:59'),
-(6, 'e', '2008-01-01 23:59:59'), (7, 'e', '2008-01-01 23:59:59'),
-(8, 'e', '2008-01-01 23:59:59'), (9, 'e', '2008-01-01 23:59:59'),
-(10, 'j', '2008-01-01 23:59:59');
-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
-DELETE a FROM ta_l a, (SELECT a FROM tb_l ORDER BY a) b WHERE a.a = b.a;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'delete %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo delete low_priority
-TRUNCATE TABLE ta_l;
-INSERT INTO ta_l (a, b, c) VALUES (1, 'e', '2008-01-01 23:59:59'),
-(2, 'e', '2008-01-01 23:59:59'), (3, 'e', '2008-01-01 23:59:59'),
-(4, 'e', '2008-01-01 23:59:59'), (5, 'e', '2008-01-01 23:59:59'),
-(6, 'e', '2008-01-01 23:59:59'), (7, 'e', '2008-01-01 23:59:59'),
-(8, 'e', '2008-01-01 23:59:59'), (9, 'e', '2008-01-01 23:59:59'),
-(10, 'j', '2008-01-01 23:59:59');
-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
-DELETE LOW_PRIORITY FROM ta_l WHERE a = 2;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'delete %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo delete ignore
-TRUNCATE TABLE ta_l;
-INSERT INTO ta_l (a, b, c) VALUES (1, 'e', '2008-01-01 23:59:59'),
-(2, 'e', '2008-01-01 23:59:59'), (3, 'e', '2008-01-01 23:59:59'),
-(4, 'e', '2008-01-01 23:59:59'), (5, 'e', '2008-01-01 23:59:59'),
-(6, 'e', '2008-01-01 23:59:59'), (7, 'e', '2008-01-01 23:59:59'),
-(8, 'e', '2008-01-01 23:59:59'), (9, 'e', '2008-01-01 23:59:59'),
-(10, 'j', '2008-01-01 23:59:59');
-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
-DELETE IGNORE FROM ta_l WHERE a = 2;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'delete %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo delete quick
-TRUNCATE TABLE ta_l;
-INSERT INTO ta_l (a, b, c) VALUES (1, 'e', '2008-01-01 23:59:59'),
-(2, 'e', '2008-01-01 23:59:59'), (3, 'e', '2008-01-01 23:59:59'),
-(4, 'e', '2008-01-01 23:59:59'), (5, 'e', '2008-01-01 23:59:59'),
-(6, 'e', '2008-01-01 23:59:59'), (7, 'e', '2008-01-01 23:59:59'),
-(8, 'e', '2008-01-01 23:59:59'), (9, 'e', '2008-01-01 23:59:59'),
-(10, 'j', '2008-01-01 23:59:59');
-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
-DELETE QUICK FROM ta_l WHERE a = 2;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'delete %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo delete pushdown
-TRUNCATE TABLE ta_l;
-INSERT INTO ta_l (a, b, c) VALUES (1, 'e', '2008-01-01 23:59:59'),
-(2, 'e', '2008-01-01 23:59:59'), (3, 'e', '2008-01-01 23:59:59'),
-(4, 'e', '2008-01-01 23:59:59'), (5, 'e', '2008-01-01 23:59:59'),
-(6, 'e', '2008-01-01 23:59:59'), (7, 'e', '2008-01-01 23:59:59'),
-(8, 'e', '2008-01-01 23:59:59'), (9, 'e', '2008-01-01 23:59:59'),
-(10, 'j', '2008-01-01 23:59:59');
-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
-DELETE FROM ta_l WHERE b = 'e';
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'delete %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo delete index pushdown
-TRUNCATE TABLE ta_l;
-INSERT INTO ta_l (a, b, c) VALUES (1, 'e', '2008-01-01 23:59:59'),
-(2, 'e', '2008-01-01 23:59:59'), (3, 'e', '2008-01-01 23:59:59'),
-(4, 'e', '2008-01-01 23:59:59'), (5, 'e', '2008-01-01 23:59:59'),
-(6, 'e', '2008-01-01 23:59:59'), (7, 'e', '2008-01-01 23:59:59'),
-(8, 'e', '2008-01-01 23:59:59'), (9, 'e', '2008-01-01 23:59:59'),
-(10, 'j', '2008-01-01 23:59:59');
-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
-DELETE FROM ta_l WHERE a > 0 AND b = 'e';
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'delete %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo truncate
-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
-TRUNCATE TABLE ta_l;
-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 command_type != 'Execute' AND argument LIKE 'truncate %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---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/basic_sql_part.test b/storage/spider/mysql-test/spider/handler/t/basic_sql_part.test
deleted file mode 100644
index 1bb18358d5d..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/basic_sql_part.test
+++ /dev/null
@@ -1,571 +0,0 @@
-# This test tests by executing basic SQL
---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
- }
-}
-
---connection master_1
---disable_warnings
-DROP TABLE IF EXISTS tb_l;
---enable_warnings
---disable_query_log
-echo CREATE TABLE tb_l (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
-) MASTER_1_ENGINE2 MASTER_1_CHARSET2;
-eval CREATE TABLE tb_l (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
-) $MASTER_1_ENGINE2 $MASTER_1_CHARSET2;
---enable_query_log
-INSERT INTO tb_l (a, b, c) VALUES
- (1, 'f', '2008-07-01 10:21:39'),
- (2, 'g', '2000-02-01 00:00:00'),
- (3, 'j', '2007-05-04 20:03:11'),
- (4, 'i', '2003-10-30 05:01:03'),
- (5, 'h', '2001-10-31 23:59:59');
-
---echo
---echo create table with partition and select 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 (
- PRIMARY KEY(a)
- ) MASTER_1_ENGINE MASTER_1_COMMENT_P_2_1
- SELECT a, b, c FROM tb_l;
- if ($MASTER_1_MERGE)
- {
- --error ER_WRONG_OBJECT
- eval CREATE TABLE ta_l2 (
- PRIMARY KEY(a)
- ) $MASTER_1_ENGINE $MASTER_1_COMMENT_P_2_1
- SELECT a, b, c FROM tb_l;
- eval CREATE TABLE ta_l2 (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
- ) $MASTER_1_ENGINE $MASTER_1_COMMENT_P_2_1;
- INSERT INTO ta_l2 SELECT a, b, c FROM tb_l;
- }
- if (!$MASTER_1_MERGE)
- {
- eval CREATE TABLE ta_l2 (
- PRIMARY KEY(a)
- ) $MASTER_1_ENGINE $MASTER_1_COMMENT_P_2_1
- SELECT a, b, c FROM tb_l;
- }
- --enable_query_log
- 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 command_type != 'Execute' AND argument LIKE '%insert %';
- }
- eval $CHILD2_2_SELECT_TABLES;
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%insert %';
- }
- eval $CHILD2_1_SELECT_TABLES2;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- --connection master_1
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
-}
-
---echo
---echo select partition using pushdown
-if ($HAVE_PARTITION)
-{
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_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
- SELECT a.a, a.b, date_format(a.c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 a WHERE
- a.b = 'g' ORDER BY a.a;
- 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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
-}
-
---echo
---echo select partition using index pushdown
-if ($HAVE_PARTITION)
-{
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_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
- SELECT a.a, a.b, date_format(a.c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 a WHERE
- a.a > 0 AND a.b = 'g' ORDER BY a.a;
- 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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
-}
-
---echo
---echo update partition pushdown
-if ($HAVE_PARTITION)
-{
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_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
- UPDATE ta_l2 SET b = 'e', c = '2009-03-03 03:03:03' WHERE b = 'j';
- 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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'update %';
- }
- eval $CHILD2_2_SELECT_TABLES;
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'update %';
- }
- eval $CHILD2_1_SELECT_TABLES2;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- --connection master_1
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
-}
-
---echo
---echo update partition index pushdown
-if ($HAVE_PARTITION)
-{
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_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
- UPDATE ta_l2 SET b = 'j', c = '2009-03-03 03:03:03' WHERE a > 0 AND b = 'e';
- 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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'update %';
- }
- eval $CHILD2_2_SELECT_TABLES;
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'update %';
- }
- eval $CHILD2_1_SELECT_TABLES2;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- --connection master_1
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
-}
-
---echo
---echo delete partition pushdown
-if ($HAVE_PARTITION)
-{
- TRUNCATE TABLE ta_l2;
- INSERT INTO ta_l2 SELECT a, b, c FROM tb_l;
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_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
- DELETE FROM ta_l2 WHERE b = 'g';
- 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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'delete %';
- }
- eval $CHILD2_2_SELECT_TABLES;
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'delete %';
- }
- eval $CHILD2_1_SELECT_TABLES2;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- --connection master_1
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
-}
-
---echo
---echo delete partition index pushdown
-if ($HAVE_PARTITION)
-{
- TRUNCATE TABLE ta_l2;
- INSERT INTO ta_l2 SELECT a, b, c FROM tb_l;
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_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
- DELETE FROM ta_l2 WHERE a > 0 AND b = 'g';
- 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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'delete %';
- }
- eval $CHILD2_2_SELECT_TABLES;
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE 'delete %';
- }
- eval $CHILD2_1_SELECT_TABLES2;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- --connection master_1
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
-}
-
---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/connect_child2_1.inc b/storage/spider/mysql-test/spider/handler/t/connect_child2_1.inc
deleted file mode 100644
index cd9b0c9ca9b..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/connect_child2_1.inc
+++ /dev/null
@@ -1 +0,0 @@
---connect (child2_1, localhost, root, , , $CHILD2_1_MYPORT, $CHILD2_1_MYSOCK)
diff --git a/storage/spider/mysql-test/spider/handler/t/connect_child2_2.inc b/storage/spider/mysql-test/spider/handler/t/connect_child2_2.inc
deleted file mode 100644
index e145f66b630..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/connect_child2_2.inc
+++ /dev/null
@@ -1 +0,0 @@
---connect (child2_2, localhost, root, , , $CHILD2_2_MYPORT, $CHILD2_2_MYSOCK)
diff --git a/storage/spider/mysql-test/spider/handler/t/connect_child2_3.inc b/storage/spider/mysql-test/spider/handler/t/connect_child2_3.inc
deleted file mode 100644
index d356348d8ea..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/connect_child2_3.inc
+++ /dev/null
@@ -1 +0,0 @@
---connect (child2_3, localhost, root, , , $CHILD2_3_MYPORT, $CHILD2_3_MYSOCK)
diff --git a/storage/spider/mysql-test/spider/handler/t/connect_child3_1.inc b/storage/spider/mysql-test/spider/handler/t/connect_child3_1.inc
deleted file mode 100644
index 03e5c188c89..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/connect_child3_1.inc
+++ /dev/null
@@ -1 +0,0 @@
---connect (child3_1, localhost, root, , , $CHILD3_1_MYPORT, $CHILD3_1_MYSOCK)
diff --git a/storage/spider/mysql-test/spider/handler/t/connect_child3_2.inc b/storage/spider/mysql-test/spider/handler/t/connect_child3_2.inc
deleted file mode 100644
index d62a7ada824..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/connect_child3_2.inc
+++ /dev/null
@@ -1 +0,0 @@
---connect (child3_2, localhost, root, , , $CHILD3_2_MYPORT, $CHILD3_2_MYSOCK)
diff --git a/storage/spider/mysql-test/spider/handler/t/connect_child3_3.inc b/storage/spider/mysql-test/spider/handler/t/connect_child3_3.inc
deleted file mode 100644
index fb49f5bfdac..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/connect_child3_3.inc
+++ /dev/null
@@ -1 +0,0 @@
---connect (child3_3, localhost, root, , , $CHILD3_3_MYPORT, $CHILD3_3_MYSOCK)
diff --git a/storage/spider/mysql-test/spider/handler/t/connect_master_1.inc b/storage/spider/mysql-test/spider/handler/t/connect_master_1.inc
deleted file mode 100644
index 0c129ce5775..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/connect_master_1.inc
+++ /dev/null
@@ -1 +0,0 @@
---connect (master_1, localhost, root, , , $MASTER_1_MYPORT, $MASTER_1_MYSOCK)
diff --git a/storage/spider/mysql-test/spider/handler/t/connect_slave1_1.inc b/storage/spider/mysql-test/spider/handler/t/connect_slave1_1.inc
deleted file mode 100644
index 45a822743e0..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/connect_slave1_1.inc
+++ /dev/null
@@ -1 +0,0 @@
---connect (slave1_1, localhost, root, , , $SLAVE1_1_MYPORT, $SLAVE1_1_MYSOCK)
diff --git a/storage/spider/mysql-test/spider/handler/t/direct_aggregate.test b/storage/spider/mysql-test/spider/handler/t/direct_aggregate.test
deleted file mode 100644
index 5c0c37f483d..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/direct_aggregate.test
+++ /dev/null
@@ -1,179 +0,0 @@
---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 command_type != 'Execute' AND 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
deleted file mode 100644
index cb0b55e9788..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/direct_aggregate_part.test
+++ /dev/null
@@ -1,192 +0,0 @@
---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 command_type != 'Execute' AND argument LIKE '%handler %';
- }
- eval $CHILD2_2_SELECT_TABLES;
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND 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/direct_update.test b/storage/spider/mysql-test/spider/handler/t/direct_update.test
deleted file mode 100644
index 94f27e2859c..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/direct_update.test
+++ /dev/null
@@ -1,198 +0,0 @@
---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_updating 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_UPDATE_STATUS;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
---echo update all rows with function
-UPDATE ta_l SET c = ADDDATE(c, 1);
-eval $MASTER_1_CHECK_DIRECT_UPDATE_STATUS;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
---echo update by primary key
-UPDATE ta_l SET b = 'x' WHERE a = 3;
-eval $MASTER_1_CHECK_DIRECT_UPDATE_STATUS;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
---echo update by a column without index
-UPDATE ta_l SET c = '2011-10-17' WHERE b = 'x';
-eval $MASTER_1_CHECK_DIRECT_UPDATE_STATUS;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
---echo update by primary key with order and limit
-UPDATE ta_l SET c = ADDDATE(c, 1) WHERE a < 4 ORDER BY b DESC LIMIT 1;
-eval $MASTER_1_CHECK_DIRECT_UPDATE_STATUS;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
---echo delete by primary key with order and limit
-DELETE FROM ta_l WHERE a < 4 ORDER BY c LIMIT 1;
-eval $MASTER_1_CHECK_DIRECT_DELETE_STATUS;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
---echo delete by a column without index
-DELETE FROM ta_l WHERE b = 'c';
-eval $MASTER_1_CHECK_DIRECT_DELETE_STATUS;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
---echo delete by primary key
-DELETE FROM ta_l WHERE a = 3;
-eval $MASTER_1_CHECK_DIRECT_DELETE_STATUS;
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-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 command_type != 'Execute' AND 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_update_part.test b/storage/spider/mysql-test/spider/handler/t/direct_update_part.test
deleted file mode 100644
index e8f1882594c..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/direct_update_part.test
+++ /dev/null
@@ -1,211 +0,0 @@
---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_UPDATE_STATUS;
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
- --echo update all rows with function
- UPDATE ta_l2 SET c = ADDDATE(c, 1);
- eval $MASTER_1_CHECK_DIRECT_UPDATE_STATUS;
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
- --echo update by primary key
- UPDATE ta_l2 SET b = 'x' WHERE a = 3;
- eval $MASTER_1_CHECK_DIRECT_UPDATE_STATUS;
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
- --echo update by a column without index
- UPDATE ta_l2 SET c = '2011-10-17' WHERE b = 'x';
- eval $MASTER_1_CHECK_DIRECT_UPDATE_STATUS;
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
- --echo update by primary key with order and limit
- UPDATE ta_l2 SET c = ADDDATE(c, 1) WHERE a < 4 ORDER BY b DESC LIMIT 1;
- eval $MASTER_1_CHECK_DIRECT_UPDATE_STATUS;
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
- --echo delete by primary key with order and limit
- DELETE FROM ta_l2 WHERE a < 4 ORDER BY c LIMIT 1;
- eval $MASTER_1_CHECK_DIRECT_DELETE_STATUS;
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
- --echo delete by a column without index
- DELETE FROM ta_l2 WHERE b = 'c';
- eval $MASTER_1_CHECK_DIRECT_DELETE_STATUS;
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
- --echo delete by primary key
- DELETE FROM ta_l2 WHERE a = 3;
- eval $MASTER_1_CHECK_DIRECT_DELETE_STATUS;
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
- 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 command_type != 'Execute' AND argument LIKE '%handler %';
- }
- eval $CHILD2_2_SELECT_TABLES;
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND 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/function.test b/storage/spider/mysql-test/spider/handler/t/function.test
deleted file mode 100644
index 2472e774782..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/function.test
+++ /dev/null
@@ -1,253 +0,0 @@
-# This test tests for using functions
---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 in()
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_result_log
- }
- --disable_query_log
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- echo CHILD2_1_DROP_TEXT_PK_TABLES1;
- echo CHILD2_1_CREATE_TEXT_PK_TABLES1;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_TEXT_PK_TABLES1;
- --enable_warnings
- eval $CHILD2_1_CREATE_TEXT_PK_TABLES1;
- --enable_query_log
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_result_log
- }
-}
---connection master_1
---disable_query_log
-echo CREATE TABLE t1 (
- a VARCHAR(255),
- PRIMARY KEY(a)
-) MASTER_1_ENGINE MASTER_1_CHARSET3 MASTER_1_COMMENT_TEXT_PK1_1;
-eval CREATE TABLE t1 (
- a VARCHAR(255),
- PRIMARY KEY(a)
-) $MASTER_1_ENGINE $MASTER_1_CHARSET3 $MASTER_1_COMMENT_TEXT_PK1_1;
---enable_query_log
-insert into t1 values ('1');
-insert into t1 select a + 1 from t1;
-insert into t1 select a + 2 from t1;
-insert into t1 select a + 4 from t1;
-insert into t1 select a + 8 from t1;
-insert into t1 select a + 16 from t1;
-insert into t1 select a + 32 from t1;
-insert into t1 select a + 64 from t1;
-insert into t1 select a + 128 from t1;
-insert into t1 select a + 256 from t1;
-insert into t1 select a + 512 from t1;
-flush tables;
-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
-select a from t1 where a in ('15', '120');
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_1_SELECT_TEXT_PK_TABLES1;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo date_sub()
-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');
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-UPDATE ta_l SET c = DATE_SUB(c, INTERVAL 1 YEAR);
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-UPDATE ta_l SET c = DATE_ADD(c, INTERVAL 1 QUARTER);
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-UPDATE ta_l SET c = DATE_SUB(c, INTERVAL 1 MONTH);
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-UPDATE ta_l SET c = DATE_ADD(c, INTERVAL 1 WEEK);
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-UPDATE ta_l SET c = DATE_SUB(c, INTERVAL 1 DAY);
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-UPDATE ta_l SET c = DATE_ADD(c, INTERVAL 1 HOUR);
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-UPDATE ta_l SET c = DATE_SUB(c, INTERVAL 1 MINUTE);
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-UPDATE ta_l SET c = DATE_ADD(c, INTERVAL 1 SECOND);
-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 command_type != 'Execute' AND argument LIKE '%update %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---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/ha.test b/storage/spider/mysql-test/spider/handler/t/ha.test
deleted file mode 100644
index c36b7363a6d..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/ha.test
+++ /dev/null
@@ -1,878 +0,0 @@
-# This test tests for ha features
-if ($USE_HA_TEST)
-{
---disable_warnings
---disable_query_log
---disable_result_log
---source test_init.inc
---source ha_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;
- --connection child2_3
- DROP DATABASE IF EXISTS auto_test_remote3;
- CREATE DATABASE auto_test_remote3;
- USE auto_test_remote3;
-}
-if ($USE_CHILD_GROUP3)
-{
- --connection child3_1
- DROP DATABASE IF EXISTS auto_test_local;
- CREATE DATABASE auto_test_local;
- USE auto_test_local;
- --connection child3_2
- DROP DATABASE IF EXISTS auto_test_local;
- CREATE DATABASE auto_test_local;
- USE auto_test_local;
- --connection child3_3
- DROP DATABASE IF EXISTS auto_test_local;
- CREATE DATABASE auto_test_local;
- USE auto_test_local;
-}
---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;
- --connection child2_3
- SELECT 1;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-if ($USE_CHILD_GROUP3)
-{
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child3_1
- SELECT 1;
- --connection child3_2
- SELECT 1;
- --connection child3_3
- SELECT 1;
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo create table 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;
- }
- --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;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-if ($USE_CHILD_GROUP3)
-{
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child3_1
- --disable_warnings
- eval $CHILD3_1_DROP_TABLES_HA_2_1;
- --enable_warnings
- eval $CHILD3_1_CREATE_TABLES_HA_2_1;
- --connection child3_2
- --disable_warnings
- eval $CHILD3_2_DROP_TABLES_HA_2_1;
- --enable_warnings
- eval $CHILD3_2_CREATE_TABLES_HA_2_1;
- --connection child3_3
- --disable_warnings
- eval $CHILD3_3_DROP_TABLES_HA_2_1;
- --enable_warnings
- eval $CHILD3_3_CREATE_TABLES_HA_2_1;
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --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_HA_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_HA_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 select 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;
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_2_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo fail-over 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;
- }
- --connection child2_2
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_2_HA_DROP_TABLES;
- }
- --disable_warnings
- eval $CHILD2_2_HA_DROP_TABLES;
- --enable_warnings
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-eval $MASTER_1_CHECK_HA_STATUS;
---error 12511
-INSERT INTO ta_l (a, b, c) VALUES
- (6, 'e', '2011-05-05 20:04:05');
-eval $MASTER_1_CHECK_LINK_STATUS;
-eval $MASTER_1_CHECK_LINK_FAILED_LOG;
-eval $MASTER_1_CHECK_HA_STATUS;
-INSERT INTO ta_l (a, b, c) VALUES
- (6, 'e', '2011-05-05 20:04:05');
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-if ($USE_CHILD_GROUP3)
-{
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child3_1
- eval $CHILD3_1_CHECK_LINK_STATUS;
- eval $CHILD3_1_CHECK_LINK_FAILED_LOG;
- --connection child3_2
- eval $CHILD3_2_CHECK_LINK_STATUS;
- eval $CHILD3_2_CHECK_LINK_FAILED_LOG;
- --connection child3_3
- eval $CHILD3_3_CHECK_LINK_STATUS;
- eval $CHILD3_3_CHECK_LINK_FAILED_LOG;
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo recovery 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;
- }
- --connection child2_2
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_2_HA_CREATE_TABLES;
- }
- eval $CHILD2_2_HA_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
- }
-}
-if ($USE_CHILD_GROUP3)
-{
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child3_1
- eval $CHILD3_1_SET_RECOVERY_STATUS_2_1;
- eval $CHILD3_1_CHECK_LINK_STATUS;
- --connection child3_2
- eval $CHILD3_2_SET_RECOVERY_STATUS_2_1;
- eval $CHILD3_2_CHECK_LINK_STATUS;
- --connection child3_3
- eval $CHILD3_3_SET_RECOVERY_STATUS_2_1;
- eval $CHILD3_3_CHECK_LINK_STATUS;
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-eval $MASTER_1_SET_RECOVERY_STATUS_2_1;
-eval $MASTER_1_CHECK_LINK_STATUS;
-eval $MASTER_1_COPY_TABLES_2_1;
-if ($USE_CHILD_GROUP3)
-{
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child3_1
- eval $CHILD3_1_SET_OK_STATUS_2_1;
- eval $CHILD3_1_CHECK_LINK_STATUS;
- --connection child3_2
- eval $CHILD3_2_SET_OK_STATUS_2_1;
- eval $CHILD3_2_CHECK_LINK_STATUS;
- --connection child3_3
- eval $CHILD3_3_SET_OK_STATUS_2_1;
- eval $CHILD3_3_CHECK_LINK_STATUS;
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-eval $MASTER_1_SET_OK_STATUS_2_1;
-eval $MASTER_1_CHECK_LINK_STATUS;
-INSERT INTO ta_l (a, b, c) VALUES
- (8, 'g', '2011-05-05 21:33:30');
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-DROP TABLE ta_l;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_2_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-if ($USE_CHILD_GROUP3)
-{
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child3_1
- --disable_warnings
- eval $CHILD3_1_DROP_TABLES_HA_2_1;
- --enable_warnings
- --connection child3_2
- --disable_warnings
- eval $CHILD3_2_DROP_TABLES_HA_2_1;
- --enable_warnings
- --connection child3_3
- --disable_warnings
- eval $CHILD3_3_DROP_TABLES_HA_2_1;
- --enable_warnings
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---connection master_1
-eval $MASTER_1_CHANGE_HA_MON;
-
---echo
---echo active standby test
---echo create table 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;
- }
- --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;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-if ($USE_CHILD_GROUP3)
-{
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child3_1
- --disable_warnings
- eval $CHILD3_1_DROP_TABLES_HA_2_1;
- --enable_warnings
- eval $CHILD3_1_CREATE_TABLES_HA_AS_2_1;
- --connection child3_2
- --disable_warnings
- eval $CHILD3_2_DROP_TABLES_HA_2_1;
- --enable_warnings
- eval $CHILD3_2_CREATE_TABLES_HA_AS_2_1;
- --connection child3_3
- --disable_warnings
- eval $CHILD3_3_DROP_TABLES_HA_2_1;
- --enable_warnings
- eval $CHILD3_3_CREATE_TABLES_HA_AS_2_1;
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --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_HA_AS_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_HA_AS_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 select 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;
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_2_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo fail-over 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;
- }
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_1_HA_AS_DROP_TABLES;
- }
- --disable_warnings
- eval $CHILD2_1_HA_AS_DROP_TABLES;
- --enable_warnings
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-eval $MASTER_1_CHECK_HA_STATUS;
---error 12511
-INSERT INTO ta_l (a, b, c) VALUES
- (6, 'e', '2011-05-05 20:04:05');
-eval $MASTER_1_CHECK_LINK_STATUS;
-eval $MASTER_1_CHECK_LINK_FAILED_LOG;
-eval $MASTER_1_CHECK_HA_STATUS;
-INSERT INTO ta_l (a, b, c) VALUES
- (6, 'e', '2011-05-05 20:04:05');
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_2_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-if ($USE_CHILD_GROUP3)
-{
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child3_1
- eval $CHILD3_1_CHECK_LINK_STATUS;
- eval $CHILD3_1_CHECK_LINK_FAILED_LOG;
- --connection child3_2
- eval $CHILD3_2_CHECK_LINK_STATUS;
- eval $CHILD3_2_CHECK_LINK_FAILED_LOG;
- --connection child3_3
- eval $CHILD3_3_CHECK_LINK_STATUS;
- eval $CHILD3_3_CHECK_LINK_FAILED_LOG;
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo recovery 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_HA_AS_CREATE_TABLES;
- }
- eval $CHILD2_1_HA_AS_CREATE_TABLES;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-if ($USE_CHILD_GROUP3)
-{
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child3_1
- eval $CHILD3_1_SET_OK_STATUS_AS_2_1;
- eval $CHILD3_1_CHECK_LINK_STATUS;
- --connection child3_2
- eval $CHILD3_2_SET_OK_STATUS_AS_2_1;
- eval $CHILD3_2_CHECK_LINK_STATUS;
- --connection child3_3
- eval $CHILD3_3_SET_OK_STATUS_AS_2_1;
- eval $CHILD3_3_CHECK_LINK_STATUS;
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-eval $MASTER_1_SET_OK_STATUS_AS_2_1;
-eval $MASTER_1_CHECK_LINK_STATUS;
-INSERT INTO ta_l (a, b, c) VALUES
- (8, 'g', '2011-05-05 21:33:30');
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-DROP TABLE ta_l;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_2_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-if ($USE_CHILD_GROUP3)
-{
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child3_1
- --disable_warnings
- eval $CHILD3_1_DROP_TABLES_HA_2_1;
- --enable_warnings
- --connection child3_2
- --disable_warnings
- eval $CHILD3_2_DROP_TABLES_HA_2_1;
- --enable_warnings
- --connection child3_3
- --disable_warnings
- eval $CHILD3_3_DROP_TABLES_HA_2_1;
- --enable_warnings
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---connection master_1
-eval $MASTER_1_CHANGE_HA_MON;
-
---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;
- --connection child2_3
- DROP DATABASE IF EXISTS auto_test_remote3;
-}
-if ($USE_CHILD_GROUP3)
-{
- --connection child3_1
- DROP DATABASE IF EXISTS auto_test_local;
- --connection child3_2
- DROP DATABASE IF EXISTS auto_test_local;
- --connection child3_3
- DROP DATABASE IF EXISTS auto_test_local;
-}
---disable_query_log
---disable_result_log
---source ha_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/ha_part.test b/storage/spider/mysql-test/spider/handler/t/ha_part.test
deleted file mode 100644
index 33fe9850b68..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/ha_part.test
+++ /dev/null
@@ -1,1017 +0,0 @@
-# This test tests for ha features
-if ($USE_HA_TEST)
-{
---disable_warnings
---disable_query_log
---disable_result_log
---source test_init.inc
---source ha_test_init.inc
---enable_result_log
---enable_query_log
-if (!$HAVE_PARTITION)
-{
- --disable_query_log
- --disable_result_log
- --source ha_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_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;
- --connection child2_3
- DROP DATABASE IF EXISTS auto_test_remote3;
- CREATE DATABASE auto_test_remote3;
- USE auto_test_remote3;
-}
-if ($USE_CHILD_GROUP3)
-{
- --connection child3_1
- DROP DATABASE IF EXISTS auto_test_local;
- CREATE DATABASE auto_test_local;
- USE auto_test_local;
- --connection child3_2
- DROP DATABASE IF EXISTS auto_test_local;
- CREATE DATABASE auto_test_local;
- USE auto_test_local;
- --connection child3_3
- DROP DATABASE IF EXISTS auto_test_local;
- CREATE DATABASE auto_test_local;
- USE auto_test_local;
-}
---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;
- --connection child2_3
- SELECT 1;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-if ($USE_CHILD_GROUP3)
-{
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child3_1
- SELECT 1;
- --connection child3_2
- SELECT 1;
- --connection child3_3
- SELECT 1;
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
-if ($HAVE_PARTITION)
-{
- --echo
- --echo create table with partition 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_DROP_TABLES2;
- echo CHILD2_1_CREATE_TABLES;
- echo CHILD2_1_CREATE_TABLES2;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_TABLES;
- eval $CHILD2_1_DROP_TABLES2;
- --enable_warnings
- eval $CHILD2_1_CREATE_TABLES;
- eval $CHILD2_1_CREATE_TABLES2;
- 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_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_3
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_3_DROP_TABLES;
- echo CHILD2_3_CREATE_TABLES;
- }
- --disable_warnings
- eval $CHILD2_3_DROP_TABLES;
- --enable_warnings
- eval $CHILD2_3_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
- }
- }
- if ($USE_CHILD_GROUP3)
- {
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child3_1
- --disable_warnings
- eval $CHILD3_1_DROP_TABLES_HA_P_2_1;
- --enable_warnings
- eval $CHILD3_1_CREATE_TABLES_HA_P_2_1;
- --connection child3_2
- --disable_warnings
- eval $CHILD3_2_DROP_TABLES_HA_P_2_1;
- --enable_warnings
- eval $CHILD3_2_CREATE_TABLES_HA_P_2_1;
- --connection child3_3
- --disable_warnings
- eval $CHILD3_3_DROP_TABLES_HA_P_2_1;
- --enable_warnings
- eval $CHILD3_3_CREATE_TABLES_HA_P_2_1;
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- --connection master_1
- --disable_warnings
- DROP TABLE IF EXISTS ta_l2;
- --enable_warnings
- --disable_query_log
- echo CREATE TABLE ta_l2 (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
- ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_HA_P_2_1;
- eval CREATE TABLE ta_l2 (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_HA_P_2_1;
- --enable_query_log
- 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');
-
- --echo
- --echo select 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;
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- --connection child2_3
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- --connection master_1
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
- 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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- eval $CHILD2_1_SELECT_TABLES2;
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_2_SELECT_TABLES;
- --connection child2_3
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_3_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
-
- --echo
- --echo fail-over 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;
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- --connection child2_3
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_3_HA_DROP_TABLES;
- }
- --disable_warnings
- eval $CHILD2_3_HA_DROP_TABLES;
- --enable_warnings
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- --connection master_1
- eval $MASTER_1_CHECK_HA_STATUS;
- --error 12511
- INSERT INTO ta_l2 (a, b, c) VALUES
- (6, 'e', '2011-05-05 20:04:05');
- eval $MASTER_1_CHECK_LINK_STATUS;
- eval $MASTER_1_CHECK_LINK_FAILED_LOG;
- eval $MASTER_1_CHECK_HA_STATUS;
- INSERT INTO ta_l2 (a, b, c) VALUES
- (6, 'e', '2011-05-05 20:04:05');
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
- 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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- eval $CHILD2_1_SELECT_TABLES2;
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_2_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- if ($USE_CHILD_GROUP3)
- {
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child3_1
- eval $CHILD3_1_CHECK_LINK_STATUS;
- eval $CHILD3_1_CHECK_LINK_FAILED_LOG;
- --connection child3_2
- eval $CHILD3_2_CHECK_LINK_STATUS;
- eval $CHILD3_2_CHECK_LINK_FAILED_LOG;
- --connection child3_3
- eval $CHILD3_3_CHECK_LINK_STATUS;
- eval $CHILD3_3_CHECK_LINK_FAILED_LOG;
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --enable_query_log
- --enable_result_log
- }
- }
-
- --echo
- --echo recovery 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;
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- --connection child2_3
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_3_HA_CREATE_TABLES;
- }
- eval $CHILD2_3_HA_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
- }
- }
- if ($USE_CHILD_GROUP3)
- {
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child3_1
- eval $CHILD3_1_SET_RECOVERY_STATUS_P_2_1;
- eval $CHILD3_1_CHECK_LINK_STATUS;
- --connection child3_2
- eval $CHILD3_2_SET_RECOVERY_STATUS_P_2_1;
- eval $CHILD3_2_CHECK_LINK_STATUS;
- --connection child3_3
- eval $CHILD3_3_SET_RECOVERY_STATUS_P_2_1;
- eval $CHILD3_3_CHECK_LINK_STATUS;
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- --connection master_1
- eval $MASTER_1_SET_RECOVERY_STATUS_P_2_1;
- eval $MASTER_1_CHECK_LINK_STATUS;
- eval $MASTER_1_COPY_TABLES_P_2_1;
- if ($USE_CHILD_GROUP3)
- {
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child3_1
- eval $CHILD3_1_SET_OK_STATUS_P_2_1;
- eval $CHILD3_1_CHECK_LINK_STATUS;
- --connection child3_2
- eval $CHILD3_2_SET_OK_STATUS_P_2_1;
- eval $CHILD3_2_CHECK_LINK_STATUS;
- --connection child3_3
- eval $CHILD3_3_SET_OK_STATUS_P_2_1;
- eval $CHILD3_3_CHECK_LINK_STATUS;
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- --connection master_1
- eval $MASTER_1_SET_OK_STATUS_P_2_1;
- eval $MASTER_1_CHECK_LINK_STATUS;
- INSERT INTO ta_l2 (a, b, c) VALUES
- (8, 'g', '2011-05-05 21:33:30'),
- (9, 'h', '2011-05-05 22:32:10');
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
- DROP TABLE ta_l2;
- 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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- eval $CHILD2_1_SELECT_TABLES2;
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_2_SELECT_TABLES;
- --connection child2_3
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_3_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- if ($USE_CHILD_GROUP3)
- {
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child3_1
- --disable_warnings
- eval $CHILD3_1_DROP_TABLES_HA_P_2_1;
- --enable_warnings
- --connection child3_2
- --disable_warnings
- eval $CHILD3_2_DROP_TABLES_HA_P_2_1;
- --enable_warnings
- --connection child3_3
- --disable_warnings
- eval $CHILD3_3_DROP_TABLES_HA_P_2_1;
- --enable_warnings
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --enable_query_log
- --enable_result_log
- }
- }
-}
-
-if ($HAVE_PARTITION)
-{
- --echo
- --echo create table with partition 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_DROP_TABLES2;
- echo CHILD2_1_CREATE_TABLES;
- echo CHILD2_1_CREATE_TABLES2;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_TABLES;
- eval $CHILD2_1_DROP_TABLES2;
- --enable_warnings
- eval $CHILD2_1_CREATE_TABLES;
- eval $CHILD2_1_CREATE_TABLES2;
- 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_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_3
- if ($OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- echo CHILD2_3_DROP_TABLES;
- echo CHILD2_3_CREATE_TABLES;
- }
- --disable_warnings
- eval $CHILD2_3_DROP_TABLES;
- --enable_warnings
- eval $CHILD2_3_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
- }
- }
- if ($USE_CHILD_GROUP3)
- {
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child3_1
- --disable_warnings
- eval $CHILD3_1_DROP_TABLES_HA_P_2_1;
- --enable_warnings
- eval $CHILD3_1_CREATE_TABLES_HA_AS_P_2_1;
- --connection child3_2
- --disable_warnings
- eval $CHILD3_2_DROP_TABLES_HA_P_2_1;
- --enable_warnings
- eval $CHILD3_2_CREATE_TABLES_HA_AS_P_2_1;
- --connection child3_3
- --disable_warnings
- eval $CHILD3_3_DROP_TABLES_HA_P_2_1;
- --enable_warnings
- eval $CHILD3_3_CREATE_TABLES_HA_AS_P_2_1;
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- --connection master_1
- --disable_warnings
- DROP TABLE IF EXISTS ta_l2;
- --enable_warnings
- --disable_query_log
- echo CREATE TABLE ta_l2 (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
- ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_HA_AS_P_2_1;
- eval CREATE TABLE ta_l2 (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_HA_AS_P_2_1;
- --enable_query_log
- 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');
-
- --echo
- --echo select 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;
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- --connection child2_3
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- --connection master_1
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
- 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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- eval $CHILD2_1_SELECT_TABLES2;
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_2_SELECT_TABLES;
- --connection child2_3
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_3_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
-
- --echo
- --echo fail-over 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_HA_AS_DROP_TABLES2;
- }
- --disable_warnings
- eval $CHILD2_1_HA_AS_DROP_TABLES2;
- --enable_warnings
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- --connection child2_3
- 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_HA_STATUS;
- --error 12511
- INSERT INTO ta_l2 (a, b, c) VALUES
- (6, 'e', '2011-05-05 20:04:05');
- eval $MASTER_1_CHECK_LINK_STATUS;
- eval $MASTER_1_CHECK_LINK_FAILED_LOG;
- eval $MASTER_1_CHECK_HA_STATUS;
- INSERT INTO ta_l2 (a, b, c) VALUES
- (6, 'e', '2011-05-05 20:04:05');
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
- 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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_2_SELECT_TABLES;
- --connection child2_3
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_3_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- if ($USE_CHILD_GROUP3)
- {
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child3_1
- eval $CHILD3_1_CHECK_LINK_STATUS;
- eval $CHILD3_1_CHECK_LINK_FAILED_LOG;
- --connection child3_2
- eval $CHILD3_2_CHECK_LINK_STATUS;
- eval $CHILD3_2_CHECK_LINK_FAILED_LOG;
- --connection child3_3
- eval $CHILD3_3_CHECK_LINK_STATUS;
- eval $CHILD3_3_CHECK_LINK_FAILED_LOG;
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --enable_query_log
- --enable_result_log
- }
- }
-
- --echo
- --echo recovery 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_HA_AS_CREATE_TABLES2;
- }
- eval $CHILD2_1_HA_AS_CREATE_TABLES2;
- if ($OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- }
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- --connection child2_3
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- if ($USE_CHILD_GROUP3)
- {
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child3_1
- eval $CHILD3_1_SET_OK_STATUS_AS_P_2_1;
- eval $CHILD3_1_CHECK_LINK_STATUS;
- --connection child3_2
- eval $CHILD3_2_SET_OK_STATUS_AS_P_2_1;
- eval $CHILD3_2_CHECK_LINK_STATUS;
- --connection child3_3
- eval $CHILD3_3_SET_OK_STATUS_AS_P_2_1;
- eval $CHILD3_3_CHECK_LINK_STATUS;
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- --connection master_1
- eval $MASTER_1_SET_OK_STATUS_AS_P_2_1;
- eval $MASTER_1_CHECK_LINK_STATUS;
- INSERT INTO ta_l2 (a, b, c) VALUES
- (8, 'g', '2011-05-05 21:33:30'),
- (9, 'h', '2011-05-05 22:32:10');
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 ORDER BY a;
- DROP TABLE ta_l2;
- 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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_1_SELECT_TABLES;
- eval $CHILD2_1_SELECT_TABLES2;
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_2_SELECT_TABLES;
- --connection child2_3
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_3_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- if ($USE_CHILD_GROUP3)
- {
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child3_1
- --disable_warnings
- eval $CHILD3_1_DROP_TABLES_HA_P_2_1;
- --enable_warnings
- --connection child3_2
- --disable_warnings
- eval $CHILD3_2_DROP_TABLES_HA_P_2_1;
- --enable_warnings
- --connection child3_3
- --disable_warnings
- eval $CHILD3_3_DROP_TABLES_HA_P_2_1;
- --enable_warnings
- if (!$OUTPUT_CHILD_GROUP3)
- {
- --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;
- --connection child2_3
- DROP DATABASE IF EXISTS auto_test_remote3;
-}
-if ($USE_CHILD_GROUP3)
-{
- --connection child3_1
- DROP DATABASE IF EXISTS auto_test_local;
- --connection child3_2
- DROP DATABASE IF EXISTS auto_test_local;
- --connection child3_3
- DROP DATABASE IF EXISTS auto_test_local;
-}
---disable_query_log
---disable_result_log
---source ha_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/ha_test_deinit.inc b/storage/spider/mysql-test/spider/handler/t/ha_test_deinit.inc
deleted file mode 100644
index 53d0409d066..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/ha_test_deinit.inc
+++ /dev/null
@@ -1,30 +0,0 @@
-# get connection and exist engine test
---echo for master_1
---connection master_1
---source ../include/ha_deinit_master_1.inc
---echo for child2
-if ($USE_CHILD_GROUP2)
-{
- --echo child2_1
- --connection child2_1
- --source ../include/ha_deinit_child2_1.inc
- --echo child2_2
- --connection child2_2
- --source ../include/ha_deinit_child2_2.inc
- --echo child2_3
- --connection child2_3
- --source ../include/ha_deinit_child2_3.inc
-}
---echo for child3
-if ($USE_CHILD_GROUP3)
-{
- --echo child3_1
- --connection child3_1
- --source ../include/ha_deinit_child3_1.inc
- --echo child3_2
- --connection child3_2
- --source ../include/ha_deinit_child3_2.inc
- --echo child3_3
- --connection child3_3
- --source ../include/ha_deinit_child3_3.inc
-}
diff --git a/storage/spider/mysql-test/spider/handler/t/ha_test_init.inc b/storage/spider/mysql-test/spider/handler/t/ha_test_init.inc
deleted file mode 100644
index 70576ab16dc..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/ha_test_init.inc
+++ /dev/null
@@ -1,30 +0,0 @@
-# get connection and exist engine test
---echo for master_1
---connection master_1
---source ../include/ha_init_master_1.inc
---echo for child2
-if ($USE_CHILD_GROUP2)
-{
- --echo child2_1
- --connection child2_1
- --source ../include/ha_init_child2_1.inc
- --echo child2_2
- --connection child2_2
- --source ../include/ha_init_child2_2.inc
- --echo child2_3
- --connection child2_3
- --source ../include/ha_init_child2_3.inc
-}
---echo for child3
-if ($USE_CHILD_GROUP3)
-{
- --echo child3_1
- --connection child3_1
- --source ../include/ha_init_child3_1.inc
- --echo child3_2
- --connection child3_2
- --source ../include/ha_init_child3_2.inc
- --echo child3_3
- --connection child3_3
- --source ../include/ha_init_child3_3.inc
-}
diff --git a/storage/spider/mysql-test/spider/handler/t/have_engine.inc b/storage/spider/mysql-test/spider/handler/t/have_engine.inc
deleted file mode 100644
index 64bef7499cb..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/have_engine.inc
+++ /dev/null
@@ -1,7 +0,0 @@
-if (!`SELECT count(*) FROM information_schema.engines WHERE
- (support = 'YES' OR support = 'DEFAULT') AND
- engine = '$TEST_ENGINE_TYPE'`)
-{
- SELECT engine, support FROM information_schema.engines;
- --let $SKIP_REASON= "Need $TEST_ENGINE_TYPE engine"
-}
diff --git a/storage/spider/mysql-test/spider/handler/t/have_func.inc b/storage/spider/mysql-test/spider/handler/t/have_func.inc
deleted file mode 100644
index e0823e73fc8..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/have_func.inc
+++ /dev/null
@@ -1,5 +0,0 @@
-if (!`SELECT count(*) FROM mysql.func WHERE name = '$TEST_FUNC_NAME'`)
-{
- SELECT name FROM mysql.func;
- --let $SKIP_REASON= "Need $TEST_FUNC_NAME function"
-}
diff --git a/storage/spider/mysql-test/spider/handler/t/have_partition.inc b/storage/spider/mysql-test/spider/handler/t/have_partition.inc
deleted file mode 100644
index b6e699475db..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/have_partition.inc
+++ /dev/null
@@ -1,7 +0,0 @@
-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
deleted file mode 100644
index 32de484b388..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/have_trigger.inc
+++ /dev/null
@@ -1,2 +0,0 @@
-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/hs_test_deinit.inc b/storage/spider/mysql-test/spider/handler/t/hs_test_deinit.inc
deleted file mode 100644
index 7ec2e981fd2..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/hs_test_deinit.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-# get connection and exist engine test
---echo for master_1
---connection master_1
---source ../include/hs_deinit_master_1.inc
---echo for child2
-if ($USE_CHILD_GROUP2)
-{
- --echo child2_1
- --connection child2_1
- --source ../include/hs_deinit_child2_1.inc
- --echo child2_2
- --connection child2_2
- --source ../include/hs_deinit_child2_2.inc
- --echo child2_3
- --connection child2_3
- --source ../include/hs_deinit_child2_3.inc
-}
diff --git a/storage/spider/mysql-test/spider/handler/t/hs_test_init.inc b/storage/spider/mysql-test/spider/handler/t/hs_test_init.inc
deleted file mode 100644
index 831bf479524..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/hs_test_init.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-# get connection and exist engine test
---echo for master_1
---connection master_1
---source ../include/hs_init_master_1.inc
---echo for child2
-if ($USE_CHILD_GROUP2)
-{
- --echo child2_1
- --connection child2_1
- --source ../include/hs_init_child2_1.inc
- --echo child2_2
- --connection child2_2
- --source ../include/hs_init_child2_2.inc
- --echo child2_3
- --connection child2_3
- --source ../include/hs_init_child2_3.inc
-}
diff --git a/storage/spider/mysql-test/spider/handler/t/slave_test_deinit.inc b/storage/spider/mysql-test/spider/handler/t/slave_test_deinit.inc
deleted file mode 100644
index e9d99b7a960..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/slave_test_deinit.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-# get connection and exist engine test
---echo for slave1_1
---connection slave1_1
-STOP SLAVE;
---source ../include/deinit_slave1_1.inc
---disconnect slave1_1
diff --git a/storage/spider/mysql-test/spider/handler/t/slave_test_init.inc b/storage/spider/mysql-test/spider/handler/t/slave_test_init.inc
deleted file mode 100644
index 739d88970c5..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/slave_test_init.inc
+++ /dev/null
@@ -1,44 +0,0 @@
-# get connection and exist engine test
---echo for slave1_1
---source connect_slave1_1.inc
---connection slave1_1
-SET SESSION sql_log_bin= 0;
---let $SLAVE1_1_SERVER_ID=`SELECT @@global.server_id`
---let $TEST_ENGINE_TYPE= $SLAVE1_1_ENGINE_TYPE
---source have_partition.inc
---source have_trigger.inc
---source ../include/init_slave1_1.inc
---source have_engine.inc
---let $SLAVE1_1_SLAVE_STATUS=`SHOW SLAVE STATUS`
-if (!$SLAVE1_1_SLAVE_STATUS)
-{
- eval CHANGE MASTER TO
- MASTER_HOST = '127.0.0.1',
- MASTER_USER = 'root',
- MASTER_PASSWORD = '',
- MASTER_PORT = $MASTER_1_MYPORT
- ;
-}
-START SLAVE;
---connection master_1
-call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
---connection slave1_1
-call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
-if ($USE_CHILD_GROUP2)
-{
- --connection child2_1
- call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
- --connection child2_2
- call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
- --connection child2_3
- call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
-}
-if ($USE_CHILD_GROUP3)
-{
- --connection child3_1
- call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
- --connection child3_2
- call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
- --connection child3_3
- call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
-}
diff --git a/storage/spider/mysql-test/spider/handler/t/spider3_fixes.test b/storage/spider/mysql-test/spider/handler/t/spider3_fixes.test
deleted file mode 100644
index 30d22a6a16f..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/spider3_fixes.test
+++ /dev/null
@@ -1,297 +0,0 @@
-# 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
-SET @original_spider_auto_increment_mode = @@SESSION.spider_auto_increment_mode;
-SET SESSION spider_auto_increment_mode = -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;
---disable_ps_protocol
-eval $MASTER_1_AUTO_INCREMENT_INCREMENT2;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET2;
---enable_ps_protocol
-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;
-SET SESSION spider_auto_increment_mode = @original_spider_auto_increment_mode;
-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 command_type != 'Execute' AND 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
deleted file mode 100644
index e9c9c194e5c..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/spider3_fixes_part.test
+++ /dev/null
@@ -1,350 +0,0 @@
-# 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
- SET @original_spider_auto_increment_mode = @@SESSION.spider_auto_increment_mode;
- SET SESSION spider_auto_increment_mode = -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;
- --disable_ps_protocol
- eval $MASTER_1_AUTO_INCREMENT_INCREMENT2;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET2;
- --enable_ps_protocol
- 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;
- SET SESSION spider_auto_increment_mode = @original_spider_auto_increment_mode;
- 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 command_type != 'Execute' AND 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 command_type != 'Execute' AND 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/t/spider_fixes.test b/storage/spider/mysql-test/spider/handler/t/spider_fixes.test
deleted file mode 100644
index 5a3c1d1c893..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/spider_fixes.test
+++ /dev/null
@@ -1,1433 +0,0 @@
-# This test tests for Spider'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 create table and insert
-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 tb_l;
---enable_warnings
---disable_query_log
-echo CREATE TABLE tb_l (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
-) MASTER_1_ENGINE2 MASTER_1_CHARSET2;
-eval CREATE TABLE tb_l (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
-) $MASTER_1_ENGINE2 $MASTER_1_CHARSET2;
---enable_query_log
-INSERT INTO tb_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');
---disable_warnings
-DROP TABLE IF EXISTS ta_l;
---enable_warnings
---disable_query_log
-echo CREATE TABLE ta_l (
- 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 SELECT a, b, c FROM tb_l;
-
---echo
---echo 2.13
---echo select table with "order by desc" and "<"
-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
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
-WHERE a < 5 ORDER BY a DESC LIMIT 3;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo select table with "order by desc" and "<="
-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
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
-WHERE a <= 5 ORDER BY a DESC LIMIT 3;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo 2.14
---echo update table with range scan and split_read
-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
-UPDATE ta_l SET c = '2000-02-02 00:00:00' WHERE a > 1;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
-
---echo
---echo 2.15
---echo select table with range scan
-TRUNCATE TABLE ta_l;
---disable_warnings
-DROP TABLE IF EXISTS ta_l;
---enable_warnings
-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_TABLES6;
- echo CHILD2_1_CREATE_TABLES6;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_TABLES6;
- --enable_warnings
- eval $CHILD2_1_CREATE_TABLES6;
- --enable_query_log
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_result_log
- }
-}
---connection master_1
---disable_query_log
-echo CREATE TABLE ta_l (
- a int(11) NOT NULL DEFAULT '0',
- b char(1) DEFAULT NULL,
- c datetime DEFAULT NULL,
- PRIMARY KEY (a, b, c)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT5_2_1;
-eval CREATE TABLE ta_l (
- a int(11) NOT NULL DEFAULT '0',
- b char(1) DEFAULT NULL,
- c datetime DEFAULT NULL,
- PRIMARY KEY (a, b, c)
-) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT5_2_1;
---enable_query_log
-INSERT INTO ta_l SELECT a, b, c FROM tb_l;
-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
-SELECT a, b, c FROM ta_l FORCE INDEX(PRIMARY) WHERE a = 4 AND b >= 'b'
-AND c = '2003-11-30 05:01:03';
-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 command_type != 'Execute' AND argument LIKE '%select %';
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, c FROM ta_l FORCE INDEX(PRIMARY) WHERE a = 4 AND b > 'b'
-AND c = '2003-11-30 05:01:03';
-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 command_type != 'Execute' AND argument LIKE '%select %';
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, c FROM ta_l FORCE INDEX(PRIMARY) WHERE a >= 4 AND b = 'd'
-AND c = '2003-11-30 05:01:03';
-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 command_type != 'Execute' AND argument LIKE '%select %';
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, c FROM ta_l FORCE INDEX(PRIMARY) WHERE a > 4 AND b = 'c'
-AND c = '2001-12-31 23:59:59';
-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 command_type != 'Execute' AND argument LIKE '%select %';
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, c FROM ta_l FORCE INDEX(PRIMARY) WHERE a = 4 AND b <= 'd'
-AND c = '2003-11-30 05:01:03';
-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 command_type != 'Execute' AND argument LIKE '%select %';
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, c FROM ta_l FORCE INDEX(PRIMARY) WHERE a = 4 AND b < 'e'
-AND c = '2003-11-30 05:01:03';
-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 command_type != 'Execute' AND argument LIKE '%select %';
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, c FROM ta_l FORCE INDEX(PRIMARY) WHERE a <= 4 AND b = 'b'
-AND c = '2000-01-01 00:00:00';
-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 command_type != 'Execute' AND argument LIKE '%select %';
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, c FROM ta_l FORCE INDEX(PRIMARY) WHERE a < 4 AND b = 'b'
-AND c = '2000-01-01 00:00:00';
-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 command_type != 'Execute' AND argument LIKE '%select %';
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, c FROM ta_l FORCE INDEX(PRIMARY) WHERE a = 4 AND b >= 'b'
-AND b <= 'd' AND c = '2003-11-30 05:01:03';
-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 command_type != 'Execute' AND argument LIKE '%select %';
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, c FROM ta_l FORCE INDEX(PRIMARY) WHERE a = 4 AND b > 'b'
-AND b < 'e' AND c = '2003-11-30 05:01:03';
-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 command_type != 'Execute' AND argument LIKE '%select %';
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, c FROM ta_l FORCE INDEX(PRIMARY) WHERE a <= 4 AND a >= 1
-AND b >= 'b' AND c = '2003-11-30 05:01:03';
-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 command_type != 'Execute' AND argument LIKE '%select %';
- TRUNCATE TABLE mysql.general_log;
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, c FROM ta_l FORCE INDEX(PRIMARY) WHERE a < 4 AND a > 1
-AND b >= 'b' AND c = '2000-01-01 00:00:00';
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo 2.16
---echo auto_increment insert with trigger
-if ($HAVE_TRIGGER)
-{
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_result_log
- }
- --disable_query_log
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- echo CHILD2_1_DROP_TABLES4;
- echo CHILD2_1_CREATE_TABLES4;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_TABLES4;
- --enable_warnings
- eval $CHILD2_1_CREATE_TABLES4;
- --enable_query_log
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_result_log
- }
- }
- --connection master_1
- --disable_query_log
- echo CREATE TABLE ta_l_auto_inc (
- a INT AUTO_INCREMENT,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT3_2_1;
- eval CREATE TABLE ta_l_auto_inc (
- a INT AUTO_INCREMENT,
- b CHAR(1) DEFAULT 'c',
- c DATETIME DEFAULT '1999-10-10 10:10:10',
- PRIMARY KEY(a)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT3_2_1;
- echo CREATE TABLE tc_l (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
- ) MASTER_1_ENGINE2 MASTER_1_CHARSET2;
- eval CREATE TABLE tc_l (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
- ) $MASTER_1_ENGINE2 $MASTER_1_CHARSET2;
- --enable_query_log
- --eval CREATE TRIGGER ins_ta_l_auto_inc AFTER INSERT ON ta_l_auto_inc FOR EACH ROW BEGIN INSERT INTO tc_l (a, b, c) VALUES (NEW.a, NEW.b, NEW.c); END;
- 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;
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- --connection master_1
- INSERT INTO ta_l_auto_inc (a, b, c) VALUES
- (NULL, 's', '2008-12-31 20:59:59');
- 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 command_type != 'Execute' AND argument LIKE '%insert %';
- }
- eval $CHILD2_1_SELECT_TABLES4;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
- --connection master_1
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM tc_l ORDER BY a;
-}
-
---echo
---echo 2.17
---echo engine-condition-pushdown with "or" and joining
-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
-SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l WHERE a = 1 OR a IN (SELECT a FROM tb_l);
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo 2.23
---echo index merge
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_result_log
- }
- --disable_query_log
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- echo CHILD2_1_DROP_TABLES5;
- echo CHILD2_1_CREATE_TABLES5;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_TABLES5;
- --enable_warnings
- eval $CHILD2_1_CREATE_TABLES5;
- --enable_query_log
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_result_log
- }
-}
---connection master_1
---disable_query_log
-echo CREATE TABLE ta_l_int (
- a INT AUTO_INCREMENT,
- b INT DEFAULT 10,
- c INT DEFAULT 11,
- PRIMARY KEY(a),
- KEY idx1(b),
- KEY idx2(c)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT4_2_1;
-eval CREATE TABLE ta_l_int (
- a INT AUTO_INCREMENT,
- b INT DEFAULT 10,
- c INT DEFAULT 11,
- PRIMARY KEY(a),
- KEY idx1(b),
- KEY idx2(c)
-) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT4_2_1;
---enable_query_log
-INSERT INTO ta_l_int (a, b, c) VALUES (1, 2, 3);
-INSERT INTO ta_l_int (a, b, c) SELECT a + 1, b + 1, c + 1 FROM ta_l_int;
-INSERT INTO ta_l_int (a, b, c) SELECT a + 2, b + 2, c + 2 FROM ta_l_int;
-INSERT INTO ta_l_int (a, b, c) SELECT a + 4, b + 4, c + 4 FROM ta_l_int;
-INSERT INTO ta_l_int (a, b, c) SELECT a + 8, b + 8, c + 8 FROM ta_l_int;
-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
-SELECT a, b, c FROM ta_l_int force index(primary, idx1, idx2)
-WHERE a = 5 OR b = 5 OR c = 5 ORDER BY a;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo
---echo 2.24
---echo index scan update without PK
---connection master_1
---disable_warnings
-DROP TABLE IF EXISTS ta_l_int;
---enable_warnings
---disable_query_log
-echo CREATE TABLE ta_l_int (
- a INT NOT NULL,
- b INT DEFAULT 10,
- c INT DEFAULT 11,
- KEY idx1(b),
- KEY idx2(c)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT4_2_1;
-if ($MASTER_1_NEEDPK)
-{
- --error ER_REQUIRES_PRIMARY_KEY
- eval CREATE TABLE ta_l_int (
- a INT NOT NULL,
- b INT DEFAULT 10,
- c INT DEFAULT 11,
- KEY idx1(b),
- KEY idx2(c)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT4_2_1;
- eval CREATE TABLE ta_l_int (
- a INT NOT NULL,
- b INT DEFAULT 10,
- c INT DEFAULT 11,
- PRIMARY KEY(a),
- KEY idx1(b),
- KEY idx2(c)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT4_2_1;
-}
-if (!$MASTER_1_NEEDPK)
-{
- eval CREATE TABLE ta_l_int (
- a INT NOT NULL,
- b INT DEFAULT 10,
- c INT DEFAULT 11,
- KEY idx1(b),
- KEY idx2(c)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT4_2_1;
-}
---enable_query_log
-SELECT a, b, c FROM ta_l_int ORDER BY a;
-INSERT INTO ta_l_int (a, b, c) VALUES (0, 2, 3);
-INSERT INTO ta_l_int (a, b, c) VALUES (18, 2, 3);
-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
-UPDATE ta_l_int SET c = 4 WHERE b = 2;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%update %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-SELECT a, b, c FROM ta_l_int ORDER BY a;
-
-
---echo
---echo 2.25
---echo direct order limit
---connection master_1
-eval $MASTER_1_CHECK_DIRECT_ORDER_LIMIT_STATUS;
-SELECT a, b, c FROM ta_l_int ORDER BY a LIMIT 3;
-eval $MASTER_1_CHECK_DIRECT_ORDER_LIMIT_STATUS;
-
-
---echo
---echo 2.26
---echo lock tables
-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_LOCK_TABLES1;
- echo CHILD2_1_DROP_LOCK_TABLES2;
- echo CHILD2_1_CREATE_LOCK_TABLES1;
- echo CHILD2_1_CREATE_LOCK_TABLES2;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_LOCK_TABLES1;
- eval $CHILD2_1_DROP_LOCK_TABLES2;
- --enable_warnings
- eval $CHILD2_1_CREATE_LOCK_TABLES1;
- eval $CHILD2_1_CREATE_LOCK_TABLES2;
- 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_LOCK_TABLES1;
- echo CHILD2_2_DROP_LOCK_TABLES2;
- echo CHILD2_2_CREATE_LOCK_TABLES1;
- echo CHILD2_2_CREATE_LOCK_TABLES2;
- }
- --disable_warnings
- eval $CHILD2_2_DROP_LOCK_TABLES1;
- eval $CHILD2_2_DROP_LOCK_TABLES2;
- --enable_warnings
- eval $CHILD2_2_CREATE_LOCK_TABLES1;
- eval $CHILD2_2_CREATE_LOCK_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_warnings
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t2;
---enable_warnings
---disable_query_log
-echo CREATE TABLE t1 (
- id int(11) NOT NULL,
- PRIMARY KEY (id)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_LOCK1;
-eval CREATE TABLE t1 (
- id int(11) NOT NULL,
- PRIMARY KEY (id)
-) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_LOCK1;
-echo CREATE TABLE t2 (
- id int(11) NOT NULL,
- PRIMARY KEY (id)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_LOCK2;
-eval CREATE TABLE t2 (
- id int(11) NOT NULL,
- PRIMARY KEY (id)
-) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_LOCK2;
---enable_query_log
-LOCK TABLES t1 READ, t2 READ;
-UNLOCK TABLES;
-
-
---echo
---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
-SET @original_spider_auto_increment_mode = @@SESSION.spider_auto_increment_mode;
-SET SESSION spider_auto_increment_mode = -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;
---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 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;
---disable_ps_protocol
-eval $MASTER_1_AUTO_INCREMENT_INCREMENT2;
-eval $MASTER_1_AUTO_INCREMENT_OFFSET2;
---enable_ps_protocol
-if ($USE_REPLICATION)
-{
- SET SESSION sql_log_bin= 1;
- --connection slave1_1
- --disable_warnings
- DROP TABLE IF EXISTS t1;
- --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;
- 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;
- --connection master_1
-}
---enable_query_log
-INSERT INTO t1 () VALUES ();
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
-INSERT INTO t1 () VALUES ();
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
-INSERT INTO t1 (id) VALUES (null);
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
-INSERT INTO t1 (id) VALUES (null);
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
-INSERT INTO t1 () VALUES (),(),(),();
-SELECT LAST_INSERT_ID();
-SELECT id FROM t1 ORDER BY id;
-SET INSERT_ID=5000;
-INSERT INTO t1 () VALUES ();
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
-INSERT INTO t1 (id) VALUES (10000);
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
-INSERT INTO t1 (id) VALUES (1000);
-SELECT LAST_INSERT_ID();
-SELECT MAX(id) FROM t1;
-SET SESSION spider_auto_increment_mode = @original_spider_auto_increment_mode;
-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 command_type != 'Execute' AND 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 read only
-let $MASTER_1_ENGINE_IS_SPIDER=
- `SELECT IF('$MASTER_1_ENGINE_TYPE' = 'Spider' OR
- '$MASTER_1_HIDDEN_ENGINE_TYPE' = 'Spider', 1, 0)`;
-if ($MASTER_1_ENGINE_IS_SPIDER)
-{
- --connection master_1
- SET @original_spider_read_only_mode = @@SESSION.spider_read_only_mode;
- SET SESSION spider_read_only_mode = -1;
- --disable_warnings
- DROP TABLE IF EXISTS t1;
- --enable_warnings
- --disable_query_log
- echo CREATE TABLE t1 (
- id int(11) NOT NULL,
- PRIMARY KEY (id)
- ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_READONLY1_1;
- eval CREATE TABLE t1 (
- id int(11) NOT NULL,
- PRIMARY KEY (id)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_READONLY1_1;
- --let $MIN_VAL= `SELECT MIN(id) FROM t1`
- --enable_query_log
- SELECT id FROM t1 ORDER BY id;
- --error 12518
- INSERT INTO t1 (id) VALUES (1);
- --error 12518
- eval UPDATE t1 SET id = 4 WHERE id = $MIN_VAL;
- --error 12518
- eval DELETE FROM t1 WHERE id = $MIN_VAL;
- --error 12518
- DELETE FROM t1;
- --error 12518
- TRUNCATE t1;
- SET SESSION spider_read_only_mode = @original_spider_read_only_mode;
-}
-if (!$MASTER_1_ENGINE_IS_SPIDER)
-{
- --echo skipped
-}
-
-
---echo
---echo 2.27
---echo error mode
-if ($MASTER_1_ENGINE_IS_SPIDER)
-{
- --connection master_1
- SET @original_spider_error_read_mode = @@SESSION.spider_error_read_mode;
- SET @original_spider_error_write_mode = @@SESSION.spider_error_write_mode;
- SET SESSION spider_error_read_mode = -1;
- SET SESSION spider_error_write_mode = -1;
- --disable_warnings
- DROP TABLE IF EXISTS t1;
- --enable_warnings
- --disable_query_log
- echo CREATE TABLE t1 (
- id int(11) NOT NULL,
- PRIMARY KEY (id)
- ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_ERROR_MODE1_1;
- eval CREATE TABLE t1 (
- id int(11) NOT NULL,
- PRIMARY KEY (id)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_ERROR_MODE1_1;
- --enable_query_log
- SELECT id FROM t1 ORDER BY id;
- INSERT INTO t1 (id) VALUES (1);
- DELETE FROM t1;
- TRUNCATE t1;
- SET SESSION spider_error_read_mode = @original_spider_error_read_mode;
- SET SESSION spider_error_write_mode = @original_spider_error_write_mode;
-}
-if (!$MASTER_1_ENGINE_IS_SPIDER)
-{
- --echo skipped
-}
-
-
---echo
---echo 3.0
---echo is null
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_result_log
- }
- --disable_query_log
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- echo CHILD2_1_DROP_TEXT_KEY_TABLES1;
- echo CHILD2_1_CREATE_TEXT_KEY_TABLES1;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_TEXT_KEY_TABLES1;
- --enable_warnings
- eval $CHILD2_1_CREATE_TEXT_KEY_TABLES1;
- --enable_query_log
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_result_log
- }
-}
---connection master_1
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
---disable_query_log
-echo CREATE TABLE t1 (
- a VARCHAR(255),
- b VARCHAR(255),
- c VARCHAR(255),
- KEY idx1(a,b),
- KEY idx2(b),
- PRIMARY KEY(c)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_TEXT_KEY1_1;
-eval CREATE TABLE t1 (
- a VARCHAR(255),
- b VARCHAR(255),
- c VARCHAR(255),
- KEY idx1(a,b),
- KEY idx2(b),
- PRIMARY KEY(c)
-) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_TEXT_KEY1_1;
---enable_query_log
-insert into t1 values (null, null, '2048');
-insert into t1 values ('1', '1', '1');
-insert into t1 select a + 1, b + 1, c + 1 from t1;
-insert into t1 select a + 2, b + 2, c + 2 from t1;
-insert into t1 select a + 4, b + 4, c + 4 from t1;
-insert into t1 select a + 8, b + 8, c + 8 from t1;
-insert into t1 select a + 16, b + 16, c + 16 from t1;
-insert into t1 select a + 32, b + 32, c + 32 from t1;
-insert into t1 select a + 64, b + 64, c + 64 from t1;
-insert into t1 select a + 128, b + 128, c + 128 from t1;
-insert into t1 select a + 256, b + 256, c + 256 from t1;
-insert into t1 select a + 512, b + 512, c + 512 from t1;
-flush tables;
-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
-select a from t1 where a is null order by a limit 30;
-select b from t1 where b is null order by b limit 30;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_1_SELECT_TEXT_PK_TABLES1;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
-
---echo
---echo direct_order_limit
---connection master_1
-TRUNCATE TABLE t1;
-insert into t1 values ('1', '1', '1');
-insert into t1 select a + 1, b + 1, c + 1 from t1;
-insert into t1 select a + 2, b + 2, c + 2 from t1;
-insert into t1 select a + 4, b + 4, c + 4 from t1;
-insert into t1 select a + 8, b + 8, c + 8 from t1;
-insert into t1 select a + 16, b + 16, c + 16 from t1;
-insert into t1 select a, b + 32, c + 32 from t1;
-insert into t1 select a, b + 64, c + 64 from t1;
-insert into t1 select a, b + 128, c + 128 from t1;
-flush tables;
-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
-select a, b, c from t1 where a = '10' and b <> '100' order by c desc limit 5;
-select a, c from t1 where a = '10' order by b desc limit 5;
-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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_1_SELECT_TEXT_PK_TABLES1;
- 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/spider_fixes_part.test b/storage/spider/mysql-test/spider/handler/t/spider_fixes_part.test
deleted file mode 100644
index 22ba6102405..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/spider_fixes_part.test
+++ /dev/null
@@ -1,650 +0,0 @@
-# This test tests for Spider'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
- }
-}
-
---connection master_1
---disable_warnings
-DROP TABLE IF EXISTS tb_l;
---enable_warnings
---disable_query_log
-echo CREATE TABLE tb_l (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
-) MASTER_1_ENGINE2 MASTER_1_CHARSET2;
-eval CREATE TABLE tb_l (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
-) $MASTER_1_ENGINE2 $MASTER_1_CHARSET2;
---enable_query_log
-INSERT INTO tb_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 2.17
---echo partition with sort
-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;
- --enable_query_log
- INSERT INTO ta_l2 SELECT a, b, c FROM tb_l;
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 WHERE a > 1
- ORDER BY a;
- 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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_2_SELECT_TABLES;
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
- }
- eval $CHILD2_1_SELECT_TABLES2;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
-}
-
---echo
---echo 2.23
---echo partition update with moving partition
-if ($HAVE_PARTITION)
-{
- --connection master_1
- --disable_warnings
- DROP TABLE IF EXISTS ta_l2;
- --enable_warnings
- 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;
- --enable_query_log
- INSERT INTO ta_l2 (a, b, c) VALUES (3, 'B', '2010-09-26 00:00:00');
- UPDATE ta_l2 SET a = 4 WHERE a = 3;
- SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2;
- 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 command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%insert %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%update %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%delete %';
- }
- eval $CHILD2_2_SELECT_TABLES;
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%insert %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%update %';
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%delete %';
- }
- eval $CHILD2_1_SELECT_TABLES2;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
-}
-
---echo index merge with partition
-if ($HAVE_PARTITION)
-{
- --connection master_1
- --disable_warnings
- DROP TABLE IF EXISTS ta_l_int;
- --enable_warnings
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_result_log
- }
- --disable_query_log
- --connection child2_2
- if ($OUTPUT_CHILD_GROUP2)
- {
- echo CHILD2_2_DROP_TABLES5;
- echo CHILD2_2_CREATE_TABLES5;
- }
- --disable_warnings
- eval $CHILD2_2_DROP_TABLES5;
- --enable_warnings
- eval $CHILD2_2_CREATE_TABLES5;
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- echo CHILD2_1_DROP_TABLES5;
- echo CHILD2_1_CREATE_TABLES5;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_TABLES5;
- --enable_warnings
- eval $CHILD2_1_CREATE_TABLES5;
- --enable_query_log
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_result_log
- }
- }
- --connection master_1
- --disable_query_log
- echo CREATE TABLE ta_l_int (
- a INT AUTO_INCREMENT,
- b INT DEFAULT 10,
- c INT DEFAULT 11,
- PRIMARY KEY(a),
- KEY idx1(b),
- KEY idx2(c)
- ) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT3_P_2_1;
- eval CREATE TABLE ta_l_int (
- a INT AUTO_INCREMENT,
- b INT DEFAULT 10,
- c INT DEFAULT 11,
- PRIMARY KEY(a),
- KEY idx1(b),
- KEY idx2(c)
- ) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT3_P_2_1;
- --enable_query_log
- INSERT INTO ta_l_int (a, b, c) VALUES (1, 2, 3);
- INSERT INTO ta_l_int (a, b, c) SELECT a + 1, b + 1, c + 1 FROM ta_l_int;
- INSERT INTO ta_l_int (a, b, c) SELECT a + 2, b + 2, c + 2 FROM ta_l_int;
- INSERT INTO ta_l_int (a, b, c) SELECT a + 4, b + 4, c + 4 FROM ta_l_int;
- INSERT INTO ta_l_int (a, b, c) SELECT a + 8, b + 8, c + 8 FROM ta_l_int;
- if ($USE_CHILD_GROUP2)
- {
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_query_log
- --disable_result_log
- }
- --connection child2_2
- if ($USE_GENERAL_LOG)
- {
- TRUNCATE TABLE mysql.general_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
- SELECT a, b, c FROM ta_l_int force index(primary, idx1, idx2)
- WHERE a = 5 OR b = 5 OR c = 5 ORDER BY a;
- 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 command_type != 'Execute' AND argument LIKE '%select %';
- }
- --connection child2_1
- if ($USE_GENERAL_LOG)
- {
- SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
- }
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
- }
-}
-
-
---echo
---echo 2.26
---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
- SET @original_spider_auto_increment_mode = @@SESSION.spider_auto_increment_mode;
- SET SESSION spider_auto_increment_mode = -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;
- --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 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;
- --disable_ps_protocol
- eval $MASTER_1_AUTO_INCREMENT_INCREMENT2;
- eval $MASTER_1_AUTO_INCREMENT_OFFSET2;
- --enable_ps_protocol
- if ($USE_REPLICATION)
- {
- SET SESSION sql_log_bin= 1;
- --connection slave1_1
- --disable_warnings
- DROP TABLE IF EXISTS t1;
- --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;
- 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;
- --connection master_1
- }
- --enable_query_log
- INSERT INTO t1 () VALUES ();
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- INSERT INTO t1 () VALUES ();
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- INSERT INTO t1 (id) VALUES (null);
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- INSERT INTO t1 (id) VALUES (null);
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- INSERT INTO t1 () VALUES (),(),(),();
- SELECT LAST_INSERT_ID();
- SELECT id FROM t1 ORDER BY id;
- SET INSERT_ID=5000;
- INSERT INTO t1 () VALUES ();
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- INSERT INTO t1 (id) VALUES (10000);
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- INSERT INTO t1 (id) VALUES (1000);
- SELECT LAST_INSERT_ID();
- SELECT MAX(id) FROM t1;
- SET SESSION spider_auto_increment_mode = @original_spider_auto_increment_mode;
- 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 command_type != 'Execute' AND 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 command_type != 'Execute' AND 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/t/test_deinit.inc b/storage/spider/mysql-test/spider/handler/t/test_deinit.inc
deleted file mode 100644
index 989bde26d3c..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/test_deinit.inc
+++ /dev/null
@@ -1,37 +0,0 @@
-# get connection and exist engine test
---echo for master_1
---connection master_1
---source ../include/deinit_master_1.inc
---disconnect master_1
---echo for child2
-if ($USE_CHILD_GROUP2)
-{
- --echo child2_1
- --connection child2_1
- --source ../include/deinit_child2_1.inc
- --disconnect child2_1
- --echo child2_2
- --connection child2_2
- --source ../include/deinit_child2_2.inc
- --disconnect child2_2
- --echo child2_3
- --connection child2_3
- --source ../include/deinit_child2_3.inc
- --disconnect child2_3
-}
---echo for child3
-if ($USE_CHILD_GROUP3)
-{
- --echo child3_1
- --connection child3_1
- --source ../include/deinit_child3_1.inc
- --disconnect child3_1
- --echo child3_2
- --connection child3_2
- --source ../include/deinit_child3_2.inc
- --disconnect child3_2
- --echo child3_3
- --connection child3_3
- --source ../include/deinit_child3_3.inc
- --disconnect child3_3
-}
diff --git a/storage/spider/mysql-test/spider/handler/t/test_init.inc b/storage/spider/mysql-test/spider/handler/t/test_init.inc
deleted file mode 100644
index f2cd6c0269f..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/test_init.inc
+++ /dev/null
@@ -1,74 +0,0 @@
-# get connection and exist engine test
---echo for master_1
---source connect_master_1.inc
---connection master_1
-CALL mtr.add_suppression("unknown variable");
-SET SESSION sql_log_bin= 0;
---let $MASTER_1_SERVER_ID=`SELECT @@global.server_id`
---let $TEST_ENGINE_TYPE= $MASTER_1_ENGINE_TYPE
---source have_partition.inc
---source have_trigger.inc
---source ../include/init_master_1.inc
---source have_engine.inc
---echo for child2
-if ($USE_CHILD_GROUP2)
-{
- --echo child2_1
- --source connect_child2_1.inc
- --connection child2_1
- CALL mtr.add_suppression("unknown variable *");
- SET SESSION sql_log_bin= 0;
- --let $CHILD2_1_SERVER_ID=`SELECT @@global.server_id`
- --let $TEST_ENGINE_TYPE= $CHILD2_1_ENGINE_TYPE
- --source ../include/init_child2_1.inc
- --source have_engine.inc
- --echo child2_2
- --source connect_child2_2.inc
- --connection child2_2
- CALL mtr.add_suppression("unknown variable *");
- SET SESSION sql_log_bin= 0;
- --let $CHILD2_2_SERVER_ID=`SELECT @@global.server_id`
- --let $TEST_ENGINE_TYPE= $CHILD2_2_ENGINE_TYPE
- --source ../include/init_child2_2.inc
- --source have_engine.inc
- --echo child2_3
- --source connect_child2_3.inc
- --connection child2_3
- CALL mtr.add_suppression("unknown variable *");
- SET SESSION sql_log_bin= 0;
- --let $CHILD2_3_SERVER_ID=`SELECT @@global.server_id`
- --let $TEST_ENGINE_TYPE= $CHILD2_3_ENGINE_TYPE
- --source ../include/init_child2_3.inc
- --source have_engine.inc
-}
---echo for child3
-if ($USE_CHILD_GROUP3)
-{
- --echo child3_1
- --source connect_child3_1.inc
- --connection child3_1
- CALL mtr.add_suppression("unknown variable *");
- SET SESSION sql_log_bin= 0;
- --let $CHILD3_1_SERVER_ID=`SELECT @@global.server_id`
- --let $TEST_ENGINE_TYPE= $CHILD3_1_ENGINE_TYPE
- --source ../include/init_child3_1.inc
- --source have_engine.inc
- --echo child3_2
- --source connect_child3_2.inc
- --connection child3_2
- CALL mtr.add_suppression("unknown variable *");
- SET SESSION sql_log_bin= 0;
- --let $CHILD3_2_SERVER_ID=`SELECT @@global.server_id`
- --let $TEST_ENGINE_TYPE= $CHILD3_2_ENGINE_TYPE
- --source ../include/init_child3_2.inc
- --source have_engine.inc
- --echo child3_3
- --source connect_child3_3.inc
- --connection child3_3
- CALL mtr.add_suppression("unknown variable *");
- SET SESSION sql_log_bin= 0;
- --let $CHILD3_3_SERVER_ID=`SELECT @@global.server_id`
- --let $TEST_ENGINE_TYPE= $CHILD3_3_ENGINE_TYPE
- --source ../include/init_child3_3.inc
- --source have_engine.inc
-}
diff --git a/storage/spider/mysql-test/spider/handler/t/vp_fixes.test b/storage/spider/mysql-test/spider/handler/t/vp_fixes.test
deleted file mode 100644
index 2c3e1523611..00000000000
--- a/storage/spider/mysql-test/spider/handler/t/vp_fixes.test
+++ /dev/null
@@ -1,335 +0,0 @@
-# This test tests for VP's bug fixes
---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 and insert
-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 tb_l;
---enable_warnings
---disable_query_log
-echo CREATE TABLE tb_l (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
-) MASTER_1_ENGINE2 MASTER_1_CHARSET2;
-eval CREATE TABLE tb_l (
- a INT,
- b CHAR(1),
- c DATETIME,
- PRIMARY KEY(a)
-) $MASTER_1_ENGINE2 $MASTER_1_CHARSET2;
---enable_query_log
-INSERT INTO tb_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');
---disable_warnings
-DROP TABLE IF EXISTS ta_l;
---enable_warnings
---disable_query_log
-echo CREATE TABLE ta_l (
- 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 SELECT a, b, c FROM tb_l;
-
---echo
---echo 0.9
---echo create different primary key table
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_result_log
- }
- --disable_query_log
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- echo CHILD2_1_DROP_TABLES5;
- echo CHILD2_1_CREATE_TABLES5;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_TABLES5;
- --enable_warnings
- eval $CHILD2_1_CREATE_TABLES5;
- --enable_query_log
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_result_log
- }
-}
---connection master_1
---disable_query_log
-echo CREATE TABLE ta_l_int (
- a INT DEFAULT 10,
- b INT AUTO_INCREMENT,
- c INT DEFAULT 11,
- PRIMARY KEY(b)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT4_2_1;
-eval CREATE TABLE ta_l_int (
- a INT DEFAULT 10,
- b INT AUTO_INCREMENT,
- c INT DEFAULT 11,
- PRIMARY KEY(b)
-) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT4_2_1;
---enable_query_log
-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
---let $MASTER_1_IS_VP= `SELECT IF('$MASTER_1_ENGINE_TYPE' = 'VP', 1, 0)`
-if ($MASTER_1_IS_VP)
-{
- --error 14514
- INSERT INTO ta_l_int (a, b, c) VALUES (2, NULL, 3);
-}
-if (!$MASTER_1_IS_VP)
-{
- INSERT INTO ta_l_int (a, b, c) VALUES (2, NULL, 3);
- --disable_query_log
- --disable_result_log
- TRUNCATE TABLE ta_l_int;
- --enable_query_log
- --enable_result_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 command_type != 'Execute' AND argument LIKE '%insert %';
- }
- eval $CHILD2_1_SELECT_TABLES5;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
-
---echo create un-correspond primary key table
---connection master_1
---disable_warnings
-DROP TABLE IF EXISTS ta_l_int;
---enable_warnings
-if ($USE_CHILD_GROUP2)
-{
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --disable_result_log
- }
- --disable_query_log
- --connection child2_1
- if ($OUTPUT_CHILD_GROUP2)
- {
- echo CHILD2_1_DROP_TABLES5;
- echo CHILD2_1_CREATE_TABLES5;
- }
- --disable_warnings
- eval $CHILD2_1_DROP_TABLES5;
- --enable_warnings
- eval $CHILD2_1_CREATE_TABLES5;
- --enable_query_log
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_result_log
- }
-}
---connection master_1
---disable_query_log
-echo CREATE TABLE ta_l_int (
- a INT DEFAULT 10,
- b INT DEFAULT 12,
- c INT DEFAULT 11,
- PRIMARY KEY(c)
-) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT4_2_1;
-eval CREATE TABLE ta_l_int (
- a INT DEFAULT 10,
- b INT DEFAULT 12,
- c INT DEFAULT 11,
- PRIMARY KEY(c)
-) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT4_2_1;
---enable_query_log
-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;
- }
- eval $CHILD2_1_SELECT_TABLES;
- if (!$OUTPUT_CHILD_GROUP2)
- {
- --enable_query_log
- --enable_result_log
- }
-}
---connection master_1
-if ($MASTER_1_IS_VP)
-{
- --error 14514
- INSERT INTO ta_l_int (a, b, c) VALUES (2, NULL, 3);
-}
-if (!$MASTER_1_IS_VP)
-{
- INSERT INTO ta_l_int (a, b, c) VALUES (2, NULL, 3);
- --disable_query_log
- --disable_result_log
- TRUNCATE TABLE ta_l_int;
- --enable_query_log
- --enable_result_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 command_type != 'Execute' AND argument LIKE '%insert %';
- }
- eval $CHILD2_1_SELECT_TABLES5;
- 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/r/variable_deprecation.result b/storage/spider/mysql-test/spider/r/variable_deprecation.result
index cc267f7d363..cea36ff2240 100644
--- a/storage/spider/mysql-test/spider/r/variable_deprecation.result
+++ b/storage/spider/mysql-test/spider/r/variable_deprecation.result
@@ -13,21 +13,6 @@ child3_3
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
-# MDEV-27923 Deprecate spider_use_handler
-SET spider_use_handler = 3;
-Warnings:
-Warning 1287 '@@spider_use_handler' is deprecated and will be removed in a future release
-SHOW VARIABLES LIKE "spider_use_handler";
-Variable_name Value
-spider_use_handler 3
-CREATE TABLE tbl_a (a INT) ENGINE=Spider COMMENT='uhd "3"';
-Warnings:
-Warning 1287 The table parameter 'uhd' is deprecated and will be removed in a future release
-CREATE TABLE tbl_b (a INT) ENGINE=Spider COMMENT='use_handler "3"';
-Warnings:
-Warning 1287 The table parameter 'use_handler' is deprecated and will be removed in a future release
-DROP TABLE tbl_a;
-DROP TABLE tbl_b;
# MDEV-28297 Deprecate spider_internal_offset
SET spider_internal_offset = 1;
Warnings:
@@ -43,37 +28,6 @@ Warnings:
Warning 1287 The table parameter 'internal_offset' is deprecated and will be removed in a future release
DROP TABLE tbl_a;
DROP TABLE tbl_b;
-# MDEV-28005 Deprecate Spider plugin variables regarding UDFs
-SET GLOBAL spider_udf_ds_bulk_insert_rows = 1;
-Warnings:
-Warning 1287 '@@spider_udf_ds_bulk_insert_rows' is deprecated and will be removed in a future release
-SHOW VARIABLES LIKE "spider_udf_ds_bulk_insert_rows";
-Variable_name Value
-spider_udf_ds_bulk_insert_rows -1
-SET spider_udf_ds_table_loop_mode = 1;
-Warnings:
-Warning 1287 '@@spider_udf_ds_table_loop_mode' is deprecated and will be removed in a future release
-SHOW VARIABLES LIKE "spider_udf_ds_table_loop_mode";
-Variable_name Value
-spider_udf_ds_table_loop_mode 1
-SET spider_udf_ds_use_real_table = 1;
-Warnings:
-Warning 1287 '@@spider_udf_ds_use_real_table' is deprecated and will be removed in a future release
-SHOW VARIABLES LIKE "spider_udf_ds_use_real_table";
-Variable_name Value
-spider_udf_ds_use_real_table 1
-SET GLOBAL spider_udf_ct_bulk_insert_interval = 1;
-Warnings:
-Warning 1287 '@@spider_udf_ct_bulk_insert_interval' is deprecated and will be removed in a future release
-SHOW VARIABLES LIKE "spider_udf_ct_bulk_insert_interval";
-Variable_name Value
-spider_udf_ct_bulk_insert_interval 1
-SET GLOBAL spider_udf_ct_bulk_insert_rows = 1;
-Warnings:
-Warning 1287 '@@spider_udf_ct_bulk_insert_rows' is deprecated and will be removed in a future release
-SHOW VARIABLES LIKE "spider_udf_ct_bulk_insert_rows";
-Variable_name Value
-spider_udf_ct_bulk_insert_rows 1
# MDEV-27981 Deprecate spider_internal_limit
SET spider_internal_limit = 1;
Warnings:
diff --git a/storage/spider/mysql-test/spider/t/variable_deprecation.test b/storage/spider/mysql-test/spider/t/variable_deprecation.test
index 1521a60b7cb..3ed8dcf5ec6 100644
--- a/storage/spider/mysql-test/spider/t/variable_deprecation.test
+++ b/storage/spider/mysql-test/spider/t/variable_deprecation.test
@@ -12,14 +12,6 @@
CREATE DATABASE auto_test_local;
USE auto_test_local;
---echo # MDEV-27923 Deprecate spider_use_handler
-SET spider_use_handler = 3;
-SHOW VARIABLES LIKE "spider_use_handler";
-eval CREATE TABLE tbl_a (a INT) $MASTER_1_ENGINE COMMENT='uhd "3"';
-eval CREATE TABLE tbl_b (a INT) $MASTER_1_ENGINE COMMENT='use_handler "3"';
-DROP TABLE tbl_a;
-DROP TABLE tbl_b;
-
--echo # MDEV-28297 Deprecate spider_internal_offset
SET spider_internal_offset = 1;
SHOW VARIABLES LIKE "spider_internal_offset";
@@ -29,22 +21,6 @@ eval CREATE TABLE tbl_b (a INT) $MASTER_1_ENGINE COMMENT='internal_offset "1"';
DROP TABLE tbl_a;
DROP TABLE tbl_b;
---echo # MDEV-28005 Deprecate Spider plugin variables regarding UDFs
-SET GLOBAL spider_udf_ds_bulk_insert_rows = 1;
-SHOW VARIABLES LIKE "spider_udf_ds_bulk_insert_rows";
-
-SET spider_udf_ds_table_loop_mode = 1;
-SHOW VARIABLES LIKE "spider_udf_ds_table_loop_mode";
-
-SET spider_udf_ds_use_real_table = 1;
-SHOW VARIABLES LIKE "spider_udf_ds_use_real_table";
-
-SET GLOBAL spider_udf_ct_bulk_insert_interval = 1;
-SHOW VARIABLES LIKE "spider_udf_ct_bulk_insert_interval";
-
-SET GLOBAL spider_udf_ct_bulk_insert_rows = 1;
-SHOW VARIABLES LIKE "spider_udf_ct_bulk_insert_rows";
-
--echo # MDEV-27981 Deprecate spider_internal_limit
SET spider_internal_limit = 1;
SHOW VARIABLES LIKE "spider_internal_limit";
diff --git a/storage/spider/spd_conn.cc b/storage/spider/spd_conn.cc
index 91c6b91af30..366a22ef8d2 100644
--- a/storage/spider/spd_conn.cc
+++ b/storage/spider/spd_conn.cc
@@ -2161,8 +2161,6 @@ int spider_bg_conn_search(
result_list->split_read ?
result_list->split_read :
result_list->internal_limit - result_list->record_num;
- DBUG_PRINT("info",("spider sql_kinds=%u", spider->sql_kinds));
- if (spider->sql_kinds & SPIDER_SQL_KIND_SQL)
{
if ((error_num = spider->reappend_limit_sql_part(
result_list->internal_offset + result_list->record_num,
@@ -2181,17 +2179,6 @@ int spider_bg_conn_search(
DBUG_RETURN(error_num);
}
}
- if (spider->sql_kinds & SPIDER_SQL_KIND_HANDLER)
- {
- spider_db_append_handler_next(spider);
- if ((error_num = spider->reappend_limit_sql_part(
- 0, result_list->limit_num,
- SPIDER_SQL_TYPE_HANDLER)))
- {
- pthread_mutex_unlock(&conn->bg_conn_mutex);
- DBUG_RETURN(error_num);
- }
- }
}
result_list->bgs_phase = 2;
if (conn->db_conn->limit_mode() == 1)
@@ -2310,8 +2297,6 @@ int spider_bg_conn_search(
result_list->split_read ?
result_list->split_read :
result_list->internal_limit - result_list->record_num;
- DBUG_PRINT("info",("spider sql_kinds=%u", spider->sql_kinds));
- if (spider->sql_kinds & SPIDER_SQL_KIND_SQL)
{
if ((error_num = spider->reappend_limit_sql_part(
result_list->internal_offset + result_list->record_num,
@@ -2330,17 +2315,6 @@ int spider_bg_conn_search(
DBUG_RETURN(error_num);
}
}
- if (spider->sql_kinds & SPIDER_SQL_KIND_HANDLER)
- {
- spider_db_append_handler_next(spider);
- if ((error_num = spider->reappend_limit_sql_part(
- 0, result_list->limit_num,
- SPIDER_SQL_TYPE_HANDLER)))
- {
- pthread_mutex_unlock(&conn->bg_conn_mutex);
- DBUG_RETURN(error_num);
- }
- }
if (conn->db_conn->limit_mode() == 1)
{
conn->db_conn->set_limit(result_list->limit_num);
@@ -2542,12 +2516,7 @@ void *spider_bg_conn_action(
!result_list->bgs_current->result
) {
ulong sql_type;
- if (spider->sql_kind[conn->link_idx] == SPIDER_SQL_KIND_SQL)
- {
- sql_type = SPIDER_SQL_TYPE_SELECT_SQL | SPIDER_SQL_TYPE_TMP_SQL;
- } else {
- sql_type = SPIDER_SQL_TYPE_HANDLER;
- }
+ sql_type= SPIDER_SQL_TYPE_SELECT_SQL | SPIDER_SQL_TYPE_TMP_SQL;
pthread_mutex_assert_not_owner(&conn->mta_conn_mutex);
if (dbton_handler->need_lock_before_set_sql_for_exec(sql_type))
{
@@ -3930,91 +3899,6 @@ bool spider_conn_check_recovery_link(
DBUG_RETURN(FALSE);
}
-bool spider_conn_use_handler(
- ha_spider *spider,
- int lock_mode,
- int link_idx
-) {
- THD *thd = spider->wide_handler->trx->thd;
- int use_handler = spider_param_use_handler(thd,
- spider->share->use_handlers[link_idx]);
- DBUG_ENTER("spider_conn_use_handler");
- DBUG_PRINT("info",("spider use_handler=%d", use_handler));
- DBUG_PRINT("info",("spider spider->conn_kind[link_idx]=%u",
- spider->conn_kind[link_idx]));
- if (spider->do_direct_update)
- {
- spider->sql_kinds |= SPIDER_SQL_KIND_SQL;
- spider->sql_kind[link_idx] = SPIDER_SQL_KIND_SQL;
- spider->direct_update_kinds |= SPIDER_SQL_KIND_SQL;
- DBUG_PRINT("info",("spider FALSE by using direct_update"));
- DBUG_RETURN(FALSE);
- }
- if (spider->use_spatial_index)
- {
- DBUG_PRINT("info",("spider FALSE by use_spatial_index"));
- spider->sql_kinds |= SPIDER_SQL_KIND_SQL;
- spider->sql_kind[link_idx] = SPIDER_SQL_KIND_SQL;
- DBUG_RETURN(FALSE);
- }
- uint dbton_id;
- spider_db_handler *dbton_hdl;
- dbton_id = spider->share->sql_dbton_ids[spider->conn_link_idx[link_idx]];
- dbton_hdl = spider->dbton_handler[dbton_id];
- if (!dbton_hdl->support_use_handler(use_handler))
- {
- DBUG_PRINT("info",("spider FALSE by dbton"));
- spider->sql_kinds |= SPIDER_SQL_KIND_SQL;
- spider->sql_kind[link_idx] = SPIDER_SQL_KIND_SQL;
- DBUG_RETURN(FALSE);
- }
- if (
- spider->wide_handler->sql_command == SQLCOM_HA_READ &&
- (
- !(use_handler & 2) ||
- (
- spider_param_sync_trx_isolation(thd) &&
- thd_tx_isolation(thd) == ISO_SERIALIZABLE
- )
- )
- ) {
- DBUG_PRINT("info",("spider TRUE by HA"));
- spider->sql_kinds |= SPIDER_SQL_KIND_HANDLER;
- spider->sql_kind[link_idx] = SPIDER_SQL_KIND_HANDLER;
- DBUG_RETURN(TRUE);
- }
- if (
- spider->wide_handler->sql_command != SQLCOM_HA_READ &&
- lock_mode == SPIDER_LOCK_MODE_NO_LOCK &&
- spider_param_sync_trx_isolation(thd) &&
- thd_tx_isolation(thd) != ISO_SERIALIZABLE &&
- (use_handler & 1)
- ) {
- DBUG_PRINT("info",("spider TRUE by PARAM"));
- spider->sql_kinds |= SPIDER_SQL_KIND_HANDLER;
- spider->sql_kind[link_idx] = SPIDER_SQL_KIND_HANDLER;
- DBUG_RETURN(TRUE);
- }
- spider->sql_kinds |= SPIDER_SQL_KIND_SQL;
- spider->sql_kind[link_idx] = SPIDER_SQL_KIND_SQL;
- DBUG_RETURN(FALSE);
-}
-
-bool spider_conn_need_open_handler(
- ha_spider *spider,
- uint idx,
- int link_idx
-) {
- DBUG_ENTER("spider_conn_need_open_handler");
- DBUG_PRINT("info",("spider spider=%p", spider));
- if (spider->handler_opened(link_idx, spider->conn_kind[link_idx]))
- {
- DBUG_PRINT("info",("spider HA already opened"));
- DBUG_RETURN(FALSE);
- }
- DBUG_RETURN(TRUE);
-}
-
SPIDER_CONN* spider_get_conn_from_idle_connection(
SPIDER_SHARE *share,
int link_idx,
diff --git a/storage/spider/spd_conn.h b/storage/spider/spd_conn.h
index 53c10572687..807e1474ed2 100644
--- a/storage/spider/spd_conn.h
+++ b/storage/spider/spd_conn.h
@@ -390,18 +390,6 @@ bool spider_conn_check_recovery_link(
SPIDER_SHARE *share
);
-bool spider_conn_use_handler(
- ha_spider *spider,
- int lock_mode,
- int link_idx
-);
-
-bool spider_conn_need_open_handler(
- ha_spider *spider,
- uint idx,
- int link_idx
-);
-
SPIDER_IP_PORT_CONN *spider_create_ipport_conn(SPIDER_CONN *conn);
SPIDER_CONN* spider_get_conn_from_idle_connection
(
diff --git a/storage/spider/spd_copy_tables.cc b/storage/spider/spd_copy_tables.cc
index 4b2f5174ce0..eb2454b2f29 100644
--- a/storage/spider/spd_copy_tables.cc
+++ b/storage/spider/spd_copy_tables.cc
@@ -1000,8 +1000,7 @@ long long spider_copy_tables_body(
else
copy_tables->access_charset = system_charset_info;
- bulk_insert_rows = spider_param_udf_ct_bulk_insert_rows(
- copy_tables->bulk_insert_rows);
+ bulk_insert_rows= copy_tables->bulk_insert_rows;
for (src_tbl_conn = copy_tables->table_conn[0]; src_tbl_conn;
src_tbl_conn = src_tbl_conn->next)
{
diff --git a/storage/spider/spd_db_conn.cc b/storage/spider/spd_db_conn.cc
index fcaf61d27f7..0f54709d2db 100644
--- a/storage/spider/spd_db_conn.cc
+++ b/storage/spider/spd_db_conn.cc
@@ -169,7 +169,6 @@ int spider_db_connect(
conn->connect_error = 0;
conn->opened_handlers = 0;
- conn->db_conn->reset_opened_handler();
++conn->connection_id;
/* Set the connection's time zone to UTC */
@@ -1344,11 +1343,7 @@ int spider_db_append_name_with_quote_str_internal(
for (name_end = name + length; name < name_end; name += length)
{
head_code = *name;
-#ifdef SPIDER_HAS_MY_CHARLEN
if ((length = my_ci_charlen(cs, (const uchar *) name, (const uchar *) name_end)) < 1)
-#else
- if (!(length = my_mbcharlen(cs, (uchar) head_code)))
-#endif
{
my_message(ER_SPIDER_WRONG_CHARACTER_IN_NAME_NUM,
ER_SPIDER_WRONG_CHARACTER_IN_NAME_STR, MYF(0));
@@ -1377,18 +1372,11 @@ int spider_db_append_select(
int error_num;
DBUG_ENTER("spider_db_append_select");
- if (spider->sql_kinds & SPIDER_SQL_KIND_SQL)
{
if ((error_num = spider->append_select_sql_part(
SPIDER_SQL_TYPE_SELECT_SQL)))
DBUG_RETURN(error_num);
}
- if (spider->sql_kinds & SPIDER_SQL_KIND_HANDLER)
- {
- if ((error_num = spider->append_select_sql_part(
- SPIDER_SQL_TYPE_HANDLER)))
- DBUG_RETURN(error_num);
- }
DBUG_RETURN(0);
}
@@ -1398,7 +1386,6 @@ int spider_db_append_select_columns(
int error_num;
SPIDER_RESULT_LIST *result_list = &spider->result_list;
DBUG_ENTER("spider_db_append_select_columns");
- if (spider->sql_kinds & SPIDER_SQL_KIND_SQL)
{
if (
result_list->direct_aggregate &&
@@ -1427,11 +1414,6 @@ int spider_db_append_select_columns(
DBUG_RETURN(error_num);
}
}
- if (spider->sql_kinds & SPIDER_SQL_KIND_HANDLER)
- {
- if ((error_num = spider->append_from_sql_part(SPIDER_SQL_TYPE_HANDLER)))
- DBUG_RETURN(error_num);
- }
DBUG_RETURN(0);
}
@@ -1548,7 +1530,6 @@ int spider_db_append_hint_after_table(
spider_string *hint
) {
DBUG_ENTER("spider_db_append_hint_after_table");
- if (spider->sql_kinds & SPIDER_SQL_KIND_SQL)
{
if (str->append(*hint))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
@@ -1588,19 +1569,9 @@ int spider_db_append_key_where_internal(
KEY_PART_INFO *key_part;
Field *field;
bool use_both = TRUE, key_eq;
- uint sql_kind;
spider_db_handler *dbton_hdl = spider->dbton_handler[dbton_id];
spider_db_share *dbton_share = share->dbton_share[dbton_id];
DBUG_ENTER("spider_db_append_key_where_internal");
- switch (sql_type)
- {
- case SPIDER_SQL_TYPE_HANDLER:
- sql_kind = SPIDER_SQL_KIND_HANDLER;
- break;
- default:
- sql_kind = SPIDER_SQL_KIND_SQL;
- break;
- }
if (key_info)
full_key_part_map =
@@ -1632,46 +1603,6 @@ int spider_db_append_key_where_internal(
MY_BITMAP *tmp_map = dbug_tmp_use_all_columns(table, &table->read_set);
#endif
- if (sql_kind == SPIDER_SQL_KIND_HANDLER)
- {
-#ifdef SPIDER_use_LEX_CSTRING_for_KEY_Field_name
- const char *key_name = key_info->name.str;
- key_name_length = key_info->name.length;
-#else
- const char *key_name = key_info->name;
- key_name_length = strlen(key_name);
-#endif
- if (str->reserve(SPIDER_SQL_READ_LEN +
- /* SPIDER_SQL_NAME_QUOTE_LEN */ 2 + key_name_length))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str->q_append(SPIDER_SQL_READ_STR, SPIDER_SQL_READ_LEN);
- if ((error_num = spider_dbton[dbton_id].db_util->
- append_name(str, key_name, key_name_length)))
- {
- DBUG_RETURN(error_num);
- }
- dbton_hdl->set_order_pos(SPIDER_SQL_TYPE_HANDLER);
- if (
- (start_key_part_map || end_key_part_map) &&
- !(use_both && (!start_key_part_map || !end_key_part_map))
- ) {
- if (str_part->reserve(SPIDER_SQL_OPEN_PAREN_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str_part->q_append(SPIDER_SQL_OPEN_PAREN_STR, SPIDER_SQL_OPEN_PAREN_LEN);
- result_list->ha_read_kind = 0;
- } else if (!result_list->desc_flg)
- {
- if (str->reserve(SPIDER_SQL_FIRST_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str->q_append(SPIDER_SQL_FIRST_STR, SPIDER_SQL_FIRST_LEN);
- result_list->ha_read_kind = 1;
- } else {
- if (str->reserve(SPIDER_SQL_LAST_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str->q_append(SPIDER_SQL_LAST_STR, SPIDER_SQL_LAST_LEN);
- result_list->ha_read_kind = 2;
- }
- }
if (!start_key_part_map && !end_key_part_map)
{
result_list->key_order = 0;
@@ -1694,16 +1625,10 @@ int spider_db_append_key_where_internal(
if (start_key_part_map == end_key_part_map)
result_list->use_both_key = TRUE;
- if (sql_kind == SPIDER_SQL_KIND_SQL)
{
if (str->reserve(SPIDER_SQL_WHERE_LEN))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
str->q_append(SPIDER_SQL_WHERE_STR, SPIDER_SQL_WHERE_LEN);
- } else if (sql_kind == SPIDER_SQL_KIND_HANDLER)
- {
- if (str_part2->reserve(SPIDER_SQL_WHERE_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str_part2->q_append(SPIDER_SQL_WHERE_STR, SPIDER_SQL_WHERE_LEN);
}
for (
@@ -1763,18 +1688,14 @@ int spider_db_append_key_where_internal(
) {
if (error_num > 0)
DBUG_RETURN(error_num);
- if (
- !set_order &&
- start_key->flag != HA_READ_KEY_EXACT &&
- sql_kind == SPIDER_SQL_KIND_SQL
- ) {
+ if (!set_order && start_key->flag != HA_READ_KEY_EXACT)
+ {
result_list->key_order = key_count;
set_order = TRUE;
}
} else if (key_eq)
{
DBUG_PRINT("info", ("spider key_eq"));
- if (sql_kind == SPIDER_SQL_KIND_SQL)
{
if (str->reserve(store_length + key_name_length +
/* SPIDER_SQL_NAME_QUOTE_LEN */ 2 +
@@ -1785,259 +1706,116 @@ int spider_db_append_key_where_internal(
if (spider_dbton[dbton_id].db_util->append_column_value(
spider, str, field, ptr, FALSE, share->access_charset))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- } else if (sql_kind == SPIDER_SQL_KIND_HANDLER)
- {
- if (str_part2->reserve(store_length + key_name_length +
- /* SPIDER_SQL_NAME_QUOTE_LEN */ 2 +
- SPIDER_SQL_EQUAL_LEN + SPIDER_SQL_AND_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- dbton_share->append_column_name(str_part2, field->field_index);
- str_part2->q_append(SPIDER_SQL_EQUAL_STR, SPIDER_SQL_EQUAL_LEN);
- if (spider_dbton[dbton_id].db_util->append_column_value(
- spider, str_part2, field, ptr, FALSE, share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
-
- if (use_key == start_key)
- {
- if (str_part->length() == SPIDER_SQL_OPEN_PAREN_LEN)
- {
- if (str->reserve(SPIDER_SQL_EQUAL_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str->q_append(SPIDER_SQL_EQUAL_STR, SPIDER_SQL_EQUAL_LEN);
- if (spider_dbton[dbton_id].db_util->
- append_column_value(spider, str_part, field, ptr, false,
- share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- }
- }
}
} else {
DBUG_PRINT("info", ("spider start_key->flag=%d", start_key->flag));
+ const char *op_str;
+ uint32 op_len;
switch (start_key->flag)
{
case HA_READ_PREFIX_LAST:
result_list->desc_flg = TRUE;
/* fall through */
- case HA_READ_KEY_EXACT:
- if (sql_kind == SPIDER_SQL_KIND_SQL)
- {
- if (str->reserve(store_length + key_name_length +
- /* SPIDER_SQL_NAME_QUOTE_LEN */ 2))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
-
- dbton_share->append_column_name(str, field->field_index);
+ case HA_READ_KEY_EXACT: {
+ if (str->reserve(store_length + key_name_length +
+ /* SPIDER_SQL_NAME_QUOTE_LEN */ 2 +
+ SPIDER_SQL_EQUAL_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ dbton_share->append_column_name(str, field->field_index);
- bool is_like= MY_TEST(key_part->key_part_flag & HA_PART_KEY_SEG);
- if (is_like)
- {
- if (str->append(SPIDER_SQL_LIKE_STR, SPIDER_SQL_LIKE_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- }
- else
- {
- if (str->append(SPIDER_SQL_EQUAL_STR, SPIDER_SQL_EQUAL_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- }
- if (spider_dbton[dbton_id].db_util->append_column_value(
- spider, str, field, ptr, is_like, share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- } else if (sql_kind == SPIDER_SQL_KIND_HANDLER)
+ bool is_like= MY_TEST(key_part->key_part_flag & HA_PART_KEY_SEG);
+ if (is_like)
{
- if (str_part2->reserve(store_length + key_name_length +
- /* SPIDER_SQL_NAME_QUOTE_LEN */ 2 +
- SPIDER_SQL_EQUAL_LEN))
+ if (str->append(SPIDER_SQL_LIKE_STR, SPIDER_SQL_LIKE_LEN))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- dbton_share->append_column_name(str_part2, field->field_index);
- str_part2->q_append(SPIDER_SQL_EQUAL_STR, SPIDER_SQL_EQUAL_LEN);
- if (spider_dbton[dbton_id].db_util->append_column_value(
- spider, str_part2, field, ptr, FALSE,
- share->access_charset))
+ }
+ else
+ {
+ if (str->append(SPIDER_SQL_EQUAL_STR, SPIDER_SQL_EQUAL_LEN))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
-
- if (use_key == start_key)
- {
- if (str_part->length() == SPIDER_SQL_OPEN_PAREN_LEN)
- {
- if (str->reserve(SPIDER_SQL_EQUAL_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str->q_append(SPIDER_SQL_EQUAL_STR, SPIDER_SQL_EQUAL_LEN);
- if (spider_dbton[dbton_id].db_util->
- append_column_value(spider, str_part, field, ptr, false,
- share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- }
- }
}
+ if (spider_dbton[dbton_id].db_util->append_column_value(
+ spider, str, field, ptr, is_like, share->access_charset))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
break;
+ }
case HA_READ_AFTER_KEY:
- if (sql_kind == SPIDER_SQL_KIND_SQL)
+ if (start_key_part_map == 1)
{
- const char* op_str;
- uint32 op_len;
- if (start_key_part_map == 1) {
- op_str = rev ? SPIDER_SQL_LT_STR : SPIDER_SQL_GT_STR;
- op_len = rev ? SPIDER_SQL_LT_LEN : SPIDER_SQL_GT_LEN;
- } else {
- op_str = rev ? SPIDER_SQL_LTEQUAL_STR : SPIDER_SQL_GTEQUAL_STR;
- op_len = rev ? SPIDER_SQL_LTEQUAL_LEN : SPIDER_SQL_GTEQUAL_LEN;
- }
- if (str->reserve(store_length + key_name_length +
- /* SPIDER_SQL_NAME_QUOTE_LEN */ 2 + op_len))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- dbton_share->append_column_name(str, field->field_index);
- str->q_append(op_str, op_len);
- if (spider_dbton[dbton_id].db_util->append_column_value(
- spider, str, field, ptr, FALSE, share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- if (use_both)
- start_key_part_map = 0;
- if (!set_order)
- {
- result_list->key_order = key_count;
- set_order = TRUE;
- }
- } else if (sql_kind == SPIDER_SQL_KIND_HANDLER)
+ op_str= rev ? SPIDER_SQL_LT_STR : SPIDER_SQL_GT_STR;
+ op_len= rev ? SPIDER_SQL_LT_LEN : SPIDER_SQL_GT_LEN;
+ }
+ else
{
- if (str_part2->reserve(store_length + key_name_length +
- /* SPIDER_SQL_NAME_QUOTE_LEN */ 2 +
- SPIDER_SQL_GT_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- dbton_share->append_column_name(str_part2, field->field_index);
- if (rev)
- str_part2->q_append(SPIDER_SQL_LT_STR, SPIDER_SQL_LT_LEN);
- else
- str_part2->q_append(SPIDER_SQL_GT_STR, SPIDER_SQL_GT_LEN);
- if (spider_dbton[dbton_id].db_util->
- append_column_value(spider, str_part2, field, ptr, false,
- share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
-
- if (use_key == start_key)
- {
- if (str_part->length() == SPIDER_SQL_OPEN_PAREN_LEN)
- {
- if (str->reserve(SPIDER_SQL_GT_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str->q_append(SPIDER_SQL_GT_STR, SPIDER_SQL_GT_LEN);
- if (spider_dbton[dbton_id].db_util->
- append_column_value(spider, str_part, field, ptr, false,
- share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- }
- }
+ op_str= rev ? SPIDER_SQL_LTEQUAL_STR : SPIDER_SQL_GTEQUAL_STR;
+ op_len= rev ? SPIDER_SQL_LTEQUAL_LEN : SPIDER_SQL_GTEQUAL_LEN;
+ }
+ if (str->reserve(store_length + key_name_length +
+ /* SPIDER_SQL_NAME_QUOTE_LEN */ 2 + op_len))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ dbton_share->append_column_name(str, field->field_index);
+ str->q_append(op_str, op_len);
+ if (spider_dbton[dbton_id].db_util->
+ append_column_value(spider, str, field, ptr, false,
+ share->access_charset))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ if (use_both)
+ start_key_part_map= 0;
+ if (!set_order)
+ {
+ result_list->key_order= key_count;
+ set_order= TRUE;
}
break;
case HA_READ_BEFORE_KEY:
result_list->desc_flg = TRUE;
- if (sql_kind == SPIDER_SQL_KIND_SQL)
+ if (start_key_part_map == 1)
{
- const char* op_str;
- uint32 op_len;
- if (start_key_part_map == 1) {
- op_str = rev ? SPIDER_SQL_GT_STR : SPIDER_SQL_LT_STR;
- op_len = rev ? SPIDER_SQL_GT_LEN : SPIDER_SQL_LT_LEN;
- } else {
- op_str = rev ? SPIDER_SQL_GTEQUAL_STR : SPIDER_SQL_LTEQUAL_STR;
- op_len = rev ? SPIDER_SQL_GTEQUAL_LEN : SPIDER_SQL_LTEQUAL_LEN;
- }
- if (str->reserve(store_length + key_name_length +
- /* SPIDER_SQL_NAME_QUOTE_LEN */ 2 + op_len))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- dbton_share->append_column_name(str, field->field_index);
- str->q_append(op_str, op_len);
- if (spider_dbton[dbton_id].db_util->append_column_value(
- spider, str, field, ptr, FALSE, share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- if (use_both)
- start_key_part_map = 0;
- if (!set_order)
- {
- result_list->key_order = key_count;
- set_order = TRUE;
- }
- } else if (sql_kind == SPIDER_SQL_KIND_HANDLER)
+ op_str= rev ? SPIDER_SQL_GT_STR : SPIDER_SQL_LT_STR;
+ op_len= rev ? SPIDER_SQL_GT_LEN : SPIDER_SQL_LT_LEN;
+ }
+ else
{
- if (str_part2->reserve(store_length + key_name_length +
- /* SPIDER_SQL_NAME_QUOTE_LEN */ 2 +
- SPIDER_SQL_LT_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- dbton_share->append_column_name(str_part2, field->field_index);
- if (rev)
- str_part2->q_append(SPIDER_SQL_GT_STR, SPIDER_SQL_GT_LEN);
- else
- str_part2->q_append(SPIDER_SQL_LT_STR, SPIDER_SQL_LT_LEN);
- if (spider_dbton[dbton_id].db_util->
- append_column_value(spider, str_part2, field, ptr, false,
- share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
-
- if (use_key == start_key)
- {
- if (str_part->length() == SPIDER_SQL_OPEN_PAREN_LEN)
- {
- if (str->reserve(SPIDER_SQL_LT_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str->q_append(SPIDER_SQL_LT_STR, SPIDER_SQL_LT_LEN);
- if (spider_dbton[dbton_id].db_util->
- append_column_value(spider, str_part, field, ptr, false,
- share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- }
- }
+ op_str= rev ? SPIDER_SQL_GTEQUAL_STR : SPIDER_SQL_LTEQUAL_STR;
+ op_len= rev ? SPIDER_SQL_GTEQUAL_LEN : SPIDER_SQL_LTEQUAL_LEN;
+ }
+ if (str->reserve(store_length + key_name_length +
+ /* SPIDER_SQL_NAME_QUOTE_LEN */ 2 + op_len))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ dbton_share->append_column_name(str, field->field_index);
+ str->q_append(op_str, op_len);
+ if (spider_dbton[dbton_id].db_util->
+ append_column_value(spider, str, field, ptr, false,
+ share->access_charset))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ if (use_both)
+ start_key_part_map= 0;
+ if (!set_order)
+ {
+ result_list->key_order= key_count;
+ set_order= TRUE;
}
break;
case HA_READ_KEY_OR_PREV:
case HA_READ_PREFIX_LAST_OR_PREV:
result_list->desc_flg = TRUE;
- if (sql_kind == SPIDER_SQL_KIND_SQL)
- {
- if (str->reserve(store_length + key_name_length +
- /* SPIDER_SQL_NAME_QUOTE_LEN */ 2 +
- SPIDER_SQL_LTEQUAL_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- dbton_share->append_column_name(str, field->field_index);
- if (rev)
- str->q_append(SPIDER_SQL_GTEQUAL_STR, SPIDER_SQL_GTEQUAL_LEN);
- else
- str->q_append(SPIDER_SQL_LTEQUAL_STR, SPIDER_SQL_LTEQUAL_LEN);
- if (spider_dbton[dbton_id].db_util->
- append_column_value(spider, str, field, ptr, false,
- share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- if (!set_order)
- {
- result_list->key_order = key_count;
- set_order = TRUE;
- }
- } else if (sql_kind == SPIDER_SQL_KIND_HANDLER)
+ if (str->reserve(store_length + key_name_length +
+ /* SPIDER_SQL_NAME_QUOTE_LEN */ 2 +
+ SPIDER_SQL_LTEQUAL_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ dbton_share->append_column_name(str, field->field_index);
+ if (rev)
+ str->q_append(SPIDER_SQL_GTEQUAL_STR, SPIDER_SQL_GTEQUAL_LEN);
+ else
+ str->q_append(SPIDER_SQL_LTEQUAL_STR, SPIDER_SQL_LTEQUAL_LEN);
+ if (spider_dbton[dbton_id].db_util->
+ append_column_value(spider, str, field, ptr, false,
+ share->access_charset))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ if (!set_order)
{
- if (str_part2->reserve(store_length + key_name_length +
- /* SPIDER_SQL_NAME_QUOTE_LEN */ 2 +
- SPIDER_SQL_LTEQUAL_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- dbton_share->append_column_name(str_part2, field->field_index);
- if (rev)
- str_part2->q_append(SPIDER_SQL_GTEQUAL_STR, SPIDER_SQL_GTEQUAL_LEN);
- else
- str_part2->q_append(SPIDER_SQL_LTEQUAL_STR, SPIDER_SQL_LTEQUAL_LEN);
- if (spider_dbton[dbton_id].db_util->
- append_column_value(spider, str_part2, field, ptr, false,
- share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
-
- if (use_key == start_key)
- {
- if (str_part->length() == SPIDER_SQL_OPEN_PAREN_LEN)
- {
- if (str->reserve(SPIDER_SQL_LTEQUAL_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str->q_append(SPIDER_SQL_LTEQUAL_STR, SPIDER_SQL_LTEQUAL_LEN);
- if (spider_dbton[dbton_id].db_util->
- append_column_value(spider, str_part, field, ptr, false,
- share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- }
- }
+ result_list->key_order= key_count;
+ set_order= TRUE;
}
break;
case HA_READ_MBR_CONTAIN:
@@ -2120,73 +1898,30 @@ int spider_db_append_key_where_internal(
SPIDER_SQL_CLOSE_PAREN_LEN);
break;
default:
- if (sql_kind == SPIDER_SQL_KIND_SQL)
- {
- if (str->reserve(store_length + key_name_length +
- /* SPIDER_SQL_NAME_QUOTE_LEN */ 2 +
- SPIDER_SQL_GTEQUAL_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- dbton_share->append_column_name(str, field->field_index);
- if (rev)
- str->q_append(SPIDER_SQL_LTEQUAL_STR, SPIDER_SQL_LTEQUAL_LEN);
- else
- str->q_append(SPIDER_SQL_GTEQUAL_STR, SPIDER_SQL_GTEQUAL_LEN);
- if (spider_dbton[dbton_id].db_util->
- append_column_value(spider, str, field, ptr, false,
- share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- if (!set_order)
- {
- result_list->key_order = key_count;
- set_order = TRUE;
- }
- } else if (sql_kind == SPIDER_SQL_KIND_HANDLER)
+ if (str->reserve(store_length + key_name_length +
+ /* SPIDER_SQL_NAME_QUOTE_LEN */ 2 +
+ SPIDER_SQL_GTEQUAL_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ dbton_share->append_column_name(str, field->field_index);
+ if (rev)
+ str->q_append(SPIDER_SQL_LTEQUAL_STR, SPIDER_SQL_LTEQUAL_LEN);
+ else
+ str->q_append(SPIDER_SQL_GTEQUAL_STR, SPIDER_SQL_GTEQUAL_LEN);
+ if (spider_dbton[dbton_id].db_util->
+ append_column_value(spider, str, field, ptr, false,
+ share->access_charset))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ if (!set_order)
{
- if (str_part2->reserve(store_length + key_name_length +
- /* SPIDER_SQL_NAME_QUOTE_LEN */ 2 +
- SPIDER_SQL_GTEQUAL_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- dbton_share->append_column_name(str_part2, field->field_index);
- if (rev)
- str_part2->q_append(SPIDER_SQL_LTEQUAL_STR, SPIDER_SQL_LTEQUAL_LEN);
- else
- str_part2->q_append(SPIDER_SQL_GTEQUAL_STR, SPIDER_SQL_GTEQUAL_LEN);
- if (spider_dbton[dbton_id].db_util->
- append_column_value(spider, str_part2, field, ptr, false,
- share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
-
- if (use_key == start_key)
- {
- if (str_part->length() == SPIDER_SQL_OPEN_PAREN_LEN)
- {
- if (str->reserve(SPIDER_SQL_GTEQUAL_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str->q_append(SPIDER_SQL_GTEQUAL_STR, SPIDER_SQL_GTEQUAL_LEN);
- if (spider_dbton[dbton_id].db_util->
- append_column_value(spider, str_part, field, ptr, false,
- share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- }
- }
+ result_list->key_order= key_count;
+ set_order= TRUE;
}
break;
}
}
- if (sql_kind == SPIDER_SQL_KIND_SQL)
- {
- if (str->reserve(SPIDER_SQL_AND_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str->q_append(SPIDER_SQL_AND_STR,
- SPIDER_SQL_AND_LEN);
- } else if (sql_kind == SPIDER_SQL_KIND_HANDLER)
- {
- if (str_part2->reserve(SPIDER_SQL_AND_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str_part2->q_append(SPIDER_SQL_AND_STR,
- SPIDER_SQL_AND_LEN);
-
- }
+ if (str->reserve(SPIDER_SQL_AND_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ str->q_append(SPIDER_SQL_AND_STR, SPIDER_SQL_AND_LEN);
}
if (
@@ -2200,180 +1935,84 @@ int spider_db_append_key_where_internal(
{
if (error_num > 0)
DBUG_RETURN(error_num);
- if (
- !set_order &&
- end_key->flag != HA_READ_KEY_EXACT &&
- sql_kind == SPIDER_SQL_KIND_SQL
- ) {
+ if (!set_order && end_key->flag != HA_READ_KEY_EXACT)
+ {
result_list->key_order = key_count;
set_order = TRUE;
}
} else if (key_eq)
{
DBUG_PRINT("info", ("spider key_eq"));
- if (sql_kind == SPIDER_SQL_KIND_SQL)
- {
- if (str->reserve(store_length + key_name_length +
- /* SPIDER_SQL_NAME_QUOTE_LEN */ 2 +
- SPIDER_SQL_EQUAL_LEN + SPIDER_SQL_AND_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- dbton_share->append_column_name(str, field->field_index);
- str->q_append(SPIDER_SQL_EQUAL_STR, SPIDER_SQL_EQUAL_LEN);
- if (spider_dbton[dbton_id].db_util->append_column_value(
- spider, str, field, ptr, FALSE, share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- } else {
- if (str_part2->reserve(store_length + key_name_length +
- /* SPIDER_SQL_NAME_QUOTE_LEN */ 2 +
- SPIDER_SQL_EQUAL_LEN + SPIDER_SQL_AND_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- dbton_share->append_column_name(str_part2, field->field_index);
- str_part2->q_append(SPIDER_SQL_EQUAL_STR, SPIDER_SQL_EQUAL_LEN);
- if (spider_dbton[dbton_id].db_util->append_column_value(
- spider, str_part2, field, ptr, false,
- share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
-
- if (use_key == end_key)
- {
- if (str_part->length() == SPIDER_SQL_OPEN_PAREN_LEN)
- {
- if (str->reserve(SPIDER_SQL_EQUAL_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str->q_append(SPIDER_SQL_EQUAL_STR, SPIDER_SQL_EQUAL_LEN);
- if (spider_dbton[dbton_id].db_util->
- append_column_value(spider, str_part, field, ptr, false,
- share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- }
- }
- }
+ if (str->reserve(store_length + key_name_length +
+ /* SPIDER_SQL_NAME_QUOTE_LEN */ 2 +
+ SPIDER_SQL_EQUAL_LEN + SPIDER_SQL_AND_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ dbton_share->append_column_name(str, field->field_index);
+ str->q_append(SPIDER_SQL_EQUAL_STR, SPIDER_SQL_EQUAL_LEN);
+ if (spider_dbton[dbton_id].db_util->
+ append_column_value(spider, str, field, ptr, false,
+ share->access_charset))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
} else {
DBUG_PRINT("info", ("spider end_key->flag=%d", end_key->flag));
switch (end_key->flag)
{
case HA_READ_BEFORE_KEY:
- if (sql_kind == SPIDER_SQL_KIND_SQL)
+ const char *op_str;
+ uint32 op_len;
+ if (end_key_part_map == 1)
{
- const char* op_str;
- uint32 op_len;
- if (end_key_part_map == 1) {
- op_str = rev ? SPIDER_SQL_GT_STR : SPIDER_SQL_LT_STR;
- op_len = rev ? SPIDER_SQL_GT_LEN : SPIDER_SQL_LT_LEN;
- } else {
- op_str = rev ? SPIDER_SQL_GTEQUAL_STR : SPIDER_SQL_LTEQUAL_STR;
- op_len = rev ? SPIDER_SQL_GTEQUAL_LEN : SPIDER_SQL_LTEQUAL_LEN;
- }
- if (str->reserve(store_length + key_name_length +
- /* SPIDER_SQL_NAME_QUOTE_LEN */ 2 + op_len))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- dbton_share->append_column_name(str, field->field_index);
- str->q_append(op_str, op_len);
- if (spider_dbton[dbton_id].db_util->append_column_value(
- spider, str, field, ptr, FALSE, share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- if (use_both)
- end_key_part_map = 0;
- if (!set_order)
- {
- result_list->key_order = key_count;
- set_order = TRUE;
- }
- } else {
- if (str_part2->reserve(store_length + key_name_length +
- /* SPIDER_SQL_NAME_QUOTE_LEN */ 2 +
- SPIDER_SQL_LT_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- dbton_share->append_column_name(str_part2, field->field_index);
- if (rev)
- str_part2->q_append(SPIDER_SQL_GT_STR, SPIDER_SQL_GT_LEN);
- else
- str_part2->q_append(SPIDER_SQL_LT_STR, SPIDER_SQL_LT_LEN);
- if (spider_dbton[dbton_id].db_util->
- append_column_value(spider, str_part2, field, ptr, false,
- share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
-
- if (use_key == end_key)
- {
- if (str_part->length() == SPIDER_SQL_OPEN_PAREN_LEN)
- {
- if (str->reserve(SPIDER_SQL_LT_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str->q_append(SPIDER_SQL_LT_STR, SPIDER_SQL_LT_LEN);
- if (spider_dbton[dbton_id].db_util->
- append_column_value(spider, str_part, field, ptr,
- false, share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- }
- }
+ op_str= rev ? SPIDER_SQL_GT_STR : SPIDER_SQL_LT_STR;
+ op_len= rev ? SPIDER_SQL_GT_LEN : SPIDER_SQL_LT_LEN;
+ }
+ else
+ {
+ op_str= rev ? SPIDER_SQL_GTEQUAL_STR : SPIDER_SQL_LTEQUAL_STR;
+ op_len= rev ? SPIDER_SQL_GTEQUAL_LEN : SPIDER_SQL_LTEQUAL_LEN;
+ }
+ if (str->reserve(store_length + key_name_length +
+ /* SPIDER_SQL_NAME_QUOTE_LEN */ 2 + op_len))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ dbton_share->append_column_name(str, field->field_index);
+ str->q_append(op_str, op_len);
+ if (spider_dbton[dbton_id].db_util->
+ append_column_value(spider, str, field, ptr, false,
+ share->access_charset))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ if (use_both)
+ end_key_part_map= 0;
+ if (!set_order)
+ {
+ result_list->key_order= key_count;
+ set_order= TRUE;
}
break;
default:
- if (sql_kind == SPIDER_SQL_KIND_SQL)
+ if (str->reserve(store_length + key_name_length +
+ /* SPIDER_SQL_NAME_QUOTE_LEN */ 2 +
+ SPIDER_SQL_LTEQUAL_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ dbton_share->append_column_name(str, field->field_index);
+ if (rev)
+ str->q_append(SPIDER_SQL_GTEQUAL_STR, SPIDER_SQL_GTEQUAL_LEN);
+ else
+ str->q_append(SPIDER_SQL_LTEQUAL_STR, SPIDER_SQL_LTEQUAL_LEN);
+ if (spider_dbton[dbton_id].db_util->
+ append_column_value(spider, str, field, ptr, false,
+ share->access_charset))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ if (!set_order)
{
- if (str->reserve(store_length + key_name_length +
- /* SPIDER_SQL_NAME_QUOTE_LEN */ 2 +
- SPIDER_SQL_LTEQUAL_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- dbton_share->append_column_name(str, field->field_index);
- if (rev)
- str->q_append(SPIDER_SQL_GTEQUAL_STR, SPIDER_SQL_GTEQUAL_LEN);
- else
- str->q_append(SPIDER_SQL_LTEQUAL_STR, SPIDER_SQL_LTEQUAL_LEN);
- if (spider_dbton[dbton_id].db_util->
- append_column_value(spider, str, field, ptr, false,
- share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- if (!set_order)
- {
- result_list->key_order = key_count;
- set_order = TRUE;
- }
- } else {
- if (str_part2->reserve(store_length + key_name_length +
- /* SPIDER_SQL_NAME_QUOTE_LEN */ 2 +
- SPIDER_SQL_LTEQUAL_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- dbton_share->append_column_name(str_part2, field->field_index);
- if (rev)
- str_part2->q_append(SPIDER_SQL_GTEQUAL_STR, SPIDER_SQL_GTEQUAL_LEN);
- else
- str_part2->q_append(SPIDER_SQL_LTEQUAL_STR, SPIDER_SQL_LTEQUAL_LEN);
- if (spider_dbton[dbton_id].db_util->
- append_column_value(spider, str_part2, field, ptr, false,
- share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
-
- if (use_key == end_key)
- {
- if (str_part->length() == SPIDER_SQL_OPEN_PAREN_LEN)
- {
- if (str->reserve(SPIDER_SQL_LTEQUAL_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str->q_append(SPIDER_SQL_LTEQUAL_STR, SPIDER_SQL_LTEQUAL_LEN);
- if (spider_dbton[dbton_id].db_util->
- append_column_value(spider, str_part, field, ptr,
- false, share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- }
- }
+ result_list->key_order= key_count;
+ set_order= TRUE;
}
break;
}
}
- if (sql_kind == SPIDER_SQL_KIND_SQL)
{
if (str->reserve(SPIDER_SQL_AND_LEN))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str->q_append(SPIDER_SQL_AND_STR,
- SPIDER_SQL_AND_LEN);
- } else {
- if (str_part2->reserve(SPIDER_SQL_AND_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str_part2->q_append(SPIDER_SQL_AND_STR,
- SPIDER_SQL_AND_LEN);
-
+ str->q_append(SPIDER_SQL_AND_STR, SPIDER_SQL_AND_LEN);
}
}
if (use_both && (!start_key_part_map || !end_key_part_map))
@@ -2392,8 +2031,9 @@ end:
/* use condition */
if (dbton_hdl->append_condition_part(NULL, 0, sql_type, FALSE))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- if (sql_kind == SPIDER_SQL_KIND_SQL)
+ {
dbton_hdl->set_order_pos(sql_type);
+ }
#ifndef DBUG_OFF
dbug_tmp_restore_column_map(&table->read_set, tmp_map);
#endif
@@ -2407,20 +2047,12 @@ int spider_db_append_key_where(
) {
int error_num;
DBUG_ENTER("spider_db_append_key_where");
- if ((spider->sql_kinds & SPIDER_SQL_KIND_SQL))
{
DBUG_PRINT("info",("spider call internal by SPIDER_SQL_KIND_SQL"));
if ((error_num = spider->append_key_where_sql_part(start_key, end_key,
SPIDER_SQL_TYPE_SELECT_SQL)))
DBUG_RETURN(error_num);
}
- if (spider->sql_kinds & SPIDER_SQL_KIND_HANDLER)
- {
- DBUG_PRINT("info",("spider call internal by SPIDER_SQL_KIND_HANDLER"));
- if ((error_num = spider->append_key_where_sql_part(start_key, end_key,
- SPIDER_SQL_TYPE_HANDLER)))
- DBUG_RETURN(error_num);
- }
DBUG_RETURN(0);
}
@@ -2533,9 +2165,7 @@ int spider_db_fetch_for_item_sum_func(
spider->direct_aggregate_item_first->next = NULL;
spider->direct_aggregate_item_first->item = NULL;
spider->direct_aggregate_item_first->tgt_num = 0;
-#ifdef SPIDER_ITEM_STRING_WITHOUT_SET_STR_WITH_COPY_AND_THDPTR
spider->direct_aggregate_item_first->init_mem_root = FALSE;
-#endif
}
spider->direct_aggregate_item_current =
spider->direct_aggregate_item_first;
@@ -2552,16 +2182,13 @@ int spider_db_fetch_for_item_sum_func(
spider->direct_aggregate_item_current->next->item = NULL;
spider->direct_aggregate_item_current->next->tgt_num =
spider->direct_aggregate_item_current->tgt_num + 1;
-#ifdef SPIDER_ITEM_STRING_WITHOUT_SET_STR_WITH_COPY_AND_THDPTR
spider->direct_aggregate_item_current->next->init_mem_root = FALSE;
-#endif
}
spider->direct_aggregate_item_current =
spider->direct_aggregate_item_current->next;
}
if (!spider->direct_aggregate_item_current->item)
{
-#ifdef SPIDER_ITEM_STRING_WITHOUT_SET_STR_WITH_COPY_AND_THDPTR
if (!spider->direct_aggregate_item_current->init_mem_root)
{
SPD_INIT_ALLOC_ROOT(
@@ -2569,19 +2196,10 @@ int spider_db_fetch_for_item_sum_func(
4096, 0, MYF(MY_WME));
spider->direct_aggregate_item_current->init_mem_root = TRUE;
}
-#endif
Item *free_list = thd->free_list;
spider->direct_aggregate_item_current->item =
-#ifdef SPIDER_ITEM_STRING_WITHOUT_SET_STR_WITH_COPY
-#ifdef SPIDER_ITEM_STRING_WITHOUT_SET_STR_WITH_COPY_AND_THDPTR
new (&spider->direct_aggregate_item_current->mem_root)
Item_string(thd, "", 0, share->access_charset);
-#else
- new Item_string("", 0, share->access_charset);
-#endif
-#else
- new Item_string(share->access_charset);
-#endif
if (!spider->direct_aggregate_item_current->item)
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
thd->free_list = free_list;
@@ -2592,12 +2210,8 @@ int spider_db_fetch_for_item_sum_func(
(Item_string *) spider->direct_aggregate_item_current->item;
if (row->is_null())
{
-#ifdef SPIDER_ITEM_STRING_WITHOUT_SET_STR_WITH_COPY
item->val_str(NULL)->length(0);
item->append(NULL, 0);
-#else
- item->set_str_with_copy(NULL, 0);
-#endif
item->null_value = TRUE;
} else {
char buf[MAX_FIELD_WIDTH];
@@ -2606,12 +2220,8 @@ int spider_db_fetch_for_item_sum_func(
tmp_str.length(0);
if ((error_num = row->append_to_str(&tmp_str)))
DBUG_RETURN(error_num);
-#ifdef SPIDER_ITEM_STRING_WITHOUT_SET_STR_WITH_COPY
item->val_str(NULL)->length(0);
item->append((char *) tmp_str.ptr(), tmp_str.length());
-#else
- item->set_str_with_copy(tmp_str.ptr(), tmp_str.length());
-#endif
item->null_value = FALSE;
}
item_sum_min_max->direct_add(item);
@@ -2677,27 +2287,6 @@ int spider_db_append_match_where(
DBUG_RETURN(0);
}
-void spider_db_append_handler_next(
- ha_spider *spider
-) {
- const char *alias;
- uint alias_length;
- SPIDER_RESULT_LIST *result_list = &spider->result_list;
- DBUG_ENTER("spider_db_append_handler_next");
- if (result_list->sorted && result_list->desc_flg)
- {
- alias = SPIDER_SQL_PREV_STR;
- alias_length = SPIDER_SQL_PREV_LEN;
- } else {
- alias = SPIDER_SQL_NEXT_STR;
- alias_length = SPIDER_SQL_NEXT_LEN;
- }
- spider->set_order_to_pos_sql(SPIDER_SQL_TYPE_HANDLER);
- spider->append_key_order_with_alias_sql_part(alias, alias_length,
- SPIDER_SQL_TYPE_HANDLER);
- DBUG_VOID_RETURN;
-}
-
void spider_db_get_row_from_tmp_tbl_rec(
SPIDER_RESULT *current,
SPIDER_DB_ROW **row
@@ -2840,7 +2429,6 @@ int spider_db_fetch_table(
if (spider->mrr_with_cnt)
{
DBUG_PRINT("info", ("spider mrr_with_cnt"));
- if (spider->sql_kind[spider->result_link_idx] == SPIDER_SQL_KIND_SQL)
{
if (!row->is_null())
spider->multi_range_hit_point = row->val_int();
@@ -2852,9 +2440,6 @@ int spider_db_fetch_table(
else
DBUG_RETURN(ER_SPIDER_UNKNOWN_NUM);
row->next();
- } else {
- spider->multi_range_hit_point = 0;
- result_list->snap_mrr_with_cnt = FALSE;
}
}
@@ -3334,7 +2919,7 @@ int spider_db_free_result(
DBUG_RETURN(error_num);
}
}
- if (realloced & (SPIDER_SQL_TYPE_SELECT_SQL | SPIDER_SQL_TYPE_HANDLER))
+ if (realloced & (SPIDER_SQL_TYPE_SELECT_SQL))
{
for (roop_count = 0; roop_count < (int) share->link_count;
roop_count++)
@@ -4354,7 +3939,6 @@ int spider_db_fetch(
int error_num;
SPIDER_RESULT_LIST *result_list = &spider->result_list;
DBUG_ENTER("spider_db_fetch");
- if (spider->sql_kind[spider->result_link_idx] == SPIDER_SQL_KIND_SQL)
{
if (!spider->select_column_mode) {
if (result_list->keyread)
@@ -4366,9 +3950,6 @@ int spider_db_fetch(
} else
error_num = spider_db_fetch_minimum_columns(spider, buf, table,
result_list);
- } else {
- error_num = spider_db_fetch_table(spider, buf, table,
- result_list);
}
result_list->current_row_num++;
DBUG_PRINT("info",("spider error_num=%d", error_num));
@@ -4507,7 +4088,6 @@ int spider_db_seek_next(
result_list->split_read ?
result_list->split_read :
result_list->internal_limit - result_list->record_num;
- if (spider->sql_kinds & SPIDER_SQL_KIND_SQL)
{
if ((error_num = spider->reappend_limit_sql_part(
result_list->record_num, result_list->limit_num,
@@ -4525,17 +4105,6 @@ int spider_db_seek_next(
DBUG_RETURN(error_num);
}
}
- if (spider->sql_kinds & SPIDER_SQL_KIND_HANDLER)
- {
- spider_db_append_handler_next(spider);
- if ((error_num = spider->reappend_limit_sql_part(
- 0, result_list->limit_num,
- SPIDER_SQL_TYPE_HANDLER)))
- {
- DBUG_PRINT("info",("spider error_num 5=%d", error_num));
- DBUG_RETURN(error_num);
- }
- }
if (spider->use_fields)
{
@@ -4667,13 +4236,8 @@ int spider_db_seek_next(
SPIDER_LINK_STATUS_RECOVERY)
) {
ulong sql_type;
- conn = spider->conns[roop_count];
- if (spider->sql_kind[roop_count] == SPIDER_SQL_KIND_SQL)
- {
- sql_type = SPIDER_SQL_TYPE_SELECT_SQL;
- } else {
- sql_type = SPIDER_SQL_TYPE_HANDLER;
- }
+ conn= spider->conns[roop_count];
+ sql_type= SPIDER_SQL_TYPE_SELECT_SQL;
spider_db_handler *dbton_handler =
spider->dbton_handler[conn->dbton_id];
pthread_mutex_assert_not_owner(&conn->mta_conn_mutex);
@@ -4899,7 +4463,6 @@ int spider_db_seek_last(
spider_next_split_read_param(spider);
result_list->limit_num =
result_list->internal_limit - result_list->record_num;
- if (spider->sql_kinds & SPIDER_SQL_KIND_SQL)
{
if ((error_num = spider->reappend_limit_sql_part(
result_list->internal_offset + result_list->record_num,
@@ -4913,21 +4476,6 @@ int spider_db_seek_last(
)
DBUG_RETURN(error_num);
}
- if (spider->sql_kinds & SPIDER_SQL_KIND_HANDLER)
- {
- spider_db_append_handler_next(spider);
- if ((error_num = spider->reappend_limit_sql_part(
- result_list->internal_offset + result_list->record_num,
- result_list->limit_num,
- SPIDER_SQL_TYPE_HANDLER)))
- DBUG_RETURN(error_num);
- if (
- !result_list->use_union &&
- (error_num = spider->append_select_lock_sql_part(
- SPIDER_SQL_TYPE_HANDLER))
- )
- DBUG_RETURN(error_num);
- }
int roop_start, roop_end, roop_count, lock_mode, link_ok;
lock_mode = spider_conn_lock_mode(spider);
@@ -4952,12 +4500,7 @@ int spider_db_seek_last(
SPIDER_LINK_STATUS_RECOVERY)
) {
ulong sql_type;
- if (spider->sql_kind[roop_count] == SPIDER_SQL_KIND_SQL)
- {
- sql_type = SPIDER_SQL_TYPE_SELECT_SQL;
- } else {
- sql_type = SPIDER_SQL_TYPE_HANDLER;
- }
+ sql_type= SPIDER_SQL_TYPE_SELECT_SQL;
conn = spider->conns[roop_count];
spider_db_handler *dbton_handler = spider->dbton_handler[conn->dbton_id];
pthread_mutex_assert_not_owner(&conn->mta_conn_mutex);
@@ -5123,7 +4666,6 @@ int spider_db_seek_last(
result_list->limit_num =
result_list->internal_limit >= result_list->split_read ?
result_list->split_read : result_list->internal_limit;
- if (spider->sql_kinds & SPIDER_SQL_KIND_SQL)
{
spider->set_order_to_pos_sql(SPIDER_SQL_TYPE_SELECT_SQL);
if (
@@ -5134,35 +4676,12 @@ int spider_db_seek_last(
result_list->limit_num, SPIDER_SQL_TYPE_SELECT_SQL)) ||
(
!result_list->use_union &&
- (spider->sql_kinds & SPIDER_SQL_KIND_SQL) &&
(error_num = spider->append_select_lock_sql_part(
SPIDER_SQL_TYPE_SELECT_SQL))
)
)
DBUG_RETURN(error_num);
}
- if (spider->sql_kinds & SPIDER_SQL_KIND_HANDLER)
- {
- const char *alias;
- uint alias_length;
- if (result_list->sorted && result_list->desc_flg)
- {
- alias = SPIDER_SQL_LAST_STR;
- alias_length = SPIDER_SQL_LAST_LEN;
- } else {
- alias = SPIDER_SQL_FIRST_STR;
- alias_length = SPIDER_SQL_FIRST_LEN;
- }
- spider->set_order_to_pos_sql(SPIDER_SQL_TYPE_HANDLER);
- if (
- (error_num = spider->append_key_order_with_alias_sql_part(
- alias, alias_length, SPIDER_SQL_TYPE_HANDLER)) ||
- (error_num = spider->reappend_limit_sql_part(
- result_list->internal_offset,
- result_list->limit_num, SPIDER_SQL_TYPE_HANDLER))
- )
- DBUG_RETURN(error_num);
- }
int roop_start, roop_end, roop_count, lock_mode, link_ok;
lock_mode = spider_conn_lock_mode(spider);
@@ -5187,12 +4706,7 @@ int spider_db_seek_last(
SPIDER_LINK_STATUS_RECOVERY)
) {
ulong sql_type;
- if (spider->sql_kind[roop_count] == SPIDER_SQL_KIND_SQL)
- {
- sql_type = SPIDER_SQL_TYPE_SELECT_SQL;
- } else {
- sql_type = SPIDER_SQL_TYPE_HANDLER;
- }
+ sql_type= SPIDER_SQL_TYPE_SELECT_SQL;
conn = spider->conns[roop_count];
spider_db_handler *dbton_handler = spider->dbton_handler[conn->dbton_id];
pthread_mutex_assert_not_owner(&conn->mta_conn_mutex);
@@ -5401,7 +4915,6 @@ void spider_db_create_position(
pos->use_position = TRUE;
pos->mrr_with_cnt = spider->mrr_with_cnt;
pos->direct_aggregate = result_list->direct_aggregate;
- pos->sql_kind = spider->sql_kind[spider->result_link_idx];
pos->position_bitmap = spider->wide_handler->position_bitmap;
pos->ft_first = spider->ft_first;
pos->ft_current = spider->ft_current;
@@ -5424,7 +4937,6 @@ int spider_db_seek_tmp(
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
pos->row->first();
}
- if (pos->sql_kind == SPIDER_SQL_KIND_SQL)
{
if (!spider->select_column_mode)
{
@@ -5435,8 +4947,7 @@ int spider_db_seek_tmp(
error_num = spider_db_seek_tmp_table(buf, pos, spider, table);
} else
error_num = spider_db_seek_tmp_minimum_columns(buf, pos, spider, table);
- } else
- error_num = spider_db_seek_tmp_table(buf, pos, spider, table);
+ }
DBUG_PRINT("info",("spider error_num=%d", error_num));
DBUG_RETURN(error_num);
@@ -5479,11 +4990,8 @@ int spider_db_seek_tmp_table(
if (pos->mrr_with_cnt)
{
DBUG_PRINT("info", ("spider mrr_with_cnt"));
- if (pos->sql_kind == SPIDER_SQL_KIND_SQL)
{
row->next();
- } else {
- spider->result_list.snap_mrr_with_cnt = FALSE;
}
}
@@ -5898,7 +5406,6 @@ int spider_db_bulk_insert_init(
int error_num, roop_count;
SPIDER_SHARE *share = spider->share;
DBUG_ENTER("spider_db_bulk_insert_init");
- spider->sql_kinds = 0;
spider->reset_sql_sql(SPIDER_SQL_TYPE_INSERT_SQL);
for (
roop_count = spider_conn_link_idx_next(share->link_statuses,
@@ -5912,8 +5419,6 @@ int spider_db_bulk_insert_init(
if (spider->conns[roop_count])
spider->conns[roop_count]->ignore_dup_key =
spider->wide_handler->ignore_dup_key;
- spider_conn_use_handler(spider, spider->wide_handler->lock_mode,
- roop_count);
}
if (
(error_num = spider->append_insert_sql_part()) ||
@@ -5940,8 +5445,7 @@ int spider_db_bulk_insert(
if ((error_num = spider->append_insert_values_sql_part(
SPIDER_SQL_TYPE_INSERT_SQL)))
{
- if (spider->sql_kinds & SPIDER_SQL_KIND_SQL)
- spider->set_insert_to_pos_sql(SPIDER_SQL_TYPE_INSERT_SQL);
+ spider->set_insert_to_pos_sql(SPIDER_SQL_TYPE_INSERT_SQL);
DBUG_RETURN(error_num);
}
}
@@ -5953,8 +5457,7 @@ int spider_db_bulk_insert(
if ((error_num = spider->append_insert_terminator_sql_part(
SPIDER_SQL_TYPE_INSERT_SQL)))
{
- if (spider->sql_kinds & SPIDER_SQL_KIND_SQL)
- spider->set_insert_to_pos_sql(SPIDER_SQL_TYPE_INSERT_SQL);
+ spider->set_insert_to_pos_sql(SPIDER_SQL_TYPE_INSERT_SQL);
DBUG_RETURN(error_num);
}
bool insert_info = FALSE;
@@ -5981,8 +5484,7 @@ int spider_db_bulk_insert(
if ((error_num = dbton_handler->set_sql_for_exec(sql_type,
roop_count2)))
{
- if (spider->sql_kinds & SPIDER_SQL_KIND_SQL)
- spider->set_insert_to_pos_sql(SPIDER_SQL_TYPE_INSERT_SQL);
+ spider->set_insert_to_pos_sql(SPIDER_SQL_TYPE_INSERT_SQL);
if (dbton_handler->need_lock_before_set_sql_for_exec(sql_type))
{
SPIDER_CLEAR_FILE_POS(&conn->mta_conn_mutex_file_pos);
@@ -6002,8 +5504,7 @@ int spider_db_bulk_insert(
conn->mta_conn_mutex_unlock_later = TRUE;
if ((error_num = spider_db_set_names(spider, conn, roop_count2)))
{
- if (spider->sql_kinds & SPIDER_SQL_KIND_SQL)
- spider->set_insert_to_pos_sql(SPIDER_SQL_TYPE_INSERT_SQL);
+ spider->set_insert_to_pos_sql(SPIDER_SQL_TYPE_INSERT_SQL);
DBUG_ASSERT(conn->mta_conn_mutex_lock_already);
DBUG_ASSERT(conn->mta_conn_mutex_unlock_later);
conn->mta_conn_mutex_lock_already = FALSE;
@@ -6036,14 +5537,10 @@ int spider_db_bulk_insert(
spider_conn_set_timeout_from_share(conn, roop_count2,
spider->wide_handler->trx->thd,
share);
- if (dbton_handler->execute_sql(
- sql_type,
- conn,
- -1,
- &spider->need_mons[roop_count2])
- ) {
- if (spider->sql_kinds & SPIDER_SQL_KIND_SQL)
- spider->set_insert_to_pos_sql(SPIDER_SQL_TYPE_INSERT_SQL);
+ if (dbton_handler->execute_sql(sql_type, conn, -1,
+ &spider->need_mons[roop_count2]))
+ {
+ spider->set_insert_to_pos_sql(SPIDER_SQL_TYPE_INSERT_SQL);
error_num = spider_db_errorno(conn);
if (error_num == HA_ERR_FOUND_DUPP_KEY)
{
@@ -6107,9 +5604,8 @@ int spider_db_bulk_insert(
DBUG_ASSERT(!conn->mta_conn_mutex_lock_already);
DBUG_ASSERT(!conn->mta_conn_mutex_unlock_later);
conn->mta_conn_mutex_lock_already = TRUE;
- conn->mta_conn_mutex_unlock_later = TRUE;
- if (spider->sql_kinds & SPIDER_SQL_KIND_SQL)
- spider->set_insert_to_pos_sql(SPIDER_SQL_TYPE_INSERT_SQL);
+ conn->mta_conn_mutex_unlock_later= TRUE;
+ spider->set_insert_to_pos_sql(SPIDER_SQL_TYPE_INSERT_SQL);
if (table->next_number_field &&
(
!table->auto_increment_field_not_null ||
@@ -6716,30 +6212,15 @@ int spider_db_direct_update(
if ((error_num = spider->append_update_sql_part()))
DBUG_RETURN(error_num);
-/*
- SQL access -> SQL remote access
- !spider->do_direct_update &&
- (spider->sql_kinds & SPIDER_SQL_KIND_SQL)
-
- SQL access -> SQL remote access with dirct_update
- spider->do_direct_update &&
- spider->direct_update_kinds == SPIDER_SQL_KIND_SQL &&
- spider->wide_handler->direct_update_fields
-*/
-
if (!spider->do_direct_update)
{
- if (
- (spider->sql_kinds & SPIDER_SQL_KIND_SQL) &&
- (error_num = spider->append_update_set_sql_part())
- ) {
+ if ((error_num= spider->append_update_set_sql_part()))
+ {
DBUG_RETURN(error_num);
}
} else {
- if (
- (spider->direct_update_kinds & SPIDER_SQL_KIND_SQL) &&
- (error_num = spider->append_direct_update_set_sql_part())
- ) {
+ if ((error_num= spider->append_direct_update_set_sql_part()))
+ {
DBUG_RETURN(error_num);
}
}
@@ -6755,7 +6236,6 @@ int spider_db_direct_update(
result_list->internal_limit >= select_limit ?
select_limit : result_list->internal_limit;
result_list->internal_offset += offset_limit;
- if (spider->direct_update_kinds & SPIDER_SQL_KIND_SQL)
{
if (
(error_num = spider->append_key_where_sql_part(
@@ -7036,7 +6516,6 @@ int spider_db_direct_delete(
result_list->internal_limit >= select_limit ?
select_limit : result_list->internal_limit;
result_list->internal_offset += offset_limit;
- if (spider->direct_update_kinds & SPIDER_SQL_KIND_SQL)
{
if (
(error_num = spider->append_delete_sql_part()) ||
@@ -7182,7 +6661,6 @@ int spider_db_direct_delete(
pthread_mutex_unlock(&conn->mta_conn_mutex);
}
int error_num2 = 0;
- if (spider->direct_update_kinds & SPIDER_SQL_KIND_SQL)
{
if ((error_num = spider->reset_sql_sql(SPIDER_SQL_TYPE_DELETE_SQL)))
error_num2 = error_num;
@@ -7948,9 +7426,7 @@ int spider_db_print_item_type(
field, spider, str, alias, alias_length, dbton_id, use_fields, fields));
case Item::SUBSELECT_ITEM:
case Item::TRIGGER_FIELD_ITEM:
-#ifdef SPIDER_HAS_EXPR_CACHE_ITEM
case Item::EXPR_CACHE_ITEM:
-#endif
DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM);
default:
DBUG_RETURN(spider_db_print_item_type_default(item, spider, str));
@@ -8173,13 +7649,8 @@ int spider_db_open_item_ident(
}
if (str)
{
-#ifdef SPIDER_use_LEX_CSTRING_for_KEY_Field_name
if (item_ident->field_name.str)
field_name_length = item_ident->field_name.length;
-#else
- if (item_ident->field_name)
- field_name_length = strlen(item_ident->field_name);
-#endif
else
field_name_length = 0;
if (share->access_charset->cset == system_charset_info->cset)
@@ -8190,14 +7661,9 @@ int spider_db_open_item_ident(
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
}
str->q_append(alias, alias_length);
-#ifdef SPIDER_use_LEX_CSTRING_for_KEY_Field_name
if ((error_num = spider_dbton[dbton_id].db_util->
append_escaped_name(str, item_ident->field_name.str,
field_name_length)))
-#else
- if ((error_num = spider_dbton[dbton_id].db_util->
- append_escaped_name(str, item_ident->field_name, field_name_length)))
-#endif
{
DBUG_RETURN(error_num);
}
@@ -8205,15 +7671,9 @@ int spider_db_open_item_ident(
if (str->reserve(alias_length))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
str->q_append(alias, alias_length);
-#ifdef SPIDER_use_LEX_CSTRING_for_KEY_Field_name
if ((error_num = spider_dbton[dbton_id].db_util->
append_escaped_name_with_charset(str, item_ident->field_name.str,
field_name_length, system_charset_info)))
-#else
- if ((error_num = spider_dbton[dbton_id].db_util->
- append_escaped_name_with_charset(str, item_ident->field_name,
- field_name_length, system_charset_info)))
-#endif
{
DBUG_RETURN(error_num);
}
@@ -8324,7 +7784,6 @@ int spider_db_open_item_ref(
DBUG_ENTER("spider_db_open_item_ref");
if (item_ref->ref)
{
-#ifdef SPIDER_use_LEX_CSTRING_for_KEY_Field_name
if (
(*(item_ref->ref))->type() != Item::CACHE_ITEM &&
item_ref->ref_type() != Item_ref::VIEW_REF &&
@@ -8332,34 +7791,16 @@ int spider_db_open_item_ref(
item_ref->name.str &&
item_ref->alias_name_used
)
-#else
- if (
- (*(item_ref->ref))->type() != Item::CACHE_ITEM &&
- item_ref->ref_type() != Item_ref::VIEW_REF &&
- !item_ref->table_name &&
- item_ref->name &&
- item_ref->alias_name_used
- )
-#endif
{
if (str)
{
-#ifdef SPIDER_use_LEX_CSTRING_for_KEY_Field_name
uint length = item_ref->name.length;
-#else
- uint length = strlen(item_ref->name);
-#endif
if (str->reserve(length + /* SPIDER_SQL_NAME_QUOTE_LEN */ 2))
{
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
}
-#ifdef SPIDER_use_LEX_CSTRING_for_KEY_Field_name
if ((error_num = spider_dbton[dbton_id].db_util->
append_name(str, item_ref->name.str, length)))
-#else
- if ((error_num = spider_dbton[dbton_id].db_util->
- append_name(str, item_ref->name, length)))
-#endif
{
DBUG_RETURN(error_num);
}
@@ -8606,12 +8047,10 @@ int spider_db_open_item_int(
thd->variables.time_zone = UTC;
print_quoted_string = TRUE;
} else {
-#ifdef SPIDER_ITEM_HAS_CMP_TYPE
DBUG_PRINT("info",("spider cmp_type=%u", item->cmp_type()));
if (item->cmp_type() == TIME_RESULT)
print_quoted_string = TRUE;
else
-#endif
print_quoted_string = FALSE;
}
@@ -8805,18 +8244,11 @@ int spider_db_append_condition(
DBUG_ENTER("spider_db_append_condition");
if (!test_flg)
{
- if (spider->sql_kinds & SPIDER_SQL_KIND_SQL)
{
if ((error_num = spider->append_condition_sql_part(
alias, alias_length, SPIDER_SQL_TYPE_SELECT_SQL, FALSE)))
DBUG_RETURN(error_num);
}
- if (spider->sql_kinds & SPIDER_SQL_KIND_HANDLER)
- {
- if ((error_num = spider->append_condition_sql_part(
- alias, alias_length, SPIDER_SQL_TYPE_HANDLER, FALSE)))
- DBUG_RETURN(error_num);
- }
} else {
if (spider->wide_handler->cond_check)
DBUG_RETURN(spider->wide_handler->cond_check_error);
@@ -9130,10 +8562,8 @@ int spider_db_udf_direct_sql(
SPIDER_CONN *conn = direct_sql->conn;
SPIDER_DB_RESULT *result = NULL;
TABLE *table;
- int bulk_insert_rows = (int) spider_param_udf_ds_bulk_insert_rows(thd,
- direct_sql->bulk_insert_rows);
- int table_loop_mode = spider_param_udf_ds_table_loop_mode(thd,
- direct_sql->table_loop_mode);
+ int bulk_insert_rows= (int) direct_sql->bulk_insert_rows;
+ int table_loop_mode= direct_sql->table_loop_mode;
double ping_interval_at_trx_start =
spider_param_ping_interval_at_trx_start(thd);
time_t tmp_time = (time_t) time((time_t*) 0);
@@ -9247,14 +8677,13 @@ int spider_db_udf_direct_sql(
{
while (!error_num && !end_of_file)
{
- udf_table_mutex_index = spider_udf_calc_hash(
- direct_sql->db_names[roop_count],
- spider_param_udf_table_lock_mutex_count());
- udf_table_mutex_index += spider_udf_calc_hash(
- direct_sql->table_names[roop_count],
- spider_param_udf_table_lock_mutex_count());
- udf_table_mutex_index %=
- spider_param_udf_table_lock_mutex_count();
+ udf_table_mutex_index=
+ spider_udf_calc_hash(direct_sql->db_names[roop_count],
+ spider_udf_table_lock_mutex_count);
+ udf_table_mutex_index+=
+ spider_udf_calc_hash(direct_sql->table_names[roop_count],
+ spider_udf_table_lock_mutex_count);
+ udf_table_mutex_index%= spider_udf_table_lock_mutex_count;
pthread_mutex_lock(
&trx->udf_table_mutexes[udf_table_mutex_index]);
table = direct_sql->tables[roop_count];
@@ -10029,13 +9458,8 @@ int spider_db_udf_copy_key_row(
) {
int error_num;
DBUG_ENTER("spider_db_udf_copy_key_row");
-#ifdef SPIDER_use_LEX_CSTRING_for_KEY_Field_name
if ((error_num = spider_db_append_name_with_quote_str(str,
(char *) field->field_name.str, dbton_id)))
-#else
- if ((error_num = spider_db_append_name_with_quote_str(str,
- (char *) field->field_name, dbton_id)))
-#endif
DBUG_RETURN(error_num);
if (str->reserve(joint_length + *length + SPIDER_SQL_AND_LEN))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
@@ -10305,8 +9729,7 @@ int spider_db_udf_copy_tables(
pthread_mutex_unlock(&tmp_conn->mta_conn_mutex);
goto error_db_query;
}
- bulk_insert_rows = spider_param_udf_ct_bulk_insert_rows(
- copy_tables->bulk_insert_rows);
+ bulk_insert_rows= copy_tables->bulk_insert_rows;
if (
select_ct->append_key_order_str(key_info, 0, FALSE) ||
select_ct->append_limit(0, bulk_insert_rows) ||
@@ -10518,8 +9941,7 @@ int spider_db_udf_copy_tables(
insert_ct->set_sql_to_pos();
}
DBUG_PRINT("info",("spider sleep"));
- bulk_insert_interval = spider_param_udf_ct_bulk_insert_interval(
- copy_tables->bulk_insert_interval);
+ bulk_insert_interval= copy_tables->bulk_insert_interval;
my_sleep(bulk_insert_interval);
}
}
@@ -10580,151 +10002,6 @@ error:
DBUG_RETURN(error_num);
}
-int spider_db_open_handler(
- ha_spider *spider,
- SPIDER_CONN *conn,
- int link_idx
-) {
- int error_num;
- SPIDER_SHARE *share = spider->share;
- uint *handler_id_ptr =
- &spider->m_handler_id[link_idx]
- ;
- spider_db_handler *dbton_hdl = spider->dbton_handler[conn->dbton_id];
- DBUG_ENTER("spider_db_open_handler");
- pthread_mutex_assert_not_owner(&conn->mta_conn_mutex);
- pthread_mutex_lock(&conn->mta_conn_mutex);
- SPIDER_SET_FILE_POS(&conn->mta_conn_mutex_file_pos);
- conn->need_mon = &spider->need_mons[link_idx];
- DBUG_ASSERT(conn->mta_conn_mutex_file_pos.file_name);
- DBUG_ASSERT(!conn->mta_conn_mutex_lock_already);
- DBUG_ASSERT(!conn->mta_conn_mutex_unlock_later);
- conn->mta_conn_mutex_lock_already = TRUE;
- conn->mta_conn_mutex_unlock_later = TRUE;
- if (!spider->handler_opened(link_idx, conn->conn_kind))
- *handler_id_ptr = conn->opened_handlers;
-
- if (!spider->handler_opened(link_idx, conn->conn_kind))
- my_sprintf(spider->m_handler_cid[link_idx],
- (spider->m_handler_cid[link_idx], SPIDER_SQL_HANDLER_CID_FORMAT,
- *handler_id_ptr));
-
- if ((error_num = dbton_hdl->append_open_handler_part(
- SPIDER_SQL_TYPE_HANDLER, *handler_id_ptr, conn, link_idx)))
- {
- goto error;
- }
-
- spider_conn_set_timeout_from_share(conn, link_idx,
- spider->wide_handler->trx->thd,
- share);
- if (dbton_hdl->execute_sql(
- SPIDER_SQL_TYPE_HANDLER,
- conn,
- -1,
- &spider->need_mons[link_idx])
- ) {
- error_num = spider_db_errorno(conn);
- goto error;
- }
- dbton_hdl->reset_sql(SPIDER_SQL_TYPE_HANDLER);
-
- if (!spider->handler_opened(link_idx, conn->conn_kind))
- {
- if ((error_num = dbton_hdl->insert_opened_handler(conn, link_idx)))
- goto error;
- conn->opened_handlers++;
- }
- DBUG_PRINT("info",("spider conn=%p", conn));
- DBUG_PRINT("info",("spider opened_handlers=%u", conn->opened_handlers));
- DBUG_ASSERT(conn->mta_conn_mutex_lock_already);
- DBUG_ASSERT(conn->mta_conn_mutex_unlock_later);
- conn->mta_conn_mutex_lock_already = FALSE;
- conn->mta_conn_mutex_unlock_later = FALSE;
- SPIDER_CLEAR_FILE_POS(&conn->mta_conn_mutex_file_pos);
- pthread_mutex_unlock(&conn->mta_conn_mutex);
- DBUG_RETURN(0);
-
-error:
- DBUG_ASSERT(conn->mta_conn_mutex_lock_already);
- DBUG_ASSERT(conn->mta_conn_mutex_unlock_later);
- conn->mta_conn_mutex_lock_already = FALSE;
- conn->mta_conn_mutex_unlock_later = FALSE;
- SPIDER_CLEAR_FILE_POS(&conn->mta_conn_mutex_file_pos);
- pthread_mutex_unlock(&conn->mta_conn_mutex);
- DBUG_RETURN(error_num);
-}
-
-
-int spider_db_close_handler(
- ha_spider *spider,
- SPIDER_CONN *conn,
- int link_idx,
- uint tgt_conn_kind
-) {
- int error_num;
- spider_db_handler *dbton_hdl = spider->dbton_handler[conn->dbton_id];
- DBUG_ENTER("spider_db_close_handler");
- DBUG_PRINT("info",("spider conn=%p", conn));
- pthread_mutex_assert_not_owner(&conn->mta_conn_mutex);
- pthread_mutex_lock(&conn->mta_conn_mutex);
- SPIDER_SET_FILE_POS(&conn->mta_conn_mutex_file_pos);
- conn->need_mon = &spider->need_mons[link_idx];
- DBUG_ASSERT(!conn->mta_conn_mutex_lock_already);
- DBUG_ASSERT(!conn->mta_conn_mutex_unlock_later);
- conn->mta_conn_mutex_lock_already = TRUE;
- conn->mta_conn_mutex_unlock_later = TRUE;
- if (spider->handler_opened(link_idx, tgt_conn_kind))
- {
- dbton_hdl->reset_sql(SPIDER_SQL_TYPE_HANDLER);
- if ((error_num = dbton_hdl->append_close_handler_part(
- SPIDER_SQL_TYPE_HANDLER, link_idx)))
- {
- DBUG_ASSERT(conn->mta_conn_mutex_lock_already);
- DBUG_ASSERT(conn->mta_conn_mutex_unlock_later);
- conn->mta_conn_mutex_lock_already = FALSE;
- conn->mta_conn_mutex_unlock_later = FALSE;
- SPIDER_CLEAR_FILE_POS(&conn->mta_conn_mutex_file_pos);
- pthread_mutex_unlock(&conn->mta_conn_mutex);
- DBUG_RETURN(error_num);
- }
-
- spider_conn_set_timeout_from_share(conn, link_idx,
- spider->wide_handler->trx->thd,
- spider->share);
- if (dbton_hdl->execute_sql(
- SPIDER_SQL_TYPE_HANDLER,
- conn,
- -1,
- &spider->need_mons[link_idx])
- ) {
- error_num = spider_db_errorno(conn);
- goto error;
- }
- dbton_hdl->reset_sql(SPIDER_SQL_TYPE_HANDLER);
- if ((error_num = dbton_hdl->delete_opened_handler(conn, link_idx)))
- goto error;
- conn->opened_handlers--;
- DBUG_PRINT("info",("spider opened_handlers=%u", conn->opened_handlers));
- }
- DBUG_ASSERT(conn->mta_conn_mutex_lock_already);
- DBUG_ASSERT(conn->mta_conn_mutex_unlock_later);
- conn->mta_conn_mutex_lock_already = FALSE;
- conn->mta_conn_mutex_unlock_later = FALSE;
- SPIDER_CLEAR_FILE_POS(&conn->mta_conn_mutex_file_pos);
- pthread_mutex_unlock(&conn->mta_conn_mutex);
- DBUG_RETURN(0);
-
-error:
- DBUG_ASSERT(conn->mta_conn_mutex_lock_already);
- DBUG_ASSERT(conn->mta_conn_mutex_unlock_later);
- conn->mta_conn_mutex_lock_already = FALSE;
- conn->mta_conn_mutex_unlock_later = FALSE;
- SPIDER_CLEAR_FILE_POS(&conn->mta_conn_mutex_file_pos);
- pthread_mutex_unlock(&conn->mta_conn_mutex);
- DBUG_RETURN(error_num);
-}
-
bool spider_db_conn_is_network_error(
int error_num
) {
diff --git a/storage/spider/spd_db_conn.h b/storage/spider/spd_db_conn.h
index adda66d547b..1de59f43858 100644
--- a/storage/spider/spd_db_conn.h
+++ b/storage/spider/spd_db_conn.h
@@ -271,8 +271,6 @@
#define SPIDER_SQL_INDEX_FORCE_LEN (sizeof(SPIDER_SQL_INDEX_FORCE_STR) - 1)
#define SPIDER_SQL_INT_LEN 20
-#define SPIDER_SQL_HANDLER_CID_LEN 6
-#define SPIDER_SQL_HANDLER_CID_FORMAT "t%05u"
#define SPIDER_UDF_PING_TABLE_PING_ONLY (1 << 0)
#define SPIDER_UDF_PING_TABLE_USE_WHERE (1 << 1)
#define SPIDER_UDF_PING_TABLE_USE_ALL_MONITORING_NODES (1 << 2)
@@ -544,10 +542,6 @@ void spider_db_free_show_index(
SPIDER_SHARE *share
);
-void spider_db_append_handler_next(
- ha_spider *spider
-);
-
void spider_db_get_row_from_tmp_tbl_rec(
SPIDER_RESULT *current,
SPIDER_DB_ROW **row
@@ -1144,20 +1138,6 @@ int spider_db_udf_copy_tables(
longlong bulk_insert_rows
);
-int spider_db_open_handler(
- ha_spider *spider,
- SPIDER_CONN *conn,
- int link_idx
-);
-
-
-int spider_db_close_handler(
- ha_spider *spider,
- SPIDER_CONN *conn,
- int link_idx,
- uint tgt_conn_kind
-);
-
bool spider_db_conn_is_network_error(
int error_num
);
diff --git a/storage/spider/spd_db_include.h b/storage/spider/spd_db_include.h
index 6a8c03677f3..02d0c389515 100644
--- a/storage/spider/spd_db_include.h
+++ b/storage/spider/spd_db_include.h
@@ -33,12 +33,8 @@
#define SPIDER_HAS_APPEND_FOR_SINGLE_QUOTE
#define SPIDER_HAS_SHOW_SIMPLE_FUNC
#define SPIDER_HAS_JT_HASH_INDEX_MERGE
-#define SPIDER_HAS_EXPR_CACHE_ITEM
-#define SPIDER_ITEM_HAS_CMP_TYPE
#define SPIDER_HAS_TIME_STATUS
#define SPIDER_HAS_DECIMAL_OPERATION_RESULTS_VALUE_TYPE
-#define SPIDER_ITEM_STRING_WITHOUT_SET_STR_WITH_COPY
-#define SPIDER_ITEM_STRING_WITHOUT_SET_STR_WITH_COPY_AND_THDPTR
#define SPIDER_ORDER_HAS_ENUM_ORDER
#define SPIDER_ITEM_GEOFUNC_NAME_HAS_MBR
#define SPIDER_HANDLER_AUTO_REPAIR_HAS_ERROR
@@ -174,9 +170,6 @@ typedef st_spider_result SPIDER_RESULT;
#define SPIDER_CONN_KIND_MYSQL (1 << 0)
-#define SPIDER_SQL_KIND_SQL (1 << 0)
-#define SPIDER_SQL_KIND_HANDLER (1 << 1)
-
#define SPIDER_SQL_TYPE_SELECT_SQL (1 << 0)
#define SPIDER_SQL_TYPE_INSERT_SQL (1 << 1)
#define SPIDER_SQL_TYPE_UPDATE_SQL (1 << 2)
@@ -185,7 +178,6 @@ typedef st_spider_result SPIDER_RESULT;
#define SPIDER_SQL_TYPE_TMP_SQL (1 << 5)
#define SPIDER_SQL_TYPE_DROP_TMP_TABLE_SQL (1 << 6)
#define SPIDER_SQL_TYPE_OTHER_SQL (1 << 7)
-#define SPIDER_SQL_TYPE_HANDLER (1 << 8)
#define SPIDER_SQL_TYPE_SELECT_HS (1 << 9)
#define SPIDER_SQL_TYPE_INSERT_HS (1 << 10)
#define SPIDER_SQL_TYPE_UPDATE_HS (1 << 11)
@@ -1100,8 +1092,6 @@ public:
) = 0;
virtual uint get_lock_table_hash_count() = 0;
virtual void reset_lock_table_hash() = 0;
- virtual uint get_opened_handler_count() = 0;
- virtual void reset_opened_handler() = 0;
virtual void set_dup_key_idx(
ha_spider *spider,
int link_idx
@@ -1367,16 +1357,6 @@ public:
ulong sql_type,
uint multi_range_cnt
) = 0;
- virtual int append_open_handler_part(
- ulong sql_type,
- uint handler_id,
- SPIDER_CONN *conn,
- int link_idx
- ) = 0;
- virtual int append_close_handler_part(
- ulong sql_type,
- int link_idx
- ) = 0;
virtual int append_insert_terminator_part(
ulong sql_type
) = 0;
@@ -1539,20 +1519,9 @@ public:
SPIDER_CONN *conn,
int link_idx
) = 0;
- virtual int insert_opened_handler(
- SPIDER_CONN *conn,
- int link_idx
- ) = 0;
- virtual int delete_opened_handler(
- SPIDER_CONN *conn,
- int link_idx
- ) = 0;
virtual int sync_from_clone_source(
spider_db_handler *dbton_hdl
) = 0;
- virtual bool support_use_handler(
- int use_handler
- ) = 0;
virtual bool minimum_select_bit_is_set(
uint field_index
) = 0;
@@ -1741,7 +1710,6 @@ typedef struct st_spider_position
bool use_position;
bool mrr_with_cnt;
bool direct_aggregate;
- uint sql_kind;
uchar *position_bitmap;
st_spider_ft_info *ft_first;
st_spider_ft_info *ft_current;
@@ -1790,9 +1758,6 @@ typedef struct st_spider_result_list
int key_order;
spider_string *sqls;
int ha_read_kind;
- bool have_sql_kind_backup;
- uint *sql_kind_backup;
- uint sql_kinds_backup;
bool use_union;
bool use_both_key;
const key_range *end_key;
diff --git a/storage/spider/spd_db_mysql.cc b/storage/spider/spd_db_mysql.cc
index a77a437e7c5..03caaa41a32 100644
--- a/storage/spider/spd_db_mysql.cc
+++ b/storage/spider/spd_db_mysql.cc
@@ -1758,7 +1758,7 @@ spider_db_mbase::spider_db_mbase(
SPIDER_CONN *conn,
spider_db_mbase_util *spider_db_mbase_utility
) : spider_db_conn(conn), spider_db_mbase_utility(spider_db_mbase_utility),
- lock_table_hash_inited(FALSE), handler_open_array_inited(FALSE)
+ lock_table_hash_inited(FALSE)
{
DBUG_ENTER("spider_db_mbase::spider_db_mbase");
DBUG_PRINT("info",("spider this=%p", this));
@@ -1788,15 +1788,6 @@ spider_db_mbase::~spider_db_mbase()
{
DBUG_ENTER("spider_db_mbase::~spider_db_mbase");
DBUG_PRINT("info",("spider this=%p", this));
- if (handler_open_array_inited)
- {
- reset_opened_handler();
- spider_free_mem_calc(spider_current_trx,
- handler_open_array_id,
- handler_open_array.max_element *
- handler_open_array.size_of_element);
- delete_dynamic(&handler_open_array);
- }
if (lock_table_hash_inited)
{
spider_free_mem_calc(spider_current_trx,
@@ -1839,18 +1830,6 @@ int spider_db_mbase::init()
lock_table_hash.array.size_of_element);
lock_table_hash_inited = TRUE;
- if (
- SPD_INIT_DYNAMIC_ARRAY2(&handler_open_array,
- sizeof(SPIDER_LINK_FOR_HASH *), NULL, 16, 16, MYF(MY_WME))
- ) {
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- }
- spider_alloc_calc_mem_init(handler_open_array, 162);
- spider_alloc_calc_mem(spider_current_trx,
- handler_open_array,
- handler_open_array.max_element *
- handler_open_array.size_of_element);
- handler_open_array_inited = TRUE;
DBUG_RETURN(0);
}
@@ -3783,30 +3762,6 @@ void spider_db_mbase::reset_lock_table_hash()
DBUG_VOID_RETURN;
}
-uint spider_db_mbase::get_opened_handler_count()
-{
- DBUG_ENTER("spider_db_mbase::get_opened_handler_count");
- DBUG_PRINT("info",("spider this=%p", this));
- DBUG_RETURN(handler_open_array.elements);
-}
-
-void spider_db_mbase::reset_opened_handler()
-{
- ha_spider *tmp_spider;
- int tmp_link_idx;
- SPIDER_LINK_FOR_HASH **tmp_link_for_hash;
- DBUG_ENTER("spider_db_mbase::reset_opened_handler");
- DBUG_PRINT("info",("spider this=%p", this));
- while ((tmp_link_for_hash =
- (SPIDER_LINK_FOR_HASH **) pop_dynamic(&handler_open_array)))
- {
- tmp_spider = (*tmp_link_for_hash)->spider;
- tmp_link_idx = (*tmp_link_for_hash)->link_idx;
- tmp_spider->clear_handler_opened(tmp_link_idx, conn->conn_kind);
- }
- DBUG_VOID_RETURN;
-}
-
void spider_db_mbase::set_dup_key_idx(
ha_spider *spider,
int link_idx
@@ -3828,13 +3783,8 @@ void spider_db_mbase::set_dup_key_idx(
key_name = spider->share->tgt_pk_names[all_link_idx];
key_name_length = spider->share->tgt_pk_names_lengths[all_link_idx];
} else {
-#ifdef SPIDER_use_LEX_CSTRING_for_KEY_Field_name
key_name = table->key_info[roop_count].name.str;
key_name_length = table->key_info[roop_count].name.length;
-#else
- key_name = table->key_info[roop_count].name;
- key_name_length = strlen(key_name);
-#endif
}
DBUG_PRINT("info",("spider key_name=%s", key_name));
if (
@@ -6325,15 +6275,12 @@ int spider_db_mbase_util::open_item_func(
bool has_other_item = FALSE;
while((item = lif++))
{
-#ifdef SPIDER_HAS_EXPR_CACHE_ITEM
if (
item->type() == Item::EXPR_CACHE_ITEM
) {
DBUG_PRINT("info",("spider EXPR_CACHE_ITEM"));
has_expr_cache_item = TRUE;
- } else
-#endif
- if (
+ } else if (
item->type() == Item::FUNC_ITEM &&
((Item_func *) item)->functype() == Item_func::ISNOTNULL_FUNC
) {
@@ -6532,7 +6479,6 @@ int spider_db_mbase_util::open_item_func(
}
break;
case Item_func::LIKE_FUNC:
-#ifdef SPIDER_LIKE_FUNC_HAS_GET_NEGATED
if (str)
{
if (((Item_func_like *)item_func)->get_negated())
@@ -6548,9 +6494,6 @@ int spider_db_mbase_util::open_item_func(
}
}
break;
-#else
- DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM);
-#endif
case Item_func::CASE_SEARCHED_FUNC:
case Item_func::CASE_SIMPLE_FUNC:
#ifdef ITEM_FUNC_CASE_PARAMS_ARE_PUBLIC
@@ -8758,8 +8701,6 @@ int spider_mbase_handler::append_index_hint(
while(index_hints && (hint = iter++))
{
-// hint->print(thd, str);
- if (sql_type != SPIDER_SQL_TYPE_HANDLER)
{
switch(hint->type)
{
@@ -8804,13 +8745,8 @@ int spider_mbase_handler::append_table_name_with_adjusting(
int error_num = 0;
DBUG_ENTER("spider_mbase_handler::append_table_name_with_adjusting");
DBUG_PRINT("info",("spider this=%p", this));
- if (sql_type == SPIDER_SQL_TYPE_HANDLER)
- {
- str->q_append(spider->m_handler_cid[link_idx], SPIDER_SQL_HANDLER_CID_LEN);
- } else {
error_num = mysql_share->append_table_name_with_adjusting(str,
spider->conn_link_idx[link_idx]);
- }
DBUG_RETURN(error_num);
}
@@ -9719,10 +9655,8 @@ int spider_mbase_handler::append_direct_update_set(
spider_string *str
) {
DBUG_ENTER("spider_mbase_handler::append_direct_update_set");
- if (
- spider->direct_update_kinds == SPIDER_SQL_KIND_SQL &&
- spider->wide_handler->direct_update_fields
- ) {
+ if (spider->wide_handler->direct_update_fields)
+ {
if (str->reserve(SPIDER_SQL_SET_LEN))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
str->q_append(SPIDER_SQL_SET_STR, SPIDER_SQL_SET_LEN);
@@ -9730,11 +9664,6 @@ int spider_mbase_handler::append_direct_update_set(
dbton_id, FALSE, NULL));
}
- if (
- (spider->direct_update_kinds & SPIDER_SQL_KIND_SQL)
- ) {
- DBUG_ASSERT(0);
- }
DBUG_RETURN(0);
}
@@ -9794,9 +9723,6 @@ int spider_mbase_handler::append_select_part(
case SPIDER_SQL_TYPE_SELECT_SQL:
str = &sql;
break;
- case SPIDER_SQL_TYPE_HANDLER:
- str = &ha_sql;
- break;
default:
DBUG_RETURN(0);
}
@@ -9811,12 +9737,7 @@ int spider_mbase_handler::append_select(
SPIDER_RESULT_LIST *result_list = &spider->result_list;
SPIDER_WIDE_HANDLER *wide_handler = spider->wide_handler;
DBUG_ENTER("spider_mbase_handler::append_select");
- if (sql_type == SPIDER_SQL_TYPE_HANDLER)
{
- if (str->reserve(SPIDER_SQL_HANDLER_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str->q_append(SPIDER_SQL_HANDLER_STR, SPIDER_SQL_HANDLER_LEN);
- } else {
if (str->reserve(SPIDER_SQL_SELECT_LEN))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
str->q_append(SPIDER_SQL_SELECT_STR, SPIDER_SQL_SELECT_LEN);
@@ -10314,9 +10235,6 @@ int spider_mbase_handler::append_hint_after_table_part(
case SPIDER_SQL_TYPE_BULK_UPDATE_SQL:
str = &update_sql;
break;
- case SPIDER_SQL_TYPE_HANDLER:
- str = &ha_sql;
- break;
default:
DBUG_RETURN(0);
}
@@ -10355,9 +10273,6 @@ void spider_mbase_handler::set_where_pos(
case SPIDER_SQL_TYPE_BULK_UPDATE_SQL:
where_pos = update_sql.length();
break;
- case SPIDER_SQL_TYPE_HANDLER:
- ha_read_pos = ha_sql.length();
- break;
default:
break;
}
@@ -10380,9 +10295,6 @@ void spider_mbase_handler::set_where_to_pos(
case SPIDER_SQL_TYPE_BULK_UPDATE_SQL:
update_sql.length(where_pos);
break;
- case SPIDER_SQL_TYPE_HANDLER:
- ha_sql.length(ha_read_pos);
- break;
default:
break;
}
@@ -10728,15 +10640,6 @@ int spider_mbase_handler::append_key_where_part(
str = &update_sql;
set_order = FALSE;
break;
- case SPIDER_SQL_TYPE_HANDLER:
- str = &ha_sql;
- ha_read_pos = str->length();
- str_part = &sql_part;
- str_part2 = &sql_part2;
- str_part->length(0);
- str_part2->length(0);
- set_order = TRUE;
- break;
default:
DBUG_RETURN(0);
}
@@ -10786,11 +10689,6 @@ int spider_mbase_handler::append_is_null_part(
case SPIDER_SQL_TYPE_BULK_UPDATE_SQL:
str = &update_sql;
break;
- case SPIDER_SQL_TYPE_HANDLER:
- str = &ha_sql;
- str_part = &sql_part;
- str_part2 = &sql_part2;
- break;
default:
DBUG_RETURN(0);
}
@@ -10817,38 +10715,6 @@ int spider_mbase_handler::append_is_null(
{
if (*(*ptr)++)
{
- if (sql_type == SPIDER_SQL_TYPE_HANDLER)
- {
- if (
- key_eq ||
- key->flag == HA_READ_KEY_EXACT ||
- key->flag == HA_READ_KEY_OR_NEXT
- ) {
- if (str_part->length() == SPIDER_SQL_OPEN_PAREN_LEN)
- {
- if (str->reserve(SPIDER_SQL_EQUAL_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str->q_append(SPIDER_SQL_EQUAL_STR, SPIDER_SQL_EQUAL_LEN);
- str = str_part;
- if (str->reserve(SPIDER_SQL_NULL_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str->q_append(SPIDER_SQL_NULL_STR, SPIDER_SQL_NULL_LEN);
- }
- } else {
- if (str_part->length() == SPIDER_SQL_OPEN_PAREN_LEN)
- {
- str = str_part;
- /* first index column */
- str->length(str->length() - SPIDER_SQL_OPEN_PAREN_LEN);
- ha_next_pos = str->length();
- if (str->reserve(SPIDER_SQL_FIRST_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str->q_append(SPIDER_SQL_FIRST_STR, SPIDER_SQL_FIRST_LEN);
- spider->result_list.ha_read_kind = 1;
- }
- }
- str = str_part2;
- }
if (
key_eq ||
key->flag == HA_READ_KEY_EXACT ||
@@ -10895,11 +10761,6 @@ int spider_mbase_handler::append_where_terminator_part(
case SPIDER_SQL_TYPE_BULK_UPDATE_SQL:
str = &update_sql;
break;
- case SPIDER_SQL_TYPE_HANDLER:
- str = &ha_sql;
- str_part = &sql_part;
- str_part2 = &sql_part2;
- break;
default:
DBUG_RETURN(0);
}
@@ -10918,31 +10779,11 @@ int spider_mbase_handler::append_where_terminator(
) {
SPIDER_RESULT_LIST *result_list = &spider->result_list;
DBUG_ENTER("spider_mbase_handler::append_where_terminator");
- DBUG_PRINT("info",("spider this=%p", this));
- if (sql_type != SPIDER_SQL_TYPE_HANDLER)
- {
- str->length(str->length() - SPIDER_SQL_AND_LEN);
- if (!set_order)
- result_list->key_order = key_count;
- } else {
- str_part2->length(str_part2->length() - SPIDER_SQL_AND_LEN);
+ DBUG_PRINT("info", ("spider this=%p", this));
- if (!result_list->ha_read_kind)
- str_part->q_append(SPIDER_SQL_CLOSE_PAREN_STR,
- SPIDER_SQL_CLOSE_PAREN_LEN);
- if (str->append(*str_part))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- uint clause_length = str->length() - ha_next_pos;
- if (clause_length < SPIDER_SQL_NEXT_LEN)
- {
- int roop_count;
- clause_length = SPIDER_SQL_NEXT_LEN - clause_length;
- if (str->reserve(clause_length))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- for (roop_count = 0; roop_count < (int) clause_length; roop_count++)
- str->q_append(SPIDER_SQL_SPACE_STR, SPIDER_SQL_SPACE_LEN);
- }
- }
+ str->length(str->length() - SPIDER_SQL_AND_LEN);
+ if (!set_order)
+ result_list->key_order= key_count;
DBUG_RETURN(0);
}
@@ -11149,39 +10990,6 @@ int spider_mbase_handler::append_condition_part(
start_where = ((int) str->length() == where_pos);
}
break;
- case SPIDER_SQL_TYPE_HANDLER:
- if (test_flg)
- {
- str = NULL;
- } else {
- str = &ha_sql;
- start_where = TRUE;
- if (spider->active_index == MAX_KEY)
- {
- set_where_pos(SPIDER_SQL_TYPE_HANDLER);
- if (str->reserve(SPIDER_SQL_READ_LEN + SPIDER_SQL_FIRST_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str->q_append(SPIDER_SQL_READ_STR, SPIDER_SQL_READ_LEN);
- ha_next_pos = str->length();
- str->q_append(SPIDER_SQL_FIRST_STR, SPIDER_SQL_FIRST_LEN);
- sql_part2.length(0);
- }
- ha_where_pos = str->length();
-
- if (
- spider->wide_handler->sql_command == SQLCOM_HA_READ ||
- !spider->result_list.use_both_key
- ) {
- if (sql_part2.length())
- {
- str->append(sql_part2);
- start_where = FALSE;
- }
- } else {
- DBUG_RETURN(0);
- }
- }
- break;
default:
DBUG_RETURN(0);
}
@@ -11465,9 +11273,6 @@ void spider_mbase_handler::set_order_pos(
case SPIDER_SQL_TYPE_BULK_UPDATE_SQL:
order_pos = update_sql.length();
break;
- case SPIDER_SQL_TYPE_HANDLER:
- ha_next_pos = ha_sql.length();
- break;
default:
DBUG_ASSERT(0);
break;
@@ -11491,9 +11296,6 @@ void spider_mbase_handler::set_order_to_pos(
case SPIDER_SQL_TYPE_BULK_UPDATE_SQL:
update_sql.length(order_pos);
break;
- case SPIDER_SQL_TYPE_HANDLER:
- ha_sql.length(ha_next_pos);
- break;
default:
DBUG_ASSERT(0);
break;
@@ -11522,9 +11324,6 @@ int spider_mbase_handler::append_group_by_part(
case SPIDER_SQL_TYPE_BULK_UPDATE_SQL:
str = &update_sql;
break;
- case SPIDER_SQL_TYPE_HANDLER:
- str = &ha_sql;
- break;
default:
DBUG_RETURN(0);
}
@@ -11585,10 +11384,6 @@ int spider_mbase_handler::append_key_order_for_merge_with_alias_part(
case SPIDER_SQL_TYPE_BULK_UPDATE_SQL:
str = &update_sql;
break;
- case SPIDER_SQL_TYPE_HANDLER:
- str = &ha_sql;
- ha_limit_pos = ha_sql.length();
- break;
default:
DBUG_RETURN(0);
}
@@ -11699,9 +11494,6 @@ int spider_mbase_handler::append_key_order_for_direct_order_limit_with_alias_par
case SPIDER_SQL_TYPE_BULK_UPDATE_SQL:
str = &update_sql;
break;
- case SPIDER_SQL_TYPE_HANDLER:
- str = &ha_sql;
- break;
default:
DBUG_RETURN(0);
}
@@ -11783,10 +11575,6 @@ int spider_mbase_handler::append_key_order_with_alias_part(
case SPIDER_SQL_TYPE_BULK_UPDATE_SQL:
str = &update_sql;
break;
- case SPIDER_SQL_TYPE_HANDLER:
- str = &ha_sql;
- error_num = append_key_order_for_handler(str, alias, alias_length);
- DBUG_RETURN(error_num);
default:
DBUG_RETURN(0);
}
@@ -11999,10 +11787,6 @@ int spider_mbase_handler::append_limit_part(
str = &update_sql;
limit_pos = str->length();
break;
- case SPIDER_SQL_TYPE_HANDLER:
- str = &ha_sql;
- ha_limit_pos = str->length();
- break;
default:
DBUG_RETURN(0);
}
@@ -12036,10 +11820,6 @@ int spider_mbase_handler::reappend_limit_part(
str = &update_sql;
str->length(limit_pos);
break;
- case SPIDER_SQL_TYPE_HANDLER:
- str = &ha_sql;
- str->length(ha_limit_pos);
- break;
default:
DBUG_RETURN(0);
}
@@ -12298,97 +12078,6 @@ int spider_mbase_handler::append_multi_range_cnt_with_name(
DBUG_RETURN(0);
}
-int spider_mbase_handler::append_open_handler_part(
- ulong sql_type,
- uint handler_id,
- SPIDER_CONN *conn,
- int link_idx
-) {
- int error_num;
- spider_string *str;
- DBUG_ENTER("spider_mbase_handler::append_open_handler_part");
- DBUG_PRINT("info",("spider this=%p", this));
- switch (sql_type)
- {
- case SPIDER_SQL_TYPE_HANDLER:
- str = &ha_sql;
- break;
- default:
- DBUG_RETURN(0);
- }
- error_num = append_open_handler(str, handler_id, conn, link_idx);
- exec_ha_sql = str;
- DBUG_RETURN(error_num);
-}
-
-int spider_mbase_handler::append_open_handler(
- spider_string *str,
- uint handler_id,
- SPIDER_CONN *conn,
- int link_idx
-) {
- int error_num;
- DBUG_ENTER("spider_mbase_handler::append_open_handler");
- DBUG_PRINT("info",("spider this=%p", this));
- DBUG_PRINT("info",("spider link_idx=%d", link_idx));
- DBUG_PRINT("info",("spider m_handler_cid=%s",
- spider->m_handler_cid[link_idx]));
- if (str->reserve(SPIDER_SQL_HANDLER_LEN))
- {
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- }
- str->q_append(SPIDER_SQL_HANDLER_STR, SPIDER_SQL_HANDLER_LEN);
- if ((error_num = mysql_share->append_table_name(str,
- spider->conn_link_idx[link_idx])))
- DBUG_RETURN(error_num);
- if (str->reserve(SPIDER_SQL_OPEN_LEN + SPIDER_SQL_AS_LEN +
- SPIDER_SQL_HANDLER_CID_LEN))
- {
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- }
- str->q_append(SPIDER_SQL_OPEN_STR, SPIDER_SQL_OPEN_LEN);
- str->q_append(SPIDER_SQL_AS_STR, SPIDER_SQL_AS_LEN);
- str->q_append(spider->m_handler_cid[link_idx], SPIDER_SQL_HANDLER_CID_LEN);
- DBUG_RETURN(0);
-}
-
-int spider_mbase_handler::append_close_handler_part(
- ulong sql_type,
- int link_idx
-) {
- int error_num;
- spider_string *str;
- DBUG_ENTER("spider_mbase_handler::append_close_handler_part");
- DBUG_PRINT("info",("spider this=%p", this));
- switch (sql_type)
- {
- case SPIDER_SQL_TYPE_HANDLER:
- str = &ha_sql;
- break;
- default:
- DBUG_RETURN(0);
- }
- error_num = append_close_handler(str, link_idx);
- exec_ha_sql = str;
- DBUG_RETURN(error_num);
-}
-
-int spider_mbase_handler::append_close_handler(
- spider_string *str,
- int link_idx
-) {
- DBUG_ENTER("spider_mbase_handler::append_close_handler");
- DBUG_PRINT("info",("spider this=%p", this));
- if (str->reserve(SPIDER_SQL_HANDLER_LEN + SPIDER_SQL_CLOSE_LEN +
- SPIDER_SQL_HANDLER_CID_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str->q_append(SPIDER_SQL_HANDLER_STR, SPIDER_SQL_HANDLER_LEN);
- str->q_append(spider->m_handler_cid[link_idx],
- SPIDER_SQL_HANDLER_CID_LEN);
- str->q_append(SPIDER_SQL_CLOSE_STR, SPIDER_SQL_CLOSE_LEN);
- DBUG_RETURN(0);
-}
-
int spider_mbase_handler::append_insert_terminator_part(
ulong sql_type
) {
@@ -12625,9 +12314,6 @@ int spider_mbase_handler::append_from_part(
DBUG_PRINT("info",("spider this=%p", this));
switch (sql_type)
{
- case SPIDER_SQL_TYPE_HANDLER:
- str = &ha_sql;
- break;
case SPIDER_SQL_TYPE_UPDATE_SQL:
case SPIDER_SQL_TYPE_DELETE_SQL:
case SPIDER_SQL_TYPE_BULK_UPDATE_SQL:
@@ -12649,33 +12335,18 @@ int spider_mbase_handler::append_from(
DBUG_ENTER("spider_mbase_handler::append_from");
DBUG_PRINT("info",("spider this=%p", this));
DBUG_PRINT("info",("spider link_idx=%d", link_idx));
- int error_num = 0;
- if (sql_type == SPIDER_SQL_TYPE_HANDLER)
+ int error_num= 0;
+ if (str->reserve(SPIDER_SQL_FROM_LEN + mysql_share->db_nm_max_length +
+ SPIDER_SQL_DOT_LEN + mysql_share->table_nm_max_length +
+ /* SPIDER_SQL_NAME_QUOTE_LEN */ 4 +
+ SPIDER_SQL_OPEN_PAREN_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ str->q_append(SPIDER_SQL_FROM_STR, SPIDER_SQL_FROM_LEN);
+ table_name_pos= str->length();
+ append_table_name_with_adjusting(str, link_idx, sql_type);
+ if (spider_param_index_hint_pushdown(spider->wide_handler->trx->thd))
{
- ha_table_name_pos = str->length();
- DBUG_PRINT("info",("spider ha_table_name_pos=%u", ha_table_name_pos));
- ha_sql_handler_id = spider->m_handler_id[link_idx];
- DBUG_PRINT("info",("spider ha_sql_handler_id=%u", ha_sql_handler_id));
- if (str->reserve(SPIDER_SQL_HANDLER_CID_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str->q_append(spider->m_handler_cid[link_idx], SPIDER_SQL_HANDLER_CID_LEN);
- DBUG_PRINT("info",("spider m_handler_cid=%s",
- spider->m_handler_cid[link_idx]));
- } else {
- if (str->reserve(SPIDER_SQL_FROM_LEN + mysql_share->db_nm_max_length +
- SPIDER_SQL_DOT_LEN + mysql_share->table_nm_max_length +
- /* SPIDER_SQL_NAME_QUOTE_LEN */ 4 + SPIDER_SQL_OPEN_PAREN_LEN))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- str->q_append(SPIDER_SQL_FROM_STR, SPIDER_SQL_FROM_LEN);
- table_name_pos = str->length();
- append_table_name_with_adjusting(str, link_idx, sql_type);
- if(spider_param_index_hint_pushdown(spider->wide_handler->trx->thd))
- {
- if((error_num = append_index_hint(str, link_idx, sql_type)))
- {
- DBUG_RETURN(error_num);
- }
- }
+ DBUG_RETURN(error_num);
}
DBUG_RETURN(0);
}
@@ -13241,9 +12912,6 @@ bool spider_mbase_handler::sql_is_empty(
case SPIDER_SQL_TYPE_TMP_SQL:
is_empty = (tmp_sql.length() == 0);
break;
- case SPIDER_SQL_TYPE_HANDLER:
- is_empty = (ha_sql.length() == 0);
- break;
default:
is_empty = TRUE;
break;
@@ -13573,10 +13241,6 @@ int spider_mbase_handler::reset_sql(
{
tmp_sql.length(0);
}
- if (sql_type & SPIDER_SQL_TYPE_HANDLER)
- {
- ha_sql.length(0);
- }
DBUG_RETURN(0);
}
@@ -13768,23 +13432,6 @@ int spider_mbase_handler::set_sql_for_exec(
exec_update_sql->length(tmp_pos);
}
}
- if (sql_type & SPIDER_SQL_TYPE_HANDLER)
- {
- if (spider->m_handler_id[link_idx] == ha_sql_handler_id)
- exec_ha_sql = &ha_sql;
- else {
- exec_ha_sql = &result_list->sqls[link_idx];
- if (exec_ha_sql->copy(ha_sql))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- else {
- tmp_pos = exec_ha_sql->length();
- exec_ha_sql->length(ha_table_name_pos);
- append_table_name_with_adjusting(exec_ha_sql, link_idx,
- SPIDER_SQL_TYPE_HANDLER);
- exec_ha_sql->length(tmp_pos);
- }
- }
- }
DBUG_RETURN(0);
}
@@ -13850,11 +13497,6 @@ int spider_mbase_handler::execute_sql(
tgt_sql = exec_tmp_sql;
tgt_length = tmp_sql_pos5;
break;
- case SPIDER_SQL_TYPE_HANDLER:
- DBUG_PRINT("info",("spider SPIDER_SQL_TYPE_HANDLER"));
- tgt_sql = exec_ha_sql;
- tgt_length = tgt_sql->length();
- break;
default:
/* nothing to do */
DBUG_PRINT("info",("spider default"));
@@ -15493,55 +15135,6 @@ int spider_mbase_handler::flush_logs(
DBUG_RETURN(0);
}
-int spider_mbase_handler::insert_opened_handler(
- SPIDER_CONN *conn,
- int link_idx
-) {
- spider_db_mbase *db_conn = (spider_db_mbase *) conn->db_conn;
- SPIDER_LINK_FOR_HASH *tmp_link_for_hash = &link_for_hash[link_idx];
- DBUG_ASSERT(tmp_link_for_hash->spider == spider);
- DBUG_ASSERT(tmp_link_for_hash->link_idx == link_idx);
- uint old_elements = db_conn->handler_open_array.max_element;
- DBUG_ENTER("spider_mbase_handler::insert_opened_handler");
- DBUG_PRINT("info",("spider this=%p", this));
- if (insert_dynamic(&db_conn->handler_open_array,
- (uchar*) &tmp_link_for_hash))
- {
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- }
- if (db_conn->handler_open_array.max_element > old_elements)
- {
- spider_alloc_calc_mem(spider_current_trx,
- db_conn->handler_open_array,
- (db_conn->handler_open_array.max_element - old_elements) *
- db_conn->handler_open_array.size_of_element);
- }
- DBUG_RETURN(0);
-}
-
-int spider_mbase_handler::delete_opened_handler(
- SPIDER_CONN *conn,
- int link_idx
-) {
- spider_db_mbase *db_conn = (spider_db_mbase *) conn->db_conn;
- uint roop_count, elements = db_conn->handler_open_array.elements;
- SPIDER_LINK_FOR_HASH *tmp_link_for_hash;
- DBUG_ENTER("spider_mbase_handler::delete_opened_handler");
- DBUG_PRINT("info",("spider this=%p", this));
- for (roop_count = 0; roop_count < elements; roop_count++)
- {
- get_dynamic(&db_conn->handler_open_array, (uchar *) &tmp_link_for_hash,
- roop_count);
- if (tmp_link_for_hash == &link_for_hash[link_idx])
- {
- delete_dynamic_element(&db_conn->handler_open_array, roop_count);
- break;
- }
- }
- DBUG_ASSERT(roop_count < elements);
- DBUG_RETURN(0);
-}
-
int spider_mbase_handler::sync_from_clone_source(
spider_db_handler *dbton_hdl
) {
@@ -15550,14 +15143,6 @@ int spider_mbase_handler::sync_from_clone_source(
DBUG_RETURN(0);
}
-bool spider_mbase_handler::support_use_handler(
- int use_handler
-) {
- DBUG_ENTER("spider_mbase_handler::support_use_handler");
- DBUG_PRINT("info",("spider this=%p", this));
- DBUG_RETURN(TRUE);
-}
-
void spider_mbase_handler::minimum_select_bitmap_create()
{
TABLE *table = spider->get_table();
diff --git a/storage/spider/spd_db_mysql.h b/storage/spider/spd_db_mysql.h
index abcb4a4c147..60dd5bd7ecd 100644
--- a/storage/spider/spd_db_mysql.h
+++ b/storage/spider/spd_db_mysql.h
@@ -396,12 +396,6 @@ public:
const char *lock_table_hash_func_name;
const char *lock_table_hash_file_name;
ulong lock_table_hash_line_no;
- DYNAMIC_ARRAY handler_open_array;
- bool handler_open_array_inited;
- uint handler_open_array_id;
- const char *handler_open_array_func_name;
- const char *handler_open_array_file_name;
- ulong handler_open_array_line_no;
spider_db_mbase(
SPIDER_CONN *conn,
spider_db_mbase_util *spider_db_mbase_utility
@@ -583,8 +577,6 @@ public:
);
uint get_lock_table_hash_count();
void reset_lock_table_hash();
- uint get_opened_handler_count();
- void reset_opened_handler();
void set_dup_key_idx(
ha_spider *spider,
int link_idx
@@ -1192,26 +1184,6 @@ public:
spider_string *str,
uint multi_range_cnt
);
- int append_open_handler_part(
- ulong sql_type,
- uint handler_id,
- SPIDER_CONN *conn,
- int link_idx
- );
- int append_open_handler(
- spider_string *str,
- uint handler_id,
- SPIDER_CONN *conn,
- int link_idx
- );
- int append_close_handler_part(
- ulong sql_type,
- int link_idx
- );
- int append_close_handler(
- spider_string *str,
- int link_idx
- );
int append_insert_terminator_part(
ulong sql_type
);
@@ -1478,20 +1450,9 @@ public:
SPIDER_CONN *conn,
int link_idx
);
- int insert_opened_handler(
- SPIDER_CONN *conn,
- int link_idx
- );
- int delete_opened_handler(
- SPIDER_CONN *conn,
- int link_idx
- );
int sync_from_clone_source(
spider_db_handler *dbton_hdl
);
- bool support_use_handler(
- int use_handler
- );
void minimum_select_bitmap_create();
bool minimum_select_bit_is_set(
uint field_index
diff --git a/storage/spider/spd_direct_sql.cc b/storage/spider/spd_direct_sql.cc
index 6a7d5109081..333532bb107 100644
--- a/storage/spider/spd_direct_sql.cc
+++ b/storage/spider/spd_direct_sql.cc
@@ -1594,10 +1594,9 @@ long long spider_direct_sql_body(
}
trx->updated_in_this_trx = TRUE;
DBUG_PRINT("info",("spider trx->updated_in_this_trx=TRUE"));
- use_real_table = spider_param_udf_ds_use_real_table(thd,
- direct_sql->use_real_table);
- for (roop_count = 0; roop_count < direct_sql->table_count; roop_count++)
- {
+ use_real_table= direct_sql->use_real_table;
+ for (roop_count= 0; roop_count < direct_sql->table_count; roop_count++)
+ {
#ifdef SPIDER_NEED_INIT_ONE_TABLE_FOR_FIND_TEMPORARY_TABLE
#ifdef SPIDER_use_LEX_CSTRING_for_database_tablename_alias
LEX_CSTRING db_name =
diff --git a/storage/spider/spd_environ.h b/storage/spider/spd_environ.h
index 0caf23af64c..ccdc7009f9a 100644
--- a/storage/spider/spd_environ.h
+++ b/storage/spider/spd_environ.h
@@ -26,7 +26,4 @@
#define HA_EXTRA_HAS_STARTING_ORDERED_INDEX_SCAN
#define HANDLER_HAS_CAN_USE_FOR_AUTO_INC_INIT
#define SPIDER_UPDATE_ROW_HAS_CONST_NEW_DATA
-#define SPIDER_MDEV_16246
-#define SPIDER_LIKE_FUNC_HAS_GET_NEGATED
-#define SPIDER_I_S_USE_SHOW_FOR_COLUMN
#endif /* SPD_ENVIRON_INCLUDED */
diff --git a/storage/spider/spd_group_by_handler.cc b/storage/spider/spd_group_by_handler.cc
index ca174d42e39..774b9cfa2f8 100644
--- a/storage/spider/spd_group_by_handler.cc
+++ b/storage/spider/spd_group_by_handler.cc
@@ -1237,10 +1237,6 @@ int spider_group_by_handler::init_scan()
spider_db_free_one_result_for_start_next(spider);
- spider->sql_kinds = SPIDER_SQL_KIND_SQL;
- for (link_idx = 0; link_idx < (int) share->link_count; ++link_idx)
- spider->sql_kind[link_idx] = SPIDER_SQL_KIND_SQL;
-
spider->do_direct_update = FALSE;
spider->direct_update_kinds = 0;
spider_get_select_limit(spider, &select_lex, &select_limit, &offset_limit);
@@ -1914,16 +1910,6 @@ group_by_handler *spider_create_group_by_handler(
spider->conn_link_idx, roop_count, share->link_count,
tgt_link_status)
) {
- if (spider_param_use_handler(thd, share->use_handlers[roop_count]))
- {
- DBUG_PRINT("info",("spider direct_join does not support use_handler"));
- if (lock_mode)
- {
- delete fields;
- DBUG_RETURN(NULL);
- }
- continue;
- }
conn = spider->conns[roop_count];
DBUG_PRINT("info",("spider roop_count=%d", roop_count));
DBUG_PRINT("info",("spider conn=%p", conn));
@@ -1999,16 +1985,6 @@ group_by_handler *spider_create_group_by_handler(
tgt_link_status)
) {
DBUG_PRINT("info",("spider roop_count=%d", roop_count));
- if (spider_param_use_handler(thd, share->use_handlers[roop_count]))
- {
- DBUG_PRINT("info",("spider direct_join does not support use_handler"));
- if (lock_mode)
- {
- delete fields;
- DBUG_RETURN(NULL);
- }
- continue;
- }
conn = spider->conns[roop_count];
DBUG_PRINT("info",("spider conn=%p", conn));
if (!fields->check_conn_same_conn(conn))
diff --git a/storage/spider/spd_i_s.cc b/storage/spider/spd_i_s.cc
index 22cd8eb0f15..7db9537136a 100644
--- a/storage/spider/spd_i_s.cc
+++ b/storage/spider/spd_i_s.cc
@@ -41,7 +41,6 @@ static struct st_mysql_storage_engine spider_i_s_info =
{ MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION };
namespace Show {
-#ifdef SPIDER_I_S_USE_SHOW_FOR_COLUMN
static ST_FIELD_INFO spider_i_s_alloc_mem_fields_info[] =
{
Column("ID", ULong(10), NOT_NULL, "id"),
@@ -54,27 +53,6 @@ static ST_FIELD_INFO spider_i_s_alloc_mem_fields_info[] =
Column("FREE_MEM_COUNT", ULonglong(20), NULLABLE, "free_mem_count"),
CEnd()
};
-#else
-static ST_FIELD_INFO spider_i_s_alloc_mem_fields_info[] =
-{
- {"ID", 10, MYSQL_TYPE_LONG, 0, MY_I_S_UNSIGNED, "id", SKIP_OPEN_TABLE},
- {"FUNC_NAME", 64, MYSQL_TYPE_STRING, 0,
- MY_I_S_MAYBE_NULL, "func_name", SKIP_OPEN_TABLE},
- {"FILE_NAME", 64, MYSQL_TYPE_STRING, 0,
- MY_I_S_MAYBE_NULL, "file_name", SKIP_OPEN_TABLE},
- {"LINE_NO", 10, MYSQL_TYPE_LONG, 0,
- MY_I_S_UNSIGNED | MY_I_S_MAYBE_NULL, "line_no", SKIP_OPEN_TABLE},
- {"TOTAL_ALLOC_MEM", 20, MYSQL_TYPE_LONGLONG, 0,
- MY_I_S_UNSIGNED | MY_I_S_MAYBE_NULL, "total_alloc_mem", SKIP_OPEN_TABLE},
- {"CURRENT_ALLOC_MEM", 20, MYSQL_TYPE_LONGLONG, 0,
- MY_I_S_MAYBE_NULL, "current_alloc_mem", SKIP_OPEN_TABLE},
- {"ALLOC_MEM_COUNT", 20, MYSQL_TYPE_LONGLONG, 0,
- MY_I_S_UNSIGNED | MY_I_S_MAYBE_NULL, "alloc_mem_count", SKIP_OPEN_TABLE},
- {"FREE_MEM_COUNT", 20, MYSQL_TYPE_LONGLONG, 0,
- MY_I_S_UNSIGNED | MY_I_S_MAYBE_NULL, "free_mem_count", SKIP_OPEN_TABLE},
- {NULL, 0, MYSQL_TYPE_STRING, 0, 0, NULL, 0}
-};
-#endif
} // namespace Show
static int spider_i_s_alloc_mem_fill_table(
@@ -180,7 +158,6 @@ struct st_maria_plugin spider_i_s_alloc_mem_maria =
extern SPIDER_DBTON spider_dbton[SPIDER_DBTON_SIZE];
namespace Show {
-#ifdef SPIDER_I_S_USE_SHOW_FOR_COLUMN
static ST_FIELD_INFO spider_i_s_wrapper_protocols_fields_info[] =
{
Column("WRAPPER_NAME", Varchar(NAME_CHAR_LEN), NOT_NULL, ""),
@@ -189,16 +166,6 @@ static ST_FIELD_INFO spider_i_s_wrapper_protocols_fields_info[] =
Column("WRAPPER_MATURITY", Varchar(12), NOT_NULL, ""),
CEnd()
};
-#else
-static ST_FIELD_INFO spider_i_s_wrapper_protocols_fields_info[] =
-{
- {"WRAPPER_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE},
- {"WRAPPER_VERSION", 20, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE},
- {"WRAPPER_DESCRIPTION", 65535, MYSQL_TYPE_STRING, 0, 1, 0, SKIP_OPEN_TABLE},
- {"WRAPPER_MATURITY", 12, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE},
- {0, 0, MYSQL_TYPE_STRING, 0, 0, 0, 0}
-};
-#endif
} // namespace Show
static int spider_i_s_wrapper_protocols_fill_table(
diff --git a/storage/spider/spd_include.h b/storage/spider/spd_include.h
index 917b3bfe6ec..897721d3c2e 100644
--- a/storage/spider/spd_include.h
+++ b/storage/spider/spd_include.h
@@ -99,7 +99,6 @@
#define SPIDER_new_THD(A) (new THD(A))
#define SPIDER_order_direction_is_asc(A) (A->direction == ORDER::ORDER_ASC)
-#define SPIDER_HAS_MY_CHARLEN
#define SPIDER_open_temporary_table
#define SPIDER_generate_partition_syntax(A,B,C,D,E,F,G,H) generate_partition_syntax(A,B,C,E,F,G)
@@ -110,7 +109,6 @@
#define SPIDER_read_record_read_record(A) read_record()
#define SPIDER_has_Item_with_subquery
-#define SPIDER_use_LEX_CSTRING_for_KEY_Field_name
#define SPIDER_use_LEX_CSTRING_for_Field_blob_constructor
#define SPIDER_use_LEX_CSTRING_for_database_tablename_alias
#define SPIDER_THD_db_str(A) (A)->db.str
@@ -165,7 +163,7 @@ typedef start_new_trans *SPIDER_Open_tables_backup;
#define SPIDER_TMP_SHARE_CHAR_PTR_COUNT 23
#define SPIDER_TMP_SHARE_UINT_COUNT SPIDER_TMP_SHARE_CHAR_PTR_COUNT
-#define SPIDER_TMP_SHARE_LONG_COUNT 20
+#define SPIDER_TMP_SHARE_LONG_COUNT 19
#define SPIDER_TMP_SHARE_LONGLONG_COUNT 3
#define SPIDER_MEM_CALC_LIST_NUM 314
@@ -900,7 +898,6 @@ typedef struct st_spider_share
longlong *monitoring_bg_interval;
longlong *monitoring_limit;
longlong *monitoring_sid;
- long *use_handlers;
long *connect_timeouts;
long *net_read_timeouts;
long *net_write_timeouts;
@@ -988,7 +985,6 @@ typedef struct st_spider_share
uint monitoring_bg_interval_length;
uint monitoring_limit_length;
uint monitoring_sid_length;
- uint use_handlers_length;
uint connect_timeouts_length;
uint net_read_timeouts_length;
uint net_write_timeouts_length;
@@ -1237,10 +1233,8 @@ typedef struct st_spider_item_hld
{
uint tgt_num;
Item *item;
-#ifdef SPIDER_ITEM_STRING_WITHOUT_SET_STR_WITH_COPY_AND_THDPTR
bool init_mem_root;
MEM_ROOT mem_root;
-#endif
st_spider_item_hld *next;
} SPIDER_ITEM_HLD;
diff --git a/storage/spider/spd_param.cc b/storage/spider/spd_param.cc
index c1b84ed4452..0a5d881749c 100644
--- a/storage/spider/spd_param.cc
+++ b/storage/spider/spd_param.cc
@@ -1966,103 +1966,6 @@ int spider_param_direct_dup_insert(
direct_dup_insert : THDVAR(thd, direct_dup_insert));
}
-static uint spider_udf_table_lock_mutex_count;
-/*
- 1-: mutex count
- */
-static MYSQL_SYSVAR_UINT(
- udf_table_lock_mutex_count,
- spider_udf_table_lock_mutex_count,
- PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
- "Mutex count of table lock for Spider UDFs",
- NULL,
- NULL,
- 20,
- 1,
- 4294967295U,
- 0
-);
-
-uint spider_param_udf_table_lock_mutex_count()
-{
- DBUG_ENTER("spider_param_udf_table_lock_mutex_count");
- DBUG_RETURN(spider_udf_table_lock_mutex_count);
-}
-
-static uint spider_udf_table_mon_mutex_count;
-/*
- 1-: mutex count
- */
-static MYSQL_SYSVAR_UINT(
- udf_table_mon_mutex_count,
- spider_udf_table_mon_mutex_count,
- PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
- "Mutex count of table mon for Spider UDFs",
- NULL,
- NULL,
- 20,
- 1,
- 4294967295U,
- 0
-);
-
-uint spider_param_udf_table_mon_mutex_count()
-{
- DBUG_ENTER("spider_param_udf_table_mon_mutex_count");
- DBUG_RETURN(spider_udf_table_mon_mutex_count);
-}
-
-/*
- 1-:number of rows
- */
-static MYSQL_THDVAR_LONGLONG(
- udf_ds_bulk_insert_rows, /* name */
- PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, /* opt */
- "Number of rows for bulk inserting", /* comment */
- NULL, /* check */
- NULL, /* update */
- -1, /* def */
- -1, /* min */
- 9223372036854775807LL, /* max */
- 0 /* blk */
-);
-
-longlong spider_param_udf_ds_bulk_insert_rows(
- THD *thd,
- longlong udf_ds_bulk_insert_rows
-) {
- DBUG_ENTER("spider_param_udf_ds_bulk_insert_rows");
- DBUG_RETURN(THDVAR(thd, udf_ds_bulk_insert_rows) <= 0 ?
- udf_ds_bulk_insert_rows : THDVAR(thd, udf_ds_bulk_insert_rows));
-}
-
-/*
- -1 :use table parameter
- 0 :drop records
- 1 :insert last table
- 2 :insert first table and loop again
- */
-static MYSQL_THDVAR_INT(
- udf_ds_table_loop_mode, /* name */
- PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, /* opt */
- "Table loop mode if the number of tables in table list are less than the number of result sets", /* comment */
- NULL, /* check */
- NULL, /* update */
- -1, /* def */
- -1, /* min */
- 2, /* max */
- 0 /* blk */
-);
-
-int spider_param_udf_ds_table_loop_mode(
- THD *thd,
- int udf_ds_table_loop_mode
-) {
- DBUG_ENTER("spider_param_udf_ds_table_loop_mode");
- DBUG_RETURN(THDVAR(thd, udf_ds_table_loop_mode) == -1 ?
- udf_ds_table_loop_mode : THDVAR(thd, udf_ds_table_loop_mode));
-}
-
static char *spider_remote_access_charset;
/*
*/
@@ -2295,84 +2198,6 @@ int spider_param_bka_mode(
bka_mode : THDVAR(thd, bka_mode));
}
-static int spider_udf_ct_bulk_insert_interval;
-/*
- -1 : The UDF parameter is adopted.
- 0 or more : Milliseconds.
- */
-static MYSQL_SYSVAR_INT(
- udf_ct_bulk_insert_interval,
- spider_udf_ct_bulk_insert_interval,
- PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED,
- "The interval time between bulk insert and next bulk insert at coping",
- NULL,
- NULL,
- -1,
- -1,
- 2147483647,
- 0
-);
-
-int spider_param_udf_ct_bulk_insert_interval(
- int udf_ct_bulk_insert_interval
-) {
- DBUG_ENTER("spider_param_udf_ct_bulk_insert_interval");
- DBUG_RETURN(spider_udf_ct_bulk_insert_interval < 0 ?
- udf_ct_bulk_insert_interval : spider_udf_ct_bulk_insert_interval);
-}
-
-static longlong spider_udf_ct_bulk_insert_rows;
-/*
- -1,0 : The UDF parameter is adopted.
- 1 or more : Number of rows.
- */
-static MYSQL_SYSVAR_LONGLONG(
- udf_ct_bulk_insert_rows,
- spider_udf_ct_bulk_insert_rows,
- PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED,
- "The number of rows inserted with bulk insert of one time at coping",
- NULL,
- NULL,
- -1,
- -1,
- 9223372036854775807LL,
- 0
-);
-
-longlong spider_param_udf_ct_bulk_insert_rows(
- longlong udf_ct_bulk_insert_rows
-) {
- DBUG_ENTER("spider_param_udf_ct_bulk_insert_rows");
- DBUG_RETURN(spider_udf_ct_bulk_insert_rows <= 0 ?
- udf_ct_bulk_insert_rows : spider_udf_ct_bulk_insert_rows);
-}
-
-/*
- -1 :use table parameter
- 0 :not use
- 1 :use handler
- */
-static MYSQL_THDVAR_INT(
- use_handler, /* name */
- PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, /* opt */
- "Use handler for reading", /* comment */
- NULL, /* check */
- spider_var_deprecated_int, /* update */
- 0, /* def */
- -1, /* min */
- 3, /* max */
- 0 /* blk */
-);
-
-int spider_param_use_handler(
- THD *thd,
- int use_handler
-) {
- DBUG_ENTER("spider_param_use_handler");
- DBUG_RETURN(THDVAR(thd, use_handler) == -1 ?
- use_handler : THDVAR(thd, use_handler));
-}
-
/*
-1 :use table parameter
0 :return error if error
@@ -2531,33 +2356,6 @@ int spider_param_read_only_mode(
read_only_mode : THDVAR(thd, read_only_mode));
}
-
-/*
- -1 :use UDF parameter
- 0 :can not use
- 1 :can use
- */
-static MYSQL_THDVAR_INT(
- udf_ds_use_real_table, /* name */
- PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, /* opt */
- "Use real table for temporary table list", /* comment */
- NULL, /* check */
- NULL, /* update */
- -1, /* def */
- -1, /* min */
- 1, /* max */
- 0 /* blk */
-);
-
-int spider_param_udf_ds_use_real_table(
- THD *thd,
- int udf_ds_use_real_table
-) {
- DBUG_ENTER("spider_param_udf_ds_use_real_table");
- DBUG_RETURN(THDVAR(thd, udf_ds_use_real_table) == -1 ?
- udf_ds_use_real_table : THDVAR(thd, udf_ds_use_real_table));
-}
-
static my_bool spider_general_log;
static MYSQL_SYSVAR_BOOL(
general_log,
@@ -3185,10 +2983,6 @@ static struct st_mysql_sys_var* spider_system_variables[] = {
MYSQL_SYSVAR(local_lock_table),
MYSQL_SYSVAR(use_pushdown_udf),
MYSQL_SYSVAR(direct_dup_insert),
- MYSQL_SYSVAR(udf_table_lock_mutex_count),
- MYSQL_SYSVAR(udf_table_mon_mutex_count),
- MYSQL_SYSVAR(udf_ds_bulk_insert_rows),
- MYSQL_SYSVAR(udf_ds_table_loop_mode),
MYSQL_SYSVAR(remote_access_charset),
MYSQL_SYSVAR(remote_autocommit),
MYSQL_SYSVAR(remote_time_zone),
@@ -3200,16 +2994,12 @@ static struct st_mysql_sys_var* spider_system_variables[] = {
MYSQL_SYSVAR(connect_mutex),
MYSQL_SYSVAR(bka_engine),
MYSQL_SYSVAR(bka_mode),
- MYSQL_SYSVAR(udf_ct_bulk_insert_interval),
- MYSQL_SYSVAR(udf_ct_bulk_insert_rows),
- MYSQL_SYSVAR(use_handler),
MYSQL_SYSVAR(error_read_mode),
MYSQL_SYSVAR(error_write_mode),
MYSQL_SYSVAR(skip_default_condition),
MYSQL_SYSVAR(skip_parallel_search),
MYSQL_SYSVAR(direct_order_limit),
MYSQL_SYSVAR(read_only_mode),
- MYSQL_SYSVAR(udf_ds_use_real_table),
MYSQL_SYSVAR(general_log),
MYSQL_SYSVAR(index_hint_pushdown),
MYSQL_SYSVAR(max_connections),
diff --git a/storage/spider/spd_param.h b/storage/spider/spd_param.h
index 0c5392e302a..6abdca43492 100644
--- a/storage/spider/spd_param.h
+++ b/storage/spider/spd_param.h
@@ -14,6 +14,9 @@
along with this program); if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
+constexpr uint spider_udf_table_lock_mutex_count= 20;
+constexpr uint spider_udf_table_mon_mutex_count= 20;
+
my_bool spider_param_support_xa();
my_bool spider_param_connect_mutex();
uint spider_param_connect_error_interval();
@@ -263,16 +266,6 @@ int spider_param_direct_dup_insert(
THD *thd,
int direct_dup_insert
);
-uint spider_param_udf_table_lock_mutex_count();
-uint spider_param_udf_table_mon_mutex_count();
-longlong spider_param_udf_ds_bulk_insert_rows(
- THD *thd,
- longlong udf_ds_bulk_insert_rows
-);
-int spider_param_udf_ds_table_loop_mode(
- THD *thd,
- int udf_ds_table_loop_mode
-);
char *spider_param_remote_access_charset();
int spider_param_remote_autocommit();
char *spider_param_remote_time_zone();
@@ -293,16 +286,6 @@ int spider_param_bka_mode(
THD *thd,
int bka_mode
);
-int spider_param_udf_ct_bulk_insert_interval(
- int udf_ct_bulk_insert_interval
-);
-longlong spider_param_udf_ct_bulk_insert_rows(
- longlong udf_ct_bulk_insert_rows
-);
-int spider_param_use_handler(
- THD *thd,
- int use_handler
-);
int spider_param_error_read_mode(
THD *thd,
int error_read_mode
@@ -327,10 +310,6 @@ int spider_param_read_only_mode(
THD *thd,
int read_only_mode
);
-int spider_param_udf_ds_use_real_table(
- THD *thd,
- int udf_ds_use_real_table
-);
my_bool spider_param_general_log();
my_bool spider_param_index_hint_pushdown(
THD *thd
diff --git a/storage/spider/spd_ping_table.cc b/storage/spider/spd_ping_table.cc
index fc550f05392..b331a9fec0d 100644
--- a/storage/spider/spd_ping_table.cc
+++ b/storage/spider/spd_ping_table.cc
@@ -97,8 +97,8 @@ SPIDER_TABLE_MON_LIST *spider_get_ping_table_mon_list(
free_root(&mem_root, MYF(0));
}
- mutex_hash = spider_udf_calc_hash(str->c_ptr(),
- spider_param_udf_table_mon_mutex_count());
+ mutex_hash=
+ spider_udf_calc_hash(str->c_ptr(), spider_udf_table_mon_mutex_count);
DBUG_PRINT("info",("spider hash key=%s", str->c_ptr()));
DBUG_PRINT("info",("spider hash key length=%u", str->length()));
hash_value = my_calc_hash(
@@ -224,8 +224,8 @@ int spider_release_ping_table_mon_list(
conv_name_str.q_append(conv_name, conv_name_length);
conv_name_str.q_append(link_idx_str, link_idx_str_length);
- mutex_hash = spider_udf_calc_hash(conv_name_str.c_ptr_safe(),
- spider_param_udf_table_mon_mutex_count());
+ mutex_hash= spider_udf_calc_hash(conv_name_str.c_ptr_safe(),
+ spider_udf_table_mon_mutex_count);
my_hash_value_type hash_value = my_calc_hash(
&spider_udf_table_mon_list_hash[mutex_hash],
(uchar*) conv_name_str.c_ptr(), conv_name_str.length());
diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc
index 4f047effe67..8569027f09c 100644
--- a/storage/spider/spd_table.cc
+++ b/storage/spider/spd_table.cc
@@ -817,8 +817,6 @@ int spider_free_share_alloc(
spider_free(spider_current_trx, share->monitoring_flag, MYF(0));
if (share->monitoring_kind)
spider_free(spider_current_trx, share->monitoring_kind, MYF(0));
- if (share->use_handlers)
- spider_free(spider_current_trx, share->use_handlers, MYF(0));
if (share->connect_timeouts)
spider_free(spider_current_trx, share->connect_timeouts, MYF(0));
if (share->net_read_timeouts)
@@ -2347,8 +2345,6 @@ int spider_parse_connect_info(
option_struct &&
option_struct->remote_table);
SPIDER_PARAM_INT_WITH_MAX("tcm", table_count_mode, 0, 3);
- SPIDER_PARAM_DEPRECATED_WARNING("uhd");
- SPIDER_PARAM_LONG_LIST_WITH_MAX("uhd", use_handlers, 0, 3);
SPIDER_PARAM_INT_WITH_MAX("upu", use_pushdown_udf, 0, 1);
SPIDER_PARAM_INT_WITH_MAX("utc", use_table_charset, 0, 1);
error_num = connect_string_parse.print_param_error();
@@ -2427,8 +2423,6 @@ int spider_parse_connect_info(
SPIDER_PARAM_INT_WITH_MAX("crd_bg_mode", crd_bg_mode, 0, 2);
SPIDER_PARAM_INT_WITH_MAX("sts_bg_mode", sts_bg_mode, 0, 2);
SPIDER_PARAM_LONG_LIST_WITH_MAX("link_status", link_statuses, 0, 3);
- SPIDER_PARAM_DEPRECATED_WARNING("use_handler");
- SPIDER_PARAM_LONG_LIST_WITH_MAX("use_handler", use_handlers, 0, 3);
SPIDER_PARAM_INT_WITH_MAX("casual_read", casual_read, 0, 63);
SPIDER_PARAM_DEPRECATED_WARNING("buffer_size");
SPIDER_PARAM_INT("buffer_size", buffer_size, 0);
@@ -2673,8 +2667,6 @@ int spider_parse_connect_info(
share->all_link_count = share->monitoring_bg_kind_length;
if (share->all_link_count < share->monitoring_bg_interval_length)
share->all_link_count = share->monitoring_bg_interval_length;
- if (share->all_link_count < share->use_handlers_length)
- share->all_link_count = share->use_handlers_length;
if (share->all_link_count < share->connect_timeouts_length)
share->all_link_count = share->connect_timeouts_length;
if (share->all_link_count < share->net_read_timeouts_length)
@@ -2890,11 +2882,6 @@ int spider_parse_connect_info(
share->all_link_count)))
goto error;
if ((error_num = spider_increase_long_list(
- &share->use_handlers,
- &share->use_handlers_length,
- share->all_link_count)))
- goto error;
- if ((error_num = spider_increase_long_list(
&share->connect_timeouts,
&share->connect_timeouts_length,
share->all_link_count)))
@@ -3819,8 +3806,6 @@ int spider_set_connect_info_default(
if (share->monitoring_sid[roop_count] == -1)
share->monitoring_sid[roop_count] = global_system_variables.server_id;
- if (share->use_handlers[roop_count] == -1)
- share->use_handlers[roop_count] = 0;
if (share->connect_timeouts[roop_count] == -1)
share->connect_timeouts[roop_count] = 6;
if (share->net_read_timeouts[roop_count] == -1)
@@ -4401,7 +4386,7 @@ SPIDER_SHARE *spider_create_share(
(uint) (sizeof(*tmp_cardinality_upd) * bitmap_size),
&tmp_table_mon_mutex_bitmap,
(uint) (sizeof(*tmp_table_mon_mutex_bitmap) *
- ((spider_param_udf_table_mon_mutex_count() + 7) / 8)),
+ ((spider_udf_table_mon_mutex_count + 7) / 8)),
NullS))
) {
*error_num = HA_ERR_OUT_OF_MEM;
@@ -4451,7 +4436,7 @@ SPIDER_SHARE *spider_create_share(
buf_pos = strmov(buf_pos, link_idx_str);
*buf_pos = '\0';
spider_set_bit(tmp_table_mon_mutex_bitmap,
- spider_udf_calc_hash(buf, spider_param_udf_table_mon_mutex_count())
+ spider_udf_calc_hash(buf, spider_udf_table_mon_mutex_count)
);
}
@@ -4573,7 +4558,7 @@ SPIDER_SHARE *spider_get_share(
TABLE_SHARE *table_share = table->s;
SPIDER_RESULT_LIST *result_list = &spider->result_list;
uint length, tmp_conn_link_idx = 0, buf_sz;
- char *tmp_name, *tmp_cid;
+ char *tmp_name;
int roop_count;
double sts_interval;
int sts_mode;
@@ -4682,7 +4667,7 @@ SPIDER_SHARE *spider_get_share(
{
pthread_mutex_lock(&share->mutex);
for (roop_count = 0;
- roop_count < (int) spider_param_udf_table_mon_mutex_count();
+ roop_count < (int) spider_udf_table_mon_mutex_count;
roop_count++
) {
if (spider_bit_is_set(share->table_mon_mutex_bitmap, roop_count))
@@ -4714,7 +4699,7 @@ SPIDER_SHARE *spider_get_share(
FALSE, error_num))
) {
for (roop_count = 0;
- roop_count < (int) spider_param_udf_table_mon_mutex_count();
+ roop_count < (int) spider_udf_table_mon_mutex_count;
roop_count++
) {
if (spider_bit_is_set(share->table_mon_mutex_bitmap, roop_count))
@@ -4736,7 +4721,7 @@ SPIDER_SHARE *spider_get_share(
*error_num != HA_ERR_END_OF_FILE
) {
for (roop_count = 0;
- roop_count < (int) spider_param_udf_table_mon_mutex_count();
+ roop_count < (int) spider_udf_table_mon_mutex_count;
roop_count++
) {
if (spider_bit_is_set(share->table_mon_mutex_bitmap, roop_count))
@@ -4769,7 +4754,7 @@ SPIDER_SHARE *spider_get_share(
}
}
for (roop_count = 0;
- roop_count < (int) spider_param_udf_table_mon_mutex_count();
+ roop_count < (int) spider_udf_table_mon_mutex_count;
roop_count++
) {
if (spider_bit_is_set(share->table_mon_mutex_bitmap, roop_count))
@@ -4864,16 +4849,10 @@ SPIDER_SHARE *spider_get_share(
&spider->conns, sizeof(SPIDER_CONN *) * share->link_count,
&spider->conn_link_idx, sizeof(uint) * share->link_count,
&spider->conn_can_fo, sizeof(uchar) * share->link_bitmap_size,
- &spider->sql_kind, sizeof(uint) * share->link_count,
&spider->connection_ids, sizeof(ulonglong) * share->link_count,
&spider->conn_kind, sizeof(uint) * share->link_count,
&spider->db_request_id, sizeof(ulonglong) * share->link_count,
&spider->db_request_phase, sizeof(uchar) * share->link_bitmap_size,
- &spider->m_handler_opened, sizeof(uchar) * share->link_bitmap_size,
- &spider->m_handler_id, sizeof(uint) * share->link_count,
- &spider->m_handler_cid, sizeof(char *) * share->link_count,
- &tmp_cid, sizeof(char) * (SPIDER_SQL_HANDLER_CID_LEN + 1) *
- share->link_count,
&spider->need_mons, sizeof(int) * share->link_count,
&spider->quick_targets, sizeof(void *) * share->link_count,
&result_list->upd_tmp_tbls, sizeof(TABLE *) * share->link_count,
@@ -4883,7 +4862,6 @@ SPIDER_SHARE *spider_get_share(
sizeof(uchar) * share->link_bitmap_size,
&result_list->tmp_table_created,
sizeof(uchar) * share->link_bitmap_size,
- &result_list->sql_kind_backup, sizeof(uint) * share->link_count,
&result_list->casual_read, sizeof(int) * share->link_count,
&spider->dbton_handler,
sizeof(spider_db_handler *) * SPIDER_DBTON_SIZE,
@@ -4903,8 +4881,6 @@ SPIDER_SHARE *spider_get_share(
spider->conn_keys[roop_count] = tmp_name;
*tmp_name = first_byte;
tmp_name += share->conn_keys_lengths[roop_count] + 1;
- spider->m_handler_cid[roop_count] = tmp_cid;
- tmp_cid += SPIDER_SQL_HANDLER_CID_LEN + 1;
result_list->upd_tmp_tbl_prms[roop_count].init();
result_list->upd_tmp_tbl_prms[roop_count].field_count = 1;
spider->conn_kind[roop_count] = SPIDER_CONN_KIND_MYSQL;
@@ -5162,7 +5138,7 @@ SPIDER_SHARE *spider_get_share(
{
pthread_mutex_lock(&share->mutex);
for (roop_count = 0;
- roop_count < (int) spider_param_udf_table_mon_mutex_count();
+ roop_count < (int) spider_udf_table_mon_mutex_count;
roop_count++
) {
if (spider_bit_is_set(share->table_mon_mutex_bitmap, roop_count))
@@ -5195,7 +5171,7 @@ SPIDER_SHARE *spider_get_share(
FALSE, error_num))
) {
for (roop_count = 0;
- roop_count < (int) spider_param_udf_table_mon_mutex_count();
+ roop_count < (int) spider_udf_table_mon_mutex_count;
roop_count++
) {
if (spider_bit_is_set(share->table_mon_mutex_bitmap, roop_count))
@@ -5214,7 +5190,7 @@ SPIDER_SHARE *spider_get_share(
*error_num != HA_ERR_END_OF_FILE
) {
for (roop_count = 0;
- roop_count < (int) spider_param_udf_table_mon_mutex_count();
+ roop_count < (int) spider_udf_table_mon_mutex_count;
roop_count++
) {
if (spider_bit_is_set(share->table_mon_mutex_bitmap, roop_count))
@@ -5244,7 +5220,7 @@ SPIDER_SHARE *spider_get_share(
}
}
for (roop_count = 0;
- roop_count < (int) spider_param_udf_table_mon_mutex_count();
+ roop_count < (int) spider_udf_table_mon_mutex_count;
roop_count++
) {
if (spider_bit_is_set(share->table_mon_mutex_bitmap, roop_count))
@@ -5328,16 +5304,10 @@ SPIDER_SHARE *spider_get_share(
&spider->conns, sizeof(SPIDER_CONN *) * share->link_count,
&spider->conn_link_idx, sizeof(uint) * share->link_count,
&spider->conn_can_fo, sizeof(uchar) * share->link_bitmap_size,
- &spider->sql_kind, sizeof(uint) * share->link_count,
&spider->connection_ids, sizeof(ulonglong) * share->link_count,
&spider->conn_kind, sizeof(uint) * share->link_count,
&spider->db_request_id, sizeof(ulonglong) * share->link_count,
&spider->db_request_phase, sizeof(uchar) * share->link_bitmap_size,
- &spider->m_handler_opened, sizeof(uchar) * share->link_bitmap_size,
- &spider->m_handler_id, sizeof(uint) * share->link_count,
- &spider->m_handler_cid, sizeof(char *) * share->link_count,
- &tmp_cid, sizeof(char) * (SPIDER_SQL_HANDLER_CID_LEN + 1) *
- share->link_count,
&spider->need_mons, sizeof(int) * share->link_count,
&spider->quick_targets, sizeof(void *) * share->link_count,
&result_list->upd_tmp_tbls, sizeof(TABLE *) * share->link_count,
@@ -5347,7 +5317,6 @@ SPIDER_SHARE *spider_get_share(
sizeof(uchar) * share->link_bitmap_size,
&result_list->tmp_table_created,
sizeof(uchar) * share->link_bitmap_size,
- &result_list->sql_kind_backup, sizeof(uint) * share->link_count,
&result_list->casual_read, sizeof(int) * share->link_count,
&spider->dbton_handler,
sizeof(spider_db_handler *) * SPIDER_DBTON_SIZE,
@@ -5364,8 +5333,6 @@ SPIDER_SHARE *spider_get_share(
spider->conn_keys[roop_count] = tmp_name;
*tmp_name = first_byte;
tmp_name += share->conn_keys_lengths[roop_count] + 1;
- spider->m_handler_cid[roop_count] = tmp_cid;
- tmp_cid += SPIDER_SQL_HANDLER_CID_LEN + 1;
result_list->upd_tmp_tbl_prms[roop_count].init();
result_list->upd_tmp_tbl_prms[roop_count].field_count = 1;
spider->conn_kind[roop_count] = SPIDER_CONN_KIND_MYSQL;
@@ -6414,7 +6381,7 @@ int spider_db_done(
}
spider_free(NULL, spider_table_sts_threads, MYF(0));
- for (roop_count = spider_param_udf_table_mon_mutex_count() - 1;
+ for (roop_count= spider_udf_table_mon_mutex_count - 1;
roop_count >= 0; roop_count--)
{
while ((table_mon_list = (SPIDER_TABLE_MON_LIST *) my_hash_element(
@@ -6430,10 +6397,10 @@ int spider_db_done(
spider_udf_table_mon_list_hash[roop_count].array.size_of_element);
my_hash_free(&spider_udf_table_mon_list_hash[roop_count]);
}
- for (roop_count = spider_param_udf_table_mon_mutex_count() - 1;
+ for (roop_count= spider_udf_table_mon_mutex_count - 1;
roop_count >= 0; roop_count--)
pthread_cond_destroy(&spider_udf_table_mon_conds[roop_count]);
- for (roop_count = spider_param_udf_table_mon_mutex_count() - 1;
+ for (roop_count= spider_udf_table_mon_mutex_count - 1;
roop_count >= 0; roop_count--)
pthread_mutex_destroy(&spider_udf_table_mon_mutexes[roop_count]);
spider_free(NULL, spider_udf_table_mon_mutexes, MYF(0));
@@ -6784,17 +6751,17 @@ int spider_db_init(
if (!(spider_udf_table_mon_mutexes = (pthread_mutex_t *)
spider_bulk_malloc(NULL, 53, MYF(MY_WME | MY_ZEROFILL),
&spider_udf_table_mon_mutexes, (uint) (sizeof(pthread_mutex_t) *
- spider_param_udf_table_mon_mutex_count()),
+ spider_udf_table_mon_mutex_count),
&spider_udf_table_mon_conds, (uint) (sizeof(pthread_cond_t) *
- spider_param_udf_table_mon_mutex_count()),
+ spider_udf_table_mon_mutex_count),
&spider_udf_table_mon_list_hash, (uint) (sizeof(HASH) *
- spider_param_udf_table_mon_mutex_count()),
+ spider_udf_table_mon_mutex_count),
NullS))
)
goto error_alloc_mon_mutxes;
for (roop_count = 0;
- roop_count < (int) spider_param_udf_table_mon_mutex_count();
+ roop_count < (int) spider_udf_table_mon_mutex_count;
roop_count++)
{
if (mysql_mutex_init(spd_key_mutex_udf_table_mon,
@@ -6802,7 +6769,7 @@ int spider_db_init(
goto error_init_udf_table_mon_mutex;
}
for (roop_count = 0;
- roop_count < (int) spider_param_udf_table_mon_mutex_count();
+ roop_count < (int) spider_udf_table_mon_mutex_count;
roop_count++)
{
if (mysql_cond_init(spd_key_cond_udf_table_mon,
@@ -6810,7 +6777,7 @@ int spider_db_init(
goto error_init_udf_table_mon_cond;
}
for (roop_count = 0;
- roop_count < (int) spider_param_udf_table_mon_mutex_count();
+ roop_count < (int) spider_udf_table_mon_mutex_count;
roop_count++)
{
if (my_hash_init(PSI_INSTRUMENT_ME, &spider_udf_table_mon_list_hash[roop_count],
@@ -6896,7 +6863,7 @@ error_init_table_sts_threads:
spider_free_sts_threads(&spider_table_sts_threads[roop_count]);
}
spider_free(NULL, spider_table_sts_threads, MYF(0));
- roop_count = spider_param_udf_table_mon_mutex_count() - 1;
+ roop_count= spider_udf_table_mon_mutex_count - 1;
error_init_udf_table_mon_list_hash:
for (; roop_count >= 0; roop_count--)
{
@@ -6906,11 +6873,11 @@ error_init_udf_table_mon_list_hash:
spider_udf_table_mon_list_hash[roop_count].array.size_of_element);
my_hash_free(&spider_udf_table_mon_list_hash[roop_count]);
}
- roop_count = spider_param_udf_table_mon_mutex_count() - 1;
+ roop_count= spider_udf_table_mon_mutex_count - 1;
error_init_udf_table_mon_cond:
for (; roop_count >= 0; roop_count--)
pthread_cond_destroy(&spider_udf_table_mon_conds[roop_count]);
- roop_count = spider_param_udf_table_mon_mutex_count() - 1;
+ roop_count= spider_udf_table_mon_mutex_count - 1;
error_init_udf_table_mon_mutex:
for (; roop_count >= 0; roop_count--)
pthread_mutex_destroy(&spider_udf_table_mon_mutexes[roop_count]);
@@ -7572,16 +7539,14 @@ void spider_set_tmp_share_pointer(
tmp_share->monitoring_kind = &tmp_long[5];
tmp_share->monitoring_bg_flag = &tmp_long[6];
tmp_share->monitoring_bg_kind = &tmp_long[7];
- tmp_share->use_handlers = &tmp_long[13];
- tmp_share->connect_timeouts = &tmp_long[14];
+ tmp_share->connect_timeouts = &tmp_long[13];
+ tmp_share->net_read_timeouts = &tmp_long[14];
tmp_long[13] = -1;
- tmp_share->net_read_timeouts = &tmp_long[15];
+ tmp_share->net_write_timeouts = &tmp_long[15];
tmp_long[14] = -1;
- tmp_share->net_write_timeouts = &tmp_long[16];
- tmp_long[15] = -1;
- tmp_share->access_balances = &tmp_long[17];
- tmp_share->bka_table_name_types = &tmp_long[18];
- tmp_share->strict_group_bys = &tmp_long[19];
+ tmp_share->access_balances = &tmp_long[16];
+ tmp_share->bka_table_name_types = &tmp_long[17];
+ tmp_share->strict_group_bys = &tmp_long[18];
tmp_share->monitoring_limit = &tmp_longlong[0];
tmp_share->monitoring_sid = &tmp_longlong[1];
tmp_share->monitoring_bg_interval = &tmp_longlong[2];
@@ -7638,7 +7603,6 @@ void spider_set_tmp_share_pointer(
tmp_share->monitoring_limit_length = 1;
tmp_share->monitoring_sid_length = 1;
tmp_share->monitoring_bg_interval_length = 1;
- tmp_share->use_handlers_length = 1;
tmp_share->connect_timeouts_length = 1;
tmp_share->net_read_timeouts_length = 1;
tmp_share->net_write_timeouts_length = 1;
@@ -7820,10 +7784,6 @@ longlong spider_split_read_param(
DBUG_RETURN(info_limit);
}
#endif
- if (spider->sql_kinds & SPIDER_SQL_KIND_HANDLER)
- {
- DBUG_RETURN(result_list->semi_split_read_base);
- }
spider_get_select_limit(spider, &select_lex, &select_limit, &offset_limit);
DBUG_PRINT("info",("spider result_list->set_split_read=%s", result_list->set_split_read ? "TRUE" : "FALSE"));
if (!result_list->set_split_read)
@@ -8051,8 +8011,6 @@ bool spider_check_direct_order_limit(
}
DBUG_PRINT("info",("spider SQLCOM_HA_READ=%s",
(spider->wide_handler->sql_command == SQLCOM_HA_READ) ? "TRUE" : "FALSE"));
- DBUG_PRINT("info",("spider sql_kinds with SPIDER_SQL_KIND_HANDLER=%s",
- (spider->sql_kinds & SPIDER_SQL_KIND_HANDLER) ? "TRUE" : "FALSE"));
DBUG_PRINT("info",("spider use_index_merge=%s",
spider->use_index_merge ? "TRUE" : "FALSE"));
DBUG_PRINT("info",("spider is_clone=%s",
@@ -8099,11 +8057,6 @@ bool spider_check_direct_order_limit(
first_check = FALSE;
spider->result_list.direct_distinct = FALSE;
spider->result_list.direct_aggregate = FALSE;
- } else if (spider->sql_kinds & SPIDER_SQL_KIND_HANDLER)
- {
- DBUG_PRINT("info",("spider sql_kinds with SPIDER_SQL_KIND_HANDLER"));
- spider->result_list.direct_distinct = FALSE;
- spider->result_list.direct_aggregate = FALSE;
} else if (
!select_lex->group_list.elements &&
!select_lex->with_sum_func
diff --git a/storage/spider/spd_trx.cc b/storage/spider/spd_trx.cc
index a848de1ece2..09da3c18c48 100644
--- a/storage/spider/spd_trx.cc
+++ b/storage/spider/spd_trx.cc
@@ -1135,7 +1135,7 @@ int spider_free_trx_alloc(
spider_free_tmp_share_alloc(trx->tmp_share);
}
spider_db_udf_free_set_names(trx);
- for (roop_count = spider_param_udf_table_lock_mutex_count() - 1;
+ for (roop_count = spider_udf_table_lock_mutex_count - 1;
roop_count >= 0; roop_count--)
pthread_mutex_destroy(&trx->udf_table_mutexes[roop_count]);
spider_free_trx_ha(trx);
@@ -1188,7 +1188,7 @@ SPIDER_TRX *spider_get_trx(
&tmp_share, (uint) (sizeof(SPIDER_SHARE)),
&tmp_wide_handler, (uint) sizeof(SPIDER_WIDE_HANDLER),
&udf_table_mutexes, (uint) (sizeof(pthread_mutex_t) *
- spider_param_udf_table_lock_mutex_count()),
+ spider_udf_table_lock_mutex_count),
NullS))
)
goto error_alloc_trx;
@@ -1198,7 +1198,7 @@ SPIDER_TRX *spider_get_trx(
trx->udf_table_mutexes = udf_table_mutexes;
for (roop_count = 0;
- roop_count < (int) spider_param_udf_table_lock_mutex_count();
+ roop_count < (int) spider_udf_table_lock_mutex_count;
roop_count++)
{
if (mysql_mutex_init(spd_key_mutex_udf_table,
@@ -3603,8 +3603,7 @@ int spider_check_trx_and_get_conn(
*spider->conn_keys[0] = first_byte;
for (roop_count = 0; roop_count < (int) share->link_count; roop_count++)
{
- if (!spider->handler_opened(roop_count, SPIDER_CONN_KIND_MYSQL))
- spider->conns[roop_count] = NULL;
+ spider->conns[roop_count]= NULL;
}
bool search_link_idx_is_checked = FALSE;
for (