Bug #14050 Blocking some replication statements.
Submitted: 15 Oct 2005 17:52 Modified: 17 Dec 2010 13:18
Reporter: daniel lo Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DML Severity:S4 (Feature request)
Version:Any OS:Any (Any)
Assigned to: CPU Architecture:Any

[15 Oct 2005 17:52] daniel lo
Description:
It would be nice to have "LOCAL" in UPDATE/INSERT/DELETE/TRUNCATE SQL statements.  LOCAL would turn off replication for this statement.

Which would simulate the following

UPDATE LOCAL table-name SET x=1,y=1 WHERE z=1

instead of

SET SQL_LOG_BIN=0
UPDATE table-name SET x=1,y=1 WHERE z=1
SET SQL_LOG_BIN=1

This feature will save 2/3 of the queries that have to be written (and 2/3's of the round trips).

This feature would be greatly appreciated, as I recently made this mistake

$db->do("SET SQL_LOG_BIN=0");
return $db->do("UPDATE table-name SET x=1,y=1 WHERE z=1");
$db->do("SET SQL_LOG_BIN=1");

It was a stupid mistake, however, the feature still would be greatly appreciated.

How to repeat:
Turn off brain... resume programming.