• Daniele Sciascia's avatar
    MDEV-13549 Wrong usage of mutex 'LOCK_wsrep_thd' and 'LOCK_thd_kill' test galera.MW-286 · a3ba3aab
    Daniele Sciascia authored
    Test MW-286 occasionally failed with error the following message:
    
    ```
    safe_mutex: Found wrong usage of mutex 'LOCK_wsrep_thd' and 'LOCK_thd_kill'
    Mutex currently locked (in reverse order):
    LOCK_thd_kill                     mariadb-server/sql/sql_class.h  line 3535
    LOCK_wsrep_thd                    mariadb-server/sql/wsrep_thd.cc  line 88
    ```
    
    The fix consists in calling thd->reset_killed() in wsrep_mysql_parse() after
    LOCK_wsrep_thd is unlocked. Which avoids the taking locks LOCK_wsrep_thd and
    LOCK_thd_kill in reverse order.
    a3ba3aab
sql_parse.cc 295 KB