• Marko Mäkelä's avatar
    MDEV-22939 Server crashes in row_make_new_pathname() · 3eb81136
    Marko Mäkelä authored
    The statement ALTER TABLE...DISCARD TABLESPACE is problematic,
    because its designed purpose is to break the referential integrity
    of the data dictionary and make a table point to nowhere.
    
    ha_innobase::commit_inplace_alter_table(): Check whether the
    table has been discarded. (This is a bit late to check it, right
    before committing the change.) Previously, we performed this check
    only in a specific branch of the function commit_set_autoinc().
    
    Note: We intentionally allow non-rebuilding ALTER TABLE even if
    the tablespace has been discarded, to remain compatible with MySQL.
    (See the various tests with "wl5522" in the name, such as
    innodb.innodb-wl5522.)
    
    The test case would crash starting with 10.3 only, but it does not hurt
    to minimize the code and test difference between 10.2 and 10.3.
    3eb81136
alter_table.test 2.21 KB