From 643c6d35ec707a75b84bc6c320b542b58b7f5f8f Mon Sep 17 00:00:00 2001 From: Dmitry Yemanov Date: Tue, 30 Oct 2018 13:26:37 +0300 Subject: [PATCH] Fixed the regression I introduced some time ago --- src/jrd/recsrc/HashJoin.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/jrd/recsrc/HashJoin.cpp b/src/jrd/recsrc/HashJoin.cpp index 28ba6782c0..5732a5c4da 100644 --- a/src/jrd/recsrc/HashJoin.cpp +++ b/src/jrd/recsrc/HashJoin.cpp @@ -475,6 +475,8 @@ ULONG HashJoin::computeHash(thread_db* tdbb, const SubStream& sub, UCHAR* keyBuffer) const { + memset(keyBuffer, 0, sub.totalKeyLength); + UCHAR* keyPtr = keyBuffer; for (FB_SIZE_T i = 0; i < sub.keys->getCount(); i++) @@ -509,10 +511,6 @@ ULONG HashJoin::computeHash(thread_db* tdbb, memcpy(keyPtr, desc->dsc_address, keyLength); } } - else - { - memset(keyPtr, 0, keyLength); - } keyPtr += keyLength; }