tracker issue : CF-3350030

select a category, or use search below
(searches all categories and all time range)
Title:

Some Query of Query errors are 500 errors

| View in Tracker

Status/Resolution/Reason: Closed/Won't Fix/NotWorthEffort

Reporter/Name(from Bugbase): Raymond Camden / Raymond Camden (Raymond Camden)

Created: 10/19/2012

Components: General Server

Versions: 10.0

Failure Type: Crash

Found In Build/Fixed In Build: Final /

Priority/Frequency: Critical / Some users will encounter

Locale/System: English / Windows 7 64-bit

Vote Count: 1

Create a simple query. Do a query of query on it. Then try to add an intentional error to your QOQ. So for example, select * from queryname where x=1. Ensure your first test is an invalid column. You should get a normal CF error. Then do this:

where x = "d"

Note the double quotes. This creates a 500 level error that isn't handled by CF. Try/Catch doesn't even work.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3350030

External Customer Info:
External Company:  
External Customer Name: cfjedimaster
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

Interesting. I never noticed this before - prob b/c I don't use double-quotes. In a regular query, double-quotes are supported. In a QoQ, double-quotes have mixed results. Example: <!--- The double-quotes are valid. Query succeeds. (good) ---> <cfquery name="q1" datasource="cfartgallery"> select * from "ART" where "ARTID" = 1 order by "ARTID" </cfquery> <cfdump var="#q1#" /> <!--- The double-quotes are valid. Query throws an exception. (bad) ---> <cftry> <cfquery name="q2" dbtype="query"> select * from q1 where "ARTID" = 1 order by "ARTID" </cfquery> <cfdump var="#q2#" /> <cfcatch><cfdump var="#CFCATCH.cause.message#" /></cfcatch> </cftry> <!--- The double-quotes are invalid. Query throws no exception. (bad) ---> <cftry> <cfquery name="q3" dbtype="query"> select * from q1 where artid = "1" </cfquery> <cfdump var="#q3#" /> <cfcatch><cfdump var="#CFCATCH#" /></cfcatch> </cftry> The 2nd query should not throw an exception. The 3rd query SHOULD throw an exception. Just offering the code I used to play w/ this - in case it helps.
Comment by External U.
17452 | October 19, 2012 09:46:15 PM GMT
+1, the error should not be silent. A try/catch should work here.
Vote by External U.
17454 | October 19, 2012 09:48:24 PM GMT
Not worth fixing it. you should not use the column name in quotes
Comment by Rupesh K.
17453 | September 10, 2013 01:32:28 PM GMT