Last modified: 2014-02-03 08:24:24 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 60531 - Media deletion fails with database error on PostgreSQL backend
Media deletion fails with database error on PostgreSQL backend
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.22.1
All All
: Unprioritized normal (vote)
: 1.22.x release
Assigned To: Lethosor
:
Depends on:
Blocks: postgres
  Show dependency treegraph
 
Reported: 2014-01-28 15:30 UTC by gebhkla
Modified: 2014-02-03 08:24 UTC (History)
2 users (show)

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


Attachments
Patch (1.54 KB, patch)
2014-01-28 15:37 UTC, gebhkla
Details

Description gebhkla 2014-01-28 15:30:28 UTC
At least on SQL query used for media deletion is incorrectly generated for PostgreSQL backends: In the FROM clause tables are missing:

SELECT rev_id,rev_page,rev_text_id,rev_timestamp,rev_comment,rev_user_text,rev_user,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,rev_content_format,rev_content_model,page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len,user_name  FROM "mwuser"   WHERE page_id = '207' AND rev_id = '1239'  LIMIT 1   FOR UPDATE OF page
Comment 1 gebhkla 2014-01-28 15:37:08 UTC
Created attachment 14396 [details]
Patch

Renaming the $table to $table_cond to avoid naming conflicts with the argument of the function solved to problem.
Comment 2 Gerrit Notification Bot 2014-01-28 16:54:07 UTC
Change 109914 had a related patch set uploaded by Umherirrender:
Avoid variable naming conflicts in DatabasePostgres::selectSQLText

https://gerrit.wikimedia.org/r/109914
Comment 3 Umherirrender 2014-01-28 16:57:41 UTC
Reapply you change manually against current master (the is_array was added in the meantime). Thanks for the explanation/tip.

In future please try to commit direct to gerrit to make the review easier. You can also use the gerrit-patch-uploader[1], if no gerrit account exists.

[1] https://tools.wmflabs.org/gerrit-patch-uploader/
Comment 4 Umherirrender 2014-01-28 17:16:11 UTC
Fix for bug 47055 was backported to REL1_22, so this fix should also be backported.
Comment 5 Gerrit Notification Bot 2014-01-28 17:45:21 UTC
Change 109914 merged by jenkins-bot:
Avoid variable naming conflicts in DatabasePostgres::selectSQLText

https://gerrit.wikimedia.org/r/109914
Comment 6 Umherirrender 2014-01-28 17:55:32 UTC
successfully merged
Comment 7 Gerrit Notification Bot 2014-02-02 09:02:58 UTC
Change 110836 had a related patch set uploaded by Siebrand:
Avoid variable naming conflicts in DatabasePostgres::selectSQLText

https://gerrit.wikimedia.org/r/110836
Comment 8 Gerrit Notification Bot 2014-02-02 19:00:36 UTC
Change 110836 merged by jenkins-bot:
Avoid variable naming conflicts in DatabasePostgres::selectSQLText

https://gerrit.wikimedia.org/r/110836
Comment 9 Siebrand Mazeland 2014-02-03 08:19:28 UTC
Was backported to 1.22, and will be part of 1.22.2.

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


Navigation
Links