Explorar el Código

fix crash when connect to mysql4.1

s7v7nislands hace 12 años
padre
commit
4a178617b9
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      packets.go

+ 1 - 1
packets.go

@@ -498,7 +498,7 @@ func (mc *mysqlConn) readColumns(count int) (columns []mysqlField, err error) {
 		}
 
 		// EOF Packet
-		if data[0] == iEOF && len(data) == 5 {
+		if data[0] == iEOF && (len(data) == 5 || len(data) == 1) {
 			if i != count {
 				err = fmt.Errorf("ColumnsCount mismatch n:%d len:%d", count, len(columns))
 			}