diff options
Diffstat (limited to 'ext/mysqlnd')
-rw-r--r-- | ext/mysqlnd/mysqlnd.c | 4 | ||||
-rw-r--r-- | ext/mysqlnd/mysqlnd.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c index 41f34e366a..08a10dbbd1 100644 --- a/ext/mysqlnd/mysqlnd.c +++ b/ext/mysqlnd/mysqlnd.c @@ -1306,7 +1306,7 @@ static int mysqlnd_stream_array_to_fd_set(MYSQLND ** conn_array, fd_set * fds, p stream = (*p)->data->net->data->m.get_stream((*p)->data->net TSRMLS_CC); DBG_INF_FMT("conn=%llu stream=%p", (*p)->data->thread_id, stream); if (stream != NULL && SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL, - (void*)&this_fd, 1) && this_fd >= 0) { + (void*)&this_fd, 1) && ZEND_VALID_SOCKET(this_fd)) { PHP_SAFE_FD_SET(this_fd, fds); @@ -1336,7 +1336,7 @@ static int mysqlnd_stream_array_from_fd_set(MYSQLND ** conn_array, fd_set * fds stream = (*fwd)->data->net->data->m.get_stream((*fwd)->data->net TSRMLS_CC); DBG_INF_FMT("conn=%llu stream=%p", (*fwd)->data->thread_id, stream); if (stream != NULL && SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL, - (void*)&this_fd, 1) && this_fd >= 0) { + (void*)&this_fd, 1) && ZEND_VALID_SOCKET(this_fd)) { if (PHP_SAFE_FD_ISSET(this_fd, fds)) { if (disproportion) { *bckwd = *fwd; diff --git a/ext/mysqlnd/mysqlnd.h b/ext/mysqlnd/mysqlnd.h index 1a23781eb0..aab977d24c 100644 --- a/ext/mysqlnd/mysqlnd.h +++ b/ext/mysqlnd/mysqlnd.h @@ -29,7 +29,7 @@ #define MYSQLND_STRING_TO_INT_CONVERSION /* - This force mysqlnd to do a single (or more depending on ammount of data) + This force mysqlnd to do a single (or more depending on amount of data) non-blocking read() calls before sending a command to the server. Useful for debugging, if previous function hasn't consumed all the output sent to it - like stmt_send_long_data() error because the data was larger that |