Page MenuHomePhabricator

Database->getLag uses mysqlisms, not overridden for pgsql
Closed, ResolvedPublic

Description

Author: cja987

Description:
Special:Contributions (and other pages I'm told) call Database->getLag, which runs a sql command of SHOW PROCESSLIST which is a mysqlism. I overrode it with a stub in DatabasePostgres.php to make it work:

Index: includes/DatabasePostgres.php

  • includes/DatabasePostgres.php (revision 22629)

+++ includes/DatabasePostgres.php (working copy)
@@ -1178,7 +1178,12 @@

        return true;
}

+ function getLag() {
+ wfDebug( "Function getLag() not written for DatabasePostgres.php yet");
+ return false;
+ }

+
} // end DatabasePostgres class

?>


Version: 1.11.x
Severity: normal

Details

Reference
bz10104

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:54 PM
bzimport set Reference to bz10104.
bzimport added a subscriber: Unknown Object (MLST).

MySQL-specific code should be in DatabaseMysql, not in the parent class. The parent class should contain database-independent code and stubs only.

robchur wrote:

Stub functions returning 0 added for Oracle and PostgreSQL in r22721. DatabaseMysql doesn't seem to exist any more; there is no clean parent class. :(