Browse Source

Merge pull request #72 from go-sql-driver/cmd-fix

Fix CMD packet header
Julien Schmidt 12 năm trước cách đây
mục cha
commit
b4eb2f3d5e
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      packets.go

+ 1 - 1
packets.go

@@ -282,7 +282,7 @@ func (mc *mysqlConn) writeCommandPacket(command byte) error {
 	// Send CMD packet
 	return mc.writePacket([]byte{
 		// Add the packet header [24bit length + 1 byte sequence]
-		0x05, // 5 bytes long
+		0x01, // 1 byte long
 		0x00,
 		0x00,
 		0x00, // mc.sequence