Index: sql/ha_partition.cc =================================================================== --- sql/ha_partition.cc (revision 1) +++ sql/ha_partition.cc (working copy) @@ -4227,7 +4227,26 @@ DBUG_RETURN(0); } +int ha_partition::discard_or_import_tablespace(my_bool discard) +{ + int error; + handler **file; + DBUG_ENTER("ha_partition::discard_or_import_tablespace"); + /* + TRUNCATE also means resetting auto_increment. Hence, reset + it so that it will be initialized again at the next use. + */ + + file= m_file; + do + { + if ((error= (*file)->discard_or_import_tablespace(discard))) + DBUG_RETURN(error); + } while (*(++file)); + DBUG_RETURN(0); +} + /** Manually truncate the table. Index: sql/ha_partition.h =================================================================== --- sql/ha_partition.h (revision 1) +++ sql/ha_partition.h (working copy) @@ -1158,6 +1158,7 @@ bool commit); virtual void notify_table_changed(); + virtual int discard_or_import_tablespace(my_bool discard); /* ------------------------------------------------------------------------- MODULE tablespace support