diff options
author | Rucha Deodhar <rucha.deodhar@mariadb.com> | 2021-09-26 09:54:55 +0530 |
---|---|---|
committer | Rucha Deodhar <rucha.deodhar@mariadb.com> | 2021-09-26 20:18:07 +0530 |
commit | 5a99eb4878b6b3bb00bef0cc552f707d32b91574 (patch) | |
tree | 0ed4bb967da7af7ed295b926c05f875b82321191 /sql/sql_error.h | |
parent | be09524b00248393bba5f0b0a9385c17edf76365 (diff) | |
download | mariadb-git-bb-10.7-MDEV-26681.tar.gz |
MDEV-26681: ERROR_INDEX is not available within compound statement blocksbb-10.7-MDEV-26681
Fixed after patch MDEV-26606 because root cause was same.
Analysis: m_current_row_for_warning is reset to 1 during cleanup phase of
stored procedure. When we perform a copy because some statement of procedure
created warning, this reset value is passed to push _warning().
Fix: Add a parameter in relevant functions to pass correct value of
error index and don't use m_current_row_for_warning directly.
Diffstat (limited to 'sql/sql_error.h')
-rw-r--r-- | sql/sql_error.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_error.h b/sql/sql_error.h index 0b7319a1e82..a3e00e8419d 100644 --- a/sql/sql_error.h +++ b/sql/sql_error.h @@ -748,7 +748,7 @@ private: Sql_condition *push_warning(THD *thd, const Sql_condition_identity *identity, const char* msg, - ulonglong current_error_index); + ulong current_error_index); /** Add a new SQL-condition to the current list and increment the respective @@ -1180,7 +1180,7 @@ public: Sql_condition::enum_warning_level level, const Sql_user_condition_identity &ucid, const char* msg, - ulonglong current_error_index) + ulong current_error_index) { Sql_condition_identity tmp(sql_errno_arg, sqlstate, level, ucid); return get_warning_info()->push_warning(thd, &tmp, msg, |