Commit 51624a94 authored by Sergey Vojtovich's avatar Sergey Vojtovich

Local merge.

parents 640fdb92 f30480a6
...@@ -270,3 +270,7 @@ SUBPARTITION BY KEY (char_column) ...@@ -270,3 +270,7 @@ SUBPARTITION BY KEY (char_column)
SUBPARTITIONS 2 SUBPARTITIONS 2
(PARTITION p1 VALUES LESS THAN (5) ENGINE = MyISAM) */ (PARTITION p1 VALUES LESS THAN (5) ENGINE = MyISAM) */
drop table t1; drop table t1;
CREATE TABLE t1 (a INT) ENGINE=InnoDB
PARTITION BY list(a) (PARTITION p1 VALUES IN (1));
CREATE INDEX i1 ON t1 (a);
DROP TABLE t1;
...@@ -287,3 +287,15 @@ PARTITION BY RANGE (int_column) ...@@ -287,3 +287,15 @@ PARTITION BY RANGE (int_column)
(PARTITION p1 VALUES LESS THAN (5)); (PARTITION p1 VALUES LESS THAN (5));
show create table t1; show create table t1;
drop table t1; drop table t1;
#
# BUG#46483 - drop table of partitioned table may leave extraneous file
# Note: was only repeatable with InnoDB plugin
#
CREATE TABLE t1 (a INT) ENGINE=InnoDB
PARTITION BY list(a) (PARTITION p1 VALUES IN (1));
CREATE INDEX i1 ON t1 (a);
DROP TABLE t1;
let $MYSQLD_DATADIR= `SELECT @@datadir`;
# Before the fix it should show extra file like #sql-2405_2.par
--list_files $MYSQLD_DATADIR/test/ *
...@@ -412,10 +412,10 @@ int rea_create_table(THD *thd, const char *path, ...@@ -412,10 +412,10 @@ int rea_create_table(THD *thd, const char *path,
DBUG_ASSERT(*fn_rext(frm_name)); DBUG_ASSERT(*fn_rext(frm_name));
if (thd->variables.keep_files_on_create) if (thd->variables.keep_files_on_create)
create_info->options|= HA_CREATE_KEEP_FILES; create_info->options|= HA_CREATE_KEEP_FILES;
if (file->ha_create_handler_files(path, NULL, CHF_CREATE_FLAG, create_info)) if (!create_info->frm_only &&
goto err_handler; (file->ha_create_handler_files(path, NULL, CHF_CREATE_FLAG,
if (!create_info->frm_only && ha_create_table(thd, path, db, table_name, create_info) ||
create_info,0)) ha_create_table(thd, path, db, table_name, create_info, 0)))
goto err_handler; goto err_handler;
DBUG_RETURN(0); DBUG_RETURN(0);
......
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