Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Duplicate
-
10.3.12
-
None
-
Host: VMWare
OS: Windows 10 Enterprise 64 bit v1809
OS Build: 17763.253
Mariadb: mysql Ver 15.1 Distrib 10.3.12-MariaDB, for Win64 (AMD64), source revision faf206a848684bc0f87c93a2b47a55063bbccc6c
Description
When column in a query is computed by a function and is not given an alias using "AS", the column name in the results is the text of the function invocation, as in-
select count(*) from npu_codelist;
|
+----------+
|
| count(*) |
|
+----------+
|
| 26712 |
|
+----------+
|
1 row in set (0.017 sec)
|
I have set my installation up (after many hours of trying) to be "unicode clean" top to bottom-
show variables where variable_name like '%char%' or variable_name like '%coll%';
|
+--------------------------+-----------------------------------------------+
|
| Variable_name | Value |
|
+--------------------------+-----------------------------------------------+
|
| character_set_client | utf8mb4 |
|
| character_set_connection | utf8mb4 |
|
| character_set_database | utf8mb4 |
|
| character_set_filesystem | binary |
|
| character_set_results | utf8mb4 |
|
| character_set_server | utf8mb4 |
|
| character_set_system | utf8 |
|
| character_sets_dir | C:\Program Files\MariaDB 10.3\share\charsets\ |
|
| collation_connection | utf8mb4_general_ci |
|
| collation_database | utf8mb4_general_ci |
|
| collation_server | utf8mb4_general_ci |
|
+--------------------------+-----------------------------------------------+
|
11 rows in set (0.001 sec)
|
However I note that computed column names seem to ignore the setting of character_set_results as regards column names, these are always transformed to ASCII-
select replace('µm', 'µ', 'm');
|
+-------------------------+
|
| replace('?m', '?', 'm') |
|
+-------------------------+
|
| mm |
|
+-------------------------+
|
|
MariaDB [uom]> select replace('µm', 'm', 'L');
|
+-------------------------+
|
| replace('?m', 'm', 'L') |
|
+-------------------------+
|
| µL |
|
+-------------------------+
|
This is not desirable behaviour, because it means the meaning of the results column is ambiguous. However is it expected behaviour?
Attachments
Issue Links
- duplicates
-
MDEV-16221 Port WL#5331: Support Unicode for Windows command line client
- Closed