• Dmitry Lenev's avatar
    A pre-requisite for patch fixing bug #52044 "FLUSH TABLES · cf93bc71
    Dmitry Lenev authored
    WITH READ LOCK and FLUSH TABLES <list> WITH READ LOCK are
    incompatible", which adds information about waits caused by 
    FLUSH TABLES statement to deadlock detector in MDL subsystem.
    
    Remove API supporting caching of pointers to TABLE_SHARE 
    object in MDL subsystem and all code related to it. 
    
    The problem was that locking requirements of code 
    implementing this API conflicted with locking requirements 
    of code which adds information about waits caused by flushes 
    to deadlock detector in MDL subsystem (the former needed to
    lock LOCK_open or its future equivalent while having 
    write-lock on MDL_lock's rwlock, and the latter needs to be 
    able to read-lock MDL_lock rwlock while owning LOCK_open or 
    its future equivalent).
    
    Since caching of pointers to TABLE_SHARE objects in MDL 
    subsystem didn't bring expected performance benefits we 
    decided to remove caching API rather than try to come up 
    with some complex solution for this problem.
    cf93bc71
mdl.cc 72.9 KB