• Sachin's avatar
    MDEV-20001 Potential dangerous regression: INSERT INTO >=100 rows fail for... · eed6d215
    Sachin authored
    MDEV-20001 Potential dangerous regression: INSERT INTO >=100 rows fail for myisam table with HASH indexes
    
    Problem:-
    
    So the issue is when we do bulk insert with rows
    > MI_MIN_ROWS_TO_DISABLE_INDEXES(100) , We try to disable the indexes to
    speedup insert. But current logic also disables the long unique indexes.
    
    Solution:- In ha_myisam::start_bulk_insert if we find long hash index
    (HA_KEY_ALG_LONG_HASH) we will not disable the index.
    
    This commit also refactors the mi_disable_indexes_for_rebuild function,
    Since this is function is called at only one place, it is inlined into
    start_bulk_insert
    
    mi_clear_key_active is added into myisamdef.h because now it is also used
    in ha_myisam.cc file.
    
    (Same is done for Aria Storage engine)
    eed6d215
ma_check.c 233 KB