tracker issue : CF-3040397

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

Bug 80629:A date value returned from a MySQL query using the GREATEST() function, is seen by CF9 as a binary value

| View in Tracker

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

Reporter/Name(from Bugbase): Julian Halliwell / Julian Halliwell (cfSimplicity)

Created: 11/10/2009

Components: Database, General

Versions: 9.0

Failure Type: Unspecified

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

Priority/Frequency: Normal / Unknown

Locale/System: English / Win All

Vote Count: 3

Problem:

A date value returned from a MySQL query using the GREATEST() function, is seen by CF9 as a binary value. CF8 (or the drivers that shipped with it) correctly interpreted this as a date.Workaround: Use the ToString() CF function on the binary value.
Method:

1) In MySQL 5.0.45, create the following table:CREATE TABLE `persons` (`ID` int(11) unsigned NOT NULL,`dateCreated` datetime default NULL,`dateUpdated` datetime default NULL,PRIMARY KEY  (`ID`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;INSERT INTO `persons` VALUES ('1','2009-11-05 05:02:38','2009-11-09 16:18:17');2) Excecute the follow CFML<cfquery name="q" datasource="mysqldsn">SELECTGREATEST( dateUpdated,dateCreated )AS dateLastChangeFROMpersons</cfquery><cfdump var="#q#"><cfoutput query="q">#DateFormat( dateLastChange, "yyyymmdd" )#</cfoutput>
Result:

The value class [B cannot be converted to a date.

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

Watson Bug ID:	3040397

External Customer Info:
External Company:  
External Customer Name: Julian Halliwell
External Customer Email: 2D5C74634456F5BE992016E5
External Test Config: 11/10/2009

Attachments:

Comments:

This has become a large problem as we must impletment this workaround into different areas of our code which just isn't feasable for our environment.
Vote by External U.
22550 | November 11, 2011 12:39:30 AM GMT
We are getting random bytearrays returned all over our application. This is causeing us to apply the toString() workarround a lot. In my experience it is also occurring when we use an IF statement in our SELECT portion of the queries
Vote by External U.
22551 | November 11, 2011 12:39:31 AM GMT
this bug is showing up in various places in our code and should be addressed and fixed by adobe.
Vote by External U.
22552 | November 11, 2011 12:39:33 AM GMT