Below is the list of changes that have just been committed into a local
mysqldoc repository of mats. When mats does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html
ChangeSet
1.2628 05/03/01 08:48:51 mats@stripped +1 -0
Explaining that TIMESTAMP(4) and TIMESTAMP(2) does not produce legal dates and should be avoided.
Docs/manual.texi
1.2449 05/03/01 08:48:48 mats@stripped +15 -0
Explaining that TIMESTAMP(4) and TIMESTAMP(2) does not produce legal dates and should be avoided.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: mats
# Host: romeo.kindahl.net
# Root: /home/bk/b6530-mysqldoc
--- 1.2448/Docs/manual.texi 2005-02-28 12:13:28 +01:00
+++ 1.2449/Docs/manual.texi 2005-03-01 08:48:48 +01:00
@@ -45683,6 +45683,21 @@
are displayed.
@item
+If you are planning to use @code{mysqldump} for the database, do not
+use @code{TIMESTAMP(4)} or @code{TIMESTAMP(2)}. The display format
+for these column types are not legal dates and @code{0} will be stored
+instead. This inconsistency is fixed starting with MySQL 4.1, where
+display width is ignored. To prepare for transition to versions after
+4.0, you should change to use display widths of 6 or more, which will
+produce a legal display format. You can change the display width of
+@code{TIMESTAMP} column types, without losing any information, by
+using @code{ALTER TABLE} as indicated above.
+
+If you need to print the timestamps for external applications, you can
+use @code{MID()} to extract the relevant part of the timestamp: for
+example, to imitate the @code{TIMESTAMP(4)} display format.
+
+@item
Although @code{TIMESTAMP} values are stored to full precision, the only
function that operates directly on the underlying stored value is
@code{UNIX_TIMESTAMP()}. Other functions operate on the formatted retrieved
| Thread |
|---|
| • bk commit - mysqldoc tree (mats:1.2628) | Mats Kindahl | 1 Mar |