You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I found that connection will close after I set isolation level twice.
I accidentally set this twice and found a unexpected behavior. ( at least, I do not expect that.
After I set some log, I found the reason is that this line https://github.com/aio-libs/aiomysql/blob/master/aiomysql/pool.py#L223 return
True
.example code is here https://gist.github.com/Bear1110/1115bef832836d31079d0ceb194e56da.
OUTPUT is below
The last line
0 0
is meaning pool close the connection after released connection.print(pool.freesize, pool.size)
I found that flag which is
conn.get_transaction_status()
meaning is here.But, actually I do not know why this flag become
True
after I set isolation level twice ?I just wonder why need close connection when this flag is
True
?Could any one help me understand this logic ? Thanks 😄
Beta Was this translation helpful? Give feedback.
All reactions