summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2018-12-16 02:21:41 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2018-12-16 02:21:41 +0400
commitc4ab352b670618bb478138cfbf3ed195317b3ccb (patch)
tree3dc86ad7d504865798871ae869ab5bac40e804b2 /sql/sql_class.cc
parent0a2edddbf4f4737863edf51970cbbaa91e72e11f (diff)
downloadmariadb-git-c4ab352b670618bb478138cfbf3ed195317b3ccb.tar.gz
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.
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc9
1 files changed, 9 insertions, 0 deletions
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<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())
{