diff options
author | unknown <serg@serg.mylan> | 2004-11-20 18:36:41 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2004-11-20 18:36:41 +0100 |
commit | 7b0069ee20c5f0a43149aa962ac1b26f19257b23 (patch) | |
tree | 62ae289d237eebb2f3c921cb532cc66e70229341 /sql-common | |
parent | 15092975f506dfadeb379805f78e50e2939a2911 (diff) | |
parent | a3740c887e940144828543bc7c4e1ddfa8de2b7e (diff) | |
download | mariadb-git-7b0069ee20c5f0a43149aa962ac1b26f19257b23.tar.gz |
merged
BitKeeper/etc/ignore:
auto-union
BitKeeper/etc/logging_ok:
auto-union
client/Makefile.am:
Auto merged
client/mysqlbinlog.cc:
Auto merged
configure.in:
Auto merged
include/my_time.h:
Auto merged
innobase/fil/fil0fil.c:
Auto merged
innobase/include/fil0fil.h:
Auto merged
libmysql/libmysql.c:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/union.result:
Auto merged
mysql-test/t/func_group.test:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql/field.cc:
Auto merged
sql/ha_ndbcluster.h:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_prepare.cc:
Auto merged
tests/client_test.c:
Auto merged
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/my_time.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql-common/my_time.c b/sql-common/my_time.c index 5afa6ea2857..4c5dd361061 100644 --- a/sql-common/my_time.c +++ b/sql-common/my_time.c @@ -395,7 +395,8 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time, goto err; } - if (number_of_fields < 3 || l_time->month > 12 || + if (number_of_fields < 3 || + l_time->year > 9999 || l_time->month > 12 || l_time->day > 31 || l_time->hour > 23 || l_time->minute > 59 || l_time->second > 59 || (!(flags & TIME_FUZZY_DATE) && (l_time->month == 0 || @@ -792,10 +793,10 @@ my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone, bool *in_dst_time_gap) /* Set MYSQL_TIME structure to 0000-00-00 00:00:00.000000 */ -void set_zero_time(MYSQL_TIME *tm) +void set_zero_time(MYSQL_TIME *tm, enum enum_mysql_timestamp_type time_type) { bzero((void*) tm, sizeof(*tm)); - tm->time_type= MYSQL_TIMESTAMP_NONE; + tm->time_type= time_type; } |