summaryrefslogtreecommitdiff
path: root/libmysql/libmysql.c
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 /libmysql/libmysql.c
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 'libmysql/libmysql.c')
-rw-r--r--libmysql/libmysql.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index e8887b81e68..2d64aa99bfa 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -3549,7 +3549,7 @@ static void fetch_string_with_conversion(MYSQL_BIND *param, char *value,
case MYSQL_TYPE_TIME:
{
MYSQL_TIME *tm= (MYSQL_TIME *)buffer;
- str_to_time(value, length, tm, TIME_FUZZY_DATE, &err);
+ str_to_time(value, length, tm, 0, &err);
*param->error= test(err);
break;
}
@@ -3558,7 +3558,7 @@ static void fetch_string_with_conversion(MYSQL_BIND *param, char *value,
case MYSQL_TYPE_TIMESTAMP:
{
MYSQL_TIME *tm= (MYSQL_TIME *)buffer;
- (void) str_to_datetime(value, length, tm, TIME_FUZZY_DATE, &err);
+ (void) str_to_datetime(value, length, tm, 0, &err);
*param->error= test(err) && (param->buffer_type == MYSQL_TYPE_DATE &&
tm->time_type != MYSQL_TIMESTAMP_DATE);
break;
@@ -3681,9 +3681,7 @@ static void fetch_long_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
case MYSQL_TYPE_DATETIME:
{
int error;
- value= number_to_datetime(value, 0,
- (MYSQL_TIME *) buffer, TIME_FUZZY_DATE,
- &error);
+ value= number_to_datetime(value, 0, (MYSQL_TIME *) buffer, 0, &error);
*param->error= test(error);
break;
}