[PHP-CVS] cvs: php-src /ext/mysql php_mysql.c

2007-04-14 Thread Antony Dovgal
tony2001Sat Apr 14 10:19:10 2007 UTC

  Modified files:  
/php-src/ext/mysql  php_mysql.c 
  Log:
  fix #41083 (mysql_ping() requires MYSQL_OPT_RECONNECT to be set since MySQL 
5.0.13)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql.c?r1=1.231r2=1.232diff_format=u
Index: php-src/ext/mysql/php_mysql.c
diff -u php-src/ext/mysql/php_mysql.c:1.231 php-src/ext/mysql/php_mysql.c:1.232
--- php-src/ext/mysql/php_mysql.c:1.231 Sat Feb 24 16:25:54 2007
+++ php-src/ext/mysql/php_mysql.c   Sat Apr 14 10:19:10 2007
@@ -18,7 +18,7 @@
+--+
 */
  
-/* $Id: php_mysql.c,v 1.231 2007/02/24 16:25:54 helly Exp $ */
+/* $Id: php_mysql.c,v 1.232 2007/04/14 10:19:10 tony2001 Exp $ */
 
 /* TODO:
  *
@@ -482,6 +482,9 @@
 #if MYSQL_VERSION_ID = 32230
void (*handler) (int);
 #endif
+#if MYSQL_VERSION_ID  50012
+   my_bool my_true = 1;
+#endif
zend_bool free_host=0, new_link=0;
long connect_timeout;
 
@@ -590,8 +593,14 @@
 #if MYSQL_VERSION_ID  32199 /* this lets us set the port number */
mysql_init(mysql-conn);
 
-   if (connect_timeout != -1)
+#if MYSQL_VERSION_ID  50012
+   /* Reconnect has been off by default since MySQL 5.0.3; 
+  this option is new in 5.0.13 and provides a way to 
set reconnection behavior explicitly. */
+   mysql_options(mysql-conn, MYSQL_OPT_RECONNECT, (const 
char *)my_true);
+#endif
+   if (connect_timeout != -1) {
mysql_options(mysql-conn, 
MYSQL_OPT_CONNECT_TIMEOUT, (const char *)connect_timeout);
+   }
 
if (mysql_real_connect(mysql-conn, host, user, 
passwd, NULL, port, socket, client_flags)==NULL) {
 #else
@@ -707,8 +716,15 @@
 #if MYSQL_VERSION_ID  32199 /* this lets us set the port number */
mysql_init(mysql-conn);
 
-   if (connect_timeout != -1)
-   mysql_options(mysql-conn, 
MYSQL_OPT_CONNECT_TIMEOUT, (const char *)connect_timeout);
+#if MYSQL_VERSION_ID  50012
+   /* Reconnect has been off by default since MySQL 5.0.3; 
+this option is new in 5.0.13 and provides a way to set 
reconnection behavior explicitly. */
+   mysql_options(mysql-conn, MYSQL_OPT_RECONNECT, (const char 
*)my_true);
+#endif
+
+   if (connect_timeout != -1) {
+   mysql_options(mysql-conn, MYSQL_OPT_CONNECT_TIMEOUT, 
(const char *)connect_timeout);
+   }
 
if (mysql_real_connect(mysql-conn, host, user, passwd, NULL, 
port, socket, client_flags)==NULL) {
 #else

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/mysql php_mysql.c

2007-04-14 Thread Antony Dovgal
tony2001Sat Apr 14 10:19:20 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
/php-src/ext/mysql  php_mysql.c 
  Log:
  MFH: fix #41083 (mysql_ping() requires MYSQL_OPT_RECONNECT to be set since 
MySQL 5.0.13)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.646r2=1.2027.2.547.2.647diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.646 php-src/NEWS:1.2027.2.547.2.647
--- php-src/NEWS:1.2027.2.547.2.646 Fri Apr 13 14:51:40 2007
+++ php-src/NEWSSat Apr 14 10:19:19 2007
@@ -1,6 +1,8 @@
 PHPNEWS
 |||
 ?? Apr 2007, PHP 5.2.2RC2
+- Fixed bug #41083 (mysql_ping() requires MYSQL_OPT_RECONNECT to be set since 
+  MySQL 5.0.13). (xiaojb at gmail dot com, Tony)
 - Fixed bug #41075 (memleak when creating default object caused exception). 
   (Dmitry)
 - Fixed bug #41063 (chdir doesn't like root paths). (Dmitry)
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql.c?r1=1.213.2.6.2.7r2=1.213.2.6.2.8diff_format=u
Index: php-src/ext/mysql/php_mysql.c
diff -u php-src/ext/mysql/php_mysql.c:1.213.2.6.2.7 
php-src/ext/mysql/php_mysql.c:1.213.2.6.2.8
--- php-src/ext/mysql/php_mysql.c:1.213.2.6.2.7 Sat Feb 24 02:17:25 2007
+++ php-src/ext/mysql/php_mysql.c   Sat Apr 14 10:19:19 2007
@@ -18,7 +18,7 @@
+--+
 */
  
-/* $Id: php_mysql.c,v 1.213.2.6.2.7 2007/02/24 02:17:25 helly Exp $ */
+/* $Id: php_mysql.c,v 1.213.2.6.2.8 2007/04/14 10:19:19 tony2001 Exp $ */
 
 /* TODO:
  *
@@ -487,6 +487,9 @@
 #if MYSQL_VERSION_ID = 32230
void (*handler) (int);
 #endif
+#if MYSQL_VERSION_ID  50012
+   my_bool my_true = 1;
+#endif
zval **z_host=NULL, **z_user=NULL, **z_passwd=NULL, **z_new_link=NULL, 
**z_client_flags=NULL;
zend_bool free_host=0, new_link=0;
long connect_timeout;
@@ -669,8 +672,14 @@
 #if MYSQL_VERSION_ID  32199 /* this lets us set the port number */
mysql_init(mysql-conn);
 
-   if (connect_timeout != -1)
+#if MYSQL_VERSION_ID  50012
+   /* Reconnect has been off by default since MySQL 5.0.3; 
+  this option is new in 5.0.13 and provides a way to 
set reconnection behavior explicitly. */
+   mysql_options(mysql-conn, MYSQL_OPT_RECONNECT, (const 
char *)my_true);
+#endif
+   if (connect_timeout != -1) {
mysql_options(mysql-conn, 
MYSQL_OPT_CONNECT_TIMEOUT, (const char *)connect_timeout);
+   }
 
if (mysql_real_connect(mysql-conn, host, user, 
passwd, NULL, port, socket, client_flags)==NULL) {
 #else
@@ -774,8 +783,15 @@
 #if MYSQL_VERSION_ID  32199 /* this lets us set the port number */
mysql_init(mysql-conn);
 
-   if (connect_timeout != -1)
-   mysql_options(mysql-conn, 
MYSQL_OPT_CONNECT_TIMEOUT, (const char *)connect_timeout);
+#if MYSQL_VERSION_ID  50012
+   /* Reconnect has been off by default since MySQL 5.0.3; 
+this option is new in 5.0.13 and provides a way to set 
reconnection behavior explicitly. */
+   mysql_options(mysql-conn, MYSQL_OPT_RECONNECT, (const char 
*)my_true);
+#endif
+
+   if (connect_timeout != -1) {
+   mysql_options(mysql-conn, MYSQL_OPT_CONNECT_TIMEOUT, 
(const char *)connect_timeout);
+   }
 
if (mysql_real_connect(mysql-conn, host, user, passwd, NULL, 
port, socket, client_flags)==NULL) {
 #else

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/mysqli mysqli_nonapi.c

2007-04-14 Thread Antony Dovgal
tony2001Sat Apr 14 10:35:00 2007 UTC

  Modified files:  
/php-src/ext/mysqli mysqli_nonapi.c 
  Log:
  set MYSQL_OPT_RECONNECT (see bug #41083)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_nonapi.c?r1=1.68r2=1.69diff_format=u
Index: php-src/ext/mysqli/mysqli_nonapi.c
diff -u php-src/ext/mysqli/mysqli_nonapi.c:1.68 
php-src/ext/mysqli/mysqli_nonapi.c:1.69
--- php-src/ext/mysqli/mysqli_nonapi.c:1.68 Mon Jan  1 09:29:25 2007
+++ php-src/ext/mysqli/mysqli_nonapi.c  Sat Apr 14 10:35:00 2007
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+
 
-  $Id: mysqli_nonapi.c,v 1.68 2007/01/01 09:29:25 sebastian Exp $ 
+  $Id: mysqli_nonapi.c,v 1.69 2007/04/14 10:35:00 tony2001 Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -39,6 +39,9 @@
char*hostname, *username, *passwd, *dbname, 
*socket;
int hostname_len, username_len, 
passwd_len, dbname_len, socket_len;
longport=0;
+#if MYSQL_VERSION_ID  50012
+   my_bool my_true = 1;
+#endif
 
if (getThis()  !ZEND_NUM_ARGS()) {
RETURN_NULL();
@@ -83,6 +86,10 @@
}
 #endif
 
+#if MYSQL_VERSION_ID  50012
+   mysql_options(mysql-mysql, MYSQL_OPT_RECONNECT, (const char 
*)my_true);
+#endif
+
if (mysql_real_connect(mysql-mysql, hostname, username, passwd, 
dbname, port, socket, CLIENT_MULTI_RESULTS) == NULL) {
/* Save error messages */
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/mysqli mysqli_nonapi.c

2007-04-14 Thread Antony Dovgal
tony2001Sat Apr 14 10:35:05 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/mysqli mysqli_nonapi.c 
  Log:
  MFH
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_nonapi.c?r1=1.54.2.7.2.2r2=1.54.2.7.2.3diff_format=u
Index: php-src/ext/mysqli/mysqli_nonapi.c
diff -u php-src/ext/mysqli/mysqli_nonapi.c:1.54.2.7.2.2 
php-src/ext/mysqli/mysqli_nonapi.c:1.54.2.7.2.3
--- php-src/ext/mysqli/mysqli_nonapi.c:1.54.2.7.2.2 Mon Jan  1 09:36:03 2007
+++ php-src/ext/mysqli/mysqli_nonapi.c  Sat Apr 14 10:35:05 2007
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+
 
-  $Id: mysqli_nonapi.c,v 1.54.2.7.2.2 2007/01/01 09:36:03 sebastian Exp $ 
+  $Id: mysqli_nonapi.c,v 1.54.2.7.2.3 2007/04/14 10:35:05 tony2001 Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -39,6 +39,9 @@
char*hostname = NULL, *username=NULL, 
*passwd=NULL, *dbname=NULL, *socket=NULL;
unsigned inthostname_len = 0, username_len = 0, passwd_len 
= 0, dbname_len = 0, socket_len = 0;
longport=0;
+#if MYSQL_VERSION_ID  50012
+   my_bool my_true = 1;
+#endif
 
if (getThis()  !ZEND_NUM_ARGS()) {
RETURN_NULL();
@@ -84,6 +87,10 @@
}
 #endif
 
+#if MYSQL_VERSION_ID  50012
+   mysql_options(mysql-mysql, MYSQL_OPT_RECONNECT, (const char 
*)my_true);
+#endif
+
if (!socket) {
socket = MyG(default_socket);
}

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/mysqli mysqli_api.c mysqli_nonapi.c

2007-04-14 Thread Antony Dovgal
tony2001Sat Apr 14 10:42:41 2007 UTC

  Modified files:  
/php-src/ext/mysqli mysqli_nonapi.c mysqli_api.c 
  Log:
  use default socket (removed by mistake?)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_nonapi.c?r1=1.69r2=1.70diff_format=u
Index: php-src/ext/mysqli/mysqli_nonapi.c
diff -u php-src/ext/mysqli/mysqli_nonapi.c:1.69 
php-src/ext/mysqli/mysqli_nonapi.c:1.70
--- php-src/ext/mysqli/mysqli_nonapi.c:1.69 Sat Apr 14 10:35:00 2007
+++ php-src/ext/mysqli/mysqli_nonapi.c  Sat Apr 14 10:42:41 2007
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+
 
-  $Id: mysqli_nonapi.c,v 1.69 2007/04/14 10:35:00 tony2001 Exp $ 
+  $Id: mysqli_nonapi.c,v 1.70 2007/04/14 10:42:41 tony2001 Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -90,6 +90,10 @@
mysql_options(mysql-mysql, MYSQL_OPT_RECONNECT, (const char 
*)my_true);
 #endif
 
+   if (!socket) {
+   socket = MyG(default_socket);
+   }
+
if (mysql_real_connect(mysql-mysql, hostname, username, passwd, 
dbname, port, socket, CLIENT_MULTI_RESULTS) == NULL) {
/* Save error messages */
 
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_api.c?r1=1.145r2=1.146diff_format=u
Index: php-src/ext/mysqli/mysqli_api.c
diff -u php-src/ext/mysqli/mysqli_api.c:1.145 
php-src/ext/mysqli/mysqli_api.c:1.146
--- php-src/ext/mysqli/mysqli_api.c:1.145   Thu Mar  8 22:57:02 2007
+++ php-src/ext/mysqli/mysqli_api.c Sat Apr 14 10:42:41 2007
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+
 
-  $Id: mysqli_api.c,v 1.145 2007/03/08 22:57:02 stas Exp $ 
+  $Id: mysqli_api.c,v 1.146 2007/04/14 10:42:41 tony2001 Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -1458,6 +1458,10 @@
flags ^= CLIENT_LOCAL_FILES;
}
 
+   if (!socket) {
+   socket = MyG(default_socket);
+   }
+
if (mysql_real_connect(mysql-mysql, hostname, username, passwd, dbname 
,port, socket ,flags) == NULL) {
php_mysqli_set_error(mysql_errno(mysql-mysql), (char *) 
mysql_error(mysql-mysql) TSRMLS_CC);
php_mysqli_throw_sql_exception( mysql-mysql-net.sqlstate, 
mysql-mysql-net.last_errno TSRMLS_CC,

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/dba/libcdb cdb.c

2007-04-14 Thread Marcus Boerger
helly   Sat Apr 14 11:14:40 2007 UTC

  Modified files:  
/php-src/ext/dba/libcdb cdb.c 
  Log:
  - Fix warning
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dba/libcdb/cdb.c?r1=1.13r2=1.14diff_format=u
Index: php-src/ext/dba/libcdb/cdb.c
diff -u php-src/ext/dba/libcdb/cdb.c:1.13 php-src/ext/dba/libcdb/cdb.c:1.14
--- php-src/ext/dba/libcdb/cdb.c:1.13   Mon Jan  1 09:29:23 2007
+++ php-src/ext/dba/libcdb/cdb.cSat Apr 14 11:14:40 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: cdb.c,v 1.13 2007/01/01 09:29:23 sebastian Exp $ */
+/* $Id: cdb.c,v 1.14 2007/04/14 11:14:40 helly Exp $ */
 
 /* incorporated from D.J.Bernstein's cdb-0.75 (http://cr.yp.to/cdb.html)*/
 
@@ -68,7 +68,7 @@
 uint32 cdb_hash(char *buf, unsigned int len)
 {
uint32 h;
-   const unsigned char * b = buf;
+   const unsigned char * b = (unsigned char *)buf;
 
h = CDB_HASHSTART;
while (len--) {
@@ -189,6 +189,6 @@
 /* {{{ cdb_version */
 char *cdb_version() 
 {
-   return 0.75, $Revision: 1.13 $;
+   return 0.75, $Revision: 1.14 $;
 }
 /* }}} */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/dba/libcdb cdb.c

2007-04-14 Thread Marcus Boerger
helly   Sat Apr 14 11:15:13 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/dba/libcdb cdb.c 
  Log:
  - MFH Fix warning
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dba/libcdb/cdb.c?r1=1.10.2.1.2.2r2=1.10.2.1.2.3diff_format=u
Index: php-src/ext/dba/libcdb/cdb.c
diff -u php-src/ext/dba/libcdb/cdb.c:1.10.2.1.2.2 
php-src/ext/dba/libcdb/cdb.c:1.10.2.1.2.3
--- php-src/ext/dba/libcdb/cdb.c:1.10.2.1.2.2   Mon Jan  1 09:36:00 2007
+++ php-src/ext/dba/libcdb/cdb.cSat Apr 14 11:15:13 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: cdb.c,v 1.10.2.1.2.2 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: cdb.c,v 1.10.2.1.2.3 2007/04/14 11:15:13 helly Exp $ */
 
 /* incorporated from D.J.Bernstein's cdb-0.75 (http://cr.yp.to/cdb.html)*/
 
@@ -68,7 +68,7 @@
 uint32 cdb_hash(char *buf, unsigned int len)
 {
uint32 h;
-   const unsigned char * b = buf;
+   const unsigned char * b = (unsigned char *)buf;
 
h = CDB_HASHSTART;
while (len--) {
@@ -189,6 +189,6 @@
 /* {{{ cdb_version */
 char *cdb_version() 
 {
-   return 0.75, $Revision: 1.10.2.1.2.2 $;
+   return 0.75, $Revision: 1.10.2.1.2.3 $;
 }
 /* }}} */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/mysqli mysqli_nonapi.c

2007-04-14 Thread Andrey Hristov
  Hi Tony,
Antony Dovgal wrote:
 tony2001  Sat Apr 14 10:35:05 2007 UTC
 
   Modified files:  (Branch: PHP_5_2)
 /php-src/ext/mysqli   mysqli_nonapi.c 
   Log:
   MFH
   
   
 http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_nonapi.c?r1=1.54.2.7.2.2r2=1.54.2.7.2.3diff_format=u
 Index: php-src/ext/mysqli/mysqli_nonapi.c
 diff -u php-src/ext/mysqli/mysqli_nonapi.c:1.54.2.7.2.2 
 php-src/ext/mysqli/mysqli_nonapi.c:1.54.2.7.2.3
 --- php-src/ext/mysqli/mysqli_nonapi.c:1.54.2.7.2.2   Mon Jan  1 09:36:03 2007
 +++ php-src/ext/mysqli/mysqli_nonapi.cSat Apr 14 10:35:05 2007
 @@ -15,7 +15,7 @@
| Author: Georg Richter [EMAIL PROTECTED]
 |
+--+
  
 -  $Id: mysqli_nonapi.c,v 1.54.2.7.2.2 2007/01/01 09:36:03 sebastian Exp $ 
 +  $Id: mysqli_nonapi.c,v 1.54.2.7.2.3 2007/04/14 10:35:05 tony2001 Exp $ 
  */
  
  #ifdef HAVE_CONFIG_H
 @@ -39,6 +39,9 @@
   char*hostname = NULL, *username=NULL, 
 *passwd=NULL, *dbname=NULL, *socket=NULL;
   unsigned inthostname_len = 0, username_len = 0, passwd_len 
 = 0, dbname_len = 0, socket_len = 0;
   longport=0;
 +#if MYSQL_VERSION_ID  50012
 + my_bool my_true = 1;
 +#endif
  
   if (getThis()  !ZEND_NUM_ARGS()) {
   RETURN_NULL();
 @@ -84,6 +87,10 @@
   }
  #endif
  
 +#if MYSQL_VERSION_ID  50012
 + mysql_options(mysql-mysql, MYSQL_OPT_RECONNECT, (const char 
 *)my_true);
 +#endif
 +
   if (!socket) {
   socket = MyG(default_socket);
   }
 

doing this is definitely bad. Probably it makes mysql_ping() to work but
having reconnect being disabled has its reasons. Once connection is
broken TXs are lost, connection variables too. Reconnecting under the
hood is bad behavior. mysql_ping() can work without mysql-reconnect
being set to 1. It will just won't reconnect and return an error. Which
I think is pretty normal. The app should check and decide whether to
reconnect or die. Thus, please _revert_ the patches you committed to
ext/mysql and ext/mysqli. The report is bogus.
Even if the report wasn't bogus, the fix is not complete, as for
5.0.3  libmysql  5.0.13 , it doesn't work.

Andrey

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/gd/libgd gd.c

2007-04-14 Thread Pierre-Alain Joye
pajoye  Sat Apr 14 17:30:51 2007 UTC

  Modified files:  
/php-src/ext/gd/libgd   gd.c 
  Log:
  -  libgd #74, gdImageFilledArc, huge CPU usage with large angles
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd.c?r1=1.103r2=1.104diff_format=u
Index: php-src/ext/gd/libgd/gd.c
diff -u php-src/ext/gd/libgd/gd.c:1.103 php-src/ext/gd/libgd/gd.c:1.104
--- php-src/ext/gd/libgd/gd.c:1.103 Sat Mar 10 01:23:42 2007
+++ php-src/ext/gd/libgd/gd.c   Sat Apr 14 17:30:51 2007
@@ -1643,6 +1643,14 @@
int lx = 0, ly = 0;
int fx = 0, fy = 0;
 
+   if (s  360) {
+   s = s % 360;
+   }
+
+   if (e  360) {
+   e = e % 360;
+   }
+
while (s0) {
s += 360;
}

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/gd/libgd gd.c

2007-04-14 Thread Pierre-Alain Joye
pajoye  Sat Apr 14 17:33:15 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
/php-src/ext/gd/libgd   gd.c 
  Log:
  - MFH: libgd #74, gdImageFilledArc, huge CPU usage with large angles
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.647r2=1.2027.2.547.2.648diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.647 php-src/NEWS:1.2027.2.547.2.648
--- php-src/NEWS:1.2027.2.547.2.647 Sat Apr 14 10:19:19 2007
+++ php-src/NEWSSat Apr 14 17:33:15 2007
@@ -27,8 +27,10 @@
  colors (Rob Leslie)
   . Improved thread safety of the gif support (Roman Nemecek, Nuno, Pierre)
. Use the dimension of the GIF frame to create the destination image 
(Pierre)
-   . Load only once the local color map (Pierre)
+   . Load only once the local color map from a GIF data (Pierre)
   . Improved thread safety of the freetype cache (Scott MacVicar, Nuno, Pierre)
+   . imagearc huge CPU usage with large angles (Pierre)
+
 - Upgraded libraries bundled in the Windows distribution. (Edin)
   . c-client (imap) to version 2006e
   . libpq (PostgreSQL) to version 8.2.3
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd.c?r1=1.90.2.1.2.10r2=1.90.2.1.2.11diff_format=u
Index: php-src/ext/gd/libgd/gd.c
diff -u php-src/ext/gd/libgd/gd.c:1.90.2.1.2.10 
php-src/ext/gd/libgd/gd.c:1.90.2.1.2.11
--- php-src/ext/gd/libgd/gd.c:1.90.2.1.2.10 Fri Mar  9 01:18:40 2007
+++ php-src/ext/gd/libgd/gd.c   Sat Apr 14 17:33:15 2007
@@ -1645,6 +1645,14 @@
int lx = 0, ly = 0;
int fx = 0, fy = 0;
 
+   if (s  360) {
+   s = s % 360;
+   }
+
+   if (e  360) {
+   e = e % 360;
+   }
+
while (s0) {
s += 360;
}

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_4_4) / NEWS /ext/gd/libgd gd.c

2007-04-14 Thread Pierre-Alain Joye
pajoye  Sat Apr 14 17:38:38 2007 UTC

  Modified files:  (Branch: PHP_4_4)
/php-srcNEWS 
/php-src/ext/gd/libgd   gd.c 
  Log:
  - MFH: libgd #74, gdImageFilledArc, huge CPU usage with large angles
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.1247.2.920.2.222r2=1.1247.2.920.2.223diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.920.2.222 php-src/NEWS:1.1247.2.920.2.223
--- php-src/NEWS:1.1247.2.920.2.222 Fri Apr 13 00:55:48 2007
+++ php-src/NEWSSat Apr 14 17:38:38 2007
@@ -3,7 +3,9 @@
 ?? ??? 2007, Version 4.4.7
 - Fixed bug #38236 (binary data gets corrupted on multipart/formdata POST)
   (patch by [EMAIL PROTECTED])
-   
+- Fixed huge CPU usage in imagearc when used with large angles (Pierre)
+  (libgd bug #74)
+
 11 Apr 2007, Version 4.4.7RC1
 - Fixed MOPB-33-2007 (PHP mail() Message ASCIIZ Byte Truncation). (Ilia)
 - Fixed MOPB-32-2007 (Double free inside session_decode()). (Ilia)
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd.c?r1=1.24.2.36.2.1r2=1.24.2.36.2.2diff_format=u
Index: php-src/ext/gd/libgd/gd.c
diff -u php-src/ext/gd/libgd/gd.c:1.24.2.36.2.1 
php-src/ext/gd/libgd/gd.c:1.24.2.36.2.2
--- php-src/ext/gd/libgd/gd.c:1.24.2.36.2.1 Fri Sep 30 21:05:04 2005
+++ php-src/ext/gd/libgd/gd.c   Sat Apr 14 17:38:38 2007
@@ -1607,6 +1607,14 @@
int lx = 0, ly = 0;
int fx = 0, fy = 0;
 
+   if (s  360) {
+   s = s % 360;
+   }
+
+   if (e  360) {
+   e = e % 360;
+   }
+
while (s0) {
s += 360;
}

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS

2007-04-14 Thread Pierre-Alain Joye
pajoye  Sat Apr 14 17:39:14 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  - add reference to the initial report (helps the packager)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.648r2=1.2027.2.547.2.649diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.648 php-src/NEWS:1.2027.2.547.2.649
--- php-src/NEWS:1.2027.2.547.2.648 Sat Apr 14 17:33:15 2007
+++ php-src/NEWSSat Apr 14 17:39:13 2007
@@ -29,7 +29,7 @@
. Use the dimension of the GIF frame to create the destination image 
(Pierre)
. Load only once the local color map from a GIF data (Pierre)
   . Improved thread safety of the freetype cache (Scott MacVicar, Nuno, Pierre)
-   . imagearc huge CPU usage with large angles (Pierre)
+   . imagearc huge CPU usage with large angles, libgd bug #74 (Pierre)
 
 - Upgraded libraries bundled in the Windows distribution. (Edin)
   . c-client (imap) to version 2006e



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/mysqli mysqli_nonapi.c

2007-04-14 Thread Antony Dovgal

On 04/14/2007 07:30 PM, Andrey Hristov wrote:

doing this is definitely bad. Probably it makes mysql_ping() to work but
having reconnect being disabled has its reasons. 


http://php.net/mysqli_ping
mysqli_ping, mysqli-ping() — Pings a server connection, or *tries to reconnect 
if the connection has gone down*


Once connection is
broken TXs are lost, connection variables too. Reconnecting under the
hood is bad behavior. mysql_ping() can work without mysql-reconnect
being set to 1. It will just won't reconnect and return an error. Which
I think is pretty normal. 


It's not because it's expected to reconnect.


The app should check and decide whether to
reconnect or die. Thus, please _revert_ the patches you committed to
ext/mysql and ext/mysqli. The report is bogus.
Even if the report wasn't bogus, the fix is not complete, as for
5.0.3  libmysql  5.0.13 , it doesn't work.


As far as I understand, there is no way to fix it in versions between 5.0.3 and 
5.0.13 because of MySQLI API breakage.

--
Wbr, 
Antony Dovgal


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/mysqli mysqli_nonapi.c

2007-04-14 Thread Andrey Hristov
  Hi,
Antony Dovgal wrote:
 On 04/14/2007 07:30 PM, Andrey Hristov wrote:
 doing this is definitely bad. Probably it makes mysql_ping() to work but
 having reconnect being disabled has its reasons. 
 
 http://php.net/mysqli_ping
 mysqli_ping, mysqli-ping() — Pings a server connection, or *tries to
 reconnect if the connection has gone down*

Then the fix is wrong, it should set reconnect only for the mysql_ping
call, if reconnect is off.

 Once connection is
 broken TXs are lost, connection variables too. Reconnecting under the
 hood is bad behavior. mysql_ping() can work without mysql-reconnect
 being set to 1. It will just won't reconnect and return an error. Which
 I think is pretty normal. 
 
 It's not because it's expected to reconnect.
 
 The app should check and decide whether to
 reconnect or die. Thus, please _revert_ the patches you committed to
 ext/mysql and ext/mysqli. The report is bogus.
 Even if the report wasn't bogus, the fix is not complete, as for
 5.0.3  libmysql  5.0.13 , it doesn't work.
 
 As far as I understand, there is no way to fix it in versions between
 5.0.3 and 5.0.13 because of MySQLI API breakage.
 

It's just about setting mysql-reconnect in this cases. This versions
won't change anyway, they are released.

Andrey

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/mysqli mysqli_nonapi.c

2007-04-14 Thread Antony Dovgal

On 04/15/2007 12:11 AM, Andrey Hristov wrote:

http://php.net/mysqli_ping
mysqli_ping, mysqli-ping() — Pings a server connection, or *tries to
reconnect if the connection has gone down*


Then the fix is wrong, it should set reconnect only for the mysql_ping
call, if reconnect is off.


Could you please be more verbose? What's wrong setting it always? 
The docs say it's off by default.



As far as I understand, there is no way to fix it in versions between
5.0.3 and 5.0.13 because of MySQLI API breakage.



It's just about setting mysql-reconnect in this cases. This versions
won't change anyway, they are released.


Right. We need to set it somehow, but MYSQL_OPT_RECONNECT is missing in these 
versions.
If you know how to do it - let me know.

--
Wbr, 
Antony Dovgal


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php