Last modified: 2006-07-23 00:23:09 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 6789 - mysql_errno() Should Take Connection as Parameter
mysql_errno() Should Take Connection as Parameter
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.8.x
PC Linux
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-23 00:13 UTC by Gregory Szorc
Modified: 2006-07-23 00:23 UTC (History)
0 users

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


Attachments

Description Gregory Szorc 2006-07-23 00:13:10 UTC
In Database.php, the fetchObject, fetchRow, and numRows functions all call
mysql_errno() without a parameter.  The functions should instead call
$this->lastErrno(), like the following:

if ( $this->lastErrno() ) { ... }

The reason is that mysql_errno() without a parameter will return the most recent
mysql error, not necessarily belonging to the mysql connection used by the
Database class.  If there are multiple mysql connection resources in one
instance of MediaWiki, possibly through an extension, and one of these triggers
an error, then MediaWiki will crash on the next database query.
Comment 1 Gregory Szorc 2006-07-23 00:23:09 UTC
Nevermind.  I was looking at the wrong revision of the tree when I saw the bug.
 Marking as invalid.

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


Navigation
Links