mariadb/mysql-test/suite/versioning
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
..
r MDEV-28933: Per-table unique FOREIGN KEY constraint names 2025-07-08 12:30:27 +03:00
t Merge branch '11.8' into 12.0 2025-06-18 07:50:39 +02:00
common.inc Merge 11.4 into 11.6 2024-10-03 16:09:56 +03:00
common.opt Tests: versioning suite fix when no test_versioning plugin 2019-07-09 10:01:54 +03:00
common_finish.inc Merge branch '10.6' into 10.9 2023-08-04 08:01:06 +02:00
disabled.def MDEV-14820 System versioning is applied incorrectly to CTEs 2018-05-12 10:16:45 +02:00
engines.combinations MDEV-16937 Strict SQL with system versioned tables causes issues (10.4) 2020-05-29 11:45:19 +03:00
engines.inc versioning/common.inc must "have_innodb" 2017-12-05 17:42:27 +03:00
innodb.combinations MDEV-17038 ALTER TABLE CHANGE COLUMN c1 c1 bigint NOT NULL - generates error if table uses SYSTEM VERSIONING 2018-11-01 16:42:06 +02:00
innodb.inc MDEV-17038 ALTER TABLE CHANGE COLUMN c1 c1 bigint NOT NULL - generates error if table uses SYSTEM VERSIONING 2018-11-01 16:42:06 +02:00
key_type.combinations versioning test suite fixes 2019-10-10 00:20:34 +03:00
key_type.inc versioning test suite fixes 2019-10-10 00:20:34 +03:00
sys_time.inc MDEV-32188 make TIMESTAMP use whole 32-bit unsigned range 2024-05-27 12:39:02 +02:00
wait_system_clock.inc fix tests on windows 2018-01-13 02:01:35 +01:00