summaryrefslogtreecommitdiff
path: root/sql/sp_pcontext.cc
diff options
context:
space:
mode:
authorunknown <malff@lambda.hsd1.co.comcast.net.>2008-03-21 12:08:04 -0600
committerunknown <malff@lambda.hsd1.co.comcast.net.>2008-03-21 12:08:04 -0600
commit194e43ee68e9f1acb9d1ef380894c4fc4c27f22e (patch)
tree555f43e3e764f45a661e34954e97346de3b0aabc /sql/sp_pcontext.cc
parent6c61454bcd01aaa59bfb991824f96fd3358b05ad (diff)
downloadmariadb-git-194e43ee68e9f1acb9d1ef380894c4fc4c27f22e.tar.gz
Bug#8759 (Stored Procedures: SQLSTATE '00000' should be illegal)
Fixed the parser to reject SQLSTATE '00000', since '00000' is the successful completion condition, and can not be caught by an exception handler in SQL. mysql-test/r/sp-error.result: Bug#8759 (Stored Procedures: SQLSTATE '00000' should be illegal) mysql-test/t/sp-error.test: Bug#8759 (Stored Procedures: SQLSTATE '00000' should be illegal) sql/sp_pcontext.cc: Bug#8759 (Stored Procedures: SQLSTATE '00000' should be illegal)
Diffstat (limited to 'sql/sp_pcontext.cc')
-rw-r--r--sql/sp_pcontext.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sp_pcontext.cc b/sql/sp_pcontext.cc
index 8babbd52ff6..414ea12cd7a 100644
--- a/sql/sp_pcontext.cc
+++ b/sql/sp_pcontext.cc
@@ -51,6 +51,8 @@ sp_cond_check(LEX_STRING *sqlstate)
(c < 'A' || 'Z' < c))
return FALSE;
}
+ if (strcmp(sqlstate->str, "00000") == 0)
+ return FALSE;
return TRUE;
}