summaryrefslogtreecommitdiff
path: root/sql/field.cc
diff options
context:
space:
mode:
authorunknown <ramil@mysql.com>2005-07-27 15:09:06 +0500
committerunknown <ramil@mysql.com>2005-07-27 15:09:06 +0500
commit71e8b59126f4f426a89463244bc2496beabee84a (patch)
tree51722150e21962166f36cbe8e72f2e9c19c37f09 /sql/field.cc
parent62aad3332271b63e538ba82be09934a92929f699 (diff)
parent17132a93f2bde74f625e860daee655d99c8e81a7 (diff)
downloadmariadb-git-71e8b59126f4f426a89463244bc2496beabee84a.tar.gz
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/home/ram/work/mysql-5.0 sql/field.cc: Auto merged mysql-test/r/strict.result: merging mysql-test/t/strict.test: merging
Diffstat (limited to 'sql/field.cc')
-rw-r--r--sql/field.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/field.cc b/sql/field.cc
index 2fb60ec1fd9..61c0a71b742 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -8468,7 +8468,10 @@ create_field::create_field(Field *old_field,Field *orig_field)
def=0;
if (!(flags & (NO_DEFAULT_VALUE_FLAG | BLOB_FLAG)) &&
!old_field->is_real_null() &&
- old_field->ptr && orig_field)
+ old_field->ptr && orig_field &&
+ (sql_type != FIELD_TYPE_TIMESTAMP || /* set def only if */
+ old_field->table->timestamp_field != old_field || /* timestamp field */
+ unireg_check == Field::TIMESTAMP_UN_FIELD)) /* has default val */
{
char buff[MAX_FIELD_WIDTH],*pos;
String tmp(buff,sizeof(buff), charset), *res;