Alexey Botchkov
1a54cf62f8
MDEV-24585 Assertion `je->s.cs == nice_js->charset()' failed in json_nice.
...
We should set the charset in
Item_func_json_format::fix_length_and_dec().
2021-10-19 11:00:56 +04:00
Alexey Botchkov
21ea14db8c
MDEV-20593 SIGSEGV in report_json_error_ex (on optimized builds).
...
When first argument to the JSON_MERGE_PATCH was NULL and second - the
invalid JSON line, the error code was garbage. So it should be set to 0
initially.
2020-10-22 15:51:14 +04:00
Alexander Barkov
30903c3743
MDEV-22976 CAST(JSON_EXTRACT() AS DECIMAL) does not handle boolean values
...
Item_func_json_extract did not implement val_decimal(),
so CAST(JSON_EXTRACT('{"x":true}', '$.x') AS DECIMAL) erroneously
returned 0 with a warning because of convertion from the string "true"
to decimal.
Implementing val_decimal(), so boolean values are correctly handled.
2020-06-22 15:43:53 +04:00
Alexey Botchkov
cd16d6d518
MDEV-13992 Implement JSON_MERGE_PATCH.
...
JSON_MERGE_PATCH implemented. Added JSON_MERGE_PRESERVE as a synonim for
the JSON_MERGE.
2019-05-17 11:53:58 +04:00
Sergei Golubchik
f1134d5676
post-merge: gcc 8 warnings
...
note: Inherit String from Sql_alloc,
to get operators new and new[] in sync
in rocksdb gcc was complaining that non-lvalue was cast to const.
2019-03-15 21:00:50 +01:00
Alexey Botchkov
acb4a87204
MDEV-18886 JSON_ARRAY() does not recognise JSON argument.
...
JSON_ARRAY and JSON_OBJECT functions with no arguments now get the
connection charset. Item_func_convert_charset returns the correct
is_json() flag.
2019-03-12 01:09:55 +04:00
Alexey Botchkov
5cfb043d29
MDEV-16174 Assertion `0' failed in Type_handler_string_result::make_sort_key(uchar*, Item*, const SORT_FIELD_ATTR*, Sort_param*)
...
maybe_null should be always set to TRUE in
Item_func_json_array_append::fix_length_and_dec()
2018-11-09 22:55:34 +04:00
Alexey Botchkov
f54485eadb
MDEV-17001 JSON_MERGE returns nullwhen merging empty array.
...
Don't add the comma if nothing appended to the array.
2018-09-13 13:42:09 +04:00
Alexey Botchkov
a93363022c
MDEV-17018 JSON_SEARCH and User-Defined Variables.
...
Item_func_json_search needs a member to store the path.
2018-09-12 21:57:28 +04:00
Alexey Botchkov
c8bb43a938
MDEV-17121 JSON_ARRAY_APPEND.
...
Extra comma added to the result when an json array is empty.
2018-09-11 14:37:45 +04:00
Alexey Botchkov
4ddcb4eb46
MDEV-16750 JSON_SET mishandles unicode every second pair of arguments.
...
The charset of temporary storage (Item_func_json_insert::tmp_js)
was not properly set.
2018-08-06 13:37:09 +04:00
Alexey Botchkov
fc324a5f87
MDEV-16869 String functions don't respect character set of JSON_VALUE.
...
Item_func_json_value::val_str() produced string of wrong charset.
2018-08-05 18:33:17 +04:00
Alexander Barkov
a8227a1543
MDEV-16814 CREATE TABLE SELECT JSON_QUOTE(multibyte_charset_expr) makes a field of a wrong length
2018-07-24 18:15:15 +04:00
Alexey Botchkov
5ba6cee012
MDEV-16209 JSON_EXTRACT in query crashes server.
...
The optimizer can create various item's over the original one,
so we can't count on the exact item's type inside the comparison.
2018-06-18 23:00:34 +04:00
Alexey Botchkov
352c7e0dfa
MDEV-15905 select json_value('{"b":true}','$.b')=1 --> false with
...
"Truncated incorrect DOUBLE value: 'true'".
JSON_VALUE_TRUE and JSON_VALUE_FALSE should be handled specifically
in Item_json_value.
2018-06-17 17:15:21 +04:00
Oleksandr Byelkin
6b8802e8dd
MDEV-11071: Assertion `thd->transaction.stmt.is_empty()' failed in Locked_tables_list::unlock_locked_table
...
fix_length_and_dec now return result (error/OK)
2018-06-15 10:31:30 +02:00
Alexey Botchkov
f0f3b6549a
MDEV-13970 crash in Item_func_json_extract::read_json.
...
Item_func_json_extract::val_int fixed.
It wasn't tested yet as it's called in exotic cases only.
2017-12-25 08:10:48 +04:00
Alexey Botchkov
842dce378a
MDEV-14402 JSON_VALUE doesn't escape quote.
...
Result unescaping added.
2017-11-16 19:59:27 +04:00
Alexey Botchkov
b5689c6c87
Compiler warnings fixed.
2017-10-30 14:59:43 +04:00
Alexey Botchkov
a3ba8c3660
MDEV-13703 Illegal mix of collations for operation 'json_object' on
...
using JSON_UNQUOTE as an argument.
The coercibility and repertoire should be set properly for the
JSON_UNQUOTE.
2017-10-06 09:28:33 +04:00
Alexey Botchkov
f1a20ec396
MDEV-12311 Insufficient check for argument validity in JSON functions.
...
Check validity to the end of the JSON in the json_length
function.
2017-10-05 23:46:25 +04:00
Alexey Botchkov
1f6ada8da8
MDEV-13306 JSON_CONTAINS returns wrong value.
...
The 'value' state should be saved to be compared against the
next array item.
2017-10-05 23:23:39 +04:00
Vladislav Vaintroub
7354dc6773
MDEV-13384 - misc Windows warnings fixed
2017-09-28 17:20:46 +00:00
Alexey Botchkov
dc82f70e9f
MDEV-13633 JSON_ARRAY() - bad output with some UTF8 characters.
...
set_charset() calls added for Item_func_json_arran
and Item_func_json_object::val_str-s.
2017-09-13 15:17:28 +04:00
Alexey Botchkov
a237a92099
MDEV-12877 Wrong result from JSON native function.
...
Set default charset for temporary paths so UDF call don't crash.
2017-09-13 00:36:09 +04:00
Alexey Botchkov
30db4e1fc7
MDEV-13786 compiler complains about uninitialized variable.
...
'=0' added to meke the compiler happy.
2017-09-12 15:33:30 +04:00
Alexey Botchkov
0cd731864e
MDEV-13104 Json functions.
...
An extra ',' added to the JSON_MERGE result making it invalid.
2017-09-12 15:21:53 +04:00
Alexey Botchkov
467acc2119
MDEV-13324 JSON_SET returns NULL instead of object.
...
Superfluous ',' was added to the JSON_SET result so it became
invalid.
2017-09-12 14:40:18 +04:00
Alexey Botchkov
6352ec2184
MDEV-12982 JSON_EXTRACT returns data for invalid JSON.
...
Let's check the validity to the end of the JSON.
2017-09-12 11:20:30 +04:00
Sergei Golubchik
399e14f066
MDEV-13435 Crash when selecting virtual columns generated using JSON functions
...
don't allocate memory on thd->mem_root in every fix_fields(),
do it once and reuse.
2017-08-14 19:45:59 +02:00
Alexey Botchkov
79d2853354
MDEV-12604 Comparison of JSON_EXTRACT result differs with Mysql.
...
JSON_EXTRACT behaves specifically in the comparison,
so we have to implement specific method for that in
Arg_comparator.
2017-08-11 00:50:29 +04:00
Alexey Botchkov
4bca34d8a4
MDEV-12789 JSON_KEYS returns duplicate keys twice.
...
Check for duplicating keys added.
2017-08-08 15:40:11 +04:00
Alexey Botchkov
01a4eb8f76
MDEV-12732 json.json_no_table fails with valgrind in buildbot and
...
outside.
The result_limit variable wasn't always initialized in
Item_func_json_array::fix_length_and_dec().
2017-08-08 13:49:29 +04:00
Alexey Botchkov
bb71d9abf2
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.
2017-08-08 10:35:26 +04:00
Alexey Botchkov
3ea9d3e59e
MDEV-12363 Assertion `0' failed in Type_handler_string_result::make_sort_key(uchar*, Item*, const SORT_FIELD_ATTR*, Sort_param*).
...
maybe_null wasn't properly set for Item_json_func_keys.
2017-05-02 15:47:43 +04:00
Alexey Botchkov
42ad4f2821
MDEV-12364 Server crashes in __memcpy_sse2_unaligned / String::copy on
...
JSON_SEARCH with variables.
Wrong index for the tmp_paths array in
Item_func_json_search::val_str.
2017-05-02 14:28:57 +04:00
Alexey Botchkov
76f6c1e1ed
MDEV-12262 Assertion `!null_value' failed in virtual bool Item::send on
...
JSON_REMOVE.
null_value wasn't properly set in Item_json_func_remove::val_str.
2017-03-20 15:18:06 +04:00
Alexey Botchkov
af6eee1fc5
MDEV-11833 JSON functions don't seem to respect max_allowed_packet.
...
Now let's check JSON length to fit the max_allowed packet.
2017-03-14 17:31:14 +04:00
Alexey Botchkov
7c7c0696e7
MDEV-11856 json_search doesn't search for values with double quotes
...
character (").
The my_wildcmp function doesn't expect the string parameter to
have escapements, only the template. So the string
should be unescaped if necessary.
2017-03-14 15:25:02 +04:00
Sergei Golubchik
6f6d0531dc
MDEV-11439 No data type JSON, but CAST(something AS JSON) pretends to work
...
Use JSON_COMPACT(X) instead of CAST(X AS JSON).
Bonus - X is validated to be a valid JSON.
Fix a typo in the error message.
2017-02-14 20:43:41 +01:00
Sergei Golubchik
e0fa2ce40f
bugfix: uninitialized variable
...
fixes crashes on win32-debug
2017-02-14 20:43:41 +01:00
Alexey Botchkov
f76d5fefb8
MDEV-11439 No data type JSON, but CAST(something AS JSON) pretends to
...
work.
json_detailed() fixed
2017-02-14 17:51:03 +04:00
Alexey Botchkov
25aaecb240
MDEV-11858 json_merge() concatenates instead of merging.
...
Fix json_merge implementation.
2017-02-10 01:05:27 +04:00
Alexey Botchkov
0e6968c244
MDEV-11857 json_search() shows "Out of memory" with empty key.
...
We should be ready for an empty key.
2017-02-09 17:38:53 +04:00
Alexey Botchkov
abf7582112
MDEV-11557 port MySQL-5.7 JSON tests to MariaDB.
...
Fixes for issues found.
2017-02-06 06:47:48 +04:00
Alexey Botchkov
d123ed852a
MDEV-11938 json.json_no_table crashes or fails with valgrind warnings in json_find_path / Item_func_json_length::val_int.
...
Paths with quoted keynames handled improperly.
2017-02-02 18:56:15 +04:00
Alexey Botchkov
d96ee168a1
MDEV-11557 port MySQL-5.7 JSON tests to MariaDB.
...
paths ending on [0]..[0] should be handled in conforming manner.
2017-01-26 16:35:05 +04:00
Alexey Botchkov
35760c0000
MDEV-11557 Port MySQL-5.7 JSON tests to MariaDB.
...
more fixes.
2017-01-25 00:13:15 +04:00
Alexey Botchkov
50831b0f19
MDEV-11557 port MySQL-5.7 JSON tests to MariaDB.
...
json_no_table.test ported.
2017-01-24 17:34:44 +04:00
Alexey Botchkov
0d107a85b3
MDEV-11042 Implement GeoJSON functions.
...
ST_AsGeoJSON and ST_GeomFromGeoJSON functions implemented.
2017-01-24 02:29:04 +04:00