summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index b256ce4624a..e05f0a45083 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -5591,5 +5591,15 @@ Item_func_sp::fix_fields(THD *thd, Item **ref)
#endif /* ! NO_EMBEDDED_ACCESS_CHECKS */
}
+ if (!m_sp->m_chistics->detistic)
+ used_tables_cache |= RAND_TABLE_BIT;
DBUG_RETURN(res);
}
+
+
+void Item_func_sp::update_used_tables()
+{
+ Item_func::update_used_tables();
+ if (!m_sp->m_chistics->detistic)
+ used_tables_cache |= RAND_TABLE_BIT;
+}