• Sergei Petrunia's avatar
    Cleanup: fake_select_lex->select_number=FAKE_SELECT_LEX_ID, not [U]INT_MAX · 2656e876
    Sergei Petrunia authored
    SELECT_LEX objects that are "fake_select_lex" (i.e read UNION output)
    used both INT_MAX and UINT_MAX as select_number.
    - mysql_explain_union() assigned UINT_MAX
    - st_select_lex_unit::add_fake_select_lex assigned INT_MAX
    
    This didn't matter initially (before EXPLAIN FORMAT=JSON), because the
    code  had no checks for this value.
    
    EXPLAIN FORMAT=JSON and later other features did introduce checks for
    select_number values. The check had to check for two constants and
    looked really confusing.
    
    This patch joins the two constants into one - FAKE_SELECT_LEX_ID.
    2656e876
sql_explain.h 26 KB