1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

DS-MRR improvements:

- Correct buffer re-allocation
This commit is contained in:
Sergey Petrunya
2010-10-29 20:21:26 +04:00
parent 1e82320d27
commit 8e4c627ef8

View File

@@ -1092,10 +1092,17 @@ void DsMrr_impl::setup_buffer_sizes(uint key_size_in_keybuf,
void DsMrr_impl::reset_buffer_sizes() void DsMrr_impl::reset_buffer_sizes()
{ {
if (strategy != index_strategy)
{
/*
Ok we have both ordered index reader and there is a disk rearder.
Redistribute the buffer space.
*/
rowid_buffer.set_buffer_space(full_buf, rowid_buffer_end); rowid_buffer.set_buffer_space(full_buf, rowid_buffer_end);
key_buffer= &backward_key_buf; key_buffer= &backward_key_buf;
key_buffer->set_buffer_space(rowid_buffer_end, full_buf_end); key_buffer->set_buffer_space(rowid_buffer_end, full_buf_end);
} }
}
/** /**
Take unused space from the key buffer and give it to the rowid buffer Take unused space from the key buffer and give it to the rowid buffer