• Marko Mäkelä's avatar
    MDEV-25936 Crash during DDL that involves FULLTEXT INDEX · da65cb4d
    Marko Mäkelä authored
    In commit 1bd681c8 we introduced
    a work-around for the missing MDL protection when the internal
    tables of FULLTEXT INDEX are dropped during DDL operations.
    That work-around suffered from a race condition. A purge thread
    could have narrowly passed purge_sys.check_stop_FTS() and then
    (while holding dict_sys.mutex) acquire a table reference right
    after fts_lock_table() determined that no references were being
    held.
    
    fts_lock_table(): Protect the reference check with dict_sys.mutex.
    
    Thanks to Thirunarayanan Balathandayuthapani for repeating the
    failure and testing the fix.
    da65cb4d
fts0fts.cc 155 KB