Updated Branches:
  refs/heads/4.2 95d7c499c -> e9239b83a

Fixed deployDb - in setRAWformatForRBDVolumes use executeUpdate instead of 
executeQuery when perform an update with the prepared statement


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e9239b83
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e9239b83
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e9239b83

Branch: refs/heads/4.2
Commit: e9239b83a06315a6d6c06e9ee44a1f9f50be84c3
Parents: 95d7c49
Author: Alena Prokharchyk <[email protected]>
Authored: Tue Aug 13 13:56:29 2013 -0700
Committer: Alena Prokharchyk <[email protected]>
Committed: Tue Aug 13 14:03:11 2013 -0700

----------------------------------------------------------------------
 engine/schema/src/com/cloud/upgrade/dao/Upgrade412to420.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e9239b83/engine/schema/src/com/cloud/upgrade/dao/Upgrade412to420.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade412to420.java 
b/engine/schema/src/com/cloud/upgrade/dao/Upgrade412to420.java
index 4e1e094..0c77ce4 100644
--- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade412to420.java
+++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade412to420.java
@@ -2619,9 +2619,9 @@ public class Upgrade412to420 implements DbUpgrade {
         try {
             s_logger.debug("Setting format to RAW for all volumes on RBD 
primary storage pools");
             pstmt = conn.prepareStatement("UPDATE volumes SET format = 'RAW' 
WHERE pool_id IN(SELECT id FROM storage_pool WHERE pool_type = 'RBD')");
-            pstmt.executeQuery();
+            pstmt.executeUpdate();
         } catch (SQLException e) {
-            throw new CloudRuntimeException("Failed to update volume format to 
RAW for volumes on RBD pools");
+            throw new CloudRuntimeException("Failed to update volume format to 
RAW for volumes on RBD pools due to exception ", e);
         }
     }
 }

Reply via email to