Comment 3 for bug 1209436

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

I changed the title because the original bug did not exist, it turned out to be a feature limitation. --host default is "localhost", so when a DSN does not specify h, h=localhost is automatically used. There's no easy way around this except this one workaround: put "h=" in a --config file. Yes, nothing after the equals sign. This effectively unsets the --host default and makes it so that hosts have to specified somewhere for each DSN, where "somewhere" means a new --host default, or h in some config file or DSN.

There really was a bug that gave rise to the customer's issue in the first place: the rare Perl scope-closure bug where variables in inner scopes that are kept alive by a closure are lost later when the closure is called. This is fixed by moving the vars to an outer scope. So now all the --log-dsn related vars are in an outer scope.

There was also another problem: the retry code for doing --log-dsn query execution presumed that a reconnect would succeed, so it suppressed the error. So when the customer's reconnect failed, nothing was reported and there was no row in the log table either. Now reconnect errors are reported (though reconnection should cause an error in most cases).