Commit 96565733 authored by Yuchen Pei's avatar Yuchen Pei

MDEV-27575 Remove thd from spider_db_done

It is unused, and causing segfaults
parent d415f600
#
# MDEV-27575 Spider: UBSAN member access within null pointer of type 'struct st_plugin_int and SIGSEGV in intern_plugin_lock on SHUTDOWN when setting Spider as default storage engine (temporary or global)
#
for master_1
for child2
for child3
SET GLOBAL default_tmp_storage_engine=spider;
# restart
SET GLOBAL default_storage_engine=Spider;
# restart
for master_1
for child2
for child3
#
# end of test mdev_27575
#
--echo #
--echo # MDEV-27575 Spider: UBSAN member access within null pointer of type 'struct st_plugin_int and SIGSEGV in intern_plugin_lock on SHUTDOWN when setting Spider as default storage engine (temporary or global)
--echo #
--disable_query_log
--disable_result_log
--source ../../t/test_init.inc
--enable_result_log
--enable_query_log
SET GLOBAL default_tmp_storage_engine=spider;
--source include/restart_mysqld.inc
SET GLOBAL default_storage_engine=Spider;
--source include/restart_mysqld.inc
--disable_query_log
--disable_result_log
--source ../../t/test_deinit.inc
--enable_result_log
--enable_query_log
--echo #
--echo # end of test mdev_27575
--echo #
......@@ -6451,26 +6451,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)
......@@ -6687,13 +6674,6 @@ int spider_db_done(
));
}
/* End Spider plugin deinit */
if (do_delete_thd)
spider_destroy_thd(thd);
/*
DBUG_ASSERT(0);
*/
DBUG_RETURN(0);
}
......
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