Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 36112200B5C for ; Thu, 11 Aug 2016 19:44:25 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 34CF4160A93; Thu, 11 Aug 2016 17:44:25 +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 6FE3E160A90 for ; Thu, 11 Aug 2016 19:44:24 +0200 (CEST) Received: (qmail 80131 invoked by uid 500); 11 Aug 2016 17:44:23 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 80118 invoked by uid 99); 11 Aug 2016 17:44:23 -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; Thu, 11 Aug 2016 17:44:23 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0F67BE03E8; Thu, 11 Aug 2016 17:44:23 +0000 (UTC) From: rafaelweingartner To: dev@cloudstack.apache.org Reply-To: dev@cloudstack.apache.org References: In-Reply-To: Subject: [GitHub] cloudstack pull request #1593: CLOUDSTACK-9417: Usage module refactoring Content-Type: text/plain Message-Id: <20160811174423.0F67BE03E8@git1-us-west.apache.org> Date: Thu, 11 Aug 2016 17:44:23 +0000 (UTC) archived-at: Thu, 11 Aug 2016 17:44:25 -0000 Github user rafaelweingartner commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1593#discussion_r74468365 --- Diff: usage/src/com/cloud/usage/UsageSanityChecker.java --- @@ -72,7 +72,9 @@ protected boolean checkItemCountByPstmt(CheckCase checkCase) throws SQLException try (PreparedStatement pstmt = conn.prepareStatement(checkCase.sqlTemplate)) { if(checkCase.checkId) { pstmt.setInt(1, lastId); - pstmt.setInt(2, maxId); + if (maxId > 0) { + pstmt.setInt(2, maxId); --- End diff -- Is this set the setting of the parameter for the SQL excerpt at line 216? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---