Oracle 5.0 Reference Manual page 1518

Table of Contents

Advertisement

• When a statement uses a stored function that inserts into an
generated
some cases be inserted on the slave. This is also true of a trigger that causes an
AUTO_INCREMENT
• An insert into an
master that uses MySQL 5.0.60 or earlier does not replicate correctly to a slave running MySQL
5.1.12 through 5.1.23 (inclusive). (Bug #33029)
• An
INSERT
that is not the first column of this composite key is not logged or replicated correctly.
This issue does not affect tables using the
creation of a composite key that includes an
the key.
• Adding an
ordering of the rows on the slave and the master. This occurs because the order in which the rows
are numbered depends on the specific storage engine used for the table and the order in which
the rows were inserted. If it is important to have the same order on the master and slave, the rows
must be ordered before assigning an
AUTO_INCREMENT
produce a new table
CREATE TABLE t2 LIKE t1;
ALTER TABLE t2 ADD id INT AUTO_INCREMENT PRIMARY KEY;
INSERT INTO t2 SELECT * FROM t1 ORDER BY col1, col2;
The instructions just given are subject to the limitations of
definitions are ignored, as are the
table definition includes any of those characteristics, create
that is identical to the one used to create t1, but with the addition of the
Regardless of the method used to create and populate the copy having the
column, the final step is to drop the original table and then rename the copy:
DROP t1;
ALTER TABLE t2 RENAME t1;
See also
16.4.1.2. Replication and Character Sets
The following applies to replication between MySQL servers that use different character sets:
• If the master uses MySQL 4.1, you must always use the same global character set and collation on
the master and the slave, regardless of the slave MySQL version. (These are controlled by the
character-set-server
get duplicate-key errors on the slave, because a key that is unique in the master character set might
not be unique in the slave character set. Note that this is not a cause for concern when master and
slave are both MySQL 5.0 or later.
• If the master is older than MySQL 4.1.3, the character set of any client should never be made
different from its global value because this character set change is not known to the slave. In other
words, clients should not use
and the slave are 4.1.3 or newer, clients can freely set session values for character set variables
because these settings are written to the binary log and so are known to the slave. That is, clients
Replication Features and Issues
value is not written into the binary log, so a different value can in
AUTO_INCREMENT
column.
AUTO_INCREMENT
into a table that has a composite primary key that includes an
column to a table with
AUTO_INCREMENT
column to a table
identical to
t2
Important
To guarantee the same ordering on both master and slave, the
clause must name all columns of t1.
Section C.5.7.1, "Problems with
[403]
SET
column caused by a stored routine or trigger running on a
storage engine, since
InnoDB
AUTO_INCREMENT
ALTER TABLE
AUTO_INCREMENT
that has columns
t1
but with an
t1
AUTO_INCREMENT
and
DATA DIRECTORY
ALTER
TABLE".
and
--collation-server
NAMES,
SET CHARACTER
1498
AUTO_INCREMENT
AUTO_INCREMENT
InnoDB
column that is not the first column in
might not produce the same
number. Assuming that you want to add an
and col2, the following statements
col1
column:
CREATE TABLE ...
table options. If a
INDEX DIRECTORY
using a
t2
CREATE TABLE
AUTO_INCREMENT
AUTO_INCREMENT
[403]
options.) Otherwise, you may
SET, and so forth. If both the master
column, the
into an
INSERT
column
does not allow the
ORDER BY
LIKE: Foreign key
statement
column.
--

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents