summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorunknown <ramil@ram-book.(none)>2005-05-13 16:44:14 +0500
committerunknown <ramil@ram-book.(none)>2005-05-13 16:44:14 +0500
commitc07f07c3e678f5f99bfd8ccf5c77cd4117758118 (patch)
tree0be80257f620a71ccca5b2083ac05c487bbc1bb6 /sql/sql_parse.cc
parent68768185734824a9dffeea5656f2fb5280d1f3a1 (diff)
downloadmariadb-git-c07f07c3e678f5f99bfd8ccf5c77cd4117758118.tar.gz
a fix (bug #6267: ENUM ... NOT NULL w/o default treated differently than other data types).
the behavior of enum changed to be consistent. mysql-test/r/system_mysql_db.result: a fix (bug #6267: ENUM ... NOT NULL w/o default treated differently than other data types). mysql-test/r/type_enum.result: a fix (bug #6267: ENUM ... NOT NULL w/o default treated differently than other data types). mysql-test/r/type_ranges.result: a fix (bug #6267: ENUM ... NOT NULL w/o default treated differently than other data types). sql/sql_insert.cc: a fix (bug #6267: ENUM ... NOT NULL w/o default treated differently than other data types). Don't issue warnings for enum fields. sql/sql_parse.cc: a fix (bug #6267: ENUM ... NOT NULL w/o default treated differently than other data types). set NO_DEFAULT_VALUE_FLAG flag for enum fields as well.
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 8c8dcc938cb..783df36c141 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -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)))