Error
Error Code:
1309
MariaDB Error 1309: Redefining Stored Procedure Label
Description
This error indicates that a label, used for control flow statements like `LOOP` or `WHILE`, has been declared multiple times within the same scope of a stored program (procedure, function, or trigger). It prevents the stored program from being created or executed successfully due to ambiguity in label referencing.
Error Message
Redefining label %s
Known Causes
3 known causesDuplicate Label Definition
Occurs when two or more control flow statements (e.g., `LOOP`, `WHILE`, `REPEAT`) within the same stored program scope are assigned the exact same label name.
Copy-Paste Coding Mistakes
Frequently happens when copying and modifying existing stored procedure code, leading to forgotten renaming of labels that were duplicated in the process.
Unintended Label Overlap
In complex or deeply nested stored programs, a label might be accidentally redefined within a scope where it's already considered active, even if in a different block.
Solutions
Coming SoonGeneral Troubleshooting Tips
- Check the error message carefully for specific details
- Review recent changes that might have caused the error
- Search for the exact error code in the official documentation
- Check log files for additional context
- Try restarting the application or service