From 38e151d155bee0d554b30cabc7f367187a75c459 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Tue, 5 Feb 2019 18:41:33 +0400 Subject: Fix inplace ALTER TABLE to not register tmp table Do not register intermediate tables created by inplace ALTER TABLE in THD::temporary_tables. Regular ALTER TABLE doesn't create .frm for temporary and discoverable tables anymore. For inplace ALTER TABLE moved .frm creation to create_table_for_inplace_alter(). Removed open_in_engine argument of create_and_open_tmp_table() and open_temporary_table(): it became unused after this patch. Part of MDEV-17805 - Remove InnoDB cache for temporary tables. --- sql/unireg.cc | 7 ------- 1 file changed, 7 deletions(-) (limited to 'sql/unireg.cc') diff --git a/sql/unireg.cc b/sql/unireg.cc index 25017400ba1..e56199e707d 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -531,12 +531,6 @@ int rea_create_table(THD *thd, LEX_CUSTRING *frm, { DBUG_ENTER("rea_create_table"); - if (no_ha_create_table) - { - if (writefrm(path, db, table_name, true, frm->str, frm->length)) - goto err_frm; - } - if (thd->variables.keep_files_on_create) create_info->options|= HA_CREATE_KEEP_FILES; @@ -553,7 +547,6 @@ int rea_create_table(THD *thd, LEX_CUSTRING *frm, err_part: file->ha_create_partitioning_metadata(path, NULL, CHF_DELETE_FLAG); -err_frm: deletefrm(path); DBUG_RETURN(1); } /* rea_create_table */ -- cgit v1.2.1