Last modified: 2014-06-08 17:09:05 UTC
I'm using code like the following as the basis for the <select> menu of wiki-agnostic tools. $conn = kfGetMetaDb(); return kfQueryDb( $conn, 'SELECT * FROM wiki WHERE is_closed = 0' ); However I'm running into an unexpected entry for 'centralauth' where the 'name' and 'url' field are NULL. I can understand the use case for being able to look up in meta_p.wiki on which shard centralauth is. But when writing this query there was a reasonable expectation that I would not have to defend against random columns being null. Now I know about centralauth I can exclude it and/or add a "WHERE url IS NOT NULL" clause. However the problem is that this reflects a trend in my opinion that could easily cause another unexpected entry to show up for a use case I don't know of at the moment leading to more defensive "not NULL" conditions. I'd recommend either removing centralauth from meta_p.wiki or adding a straight forward way to only get wikis out of the table that have all columns populated with valid values.
centralauth is not a wiki. This entry should not exist in the wiki table.