Details
-
New Feature
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
Description
In the year 2005 in MySQL 5.0 CHECK TABLE was forbidden in stored routines on the reason that "it can't work"
commit 66b71ca3785fe9f3dd93c2debeafb5cb19e34bdf 3a44dcd1a3b8b9e23200c3527bb43850ffdb8ece
|
Author: unknown <pem@mysql.comhem.se>
|
Date: Wed Mar 30 17:43:52 2005 +0200
|
 |
Fixed BUG#6600: Stored procedure crash after repeated calls with check table.
|
Sedond attempt: Simply disallow CHECK in SPs, since it can't work.
|
Later gradually various limitations were lifted, OPTIMIZE, REPAIR and such were allowed in stored procedures, CHECK was allowed in prepared statements, but on some reason it is still forbidden in stored procedures, both in MariaDB and MySQL (including 8.2).
There were a few feature requests for enabling it in MySQL, they were accepted but no explanation is given why it cannot be done. It is worth checking, maybe there was a reason which no longer exists, or maybe it was simply looked over when other similar limitations were removed.
MariaDB [test]> create procedure pr() check table t; |
ERROR 1314 (0A000): CHECK is not allowed in stored procedures |
MariaDB [test]> prepare stmt from "check table t"; |
Query OK, 0 rows affected (0.001 sec) |
MariaDB [test]> select @@version; |
+----------------------+ |
| @@version |
|
+----------------------+ |
| 11.4.0-MariaDB-debug |
|
+----------------------+ |
1 row in set (0.000 sec) |