hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject incubator-hawq git commit: HAWQ-155. Fix bug for out of range access to the hdfs file as scan a large tuple.
Date Thu, 21 Jan 2016 09:05:32 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 6cf15d34a -> cb4a95a17


HAWQ-155. Fix bug for out of range access to the hdfs file as scan a large tuple.


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/cb4a95a1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/cb4a95a1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/cb4a95a1

Branch: refs/heads/master
Commit: cb4a95a17b3c56a4bea369152e8a3f58a6d7516b
Parents: 6cf15d3
Author: doli <doli@pivotal.io>
Authored: Thu Jan 21 16:27:48 2016 +0800
Committer: doli <doli@pivotal.io>
Committed: Thu Jan 21 16:27:48 2016 +0800

----------------------------------------------------------------------
 src/backend/cdb/cdbappendonlystorageread.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/cb4a95a1/src/backend/cdb/cdbappendonlystorageread.c
----------------------------------------------------------------------
diff --git a/src/backend/cdb/cdbappendonlystorageread.c b/src/backend/cdb/cdbappendonlystorageread.c
index edd7696..1fc2e20 100644
--- a/src/backend/cdb/cdbappendonlystorageread.c
+++ b/src/backend/cdb/cdbappendonlystorageread.c
@@ -728,8 +728,11 @@ AppendOnlyStorageRead_PositionToNextBlock(
 	 * Determine the maximum boundary of the block.
 	 * UNDONE: When we have a block directory, we will tighten the limit down.
 	 */
-	fileRemainderLen = storageRead->bufferedRead.fileLen -
-		               *headerOffsetInFile;
+	if (isUseSplitLen)
+		fileRemainderLen = storageRead->bufferedRead.splitLen - *headerOffsetInFile;
+	else
+		fileRemainderLen = storageRead->bufferedRead.fileLen - *headerOffsetInFile;
+
 	if (storageRead->maxBufferLen > fileRemainderLen)
 		*blockLimitLen = (int32)fileRemainderLen;
 	else


Mime
View raw message