• unknown's avatar
    Fixed bug #18279: crash in the cases when on conditions are moved · 9a02fede
    unknown authored
    out of a nested join to the on conditions for the nest.
    The bug happened due to:
    1. The function simplify_joins could change on expressions for nested joins.
       Yet modified on expressions were not saved in prep_on_expr.
    2. On expressions were not restored for nested joins in 
       reinit_stmt_before_use.
    
    
    mysql-test/r/join_nested.result:
      Added a test case for bug #18279.
    mysql-test/t/join_nested.test:
      Added a test case for bug #18279.
    sql/sql_prepare.cc:
      Fixed bug #18279.
      On expressions were not restored for nested joins in 
      reinit_stmt_before_use.
    sql/sql_select.cc:
      Fixed bug #18279.
      The function simplify_joins could change on expressions for nested joins.
      Yet modified on expressions were not saved in prep_on_expr.
    9a02fede
join_nested.result 51.6 KB