summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-12-11 09:53:42 +0100
committerSergei Golubchik <serg@mariadb.org>2016-12-11 09:53:42 +0100
commit2f20d297f8ea731d845bb220e680ad10c7a927bc (patch)
tree9bd18ef1ab766422ba4c51b4ab189e259955a2d0 /sql/item_func.cc
parenta629b5172e96c96c414fca70fffd64c80f2f7e8f (diff)
parenteb4f2e063c341d9f3644339c68cb01679e782001 (diff)
downloadmariadb-git-2f20d297f8ea731d845bb220e680ad10c7a927bc.tar.gz
Merge branch '10.0' into 10.1
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index a1c5835d525..5eff7538b61 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -6610,7 +6610,8 @@ Item_func_sp::init_result_field(THD *thd)
bool Item_func_sp::is_expensive()
{
- return !(m_sp->m_chistics->detistic);
+ return !m_sp->m_chistics->detistic ||
+ current_thd->locked_tables_mode < LTM_LOCK_TABLES;
}