php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #66370
Patch mysqlnd-errno-error-fix.patch revision 2013-12-31 03:24 UTC by bugs dot php dot net at ss dot chernousov dot net

Patch mysqlnd-errno-error-fix.patch for MySQLi related Bug #66370

Patch version 2013-12-31 03:24 UTC

Return to Bug #66370 | Download this patch
Patch Revisions:

Developer: bugs.php.net@ss.chernousov.net

diff -rup php-5.5.7/ext/mysqlnd/mysqlnd_result.c php-5.5.7-mysqlnd-errno-error-fix/ext/mysqlnd/mysqlnd_result.c
--- php-5.5.7/ext/mysqlnd/mysqlnd_result.c	2013-12-10 18:31:06.000000000 -0500
+++ php-5.5.7-mysqlnd-errno-error-fix/ext/mysqlnd/mysqlnd_result.c	2013-12-30 22:03:17.981061250 -0500
@@ -1200,7 +1200,7 @@ MYSQLND_METHOD(mysqlnd_res, store_result
 	}
 
 	if (ret == FAIL) {
-		COPY_CLIENT_ERROR(set->error_info, row_packet->error_info);
+		COPY_CLIENT_ERROR(set->error_info, *conn->error_info);
 	} else {
 		/* Position at the first row */
 		set->data_cursor = set->data;
diff -rup php-5.5.7/ext/mysqlnd/mysqlnd_wireprotocol.c php-5.5.7-mysqlnd-errno-error-fix/ext/mysqlnd/mysqlnd_wireprotocol.c
--- php-5.5.7/ext/mysqlnd/mysqlnd_wireprotocol.c	2013-12-10 18:31:06.000000000 -0500
+++ php-5.5.7-mysqlnd-errno-error-fix/ext/mysqlnd/mysqlnd_wireprotocol.c	2013-12-30 22:01:59.771673000 -0500
@@ -1455,6 +1455,7 @@ php_mysqlnd_read_row_ex(MYSQLND_CONN_DAT
 		}
 
 		if (PASS != (ret = conn->net->data->m.receive_ex(conn->net, p, header.size, conn->stats, conn->error_info TSRMLS_CC))) {
+			SET_CLIENT_ERROR(*conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone);
 			DBG_ERR("Empty row packet body");
 			php_error(E_WARNING, "Empty row packet body");
 			break;
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 19 16:01:28 2024 UTC