List:Commits« Previous MessageNext Message »
From:ahristov Date:March 14 2007 4:28pm
Subject:PHP mysqlnd svn commit: r143 - trunk/ext/mysqli/mysqlnd
View as plain text  
Author: ahristov
Date: 2007-03-14 17:28:27 +0100 (Wed, 14 Mar 2007)
New Revision: 143

Modified:
   trunk/ext/mysqli/mysqlnd/mysqlnd_ps.c
Log:
Fix bug - don't update max_length, if the user
hasn't told us so with mysqlnd_stmt_attr_set


Modified: trunk/ext/mysqli/mysqlnd/mysqlnd_ps.c
===================================================================
--- trunk/ext/mysqli/mysqlnd/mysqlnd_ps.c	2007-03-14 16:19:29 UTC (rev 142)
+++ trunk/ext/mysqli/mysqlnd/mysqlnd_ps.c	2007-03-14 16:28:27 UTC (rev 143)
@@ -129,11 +129,13 @@
 		row_packet.fields = NULL;
 		row_packet.row_buffer = NULL;
 
-		for (i = 0; i < row_packet.field_count; i++) {
-			if (Z_TYPE_P(current_row[i]) >= IS_STRING) {
-				unsigned long len = Z_STRLEN_P(current_row[i]);
-				if (result->fields[i].max_length < len) {
-					result->fields[i].max_length = len;
+		if (stmt->update_max_length == TRUE) {
+			for (i = 0; i < row_packet.field_count; i++) {
+				if (Z_TYPE_P(current_row[i]) >= IS_STRING) {
+					unsigned long len = Z_STRLEN_P(current_row[i]);
+					if (result->fields[i].max_length < len) {
+						result->fields[i].max_length = len;
+					}
 				}
 			}
 		}

Thread
PHP mysqlnd svn commit: r143 - trunk/ext/mysqli/mysqlndahristov14 Mar