Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.3(EOL), 10.4(EOL), 10.5
-
None
-
I'm using MariaDB 10.3.20 but I'm guessing it also affects the latest version...
Description
-- sample to reproduce problem
|
CREATE PROCEDURE test() |
BEGIN
|
SELECT NULL FROM _table; |
END; |
|
SHOW CREATE PROCEDURE test; |
-- `Create Procedure` contains correct table name
|
|
SELECT routine_definition FROM information_schema.routines WHERE routine_schema=DATABASE() AND specific_name='test'; |
-- `routine_definition` contains " SELECT NULL FROM ;" (no table name!) |
I can also confirm this happens for triggers:
CREATE TRIGGER test AFTER INSERT ON anytable FOR EACH ROW |
BEGIN
|
SET @x=(SELECT NULL FROM _table); |
END; |
|
SHOW TRIGGERS;
|
-- `statement` is missing _table
|
|
SELECT action_statement FROM information_schema.triggers WHERE trigger_name='test'; |
-- `ACTION_STATEMENT` is missing _table
|
|
SHOW CREATE trigger test; |
-- SQL Original Statement is correct |