Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
3c40f8ba
Commit
3c40f8ba
authored
Apr 05, 2024
by
Rucha Deodhar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-31402: SIGSEGV in json_get_path_next | Item_func_json_extract::read_json
parent
e1825e39
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
mysql-test/main/func_json.result
mysql-test/main/func_json.result
+7
-0
mysql-test/main/func_json.test
mysql-test/main/func_json.test
+10
-0
No files found.
mysql-test/main/func_json.result
View file @
3c40f8ba
...
...
@@ -1690,5 +1690,12 @@ select json_arrayagg('ä'), json_objectagg(1, 'ä');
json_arrayagg('ä') json_objectagg(1, 'ä')
["ä"] {"1":"ä"}
#
# MDEV-31402: SIGSEGV in json_get_path_next | Item_func_json_extract::read_json
#
CREATE TABLE t (id CHAR AS (JSON_COMPACT (JSON_EXTRACT(doc,"$._id"))) UNIQUE KEY,doc JSON,CONSTRAINT notnu CHECK (id IS NOT NULL));
INSERT INTO t (doc) VALUES ('{ "_id" : { "$oid" : "0ca0b0f0" },"a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" :0} ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] }');
ERROR 22001: Data too long for column 'id' at row 1
DROP TABLE t;
#
# End of 10.5 tests
#
mysql-test/main/func_json.test
View file @
3c40f8ba
...
...
@@ -1115,6 +1115,16 @@ set names latin1;
select
json_arrayagg
(
'ä'
),
json_objectagg
(
1
,
'ä'
);
--
enable_service_connection
--
echo
#
--
echo
# MDEV-31402: SIGSEGV in json_get_path_next | Item_func_json_extract::read_json
--
echo
#
CREATE
TABLE
t
(
id
CHAR
AS
(
JSON_COMPACT
(
JSON_EXTRACT
(
doc
,
"$._id"
)))
UNIQUE
KEY
,
doc
JSON
,
CONSTRAINT
notnu
CHECK
(
id
IS
NOT
NULL
));
--
error
ER_DATA_TOO_LONG
INSERT
INTO
t
(
doc
)
VALUES
(
'{ "_id" : { "$oid" : "0ca0b0f0" },"a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" :0} ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] }'
);
DROP
TABLE
t
;
--
echo
#
--
echo
# End of 10.5 tests
--
echo
#
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment