From c167af11e95823ac1147612866e1f2b738bc5941 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 9 Dec 2003 12:36:57 +0400 Subject: [PATCH] Fix for the bug #1885: mysqldump does not dumps timestamp default. --- sql/sql_parse.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index c867112bb2a..fc9c21586d9 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -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)) ==