diff options
author | unknown <pem@mysql.comhem.se> | 2005-04-08 16:05:16 +0200 |
---|---|---|
committer | unknown <pem@mysql.comhem.se> | 2005-04-08 16:05:16 +0200 |
commit | 5f006200d10542da309b9b8c21e810e9da8f637d (patch) | |
tree | cb502e9c674470204bd816c7a7a6a8db7aa9a0dc /sql/sp_rcontext.cc | |
parent | 99c0dd3bc6f55be3e144129025a87a26c9470957 (diff) | |
download | mariadb-git-5f006200d10542da309b9b8c21e810e9da8f637d.tar.gz |
Fixed BUG#7299: Stored procedures: exception handler catches not-found conditions
mysql-test/r/sp-error.result:
Added test case for BUG#7299.
mysql-test/t/sp-error.test:
Added test case for BUG#7299.
sql/sp_rcontext.cc:
Corrected cut&paste error; make sure we only catch actual errors with sqlexception.
Diffstat (limited to 'sql/sp_rcontext.cc')
-rw-r--r-- | sql/sp_rcontext.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sp_rcontext.cc b/sql/sp_rcontext.cc index 9b29c173856..e9271146cad 100644 --- a/sql/sp_rcontext.cc +++ b/sql/sp_rcontext.cc @@ -95,8 +95,8 @@ sp_rcontext::find_handler(uint sql_errno, found= i; break; case sp_cond_type_t::exception: - if ((sqlstate[0] != '0' || sqlstate[1] > '2' || - level == MYSQL_ERROR::WARN_LEVEL_ERROR) && + if ((sqlstate[0] != '0' || sqlstate[1] > '2') && + level == MYSQL_ERROR::WARN_LEVEL_ERROR && (found < 0 || m_handler[found].cond->type > sp_cond_type_t::state)) found= i; break; |