diff options
Diffstat (limited to 'ext/mysqlnd/mysqlnd_result_meta.c')
-rw-r--r-- | ext/mysqlnd/mysqlnd_result_meta.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/ext/mysqlnd/mysqlnd_result_meta.c b/ext/mysqlnd/mysqlnd_result_meta.c index 49954ead86..3934edd03e 100644 --- a/ext/mysqlnd/mysqlnd_result_meta.c +++ b/ext/mysqlnd/mysqlnd_result_meta.c @@ -14,12 +14,13 @@ +----------------------------------------------------------------------+ | Authors: Andrey Hristov <andrey@php.net> | | Ulf Wendel <uw@php.net> | - | Georg Richter <georg@php.net> | +----------------------------------------------------------------------+ */ #include "php.h" #include "mysqlnd.h" +#include "mysqlnd_connection.h" +#include "mysqlnd_ps.h" #include "mysqlnd_priv.h" #include "mysqlnd_result.h" #include "mysqlnd_wireprotocol.h" @@ -56,9 +57,9 @@ MYSQLND_METHOD(mysqlnd_res_meta, read_metadata)(MYSQLND_RES_METADATA * const met DBG_ENTER("mysqlnd_res_meta::read_metadata"); - field_packet = conn->protocol->m.get_result_field_packet(conn->protocol, FALSE); + field_packet = conn->payload_decoder_factory->m.get_result_field_packet(conn->payload_decoder_factory, FALSE); if (!field_packet) { - SET_OOM_ERROR(*conn->error_info); + SET_OOM_ERROR(conn->error_info); DBG_RETURN(FAIL); } field_packet->persistent_alloc = meta->persistent; @@ -72,29 +73,20 @@ MYSQLND_METHOD(mysqlnd_res_meta, read_metadata)(MYSQLND_RES_METADATA * const met } field_packet->metadata = &(meta->fields[i]); - if (FAIL == PACKET_READ(field_packet, conn)) { + if (FAIL == PACKET_READ(field_packet)) { PACKET_FREE(field_packet); DBG_RETURN(FAIL); } if (field_packet->error_info.error_no) { - COPY_CLIENT_ERROR(*conn->error_info, field_packet->error_info); + COPY_CLIENT_ERROR(conn->error_info, field_packet->error_info); /* Return back from CONN_QUERY_SENT */ PACKET_FREE(field_packet); DBG_RETURN(FAIL); } - if (field_packet->stupid_list_fields_eof == TRUE) { - meta->field_count = i; - break; - } - if (mysqlnd_ps_fetch_functions[meta->fields[i].type].func == NULL) { - DBG_ERR_FMT("Unknown type %u sent by the server. Please send a report to the developers", - meta->fields[i].type); - php_error_docref(NULL, E_WARNING, - "Unknown type %u sent by the server. " - "Please send a report to the developers", - meta->fields[i].type); + DBG_ERR_FMT("Unknown type %u sent by the server. Please send a report to the developers", meta->fields[i].type); + php_error_docref(NULL, E_WARNING, "Unknown type %u sent by the server. Please send a report to the developers", meta->fields[i].type); PACKET_FREE(field_packet); DBG_RETURN(FAIL); } @@ -179,7 +171,7 @@ MYSQLND_METHOD(mysqlnd_res_meta, free)(MYSQLND_RES_METADATA * meta) /* {{{ mysqlnd_res::clone_metadata */ static MYSQLND_RES_METADATA * -MYSQLND_METHOD(mysqlnd_res_meta, clone_metadata)(const MYSQLND_RES_METADATA * const meta, zend_bool persistent) +MYSQLND_METHOD(mysqlnd_res_meta, clone_metadata)(const MYSQLND_RES_METADATA * const meta, const zend_bool persistent) { unsigned int i; /* +1 is to have empty marker at the end */ |