Commit: 82a7ec72de81ed8cd27c3d043d448523cabc5a34 Author: Andrey Hristov <and...@php.net> Thu, 8 Aug 2013 13:51:55 +0200 Parents: c932d532c8d858bed66b5393cc8d7be21f26dd2e Branches: PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=82a7ec72de81ed8cd27c3d043d448523cabc5a34 Log: add some tracing Changed paths: M ext/mysqlnd/mysqlnd.c Diff: diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c index 0a856f1..b41e542 100644 --- a/ext/mysqlnd/mysqlnd.c +++ b/ext/mysqlnd/mysqlnd.c @@ -1225,6 +1225,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, reap_query)(MYSQLND_CONN_DATA * conn TSRMLS_DC #include "php_network.h" +/* {{{ mysqlnd_stream_array_to_fd_set */ MYSQLND ** mysqlnd_stream_array_check_for_readiness(MYSQLND ** conn_array TSRMLS_DC) { int cnt = 0; @@ -1255,15 +1256,17 @@ MYSQLND ** mysqlnd_stream_array_check_for_readiness(MYSQLND ** conn_array TSRMLS } return ret; } +/* }}} */ -/* {{{ stream_select mysqlnd_stream_array_to_fd_set functions */ +/* {{{ mysqlnd_stream_array_to_fd_set */ static int mysqlnd_stream_array_to_fd_set(MYSQLND ** conn_array, fd_set * fds, php_socket_t * max_fd TSRMLS_DC) { php_socket_t this_fd; php_stream *stream = NULL; - int cnt = 0; + unsigned int cnt = 0; MYSQLND **p = conn_array; + DBG_ENTER("mysqlnd_stream_array_to_fd_set"); while (*p) { /* get the fd. @@ -1272,6 +1275,7 @@ static int mysqlnd_stream_array_to_fd_set(MYSQLND ** conn_array, fd_set * fds, p * is not displayed. * */ 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) { @@ -1284,21 +1288,24 @@ static int mysqlnd_stream_array_to_fd_set(MYSQLND ** conn_array, fd_set * fds, p } p++; } - return cnt ? 1 : 0; + DBG_RETURN(cnt ? 1 : 0); } +/* }}} */ + +/* {{{ mysqlnd_stream_array_from_fd_set */ static int mysqlnd_stream_array_from_fd_set(MYSQLND ** conn_array, fd_set * fds TSRMLS_DC) { php_socket_t this_fd; php_stream *stream = NULL; int ret = 0; zend_bool disproportion = FALSE; - - MYSQLND **fwd = conn_array, **bckwd = conn_array; + DBG_ENTER("mysqlnd_stream_array_from_fd_set"); while (*fwd) { 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) { if (PHP_SAFE_FD_ISSET(this_fd, fds)) { @@ -1316,7 +1323,7 @@ static int mysqlnd_stream_array_from_fd_set(MYSQLND ** conn_array, fd_set * fds } *bckwd = NULL;/* NULL-terminate the list */ - return ret; + DBG_RETURN(ret); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php