summaryrefslogtreecommitdiff
path: root/mysql-test/r/sp-error.result
diff options
context:
space:
mode:
authorunknown <pem@mysql.comhem.se>2005-04-08 19:58:04 +0200
committerunknown <pem@mysql.comhem.se>2005-04-08 19:58:04 +0200
commitfc5db9351610fed5405df1e26a0e7623d27c5f4d (patch)
tree2e1f1768da174abb00e496a1480fadbefb4e6303 /mysql-test/r/sp-error.result
parent452794235c8ff9f70f20813031a4ce77df6e4d3b (diff)
downloadmariadb-git-fc5db9351610fed5405df1e26a0e7623d27c5f4d.tar.gz
Fixed BUG#9073: Able to declare two handlers for same condition in same scope
mysql-test/r/sp-error.result: Added test case for BUG#9073. mysql-test/t/sp-error.test: Added test case for BUG#9073. sql/share/errmsg.txt: New error message for duplicate condition handlers in stored procedures. sql/sp_pcontext.cc: Keep track on condition handlers in the same block for error checking. sql/sp_pcontext.h: Keep track on condition handlers in the same block for error checking. sql/sql_yacc.yy: Keep track on condition handlers in the same block for error checking.
Diffstat (limited to 'mysql-test/r/sp-error.result')
-rw-r--r--mysql-test/r/sp-error.result41
1 files changed, 41 insertions, 0 deletions
diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result
index 42e45f67d33..b9d33bbe606 100644
--- a/mysql-test/r/sp-error.result
+++ b/mysql-test/r/sp-error.result
@@ -526,4 +526,45 @@ delete from t1|
call bug7299()|
ERROR 02000: No data to FETCH
drop procedure bug7299|
+create procedure bug9073()
+begin
+declare continue handler for sqlexception select 1;
+declare continue handler for sqlexception select 2;
+end|
+ERROR 42000: Duplicate handler declared in the same block
+create procedure bug9073()
+begin
+declare condname1 condition for 1234;
+declare continue handler for condname1 select 1;
+declare exit handler for condname1 select 2;
+end|
+ERROR 42000: Duplicate handler declared in the same block
+create procedure bug9073()
+begin
+declare condname1 condition for sqlstate '42000';
+declare condname2 condition for sqlstate '42000';
+declare exit handler for condname1 select 1;
+declare continue handler for condname2 select 2;
+end|
+ERROR 42000: Duplicate handler declared in the same block
+create procedure bug9073()
+begin
+declare condname1 condition for sqlstate '42000';
+declare exit handler for condname1 select 1;
+declare exit handler for sqlstate '42000' select 2;
+end|
+ERROR 42000: Duplicate handler declared in the same block
+drop procedure if exists bug9073|
+create procedure bug9073()
+begin
+declare condname1 condition for sqlstate '42000';
+declare continue handler for condname1 select 1;
+begin
+declare exit handler for sqlstate '42000' select 2;
+begin
+declare continue handler for sqlstate '42000' select 3;
+end;
+end;
+end|
+drop procedure bug9073|
drop table t1|