Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C44EAF121 for ; Sun, 5 May 2013 02:48:54 +0000 (UTC) Received: (qmail 1795 invoked by uid 500); 5 May 2013 02:48:54 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 1718 invoked by uid 500); 5 May 2013 02:48:54 -0000 Mailing-List: contact commits-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 commits@cloudstack.apache.org Received: (qmail 1682 invoked by uid 99); 5 May 2013 02:48:54 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 May 2013 02:48:54 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id F41F2886F61; Sun, 5 May 2013 02:48:53 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sateesh@apache.org To: commits@cloudstack.apache.org Date: Sun, 05 May 2013 02:48:58 -0000 Message-Id: <0a3e67f31b3e4ef7a99eb49967a2467f@git.apache.org> In-Reply-To: <071906ae4c6544a6bb43d2385ee9b572@git.apache.org> References: <071906ae4c6544a6bb43d2385ee9b572@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [06/11] git commit: updated refs/heads/vmware-datamodel to 3201dbf CLOUDSTACK-2303: upgrade failed from 2.2.14 to 4.1.0 - part2 Signed-off-by: Chip Childers Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a3a5c134 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a3a5c134 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a3a5c134 Branch: refs/heads/vmware-datamodel Commit: a3a5c13427d6871f87da291425314b18ef64fa2a Parents: c8e3fff Author: Wei Zhou Authored: Fri May 3 16:01:44 2013 +0100 Committer: Chip Childers Committed: Fri May 3 16:03:56 2013 +0100 ---------------------------------------------------------------------- .../src/com/cloud/upgrade/dao/Upgrade2214to30.java | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3a5c134/server/src/com/cloud/upgrade/dao/Upgrade2214to30.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/upgrade/dao/Upgrade2214to30.java b/server/src/com/cloud/upgrade/dao/Upgrade2214to30.java index 817231f..2d77429 100644 --- a/server/src/com/cloud/upgrade/dao/Upgrade2214to30.java +++ b/server/src/com/cloud/upgrade/dao/Upgrade2214to30.java @@ -630,7 +630,7 @@ public class Upgrade2214to30 extends Upgrade30xBase implements DbUpgrade { //XenServer try { //Get 3.0.0 or later xenserer system Vm template Id - pstmt = conn.prepareStatement("select id from `cloud`.`vm_template` where name like 'systemvm-xenserver-%' and removed is null"); + pstmt = conn.prepareStatement("select max(id) from `cloud`.`vm_template` where name like 'systemvm-xenserver-%' and removed is null"); rs = pstmt.executeQuery(); if(rs.next()){ long templateId = rs.getLong(1); @@ -661,7 +661,7 @@ public class Upgrade2214to30 extends Upgrade30xBase implements DbUpgrade { s_logger.debug("Updating KVM System Vms"); try { //Get 3.0.0 or later KVM system Vm template Id - pstmt = conn.prepareStatement("select id from `cloud`.`vm_template` where name like 'systemvm-kvm-%' and removed is null"); + pstmt = conn.prepareStatement("select max(id) from `cloud`.`vm_template` where name like 'systemvm-kvm-%' and removed is null"); rs = pstmt.executeQuery(); if(rs.next()){ long templateId = rs.getLong(1); @@ -692,7 +692,7 @@ public class Upgrade2214to30 extends Upgrade30xBase implements DbUpgrade { s_logger.debug("Updating VMware System Vms"); try { //Get 3.0.0 or later VMware system Vm template Id - pstmt = conn.prepareStatement("select id from `cloud`.`vm_template` where name like 'systemvm-vmware-%' and removed is null"); + pstmt = conn.prepareStatement("select max(id) from `cloud`.`vm_template` where name like 'systemvm-vmware-%' and removed is null"); rs = pstmt.executeQuery(); if(rs.next()){ long templateId = rs.getLong(1);