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
17034306
Commit
17034306
authored
Aug 13, 2012
by
Mattias Jonsson
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
3f8a9984
6592afd5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
16 deletions
+24
-16
sql/opt_range.cc
sql/opt_range.cc
+24
-16
No files found.
sql/opt_range.cc
View file @
17034306
...
...
@@ -3071,27 +3071,28 @@ int find_used_partitions(PART_PRUNE_PARAM *ppar, SEL_ARG *key_tree)
ppar
->
cur_subpart_fields
+=
ppar
->
is_subpart_keypart
[
key_tree_part
];
*
(
ppar
->
arg_stack_end
++
)
=
key_tree
;
if
(
ignore_part_fields
)
{
/*
We come here when a condition on the first partitioning
fields led to evaluating the partitioning condition
(due to finding a condition of the type a < const or
b > const). Thus we must ignore the rest of the
partitioning fields but we still want to analyse the
subpartitioning fields.
*/
if
(
key_tree
->
next_key_part
)
res
=
find_used_partitions
(
ppar
,
key_tree
->
next_key_part
);
else
res
=
-
1
;
goto
pop_and_go_right
;
}
if
(
key_tree
->
type
==
SEL_ARG
::
KEY_RANGE
)
{
if
(
ppar
->
part_info
->
get_part_iter_for_interval
&&
key_tree
->
part
<=
ppar
->
last_part_partno
)
{
if
(
ignore_part_fields
)
{
/*
We come here when a condition on the first partitioning
fields led to evaluating the partitioning condition
(due to finding a condition of the type a < const or
b > const). Thus we must ignore the rest of the
partitioning fields but we still want to analyse the
subpartitioning fields.
*/
if
(
key_tree
->
next_key_part
)
res
=
find_used_partitions
(
ppar
,
key_tree
->
next_key_part
);
else
res
=
-
1
;
goto
pop_and_go_right
;
}
/* Collect left and right bound, their lengths and flags */
uchar
*
min_key
=
ppar
->
cur_min_key
;
uchar
*
max_key
=
ppar
->
cur_max_key
;
...
...
@@ -3332,6 +3333,13 @@ int find_used_partitions(PART_PRUNE_PARAM *ppar, SEL_ARG *key_tree)
res
=
-
1
;
goto
pop_and_go_right
;
}
/*
No meaning in continuing with rest of partitioning key parts.
Will try to continue with subpartitioning key parts.
*/
ppar
->
ignore_part_fields
=
true
;
did_set_ignore_part_fields
=
true
;
goto
process_next_key_part
;
}
}
...
...
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