Closed vania-pooh closed 7 years ago
Difference between these cases:
# Without suffix we use REGEX
2016-12-29 19:38:17,327 [ XNIO-1 I/O-2] INFO org.meridor.perspective.rest.resources.InstancesResource - Processing query #708 with sql = "select instances.id, instances.real_id, instances.name, projects.id, projects.name, instances.cloud_id, instances.cloud_type, images.name, flavors.name, instances.addresses, instances.state, instances.last_updated from instances inner join projects on instances.project_id = projects.id left join flavors on instances.project_id = flavors.project_id and instances.flavor_id = flavors.id left join images on instances.image_id = images.id where instances.name regexp :instances.name: or instances.name regexp :instances.name1: order by instances.name asc" and parameters = [org.meridor.perspective.sql.Parameter@1d25a2e8[index=<null>, name=instances.name, value=one], org.meridor.perspective.sql.Parameter@34077ef2[index=<null>, name=instances.name1, value=two]]
2016-12-29 19:38:24,254 [ XNIO-1 I/O-2] DEBUG org.meridor.perspective.rest.resources.InstancesResource - Query #708 results = [0 rows, status = success, message = <empty>]
# With suffix we use exact match
2016-12-29 19:39:47,237 [ XNIO-1 I/O-1] INFO org.meridor.perspective.rest.resources.InstancesResource - Processing query #709 with sql = "select instances.id, instances.real_id, instances.name, projects.id, projects.name, instances.cloud_id, instances.cloud_type, images.name, flavors.name, instances.addresses, instances.state, instances.last_updated from instances inner join projects on instances.project_id = projects.id left join flavors on instances.project_id = flavors.project_id and instances.flavor_id = flavors.id left join images on instances.image_id = images.id where instances.name = :instances.name: or instances.name = :instances.name1: order by instances.name asc" and parameters = [org.meridor.perspective.sql.Parameter@71ee79e4[index=<null>, name=instances.name, value=one], org.meridor.perspective.sql.Parameter@6963ed17[index=<null>, name=instances.name1, value=two]]
This was fixed in #138.
Need to test the following: