• Marko Mäkelä's avatar
    MDEV-14585 Automatically remove #sql- tables in InnoDB dictionary during recovery · b4165985
    Marko Mäkelä authored
    Now that MDEV-14717 made RENAME TABLE crash-safe within InnoDB,
    it should be safe to drop the #sql- tables within InnoDB during
    crash recovery. These tables can be one of two things:
    
    (1) #sql-ib related to deferred DROP TABLE (follow-up to MDEV-13407)
    or to table-rebuilding ALTER TABLE...ALGORITHM=INPLACE
    (since MDEV-14378, only related to the intermediate copy of a table),
    
    (2) #sql- related to the intermediate copy of a table during
    ALTER TABLE...ALGORITHM=COPY
    
    We will not drop tables whose name starts with #sql2, because
    the server can be killed during an ALGORITHM=COPY operation at
    a point where the original table was renamed to #sql2 but the
    finished intermediate copy was not yet renamed from #sql-
    to the original table name.
    b4165985
row0mysql.cc 137 KB