cvs: php4(PHP_4_3) /ext/mysql php_mysql.c
| From: | Georg Richter | Date: | Wed, 08 Jan 2003 11:15:14 +0000 |
| Subject: | cvs: php4(PHP_4_3) /ext/mysql php_mysql.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-17740@lists.php.net to get a copy of this message | ||
georg Wed Jan 8 06:15:14 2003 EDT
Modified files: (Branch: PHP_4_3)
/php4/ext/mysql php_mysql.c
Log:
fixed bug 21498
Index: php4/ext/mysql/php_mysql.c
diff -u php4/ext/mysql/php_mysql.c:1.174.2.7 php4/ext/mysql/php_mysql.c:1.174.2.8
--- php4/ext/mysql/php_mysql.c:1.174.2.7 Mon Jan 6 09:12:40 2003
+++ php4/ext/mysql/php_mysql.c Wed Jan 8 06:15:12 2003
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_mysql.c,v 1.174.2.7 2003/01/06 14:12:40 georg Exp $ */
+/* $Id: php_mysql.c,v 1.174.2.8 2003/01/08 11:15:12 georg Exp $ */
/* TODO:
*
@@ -663,11 +663,6 @@
/* 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 @@
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 @@
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;
}