|Title||MySQL bug stops replicator from seeing some Bugzilla changes|
|Assigned user||Nick Barnes|
|Description||The replicator may fail to notice some changes to Bugzilla bugs. In particular, the addition of a comment to a Bugzilla bug. This occurs with some versions of MySQL (e.g. 3.23.37) but not others (e.g. 3.22.32).|
|Analysis||This has the same underlying cause as job000345: some versions of MySQL fail to return some rows for some LEFT JOIN selects.|
To be specific, a LEFT JOIN with a table including a DATETIME column which is NOT NULL, WHERE not_null_datetime IS NULL, returns no rows.
Here's a little example:
Make a small database with these tables and this row:
create table a (id int);
create table b (id int, dt datetime not null, f int not null);
insert into a values (1);
Then each of these two queries correctly returns a single row.
select a.id from a left join b using (id) where b.f is null;
select a.id from a left join b using (id) where b.id is null;
But this query returns the empty set:
select a.id from a left join b using (id) where b.dt is null;
We have such a query in the Bugzilla integration. We can work around this bug in MySQL by using WHERE some_other_field IS NULL. In particular, say "where bugs_activity.fieldid is null" instead of "where bugs_activity.bug_when is null".
|Evidence||This is a detailed bug report from a user seeing this problem: <|
This is mail from a user who found a different workaround: <
|Created by||Nick Barnes|
|Created on||2001-07-16 12:49:01|
|Last modified by||Gareth Rees|
|Last modified on||2001-12-10 19:50:05|
|History||2001-07-16 NB Created.|
|14183||closed||2001-07-16 18:12:12||Gareth Rees||Replicate new bugs in Bugzilla even in buggy MySQL versions like 3.23.37.|