mirror of
https://github.com/MariaDB/server.git
synced 2026-04-23 00:35:32 +02:00
10.0-base merge
This commit is contained in:
commit
72c20282db
280 changed files with 13376 additions and 761 deletions
|
|
@ -2597,7 +2597,7 @@ bool Item_func_add_time::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
|
|||
bool is_time= 0;
|
||||
long days, microseconds;
|
||||
longlong seconds;
|
||||
int l_sign= sign, was_cut= 0;
|
||||
int l_sign= sign;
|
||||
|
||||
if (is_date) // TIMESTAMP function
|
||||
{
|
||||
|
|
@ -2648,16 +2648,7 @@ bool Item_func_add_time::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
|
|||
}
|
||||
|
||||
ltime->hour+= days*24;
|
||||
|
||||
MYSQL_TIME copy= *ltime;
|
||||
ErrConvTime str(©);
|
||||
|
||||
check_time_range(ltime, decimals, &was_cut);
|
||||
if (was_cut)
|
||||
make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN,
|
||||
&str, MYSQL_TIMESTAMP_TIME, NullS);
|
||||
|
||||
return (null_value= 0);
|
||||
return (null_value= adjust_time_range_with_warn(ltime, decimals));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -2695,7 +2686,7 @@ bool Item_func_timediff::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
|
|||
DBUG_ASSERT(fixed == 1);
|
||||
longlong seconds;
|
||||
long microseconds;
|
||||
int l_sign= 1, was_cut= 0;
|
||||
int l_sign= 1;
|
||||
MYSQL_TIME l_time1,l_time2,l_time3;
|
||||
ErrConvTime str(&l_time3);
|
||||
|
||||
|
|
@ -2739,12 +2730,7 @@ bool Item_func_timediff::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
|
|||
return (null_value= 1);
|
||||
|
||||
*ltime= l_time3;
|
||||
check_time_range(ltime, decimals, &was_cut);
|
||||
|
||||
if (was_cut)
|
||||
make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN,
|
||||
&str, MYSQL_TIMESTAMP_TIME, NullS);
|
||||
return (null_value= 0);
|
||||
return (null_value= adjust_time_range_with_warn(ltime, decimals));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue