aiomysql icon indicating copy to clipboard operation
aiomysql copied to clipboard

refactor: close connection on error

Open pedrokiefer opened this issue 7 years ago • 9 comments
trafficstars

Port the solution from PyMySQL: https://github.com/PyMySQL/PyMySQL/pull/540

Might solve #340.

pedrokiefer avatar Nov 20 '18 17:11 pedrokiefer

Codecov Report

Merging #358 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #358   +/-   ##
=======================================
  Coverage   93.17%   93.17%           
=======================================
  Files           9        9           
  Lines        1129     1129           
  Branches      161      161           
=======================================
  Hits         1052     1052           
  Misses         54       54           
  Partials       23       23           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 298d2f1...51d83d4. Read the comment docs.

codecov[bot] avatar Nov 20 '18 17:11 codecov[bot]

Any clue why the tests failed for py3.5.3?

terricain avatar Nov 21 '18 22:11 terricain

Other than that the tests and port looks good. Have you tested it normally by having it connected to a maria db, restarting it and seeing if the close packets are now understood?

terricain avatar Nov 21 '18 22:11 terricain

Really odd that it failed with python 3.5.3, i'll look into it.

I have not yet tested this against mariadb, i'll do a simple script to replicate the scenario and test it tomorrow.

pedrokiefer avatar Nov 22 '18 18:11 pedrokiefer

Please merge this

goDeni avatar Aug 19 '20 12:08 goDeni

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Nov 16 '20 10:11 CLAassistant

thanks for the PR, I intend to patch the original issue in #660. I'm keeping this open to review the tests later on.

Nothing4You avatar Jan 16 '22 20:01 Nothing4You

Thanks for fixing this issue!

pedrokiefer avatar Jan 26 '22 18:01 pedrokiefer

i'll keep this open for now until i've had time to review and probably merge the tests

Nothing4You avatar Jan 26 '22 18:01 Nothing4You