Title:
Dramatic change to CF9's implementation of CFQuery causes major backwards compatibility issues
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): David McGuigan / David McGuigan (David McGuigan)
Created: 03/21/2012
Components: Database
Versions: 10.0
Failure Type:
Found In Build/Fixed In Build: Public Beta / 282072
Priority/Frequency: Major / Some users will encounter
Locale/System: English / Win 2008 Server R2 64 bit
Vote Count: 1
The ability to programmatically manipulate cfquery contents and inject non-simple data into them as demonstrated below is an extremely powerful and valuable capability for certain dynamic programming techniques in ColdFusion.
The code below works in ColdFusion 9 and now errors out with whatever cfqueryparam type the column is ( note no cfqueryparams are even used )
Invalid data { anyNonSimpleContent = true } for CFSQLTYPE CF_SQL_VARCHAR
<cfcomponent>
<cfset this.name = ’arbitrary’ />
<cffunction name="onRequestStart">
<cfquery name="q" datasource="arbitrary"> select * from arbitrary limit X </cfquery>
<cfdump var="#q#" />
<cfset q.arbitraryColumnName[ 1 ] = "bleh" />
<cfdump var="#q#" />
<cfset q.arbitraryColumnName[ 1 ] = { anyNonSimpleContent = true } />
<cfdump var="#q#" />
<cfset querySetCell( q, ’arbitrary’, { }, 1 ) /> <!--- would error too --->
</cffunction>
</cfcomponent>
As it stands now it would require rewriting a large portion of various codebases for us to move to CF 10, which up until the discovery of this bug we'd planned to do on release day, thank you.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3143550
External Customer Info:
External Company:
External Customer Name: David Michael McGuigan
External Customer Email:
Attachments:
Comments: