Back to index

php5  5.3.10
Functions | Variables
php_mysqlnd.c File Reference
#include "php.h"
#include "php_ini.h"
#include "mysqlnd.h"
#include "mysqlnd_priv.h"
#include "mysqlnd_debug.h"
#include "ext/standard/info.h"

Go to the source code of this file.

Functions

PHPAPI void mysqlnd_minfo_print_hash (zval *values)
 PHP_MINFO_FUNCTION (mysqlnd)
PHPAPI ZEND_DECLARE_MODULE_GLOBALS (mysqlnd)
static PHP_INI_MH (OnUpdateNetCmdBufferSize)
static PHP_MINIT_FUNCTION (mysqlnd)
static PHP_MSHUTDOWN_FUNCTION (mysqlnd)

Variables

static zend_function_entry mysqlnd_functions []
static const zend_module_dep mysqlnd_deps []
zend_module_entry mysqlnd_module_entry

Function Documentation

PHPAPI void mysqlnd_minfo_print_hash ( zval *  values)

Definition at line 72 of file php_mysqlnd.c.

{
       zval **values_entry;
       HashPosition pos_values;

       zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(values), &pos_values);
       while (zend_hash_get_current_data_ex(Z_ARRVAL_P(values), (void **)&values_entry, &pos_values) == SUCCESS) {
              char   *string_key;
              uint   string_key_len;
              ulong  num_key;

              zend_hash_get_current_key_ex(Z_ARRVAL_P(values), &string_key, &string_key_len, &num_key, 0, &pos_values);

              convert_to_string(*values_entry);
              php_info_print_table_row(2, string_key, Z_STRVAL_PP(values_entry));

              zend_hash_move_forward_ex(Z_ARRVAL_P(values), &pos_values);
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static PHP_INI_MH ( OnUpdateNetCmdBufferSize  ) [static]

Definition at line 167 of file php_mysqlnd.c.

{
       long long_value = atol(new_value);
       if (long_value < MYSQLND_NET_CMD_BUFFER_MIN_SIZE) {
              return FAILURE;
       }
       MYSQLND_G(net_cmd_buffer_size) = long_value;

       return SUCCESS;
}
PHP_MINFO_FUNCTION ( mysqlnd  )

Definition at line 97 of file php_mysqlnd.c.

{
       char buf[32];
       zval values;

       php_info_print_table_start();
       php_info_print_table_header(2, "mysqlnd", "enabled");
       php_info_print_table_row(2, "Version", mysqlnd_get_client_info());
       php_info_print_table_row(2, "Compression",
#ifdef MYSQLND_COMPRESSION_ENABLED
                                                        "supported");
#else
                                                        "not supported");
#endif
       php_info_print_table_row(2, "SSL",
#ifdef MYSQLND_SSL_SUPPORTED
                                                        "supported");
#else
                                                        "not supported");
#endif
       snprintf(buf, sizeof(buf), "%ld", MYSQLND_G(net_cmd_buffer_size));
       php_info_print_table_row(2, "Command buffer size", buf);
       snprintf(buf, sizeof(buf), "%ld", MYSQLND_G(net_read_buffer_size));
       php_info_print_table_row(2, "Read buffer size", buf);
       snprintf(buf, sizeof(buf), "%ld", MYSQLND_G(net_read_timeout));
       php_info_print_table_row(2, "Read timeout", buf);
       php_info_print_table_row(2, "Collecting statistics", MYSQLND_G(collect_statistics)? "Yes":"No");
       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();

       /* Print client stats */
       php_info_print_table_start();
       php_info_print_table_header(2, "Client statistics", "");
       mysqlnd_get_client_stats(&values);
       mysqlnd_minfo_print_hash(&values);

       zval_dtor(&values);
       php_info_print_table_end();
}

Here is the call graph for this function:

static PHP_MINIT_FUNCTION ( mysqlnd  ) [static]

Definition at line 205 of file php_mysqlnd.c.

Here is the call graph for this function:

static PHP_MSHUTDOWN_FUNCTION ( mysqlnd  ) [static]

Definition at line 217 of file php_mysqlnd.c.

Here is the call graph for this function:

Definition at line 141 of file php_mysqlnd.c.

{
       mysqlnd_globals->collect_statistics = TRUE;
       mysqlnd_globals->collect_memory_statistics = FALSE;
       mysqlnd_globals->debug = NULL;     /* The actual string */
       mysqlnd_globals->dbg = NULL;       /* The DBG object*/
       mysqlnd_globals->net_cmd_buffer_size = MYSQLND_NET_CMD_BUFFER_MIN_SIZE;
       mysqlnd_globals->net_read_buffer_size = 32768;
       mysqlnd_globals->net_read_timeout = 31536000;
       mysqlnd_globals->log_mask = 0;
       mysqlnd_globals->mempool_default_size = 16000;
       mysqlnd_globals->debug_emalloc_fail_threshold = -1;
       mysqlnd_globals->debug_ecalloc_fail_threshold = -1;
       mysqlnd_globals->debug_erealloc_fail_threshold = -1;
       mysqlnd_globals->debug_malloc_fail_threshold = -1;
       mysqlnd_globals->debug_calloc_fail_threshold = -1;
       mysqlnd_globals->debug_realloc_fail_threshold = -1;
}

Variable Documentation

const zend_module_dep mysqlnd_deps[] [static]
Initial value:

Definition at line 267 of file php_mysqlnd.c.

Initial value:

Definition at line 33 of file php_mysqlnd.c.

zend_module_entry mysqlnd_module_entry
Initial value:

Definition at line 274 of file php_mysqlnd.c.