Status/Resolution/Reason: Closed/Withdrawn/Duplicate
Reporter/Name(from Bugbase): JF Robichaud / JF Robichaud (jfrobishow)
Created: 01/06/2015
Components: Database
Versions: 11.0
Failure Type: Data Corruption
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Normal / Most users will encounter
Locale/System: ALL / Win 2008 Server R2 64 bit
Vote Count: 1
Duplicate ID: CF-3784311
Problem Description: Passing a comma seperated list of value to cf_sql_integer will do an internal cast to a type I couldn't identify resulting in data corruption in the query.
Steps to Reproduce:
<cfset x = "1,100">
<cfdump var="#isNumeric(x)#"> <!--- FALSE --->
<cfdump var="#isValid("integer", x)#"> <!--- TRUE before CF 11, CF 11 FALSE which is expected --->
<cfquery name="myquery" datasource="yourdatasource">
create table ##tmp (col1 int)
insert into ##tmp (col1) values(<cfqueryparam cfsqltype="cf_sql_integer" value="#x#">)
select * from ##tmp
drop table ##tmp
</cfquery>
<cfdump var="#myquery#">
Actual Result:
-657436 is inserted in the table even though we have validated that the value passed to cfqueryparam is neither numeric or an integer.
Expected Result: Invalid data type exception
Any Workarounds: No
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3916658
External Customer Info:
External Company:
External Customer Name: jfrobishow
External Customer Email:
External Test Config: My Hardware and Environment details: Using a MS SQL 2012 datasource with the default driver.
Attachments:
Comments: