• Marko Mäkelä's avatar
    MDEV-18960: Assertion !omits_virtual_cols(*form->s) on TRUNCATE · 9471dbaf
    Marko Mäkelä authored
    MariaDB before MDEV-5800 in version 10.2.2 did not support
    indexed virtual columns. Non-persistent virtual columns were
    hidden from storage engines. Only starting with MDEV-5800, InnoDB
    would create internal metadata on virtual columns.
    
    On TRUNCATE TABLE, an old .frm file from before MDEV-5800 may be
    used as the table schema. When the table is being re-created by
    InnoDB, the old schema must be used. That is, we may hide
    the existence of virtual columns from InnoDB.
    
    create_table_check_doc_id_col(): Remove the assertion that failed.
    This function can actually correctly deal with virtual columns
    that could have been created before MariaDB 10.2.2 introduced MDEV-5800.
    
    create_table_info_t::create_table_def(): Do not create metadata for
    virtual columns if the table definition was created before MariaDB 10.2.2.
    9471dbaf
ha_innodb.cc 637 KB