BLOB in prepared statements gets the length wrong...
jdalberg opened this issue · comments
Jesper Dalberg commented
in src/prepared_statements/binary_data_packet.dart
in the method _readFile on the FIELD_TYPE_BLOB section, you determine the length by a call to buffer.readByte, thats a mistake, since lengths of BLOB fields can be quite a large amount larger than a byte ;)
I have tested using buffer.readLengthCodeBinary() instead, and that seems to work better ;)
James Ots commented
You're right, I'll fix this.
Note to self: http://dev.mysql.com/doc/internals/en/binary-protocol-value.html