summaryrefslogtreecommitdiff
path: root/sql/sql_signal.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_signal.cc')
-rw-r--r--sql/sql_signal.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/sql/sql_signal.cc b/sql/sql_signal.cc
index 9da10f5b2f5..ed4d2c23d53 100644
--- a/sql/sql_signal.cc
+++ b/sql/sql_signal.cc
@@ -477,7 +477,7 @@ bool Signal_statement::execute(THD *thd)
bool Resignal_statement::execute(THD *thd)
{
- MYSQL_ERROR *signaled;
+ Sql_condition_info *signaled;
int result= TRUE;
DBUG_ENTER("Resignal_statement::execute");
@@ -490,15 +490,21 @@ bool Resignal_statement::execute(THD *thd)
DBUG_RETURN(result);
}
+ MYSQL_ERROR signaled_err(thd->mem_root);
+ signaled_err.set(signaled->m_sql_errno,
+ signaled->m_sql_state,
+ signaled->m_level,
+ signaled->m_message);
+
if (m_cond == NULL)
{
/* RESIGNAL without signal_value */
- result= raise_condition(thd, signaled);
+ result= raise_condition(thd, &signaled_err);
DBUG_RETURN(result);
}
/* RESIGNAL with signal_value */
- result= raise_condition(thd, signaled);
+ result= raise_condition(thd, &signaled_err);
DBUG_RETURN(result);
}