diff --git a/Makefile b/Makefile index 774dcd068..1cb50bac3 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ O0=-O0 O2=-O2 O1=-O1 O3=-O3 -mtune=native -OPTZ=$(O0) +OPTZ=$(O2) EXTRALINK=#-pg #export DEBUG export OPTZ diff --git a/lib/MySQL_Session.cpp b/lib/MySQL_Session.cpp index 86730d0f5..65bb7a1d5 100644 --- a/lib/MySQL_Session.cpp +++ b/lib/MySQL_Session.cpp @@ -146,7 +146,8 @@ void MySQL_Session::writeout() { if (mybe && mybe->server_myds && mybe->server_myds->myds_type==MYDS_BACKEND) { if (admin==false) { if (mybe->server_myds->net_failure==false) { - if (mybe->server_myds->poll_fds_idx>-1 && (mybe->server_myds->mypolls->fds[mybe->server_myds->poll_fds_idx].revents & POLLOUT)) { + //if (mybe->server_myds->poll_fds_idx>-1 && (mybe->server_myds->mypolls->fds[mybe->server_myds->poll_fds_idx].revents & POLLOUT)) { + if (mybe->server_myds->poll_fds_idx>-1) { // NOTE: attempt to force writes mybe->server_myds->array2buffer_full(); } } else { diff --git a/lib/mysql_data_stream.cpp b/lib/mysql_data_stream.cpp index e4db4579d..e642225dd 100644 --- a/lib/mysql_data_stream.cpp +++ b/lib/mysql_data_stream.cpp @@ -338,7 +338,8 @@ int MySQL_Data_Stream::write_to_net_poll() { proxy_debug(PROXY_DEBUG_NET,1,"Session=%p, DataStream=%p --\n", sess, this); if (queue_data(queueOUT)) { if ((sess->admin==false)) { - if (poll_fds_idx>-1 && (mypolls->fds[poll_fds_idx].revents & POLLOUT)) { + //if (poll_fds_idx>-1 && (mypolls->fds[poll_fds_idx].revents & POLLOUT)) { + if (poll_fds_idx>-1) { // NOTE: attempt to force writes if (net_failure==false) rc=write_to_net(); }