Back to index

php5  5.3.10
Functions
mysqlnd_result_meta.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

PHPAPI MYSQLND_RES_METADATA * mysqlnd_result_meta_init (unsigned int field_count, zend_bool persistent TSRMLS_DC)
PHPAPI struct
st_mysqlnd_res_meta_methods
mysqlnd_result_metadata_get_methods ()
PHPAPI void ** _mysqlnd_plugin_get_plugin_result_metadata_data (const MYSQLND_RES_METADATA *meta, unsigned int plugin_id TSRMLS_DC)

Function Documentation

PHPAPI void** _mysqlnd_plugin_get_plugin_result_metadata_data ( const MYSQLND_RES_METADATA *  meta,
unsigned int plugin_id  TSRMLS_DC 
)

Definition at line 514 of file mysqlnd_result_meta.c.

{
       DBG_ENTER("_mysqlnd_plugin_get_plugin_result_metadata_data");
       DBG_INF_FMT("plugin_id=%u", plugin_id);
       if (!meta || plugin_id >= mysqlnd_plugin_count()) {
              return NULL;
       }
       DBG_RETURN((void *)((char *)meta + sizeof(MYSQLND_RES_METADATA) + plugin_id * sizeof(void *)));
}

Here is the call graph for this function:

PHPAPI MYSQLND_RES_METADATA* mysqlnd_result_meta_init ( unsigned int  field_count,
zend_bool persistent  TSRMLS_DC 
)

Definition at line 471 of file mysqlnd_result_meta.c.

{
       size_t alloc_size = sizeof(MYSQLND_RES_METADATA) + mysqlnd_plugin_count() * sizeof(void *);
       MYSQLND_RES_METADATA *ret = mnd_pecalloc(1, alloc_size, persistent);
       DBG_ENTER("mysqlnd_result_meta_init");
       DBG_INF_FMT("persistent=%u", persistent);

       do {
              if (!ret) {
                     break;
              }
              ret->m = & mysqlnd_mysqlnd_res_meta_methods;

              ret->persistent = persistent;
              ret->field_count = field_count;
              /* +1 is to have empty marker at the end */
              ret->fields = mnd_pecalloc(field_count + 1, sizeof(MYSQLND_FIELD), ret->persistent);
              ret->zend_hash_keys = mnd_pecalloc(field_count, sizeof(struct mysqlnd_field_hash_key), ret->persistent);
              if (!ret->fields || !ret->zend_hash_keys) {
                     break;
              }
              DBG_INF_FMT("meta=%p", ret);
              DBG_RETURN(ret);
       } while (0);
       if (ret) {
              ret->m->free_metadata(ret TSRMLS_CC);
       }
       DBG_RETURN(NULL);
}

Here is the call graph for this function:

Definition at line 505 of file mysqlnd_result_meta.c.

{
       return &mysqlnd_mysqlnd_res_meta_methods;
}