summaryrefslogtreecommitdiff
path: root/sql/item_jsonfunc.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.4 into 10.5Marko Mäkelä2020-07-021-0/+1
|\
| * Merge 10.2 into 10.3Marko Mäkelä2020-07-021-0/+1
| |\
| | * MDEV-22976 CAST(JSON_EXTRACT() AS DECIMAL) does not handle boolean valuesAlexander Barkov2020-06-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | MDEV-23029: JSON_OBJECTAGG returns NULL when used together with GROUP BYVarun Gupta2020-06-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quick grouping is not supported for JSON_OBJECTAGG. The same for GROUP_CONCAT too so make sure that Item::quick_group is set to FALSE. We need to make sure that in the case of JSON_OBJECTAGG we don't create an index over grouping fields of the temp table and update the result after each iteration. Instead we should first sort the result in accordance to the GROUP BY fields and then perform the grouping and write the result to the temp table.
* | | MDEV-22837 JSON_ARRAYAGG and JSON_OBJECTAGG treat JSON arguments as text.Alexey Botchkov2020-06-151-0/+1
| | | | | | | | | | | | Item_field::is_json_value() implemented.
* | | MDEV-22844 JSON_ARRAYAGG is limited by group_concat_max_len.Alexey Botchkov2020-06-151-1/+2
| | | | | | | | | | | | Warning message and function result fixed
* | | MDEV-21914 JSON_ARRAYAGG doesn't reject ORDER BY clause, but doesn't work ↵Alexey Botchkov2020-06-041-3/+5
| | | | | | | | | | | | | | | | | | either. ORDER BY fixed for JSON_ARRAYAGG.
* | | MDEV-22640, MDEV-22449, MDEV-21528 JSON_ARRAYAGG crashes with NULL values.Alexey Botchkov2020-06-041-6/+9
| | | | | | | | | | | | | | | | | | We have to include NULL in the result which the GOUP_CONCAT doesn't always do. Also converting should be done into another String instance as these can be same.
* | | MDEV-21915 Server crashes in copy_fields,Item_func_group_concat::add …Alexey Botchkov2020-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | …while using json_arrayagg() as a window function. We don't support JSON_ARRAYAGG and JSON_OBJECTAGG in window functions yet.
* | | MDEV-17832 Protocol: extensions for Pluggable types and JSON, GEOMETRYAlexander Barkov2020-03-101-0/+11
| | |
* | | MDEV-16620 JSON_ARRAYAGG and JSON_OBJECTAGG.Alexey Botchkov2019-10-141-1/+54
| | | | | | | | | | | | Ison_objectagg implemented.
* | | MDEV-16620: Add JSON_ARRAYAGG functionMarkus Mäkelä2019-07-041-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The JSON_ARRAYAGG function extends the GROUP_CONCAT function and provides a method of aggregating JSON results. The current implementation supports DISTINCT and LIMIT but not ORDER BY (Oracle supports GROUP BY). Adding GROUP BY support is possible but it requires some extra work as the grouping appears to be done inside a temporary table that complicates matters. Added test cases that covert aggregation of all JSON types and JSON validation for the generated results.
* | | Remove the most annoying clang-cl warningsVladislav Vaintroub2019-06-301-8/+8
| | | | | | | | | | | | | | | Fix "consistent override", and "unused private field" warnings in popular header files.
* | | MDEV-19888 Add abstract class Item_json_funcAlexander Barkov2019-06-281-23/+78
|/ /
* | Merge branch '10.2' into 10.3Sergei Golubchik2019-05-171-1/+11
|\ \ | |/
| * MDEV-13992 Implement JSON_MERGE_PATCH.Alexey Botchkov2019-05-171-1/+13
| | | | | | | | | | JSON_MERGE_PATCH implemented. Added JSON_MERGE_PRESERVE as a synonim for the JSON_MERGE.
* | Merge branch '10.2' into 10.3Sergei Golubchik2018-09-281-1/+1
|\ \ | |/
| * MDEV-17018 JSON_SEARCH and User-Defined Variables.Alexey Botchkov2018-09-121-1/+1
| | | | | | | | Item_func_json_search needs a member to store the path.
* | Merge commit '6b8802e8dd5467556a024d807a1df23940b00895' into bb-10.3-fix_len_decbb-10.3-fix_len_decOleksandr Byelkin2018-06-191-19/+21
|\ \ | |/
| * MDEV-11071: Assertion `thd->transaction.stmt.is_empty()' failed in ↵Oleksandr Byelkin2018-06-151-18/+20
| | | | | | | | | | | | Locked_tables_list::unlock_locked_table fix_length_and_dec now return result (error/OK)
* | Remove not used mem_root argument from build_clone(), get_copy() and ↵Michael Widenius2017-11-231-44/+44
| | | | | | | | | | | | | | | | | | get_item_copy() TODO: - Make get_thd_memroot() inline - To do this, we need to reduce dependence of include files, especially so that sql_class.h is not depending in item.h
* | MDEV-13967 Parameter data type control for Item_long_funcAlexander Barkov2017-10-011-0/+8
| | | | | | | | | | | | - Implementing stricter data type control for Item_long_func descendants - Cleanup: renaming Type_handler::can_return_str_ascii() to can_return_text() (a better name).
* | Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2017-09-131-0/+1
|\ \ | |/
| * MDEV-12877 Wrong result from JSON native function.Alexey Botchkov2017-09-121-0/+1
| | | | | | | | JSON_QUOTE return type set to be JSON.
| * MDEV-12604 Comparison of JSON_EXTRACT result differs with Mysql.Alexey Botchkov2017-08-111-2/+4
| | | | | | | | | | | | JSON_EXTRACT behaves specifically in the comparison, so we have to implement specific method for that in Arg_comparator.
* | MDEV-12604 Comparison of JSON_EXTRACT result differs with Mysql.Alexey Botchkov2017-08-111-2/+4
| | | | | | | | | | | | | | | | | | JSON_EXTRACT behaves specifically in the comparison, so we have to implement specific method for that in Arg_comparator. Conflicts: sql/item_cmpfunc.cc
* | Merge 10.2 into bb-10.2-extMarko Mäkelä2017-08-091-1/+3
|\ \ | |/
| * MDEV-12604 Comparison of JSON_EXTRACT result differs with Mysql.Alexey Botchkov2017-08-081-1/+3
| | | | | | | | | | Comparison fixed to take the actual type of JSON value into account. Bug in escaping handling fixed.
* | MDEV-12854 Synchronize CREATE..SELECT data type and result set metadata data ↵Alexander Barkov2017-05-201-15/+14
|/ | | | type for INT functions
* MDEV-11833 JSON functions don't seem to respect max_allowed_packet.Alexey Botchkov2017-03-141-0/+1
| | | | Now let's check JSON length to fit the max_allowed packet.
* MDEV-11856 json_search doesn't search for values with double quotesAlexey Botchkov2017-03-141-1/+1
| | | | | | | | 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.
* MDEV-11439 No data type JSON, but CAST(something AS JSON) pretends to workSergei Golubchik2017-02-141-13/+2
| | | | | | 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.
* MDEV-11439 No data type JSON, but CAST(something AS JSON) pretends toAlexey Botchkov2017-02-141-2/+3
| | | | | | work. json_detailed() fixed
* MDEV-11557 port MySQL-5.7 JSON tests to MariaDB.Alexey Botchkov2017-02-061-0/+26
| | | | Fixes for issues found.
* MDEV-11557 port MySQL-5.7 JSON tests to MariaDB.Alexey Botchkov2017-01-241-0/+1
| | | | json_no_table.test ported.
* MDEV-11573 JSON_LENGTH returns incorrect results.Alexey Botchkov2016-12-241-6/+8
| | | | Item_func_json_length fixed.
* MDEV-11453 JSON_CONTAINS returns incorrect values.Alexey Botchkov2016-12-111-5/+3
| | | | The weird logic of json_contains was implemented.
* MDEV-11433 JSON_MERGE returns a non-NULL result with a NULL argument.Alexey Botchkov2016-12-061-1/+1
| | | | Item_func_json_merge fixed.
* MDEV-11444 Server crashes in String::ptr / Item_func_json_depth::val_int.Alexey Botchkov2016-12-031-5/+1
| | | | CAST AS JSON didn't set the null_value mark properly.
* MDEV-9143 JSON_xxx functions.Alexey Botchkov2016-11-151-0/+129
| | | | | The rest of mysql/json functions implemented. CAST AS JSON implemented.
* MDEV-9143 JSON_xxx functions.Alexey Botchkov2016-10-191-0/+304
strings/json_lib.c added as a JSON library. SQL frunction added with sql/item_jsonfunc.h/cc