This section discusses the rules that are applied when various
CREATE ... IF NOT EXISTS
statements are
replicated.
Previous to MySQL 5.4.3.
CREATE
DATABASE IF NOT EXISTS
was replicated only if the
database named in the statement did not exist on the master.
CREATE TABLE IF
NOT EXISTS
was replicated only if the table named in
the statement did not exist on the master.
MySQL 5.4.3 and later.
Every CREATE
DATABASE IF NOT EXISTS
statement is replicated,
whether or not the database already exists on the master.
Similarly, every
CREATE TABLE IF
NOT EXISTS
statement is replicated, whether or not
the table already exists on the master. This includes
CREATE TABLE IF
NOT EXISTS ... LIKE
. However, replication of
CREATE TABLE IF
NOT EXISTS ... SELECT
follows somewhat different
rules; see
Section 16.4.1.4, “Replication of CREATE
TABLE ... SELECT
Statements”, for more
information.
Replication of CREATE
EVENT IF NOT EXISTS
.
CREATE EVENT IF
NOT EXISTS
is always replicated in MySQL
5.5, whether or not the event named in the
statement already exists on the master.
See also Bug#45574.
User Comments
Add your own comment.