• Jon Olav Hauglid's avatar
    Followup for Bug #54360 Deadlock DROP/ALTER/CREATE DATABASE · f97da70f
    Jon Olav Hauglid authored
                            with open HANDLER
    
    This patch changes the code for table renames to not drop metadata
    locks. Since table renames are done as a part of ALTER DATABASE ...
    UPGRADE, dropping metadata locks in the middle of execution can
    result in wrong binlog order since it means that no locks are held
    when the binlog is written to.
    
    The RENAME TABLE statement is unafffected since it auto commits and
    therefore already drops metadata locks at the end of execution.
    
    This patch also reverts the regression test for Bug#48940 back to
    its original version. The test was temporarily changed due to the
    issue mentioned above.
    f97da70f
mdl_sync.test 126 KB