Commit b27284db authored by Kentoku's avatar Kentoku Committed by Sachin

MDEV-16279 Spider crashes on CHECKSUM TABLE with spider_quick_mode=3

The fields of the temporary table were not created in create_tmp_table function. Because item->const_item() was true. But the temporary tables that is created by Spider are always used all columns. So Spider should call create_tmp_table function with TMP_TABLE_ALL_COLUMNS flag.
parent 4a28a79e
......@@ -3331,7 +3331,8 @@ TABLE *spider_mk_sys_tmp_table(
goto error_push_item;
if (!(tmp_table = create_tmp_table(thd, tmp_tbl_prm,
i_list, (ORDER*) NULL, FALSE, FALSE, TMP_TABLE_FORCE_MYISAM,
i_list, (ORDER*) NULL, FALSE, FALSE,
(TMP_TABLE_FORCE_MYISAM | TMP_TABLE_ALL_COLUMNS),
HA_POS_ERROR, &SPIDER_empty_string)))
goto error_create_tmp_table;
DBUG_RETURN(tmp_table);
......@@ -3452,7 +3453,8 @@ TABLE *spider_mk_sys_tmp_table_for_result(
goto error_push_item3;
if (!(tmp_table = create_tmp_table(thd, tmp_tbl_prm,
i_list, (ORDER*) NULL, FALSE, FALSE, TMP_TABLE_FORCE_MYISAM,
i_list, (ORDER*) NULL, FALSE, FALSE,
(TMP_TABLE_FORCE_MYISAM | TMP_TABLE_ALL_COLUMNS),
HA_POS_ERROR, &SPIDER_empty_string)))
goto error_create_tmp_table;
DBUG_RETURN(tmp_table);
......
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