Eonblast/Emysql — pull request #63 by jlouis (2013-04-28 18:05:29+00:00)
Title: Fixed bug in emysql_tcp:recv_packet_body where it wasn't decrementing re...

...quested number of bytes when reading from socket.

This one should go in. Otherwise we have a latent bug in the driver code. I'd much rather do a simple

gen_tcp:recv(Socket, PacketLength, ?TIMEOUT)

on the socket and then just wait for all data to arrive directly like this, or time out after a while. Then go again and wait if `{error, timeout}` occurs. It is simpler, pushes work to the C layer, and is probably going to run a faster route than this.