From 6010662cb328c10b1ef92c3ed43b2b3858c49863 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Wed, 12 Oct 2016 18:16:38 +0400 Subject: MDEV-11037 Diagnostics_area refactoring for user defined exceptions --- sql/sp_rcontext.cc | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'sql/sp_rcontext.cc') 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; -- cgit v1.2.1