hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [09/14] incubator-hawq git commit: HAWQ-918. Fix memtuple forming bug when null-saved size is larger than 32763 bytes
Date Tue, 19 Jul 2016 02:50:34 GMT
HAWQ-918. Fix memtuple forming bug when null-saved size is larger than 32763 bytes


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

Branch: refs/heads/2.0.0.0-incubating
Commit: a2a79c6da01972bf66f0ef51e0acd69a3196b58d
Parents: 0e6fe7a
Author: Wen Lin <wlin@pivotal.io>
Authored: Wed Jul 13 09:39:49 2016 +0800
Committer: rlei <rlei@pivotal.io>
Committed: Tue Jul 19 10:49:42 2016 +0800

----------------------------------------------------------------------
 src/backend/access/common/memtuple.c          |  6 ++---
 src/test/regress/expected/aggregates_null.out | 27 ++++++++++++++++++++++
 src/test/regress/known_good_schedule          |  1 +
 src/test/regress/sql/aggregates_null.sql      | 24 +++++++++++++++++++
 4 files changed, 55 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/a2a79c6d/src/backend/access/common/memtuple.c
----------------------------------------------------------------------
diff --git a/src/backend/access/common/memtuple.c b/src/backend/access/common/memtuple.c
index 6d63f5b..be9de54 100644
--- a/src/backend/access/common/memtuple.c
+++ b/src/backend/access/common/memtuple.c
@@ -159,9 +159,9 @@ static inline short compute_null_save_b(short *null_saves, unsigned char
b)
 /* compute the null saved bytes by the whole null bit map, by the attribute
  * physically precedes the one.
  */
-static inline short compute_null_save(short *null_saves, unsigned char *nullbitmaps, int
nbyte, unsigned char nbit)
+static inline int compute_null_save(short *null_saves, unsigned char *nullbitmaps, int nbyte,
unsigned char nbit)
 {
-	short ret = 0;
+	int ret = 0;
 	int curr_byte = 0;
 	while(curr_byte < nbyte) 
 	{
@@ -535,7 +535,7 @@ uint32 compute_memtuple_size(MemTupleBinding *pbind, Datum *values, bool
*isnull
 
 static inline char* memtuple_get_attr_ptr(char *start, MemTupleAttrBinding *bind, short *null_saves,
unsigned char *nullp)
 {
-	short ns = 0;
+	int ns = 0;
 
 	if(nullp)
 		ns = compute_null_save(null_saves, nullp, bind->null_byte, bind->null_mask);


Mime
View raw message