1
0
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:
Sachin
2019-03-28 11:33:14 +05:30
parent afca4a3a34
commit ba7d33a898
3 changed files with 73 additions and 4 deletions

View File

@@ -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)