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/uniques.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/uniques.h')
-rw-r--r-- | sql/uniques.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/uniques.h b/sql/uniques.h index 654b3692aaa..f83eac36855 100644 --- a/sql/uniques.h +++ b/sql/uniques.h @@ -39,7 +39,7 @@ class Unique :public Sql_alloc uint min_dupl_count; /* always 0 for unions, > 0 for intersections */ bool with_counters; - bool merge(TABLE *table, uchar *buff, bool without_last_merge); + bool merge(TABLE *table, uchar *buff, size_t size, bool without_last_merge); bool flush(); public: |