-
Dyre Tjeldvoll authored
Problem: Attempting to create a foreign key matching a SPATIAL index would lead to an assert in debug mode. Creating a foreign key matching a FULLTEXT index would fail. Root cause was that the keys generated by the server for the foreign keys in this case were ignored since the generated key was considered a prefix of the SPATIAL or FULLTEXT key. Solution: Exclude SPATIAL and FULLTEXT keys from the set of keys that can be used in place of the generated key when the latter is a prefix. Note that it isn't (and never was) possible to create a foreign key on a GEOMETRY column, so the fix causes the same error to be reported even if there happens to be a SPATIAL index on the column. Some negative tests fail with different error messages with this change and have to be updated. (cherry picked from commit 81089203a91e6fb17105422684a4ccdb08a7b3d9)
Dyre Tjeldvoll authoredProblem: Attempting to create a foreign key matching a SPATIAL index would lead to an assert in debug mode. Creating a foreign key matching a FULLTEXT index would fail. Root cause was that the keys generated by the server for the foreign keys in this case were ignored since the generated key was considered a prefix of the SPATIAL or FULLTEXT key. Solution: Exclude SPATIAL and FULLTEXT keys from the set of keys that can be used in place of the generated key when the latter is a prefix. Note that it isn't (and never was) possible to create a foreign key on a GEOMETRY column, so the fix causes the same error to be reported even if there happens to be a SPATIAL index on the column. Some negative tests fail with different error messages with this change and have to be updated. (cherry picked from commit 81089203a91e6fb17105422684a4ccdb08a7b3d9)
Loading