summaryrefslogtreecommitdiff
path: root/sql/field_conv.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-07-03 09:46:20 +0200
committerSergei Golubchik <sergii@pisem.net>2013-07-03 09:46:20 +0200
commit78cc6db44a9f1344dd5c00cf4f3cdde158fe108e (patch)
tree3f6ad0e92adf22f242be974da029d4194dec2cf2 /sql/field_conv.cc
parentcfae3065d7ed5b7c5aa35596933d9f234f221878 (diff)
downloadmariadb-git-78cc6db44a9f1344dd5c00cf4f3cdde158fe108e.tar.gz
MDEV-4667 DATE('string') incompability between mysql and mariadb
Cleanup: remove TIME_FUZZY_DATE. Introduce TIME_FUZZY_DATES which means "very fuzzy, the resulting value is only used for comparison. It can be invalid date, fine, as long as it can be compared". Updated many tests results (they're better now).
Diffstat (limited to 'sql/field_conv.cc')
-rw-r--r--sql/field_conv.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/field_conv.cc b/sql/field_conv.cc
index a64b77bf500..7ec3fe5ea7b 100644
--- a/sql/field_conv.cc
+++ b/sql/field_conv.cc
@@ -413,7 +413,7 @@ static void do_field_decimal(Copy_field *copy)
static void do_field_temporal(Copy_field *copy)
{
MYSQL_TIME ltime;
- copy->from_field->get_date(&ltime, TIME_FUZZY_DATE);
+ copy->from_field->get_date(&ltime, 0);
copy->to_field->store_time_dec(&ltime, copy->from_field->decimals());
}
@@ -884,7 +884,7 @@ int field_conv(Field *to,Field *from)
if (from->cmp_type() == TIME_RESULT)
{
MYSQL_TIME ltime;
- if (from->get_date(&ltime, TIME_FUZZY_DATE))
+ if (from->get_date(&ltime, 0))
return to->reset();
else
return to->store_time_dec(&ltime, from->decimals());