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

Merge 10.2 into 10.3

This commit is contained in:
Marko Mäkelä
2019-04-27 20:41:31 +03:00
39 changed files with 547 additions and 78 deletions

View File

@ -20967,6 +20967,15 @@ end_unique_update(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
table->file->print_error(error,MYF(0)); /* purecov: inspected */
DBUG_RETURN(NESTED_LOOP_ERROR); /* purecov: inspected */
}
/* Prepare table for random positioning */
bool rnd_inited= (table->file->inited == handler::RND);
if (!rnd_inited &&
((error= table->file->ha_index_end()) ||
(error= table->file->ha_rnd_init(0))))
{
table->file->print_error(error, MYF(0));
DBUG_RETURN(NESTED_LOOP_ERROR);
}
if (unlikely(table->file->ha_rnd_pos(table->record[1],table->file->dup_ref)))
{
table->file->print_error(error,MYF(0)); /* purecov: inspected */
@ -20980,6 +20989,13 @@ end_unique_update(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
table->file->print_error(error,MYF(0)); /* purecov: inspected */
DBUG_RETURN(NESTED_LOOP_ERROR); /* purecov: inspected */
}
if (!rnd_inited &&
((error= table->file->ha_rnd_end()) ||
(error= table->file->ha_index_init(0, 0))))
{
table->file->print_error(error, MYF(0));
DBUG_RETURN(NESTED_LOOP_ERROR);
}
}
if (unlikely(join->thd->check_killed()))
{