projects
/
users
/
c2main
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81a23dd
)
Fix uninitialized variable from commit a4d75c86b.
author
Tom Lane
<tgl@sss.pgh.pa.us>
Sun, 11 Apr 2021 15:46:32 +0000
(11:46 -0400)
committer
Tom Lane
<tgl@sss.pgh.pa.us>
Sun, 11 Apr 2021 15:46:46 +0000
(11:46 -0400)
The path for *exprs != NIL would misbehave, and likely crash,
since pull_varattnos expects its last argument to be valid
at call.
Found by Coverity --- we have no coverage of this path in
the regression tests.
src/backend/statistics/extended_stats.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/statistics/extended_stats.c
b/src/backend/statistics/extended_stats.c
index 4674168ff806ef47e5e42f90d92529e1fc46fe44..4bbd85f401ece3eb829072a0bf4484cb6dd8f3ce 100644
(file)
--- a/
src/backend/statistics/extended_stats.c
+++ b/
src/backend/statistics/extended_stats.c
@@
-1609,7
+1609,7
@@
statext_is_compatible_clause(PlannerInfo *root, Node *clause, Index relid,
if (pg_class_aclcheck(rte->relid, userid, ACL_SELECT) != ACLCHECK_OK)
{
- Bitmapset *clause_attnums;
+ Bitmapset *clause_attnums
= NULL
;
/* Don't have table privilege, must check individual columns */
if (*exprs != NIL)