diff options
Diffstat (limited to 'libmysqld')
-rw-r--r-- | libmysqld/CMakeLists.txt | 2 | ||||
-rw-r--r-- | libmysqld/libmysql.c | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt index 537f40cbbbf..dfb5d4ce86f 100644 --- a/libmysqld/CMakeLists.txt +++ b/libmysqld/CMakeLists.txt @@ -118,7 +118,7 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc ../sql/ha_sequence.cc ../sql/ha_sequence.h ../sql/temporary_tables.cc ../sql/session_tracker.cc - ../sql/proxy_protocol.cc + ../sql/proxy_protocol.cc ../sql/backup.cc ../sql/sql_tvc.cc ../sql/sql_tvc.h ../sql/opt_split.cc ../sql/item_vers.cc diff --git a/libmysqld/libmysql.c b/libmysqld/libmysql.c index b3ef96698ff..cd170b42b42 100644 --- a/libmysqld/libmysql.c +++ b/libmysqld/libmysql.c @@ -3215,7 +3215,8 @@ static void fetch_string_with_conversion(MYSQL_BIND *param, char *value, size_t { MYSQL_TIME *tm= (MYSQL_TIME *)buffer; MYSQL_TIME_STATUS status; - str_to_time(value, length, tm, 0, &status); + str_to_datetime_or_date_or_time(value, length, tm, 0, &status, + TIME_MAX_HOUR, UINT_MAX32); err= status.warnings; *param->error= MY_TEST(err); break; @@ -3226,7 +3227,7 @@ static void fetch_string_with_conversion(MYSQL_BIND *param, char *value, size_t { MYSQL_TIME *tm= (MYSQL_TIME *)buffer; MYSQL_TIME_STATUS status; - (void) str_to_datetime(value, length, tm, 0, &status); + (void) str_to_datetime_or_date(value, length, tm, 0, &status); err= status.warnings; *param->error= MY_TEST(err) && (param->buffer_type == MYSQL_TYPE_DATE && tm->time_type != MYSQL_TIMESTAMP_DATE); @@ -3350,7 +3351,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, 0, &error); + value= number_to_datetime_or_date(value, 0, (MYSQL_TIME *) buffer, 0, &error); *param->error= MY_TEST(error); break; } |