hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject [3/3] incubator-hawq git commit: HAWQ-373: Fixed QE coredump in pg_encoding_mbcliplen when run concrurrent copy in stress
Date Tue, 02 Feb 2016 03:12:52 GMT
HAWQ-373: Fixed QE coredump in pg_encoding_mbcliplen when run concrurrent copy in stress


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

Branch: refs/heads/master
Commit: 6ec1401fa338b98e2107b9f8f5fd3566c7b09ed8
Parents: 01d8793
Author: Ming LI <mli@pivotal.io>
Authored: Mon Feb 1 12:36:05 2016 +0800
Committer: Ming LI <mli@pivotal.io>
Committed: Tue Feb 2 11:12:03 2016 +0800

----------------------------------------------------------------------
 src/backend/commands/copy.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/6ec1401f/src/backend/commands/copy.c
----------------------------------------------------------------------
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index c99ad0e..ce7483a 100644
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -6243,9 +6243,12 @@ copy_in_error_callback(void *arg)
 			line_start = copy_of_line_buf.data;
 			lineno_delim = memchr(line_start, COPY_METADATA_DELIM, Min(32, cstate->line_buf.len));
 
-			value_len = lineno_delim - line_start + 1;
-			copy_of_line_buf.data += value_len; /* advance beyond line_buf_converted */
-			copy_of_line_buf.len -= value_len;		
+			if (lineno_delim)
+			{
+				value_len = lineno_delim - line_start + 1;
+				copy_of_line_buf.data += value_len; /* advance beyond line_buf_converted */
+				copy_of_line_buf.len -= value_len;
+			}
 		}
 	}
 


Mime
View raw message