aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist
diff options
context:
space:
mode:
authorTeodor Sigaev <teodor@sigaev.ru>2009-09-18 14:03:39 +0000
committerTeodor Sigaev <teodor@sigaev.ru>2009-09-18 14:03:39 +0000
commitf0f4a670293ebce54688d9a7d2ecde1eaae2ed78 (patch)
treecfbb3fd34acbfd7693f3f5dea0cc89f10ad58808 /src/backend/access/gist
parent227771d10ed73acd598dd192a914e3d19ca51080 (diff)
downloadpostgresql-f0f4a670293ebce54688d9a7d2ecde1eaae2ed78.tar.gz
postgresql-f0f4a670293ebce54688d9a7d2ecde1eaae2ed78.zip
Fix incorrect arguments for gist_box_penalty call. The bug could be observed
only for secondary page split (i.e. for non-first columns of index) Patch by Paul Ramsey <pramsey@opengeo.org>
Diffstat (limited to 'src/backend/access/gist')
-rw-r--r--src/backend/access/gist/gistproc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/access/gist/gistproc.c b/src/backend/access/gist/gistproc.c
index 9ba1d9ec252..6ad6f64c194 100644
--- a/src/backend/access/gist/gistproc.c
+++ b/src/backend/access/gist/gistproc.c
@@ -10,7 +10,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/gist/gistproc.c,v 1.9.2.2 2009/04/06 14:47:02 teodor Exp $
+ * $PostgreSQL: pgsql/src/backend/access/gist/gistproc.c,v 1.9.2.3 2009/09/18 14:03:39 teodor Exp $
*
*-------------------------------------------------------------------------
*/
@@ -228,9 +228,9 @@ chooseLR(GIST_SPLITVEC *v,
NULL, NULL, InvalidOffsetNumber, FALSE);
gistentryinit(addon, BoxPGetDatum(union1), NULL, NULL, InvalidOffsetNumber, FALSE);
- DirectFunctionCall3(gist_box_penalty, PointerGetDatum(&oldUnion), PointerGetDatum(&union1), PointerGetDatum(&p1));
+ DirectFunctionCall3(gist_box_penalty, PointerGetDatum(&oldUnion), PointerGetDatum(&addon), PointerGetDatum(&p1));
gistentryinit(addon, BoxPGetDatum(union2), NULL, NULL, InvalidOffsetNumber, FALSE);
- DirectFunctionCall3(gist_box_penalty, PointerGetDatum(&oldUnion), PointerGetDatum(&union2), PointerGetDatum(&p2));
+ DirectFunctionCall3(gist_box_penalty, PointerGetDatum(&oldUnion), PointerGetDatum(&addon), PointerGetDatum(&p2));
if ((v->spl_ldatum_exists && p1 > p2) || (v->spl_rdatum_exists && p1 < p2))
firstToLeft = false;