mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
More fixes for strict mode:
More tests. Better error messages. Fixed bug when checking if we updated all needed columns for INSERT. Give an error if we encounter a wrong float value during parsing. Don't print DEFAULT for columns without a default value in SHOW CREATE/SHOW FIELDS. Fixed UPDATE IGNORE when using STRICT mode.
This commit is contained in:
@ -4710,9 +4710,14 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type,
|
||||
new_field->comment.str= (char*) comment->str;
|
||||
new_field->comment.length=comment->length;
|
||||
}
|
||||
/* Set flag if this field doesn't have a default value */
|
||||
/*
|
||||
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_modifier & NOT_NULL_FLAG) && type != FIELD_TYPE_TIMESTAMP &&
|
||||
type != FIELD_TYPE_ENUM)
|
||||
new_field->flags|= NO_DEFAULT_VALUE_FLAG;
|
||||
|
||||
if (length && !(new_field->length= (uint) atoi(length)))
|
||||
|
Reference in New Issue
Block a user