mirror of https://github.com/apache/cloudstack.git
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:
parent
13d9070d5e
commit
21cb33a02c
|
|
@ -96,13 +96,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
|
||||
|
|
|
|||
Loading…
Reference in New Issue