can use
SET NAMES
collation_server
variables; as stated previously, the master and slave must always have identical global character set
values.
• If the master has databases with a character set different from the global
character_set_server
they do not implicitly rely on the database default character set. A good workaround is to state the
character set and collation explicitly in
16.4.1.3. Replication of
This section discusses the rules that are applied when a
replicated.
Statement succeeds.
Statement fails.
• Statement does not use
commit caused by the statement is logged. This is true regardless of the storage engine used and
the reason for which the statement failed.
• Statement uses
logged with an error.
16.4.1.4. Replication of
The
DROP DATABASE IF
statements are always replicated, even if the database, table, or view to be dropped does not exist on
the master. This is to ensure that the object to be dropped no longer exists on either the master or the
slave, once the slave has caught up with the master.
Beginning with MySQL 5.0.82,
procedures and functions, triggers, and events) are also replicated, even if the stored program to be
dropped does not exist on the master. (Bug #13684)
16.4.1.5. Replication and
If a
DATA DIRECTORY
on the master server, the table option is also used on the slave. This can cause problems if no
corresponding directory exists in the slave host file system or if it exists but is not accessible to the
slave server. This can be overridden by using the
the slave, which causes the slave to ignore the
options when replicating
are created in the table's database directory.
For more information, see
16.4.1.6. Replication and Floating-Point Values
With statement-based replication, values are converted from decimal to binary. Because conversions
between decimal and binary representations of them may be approximate, comparisons involving
floating-point values are inexact. This is true for operations that use floating-point values explicitly,
or that use values that are converted to floating-point implicitly. Comparisons of floating-point values
might yield different results on master and slave servers due to differences in computer architecture,
Replication Features and Issues
or
SET CHARACTER SET
[444]. However, clients are prevented from changing the global value of these
[443]
value, you should design your
CREATE TABLE
CREATE TABLE ... SELECT
Note
CREATE TABLE ... SELECT
(Section 13.3.3, "Statements That Cause an Implicit
A successful
CREATE TABLE ... SELECT
A failed
CREATE TABLE ... SELECT
IF NOT
EXISTS.
The
IF NOT
EXISTS.
DROP ... IF EXISTS
EXISTS,
DROP TABLE IF
DROP ... IF EXISTS
Table Options
DIRECTORY
or
INDEX DIRECTORY
CREATE TABLE
Section 5.1.7, "Server SQL
or can set variables such as
statements.
Statements
CREATE TABLE ... SELECT
always performs an implicit commit
replicates as follows:
The statement has no effect. However, the implicit
CREATE TABLE IF NOT EXISTS ... SELECT
Statements
EXISTS, and
statements for stored programs (stored
table option is used in a
NO_DIR_IN_CREATE
DATA DIRECTORY
statements. The result is that
Modes".
1499
collation_client
statements so that
CREATE TABLE
statement is
Commit").
is itself replicated.
DROP VIEW IF EXISTS
statement
CREATE TABLE
[537]
server SQL mode on
and
INDEX DIRECTORY
data and index files
MyISAM
or
is
table
Need help?
Do you have a question about the 5.0 and is the answer not in the manual?
Questions and answers