-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-6.1This bug affects the 6.1.x(LTS) versions.This bug affects the 6.1.x(LTS) versions.affects-8.3compatibility-mysql80This is a compatibility issue with MySQL 8.0(but NOT 5.7)This is a compatibility issue with MySQL 8.0(but NOT 5.7)may-affects-6.5may-affects-7.1may-affects-7.5may-affects-8.1severity/moderatesig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.type/compatibility
Description
Bug Report
1. Minimal reproduce step (Required)
WITH RECURSIVE cte(n) AS (
SELECT 1 n
UNION ALL
SELECT 100+n FROM cte WHERE n<1000
)
SELECT FORMAT(n+RAND(),3,'en_UK') FROM cte;
2. What did you expect to see? (Required)
With MySQL 9.0.1:
mysql-9.0.1> WITH RECURSIVE cte(n) AS (SELECT 1 n UNION ALL SELECT 100+n FROM cte WHERE n<1000) SELECT FORMAT(n+RAND(),3,'en_UK') FROM cte;
+----------------------------+
| FORMAT(n+RAND(),3,'en_UK') |
+----------------------------+
| 1.207 |
| 101.688 |
| 201.819 |
| 301.030 |
| 401.691 |
| 501.368 |
| 601.767 |
| 701.731 |
| 801.355 |
| 901.582 |
| 1,001.845 |
+----------------------------+
11 rows in set, 1 warning (0.00 sec)
Warning (Code 1649): Unknown locale: 'en_UK'
- Only one warning for the statement.
- Warning text is correct
3. What did you see instead (Required)
mysql-8.0.11-TiDB-v8.4.0-alpha-207-gfb9b8a194f> WITH RECURSIVE cte(n) AS (SELECT 1 n UNION ALL SELECT 100+n FROM cte WHERE n<1000) SELECT FORMAT(n+RAND(),3,'en_UK') FROM cte;
+----------------------------+
| FORMAT(n+RAND(),3,'en_UK') |
+----------------------------+
| 1.613 |
| 101.927 |
| 201.795 |
| 301.193 |
| 401.579 |
| 501.318 |
| 601.854 |
| 701.313 |
| 801.006 |
| 901.092 |
| 1,001.439 |
+----------------------------+
11 rows in set, 11 warnings (0.00 sec)
Warning (Code 1649): Unknown locale: '
.P��'
Warning (Code 1649): Unknown locale: 'en_UK'
Warning (Code 1649): Unknown locale: '
Warning (Code 1649): Unknown locale: '
.P��'
Warning (Code 1649): Unknown locale: 'en_UK'
Warning (Code 1649): Unknown locale: '
Warning (Code 1649): Unknown locale: '
.P��'
Warning (Code 1649): Unknown locale: 'en_UK'
Warning (Code 1649): Unknown locale: '
Warning (Code 1649): Unknown locale: '
.P��'
Warning (Code 1649): Unknown locale: 'en_UK'
- Multiple warnings instead of one.
- Text is sometimes correct and sometimes corrupt
4. What is your TiDB version? (Required)
mysql-8.0.11-TiDB-v8.4.0-alpha-207-gfb9b8a194f> SELECT TIDB_VERSION()\G
*************************** 1. row ***************************
TIDB_VERSION(): Release Version: v8.4.0-alpha-207-gfb9b8a194f
Edition: Community
Git Commit Hash: fb9b8a194f8716beaee035cd0c285c30e29a9d64
Git Branch: master
UTC Build Time: 2024-09-20 09:07:51
GoVersion: go1.22.7
Race Enabled: false
Check Table Before Drop: false
Store: unistore
1 row in set (0.00 sec)
Also happens with v8.3.0
Metadata
Metadata
Assignees
Labels
affects-6.1This bug affects the 6.1.x(LTS) versions.This bug affects the 6.1.x(LTS) versions.affects-8.3compatibility-mysql80This is a compatibility issue with MySQL 8.0(but NOT 5.7)This is a compatibility issue with MySQL 8.0(but NOT 5.7)may-affects-6.5may-affects-7.1may-affects-7.5may-affects-8.1severity/moderatesig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.type/compatibility