Issue with labeled BEGIN statement in stored procedure
Posted: Mon 31 Aug 2009 22:35
This is just an annoyance, not any functional issue. In MySQL you can label a BEGIN statement. Doing so causes the dbForge execute to think a parameter is being defined.
use test;
DROP PROCEDURE IF EXISTS test_syntax_issue;
DELIMITER $$
CREATE PROCEDURE test_syntax_issue (in _param_1 int)
SQL SECURITY INVOKER
READS SQL DATA
all_proc:BEGIN
if _param_1 is null then
leave all_proc;
end if;
select 'we can do something here' as 'message';
end;
$$
DELIMITER ;
Thanks for looking into this.
use test;
DROP PROCEDURE IF EXISTS test_syntax_issue;
DELIMITER $$
CREATE PROCEDURE test_syntax_issue (in _param_1 int)
SQL SECURITY INVOKER
READS SQL DATA
all_proc:BEGIN
if _param_1 is null then
leave all_proc;
end if;
select 'we can do something here' as 'message';
end;
$$
DELIMITER ;
Thanks for looking into this.