1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-23 08:45:18 +03:00
Commit Graph

205 Commits

Author SHA1 Message Date
43465352b9 Merge 11.4 into 11.6 2024-10-03 16:09:56 +03:00
12a91b57e2 Merge 10.11 into 11.2 2024-10-03 13:24:43 +03:00
63913ce5af Merge 10.6 into 10.11 2024-10-03 10:55:08 +03:00
7e0afb1c73 Merge 10.5 into 10.6 2024-10-03 09:31:39 +03:00
753e7d6d7c MDEV-27412: JSON_TABLE doesn't properly unquote strings
Analysis:
The value gets appended as string instead of unescaped json value

Fix:
Append the value of json in a temporary string and then store it in the
field instead of directly storing as string.
2024-10-01 13:45:46 +05:30
0a5e4a0191 MDEV-31005: Make working cursor-protocol
Updated tests: cases with bugs or which cannot be run
with the cursor-protocol were excluded with
"--disable_cursor_protocol"/"--enable_cursor_protocol"

Fix for v.10.5
2024-09-18 18:39:26 +07:00
4e805aed85 Merge remote-tracking branch 'origin/11.4' into 11.5 2024-07-10 12:17:09 +04:00
8f4ec79d09 Merge remote-tracking branch 'origin/11.4' into 11.5 2024-07-08 12:25:04 +04:00
2455f1a93d MDEV-31543: ASAN heap-buffer-overflow in strncpy when fetching keys
using JSON_OBJECT_FILTER_KEYS function

Analysis:
Insufficient buffer size while copying the data.
Fix:
Change buffer size to accomodate all data.
2024-06-24 14:16:40 +05:30
a21e49cbcc Merge 11.1 into 11.2 2024-06-17 12:02:03 +03:00
d34289a3e2 Merge 10.11 into 11.1 2024-06-17 09:21:50 +03:00
5b89cab44f Merge 10.6 into 10.11 2024-06-13 08:16:49 +03:00
fc9005adc4 Merge 10.5 into 10.6 2024-06-12 07:51:28 +03:00
b81d717387 Merge 10.6 into 10.11 2024-06-11 12:50:10 +03:00
40dd5b8676 fix the test for --view 2024-06-10 21:03:53 +02:00
a687cf8661 Merge 10.5 into 10.6 2024-06-07 10:03:51 +03:00
0406b2a4ed MDEV-34143: Server crashes when executing JSON_EXTRACT after setting
non-default collation_connection

Analysis:
Due to different collation, the string has nothing to chop off.

Fix:
Got rid of chop(), only append " ," only when we have more elements to
add to the result.
2024-06-06 11:41:01 +05:30
903b5d6a83 MDEV-25829 Change default Unicode collation to uca1400_ai_ci
Step#3 The main patch
2024-05-24 15:50:05 +04:00
bf5da43e50 Merge branch '11.1' into 11.2 2024-05-13 10:00:26 +02:00
f0a5412037 Merge branch '11.0' into 11.1 2024-05-13 09:52:30 +02:00
f9807aadef Merge branch '10.11' into 11.0 2024-05-12 12:18:28 +02:00
a6b2f820e0 Merge branch '10.6' into 10.11 2024-05-10 20:02:18 +02:00
7b53672c63 Merge branch '10.5' into 10.6 2024-05-08 20:06:00 +02:00
d74fee9e8c MDEV-19487 fix for --view
followup for d7df63e1c9
2024-05-05 21:37:08 +02:00
9e6858a426 MDEV-22141: JSON_REMOVE returns NULL on valid arguments
Analysis:
When we scan json to get to a beginning according to the path, we end up
scanning json even if we have exhausted it. When eventually returns error.

Fix:
Continue scanning json only if we have not exhausted it and return result
accordingly.
2024-04-29 22:32:17 +05:30
5ca64e65d0 MDEV-32287: JSON_EXTRACT not returning multiple values for same path
Analysis:
When scanning json and getting the exact path at each step, if a path
is reached, we end up adding the item in the result and immediately get the
next item which results in current path changing.
Fix:
Instead of immediately returning the item, count the occurences of the path
in argument and append in the result as needed.
2024-04-29 22:32:17 +05:30
d7df63e1c9 MDEV-19487: JSON_TYPE doesnt detect the type of String Values
(returns NULL) and for Date/DateTime returns "INTEGER"

Analysis:
When the first character of json is scanned it is number. Based on that
integer is returned.
Fix:
Scan rest of the json before returning the final result to ensure json is
valid in the first place in order to have a valid type.
2024-04-29 22:32:17 +05:30
018d537ec1 Merge branch '10.6' into 10.11 2024-04-22 15:23:10 +02:00
41296a07c8 Merge branch '10.5' into 10.6 2024-04-11 13:58:22 +02:00
cd28b2479c Merge branch '11.1' into 11.2 2024-04-09 12:12:33 +02:00
3c40f8bafb MDEV-31402: SIGSEGV in json_get_path_next | Item_func_json_extract::read_json 2024-04-08 19:19:39 +05:30
683fbced6b Merge 11.0 into 11.1 2024-03-28 12:15:36 +02:00
fec2fd6add Merge 10.11 into 11.0 2024-03-28 10:51:36 +02:00
788953463d Merge 10.6 into 10.11
Some fixes related to commit f838b2d799 and
Rows_log_event::do_apply_event() and Update_rows_log_event::do_exec_row()
for system-versioned tables were provided by Nikita Malyavin.
This was required by test versioning.rpl,trx_id,row.
2024-03-28 09:16:57 +02:00
f71d7f2f0f Merge branch '10.5' into 10.6 2024-03-13 21:02:34 +01:00
f703e72bd8 Merge 10.4 into 10.5 2024-03-11 10:08:20 +02:00
b93252a303 MDEV-32454 JSON test has problem in view protocol.
Few Item_func_json_xxx::fix_length_and_dec() functions fixed.
2024-03-02 14:58:57 +04:00
79580f4f96 Merge branch '11.1' into 11.2 2024-02-02 17:43:57 +01:00
b6680e0101 Merge branch '11.0' into 11.1 2024-02-02 11:30:47 +01:00
87e13722a9 Merge branch '10.6' into 10.11 2024-02-01 18:36:14 +01:00
3f6038bc51 Merge branch '10.5' into 10.6 2024-01-31 18:04:03 +01:00
01f6abd1d4 Merge branch '10.4' into 10.5 2024-01-31 17:32:53 +01:00
fe490f85bb Merge branch '10.11' into 11.0 2024-01-30 08:54:10 +01:00
14d930db5d Merge branch '10.6' into 10.11 2024-01-30 08:17:58 +01:00
25c0806867 Merge branch '10.5' into 10.6 2024-01-30 07:43:15 +01:00
50107c4b22 Merge branch '10.4' into 10.5 2024-01-30 07:26:17 +01:00
615f4a8c9e MDEV-32587 Allow json exponential notation starting with zero
Modify the NS_ZERO state in the JSON number parser to allow
exponential notation with a zero coefficient (e.g. 0E-4).

The NS_ZERO state transition on 'E' was updated to move to the
NS_EX state rather than returning a syntax error. Similar change
was made for the NS_ZE1 (negative zero) starter state.

This allows accepted number grammar to include cases like:

- 0E4
- -0E-10

which were previously disallowed. Numeric parsing remains
the same for all other states.

Test cases are added to func_json.test to validate parsing for
various exponential numbers starting with zero coefficients.

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services.
2024-01-17 19:25:43 +05:30
fef31a26f3 Merge branch '11.1' into 11.2 2023-12-20 23:43:05 +01:00
fa2e1c3948 MDEV-33015: Server crashes upon JSON_SCHEMA_VALID reading NULL from a user
variable

Analysis:
Since the item is NULL, it's json value is NULL but we proceed to parse
it anyway.
Fix:
If json value is NULL, return NULL.
2023-12-18 14:14:55 +05:30
0d29f3759c Merge 11.1 into 11.2 2023-11-28 11:19:06 +02:00