summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2017-10-07 13:42:11 +0400
committerAlexander Barkov <bar@mariadb.org>2017-10-07 13:42:11 +0400
commitca948e335e0e43538f994484938dd729b32ae286 (patch)
tree42c88abe8149ad003a5305da526c0cf0afbf326f /sql/item.cc
parentdbeffabc83ed01112e09d7e782d44f044cfcb691 (diff)
downloadmariadb-git-ca948e335e0e43538f994484938dd729b32ae286.tar.gz
MDEV-9886 Illegal mix of collations with a view comparing a field to a binary constant
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 0b603e1ad2c..3e0f71f843f 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -2162,6 +2162,9 @@ bool agg_item_collations_for_comparison(DTCollation &c, const char *fname,
bool agg_item_set_converter(DTCollation &coll, const char *fname,
Item **args, uint nargs, uint flags, int item_sep)
{
+ THD *thd= current_thd;
+ if (thd->lex->is_ps_or_view_context_analysis())
+ return false;
Item **arg, *safe_args[2]= {NULL, NULL};
/*
@@ -2177,7 +2180,6 @@ bool agg_item_set_converter(DTCollation &coll, const char *fname,
safe_args[1]= args[item_sep];
}
- THD *thd= current_thd;
bool res= FALSE;
uint i;