From c4ab352b670618bb478138cfbf3ed195317b3ccb Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Sun, 16 Dec 2018 02:21:41 +0400 Subject: 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. --- sql/sql_class.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sql/sql_class.cc') diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 86eb6f28807..29a9a58f13c 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -3009,6 +3009,10 @@ int select_export::send_data(List &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 &items) ER_THD(thd, ER_TRUNCATED_WRONG_VALUE_FOR_FIELD), "string", printable_buff, item->name, static_cast(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(row_count)); } else if (copier.source_end_pos() < res->ptr() + res->length()) { -- cgit v1.2.1