mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Get rid of rea_create_table()
Moved rea_create_table() to the sole caller. Also ha_create_partitioning_metadata(CHF_CREATE_FLAG) does cleanup on error now. Part of MDEV-17805 - Remove InnoDB cache for temporary tables.
This commit is contained in:
@ -5031,9 +5031,22 @@ int create_table_impl(THD *thd, const LEX_CSTRING &orig_db,
|
||||
*/
|
||||
if (!file || thd->is_error())
|
||||
goto err;
|
||||
if (rea_create_table(thd, frm, path, db.str, table_name.str, create_info,
|
||||
file, frm_only))
|
||||
|
||||
if (thd->variables.keep_files_on_create)
|
||||
create_info->options|= HA_CREATE_KEEP_FILES;
|
||||
|
||||
if (file->ha_create_partitioning_metadata(path, NULL, CHF_CREATE_FLAG))
|
||||
goto err;
|
||||
|
||||
if (!frm_only)
|
||||
{
|
||||
if (ha_create_table(thd, path, db.str, table_name.str, create_info, frm))
|
||||
{
|
||||
file->ha_create_partitioning_metadata(path, NULL, CHF_DELETE_FLAG);
|
||||
deletefrm(path);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
create_info->table= 0;
|
||||
|
Reference in New Issue
Block a user