Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.6, 10.11, 11.4, 10.4(EOL), 10.5(EOL), 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.3(EOL), 11.5(EOL)
Description
JSON_EXTRACT function prints the output as NULL when setting character sets with mbminlen > 1
Character sets with mbminlen > 1
11.5.0-dbg>set character_set_connection=ucs2; |
Query OK, 0 rows affected (0.000 sec) |
Actual result
11.5.0-dbg>SELECT JSON_EXTRACT('{"a": 1,"b": 2}','$.a'); |
+---------------------------------------+ |
| JSON_EXTRACT('{"a": 1,"b": 2}','$.a') | |
+---------------------------------------+ |
| NULL | |
+---------------------------------------+ |
1 row in set, 1 warning (0.000 sec) |
|
11.5.0-dbg>
|
Expected result
11.5.0-dbg>SELECT JSON_EXTRACT('{"a": 1,"b": 2}','$.a'); |
+---------------------------------------+ |
| JSON_EXTRACT('{"a": 1,"b": 2}','$.a') | |
+---------------------------------------+ |
| 1 |
|
+---------------------------------------+ |
1 row in set (0.000 sec) |
|
11.5.0-dbg>
|
Character sets with mbminlen = 1
11.5.0-dbg>set character_set_connection=utf8; |
Query OK, 0 rows affected (0.000 sec) |
|
11.5.0-dbg>SELECT JSON_EXTRACT('{"a": 1,"b": 2}','$.a'); |
+---------------------------------------+ |
| JSON_EXTRACT('{"a": 1,"b": 2}','$.a') | |
+---------------------------------------+ |
| 1 |
|
+---------------------------------------+ |
1 row in set (0.000 sec) |
|
11.5.0-dbg>
|
Attachments
Issue Links
- relates to
-
MDEV-34143 Server crashes when executing JSON_EXTRACT after setting non-default collation_connection
-
- Closed
-
-
MDEV-36808 json_array_intersect incorrect results after returning NULL in table scan
-
- Confirmed
-