summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <tnurnberg@white.intern.koehntopp.de>2007-11-10 03:11:18 +0100
committerunknown <tnurnberg@white.intern.koehntopp.de>2007-11-10 03:11:18 +0100
commit3e90d4185098e077780569248a1151648bd5f188 (patch)
tree31f7387dc6e20a18054fe00a73b3bed58ad0b4bf /sql
parentf97b8e48b8f6ec290f7cc7ca3fe59c33f7cb0d9e (diff)
parentb1fc4b9e639ab6913df49bbd8c01103eaf14c81d (diff)
downloadmariadb-git-3e90d4185098e077780569248a1151648bd5f188.tar.gz
Merge mysql.com:/misc/mysql/31990/50-31990
into mysql.com:/misc/mysql/31990/51-31990 mysql-test/r/cast.result: Auto merged mysql-test/t/cast.test: Auto merged sql/item_timefunc.cc: Auto merged sql/item_timefunc.h: Auto merged
Diffstat (limited to 'sql')
-rw-r--r--sql/item_timefunc.cc7
-rw-r--r--sql/item_timefunc.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 8240b7178c7..e7d513e9d6a 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -2586,6 +2586,13 @@ bool Item_date_typecast::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
}
+bool Item_date_typecast::get_time(MYSQL_TIME *ltime)
+{
+ bzero((char *)ltime, sizeof(MYSQL_TIME));
+ return args[0]->null_value;
+}
+
+
String *Item_date_typecast::val_str(String *str)
{
DBUG_ASSERT(fixed == 1);
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index 844c3d84313..9be7e97db49 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -778,6 +778,7 @@ public:
const char *func_name() const { return "cast_as_date"; }
String *val_str(String *str);
bool get_date(MYSQL_TIME *ltime, uint fuzzy_date);
+ bool get_time(MYSQL_TIME *ltime);
const char *cast_type() const { return "date"; }
enum_field_types field_type() const { return MYSQL_TYPE_DATE; }
Field *tmp_table_field(TABLE *table)