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
c826b6b8
Commit
c826b6b8
authored
Aug 24, 2018
by
Igor Babaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a new parameter for the function eq_ranges_exceeds_limit()
introduced in the patch fo MDEV-16934.
parent
8b949d96
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
sql/multi_range_read.cc
sql/multi_range_read.cc
+5
-3
sql/opt_range.cc
sql/opt_range.cc
+2
-3
sql/opt_range.h
sql/opt_range.h
+2
-1
No files found.
sql/multi_range_read.cc
View file @
c826b6b8
...
...
@@ -64,13 +64,15 @@ handler::multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq,
ha_rows
rows
,
total_rows
=
0
;
uint
n_ranges
=
0
;
THD
*
thd
=
table
->
in_use
;
uint
limit
=
thd
->
variables
.
eq_range_index_dive_limit
;
bool
use_statistics_for_eq_range
=
eq_ranges_exceeds_limit
(
seq
,
seq_init_param
,
limit
);
/* Default MRR implementation doesn't need buffer */
*
bufsz
=
0
;
bool
use_statistics_for_eq_range
=
eq_ranges_exceeds_limit
(
seq
,
seq_init_param
);
seq_it
=
seq
->
init
(
seq_init_param
,
n_ranges
,
*
flags
);
while
(
!
seq
->
next
(
seq_it
,
&
range
))
{
...
...
sql/opt_range.cc
View file @
c826b6b8
...
...
@@ -14619,13 +14619,12 @@ void QUICK_GROUP_MIN_MAX_SELECT::add_keys_and_lengths(String *key_names,
/* Check whether the number for equality ranges exceeds the set threshold */
bool
eq_ranges_exceeds_limit
(
RANGE_SEQ_IF
*
seq
,
void
*
seq_init_param
)
bool
eq_ranges_exceeds_limit
(
RANGE_SEQ_IF
*
seq
,
void
*
seq_init_param
,
uint
limit
)
{
KEY_MULTI_RANGE
range
;
range_seq_t
seq_it
;
uint
count
=
0
;
PARAM
*
param
=
((
SEL_ARG_RANGE_SEQ
*
)
seq_init_param
)
->
param
;
uint
limit
=
param
->
thd
->
variables
.
eq_range_index_dive_limit
;
if
(
limit
==
0
)
{
...
...
sql/opt_range.h
View file @
c826b6b8
...
...
@@ -1664,7 +1664,8 @@ SQL_SELECT *make_select(TABLE *head, table_map const_tables,
bool
calculate_cond_selectivity_for_table
(
THD
*
thd
,
TABLE
*
table
,
Item
**
cond
);
bool
eq_ranges_exceeds_limit
(
RANGE_SEQ_IF
*
seq
,
void
*
seq_init_param
);
bool
eq_ranges_exceeds_limit
(
RANGE_SEQ_IF
*
seq
,
void
*
seq_init_param
,
uint
limit
);
#ifdef WITH_PARTITION_STORAGE_ENGINE
bool
prune_partitions
(
THD
*
thd
,
TABLE
*
table
,
Item
*
pprune_cond
);
...
...
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