mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +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:
@ -753,7 +753,8 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
|
||||
|
||||
if (table->versioned(VERS_TIMESTAMP) ||
|
||||
(table_list->has_period() && !portion_of_time_through_update))
|
||||
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 (likely(!(error=info.read_record())) && likely(!thd->killed) &&
|
||||
@ -1243,7 +1244,7 @@ multi_delete::initialize_tables(JOIN *join)
|
||||
tbl->prepare_for_position();
|
||||
|
||||
if (tbl->versioned(VERS_TIMESTAMP))
|
||||
tbl->file->prepare_for_insert();
|
||||
tbl->file->prepare_for_insert(1);
|
||||
}
|
||||
else if ((tab->type != JT_SYSTEM && tab->type != JT_CONST) &&
|
||||
walk == delete_tables)
|
||||
|
Reference in New Issue
Block a user