summaryrefslogtreecommitdiff
path: root/sql/sp_rcontext.cc
diff options
context:
space:
mode:
authorpem@mysql.comhem.se <>2004-01-08 10:55:10 +0100
committerpem@mysql.comhem.se <>2004-01-08 10:55:10 +0100
commitc40e51f28301d216ecfb5fee443c81e0bc326b30 (patch)
treee5944432c5e7579250592c62df708df77e63520b /sql/sp_rcontext.cc
parentcfd97c022e1f13d38780c4e4257f7644a08f3c69 (diff)
downloadmariadb-git-c40e51f28301d216ecfb5fee443c81e0bc326b30.tar.gz
Fix BUG#2260: Handler NOT FOUND declaration does't work in stored procedure
Diffstat (limited to 'sql/sp_rcontext.cc')
-rw-r--r--sql/sp_rcontext.cc6
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;
}