Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.6.18, 11.4.2
-
None
-
Windows 10
Description
When using json strings generated from PHP by default the queries don't work properly. This appears to be a valid JSON string per the standards and some of the documentation suggests it should work but it doesn't.
Sample script:
drop table if exists test; |
create table test (col varchar(100)); |
insert into test values('string'); |
insert into test values('noël'); |
|
SELECT * |
FROM json_table( |
'[\"no\u00ebl\", \"string\"]', |
'$[*]' COLUMNS(`jsoncol` VARCHAR(500) PATH '$' ERROR ON ERROR) |
) AS `json` |
INNER JOIN `test` ON `test`.`col` = `json`.`jsoncol`; |
|
SELECT * |
FROM json_table( |
'[\"noël\", \"string\"]', |
'$[*]' COLUMNS(`jsoncol` VARCHAR(500) PATH '$' ERROR ON ERROR) |
) AS `json` |
INNER JOIN `test` ON `test`.`col` = `json`.`jsoncol`; |
These queries should product the same results matching both rows but the first only matches the "string" value that does not have unicode characters.