1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

a fix (bug #6267: ENUM ... NOT NULL w/o default treated differently than other data types).

the behavior of enum changed to be consistent.
This commit is contained in:
ramil@ram-book.(none)
2005-05-13 16:44:14 +05:00
parent e7c02801a0
commit d85e052d71
5 changed files with 10 additions and 12 deletions

View File

@ -5423,12 +5423,9 @@ new_create_field(THD *thd, char *field_name, enum_field_types type,
new_field->comment=*comment;
/*
Set flag if this field doesn't have a default value
Enum values has always the first value as a default (set in
make_empty_rec().
*/
if (!default_value && !(type_modifier & AUTO_INCREMENT_FLAG) &&
(type_modifier & NOT_NULL_FLAG) && type != FIELD_TYPE_TIMESTAMP &&
type != FIELD_TYPE_ENUM)
(type_modifier & NOT_NULL_FLAG) && type != FIELD_TYPE_TIMESTAMP)
new_field->flags|= NO_DEFAULT_VALUE_FLAG;
if (length && !(new_field->length= (uint) atoi(length)))