mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-12604 Comparison of JSON_EXTRACT result differs with Mysql.
Comparison fixed to take the actual type of JSON value into account. Bug in escaping handling fixed.
This commit is contained in:
@ -648,3 +648,18 @@ NULL
|
||||
SELECT JSON_EXTRACT( '{"foo":"bar"}', '$[*]' );
|
||||
JSON_EXTRACT( '{"foo":"bar"}', '$[*]' )
|
||||
NULL
|
||||
select JSON_EXTRACT('{"name":"value"}', '$.name') = 'value';
|
||||
JSON_EXTRACT('{"name":"value"}', '$.name') = 'value'
|
||||
1
|
||||
select JSON_EXTRACT('{\"asdf\":true}', "$.\"asdf\"") = true;
|
||||
JSON_EXTRACT('{\"asdf\":true}', "$.\"asdf\"") = true
|
||||
1
|
||||
select JSON_EXTRACT('{\"asdf\":true}', "$.\"asdf\"") = false;
|
||||
JSON_EXTRACT('{\"asdf\":true}', "$.\"asdf\"") = false
|
||||
0
|
||||
select JSON_EXTRACT('{\"asdf\":true}', "$.\"asdf\"") = 1;
|
||||
JSON_EXTRACT('{\"asdf\":true}', "$.\"asdf\"") = 1
|
||||
1
|
||||
select JSON_EXTRACT('{\"input1\":\"\\u00f6\"}', '$.\"input1\"');
|
||||
JSON_EXTRACT('{\"input1\":\"\\u00f6\"}', '$.\"input1\"')
|
||||
"\u00f6"
|
||||
|
Reference in New Issue
Block a user