Comment 2 for bug 711520

Revision history for this message
David Creemer (dcreemer+launchpad) wrote :

Sorry for the incomplete information. I am using MySQL Connector/Python on top of gevent (gevent.org) which does ansync networking. My application connects to DB, and reads/writes to a table that has 10 columns, one of which is a LONG TEXT that can have values from 100 bytes to 100K bytes.

The key here is that the socket write (sock.send) is not guaranteed to send all of the data of course, only to return the count of bytes actually sent. If you are unfamiliar with gevent, you can try installing it, then doing this in some test code:

import gevent
import gevent.monkey
gevent.monkey.patch_all()

then run a test of large writes, and you should see a protocol error.