Frank Kobzik has posted comments on this change.

Change subject: core: Fix splitting logic for ip addresses
......................................................................


Patch Set 2:

Ok, I got it. This patch is problematic 
9e7edd0079331299b024829a5f1dfe82352090d8.

It adds 'DISTINCT' to search queries. The database engine complains about using 
DISTINCT and ORDER BY in conjunction with not having 
fn_get_comparable_ip_list(vm_ip) in the (inner) select clause. If you remove 
DISTINCT, it doesn't crash (if, of course, fn_get_comparable_ip_list function 
is patched).

This is what engine generates:
SELECT * FROM ((SELECT distinct vms.* FROM  vms  )
ORDER BY fn_get_comparable_ip_list(vm_ip)
DESC NULLS LAST,vm_name ASC ) as T1 OFFSET (1 -1) LIMIT 100;

I guess we have 2 options:
1, Go with this patch,
2, Somehow modify the query generating mechanism and if there's something 
dangerous in the order by clause, add it also to select clause. Not sure how 
much feasible/difficult/safe it is.

-- 
To view, visit http://gerrit.ovirt.org/36946
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6923e1d99185e9aca69036edda00293ed1718b92
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Frank Kobzik <fkob...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Frank Kobzik <fkob...@redhat.com>
Gerrit-Reviewer: Lior Vernia <lver...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to