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
135bf1fc
Commit
135bf1fc
authored
Oct 21, 2014
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
81194d92
1a996bde
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
29 deletions
+29
-29
mysql-test/r/derived_opt.result
mysql-test/r/derived_opt.result
+8
-8
mysql-test/t/derived_opt.test
mysql-test/t/derived_opt.test
+7
-7
sql/sql_select.cc
sql/sql_select.cc
+14
-14
No files found.
mysql-test/r/derived_opt.result
View file @
135bf1fc
...
@@ -376,7 +376,7 @@ where
...
@@ -376,7 +376,7 @@ where
D1.a= t1.a;
D1.a= t1.a;
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 10 Using where
1 PRIMARY t1 ALL NULL NULL NULL NULL 10 Using where
1 PRIMARY <derived2>
ref key0 key0 5 test.t1.a 10
1 PRIMARY <derived2>
hash_ALL key0 #hash#key0 5 test.t1.a 100 Using join buffer (flat, BNLH join)
2 DERIVED t2 ALL NULL NULL NULL NULL 100 Using filesort
2 DERIVED t2 ALL NULL NULL NULL NULL 100 Using filesort
set join_cache_level=@tmp_jcl;
set join_cache_level=@tmp_jcl;
set optimizer_switch=@tmp_os;
set optimizer_switch=@tmp_os;
...
...
mysql-test/t/derived_opt.test
View file @
135bf1fc
sql/sql_select.cc
View file @
135bf1fc
...
@@ -10549,6 +10549,19 @@ uint check_join_cache_usage(JOIN_TAB *tab,
...
@@ -10549,6 +10549,19 @@ uint check_join_cache_usage(JOIN_TAB *tab,
cache_level
--
;
cache_level
--
;
}
}
/*
Don't use BKA for materialized tables. We could actually have a
meaningful use of BKA when linked join buffers are used.
The problem is, the temp.table is not filled (actually not even opened
properly) yet, and this doesn't let us call
handler->multi_range_read_info(). It is possible to come up with
estimates, etc. without acessing the table, but it seems not to worth the
effort now.
*/
if
(
tab
->
table
->
pos_in_table_list
->
is_materialized_derived
())
no_bka_cache
=
true
;
/*
/*
Don't use join buffering if we're dictated not to by no_jbuf_after
Don't use join buffering if we're dictated not to by no_jbuf_after
(This is not meaningfully used currently)
(This is not meaningfully used currently)
...
@@ -10615,20 +10628,7 @@ uint check_join_cache_usage(JOIN_TAB *tab,
...
@@ -10615,20 +10628,7 @@ uint check_join_cache_usage(JOIN_TAB *tab,
if
(
tab
->
ref
.
is_access_triggered
())
if
(
tab
->
ref
.
is_access_triggered
())
goto
no_join_cache
;
goto
no_join_cache
;
/*
if
(
!
tab
->
is_ref_for_hash_join
()
&&
!
no_bka_cache
)
Don't use BKA for materialized tables. We could actually have a
meaningful use of BKA when linked join buffers are used.
The problem is, the temp.table is not filled (actually not even opened
properly) yet, and this doesn't let us call
handler->multi_range_read_info(). It is possible to come up with
estimates, etc. without acessing the table, but it seems not to worth the
effort now.
*/
if
(
tab
->
table
->
pos_in_table_list
->
is_materialized_derived
())
goto
no_join_cache
;
if
(
!
tab
->
is_ref_for_hash_join
())
{
{
flags
=
HA_MRR_NO_NULL_ENDPOINTS
|
HA_MRR_SINGLE_POINT
;
flags
=
HA_MRR_NO_NULL_ENDPOINTS
|
HA_MRR_SINGLE_POINT
;
if
(
tab
->
table
->
covering_keys
.
is_set
(
tab
->
ref
.
key
))
if
(
tab
->
table
->
covering_keys
.
is_set
(
tab
->
ref
.
key
))
...
...
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