summaryrefslogtreecommitdiff
path: root/src/tutorial
diff options
context:
space:
mode:
authorTom Lane2022-08-05 17:58:37 +0000
committerTom Lane2022-08-05 17:58:47 +0000
commit94da73281ed93c86d2f286996bcd61d8bfac4ffd (patch)
tree90c5ba33b1eb4f76a1b0565fef9ad4162330a5cd /src/tutorial
parentd7714c1454c36e910b9caab107d5241f6a273521 (diff)
Fix non-bulletproof ScalarArrayOpExpr code for extended statistics.
statext_is_compatible_clause_internal() checked that the arguments of a ScalarArrayOpExpr are one Var and one Const, but it would allow cases where the Const was on the left. Subsequent uses of the clause are not expecting that and would suffer assertion failures or core dumps. mcv.c also had not bothered to cope with the case of a NULL array constant, which seems really unacceptably sloppy of somebody. (Although our tools failed us there too, since AFAIK neither Coverity nor any compiler warned of the obvious use-of-uninitialized-variable condition.) It seems best to handle that by having statext_is_compatible_clause_internal() reject it. Noted while fixing bug #17570. Back-patch to v13 where the extended stats code grew some awareness of ScalarArrayOpExpr.
Diffstat (limited to 'src/tutorial')
0 files changed, 0 insertions, 0 deletions