> Database connections are full of state (apart from transactions, there are > also > sql variables, temporary tables, and probably other stuff I am not aware of), > thus auto-reconnection cannot be transparent in the general case. In specific > scenarios, this is ok, but I doubt that it is best managed by a generic > extension > like pdo.
This is exactly why the ability to manually close the connection is badly needed. Just because a connection hasn't been lost doesn't mean it's in a usable state. PDO will happily hand you a reused connection that is not, in fact, still usable. The only way around this issue is to encapsulate PDO such that you can replace the useless instance with a new one, since you cannot currently close a connection that is in an error state. -Jeff
