Using sqltype="smallint" in cfqueryparam doesn't return any results at all.

Description

Running a query where sqltype of cfqueryparam is set to smallint causes query to return 0 results. I'm not entirely sure if this is across the board as this particular application has been offline since switching from ACF, but even after updating lucee to latest version queries as simple as "select id from table where id=<cfqueryparam value="#url.id#" sqltype="smallint" maxlength="5">" return 0 results. Swap out 'smallint' for 'integer' and the expected results return. Personally I'd call this a blocker, but have set it as critical as it seems like no one else has run into it. But it clearly has the potential to massively affect outcomes.

I have logged two of the 'smallint' related issues here I can see after a search. Should I be using something else? It seems strange I keep being the only person running into these?

Environment

Lucee & mysql.

relates to

Activity

Show:

Pothys - MitrahSoft 15 March 2021 at 12:32

I've checked this ticket and confirmed the issue happened on lucee latest version 5.3.8.159-SNAPSHOT also. If we set unsigned data value is higher than the max range signed value means lucee select query doesn't return the result. Seems ACF returns the result correctly.

Pull Request: https://github.com/lucee/Lucee/pull/1232

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 14 March 2021 at 19:01
Updated 19 November 2021 at 14:22

Flag notifications