List:Commits« Previous MessageNext Message »
From:ahristov Date:March 29 2007 8:45am
Subject:PHP mysqlnd svn commit: r303 - trunk/ext/mysqli/mysqlnd
View as plain text  
Author: ahristov
Date: 2007-03-29 10:45:53 +0200 (Thu, 29 Mar 2007)
New Revision: 303

Modified:
   trunk/ext/mysqli/mysqlnd/mysqlnd_wireprotocol.c
Log:
Add more info, to catch errors like we had with COM_DEBUG


Modified: trunk/ext/mysqli/mysqlnd/mysqlnd_wireprotocol.c
===================================================================
--- trunk/ext/mysqli/mysqlnd/mysqlnd_wireprotocol.c	2007-03-29 08:40:17 UTC (rev 302)
+++ trunk/ext/mysqli/mysqlnd/mysqlnd_wireprotocol.c	2007-03-29 08:45:53 UTC (rev 303)
@@ -45,6 +45,10 @@
 		if (FAIL == mysqlnd_read_header((conn), &((packet)->header) TSRMLS_CC)) {\
 			return FAIL;\
 		}\
+		if ((buf_size) < (packet)->header.size) { \
+			php_error_docref(NULL TSRMLS_CC, E_WARNING, "Packet buffer wasn't big enough" \
+							 "%u bytes will be unread", (packet)->header.size - (buf_size));\
+		}\
 		if (!mysqlnd_read_body((conn), (buf), \
 							   MIN((buf_size), (packet)->header.size) TSRMLS_CC)) { \
 			php_error(E_WARNING, "Empty %s packet body", (packet_type));\

Thread
PHP mysqlnd svn commit: r303 - trunk/ext/mysqli/mysqlndahristov29 Mar