mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-34679 ER_BAD_FIELD uses non-localizable substrings
This commit is contained in:
@ -276,7 +276,8 @@ static int check_insert_fields(THD *thd, TABLE_LIST *table_list,
|
||||
unfix_fields(fields);
|
||||
|
||||
res= setup_fields(thd, Ref_ptr_array(),
|
||||
fields, MARK_COLUMNS_WRITE, 0, NULL, 0);
|
||||
fields, MARK_COLUMNS_WRITE, 0, NULL, 0,
|
||||
THD_WHERE::INSERT_LIST);
|
||||
|
||||
/* Restore the current context. */
|
||||
ctx_state.restore_state(context, table_list);
|
||||
@ -387,8 +388,8 @@ static int check_update_fields(THD *thd, TABLE_LIST *insert_table_list,
|
||||
}
|
||||
|
||||
/* Check the fields we are going to modify */
|
||||
if (setup_fields(thd, Ref_ptr_array(),
|
||||
update_fields, MARK_COLUMNS_WRITE, 0, NULL, 0))
|
||||
if (setup_fields(thd, Ref_ptr_array(), update_fields, MARK_COLUMNS_WRITE, 0,
|
||||
NULL, 0, THD_WHERE::UPDATE_CLAUSE))
|
||||
return -1;
|
||||
|
||||
if (insert_table_list->is_view() &&
|
||||
@ -1711,8 +1712,8 @@ int mysql_prepare_insert(THD *thd, TABLE_LIST *table_list,
|
||||
context->resolve_in_table_list_only(table_list);
|
||||
|
||||
res= setup_returning_fields(thd, table_list) ||
|
||||
setup_fields(thd, Ref_ptr_array(),
|
||||
*values, MARK_COLUMNS_READ, 0, NULL, 0) ||
|
||||
setup_fields(thd, Ref_ptr_array(), *values, MARK_COLUMNS_READ, 0,
|
||||
NULL, 0, THD_WHERE::VALUES_CLAUSE) ||
|
||||
check_insert_fields(thd, context->table_list, fields, *values,
|
||||
!insert_into_view, 0, &map);
|
||||
|
||||
@ -4016,7 +4017,7 @@ select_insert::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
|
||||
}
|
||||
|
||||
res= res || setup_fields(thd, Ref_ptr_array(), *info.update_values,
|
||||
MARK_COLUMNS_READ, 0, NULL, 0);
|
||||
MARK_COLUMNS_READ, 0, NULL, 0, THD_WHERE::UPDATE_CLAUSE);
|
||||
if (!res)
|
||||
{
|
||||
/*
|
||||
|
Reference in New Issue
Block a user