mariadb/storage
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
..
archive Merge branch '11.8' into main 2025-04-18 17:11:01 +02:00
blackhole Merge 11.4 into 11.7 2024-12-02 17:51:17 +02:00
columnstore Merge branch '10.11' into 11.4 2025-06-17 09:50:22 +02:00
connect Merge branch '11.8' into 12.0 2025-06-18 07:50:39 +02:00
csv Merge branch '11.8' into 12.0 2025-06-18 07:50:39 +02:00
example Merge branch '11.4' into 11.8 2025-06-18 07:43:24 +02:00
federated Fix remaining typos 2025-04-29 11:18:00 +10:00
federatedx Merge remote-tracking branch 'github/bb-11.4-release' into bb-11.8-serg 2025-04-27 19:40:00 +02:00
heap Fix typos in C comments inside storage/ 2025-03-26 16:56:50 +04:00
innobase MDEV-28933: Per-table unique FOREIGN KEY constraint names 2025-07-08 12:30:27 +03:00
maria Change some Aria ULONG variables to UINT 2025-06-25 17:59:45 +03:00
mroonga Merge branch '11.8' into 12.0 2025-06-18 07:50:39 +02:00
myisam MDEV-28933: Per-table unique FOREIGN KEY constraint names 2025-07-08 12:30:27 +03:00
myisammrg MDEV-28933: Per-table unique FOREIGN KEY constraint names 2025-07-08 12:30:27 +03:00
oqgraph Fix typos in C comments inside storage/ 2025-03-26 16:56:50 +04:00
perfschema Merge branch '11.8' into 12.0 2025-06-18 07:50:39 +02:00
rocksdb Merge branch '11.8' into 12.0 2025-06-18 07:50:39 +02:00
sequence cleanup: extract transaction-related part of handlerton 2024-11-05 14:00:50 -08:00
sphinx Merge 11.4 into 11.7 2024-12-02 17:51:17 +02:00
spider Merge branch '11.8' into 12.0 2025-06-18 07:50:39 +02:00
test_sql_discovery MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00