summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_debug.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2009-05-28 11:47:48 +0000
committerAndrey Hristov <andrey@php.net>2009-05-28 11:47:48 +0000
commit6c4e8fa4f9f804a636c3d5772e15388f441a21c6 (patch)
treebcba6c85174b29f4317f08cccea00ddb9e3a2268 /ext/mysqlnd/mysqlnd_debug.c
parent90a8a7f857836f7aad7b871a5b8969b1294f412f (diff)
downloadphp-git-6c4e8fa4f9f804a636c3d5772e15388f441a21c6.tar.gz
MFH:
Fix a bug with mysqlnd_fetch_field(_direct()). With mysqlnd the optimised function was called, which however, doesn't respect that during store the raw data is not unpacked, to be lazy. The data is unpacked to zvals later, during every row fetch. However, this way max_length won't be calculated correctly. So, if a mysqlnd_fetch_field(_direct) call comes we need to unpack everything and then calculate max_length...and that is expensive, defies our lazy unpacking optimisation.
Diffstat (limited to 'ext/mysqlnd/mysqlnd_debug.c')
-rw-r--r--ext/mysqlnd/mysqlnd_debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mysqlnd/mysqlnd_debug.c b/ext/mysqlnd/mysqlnd_debug.c
index b83e18d0d3..a052748850 100644
--- a/ext/mysqlnd/mysqlnd_debug.c
+++ b/ext/mysqlnd/mysqlnd_debug.c
@@ -815,7 +815,7 @@ void * _mysqlnd_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQL
if (persistent == FALSE) {
DBG_INF_FMT("after : %lu", zend_memory_usage(persistent TSRMLS_CC));
}
- MYSQLND_INC_GLOBAL_STATISTIC(persistent? STAT_MEM_EREALLOC_COUNT:STAT_MEM_REALLOC_COUNT);
+ MYSQLND_INC_GLOBAL_STATISTIC(persistent? STAT_MEM_REALLOC_COUNT:STAT_MEM_EREALLOC_COUNT);
if (MYSQLND_G(collect_memory_statistics)) {
enum mysqlnd_collected_stats s1 = persistent? STAT_MEM_REALLOC_COUNT:STAT_MEM_EREALLOC_COUNT;
enum mysqlnd_collected_stats s2 = persistent? STAT_MEM_REALLOC_AMMOUNT:STAT_MEM_EREALLOC_AMMOUNT;