Last modified: 2011-04-04 21:32:39 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 T10346, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 8346 - Replacing media files fails due to unique key constraint (PostgreSQL)
Replacing media files fails due to unique key constraint (PostgreSQL)
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.8.x
Other other
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-21 09:48 UTC by Andreas Walter
Modified: 2011-04-04 21:32 UTC (History)
0 users

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


Attachments

Description Andreas Walter 2006-12-21 09:48:59 UTC
System:    AIX 5.3, Technical Level 5
DB:        Postgesql 8.1.5
Webserver: Apache 2.2.3 with PHP 5.1.6
Mediawiki: Version 1.8.2, German language


The Upload of images/files works.

Updating the image/file with the Upload new version function
of mediawiki doesn't work at all.

Output with $wgShowExceptionDetails = true; follows.

Looks for me like a database problem:
ERROR: duplicate key violates unique constraint "image_pkey"




Interner Fehler (Translation from German to English: Internal Error)

A database error has occurred Query: INSERT INTO image
(img_name,img_size,img_width,img_height,img_bits,img_media_type,img_major_mime,img_minor_mime,img_timestamp,img_description,img_user,img_user_text,img_metadata)
VALUES
('Sg247940.pdf','7565148','0','0','0','OFFICE','application','pdf','2006-12-21
08:53:28 GMT','','2','U48awa','a:0:{}') Function: Image::recordUpload Error: 1
ERROR: duplicate key violates unique constraint "image_pkey"

Backtrace:

#0 /data/httpd/ux48prmue76/mediawiki-1.8.2/includes/Database.php(651):
DatabasePostgres->reportQueryError('ERROR: duplica...', 1, 'INSERT INTO im...',
'Image::recordUp...', false)
#1 /data/httpd/ux48prmue76/mediawiki-1.8.2/includes/Database.php(1251):
Database->query('INSERT INTO im...', 'Image::recordUp...')
#2 /data/httpd/ux48prmue76/mediawiki-1.8.2/includes/DatabasePostgres.php(498):
Database->insert('image', Array, 'Image::recordUp...', Array)
#3 /data/httpd/ux48prmue76/mediawiki-1.8.2/includes/Image.php(1605):
DatabasePostgres->insert('image', Array, 'Image::recordUp...', 'IGNORE')
#4 /data/httpd/ux48prmue76/mediawiki-1.8.2/includes/SpecialUpload.php(434):
Image->recordUpload('', '', '', '', '', false)
#5 /data/httpd/ux48prmue76/mediawiki-1.8.2/includes/SpecialUpload.php(234):
UploadForm->processUpload()
#6 /data/httpd/ux48prmue76/mediawiki-1.8.2/includes/SpecialUpload.php(15):
UploadForm->execute()
#7 /data/httpd/ux48prmue76/mediawiki-1.8.2/includes/SpecialPage.php(522):
wfSpecialUpload(NULL, Object(SpecialPage))
#8 /data/httpd/ux48prmue76/mediawiki-1.8.2/includes/SpecialPage.php(391):
SpecialPage->execute(NULL)
#9 /data/httpd/ux48prmue76/mediawiki-1.8.2/includes/Wiki.php(156):
SpecialPage::executePath(Object(Title))
#10 /data/httpd/ux48prmue76/mediawiki-1.8.2/includes/Wiki.php(47):
MediaWiki->initializeSpecialCases(Object(Title), Object(OutputPage),
Object(WebRequest))
#11 /data/httpd/ux48prmue76/mediawiki-1.8.2/index.php(47):
MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User),
Object(WebRequest))
#12 {main}
Comment 1 Greg Sabino Mullane 2006-12-25 18:06:31 UTC
Fixed due to a similar bug: see r18016

Thanks for the detailed bug report though, much appreciated!

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


Navigation
Links