)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"b545710ec189a9a1a0a0f669057a935b04cf482b","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Andrew Karpow \u003candrew.karpow@sap.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2019-01-15 18:22:53 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"postgresl compatibility for get_l3_agent routines"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This commit fixes a bug caused by the sqlalchemy group_by"},{"line_number":10,"context_line":"statement in the get_l3_agent routines when using postgresql."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5fc1f717_89a988de","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":9},"updated":"2019-04-02 08:02:49.000000000","message":"nitty nit: postgresql","commit_id":"58227f396a053f3a479530d43f5db76c68c097ec"},{"author":{"_account_id":28514,"name":"Andrew Karpow","email":"andrew.karpow@sap.com","username":"andyk"},"change_message_id":"e0bf14eefbf342c0dadc06436156c69b2cf08bb7","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Andrew Karpow \u003candrew.karpow@sap.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2019-01-15 18:22:53 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"postgresl compatibility for get_l3_agent routines"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This commit fixes a bug caused by the sqlalchemy group_by"},{"line_number":10,"context_line":"statement in the get_l3_agent routines when using postgresql."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5fc1f717_895ae84d","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":9},"in_reply_to":"5fc1f717_89a988de","updated":"2019-04-02 08:45:01.000000000","message":"urgh, thanks ^^","commit_id":"58227f396a053f3a479530d43f5db76c68c097ec"}],"neutron/objects/agent.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"22e9e40c2a3ac77b208d9dbf56d5b808f98c07b1","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                    rb_model.RouterL3AgentBinding.router_id"},{"line_number":97,"context_line":"                ).label(\u0027count\u0027)).outerjoin("},{"line_number":98,"context_line":"                    rb_model.RouterL3AgentBinding).group_by("},{"line_number":99,"context_line":"                    agent_model.Agent,"},{"line_number":100,"context_line":"                    rb_model.RouterL3AgentBinding"},{"line_number":101,"context_line":"                    .l3_agent_id).order_by(\u0027count\u0027)"},{"line_number":102,"context_line":"            res \u003d query.filter(agent_model.Agent.id.in_(agent_ids)).first()"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_ea148f50","line":99,"updated":"2019-01-16 09:10:11.000000000","message":"In \"group_by\" you need to specify each column independently.\n\nAccording to [1], MySQL have the same behavior only when flag ONLY_FULL_GROUP_BY is enabled.\n\nSQL99 or 2003 will need a primary key. In this case, Agent has \"uniq_agents0agent_type0host\" as unique constrain. So I suggest to group by (Agent.agent_type, Agent.host, RouterL3AgentBinding.l3_agent_id). Can you test this in your environment?\n\n[1] https://medium.com/@riccardoodone/the-love-hate-relationship-between-select-and-group-by-in-sql-4957b2a70229","commit_id":"58227f396a053f3a479530d43f5db76c68c097ec"}]}
