diff options
Diffstat (limited to 'mysql-test/r/sp-error.result')
-rw-r--r-- | mysql-test/r/sp-error.result | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result index f8d523484d8..6b36b3bb2bf 100644 --- a/mysql-test/r/sp-error.result +++ b/mysql-test/r/sp-error.result @@ -68,6 +68,42 @@ goto foo; end| ERROR 42000: GOTO with no matching label: foo create procedure foo() +begin +begin +label foo; +end; +goto foo; +end| +ERROR 42000: GOTO with no matching label: foo +create procedure foo() +begin +goto foo; +begin +label foo; +end; +end| +ERROR 42000: GOTO with no matching label: foo +create procedure foo() +begin +begin +goto foo; +end; +begin +label foo; +end; +end| +ERROR 42000: GOTO with no matching label: foo +create procedure foo() +begin +begin +label foo; +end; +begin +goto foo; +end; +end| +ERROR 42000: GOTO with no matching label: foo +create procedure foo() foo: loop foo: loop set @x=2; @@ -288,6 +324,16 @@ declare continue handler for sqlstate '42S99' set x = 1; declare c cursor for select * from t1; end| ERROR 42000: Cursor declaration after handler declaration +create procedure p() +begin +declare continue handler for sqlexception +begin +goto L1; +end; +select field from t1; +label L1; +end| +ERROR HY000: GOTO is not allowed in a stored procedure handler create procedure bug1965() begin declare c cursor for select val from t1 order by valname; |