Bug #76276 tcp packet
Submitted: 12 Mar 2015 6:11 Modified: 19 Mar 2015 13:36
Reporter: doom12 doom Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / Python Severity:S1 (Critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[12 Mar 2015 6:11] doom12 doom
Description:
network.py function recv_plain(self)

first, tcp read 4 bytes head of record , and then read n bytes,
somtime, this 4 bytes not the head of record

please see below 

"38 0a 53 5a" read as head, but true head should be xx xx xx 38, 
"0a 53 5a" are body of record

sorry for bad english

SELECT symbol AS sym,price from day_hq_tb WHERE date=20150303
head: 38 0A 53 5A  -> (38 0A 'S' 'Z')
rest=payload_len : 5442104  
read: 1434
H  Q  0  0  0  5  9  2  [06] 2  0  .  0  8  0  [12] [00] [00] 9  [0A] S  Z  H  Q
  0  0  0  5  9  5  [06] 1  1  .  5  5  0  [12] [00] [00] [3A] [0A] S  Z  H  Q
0  0  0  5  9  6  [06] 3  1  .  7  8  0  [12] [00] [00] [3B] [0A] S  Z  H  Q  0
 0  0  5  9  7  [06] 1  1  .  0  4  0  [11] [00] [00] [3C] [0A] S  Z  H  Q  0  0
  0  5  9  8  [05] 8  .  3  5  0  [11] [00] [00] [3D] [0A] S  Z  H  Q  0  0  0
5  9  9  [05] 6  .  2  8  0  [12] [00] [00] [3E] [0A] S  Z  H  Q  0  0  0  6  0
 0  [06] 1  0  .  1  0  0  [11] [00] [00] [3F] [0A] S  Z  H  Q  0  0  0  6  0  1
  [05] 6  .  3  0  0  [12] [00] [00] [40] [0A] S  Z  H  Q  0  0  0  6  0  3  [06
] 1  4  .  9  8  0  [11] [00] [00] A  [0A] S  Z  H  Q  0  0  0  6  0  6  [05] 7
 .  2  3  0  [11] [00] [00] B  [0A] S  Z  H  Q  0  0  0  6  0  8  [05] 4  .  6
6  0  [12] [00] [00] C  [0A] S  Z  H  Q  0  0  0  6  0  9  [06] 1  4  .  4  2  0
  [12] [00] [00] D  [0A] S  Z  H  Q  0  0  0  6  1  0  [06] 1  3  .  1  7  0  [1
2] [00] [00] E  [0A] S  Z  H  Q  0  0  0  6  1  2  [06] 1  0  .  9  2  0  [11] [
00] [00] F  [0A] S  Z  H  Q  0  0  0  6  1  3  [05] 8  .  0  0  0  [12] [00] [00
] G  [0A] S  Z  H  Q  0  0  0  6  1  7  [06] 1  0  .  7  8  0  [12] [00] [00] H
 [0A] S  Z  H  Q  0  0  0  6  1  9  [06] 1  0  .  0  3  0  [11] [00] [00] I  [0A
] S  Z  H  Q  0  0  0  6  2  0  [05] 7  .  9  6  0  [11] [00] [00] J  [0A] S  Z

How to repeat:
I can email you the mysql table
[19 Mar 2015 13:36] Geert Vanderkelen
Duplicate of #76306 (which has a possible fix posted by the reporter)