diff options
author | evgen@sunlight.local <> | 2006-07-30 00:33:24 +0400 |
---|---|---|
committer | evgen@sunlight.local <> | 2006-07-30 00:33:24 +0400 |
commit | ef4f14953640962c405e7df7fdb803daaa878128 (patch) | |
tree | 7459ead6708231c323be75b3f99c455341370348 /sql/field.cc | |
parent | 8cd88a91794e37ec05509ef5ea121bcb69eef0c9 (diff) | |
parent | 3ca575dc896753f9dd52f45eaf983219d5cbd899 (diff) | |
download | mariadb-git-ef4f14953640962c405e7df7fdb803daaa878128.tar.gz |
Merge sunlight.local:/local_work/tmp_merge-5.0-opt-mysql
into sunlight.local:/local_work/tmp_merge-5.1-opt-mysql
Diffstat (limited to 'sql/field.cc')
-rw-r--r-- | sql/field.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sql/field.cc b/sql/field.cc index d4bd38724ae..fc08ce7eb60 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -4585,6 +4585,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. |