1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

MDEV-14576 Include full name of object in message about incorrect value for column.

The error message modified.
Then the TABLE_SHARE::error_table_name() implementation taken from 10.3,
          to be used as a name of the table in this message.
This commit is contained in:
Alexey Botchkov
2018-12-16 02:21:41 +04:00
parent 0a2edddbf4
commit c4ab352b67
100 changed files with 1494 additions and 1422 deletions

View File

@@ -3009,6 +3009,10 @@ int select_export::send_data(List<Item> &items)
error_pos= copier.most_important_error_pos();
if (error_pos)
{
/*
TODO:
add new error message that will show user this printable_buff
char printable_buff[32];
convert_to_printable(printable_buff, sizeof(printable_buff),
error_pos, res->ptr() + res->length() - error_pos,
@@ -3018,6 +3022,11 @@ int select_export::send_data(List<Item> &items)
ER_THD(thd, ER_TRUNCATED_WRONG_VALUE_FOR_FIELD),
"string", printable_buff,
item->name, static_cast<long>(row_count));
*/
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD,
ER_THD(thd, WARN_DATA_TRUNCATED),
item->name, static_cast<long>(row_count));
}
else if (copier.source_end_pos() < res->ptr() + res->length())
{