summaryrefslogtreecommitdiff
path: root/sql/ha_partition.h
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@oracle.com>2012-08-17 14:25:32 +0200
committerMattias Jonsson <mattias.jonsson@oracle.com>2012-08-17 14:25:32 +0200
commit1ffecedfc3e6ecdfa068c01a588cbe1ceca14ec2 (patch)
tree6742490fb7a37a207f99e451caaf8c6ea3a99555 /sql/ha_partition.h
parentbcee9f1896ab6015e77ea88fde5317f50edaead7 (diff)
downloadmariadb-git-1ffecedfc3e6ecdfa068c01a588cbe1ceca14ec2.tar.gz
Bug#13025132 - PARTITIONS USE TOO MUCH MEMORY
Additional patch to remove the part_id -> ref_buffer offset. The partitioning id and the associate record buffer can be found without having to calculate it. By initializing it for each used partition, and then reuse the key-buffer from the queue, it is not needed to have such map.
Diffstat (limited to 'sql/ha_partition.h')
-rw-r--r--sql/ha_partition.h17
1 files changed, 0 insertions, 17 deletions
diff --git a/sql/ha_partition.h b/sql/ha_partition.h
index a7e072a3b77..16d8f27bd71 100644
--- a/sql/ha_partition.h
+++ b/sql/ha_partition.h
@@ -524,23 +524,6 @@ private:
int partition_scan_set_up(uchar * buf, bool idx_read_flag);
int handle_unordered_next(uchar * buf, bool next_same);
int handle_unordered_scan_next_partition(uchar * buf);
- uchar *queue_buf(uint part_id)
- {
- uint16 *part_id_map= (uint16*) m_ordered_rec_buffer;
- /* Offset to the partition's record buffer in number of partitions. */
- uint offset= part_id_map[part_id];
- /*
- Return the pointer to the partition's record buffer.
- First skip the partition id map, and then add the offset.
- */
- return (m_ordered_rec_buffer + m_tot_parts * PARTITION_BYTES_IN_POS +
- (offset * (m_rec_length + PARTITION_BYTES_IN_POS)));
- }
- uchar *rec_buf(uint part_id)
- {
- return (queue_buf(part_id) +
- PARTITION_BYTES_IN_POS);
- }
int handle_ordered_index_scan(uchar * buf, bool reverse_order);
int handle_ordered_next(uchar * buf, bool next_same);
int handle_ordered_prev(uchar * buf);