-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-12914: Engine for temporary tables which are implicitly created …
…as RocksDB is substituted silently - There should be no substitution if engine exists, only when doesn't exist - Handling of an error when sys_var `default_tmp_storage_engine` is assigned to unsupported engine. - rocksdb doesn't support embedded server ebfc4e6 so is excluded Closes PR #774 Reviewed by: serg@mariadb.com vicentiu@mariadb.org
- Loading branch information
Showing
8 changed files
with
135 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
mysql-test/suite/sys_vars/r/default_tmp_storage_engine_rocksdb.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# | ||
# MDEV-12914: Engine for temporary tables which are implicitly | ||
# created as RocksDB is substitued siliently with MyIsam | ||
SET default_tmp_storage_engine = engine_doesnt_exist; | ||
ERROR 42000: Unknown storage engine 'engine_doesnt_exist' | ||
SET default_tmp_storage_engine = rocksdb; | ||
ERROR HY000: Table storage engine 'ROCKSDB' does not support the create option 'TEMPORARY' | ||
SET default_tmp_storage_engine = CONCAT('rocks','db'); | ||
ERROR HY000: Table storage engine 'ROCKSDB' does not support the create option 'TEMPORARY' | ||
CREATE TABLE t1 (i int) ENGINE = RocksDB; | ||
SHOW CREATE TABLE t1; | ||
Table Create Table | ||
t1 CREATE TABLE `t1` ( | ||
`i` int(11) DEFAULT NULL | ||
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 | ||
CREATE TEMPORARY TABLE t2 LIKE t1; | ||
ERROR HY000: Table storage engine 'ROCKSDB' does not support the create option 'TEMPORARY' | ||
DROP TABLE t1; | ||
SET default_storage_engine = DEFAULT; | ||
SET default_tmp_storage_engine = DEFAULT; | ||
CREATE TABLE t1 (t int); | ||
SHOW CREATE TABLE t1; | ||
Table Create Table | ||
t1 CREATE TABLE `t1` ( | ||
`t` int(11) DEFAULT NULL | ||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 | ||
CREATE TEMPORARY TABLE t2 LIKE t1; | ||
SHOW CREATE TABLE t2; | ||
Table Create Table | ||
t2 CREATE TEMPORARY TABLE `t2` ( | ||
`t` int(11) DEFAULT NULL | ||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 | ||
DROP TABLE t1, t2; | ||
SET default_storage_engine = rocksdb; | ||
SET default_tmp_storage_engine = default; | ||
CREATE TABLE t1 (t int); | ||
SHOW CREATE TABLE t1; | ||
Table Create Table | ||
t1 CREATE TABLE `t1` ( | ||
`t` int(11) DEFAULT NULL | ||
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 | ||
CREATE TEMPORARY TABLE t2 LIKE t1; | ||
ERROR HY000: Table storage engine 'ROCKSDB' does not support the create option 'TEMPORARY' | ||
CREATE TEMPORARY TABLE t2 (t int); | ||
ERROR HY000: Table storage engine 'ROCKSDB' does not support the create option 'TEMPORARY' | ||
SET default_tmp_storage_engine = aria; | ||
CREATE TEMPORARY TABLE t2 (t int); | ||
DROP TABLE t2; | ||
CREATE TEMPORARY TABLE t2 LIKE t1; | ||
ERROR HY000: Table storage engine 'ROCKSDB' does not support the create option 'TEMPORARY' | ||
DROP TABLE t1; |
52 changes: 52 additions & 0 deletions
52
mysql-test/suite/sys_vars/t/default_tmp_storage_engine_rocksdb.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--echo # | ||
--echo # MDEV-12914: Engine for temporary tables which are implicitly | ||
--echo # created as RocksDB is substitued siliently with MyIsam | ||
|
||
--source include/have_rocksdb.inc | ||
--source include/not_embedded.inc | ||
--error ER_UNKNOWN_STORAGE_ENGINE | ||
SET default_tmp_storage_engine = engine_doesnt_exist; | ||
--error ER_ILLEGAL_HA_CREATE_OPTION | ||
SET default_tmp_storage_engine = rocksdb; | ||
--error ER_ILLEGAL_HA_CREATE_OPTION | ||
SET default_tmp_storage_engine = CONCAT('rocks','db'); | ||
|
||
CREATE TABLE t1 (i int) ENGINE = RocksDB; | ||
SHOW CREATE TABLE t1; | ||
|
||
--error ER_ILLEGAL_HA_CREATE_OPTION | ||
CREATE TEMPORARY TABLE t2 LIKE t1; | ||
|
||
DROP TABLE t1; | ||
|
||
SET default_storage_engine = DEFAULT; | ||
SET default_tmp_storage_engine = DEFAULT; | ||
|
||
CREATE TABLE t1 (t int); | ||
SHOW CREATE TABLE t1; | ||
CREATE TEMPORARY TABLE t2 LIKE t1; | ||
SHOW CREATE TABLE t2; | ||
|
||
DROP TABLE t1, t2; | ||
|
||
SET default_storage_engine = rocksdb; | ||
# setting default or null for tmp SE should use default SE | ||
SET default_tmp_storage_engine = default; | ||
|
||
CREATE TABLE t1 (t int); | ||
SHOW CREATE TABLE t1; | ||
|
||
--error ER_ILLEGAL_HA_CREATE_OPTION | ||
CREATE TEMPORARY TABLE t2 LIKE t1; | ||
|
||
--error ER_ILLEGAL_HA_CREATE_OPTION | ||
CREATE TEMPORARY TABLE t2 (t int); | ||
|
||
SET default_tmp_storage_engine = aria; | ||
CREATE TEMPORARY TABLE t2 (t int); | ||
DROP TABLE t2; | ||
|
||
--error ER_ILLEGAL_HA_CREATE_OPTION | ||
CREATE TEMPORARY TABLE t2 LIKE t1; | ||
|
||
DROP TABLE t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters