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
925b5030
Commit
925b5030
authored
Mar 21, 2019
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 5.5 into 10.0
parents
5d454181
0dd12b4f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
1 deletion
+25
-1
mysql-test/r/subselect_sj.result
mysql-test/r/subselect_sj.result
+7
-0
mysql-test/r/subselect_sj_jcl6.result
mysql-test/r/subselect_sj_jcl6.result
+7
-0
mysql-test/t/subselect_sj.test
mysql-test/t/subselect_sj.test
+10
-0
sql/opt_subselect.cc
sql/opt_subselect.cc
+1
-1
No files found.
mysql-test/r/subselect_sj.result
View file @
925b5030
...
...
@@ -3180,5 +3180,12 @@ EXECUTE stmt;
a
drop view v3;
drop table t1,t2,t3;
#
# MDEV-18896: IN subquery in WHERE of a table-less query used for INSERT
#
create table t1 (a1 varchar(25));
create table t2 (a2 varchar(25)) ;
insert into t1 select 'xxx' from dual where 'xxx' in (select a2 from t2);
drop table t1,t2;
# End of 5.5 test
set optimizer_switch=@subselect_sj_tmp;
mysql-test/r/subselect_sj_jcl6.result
View file @
925b5030
...
...
@@ -3194,6 +3194,13 @@ EXECUTE stmt;
a
drop view v3;
drop table t1,t2,t3;
#
# MDEV-18896: IN subquery in WHERE of a table-less query used for INSERT
#
create table t1 (a1 varchar(25));
create table t2 (a2 varchar(25)) ;
insert into t1 select 'xxx' from dual where 'xxx' in (select a2 from t2);
drop table t1,t2;
# End of 5.5 test
set optimizer_switch=@subselect_sj_tmp;
#
...
...
mysql-test/t/subselect_sj.test
View file @
925b5030
...
...
@@ -2873,6 +2873,16 @@ EXECUTE stmt;
drop
view
v3
;
drop
table
t1
,
t2
,
t3
;
--
echo
#
--
echo
# MDEV-18896: IN subquery in WHERE of a table-less query used for INSERT
--
echo
#
create
table
t1
(
a1
varchar
(
25
));
create
table
t2
(
a2
varchar
(
25
))
;
insert
into
t1
select
'xxx'
from
dual
where
'xxx'
in
(
select
a2
from
t2
);
drop
table
t1
,
t2
;
--
echo
# End of 5.5 test
# The following command must be the last one the file
...
...
sql/opt_subselect.cc
View file @
925b5030
...
...
@@ -675,7 +675,7 @@ int check_and_do_in_subquery_rewrites(JOIN *join)
select_lex
->
outer_select
()
->
join
&&
// 6
parent_unit
->
first_select
()
->
leaf_tables
.
elements
&&
// 7
!
in_subs
->
has_strategy
()
&&
// 8
select_lex
->
outer_select
()
->
leaf_tables
.
elements
&&
// 9
select_lex
->
outer_select
()
->
table_list
.
first
&&
// 9
!
((
join
->
select_options
|
// 10
select_lex
->
outer_select
()
->
join
->
select_options
)
// 10
&
SELECT_STRAIGHT_JOIN
)
&&
// 10
...
...
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