mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge branch '10.1' into 10.2
This commit is contained in:
@ -268,7 +268,8 @@ static int check_insert_fields(THD *thd, TABLE_LIST *table_list,
|
||||
if (table_list->is_view())
|
||||
unfix_fields(fields);
|
||||
|
||||
res= setup_fields(thd, Ref_ptr_array(), fields, MARK_COLUMNS_WRITE, 0, 0);
|
||||
res= setup_fields(thd, Ref_ptr_array(),
|
||||
fields, MARK_COLUMNS_WRITE, 0, NULL, 0);
|
||||
|
||||
/* Restore the current context. */
|
||||
ctx_state.restore_state(context, table_list);
|
||||
@ -378,7 +379,7 @@ 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, 0))
|
||||
update_fields, MARK_COLUMNS_WRITE, 0, NULL, 0))
|
||||
return -1;
|
||||
|
||||
if (insert_table_list->is_view() &&
|
||||
@ -804,7 +805,8 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
|
||||
my_error(ER_WRONG_VALUE_COUNT_ON_ROW, MYF(0), counter);
|
||||
goto abort;
|
||||
}
|
||||
if (setup_fields(thd, Ref_ptr_array(), *values, MARK_COLUMNS_READ, 0, 0))
|
||||
if (setup_fields(thd, Ref_ptr_array(),
|
||||
*values, MARK_COLUMNS_READ, 0, NULL, 0))
|
||||
goto abort;
|
||||
switch_to_nullable_trigger_fields(*values, table);
|
||||
}
|
||||
@ -1529,13 +1531,13 @@ bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list,
|
||||
context->resolve_in_table_list_only(table_list);
|
||||
|
||||
res= (setup_fields(thd, Ref_ptr_array(),
|
||||
*values, MARK_COLUMNS_READ, 0, 0) ||
|
||||
*values, MARK_COLUMNS_READ, 0, NULL, 0) ||
|
||||
check_insert_fields(thd, context->table_list, fields, *values,
|
||||
!insert_into_view, 0, &map));
|
||||
|
||||
if (!res)
|
||||
res= setup_fields(thd, Ref_ptr_array(),
|
||||
update_values, MARK_COLUMNS_READ, 0, 0);
|
||||
update_values, MARK_COLUMNS_READ, 0, NULL, 0);
|
||||
|
||||
if (!res && duplic == DUP_UPDATE)
|
||||
{
|
||||
@ -3525,7 +3527,8 @@ select_insert::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
|
||||
*/
|
||||
lex->current_select= &lex->select_lex;
|
||||
|
||||
res= (setup_fields(thd, Ref_ptr_array(), values, MARK_COLUMNS_READ, 0, 0) ||
|
||||
res= (setup_fields(thd, Ref_ptr_array(),
|
||||
values, MARK_COLUMNS_READ, 0, NULL, 0) ||
|
||||
check_insert_fields(thd, table_list, *fields, values,
|
||||
!insert_into_view, 1, &map));
|
||||
|
||||
@ -3578,7 +3581,7 @@ select_insert::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
|
||||
ctx_state.get_first_name_resolution_table();
|
||||
|
||||
res= res || setup_fields(thd, Ref_ptr_array(), *info.update_values,
|
||||
MARK_COLUMNS_READ, 0, 0);
|
||||
MARK_COLUMNS_READ, 0, NULL, 0);
|
||||
if (!res)
|
||||
{
|
||||
/*
|
||||
|
Reference in New Issue
Block a user