Skip to content
  • Lakshmi Narayanan Sreethar's avatar
    d2bd6f77
    Bug#22173891 : CIRCULAR FOREIGN KEYS + INDEX = FAILURE · d2bd6f77
    Lakshmi Narayanan Sreethar authored
    After a `create index` query on a table with foreign keys, the foreign
    keys are either lost or made inconsistent. But the same query using
    `alter table` runs without causing any problems. This is due to the
    difference in the type of sql_command values these queries are mapped
    to. The create index query's value, SQLCOM_CREATE_INDEX is not handled
    properly along with the SQLCOM_ALTER_TABLE command. This causes the
    above said problem. This patch fixes that by additionally also handling
    SQLCOM_CREATE_INDEX wherever SQLCOM_ALTER_TABLE/SQLCOM_DROP_INDEX are
    handled.
    d2bd6f77
    Bug#22173891 : CIRCULAR FOREIGN KEYS + INDEX = FAILURE
    Lakshmi Narayanan Sreethar authored
    After a `create index` query on a table with foreign keys, the foreign
    keys are either lost or made inconsistent. But the same query using
    `alter table` runs without causing any problems. This is due to the
    difference in the type of sql_command values these queries are mapped
    to. The create index query's value, SQLCOM_CREATE_INDEX is not handled
    properly along with the SQLCOM_ALTER_TABLE command. This causes the
    above said problem. This patch fixes that by additionally also handling
    SQLCOM_CREATE_INDEX wherever SQLCOM_ALTER_TABLE/SQLCOM_DROP_INDEX are
    handled.
Loading