diff options
author | Rucha Deodhar <rucha.deodhar@mariadb.com> | 2022-01-22 16:51:21 +0530 |
---|---|---|
committer | Rucha Deodhar <rucha.deodhar@mariadb.com> | 2022-01-22 22:23:13 +0530 |
commit | 5e04903f592bb425d52f9fa18388e1e64b67497f (patch) | |
tree | 8f4a08658455c4759eacb21c9de3c53238ab6c8a /sql/sql_update.cc | |
parent | 5e6fd4e80435ae6d5994abbff6032c7957713410 (diff) | |
download | mariadb-git-bb-10.7-MDEV-26843.tar.gz |
MDEV-26843: Inconsistent behavior of ROW_NUMBER upon resignalling frombb-10.7-MDEV-26843
function
Analysis: m_current_row_for_warning is reset to 0 earlier so new value '0'
of the counter gets recorded for error condition.
Fix: reset m_current_row_for_warning after other error conditions.
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 539bea958e8..6ed9503c967 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -516,7 +516,8 @@ int mysql_update(THD *thd, table_list->grant.want_privilege= table->grant.want_privilege= (SELECT_ACL & ~table->grant.privilege); #endif - if (setup_fields(thd, Ref_ptr_array(), values, MARK_COLUMNS_READ, 0, NULL, 0)) + if (setup_fields(thd, Ref_ptr_array(), values, MARK_COLUMNS_READ, 0, + NULL, 0, 0)) { free_underlaid_joins(thd, select_lex); DBUG_RETURN(1); /* purecov: inspected */ @@ -2081,7 +2082,7 @@ int multi_update::prepare(List<Item> ¬_used_values, */ int error= setup_fields(thd, Ref_ptr_array(), - *values, MARK_COLUMNS_READ, 0, NULL, 0); + *values, MARK_COLUMNS_READ, 0, NULL, 0, 0); ti.rewind(); while ((table_ref= ti++)) |