summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2013-01-23 15:18:05 -0800
committerIgor Babaev <igor@askmonty.org>2013-01-23 15:18:05 -0800
commit32151409c13ddc09ebda7cd02fdfe40db290503e (patch)
tree86997a41bbc6c4379209af0cccdb4ae612c8d4f4 /sql/item_func.cc
parentf1e758dc6f4183a8e3856d21c95f7e4973c585c1 (diff)
parent746152959a8787f3c7cf6b1c710fc1ee6c54419f (diff)
downloadmariadb-git-32151409c13ddc09ebda7cd02fdfe40db290503e.tar.gz
Merge 5.3->5.5
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 7053b8fec65..7f309c7a4d3 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -6525,6 +6525,19 @@ Item_func_sp::init_result_field(THD *thd)
/**
+ @note
+ Deterministic stored procedures are considered inexpensive.
+ Consequently such procedures may be evaluated during optimization,
+ if they are constant (checked by the optimizer).
+*/
+
+bool Item_func_sp::is_expensive()
+{
+ return !(m_sp->m_chistics->detistic);
+}
+
+
+/**
@brief Initialize local members with values from the Field interface.
@note called from Item::fix_fields.