summaryrefslogtreecommitdiff
path: root/sql/field.cc
diff options
context:
space:
mode:
authorunknown <evgen@moonbone.local>2006-07-22 02:15:36 +0400
committerunknown <evgen@moonbone.local>2006-07-22 02:15:36 +0400
commitf171d628c7d7f44cd6786f6456a5e35a3b5d8c0f (patch)
tree24ec659d65ddf3233923209c11f693320c279d3a /sql/field.cc
parentf57bb34775c7482e15a6d067873730f9434726e8 (diff)
parent35209c68eab3137bf40ca1657a2404006c2aa392 (diff)
downloadmariadb-git-f171d628c7d7f44cd6786f6456a5e35a3b5d8c0f.tar.gz
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into moonbone.local:/work/autopush/12185-bug-5.0-opt-mysql mysql-test/r/create.result: Auto merged mysql-test/t/innodb.test: Auto merged sql/field.cc: Auto merged sql/field.h: Auto merged sql/item.cc: Auto merged mysql-test/r/union.result: SCCS merged mysql-test/t/union.test: SCCS merged
Diffstat (limited to 'sql/field.cc')
-rw-r--r--sql/field.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/sql/field.cc b/sql/field.cc
index 946351efe36..b3a6ef42912 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -4485,6 +4485,24 @@ Field_timestamp::Field_timestamp(char *ptr_arg, uint32 len_arg,
}
+Field_timestamp::Field_timestamp(bool maybe_null_arg,
+ const char *field_name_arg,
+ struct st_table *table_arg, CHARSET_INFO *cs)
+ :Field_str((char*) 0, 19, maybe_null_arg ? (uchar*) "": 0, 0,
+ NONE, field_name_arg, table_arg, cs)
+{
+ /* For 4.0 MYD and 4.0 InnoDB compatibility */
+ flags|= ZEROFILL_FLAG | UNSIGNED_FLAG;
+ if (table && !table->timestamp_field &&
+ unireg_check != NONE)
+ {
+ /* This timestamp has auto-update */
+ table->timestamp_field= this;
+ flags|=TIMESTAMP_FLAG;
+ }
+}
+
+
/*
Get auto-set type for TIMESTAMP field.