summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authorbar@mysql.com <>2006-04-17 15:36:25 +0500
committerbar@mysql.com <>2006-04-17 15:36:25 +0500
commita9e309210284763e0678d7f4138ed40dac2e8337 (patch)
tree0738141931f50401908c8d4c342286310beb0155 /sql/item_timefunc.cc
parent3fef2ba6aa8b4a54d14a2c4550edd2e5dfea2d2f (diff)
downloadmariadb-git-a9e309210284763e0678d7f4138ed40dac2e8337.tar.gz
item_timefunc.cc:
5.0 additional fix for b#18691 Handle DECIMAL the same with INT and REAL.
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r--sql/item_timefunc.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 84e532ba4bc..200541f22a7 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -2457,6 +2457,7 @@ void Item_char_typecast::fix_length_and_dec()
the argument's charset.
*/
from_cs= (args[0]->result_type() == INT_RESULT ||
+ args[0]->result_type() == DECIMAL_RESULT ||
args[0]->result_type() == REAL_RESULT) ?
(cast_cs->mbminlen == 1 ? cast_cs : &my_charset_latin1) :
args[0]->collation.collation;