Commit b2c54a9a authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-6523 CONNECT temporary table created

check_engine() was not called for assisted discovery
parent 4ff2a680
......@@ -4372,9 +4372,6 @@ handler *mysql_create_frm_image(THD *thd,
DBUG_RETURN(NULL);
}
if (check_engine(thd, db, table_name, create_info))
DBUG_RETURN(NULL);
set_table_default_charset(thd, create_info, (char*) db);
db_options= create_info->table_options;
......@@ -4780,6 +4777,9 @@ int create_table_impl(THD *thd,
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)
{
/* check that it's used correctly */
......
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'
#
# 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';
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