Commit 73a5dd8c authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Fix warning C4838 : conversion from 'type_1' to 'type_2' requires a narrowing conversion.

parent 9811802a
...@@ -5059,7 +5059,10 @@ int Field_timestamp::store_TIME_with_warning(THD *thd, const Datetime *dt, ...@@ -5059,7 +5059,10 @@ int Field_timestamp::store_TIME_with_warning(THD *thd, const Datetime *dt,
} }
// Adjust and store the value // Adjust and store the value
timeval tv= {timestamp, (uint) l_time->second_part}; timeval tv;
tv.tv_sec= timestamp;
tv.tv_usec= l_time->second_part;
my_timeval_trunc(&tv, decimals()); my_timeval_trunc(&tv, decimals());
store_TIMEVAL(tv); store_TIMEVAL(tv);
......
...@@ -2756,7 +2756,9 @@ class Field_timestamp :public Field_temporal { ...@@ -2756,7 +2756,9 @@ class Field_timestamp :public Field_temporal {
} }
void store_TIME(my_time_t timestamp, ulong sec_part) void store_TIME(my_time_t timestamp, ulong sec_part)
{ {
timeval tv= {timestamp, (uint) sec_part}; timeval tv;
tv.tv_sec= timestamp;
tv.tv_usec= sec_part;
my_timeval_trunc(&tv, decimals()); my_timeval_trunc(&tv, decimals());
store_TIMEVAL(tv); store_TIMEVAL(tv);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment