mariadb/mysql-test/suite/innodb
Thirunarayanan Balathandayuthapani e46c9a0152 MDEV-37296 ALTER TABLE allows adding unique hash key with duplicate values
Problem:
=======
- During copy algorithm, InnoDB fails to detect the duplicate
key error for unique hash key blob index. Unique HASH index
treated as virtual index inside InnoDB.
When table does unique hash key , server does search on
the hash key before doing any insert operation and
finds the duplicate value in check_duplicate_long_entry_key().
Bulk insert does all the insert together when copy of
intermediate table is finished. This leads to undetection of
duplicate key error while building the index.

Solution:
========
- Avoid bulk insert operation when table does have unique
hash key blob index.

dict_table_t::can_bulk_insert(): To check whether the table
is eligible for bulk insert operation during alter copy algorithm.
Check whether any virtual column name starts with DB_ROW_HASH_ to
know whether blob column has unique index on it.
2025-08-11 13:29:32 +05:30
..
include Merge branch '10.6' into 10.11 2024-05-10 20:02:18 +02:00
r MDEV-37296 ALTER TABLE allows adding unique hash key with duplicate values 2025-08-11 13:29:32 +05:30
t MDEV-37296 ALTER TABLE allows adding unique hash key with duplicate values 2025-08-11 13:29:32 +05:30