For oracle database, the usage of REGEXP is not correct for List Servers by filter.

Bug #1230102 reported by Qing Xin Meng
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Qing Xin Meng

Bug Description

The REGEXP_LIKE operator for oracle db backend is not correct.

For the MySql database, the following SQL syntax is right:
---
select xxx from xxx where column REGEXP pattern
---

But for Oracle database, the following SQL syntax is not right:
---
select xxx from xxx where column REGEXP_LIKE pattern
---

It should be:
---
select xxx from xxx where REGEXP_LIKE (column, pattern)
---

Tags: db
Qing Xin Meng (mengqxqx)
Changed in nova:
assignee: nobody → Qing Xin Meng (mengqxqx)
Changed in nova:
status: New → In Progress
David Ripton (dripton)
tags: added: db
Changed in nova:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/45026
Committed: http://github.com/openstack/nova/commit/3dad53ce1d0263786c3f9ff585dc446a0a9dbecf
Submitter: Jenkins
Branch: master

commit 3dad53ce1d0263786c3f9ff585dc446a0a9dbecf
Author: QingXin Meng <email address hidden>
Date: Wed Sep 4 01:52:53 2013 -0700

    Code change for regex filter matching

    Remove REGEXP_LIKE operator for oracle db backend since it's not suitable,
    Such as:
    Oracle: 'select xxx from xxx where REGEXP_LIKE (column, pattern)'
    Mysql: 'select xxx from xxx where column REGEXP pattern'

    For the simple pattern matching(LIKE operator) used for unsupported backend db,
    add '%' wildcard character on both sides of the value.

    Change-Id: I4682d38086a06032bb5650a14b253f6b2b859613
    Closes-Bug: #1230102

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.