Author: ahristov
Date: 2008-04-17 15:09:24 +0200 (Thu, 17 Apr 2008)
New Revision: 1485
Modified:
trunk/mysqlnd/mysqlnd_palloc.c
trunk/mysqlnd/mysqlnd_ps.c
Log:
Meine Damen und Herren, jetzt gibt's weniger Leaks.
Ladies & Gentleman, expect less Leaks now.
Modified: trunk/mysqlnd/mysqlnd_palloc.c
===================================================================
--- trunk/mysqlnd/mysqlnd_palloc.c 2008-04-17 13:08:56 UTC (rev 1484)
+++ trunk/mysqlnd/mysqlnd_palloc.c 2008-04-17 13:09:24 UTC (rev 1485)
@@ -482,9 +482,6 @@
*/
p = thd_cache->gc_list.ptr_line;
while (p < thd_cache->gc_list.last_added) {
- if (Z_REFCOUNT((*p)->zv) != 1) {
- printf("Cache error 1 - refcount_gc is %d\n", Z_REFCOUNT((*p)->zv));
- }
zval_dtor(&(*p)->zv);
p++;
}
@@ -498,9 +495,6 @@
#ifdef ZTS
memset(&((*p)->thread_id), 0, sizeof(THREAD_T));
#endif
- if (Z_REFCOUNT((*p)->zv) != 1) {
- printf("Cache error 2 - refcount_gc is %d\n", Z_REFCOUNT((*p)->zv));
- }
p++;
}
UNLOCK_PCACHE(cache);
Modified: trunk/mysqlnd/mysqlnd_ps.c
===================================================================
--- trunk/mysqlnd/mysqlnd_ps.c 2008-04-17 13:08:56 UTC (rev 1484)
+++ trunk/mysqlnd/mysqlnd_ps.c 2008-04-17 13:09:24 UTC (rev 1485)
@@ -458,6 +458,12 @@
SET_ERROR_AFF_ROWS(stmt->conn);
if (stmt->state > MYSQLND_STMT_PREPARED && stmt->field_count) {
+ /*
+ We don need to copy the data from the buffers which we will clean.
+ Because it has already been copied. See
+ #ifndef WE_DONT_COPY_IN_BUFFERED_AND_UNBUFFERED_BECAUSEOF_IS_REF
+ */
+#ifdef WE_DONT_COPY_IN_BUFFERED_AND_UNBUFFERED_BECAUSEOF_IS_REF
if (stmt->result_bind &&
stmt->result_zvals_separated_once == TRUE &&
stmt->state >= MYSQLND_STMT_USER_FETCHING)
@@ -481,6 +487,7 @@
}
}
}
+#endif
/*
Executed, but the user hasn't started to fetch
@@ -1396,7 +1403,7 @@
}
mysqlnd_stmt_separate_result_bind(stmt TSRMLS_CC);
- stmt->result_zvals_separated_once = FALSE;
+// stmt->result_zvals_separated_once = FALSE;
stmt->result_bind = result_bind;
for (i = 0; i < stmt->field_count; i++) {
/* Prevent from freeing */
| Thread |
|---|
| • PHP mysqlnd svn commit: r1485 - trunk/mysqlnd | ahristov | 17 Apr |