• lars-erik.bjork@sun.com's avatar
    Backport of revno: 2617.68.36 · 1642f67b
    lars-erik.bjork@sun.com authored
    ---------------------------------------------
    
    This is a patch for bug#47098 assert in MDL_context::destroy on
    HANDLER <damaged merge table> OPEN.
          
    The assert occurs in MDL_context::destroy when the connection is terminated,
    because all mdl_tickets have not been released.
    MERGE tables do not support being opened using the HANDLER ... OPEN command,
    and trying to do so will result in an error. In the event of an error, all
    tables that are opened, should be closed again. The fix for bug#45781 made
    sure that this also works for MERGE tables, which causes multiple tables to
    be opened.
    This fix extends the fix for bug#45781, by ensuring that also all locks are
    released, when MERGE tables are involved.
    1642f67b
sql_handler.cc 24.7 KB