diff options
author | Alexander Barkov <bar@mariadb.org> | 2016-10-14 16:52:33 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-04-05 15:02:53 +0400 |
commit | 4ed804aa4dc6a03d5a983a0aaf71b39e4702e8f3 (patch) | |
tree | be2115e6c59097079db4c75be877dd7f5a4674d1 /sql/sql_signal.cc | |
parent | 4d3818d30d97e6fbdb5130d73716401e883c7371 (diff) | |
download | mariadb-git-4ed804aa4dc6a03d5a983a0aaf71b39e4702e8f3.tar.gz |
MDEV-10587 sql_mode=ORACLE: User defined exceptions
Diffstat (limited to 'sql/sql_signal.cc')
-rw-r--r-- | sql/sql_signal.cc | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sql/sql_signal.cc b/sql/sql_signal.cc index a4a31207a7d..828149f3035 100644 --- a/sql/sql_signal.cc +++ b/sql/sql_signal.cc @@ -353,13 +353,7 @@ bool Sql_cmd_common_signal::raise_condition(THD *thd, Sql_condition *cond) DBUG_ASSERT((cond->m_level == Sql_condition::WARN_LEVEL_WARN) || (cond->m_level == Sql_condition::WARN_LEVEL_ERROR)); - Sql_condition *raised= NULL; - raised= thd->raise_condition(cond->get_sql_errno(), - cond->get_sqlstate(), - cond->get_level(), - cond->get_message_text()); - if (raised) - raised->copy_opt_attributes(cond); + (void) thd->raise_condition(cond); if (cond->m_level == Sql_condition::WARN_LEVEL_WARN) { @@ -373,7 +367,8 @@ bool Sql_cmd_common_signal::raise_condition(THD *thd, Sql_condition *cond) bool Sql_cmd_signal::execute(THD *thd) { bool result= TRUE; - Sql_condition cond(thd->mem_root); + DBUG_ASSERT(m_cond); + Sql_condition cond(thd->mem_root, m_cond->get_user_condition_identity()); DBUG_ENTER("Sql_cmd_signal::execute"); @@ -427,7 +422,7 @@ bool Sql_cmd_resignal::execute(THD *thd) DBUG_RETURN(result); } - Sql_condition signaled_err(thd->mem_root, signaled, signaled->message); + Sql_condition signaled_err(thd->mem_root, *signaled, signaled->message); if (m_cond) { |