Skip to content
  • Dyre Tjeldvoll's avatar
    7e3e1f2e
    Bug#20752436: INNODB: FAILING ASSERTION: 0 IN FILE HANDLER0ALTER.CC LINE 6647 · 7e3e1f2e
    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)
    7e3e1f2e
    Bug#20752436: INNODB: FAILING ASSERTION: 0 IN FILE HANDLER0ALTER.CC LINE 6647
    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)
Loading