-
-
Notifications
You must be signed in to change notification settings - Fork 638
Description
This may be intentional, but if it is, i'd need some help.
Basically what happens is that when you get a pool connection and then change it's user (i use this because i need to change the database) and a error occurs, like bad credentials for the new user, instead of only compromising the current connection that i've got, it compromises the whole pool, whenever i try to get another connection from the pool, the pool tries to use the same wrong credentials that i've passed to the connection.changeUser. This makes the pool unusable in my code because i can never get a connection again to be able to change user, in my understanding, changing the user on the connection should only affect that pooledConnection and not the whole pool.
I have one pool per server, and that server has many dbs, that's why i need to change the connection user from that specific pool, when some error occurs that makes that connection unusable, i use connection.destroy(), but this don't prevent the pool to keep trying to connect the new pool.getConnection() with the same wrong credentials i passed to the one i destroyed.
I would like to get some info if this behaviour is intentional, or if it really has this behaviour at all, maybe i'm fuc**ing things up somewhere... Thanks for helping in advance!