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
59fd0e6a
Commit
59fd0e6a
authored
Nov 14, 2023
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '11.1' into mariadb-11.1.3
parents
0f5613a2
28c86f81
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
4 deletions
+28
-4
VERSION
VERSION
+1
-1
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
+9
-0
sql/item_jsonfunc.cc
sql/item_jsonfunc.cc
+9
-3
sql/share/errmsg-utf8.txt
sql/share/errmsg-utf8.txt
+2
-0
No files found.
VERSION
View file @
59fd0e6a
MYSQL_VERSION_MAJOR=11
MYSQL_VERSION_MINOR=1
MYSQL_VERSION_PATCH=
3
MYSQL_VERSION_PATCH=
4
SERVER_MATURITY=stable
mysql-test/main/func_json.result
View file @
59fd0e6a
...
...
@@ -4699,4 +4699,11 @@ NULL
SELECT JSON_SCHEMA_VALID(NULL, NULL);
JSON_SCHEMA_VALID(NULL, NULL)
NULL
#
# MDEV-31599: Assertion `0' failed in Item_param::can_return_value from Item::val_json,
# UBSAN: member access within null pointer of type 'struct String' in
# sql/item_jsonfunc.cc
#
PREPARE s FROM 'SELECT JSON_SCHEMA_VALID (?,''{}'') FROM DUAL';
ERROR HY000: Variable schema is not supported.
# End of 11.1 test
mysql-test/main/func_json.test
View file @
59fd0e6a
...
...
@@ -3668,4 +3668,13 @@ SELECT JSON_SCHEMA_VALID('{}', NULL);
SELECT
JSON_SCHEMA_VALID
(
NULL
,
'{}'
);
SELECT
JSON_SCHEMA_VALID
(
NULL
,
NULL
);
--
echo
#
--
echo
# MDEV-31599: Assertion `0' failed in Item_param::can_return_value from Item::val_json,
--
echo
# UBSAN: member access within null pointer of type 'struct String' in
--
echo
# sql/item_jsonfunc.cc
--
echo
#
--
error
ER_JSON_NO_VARIABLE_SCHEMA
PREPARE
s
FROM
'SELECT JSON_SCHEMA_VALID (?,''{}'') FROM DUAL'
;
--
echo
# End of 11.1 test
sql/item_jsonfunc.cc
View file @
59fd0e6a
...
...
@@ -4798,15 +4798,21 @@ If any of them fails, return false, else return true.
bool
Item_func_json_schema_valid
::
fix_length_and_dec
(
THD
*
thd
)
{
json_engine_t
je
;
bool
res
=
0
;
bool
res
=
0
,
is_schema_constant
=
args
[
0
]
->
const_item
()
;
String
*
js
=
args
[
0
]
->
val_json
(
&
tmp_js
)
;
String
*
js
=
NULL
;
if
((
null_value
=
args
[
0
]
->
null_value
))
if
(
!
is_schema_constant
||
(
null_value
=
args
[
0
]
->
null_value
))
{
if
(
!
is_schema_constant
)
{
my_error
(
ER_JSON_NO_VARIABLE_SCHEMA
,
MYF
(
0
));
}
null_value
=
1
;
return
0
;
}
js
=
args
[
0
]
->
val_json
(
&
tmp_js
);
json_scan_start
(
&
je
,
js
->
charset
(),
(
const
uchar
*
)
js
->
ptr
(),
(
const
uchar
*
)
js
->
ptr
()
+
js
->
length
());
if
(
!
create_object_and_handle_keyword
(
thd
,
&
je
,
&
keyword_list
,
...
...
sql/share/errmsg-utf8.txt
View file @
59fd0e6a
...
...
@@ -11972,3 +11972,5 @@ ER_JSON_INVALID_VALUE_FOR_KEYWORD
ER_JSON_SCHEMA_KEYWORD_UNSUPPORTED
eng "%s keyword is not supported"
sw "%s neno kuu halitumiki"
ER_JSON_NO_VARIABLE_SCHEMA
eng "Variable schema is not supported."
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