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

Merge remote-tracking branch 'origin/5.5' into 10.0

This commit is contained in:
vicentiu
2017-01-06 17:09:59 +02:00
76 changed files with 933 additions and 434 deletions

View File

@@ -4921,11 +4921,8 @@ create_sp_error:
}
case SQLCOM_SHOW_CREATE_TRIGGER:
{
if (lex->spname->m_name.length > NAME_LEN)
{
my_error(ER_TOO_LONG_IDENT, MYF(0), lex->spname->m_name.str);
if (check_ident_length(&lex->spname->m_name))
goto error;
}
if (show_create_trigger(thd, lex->spname))
goto error; /* Error has been already logged. */
@@ -6663,12 +6660,9 @@ bool add_field_to_list(THD *thd, LEX_STRING *field_name, enum_field_types type,
uint8 datetime_precision= length ? atoi(length) : 0;
DBUG_ENTER("add_field_to_list");
if (check_string_char_length(field_name, "", NAME_CHAR_LEN,
system_charset_info, 1))
{
my_error(ER_TOO_LONG_IDENT, MYF(0), field_name->str); /* purecov: inspected */
if (check_ident_length(field_name))
DBUG_RETURN(1); /* purecov: inspected */
}
if (type_modifier & PRI_KEY_FLAG)
{
Key *key;
@@ -8443,6 +8437,18 @@ bool check_string_char_length(LEX_STRING *str, const char *err_msg,
return TRUE;
}
bool check_ident_length(LEX_STRING *ident)
{
if (check_string_char_length(ident, 0, NAME_CHAR_LEN, system_charset_info, 1))
{
my_error(ER_TOO_LONG_IDENT, MYF(0), ident->str);
return 1;
}
return 0;
}
C_MODE_START
/*