Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Peter Williamson / Peter Williamson (Peter Williamson)
Created: 06/20/2013
Components: Database
Versions: 10.0
Failure Type: Non Functioning
Found In Build/Fixed In Build: 9.0.1 / 286630
Priority/Frequency: Critical / All users will encounter
Locale/System: English / Windows 7
Vote Count: 0
Problem Description:
MySQL queries in CFScript using the Query object fail when the Assignment Operator is used, :=
Steps to Reproduce:
Create a Query object with an SQL statement like the following (change column and table to match an existing column and table in your DB:
SELECT column, @rownum := @rownum +1 AS `rownumber`
FROM table, ( SELECT @rownum :=0 )
LIMIT 10
Actual Result:
Coldfusion throws a database error
Parameter '=' not found in the list of parameters specified
SQL: SELECT column, @rownum := @rownum + 1 AS `rownumber` FROM table, ( SELECT @rownum :=0 ) LIMIT 10
Expected Result:
The result set should be 10 values from table.column, with the integer 1 - 10 as the second value in the results, which mimics the #currentrow#
Any Workarounds:
The query runs fine using a <cfquery> tag, alternatively table.column could be selected on it's own, then the results looped over and a new column added to store the #currentrow#
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3581895
External Customer Info:
External Company:
External Customer Name: PeteComcar
External Customer Email:
External Test Config: My Hardware and Environment details:
Ubuntu 12.0.4 LTS on VirtualBox, running on Windows 7
Coldfusion 9,0,2,282541
Mysql 5.1.37-1ubuntu5.5-log
Attachments:
- June 20, 2013 00:00:00: 1_query-bug.cfm
Comments: