Details
Description
MariaDB |
MariaDB [(none)]> SELECT VERSION(); |
+-----------------+ |
| VERSION() |
|
+-----------------+ |
| 10.2.10-MariaDB |
|
+-----------------+ |
1 row in set (0.00 sec) |
|
MariaDB [(none)]> SET @`json` := '{"sv":"Börk"}'; |
Query OK, 0 rows affected (0.00 sec) |
|
MariaDB [(none)]> SELECT |
-> JSON_UNQUOTE(
|
-> JSON_EXTRACT(CAST(@`json` AS CHAR CHARACTER SET latin1), '$.sv') |
-> ) `latin1`,
|
-> JSON_UNQUOTE(
|
-> JSON_EXTRACT(CAST(@`json` AS CHAR CHARACTER SET utf8mb4), '$.sv') |
-> ) `utf8mb4`;
|
+---------+---------+ |
| latin1 | utf8mb4 |
|
+---------+---------+ |
| "Börk" | Börk | |
+---------+---------+ |
1 row in set (0.00 sec) |
MySQL |
mysql> SELECT VERSION(); |
+-----------+ |
| VERSION() |
|
+-----------+ |
| 5.7.20 |
|
+-----------+ |
1 row in set (0.00 sec) |
|
mysql> SET @`json` := '{"sv":"Börk"}'; |
Query OK, 0 rows affected (0.00 sec) |
|
mysql> SELECT |
-> JSON_UNQUOTE(
|
-> JSON_EXTRACT(CAST(@`json` AS CHAR CHARACTER SET latin1), '$.sv') |
-> ) `latin1`,
|
-> JSON_UNQUOTE(
|
-> JSON_EXTRACT(CAST(@`json` AS CHAR CHARACTER SET utf8mb4), '$.sv') |
-> ) `utf8mb4`;
|
+--------+---------+ |
| latin1 | utf8mb4 |
|
+--------+---------+ |
| Börk | Börk |
|
+--------+---------+ |
1 row in set (0.00 sec) |
Attachments
Issue Links
- relates to
-
MDEV-21124 JSON_UNQUOTE fails to process surrogate pairs
- Confirmed
-
MDEV-25131 using COLLATE utf8mb4_unicode_ci with GENERATED column throws error but works in mysql
- Open