https://bugzilla.wikimedia.org/show_bug.cgi?id=65789
Bug ID: 65789
Summary: WMFLabs: meta_p.wiki contains centralauth (unexpected
wiki.url field is NULL)
Product: Wikimedia Labs
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: General
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
Web browser: ---
Mobile Platform: ---
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.
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l