diff options
author | Varun Gupta <varun.gupta@mariadb.com> | 2020-01-21 01:37:47 +0530 |
---|---|---|
committer | Varun Gupta <varun.gupta@mariadb.com> | 2020-01-21 01:37:47 +0530 |
commit | f52bf92014efae6a1da9c2f26a7e3792ed5f5396 (patch) | |
tree | db6bcc38cf0afa665f54d53e972c185b258a645e /sql/bounded_queue.h | |
parent | ded128aa9b3d40775e626a08a744a93d9ba71b01 (diff) | |
download | mariadb-git-f52bf92014efae6a1da9c2f26a7e3792ed5f5396.tar.gz |
MDEV-21263: Allow packed values of non-sorted fields in the sort buffer
This task deals with packing the non-sorted fields (or addon fields).
This would lead to efficient usage of the memory allocated for the sort buffer.
The changes brought by this feature are
1) Sort buffers would have records of variable length
2) Each record in the sort buffer would be stored like
<sort_key1><sort_key2>....<addon_length><null_bytes><field1><field2>....
addon_length is the extra bytes that are required to store the variable
length of addon field across different records.
3) Changes in rr_unpack_from_buffer and rr_from_tempfile to take into account
the variable length of records.
Ported WL#1509 Pack values of non-sorted fields in the sort buffer from
MySQL by Tor Didriksen
Diffstat (limited to 'sql/bounded_queue.h')
-rw-r--r-- | sql/bounded_queue.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/bounded_queue.h b/sql/bounded_queue.h index fd733caa019..cd710d835aa 100644 --- a/sql/bounded_queue.h +++ b/sql/bounded_queue.h @@ -57,7 +57,7 @@ public: @param to Where to put the key. @param from The input data. */ - typedef void (*keymaker_function)(Sort_param *param, + typedef uint (*keymaker_function)(Sort_param *param, Key_type *to, Element_type *from); @@ -181,7 +181,7 @@ void Bounded_queue<Element_type, Key_type>::push(Element_type *element) { // Replace top element with new key, and re-order the queue. Key_type **pq_top= reinterpret_cast<Key_type **>(queue_top(&m_queue)); - (*m_keymaker)(m_sort_param, *pq_top, element); + (void)(*m_keymaker)(m_sort_param, *pq_top, element); queue_replace_top(&m_queue); } else { // Insert new key into the queue. |