Commit ddd5449c authored by Yuchen Pei's avatar Yuchen Pei

[fixup] post-merge spider fixup

MDEV-32524: a couple missed magic numbers
MDEV-26247: a couple missed goto statements that could lead to memory leak
parent b97f4c34
......@@ -4786,7 +4786,7 @@ int spider_db_store_result_for_reuse_cursor(
THD *thd = current_thd;
char buf[MAX_FIELD_WIDTH];
spider_string tmp_str(buf, MAX_FIELD_WIDTH, &my_charset_bin);
tmp_str.init_calc_mem(120);
tmp_str.init_calc_mem(SPD_MID_DB_STORE_RESULT_FOR_REUSE_CURSOR_1);
DBUG_PRINT("info",("spider store result to temporary table"));
DBUG_ASSERT(!current->result_tmp_tbl);
......
......@@ -3364,7 +3364,7 @@ int spider_db_mbase::set_loop_check(
spider_string sql_str(sql_buf, sizeof(sql_buf), &my_charset_bin);
DBUG_ENTER("spider_db_mbase::set_loop_check");
DBUG_PRINT("info",("spider this=%p", this));
sql_str.init_calc_mem(270);
sql_str.init_calc_mem(SPD_MID_DB_MBASE_SET_LOOP_CHECK_1);
while ((lcptr = (SPIDER_CONN_LOOP_CHECK *) my_hash_element(
&conn->loop_check_queue, 0)))
{
......
......@@ -1719,8 +1719,7 @@ group_by_handler *spider_create_group_by_handler(
if (spider->dml_init())
{
DBUG_PRINT("info",("spider can not init for dml"));
delete fields;
DBUG_RETURN(NULL);
goto skip_free_fields;
}
for (
roop_count = spider_conn_link_idx_next(share->link_statuses,
......@@ -1792,8 +1791,7 @@ group_by_handler *spider_create_group_by_handler(
if (spider->dml_init())
{
DBUG_PRINT("info",("spider can not init for dml"));
delete fields;
DBUG_RETURN(NULL);
goto skip_free_fields;
}
for (
roop_count = spider_conn_link_idx_next(share->link_statuses,
......
......@@ -377,6 +377,7 @@ enum spider_malloc_id {
SPD_MID_DB_MBASE_RESULT_FETCH_ROW_FROM_TMP_TABLE_3,
SPD_MID_DB_MBASE_ROW_APPEND_ESCAPED_TO_STR_1,
SPD_MID_DB_MBASE_ROW_CLONE_1,
SPD_MID_DB_MBASE_SET_LOOP_CHECK_1,
SPD_MID_DB_MBASE_SET_SQL_MODE_1,
SPD_MID_DB_MBASE_SET_TIME_ZONE_1,
SPD_MID_DB_MBASE_SET_WAIT_TIMEOUT_1,
......@@ -412,6 +413,7 @@ enum spider_malloc_id {
SPD_MID_DB_STORE_RESULT_3,
SPD_MID_DB_STORE_RESULT_4,
SPD_MID_DB_STORE_RESULT_5,
SPD_MID_DB_STORE_RESULT_FOR_REUSE_CURSOR_1,
SPD_MID_DB_UDF_COPY_TABLES_1,
SPD_MID_DB_UDF_PING_TABLE_1,
SPD_MID_DB_UDF_PING_TABLE_2,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment