mirror of
https://github.com/MariaDB/server.git
synced 2025-02-14 17:35:35 +01:00
MDEV-6523 CONNECT temporary table created
check_engine() was not called for assisted discovery
This commit is contained in:
parent
4ff2a680ab
commit
b2c54a9a69
3 changed files with 22 additions and 3 deletions
|
@ -4372,9 +4372,6 @@ handler *mysql_create_frm_image(THD *thd,
|
||||||
DBUG_RETURN(NULL);
|
DBUG_RETURN(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_engine(thd, db, table_name, create_info))
|
|
||||||
DBUG_RETURN(NULL);
|
|
||||||
|
|
||||||
set_table_default_charset(thd, create_info, (char*) db);
|
set_table_default_charset(thd, create_info, (char*) db);
|
||||||
|
|
||||||
db_options= create_info->table_options;
|
db_options= create_info->table_options;
|
||||||
|
@ -4780,6 +4777,9 @@ int create_table_impl(THD *thd,
|
||||||
|
|
||||||
THD_STAGE_INFO(thd, stage_creating_table);
|
THD_STAGE_INFO(thd, stage_creating_table);
|
||||||
|
|
||||||
|
if (check_engine(thd, orig_db, orig_table_name, create_info))
|
||||||
|
goto err;
|
||||||
|
|
||||||
if (create_table_mode == C_ASSISTED_DISCOVERY)
|
if (create_table_mode == C_ASSISTED_DISCOVERY)
|
||||||
{
|
{
|
||||||
/* check that it's used correctly */
|
/* check that it's used correctly */
|
||||||
|
|
6
storage/connect/mysql-test/connect/r/temporary.result
Normal file
6
storage/connect/mysql-test/connect/r/temporary.result
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE TEMPORARY TABLE t1 (a int not null)
|
||||||
|
ENGINE=CONNECT table_type=MYSQL CONNECTION='mysql://root@127.0.0.1/test/t2';
|
||||||
|
ERROR HY000: Table storage engine 'CONNECT' does not support the create option 'TEMPORARY'
|
||||||
|
CREATE TEMPORARY TABLE t1
|
||||||
|
ENGINE=CONNECT table_type=MYSQL CONNECTION='mysql://root@127.0.0.1/test/t2';
|
||||||
|
ERROR HY000: Table storage engine 'CONNECT' does not support the create option 'TEMPORARY'
|
13
storage/connect/mysql-test/connect/t/temporary.test
Normal file
13
storage/connect/mysql-test/connect/t/temporary.test
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
#
|
||||||
|
# CONNECT tables cannot be TEMPORARY
|
||||||
|
#
|
||||||
|
|
||||||
|
--error ER_ILLEGAL_HA_CREATE_OPTION
|
||||||
|
CREATE TEMPORARY TABLE t1 (a int not null)
|
||||||
|
ENGINE=CONNECT table_type=MYSQL CONNECTION='mysql://root@127.0.0.1/test/t2';
|
||||||
|
|
||||||
|
# also with assisted discovery
|
||||||
|
--error ER_ILLEGAL_HA_CREATE_OPTION
|
||||||
|
CREATE TEMPORARY TABLE t1
|
||||||
|
ENGINE=CONNECT table_type=MYSQL CONNECTION='mysql://root@127.0.0.1/test/t2';
|
||||||
|
|
Loading…
Add table
Reference in a new issue