summaryrefslogtreecommitdiff
path: root/libmysql/libmysql.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmysql/libmysql.c')
-rw-r--r--libmysql/libmysql.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index c1e0703af10..a851d62b108 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -2391,10 +2391,9 @@ static void net_store_datetime(NET *net, MYSQL_TIME *tm)
static void store_param_date(NET *net, MYSQL_BIND *param)
{
- MYSQL_TIME *tm= (MYSQL_TIME *) param->buffer;
- tm->hour= tm->minute= tm->second= 0;
- tm->second_part= 0;
- net_store_datetime(net, tm);
+ MYSQL_TIME tm= *((MYSQL_TIME *) param->buffer);
+ tm.hour= tm.minute= tm.second= tm.second_part= 0;
+ net_store_datetime(net, &tm);
}
static void store_param_datetime(NET *net, MYSQL_BIND *param)