diff options
author | Teodor Sigaev | 2009-09-18 14:01:56 +0000 |
---|---|---|
committer | Teodor Sigaev | 2009-09-18 14:01:56 +0000 |
commit | 8abd750a297544c1af0b5ca76c9d82141ab39927 (patch) | |
tree | 05f48d8d4074e1e83e4b08218bdacba7eedceeee | |
parent | 663379deda26233a1ef2059d2ce7aac68ace064e (diff) |
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 <[email protected]>
-rw-r--r-- | src/backend/access/gist/gistproc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/access/gist/gistproc.c b/src/backend/access/gist/gistproc.c index 1e135e13a3..bfa098d42e 100644 --- a/src/backend/access/gist/gistproc.c +++ b/src/backend/access/gist/gistproc.c @@ -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; |