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

MDEV-26841: ROW_NUMBER is not set and differs from the message upon

ER_WRONG_VALUE_COUNT_ON_ROW for the 1st row

Analysis: Current row for warning does not increment for prepare phase
Fix: Increment current row for warning if number of fields in the table and
row values dont match and number of values in rows is greater than number
of fields
This commit is contained in:
Rucha Deodhar
2021-10-17 16:24:31 +05:30
committed by Sergei Golubchik
parent 635be990ca
commit 797bd73cfa
3 changed files with 41 additions and 0 deletions

View File

@ -229,6 +229,7 @@ static int check_insert_fields(THD *thd, TABLE_LIST *table_list,
}
if (values.elements != table->s->visible_fields)
{
thd->get_stmt_da()->reset_current_row_for_warning(1);
my_error(ER_WRONG_VALUE_COUNT_ON_ROW, MYF(0), 1L);
DBUG_RETURN(-1);
}
@ -253,6 +254,7 @@ static int check_insert_fields(THD *thd, TABLE_LIST *table_list,
if (fields.elements != values.elements)
{
thd->get_stmt_da()->reset_current_row_for_warning(1);
my_error(ER_WRONG_VALUE_COUNT_ON_ROW, MYF(0), 1L);
DBUG_RETURN(-1);
}