-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Connection may be stalled when LOAD DATA LOCAL INFILE #696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
My solution is hooking the write method of the socket. var _write = conn._socket.write;
if (!_write.__hooked) {
conn._socket.write = function () {
var ret = _write.apply(conn._socket, arguments);
if (!ret && !conn._socket.bufferSize) {
ret = true;
}
return ret;
};
conn._socket.write.__hooked = true;
} May be ugly, but it temporarily solves my problem. |
I see this has been fixed in node.js 0.10.25. If you want me to patch this module somehow to not do it in older versions, give me a patch that is more specific than just monkey patching the write method on the entire connection socket. |
@dougwilson Since this bug does not only affects node-mysql but all socket operations, there is no such more specific patch. |
What I mean is, I can simply use |
@dougwilson I opened this issue just for informing new arrivals about this bug. I myself does not need to write ugly Node.js codes any more. |
No problem. I think we can assume people will just use the most recent version of node.js 0.10 these days, which is what the core team recommends anyhow.
:D |
* Drop support for Go 1.6 and lower * Remove cloneTLSConfig for legacy Go versions
Since local file is reading from a stream and may got large block, it may make the connection stalled according to this node.js issue nodejs/node-v0.x-archive#6506 .
The text was updated successfully, but these errors were encountered: