Last modified: 2013-09-20 19:39:44 UTC
I am doing some querying with regards to templates and the first template that I decided to work with exposed an issue. I just ran select count(*) from templatelinks where tl_namespace = 10 and tl_title = "Don't_know"; and it returned 255 however when you join tl_from to page_id (to get where the template is being used) all results are NULL. This shouldn't happen. I suspect either database corruption or incorrect processing of template links.
https://en.wikipedia.org/w/index.php?title=Special:WhatLinksHere/Template:Don%27t_know&hidelinks=1&hideredirs=1
Doing some investigations and it looks like the newest page is from 2006
Some ghost entries are left in template links, see bug 36195 for maintenance script to be run for that case. Please compare your result of the select against live site (link in comment 1), if that is the same, the NULL entries are not a problem.
Errors are still present in the database
depends on bug 36195 to get the ghost entries removed. Add a condition/join to check, if the pages exist or use the api to receive the data.