1
0
mirror of https://github.com/MariaDB/server.git synced 2025-10-12 12:25:37 +03:00

MDEV-18748 REPLACE doesn't work with unique blobs on MyISAM table

on long unique conflict, set table->file->dup_ref for
engines that support it
This commit is contained in:
Sergei Golubchik
2019-02-27 23:32:02 +01:00
parent 9fd3e810e8
commit b10340998f
3 changed files with 19 additions and 0 deletions

View File

@@ -6558,7 +6558,14 @@ static int check_duplicate_long_entry_key(TABLE *table, handler *h,
error= HA_ERR_LOCK_WAIT_TIMEOUT;
exit:
if (error)
{
table->file->errkey= key_no;
if (h->ha_table_flags() & HA_DUPLICATE_POS)
{
h->position(table->check_unique_buf);
memcpy(table->file->dup_ref, h->ref, h->ref_length);
}
}
h->ha_index_end();
return error;
}