• Marko Mäkelä's avatar
    Preserve ALTER TABLE metadata even when the table becomes empty · 54b7267c
    Marko Mäkelä authored
    For instant ADD COLUMN…LAST it was possible to remove the metadata
    whenever the table becomes empty. For the generic ALTER TABLE,
    we must preserve the metadata on dropped or reordered columns,
    because concurrent transactions are assuming that this metadata
    cannot change.
    
    rec_is_add_metadata(): Check if a record is ADD COLUMN metadata
    record (not more generic instant ALTER TABLE).
    
    btr_discard_only_page_on_level(): Preserve the generic instant
    ALTER TABLE metadata.
    
    btr_cur_optimistic_delete_func(), btr_cur_pessimistic_delete():
    When the last user record is deleted, do not delete the
    generic instant ALTER TABLE metadata record. Only delete
    instant ADD COLUMN metadata records.
    54b7267c
btr0btr.cc 157 KB