mirror of
https://github.com/MariaDB/server.git
synced 2026-04-24 09:15:30 +02:00
my_time.c:
in number_to_datetime(), zero out the MYSQL_TIME structure before setting values, to ensure that all fields are initialized; in particular, ensure that ->neg is set to zero (fixes valgrind warning "Conditional jump ... depends on uninitialised value" in make_date_time) sql-common/my_time.c: in number_to_datetime(), zero out the MYSQL_TIME structure before setting values, to ensure that all fields are initialized; in particular, ensure that ->neg is set to zero (fixes valgrind warning "Conditional jump ... depends on uninitialised value" in make_date_time)
This commit is contained in:
parent
2738ca5621
commit
9548a0757a
1 changed files with 1 additions and 0 deletions
|
|
@ -1152,6 +1152,7 @@ longlong number_to_datetime(longlong nr, MYSQL_TIME *time_res,
|
|||
ok:
|
||||
part1=(long) (nr/LL(1000000));
|
||||
part2=(long) (nr - (longlong) part1*LL(1000000));
|
||||
bzero((char*) time_res, sizeof(*time_res));
|
||||
time_res->year= (int) (part1/10000L); part1%=10000L;
|
||||
time_res->month= (int) part1 / 100;
|
||||
time_res->day= (int) part1 % 100;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue