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: c1b9ec2)
Fix incorrect cleanup of tsquery in ts_rewrite(). Per bug #4933 by
2009年7月28日 09:31:55 +0000 (09:31 +0000)
2009年7月28日 09:31:55 +0000 (09:31 +0000)
Aaron Marcuse-Kubitza <aaronmk@blackducksoftware.com>


diff --git a/src/backend/utils/adt/tsquery_rewrite.c b/src/backend/utils/adt/tsquery_rewrite.c
index 981c729d953dd745bc17776389e730c38f952b45..d4f673340338cb330c4c1d2606ec9551ca0c7010 100644 (file)
--- a/src/backend/utils/adt/tsquery_rewrite.c
+++ b/src/backend/utils/adt/tsquery_rewrite.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/tsquery_rewrite.c,v 1.15 2009年07月16日 06:33:44 petere Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/tsquery_rewrite.c,v 1.16 2009年07月28日 09:31:55 teodor Exp $
*
*-------------------------------------------------------------------------
*/
@@ -217,12 +217,12 @@ dropvoidsubtree(QTNode *root)
root->nchild = j;
- if (root->valnode->qoperator.oper == OP_NOT && root->nchild == 0)
+ if (root->nchild == 0)
{
QTNFree(root);
root = NULL;
}
- else if (root->nchild == 1)
+ else if (root->nchild == 1 && root->valnode->qoperator.oper != OP_NOT)
{
QTNode *nroot = root->child[0];
This is the main PostgreSQL git repository.
RSS Atom

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