mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge 10.2 into bb-10.2-ext; also, fix MDEV-13015 After restart, InnoDB wrongly thinks that a SEQUENCE is a TABLE
sql_sequence.read_only: Show that the sequence can be read in both read-only and read-write mode, and that the sequence remains accessible after a server restart.
This commit is contained in:
@ -699,9 +699,9 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
|
||||
bool using_bulk_insert= 0;
|
||||
uint value_count;
|
||||
ulong counter = 1;
|
||||
ulong iteration= 0;
|
||||
/* counter of iteration in bulk PS operation*/
|
||||
ulonglong iteration= 0;
|
||||
ulonglong id;
|
||||
ulong bulk_iterations= bulk_parameters_iterations(thd);
|
||||
COPY_INFO info;
|
||||
TABLE *table= 0;
|
||||
List_iterator_fast<List_item> its(values_list);
|
||||
@ -769,7 +769,6 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
|
||||
DBUG_RETURN(TRUE);
|
||||
value_count= values->elements;
|
||||
|
||||
DBUG_ASSERT(bulk_iterations > 0);
|
||||
if (mysql_prepare_insert(thd, table_list, table, fields, values,
|
||||
update_fields, update_values, duplic, &unused_conds,
|
||||
FALSE))
|
||||
@ -941,6 +940,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
|
||||
}
|
||||
do
|
||||
{
|
||||
DBUG_PRINT("info", ("iteration %llu", iteration));
|
||||
if (iteration && bulk_parameters_set(thd))
|
||||
goto abort;
|
||||
|
||||
@ -1061,7 +1061,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
|
||||
}
|
||||
its.rewind();
|
||||
iteration++;
|
||||
} while (iteration < bulk_iterations);
|
||||
} while (bulk_parameters_iterations(thd));
|
||||
|
||||
values_loop_end:
|
||||
free_underlaid_joins(thd, &thd->lex->select_lex);
|
||||
@ -1208,7 +1208,7 @@ values_loop_end:
|
||||
retval= thd->lex->explain->send_explain(thd);
|
||||
goto abort;
|
||||
}
|
||||
if ((bulk_iterations * values_list.elements) == 1 && (!(thd->variables.option_bits & OPTION_WARNINGS) ||
|
||||
if ((iteration * values_list.elements) == 1 && (!(thd->variables.option_bits & OPTION_WARNINGS) ||
|
||||
!thd->cuted_fields))
|
||||
{
|
||||
my_ok(thd, info.copied + info.deleted +
|
||||
|
Reference in New Issue
Block a user