Updated Branches: refs/heads/master 8f34dc192 -> b2d2f2c05
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/b2d2f2c0 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b2d2f2c0 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b2d2f2c0 Branch: refs/heads/master Commit: b2d2f2c0500aa5359493a8c05ab5ec0f93967d53 Parents: 8f34dc1 Author: Alena Prokharchyk <[email protected]> Authored: Tue Aug 13 13:56:29 2013 -0700 Committer: Alena Prokharchyk <[email protected]> Committed: Tue Aug 13 17:14:25 2013 -0700 ---------------------------------------------------------------------- engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b2d2f2c0/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java ---------------------------------------------------------------------- diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java index 14b3149..b4bb1f5 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java @@ -2538,9 +2538,9 @@ public class Upgrade410to420 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); } } }
