diff options
author | unknown <dlenev@mysql.com> | 2004-11-19 18:35:36 +0300 |
---|---|---|
committer | unknown <dlenev@mysql.com> | 2004-11-19 18:35:36 +0300 |
commit | 7368b14719b22e4bdb439a1fcda88b3ac0ccc673 (patch) | |
tree | a195ead1015ae682d794d4a7c6022a10d363c17a /libmysql | |
parent | 77c163c3e3bdfb884e96f89bfb90e277ecfc816e (diff) | |
parent | 5d9f7edd6dfb0d6759a5374ac61c0153db48b1f7 (diff) | |
download | mariadb-git-7368b14719b22e4bdb439a1fcda88b3ac0ccc673.tar.gz |
Manual merge of fix for bug #6266 "Invalid DATETIME value is not handled
properly" with main tree.
libmysql/libmysql.c:
Auto merged
sql-common/my_time.c:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
tests/client_test.c:
Manual merge.
Diffstat (limited to 'libmysql')
-rw-r--r-- | libmysql/libmysql.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index a57c82e6424..cb20c5181a8 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -3257,11 +3257,12 @@ static void read_binary_time(MYSQL_TIME *tm, uchar **pos) tm->hour+= tm->day*24; tm->day= 0; } + tm->time_type= MYSQL_TIMESTAMP_TIME; + *pos+= length; } else - set_zero_time(tm); - tm->time_type= MYSQL_TIMESTAMP_TIME; + set_zero_time(tm, MYSQL_TIMESTAMP_TIME); } static void read_binary_datetime(MYSQL_TIME *tm, uchar **pos) @@ -3286,12 +3287,12 @@ static void read_binary_datetime(MYSQL_TIME *tm, uchar **pos) else tm->hour= tm->minute= tm->second= 0; tm->second_part= (length > 7) ? (ulong) sint4korr(to+7) : 0; + tm->time_type= MYSQL_TIMESTAMP_DATETIME; *pos+= length; } else - set_zero_time(tm); - tm->time_type= MYSQL_TIMESTAMP_DATETIME; + set_zero_time(tm, MYSQL_TIMESTAMP_DATETIME); } static void read_binary_date(MYSQL_TIME *tm, uchar **pos) @@ -3308,12 +3309,12 @@ static void read_binary_date(MYSQL_TIME *tm, uchar **pos) tm->hour= tm->minute= tm->second= 0; tm->second_part= 0; tm->neg= 0; + tm->time_type= MYSQL_TIMESTAMP_DATE; *pos+= length; } else - set_zero_time(tm); - tm->time_type= MYSQL_TIMESTAMP_DATE; + set_zero_time(tm, MYSQL_TIMESTAMP_DATE); } |