diff options
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/item.cc b/sql/item.cc index 511ea1ffb44..ad8b79182d4 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -573,6 +573,7 @@ void Item::set_name(const char *str, uint length, CHARSET_INFO *cs) } if (cs->ctype) { + uint orig_len= length; /* This will probably need a better implementation in the future: a function in CHARSET_INFO structure. @@ -582,6 +583,11 @@ void Item::set_name(const char *str, uint length, CHARSET_INFO *cs) length--; str++; } + if (orig_len != length && !is_autogenerated_name) + push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_REMOVED_SPACES, ER(ER_REMOVED_SPACES), + str + length - orig_len); + } if (!my_charset_same(cs, system_charset_info)) { |