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 | ab4670ee53b8ef48e0a7f012f3bc26b2297df6c2 (patch) | |
| tree | d551a3c2a674f921d986720e06786f5daba14eed /ext/mysqli/mysqli.c | |
| parent | e4adfe4f61cb54c4da6e8144f82d6f6cc9d6e797 (diff) | |
| download | php-git-ab4670ee53b8ef48e0a7f012f3bc26b2297df6c2.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 b5867a0efb..f4a98b6745 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -228,22 +228,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); |
