Преглед на файлове

check discardMoreResultsIfExists err

Julien Schmidt преди 10 години
родител
ревизия
c1e44c429b
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      packets.go

+ 3 - 1
packets.go

@@ -543,7 +543,9 @@ func (mc *mysqlConn) handleOkPacket(data []byte) error {
 
 	// server_status [2 bytes]
 	mc.status = readStatus(data[1+n+m : 1+n+m+2])
-	mc.discardMoreResultsIfExists()
+	if err := mc.discardMoreResultsIfExists(); err != nil {
+		return err
+	}
 
 	// warning count [2 bytes]
 	if !mc.strict {