mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user