• unknown's avatar
    Fixed bug #15538: unchecked table absence caused server crash. · 4e2e0c6d
    unknown authored
    Absence of table in left part of LEFT/RIGHT join wasn't checked before
    name resolution which resulted in NULL dereferencing and server crash.
    
    Modified rules: 
    "table_ref LEFT opt_outer JOIN_SYM table_ref" and "table_ref RIGHT opt_outer 
    JOIN_SYM table_ref"
    NULL check is moved before push_new_name_resolution_context()
    
    
    sql/sql_yacc.yy:
      Fixed bug #15538: unchecked table absence caused server crash.
      Modified rules:
      "table_ref LEFT opt_outer JOIN_SYM table_ref" and "table_ref RIGHT opt_outer 
      JOIN_SYM table_ref"
      NULL check is moved before push_new_name_resolution_context()
    mysql-test/r/select.result:
      Added test case for bug #15538: unchecked table absence caused server crash.
    mysql-test/t/select.test:
      Added test case for bug #15538: unchecked table absence caused server crash.
    4e2e0c6d
sql_yacc.yy 233 KB