summaryrefslogtreecommitdiff
path: root/sql/item_func.h
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2011-05-19 20:01:43 -0700
committerIgor Babaev <igor@askmonty.org>2011-05-19 20:01:43 -0700
commit8e33aa9aa7a9d774b3f33a66cb3bd1416de9a0ae (patch)
tree23b56d29b235aebde574eb3d3c0a62942a548a10 /sql/item_func.h
parent54a3d1869c609407488782fd74c345b408dc9cdc (diff)
parent016a09cb7d40236c3530ae4c5c4815072aa8dacb (diff)
downloadmariadb-git-8e33aa9aa7a9d774b3f33a66cb3bd1416de9a0ae.tar.gz
Merged the fix for bug 777745 into 5.3.
Diffstat (limited to 'sql/item_func.h')
-rw-r--r--sql/item_func.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/sql/item_func.h b/sql/item_func.h
index 688614c333c..90dbffb0a05 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -252,6 +252,21 @@ public:
}
/*
+ By default only substitution for a field whose two different values
+ are never equal is allowed in the arguments of a function.
+ This is overruled for the direct arguments of comparison functions.
+ */
+ bool subst_argument_checker(uchar **arg)
+ {
+ if (*arg)
+ {
+ *arg= (uchar *) Item::IDENTITY_SUBST;
+ return TRUE;
+ }
+ return FALSE;
+ }
+
+ /*
We assume the result of any function that has a TIMESTAMP argument to be
timezone-dependent, since a TIMESTAMP value in both numeric and string
contexts is interpreted according to the current timezone.