From 5254c6f37284007efd17acedc2036a3b0f1d542e Mon Sep 17 00:00:00 2001 From: Ulf Wendel Date: Wed, 9 Sep 2009 17:03:03 +0000 Subject: Next attempt to fix http://bugs.php.net/bug.php?id=48745. Patch by Andrey. --- ext/mysqlnd/mysqlnd_result_meta.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'ext/mysqlnd/mysqlnd_result_meta.c') diff --git a/ext/mysqlnd/mysqlnd_result_meta.c b/ext/mysqlnd/mysqlnd_result_meta.c index 7a75003927..95ef93a65b 100644 --- a/ext/mysqlnd/mysqlnd_result_meta.c +++ b/ext/mysqlnd/mysqlnd_result_meta.c @@ -165,8 +165,15 @@ MYSQLND_METHOD(mysqlnd_res_meta, read_metadata)(MYSQLND_RES_METADATA * const met PACKET_FREE_ALLOCA(field_packet); DBG_RETURN(FAIL); } + if (field_packet.error_info.error_no) { + conn->error_info = field_packet.error_info; + /* Return back from CONN_QUERY_SENT */ + PACKET_FREE_ALLOCA(field_packet); + DBG_RETURN(FAIL); + } + if (field_packet.stupid_list_fields_eof == TRUE) { - meta->field_count = i + 1; + meta->field_count = i; break; } -- cgit v1.2.1