Last modified: 2014-06-08 17:09:05 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T67789, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 65789 - WMFLabs: meta_p.wiki contains centralauth (unexpected wiki.url field is NULL)
WMFLabs: meta_p.wiki contains centralauth (unexpected wiki.url field is NULL)
Status: NEW
Product: Wikimedia Labs
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-27 01:54 UTC by Krinkle
Modified: 2014-06-08 17:09 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Krinkle 2014-05-27 01:54:18 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.
Comment 1 Alex Monk 2014-06-08 02:29:08 UTC
centralauth is not a wiki. This entry should not exist in the wiki table.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links