Page MenuHomePhabricator

MSSQL installer broken; updateRowExists returns always false
Closed, ResolvedPublic


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

Version: 1.24rc
Severity: major



Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:08 AM
bzimport set Reference to bz65813.
Rillke created this task.May 27 2014, 4:25 PM

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

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