Bug #73440 South Asian FORMATting is wrong
Submitted: 30 Jul 2014 18:17 Modified: 11 Aug 2014 10:40
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:17] Peter Laursen
Description:
India, Pakistan and Sri Lanka (at least) use the terms 'lakh' for the number "100000" (one hundred thousand) and 'crore' for "10000000" (ten millions). The correct way to format the number "123567890" in those countries is "12,35,67,890" (pronounced "12 crore, 235 lakh , 67 thousands, 8 hundred and ninety").

Windows and the various Linux distro's I have tried over time all respect that, if you select of the the mentioned locales for the User Inferface. Windows Office programs (Excel etc.) also do.

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

Incorectly returns 'anglo-american formatting' : "123,456.56". 

It should be "1,23,456.56"
("one lakh, 23 thousands, 4 hundreds and fiftysix dot fiftysix")
[30 Jul 2014 18:20] Peter Laursen
typo

"12,35,67,890" (pronounced "12 crore, 235 lakh , 67 thousands, 8 hundred and ninety"

should be 

"12,35,67,890" (pronounced "12 crore, 35 lakh , 67 thousands, 8 hundred and ninety"

(obviously)
[30 Jul 2014 18:22] Peter Laursen
corrceted synopsis.
[31 Jul 2014 7:45] Peter Laursen
correction (but you probably figured out what I meant):

It should be "1,23,456.56"
("one lakh, 23 thousands, 4 hundreds and fiftysix dot fiftysix")
[31 Jul 2014 7:45] Peter Laursen
and a reference:
http://en.wikipedia.org/wiki/Indian_Numbering_System
[1 Aug 2014 11:14] 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:17] MySQL Verification Team
Hello Peter,

Looks like we were using wrong locale here.

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

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

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

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

^^ Imho, this is an expected behavior too..

Internally, Erlend identified these issues(73440, 73439).
Likewise there are other locales for local Indian languages other than English(India) locale ie. hi_IN: Hindi - India, ta_IN: Tamil - India etc

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