diff options
author | Georg Richter <georg@php.net> | 2002-11-15 10:35:10 +0000 |
---|---|---|
committer | Georg Richter <georg@php.net> | 2002-11-15 10:35:10 +0000 |
commit | d46bd1cd63660ccf320c4fb005f10a203ca5985f (patch) | |
tree | ea3d1947188e735fe3551d6a0cac8e824c036648 /ext/mysql/php_mysql.c | |
parent | dadfd6e94a08a27074dfe509e134c773e887089d (diff) | |
download | php-git-d46bd1cd63660ccf320c4fb005f10a203ca5985f.tar.gz |
removed restore_connection_defaults for pconnects (discussed on php-dev@)
bug #19529 closed
bug #12513 reopened
Diffstat (limited to 'ext/mysql/php_mysql.c')
-rw-r--r-- | ext/mysql/php_mysql.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c index ad84ece14f..361ffe5166 100644 --- a/ext/mysql/php_mysql.c +++ b/ext/mysql/php_mysql.c @@ -222,49 +222,6 @@ void timeout(int sig); #define CHECK_LINK(link) { if (link==-1) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "A link to the server could not be established"); RETURN_FALSE; } } -/* {{{ _restore_connection_defaults - */ -static int _restore_connection_defaults(zend_rsrc_list_entry *rsrc TSRMLS_DC) -{ - php_mysql_conn *link; - char user[128]; - char passwd[128]; - - /* check if its a persistent link */ - if (Z_TYPE_P(rsrc) != le_plink) - return 0; - - link = (php_mysql_conn *) rsrc->ptr; - - /* Find the active result set and free it */ - if (link->active_result_id) { - int type; - MYSQL_RES *mysql_result; - - mysql_result = (MYSQL_RES *) zend_list_find(link->active_result_id, &type); - if (mysql_result && type==le_result) { - zend_list_delete(link->active_result_id); - link->active_result_id = 0; - } - } - - /* rollback possible transactions */ - mysql_query(&link->conn, "ROLLBACK"); - - /* restore session variable "autocommit" to default (1) */ - mysql_query(&link->conn, "SET AUTOCOMMIT=1"); - - /* unset the current selected db */ -#if MYSQL_VERSION_ID > 32329 - strcpy (user, (char *)(&link->conn)->user); - strcpy (passwd, (char *)(&link->conn)->passwd); - mysql_change_user(&link->conn, user, passwd, ""); -#endif - - return 0; -} -/* }}} */ - /* {{{ _free_mysql_result * This wrapper is required since mysql_free_result() returns an integer, and * thus, cannot be used directly @@ -446,8 +403,6 @@ PHP_RINIT_FUNCTION(mysql) */ PHP_RSHUTDOWN_FUNCTION(mysql) { - zend_hash_apply(&EG(persistent_list), (apply_func_t) _restore_connection_defaults TSRMLS_CC); - if (MySG(trace_mode)) { if (MySG(result_allocated)){ char tmp[128]; |