Bug #73439 FORMAT dk_DK bug
Submitted: 30 Jul 2014 18:03 Modified: 11 Aug 2014 4:13
Reporter: Peter Laursen (Basic Quality Contributor) Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version:5.6.19, 5.6.21 OS:Any
Assigned to: CPU Architecture:Any

[30 Jul 2014 18:03] Peter Laursen
Description:
A follow-up from http://bugs.mysql.com/bug.php?id=73436.

FORMAT also has issues with Danish.

How to repeat:
SELECT FORMAT(123456.56, 2, 'dk_DK');

It returns "123,456.56" - but it should be "123.456,56". Danish number format is the same as in most continental European countries (Germany, France etc.) where COMMA is used as decimal sign. 

Suggested fix:
Yes, thanks!

I would no be surprised if this affects dozens of European locales! Check each and every one!

I have not verified but also see for instance: 
SELECT FORMAT(123456.56, 2, 'ge_GE');
(if 'ge_GE' is 'Georgian' I very much doubt that it is correct that it formats the anglo-american way)
[1 Aug 2014 11:13] MySQL Verification Team
Hello Peter,

Thank you for the report and valuable test case.
I agree with you,  this indeed complain about same issue, but for different locales and would make sense to keep it separate rather than marking duplicate of Bug #73436 and thus missing this issue.

Regards,
Umesh
[4 Aug 2014 4:01] MySQL Verification Team
Hello Peter,

Looks like we were using wrong locale.

mysql> SELECT FORMAT(123456.56, 2, 'dk_DK');
+-------------------------------+
| FORMAT(123456.56, 2, 'dk_DK') |
+-------------------------------+
| 123,456.56                    |
+-------------------------------+
1 row in set, 1 warning (0.00 sec)

mysql> show warnings;
+---------+------+-------------------------+
| Level   | Code | Message                 |
+---------+------+-------------------------+
| Warning | 1649 | Unknown locale: 'dk_DK' |
+---------+------+-------------------------+
1 row in set (0.00 sec)

'dk_DK' isn't a supported locale, it's called 'da_DK', please see http://dev.mysql.com/doc/refman/5.6/en/locale-support.html        

mysql> SELECT FORMAT(123456.56, 2, 'da_DK');
+-------------------------------+
| FORMAT(123456.56, 2, 'da_DK') |
+-------------------------------+
| 123.456,56                    |
+-------------------------------+
1 row in set (0.00 sec)

^^ This returns as expected..

Thanks,
Umesh
[11 Aug 2014 4:13] MySQL Verification Team
Expected behavior, marking as not a bug.