• Monty's avatar
    Problem was that for cases like: · 8c815751
    Monty authored
    SELECT ... WHERE XX IN (SELECT YY)
    this was transformed to something like:
    SELECT ... WHERE IF_EXISTS(SELECT ... HAVING XX=YY)
    
    The bug was that for normal execution XX was fixed in the original outer SELECT context while in PS it was fixed in the sub query context and this confused the optimizer.
    
    Fixed by ensuring that XX is always fixed in the outer context.
    8c815751
sql_base.cc 322 KB