Details
-
Task
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
Since the first days of InnoDB, it is impossible to execute a TRUNCATE TABLE if the table in question is referenced by another table via foreign keys.
While I understand that TRUNCATE TABLE is implemented as DDL, I think it could be safe and also very useful to allow the operation to proceed when the table which references the one to be truncated is empty, instead of forcing users to set FOREIGN_KEY_CHECKS=0.