Last modified: 2007-08-01 21:43:53 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 10769 - Database::update() should return the result
Database::update() should return the result
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch
Depends on:
  Show dependency treegraph
Reported: 2007-08-01 21:37 UTC by Thomas "Tango" Dalton
Modified: 2007-08-01 21:43 UTC (History)
1 user (show)

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

at return statement to Database::update() (385 bytes, patch)
2007-08-01 21:37 UTC, Thomas "Tango" Dalton

Description Thomas "Tango" Dalton 2007-08-01 21:37:51 UTC
Created attachment 3964 [details]
at return statement to Database::update()

Database::update() should return the result of the query (true for success, false for failure), but doesn't. This patch fixes that (just the addition of one word).
Comment 1 Rob Church 2007-08-01 21:40:52 UTC
Note that the boolean alone won't be enough to determine whether or not rows were updated at all; database errors tend to throw exceptions, which should be caught, or passed up, but the more useful check is to call Database::affectedRows().
Comment 2 Rob Church 2007-08-01 21:43:53 UTC
Fixed in r24532.

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