Last modified: 2012-08-04 20:49:13 UTC
Especially with Postgres, the server may be empty (Unix socket). When this happens, the install fails.
Proposed fix in r84485
your fix does not make it clear that a $user can be (possibly) null. I think this is not valid for MySQL.
Right, but if the user is null, then we should not be calling open(), no?
This whole thing is a mess :( I'm thinking I should just revert myself in r80892.
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.
(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.