Skip to content

Commit 8c525ef

Browse files
committed
Bug fixes.
1 parent 9d97c5b commit 8c525ef

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

imgsmlr--1.0.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ CREATE OPERATOR <-> (
8383
PROCEDURE = signature_distance
8484
);
8585

86-
CREATE FUNCTION messup_pattern(pattern)
86+
CREATE FUNCTION shuffle_pattern(pattern)
8787
RETURNS pattern
8888
AS 'MODULE_PATHNAME'
8989
LANGUAGE C IMMUTABLE STRICT;

imgsmlr_idx.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,7 @@ signature_picksplit(PG_FUNCTION_ARGS)
252252
bytea *datum_alpha,
253253
*datum_beta;
254254
bytea *datum_l,
255-
*datum_r,
256-
*tmp;
255+
*datum_r;
257256
bool firsttime;
258257
float size_waste,
259258
waste;
@@ -265,7 +264,7 @@ signature_picksplit(PG_FUNCTION_ARGS)
265264
OffsetNumber *left,
266265
*right;
267266
OffsetNumber maxoff;
268-
Signature *signature_l, *signature_r, *signature_tmp;
267+
Signature *signature_l, *signature_r;
269268
bool *distributed;
270269
int undistributed_count;
271270

@@ -326,10 +325,6 @@ signature_picksplit(PG_FUNCTION_ARGS)
326325
set_signature(signature_r, DatumGetByteaP(entryvec->vector[seed_2].key));
327326
size_r = key_size(datum_r);
328327

329-
tmp = (bytea *)palloc(2 * sizeof(Signature) + VARHDRSZ);
330-
SET_VARSIZE(tmp, 2 * sizeof(Signature) + VARHDRSZ);
331-
signature_tmp = (Signature *)VARDATA(tmp);
332-
333328
distributed[seed_1] = true;
334329
*left++ = seed_1;
335330
v->spl_nleft++;

0 commit comments

Comments
 (0)