Bug #37515 CHECK TABLE not allowed in stored procedures
Submitted: 19 Jun 2008 6:24 Modified: 19 Jun 2008 10:25
Reporter: Sarah Sproehnle Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S3 (Non-critical)
Version:5.1.25, 5.0, 6.0 OS:Any
Assigned to: CPU Architecture:Any

[19 Jun 2008 6:24] Sarah Sproehnle
Description:
According to the reference manual, CHECK TABLE is allowed in stored procedures since 5.0.17 (http://dev.mysql.com/doc/refman/5.0/en/routine-restrictions.html)  However, this gives an error:

test> CREATE PROCEDURE p()
    -> CHECK TABLE world.City;
ERROR 1314 (0A000): CHECK is not allowed in stored procedures

How to repeat:
use test;
CREATE PROCEDURE p() CHECK TABLE world.City;
[19 Jun 2008 10:25] Sveta Smirnova
Thank you for the report.

Verified as described. This limitation exists in version 5.0.17 as well.

Probably this should be reclassified as documentation bug as OPTIMIZE TABLE works.