Georg,
That sounds great. There was a memory leak fix in that function for some
users of unbuffered queries that you might want to leave in. I propose
the following function which is also a placeholder/reminder for the
future:
/* {{{ _restore_connection_defaults
*/
static int _restore_connection_defaults(zend_rsrc_list_entry *rsrc
TSRMLS_DC)
{
php_mysql_conn *link;
/* 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;
}
}
/* reset the persistent connection */
/* mysql_reset_connection(&link->conn) -- TODO */
/* - not yet available in mysqllib */
/* - needed for bug #12513 */
return 0;
}
/* }}} */
PHP_RSHUTDOWN_FUNCTION(mysql)
{
zend_hash_apply(&EG(persistent_list),
(apply_func_t)_restore_connection_defaults TSRMLS_CC);
...
I don't use unbuffered queries, so I really don't care either way. But
in my haste to get rid of that function, I don't want to be responsible
for the removal of other unrelated fixes.
Sincerely,
Steven Roussey
http://Network54.com/
> -----Original Message-----
> From: Georg Richter [mailto:[EMAIL PROTECTED]]
> On Thursday 14 November 2002 19:58, Steven Roussey wrote:
> > Personally, I'd like to see the MySQL extension work again.
> >
> > The issue: persistent connections are broken when used heavily.
> >
> > Simple fix: _restore_connection_defaults() can be eliminated until
fixed
> > properly.
>
> As discussed with Derick and Zak we will remove this stuff and wait
until
> a
> resolution inside the api is available (new api-function:
> mysql_reset_connection). To unset all these things (and we can't unset
> all)
> needs more time than to establish a new connection.
>
> Additionally we should add some warnings into the mysql_pconnect
chapter.
>
> Regards
>
> Georg
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php