diff options
author | Varun Gupta <varun.gupta@mariadb.com> | 2020-03-28 12:31:22 +0530 |
---|---|---|
committer | Varun Gupta <varun.gupta@mariadb.com> | 2020-06-29 14:04:07 +0530 |
commit | 077b71e4e5e5ad4aa2b4a7f6a1b49d457f5ceb55 (patch) | |
tree | c4a09ebb32e662a1243c23601ab6bd65a321668f /sql/item_jsonfunc.h | |
parent | ead98fe5d34912578445d42e620c8ed95df4c433 (diff) | |
download | mariadb-git-10.5-varun2.tar.gz |
MDEV-21829: Use packed sort keys in Unique objects10.5-varun2
The task deals with packing the values stored in the Unique tree for each record.
The changes brought by this feature is:
1) Unique tree can have dynamic length keys
2) Format of keys looks like
<key_length> <packed_value1> <packed_value2> ....... <packed_valueN>
Unique class is currently used in
1) agg_func(DISTINCT col)
Here most aggregate functions like SUM, AVG accept only fixed size arguments
so it is not beneficial to use packing for these. Packing is done for
COUNT and GROUP_CONCAT (or JSON_ARRAYAGG) aggregate function as these are meaningful
2) index-merge stores row-ids
index merge stores row-ids which are of fixed size, so packing is not required
3) Engine Independent Table statistics
Packing is done here for variable length data types
This task is an extension to MDEV-21580.
Diffstat (limited to 'sql/item_jsonfunc.h')
-rw-r--r-- | sql/item_jsonfunc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_jsonfunc.h b/sql/item_jsonfunc.h index 0408b3ad72f..16f700724bb 100644 --- a/sql/item_jsonfunc.h +++ b/sql/item_jsonfunc.h @@ -547,6 +547,7 @@ protected: String *get_str_from_item(Item *i, String *tmp); String *get_str_from_field(Item *i, Field *f, String *tmp, const uchar *key, size_t offset); + String *get_str_from_field(Item *i, Field *f, String *tmp); void cut_max_length(String *result, uint old_length, uint max_length) const; public: |