Bug #58800 | "TRUNCATE ibtable;" does not reclaim space when ran with --innodb-file-per-table | ||
---|---|---|---|
Submitted: | 7 Dec 2010 20:04 | Modified: | 6 Jan 2011 20:56 |
Reporter: | Tobias Asplund | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Documentation | Severity: | S3 (Non-critical) |
Version: | 5.0.77 / 5.1.43 | OS: | Any |
Assigned to: | John Russell | CPU Architecture: | Any |
[7 Dec 2010 20:04]
Tobias Asplund
[8 Dec 2010 5:33]
MySQL Verification Team
Tobias, IMHO, this is designed as such. In the innodb plugin, it will return space. Prior to innodb plugin, you must run OPTIMIZE TABLE after truncate. Please, check if my theory work.
[8 Dec 2010 5:35]
MySQL Verification Team
http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-other-changes-truncate.html
[10 Dec 2010 2:37]
Tobias Asplund
Fair enough :) The documentation should probably by updated slightly, though. Thanks.
[14 Dec 2010 20:55]
Sveta Smirnova
Thank you for the feedback. I agree text on http://dev.mysql.com/doc/refman/5.1/en/truncate-table.html is a bit confusing, probably link to http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-other-changes-truncate.html there will work. So verified as documentation issue.
[6 Jan 2011 20:56]
John Russell
Updated the TRUNCATE TABLE section with appropriate references to file_per_table and Plugin.