summaryrefslogtreecommitdiff
path: root/sql/sql_type.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2021-05-17 00:59:51 +0200
committerSergei Golubchik <serg@mariadb.org>2021-05-19 22:27:53 +0200
commit6de84e6f4e9c647981abf0fb4f2a42a0a98ac201 (patch)
tree019c3e30ebec7f9e2dd5c844adec1f036b8f6288 /sql/sql_type.cc
parent30f0a246a0a2051a5228ecc1c365129ff9920396 (diff)
downloadmariadb-git-6de84e6f4e9c647981abf0fb4f2a42a0a98ac201.tar.gz
cleanup: Item::can_eval_in_optimize()
a helper method to check whether an item can be evaluated in the query optimization phase (in and below JOIN::optimize()).
Diffstat (limited to 'sql/sql_type.cc')
-rw-r--r--sql/sql_type.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_type.cc b/sql/sql_type.cc
index 2ed15d54569..c5c34bac9f5 100644
--- a/sql/sql_type.cc
+++ b/sql/sql_type.cc
@@ -725,7 +725,7 @@ uint Interval_DDhhmmssff::fsp(THD *thd, Item *item)
case STRING_RESULT:
break;
}
- if (!item->const_item() || item->is_expensive())
+ if (!item->can_eval_in_optimize())
return TIME_SECOND_PART_DIGITS;
Status st;
Interval_DDhhmmssff it(thd, &st, false/*no warnings*/, item, UINT_MAX32,