Status/Resolution/Reason: Closed/Won't Fix/NotWorthEffort
Reporter/Name(from Bugbase): Rory Brown / Rory Brown (gozargozarian3)
Created: 06/26/2013
Components: Database
Versions: 10.0
Failure Type: Data Corruption
Found In Build/Fixed In Build: Final /
Priority/Frequency: Minor / All users will encounter
Locale/System: English / Windows 7
Vote Count: 2
Problem Description:
When using trim inside of a cfquery, but not as part of the query, all single apostrophes are duplicated into two.
Steps to Reproduce:
Run the following code:
<cfset testCont = "This isn't my test ">
<cfset expected = Trim(testCont)>
<cfquery name="qryTest" datasource="MyDataSource">
<cfset badresult = Trim(testCont)>
SELECT TOP 1 * FROM something
</cfquery>
<cfoutput>#expected# - #badresult#</cfoutput>
Actual Result:
The variable "badresult" contains duplicated apostrophes, but the "expected" variable is normal.
Expected Result:
I would expect Trim() to always work as documented. Apostrophes should only duplicate if used without a cfqueryparam and without PreserveSingleQuotes()
Any Workarounds:
Do your Trimming outside of a query.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3585643
Deployment Phase: Release Candidate
External Customer Info:
External Company:
External Customer Name: gozargozarian3
External Customer Email:
External Test Config: My Hardware and Environment details: Windows 7, Coldfusion Enterprise 10, IIS 7.5
Attachments:
Comments: