Query of Query generating "Unexpected token" error

Description

when executing query of query

<cfquery name="checkIfVaccine" dbtype="query"> SELECT is_vaccine FROM getProcedures WHERE id = <cfqueryparam cfsqltype="cf_sql_integer" value="#fInit.proc#"> </cfquery>

System throws the exception

"Unexpected token: [ in statement [SELECT is_vaccine FROM getProcedures WHERE id = ];Unexpected token: [ in statement [SELECT is_vaccine FROM getProcedures WHERE id = ];lucee.runtime.exp.DatabaseException: Unexpected token: [ in statement [SELECT is_vaccine FROM getProcedures WHERE id = ]

Rolling back to 5.3.3.62 resolves the issue

Environment

Ubuntu 16.04
Lucee 5.3.4.77
Mysql jBDC driver 8.0.18

Activity

Pothys - MitrahSoft 27 May 2020 at 13:21

As per reporter said, I close the ticket.

Dan Graham 27 May 2020 at 12:43

Hi , Sorry for the delay. Dan isn’t with the company anymore, so it took a bit to get access to this account. I have retried with 5.3.6.61 and it appears that the problem is resolved without any code or data changes on our end. I would say that the issue could be closed.

Pothys - MitrahSoft 27 May 2020 at 07:45

, Did you see above my comment?

Pothys - MitrahSoft 16 April 2020 at 15:03

, As per my above comment, This is not an issue with Lucee, it works fine. CF_SQL_INTEGER does not allow empty values. Do you agree with this?

Pothys - MitrahSoft 10 February 2020 at 15:07

Yes, up to 5.3.4.41 SNAPSHOT Lucee allows the empty value as integer in cfqueryparam as cfsqltype="cf_sql_integer". After that cf_sql_integer does not allow the empty value ", because of empty value taken as a string. Lucee allows the integer value only. ACF also not allows empty value.

Closed

Details

Assignee

Reporter

Priority

Labels

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 5 February 2020 at 15:11
Updated 27 May 2020 at 13:23
Resolved 27 May 2020 at 13:23