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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
87e7b521
Commit
87e7b521
authored
Nov 13, 2012
by
Mattias Jonsson
Browse files
Options
Browse Files
Download
Plain Diff
manual merge of bug#14845133 mysql-5.1 -> mysql-5.5
parents
95264568
d43e1987
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
sql/ha_partition.cc
sql/ha_partition.cc
+19
-2
No files found.
sql/ha_partition.cc
View file @
87e7b521
...
...
@@ -4230,6 +4230,7 @@ bool ha_partition::init_record_priority_queue()
{
if
(
bitmap_is_set
(
&
m_part_info
->
used_partitions
,
i
))
{
DBUG_PRINT
(
"info"
,
(
"init rec-buf for part %u"
,
i
));
int2store
(
ptr
,
i
);
ptr
+=
m_rec_length
+
PARTITION_BYTES_IN_POS
;
}
...
...
@@ -5150,11 +5151,27 @@ int ha_partition::handle_ordered_index_scan(uchar *buf, bool reverse_order)
m_top_entry
=
NO_CURRENT_PART_ID
;
queue_remove_all
(
&
m_queue
);
DBUG_PRINT
(
"info"
,
(
"m_part_spec.start_part %d"
,
m_part_spec
.
start_part
));
for
(
i
=
m_part_spec
.
start_part
;
i
<=
m_part_spec
.
end_part
;
i
++
)
/*
Position part_rec_buf_ptr to point to the first used partition >=
start_part. There may be partitions marked by used_partitions,
but is before start_part. These partitions has allocated record buffers
but is dynamically pruned, so those buffers must be skipped.
*/
uint
first_used_part
=
bitmap_get_first_set
(
&
m_part_info
->
used_partitions
);
for
(;
first_used_part
<
m_part_spec
.
start_part
;
first_used_part
++
)
{
if
(
bitmap_is_set
(
&
(
m_part_info
->
used_partitions
),
first_used_part
))
part_rec_buf_ptr
+=
m_rec_length
+
PARTITION_BYTES_IN_POS
;
}
DBUG_PRINT
(
"info"
,
(
"m_part_spec.start_part %u first_used_part %u"
,
m_part_spec
.
start_part
,
first_used_part
));
for
(
i
=
first_used_part
;
i
<=
m_part_spec
.
end_part
;
i
++
)
{
if
(
!
(
bitmap_is_set
(
&
(
m_part_info
->
used_partitions
),
i
)))
continue
;
DBUG_PRINT
(
"info"
,
(
"reading from part %u (scan_type: %u)"
,
i
,
m_index_scan_type
));
DBUG_ASSERT
(
i
==
uint2korr
(
part_rec_buf_ptr
));
uchar
*
rec_buf_ptr
=
part_rec_buf_ptr
+
PARTITION_BYTES_IN_POS
;
int
error
;
handler
*
file
=
m_file
[
i
];
...
...
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