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
99fc076f
Commit
99fc076f
authored
Mar 16, 2021
by
Sergei Petrunia
Committed by
Alexey Botchkov
Apr 21, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-25145: JSON_TABLE: Assertion fixed == 1 failed .. on 2nd execution
parent
98556ef8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
4 deletions
+31
-4
mysql-test/suite/json/r/json_table.result
mysql-test/suite/json/r/json_table.result
+17
-0
mysql-test/suite/json/t/json_table.test
mysql-test/suite/json/t/json_table.test
+7
-0
sql/sql_select.cc
sql/sql_select.cc
+7
-4
No files found.
mysql-test/suite/json/r/json_table.result
View file @
99fc076f
...
...
@@ -491,5 +491,22 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE jt1 ALL NULL NULL NULL NULL 40 Table function: json_table
drop table t20,t21,t31,t32;
#
# MDEV-25142: JSON_TABLE: CREATE VIEW involving EXISTS PATH ends up with invalid frm
#
drop view if exists v1;
CREATE VIEW v1 AS SELECT * FROM JSON_TABLE('[]', '$' COLUMNS (f INT EXISTS PATH '$')) a ;
show create view v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `a`.`f` AS `f` from JSON_TABLE('[]', '$' COLUMNS (`f` int(11) EXISTS PATH '$')) `a` latin1 latin1_swedish_ci
drop view v1;
#
# MDEV-25145: JSON_TABLE: Assertion `fixed == 1' failed in Item_load_file::val_str on 2nd execution of PS
#
PREPARE stmt FROM "SELECT * FROM (SELECT * FROM JSON_TABLE(LOAD_FILE('x'), '$' COLUMNS (a FOR ORDINALITY)) AS t) AS sq";
EXECUTE stmt;
a
EXECUTE stmt;
a
#
# End of 10.6 tests
#
mysql-test/suite/json/t/json_table.test
View file @
99fc076f
...
...
@@ -388,6 +388,13 @@ CREATE VIEW v1 AS SELECT * FROM JSON_TABLE('[]', '$' COLUMNS (f INT EXISTS PATH
show
create
view
v1
;
drop
view
v1
;
--
echo
#
--
echo
# MDEV-25145: JSON_TABLE: Assertion `fixed == 1' failed in Item_load_file::val_str on 2nd execution of PS
--
echo
#
PREPARE
stmt
FROM
"SELECT * FROM (SELECT * FROM JSON_TABLE(LOAD_FILE('x'), '$' COLUMNS (a FOR ORDINALITY)) AS t) AS sq"
;
EXECUTE
stmt
;
EXECUTE
stmt
;
--
echo
#
--
echo
# End of 10.6 tests
--
echo
#
sql/sql_select.cc
View file @
99fc076f
...
...
@@ -1243,11 +1243,14 @@ JOIN::prepare(TABLE_LIST *tables_init, COND *conds_init, uint og_num,
thd
->
lex
->
current_select
->
context_analysis_place
;
thd
->
lex
->
current_select
->
context_analysis_place
=
SELECT_LIST
;
for
(
TABLE_LIST
*
tbl
=
tables_list
;
tbl
;
tbl
=
tbl
->
next_local
)
{
if
(
tbl
->
table_function
&&
tbl
->
table_function
->
setup
(
thd
,
tbl
,
select_lex_arg
))
DBUG_RETURN
(
-
1
);
List_iterator_fast
<
TABLE_LIST
>
it
(
select_lex
->
leaf_tables
);
while
((
tbl
=
it
++
))
{
if
(
tbl
->
table_function
&&
tbl
->
table_function
->
setup
(
thd
,
tbl
,
select_lex_arg
))
DBUG_RETURN
(
-
1
);
}
}
if
(
setup_fields
(
thd
,
ref_ptrs
,
fields_list
,
MARK_COLUMNS_READ
,
...
...
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