diff options
author | unknown <df@pippilotta.erinye.com> | 2007-10-04 16:08:13 +0200 |
---|---|---|
committer | unknown <df@pippilotta.erinye.com> | 2007-10-04 16:08:13 +0200 |
commit | 9e89a087c4bd5d0f65a1e1a08f5a274795942f70 (patch) | |
tree | b8861f4f52422ca021609e7e966d179643b83d64 /sql/item_func.cc | |
parent | 319c6ef199118a8cf5431381c7d80551ec5f05c2 (diff) | |
download | mariadb-git-9e89a087c4bd5d0f65a1e1a08f5a274795942f70.tar.gz |
apply patch for bug#31035 to 5.0.50 release clone
mysql-test/r/sp.result:
apply patch for bug#31035
mysql-test/t/sp.test:
apply patch for bug#31035
sql/item_func.cc:
apply patch for bug#31035
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index d03d497dfd0..f7103c22581 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -5583,8 +5583,13 @@ 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; + { + used_tables_cache |= RAND_TABLE_BIT; + const_item_cache= FALSE; + } + DBUG_RETURN(res); } @@ -5592,6 +5597,10 @@ Item_func_sp::fix_fields(THD *thd, Item **ref) void Item_func_sp::update_used_tables() { Item_func::update_used_tables(); + if (!m_sp->m_chistics->detistic) - used_tables_cache |= RAND_TABLE_BIT; + { + used_tables_cache |= RAND_TABLE_BIT; + const_item_cache= FALSE; + } } |