List:Commits« Previous MessageNext Message »
From:jschlueter Date:April 15 2008 1:07pm
Subject:PHP mysqlnd svn commit: r1457 - trunk/php5/ext/pdo_mysqlnd
View as plain text  
Author: jschlueter
Date: 2008-04-15 15:07:11 +0200 (Tue, 15 Apr 2008)
New Revision: 1457

Modified:
   trunk/php5/ext/pdo_mysqlnd/mysql_driver.c
   trunk/php5/ext/pdo_mysqlnd/mysql_statement.c
Log:
cleanups

Modified: trunk/php5/ext/pdo_mysqlnd/mysql_driver.c
===================================================================
--- trunk/php5/ext/pdo_mysqlnd/mysql_driver.c	2008-04-15 12:53:11 UTC (rev 1456)
+++ trunk/php5/ext/pdo_mysqlnd/mysql_driver.c	2008-04-15 13:07:11 UTC (rev 1457)
@@ -159,7 +159,6 @@
 	PDO_DBG_INF_FMT("dbh=%p", dbh);
 	if (H) {
 		if (H->server) {
-/* TODO - This can't be right! */
 			mysql_close(H->server);
 			H->server = NULL;
 		}
@@ -565,7 +564,6 @@
 	H->max_buffer_size = 1024*1024;
 #endif
 
-	/* TODO: Old default: 1, do we really want no emulation by default now? */
 	H->buffered = H->emulate_prepare = 1;
 
 	/* handle MySQL options */
@@ -649,7 +647,6 @@
 	}
 
 	/* TODO: - Use a zval cahce instead of NULL as last parameter */
-	/*       - Cehck whether PDO offers the strlens */
 #ifdef PDO_USE_MYSQLND
 	if (dbname) {
 		dbname_len = strlen(dbname);

Modified: trunk/php5/ext/pdo_mysqlnd/mysql_statement.c
===================================================================
--- trunk/php5/ext/pdo_mysqlnd/mysql_statement.c	2008-04-15 12:53:11 UTC (rev 1456)
+++ trunk/php5/ext/pdo_mysqlnd/mysql_statement.c	2008-04-15 13:07:11 UTC (rev 1457)
@@ -105,8 +105,9 @@
 	}	
 #endif /* HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND */
 #if PDO_USE_MYSQLND
-	if (!S->stmt && S->current_data)
+	if (!S->stmt && S->current_data) {
 		free(S->current_data);
+	}
 #endif /* PDO_USE_MYSQLND */
 
 	efree(S);
@@ -142,7 +143,6 @@
 			}
 			mysqlnd_stmt_bind_result(S->stmt, S->result_bind);
 		} else {
-			/* TODO: not sure if this is needed */
 			unsigned int i;
 
 			if (S->result) {
@@ -153,6 +153,8 @@
 
 			/* TODO: we should use realloc() if possible */
 			if (S->stmt->field_count != stmt->column_count) {
+				 unsigned int i;
+
 				for (i = 0; i < stmt->column_count; i++) {
 					zval_ptr_dtor(&S->result_bind[i].zv);
 				}
@@ -390,8 +392,6 @@
 static int pdo_mysql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data
*param,
 		enum pdo_param_event event_type TSRMLS_DC) /* {{{ */
 {
-	/* TODO: MAke sure the param is really free'D there seem to be leaks from 
- 	* time to time from the parameter stack building */
 #if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND
 	pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data;	
 	PDO_MYSQL_PARAM_BIND *b;
@@ -593,8 +593,9 @@
 		PDO_DBG_RETURN(0);
 	}
 #if PDO_USE_MYSQLND
-	if (!S->stmt && S->current_data)
+	if (!S->stmt && S->current_data) {
 		free(S->current_data);
+	}
 #endif /* PDO_USE_MYSQLND */
 
 	if ((S->current_data = mysql_fetch_row(S->result)) == NULL) {
@@ -615,11 +616,6 @@
 	struct pdo_column_data *cols = stmt->columns;
 	unsigned int i;
 
-#if PDO_USE_MYSQLND_foobar
-        /* TODO ... I guess the right place would be the execute function to init some
stuff */
-	return 1;
-#endif
-
 	PDO_DBG_ENTER("pdo_mysql_stmt_describe");
 
 	if (!S->result) {

Thread
PHP mysqlnd svn commit: r1457 - trunk/php5/ext/pdo_mysqlndjschlueter15 Apr