andrey                                   Thu, 23 Sep 2010 16:03:22 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=303734

Log:
WS fixes

Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_block_alloc.c
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_charset.c
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.c
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_loaddata.c
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps_codec.c
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result_meta.c
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_statistics.c
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_statistics.h
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd.c
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd_block_alloc.c
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd_charset.c
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd_debug.c
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd_loaddata.c
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd_ps.c
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd_ps_codec.c
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd_result_meta.c
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd_statistics.c
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd_statistics.h
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd_wireprotocol.c

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c	2010-09-23 15:12:19 UTC (rev 303733)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c	2010-09-23 16:03:22 UTC (rev 303734)
@@ -282,7 +282,7 @@
 			MYSQLND_PACKET_EOF * ok_response = conn->protocol->m.get_eof_packet(conn->protocol, FALSE TSRMLS_CC);
 			if (!ok_response) {
 				SET_OOM_ERROR(conn->error_info);
-				break;
+				break;
 			}
 			if (FAIL == (ret = PACKET_READ(ok_response, conn))) {
 				SET_CLIENT_ERROR(conn->error_info, CR_MALFORMED_PACKET, UNKNOWN_SQLSTATE,
@@ -479,7 +479,7 @@
 		goto err;
 	}
 	memcpy(auth_packet->server_scramble_buf, greet_packet->scramble_buf, SCRAMBLE_LENGTH);
-
+
 	if (!PACKET_WRITE(auth_packet, conn)) {
 		CONN_SET_STATE(conn, CONN_QUIT_SENT);
 		SET_CLIENT_ERROR(conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone);
@@ -496,7 +496,7 @@
 		if (FAIL == conn->net->m.enable_ssl(conn->net TSRMLS_CC)) {
 			goto err;
 		}
-
+
 		auth_packet->send_half_packet = FALSE;
 		if (!PACKET_WRITE(auth_packet, conn)) {
 			CONN_SET_STATE(conn, CONN_QUIT_SENT);
@@ -1173,11 +1173,11 @@
 									   FALSE, TRUE TSRMLS_CC)) {
 		DBG_RETURN(NULL);
 	}
-
+
 	/*
 	   Prepare for the worst case.
 	   MyISAM goes to 2500 BIT columns, double it for safety.
-	 */
+	*/
 	result = conn->m->result_init(5000, conn->persistent TSRMLS_CC);
 	if (!result) {
 		DBG_RETURN(NULL);
@@ -1937,7 +1937,7 @@
 		int2store(p, conn->charset->nr);
 		p+=2;
 	}
-
+
 	if (PASS != conn->m->simple_command(conn, COM_CHANGE_USER, buffer, p - buffer,
 									   PROT_LAST /* we will handle the OK packet*/,
 									   silent, TRUE TSRMLS_CC)) {
@@ -1993,7 +1993,7 @@
 	} else if (ret == FAIL && chg_user_resp->server_asked_323_auth == TRUE) {
 		/* old authentication with new server  !*/
 		DBG_ERR(mysqlnd_old_passwd);
-		SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, mysqlnd_old_passwd);
+		SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, mysqlnd_old_passwd);
 	}
 end:
 	PACKET_FREE(chg_user_resp);
@@ -2165,7 +2165,7 @@
 		conn->current_result->m.free_result(conn->current_result, TRUE TSRMLS_CC);
 	}
 	conn->current_result = NULL;
-
+
 	DBG_RETURN(result);
 }
 /* }}} */
@@ -2196,7 +2196,7 @@

 	result = conn->current_result->m.store_result(conn->current_result, conn, FALSE TSRMLS_CC);
 	if (!result) {
-		conn->current_result->m.free_result(conn->current_result, TRUE TSRMLS_CC);
+		conn->current_result->m.free_result(conn->current_result, TRUE TSRMLS_CC);
 	}
 	conn->current_result = NULL;
 	DBG_RETURN(result);

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_block_alloc.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_block_alloc.c	2010-09-23 15:12:19 UTC (rev 303733)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_block_alloc.c	2010-09-23 16:03:22 UTC (rev 303734)
@@ -104,7 +104,6 @@
 			DBG_RETURN(FAIL);
 		}
 		chunk->ptr = new_ptr;
-
 	}
 	DBG_RETURN(PASS);
 }

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_charset.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_charset.c	2010-09-23 15:12:19 UTC (rev 303733)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_charset.c	2010-09-23 16:03:22 UTC (rev 303734)
@@ -399,7 +399,7 @@
 	if (start + 2 > end) {
 		return 0;
 	}
-
+
 	if (UTF16_HIGH_HEAD(*start)) {
 		return (start + 4 <= end) && UTF16_LOW_HEAD(start[2]) ? 4 : 0;
 	}

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.c	2010-09-23 15:12:19 UTC (rev 303733)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.c	2010-09-23 16:03:22 UTC (rev 303734)
@@ -617,7 +617,7 @@

 	ret->m = & mysqlnd_mysqlnd_debug_methods;
 	ret->skip_functions = skip_functions;
-
+
 	return ret;
 }
 /* }}} */
@@ -634,7 +634,7 @@
 			return;
 		}
 	}
-
+
 	dbg->m->close(dbg);
 	dbg->m->set_mode(dbg, mode);
 	while (zend_stack_count(&dbg->call_stack)) {
@@ -650,7 +650,7 @@
 #define __zend_filename "/unknown/unknown"
 #define __zend_lineno   0
 #endif
-
+
 #define REAL_SIZE(s) (collect_memory_statistics? (s) + sizeof(size_t) : (s))
 #define REAL_PTR(p) (collect_memory_statistics && (p)? (((char *)(p)) - sizeof(size_t)) : (p))
 #define FAKE_PTR(p) (collect_memory_statistics && (p)? (((char *)(p)) + sizeof(size_t)) : (p))

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_loaddata.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_loaddata.c	2010-09-23 15:12:19 UTC (rev 303733)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_loaddata.c	2010-09-23 16:03:22 UTC (rev 303734)
@@ -57,7 +57,7 @@
 	if (!info) {
 		DBG_RETURN(1);
 	}
-
+
 	*ptr = info;

 	/* check open_basedir */

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c	2010-09-23 15:12:19 UTC (rev 303733)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c	2010-09-23 16:03:22 UTC (rev 303734)
@@ -175,7 +175,7 @@
 		}

 		if ((result = result->m.store_result(result, conn, TRUE TSRMLS_CC))) {
-			stmt->upsert_status.affected_rows = result->stored_data->row_count;
+			stmt->upsert_status.affected_rows = result->stored_data->row_count;
 			stmt->state = MYSQLND_STMT_PREPARED;
 			result->type = MYSQLND_RES_PS_BUF;
 		} else {
@@ -290,7 +290,7 @@
 	if (!prepare_resp) {
 		SET_OOM_ERROR(stmt->error_info);
 		SET_OOM_ERROR(stmt->conn->error_info);
-		goto done;
+		goto done;
 	}

 	if (FAIL == PACKET_READ(prepare_resp, stmt->conn)) {
@@ -579,7 +579,7 @@

 	SET_ERROR_AFF_ROWS(stmt);
 	SET_ERROR_AFF_ROWS(stmt->conn);
-
+
 	if (stmt->result && stmt->state >= MYSQLND_STMT_PREPARED && stmt->field_count) {
 		/*
 		  We don need to copy the data from the buffers which we will clean.
@@ -911,7 +911,7 @@
 			stmt->error_info = row_packet->error_info;
 		}
 		CONN_SET_STATE(result->conn, CONN_READY);
-		result->unbuf->eof_reached = TRUE; /* so next time we won't get an error */
+		result->unbuf->eof_reached = TRUE; /* so next time we won't get an error */
 	} else if (row_packet->eof) {
 		DBG_INF("EOF");
 		/* Mark the connection as usable again */
@@ -1265,7 +1265,7 @@
 	MYSQLND * conn;
 	zend_uchar *cmd_buf;
 	enum php_mysqlnd_server_command cmd = COM_STMT_SEND_LONG_DATA;
-
+
 	DBG_ENTER("mysqlnd_stmt::send_long_data");
 	if (!stmt || !stmt->conn) {
 		DBG_RETURN(FAIL);
@@ -1320,16 +1320,15 @@
 			memcpy(cmd_buf + STMT_ID_LENGTH + 2, data, length);

 			/* COM_STMT_SEND_LONG_DATA doesn't send an OK packet*/
-			ret = conn->m->simple_command(conn, cmd, (char *)cmd_buf, packet_len,
-										 PROT_LAST , FALSE, TRUE TSRMLS_CC);
+			ret = conn->m->simple_command(conn, cmd, (char *)cmd_buf, packet_len, PROT_LAST , FALSE, TRUE TSRMLS_CC);
 			mnd_efree(cmd_buf);
 			if (FAIL == ret) {
 				stmt->error_info = conn->error_info;
 			}
 		} else {
 			ret = FAIL;
-			SET_OOM_ERROR(stmt->error_info);
-			SET_OOM_ERROR(conn->error_info);
+			SET_OOM_ERROR(stmt->error_info);
+			SET_OOM_ERROR(conn->error_info);
 		}
 		/*
 		  Cover protocol error: COM_STMT_SEND_LONG_DATA was designed to be quick and not
@@ -1474,7 +1473,7 @@
 				DBG_RETURN(FAIL);
 			}
 		}
-
+
 		/* Prevent from freeing */
 		/* Don't update is_ref, or we will leak during conversion */
 		Z_ADDREF_P(zv);
@@ -1489,7 +1488,7 @@
 		}
 		stmt->param_bind[param_no].zv = zv;
 		stmt->param_bind[param_no].type = type;
-
+
 		stmt->send_types_to_server = 1;
 	}
 	DBG_INF("PASS");
@@ -1812,7 +1811,7 @@
 	if (result) {
 		result->m.free_result(result, TRUE TSRMLS_CC);
 	}
-	DBG_RETURN(NULL);
+	DBG_RETURN(NULL);
 }
 /* }}} */

@@ -2367,7 +2366,7 @@

 		DBG_RETURN(ret);
 	} while (0);
-
+
 	SET_OOM_ERROR(conn->error_info);
 	if (ret) {
 		ret->m->dtor(ret, TRUE TSRMLS_CC);

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps_codec.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps_codec.c	2010-09-23 15:12:19 UTC (rev 303733)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps_codec.c	2010-09-23 16:03:22 UTC (rev 303734)
@@ -482,7 +482,7 @@
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_DOUBLE].pack_len	= 8;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_DOUBLE].php_type	= IS_DOUBLE;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_DOUBLE].can_ret_as_str_in_uni	= TRUE;
-
+
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_TIME].func		= ps_fetch_time;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_TIME].pack_len	= MYSQLND_PS_SKIP_RESULT_W_LEN;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_TIME].php_type	= IS_STRING;
@@ -497,7 +497,7 @@
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].pack_len	= MYSQLND_PS_SKIP_RESULT_W_LEN;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].php_type	= IS_STRING;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].can_ret_as_str_in_uni	= TRUE;
-
+
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_DATETIME].func	= ps_fetch_datetime;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_DATETIME].pack_len= MYSQLND_PS_SKIP_RESULT_W_LEN;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_DATETIME].php_type= IS_STRING;
@@ -507,7 +507,7 @@
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_TIMESTAMP].pack_len= MYSQLND_PS_SKIP_RESULT_W_LEN;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_TIMESTAMP].php_type= IS_STRING;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_TIMESTAMP].can_ret_as_str_in_uni	= TRUE;
-
+
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_TINY_BLOB].func	= ps_fetch_string;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_TINY_BLOB].pack_len= MYSQLND_PS_SKIP_RESULT_STR;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_TINY_BLOB].php_type = IS_STRING;
@@ -519,7 +519,7 @@
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_BLOB].php_type	= IS_STRING;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_BLOB].is_possibly_blob = TRUE;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_BLOB].can_ret_as_str_in_uni	= TRUE;
-
+
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_MEDIUM_BLOB].func		= ps_fetch_string;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_MEDIUM_BLOB].pack_len	= MYSQLND_PS_SKIP_RESULT_STR;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_MEDIUM_BLOB].php_type	= IS_STRING;
@@ -619,7 +619,6 @@
 	  time we try to send > LONG_MAX, the conversion to string will send a string and the server
 	  won't expect it and interpret the value as 0. Thus we need to resend the types, if any such values
 	  occur, and force resend for the next execution.
-
 	*/
 	for (i = 0; i < stmt->param_count; i++) {
 		if (Z_TYPE_P(stmt->param_bind[i].zv) != IS_NULL &&
@@ -662,7 +661,7 @@
 			}
 			memcpy(tmp_buf, *buf, offset);
 			*buf = tmp_buf;
-
+
 			/* Update our pos pointer */
 			*p = *buf + offset;
 		}
@@ -741,7 +740,7 @@
 				{
 					zval *tmp_data = (copies && copies[i])? copies[i]: stmt->param_bind[i].zv;
 					if (Z_TYPE_P(tmp_data) == IS_STRING) {
-						goto use_string;
+						goto use_string;
 					}
 					convert_to_long_ex(&tmp_data);
 				}
@@ -751,7 +750,7 @@
 				{
 					zval *tmp_data = (copies && copies[i])? copies[i]: stmt->param_bind[i].zv;
 					if (Z_TYPE_P(tmp_data) == IS_STRING) {
-						goto use_string;
+						goto use_string;
 					}
 					convert_to_long_ex(&tmp_data);
 				}
@@ -793,7 +792,6 @@
 				data_size += Z_STRLEN_P(the_var);
 				break;
 		}
-
 	}

 	/* 2.2 Enlarge the buffer, if needed */

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c	2010-09-23 15:12:19 UTC (rev 303733)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c	2010-09-23 16:03:22 UTC (rev 303734)
@@ -172,7 +172,6 @@
 											ctor_called_count,
 											STAT_COPY_ON_WRITE_SAVED,
 											result->field_count - ctor_called_count);
-
 		/* Free last row's zvals */
 		mnd_efree(unbuf->last_row_data);
 		unbuf->last_row_data = NULL;
@@ -506,7 +505,7 @@
 					ret = FAIL;
 					break;
 				}
-
+
 				if (FAIL == (ret = result->m.read_result_metadata(result, conn TSRMLS_CC))) {
 					/* For PS, we leave them in Prepared state */
 					if (!stmt && conn->current_result) {
@@ -1166,7 +1165,7 @@
 	if (!row_packet) {
 		SET_OOM_ERROR(conn->error_info);
 		ret = FAIL;
-		goto end;
+		goto end;
 	}
 	row_packet->result_set_memory_pool = result->result_set_memory_pool;
 	row_packet->field_count = meta->field_count;
@@ -1642,7 +1641,7 @@
 		zend_hash_move_forward(Z_ARRVAL(row));
 		zend_hash_get_current_data(Z_ARRVAL(row), (void **)&entry);
 	}
-
+
 	zend_hash_get_current_data(Z_ARRVAL(row), (void **)&entry);

 	*return_value = **entry;
@@ -1701,7 +1700,7 @@

 	DBG_ENTER("mysqlnd_result_init");
 	DBG_INF_FMT("field_count=%u", field_count);
-
+
 	if (!ret) {
 		DBG_RETURN(NULL);
 	}

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result_meta.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result_meta.c	2010-09-23 15:12:19 UTC (rev 303733)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result_meta.c	2010-09-23 16:03:22 UTC (rev 303734)
@@ -175,7 +175,7 @@
 			PACKET_FREE(field_packet);
 			DBG_RETURN(FAIL);
 		}
-
+
 		if (field_packet->stupid_list_fields_eof == TRUE) {
 			meta->field_count = i;
 			break;
@@ -224,7 +224,6 @@
 					meta->bit_fields_total_len += 3;/* 120 */
 					break;
 			}
-
 		}

 #if MYSQLND_UNICODE
@@ -475,7 +474,7 @@
 	MYSQLND_RES_METADATA *ret = mnd_pecalloc(1, alloc_size, persistent);
 	DBG_ENTER("mysqlnd_result_meta_init");
 	DBG_INF_FMT("persistent=%u", persistent);
-
+
 	do {
 		if (!ret) {
 			break;

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_statistics.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_statistics.c	2010-09-23 15:12:19 UTC (rev 303733)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_statistics.c	2010-09-23 16:03:22 UTC (rev 303734)
@@ -208,7 +208,7 @@
 		int ulen, tlen;
 #endif
 		char tmp[25];
-
+
 		sprintf((char *)&tmp, MYSQLND_LLU_SPEC, stats->values[i]);
 #if MYSQLND_UNICODE
 		zend_string_to_unicode(UG(utf8_conv), &ustr, &ulen, names[i].s, names[i].l + 1 TSRMLS_CC);

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_statistics.h
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_statistics.h	2010-09-23 15:12:19 UTC (rev 303733)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_statistics.h	2010-09-23 16:03:22 UTC (rev 303734)
@@ -64,7 +64,7 @@
 			MYSQLND_STAT_CALL_TRIGGER((stats), (statistic), (value)); \
 			MYSQLND_STATS_UNLOCK(_p_s); \
 	}
-
+
 #define MYSQLND_DEC_STATISTIC(enabler, stats, statistic) \
  { \
 	enum_mysqlnd_collected_stats _s = (statistic);\

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c	2010-09-23 15:12:19 UTC (rev 303733)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c	2010-09-23 16:03:22 UTC (rev 303734)
@@ -1220,10 +1220,10 @@
 			DBG_RETURN(FAIL);
 		}
 	}
-
+
 	for (i = 0, current_field = start_field; current_field < end_field; current_field++, i++) {
 		enum_mysqlnd_collected_stats statistic;
-
+
 		DBG_INF_FMT("Into zval=%p decoding column %u [%s.%s.%s] type=%u field->flags&unsigned=%u flags=%u is_bit=%u as_unicode=%u",
 			*current_field, i,
 			fields_metadata[i].db, fields_metadata[i].table, fields_metadata[i].name, fields_metadata[i].type,

Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd.c	2010-09-23 15:12:19 UTC (rev 303733)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd.c	2010-09-23 16:03:22 UTC (rev 303734)
@@ -280,7 +280,7 @@
 			MYSQLND_PACKET_EOF * ok_response = conn->protocol->m.get_eof_packet(conn->protocol, FALSE TSRMLS_CC);
 			if (!ok_response) {
 				SET_OOM_ERROR(conn->error_info);
-				break;
+				break;
 			}
 			if (FAIL == (ret = PACKET_READ(ok_response, conn))) {
 				SET_CLIENT_ERROR(conn->error_info, CR_MALFORMED_PACKET, UNKNOWN_SQLSTATE,
@@ -477,7 +477,7 @@
 		goto err;
 	}
 	memcpy(auth_packet->server_scramble_buf, greet_packet->scramble_buf, SCRAMBLE_LENGTH);
-
+
 	if (!PACKET_WRITE(auth_packet, conn)) {
 		CONN_SET_STATE(conn, CONN_QUIT_SENT);
 		SET_CLIENT_ERROR(conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone);
@@ -494,7 +494,7 @@
 		if (FAIL == conn->net->m.enable_ssl(conn->net TSRMLS_CC)) {
 			goto err;
 		}
-
+
 		auth_packet->send_half_packet = FALSE;
 		if (!PACKET_WRITE(auth_packet, conn)) {
 			CONN_SET_STATE(conn, CONN_QUIT_SENT);
@@ -1196,11 +1196,11 @@
 									   FALSE, TRUE TSRMLS_CC)) {
 		DBG_RETURN(NULL);
 	}
-
+
 	/*
 	   Prepare for the worst case.
 	   MyISAM goes to 2500 BIT columns, double it for safety.
-	 */
+	*/
 	result = conn->m->result_init(5000, conn->persistent TSRMLS_CC);
 	if (!result) {
 		DBG_RETURN(NULL);
@@ -1960,7 +1960,7 @@
 		int2store(p, conn->charset->nr);
 		p+=2;
 	}
-
+
 	if (PASS != conn->m->simple_command(conn, COM_CHANGE_USER, buffer, p - buffer,
 									   PROT_LAST /* we will handle the OK packet*/,
 									   silent, TRUE TSRMLS_CC)) {
@@ -2016,7 +2016,7 @@
 	} else if (ret == FAIL && chg_user_resp->server_asked_323_auth == TRUE) {
 		/* old authentication with new server  !*/
 		DBG_ERR(mysqlnd_old_passwd);
-		SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, mysqlnd_old_passwd);
+		SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, mysqlnd_old_passwd);
 	}
 end:
 	PACKET_FREE(chg_user_resp);
@@ -2188,7 +2188,7 @@
 		conn->current_result->m.free_result(conn->current_result, TRUE TSRMLS_CC);
 	}
 	conn->current_result = NULL;
-
+
 	DBG_RETURN(result);
 }
 /* }}} */
@@ -2219,7 +2219,7 @@

 	result = conn->current_result->m.store_result(conn->current_result, conn, FALSE TSRMLS_CC);
 	if (!result) {
-		conn->current_result->m.free_result(conn->current_result, TRUE TSRMLS_CC);
+		conn->current_result->m.free_result(conn->current_result, TRUE TSRMLS_CC);
 	}
 	conn->current_result = NULL;
 	DBG_RETURN(result);

Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_block_alloc.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_block_alloc.c	2010-09-23 15:12:19 UTC (rev 303733)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_block_alloc.c	2010-09-23 16:03:22 UTC (rev 303734)
@@ -104,7 +104,6 @@
 			DBG_RETURN(FAIL);
 		}
 		chunk->ptr = new_ptr;
-
 	}
 	DBG_RETURN(PASS);
 }

Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_charset.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_charset.c	2010-09-23 15:12:19 UTC (rev 303733)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_charset.c	2010-09-23 16:03:22 UTC (rev 303734)
@@ -399,7 +399,7 @@
 	if (start + 2 > end) {
 		return 0;
 	}
-
+
 	if (UTF16_HIGH_HEAD(*start)) {
 		return (start + 4 <= end) && UTF16_LOW_HEAD(start[2]) ? 4 : 0;
 	}

Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_debug.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_debug.c	2010-09-23 15:12:19 UTC (rev 303733)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_debug.c	2010-09-23 16:03:22 UTC (rev 303734)
@@ -617,7 +617,7 @@

 	ret->m = & mysqlnd_mysqlnd_debug_methods;
 	ret->skip_functions = skip_functions;
-
+
 	return ret;
 }
 /* }}} */
@@ -634,7 +634,7 @@
 			return;
 		}
 	}
-
+
 	dbg->m->close(dbg);
 	dbg->m->set_mode(dbg, mode);
 	while (zend_stack_count(&dbg->call_stack)) {
@@ -650,7 +650,7 @@
 #define __zend_filename "/unknown/unknown"
 #define __zend_lineno   0
 #endif
-
+
 #define REAL_SIZE(s) (collect_memory_statistics? (s) + sizeof(size_t) : (s))
 #define REAL_PTR(p) (collect_memory_statistics && (p)? (((char *)(p)) - sizeof(size_t)) : (p))
 #define FAKE_PTR(p) (collect_memory_statistics && (p)? (((char *)(p)) + sizeof(size_t)) : (p))

Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_loaddata.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_loaddata.c	2010-09-23 15:12:19 UTC (rev 303733)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_loaddata.c	2010-09-23 16:03:22 UTC (rev 303734)
@@ -57,7 +57,7 @@
 	if (!info) {
 		DBG_RETURN(1);
 	}
-
+
 	*ptr = info;

 	/* check open_basedir */

Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_ps.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_ps.c	2010-09-23 15:12:19 UTC (rev 303733)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_ps.c	2010-09-23 16:03:22 UTC (rev 303734)
@@ -175,7 +175,7 @@
 		}

 		if ((result = result->m.store_result(result, conn, TRUE TSRMLS_CC))) {
-			stmt->upsert_status.affected_rows = result->stored_data->row_count;
+			stmt->upsert_status.affected_rows = result->stored_data->row_count;
 			stmt->state = MYSQLND_STMT_PREPARED;
 			result->type = MYSQLND_RES_PS_BUF;
 		} else {
@@ -290,7 +290,7 @@
 	if (!prepare_resp) {
 		SET_OOM_ERROR(stmt->error_info);
 		SET_OOM_ERROR(stmt->conn->error_info);
-		goto done;
+		goto done;
 	}

 	if (FAIL == PACKET_READ(prepare_resp, stmt->conn)) {
@@ -579,7 +579,7 @@

 	SET_ERROR_AFF_ROWS(stmt);
 	SET_ERROR_AFF_ROWS(stmt->conn);
-
+
 	if (stmt->result && stmt->state >= MYSQLND_STMT_PREPARED && stmt->field_count) {
 		/*
 		  We don need to copy the data from the buffers which we will clean.
@@ -911,7 +911,7 @@
 			stmt->error_info = row_packet->error_info;
 		}
 		CONN_SET_STATE(result->conn, CONN_READY);
-		result->unbuf->eof_reached = TRUE; /* so next time we won't get an error */
+		result->unbuf->eof_reached = TRUE; /* so next time we won't get an error */
 	} else if (row_packet->eof) {
 		DBG_INF("EOF");
 		/* Mark the connection as usable again */
@@ -1265,7 +1265,7 @@
 	MYSQLND * conn;
 	zend_uchar *cmd_buf;
 	enum php_mysqlnd_server_command cmd = COM_STMT_SEND_LONG_DATA;
-
+
 	DBG_ENTER("mysqlnd_stmt::send_long_data");
 	if (!stmt || !stmt->conn) {
 		DBG_RETURN(FAIL);
@@ -1320,16 +1320,15 @@
 			memcpy(cmd_buf + STMT_ID_LENGTH + 2, data, length);

 			/* COM_STMT_SEND_LONG_DATA doesn't send an OK packet*/
-			ret = conn->m->simple_command(conn, cmd, (char *)cmd_buf, packet_len,
-										 PROT_LAST , FALSE, TRUE TSRMLS_CC);
+			ret = conn->m->simple_command(conn, cmd, (char *)cmd_buf, packet_len, PROT_LAST , FALSE, TRUE TSRMLS_CC);
 			mnd_efree(cmd_buf);
 			if (FAIL == ret) {
 				stmt->error_info = conn->error_info;
 			}
 		} else {
 			ret = FAIL;
-			SET_OOM_ERROR(stmt->error_info);
-			SET_OOM_ERROR(conn->error_info);
+			SET_OOM_ERROR(stmt->error_info);
+			SET_OOM_ERROR(conn->error_info);
 		}
 		/*
 		  Cover protocol error: COM_STMT_SEND_LONG_DATA was designed to be quick and not
@@ -1474,7 +1473,7 @@
 				DBG_RETURN(FAIL);
 			}
 		}
-
+
 		/* Prevent from freeing */
 		/* Don't update is_ref, or we will leak during conversion */
 		Z_ADDREF_P(zv);
@@ -1489,7 +1488,7 @@
 		}
 		stmt->param_bind[param_no].zv = zv;
 		stmt->param_bind[param_no].type = type;
-
+
 		stmt->send_types_to_server = 1;
 	}
 	DBG_INF("PASS");
@@ -1812,7 +1811,7 @@
 	if (result) {
 		result->m.free_result(result, TRUE TSRMLS_CC);
 	}
-	DBG_RETURN(NULL);
+	DBG_RETURN(NULL);
 }
 /* }}} */

@@ -2367,7 +2366,7 @@

 		DBG_RETURN(ret);
 	} while (0);
-
+
 	SET_OOM_ERROR(conn->error_info);
 	if (ret) {
 		ret->m->dtor(ret, TRUE TSRMLS_CC);

Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_ps_codec.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_ps_codec.c	2010-09-23 15:12:19 UTC (rev 303733)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_ps_codec.c	2010-09-23 16:03:22 UTC (rev 303734)
@@ -482,7 +482,7 @@
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_DOUBLE].pack_len	= 8;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_DOUBLE].php_type	= IS_DOUBLE;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_DOUBLE].can_ret_as_str_in_uni	= TRUE;
-
+
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_TIME].func		= ps_fetch_time;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_TIME].pack_len	= MYSQLND_PS_SKIP_RESULT_W_LEN;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_TIME].php_type	= IS_STRING;
@@ -497,7 +497,7 @@
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].pack_len	= MYSQLND_PS_SKIP_RESULT_W_LEN;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].php_type	= IS_STRING;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].can_ret_as_str_in_uni	= TRUE;
-
+
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_DATETIME].func	= ps_fetch_datetime;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_DATETIME].pack_len= MYSQLND_PS_SKIP_RESULT_W_LEN;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_DATETIME].php_type= IS_STRING;
@@ -507,7 +507,7 @@
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_TIMESTAMP].pack_len= MYSQLND_PS_SKIP_RESULT_W_LEN;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_TIMESTAMP].php_type= IS_STRING;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_TIMESTAMP].can_ret_as_str_in_uni	= TRUE;
-
+
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_TINY_BLOB].func	= ps_fetch_string;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_TINY_BLOB].pack_len= MYSQLND_PS_SKIP_RESULT_STR;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_TINY_BLOB].php_type = IS_STRING;
@@ -519,7 +519,7 @@
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_BLOB].php_type	= IS_STRING;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_BLOB].is_possibly_blob = TRUE;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_BLOB].can_ret_as_str_in_uni	= TRUE;
-
+
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_MEDIUM_BLOB].func		= ps_fetch_string;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_MEDIUM_BLOB].pack_len	= MYSQLND_PS_SKIP_RESULT_STR;
 	mysqlnd_ps_fetch_functions[MYSQL_TYPE_MEDIUM_BLOB].php_type	= IS_STRING;
@@ -619,7 +619,6 @@
 	  time we try to send > LONG_MAX, the conversion to string will send a string and the server
 	  won't expect it and interpret the value as 0. Thus we need to resend the types, if any such values
 	  occur, and force resend for the next execution.
-
 	*/
 	for (i = 0; i < stmt->param_count; i++) {
 		if (Z_TYPE_P(stmt->param_bind[i].zv) != IS_NULL &&
@@ -662,7 +661,7 @@
 			}
 			memcpy(tmp_buf, *buf, offset);
 			*buf = tmp_buf;
-
+
 			/* Update our pos pointer */
 			*p = *buf + offset;
 		}
@@ -741,7 +740,7 @@
 				{
 					zval *tmp_data = (copies && copies[i])? copies[i]: stmt->param_bind[i].zv;
 					if (Z_TYPE_P(tmp_data) == IS_STRING) {
-						goto use_string;
+						goto use_string;
 					}
 					convert_to_long_ex(&tmp_data);
 				}
@@ -751,7 +750,7 @@
 				{
 					zval *tmp_data = (copies && copies[i])? copies[i]: stmt->param_bind[i].zv;
 					if (Z_TYPE_P(tmp_data) == IS_STRING) {
-						goto use_string;
+						goto use_string;
 					}
 					convert_to_long_ex(&tmp_data);
 				}
@@ -793,7 +792,6 @@
 				data_size += Z_STRLEN_P(the_var);
 				break;
 		}
-
 	}

 	/* 2.2 Enlarge the buffer, if needed */

Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c	2010-09-23 15:12:19 UTC (rev 303733)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c	2010-09-23 16:03:22 UTC (rev 303734)
@@ -172,7 +172,6 @@
 											ctor_called_count,
 											STAT_COPY_ON_WRITE_SAVED,
 											result->field_count - ctor_called_count);
-
 		/* Free last row's zvals */
 		mnd_efree(unbuf->last_row_data);
 		unbuf->last_row_data = NULL;
@@ -506,7 +505,7 @@
 					ret = FAIL;
 					break;
 				}
-
+
 				if (FAIL == (ret = result->m.read_result_metadata(result, conn TSRMLS_CC))) {
 					/* For PS, we leave them in Prepared state */
 					if (!stmt && conn->current_result) {
@@ -1166,7 +1165,7 @@
 	if (!row_packet) {
 		SET_OOM_ERROR(conn->error_info);
 		ret = FAIL;
-		goto end;
+		goto end;
 	}
 	row_packet->result_set_memory_pool = result->result_set_memory_pool;
 	row_packet->field_count = meta->field_count;
@@ -1639,7 +1638,7 @@
 		zend_hash_move_forward(Z_ARRVAL(row));
 		zend_hash_get_current_data(Z_ARRVAL(row), (void **)&entry);
 	}
-
+
 	zend_hash_get_current_data(Z_ARRVAL(row), (void **)&entry);

 	*return_value = **entry;
@@ -1698,7 +1697,7 @@

 	DBG_ENTER("mysqlnd_result_init");
 	DBG_INF_FMT("field_count=%u", field_count);
-
+
 	if (!ret) {
 		DBG_RETURN(NULL);
 	}

Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_result_meta.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_result_meta.c	2010-09-23 15:12:19 UTC (rev 303733)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_result_meta.c	2010-09-23 16:03:22 UTC (rev 303734)
@@ -175,7 +175,7 @@
 			PACKET_FREE(field_packet);
 			DBG_RETURN(FAIL);
 		}
-
+
 		if (field_packet->stupid_list_fields_eof == TRUE) {
 			meta->field_count = i;
 			break;
@@ -224,7 +224,6 @@
 					meta->bit_fields_total_len += 3;/* 120 */
 					break;
 			}
-
 		}

 #if MYSQLND_UNICODE
@@ -475,7 +474,7 @@
 	MYSQLND_RES_METADATA *ret = mnd_pecalloc(1, alloc_size, persistent);
 	DBG_ENTER("mysqlnd_result_meta_init");
 	DBG_INF_FMT("persistent=%u", persistent);
-
+
 	do {
 		if (!ret) {
 			break;

Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_statistics.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_statistics.c	2010-09-23 15:12:19 UTC (rev 303733)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_statistics.c	2010-09-23 16:03:22 UTC (rev 303734)
@@ -208,7 +208,7 @@
 		int ulen, tlen;
 #endif
 		char tmp[25];
-
+
 		sprintf((char *)&tmp, MYSQLND_LLU_SPEC, stats->values[i]);
 #if MYSQLND_UNICODE
 		zend_string_to_unicode(UG(utf8_conv), &ustr, &ulen, names[i].s, names[i].l + 1 TSRMLS_CC);

Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_statistics.h
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_statistics.h	2010-09-23 15:12:19 UTC (rev 303733)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_statistics.h	2010-09-23 16:03:22 UTC (rev 303734)
@@ -64,7 +64,7 @@
 			MYSQLND_STAT_CALL_TRIGGER((stats), (statistic), (value)); \
 			MYSQLND_STATS_UNLOCK(_p_s); \
 	}
-
+
 #define MYSQLND_DEC_STATISTIC(enabler, stats, statistic) \
  { \
 	enum_mysqlnd_collected_stats _s = (statistic);\

Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_wireprotocol.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_wireprotocol.c	2010-09-23 15:12:19 UTC (rev 303733)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_wireprotocol.c	2010-09-23 16:03:22 UTC (rev 303734)
@@ -1220,10 +1220,10 @@
 			DBG_RETURN(FAIL);
 		}
 	}
-
+
 	for (i = 0, current_field = start_field; current_field < end_field; current_field++, i++) {
 		enum_mysqlnd_collected_stats statistic;
-
+
 		DBG_INF_FMT("Into zval=%p decoding column %u [%s.%s.%s] type=%u field->flags&unsigned=%u flags=%u is_bit=%u as_unicode=%u",
 			*current_field, i,
 			fields_metadata[i].db, fields_metadata[i].table, fields_metadata[i].name, fields_metadata[i].type,
-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to