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
13390a70
Commit
13390a70
authored
Mar 28, 2021
by
Alexey Botchkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-25255 JSON_TABLE: CREATE TABLE ignores NULL ON ERROR (implicit or explicit) and fails.
should not abort on field::set().
parent
d2e2219e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
0 deletions
+17
-0
mysql-test/suite/json/r/json_table.result
mysql-test/suite/json/r/json_table.result
+8
-0
mysql-test/suite/json/t/json_table.test
mysql-test/suite/json/t/json_table.test
+8
-0
sql/json_table.cc
sql/json_table.cc
+1
-0
No files found.
mysql-test/suite/json/r/json_table.result
View file @
13390a70
...
@@ -581,5 +581,13 @@ show warnings;
...
@@ -581,5 +581,13 @@ show warnings;
Level Code Message
Level Code Message
Error 4177 Can't store an array or an object in the scalar column 'a' of JSON_TABLE 't'.
Error 4177 Can't store an array or an object in the scalar column 'a' of JSON_TABLE 't'.
#
#
# MDEV-JSON_TABLE: CREATE TABLE ignores NULL ON ERROR (implicit or explicit) and fails.
#
CREATE TABLE t1 AS SELECT * FROM JSON_TABLE('{"x":1}', '$' COLUMNS(f DATE PATH '$.*')) AS jt;
SELECT * FROM t1;
f
NULL
DROP TABLE t1;
#
# End of 10.6 tests
# End of 10.6 tests
#
#
mysql-test/suite/json/t/json_table.test
View file @
13390a70
...
@@ -453,6 +453,14 @@ drop table json_table;
...
@@ -453,6 +453,14 @@ drop table json_table;
select
a
from
json_table
(
'[[]]'
,
'$'
columns
(
a
char
(
8
)
path
'$'
error
on
error
))
t
;
select
a
from
json_table
(
'[[]]'
,
'$'
columns
(
a
char
(
8
)
path
'$'
error
on
error
))
t
;
show
warnings
;
show
warnings
;
--
echo
#
--
echo
# MDEV-JSON_TABLE: CREATE TABLE ignores NULL ON ERROR (implicit or explicit) and fails.
--
echo
#
CREATE
TABLE
t1
AS
SELECT
*
FROM
JSON_TABLE
(
'{"x":1}'
,
'$'
COLUMNS
(
f
DATE
PATH
'$.*'
))
AS
jt
;
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
#
--
echo
# End of 10.6 tests
--
echo
# End of 10.6 tests
--
echo
#
--
echo
#
sql/json_table.cc
View file @
13390a70
...
@@ -325,6 +325,7 @@ int ha_json_table::fill_column_values(uchar * buf, uchar *pos)
...
@@ -325,6 +325,7 @@ int ha_json_table::fill_column_values(uchar * buf, uchar *pos)
Json_table_column
*
jc
;
Json_table_column
*
jc
;
List_iterator_fast
<
Json_table_column
>
jc_i
(
m_jt
->
m_columns
);
List_iterator_fast
<
Json_table_column
>
jc_i
(
m_jt
->
m_columns
);
my_ptrdiff_t
ptrdiff
=
buf
-
table
->
record
[
0
];
my_ptrdiff_t
ptrdiff
=
buf
-
table
->
record
[
0
];
Abort_on_warning_instant_set
ao_set
(
table
->
in_use
,
FALSE
);
while
((
jc
=
jc_i
++
))
while
((
jc
=
jc_i
++
))
{
{
...
...
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