Bug #9236 use of temp tables cause things like DATE_FORMAT not to return a string
Submitted: 16 Mar 2005 23:38 Modified: 17 May 2005 9:29
Reporter: R Fields Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:3.1.7 OS:Linux (Redhat Enterprise WS 3.0)
Assigned to: Sergei Golubchik CPU Architecture:Any

[16 Mar 2005 23:38] R Fields
Description:
This is a repeat of bug 8868, but since I was not the original submitter, I had to create a new bug to attach a file that has the dump of a table that results in the problem when the following query is ran:

select DATE_FORMAT(account_creation_date, '%Y-%m-%d') as date, count(*) as count from customer where customer_deleted_flag = 0 and affiliate_company_id = 'FRL' and account_creation_date >= '2005-03-02 00:00:00' and account_creation_date <= now() group by date;

Thank you,
-Richard

How to repeat:
Use the attached file, and run the query.
[17 Mar 2005 16:42] Mark Matthews
This is fixed for 3.1.8, you can check out the fix after 00:00 GMT tomorrow in the nightly snapshots from http://downloads.mysql.com/snapshots.php.

Thanks for your bug report!
[17 May 2005 9:29] Sergei Golubchik
no bug in the server here, DATE_FORMAT in 4.1 returns a binary string.