diff options
author | Alexander Barkov <bar@mariadb.org> | 2016-10-12 18:16:38 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-04-05 15:02:53 +0400 |
commit | 6010662cb328c10b1ef92c3ed43b2b3858c49863 (patch) | |
tree | c0927233efb1168b4018f2a59d099caafc4343de /sql/sp_rcontext.cc | |
parent | ffca1e48301a30ae9c3e9c338293e31914182ed2 (diff) | |
download | mariadb-git-6010662cb328c10b1ef92c3ed43b2b3858c49863.tar.gz |
MDEV-11037 Diagnostics_area refactoring for user defined exceptions
Diffstat (limited to 'sql/sp_rcontext.cc')
-rw-r--r-- | sql/sp_rcontext.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/sql/sp_rcontext.cc b/sql/sp_rcontext.cc index ff5ecc5e6c6..338fe51d251 100644 --- a/sql/sp_rcontext.cc +++ b/sql/sp_rcontext.cc @@ -228,9 +228,7 @@ bool sp_rcontext::handle_sql_condition(THD *thd, if (thd->is_error()) { found_handler= - cur_spi->m_ctx->find_handler(da->get_sqlstate(), - da->sql_errno(), - Sql_condition::WARN_LEVEL_ERROR); + cur_spi->m_ctx->find_handler(da, Sql_condition::WARN_LEVEL_ERROR); if (found_handler) found_condition= da->get_error_condition(); @@ -246,9 +244,7 @@ bool sp_rcontext::handle_sql_condition(THD *thd, { Sql_condition *condition= new (callers_arena->mem_root) Sql_condition(callers_arena->mem_root); - condition->set(da->sql_errno(), da->get_sqlstate(), - Sql_condition::WARN_LEVEL_ERROR, - da->message()); + condition->set(da, Sql_condition::WARN_LEVEL_ERROR, da->message()); found_condition= condition; } } @@ -267,9 +263,7 @@ bool sp_rcontext::handle_sql_condition(THD *thd, c->get_level() == Sql_condition::WARN_LEVEL_NOTE) { const sp_handler *handler= - cur_spi->m_ctx->find_handler(c->get_sqlstate(), - c->get_sql_errno(), - c->get_level()); + cur_spi->m_ctx->find_handler(c, c->get_level()); if (handler) { found_handler= handler; |