tracker issue : CF-3040311

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

Bug 80384:cfquery not returning named query variable in certain instances

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Dave DeVol / Dave DeVol (Dave DeVol)

Created: 10/15/2009

Components: Database, CFQuery

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 9,0,0,251028 / 270419

Priority/Frequency: Normal / Unknown

Locale/System: English / Win All

Vote Count: 20

Problem:

cfquery not returning  named query variable in certain instances. i.e cfquery name="testQRY" will result in  "Variable TESTQRY is undefined. " with a query that includeds a  LEFT JOIN and GROUP BY & HAVING COUNT and there is no data in the LEFT JOIN result set.  There is no access to the name of the  query like testQry.RecordCount
Method:

Create 2 tables://Table 1USE [BUGDB]GO/****** Object:  Table [dbo].[test]    Script Date: 10/15/2009 12:44:52 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE TABLE [dbo].[test]([UserID] [uniqueidentifier] NULL,[ID] [int] NULL) ON [PRIMARY]//Table 2USE [BUGDB]GO/****** Object:  Table [dbo].[Request_test]    Script Date: 10/15/2009 12:45:50 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE TABLE [dbo].[Request_test]([RequestID] [int] IDENTITY(1050,1) NOT NULL,[UserID] [uniqueidentifier] NULL, CONSTRAINT [PK_RequestTest] PRIMARY KEY CLUSTERED ([RequestID] ASC)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 70) ON [PRIMARY]) ON [PRIMARY]//RUN:<cfquery name="testQRY">SELECT  U.UserID FROM [test] U LEFT JOIN Request_test R ON (R.UserID = U.UserID) WHERE U.ID = 1 GROUP BY U.UserID HAVING COUNT(R.RequestID) > 0 GROUP BY U.UserID HAVING COUNT(R.RequestID) > 0</cfquery>
Result:

Variable TESTQRY is undefined. <br>The error occurred on line 19.

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

Watson Bug ID:	3040311

External Customer Info:
External Company:  
External Customer Name: Dave DeVol
External Customer Email: 0F6F1E9A411BA0FB99201549
External Test Config: 10/15/2009

Attachments:

Comments:

This bug has been voted..
Vote by External U.
22679 | November 11, 2011 12:40:34 AM GMT
This is holding up our production server upgrades. With millions of lines of codebase an audit is absolutely ridiculous! Anything short of a hot fix is unacceptable and a hack bandaid.
Vote by External U.
22680 | November 11, 2011 12:40:36 AM GMT
This is going to cause a lot of work in order to make sure that the queries return a result set. Currently, we check recordcount.
Vote by External U.
22681 | November 11, 2011 12:40:38 AM GMT
This bug has been voted..
Vote by External U.
22682 | November 11, 2011 12:40:40 AM GMT
This bug has been voted..
Vote by External U.
22683 | November 11, 2011 12:40:41 AM GMT
This bug is definitely not benign. It's preventing us from upgrading to CF9
Vote by External U.
22684 | November 11, 2011 12:40:43 AM GMT
A benign bug? Are you serious? We have just recently upgraded a few of our numerous servers to CF9 and ran across this bug. This will prevent us from fully upgrading all of the other servers until this issue is resolved. This is a serious issue and I am absolutely ashamed of Adobe to call this benign. This bug was found a year and a half ago (going by the entry date on this bug tracker). To see that after all this time there has not been a hotfix released for this is completely absurd and just seems downright lazy. You cannot possibly expect people to continue buying your products if you do not fix errors in them when you are notified about them. As programmers we ALL understand fixes can take time....but a year and a half? Sounds like you just don't care anymore.....
Vote by External U.
22685 | November 11, 2011 12:40:44 AM GMT
This bug has been voted..
Vote by External U.
22686 | November 11, 2011 12:40:46 AM GMT
This bug has been voted..
Vote by External U.
22687 | November 11, 2011 12:40:47 AM GMT
We have invested a lot of time in upgrading from cf7 to cf9 and now we are getting randomly hit with the bug in sql statements with a having clause. Where can I get a bug fix from Adobe?
Vote by External U.
22688 | November 11, 2011 12:40:49 AM GMT
We have promised solutions based on CF9 that we are not able to deliver due to this bug compromising our apps. It's a real problem for us, and we're stuck with 8 servers on CF8.
Vote by External U.
22689 | November 11, 2011 12:40:51 AM GMT
Ridiculous... this is a MAJOR bug... An empty query is defined, hence the difference between a null value and an empty string, this is not Begnin! When can we expect a fix for this??
Vote by External U.
22690 | November 11, 2011 12:40:53 AM GMT
See http://forums.adobe.com/message/2631903
Vote by External U.
22691 | November 11, 2011 12:40:55 AM GMT
This bug has been voted..
Vote by External U.
22692 | November 11, 2011 12:40:57 AM GMT
I've encountered this bug too and would appreciate a fix from Adobe.
Vote by External U.
22693 | November 11, 2011 12:40:58 AM GMT
This bug has been voted..
Vote by External U.
22694 | November 11, 2011 12:41:00 AM GMT
This bug has been voted..
Vote by External U.
22695 | November 11, 2011 12:41:02 AM GMT
This bug has been voted..
Vote by External U.
22696 | November 11, 2011 12:41:04 AM GMT
Resultset not accessible via query name when there is an ANSI warning such as "Warning: Null value is eliminated by an aggregate or other SET operation." Workaround is: "SET ANSI_WARNINGS OFF", of course that requires an audit and changing of all code Would appreciate a fix from Adobe.
Vote by External U.
22697 | November 11, 2011 12:41:05 AM GMT
This bug has been voted..
Vote by External U.
22698 | November 11, 2011 12:41:07 AM GMT