diff options
-rw-r--r-- | storage/spider/mysql-test/spider/bugfix/r/mdev_27575.result | 8 | ||||
-rw-r--r-- | storage/spider/mysql-test/spider/bugfix/t/mdev_27575.test | 16 | ||||
-rw-r--r-- | storage/spider/spd_table.cc | 23 |
3 files changed, 25 insertions, 22 deletions
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_27575.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_27575.result new file mode 100644 index 00000000000..6f9df39d25e --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_27575.result @@ -0,0 +1,8 @@ +# +# MDEV-27575 SIGSEGV in intern_plugin_lock on SHUTDOWN when setting Spider as default storage engine (temporary or global) +# +INSTALL PLUGIN spider SONAME 'ha_spider.so'; +SET GLOBAL storage_engine=Spider; +UNINSTALL PLUGIN spider; +Warnings: +Warning 1620 Plugin is busy and will be uninstalled on shutdown diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_27575.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_27575.test new file mode 100644 index 00000000000..4b0a9dcfdac --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_27575.test @@ -0,0 +1,16 @@ +--echo # +--echo # MDEV-27575 SIGSEGV in intern_plugin_lock on SHUTDOWN when setting Spider as default storage engine (temporary or global) +--echo # + +INSTALL PLUGIN spider SONAME 'ha_spider.so'; +SET GLOBAL storage_engine=Spider; + +# A workaround for MDEV-27912 +--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.1.expect +--shutdown_server +--source include/wait_until_disconnected.inc +--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.1.expect +--enable_reconnect +--source include/wait_until_connected_again.inc + +UNINSTALL PLUGIN spider; diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc index 20347c4ebad..09e2e1e11a1 100644 --- a/storage/spider/spd_table.cc +++ b/storage/spider/spd_table.cc @@ -6614,26 +6614,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) @@ -6849,14 +6836,6 @@ int spider_db_done( spider_current_alloc_mem[roop_count] ? "NG" : "OK" )); } - - /* End Spider plugin deinit */ - if (do_delete_thd) - spider_destroy_thd(thd); - -/* -DBUG_ASSERT(0); -*/ DBUG_RETURN(0); } |