Change in ovirt-engine[master]: core: Fix splitting logic for ip addresses
tjelinek at redhat.com
tjelinek at redhat.com
Wed Mar 11 08:12:53 UTC 2015
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 at 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 at redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Frank Kobzik <fkobzik at redhat.com>
Gerrit-Reviewer: Lior Vernia <lvernia at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the Engine-commits
mailing list