fix RESIGNAL to save and pass the m_row_count too
This commit is contained in:
parent
b73b736506
commit
9bbd328254
@ -1598,7 +1598,7 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
||||
GET DIAGNOSTICS CONDITION 1 @num = ROW_NUMBER, @msg = MESSAGE_TEXT;
|
||||
SELECT @num, @msg;
|
||||
@num @msg
|
||||
1 Duplicate entry '1' for key 'PRIMARY'
|
||||
2 Duplicate entry '1' for key 'PRIMARY'
|
||||
DROP PROCEDURE sp;
|
||||
DROP TABLE t1;
|
||||
# Checking more errors
|
||||
|
@ -111,15 +111,18 @@ public:
|
||||
/// Text message.
|
||||
char *message;
|
||||
|
||||
/** Row number where the condition has happened */
|
||||
ulong m_row_number;
|
||||
|
||||
/// The constructor.
|
||||
///
|
||||
/// @param _sql_condition The SQL condition.
|
||||
/// @param arena Query arena for SP
|
||||
Sql_condition_info(const Sql_condition *_sql_condition,
|
||||
Query_arena *arena)
|
||||
Sql_condition_info(const Sql_condition *_sql_condition, Query_arena *arena)
|
||||
:Sql_condition_identity(*_sql_condition)
|
||||
{
|
||||
message= strdup_root(arena->mem_root, _sql_condition->get_message_text());
|
||||
m_row_number= _sql_condition->m_row_number;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -441,7 +441,7 @@ bool Sql_cmd_resignal::execute(THD *thd)
|
||||
}
|
||||
|
||||
Sql_condition signaled_err(thd->mem_root, *signaled, signaled->message,
|
||||
da->current_row_for_warning());
|
||||
signaled->m_row_number);
|
||||
|
||||
if (m_cond)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user