sidorares/node-mysql2 — pull request #91 by eugeneware (2014-04-09 15:44:11+00:00)
Title: Adds the XidEvent to binlog, and handles non-blocking stream ends

The XidEvent (type=16) is currently not handled This PR adds support for it.

When you create a non-blocking binlog stream, the stream currently ends and
throw errors. This PR fixes this by closing the stream gracefully.

Eg:

``` js
var binlogStream = conn.createBinlogStream({
serverId: 3,
masterId: 1,
filename: 'mysql-bin.000002',
binlogPos: 958,
flags: 1, // 1 = "non-blocking mode"
});

// will throw an error as the stream ends
binlogStream.on('data', console.log);
```