Commit 9d2420b9 authored by Anel Husakovic's avatar Anel Husakovic Committed by Vicențiu Ciorbaru

MDEV-12914: Disable silently call of myisam

parent 1cc1d042
......@@ -10461,14 +10461,10 @@ bool check_engine(THD *thd, const char *db_name,
if (create_info->tmp_table() &&
ha_check_storage_engine_flag(*new_engine, HTON_TEMPORARY_NOT_SUPPORTED))
{
if (create_info->used_fields & HA_CREATE_USED_ENGINE)
{
my_error(ER_ILLEGAL_HA_CREATE_OPTION, MYF(0),
hton_name(*new_engine)->str, "TEMPORARY");
*new_engine= 0;
DBUG_RETURN(true);
}
*new_engine= myisam_hton;
my_error(ER_ILLEGAL_HA_CREATE_OPTION, MYF(0),
hton_name(*new_engine)->str, "TEMPORARY");
*new_engine= 0;
DBUG_RETURN(true);
}
DBUG_RETURN(false);
......
......@@ -18,7 +18,12 @@ t2 CREATE TABLE `t2` (
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1
CREATE TEMPORARY TABLE t2 (a INT PRIMARY KEY) ENGINE=rocksdb;
ERROR HY000: Table storage engine 'ROCKSDB' does not support the create option 'TEMPORARY'
#
# MDEV-12914: Engine for temporary tables which are implicitly
# created as RocksDB is substitued siliently with MyIsam
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 LIKE t1;
ERROR HY000: Table storage engine 'ROCKSDB' does not support the create option 'TEMPORARY'
DROP TABLE IF EXISTS t1;
SET default_storage_engine = rocksdb;
CREATE TABLE t1 (a INT PRIMARY KEY);
......@@ -41,6 +46,8 @@ a
1
2
FLUSH LOGS;
CREATE TEMPORARY TABLE t2;
ERROR HY000: Table storage engine 'ROCKSDB' does not support the create option 'TEMPORARY'
DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 INT,c2 INT,c3 INT,c4 INT,c5 INT,c6 INT,c7 INT,c8 INT,c9 INT,
c10 INT,c11 INT,c12 INT,c13 INT,c14 INT,c15 INT,c16 INT,c17 INT,
......
......@@ -32,19 +32,15 @@ SHOW CREATE TABLE t2;
--error ER_ILLEGAL_HA_CREATE_OPTION
CREATE TEMPORARY TABLE t2 (a INT PRIMARY KEY) ENGINE=rocksdb;
--disable_parsing
--echo #
--echo # MDEV-12914: Engine for temporary tables which are implicitly
--echo # created as RocksDB is substitued siliently with MyIsam
DROP TABLE t2;
--error ER_ILLEGAL_HA_CREATE_OPTION
CREATE TEMPORARY TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
DROP TEMPORARY TABLE t2;
--enable_parsing
DROP TABLE t2;
DROP TABLE IF EXISTS t1;
# CREATE .. AS SELECT
......@@ -65,6 +61,10 @@ SELECT * FROM t1;
# Just to add FLUSH LOGS into the mix while we are in the most common test
FLUSH LOGS;
# Test temporary tables with default engine, part of MDEV-12914
--error ER_ILLEGAL_HA_CREATE_OPTION
CREATE TEMPORARY TABLE t2;
DROP TABLE IF EXISTS t1;
# CREATE TABLE with MAX_INDEXES (64) keys and no primary key
......
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