summaryrefslogtreecommitdiff
path: root/include/my_time.h
diff options
context:
space:
mode:
authorunknown <konstantin@mysql.com>2004-09-02 20:16:01 +0400
committerunknown <konstantin@mysql.com>2004-09-02 20:16:01 +0400
commit0c58737ad6700e844ab38cc2b1154509f0c236db (patch)
tree0f4b1b3d310d80daa00185bb4406575d041ac80e /include/my_time.h
parent3c3db07321d1a75a241e1d6689dc56d9415519a5 (diff)
downloadmariadb-git-0c58737ad6700e844ab38cc2b1154509f0c236db.tar.gz
A fix and test case for Bug#4231 "Wrong result with MYSQL_TIME
parameters": when unpacking binary time recieved from client, handle the case when length is 0: it means all MYSQL_TIME members are zero. include/my_time.h: Declaration for set_zero_time: a tiny piece of code, which I see no reason to not reuse. libmysql/libmysql.c: set_zero_time implementation is now shared between client and server. sql-common/my_time.c: set_zero_time implementation added. sql/sql_prepare.cc: A fix for Bug#4231 "Wrong result with MYSQL_TIME parameters": when unpacking binary time recieved from client, handle the case when length is 0: it means all MYSQL_TIME members are zero. tests/client_test.c: Test case for bug#4231 "Wrong result with MYSQL_TIME parameters"
Diffstat (limited to 'include/my_time.h')
-rw-r--r--include/my_time.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/my_time.h b/include/my_time.h
index 6c53e39d1d8..d4dbe459c3b 100644
--- a/include/my_time.h
+++ b/include/my_time.h
@@ -58,6 +58,8 @@ void init_time(void);
my_time_t
my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone, bool *in_dst_time_gap);
+void set_zero_time(MYSQL_TIME *tm);
+
C_MODE_END
#endif /* _my_time_h_ */