MySQL Forums
Forum List  »  InnoDB

Re: create table as select block my insert
Posted by: Rick James
Date: October 06, 2014 12:43PM

If that table is "big", then replication is delayed because of the CREATE...SELECT (or INSERT...SELECT). Replication is single-threaded, and all replicated queries after it must wait for it to finish.

> I set the Slave to be in read/write mode.

NEVER do that! You allow the Master and Slave to be inconsistent. That violates the replication contract.

If you are replicating the CREATE/INSERT...SELECT, it is ok since replication has the right to do writes even on a readonly slave.

TEMPORARY TABLEs have slightly different rules.

Or...
Are you saying that an INSERT into `some_table` (the one you are SELECTing _from_) done by you (or by replication) is being blocked?

I guess I am confused. Please rephrase with just the SQL statements, in order. And say where each comes from/to (from you or replication; to Master or slave).

Options: ReplyQuote


Subject
Views
Written By
Posted
2469
October 05, 2014 03:25PM
Re: create table as select block my insert
1198
October 06, 2014 12:43PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.