Change in ovirt-engine[master]: core: Fix splitting logic for ip addresses

Tomas Jelinek has submitted this change and it was merged. Change subject: core: Fix splitting logic for ip addresses ...................................................................... core: Fix splitting logic for ip addresses This patch fixes broken sorting of IP address columns. There were 2 causes of the problem: 1, The problem reproduced when function received string of whitespaces or list of more than one ip addresses (the list wasn't correctly split and caused errors with 'inet' type cast). The cause is non-duplicated backslash when specifying pattern. Fixed by adding duplicated backslash [1]. 2, Previously, the constructed query looked like this: (SELECT distinct vms.* FROM vms ) ORDER BY fn_get_comparable_ip_list(vm_ip) DESC NULLS LAST,vm_name ASC; This is, however problematic since postgresql complains about missing fn_get_comparable_ip_list(vm_ip) in SELECT clause. This was fixed by adding a new field in vms and vms_with_tags views. [1]: http://www.postgresql.org/docs/9.3/static/functions-matching.html Change-Id: I6923e1d99185e9aca69036edda00293ed1718b92 Bug-Url: https://bugzilla.redhat.com/1164235 Signed-off-by: Frantisek Kobzik <fkobzik@redhat.com> --- M backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/VmConditionFieldAutoCompleter.java M packaging/dbscripts/create_functions.sql M packaging/dbscripts/create_views.sql 3 files changed, 5 insertions(+), 3 deletions(-) Approvals: Eli Mesika: Looks good to me, but someone else must approve Frank Kobzik: Verified Omer Frenkel: Looks good to me, approved Lior Vernia: Looks good to me, but someone else must approve -- To view, visit https://gerrit.ovirt.org/36946 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6923e1d99185e9aca69036edda00293ed1718b92 Gerrit-PatchSet: 5 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Frank Kobzik <fkobzik@redhat.com> Gerrit-Reviewer: Eli Mesika <emesika@redhat.com> Gerrit-Reviewer: Frank Kobzik <fkobzik@redhat.com> Gerrit-Reviewer: Lior Vernia <lvernia@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofrenkel@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjelinek@redhat.com> Gerrit-Reviewer: automation@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server
participants (1)
-
tjelinek@redhat.com