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

A fix for a bug with long definition of SET or ENUM.

Barkov approved it already
This commit is contained in:
Sinisa@sinisa.nasamreza.org
2003-08-19 16:35:17 +03:00
parent 9b5deb8fe1
commit faabb1c42c
3 changed files with 7 additions and 2 deletions

View File

@@ -3967,9 +3967,10 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type,
}
}
if (new_field->length > MAX_FIELD_CHARLENGTH ||
if ((new_field->length > MAX_FIELD_CHARLENGTH && type != FIELD_TYPE_SET &&
type != FIELD_TYPE_ENUM) ||
(!new_field->length && !(new_field->flags & BLOB_FLAG) &&
type != FIELD_TYPE_STRING &&
type != FIELD_TYPE_STRING &&
type != FIELD_TYPE_VAR_STRING && type != FIELD_TYPE_GEOMETRY))
{
net_printf(thd,ER_TOO_BIG_FIELDLENGTH,field_name,