summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.h
diff options
context:
space:
mode:
authorholyfoot/hf@mysql.com/hfmain.(none) <>2007-03-22 12:26:32 +0400
committerholyfoot/hf@mysql.com/hfmain.(none) <>2007-03-22 12:26:32 +0400
commitda5769fe6a6e3b2e8131cd98d01625d548dcd14d (patch)
tree13cd3eada91150e49b73f73913f717f5d34b1fd5 /sql/item_timefunc.h
parent1f9fd51c6da3d26e426c01a3c69e3fc9eb1a1928 (diff)
parente0f0507f999a35362e19ff0d80b3fd2565c83d7c (diff)
downloadmariadb-git-da5769fe6a6e3b2e8131cd98d01625d548dcd14d.tar.gz
Merge mysql.com:/home/hf/work/mrg/mysql-4.1-opt
into mysql.com:/home/hf/work/mrg/mysql-5.0-opt
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r--sql/item_timefunc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index beb1945b33c..acc5e6a80cc 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -847,12 +847,19 @@ public:
String *val_str(String *str);
const char *cast_type() const { return "datetime"; }
enum_field_types field_type() const { return MYSQL_TYPE_DATETIME; }
+ void fix_length_and_dec()
+ {
+ Item_typecast_maybe_null::fix_length_and_dec();
+ decimals= DATETIME_DEC;
+ }
+
Field *tmp_table_field(TABLE *t_arg)
{
return (new Field_datetime(maybe_null, name, t_arg, &my_charset_bin));
}
bool result_as_longlong() { return TRUE; }
longlong val_int();
+ double val() { return (double) val_int(); }
my_decimal *val_decimal(my_decimal *decimal_value)
{
DBUG_ASSERT(fixed == 1);