felixge/node-mysql — pull request #670 by ayanamist (2013-12-06 01:49:50+00:00)
Title: Since local stream is not specified with encoding, we should use Buffer directly.

Since #668, we use local file stream to send LocalFileDataPacket.
The data event of FileStream passes out a Buffer object, but since we do not specify encode when creating file stream, when the Buffer object is [called](https://github.com/ayanamist/node-mysql/blob/6b8884e1747564a5bef8dd2ab6c3233f9c8e0b2d/lib/protocol/packets/LocalDataFilePacket.js#L7) `toString()` method, any multibyte character is suffering from being splited.
So we should use `writer.writeBuffer(this.data);` instead in order to avoid such risk.