• Timothy Smith's avatar
    Complete application of InnoDB snapshot innodb-5.1-ss2545. · f6bf85c0
    Timothy Smith authored
    Fix race condition which could result in freeing a struct that is
    still in use by another thread.
    
    
    Detailed revision comments:
    
    r2537 | inaam | 2008-07-15 20:46:03 +0300 (Tue, 15 Jul 2008) | 12 lines
    branches/5.1   issue# 4
    
    Fixed a timing hole where a thread dropping an index can free the
    in-memory index struct while another thread is still using
    that structure to remove entries from adaptive hash index belonging
    to one of the pages that belongs to the index being dropped.
    
    The fix is to have a reference counter in the index struct and to
    wait for this counter to drop to zero beforing freeing the struct.
    
    Reviewed by: Heikki
    
    r2543 | inaam | 2008-07-22 18:57:43 +0300 (Tue, 22 Jul 2008) | 7 lines
    branches/5.1:
    
    Removed UNIV_INLINE qualifier from btr_search_info_get_ref_count().
    Otherwise compilation failed on non-debug builds.
    
    Pointed by: Vasil
    f6bf85c0
btr0sea.c 43.3 KB