summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorRucha Deodhar <rucha.deodhar@mariadb.com>2022-01-22 16:51:21 +0530
committerRucha Deodhar <rucha.deodhar@mariadb.com>2022-01-22 22:23:13 +0530
commit5e04903f592bb425d52f9fa18388e1e64b67497f (patch)
tree8f4a08658455c4759eacb21c9de3c53238ab6c8a /sql/sql_class.h
parent5e6fd4e80435ae6d5994abbff6032c7957713410 (diff)
downloadmariadb-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_class.h')
-rw-r--r--sql/sql_class.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index df9d89b5aff..0dfa7ac6602 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -4277,7 +4277,10 @@ public:
{
DBUG_ENTER("clear_error");
if (get_stmt_da()->is_error() || clear_diagnostics)
+ {
get_stmt_da()->reset_diagnostics_area();
+ get_stmt_da()->reset_current_row_for_warning(0);
+ }
is_slave_error= 0;
if (killed == KILL_BAD_DATA)
reset_killed();