syncSequence must be called when finished writing some packet and before start reading.
()
| 92 | |
| 93 | // syncSequence must be called when finished writing some packet and before start reading. |
| 94 | func (mc *mysqlConn) syncSequence() { |
| 95 | // Syncs compressionSequence to sequence. |
| 96 | // This is not documented but done in `net_flush()` in MySQL and MariaDB. |
| 97 | // https://github.com/mariadb-corporation/mariadb-connector-c/blob/8228164f850b12353da24df1b93a1e53cc5e85e9/libmariadb/ma_net.c#L170-L171 |
| 98 | // https://github.com/mysql/mysql-server/blob/824e2b4064053f7daf17d7f3f84b7a3ed92e5fb4/sql-common/net_serv.cc#L293 |
| 99 | if mc.compress { |
| 100 | mc.sequence = mc.compressSequence |
| 101 | mc.compIO.reset() |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | // Handles parameters set in DSN after the connection is established |
| 106 | func (mc *mysqlConn) handleParams() (err error) { |
no test coverage detected