Bug #4964 | SELECT LOCAL | ||
---|---|---|---|
Submitted: | 9 Aug 2004 18:20 | Modified: | 16 Aug 2004 19:11 |
Reporter: | Dean Richardson | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S4 (Feature request) |
Version: | Any | OS: | Any (Any) |
Assigned to: | CPU Architecture: | Any |
[9 Aug 2004 18:20]
Dean Richardson
[9 Aug 2004 19:10]
Guilhem Bichot
Hi, SELECT queries are never written to the master's binary log. The master's binary log contains only queries which update data: UPDATE, INSERT, DELETE, DROP, CREATE etc. You can see the content of any master's binary log with: mysqlbinlog <binlog_name>
[16 Aug 2004 18:13]
Dean Richardson
Yes - correct, I has mis-read the incoming SQL statements. What I'm seeing in a series of temporary table creations on the master table .... which do not need to be replicated onto the slaves. Example:- Master runs a series of scripts that create some temporary tables (via create X table select ... and insert into (temporary table) select ...). These need to be run on the master because the slaves are not 100% reliable. The temporary tables are created, read then disposed of. In this example, the temporary table creation statements (create table X select...) do not need to be sent to the slaves. Therefore a LOCAL parameter in create table, insert into, replace into etc would be an advantage ... unless MYSQL offers another way to avoid these statements being sent to the slaves. Regards, Dean
[16 Aug 2004 19:11]
Guilhem Bichot
Hi, yes MySQL provides a way to prevent that a statement goes into the master's binlog: it's the SQL_LOG_BIN variable. You can also name your temp tables (those which you don't want replicated) tmp<something> and use the replicate-wild-ignore-table option on slaves; it will take bandwidth as the query will be sent to the slave, but then the slave will decide to ignore it. Or use binlog-ignore-db... Look in the manual for all these. Good luck.