cleanup: remove THD::query_start_timeval()
Too easy to abuse. One tends to use it even when microseconds are not needed and will be ignored.
This commit is contained in:
parent
c568e25379
commit
1d8b5524f4
@ -6796,7 +6796,12 @@ int Field_datetime::set_time()
|
||||
THD *thd= table->in_use;
|
||||
set_notnull();
|
||||
// Here we always truncate (not round), no matter what sql_mode is
|
||||
store_datetime(Datetime(thd, thd->query_start_timeval()).trunc(decimals()));
|
||||
if (decimals())
|
||||
store_datetime(Datetime(thd, Timeval(thd->query_start(),
|
||||
thd->query_start_sec_part())
|
||||
).trunc(decimals()));
|
||||
else
|
||||
store_datetime(Datetime(thd, Timeval(thd->query_start(), 0)));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -3455,10 +3455,6 @@ public:
|
||||
inline ulong query_start_sec_part()
|
||||
{ query_start_sec_part_used=1; return start_time_sec_part; }
|
||||
MYSQL_TIME query_start_TIME();
|
||||
Timeval query_start_timeval()
|
||||
{
|
||||
return Timeval(query_start(), query_start_sec_part());
|
||||
}
|
||||
time_round_mode_t temporal_round_mode() const
|
||||
{
|
||||
return variables.sql_mode & MODE_TIME_ROUND_FRACTIONAL ?
|
||||
|
Loading…
x
Reference in New Issue
Block a user