|
|
|
|
@ -2850,12 +2850,14 @@ MySQL_Session * MySQL_Thread::create_new_session_and_client_data_stream(int _fd)
|
|
|
|
|
int prevflags = fcntl(_fd, F_GETFL, 0);
|
|
|
|
|
if (prevflags == -1) {
|
|
|
|
|
proxy_error("For FD %d fcntl() returned -1 errno %d\n", _fd, errno);
|
|
|
|
|
assert (prevflags != -1);
|
|
|
|
|
if (shutdown == 0)
|
|
|
|
|
assert (prevflags != -1);
|
|
|
|
|
}
|
|
|
|
|
int nb = fcntl(_fd, F_SETFL, prevflags | O_NONBLOCK);
|
|
|
|
|
if (nb == -1) {
|
|
|
|
|
proxy_error("For FD %d fcntl() returned -1 , previous flags %d , errno %d\n", _fd, prevflags, errno);
|
|
|
|
|
assert (nb != -1);
|
|
|
|
|
if (shutdown == 0)
|
|
|
|
|
assert (nb != -1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
setsockopt(sess->client_myds->fd, IPPROTO_TCP, TCP_NODELAY, (char *) &arg_on, sizeof(arg_on));
|
|
|
|
|
|