diff options
| author | Oleksandr Byelkin <sanja@mariadb.com> | 2023-01-31 11:07:08 +0100 |
|---|---|---|
| committer | Oleksandr Byelkin <sanja@mariadb.com> | 2023-01-31 11:07:08 +0100 |
| commit | c7c415734d27fb98f8019d4c3b646bbdb4906e46 (patch) | |
| tree | 1b71b075e54aac0e7b3b5a240f5835b0cc1d61d4 /sql/sql_select.h | |
| parent | 10635c2833a951b11b1d56e388244127e257ffb5 (diff) | |
| parent | 76bcea3154a3ac2c26024ac5cb241e19e0e277d9 (diff) | |
| download | mariadb-git-c7c415734d27fb98f8019d4c3b646bbdb4906e46.tar.gz | |
Merge branch '10.10' into 10.11
Diffstat (limited to 'sql/sql_select.h')
| -rw-r--r-- | sql/sql_select.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h index fa4d373d556..c766acb7909 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -1475,12 +1475,30 @@ public: (set in make_join_statistics()) */ bool impossible_where; - List<Item> all_fields; ///< to store all fields that used in query + + /* + All fields used in the query processing. + + Initially this is a list of fields from the query's SQL text. + + Then, ORDER/GROUP BY and Window Function code add columns that need to + be saved to be available in the post-group-by context. These extra columns + are added to the front, because this->all_fields points to the suffix of + this list. + */ + List<Item> all_fields; ///Above list changed to use temporary table List<Item> tmp_all_fields1, tmp_all_fields2, tmp_all_fields3; ///Part, shared with list above, emulate following list List<Item> tmp_fields_list1, tmp_fields_list2, tmp_fields_list3; - List<Item> &fields_list; ///< hold field list passed to mysql_select + + /* + The original field list as it was passed to mysql_select(). This refers + to select_lex->item_list. + CAUTION: this list is a suffix of this->all_fields list, that is, it shares + elements with that list! + */ + List<Item> &fields_list; List<Item> procedure_fields_list; int error; |
