diff options
author | Andrey Hristov <andrey@php.net> | 2014-01-29 15:27:43 +0200 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2014-01-29 15:27:43 +0200 |
commit | 7807d7d0ce4cbb2c10e7b9d9ae6d9a86a9c43d12 (patch) | |
tree | 31d6ff1b093420139b44617ca967baad24f33a75 /ext/mysqli/mysqli_nonapi.c | |
parent | 79ab514f0c114d572b6afc1d5b2decd2d512f19e (diff) | |
download | php-git-7807d7d0ce4cbb2c10e7b9d9ae6d9a86a9c43d12.tar.gz |
Add new INI for rollbacking connections put back into the pconn pool
as well a function get the the statistics in easier way than ob_start()
and parsing phpinfo().
Diffstat (limited to 'ext/mysqli/mysqli_nonapi.c')
-rw-r--r-- | ext/mysqli/mysqli_nonapi.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c index db0352baeb..312f2806ce 100644 --- a/ext/mysqli/mysqli_nonapi.c +++ b/ext/mysqli/mysqli_nonapi.c @@ -1207,6 +1207,23 @@ PHP_FUNCTION(mysqli_release_savepoint) /* }}} */ +/* {{{ proto bool mysqli_get_links_stats() + Returns information about open and cached links */ +PHP_FUNCTION(mysqli_get_links_stats) +{ + if (ZEND_NUM_ARGS()) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "no parameters expected"); + return; + } + array_init(return_value); + add_assoc_long_ex(return_value, "total", sizeof("total"), MyG(num_links)); + add_assoc_long_ex(return_value, "active_plinks", sizeof("active_plinks"), MyG(num_active_persistent)); + add_assoc_long_ex(return_value, "cached_plinks", sizeof("cached_plinks"), MyG(num_inactive_persistent)); +} +/* }}} */ + + + /* * Local variables: * tab-width: 4 |