From commits-return-6824-archive-asf-public=cust-asf.ponee.io@trafodion.apache.org Fri Feb 2 05:08:50 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 499A3180652 for ; Fri, 2 Feb 2018 05:08:50 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 31BE6160C57; Fri, 2 Feb 2018 04:08:50 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 76DAB160C44 for ; Fri, 2 Feb 2018 05:08:49 +0100 (CET) Received: (qmail 78843 invoked by uid 500); 2 Feb 2018 04:08:48 -0000 Mailing-List: contact commits-help@trafodion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: commits@trafodion.apache.org Delivered-To: mailing list commits@trafodion.apache.org Received: (qmail 78824 invoked by uid 99); 2 Feb 2018 04:08:48 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Feb 2018 04:08:48 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 73BF1DFB31; Fri, 2 Feb 2018 04:08:48 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sureshs@apache.org To: commits@trafodion.apache.org Date: Fri, 02 Feb 2018 04:08:48 -0000 Message-Id: <30ab25e604d347e587d6a7a5d75ad2a2@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] trafodion git commit: fix TRAFODION-2930 [FIRST N] will cause sqlci core dump Repository: trafodion Updated Branches: refs/heads/master 3e149d2c3 -> e392ffc44 fix TRAFODION-2930 [FIRST N] will cause sqlci core dump Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/28e0c559 Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/28e0c559 Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/28e0c559 Branch: refs/heads/master Commit: 28e0c559180a0fca488047c29e993a21eef15a5a Parents: 6d38e58 Author: kakaxi3019 Authored: Thu Feb 1 01:23:46 2018 +0000 Committer: kakaxi3019 Committed: Thu Feb 1 01:23:46 2018 +0000 ---------------------------------------------------------------------- core/sql/executor/ExFirstN.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafodion/blob/28e0c559/core/sql/executor/ExFirstN.cpp ---------------------------------------------------------------------- diff --git a/core/sql/executor/ExFirstN.cpp b/core/sql/executor/ExFirstN.cpp index 0937eea..a8e562e 100644 --- a/core/sql/executor/ExFirstN.cpp +++ b/core/sql/executor/ExFirstN.cpp @@ -202,7 +202,14 @@ short ExFirstNTcb::work() // 0 means process all but don't return any rows. // -1 means get all rows. Should not reach this state. // <-1 means return the last '-(N+2)' rows. - effectiveFirstN_ = firstnTdb().firstNRows(); + //TRAFODION-2930 + //fix [first 600000000000] crash + //effectiveFirstN_ = firstnTdb().firstNRows(); + Int64 nFirstN = firstnTdb().firstNRows(); + Int64 nMaxInt = INT_MAX; + effectiveFirstN_ = Lng32( min( nMaxInt,nFirstN ) ); + //TRAFODION-2930 + returnedSoFar_ = 0; if (firstnTdb().firstNRowsExpr_)