summaryrefslogtreecommitdiff
path: root/sql/lex.h
diff options
context:
space:
mode:
authorRucha Deodhar <rucha.deodhar@mariadb.com>2021-09-26 01:30:36 +0530
committerRucha Deodhar <rucha.deodhar@mariadb.com>2021-10-06 23:56:06 +0530
commit479e303ef3e76a984d7885969863157b220c49d0 (patch)
tree0140a8b3510eff36a199a1159bf59e75711df279 /sql/lex.h
parent25921c997e5498c9c0bd479528154d0d33b6c09f (diff)
downloadmariadb-git-479e303ef3e76a984d7885969863157b220c49d0.tar.gz
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.
Diffstat (limited to 'sql/lex.h')
-rw-r--r--sql/lex.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/lex.h b/sql/lex.h
index 4ce88ccc2ee..1ae577328ee 100644
--- a/sql/lex.h
+++ b/sql/lex.h
@@ -567,6 +567,8 @@ SYMBOL symbols[] = {
{ "ROWS", SYM(ROWS_SYM)},
{ "ROWTYPE", SYM(ROWTYPE_MARIADB_SYM)},
{ "ROW_COUNT", SYM(ROW_COUNT_SYM)},
+ /** sql_function and condition_property_name for GET DIAGNOSTICS */
+ { "ROW_NUMBER", SYM(ROW_NUMBER_SYM)},
{ "ROW_FORMAT", SYM(ROW_FORMAT_SYM)},
/** sql_function and condition_property_name for GET DIAGNOSTICS */
{ "ROW_NUMBER", SYM(ROW_NUMBER_SYM)},