server: log the actual error before return "mysql.ErrBadConn" (#5786)
server: log the actual error before return "mysql.ErrBadConn" (#5786)


ngaut/tidb,cosmtrek/tidb,yangwenmai/tidb,ngaut/tidb,Cofyc/tidb,wusphinx/tidb,wusphinx/tidb,c4pt0r/tidb,Nify/tidb,cosmtrek/tidb,yangwenmai/tidb,c4pt0r/tidb,CodeRushing/tidb,c4pt0r/tidb,pingcap/tidb,Nify/tidb,XuHuaiyu/tidb,coocood/tidb,ngaut/tidb,EvilMcJerkface/tidb,c4pt0r/tidb,EvilMcJerkface/tidb,qiuyesuifeng/tidb,pingcap/tidb,pingcap/tidb,qiuyesuifeng/tidb,pingcap/tidb,c4pt0r/tidb,CodeRushing/tidb,ngaut/tidb,ngaut/tidb,kyle-wang/tidb,pingcap/tidb,kyle-wang/tidb,mccxj/tidb,Cofyc/tidb,kyle-wang/tidb,pingcap/tidb,tiancaiamao/tidb,c4pt0r/tidb,ming-relax/tidb,kyle-wang/tidb,mccxj/tidb,kyle-wang/tidb,XuHuaiyu/tidb,ming-relax/tidb,tiancaiamao/tidb,kyle-wang/tidb,coocood/tidb,ngaut/tidb