Last modified: 2007-06-05 00:28:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T12104, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 10104 - Database->getLag uses mysqlisms, not overridden for pgsql
Database->getLag uses mysqlisms, not overridden for pgsql
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.11.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-02 02:24 UTC by Chuck Adams
Modified: 2007-06-05 00:28 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Chuck Adams 2007-06-02 02:24:39 UTC
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

 ?>
Comment 1 Tim Starling 2007-06-03 09:29:30 UTC
MySQL-specific code should be in DatabaseMysql, not in the parent class. The parent class should contain database-independent code and stubs only. 
Comment 2 Rob Church 2007-06-04 21:43:40 UTC
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. :(

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links