mariadb/storage/innobase
Marko Mäkelä cffbb17480 MDEV-28933: Per-table unique FOREIGN KEY constraint names
Before MySQL 4.0.18, user-specified constraint names were ignored.
Starting with MySQL 4.0.18, the specified constraint name was
prepended with the schema name and '/'.  Now we are transforming
into a format where the constraint name is prepended with the
dict_table_t::name and the impossible UTF-8 sequence 0xff.
Generated constraint names will be ASCII decimal numbers.

On upgrade, old FOREIGN KEY constraint names will be displayed
without any schema name prefix. They will be updated to the new
format on DDL operations.

dict_foreign_t::sql_id(): Return the SQL constraint name
without any schemaname/tablename\377 or schemaname/ prefix.

row_rename_table_for_mysql(), dict_table_rename_in_cache():
Simplify the logic: Just rename constraints to the new format.

dict_table_get_foreign_id(): Replaces dict_table_get_highest_foreign_id().

innobase_get_foreign_key_info(): Let my_error() refer to erroneous
anonymous constraints as "(null)".

row_delete_constraint(): Try to drop all 3 constraint name variants.

Reviewed by: Thirunarayanan Balathandayuthapani
Tested by: Matthias Leich
2025-07-08 12:30:27 +03:00
..
btr Merge branch '11.8' into 12.0 2025-06-18 07:50:39 +02:00
buf Merge branch '11.8' into 12.0 2025-06-18 07:50:39 +02:00
data MDEV-35049: Use CRC-32C and avoid allocating heap 2025-01-10 16:39:44 +02:00
dict MDEV-28933: Per-table unique FOREIGN KEY constraint names 2025-07-08 12:30:27 +03:00
eval MDEV-26938 Support descending indexes internally in InnoDB 2022-01-26 18:43:05 +01:00
fil Merge branch '11.8' into 12.0 2025-06-18 07:50:39 +02:00
fsp Merge branch '11.8' into 12.0 2025-05-22 09:22:55 +02:00
fts MDEV-28933: Per-table unique FOREIGN KEY constraint names 2025-07-08 12:30:27 +03:00
fut MDEV-35689 InnoDB system tables cannot be optimized or defragmented 2025-04-10 17:13:34 +05:30
gis Merge branch '11.8' into main 2025-04-18 17:11:01 +02:00
ha MDEV-35472 Server crash in ha_storage_put_memlim upon reading from INNODB_LOCKS 2024-11-25 10:31:57 +02:00
handler MDEV-28933: Per-table unique FOREIGN KEY constraint names 2025-07-08 12:30:27 +03:00
ibuf MDEV-29445: Reimplement SET GLOBAL innodb_buffer_pool_size 2025-03-26 17:05:44 +02:00
include MDEV-28933: Per-table unique FOREIGN KEY constraint names 2025-07-08 12:30:27 +03:00
lock Merge branch '11.8' into 12.0 2025-05-22 09:22:55 +02:00
log Merge branch '11.8' into 12.0 2025-05-22 09:22:55 +02:00
mem MDEV-35049: btr_search_check_free_space_in_heap() is a bottleneck 2025-01-10 16:30:42 +02:00
mtr Merge branch '11.4' into 11.8 2025-05-21 15:57:16 +02:00
mysql-test/storage_engine Remove dates from all rdiff files 2025-01-05 16:40:11 +02:00
os Merge branch '11.8' into 12.0 2025-05-22 09:22:55 +02:00
page Fix typos in C comments inside storage/ 2025-03-26 16:56:50 +04:00
pars Fix typos in C comments inside storage/ 2025-03-26 16:56:50 +04:00
que MDEV-24035 Failing assertion: UT_LIST_GET_LEN(lock.trx_locks) == 0 causing disruption and replication failure 2024-12-12 18:02:00 +02:00
read Fix typos in C comments inside storage/ 2025-03-26 16:56:50 +04:00
rem MDEV-35049: Use CRC-32C and avoid allocating heap 2025-01-10 16:39:44 +02:00
row MDEV-28933: Per-table unique FOREIGN KEY constraint names 2025-07-08 12:30:27 +03:00
srv Merge branch '11.8' into 12.0 2025-05-22 09:22:55 +02:00
sync Merge 10.6 into 10.11 2024-10-03 10:55:08 +03:00
trx Merge branch '11.8' into 12.0 2025-06-18 07:50:39 +02:00
unittest Merge 11.4 into 11.8 2025-04-02 14:07:01 +03:00
ut Merge branch '11.8' into 12.0 2025-05-22 09:22:55 +02:00
.clang-format-old switch off storage/innobase/.clang-format: InnoDB uses a common formatting style for all new code 2021-03-17 11:01:15 +03:00
CMakeLists.txt Merge branch '11.4' into 11.8 2025-06-18 07:43:24 +02:00
COPYING.Google
COPYING.Percona