mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user