MCPcopy
hub / github.com/go-sql-driver/mysql / syncSequence

Method syncSequence

connection.go:94–103  ·  view source on GitHub ↗

syncSequence must be called when finished writing some packet and before start reading.

()

Source from the content-addressed store, hash-verified

92
93// syncSequence must be called when finished writing some packet and before start reading.
94func (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
106func (mc *mysqlConn) handleParams() (err error) {

Callers 5

writeCommandPacketMethod · 0.95
writeCommandPacketStrMethod · 0.95
writeExecutePacketMethod · 0.80
handleInFileRequestMethod · 0.80

Calls 1

resetMethod · 0.80

Tested by

no test coverage detected