diff options
author | unknown <pem@mysql.comhem.se> | 2004-01-08 10:55:10 +0100 |
---|---|---|
committer | unknown <pem@mysql.comhem.se> | 2004-01-08 10:55:10 +0100 |
commit | 03b652cfbf9c06a9d22111d1069ae1926b584af4 (patch) | |
tree | e5944432c5e7579250592c62df708df77e63520b /sql/sp_rcontext.cc | |
parent | 027535733de4e0daef066d1c0a2aff489239d94f (diff) | |
download | mariadb-git-03b652cfbf9c06a9d22111d1069ae1926b584af4.tar.gz |
Fix BUG#2260: Handler NOT FOUND declaration does't work in stored procedure
mysql-test/r/sp.result:
Test case for BUG#2260.
mysql-test/t/sp.test:
Test case for BUG#2260.
sql/sp_rcontext.cc:
Detect warning and not found, and exception condition correctly.
Diffstat (limited to 'sql/sp_rcontext.cc')
-rw-r--r-- | sql/sp_rcontext.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sp_rcontext.cc b/sql/sp_rcontext.cc index 225adc74a6b..f328cdb7285 100644 --- a/sql/sp_rcontext.cc +++ b/sql/sp_rcontext.cc @@ -72,15 +72,15 @@ sp_rcontext::find_handler(uint sql_errno) found= 1; break; case sp_cond_type_t::warning: - if (sqlstate[0] == '0' && sqlstate[0] == '1') + if (sqlstate[0] == '0' && sqlstate[1] == '1') found= 1; break; case sp_cond_type_t::notfound: - if (sqlstate[0] == '0' && sqlstate[0] == '2') + if (sqlstate[0] == '0' && sqlstate[1] == '2') found= 1; break; case sp_cond_type_t::exception: - if (sqlstate[0] != '0' || sqlstate[0] > '2') + if (sqlstate[0] != '0' || sqlstate[1] > '2') found= 1; break; } |