1
0
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:
monty@mishka.local
2004-10-02 22:20:08 +03:00
parent 1fc7e6af85
commit be4ca46fbe
65 changed files with 661 additions and 258 deletions

View File

@ -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)))