diff options
author | Sergei Golubchik <serg@mariadb.org> | 2022-05-07 11:48:15 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2022-05-07 11:48:15 +0200 |
commit | 6f741eb6e4b88d17c48e43a48faf8e18ed5f33d8 (patch) | |
tree | 96ad1c019a99ed271f588471b710887aca42d297 /sql/sql_select.cc | |
parent | 0db27eff27dba9a2bf12653a20e503e029397b9a (diff) | |
parent | a5dc12eefd4bea1c3f77d02c55d0d459b4ae0566 (diff) | |
download | mariadb-git-6f741eb6e4b88d17c48e43a48faf8e18ed5f33d8.tar.gz |
Merge branch '10.2' into 10.3
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index d437da4b7cd..23e69b32e39 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2016, Oracle and/or its affiliates. - Copyright (c) 2009, 2021, MariaDB Corporation. + Copyright (c) 2009, 2022, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -24710,15 +24710,17 @@ change_to_use_tmp_fields(THD *thd, Ref_ptr_array ref_pointer_array, for (uint i= 0; (item= it++); i++) { Field *field; - if ((item->with_sum_func && item->type() != Item::SUM_FUNC_ITEM) || + enum Item::Type item_type= item->type(); + if ((item->with_sum_func && item_type != Item::SUM_FUNC_ITEM) || item->with_window_func) item_field= item; - else if (item->type() == Item::FIELD_ITEM) + else if (item_type == Item::FIELD_ITEM || + item_type == Item::DEFAULT_VALUE_ITEM) { if (!(item_field= item->get_tmp_table_item(thd))) DBUG_RETURN(true); } - else if (item->type() == Item::FUNC_ITEM && + else if (item_type == Item::FUNC_ITEM && ((Item_func*)item)->functype() == Item_func::SUSERVAR_FUNC) { field= item->get_tmp_table_field(); @@ -26547,7 +26549,7 @@ static void print_table_array(THD *thd, too) */ -static bool is_eliminated_table(table_map eliminated_tables, TABLE_LIST *tbl) +bool is_eliminated_table(table_map eliminated_tables, TABLE_LIST *tbl) { return eliminated_tables && ((tbl->table && (tbl->table->map & eliminated_tables)) || |