summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNayuta Yanagisawa <nayuta.yanagisawa@hey.com>2022-01-24 15:01:32 +0900
committerNayuta Yanagisawa <nayuta.yanagisawa@hey.com>2022-02-22 15:49:08 +0900
commitb283ef3090acc2b9455271030c958ac01270a60d (patch)
tree510d1d4901c5b67cc0be9b11e693a8de57c96514
parentc76bdc57ffb08043e7b509a188d4626d0f3063c9 (diff)
downloadmariadb-git-b283ef3090acc2b9455271030c958ac01270a60d.tar.gz
MDEV-27575 SIGSEGV in intern_plugin_lock on SHUTDOWN when setting Spider as default tmp SEbb-10.7-MDEV-27575
Setting Spider as the default tmp storage engine results in the server crash at its shutdown. Spider cannot maintain any physical data, and thus setting it as the default tmp storage engine is non-sense. We simply prohibit this configuration by setting HTON_TEMPORARY_NOT_SUPPORTED to Spider.
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_27575.result3
-rw-r--r--storage/spider/mysql-test/spider/r/spider3_fixes.result3
-rw-r--r--storage/spider/mysql-test/spider/t/spider3_fixes.test6
-rw-r--r--storage/spider/spd_table.cc2
4 files changed, 13 insertions, 1 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..d1beaa640e5
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_27575.result
@@ -0,0 +1,3 @@
+INSTALL PLUGIN spider SONAME 'ha_spider.so';
+SET GLOBAL default_tmp_storage_engine=spider;
+ERROR HY000: Table storage engine 'SPIDER' does not support the create option 'TEMPORARY'
diff --git a/storage/spider/mysql-test/spider/r/spider3_fixes.result b/storage/spider/mysql-test/spider/r/spider3_fixes.result
index d6aec25bfc1..70d26f64593 100644
--- a/storage/spider/mysql-test/spider/r/spider3_fixes.result
+++ b/storage/spider/mysql-test/spider/r/spider3_fixes.result
@@ -200,6 +200,9 @@ id
5000
10000
connection master_1;
+connection master_1;
+SET GLOBAL default_tmp_storage_engine=spider;
+ERROR HY000: Table storage engine 'SPIDER' does not support the create option 'TEMPORARY'
deinit
connection master_1;
diff --git a/storage/spider/mysql-test/spider/t/spider3_fixes.test b/storage/spider/mysql-test/spider/t/spider3_fixes.test
index 64d3b657ae8..2d8ec78f546 100644
--- a/storage/spider/mysql-test/spider/t/spider3_fixes.test
+++ b/storage/spider/mysql-test/spider/t/spider3_fixes.test
@@ -266,6 +266,12 @@ if ($USE_CHILD_GROUP2)
}
+--echo # MDEV-27575 SIGSEGV in intern_plugin_lock on SHUTDOWN when setting Spider as default tmp SE
+--connection master_1
+--error ER_ILLEGAL_HA_CREATE_OPTION
+SET GLOBAL default_tmp_storage_engine=spider;
+
+
--echo
--echo deinit
--disable_warnings
diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc
index 04333d973a3..b1f010c7fc4 100644
--- a/storage/spider/spd_table.cc
+++ b/storage/spider/spd_table.cc
@@ -7368,7 +7368,7 @@ int spider_db_init(
DBUG_ENTER("spider_db_init");
spider_hton_ptr = spider_hton;
- spider_hton->flags = HTON_NO_FLAGS;
+ spider_hton->flags = HTON_TEMPORARY_NOT_SUPPORTED;
#ifdef HTON_CAN_READ_CONNECT_STRING_IN_PARTITION
spider_hton->flags |= HTON_CAN_READ_CONNECT_STRING_IN_PARTITION;
#endif