• Kristian Nielsen's avatar
    Fix "Assertion `THR_PFS_initialized' failed" in main.bootstrap · 7f498fba
    Kristian Nielsen authored
    This patch makes the server wait for the manager thread to actually start
    before proceeding with server startup.
    
    Without this, if thread scheduling is really slow and the server shutdowns
    quickly, then it is possible that the manager thread is not yet started when
    shutdown_performance_schema() is called. If the manager thread starts at just
    the wrong moment and just before the main server reaches exit(), the thread
    can try to access no longer available performance schema data. This was seen
    as occasional assertion in the main.bootstrap test.
    
    As an additional improvement, make sure to run all pending actions before
    exiting the manager thread.
    Reviewed-by: default avatarMonty <monty@mariadb.org>
    Signed-off-by: default avatarKristian Nielsen <knielsen@knielsen-hq.org>
    7f498fba
sql_manager.cc 4.73 KB