mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 23:25:34 +02:00
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"
This commit is contained in:
parent
3c3db07321
commit
0c58737ad6
5 changed files with 116 additions and 27 deletions
|
|
@ -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_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue