• Jon Olav Hauglid's avatar
    Bug #56085 Embedded server tests fails with assert in · b02f5dd8
    Jon Olav Hauglid authored
               check_if_table_exists()
    
    This assert was triggered when the server tried to load plugins
    while running in embedded server mode. In embedded server mode,
    check_if_table_exists() was used to check if mysql.plugin existed
    so that ER_NO_SUCH_TABLE could be silently ignored.
    The problem was that this check was done without acquiring a metadata
    lock on mysql.plugin first. This triggered the assert.
    
    This patch fixes the problem by removing the call to
    check_if_table_exists() from plugin_load(). Instead an error handler
    which traps ER_NO_SUCH_TABLE is installed before trying to open
    mysql.plugin when running in embedded server mode.
    
    No test coverage added since this assert was triggered by 
    existing tests running in embedded server mode.
    b02f5dd8
sql_plugin.cc 101 KB