Last modified: 2012-08-04 20:49:13 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 T30167, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28167 - Database connection fails if server is empty
Database connection fails if server is empty
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
1.18.x
All All
: Normal critical (vote)
: ---
Assigned To: Greg Sabino Mullane
:
Depends on:
Blocks: postgres 26676
  Show dependency treegraph
 
Reported: 2011-03-21 21:15 UTC by Greg Sabino Mullane
Modified: 2012-08-04 20:49 UTC (History)
3 users (show)

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


Attachments

Description Greg Sabino Mullane 2011-03-21 21:15:30 UTC
Especially with Postgres, the server may be empty (Unix socket). When this happens, the install fails.
Comment 1 Greg Sabino Mullane 2011-03-21 21:20:43 UTC
Proposed fix in r84485
Comment 2 Mark A. Hershberger 2011-03-22 05:23:17 UTC
your fix does not make it clear that a $user can be (possibly) null.  I think this is not valid for MySQL.
Comment 3 Greg Sabino Mullane 2011-03-22 15:35:03 UTC
Right, but if the user is null, then we should not be calling open(), no?
Comment 4 Chad H. 2011-03-22 15:39:13 UTC
This whole thing is a mess :(

I'm thinking I should just revert myself in r80892.
Comment 5 Greg Sabino Mullane 2011-03-22 15:46:18 UTC
I don't know about that, I think the refactoring is good. The onl question is, is there any point at which a database connection is opened in MySQL without specifying a user at all? That would seem to be a "no", but I defer to the MySQL experts.
Comment 6 Chad H. 2011-03-22 16:03:31 UTC
(In reply to comment #2)
> your fix does not make it clear that a $user can be (possibly) null.  I think
> this is not valid for MySQL.

$user can't be false, null, or ''. This seems consistent with all DB types (except SQLite). Greg's change made no change to MySQL and allowed correct Postgres behavior. I can't imagine very many scenarios where we'd want to attempt connection with a blank username (again, except SQLite, cleaned up in r84532). Closing as FIXED.

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


Navigation
Links