Last modified: 2012-08-04 20:48:54 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 13251 - Maintenance scripts do not work with Postgresql
Maintenance scripts do not work with Postgresql
Product: MediaWiki
Classification: Unclassified
Maintenance scripts (Other open bugs)
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
Blocks: postgres
  Show dependency treegraph
Reported: 2008-03-04 21:06 UTC by David Lee
Modified: 2012-08-04 20:48 UTC (History)
2 users (show)

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


Description David Lee 2008-03-04 21:06:57 UTC
I am using a PostgreSQL backend, but maintenance scripts try to access MySQL.

Running maintenance scripts give the following error:
 DB connection error: MySQL functions missing, have you compiled PHP with the --with-mysql option?
Comment 1 OverlordQ 2008-03-04 21:16:59 UTC
Which scripts are you trying to run? WFM even after I completely disable mysql.

host:# php -r '$connect = mysql_connect("localhost", "root", "password");'

Fatal error: Call to undefined function mysql_connect() in Command line code on line 1

host:# # php update.php
MediaWiki 1.13alpha Updater

Going to run database updates for wikidb
Depending on the size of your database this may take a while!
Abort with control-c in the next five seconds...2
... obsolete version of index "pagelink_unique index" does not exist
... index "pagelink_unique_index" aready exists
... constraint "revision_rev_user_fkey" is ON DELETE RESTRICT
Comment 2 David Lee 2008-03-04 22:13:21 UTC
I'm trying to run rebuildImages.php.

The error also appears when I try to run rebuildall.php or cleanupImages.php.

rebuildtextindex.php specifically returns "This script is only for MySQL."

update.php worked for me as well.
Comment 3 OverlordQ 2008-03-04 23:01:43 UTC
Ah yea. IANADev but to me it looks like that those scripts don't properly create the right database class, they just use Database instead of checking to see if it should use DatabasePostgres instead.

As per bug 9905 and rebuildtextindex:

"Closing: no script is needed to rebuild the full text indexes on Postgres, it's all trigger based. (Thanks for the r22172 change though)."
Comment 4 Greg Sabino Mullane 2008-03-14 04:39:40 UTC
Thanks, this should be fixed as of r31958

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