tracker issue : CF-3783011

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

Query of Queries giving the wrong result

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Min Lie / Min Lie (minli98)

Created: 06/28/2014

Components: Language

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Major / Some users will encounter

Locale/System: English / Win 2008 Server

Vote Count: 5

Listed in the version 11.0.03.292480 Issues Fixed doc
Problem Description: Basically, I have 2 queries, qrA and qrB.  I do a join of the two in joinQr, after which I do a query of qrA.  Since I didn't alter qrA in any way, I would expect newQrA to give me the same result as qrA.  However it only gives me one row ("D").  Now, here's the strange thing:  If I start off qrA with the letters in ascending order ["A", "B", "C", "D"], then newQrA gives me the right result.

Steps to Reproduce:

<cfset qrA = queryNew("")>  
<cfset queryAddColumn( qrA, "size", "varchar", [ "D", "A", "B", "C" ] )>  
  
<cfset qrB = queryNew("")>  
<cfset queryAddColumn( qrB, "size", "varchar", [ "A" ] )>  
<cfset queryAddColumn( qrB, "quantity", "integer", [ 0 ] )>  
  
  
<cfquery name="joinQr" dbtype="query">  
    select qrA.*, qrB.quantity  
    from qrA, qrB  
    where qrA.size = qrB.size  
</cfquery>  
  
<cfquery name="newQrA" dbtype="query">  
    select *  
    from qrA  
</cfquery>  
  
  
<cfdump var="#qrA#">  
<cfdump var="#qrB#">  
<cfdump var="#joinQr#">  
<cfdump var="#newQrA#"> 

Actual Result: A query of one row ("D")

Expected Result: A query of 4 rows ("A", "B", "C", "D")

Any Workarounds:  None / avoid QoQ

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

Watson Bug ID:	3783011

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

Attachments:

Comments:

https://forums.adobe.com/thread/1508638. Note: only affects CF11. CF10 gives the correct result.
Comment by External U.
11804 | June 28, 2014 10:58:15 AM GMT
+My vote. Query of Queries is a cornerstone of Coldfusion. This issue is so serious as to raise questions about the reliability of the entire language.
Vote by External U.
11808 | June 28, 2014 12:07:12 PM GMT
Nice histrionics, BKBK. That said, yeah: should be fixed. It's pretty shocking something as fundamental as this isn't included in Adobe's own regression tests. -- Adam
Vote by External U.
11809 | June 28, 2014 01:56:53 PM GMT
Serious problem for sure.
Vote by External U.
11810 | June 30, 2014 11:45:48 AM GMT
Major issue please fix or at least respond.
Vote by External U.
11811 | August 07, 2014 10:45:02 AM GMT
Fix will be released in the first update of CF 11.
Comment by Himavanth R.
11805 | August 08, 2014 03:16:38 AM GMT
We can't release our site to our new CF11 server until this is fixed.
Vote by External U.
11812 | August 15, 2014 10:08:36 AM GMT
This issue is fixed and this fix will be available in the upcoming update of ColdFusion 11.
Comment by Nimit S.
11806 | August 21, 2014 08:03:29 AM GMT
I've verified this is fixed in CF11 Update 3. Thanks!, -Aaron
Comment by External U.
11807 | November 05, 2014 04:39:21 PM GMT