-
Sergey Petrunya authored
The problem: in an uncorrelated subquery, JOIN execution code may make irreversible cleanups after it has been executed (because the subquery won't be executed again). In particular, JTBM nests and their injected IN-equalities will be invalidated (the materialized table will be dropped and TABLE structure freed). Solution: don't walk into Item_subselect if represents an uncorrelated subselect that has already been executed. The idea is that the subselect will not be executed again (calling Item_subselect_xxx::val_int() will fetch the cached value), so it should not matter what is inside the subselect.
0200ee70