• dlenev@mysql.com's avatar
    Fix for bug #16593 "Deadlock or crash in stress test for case where · 4a41a00d
    dlenev@mysql.com authored
    trigger starts trigger".
    
    In short, the deadlock/crash happened when execution of statement, which used
    stored functions or activated triggers, coincided with alteration of the
    tables used by these functions or triggers (in highly concurrent environment).
    
    Bug was caused by the incorrect handling of tables from prelocked set in
    open_tables() functions in situations when refresh happened. This fix replaces
    old smart but not very robust way of handling tables after refresh (which was
    closing only old tables), with new one which simply closes all tables opened so
    far and restarts open_tables().
    Also fixed handling of temporary tables in close_tables_for_reopen().
    
    No test case present since bug manifests itself only in concurrent environment.
    4a41a00d
mysql_priv.h 60.4 KB