User "Brion VIBBER" posted a comment on MediaWiki.r97544.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97544#c22811
Commit summary:

* (bug 31007) Fix regression in rebuildrecentchanges maintenance script

Was trying to save literal string 'NULL' into rc_old_len / rc_new_len fields 
due to a bug switching to database query builder methods in r77778.

Comment:

No, it sets it to null in that case -- instead of turning it into the string 
'NULL', we now pass the null value through.

False could come up when the row doesn't exist; the previous code would have 
silently converted that to 0, which is probably wrong. New code will pass the 
false through, which I believe will end up as an empty string "" in the output 
SQL.

However, that's fairly unlikely as we've just populated 'recentchanges' with 
items pulled from 'revision'; and if revisions got deleted in the meantime 
their recentchanges records should have been removed too.

So I'm not sure if that's a case you'd need to handle... but checking for false 
and returning null wouldn't hurt?

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to