Lines Matching refs:meta
33 php_mysqlnd_free_field_metadata(MYSQLND_FIELD *meta, zend_bool persistent) in php_mysqlnd_free_field_metadata() argument
35 if (meta) { in php_mysqlnd_free_field_metadata()
36 if (meta->root) { in php_mysqlnd_free_field_metadata()
37 mnd_pefree(meta->root, persistent); in php_mysqlnd_free_field_metadata()
38 meta->root = NULL; in php_mysqlnd_free_field_metadata()
40 if (meta->def) { in php_mysqlnd_free_field_metadata()
41 mnd_pefree(meta->def, persistent); in php_mysqlnd_free_field_metadata()
42 meta->def = NULL; in php_mysqlnd_free_field_metadata()
44 if (meta->sname) { in php_mysqlnd_free_field_metadata()
45 zend_string_release(meta->sname); in php_mysqlnd_free_field_metadata()
53 MYSQLND_METHOD(mysqlnd_res_meta, read_metadata)(MYSQLND_RES_METADATA * const meta, MYSQLND_CONN_DAT… in MYSQLND_METHOD()
65 field_packet->persistent_alloc = meta->persistent; in MYSQLND_METHOD()
66 for (;i < meta->field_count; i++) { in MYSQLND_METHOD()
69 if (meta->fields[i].root) { in MYSQLND_METHOD()
71 mnd_pefree(meta->fields[i].root, meta->persistent); in MYSQLND_METHOD()
72 meta->fields[i].root = NULL; in MYSQLND_METHOD()
75 field_packet->metadata = &(meta->fields[i]); in MYSQLND_METHOD()
87 if (mysqlnd_ps_fetch_functions[meta->fields[i].type].func == NULL) { in MYSQLND_METHOD()
88 …DBG_ERR_FMT("Unknown type %u sent by the server. Please send a report to the developers", meta->f… in MYSQLND_METHOD()
89 …Unknown type %u sent by the server. Please send a report to the developers", meta->fields[i].type); in MYSQLND_METHOD()
95 …if ((meta->zend_hash_keys[i].is_numeric = ZEND_HANDLE_NUMERIC(field_packet->metadata->sname, idx))… in MYSQLND_METHOD()
96 meta->zend_hash_keys[i].key = idx; in MYSQLND_METHOD()
108 MYSQLND_METHOD(mysqlnd_res_meta, free)(MYSQLND_RES_METADATA * meta) in MYSQLND_METHOD()
113 DBG_INF_FMT("persistent=%u", meta->persistent); in MYSQLND_METHOD()
115 if ((fields = meta->fields)) { in MYSQLND_METHOD()
117 i = meta->field_count; in MYSQLND_METHOD()
119 php_mysqlnd_free_field_metadata(fields++, meta->persistent); in MYSQLND_METHOD()
121 mnd_pefree(meta->fields, meta->persistent); in MYSQLND_METHOD()
122 meta->fields = NULL; in MYSQLND_METHOD()
125 if (meta->zend_hash_keys) { in MYSQLND_METHOD()
127 mnd_pefree(meta->zend_hash_keys, meta->persistent); in MYSQLND_METHOD()
128 meta->zend_hash_keys = NULL; in MYSQLND_METHOD()
131 mnd_pefree(meta, meta->persistent); in MYSQLND_METHOD()
140 MYSQLND_METHOD(mysqlnd_res_meta, clone_metadata)(const MYSQLND_RES_METADATA * const meta, const zen… in MYSQLND_METHOD()
146 MYSQLND_FIELD * orig_fields = meta->fields; in MYSQLND_METHOD()
147 size_t len = meta->field_count * sizeof(struct mysqlnd_field_hash_key); in MYSQLND_METHOD()
157 new_meta->m = meta->m; in MYSQLND_METHOD()
159 new_fields = mnd_pecalloc(meta->field_count + 1, sizeof(MYSQLND_FIELD), persistent); in MYSQLND_METHOD()
168 memcpy(new_meta->zend_hash_keys, meta->zend_hash_keys, len); in MYSQLND_METHOD()
174 memcpy(new_fields, orig_fields, (meta->field_count) * sizeof(MYSQLND_FIELD)); in MYSQLND_METHOD()
175 for (i = 0; i < meta->field_count; i++) { in MYSQLND_METHOD()
220 new_meta->field_count = meta->field_count; in MYSQLND_METHOD()
237 MYSQLND_METHOD(mysqlnd_res_meta, fetch_field)(MYSQLND_RES_METADATA * const meta) in MYSQLND_METHOD()
240 if (meta->current_field >= meta->field_count) { in MYSQLND_METHOD()
245 meta->fields[meta->current_field].name? meta->fields[meta->current_field].name:"", in MYSQLND_METHOD()
246 meta->fields[meta->current_field].max_length); in MYSQLND_METHOD()
247 DBG_RETURN(&meta->fields[meta->current_field++]); in MYSQLND_METHOD()
254 MYSQLND_METHOD(mysqlnd_res_meta, fetch_field_direct)(const MYSQLND_RES_METADATA * const meta, const… in MYSQLND_METHOD()
259 meta->fields[meta->current_field].name? meta->fields[meta->current_field].name:"", in MYSQLND_METHOD()
260 meta->fields[meta->current_field].max_length); in MYSQLND_METHOD()
261 DBG_RETURN(&meta->fields[fieldnr]); in MYSQLND_METHOD()
268 MYSQLND_METHOD(mysqlnd_res_meta, fetch_fields)(MYSQLND_RES_METADATA * const meta) in MYSQLND_METHOD()
271 DBG_RETURN(meta->fields); in MYSQLND_METHOD()
278 MYSQLND_METHOD(mysqlnd_res_meta, field_tell)(const MYSQLND_RES_METADATA * const meta) in MYSQLND_METHOD()
280 return meta->current_field; in MYSQLND_METHOD()
287 MYSQLND_METHOD(mysqlnd_res_meta, field_seek)(MYSQLND_RES_METADATA * const meta, const MYSQLND_FIELD… in MYSQLND_METHOD()
291 return_value = meta->current_field; in MYSQLND_METHOD()
292 meta->current_field = field_offset; in MYSQLND_METHOD()
355 _mysqlnd_plugin_get_plugin_result_metadata_data(const MYSQLND_RES_METADATA * meta, unsigned int plu… in _mysqlnd_plugin_get_plugin_result_metadata_data() argument
359 if (!meta || plugin_id >= mysqlnd_plugin_count()) { in _mysqlnd_plugin_get_plugin_result_metadata_data()
362 DBG_RETURN((void *)((char *)meta + sizeof(MYSQLND_RES_METADATA) + plugin_id * sizeof(void *))); in _mysqlnd_plugin_get_plugin_result_metadata_data()