Bug #21910 GET_FORMAT() results differ from manual
Submitted: 29 Aug 2006 21:45 Modified: 30 Aug 2006 17:05
Reporter: Tobias Asplund Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.0.22/5.1.9 OS:Mac OS X (Mac OS X / FreeBSD)
Assigned to: Paul Dubois CPU Architecture:Any
Triage: D4 (Minor)

[29 Aug 2006 21:45] Tobias Asplund
Description:
From the manual page at: http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html

GET_FORMAT(DATETIME,'USA') 	'%Y-%m-%d-%H.%i.%s'

eeyore> SELECT GET_FORMAT(DATETIME, 'USA');
+-----------------------------+
| GET_FORMAT(DATETIME, 'USA') |
+-----------------------------+
| %Y-%m-%d %H.%i.%s           |
+-----------------------------+
1 row in set (0.00 sec)

There's a "-" missing in between the date and time portion.

GET_FORMAT(DATETIME,'EUR') 	'%Y-%m-%d-%H.%i.%s'

eeyore> SELECT GET_FORMAT(DATETIME, 'EUR');
+-----------------------------+
| GET_FORMAT(DATETIME, 'EUR') |
+-----------------------------+
| %Y-%m-%d %H.%i.%s           |
+-----------------------------+
1 row in set (0.00 sec)

Same thing here

GET_FORMAT(TIME,'EUR') 	'%H.%i.%S'

eeyore> SELECT GET_FORMAT(TIME,'EUR');
+------------------------+
| GET_FORMAT(TIME,'EUR') |
+------------------------+
| %H.%i.%s               |
+------------------------+
1 row in set (0.01 sec)

%S vs. %s

How to repeat:
SELECT GET_FORMAT(DATETIME, 'USA');

SELECT GET_FORMAT(DATETIME, 'EUR');

SELECT GET_FORMAT(TIME,'EUR');

Suggested fix:
Fix either manual or return values of those functions.
[30 Aug 2006 6:21] Valeriy Kravchuk
Thank you for a bug report. Verified just as described. The following manual pages should be fixed I think:

http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html
[30 Aug 2006 17:05] Paul Dubois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.

Updated the 4.1, 5.0, 5.1 manuals.