Github user nvazquez commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1593#discussion_r74966728
  
    --- 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 --
    
    Thanks @rafaelweingartner! 
    Absolutely, now I notice there was also a similar 
[comment](https://github.com/apache/cloudstack/pull/1593/files#r67563826) by 
@jburwell about this, I should have explained it a little further on this PR 
description as it can be confusing.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to