• Marko Mäkelä's avatar
    MDEV-18220: Remove some redundant data structures · 5b3f7c0c
    Marko Mäkelä authored
    fts_state_t, fts_slot_t::state: Remove. Replaced by fts_slot_t::running
    and fts_slot_t::table_id as follows.
    
    FTS_STATE_SUSPENDED: Removed (unused).
    
    FTS_STATE_EMPTY: Removed. table_id=0 will denote empty slots.
    
    FTS_STATE_RUNNING: Equivalent to running=true.
    
    FTS_STATE_LOADED, FTS_STATE_DONE: Equivalent to running=false.
    
    fts_slot_t::table: Remove. Tables will be identified by table_id.
    After opening a table, we will check fil_table_accessible() before
    accessing the data.
    
    fts_optimize_new_table(), fts_optimize_del_table(),
    fts_optimize_how_many(), fts_is_sync_needed():
    Remove the parameter tables, and use the static variable fts_slots
    (which was introduced in MariaDB 10.2) instead.
    5b3f7c0c
fts0opt.cc 76 KB