diff options
| author | Johannes Schlüter <johannes@php.net> | 2011-08-31 20:30:08 +0000 |
|---|---|---|
| committer | Johannes Schlüter <johannes@php.net> | 2011-08-31 20:30:08 +0000 |
| commit | 39b0be5126063008979a4fdb8175464cc10c1b46 (patch) | |
| tree | dd43c850988ef87224251fc03c4f5efc4c7152d3 /ext/mysqlnd/php_mysqlnd.c | |
| parent | 7953b9b39ba6a88c05359b8701dd7e855694b78f (diff) | |
| download | php-git-39b0be5126063008979a4fdb8175464cc10c1b46.tar.gz | |
- Register extensions using mysqlnd (mysql, myslqi, pdo_mysql) with mysqlnd
Diffstat (limited to 'ext/mysqlnd/php_mysqlnd.c')
| -rw-r--r-- | ext/mysqlnd/php_mysqlnd.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/ext/mysqlnd/php_mysqlnd.c b/ext/mysqlnd/php_mysqlnd.c index 5682bdeef8..2f477c6c95 100644 --- a/ext/mysqlnd/php_mysqlnd.c +++ b/ext/mysqlnd/php_mysqlnd.c @@ -133,6 +133,20 @@ mysqlnd_minfo_dump_loaded_plugins(void *pDest, void * buf TSRMLS_DC) } /* }}} */ +/* {{{ mysqlnd_minfo_dump_api_plugins */ +static int +mysqlnd_minfo_dump_api_plugins(void *pDest, void * buf TSRMLS_DC) +{ + smart_str * buffer = (smart_str *) buf; + mysqlnd_api_extension_t *ext = *(mysqlnd_api_extension_t **) pDest; + if (buffer->len) { + smart_str_appendc(buffer, ','); + } + smart_str_appends(buffer, ext->module->name); + return ZEND_HASH_APPLY_KEEP; +} +/* }}} */ + /* {{{ PHP_MINFO_FUNCTION */ @@ -165,7 +179,6 @@ PHP_MINFO_FUNCTION(mysqlnd) php_info_print_table_row(2, "Collecting memory statistics", MYSQLND_G(collect_memory_statistics)? "Yes":"No"); php_info_print_table_row(2, "Tracing", MYSQLND_G(debug)? MYSQLND_G(debug):"n/a"); - php_info_print_table_end(); /* loaded plugins */ { @@ -174,8 +187,16 @@ PHP_MINFO_FUNCTION(mysqlnd) smart_str_0(&tmp_str); php_info_print_table_row(2, "Loaded plugins", tmp_str.c); smart_str_free(&tmp_str); + + zend_hash_apply_with_argument(mysqlnd_get_api_extensions(), mysqlnd_minfo_dump_api_plugins, &tmp_str); + smart_str_0(&tmp_str); + php_info_print_table_row(2, "API Extensions", tmp_str.c); + smart_str_free(&tmp_str); } + php_info_print_table_end(); + + /* Print client stats */ mysqlnd_plugin_apply_with_argument(mysqlnd_minfo_dump_plugin_stats, NULL); } |
