5-0-backport: activerecord/mysql2: Avoid setting @connection to nil, just close it (#26473)
5-0-backport: activerecord/mysql2: Avoid setting @connection to nil, just close it (#26473)

* activerecord/mysql2: Avoid setting @connection to nil, just close it

Backport of https://github.com/rails/rails/pull/26434

* Add a CHANGELOG entry

rbhitchcock/rails,coreyward/rails,tgxworld/rails,rafaelfranca/omg-rails,yasslab/railsguides.jp,Vasfed/rails,repinel/rails,rails/rails,jeremy/rails,repinel/rails,elfassy/rails,maicher/rails,assain/rails,hanystudy/rails,voray/rails,alecspopa/rails,mtsmfm/railstest,utilum/rails,deraru/rails,sergey-alekseev/rails,betesh/rails,lcreid/rails,samphilipd/rails,bogdanvlviv/rails,mechanicles/rails,flanger001/rails,yasslab/railsguides.jp,kaspth/rails,pvalena/rails,Erol/rails,gfvcastro/rails,georgeclaghorn/rails,odedniv/rails,utilum/rails,illacceptanything/illacceptanything,illacceptanything/illacceptanything,kenta-s/rails,gcourtemanche/rails,MichaelSp/rails,georgeclaghorn/rails,matrinox/rails,Edouard-chin/rails,sergey-alekseev/rails,untidy-hair/rails,coreyward/rails,rossta/rails,starknx/rails,joonyou/rails,koic/rails,deraru/rails,Sen-Zhang/rails,MichaelSp/rails,joonyou/rails,MSP-Greg/rails,Erol/rails,ngpestelos/rails,maicher/rails,ttanimichi/rails,eileencodes/rails,georgeclaghorn/rails,esparta/rails,iainbeeston/rails,Spin42/rails,schuetzm/rails,pschambacher/rails,arunagw/rails,gavingmiller/rails,kirs/rails-1,gfvcastro/rails,iainbeeston/rails,yasslab/railsguides.jp,starknx/rails,betesh/rails,mohitnatoo/rails,repinel/rails,bogdanvlviv/rails,kmayer/rails,MichaelSp/rails,lucasmazza/rails,richseviora/rails,aditya-kapoor/rails,MSP-Greg/rails,tgxworld/rails,BlakeWilliams/rails,mtsmfm/rails,odedniv/rails,mohitnatoo/rails,fabianoleittes/rails,alecspopa/rails,ttanimichi/rails,palkan/rails,Stellenticket/rails,tgxworld/rails,gauravtiwari/rails,illacceptanything/illacceptanything,kmcphillips/rails,arjes/rails,travisofthenorth/rails,sealocal/rails,Erol/rails,yalab/rails,brchristian/rails,Sen-Zhang/rails,notapatch/rails,flanger001/rails,aditya-kapoor/rails,baerjam/rails,kmcphillips/rails,arunagw/rails,lucasmazza/rails,stefanmb/rails,koic/rails,marklocklear/rails,rossta/rails,riseshia/railsguides.kr,repinel/rails,Envek/rails,printercu/rails,rafaelfranca/omg-rails,jeremy/rails,Vasfed/rails,lcreid/rails,alecspopa/rails,illacceptanything/illacceptanything,Stellenticket/rails,rbhitchcock/rails,mechanicles/rails,notapatch/rails,starknx/rails,MSP-Greg/rails,palkan/rails,kamipo/rails,gauravtiwari/rails,ledestin/rails,mtsmfm/railstest,kachick/rails,felipecvo/rails,brchristian/rails,marklocklear/rails,richseviora/rails,koic/rails,gavingmiller/rails,kamipo/rails,marklocklear/rails,BlakeWilliams/rails,bogdanvlviv/rails,gauravtiwari/rails,aditya-kapoor/rails,illacceptanything/illacceptanything,mohitnatoo/rails,rossta/rails,kaspth/rails,Envek/rails,georgeclaghorn/rails,printercu/rails,baerjam/rails,yhirano55/rails,BlakeWilliams/rails,stefanmb/rails,pvalena/rails,EmmaB/rails-1,mijoharas/rails,kmcphillips/rails,ngpestelos/rails,aditya-kapoor/rails,kddeisz/rails,assain/rails,kachick/rails,shioyama/rails,yahonda/rails,sealocal/rails,jeremy/rails,kmayer/rails,printercu/rails,kirs/rails-1,riseshia/railsguides.kr,illacceptanything/illacceptanything,schuetzm/rails,esparta/rails,vipulnsward/rails,mtsmfm/rails,illacceptanything/illacceptanything,shioyama/rails,pschambacher/rails,odedniv/rails,fabianoleittes/rails,pschambacher/rails,travisofthenorth/rails,yhirano55/rails,vipulnsward/rails,matrinox/rails,kmcphillips/rails,prathamesh-sonpatki/rails,joonyou/rails,mathieujobin/reduced-rails-for-travis,ngpestelos/rails,kmayer/rails,voray/rails,kamipo/rails,tjschuck/rails,vipulnsward/rails,shioyama/rails,Sen-Zhang/rails,riseshia/railsguides.kr,assain/rails,gavingmiller/rails,lcreid/rails,BlakeWilliams/rails,Edouard-chin/rails,ledestin/rails,prathamesh-sonpatki/rails,illacceptanything/illacceptanything,rbhitchcock/rails,yawboakye/rails,kenta-s/rails,arunagw/rails,kachick/rails,mtsmfm/railstest,illacceptanything/illacceptanything,felipecvo/rails,baerjam/rails,yhirano55/rails,kddeisz/rails,illacceptanything/illacceptanything,yasslab/railsguides.jp,printercu/rails,notapatch/rails,samphilipd/rails,tijwelch/rails,rails/rails,bogdanvlviv/rails,fabianoleittes/rails,riseshia/railsguides.kr,brchristian/rails,rafaelfranca/omg-rails,coreyward/rails,eileencodes/rails,maicher/rails,tjschuck/rails,arjes/rails,Edouard-chin/rails,yawboakye/rails,shioyama/rails,kenta-s/rails,kddeisz/rails,flanger001/rails,travisofthenorth/rails,schuetzm/rails,yawboakye/rails,gfvcastro/rails,eileencodes/rails,kddeisz/rails,yalab/rails,Vasfed/rails,fabianoleittes/rails,illacceptanything/illacceptanything,tjschuck/rails,notapatch/rails,deraru/rails,arjes/rails,esparta/rails,prathamesh-sonpatki/rails,matrinox/rails,illacceptanything/illacceptanything,yahonda/rails,voray/rails,gfvcastro/rails,ledestin/rails,EmmaB/rails-1,mathieujobin/reduced-rails-for-travis,gcourtemanche/rails,kirs/rails-1,Erol/rails,Spin42/rails,utilum/rails,iainbeeston/rails,illacceptanything/illacceptanything,stefanmb/rails,arunagw/rails,yahonda/rails,yalab/rails,iainbeeston/rails,richseviora/rails,palkan/rails,mijoharas/rails,utilum/rails,lucasmazza/rails,esparta/rails,betesh/rails,ttanimichi/rails,illacceptanything/illacceptanything,hanystudy/rails,mijoharas/rails,deraru/rails,sergey-alekseev/rails,elfassy/rails,mohitnatoo/rails,palkan/rails,bolek/rails,untidy-hair/rails,untidy-hair/rails,Envek/rails,Envek/rails,jeremy/rails,Vasfed/rails,mathieujobin/reduced-rails-for-travis,assain/rails,mechanicles/rails,yawboakye/rails,samphilipd/rails,bolek/rails,Edouard-chin/rails,untidy-hair/rails,tjschuck/rails,sealocal/rails,bradleypriest/rails,MSP-Greg/rails,elfassy/rails,xlymian/rails,joonyou/rails,EmmaB/rails-1,mechanicles/rails,lcreid/rails,tijwelch/rails,baerjam/rails,yalab/rails,tijwelch/rails,flanger001/rails,rails/rails,Stellenticket/rails,felipecvo/rails,gcourtemanche/rails,travisofthenorth/rails,xlymian/rails,yahonda/rails,Stellenticket/rails,betesh/rails,pvalena/rails,xlymian/rails,mtsmfm/rails,schuetzm/rails,bradleypriest/rails,vipulnsward/rails,yhirano55/rails,bolek/rails,eileencodes/rails,rails/rails,bradleypriest/rails,illacceptanything/illacceptanything,kaspth/rails,Spin42/rails,hanystudy/rails,prathamesh-sonpatki/rails,tgxworld/rails,pvalena/rails