summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_palloc.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2008-04-24 14:04:58 +0000
committerAndrey Hristov <andrey@php.net>2008-04-24 14:04:58 +0000
commit5da78b297bde9402b4e92bd8d5ac7608da46a91d (patch)
tree5617e8974c9c7b08a09125df953d9095966915cc /ext/mysqlnd/mysqlnd_palloc.c
parentdedb146a691249b72cd583cc3c3f4cb56c4eabd3 (diff)
downloadphp-git-5da78b297bde9402b4e92bd8d5ac7608da46a91d.tar.gz
Update ext/mysql's and ext/mysqli's tests
Add mysqli_stmt_more_result()/mysqli_stmt_next_result(), but only in mysqlnd builds as libmysql doesn't support this feature.
Diffstat (limited to 'ext/mysqlnd/mysqlnd_palloc.c')
-rw-r--r--ext/mysqlnd/mysqlnd_palloc.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/ext/mysqlnd/mysqlnd_palloc.c b/ext/mysqlnd/mysqlnd_palloc.c
index 976e473733..33ee402cca 100644
--- a/ext/mysqlnd/mysqlnd_palloc.c
+++ b/ext/mysqlnd/mysqlnd_palloc.c
@@ -132,7 +132,6 @@ PHPAPI MYSQLND_THD_ZVAL_PCACHE* _mysqlnd_palloc_init_thd_cache(MYSQLND_ZVAL_PCAC
MYSQLND_THD_ZVAL_PCACHE *ret = calloc(1, sizeof(MYSQLND_THD_ZVAL_PCACHE));
DBG_ENTER("_mysqlnd_palloc_init_thd_cache");
DBG_INF_FMT("ret = %p", ret);
-
ret->parent = mysqlnd_palloc_get_cache_reference(cache);
#ifdef ZTS
@@ -151,14 +150,16 @@ PHPAPI MYSQLND_THD_ZVAL_PCACHE* _mysqlnd_palloc_init_thd_cache(MYSQLND_ZVAL_PCAC
/* }}} */
-/* {{{ mysqlnd_palloc_get_thd_cache_reference */
-MYSQLND_THD_ZVAL_PCACHE* mysqlnd_palloc_get_thd_cache_reference(MYSQLND_THD_ZVAL_PCACHE * const cache)
+/* {{{ _mysqlnd_palloc_get_thd_cache_reference */
+MYSQLND_THD_ZVAL_PCACHE* _mysqlnd_palloc_get_thd_cache_reference(MYSQLND_THD_ZVAL_PCACHE * const cache TSRMLS_DC)
{
+ DBG_ENTER("_mysqlnd_palloc_get_thd_cache_reference");
if (cache) {
++cache->references;
+ DBG_INF_FMT("cache=%p new_refc=%d", *cache, cache->references);
mysqlnd_palloc_get_cache_reference(cache->parent);
}
- return cache;
+ DBG_RETURN(cache);
}
/* }}} */
@@ -190,8 +191,8 @@ PHPAPI void _mysqlnd_palloc_free_thd_cache_reference(MYSQLND_THD_ZVAL_PCACHE **c
{
DBG_ENTER("_mysqlnd_palloc_free_thd_cache_reference");
if (*cache) {
- DBG_INF_FMT("cache=%p refs=%d", *cache, (*cache)->references);
--(*cache)->parent->references;
+ DBG_INF_FMT("cache=%p references_left=%d", *cache, (*cache)->references);
if (--(*cache)->references == 0) {
mysqlnd_palloc_free_thd_cache(*cache TSRMLS_CC);
@@ -493,7 +494,7 @@ PHPAPI void _mysqlnd_palloc_rshutdown(MYSQLND_THD_ZVAL_PCACHE * thd_cache TSRMLS
++cache->free_items;
#ifdef ZTS
memset(&((*p)->thread_id), 0, sizeof(THREAD_T));
-#endif
+#endif
p++;
}
UNLOCK_PCACHE(cache);