Hi all

some parts of the toolserver db appear to be corrupt, or at least not replicated right.

People are complaing that my Gallery.php tool has started to report many images as "orphans" even though they are correctly categorized. I investigated a bit and found that there appear to be a lot of entries missing from commonswiki_p.categorylinks; Try this query on the toolserver db, and then on a live db, for comparison:

SELECT cl_to as cat FROM categorylinks where cl_from = 793855;
(categories for http://commons.wikimedia.org/wiki/Image:ButtonOrange.svg)

that returns five categories on the live server, but nothing on the toolserver. Not... good...

Any idea what could have cause this, or how to fix it? How to avoid such stuff in the future, or at least detect it early?
Maybe we could check the size of some tables every so often or something...

Regards,
Daniel