summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mnogosearch.org>2013-12-10 13:34:59 +0400
committerAlexander Barkov <bar@mnogosearch.org>2013-12-10 13:34:59 +0400
commit03f6778d61a74bdd7d09103a16473a2a5624cf66 (patch)
treec24fbedad48bfedde09cba9e3561b24ab35e575d /sql/item_timefunc.cc
parent1f4f425a2007c51eeee35f911a787fc7d82d977c (diff)
downloadmariadb-git-03f6778d61a74bdd7d09103a16473a2a5624cf66.tar.gz
MDEV-5298 Illegal mix of collations on timestamp
Fixed.
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r--sql/item_timefunc.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index a50443ad348..6eaeec0804f 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -1467,7 +1467,9 @@ void Item_temporal_func::fix_length_and_dec()
(MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE);
collation.set(field_type() == MYSQL_TYPE_STRING ?
default_charset() : &my_charset_numeric,
- DERIVATION_NUMERIC, MY_REPERTOIRE_ASCII);
+ field_type() == MYSQL_TYPE_STRING ?
+ DERIVATION_COERCIBLE : DERIVATION_NUMERIC,
+ MY_REPERTOIRE_ASCII);
fix_char_length(char_length);
}