cfqueryparam sql type cf_sql_integer overflow

Description

it should give an exception like ACF

Environment

MSSQL

<cfquery name="q">
select <cfqueryparam CFSQLTYPE="cf_sql_integer" value="11111111111111111"> as a
</cfquery>
<cfdump var="#q.a#">

LUCEE returns q.a = 2147483647 ( max int )

Activity

Show:
Pothys - MitrahSoft
November 3, 2020, 10:18 AM

I've checked this ticket and confirmed the issue happened in lucee latest version 5.3.8.100-SNAPSHOT.
While using cfqueryparam cfsqltype = cf_sql_integer, if value is greater than integer range means lucee replace with maximum range value. Seems ACF throw a error as invalid data "value" for cfsqltype.

Guardian
November 3, 2020, 12:34 PM

Same, I think, should be fixed for:

DataType

Input

ACF result

Lucee result

CF_SQL_BIGINT

10000223372036854775807

error

9223372036854775807

CF_SQL_TINYINT

10000223372036854775807

error

255

CF_SQL_SMALLINT

10000223372036854775807

error

-1

CF_SQL_DECIMAL

10000223372036854775807

10000223372036854775807

10000223372036853000000

CF_SQL_DOUBLE

10000223372036854775807

1.0000223372E+022

10000223372036853000000

CF_SQL_FLOAT

10000223372036854775807

1.0000223372E+022

10000223832277770000000

CF_SQL_MONEY

10000223372036854775807

1.0000223372E+022

10000223372036853000000

CF_SQL_NUMERIC

10000223372036854775807

10000223372036854775807

10000223372036853000000

CF_SQL_REAL

10000223372036854775807

1.0000224E22

10000223832277770000000

Assignee

Michael Offner

Reporter

Mihail Antibor

Priority

New

Fix versions

None

Affects versions

Configure