Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.5.8, 10.5
-
None
-
Ubuntu 18.04 LTS
Description
JSON_ARRAYAGG() doesn't evaluate correct charset.
reproduce:
MariaDB [test]> CREATE TABLE t1 (a varchar(5));
|
Query OK, 0 rows affected (0.035 sec)
|
|
MariaDB [test]> INSERT INTO t1 VALUES ('a'),('ä');
|
Query OK, 2 rows affected (0.014 sec)
|
|
MariaDB [test]> select * from t1;
|
+------+
|
| a |
|
+------+
|
| a |
|
| ä |
|
+------+
|
2 rows in set (0.000 sec)
|
|
MariaDB [test]> SELECT JSON_ARRAYAGG(a) FROM t1;
|
+------------------+
|
| JSON_ARRAYAGG(a) |
|
+------------------+
|
| ["a","▒"] |
|
+------------------+
|
1 row in set (0.001 sec)
|
|
MariaDB [test]> SELECT JSON_ARRAY(a) FROM t1;
|
+---------------+
|
| JSON_ARRAY(a) |
|
+---------------+
|
| ["a"] |
|
| ["ä"] |
|
+---------------+
|
2 rows in set (0.000 sec)
|
|
MariaDB [test]> select @@version;
|
+--------------------------------------+
|
| @@version |
|
+--------------------------------------+
|
| 10.5.8-MariaDB-1:10.5.8+maria~bionic |
|
+--------------------------------------+
|
|
MariaDB [(none)]> select @@character_set_server,@@character_set_client,@@character_set_results,@@collation_connection;
|
+------------------------+------------------------+-------------------------+------------------------+
|
| @@character_set_server | @@character_set_client | @@character_set_results | @@collation_connection |
|
+------------------------+------------------------+-------------------------+------------------------+
|
| utf8mb4 | utf8 | utf8 | utf8_general_ci |
|
+------------------------+------------------------+-------------------------+------------------------+
|
1 row in set (0.000 sec)
|
Attachments
Issue Links
- is duplicated by
-
MDEV-31159 Wrong encoding produced by JSON_ARRAYAGG
- Closed
- relates to
-
MDEV-16620 Add support for JSON_ARRAYAGG and JSON_OBJECTAGG
- Closed