diff options
author | unknown <timour@askmonty.org> | 2012-06-19 15:06:45 +0300 |
---|---|---|
committer | unknown <timour@askmonty.org> | 2012-06-19 15:06:45 +0300 |
commit | 0b93b444b6c4de6b219fd3a4b3d5fa2e388dc211 (patch) | |
tree | 14476572c91530f3b354041e1683e2b042b9a9cd /sql/item_subselect.h | |
parent | 37f8094652c438360b66aa04a46acb96d3eea6b7 (diff) | |
parent | cf3a499f541e66e1b8aa96fe16e36a48ed1c0a0e (diff) | |
download | mariadb-git-0b93b444b6c4de6b219fd3a4b3d5fa2e388dc211.tar.gz |
Merged the fix for bug lp:944706, mdev-193
Diffstat (limited to 'sql/item_subselect.h')
-rw-r--r-- | sql/item_subselect.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/item_subselect.h b/sql/item_subselect.h index 6b00cd18d6e..05c4528490f 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -209,7 +209,7 @@ public: */ bool is_evaluated() const; bool is_uncacheable() const; - bool is_expensive() { return TRUE; } + bool is_expensive(); /* Used by max/min subquery to initialize value presence registration @@ -235,7 +235,7 @@ public: @retval TRUE if the predicate is expensive @retval FALSE otherwise */ - bool is_expensive_processor(uchar *arg) { return TRUE; } + bool is_expensive_processor(uchar *arg) { return is_expensive(); } /** Get the SELECT_LEX structure associated with this Item. @@ -581,6 +581,10 @@ public: bool fix_fields(THD *thd, Item **ref); void fix_length_and_dec(); void fix_after_pullout(st_select_lex *new_parent, Item **ref); + bool const_item() const + { + return Item_subselect::const_item() && left_expr->const_item(); + } void update_used_tables(); bool setup_mat_engine(); bool init_left_expr_cache(); |