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_select.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_select.h')
-rw-r--r-- | sql/sql_select.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h index 545db41798c..3d2f6003ba1 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -223,7 +223,7 @@ typedef enum_nested_loop_state (*Next_select_func)(JOIN *, struct st_join_table *, bool); Next_select_func setup_end_select_func(JOIN *join, JOIN_TAB *tab); int rr_sequential(READ_RECORD *info); -int rr_sequential_and_unpack(READ_RECORD *info); +int read_record_func_for_rr_and_unpack(READ_RECORD *info); Item *remove_pushed_top_conjuncts(THD *thd, Item *cond); Item *and_new_conditions_to_optimized_cond(THD *thd, Item *cond, COND_EQUAL **cond_eq, @@ -2358,7 +2358,6 @@ create_virtual_tmp_table(THD *thd, Field *field) int test_if_item_cache_changed(List<Cached_item> &list); int join_init_read_record(JOIN_TAB *tab); -int join_read_record_no_init(JOIN_TAB *tab); void set_position(JOIN *join,uint idx,JOIN_TAB *table,KEYUSE *key); inline Item * and_items(THD *thd, Item* cond, Item *item) { @@ -2416,6 +2415,7 @@ int print_explain_message_line(select_result_sink *result, void explain_append_mrr_info(QUICK_RANGE_SELECT *quick, String *res); int append_possible_keys(MEM_ROOT *alloc, String_list &list, TABLE *table, key_map possible_keys); +void unpack_to_base_table_fields(TABLE *table); /**************************************************************************** Temporary table support for SQL Runtime |