• Marko Mäkelä's avatar
    MDEV-16145 Crash in ALTER TABLE…AUTO_INCREMENT=1 after DISCARD TABLESPACE · c407ee09
    Marko Mäkelä authored
    This is the MariaDB equivalent of fixing the MySQL 5.7 regression
    Bug #26935001 ALTER TABLE AUTO_INCREMENT TRIES TO READ
    INDEX FROM DISCARDED TABLESPACE
    
    Oracle did not publish a test case, but it is easy to guess
    based on the commit message. The MariaDB code is different
    due to MDEV-6076 implementing persistent AUTO_INCREMENT.
    
    commit_set_autoinc(): Report ER_TABLESPACE_DISCARDED if the
    tablespace is missing.
    
    prepare_inplace_alter_table_dict(): Avoid accessing a discarded
    tablespace. (This avoids generating warnings in fil_space_acquire().)
    c407ee09
handler0alter.cc 249 KB