Change in ovirt-engine[master]: core: Underscores in tag names break tags

yzaslavs at redhat.com yzaslavs at redhat.com
Sun Jun 23 05:54:38 UTC 2013


Yair Zaslavsky has submitted this change and it was merged.

Change subject: core: Underscores in tag names break tags
......................................................................


core: Underscores in tag names break tags

Since '_' is treated in Postgres as '?' when using like, (i.e. match
any single character)
we have to escape this character in the value to make it
treated as a regular character.
Due to changes between PG8.x and PG9.x on ESCAPE
representation in a string, we should
figure out what PG Release is running in order to escape
the special character(_) correctly

The bug was that the above treatment was done on the value no matter
what the operator is, while this change should be applied only for the
LIKE or ILIKE operator. If the operator is '=' '!=' 'IN' etc. the '_'
should stay as is in the passed value and not been manipulated.

Change-Id: Ia4c289e198b59afc4acf3e671ea65f2cdf8e31ad
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=949484
Signed-off-by: Eli Mesika <emesika at redhat.com>
---
M backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/SyntaxChecker.java
1 file changed, 17 insertions(+), 16 deletions(-)

Approvals:
  Yair Zaslavsky: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia4c289e198b59afc4acf3e671ea65f2cdf8e31ad
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list