mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge 10.3 into 10.4
This commit is contained in:
@ -365,18 +365,21 @@ bool Sec6::convert_to_mysql_time(THD *thd, int *warn, MYSQL_TIME *ltime,
|
||||
}
|
||||
|
||||
|
||||
void Temporal::push_conversion_warnings(THD *thd, bool totally_useless_value, int warn,
|
||||
void Temporal::push_conversion_warnings(THD *thd, bool totally_useless_value,
|
||||
int warn,
|
||||
const char *typestr,
|
||||
const TABLE_SHARE *s,
|
||||
const char *field_name,
|
||||
const char *value)
|
||||
{
|
||||
if (MYSQL_TIME_WARN_HAVE_WARNINGS(warn))
|
||||
thd->push_warning_wrong_or_truncated_value(Sql_condition::WARN_LEVEL_WARN,
|
||||
totally_useless_value,
|
||||
typestr, value, field_name);
|
||||
typestr, value, s, field_name);
|
||||
else if (MYSQL_TIME_WARN_HAVE_NOTES(warn))
|
||||
thd->push_warning_wrong_or_truncated_value(Sql_condition::WARN_LEVEL_NOTE,
|
||||
false, typestr, value, field_name);
|
||||
false, typestr, value, s,
|
||||
field_name);
|
||||
}
|
||||
|
||||
|
||||
@ -4389,7 +4392,8 @@ bool Type_handler::Item_get_date_with_warn(THD *thd, Item *item,
|
||||
MYSQL_TIME *ltime,
|
||||
date_mode_t fuzzydate) const
|
||||
{
|
||||
Temporal::Warn_push warn(thd, item->field_name_or_null(), ltime, fuzzydate);
|
||||
Temporal::Warn_push warn(thd, item->field_table_or_null(),
|
||||
item->field_name_or_null(), ltime, fuzzydate);
|
||||
Item_get_date(thd, item, &warn, ltime, fuzzydate);
|
||||
return ltime->time_type < 0;
|
||||
}
|
||||
@ -4400,7 +4404,8 @@ bool Type_handler::Item_func_hybrid_field_type_get_date_with_warn(THD *thd,
|
||||
MYSQL_TIME *ltime,
|
||||
date_mode_t mode) const
|
||||
{
|
||||
Temporal::Warn_push warn(thd, item->field_name_or_null(), ltime, mode);
|
||||
Temporal::Warn_push warn(thd, item->field_table_or_null(),
|
||||
item->field_name_or_null(), ltime, mode);
|
||||
Item_func_hybrid_field_type_get_date(thd, item, &warn, ltime, mode);
|
||||
return ltime->time_type < 0;
|
||||
}
|
||||
@ -8010,7 +8015,7 @@ static void literal_warn(THD *thd, const Item *item,
|
||||
ErrConvString err(str, length, cs);
|
||||
thd->push_warning_wrong_or_truncated_value(
|
||||
Sql_condition::time_warn_level(st->warnings),
|
||||
false, typestr, err.ptr(), NullS);
|
||||
false, typestr, err.ptr(), NULL, NullS);
|
||||
}
|
||||
}
|
||||
else if (send_error)
|
||||
|
Reference in New Issue
Block a user