summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2014-05-20 19:57:11 +0300
committerAndrey Hristov <andrey@php.net>2014-05-20 19:57:11 +0300
commit5d57e17a15cf89bf8b20d718ce5070b42ee446e0 (patch)
tree63ffe65e89412e6e37e267d3889a28d0823d3672 /ext/mysqlnd/mysqlnd.c
parent2312af04a7ca7a43166a7a1be20067e632ff917a (diff)
downloadphp-git-5d57e17a15cf89bf8b20d718ce5070b42ee446e0.tar.gz
First set of phpng changes for mysqlnd
Diffstat (limited to 'ext/mysqlnd/mysqlnd.c')
-rw-r--r--ext/mysqlnd/mysqlnd.c39
1 files changed, 4 insertions, 35 deletions
diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c
index 0289cd326c..c5db05b91d 100644
--- a/ext/mysqlnd/mysqlnd.c
+++ b/ext/mysqlnd/mysqlnd.c
@@ -113,7 +113,6 @@ MYSQLND_METHOD(mysqlnd_conn_data, free_contents)(MYSQLND_CONN_DATA * conn TSRMLS
DBG_ENTER("mysqlnd_conn_data::free_contents");
- mysqlnd_local_infile_default(conn);
if (conn->current_result) {
conn->current_result->m.free_result(conn->current_result, TRUE TSRMLS_CC);
conn->current_result = NULL;
@@ -2440,34 +2439,6 @@ end:
/* }}} */
-/* {{{ connect_attr_item_edtor */
-static void
-connect_attr_item_edtor(void * pDest)
-{
-#ifdef ZTS
- TSRMLS_FETCH();
-#endif
- DBG_ENTER("connect_attr_item_edtor");
- mnd_efree(*(char **) pDest);
- DBG_VOID_RETURN;
-}
-/* }}} */
-
-
-/* {{{ connect_attr_item_pdtor */
-static void
-connect_attr_item_pdtor(void * pDest)
-{
-#ifdef ZTS
- TSRMLS_FETCH();
-#endif
- DBG_ENTER("connect_attr_item_pdtor");
- mnd_pefree(*(char **) pDest, 1);
- DBG_VOID_RETURN;
-}
-/* }}} */
-
-
/* {{{ mysqlnd_conn_data::set_client_option_2d */
static enum_func_status
MYSQLND_METHOD(mysqlnd_conn_data, set_client_option_2d)(MYSQLND_CONN_DATA * const conn,
@@ -2492,15 +2463,13 @@ MYSQLND_METHOD(mysqlnd_conn_data, set_client_option_2d)(MYSQLND_CONN_DATA * cons
if (!conn->options->connect_attr) {
goto oom;
}
- zend_hash_init(conn->options->connect_attr, 0, NULL, conn->persistent? connect_attr_item_pdtor:connect_attr_item_edtor, conn->persistent);
+ zend_hash_init(conn->options->connect_attr, 0, NULL, ZVAL_PTR_DTOR, conn->persistent);
}
DBG_INF_FMT("Adding [%s][%s]", key, value);
{
- const char * copyv = mnd_pestrdup(value, conn->persistent);
- if (!copyv) {
- goto oom;
- }
- zend_hash_str_update_ptr(conn->options->connect_attr, key, strlen(key), (void*)&copyv);
+ zval attrz;
+ ZVAL_STRING(&attrz, value);
+ zend_hash_str_update(conn->options->connect_attr, key, strlen(key), &attrz);
}
break;
default: