diff options
author | Varun Gupta <varun.gupta@mariadb.com> | 2020-07-08 20:43:57 +0530 |
---|---|---|
committer | Varun Gupta <varun.gupta@mariadb.com> | 2020-07-08 20:43:57 +0530 |
commit | 7148b846738412517bf4998128ba66a277721630 (patch) | |
tree | 1f8fd175dbd5a25da4d96a0a623f867becb2e805 /sql/sql_sort.h | |
parent | 9701759b3d9ea9fd9bee640ce27171bdd51b7e78 (diff) | |
download | mariadb-git-7148b846738412517bf4998128ba66a277721630.tar.gz |
MDEV-13694: Wrong result upon GROUP BY with orderby_uses_equalities=on
For the case when the SJM scan table is the first table in the join order,
then if we want to do the sorting on the SJM scan table, then we need to
make sure that we unpack the values to base table fields in two cases:
1) Reading the SJM table and writing the sort-keys inside the sort-buffer
2) Reading the sorted data from the sort file
Diffstat (limited to 'sql/sql_sort.h')
-rw-r--r-- | sql/sql_sort.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_sort.h b/sql/sql_sort.h index 40f0c5ede5f..3230052dd84 100644 --- a/sql/sql_sort.h +++ b/sql/sql_sort.h @@ -533,6 +533,7 @@ public: Addon_fields *addon_fields; // Descriptors for companion fields. Sort_keys *sort_keys; bool using_pq; + bool set_all_read_bits; uchar *unique_buff; bool not_killable; @@ -553,6 +554,8 @@ public: } void init_for_filesort(uint sortlen, TABLE *table, ha_rows maxrows, bool sort_positions); + + void (*unpack)(TABLE *); /// Enables the packing of addons if possible. void try_to_pack_addons(ulong max_length_for_sort_data); |