Bug #82090 South Asian / Indian / Vedic number system with FORMAT()
| Submitted: | 3 Jul 2016 18:21 | Modified: | 4 Jul 2016 7:54 |
|---|---|---|---|
| Reporter: | Peter Laursen (Basic Quality Contributor) | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
| Version: | 5.6.31, 5.7.13 | OS: | Any |
| Assigned to: | CPU Architecture: | Any |
[3 Jul 2016 18:21]
Peter Laursen
[3 Jul 2016 18:23]
Peter Laursen
corrected synopsis.
[4 Jul 2016 6:26]
MySQL Verification Team
Hi Peter, Thank you for the report. Imho, locale is expected to be string and hence needs to be enclosed in quotes. Verifying this bug for the wrong format i.e a comma divides every two rather than every three digits to the left of the last three which is correct in 'en_IN' but not in 'hi_IN'. -- 5.6.31, 5.7.13 mysql> SELECT FORMAT(123456789,2,hi_IN); ERROR 1054 (42S22): Unknown column 'hi_IN' in 'field list' mysql> mysql> SELECT FORMAT(123456789,2,en_US); ERROR 1054 (42S22): Unknown column 'en_US' in 'field list' mysql> -- in quotes mysql> SELECT FORMAT(123456789,2,'hi_IN'); +-----------------------------+ | FORMAT(123456789,2,'hi_IN') | +-----------------------------+ | 123,456,789.00 | +-----------------------------+ 1 row in set (0.00 sec) mysql> SELECT FORMAT(123456789,2,'en_IN'); +-----------------------------+ | FORMAT(123456789,2,'en_IN') | +-----------------------------+ | 12,34,56,789.00 | +-----------------------------+ 1 row in set (0.00 sec) mysql> SELECT FORMAT(123456789,2,'en_US'); +-----------------------------+ | FORMAT(123456789,2,'en_US') | +-----------------------------+ | 123,456,789.00 | +-----------------------------+ 1 row in set (0.00 sec) Thanks, Umesh
[4 Jul 2016 7:54]
Peter Laursen
You are right, of course!
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.041 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.