Lines Matching refs:meta
32 php_mysqlnd_free_field_metadata(MYSQLND_FIELD *meta, zend_bool persistent) in php_mysqlnd_free_field_metadata() argument
34 if (meta) { in php_mysqlnd_free_field_metadata()
35 if (meta->root) { in php_mysqlnd_free_field_metadata()
36 mnd_pefree(meta->root, persistent); in php_mysqlnd_free_field_metadata()
37 meta->root = NULL; in php_mysqlnd_free_field_metadata()
39 if (meta->def) { in php_mysqlnd_free_field_metadata()
40 mnd_pefree(meta->def, persistent); in php_mysqlnd_free_field_metadata()
41 meta->def = NULL; in php_mysqlnd_free_field_metadata()
43 if (meta->sname) { in php_mysqlnd_free_field_metadata()
44 zend_string_release(meta->sname); in php_mysqlnd_free_field_metadata()
52 MYSQLND_METHOD(mysqlnd_res_meta, read_metadata)(MYSQLND_RES_METADATA * const meta, MYSQLND_CONN_DAT… in MYSQLND_METHOD()
64 field_packet->persistent_alloc = meta->persistent; in MYSQLND_METHOD()
65 for (;i < meta->field_count; i++) { in MYSQLND_METHOD()
68 if (meta->fields[i].root) { in MYSQLND_METHOD()
70 mnd_pefree(meta->fields[i].root, meta->persistent); in MYSQLND_METHOD()
71 meta->fields[i].root = NULL; in MYSQLND_METHOD()
74 field_packet->metadata = &(meta->fields[i]); in MYSQLND_METHOD()
87 meta->field_count = i; in MYSQLND_METHOD()
91 if (mysqlnd_ps_fetch_functions[meta->fields[i].type].func == NULL) { in MYSQLND_METHOD()
93 meta->fields[i].type); in MYSQLND_METHOD()
97 meta->fields[i].type); in MYSQLND_METHOD()
101 if (meta->fields[i].type == MYSQL_TYPE_BIT) { in MYSQLND_METHOD()
104 ++meta->bit_fields_count; in MYSQLND_METHOD()
106 field_len = meta->fields[i].length / 8; in MYSQLND_METHOD()
111 if (meta->fields[i].length % 8) { in MYSQLND_METHOD()
119 meta->bit_fields_total_len += 20;/* 21 digis, no sign*/ in MYSQLND_METHOD()
122 meta->bit_fields_total_len += 10;/* 2 000 000 000*/ in MYSQLND_METHOD()
125 meta->bit_fields_total_len += 8;/* 12 000 000*/ in MYSQLND_METHOD()
128 meta->bit_fields_total_len += 5;/* 32 500 */ in MYSQLND_METHOD()
131 meta->bit_fields_total_len += 3;/* 120 */ in MYSQLND_METHOD()
137 …if ((meta->zend_hash_keys[i].is_numeric = ZEND_HANDLE_NUMERIC(field_packet->metadata->sname, idx))… in MYSQLND_METHOD()
138 meta->zend_hash_keys[i].key = idx; in MYSQLND_METHOD()
150 MYSQLND_METHOD(mysqlnd_res_meta, free)(MYSQLND_RES_METADATA * meta) in MYSQLND_METHOD()
155 DBG_INF_FMT("persistent=%u", meta->persistent); in MYSQLND_METHOD()
157 if ((fields = meta->fields)) { in MYSQLND_METHOD()
159 i = meta->field_count; in MYSQLND_METHOD()
161 php_mysqlnd_free_field_metadata(fields++, meta->persistent); in MYSQLND_METHOD()
163 mnd_pefree(meta->fields, meta->persistent); in MYSQLND_METHOD()
164 meta->fields = NULL; in MYSQLND_METHOD()
167 if (meta->zend_hash_keys) { in MYSQLND_METHOD()
169 mnd_pefree(meta->zend_hash_keys, meta->persistent); in MYSQLND_METHOD()
170 meta->zend_hash_keys = NULL; in MYSQLND_METHOD()
173 mnd_pefree(meta, meta->persistent); in MYSQLND_METHOD()
182 MYSQLND_METHOD(mysqlnd_res_meta, clone_metadata)(const MYSQLND_RES_METADATA * const meta, zend_bool… in MYSQLND_METHOD()
188 MYSQLND_FIELD * orig_fields = meta->fields; in MYSQLND_METHOD()
189 size_t len = meta->field_count * sizeof(struct mysqlnd_field_hash_key); in MYSQLND_METHOD()
199 new_meta->m = meta->m; in MYSQLND_METHOD()
201 new_fields = mnd_pecalloc(meta->field_count + 1, sizeof(MYSQLND_FIELD), persistent); in MYSQLND_METHOD()
210 memcpy(new_meta->zend_hash_keys, meta->zend_hash_keys, len); in MYSQLND_METHOD()
216 memcpy(new_fields, orig_fields, (meta->field_count) * sizeof(MYSQLND_FIELD)); in MYSQLND_METHOD()
217 for (i = 0; i < meta->field_count; i++) { in MYSQLND_METHOD()
262 new_meta->field_count = meta->field_count; in MYSQLND_METHOD()
279 MYSQLND_METHOD(mysqlnd_res_meta, fetch_field)(MYSQLND_RES_METADATA * const meta) in MYSQLND_METHOD()
282 if (meta->current_field >= meta->field_count) { in MYSQLND_METHOD()
287 meta->fields[meta->current_field].name? meta->fields[meta->current_field].name:"", in MYSQLND_METHOD()
288 meta->fields[meta->current_field].max_length); in MYSQLND_METHOD()
289 DBG_RETURN(&meta->fields[meta->current_field++]); in MYSQLND_METHOD()
296 MYSQLND_METHOD(mysqlnd_res_meta, fetch_field_direct)(const MYSQLND_RES_METADATA * const meta, const… in MYSQLND_METHOD()
301 meta->fields[meta->current_field].name? meta->fields[meta->current_field].name:"", in MYSQLND_METHOD()
302 meta->fields[meta->current_field].max_length); in MYSQLND_METHOD()
303 DBG_RETURN(&meta->fields[fieldnr]); in MYSQLND_METHOD()
310 MYSQLND_METHOD(mysqlnd_res_meta, fetch_fields)(MYSQLND_RES_METADATA * const meta) in MYSQLND_METHOD()
313 DBG_RETURN(meta->fields); in MYSQLND_METHOD()
320 MYSQLND_METHOD(mysqlnd_res_meta, field_tell)(const MYSQLND_RES_METADATA * const meta) in MYSQLND_METHOD()
322 return meta->current_field; in MYSQLND_METHOD()
329 MYSQLND_METHOD(mysqlnd_res_meta, field_seek)(MYSQLND_RES_METADATA * const meta, const MYSQLND_FIELD… in MYSQLND_METHOD()
333 return_value = meta->current_field; in MYSQLND_METHOD()
334 meta->current_field = field_offset; in MYSQLND_METHOD()
397 _mysqlnd_plugin_get_plugin_result_metadata_data(const MYSQLND_RES_METADATA * meta, unsigned int plu… in _mysqlnd_plugin_get_plugin_result_metadata_data() argument
401 if (!meta || plugin_id >= mysqlnd_plugin_count()) { in _mysqlnd_plugin_get_plugin_result_metadata_data()
404 DBG_RETURN((void *)((char *)meta + sizeof(MYSQLND_RES_METADATA) + plugin_id * sizeof(void *))); in _mysqlnd_plugin_get_plugin_result_metadata_data()