Fixes #3915. This comments out two more raiseable conditions -- neither seem particularly useful to raise on in the first place anyway, though.

Some day, I need to go over all this with some decent version switching and submit some upstream patches.



git-svn-id: file:///home/svn/framework3/trunk@11897 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
Tod Beardsley 2011-03-08 21:28:20 +00:00
parent 5299bbb8db
commit a5275fa6e5
1 changed files with 4 additions and 2 deletions

View File

@ -235,7 +235,8 @@ class RbMysql
header = @sock.read(4)
len1, len2, seq = header.unpack("CvC")
len = (len2 << 8) + len1
raise ProtocolError, "invalid packet: sequence number mismatch(#{seq} != #{@seq}(expected))" if @seq != seq
# Ignore the sequence number -- protocol differences between 4.x and 5.x
# raise ProtocolError, "invalid packet: sequence number mismatch(#{seq} != #{@seq}(expected))" if @seq != seq
@seq = (@seq + 1) % 256
ret.concat @sock.read(len)
end
@ -295,7 +296,8 @@ class RbMysql
# ProtocolError :: packet is not EOF
def read_eof_packet
data = read
raise ProtocolError, "packet is not EOF" unless Protocol.eof_packet? data
# EOF packet is different between MySQL 4.x and 5.x, so ignore.
# raise ProtocolError, "packet is not EOF" unless Protocol.eof_packet? data
end
# Read initial packet