Last modified: 2014-06-30 08:38:43 UTC
DatabaseUpdater::updateRowExists returns always false because sqlsrv_fetch functions (which is called in the end) doesn't like selecting just 1 and returns false. Similar to http://stackoverflow.com/q/22614335/2683737
This is used also at other places in core (In LocalRepo and LocalFile), but always with the Database::selectField method, maybe it works with that also for MSSQL in the updater? (Different is fetchObject vs. fetchRow). Just an idea, because selecting 1 is valid sql in my mind.
"1 AS X" works in SQLite, MySQL and MSSQL for examle ... I just change the $vars argument to DB::selectRow(); alternatively one could re-implement it in MSSQLUpdater
Change 135714 had a related patch set uploaded by Rillke: Name implicitly created CHECK constraints https://gerrit.wikimedia.org/r/135714
Wondering if this only affects 1.24/git master or also 1.23 stable (which might be worth to backport then)?
(In reply to Andre Klapper from comment #4) > Wondering if this only affects 1.24/git master or also 1.23 stable The issue is there but there's no harm because other checks prevent duplicate execution of the one and only "update rule" present in MssqlUpdater.php in REL1_23
Change 135714 merged by jenkins-bot: Name implicitly created CHECK constraints https://gerrit.wikimedia.org/r/135714