• Sergey Vojtovich's avatar
    MDEV-10424 - Assertion `ticket == __null' failed in MDL_request::set_type · 723488bb
    Sergey Vojtovich authored
    Reexecution of prepared "ANALYZE TABLE merge_table, table" may miss to
    reinitialize "table" for subsequent execution and trigger assertion failure.
    
    This happens because MERGE engine may adjust table->next_global chain, which
    gets cleared by close_thread_tables()/ha_myisammrg::detach_children() later.
    Since reinitilization iterates next_global chain, it won't see tables following
    merge table.
    
    Fixed by appending saved next_global chain after merge children.
    723488bb
merge.test 83 KB