summaryrefslogtreecommitdiff
path: root/sql/sql_error.cc
diff options
context:
space:
mode:
authorRucha Deodhar <rucha.deodhar@mariadb.com>2021-09-26 09:54:55 +0530
committerRucha Deodhar <rucha.deodhar@mariadb.com>2021-09-26 20:18:07 +0530
commit5a99eb4878b6b3bb00bef0cc552f707d32b91574 (patch)
tree0ed4bb967da7af7ed295b926c05f875b82321191 /sql/sql_error.cc
parentbe09524b00248393bba5f0b0a9385c17edf76365 (diff)
downloadmariadb-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.cc')
-rw-r--r--sql/sql_error.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_error.cc b/sql/sql_error.cc
index 2c27fd13532..ca9da3dbf89 100644
--- a/sql/sql_error.cc
+++ b/sql/sql_error.cc
@@ -664,7 +664,7 @@ void Warning_info::reserve_space(THD *thd, uint count)
Sql_condition *Warning_info::push_warning(THD *thd,
const Sql_condition_identity *value,
const char *msg,
- ulonglong current_error_index)
+ ulong current_error_index)
{
Sql_condition *cond= NULL;