diff options
author | Georg Richter <georg@php.net> | 2003-01-08 11:00:06 +0000 |
---|---|---|
committer | Georg Richter <georg@php.net> | 2003-01-08 11:00:06 +0000 |
commit | 5312594a278e34d9eb77dd92dff531a5bc4d3e9a (patch) | |
tree | e872351bb6af2f0d55c4b7895a283927b35623cd /ext/mysql | |
parent | 2d4a4a99d39c2a93ed9238f7b0f91cface9eb020 (diff) | |
download | php-git-5312594a278e34d9eb77dd92dff531a5bc4d3e9a.tar.gz |
fixed bug #21498
Diffstat (limited to 'ext/mysql')
-rw-r--r-- | ext/mysql/php_mysql.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c index 60358e93b7..d5d3544061 100644 --- a/ext/mysql/php_mysql.c +++ b/ext/mysql/php_mysql.c @@ -663,11 +663,6 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /* ensure that the link did not die */ #if MYSQL_VERSION_ID > 32230 /* Use mysql_ping to ensure link is alive (and to reconnect if needed) */ if (mysql_ping(le->ptr)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Link to server lost, unable to reconnect"); - zend_hash_del(&EG(persistent_list), hashed_details, hashed_details_length+1); - efree(hashed_details); - MYSQL_DO_CONNECT_RETURN_FALSE(); - } #else /* Use mysql_stat() to check if server is alive */ handler=signal(SIGPIPE, SIG_IGN); #if defined(HAVE_MYSQL_ERRNO) && defined(CR_SERVER_GONE_ERROR) @@ -677,6 +672,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) if (!strcasecmp(mysql_stat(le->ptr), "mysql server has gone away")) { /* the link died */ #endif signal(SIGPIPE, handler); +#endif /* end mysql_ping */ #if MYSQL_VERSION_ID > 32199 /* this lets us set the port number */ if (mysql_real_connect(le->ptr, host, user, passwd, NULL, port, socket, client_flags)==NULL) { #else @@ -688,8 +684,9 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) MYSQL_DO_CONNECT_RETURN_FALSE(); } } +#if MYSQL_VERSION_ID < 32231 signal(SIGPIPE, handler); -#endif /* end Use mysql_ping ... */ +#endif mysql = (php_mysql_conn *) le->ptr; } |