Bug #6882 query fails to replicate on master-slave setup
Submitted: 29 Nov 2004 20:04 Modified: 1 Dec 2004 0:11
Reporter: frank homann Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:4.0.22 OS:Linux (linux)
Assigned to: CPU Architecture:Any

[29 Nov 2004 20:04] frank homann
Description:
the following query shows up in both master end relay bin logs, but won't execute on the 
slave: 
 
UPDATE tmp, tmp2 SET tmp.nn = tmp2.nn WHERE tmp.id = tmp2.id; 
 

How to repeat:
CREATE TABLE tmp ( 
  id int(10) unsigned NOT NULL default '0', 
  n int(10) unsigned NOT NULL default '0', 
  nn int(10) unsigned NOT NULL default '0', 
  PRIMARY KEY  (id) 
) TYPE=MyISAM; 
 
CREATE TABLE tmp2 ( 
  id int(10) unsigned NOT NULL default '0', 
  nn int(10) unsigned NOT NULL default '0', 
  PRIMARY KEY  (id) 
) TYPE=MyISAM; 
 
(fill tmp and tmp2 with some data) 
 
UPDATE tmp, tmp2 SET tmp.nn = tmp2.nn WHERE tmp.id = tmp2.id;
[30 Nov 2004 2:37] frank homann
fixed by using replicate-do-db instead of replicate-do-table