I'm trying to add a stored procedure to MySQL scheme.
I get an error ERROR: Error 1193: Unknown system variable 'inner_done'
.
Here's the code
I have to note it doesn't matter which handler is declared last. It's name will be in error, while the first one declared is somehow ok. I even tried playing with the plece to declare handler, e.g. create a new BEGIN
-END
block, but the error still gets me, randomly choosing which handfler to display as "unknown"
How to properly declare handlers
311 views Asked by mekkanizer At
1
As commented by @RyanVincent, the error describes
inner_done
was not declare:And wrap your inner loop in a
BEGIN - END
block.Edit: the declare handler statement only defines the handler, so before this is needed the declare statement for the variable which change its value as a condition.