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
6c351cd8
Commit
6c351cd8
authored
Jun 05, 2010
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More fixes
parent
49568aef
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
12 deletions
+19
-12
mysql-test/r/subselect_no_mat.result
mysql-test/r/subselect_no_mat.result
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+18
-11
No files found.
mysql-test/r/subselect_no_mat.result
View file @
6c351cd8
...
...
@@ -1364,7 +1364,7 @@ explain extended select * from t2 where t2.a in (select t1.a from t1,t3 where t1
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index a a 5 NULL 4 100.00 Using index
1 PRIMARY t3 index a a 5 NULL 3 100.00 Using index
1 PRIMARY t1 ref a a 10 test.t2.a,test.t3.a 116 100.
61
Using index; FirstMatch(t2)
1 PRIMARY t1 ref a a 10 test.t2.a,test.t3.a 116 100.
00
Using index; FirstMatch(t2)
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` semi join (`test`.`t1` join `test`.`t3`) where ((`test`.`t1`.`a` = `test`.`t2`.`a`) and (`test`.`t1`.`b` = `test`.`t3`.`a`))
insert into t1 values (3,31);
...
...
sql/sql_select.cc
View file @
6c351cd8
...
...
@@ -6060,6 +6060,8 @@ get_best_combination(JOIN *join)
j
->
quick
=
NULL
;
sjm_nest_end
=
jt
+
sjm
->
tables
;
sjm_saved_tab
=
j
;
root_range
->
end
=
j
+
1
;
j
=
jt
;
//goto loop_end_not_table;
}
...
...
@@ -6870,7 +6872,9 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
if
(
tmp
||
!
cond
||
tab
->
type
==
JT_REF
||
tab
->
type
==
JT_REF_OR_NULL
||
tab
->
type
==
JT_EQ_REF
||
first_inner_tab
)
{
DBUG_EXECUTE
(
"where"
,
print_where
(
tmp
,
tab
->
table
->
alias
,
QT_ORDINARY
););
DBUG_EXECUTE
(
"where"
,
print_where
(
tmp
,
tab
->
table
?
tab
->
table
->
alias
:
"sjm-nest"
,
QT_ORDINARY
););
SQL_SELECT
*
sel
=
tab
->
select
=
((
SQL_SELECT
*
)
thd
->
memdup
((
uchar
*
)
select
,
sizeof
(
*
select
)));
...
...
@@ -6894,6 +6898,8 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
tab
->
set_select_cond
(
tmp
,
__LINE__
);
/* Push condition to storage engine if this is enabled
and the condition is not guarded */
if
(
tab
->
table
)
//psergey3-todo: how about ICP for bushy plans?
{
tab
->
table
->
file
->
pushed_cond
=
NULL
;
if
(
thd
->
variables
.
engine_condition_pushdown
&&
!
first_inner_tab
)
{
...
...
@@ -6907,6 +6913,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
}
}
}
}
else
{
sel
->
cond
=
NULL
;
...
...
@@ -6914,7 +6921,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
}
sel
->
head
=
tab
->
table
;
DBUG_EXECUTE
(
"where"
,
print_where
(
tmp
,
tab
->
table
->
alias
,
QT_ORDINARY
););
DBUG_EXECUTE
(
"where"
,
print_where
(
tmp
,
tab
->
table
?
tab
->
table
->
alias
:
"sjm-nest"
,
QT_ORDINARY
););
if
(
tab
->
quick
)
{
/* Use quick key read if it's a constant and it's not used
...
...
@@ -6933,7 +6940,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
}
tab
->
quick
=
0
;
}
uint
ref_key
=
(
uint
)
sel
->
head
->
reginfo
.
join_tab
->
ref
.
key
+
1
;
uint
ref_key
=
sel
->
head
?
(
uint
)
sel
->
head
->
reginfo
.
join_tab
->
ref
.
key
+
1
:
0
;
if
(
i
==
join
->
const_tables
&&
ref_key
)
{
if
(
!
tab
->
const_keys
.
is_clear_all
()
&&
...
...
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