Skip to content
  • Nisha Gopalakrishnan's avatar
    d41a7907
    BUG#21631284: DROP VIRTUAL COLUMN RESULT IN DROP WRONG INDEX · d41a7907
    Nisha Gopalakrishnan authored
    Analysis
    ========
    ALTER TABLE operations having composite indexes can cause
    rebuild of such indexes if:
    a) First index component is non-prefixed index and
    b) Subsequent index components have at least one prefixed
       index.
    
    The code which checked if the index had changed from
    non-prefixed index to prefixed index, checked only the
    first key part and did not scan all key parts to determine
    whether the original version of the index was prefixed
    or not. Since the composite index's first key part was
    not prefixed and the new index definition had the
    prefix flag set, it assumed there is a change in
    the index definition triggering a rebuild of the index.
    
    Fix
    ===
    Scan all the key parts in order to determine whether
    the key is converted from a non-prefixed key to a
    prefixed key or vice-versa.
    d41a7907
    BUG#21631284: DROP VIRTUAL COLUMN RESULT IN DROP WRONG INDEX
    Nisha Gopalakrishnan authored
    Analysis
    ========
    ALTER TABLE operations having composite indexes can cause
    rebuild of such indexes if:
    a) First index component is non-prefixed index and
    b) Subsequent index components have at least one prefixed
       index.
    
    The code which checked if the index had changed from
    non-prefixed index to prefixed index, checked only the
    first key part and did not scan all key parts to determine
    whether the original version of the index was prefixed
    or not. Since the composite index's first key part was
    not prefixed and the new index definition had the
    prefix flag set, it assumed there is a change in
    the index definition triggering a rebuild of the index.
    
    Fix
    ===
    Scan all the key parts in order to determine whether
    the key is converted from a non-prefixed key to a
    prefixed key or vice-versa.
Loading