Oracle 5.0 Reference Manual page 167

Table of Contents

Advertisement

This is necessary and safe because trailing spaces are stripped before 5.0.3, meaning that any
trailing spaces are erroneous.
This problem does not occur (and thus these two steps are not required) for tables upgraded using
the recommended procedure of dumping tables prior to the upgrade and reloading them afterward.
Note
If you create a table with new
5.0.3 or later, the table will not be usable if you downgrade to a version older
than 5.0.3. Dump the table with
after downgrading.
• Incompatible change: The implementation of
should make your applications aware of this change. For information about this change, and about
possible incompatibilities with old applications, see
Section 12.17.2,
"DECIMAL
columns are stored in a more efficient format. To convert a table to use the new
DECIMAL
type, you should do an
columns to use the new
VARCHAR
A consequence of the change in handling of the
that the server is more strict to follow standard SQL. For example, a data type of
stores a maximum value of 99.9. Before MySQL 5.0.3, the server permitted larger numbers to be
stored. That is, it stored a value such as 100.0 as 100.0. As of MySQL 5.0.3, the server clips 100.0
to the maximum permissible value of 99.9. If you have tables that were created before MySQL 5.0.3
and that contain floating-point data not strictly legal for the data type, you should alter the data types
of those columns. For example:
ALTER TABLE
tbl_name
The behavior used by the server for
used to create the table. If your server is from MySQL 5.0.3 or higher, but you have
columns in tables that were created before 5.0.3, the old behavior still applies to those columns. To
convert the tables to the newer
• Incompatible change: MySQL 5.0.3 and up uses precision math when calculating with
and integer columns (64 decimal digits) and for rounding exact-value numbers. Rounding behavior
is well-defined, not dependent on the implementation of the underlying C library. However, this
might result in incompatibilities for applications that rely on the old behavior. (For example,
inserting .5 into an
INT
For more information about rounding behavior, see
Section 12.17.5, "Precision Math
Incompatible change: In very old versions of MySQL (prior to 4.1), the
supported a display width, which was silenty ignored beginning with MySQL 4.1. This is deprecated
in MySQL 5.1, and removed altogether in MySQL 5.5. These changes in behavior can lead to two
problem scenarios when trying to use
• When importing a dump file (for example, one created using mysqldump) created in a MySQL 5.0
or earlier server into a server from a newer release series, a
statement containing
To fix this problem, edit the dump file in a text editor to replace any instances of
with
prior to importing the file. Be sure to use a plain text editor for this, and not a
TIMESTAMP
word processor; otherwise, the result is almost certain to be unusable for importing into the MySQL
server.
Upgrading MySQL
Data Type
Changes".
on it. (The
ALTER TABLE
data type properties, described in a separate item.)
VARCHAR
MODIFY
col_name
DECIMAL(4,1);
DECIMAL
format, dump them with
DECIMAL
column results in 1 as of MySQL 5.0.3, but might be 0 in older versions.)
Examples".
TIMESTAMP(N)
causes the import to fail with a syntax error.
TIMESTAMP(N)
147
or
VARCHAR
VARBINARY
before downgrading and reload it
mysqldump
was changed in MySQL 5.0.3. You
DECIMAL
Section 12.17, "Precision
also will change the table's
ALTER TABLE
and
DECIMAL
NUMERIC
columns in a table depends on the version of MySQL
mysqldump
Section 12.17.4, "Rounding
columns with a MySQL 5.5 or later server:
CREATE TABLE
columns in MySQL
Math", in particular,
DECIMAL
fixed-point data types is
DECIMAL(3,1)
DECIMAL
and reload them.
DECIMAL
Behavior", and
data type
TIMESTAMP
or
ALTER TABLE
TIMESTAMP(N)

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents