Status/Resolution/Reason: Closed/Fixed/Fixed
Reporter/Name(from Bugbase): DANIEL REILLY / ()
Created: 04/16/2018
Components: Database
Versions: 2016,2018
Failure Type: Incorrectly functioning
Found In Build/Fixed In Build: 2016,0,03,301771 / 311735
Priority/Frequency: Normal / All users will encounter
Locale/System: English / uBuntu 16.10
Vote Count: 3
Problem Description: This bug was reported and fixed for CF11, but seems to have been reintroduced. Original bug report can be found here: https://tracker.adobe.com/#/view/CF-3943345
When using named parameters within queryExecute, a parameter that is the substring of another parameter is incorrectly being inserted in the statement where the latter exists.
Steps to Reproduce:
{code:java}
queryExecute(
"INSERT INTO cf_test (
col1
,col2
)
VALUES (
:col
,:col2
)"
,{
col = {value="1", cfsqlType="cf_sql_varchar"}
,col2 = {value="2", cfsqlType="cf_sql_varchar"}
}
,{datasource=MyDB, result="testRecordResults"}
);
{code}
Actual Result: The queryExecute function will throw an error with a message of: "Incorrect syntax near '2'".
Expected Result: Normal query execution.
Any Workarounds: If the second param is changed to be something different, or even prepended with a different character, ":zcol2" for example, it will execute as expected.
Attachments:
Comments: