summaryrefslogtreecommitdiff
path: root/sql/field_conv.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-06-10 15:42:55 +0200
committerSergei Golubchik <sergii@pisem.net>2011-06-10 15:42:55 +0200
commitf1a5c49c4e9cee40d884193dd7477aff0cbffc53 (patch)
tree6d9ac661eaa5ed19834691bab35374e609f097ec /sql/field_conv.cc
parent10fedf675a1de161aec4ee09026db35400344507 (diff)
downloadmariadb-git-f1a5c49c4e9cee40d884193dd7477aff0cbffc53.tar.gz
various fixes for buildbot failures
Diffstat (limited to 'sql/field_conv.cc')
-rw-r--r--sql/field_conv.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/sql/field_conv.cc b/sql/field_conv.cc
index 38721484bf1..afc4d8252ff 100644
--- a/sql/field_conv.cc
+++ b/sql/field_conv.cc
@@ -669,11 +669,9 @@ Copy_field::get_copy_func(Field *to,Field *from)
{
/* If types are not 100 % identical then convert trough get_date() */
if (!to->eq_def(from) ||
- (((to->table->in_use->variables.sql_mode &
- (MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE |
- MODE_INVALID_DATES))) &&
- (to->type() == MYSQL_TYPE_DATE ||
- to->type() == MYSQL_TYPE_DATETIME)))
+ ((to->table->in_use->variables.sql_mode &
+ (MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE)) &&
+ mysql_type_to_time_type(to->type()) != MYSQL_TIMESTAMP_TIME))
return do_field_temporal;
/* Do binary copy */
}