Github user rhtyd commented on the pull request: https://github.com/apache/cloudstack/pull/1551#issuecomment-220091668 @swill I got a report that the GenericDaoBase generate query with multiple filters (order by clauses) may fail for MySQL: SELECT role_permissions.id, role_permissions.uuid, role_permissions.role_id, role_permissions.rule, role_permissions.permission, role_permissions.description, role_permissions.sort_order FROM role_permissions ORDER BY role_permissions.sort_order ASC role_permissions.id ASC; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'role_permissions.id ASC' at line 1 This was reported for mysql-community-server-5.6.23-3.el7.x86_64, though I was unable to reproduce the issue with either MySQL 5.6 or 5.7 (Travis uses 5.5, and on 5.5 too we don't see any issues). Nevertheless, the `ORDER BY id` is not needed for the functionality; in the method we need ORDER BY sort_order i.e return list of role permission by the order set by the root admin. Will, I don't see this as a problem but as this is not necessary therefore can be safely removed.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---