summaryrefslogtreecommitdiff
path: root/sql/item_jsonfunc.cc
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-12262 Assertion `!null_value' failed in virtual bool Item::send onAlexey Botchkov2017-03-201-0/+2
| | | | | | JSON_REMOVE. null_value wasn't properly set in Item_json_func_remove::val_str.
* MDEV-11833 JSON functions don't seem to respect max_allowed_packet.Alexey Botchkov2017-03-141-2/+21
| | | | 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-3/+22
| | | | | | | | 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-38/+32
| | | | | | 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.
* bugfix: uninitialized variableSergei Golubchik2017-02-141-2/+1
| | | | fixes crashes on win32-debug
* MDEV-11439 No data type JSON, but CAST(something AS JSON) pretends toAlexey Botchkov2017-02-141-6/+63
| | | | | | work. json_detailed() fixed
* MDEV-11858 json_merge() concatenates instead of merging.Alexey Botchkov2017-02-101-50/+201
| | | | Fix json_merge implementation.
* MDEV-11857 json_search() shows "Out of memory" with empty key.Alexey Botchkov2017-02-091-4/+8
| | | | We should be ready for an empty key.
* MDEV-11557 port MySQL-5.7 JSON tests to MariaDB.Alexey Botchkov2017-02-061-15/+211
| | | | Fixes for issues found.
* MDEV-11938 json.json_no_table crashes or fails with valgrind warnings in ↵Alexey Botchkov2017-02-021-0/+3
| | | | | | json_find_path / Item_func_json_length::val_int. Paths with quoted keynames handled improperly.
* MDEV-11557 port MySQL-5.7 JSON tests to MariaDB.Alexey Botchkov2017-01-261-7/+17
| | | | paths ending on [0]..[0] should be handled in conforming manner.
* MDEV-11557 Port MySQL-5.7 JSON tests to MariaDB.Alexey Botchkov2017-01-251-2/+6
| | | | more fixes.
* MDEV-11557 port MySQL-5.7 JSON tests to MariaDB.Alexey Botchkov2017-01-241-175/+191
| | | | json_no_table.test ported.
* MDEV-11042 Implement GeoJSON functions.Alexey Botchkov2017-01-241-3/+3
| | | | ST_AsGeoJSON and ST_GeomFromGeoJSON functions implemented.
* Fixed issues found by buildbotMonty2017-01-111-1/+1
| | | | | | | | | | | | | | - MDEV-11621 rpl.rpl_gtid_stop_start fails sporadically in buildbot - MDEV-11620 rpl.rpl_upgrade_master_info fails sporadically in buildbot The issue above was probably that the build machine was overworked and the shutdown took longer than 30 resp 10 seconds, which caused MyISAM tables to be marked as crashed. Fixed by flushing myisam tables before doing a forced shutdown/kill. I also increased timeout for forced shutdown from 10 seconds to 60 seconds to fix other possible issues on slow machines. Fixed also some compiler warnings
* MDEV-11573 JSON_LENGTH returns incorrect results.Alexey Botchkov2016-12-241-5/+61
| | | | Item_func_json_length fixed.
* MDEV-11570 JSON_MERGE returns incorrect result.Alexey Botchkov2016-12-201-10/+32
| | | | JSON merging fixed.
* MDEV-11572 JSON_DEPTH returns wrong results.Alexey Botchkov2016-12-161-0/+1
| | | | JSON depth calculation fixed.
* MDEV-11569 JSON_ARRAY_INSERT produces an invalid result.Alexey Botchkov2016-12-161-26/+29
| | | | String insertion fixed.
* MDEV-JSON_CONTAINS_PATH returns incorrect results and produces wrong warning.Alexey Botchkov2016-12-161-2/+2
| | | | | The Item_func_json_contains_path was mistakenly set with the no '*' paths limitation.
* MDEV-11562 Assertion `js->state == JST_VALUE' failed in ↵Alexey Botchkov2016-12-161-1/+4
| | | | | | | | check_contains(json_engine_t*, json_engine_t*). check_contains() fixed. When an item of an array is a complex structure, it can be half-read after the end of the recursive check_contains() call. So we just manually get to it's ending.
* MDEV-11470 JSON_KEYS accepts arguments in invalid format.Alexey Botchkov2016-12-131-125/+304
| | | | Now JSON functions return warnings if arguments are invalid.
* MDEV-11453 JSON_CONTAINS returns incorrect values.Alexey Botchkov2016-12-111-87/+158
| | | | The weird logic of json_contains was implemented.
* MDEV-11469 JSON_SEARCH returns incorrect results.Alexey Botchkov2016-12-091-19/+56
| | | | Support for '**' in json path expressions added.
* MDEV-11489 Assertion `0' failed in json_find_path.Alexey Botchkov2016-12-081-9/+10
| | | | | When the json was just a scalar value, json_extract tried to parse after the value ended.
* MDEV-11433 JSON_MERGE returns a non-NULL result with a NULL argument.Alexey Botchkov2016-12-061-14/+60
| | | | Item_func_json_merge fixed.
* MDEV-11468 JSON_UNQUOTE returns incorrect results.Alexey Botchkov2016-12-061-2/+2
| | | | Now return the argument's value when error.
* MDEV-11467 JSON_EXTRACT returns incorrect results.Alexey Botchkov2016-12-051-37/+37
| | | | Item_func_json_extract::val_str fixed.
* MDEV-11465 JSON_LENGTH returns incorrect length.Alexey Botchkov2016-12-051-2/+1
| | | | Item_func_json_length::val_int fixed.
* MDEV-11471 JSON_ARRAY_APPEND returns incorrect results.Alexey Botchkov2016-12-051-28/+89
| | | | Item_func_json_array_append::val_str fixed.
* MDEV-11472 JSON_ARRAY_INSERT returns incorrect results.Alexey Botchkov2016-12-051-1/+1
| | | | Item_func_json_array_insert::val_str fixed.
* MDEV-11473 JSON_REMOVE returns invalid results.Alexey Botchkov2016-12-051-3/+1
| | | | Item_func_json_remove::val_str fixed.
* MDEV-11474 JSON_DEPTH returns incorrect results.Alexey Botchkov2016-12-051-2/+10
| | | | Item_func_json_depth::val_int fixed.
* MDEV-11461 JSON_TYPE does not recognize integer/double types.Alexey Botchkov2016-12-051-1/+1
| | | | Integer/Double recognition added.
* MDEV-11437 JSON_QUOTE function does not quote and uses wrong character set.Alexey Botchkov2016-12-051-5/+8
| | | | json_quote fixed.
* MDEV-11436 CREATE TABLE .. AS SELECT JSON_OBJECT truncates data.Alexey Botchkov2016-12-051-2/+2
| | | | | fix_length_and_dec() didn't calculate the length of the result properly.
* MDEV-11450 Assertion `!null_value' failed invirtual bool Item::send on ↵Alexey Botchkov2016-12-031-3/+3
| | | | | | | json_search. Item_func_json_search::val_str didn't set the null_value properly. So that affected the next record in the resultset.
* MDEV-11449 Server crashes in Item_func_or_sum::agg_item_collations.Alexey Botchkov2016-12-031-0/+8
| | | | JSON_ARRAY didn't expect 0 arguments.
* MDEV-11444 Server crashes in String::ptr / Item_func_json_depth::val_int.Alexey Botchkov2016-12-031-0/+7
| | | | CAST AS JSON didn't set the null_value mark properly.
* MDEV-11143 Server crashes in json_string_set_cs.Alexey Botchkov2016-12-031-0/+15
| | | | Some JSON functions didn't expect NULL as a path.
* MDEV-11442 Server crashes in String::length / parse_one_or_all ↵Alexey Botchkov2016-12-031-1/+2
| | | | | | /Item_func_json_contains_path::val_int Didn't expect 'one_or_all' parameter to be NULL.
* MDEV-11441 Server crashes in String::append /Item_func_json_extract::val_str.Alexey Botchkov2016-12-031-10/+3
| | | | Wrong 'value_lengh' taken
* func_json.test failing on Windows fixed.Alexey Botchkov2016-11-161-4/+4
|
* MDEV-9143 JSON_xxx functions.Alexey Botchkov2016-11-151-14/+971
| | | | | The rest of mysql/json functions implemented. CAST AS JSON implemented.
* MDEV-9143 JSON_xxx functions.Alexey Botchkov2016-10-191-0/+1109
strings/json_lib.c added as a JSON library. SQL frunction added with sql/item_jsonfunc.h/cc