mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-23187: Assorted assertion failures in json_find_path with certain
collations Fix by Alexey Botchkov The 'value_len' is calculated wrong for the multibyte charsets. In the read_strn() function we get the length of the string with the final ' " ' character. So have to subtract it's length from the value_len. And the length of '1' isn't correct for the ucs2 charset (must be 2).
This commit is contained in:
@ -665,11 +665,6 @@ SELECT 1 + JSON_VALUE('{"nulltest": null}', '$.nulltest');
|
||||
SELECT NULL;
|
||||
SELECT JSON_EXTRACT('{"a":null, "b":10, "c":"null"}', '$.a');
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.3 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.4 tests
|
||||
--echo #
|
||||
@ -825,6 +820,12 @@ SELECT JSON_LENGTH('{"a":"b"}','$','$', 'foo');
|
||||
--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
|
||||
SELECT JSON_LENGTH();
|
||||
|
||||
--echo # MDEV-23187: Assorted assertion failures in json_find_path with certain collations
|
||||
|
||||
|
||||
SET COLLATION_CONNECTION= ucs2_unicode_ci;
|
||||
SELECT JSON_VALUE('["foo"]', '$**[0]') AS f;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.4 tests
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user