mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +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. 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.
This commit is contained in:
@@ -969,7 +969,8 @@ int check_that_all_fields_are_given_values(THD *thd, TABLE *entry)
|
||||
for (Field **field=entry->field ; *field ; field++)
|
||||
{
|
||||
if ((*field)->query_id != thd->query_id &&
|
||||
((*field)->flags & NO_DEFAULT_VALUE_FLAG))
|
||||
((*field)->flags & NO_DEFAULT_VALUE_FLAG) &&
|
||||
((*field)->real_type() != FIELD_TYPE_ENUM))
|
||||
{
|
||||
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||
ER_NO_DEFAULT_FOR_FIELD,
|
||||
|
Reference in New Issue
Block a user