Error Executing Query with empty queryparam value list

Description

An error occurs anytime a run a database query using the syntax below on mysql 8

x = queryExecute( "SELECT * FROM table WHERE table_id IN (:id)" , { id:{ list :true, value :"" } } )

Note: the value of id is empty/blank ""
I get the following error : Error (java.lang.IndexOutOfBoundsException)

Please help look into this

Environment

Servlet Container : Apache Tomcat/9.0.11
Java: 13 (Oracle Corporation) 64bit
OS Mac OS X (10.15.1) 64bit
Database: mysql 8

Attachments

1
  • 11 Dec 2019, 11:46 pm

Activity

Show:

Zac Spitzer 27 July 2024 at 10:25

updated test to reflect the new behaviour as described by closing this ticket as resolved

https://github.com/lucee/Lucee/commit/d6d612569323c3d11d6e12c5b178250496af072a

however, the new Query() behaviour is wrong, I have opened a new ticket https://luceeserver.atlassian.net/browse/LDEV-5050

Igal Sapir 20 December 2020 at 23:13

Per https://luceeserver.atlassian.net/browse/LDEV-2920 in Lucee 5.3.8.131 we now show a message like:

param [id] may not be empty

For other incompatibility issues see discussion in linked ticket https://luceeserver.atlassian.net/browse/LDEV-2343

Adam Tuttle 3 November 2020 at 14:55

We are also running into this in a migration project from ACF to Lucee. It would be nice if it were fixed, or at least if the error message made any sense at all. “Index 0 out of bounds for length 0” sent me on a wild goose chase to find some rogue code using arrays or array notation.

Abram Adams 29 May 2020 at 23:27

Just noting here that we're running into this issue trying to migrate apps to Lucee.

Pothys - MitrahSoft 12 December 2019 at 10:07

I've checked and added a test case for this ticket & confirmed the issue happened on lucee latest version 5.3.5.52-SNAPSHOT.

Pull request: https://github.com/lucee/Lucee/pull/816

Unresolved

Details

Assignee

Reporter

Priority

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 11 December 2019 at 23:47
Updated 27 July 2024 at 10:25

Flag notifications