• Monty's avatar
    Optimize size of lex structures · 8e8bda7f
    Monty authored
    LEX, st_select_lex, st_select_unit optimized for space:
    - Use bit fields for bool variables
    - Ensure that all bit fields are initialized (improves
      performance for init functions as all bit fields can be
      initalized with one memory access)
    - Move members around in above structures to remove alignment
      gaps
    
    Some savings:
    LEX: 7032 -> 6880
    THD: 25608 -> 25456
    st_select_lex_unit: 2048 -> 2008
    
    LEX::start():                    1321 -> 1245 instructions
    st_select_lex_unit::init_query()  284 ->  214 instructions
    st_select_lex::init_query():      766 ->  692 instructions
    st_select_lex::init_select():     563 ->  540 instructions
    
    Other things:
    - Removed not used LEX::select_allow_into
    - Fixed MDEV-25510 Assertion `sel->select_lock ==
       st_select_lex::select_lock_type::NONE' which was caused by this commit.
    8e8bda7f
parser.result 95.3 KB