• Sachin Agarwal's avatar
    Bug #26334149 - MYSQL CRASHES WHEN FULL TEXT INDEXES IBD FILES ARE ORPHANED DUE TO RENAME TABLE · 197bf0fe
    Sachin Agarwal authored
    Problem:
    When FTS index is added into a table which doesn't have 'FTS_DOC_ID'
    column, Innodb rebuilds table to add column 'FTS_DOC_ID'. when this FTS
    index is dropped from this table. Innodb doesn't not rebuild table to
    remove 'FTS_DOC_ID' column and deletes FTS index auxiliary tables.
    But it doesn't delete FTS common auxiliary tables.
    Later when the database having this table is renamed, FTS auxiliary
    tables are not renamed because table's flags2 (dict_table_t.flags2)
    has been resetted for DICT_TF2_FTS flag during FTS index drop operation.
    Now when we drop old database, it leads to an assert.
    
    Fix:
    During renaming of FTS auxiliary tables, ORed a condition to check if
    table has DICT_TF2_FTS_HAS_DOC_ID flag set.
    
    RB: 18769
    Reviewed by : Jimmy.Yang@oracle.com
    197bf0fe
innodb-alter.test 16.1 KB