Repair bug reported by Wickstrom: backend would crash if WHERE clause
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 14 Apr 2000 00:19:17 +0000 (00:19 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 14 Apr 2000 00:19:17 +0000 (00:19 +0000)
commit9d91db4fdeaa32d2680b08fe15f62599ffd22c83
treeeeb2455cf168fe3ec3da077365ec448592cad734
parent2e67ecaf6f30b56411a75ceb5987f487a54387e9
Repair bug reported by Wickstrom: backend would crash if WHERE clause
contained a sub-SELECT nested within an AND/OR tree that cnfify()
thought it should rearrange.  Same physical sub-SELECT node could
end up linked into multiple places in resulting expression tree.
This is harmless for most node types, but not for SubLink.
Repair bug by making physical copies of subexpressions that get
logically duplicated by cnfify().  Also, tweak the heuristic that
decides whether it's a good idea to do cnfify() --- we don't really
want that to happen when it would cause multiple copies of a subselect
to be generated, I think.
src/backend/optimizer/plan/subselect.c
src/backend/optimizer/prep/prepqual.c