• Nikita Malyavin's avatar
    MDEV-26262 frm is corrupted after ER_EXPRESSION_REFERS_TO_UNINIT_FIELD · 1811fd51
    Nikita Malyavin authored
    This is a duplicate of MDEV-18278 89936f11, but I will add an
    additional assertion
    
    Description:
    
    The frm corruption should not be reported during CREATE TABLE. Normally
    it doesn't, and the data to fill TABLE is taken by open_table_from_share
    call. However, the vcol data is stored as SQL string in
    table->s->vcol_defs.str and is anyway parsed on each table open.
    It is impossible [or hard] to avoid, because it's hard to clone the
    expression tree in general (it's easier to parse).
    
    Normally parse_vcol_defs should only fail on semantic errors. If so,
    error_reported is set to true. Any other failure is not expected during
    table creation. There is either unhandled/unacknowledged error, or
    something went really wrong, like memory reject. This all should be
    asserted anyway.
    
    Solution:
    * Set *error_reported=true for the forward references check;
    * Assert for every unacknowledged error during table creation.
    1811fd51
table.cc 262 KB