1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-26606: ROW_NUMBER property value isn't passed from inside a stored

procedure

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().
Hence the output is always 1.
Fix: Add a parameter in relevant functions to pass correct value of
row_number and don't use m_current_row_for_warning directly.
This commit is contained in:
Rucha Deodhar
2021-09-26 01:30:36 +05:30
parent 25921c997e
commit 479e303ef3
6 changed files with 140 additions and 10 deletions

View File

@ -1149,7 +1149,8 @@ Sql_condition* THD::raise_condition(uint sql_errno,
if (likely(!(is_fatal_error && (sql_errno == EE_OUTOFMEMORY ||
sql_errno == ER_OUTOFMEMORY))))
{
cond= da->push_warning(this, sql_errno, sqlstate, level, ucid, msg);
cond= da->push_warning(this, sql_errno, sqlstate, level, ucid, msg,
da->current_row_for_warning());
}
DBUG_RETURN(cond);
}