Skip to content
  • Lakshmi Narayanan Sreethar's avatar
    1f262bde
    Bug#21308928 · 1f262bde
    Lakshmi Narayanan Sreethar authored
    Adding a unique constraint to a column that already
    has a foreign constraint, fails.
    
    The problem was that the handler while copying the
    FK metadata to a new table during the offline alter,
    looks for an index with the column name that the FK
    is based on and fails.
    
    This patch fixes it by replacing the global index
    lookup using column name with a lookup that takes in
    the columns of the fk and returns a matching index
    based on those columns. Also updated the testcases.
    1f262bde
    Bug#21308928
    Lakshmi Narayanan Sreethar authored
    Adding a unique constraint to a column that already
    has a foreign constraint, fails.
    
    The problem was that the handler while copying the
    FK metadata to a new table during the offline alter,
    looks for an index with the column name that the FK
    is based on and fails.
    
    This patch fixes it by replacing the global index
    lookup using column name with a lookup that takes in
    the columns of the fk and returns a matching index
    based on those columns. Also updated the testcases.
Loading