https://bugzilla.wikimedia.org/show_bug.cgi?id=22093
Ryan Biesemeyer <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #7335|0 |1 is obsolete| | AssignedTo|[email protected]. |[email protected] |org | --- Comment #14 from Ryan Biesemeyer <[email protected]> 2010-07-27 21:05:21 UTC --- Created an attachment (id=7599) --> (https://bugzilla.wikimedia.org/attachment.cgi?id=7599) DatabaseMssqlNative The suggestions have been implemented and the code has been tested on MS SQL Server 2008 with Fulltext, as well as on MySQL 5.1 to ensure it doesn't break anything. There are two small changes to DatabaseBase (suggested by Aryeh Gregor), which cause ::deadlockLoop to call ::commit and ::rollback instead of executing SQL directly. The patch is based on today's r70030. RE: Aryeh Gregor "why would any caller call open() with an empty $user" ::open() is called when the class is instantiated. Is there anywhere I'm not finding that instantiates a database for any purpose without credentials? RE: Aryeh Gregor "This is evil, but I'm not sure there's a better solution." + // several extensions seem to think that all databases support limits via LIMIT N after the WHERE clause + // well, MSSQL uses SELECT TOP N, so to catch any of those extensions we'll do a quick check for a LIMIT + // clause and pass $sql through $this->LimitToTopN() which parses the limit clause and passes the result to + // $this->limitResult(); + if ( preg_match( '/\bLIMIT\s*/i', $sql ) ) > 0) { This LIMIT check is intentionally lax, since LimitToTopN() has a much more stringent parsing and stripping of the LIMIT/OFFSET clause and will return the SQL untouched if it doesn't match. RE: Aryeh Gregor "Ouch. There's really no better way to do this?" in ::insert() Yes, there is absolutely a better way of doing this, and I believe I have implemented it this time around, bu asking the database for the $table's IDENTITY column and handling it appropriately. The old way was inherited and worked, so I didn't mess with it until you brought it up, but yes, definitely ugly. On another note: Microsoft would like to see this mainlined (as would I :) ), and I realize that there will need to be some documentation on MediaWiki.org showing how to set up MS SQL Server, revealing the ntauth scenario etc., but don't want to cause confusion by people accidentally accessing these articles until it is released. How is documentation on future features typically handled? -yaauie -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- 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
