Last modified: 2012-08-04 20:48:46 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 15896 - Incorrect PostgreSQL version requirements (IF EXISTS)
Incorrect PostgreSQL version requirements (IF EXISTS)
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.13.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 16711 (view as bug list)
Depends on:
Blocks: postgres
  Show dependency treegraph
 
Reported: 2008-10-08 20:37 UTC by Sam Giffney
Modified: 2012-08-04 20:48 UTC (History)
2 users (show)

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


Attachments

Description Sam Giffney 2008-10-08 20:37:18 UTC
MediaWiki 1.13 states a requirement PostgreSQL 8.1 or later.

The upgrade process makes a DROP INDEX IF EXISTS call but
PostgreSQL 8.1 does not allow the IF EXISTS clause in this statement.

8.1
DROP INDEX name [, ...] [ CASCADE | RESTRICT ]
http://www.postgresql.org/docs/8.1/interactive/sql-dropindex.html

8.3
http://www.postgresql.org/docs/8.3/interactive/sql-dropindex.html
DROP INDEX [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]

(I also believe attempting to drop an index that doesn't exist will also fail under 8.1)
---------------

php update.php

<snip>
Adding ipb_address_unique index

Warning: pg_query(): Query failed: ERROR:  syntax error at or near "EXISTS" at character 45 in /var/www/zenbumediawiki/includes/db/DatabasePostgres.php on line 552
A database error has occurred
Query: DROP INDEX IF EXISTS ipb_address

Function: Database::sourceStream
Error: 1 ERROR:  syntax error at or near "EXISTS" at character 45

Backtrace:
#0 /var/www/zenbumediawiki/includes/db/Database.php(561): DatabasePostgres->reportQueryError('ERROR:  syntax ...', 1, 'DROP INDEX IF E...', 'Database::sourc...', false)
#1 /var/www/zenbumediawiki/includes/db/Database.php(2178): Database->query('DROP INDEX IF E...', 'Database::sourc...')
#2 /var/www/zenbumediawiki/includes/db/Database.php(2128): Database->sourceStream(Resource id #170, false, false)
#3 /var/www/zenbumediawiki/install-utils.inc(105): Database->sourceFile('/var/www/zenbum...')
#4 /var/www/zenbumediawiki/maintenance/updaters.inc(1681): dbsource('/var/www/zenbum...')
#5 /var/www/zenbumediawiki/maintenance/updaters.inc(1044): do_postgres_updates()
#6 /var/www/zenbumediawiki/maintenance/update.php(62): do_all_updates(false, true)
#7 {main}
Segmentation fault


SYSTEM SPECS

Product	Version
PHP	5.2.0-8+etch11 (apache2handler)
PostgreSQL	PostgreSQL 8.1.11 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
Comment 1 Brion Vibber 2008-10-08 20:40:40 UTC
Adding tracking bug
Comment 2 Greg Sabino Mullane 2008-10-10 18:24:19 UTC
Thanks for the report, should be fixed as of r41944
Comment 3 Greg Sabino Mullane 2008-12-25 23:58:11 UTC
*** Bug 16711 has been marked as a duplicate of this bug. ***

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


Navigation
Links