User "MaxSem" changed the status of MediaWiki.r98020. Old Status: new New Status: fixme
User "MaxSem" also posted a comment on MediaWiki.r98020. Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/98020#c23171 Commit summary: * restore DB connection after unserialization. This is needed in all DB variants safe for MySQL. Found when running PagedTiffHandler Selenium tests on Postgres. Credits to Dan Nessett. Comment: I tried wandering in this direction some time ago with SQLite and came to conclusion that although this approach can help to hide one particular bug, overall it causes more problems than it fixes. For example: * By quietly reconnecting to database you don't restore connection properties set outside of open(). Oops, $wgSharedDB quietly disconnected on SQLite. * Extra connection to the same server can cause problems on MySQL and SQLite. * I'm pretty sure that LoadBalancer doesn't like it either. Summary: instead of resorting to this hack, I recommend you to fix the code path that leads to serialization/unserialization of DB connection in the first place and add <tt>function __sleep() { throw new MWException; }</tt> to DatabaseBase instead. _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
