Commit 4d1955d3 authored by KiyoshiTakeda's avatar KiyoshiTakeda Committed by GitHub

MDEV-28225 Disallow user to create Spider temporary table

Creating a temporary table with Spider is non-sense because a Spider
table cannot hold any physical data and it requires an additional
effort to manage even if it is configured correctly.

Set HTON_TEMPORARY_NOT_SUPPORTED to spider_hton->flags.  

Reviewed-by: nayuta.yanagisawa@hey.com
Co-authored-by: d8sk4ueun@gmail.com
parent 27b5d814
......@@ -200,6 +200,14 @@ id
5000
10000
connection master_1;
#
# MDEV-28225 Disallow user to create Spider temporary table
#
connection master_1;
CREATE TEMPORARY TABLE t1 (
a INT
) ENGINE=Spider;
ERROR HY000: Table storage engine 'SPIDER' does not support the create option 'TEMPORARY'
deinit
connection master_1;
......
......@@ -264,6 +264,16 @@ if ($USE_CHILD_GROUP2)
}
--echo #
--echo # MDEV-28225 Disallow user to create Spider temporary table
--echo #
--connection master_1
--error ER_ILLEGAL_HA_CREATE_OPTION
CREATE TEMPORARY TABLE t1 (
a INT
) ENGINE=Spider;
--echo
--echo deinit
--disable_warnings
......
......@@ -6322,7 +6322,7 @@ int spider_db_init(
spider_hton_ptr = spider_hton;
spider_hton->state = SHOW_OPTION_YES;
spider_hton->flags = HTON_NO_FLAGS;
spider_hton->flags = HTON_TEMPORARY_NOT_SUPPORTED;
/* spider_hton->db_type = DB_TYPE_SPIDER; */
/*
spider_hton->savepoint_offset;
......
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