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

Method discardResults

packets.go:1245–1263  ·  view source on GitHub ↗

For each remaining resultset in the stream, discards its rows and updates mc.affectedRows and mc.insertIds.

()

Source from the content-addressed store, hash-verified

1243// For each remaining resultset in the stream, discards its rows and updates
1244// mc.affectedRows and mc.insertIds.
1245func (mc *okHandler) discardResults() error {
1246 for mc.status&statusMoreResultsExists != 0 {
1247 resLen, _, err := mc.readResultSetHeaderPacket()
1248 if err != nil {
1249 return err
1250 }
1251 if resLen > 0 {
1252 // columns
1253 if err := mc.conn().skipColumns(resLen); err != nil {
1254 return err
1255 }
1256 // rows
1257 if err := mc.conn().skipRows(); err != nil {
1258 return err
1259 }
1260 }
1261 }
1262 return nil
1263}
1264
1265// https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_binary_resultset.html#sect_protocol_binary_resultset_row
1266func (rows *binaryRows) readRow(dest []driver.Value) error {

Callers 3

ExecMethod · 0.80
CloseMethod · 0.80
execMethod · 0.80

Calls 4

connMethod · 0.95
skipColumnsMethod · 0.80
skipRowsMethod · 0.80

Tested by

no test coverage detected