I Have a routine that works but is ginving me an unexpected result. I'm trying to debug the sql a routine in the MySQL Editor in MySQL Workbench 5.2.16. I tried taking the SQL from the routine definition and pasting it into the editor. I added a line at the beginning for my input parameter. It will not run because of syntax errors. The DECLARE statements and the IF statements seem to be unacceptable in the editor. Here I have embedded an image of the editor window that shows the syntax checking.
The red squgglies indicate syntax errors.
Is there a reference that states what are acceptable sql statements in the editor?