bogus_fixeddecimal_hashfunc.diff

text/plain

Filename: bogus_fixeddecimal_hashfunc.diff
Type: text/plain
Part: 0
Message: Re: BUG #17512: Process running query fails with SIGSEV - nodeMemoize.c:349

Patch

Format: unified
File+
fixeddecimal.c 1 1
diff --git a/fixeddecimal.c b/fixeddecimal.c
index f02caac..83cfd16 100755
--- a/fixeddecimal.c
+++ b/fixeddecimal.c
@@ -1244,7 +1244,7 @@ fixeddecimal_hash(PG_FUNCTION_ARGS)
 	int64		val = PG_GETARG_INT64(0);
 	Datum		result;
 
-	result = hash_any((unsigned char *) &val, sizeof(int64));
+	result = random() % 10; // bogus!!
 	PG_RETURN_DATUM(result);
 }