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:
@ -6909,16 +6909,12 @@ bool handler::prepare_for_row_logging()
|
||||
Do all initialization needed for insert
|
||||
*/
|
||||
|
||||
int handler::prepare_for_insert()
|
||||
int handler::prepare_for_insert(bool do_create)
|
||||
{
|
||||
/* Preparation for unique of blob's */
|
||||
if (table->s->long_unique_table || table->s->period.unique_keys)
|
||||
{
|
||||
/*
|
||||
When doing a scan we can't use the same handler to check
|
||||
duplicate rows. Create a new temporary one
|
||||
*/
|
||||
if (inited != NONE && create_lookup_handler())
|
||||
if (do_create && create_lookup_handler())
|
||||
return 1;
|
||||
alloc_lookup_buffer();
|
||||
}
|
||||
|
Reference in New Issue
Block a user