Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 10.3, 10.4, 10.5
-
Component/s: Information Schema
-
Labels:None
-
Environment: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 |