-
Lakshmi Narayanan Sreethar authored
FAILURE CREATING COMPOSITE FKS BASED ON UNIQUE INDEXES If the child/parent index of an FK is an UniqueHashIndex, it has to be based on the exact same columns as that of the FK's child/parent columns. The column order doesn't matter. But ha_ndbcluster::find_matching_index() was returning UniqueHashIndexes even if there was a partial match and the column count didn't match up. This creates a problem during composite FK creation. This patch fixes it by returning UniqueHashIndexes only if there is a complete match - the UniqueHashIndex is based on the exact same columns as the FK's parent/child column list. This patch also includes testcases for the fix.
Lakshmi Narayanan Sreethar authoredFAILURE CREATING COMPOSITE FKS BASED ON UNIQUE INDEXES If the child/parent index of an FK is an UniqueHashIndex, it has to be based on the exact same columns as that of the FK's child/parent columns. The column order doesn't matter. But ha_ndbcluster::find_matching_index() was returning UniqueHashIndexes even if there was a partial match and the column count didn't match up. This creates a problem during composite FK creation. This patch fixes it by returning UniqueHashIndexes only if there is a complete match - the UniqueHashIndex is based on the exact same columns as the FK's parent/child column list. This patch also includes testcases for the fix.
Loading