summaryrefslogtreecommitdiffstats
path: root/storage/spider/spd_table.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/spider/spd_table.cc')
-rw-r--r--storage/spider/spd_table.cc222
1 files changed, 49 insertions, 173 deletions
diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc
index bf101858..208b804f 100644
--- a/storage/spider/spd_table.cc
+++ b/storage/spider/spd_table.cc
@@ -1032,7 +1032,7 @@ int spider_create_string_list(
}
if (!(*string_list = (char**)
- spider_bulk_malloc(spider_current_trx, 37, MYF(MY_WME | MY_ZEROFILL),
+ spider_bulk_malloc(spider_current_trx, SPD_MID_CREATE_STRING_LIST_1, MYF(MY_WME | MY_ZEROFILL),
string_list, (uint) (sizeof(char*) * (*list_length)),
string_length_list, (uint) (sizeof(int) * (*list_length)),
NullS))
@@ -1226,7 +1226,7 @@ int spider_create_long_list(
}
if (!(*long_list = (long*)
- spider_bulk_malloc(spider_current_trx, 38, MYF(MY_WME | MY_ZEROFILL),
+ spider_bulk_malloc(spider_current_trx, SPD_MID_CREATE_LONG_LIST_1, MYF(MY_WME | MY_ZEROFILL),
long_list, (uint) (sizeof(long) * (*list_length)),
NullS))
) {
@@ -1305,7 +1305,7 @@ int spider_create_longlong_list(
}
if (!(*longlong_list = (longlong *)
- spider_bulk_malloc(spider_current_trx, 39, MYF(MY_WME | MY_ZEROFILL),
+ spider_bulk_malloc(spider_current_trx, SPD_MID_CREATE_LONGLONG_LIST_1, MYF(MY_WME | MY_ZEROFILL),
longlong_list, (uint) (sizeof(longlong) * (*list_length)),
NullS))
) {
@@ -1373,7 +1373,7 @@ int spider_increase_string_list(
}
if (!(tmp_str_list = (char**)
- spider_bulk_malloc(spider_current_trx, 40, MYF(MY_WME | MY_ZEROFILL),
+ spider_bulk_malloc(spider_current_trx, SPD_MID_INCREASE_STRING_LIST_1, MYF(MY_WME | MY_ZEROFILL),
&tmp_str_list, (uint) (sizeof(char*) * link_count),
&tmp_length_list, (uint) (sizeof(uint) * link_count),
NullS))
@@ -1436,7 +1436,7 @@ int spider_increase_null_string_list(
DBUG_RETURN(0);
if (!(tmp_str_list = (char**)
- spider_bulk_malloc(spider_current_trx, 247, MYF(MY_WME | MY_ZEROFILL),
+ spider_bulk_malloc(spider_current_trx, SPD_MID_INCREASE_NULL_STRING_LIST_1, MYF(MY_WME | MY_ZEROFILL),
&tmp_str_list, (uint) (sizeof(char*) * link_count),
&tmp_length_list, (uint) (sizeof(uint) * link_count),
NullS))
@@ -1494,7 +1494,7 @@ int spider_increase_long_list(
tmp_long = -1;
if (!(tmp_long_list = (long*)
- spider_bulk_malloc(spider_current_trx, 41, MYF(MY_WME | MY_ZEROFILL),
+ spider_bulk_malloc(spider_current_trx, SPD_MID_INCREASE_LONG_LIST_1, MYF(MY_WME | MY_ZEROFILL),
&tmp_long_list, (uint) (sizeof(long) * link_count),
NullS))
) {
@@ -1539,7 +1539,7 @@ int spider_increase_longlong_list(
tmp_longlong = -1;
if (!(tmp_longlong_list = (longlong*)
- spider_bulk_malloc(spider_current_trx, 42, MYF(MY_WME | MY_ZEROFILL),
+ spider_bulk_malloc(spider_current_trx, SPD_MID_INCREASE_LONGLONG_LIST_1, MYF(MY_WME | MY_ZEROFILL),
&tmp_longlong_list, (uint) (sizeof(longlong) * link_count),
NullS))
) {
@@ -2880,7 +2880,7 @@ int spider_parse_connect_info(
share_alter = &share->alter_table;
share_alter->all_link_count = share->all_link_count;
if (!(share_alter->tmp_server_names = (char **)
- spider_bulk_malloc(spider_current_trx, 43, MYF(MY_WME | MY_ZEROFILL),
+ spider_bulk_malloc(spider_current_trx, SPD_MID_PARSE_CONNECT_INFO_1, MYF(MY_WME | MY_ZEROFILL),
&share_alter->tmp_server_names,
(uint) (sizeof(char *) * share->all_link_count),
&share_alter->tmp_tgt_table_names,
@@ -4025,7 +4025,7 @@ int spider_create_conn_keys(
share->conn_keys_charlen += conn_keys_lengths[roop_count] + 2;
}
if (!(share->conn_keys = (char **)
- spider_bulk_alloc_mem(spider_current_trx, 45,
+ spider_bulk_alloc_mem(spider_current_trx, SPD_MID_CREATE_CONN_KEYS_1,
__func__, __FILE__, __LINE__, MYF(MY_WME | MY_ZEROFILL),
&share->conn_keys, sizeof(char *) * share->all_link_count,
&share->conn_keys_lengths, length_base,
@@ -4218,7 +4218,7 @@ SPIDER_SHARE *spider_create_share(
length = (uint) strlen(table_name);
bitmap_size = spider_bitmap_size(table_share->fields);
if (!(share = (SPIDER_SHARE *)
- spider_bulk_malloc(spider_current_trx, 46, MYF(MY_WME | MY_ZEROFILL),
+ spider_bulk_malloc(spider_current_trx, SPD_MID_CREATE_SHARE_1, MYF(MY_WME | MY_ZEROFILL),
&share, (uint) (sizeof(*share)),
&tmp_name, (uint) (length + 1),
&tmp_static_key_cardinality,
@@ -4263,7 +4263,7 @@ SPIDER_SHARE *spider_create_share(
goto error_init_hint_string;
}
for (roop_count = 0; roop_count < (int) table_share->keys; roop_count++)
- share->key_hint[roop_count].init_calc_mem(95);
+ share->key_hint[roop_count].init_calc_mem(SPD_MID_CREATE_SHARE_2);
DBUG_PRINT("info",("spider share->key_hint=%p", share->key_hint));
if ((*error_num = spider_parse_connect_info(share, table_share,
@@ -4450,7 +4450,7 @@ SPIDER_SHARE *spider_get_share(
((char *) lex_str.str)[lex_str.length] = '\0';
DBUG_PRINT("info",("spider loop check param name=%s", lex_str.str));
loop_check = get_variable(&thd->user_vars, &lex_str, FALSE);
- if (loop_check && loop_check->type == STRING_RESULT)
+ if (loop_check && loop_check->type_handler()->result_type() == STRING_RESULT)
{
lex_str.length = top_share->path.length + spider_unique_id.length + 1;
lex_str.str = loop_check_buf + buf_sz - top_share->path.length -
@@ -4685,7 +4685,7 @@ SPIDER_SHARE *spider_get_share(
}
if (!(spider->conn_keys = (char **)
- spider_bulk_alloc_mem(spider_current_trx, 47,
+ spider_bulk_alloc_mem(spider_current_trx, SPD_MID_GET_SHARE_1,
__func__, __FILE__, __LINE__, MYF(MY_WME | MY_ZEROFILL),
&spider->conn_keys, sizeof(char *) * share->link_count,
&tmp_name, sizeof(char) * share->conn_keys_charlen,
@@ -5140,7 +5140,7 @@ SPIDER_SHARE *spider_get_share(
}
if (!(spider->conn_keys = (char **)
- spider_bulk_alloc_mem(spider_current_trx, 49,
+ spider_bulk_alloc_mem(spider_current_trx, SPD_MID_GET_SHARE_2,
__func__, __FILE__, __LINE__, MYF(MY_WME | MY_ZEROFILL),
&spider->conn_keys, sizeof(char *) * share->link_count,
&tmp_name, sizeof(char) * share->conn_keys_charlen,
@@ -5443,8 +5443,6 @@ int spider_free_share(
) {
DBUG_ENTER("spider_free_share");
pthread_mutex_lock(&spider_tbl_mutex);
- bool do_delete_thd = false;
- THD *thd = current_thd;
if (!--share->use_count)
{
spider_free_sts_thread(share);
@@ -5460,49 +5458,6 @@ int spider_free_share(
spider_table_remove_share_from_crd_thread(share);
spider_free_spider_object_for_share(&share->crd_spider);
}
- if (
- share->sts_init &&
- share->table_share->tmp_table == NO_TMP_TABLE &&
- spider_param_store_last_sts(share->store_last_sts)
- ) {
- if (!thd)
- {
- /* Create a thread for Spider system table update */
- thd = spider_create_thd();
- if (!thd)
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- do_delete_thd = TRUE;
- }
- spider_sys_insert_or_update_table_sts(
- thd,
- share->lgtm_tblhnd_share->table_name,
- share->lgtm_tblhnd_share->table_name_length,
- &share->stat,
- FALSE
- );
- }
- if (
- share->crd_init &&
- share->table_share->tmp_table == NO_TMP_TABLE &&
- spider_param_store_last_crd(share->store_last_crd)
- ) {
- if (!thd)
- {
- /* Create a thread for Spider system table update */
- thd = spider_create_thd();
- if (!thd)
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- do_delete_thd = TRUE;
- }
- spider_sys_insert_or_update_table_crd(
- thd,
- share->lgtm_tblhnd_share->table_name,
- share->lgtm_tblhnd_share->table_name_length,
- share->cardinality,
- share->table_share->fields,
- FALSE
- );
- }
spider_free_share_alloc(share);
my_hash_delete(&spider_open_tables, (uchar*) share);
pthread_mutex_destroy(&share->crd_mutex);
@@ -5511,8 +5466,6 @@ int spider_free_share(
free_root(&share->mem_root, MYF(0));
spider_free(spider_current_trx, share, MYF(0));
}
- if (do_delete_thd)
- spider_destroy_thd(thd);
pthread_mutex_unlock(&spider_tbl_mutex);
DBUG_RETURN(0);
}
@@ -5568,7 +5521,7 @@ SPIDER_LGTM_TBLHND_SHARE *spider_get_lgtm_tblhnd_share(
{
DBUG_PRINT("info",("spider create new lgtm tblhnd share"));
if (!(lgtm_tblhnd_share = (SPIDER_LGTM_TBLHND_SHARE *)
- spider_bulk_malloc(spider_current_trx, 244, MYF(MY_WME | MY_ZEROFILL),
+ spider_bulk_malloc(spider_current_trx, SPD_MID_GET_LGTM_TBLHND_SHARE_1, MYF(MY_WME | MY_ZEROFILL),
&lgtm_tblhnd_share, (uint) (sizeof(*lgtm_tblhnd_share)),
&tmp_name, (uint) (table_name_length + 1),
NullS))
@@ -5654,7 +5607,7 @@ SPIDER_WIDE_SHARE *spider_get_wide_share(
{
DBUG_PRINT("info",("spider create new wide share"));
if (!(wide_share = (SPIDER_WIDE_SHARE *)
- spider_bulk_malloc(spider_current_trx, 51, MYF(MY_WME | MY_ZEROFILL),
+ spider_bulk_malloc(spider_current_trx, SPD_MID_GET_PT_SHARE_1, MYF(MY_WME | MY_ZEROFILL),
&wide_share, sizeof(SPIDER_WIDE_SHARE),
&tmp_name, (uint) (table_share->path.length + 1),
&tmp_cardinality,
@@ -5946,7 +5899,7 @@ int spider_open_all_tables(
spider->wide_handler->lock_type = TL_READ_NO_INSERT;
if (!(share = (SPIDER_SHARE *)
- spider_bulk_malloc(spider_current_trx, 52, MYF(MY_WME | MY_ZEROFILL),
+ spider_bulk_malloc(spider_current_trx, SPD_MID_OPEN_ALL_TABLES_1, MYF(MY_WME | MY_ZEROFILL),
&share, (uint) (sizeof(*share)),
&connect_info,
(uint) (sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT),
@@ -6162,26 +6115,13 @@ int spider_db_done(
void *p
) {
int roop_count;
- bool do_delete_thd;
- THD *thd = current_thd, *tmp_thd;
+ THD *tmp_thd;
SPIDER_CONN *conn;
SPIDER_INIT_ERROR_TABLE *spider_init_error_table;
SPIDER_TABLE_MON_LIST *table_mon_list;
SPIDER_LGTM_TBLHND_SHARE *lgtm_tblhnd_share;
DBUG_ENTER("spider_db_done");
- /* Begin Spider plugin deinit */
- if (thd)
- do_delete_thd = FALSE;
- else
- {
- /* Create a thread for Spider plugin deinit */
- thd = spider_create_thd();
- if (!thd)
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- do_delete_thd = TRUE;
- }
-
for (roop_count = SPIDER_DBTON_SIZE - 1; roop_count >= 0; roop_count--)
{
if (spider_dbton[roop_count].deinit)
@@ -6331,13 +6271,6 @@ int spider_db_done(
));
}
- /* End Spider plugin deinit */
- if (do_delete_thd)
- spider_destroy_thd(thd);
-
-/*
-DBUG_ASSERT(0);
-*/
DBUG_RETURN(0);
}
@@ -6393,6 +6326,17 @@ bool spider_init_system_tables()
DBUG_RETURN(FALSE);
}
+
+/*
+ Spider is typically loaded before ddl_recovery, but DDL statements
+ cannot be executed before ddl_recovery, so we delay system table creation.
+*/
+static int spider_after_ddl_recovery(handlerton *)
+{
+ DBUG_EXECUTE_IF("fail_spider_ddl_recovery_done", return 1;);
+ return spider_init_system_tables();
+}
+
int spider_db_init(
void *p
) {
@@ -6412,17 +6356,8 @@ int spider_db_init(
#ifdef HTON_CAN_READ_CONNECT_STRING_IN_PARTITION
spider_hton->flags |= HTON_CAN_READ_CONNECT_STRING_IN_PARTITION;
#endif
- /* spider_hton->db_type = DB_TYPE_SPIDER; */
- /*
- spider_hton->savepoint_offset;
- spider_hton->savepoint_set = spider_savepoint_set;
- spider_hton->savepoint_rollback = spider_savepoint_rollback;
- spider_hton->savepoint_release = spider_savepoint_release;
- spider_hton->create_cursor_read_view = spider_create_cursor_read_view;
- spider_hton->set_cursor_read_view = spider_set_cursor_read_view;
- spider_hton->close_cursor_read_view = spider_close_cursor_read_view;
- */
spider_hton->panic = spider_panic;
+ spider_hton->signal_ddl_recovery_done= spider_after_ddl_recovery;
spider_hton->close_connection = spider_close_connection;
spider_hton->start_consistent_snapshot = spider_start_consistent_snapshot;
spider_hton->flush_logs = spider_flush_logs;
@@ -6478,10 +6413,6 @@ int spider_db_init(
if (pthread_attr_init(&spider_pt_attr))
goto error_pt_attr_init;
-/*
- if (pthread_attr_setdetachstate(&spider_pt_attr, PTHREAD_CREATE_DETACHED))
- goto error_pt_attr_setstate;
-*/
if (mysql_mutex_init(spd_key_mutex_tbl,
&spider_tbl_mutex, MY_MUTEX_INIT_FAST))
@@ -6535,7 +6466,7 @@ int spider_db_init(
(my_hash_get_key) spider_tbl_get_key, 0, 0))
goto error_open_tables_hash_init;
- spider_alloc_calc_mem_init(spider_open_tables, 143);
+ spider_alloc_calc_mem_init(spider_open_tables, SPD_MID_DB_INIT_1);
spider_alloc_calc_mem(NULL,
spider_open_tables,
spider_open_tables.array.max_element *
@@ -6544,7 +6475,7 @@ int spider_db_init(
(my_hash_get_key) spider_tbl_get_key, 0, 0))
goto error_init_error_tables_hash_init;
- spider_alloc_calc_mem_init(spider_init_error_tables, 144);
+ spider_alloc_calc_mem_init(spider_init_error_tables, SPD_MID_DB_INIT_2);
spider_alloc_calc_mem(NULL,
spider_init_error_tables,
spider_init_error_tables.array.max_element *
@@ -6555,7 +6486,7 @@ int spider_db_init(
)
goto error_open_wide_share_hash_init;
- spider_alloc_calc_mem_init(spider_open_wide_share, 145);
+ spider_alloc_calc_mem_init(spider_open_wide_share, SPD_MID_DB_INIT_3);
spider_alloc_calc_mem(NULL,
spider_open_wide_share,
spider_open_wide_share.array.max_element *
@@ -6565,7 +6496,7 @@ int spider_db_init(
(my_hash_get_key) spider_lgtm_tblhnd_share_hash_get_key, 0, 0))
goto error_lgtm_tblhnd_share_hash_init;
- spider_alloc_calc_mem_init(spider_lgtm_tblhnd_share_hash, 245);
+ spider_alloc_calc_mem_init(spider_lgtm_tblhnd_share_hash, SPD_MID_DB_INIT_4);
spider_alloc_calc_mem(NULL,
spider_lgtm_tblhnd_share_hash,
spider_lgtm_tblhnd_share_hash.array.max_element *
@@ -6579,7 +6510,7 @@ int spider_db_init(
spider_free_ipport_conn, 0))
goto error_ipport_conn__hash_init;
- spider_alloc_calc_mem_init(spider_open_connections, 146);
+ spider_alloc_calc_mem_init(spider_open_connections, SPD_MID_DB_INIT_5);
spider_alloc_calc_mem(NULL,
spider_open_connections,
spider_open_connections.array.max_element *
@@ -6588,7 +6519,7 @@ int spider_db_init(
(my_hash_get_key) spider_allocated_thds_get_key, 0, 0))
goto error_allocated_thds_hash_init;
- spider_alloc_calc_mem_init(spider_allocated_thds, 149);
+ spider_alloc_calc_mem_init(spider_allocated_thds, SPD_MID_DB_INIT_8);
spider_alloc_calc_mem(NULL,
spider_allocated_thds,
spider_allocated_thds.array.max_element *
@@ -6598,14 +6529,14 @@ int spider_db_init(
NULL, 64, 64, MYF(MY_WME)))
goto error_mon_table_cache_array_init;
- spider_alloc_calc_mem_init(spider_mon_table_cache, 165);
+ spider_alloc_calc_mem_init(spider_mon_table_cache, SPD_MID_DB_INIT_9);
spider_alloc_calc_mem(NULL,
spider_mon_table_cache,
spider_mon_table_cache.max_element *
spider_mon_table_cache.size_of_element);
if (!(spider_udf_table_mon_mutexes = (pthread_mutex_t *)
- spider_bulk_malloc(NULL, 53, MYF(MY_WME | MY_ZEROFILL),
+ spider_bulk_malloc(NULL, SPD_MID_DB_INIT_10, MYF(MY_WME | MY_ZEROFILL),
&spider_udf_table_mon_mutexes, (uint) (sizeof(pthread_mutex_t) *
spider_udf_table_mon_mutex_count),
&spider_udf_table_mon_conds, (uint) (sizeof(pthread_cond_t) *
@@ -6641,7 +6572,7 @@ int spider_db_init(
(my_hash_get_key) spider_udf_tbl_mon_list_key, 0, 0))
goto error_init_udf_table_mon_list_hash;
- spider_alloc_calc_mem_init(spider_udf_table_mon_list_hash, 150);
+ spider_alloc_calc_mem_init(spider_udf_table_mon_list_hash, SPD_MID_DB_INIT_11);
spider_alloc_calc_mem(NULL,
spider_udf_table_mon_list_hash,
spider_udf_table_mon_list_hash[roop_count].array.max_element *
@@ -6654,7 +6585,7 @@ int spider_db_init(
}
if (!(spider_table_sts_threads = (SPIDER_THREAD *)
- spider_bulk_malloc(NULL, 256, MYF(MY_WME | MY_ZEROFILL),
+ spider_bulk_malloc(NULL, SPD_MID_DB_INIT_12, MYF(MY_WME | MY_ZEROFILL),
&spider_table_sts_threads, (uint) (sizeof(SPIDER_THREAD) *
spider_param_table_sts_thread_count()),
&spider_table_crd_threads, (uint) (sizeof(SPIDER_THREAD) *
@@ -6826,7 +6757,7 @@ char *spider_create_string(
) {
char *res;
DBUG_ENTER("spider_create_string");
- if (!(res = (char*) spider_malloc(spider_current_trx, 13, length + 1,
+ if (!(res = (char*) spider_malloc(spider_current_trx, SPD_MID_CREATE_STRING_1, length + 1,
MYF(MY_WME))))
DBUG_RETURN(NULL);
memcpy(res, str, length);
@@ -6848,7 +6779,7 @@ char *spider_create_table_name_string(
if (sub_name)
length += sizeof("#SP#") - 1 + strlen(sub_name);
}
- if (!(res = (char*) spider_malloc(spider_current_trx, 14, length + 1,
+ if (!(res = (char*) spider_malloc(spider_current_trx, SPD_MID_CREATE_TABLE_NAME_STRING_1, length + 1,
MYF(MY_WME))))
DBUG_RETURN(NULL);
tmp = strmov(res, table_name);
@@ -6968,7 +6899,6 @@ int spider_get_sts(
) {
int get_type;
int error_num = 0;
- bool need_to_get = TRUE;
DBUG_ENTER("spider_get_sts");
if (
@@ -7004,34 +6934,10 @@ int spider_get_sts(
/* copy */
get_type = 0;
}
- if (
- !share->sts_init &&
- share->table_share->tmp_table == NO_TMP_TABLE &&
- spider_param_load_sts_at_startup(share->load_sts_at_startup) &&
- (!share->init || share->init_error)
- ) {
- error_num = spider_sys_get_table_sts(
- current_thd,
- share->lgtm_tblhnd_share->table_name,
- share->lgtm_tblhnd_share->table_name_length,
- &share->stat,
- FALSE
- );
- if (
- !error_num ||
- (error_num != HA_ERR_KEY_NOT_FOUND && error_num != HA_ERR_END_OF_FILE)
- )
- need_to_get = FALSE;
- }
-
- if (need_to_get)
- {
- if (get_type == 0)
- spider_copy_sts_to_share(share, share->wide_share);
- else {
- error_num = spider_db_show_table_status(spider, link_idx, sts_mode, flag);
- }
- }
+ if (get_type == 0)
+ spider_copy_sts_to_share(share, share->wide_share);
+ else
+ error_num = spider_db_show_table_status(spider, link_idx, sts_mode, flag);
if (get_type >= 2)
pthread_mutex_unlock(&share->wide_share->sts_mutex);
if (error_num)
@@ -7103,7 +7009,6 @@ int spider_get_crd(
) {
int get_type;
int error_num = 0;
- bool need_to_get = TRUE;
DBUG_ENTER("spider_get_crd");
if (
@@ -7139,35 +7044,6 @@ int spider_get_crd(
/* copy */
get_type = 0;
}
- if (
- !share->crd_init &&
- share->table_share->tmp_table == NO_TMP_TABLE &&
- spider_param_load_sts_at_startup(share->load_crd_at_startup)
- ) {
- error_num = spider_sys_get_table_crd(
- current_thd,
- share->lgtm_tblhnd_share->table_name,
- share->lgtm_tblhnd_share->table_name_length,
- share->cardinality,
- table->s->fields,
- FALSE
- );
- if (
- !error_num ||
- (error_num != HA_ERR_KEY_NOT_FOUND && error_num != HA_ERR_END_OF_FILE)
- )
- need_to_get = FALSE;
- }
-
- if (need_to_get)
- {
- if (get_type == 0)
- spider_copy_crd_to_share(share, share->wide_share,
- table->s->fields);
- else {
- error_num = spider_db_show_index(spider, link_idx, table, crd_mode);
- }
- }
if (get_type >= 2)
pthread_mutex_unlock(&share->wide_share->crd_mutex);
if (error_num)
@@ -7284,7 +7160,7 @@ SPIDER_INIT_ERROR_TABLE *spider_get_init_error_table(
DBUG_RETURN(NULL);
}
if (!(spider_init_error_table = (SPIDER_INIT_ERROR_TABLE *)
- spider_bulk_malloc(spider_current_trx, 54, MYF(MY_WME | MY_ZEROFILL),
+ spider_bulk_malloc(spider_current_trx, SPD_MID_GET_INIT_ERROR_TABLE_1, MYF(MY_WME | MY_ZEROFILL),
&spider_init_error_table, (uint) (sizeof(*spider_init_error_table)),
&tmp_name, (uint) (share->table_name_length + 1),
NullS))
@@ -8345,7 +8221,7 @@ int spider_discover_table_structure(
char buf[MAX_FIELD_WIDTH];
spider_string str(buf, sizeof(buf), system_charset_info);
DBUG_ENTER("spider_discover_table_structure");
- str.init_calc_mem(229);
+ str.init_calc_mem(SPD_MID_DISCOVER_TABLE_STRUCTURE_1);
str.length(0);
if (str.reserve(
SPIDER_SQL_CREATE_TABLE_LEN + share->db.length +
@@ -8676,7 +8552,7 @@ int spider_create_spider_object_for_share(
}
DBUG_PRINT("info",("spider spider=%p", (*spider)));
if (!(need_mons = (int *)
- spider_bulk_malloc(spider_current_trx, 255, MYF(MY_WME | MY_ZEROFILL),
+ spider_bulk_malloc(spider_current_trx, SPD_MID_CREATE_SPIDER_OBJECT_FOR_SHARE_2, MYF(MY_WME | MY_ZEROFILL),
&need_mons, (uint) (sizeof(int) * share->link_count),
&conns, (uint) (sizeof(SPIDER_CONN *) * share->link_count),
&conn_link_idx, (uint) (sizeof(uint) * share->link_count),