aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistproc.c
diff options
context:
space:
mode:
authorTeodor Sigaev <teodor@sigaev.ru>2009-09-18 14:02:40 +0000
committerTeodor Sigaev <teodor@sigaev.ru>2009-09-18 14:02:40 +0000
commit8cc1c8c9f22dcddab697b0016c6ef00d12d31ad7 (patch)
tree7bf2717735e3fd6cf54743c6bf1683e0a67fbbcd /src/backend/access/gist/gistproc.c
parent541569caed0955bd3c6bb09d9a1d23e3d1e28da6 (diff)
downloadpostgresql-8cc1c8c9f22dcddab697b0016c6ef00d12d31ad7.tar.gz
postgresql-8cc1c8c9f22dcddab697b0016c6ef00d12d31ad7.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/gistproc.c')
-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 ef44380e77f..90458304f5b 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.17 2009/06/11 14:48:53 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/access/gist/gistproc.c,v 1.17.2.1 2009/09/18 14:02:40 teodor Exp $
*
*-------------------------------------------------------------------------
*/
@@ -234,9 +234,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;