• Jon Olav Hauglid's avatar
    Bug #54905 Connection with WRITE lock cannot ALTER table due to · 2857a849
    Jon Olav Hauglid authored
               concurrent SHOW CREATE
    
    The problem was that a SHOW CREATE TABLE statement issued inside
    a transaction did not release its metadata locks at the end of the
    statement execution. This happened even if SHOW CREATE TABLE is an
    information statement. 
    
    The consequence was that SHOW CREATE TABLE was able to block other
    connections from accessing the table (e.g. using ALTER TABLE).
    
    This patch fixes the problem by explicitly releasing any metadata
    locks taken by SHOW CREATE TABLE after the statement completes.
    
    Test case added to show_check.test.
    2857a849
sql_show.cc 269 KB