golistic / pxmysql

Go MySQL driver using X Protocol
MIT License
14 stars 0 forks source link

fix: recover from server timing out connections #25

Closed geertjanvdk closed 1 year ago

geertjanvdk commented 1 year ago

When mysqlx_wait_timeout is reached, the MySQL X Plugin will close the inactive session. We did not correctly recover from this. We fix it by sending the driver.ErrBadConn when the header of a message could not be read.

We also implement xmysql.UnmarshalPartial which is the same as proto.Unmarshall but with AllowPartial set true.

Fixes #22