summaryrefslogtreecommitdiff
path: root/sql/item_func.h
diff options
context:
space:
mode:
authorunknown <aelkin/elkin@andrepl.(none)>2007-03-22 19:17:15 +0200
committerunknown <aelkin/elkin@andrepl.(none)>2007-03-22 19:17:15 +0200
commitdf3a48ea43b93ad91546d71c49963665f13179db (patch)
tree5b6f90921ec12ce7647de56ee8ec4aa590ef9155 /sql/item_func.h
parent3798a7d5008f8f569f779f096b7fc1e1cfac1031 (diff)
downloadmariadb-git-df3a48ea43b93ad91546d71c49963665f13179db.tar.gz
Bug #27354 stored function in where condition was always treated as const
Possible problems: function call could be eliminated from where class and only be evaluated once; function can be evaluated during table and item setup phase which could cause side effects not to be registered in binlog. Fixed with introducing func_item_sp::used_tables() returning the correct table_map constant. mysql-test/r/sp.result: results changed mysql-test/t/sp.test: regression test demonstrating that function's returns match where condition of the top-level query table. sql/item_func.h: private used_tables() method returning the correct table_bit with meaning the item is not a constant
Diffstat (limited to 'sql/item_func.h')
-rw-r--r--sql/item_func.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/item_func.h b/sql/item_func.h
index 68591f9c6f5..24f30994b22 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -1411,7 +1411,7 @@ private:
bool execute(Field **flp);
bool execute_impl(THD *thd, Field *return_value_fld);
Field *sp_result_field(void) const;
-
+
public:
Item_func_sp(Name_resolution_context *context_arg, sp_name *name);
@@ -1422,6 +1422,8 @@ public:
virtual ~Item_func_sp()
{}
+ table_map used_tables() const { return RAND_TABLE_BIT; }
+
void cleanup();
const char *func_name() const;