Fix for the bug #1885: mysqldump does not dumps timestamp default.

This commit is contained in:
unknown 2003-12-09 12:36:57 +04:00
parent 9a1cb59cd7
commit c167af11e9

View file

@ -3042,7 +3042,12 @@ bool add_field_to_list(char *field_name, enum_field_types type,
if (default_value)
{
if (default_value->type() == Item::NULL_ITEM)
if (type == FIELD_TYPE_TIMESTAMP)
{
net_printf(&thd->net, ER_INVALID_DEFAULT, field_name);
DBUG_RETURN(1);
}
else if (default_value->type() == Item::NULL_ITEM)
{
default_value=0;
if ((type_modifier & (NOT_NULL_FLAG | AUTO_INCREMENT_FLAG)) ==