From: Ulf Wendel Date: Mon, 31 May 2010 13:56:42 +0000 (+0000) Subject: Updating test to reflect the latest and more verbose mysqlnd error messages, updating... X-Git-Tag: php-5.3.3RC1~96 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c0a8ce2f611ee8f7a5345c2cf8a615509b1c8643;p=php Updating test to reflect the latest and more verbose mysqlnd error messages, updating mysqlnd error message as well. --- diff --git a/ext/mysqli/tests/mysqli_poll_kill.phpt b/ext/mysqli/tests/mysqli_poll_kill.phpt index fa70f68cdb..800521aa7c 100644 --- a/ext/mysqli/tests/mysqli_poll_kill.phpt +++ b/ext/mysqli/tests/mysqli_poll_kill.phpt @@ -183,15 +183,16 @@ array(1) { %unicode|string%(1) "1" } -Warning: mysqli_reap_async_query(): RSET_HEADER % +Warning: mysqli_reap_async_query(): Premature end of data (mysqlnd_wireprotocol.c:%d) in %s on line %d -Warning: mysqli_reap_async_query(): MySQL server has gone away in %s on line %d -[014] 2014/%s +Warning: mysqli_reap_async_query(): RSET_HEADER %s -Warning: Error while sending QUERY packet. PID=%d in %s on line %d +Warning: mysqli_reap_async_query(): Error reading result set's header in %s on line %d + +Warning: Error while sending QUERY packet. %s -Warning: mysqli_reap_async_query(): MySQL server has gone away in %s on line %d +Warning: mysqli_reap_async_query(): %s Warning: mysqli_reap_async_query(): Error reading result set's header in %s on line %d -[018] Error: 2006/%s -done! +[018] Error: %d/%s +done! \ No newline at end of file diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c index af8a4a95da..2896c31280 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.c +++ b/ext/mysqlnd/mysqlnd_wireprotocol.c @@ -63,7 +63,7 @@ #define BAIL_IF_NO_MORE_DATA \ if ((size_t)(p - begin) > packet->header.size) { \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "At line %d", __LINE__); \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Premature end of data (mysqlnd_wireprotocol.c:%d)", __LINE__); \ goto premature_end; \ } \ @@ -826,7 +826,7 @@ php_mysqlnd_rset_header_read(void *_packet, MYSQLND *conn TSRMLS_DC) packet->info_or_local_file_len = len; } else { SET_OOM_ERROR(conn->error_info); - ret = FAIL; + ret = FAIL; } break; case 0x00: @@ -1026,7 +1026,7 @@ php_mysqlnd_rset_field_read(void *_packet, MYSQLND *conn TSRMLS_DC) meta->def = mnd_pemalloc(len + 1, packet->persistent_alloc); if (!meta->def) { SET_OOM_ERROR(conn->error_info); - DBG_RETURN(FAIL); + DBG_RETURN(FAIL); } memcpy(meta->def, p, len); meta->def[len] = '\0'; @@ -1038,9 +1038,9 @@ php_mysqlnd_rset_field_read(void *_packet, MYSQLND *conn TSRMLS_DC) root_ptr = meta->root = mnd_pemalloc(total_len, packet->persistent_alloc); if (!root_ptr) { SET_OOM_ERROR(conn->error_info); - DBG_RETURN(FAIL); + DBG_RETURN(FAIL); } - + meta->root_len = total_len; /* Now do allocs */ if (meta->catalog && meta->catalog != mysqlnd_empty_string) {