From 6c4e8fa4f9f804a636c3d5772e15388f441a21c6 Mon Sep 17 00:00:00 2001 From: Andrey Hristov Date: Thu, 28 May 2009 11:47:48 +0000 Subject: 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. --- ext/mysqlnd/mysqlnd_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/mysqlnd/mysqlnd_debug.c') 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; -- cgit v1.2.1