MySQL 5.0 Reference Manual  /  ...  /  Replication of CREATE TABLE ... SELECT Statements Replication of CREATE TABLE ... SELECT Statements

This section discusses the rules that are applied when a CREATE TABLE ... SELECT statement is replicated.

Statement succeeds.  A successful CREATE TABLE ... SELECT is itself replicated.

Statement fails.  A failed CREATE TABLE ... SELECT replicates as follows:

  • Statement does not use IF NOT EXISTS.  The statement has no effect. However, the implicit 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 IF NOT EXISTS.  The CREATE TABLE IF NOT EXISTS ... SELECT is logged with an error.

User Comments
Sign Up Login You must be logged in to post a comment.