summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-10-24 14:53:18 +0200
committerSergei Golubchik <serg@mariadb.org>2017-10-24 14:53:18 +0200
commite0a1c745ec3ed1ec6c0375a2a624697c29f480a6 (patch)
tree24ded2c6ebe3ea3413ce56af89ea0f2f63bb3a39 /sql/item_timefunc.h
parent4ec88ea9c3ec52d996b39167d12a61ab95fdeacc (diff)
parent2aa51f528fd5d23cc54eca8fbd07e88e7b2993c7 (diff)
downloadmariadb-git-e0a1c745ec3ed1ec6c0375a2a624697c29f480a6.tar.gz
Merge branch '10.1' into 10.2
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r--sql/item_timefunc.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index dccccc479ef..354a54a5c1a 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -546,8 +546,16 @@ public:
{ return val_decimal_from_date(decimal_value); }
Field *create_field_for_create_select(TABLE *table)
{ return tmp_table_field_from_field_type(table, false, false); }
+#if MARIADB_VERSION_ID > 100300
+#error This code should be removed in 10.3, to use the derived save_in_field()
+#else
int save_in_field(Field *field, bool no_conversions)
- { return save_date_in_field(field); }
+ {
+ return field_type() == MYSQL_TYPE_TIME ?
+ save_time_in_field(field) :
+ save_date_in_field(field);
+ }
+#endif
void fix_length_and_dec();
};