summaryrefslogtreecommitdiff
path: root/sql/item_func.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2015-08-26 22:32:01 +0400
committerAlexander Barkov <bar@mariadb.org>2015-08-26 22:32:01 +0400
commit1b6b44b6b52e9f86bb32669a68bd7c067bc63d49 (patch)
treed094abc4292ccd30061cd77d666a6f9b8f8dc977 /sql/item_func.h
parentc0b7bf2625a305eae54e3065edffcd7a2da206b2 (diff)
downloadmariadb-git-1b6b44b6b52e9f86bb32669a68bd7c067bc63d49.tar.gz
MDEV-8661 Wrong result for SELECT..WHERE a='a' AND a='a' COLLATE latin1_bin
MDEV-8679 Equal field propagation is not used for VARCHAR when it safely could
Diffstat (limited to 'sql/item_func.h')
-rw-r--r--sql/item_func.h22
1 files changed, 9 insertions, 13 deletions
diff --git a/sql/item_func.h b/sql/item_func.h
index 244e5b05b1d..b9e431377b1 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -341,19 +341,15 @@ public:
return FALSE;
}
- /*
- 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;
+ Item* propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond)
+ {
+ /*
+ 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.
+ */
+ Item_args::propagate_equal_fields(thd, IDENTITY_SUBST, cond);
+ return this;
}
/*