I am trying to apply an example nested set model with procedures. I found many of them with this technique, and in the process I found a problem. Every time I call a procedure, I get an unknown table XXX . When I create a procedure, I have no problem at all. Quick example:
CREATE PROCEDURE `sp_getRoleTree` (IN root INT) READS SQL DATA BEGIN DECLARE rows SMALLINT DEFAULT 0; DROP TABLE IF EXISTS ROLE_TREE; CREATE TABLE ROLE_TREE ( nodeID INT PRIMARY KEY ) ENGINE=HEAP; INSERT INTO ROLE_TREE VALUES (root); SELECT * FROM ROLE_TREE; DROP TABLE ROLE_TREE; END;
So my question is: I'm doing something wrong here (this is sample code), can I turn off the warning about whether the code exists, if it is ok? Is there a special loop inside procedures that trigger such warnings?
source share