diff options
author | Ulf Wendel <uw@php.net> | 2009-10-15 15:49:40 +0000 |
---|---|---|
committer | Ulf Wendel <uw@php.net> | 2009-10-15 15:49:40 +0000 |
commit | 355a88f676ccac3ca80a4748890d91482164a546 (patch) | |
tree | 1dabacd7ae29d8b9319c5c77752cddeac006a2e1 /ext/mysqli/mysqli.c | |
parent | 4706ebbfe250e3e85e5043e5e748b5814553dda4 (diff) | |
download | php-git-355a88f676ccac3ca80a4748890d91482164a546.tar.gz |
Fixing problems when calling connect (again and again) on a valid connection handle. Most of the patch comes from Andrey.
Diffstat (limited to 'ext/mysqli/mysqli.c')
-rw-r--r-- | ext/mysqli/mysqli.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index 76266d2996..1b550cf283 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -229,22 +229,7 @@ static void mysqli_link_free_storage(void *object TSRMLS_DC) if (my_res && my_res->ptr) { MY_MYSQL *mysql = (MY_MYSQL *)my_res->ptr; if (mysql->mysql) { - if (!mysql->persistent) { - mysqli_close(mysql->mysql, MYSQLI_CLOSE_IMPLICIT); - } else { - zend_rsrc_list_entry *le; - if (zend_hash_find(&EG(persistent_list), mysql->hash_key, strlen(mysql->hash_key) + 1, (void **)&le) == SUCCESS) { - if (Z_TYPE_P(le) == php_le_pmysqli()) { - mysqli_plist_entry *plist = (mysqli_plist_entry *) le->ptr; - - zend_ptr_stack_push(&plist->free_links, mysql->mysql); - - MyG(num_links)--; - MyG(num_active_persistent)--; - MyG(num_inactive_persistent)++; - } - } - } + php_mysqli_close(mysql, MYSQLI_CLOSE_EXPLICIT TSRMLS_CC); } php_clear_mysql(mysql); efree(mysql); |