forward3d / rbhive

Ruby gem for querying Apache Hive
http://www.forward3d.com
MIT License
98 stars 75 forks source link

fix incomplete data read in sasl_client_transport #11

Closed y-lan closed 10 years ago

y-lan commented 10 years ago

Current sasl_client_transport will fail in reading big data chunk because of a bug in reset_buffer! method.

len, = @transport.read(PAYLOAD_LENGTH_BYTES).unpack('l>')
@rbuf = @transport.read(len)

when the expected data size (len) is large, seems it may multiple times of transport.read to fetch all of the data.

andytinycat commented 10 years ago

Thanks!