CLOUDSTACK-4516:[Upgrade][VMWare]

MySQLIntegrityConstraintViolationException while performing any task
using local storage after upgrade from 3.0.7 to 4.2.
This commit is contained in:
Min Chen 2013-08-27 14:11:55 -07:00
parent a2ade45231
commit 18b301edb9
1 changed files with 3 additions and 3 deletions

View File

@ -95,13 +95,13 @@ public class DefaultEndPointSelector implements EndPointSelector {
sbuilder.append(sqlBase);
if (scope.getScopeType() == ScopeType.HOST) {
sbuilder.append(" and id = ");
sbuilder.append(" and h.id = ");
sbuilder.append(scope.getScopeId());
} else if (scope.getScopeType() == ScopeType.CLUSTER) {
sbuilder.append(" and cluster_id = ");
sbuilder.append(" and h.cluster_id = ");
sbuilder.append(scope.getScopeId());
} else if (scope.getScopeType() == ScopeType.ZONE) {
sbuilder.append(" and data_center_id = ");
sbuilder.append(" and h.data_center_id = ");
sbuilder.append(scope.getScopeId());
}
// TODO: order by rand() is slow if there are lot of hosts