diff options
author | Sergey Vojtovich <svoj@sun.com> | 2009-09-02 16:19:28 +0500 |
---|---|---|
committer | Sergey Vojtovich <svoj@sun.com> | 2009-09-02 16:19:28 +0500 |
commit | 32c7efa6b420b09e00d42b99f29a790064694d3b (patch) | |
tree | 32a6ee72d3f68b14dab2d27bca907fa313df7f2e /sql/unireg.cc | |
parent | a00ba9ebea078f7dc12f7cd298782d1ada4bb4e9 (diff) | |
download | mariadb-git-32c7efa6b420b09e00d42b99f29a790064694d3b.tar.gz |
BUG#46483 - drop table of partitioned table may leave
extraneous file
Online/fast ALTER TABLE of a partitioned table may leave
temporary file in database directory.
Fixed by removing unnecessary call to
handler::ha_create_handler_files(), which was creating
partitioning definition file.
mysql-test/r/partition_innodb.result:
A test case for BUG#46483.
mysql-test/t/partition_innodb.test:
A test case for BUG#46483.
sql/unireg.cc:
Do not call ha_create_handler_files() when we were requested
to create only dot-frm file.
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r-- | sql/unireg.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc index 68a352e4a44..60674b8390b 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -412,10 +412,10 @@ int rea_create_table(THD *thd, const char *path, DBUG_ASSERT(*fn_rext(frm_name)); if (thd->variables.keep_files_on_create) create_info->options|= HA_CREATE_KEEP_FILES; - if (file->ha_create_handler_files(path, NULL, CHF_CREATE_FLAG, create_info)) - goto err_handler; - if (!create_info->frm_only && ha_create_table(thd, path, db, table_name, - create_info,0)) + if (!create_info->frm_only && + (file->ha_create_handler_files(path, NULL, CHF_CREATE_FLAG, + create_info) || + ha_create_table(thd, path, db, table_name, create_info, 0))) goto err_handler; DBUG_RETURN(0); |