List:Commits« Previous MessageNext Message »
From:ahristov Date:September 10 2007 3:04pm
Subject:PHP mysqlnd svn commit: r1006 - trunk/mysqlnd
View as plain text  
Author: ahristov
Date: 2007-09-10 17:04:37 +0200 (Mon, 10 Sep 2007)
New Revision: 1006

Modified:
   trunk/mysqlnd/mysqlnd_debug.c
Log:
Less error messages


Modified: trunk/mysqlnd/mysqlnd_debug.c
===================================================================
--- trunk/mysqlnd/mysqlnd_debug.c	2007-09-10 14:59:11 UTC (rev 1005)
+++ trunk/mysqlnd/mysqlnd_debug.c	2007-09-10 15:04:37 UTC (rev 1006)
@@ -403,21 +403,24 @@
 	self->nest_level_limit = 0;
 	if (self->file_name && self->file_name !=
mysqlnd_debug_default_trace_file) {
 		efree(self->file_name);
-		self->file_name = (char *) mysqlnd_debug_default_trace_file;
+		self->file_name = NULL;
 	}
 	if (zend_hash_num_elements(&self->not_filtered_functions)) {
 		zend_hash_destroy(&self->not_filtered_functions);
 		zend_hash_init(&self->not_filtered_functions, 0, NULL, NULL, 0);
 	}
+					self->nest_level_limit = 200; /* default value for FF DBUG */
 
 	for (i = 0; i < mode_len; i++) {
 		switch (mode[i]) {
+			case 'O':
 			case 'A':
 				self->flags |= MYSQLND_DEBUG_FLUSH;
 			case 'a':
-				self->flags |= MYSQLND_DEBUG_APPEND;
 			case 'o':
-			case 'O':
+				if (mode[i] == 'a' || mode[i] == 'A') {
+					self->flags |= MYSQLND_DEBUG_APPEND;
+				}
 				if (i + 1 < mode_len && mode[i+1] == ',') {
 					unsigned int j = i + 2;
 					while (j < mode_len) {
@@ -436,9 +439,11 @@
 				state = PARSER_WAIT_COLON;
 				break;
 			case ':':
+#if 0
 				if (state != PARSER_WAIT_COLON) {
 					php_error_docref(NULL TSRMLS_CC, E_WARNING, "Consecutive semicolons at position %u",
i);
 				}
+#endif
 				state = PARSER_WAIT_MODIFIER;
 				break;
 			case 'f': /* limit output to these functions */
@@ -472,8 +477,10 @@
 					}
 					i = j;
 				} else {
+#if 0
 					php_error_docref(NULL TSRMLS_CC, E_WARNING,
 									 "Expected list of functions for '%c' found none", mode[i]);				
+#endif
 				}
 				state = PARSER_WAIT_COLON;
 				break;
@@ -545,18 +552,23 @@
 				break;
 			default:
 				if (state == PARSER_WAIT_MODIFIER) {
+#if 0
 					php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unrecognized format '%c'", mode[i]);
+#endif
 					if (i+1 < mode_len && mode[i+1] == ',') {
 						i+= 2;
 						while (i < mode_len) {
-							if (mode[i++] == ':') {
+							if (mode[i] == ':') {
 								break;
 							}
+							i++;
 						}
 					}
 					state = PARSER_WAIT_COLON;
 				} else if (state == PARSER_WAIT_COLON) {
+#if 0
 					php_error_docref(NULL TSRMLS_CC, E_WARNING, "Colon expected, '%c' found",
mode[i]);				
+#endif
 				}
 				break;
 		}

Thread
PHP mysqlnd svn commit: r1006 - trunk/mysqlndahristov10 Sep