cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From karuturi <...@git.apache.org>
Subject [GitHub] cloudstack pull request: Fix 2 findbugs SQL_PREPARED_STATEMENT_GEN...
Date Thu, 18 Jun 2015 09:03:17 GMT
Github user karuturi commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/476#discussion_r32710471
  
    --- Diff: server/src/com/cloud/configuration/ConfigurationManagerImpl.java ---
    @@ -926,7 +926,7 @@ protected void checkIfPodIsDeletable(final long podId) {
                     dbName = "cloud";
                 }
     
    -            String selectSql = "SELECT * FROM `" + dbName + "`.`" + tableName + "` WHERE
" + column + " = ?";
    +            String selectSql = "SELECT * FROM `?`.`?` WHERE ? = ?";
     
                 if(tableName.equals("vm_instance")) {
                     selectSql += " AND state != '" + VirtualMachine.State.Expunging.toString()
+ "' AND removed IS NULL";
    --- End diff --
    
    should we also move the state to a variable?


---
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.
---

Mime
View raw message