Last modified: 2014-07-10 23:59:44 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 26682 - Add options parameter to delete()
Add options parameter to delete()
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: 52868 (view as bug list)
Depends on:
Blocks: code_quality
  Show dependency treegraph
Reported: 2011-01-12 02:29 UTC by Sam Reed (reedy)
Modified: 2014-07-10 23:59 UTC (History)
3 users (show)

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


Description Sam Reed (reedy) 2011-01-12 02:29:28 UTC
Per the other queries, it'd be nice to be able to do options on delete.

For the resource loader maintenance script to do cleanupRemovedModules, there is a "LIMIT $limit", which can't be accommodated via $db->delete()

You need to do db->$query() etc.

Not a big deal, just not got time/inclination to look at/do this now for all databases etc
Comment 1 Sam Reed (reedy) 2011-01-12 02:48:19 UTC
// $dbw->delete() doesn't support LIMIT :(
Comment 2 Sam Reed (reedy) 2013-12-11 23:30:37 UTC
*** Bug 52868 has been marked as a duplicate of this bug. ***
Comment 3 Max Semenik 2013-12-12 18:03:12 UTC
In Postgres you'll have to do the trick with DELETE FROM table WHERE ctid IN (SELECT ctid FROM table WHERE ... LIMIT n) - ewwww.

SQLite and Oracle support LIMIT in DELETE.
Comment 4 MZMcBride 2013-12-14 20:00:11 UTC
Related: bug 52777 and bug 52778.
Comment 5 Gerrit Notification Bot 2014-05-06 22:51:12 UTC
Change 131890 had a related patch set uploaded by Withoutaname:
Expand Database.php delete() function parameter list
Comment 6 Gerrit Notification Bot 2014-07-10 23:59:44 UTC
Change 131890 abandoned by Withoutaname:
Expand Database.php delete() function parameter list

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