1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

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

This commit is contained in:
ram@gw.mysql.r18.ru
2003-12-09 12:36:57 +04:00
parent 56e49fd735
commit 34b101cadf

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