1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-22218 InnoDB: Failing assertion: node->pcur->rel_pos == BTR_PCUR_ON upon LOAD DATA with NO_BACKSLASH_ESCAPES in SQL_MODE and unique blob in table

`inited == NONE` at the initialization time does not always mean
that it'll be `NONE` later, at the execution time. Use a more complex
caller-specific logic to decide whether to create a cloned lookup handler.

Besides LOAD (as in the original bug report) make sure that all
prepare_for_insert() invocations are covered by tests. Add tests for
CREATE ... SELECT, multi-UPDATE, and multi-DELETE.

Don't enable write cache with long uniques.
This commit is contained in:
Sergei Golubchik
2020-04-12 18:09:09 +02:00
parent 8c0b988073
commit fcd84da5f1
11 changed files with 133 additions and 19 deletions

View File

@ -969,7 +969,8 @@ update_begin:
can_compare_record= records_are_comparable(table);
explain->tracker.on_scan_init();
table->file->prepare_for_insert();
table->file->prepare_for_insert(1);
DBUG_ASSERT(table->file->inited != handler::NONE);
THD_STAGE_INFO(thd, stage_updating);
while (!(error=info.read_record()) && !thd->killed)
@ -2028,7 +2029,7 @@ int multi_update::prepare(List<Item> &not_used_values,
{
table->read_set= &table->def_read_set;
bitmap_union(table->read_set, &table->tmp_set);
table->file->prepare_for_insert();
table->file->prepare_for_insert(1);
}
}
if (unlikely(error))