mirror of
https://github.com/MariaDB/server.git
synced 2025-10-12 12:25:37 +03:00
MDEV-18820 Assertion `lock_table_has(trx, index->table, LOCK_IX)' failed in lock_rec_insert_check_and_lock upon INSERT into table with blob key
Don't Ignore Any error during index lookup, And throw duplicate key error only if error is HA_ERR_FOUND_DUPP_KEY
This commit is contained in:
@@ -6590,10 +6590,10 @@ static int check_duplicate_long_entry_key(TABLE *table, handler *h,
|
||||
error= HA_ERR_FOUND_DUPP_KEY;
|
||||
goto exit;
|
||||
}
|
||||
if (result == HA_ERR_LOCK_WAIT_TIMEOUT)
|
||||
error= HA_ERR_LOCK_WAIT_TIMEOUT;
|
||||
if (result != HA_ERR_KEY_NOT_FOUND)
|
||||
error= result;
|
||||
exit:
|
||||
if (error)
|
||||
if (error == HA_ERR_FOUND_DUPP_KEY)
|
||||
{
|
||||
table->file->errkey= key_no;
|
||||
if (h->ha_table_flags() & HA_DUPLICATE_POS)
|
||||
|
Reference in New Issue
Block a user