Sergei Petrunia
90629aa83c
MDEV-25346: JSON_TABLE: Server crashes in Item_field::fix_outer_field ...
...
mysql_derived_prepare() sets Name_resolution_context::outer_context=NULL
for the WHERE clause's context.
Do the same for all ON expressions, too.
2021-04-21 10:21:46 +04:00
Sergei Petrunia
bd1d6ee4b1
MDEV-25352: JSON_TABLE: Inconsistent name resolution and ER_VIEW_INVALID
...
Add testcase
2021-04-21 10:21:46 +04:00
Sergei Petrunia
74895090b3
MDEV-25202: JSON_TABLE: Early table reference leads to unexpected result set
...
Followup: also handle NATURAL JOIN, extend the new approach with
Name_resolution_context::ignored_tables
2021-04-21 10:21:45 +04:00
Alexey Botchkov
5a8abbb77d
MDEV-17399 JSON_TABLE.
...
tests updated.
2021-04-21 10:21:45 +04:00
Sergei Petrunia
84cf9c2e11
MDEV-25202: JSON_TABLE: Early table reference leads to unexpected result set
...
(Also fixes MDEV-25254).
Re-work Name Resolution for the argument of JSON_TABLE(json_doc, ....)
function. The json_doc argument can refer to other tables, but it can
only refer to the tables that precede[*] the JSON_TABLE(...) call.
[*] - For queries with RIGHT JOINs, the "preceding" is determined after
the query is normalized by converting RIGHT JOIN into left one.
The implementation is as follows:
- Table function arguments use their own Name_resolution_context.
- The Name_resolution_context now has a bitmap of tables that should be
ignored when searching for a field.
- get_disallowed_table_deps() walks the TABLE_LIST::nested_join tree
and computes a bitmap of tables that do not "precede" the given
JSON_TABLE(...) invocation (according the above definition of
"preceding").
2021-04-21 10:21:45 +04:00
Alexey Botchkov
13390a70e2
MDEV-25255 JSON_TABLE: CREATE TABLE ignores NULL ON ERROR (implicit or explicit) and fails.
...
should not abort on field::set().
2021-04-21 10:21:45 +04:00
Alexey Botchkov
d2e2219e46
MDEV-25146 JSON_TABLE: Non-descriptive + wrong error messages upon trying to store array or object.
...
More informative messages added.
Do not issue additional messages if already handled.
2021-04-21 10:21:45 +04:00
Alexey Botchkov
11c8ce4348
MDEV-25138 JSON_TABLE: A space between JSON_TABLE and opening bracket causes syntax error.
...
syntax fixed.
2021-04-21 10:21:44 +04:00
Alexey Botchkov
3edc4a0998
MDEV-25229 SON_TABLE: Server crashes in hton_name upon MATCH .. AGAINST.
...
No plugin for the JSON_TABLE so get the storage type name directly.
2021-04-21 10:21:44 +04:00
Alexey Botchkov
6a5f86bf59
MDEV-25230 JSON_TABLE: CREATE VIEW with 2nd level NESTED PATH ends up with invalid frm, Assertion `m_status == DA_ERROR || m_status == DA_OK || m_status == DA_OK_BULK' failed.
...
Handle multiple NESTED paths.
2021-04-21 10:21:44 +04:00
Alexey Botchkov
7075955f4e
MDEV-25189 SON_TABLE: Assertion `l_offset >= 0 && table->s->rec_buff_length - l_offset > 0' failed upon CREATE .. SELECT.
...
fixed already, so just the testcase.
2021-04-21 10:21:44 +04:00
Alexey Botchkov
46d592a047
MDEV-25188 JSON_TABLE: ASAN use-after-poison in Field_long::reset / Table_function_json_table::setup or malloc(): invalid size.
...
MDEV-25192 JSON_TABLE: ASAN use-after-poison in field_conv_memcpy / Create_tmp_table::finalize upon query with derived table.
2021-04-21 10:21:44 +04:00
Alexey Botchkov
90c4dff5ab
MDEV-25178 JSON_TABLE: ASAN use-after-poison in my_fill_8bit Json_table_column::On_response::respond.
...
table record buffer size was smaller than required when the charset
changes.
2021-04-21 10:21:44 +04:00
Alexey Botchkov
6f56458a76
MDEV-25183 JSON_TABLE: CREATE VIEW involving NESTED PATH ends up with invalid frm.
...
Wrong comma was added after the single column.
2021-04-21 10:21:44 +04:00
Alexey Botchkov
51ac57fbbe
MDEV-25151 JSON_TABLE: Unexpectedly padded values in a PATH column.
...
Field length can increase after the change_charset(), so need to
set field->ptr properly.
also sensitive parts of the test moved to json_not_embedded.test.
2021-04-21 10:21:44 +04:00
Alexey Botchkov
047eb2258d
MDEV-25141 JSON_TABLE: SELECT into outfile bypasses file privilege check.
...
access rights checking fixed.
2021-04-21 10:21:44 +04:00
Alexey Botchkov
abdc39b0a7
MDEV-25143 JSON_TABLE: Server crashes in handler::print_error / hton_name upon ERROR ON EMPTY.
...
should return some error code from ha_json_table::rnd_pos() not just 1.
2021-04-21 10:21:44 +04:00
Sergei Petrunia
99fc076fea
MDEV-25145: JSON_TABLE: Assertion fixed == 1 failed .. on 2nd execution
2021-04-21 10:21:43 +04:00
Sergei Petrunia
98556ef84a
MDEV-25142: JSON_TABLE: CREATE VIEW involving EXISTS PATH ends up with invalid frm
2021-04-21 10:21:43 +04:00
Sergei Petrunia
2f650fb955
MDEV-17399: JSON_TABLE: Fix the problem with cross-nested-join dependency
...
Fix for for the problem with
- Cross-outer-join dependency
- dead-end join prefix
- join order pruning
See the comments in the patch for detailed description
2021-04-21 10:21:43 +04:00
Alexey Botchkov
e9fd327ee3
MDEV-17399 Add support for JSON_TABLE.
...
The specific table handler for the table functions was introduced,
and used to implement JSON_TABLE.
2021-04-21 10:21:43 +04:00
Alexey Botchkov
6ac2a35553
MDEV-19628 JSON with starting double quotes key is not valid.
...
First character of the key name is just skipped, so the escapement
wasn't handled properly.
2019-09-30 14:43:32 +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
Alexey Botchkov
d702e46390
MDEV-15561 json_extract returns NULL with numbers in scientific notation.
...
Scientific notation handling fixed.
2018-03-25 00:15:11 +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
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
Nirbhay Choubey
8b2e642aa2
MDEV-7635: Update tests to adapt to the new default sql_mode
2017-02-10 06:30:42 -05: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
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