|
|
|
@ -700,10 +700,16 @@ void Item::set_name(const char *str, uint length, CHARSET_INFO *cs) |
|
|
|
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 (length == 0) |
|
|
|
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN, |
|
|
|
ER_NAME_BECOMES_EMPTY, ER(ER_NAME_BECOMES_EMPTY), |
|
|
|
str + length - orig_len); |
|
|
|
else |
|
|
|
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)) |
|
|
|
{ |
|
|
|
|