git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d8d4965)
Fix segmentation fault that an empty prepared statement could cause.
Thu, 4 Sep 2014 17:17:57 +0000 (02:17 +0900)
Thu, 4 Sep 2014 17:17:57 +0000 (02:17 +0900)
Back-patch to all supported branches.

Per bug #11335 from Haruka Takatsuka


diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c
index f648945ffa3e7093154609c0f9339da880707c94..40ac47f5c2db3e9b09514d9f7e59f1d75e794952 100644 (file)
--- a/src/backend/tcop/utility.c
+++ b/src/backend/tcop/utility.c
@@ -2461,6 +2461,9 @@ GetCommandLogLevel(Node *parsetree)
{
LogStmtLevel lev;
+ if (parsetree == NULL)
+ return LOGSTMT_ALL;
+
switch (nodeTag(parsetree))
{
/* raw plannable queries */
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /