Bug #15558 truncate doesn't clear table on archive storage engine tables
Submitted: 7 Dec 2005 19:43 Modified: 22 Jun 2006 14:24
Reporter: shawn hamzee Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.x OS:MacOS (mac osx)
Assigned to: Ramil Kalimullin CPU Architecture:Any

[7 Dec 2005 19:43] shawn hamzee
Description:
when running truncate on a table created by storage engine archive, it does not delete all the contents.

How to repeat:
truncaste table_name;
select count(*) from table_name;
[7 Dec 2005 20:02] Santanu Lahiri
True of Windows Platform as well.  Truncate reported 16 million rown affected.  Next command (Count(*)) showed 16 Million rows still in table
[8 Dec 2005 13:44] Sergei Golubchik
Brian wanted prohibit TRUNCATE on archive tables (BUG#12836)
But in this case ha_archive should return an error, not report a success.
[18 May 2006 12:10] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/6567
[14 Jun 2006 11:19] Alexander Barkov
The patch is ok to push.
[15 Jun 2006 9:55] Ramil Kalimullin
fixed in 4.1.21
[22 Jun 2006 14:24] Paul DuBois
Noted in 4.1.21 changelog.

The ARCHIVE storage engine does not support TRUNCATE TABLE, but the
server was not returning an appropriate error when truncation of an
ARCHIVE table was attempted.