Bug #64499 TRUNCATE TABLE is not listed as a statement supported by prepared statements
Submitted: 1 Mar 2012 0:44 Modified: 4 May 2012 18:44
Reporter: William Chiquito Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.x OS:Any
Assigned to: Paul DuBois CPU Architecture:Any
Tags: prepared statements, truncate table

[1 Mar 2012 0:44] William Chiquito
Description:
TRUNCATE TABLE is not listed as a statement supported by prepared statements, however, the following works:

How to repeat:
PREPARE stmt FROM 'TRUNCATE TABLE tb1';
EXECUTE stmt;
DEALLOCATE PREPARE stmt;

Suggested fix:
Included in the documentation.
[1 Mar 2012 5:04] Valeriy Kravchuk
You are right. http://dev.mysql.com/doc/refman/5.5/en/sql-syntax-prepared-statements.html and other similar pages should be updated.
[4 May 2012 18:44] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.