Closed moonbingbing closed 7 years ago
Mind to add a test case to cover this case?
Thanks for the patch!
I will try to mock MySQL's response :)
Is there anything I can do for this issue?
@vensontao Please test the patch in this PR on your side. It's a bit more efficient than my patch you tried earlier :)
Both the new patch and earlier patch, tested successfully, both can solve this problem, and bit.band(self.packet_no, 255) more efficient and pithy than earlier patch.
Well done! Thank you very much.
Merged with minor edits. Thanks!
user bug report in google group : https://groups.google.com/forum/#!topic/openresty/j3a-x75x0D0
the packet number is uchar type, from 0 to 255. if overflow, the result should be equal with
(uchar) net->pkt_nr++
, which is from MySQL source code line 316 in functionmy_net_write
: https://github.com/mysql/mysql-server/blob/71f48ab393bce80a59e5a2e498cd1f46f6b43f9a/sql/net_serv.cc