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
a2ade45231
commit
18b301edb9
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue