aboutsummaryrefslogtreecommitdiff
path: root/contrib/intarray/_int.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/intarray/_int.c')
-rw-r--r--contrib/intarray/_int.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/intarray/_int.c b/contrib/intarray/_int.c
index a642998cd44..35ee7a659e2 100644
--- a/contrib/intarray/_int.c
+++ b/contrib/intarray/_int.c
@@ -1457,6 +1457,10 @@ _int_common_picksplit(bytea *entryvec,
v->spl_nleft = 0;
right = v->spl_right;
v->spl_nright = 0;
+ if ( seed_1 == 0 || seed_2 == 0 ) {
+ seed_1 = 1;
+ seed_2 = 2;
+ }
datum_alpha = (ArrayType *) DatumGetPointer(((GISTENTRY *) VARDATA(entryvec))[seed_1].key);
datum_l = copy_intArrayType(datum_alpha);