Bug 1249704 - Parameters do not work with LIKE in BASE
Summary: Parameters do not work with LIKE in BASE
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: libreoffice
Version: 22
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Caolan McNamara
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-03 15:27 UTC by John Griffiths
Modified: 2015-08-04 07:23 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-08-04 07:23:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Document Foundation 46207 0 None None None Never

Description John Griffiths 2015-08-03 15:27:25 UTC
Description of problem:
Parameters do not substitute correctly when using the LIKE keyword in a WHERE clause of a query.

Version-Release number of selected component (if applicable):
libreoffice-base-4.4.4.3-6.fc22.x86_64

How reproducible:
always

Steps to Reproduce:
1. Create a query using LIKE without a parameter and execute it. It returns records.
2. Substitute a parameter for part of the LIKE.
3. Execute it. Receive error.

Actual results:
Get error. Using More from error dialog shows 

"SQL Status: 22023

The column index is out of range: 1, number of columns: 0."


Expected results:
Data should return.

Additional info:
Here are two queries. One without parameter that works and one with that does not work. The parameter is prompted for by LibreOffice, the query is just not executed properly.

SELECT "first_name", "last_name", "spouse", "address", "ml_num", "ml_address" FROM "floridasun"."contacts" "contacts" WHERE lower("address") like '%' || 'venice' || '%'

SELECT "first_name", "last_name", "spouse", "address", "ml_num", "ml_address" FROM "floridasun"."contacts" "contacts" WHERE lower("address") like lower('%' || :address || '%')


Note You need to log in before you can comment on or make changes to this bug.