[ https://issues.apache.org/jira/browse/CLOUDSTACK-8805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14734049#comment-14734049 ]
ASF GitHub Bot commented on CLOUDSTACK-8805: -------------------------------------------- Github user rafaelweingartner commented on the pull request: https://github.com/apache/cloudstack/pull/775#issuecomment-138383672 Tested on 4.3.2, and in that version this problem happens. I would say that calling a domain “%” sees odd, but in some cases I guess that might be needed. I tested the solution you proposed with squirrel SQL client, and that did not work out. Have you tested on your environment? In my database I created a domain called % and a subdomain called test, being /%/ the path of the parent domain and /%/test/ the path of the subdomain. Your change would generate an SQL such as this one (if I try to forcefully delete the domain %): select * from domain where path like "%replace('/%/','%','[%]')%" I have not tested on my environment, but just by looking how the SQLs are generated and how the filter values are set (using prepared statements), that does not seem to work. I think the best way would be to use \, to escape the % character. Something like this I think would work: sc1.addAnd("path", SearchCriteria.Op.LIKE, "%" + StringUtils.replace(domainHandle.getPath(), "%", "\\%") + "%"); > Domains become inactive automatically. > -------------------------------------- > > Key: CLOUDSTACK-8805 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8805 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Reporter: Nitin Kumar Maharana > > If there is a domain with name '%', if we force delete the '%' domain then > all the other domains become inactive except Root domain. -- This message was sent by Atlassian JIRA (v6.3.4#6332)