[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2008-10-27 Thread changelog
changelog   Tue Oct 28 01:33:37 2008 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.3210r2=1.3211diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.3210 php-src/ChangeLog:1.3211
--- php-src/ChangeLog:1.3210Mon Oct 27 01:34:12 2008
+++ php-src/ChangeLog   Tue Oct 28 01:33:33 2008
@@ -1,3 +1,136 @@
+2008-10-27  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  ext/mysql/php_mysql.c:
+  
+  Fixed compiler warning
+
+2008-10-27  Johannes Schlüter  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  NEWS:
+  Fix NEWS
+
+* (PHP_5_3)
+  NEWS
+  ext/pdo_mysql/mysql_driver.c
+  ext/pdo_mysql/pdo_mysql.c
+  ext/pdo_mysql/php_pdo_mysql_int.h
+  ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt:
+  MFH: Fix #44135 (PDO MySQL does not support CLIENT_FOUND_ROWS)
+
+* ext/pdo_mysql/mysql_driver.c
+  ext/pdo_mysql/pdo_mysql.c
+  ext/pdo_mysql/php_pdo_mysql_int.h
+  ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt:
+  Fix #44135 (PDO MySQL does not support CLIENT_FOUND_ROWS)
+
+* (PHP_5_3)
+  NEWS:
+  BFN
+
+* (PHP_5_3)
+  ext/mysqli/tests/mysqli_insert_id_variation.phpt
+  ext/mysqlnd/mysqlnd.c
+  ext/mysqlnd/mysqlnd_loaddata.c
+  ext/mysqlnd/mysqlnd_ps.c:
+  MFH: Fix #46285 (lastInsertId() returns 0 when a deferenced 
PDOStatement
+  is
+  executed)
+
+* ext/mysqli/tests/mysqli_insert_id_variation.phpt
+  ext/mysqli/tests/mysqli_insert_id_variation.phpt:
+  
+  Fix #46285 (lastInsertId() returns 0 when a deferenced PDOStatement is
+  executed)
+
+* ext/mysqlnd/mysqlnd.c
+  ext/mysqlnd/mysqlnd_loaddata.c
+  ext/mysqlnd/mysqlnd_ps.c:
+  Fix #46285 (lastInsertId() returns 0 when a deferenced PDOStatement is
+  executed)
+
+2008-10-27  Andrey Hristov  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  ext/mysqlnd/mysqlnd_result.c:
+  MFH:
+  Fix overusage of memory when the result set is empty. Then no memory will
+  be
+  allocated compared to before. Also grow (realloc) the rset with 10%
+  instead
+  of 33% - more reallocs but better memory usage. Of course later theres is
+  a
+  realloc to shrink the rset t ofree it from unused rows but its better to
+  to eat too much at once.
+
+* ext/mysqlnd/mysqlnd_result.c:
+  Fix overusage of memory when the result set is empty. Then no memory will
+  be
+  allocated compared to before. Also grow (realloc) the rset with 10%
+  instead
+  of 33% - more reallocs but better memory usage. Of course later theres is
+  a
+  realloc to shrink the rset t ofree it from unused rows but its better to
+  to eat too much at once.
+
+2008-10-27  Arnaud Le Blanc  [EMAIL PROTECTED]
+
+* ZendEngine2/zend_alloc.h:
+  Fix compile error
+
+2008-10-27  Andrey Hristov  [EMAIL PROTECTED]
+
+* ext/mysqlnd/mysqlnd_statistics.c
+  ext/mysqlnd/mysqlnd_statistics.c:
+  Fix a name
+
+* (PHP_5_2)
+  ext/mysqli/mysqli_api.c
+  ext/mysqli/mysqli_nonapi.c:
+  MFH: Fix an issue with mysql.default_port not being used
+
+* (PHP_5_3)
+  ext/mysqli/mysqli_nonapi.c
+  ext/mysqli/tests/bug34810.phpt
+  ext/mysqli/tests/mysqli_connect_oo_defaults.phpt
+  ext/mysqli/tests/mysqli_constants.phpt
+  ext/mysqli/tests/mysqli_get_client_stats.phpt:
+  MFH: Fix an issue with mysqli.default_port not being used
+
+* ext/mysqli/tests/bug34810.phpt
+  ext/mysqli/tests/mysqli_connect_oo_defaults.phpt
+  ext/mysqli/tests/mysqli_constants.phpt
+  ext/mysqli/tests/mysqli_get_client_stats.phpt:
+  Fix tests
+
+* ext/mysqli/mysqli_nonapi.c:
+  Fix bug found in a test. mysqli.default_port wasn't used
+
+2008-10-27  Hannes Magnusson  [EMAIL PROTECTED]
+
+* tests/basic/bug20539.phpt:
+  Improve test and remove the temporary session file created by the skipif
+  check
+
+2008-10-27  Andrey Hristov  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  ext/mysql/php_mysql.c
+  ext/mysqli/mysqli_nonapi.c:
+  MFH:
+  Warning if the library API version differs from the headers used to
+  compile.
+  Patch versions are not considered but major.minor
+  Fix build of ext/mysql with 4.0.x and pre.
+
+* ext/mysql/php_mysql.c
+  ext/mysqli/mysqli_nonapi.c:
+  Warning if the library API version differs from the headers used to
+  compile.
+  Patch versions are not considered but major.minor
+  Fix build of ext/mysql with 4.0.x and pre.
+
 2008-10-26  Felipe Pena  [EMAIL PROTECTED]
 
 * (PHP_5_3)
@@ -9578,7 +9711,7 @@
 
 * sapi/litespeed/lsapi_main.c
   sapi/litespeed/lsapilib.c:
-  - Added missing $Id: ChangeLog,v 1.3210 2008/10/27 01:34:12 changelog 
Exp $ tags and nuked c++ comments
+  - Added missing $Id: ChangeLog,v 1.3211 2008/10/28 01:33:33 

[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog

2008-10-27 Thread changelog
changelog   Tue Oct 28 01:33:45 2008 UTC

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1386r2=1.1387diff_format=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.1386 ZendEngine2/ChangeLog:1.1387
--- ZendEngine2/ChangeLog:1.1386Sat Oct 25 01:32:20 2008
+++ ZendEngine2/ChangeLog   Tue Oct 28 01:33:45 2008
@@ -1,3 +1,8 @@
+2008-10-27  Arnaud Le Blanc  [EMAIL PROTECTED]
+
+* zend_alloc.h:
+  Fix compile error
+
 2008-10-24  Antony Dovgal  [EMAIL PROTECTED]
 
 * tests/bug46381.phpt
@@ -26186,7 +26191,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.1386 2008/10/25 01:32:20 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.1387 2008/10/28 01:33:45 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -27910,7 +27915,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.1386 2008/10/25 01:32:20 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.1387 2008/10/28 01:33:45 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 




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

2008-10-27 Thread Andrey Hristov
andrey  Mon Oct 27 12:07:35 2008 UTC

  Modified files:  
/php-src/ext/mysql  php_mysql.c 
/php-src/ext/mysqli mysqli_nonapi.c 
  Log:
  Warning if the library API version differs from the headers used to compile.
  Patch versions are not considered but major.minor
  Fix build of ext/mysql with 4.0.x and pre.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql.c?r1=1.266r2=1.267diff_format=u
Index: php-src/ext/mysql/php_mysql.c
diff -u php-src/ext/mysql/php_mysql.c:1.266 php-src/ext/mysql/php_mysql.c:1.267
--- php-src/ext/mysql/php_mysql.c:1.266 Tue Oct 21 22:05:30 2008
+++ php-src/ext/mysql/php_mysql.c   Mon Oct 27 12:07:35 2008
@@ -18,7 +18,7 @@
+--+
 */
  
-/* $Id: php_mysql.c,v 1.266 2008/10/21 22:05:30 lbarnaud Exp $ */
+/* $Id: php_mysql.c,v 1.267 2008/10/27 12:07:35 andrey Exp $ */
 
 /* TODO:
  *
@@ -124,10 +124,14 @@
 #endif
 
 
+#ifdef CLIENT_MULTI_STATEMENTS
 #define MYSQL_DISABLE_MQ if (mysql-multi_query) { \
mysql_set_server_option(mysql-conn, 
MYSQL_OPTION_MULTI_STATEMENTS_OFF); \
mysql-multi_query = 0; \
-} 
+}
+#else
+#define MYSQL_DISABLE_MQ
+#endif
 
 
 /* {{{ mysql_functions[]
@@ -627,6 +631,13 @@
zend_bool free_host=0, new_link=0;
long connect_timeout;
 
+#if !defined(MYSQL_USE_MYSQLND)
+   if ((MYSQL_VERSION_ID / 100) != (mysql_get_client_version() / 100)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING,
+   Headers and client library 
minor version mismatch. Headers:%d Library:%d,
+   MYSQL_VERSION_ID, 
mysql_get_client_version());
+   }
+#endif
 
connect_timeout = MySG(connect_timeout);
 
@@ -682,8 +693,9 @@
client_flags ^= CLIENT_LOCAL_FILES;
}
 
+#ifdef CLIENT_MULTI_STATEMENTS
client_flags = ~CLIENT_MULTI_STATEMENTS;   /* don't allow 
multi_queries via connect parameter */
-
+#endif
hashed_details_length = spprintf(hashed_details, 0, 
mysql_%s_%s_%s_%ld, SAFE_STRING(host_and_port), SAFE_STRING(user), 
SAFE_STRING(passwd), client_flags);
}
 
@@ -735,7 +747,11 @@
/* create the link */
mysql = (php_mysql_conn *) 
malloc(sizeof(php_mysql_conn));
mysql-active_result_id = 0;
+#ifdef CLIENT_MULTI_STATEMENTS
mysql-multi_query = client_flags  
CLIENT_MULTI_STATEMENTS? 1:0;
+#else
+   mysql-multi_query = 0;
+#endif
 #ifndef MYSQL_USE_MYSQLND
mysql-conn = mysql_init(NULL);
 #else
@@ -800,7 +816,11 @@
}
mysql = (php_mysql_conn *) le-ptr;
mysql-active_result_id = 0;
+#ifdef CLIENT_MULTI_STATEMENTS
mysql-multi_query = client_flags  
CLIENT_MULTI_STATEMENTS? 1:0;
+#else
+   mysql-multi_query = 0;
+#endif
/* ensure that the link did not die */
 #if defined(MYSQL_USE_MYSQLND)
mysqlnd_end_psession(mysql-conn);
@@ -882,7 +902,11 @@
 
mysql = (php_mysql_conn *) emalloc(sizeof(php_mysql_conn));
mysql-active_result_id = 0;
+#ifdef CLIENT_MULTI_STATEMENTS
mysql-multi_query = 1;
+#else
+   mysql-multi_query = 0;
+#endif
 #ifndef MYSQL_USE_MYSQLND
mysql-conn = mysql_init(NULL);
 #else
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_nonapi.c?r1=1.86r2=1.87diff_format=u
Index: php-src/ext/mysqli/mysqli_nonapi.c
diff -u php-src/ext/mysqli/mysqli_nonapi.c:1.86 
php-src/ext/mysqli/mysqli_nonapi.c:1.87
--- php-src/ext/mysqli/mysqli_nonapi.c:1.86 Mon Aug 11 12:32:47 2008
+++ php-src/ext/mysqli/mysqli_nonapi.c  Mon Oct 27 12:07:35 2008
@@ -17,7 +17,7 @@
   |  Ulf Wendel [EMAIL PROTECTED]
 |
   +--+
 
-  $Id: mysqli_nonapi.c,v 1.86 2008/08/11 12:32:47 johannes Exp $ 
+  $Id: mysqli_nonapi.c,v 1.87 2008/10/27 12:07:35 andrey Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -61,6 +61,14 @@
zend_rsrc_list_entry*le;
mysqli_plist_entry *plist = NULL;
 
+#if !defined(MYSQL_USE_MYSQLND)
+   if ((MYSQL_VERSION_ID / 100) != (mysql_get_client_version() / 100)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING,
+   Headers and client library 
minor version mismatch. Headers:%d Library:%d,
+   MYSQL_VERSION_ID, 
mysql_get_client_version());
+   }
+#endif
+
if (getThis()  !ZEND_NUM_ARGS()  in_ctor) {
RETURN_NULL();
}



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



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

2008-10-27 Thread Andrey Hristov
andrey  Mon Oct 27 12:09:37 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysql  php_mysql.c 
/php-src/ext/mysqli mysqli_nonapi.c 
  Log:
  MFH:
  Warning if the library API version differs from the headers used to compile.
  Patch versions are not considered but major.minor
  Fix build of ext/mysql with 4.0.x and pre.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql.c?r1=1.213.2.6.2.16.2.28r2=1.213.2.6.2.16.2.29diff_format=u
Index: php-src/ext/mysql/php_mysql.c
diff -u php-src/ext/mysql/php_mysql.c:1.213.2.6.2.16.2.28 
php-src/ext/mysql/php_mysql.c:1.213.2.6.2.16.2.29
--- php-src/ext/mysql/php_mysql.c:1.213.2.6.2.16.2.28   Tue Oct 21 22:07:42 2008
+++ php-src/ext/mysql/php_mysql.c   Mon Oct 27 12:09:36 2008
@@ -18,7 +18,7 @@
+--+
 */
  
-/* $Id: php_mysql.c,v 1.213.2.6.2.16.2.28 2008/10/21 22:07:42 lbarnaud Exp $ */
+/* $Id: php_mysql.c,v 1.213.2.6.2.16.2.29 2008/10/27 12:09:36 andrey Exp $ */
 
 /* TODO:
  *
@@ -130,10 +130,14 @@
 static MYSQLND_QCACHE  *mysql_mysqlnd_qcache;
 #endif
 
+#if MYSQL_VERSION_ID = 40101
 #define MYSQL_DISABLE_MQ if (mysql-multi_query) { \
mysql_set_server_option(mysql-conn, 
MYSQL_OPTION_MULTI_STATEMENTS_OFF); \
mysql-multi_query = 0; \
 } 
+#else
+#define MYSQL_DISABLE_MQ
+#endif
 
 /* {{{ mysql_functions[]
  */
@@ -632,6 +636,13 @@
zend_bool free_host=0, new_link=0;
long connect_timeout;
 
+#if !defined(MYSQL_USE_MYSQLND)
+   if ((MYSQL_VERSION_ID / 100) != (mysql_get_client_version() / 100)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING,
+   Headers and client library 
minor version mismatch. Headers:%d Library:%d,
+   MYSQL_VERSION_ID, 
mysql_get_client_version());
+   }
+#endif
 
connect_timeout = MySG(connect_timeout);
 
@@ -693,8 +704,9 @@
client_flags ^= CLIENT_LOCAL_FILES;
}
 
+#ifdef CLIENT_MULTI_STATEMENTS
client_flags = ~CLIENT_MULTI_STATEMENTS;   /* don't allow 
multi_queries via connect parameter */
-
+#endif
hashed_details_length = spprintf(hashed_details, 0, 
mysql_%s_%s_%s_%ld, SAFE_STRING(host_and_port), SAFE_STRING(user), 
SAFE_STRING(passwd), client_flags);
}
 
@@ -746,7 +758,12 @@
/* create the link */
mysql = (php_mysql_conn *) 
malloc(sizeof(php_mysql_conn));
mysql-active_result_id = 0;
+#ifdef CLIENT_MULTI_STATEMENTS
mysql-multi_query = client_flags  
CLIENT_MULTI_STATEMENTS? 1:0;
+#else
+   mysql-multi_query = 0;
+#endif
+   
 #ifndef MYSQL_USE_MYSQLND
mysql-conn = mysql_init(NULL);
 #else
@@ -794,7 +811,11 @@
}
mysql = (php_mysql_conn *) le-ptr;
mysql-active_result_id = 0;
+#ifdef CLIENT_MULTI_STATEMENTS
mysql-multi_query = client_flags  
CLIENT_MULTI_STATEMENTS? 1:0;
+#else
+   mysql-multi_query = 0;
+#endif
/* ensure that the link did not die */
 #if defined(MYSQL_USE_MYSQLND)
mysqlnd_end_psession(mysql-conn);
@@ -860,7 +881,10 @@
 
mysql = (php_mysql_conn *) emalloc(sizeof(php_mysql_conn));
mysql-active_result_id = 0;
+#ifdef CLIENT_MULTI_STATEMENTS
mysql-multi_query = 1;
+#endif
+
 #ifndef MYSQL_USE_MYSQLND
mysql-conn = mysql_init(NULL);
 #else
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_nonapi.c?r1=1.54.2.7.2.5.2.15r2=1.54.2.7.2.5.2.16diff_format=u
Index: php-src/ext/mysqli/mysqli_nonapi.c
diff -u php-src/ext/mysqli/mysqli_nonapi.c:1.54.2.7.2.5.2.15 
php-src/ext/mysqli/mysqli_nonapi.c:1.54.2.7.2.5.2.16
--- php-src/ext/mysqli/mysqli_nonapi.c:1.54.2.7.2.5.2.15Mon Aug 11 
12:33:55 2008
+++ php-src/ext/mysqli/mysqli_nonapi.c  Mon Oct 27 12:09:36 2008
@@ -17,7 +17,7 @@
   |  Ulf Wendel [EMAIL PROTECTED]
 |
   +--+
 
-  $Id: mysqli_nonapi.c,v 1.54.2.7.2.5.2.15 2008/08/11 12:33:55 johannes Exp $ 
+  $Id: mysqli_nonapi.c,v 1.54.2.7.2.5.2.16 2008/10/27 12:09:36 andrey Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -66,6 +66,15 @@
zend_rsrc_list_entry*le;
mysqli_plist_entry *plist = NULL;
 
+
+#if !defined(MYSQL_USE_MYSQLND)
+   if ((MYSQL_VERSION_ID / 100) != (mysql_get_client_version() / 100)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING,
+   Headers and client library 
minor version mismatch. Headers:%d Library:%d,
+   MYSQL_VERSION_ID, 

[PHP-CVS] cvs: php-src /tests/basic bug20539.phpt

2008-10-27 Thread Hannes Magnusson
bjori   Mon Oct 27 14:25:17 2008 UTC

  Modified files:  
/php-src/tests/basicbug20539.phpt 
  Log:
  Improve test and remove the temporary session file created by the skipif
  check
  
  
http://cvs.php.net/viewvc.cgi/php-src/tests/basic/bug20539.phpt?r1=1.5r2=1.6diff_format=u
Index: php-src/tests/basic/bug20539.phpt
diff -u php-src/tests/basic/bug20539.phpt:1.5 
php-src/tests/basic/bug20539.phpt:1.6
--- php-src/tests/basic/bug20539.phpt:1.5   Wed Sep 10 11:12:12 2008
+++ php-src/tests/basic/bug20539.phpt   Mon Oct 27 14:25:17 2008
@@ -2,6 +2,7 @@
 Bug #20539 (PHP CLI Segmentation Fault)
 --SKIPIF--
 ?php if (!extension_loaded(session)) die(skip session extension not 
available); ?
+?php unlink(__DIR__. '/sess_' .session_id()); ?
 --INI--
 session.auto_start=1
 session.save_handler=files
@@ -9,7 +10,10 @@
 --FILE--
 ?php
print good :)\n;
-   unlink(dirname(__FILE__) . '/sess_' . session_id());
+   $filename = __DIR__ . '/sess_' . session_id();
+   var_dump(unlink($filename));
 ?
 --EXPECT--
 good :)
+bool(true)
+



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



[PHP-CVS] cvs: php-src(PHP_5_3) /tests/basic bug20539.phpt

2008-10-27 Thread Hannes Magnusson
bjori   Mon Oct 27 14:25:33 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/tests/basicbug20539.phpt 
  Log:
  MFH: Improve test and fix skipif
  
  
http://cvs.php.net/viewvc.cgi/php-src/tests/basic/bug20539.phpt?r1=1.3.6.2r2=1.3.6.3diff_format=u
Index: php-src/tests/basic/bug20539.phpt
diff -u php-src/tests/basic/bug20539.phpt:1.3.6.2 
php-src/tests/basic/bug20539.phpt:1.3.6.3
--- php-src/tests/basic/bug20539.phpt:1.3.6.2   Wed Sep 10 11:12:25 2008
+++ php-src/tests/basic/bug20539.phpt   Mon Oct 27 14:25:33 2008
@@ -2,6 +2,7 @@
 Bug #20539 (PHP CLI Segmentation Fault)
 --SKIPIF--
 ?php if (!extension_loaded(session)) die(skip session extension not 
available); ?
+?php unlink(__DIR__. '/sess_' .session_id()); ?
 --INI--
 session.auto_start=1
 session.save_handler=files
@@ -9,7 +10,10 @@
 --FILE--
 ?php
print good :)\n;
-   unlink(dirname(__FILE__) . '/sess_' . session_id());
+   $filename = __DIR__ . '/sess_' . session_id();
+   var_dump(unlink($filename));
 ?
 --EXPECT--
 good :)
+bool(true)
+



-- 
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

2008-10-27 Thread Andrey Hristov
andrey  Mon Oct 27 14:30:51 2008 UTC

  Modified files:  
/php-src/ext/mysqli mysqli_nonapi.c 
  Log:
  Fix bug found in a test. mysqli.default_port wasn't used
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_nonapi.c?r1=1.87r2=1.88diff_format=u
Index: php-src/ext/mysqli/mysqli_nonapi.c
diff -u php-src/ext/mysqli/mysqli_nonapi.c:1.87 
php-src/ext/mysqli/mysqli_nonapi.c:1.88
--- php-src/ext/mysqli/mysqli_nonapi.c:1.87 Mon Oct 27 12:07:35 2008
+++ php-src/ext/mysqli/mysqli_nonapi.c  Mon Oct 27 14:30:51 2008
@@ -17,7 +17,7 @@
   |  Ulf Wendel [EMAIL PROTECTED]
 |
   +--+
 
-  $Id: mysqli_nonapi.c,v 1.87 2008/10/27 12:07:35 andrey Exp $ 
+  $Id: mysqli_nonapi.c,v 1.88 2008/10/27 14:30:51 andrey Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -121,7 +121,9 @@
if (!socket_len || !socket) {
socket = MyG(default_socket);
}
-
+   if (!port){
+   port = MyG(default_port);
+   }
if (!passwd) {
passwd = MyG(default_pw);
passwd_len = strlen(SAFE_STR(passwd));



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



[PHP-CVS] cvs: php-src /ext/mysqli/tests bug34810.phpt mysqli_connect_oo_defaults.phpt mysqli_constants.phpt mysqli_get_client_stats.phpt

2008-10-27 Thread Andrey Hristov
andrey  Mon Oct 27 14:33:10 2008 UTC

  Modified files:  
/php-src/ext/mysqli/tests   bug34810.phpt 
mysqli_connect_oo_defaults.phpt 
mysqli_constants.phpt 
mysqli_get_client_stats.phpt 
  Log:
  Fix tests
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug34810.phpt?r1=1.7r2=1.8diff_format=u
Index: php-src/ext/mysqli/tests/bug34810.phpt
diff -u php-src/ext/mysqli/tests/bug34810.phpt:1.7 
php-src/ext/mysqli/tests/bug34810.phpt:1.8
--- php-src/ext/mysqli/tests/bug34810.phpt:1.7  Tue Mar 18 16:58:43 2008
+++ php-src/ext/mysqli/tests/bug34810.phpt  Mon Oct 27 14:33:09 2008
@@ -52,7 +52,7 @@
   [field_count]=
   int(0)
   [host_info]=
-  string(42) MySQL host info: Localhost via UNIX socket
+  string(%d) MySQL host info: %s via %s%s
   [info]=
   NULL
   [insert_id]=
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt
diff -u php-src/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt:1.1 
php-src/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt:1.2
--- php-src/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt:1.1Mon Jul 
23 12:15:20 2007
+++ php-src/ext/mysqli/tests/mysqli_connect_oo_defaults.phptMon Oct 27 
14:33:09 2008
@@ -9,7 +9,6 @@
 
$tmp= NULL;
$link   = NULL;
-
ini_set('mysqli.default_socket', 'socket');
ini_set('mysqli.default_port', );
ini_set('mysqli.default_pw', 'password');
@@ -36,7 +35,6 @@
printf([002] Usage of mysqli.default_socket failed\n);
}
 
-
ini_set('mysqli.default_port', $port);
try {
$mysqli = mysqli_init();
@@ -195,4 +193,4 @@
   [uall_defaults]=
   unicode(13) have been set
 }
-done!
\ No newline at end of file
+done!
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_constants.phpt?r1=1.5r2=1.6diff_format=u
Index: php-src/ext/mysqli/tests/mysqli_constants.phpt
diff -u php-src/ext/mysqli/tests/mysqli_constants.phpt:1.5 
php-src/ext/mysqli/tests/mysqli_constants.phpt:1.6
--- php-src/ext/mysqli/tests/mysqli_constants.phpt:1.5  Tue Mar 18 16:58:43 2008
+++ php-src/ext/mysqli/tests/mysqli_constants.phpt  Mon Oct 27 14:33:09 2008
@@ -48,6 +48,9 @@
MYSQLI_BINARY_FLAG= true,
MYSQLI_PART_KEY_FLAG  = true,
MYSQLI_GROUP_FLAG = true,
+   MYSQLI_SERVER_QUERY_NO_GOOD_INDEX_USED= true,
+   MYSQLI_SERVER_QUERY_NO_INDEX_USED = true,
+   
MYSQLI_TYPE_DECIMAL   = true,
MYSQLI_TYPE_TINY  = true,
MYSQLI_TYPE_SHORT = true,
@@ -84,8 +87,8 @@
);
 
/* depends on the build - experimental */
-   if ($IS_MYSQLND  defined('MYSQLI_OPT_INT_AND_YEARS_AS_INT')) {
-   $expected_constants['MYSQLI_OPT_INT_AND_YEARS_AS_INT'] = true;
+   if ($IS_MYSQLND  defined('MYSQLI_OPT_INT_AND_FLOAT_NATIVE')) {
+   $expected_constants['MYSQLI_OPT_INT_AND_FLOAT_NATIVE'] = true;
}
 
if ($IS_MYSQLND) {
@@ -101,6 +104,9 @@
if (($version  51122  $version  6) || ($version  60003) || 
$IS_MYSQLND) {
$expected_constants['MYSQLI_ON_UPDATE_NOW_FLAG'] = true;
}
+   if ($version  60005 || $IS_MYSQLND) {
+   $expected_constants['MYSQLI_SERVER_QUERY_WAS_SLOW'] = true; 
+   } 
 
if ($version  50002) {
$expected_constants = array_merge($expected_constants, array(
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_get_client_stats.phpt?r1=1.5r2=1.6diff_format=u
Index: php-src/ext/mysqli/tests/mysqli_get_client_stats.phpt
diff -u php-src/ext/mysqli/tests/mysqli_get_client_stats.phpt:1.5 
php-src/ext/mysqli/tests/mysqli_get_client_stats.phpt:1.6
--- php-src/ext/mysqli/tests/mysqli_get_client_stats.phpt:1.5   Mon Jan 28 
22:54:21 2008
+++ php-src/ext/mysqli/tests/mysqli_get_client_stats.phpt   Mon Oct 27 
14:33:09 2008
@@ -859,7 +859,7 @@
print done!;
 ?
 --EXPECTF--
-array(61) {
+array(119) {
   [bytes_sent]=
   string(1) 0
   [bytes_received]=
@@ -872,6 +872,36 @@
   string(1) 0
   [protocol_overhead_out]=
   string(1) 0
+  [bytes_received_ok_packet]=
+  string(1) 0
+  [bytes_received_eof_packet]=
+  string(1) 0
+  [bytes_received_rset_header_packet]=
+  string(1) 0
+  [bytes_received_rset_field_meta_packet]=
+  string(1) 0
+  [bytes_received_rset_row_packet]=
+  string(1) 0
+  [bytes_received_prepare_response_packet]=
+  string(1) 0
+  [bytes_received_change_user_packet]=
+  string(1) 0
+  [packets_sent_command]=
+  string(1) 0
+  [packets_received_ok]=
+  string(1) 0
+  

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqli mysqli_nonapi.c /ext/mysqli/tests bug34810.phpt mysqli_connect_oo_defaults.phpt mysqli_constants.phpt mysqli_get_client_stats.phpt

2008-10-27 Thread Andrey Hristov
andrey  Mon Oct 27 14:34:35 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysqli mysqli_nonapi.c 
/php-src/ext/mysqli/tests   bug34810.phpt 
mysqli_connect_oo_defaults.phpt 
mysqli_constants.phpt 
mysqli_get_client_stats.phpt 
  Log:
  MFH: Fix an issue with mysqli.default_port not being used
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_nonapi.c?r1=1.54.2.7.2.5.2.16r2=1.54.2.7.2.5.2.17diff_format=u
Index: php-src/ext/mysqli/mysqli_nonapi.c
diff -u php-src/ext/mysqli/mysqli_nonapi.c:1.54.2.7.2.5.2.16 
php-src/ext/mysqli/mysqli_nonapi.c:1.54.2.7.2.5.2.17
--- php-src/ext/mysqli/mysqli_nonapi.c:1.54.2.7.2.5.2.16Mon Oct 27 
12:09:36 2008
+++ php-src/ext/mysqli/mysqli_nonapi.c  Mon Oct 27 14:34:35 2008
@@ -17,7 +17,7 @@
   |  Ulf Wendel [EMAIL PROTECTED]
 |
   +--+
 
-  $Id: mysqli_nonapi.c,v 1.54.2.7.2.5.2.16 2008/10/27 12:09:36 andrey Exp $ 
+  $Id: mysqli_nonapi.c,v 1.54.2.7.2.5.2.17 2008/10/27 14:34:35 andrey Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -127,7 +127,9 @@
if (!socket_len || !socket) {
socket = MyG(default_socket);
}
-
+   if (!port){
+   port = MyG(default_port);
+   }
if (!passwd) {
passwd = MyG(default_pw);
passwd_len = strlen(SAFE_STR(passwd));
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug34810.phpt?r1=1.1.2.3.2.1.2.3r2=1.1.2.3.2.1.2.4diff_format=u
Index: php-src/ext/mysqli/tests/bug34810.phpt
diff -u php-src/ext/mysqli/tests/bug34810.phpt:1.1.2.3.2.1.2.3 
php-src/ext/mysqli/tests/bug34810.phpt:1.1.2.3.2.1.2.4
--- php-src/ext/mysqli/tests/bug34810.phpt:1.1.2.3.2.1.2.3  Tue Mar 18 
16:57:31 2008
+++ php-src/ext/mysqli/tests/bug34810.phpt  Mon Oct 27 14:34:35 2008
@@ -52,7 +52,7 @@
   [field_count]=
   int(0)
   [host_info]=
-  string(42) MySQL host info: Localhost via UNIX socket
+  string(%d) MySQL host info: %s via %s%s
   [info]=
   NULL
   [insert_id]=
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt
diff -u php-src/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt:1.1.2.2 
php-src/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt:1.1.2.3
--- php-src/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt:1.1.2.2Wed Oct 
10 10:13:47 2007
+++ php-src/ext/mysqli/tests/mysqli_connect_oo_defaults.phptMon Oct 27 
14:34:35 2008
@@ -9,7 +9,6 @@
 
$tmp= NULL;
$link   = NULL;
-
ini_set('mysqli.default_socket', 'socket');
ini_set('mysqli.default_port', );
ini_set('mysqli.default_pw', 'password');
@@ -36,7 +35,6 @@
printf([002] Usage of mysqli.default_socket failed\n);
}
 
-
ini_set('mysqli.default_port', $port);
try {
$mysqli = mysqli_init();
@@ -195,4 +193,4 @@
   [uall_defaults]=
   unicode(13) have been set
 }
-done!
\ No newline at end of file
+done!
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_constants.phpt?r1=1.2.2.4r2=1.2.2.5diff_format=u
Index: php-src/ext/mysqli/tests/mysqli_constants.phpt
diff -u php-src/ext/mysqli/tests/mysqli_constants.phpt:1.2.2.4 
php-src/ext/mysqli/tests/mysqli_constants.phpt:1.2.2.5
--- php-src/ext/mysqli/tests/mysqli_constants.phpt:1.2.2.4  Tue Mar 18 
16:57:31 2008
+++ php-src/ext/mysqli/tests/mysqli_constants.phpt  Mon Oct 27 14:34:35 2008
@@ -48,6 +48,9 @@
MYSQLI_BINARY_FLAG= true,
MYSQLI_PART_KEY_FLAG  = true,
MYSQLI_GROUP_FLAG = true,
+   MYSQLI_SERVER_QUERY_NO_GOOD_INDEX_USED= true,
+   MYSQLI_SERVER_QUERY_NO_INDEX_USED = true,
+   
MYSQLI_TYPE_DECIMAL   = true,
MYSQLI_TYPE_TINY  = true,
MYSQLI_TYPE_SHORT = true,
@@ -84,8 +87,8 @@
);
 
/* depends on the build - experimental */
-   if ($IS_MYSQLND  defined('MYSQLI_OPT_INT_AND_YEARS_AS_INT')) {
-   $expected_constants['MYSQLI_OPT_INT_AND_YEARS_AS_INT'] = true;
+   if ($IS_MYSQLND  defined('MYSQLI_OPT_INT_AND_FLOAT_NATIVE')) {
+   $expected_constants['MYSQLI_OPT_INT_AND_FLOAT_NATIVE'] = true;
}
 
if ($IS_MYSQLND) {
@@ -101,6 +104,9 @@
if (($version  51122  $version  6) || ($version  60003) || 
$IS_MYSQLND) {
$expected_constants['MYSQLI_ON_UPDATE_NOW_FLAG'] = true;
}
+   if ($version  60005 || $IS_MYSQLND) {
+   

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

2008-10-27 Thread Andrey Hristov
andrey  Mon Oct 27 14:36:02 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/mysqli mysqli_api.c mysqli_nonapi.c 
  Log:
  MFH: Fix an issue with mysql.default_port not being used
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_api.c?r1=1.118.2.22.2.20r2=1.118.2.22.2.21diff_format=u
Index: php-src/ext/mysqli/mysqli_api.c
diff -u php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.20 
php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.21
--- php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.20 Tue Jan  1 16:51:09 2008
+++ php-src/ext/mysqli/mysqli_api.c Mon Oct 27 14:36:02 2008
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+
 
-  $Id: mysqli_api.c,v 1.118.2.22.2.20 2008/01/01 16:51:09 hholzgra Exp $ 
+  $Id: mysqli_api.c,v 1.118.2.22.2.21 2008/10/27 14:36:02 andrey Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -1425,14 +1425,20 @@
/* TODO: safe mode handling */
if (PG(sql_safe_mode)) {
} else {
+   if (!socket_len || !socket) {
+   socket = MyG(default_socket);
+   }
+   if (!port) {
+   port = MyG(default_port);
+   }
if (!passwd) {
passwd = MyG(default_pw);
-   if (!username){
-   username = MyG(default_user);
-   if (!hostname) {
-   hostname = MyG(default_host);
-   }
-   }
+   }
+   if (!username){
+   username = MyG(default_user);
+   }
+   if (!hostname) {
+   hostname = MyG(default_host);
}
}   
 
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_nonapi.c?r1=1.54.2.7.2.6r2=1.54.2.7.2.7diff_format=u
Index: php-src/ext/mysqli/mysqli_nonapi.c
diff -u php-src/ext/mysqli/mysqli_nonapi.c:1.54.2.7.2.6 
php-src/ext/mysqli/mysqli_nonapi.c:1.54.2.7.2.7
--- php-src/ext/mysqli/mysqli_nonapi.c:1.54.2.7.2.6 Mon Dec 31 07:20:08 2007
+++ php-src/ext/mysqli/mysqli_nonapi.c  Mon Oct 27 14:36:02 2008
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+
 
-  $Id: mysqli_nonapi.c,v 1.54.2.7.2.6 2007/12/31 07:20:08 sebastian Exp $ 
+  $Id: mysqli_nonapi.c,v 1.54.2.7.2.7 2008/10/27 14:36:02 andrey Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -56,14 +56,20 @@
/* TODO: safe mode handling */
if (PG(sql_safe_mode)){
} else {
+   if (!socket_len || !socket) {
+   socket = MyG(default_socket);
+   }
+   if (!port) {
+   port = MyG(default_port);
+   }
if (!passwd) {
passwd = MyG(default_pw);
-   if (!username){
-   username = MyG(default_user);
-   if (!hostname) {
-   hostname = MyG(default_host);
-   }
-   }
+   }
+   if (!username){
+   username = MyG(default_user);
+   }
+   if (!hostname) {
+   hostname = MyG(default_host);
}
}
 



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



[PHP-CVS] cvs: php-src /ext/mysqlnd mysqlnd_statistics.c

2008-10-27 Thread Andrey Hristov
andrey  Mon Oct 27 14:38:17 2008 UTC

  Modified files:  
/php-src/ext/mysqlndmysqlnd_statistics.c 
  Log:
  Fix a name
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_statistics.c?r1=1.7r2=1.8diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_statistics.c
diff -u php-src/ext/mysqlnd/mysqlnd_statistics.c:1.7 
php-src/ext/mysqlnd/mysqlnd_statistics.c:1.8
--- php-src/ext/mysqlnd/mysqlnd_statistics.c:1.7Fri Sep 12 15:06:55 2008
+++ php-src/ext/mysqlnd/mysqlnd_statistics.cMon Oct 27 14:38:17 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_statistics.c,v 1.7 2008/09/12 15:06:55 andrey Exp $ */
+/* $Id: mysqlnd_statistics.c,v 1.8 2008/10/27 14:38:17 andrey Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_priv.h
@@ -107,7 +107,7 @@
{ STR_W_LEN(mem_malloc_ammount) },
{ STR_W_LEN(mem_calloc_count) },
{ STR_W_LEN(mem_calloc_ammount) },
-   { STR_W_LEN(mem_realloc_calloc) },
+   { STR_W_LEN(mem_realloc_count) },
{ STR_W_LEN(mem_realloc_ammount) },
{ STR_W_LEN(mem_free_count) },
{ STR_W_LEN(proto_text_fetched_null) },



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd_statistics.c

2008-10-27 Thread Andrey Hristov
andrey  Mon Oct 27 14:38:31 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysqlndmysqlnd_statistics.c 
  Log:
  Fix a name
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_statistics.c?r1=1.2.2.7r2=1.2.2.8diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_statistics.c
diff -u php-src/ext/mysqlnd/mysqlnd_statistics.c:1.2.2.7 
php-src/ext/mysqlnd/mysqlnd_statistics.c:1.2.2.8
--- php-src/ext/mysqlnd/mysqlnd_statistics.c:1.2.2.7Fri Sep 12 15:08:41 2008
+++ php-src/ext/mysqlnd/mysqlnd_statistics.cMon Oct 27 14:38:31 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_statistics.c,v 1.2.2.7 2008/09/12 15:08:41 andrey Exp $ */
+/* $Id: mysqlnd_statistics.c,v 1.2.2.8 2008/10/27 14:38:31 andrey Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_priv.h
@@ -107,7 +107,7 @@
{ STR_W_LEN(mem_malloc_ammount) },
{ STR_W_LEN(mem_calloc_count) },
{ STR_W_LEN(mem_calloc_ammount) },
-   { STR_W_LEN(mem_realloc_calloc) },
+   { STR_W_LEN(mem_realloc_count) },
{ STR_W_LEN(mem_realloc_ammount) },
{ STR_W_LEN(mem_free_count) },
{ STR_W_LEN(proto_text_fetched_null) },



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



[PHP-CVS] cvs: php-src /ext/mysqlnd mysqlnd_result.c

2008-10-27 Thread Andrey Hristov
andrey  Mon Oct 27 15:13:42 2008 UTC

  Modified files:  
/php-src/ext/mysqlndmysqlnd_result.c 
  Log:
  Fix overusage of memory when the result set is empty. Then no memory will be
  allocated compared to before. Also grow (realloc) the rset with 10% instead
  of 33% - more reallocs but better memory usage. Of course later theres is a
  realloc to shrink the rset t ofree it from unused rows but its better to
  to eat too much at once.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_result.c?r1=1.24r2=1.25diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_result.c
diff -u php-src/ext/mysqlnd/mysqlnd_result.c:1.24 
php-src/ext/mysqlnd/mysqlnd_result.c:1.25
--- php-src/ext/mysqlnd/mysqlnd_result.c:1.24   Thu May 29 15:50:10 2008
+++ php-src/ext/mysqlnd/mysqlnd_result.cMon Oct 27 15:13:42 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_result.c,v 1.24 2008/05/29 15:50:10 andrey Exp $ */
+/* $Id: mysqlnd_result.c,v 1.25 2008/10/27 15:13:42 andrey Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_wireprotocol.h
@@ -214,11 +214,15 @@
current_buffer-free_chunk(current_buffer, TRUE TSRMLS_CC);
}
DBG_INF(Freeing data  row_buffer);
-   pefree(set-data, set-persistent);
-   pefree(set-row_buffers, set-persistent);
-   set-data   = NULL;
-   set-row_buffers= NULL;
-   set-data_cursor= NULL;
+   if (set-data) {
+   pefree(set-data, set-persistent);
+   set-data = NULL;
+   }
+   if (set-row_buffers) {
+   pefree(set-row_buffers, set-persistent);
+   set-row_buffers= NULL;
+   }
+   set-data_cursor = NULL;
set-row_count  = 0;
if (set-qcache) {
mysqlnd_qcache_free_cache_reference(set-qcache);
@@ -1175,7 +1179,7 @@
 /* }}} */
 
 
-#define STORE_RESULT_PREALLOCATED_SET 10
+#define STORE_RESULT_PREALLOCATED_SET_IF_NOT_EMPTY 2
 
 /* {{{ mysqlnd_store_result_fetch_data */
 enum_func_status
@@ -1186,21 +1190,24 @@
 {
enum_func_status ret;
php_mysql_packet_row *row_packet;
-   unsigned int next_extend = STORE_RESULT_PREALLOCATED_SET, free_rows;
+   unsigned int next_extend = STORE_RESULT_PREALLOCATED_SET_IF_NOT_EMPTY, 
free_rows = 1;
MYSQLND_RES_BUFFERED *set;
 
DBG_ENTER(mysqlnd_store_result_fetch_data);
DBG_INF_FMT(conn=%llu binary_proto=%d to_cache=%d,
conn-thread_id, binary_protocol, to_cache);
 
-   free_rows = next_extend;
-
result-stored_data = set = mnd_pecalloc(1, 
sizeof(MYSQLND_RES_BUFFERED), to_cache);
-   set-row_buffers= mnd_pemalloc(STORE_RESULT_PREALLOCATED_SET * 
sizeof(MYSQLND_MEMORY_POOL_CHUNK *), to_cache);
+   if (free_rows) {
+   set-row_buffers = mnd_pemalloc(free_rows * 
sizeof(MYSQLND_MEMORY_POOL_CHUNK *), to_cache);
+   }
set-persistent = to_cache;
set-qcache = to_cache? 
mysqlnd_qcache_get_cache_reference(conn-qcache):NULL;
set-references = 1;
 
+   result-m.row_decoder = binary_protocol? 
php_mysqlnd_rowp_read_binary_protocol:
+   
 php_mysqlnd_rowp_read_text_protocol;
+
/* non-persistent */
PACKET_INIT(row_packet, PROT_ROW_PACKET, php_mysql_packet_row *, FALSE);
row_packet-field_count = meta-field_count;
@@ -1213,18 +1220,15 @@
 
while (FAIL != (ret = PACKET_READ(row_packet, conn))  
!row_packet-eof) {
if (!free_rows) {
-   uint64 total_rows = free_rows = next_extend = 
next_extend * 5 / 3; /* extend with 33% */
-   total_rows += set-row_count;
+   uint64 total_allocated_rows = free_rows = next_extend = 
next_extend * 11 / 10; /* extend with 10% */
+   total_allocated_rows += set-row_count;
set-row_buffers = mnd_perealloc(set-row_buffers,
-   
 total_rows * sizeof(MYSQLND_MEMORY_POOL_CHUNK *),
+   
 total_allocated_rows * sizeof(MYSQLND_MEMORY_POOL_CHUNK *),

 set-persistent);
}
free_rows--;
set-row_buffers[set-row_count] = row_packet-row_buffer;
 
-   result-m.row_decoder = binary_protocol? 
php_mysqlnd_rowp_read_binary_protocol:
-   
 php_mysqlnd_rowp_read_text_protocol;
-
set-row_count++;
 
/* So row_packet's destructor function won't efree() it 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd_result.c

2008-10-27 Thread Andrey Hristov
andrey  Mon Oct 27 15:14:17 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysqlndmysqlnd_result.c 
  Log:
  MFH:
  Fix overusage of memory when the result set is empty. Then no memory will be
  allocated compared to before. Also grow (realloc) the rset with 10% instead
  of 33% - more reallocs but better memory usage. Of course later theres is a
  realloc to shrink the rset t ofree it from unused rows but its better to
  to eat too much at once.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_result.c?r1=1.4.2.20r2=1.4.2.21diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_result.c
diff -u php-src/ext/mysqlnd/mysqlnd_result.c:1.4.2.20 
php-src/ext/mysqlnd/mysqlnd_result.c:1.4.2.21
--- php-src/ext/mysqlnd/mysqlnd_result.c:1.4.2.20   Thu May 29 15:49:32 2008
+++ php-src/ext/mysqlnd/mysqlnd_result.cMon Oct 27 15:14:17 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_result.c,v 1.4.2.20 2008/05/29 15:49:32 andrey Exp $ */
+/* $Id: mysqlnd_result.c,v 1.4.2.21 2008/10/27 15:14:17 andrey Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_wireprotocol.h
@@ -214,11 +214,15 @@
current_buffer-free_chunk(current_buffer, TRUE TSRMLS_CC);
}
DBG_INF(Freeing data  row_buffer);
-   pefree(set-data, set-persistent);
-   pefree(set-row_buffers, set-persistent);
-   set-data   = NULL;
-   set-row_buffers= NULL;
-   set-data_cursor= NULL;
+   if (set-data) {
+   pefree(set-data, set-persistent);
+   set-data = NULL;
+   }
+   if (set-row_buffers) {
+   pefree(set-row_buffers, set-persistent);
+   set-row_buffers= NULL;
+   }
+   set-data_cursor = NULL;
set-row_count  = 0;
if (set-qcache) {
mysqlnd_qcache_free_cache_reference(set-qcache);
@@ -1175,7 +1179,7 @@
 /* }}} */
 
 
-#define STORE_RESULT_PREALLOCATED_SET 10
+#define STORE_RESULT_PREALLOCATED_SET_IF_NOT_EMPTY 2
 
 /* {{{ mysqlnd_store_result_fetch_data */
 enum_func_status
@@ -1186,21 +1190,24 @@
 {
enum_func_status ret;
php_mysql_packet_row *row_packet;
-   unsigned int next_extend = STORE_RESULT_PREALLOCATED_SET, free_rows;
+   unsigned int next_extend = STORE_RESULT_PREALLOCATED_SET_IF_NOT_EMPTY, 
free_rows = 1;
MYSQLND_RES_BUFFERED *set;
 
DBG_ENTER(mysqlnd_store_result_fetch_data);
DBG_INF_FMT(conn=%llu binary_proto=%d to_cache=%d,
conn-thread_id, binary_protocol, to_cache);
 
-   free_rows = next_extend;
-
result-stored_data = set = mnd_pecalloc(1, 
sizeof(MYSQLND_RES_BUFFERED), to_cache);
-   set-row_buffers= mnd_pemalloc(STORE_RESULT_PREALLOCATED_SET * 
sizeof(MYSQLND_MEMORY_POOL_CHUNK *), to_cache);
+   if (free_rows) {
+   set-row_buffers = mnd_pemalloc(free_rows * 
sizeof(MYSQLND_MEMORY_POOL_CHUNK *), to_cache);
+   }
set-persistent = to_cache;
set-qcache = to_cache? 
mysqlnd_qcache_get_cache_reference(conn-qcache):NULL;
set-references = 1;
 
+   result-m.row_decoder = binary_protocol? 
php_mysqlnd_rowp_read_binary_protocol:
+   
 php_mysqlnd_rowp_read_text_protocol;
+
/* non-persistent */
PACKET_INIT(row_packet, PROT_ROW_PACKET, php_mysql_packet_row *, FALSE);
row_packet-field_count = meta-field_count;
@@ -1213,18 +1220,15 @@
 
while (FAIL != (ret = PACKET_READ(row_packet, conn))  
!row_packet-eof) {
if (!free_rows) {
-   uint64 total_rows = free_rows = next_extend = 
next_extend * 5 / 3; /* extend with 33% */
-   total_rows += set-row_count;
+   uint64 total_allocated_rows = free_rows = next_extend = 
next_extend * 11 / 10; /* extend with 10% */
+   total_allocated_rows += set-row_count;
set-row_buffers = mnd_perealloc(set-row_buffers,
-   
 total_rows * sizeof(MYSQLND_MEMORY_POOL_CHUNK *),
+   
 total_allocated_rows * sizeof(MYSQLND_MEMORY_POOL_CHUNK *),

 set-persistent);
}
free_rows--;
set-row_buffers[set-row_count] = row_packet-row_buffer;
 
-   result-m.row_decoder = binary_protocol? 
php_mysqlnd_rowp_read_binary_protocol:
-   
 php_mysqlnd_rowp_read_text_protocol;
-
set-row_count++;
 

[PHP-CVS] cvs: php-src /ext/mysqli/tests mysqli_insert_id_variation.phpt /ext/mysqlnd mysqlnd.c mysqlnd_loaddata.c mysqlnd_ps.c

2008-10-27 Thread Johannes Schlüter
johannesMon Oct 27 17:20:27 2008 UTC

  Added files: 
/php-src/ext/mysqli/tests   mysqli_insert_id_variation.phpt 

  Modified files:  
/php-src/ext/mysqlndmysqlnd.c mysqlnd_loaddata.c mysqlnd_ps.c 
  Log:
  Fix #46285 (lastInsertId() returns 0 when a deferenced PDOStatement is
  executed)
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.29r2=1.30diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.c
diff -u php-src/ext/mysqlnd/mysqlnd.c:1.29 php-src/ext/mysqlnd/mysqlnd.c:1.30
--- php-src/ext/mysqlnd/mysqlnd.c:1.29  Wed Oct  1 19:46:58 2008
+++ php-src/ext/mysqlnd/mysqlnd.c   Mon Oct 27 17:20:25 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd.c,v 1.29 2008/10/01 19:46:58 johannes Exp $ */
+/* $Id: mysqlnd.c,v 1.30 2008/10/27 17:20:25 johannes Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_wireprotocol.h
@@ -268,7 +268,8 @@
 /* {{{ mysqlnd_simple_command_handle_response */
 enum_func_status
 mysqlnd_simple_command_handle_response(MYSQLND *conn, enum 
php_mysql_packet_type ok_packet,
-  
zend_bool silent, enum php_mysqlnd_server_command command
+  
zend_bool silent, enum php_mysqlnd_server_command command,
+  
zend_bool ignore_upsert_status
   
TSRMLS_DC)
 {
enum_func_status ret;
@@ -309,10 +310,12 @@

ok_response.message, ok_response.message_len,

conn-persistent);
 
-   conn-upsert_status.warning_count = 
ok_response.warning_count;
-   conn-upsert_status.server_status = 
ok_response.server_status;
-   conn-upsert_status.affected_rows = 
ok_response.affected_rows;
-   conn-upsert_status.last_insert_id = 
ok_response.last_insert_id;
+   if (!ignore_upsert_status) {
+   
conn-upsert_status.warning_count = ok_response.warning_count;
+   
conn-upsert_status.server_status = ok_response.server_status;
+   
conn-upsert_status.affected_rows = ok_response.affected_rows;
+   
conn-upsert_status.last_insert_id = ok_response.last_insert_id;
+   }
}
}
PACKET_FREE_ALLOCA(ok_response);
@@ -367,7 +370,8 @@
 enum_func_status
 mysqlnd_simple_command(MYSQLND *conn, enum php_mysqlnd_server_command command,
   const char * const arg, size_t 
arg_len,
-  enum php_mysql_packet_type 
ok_packet, zend_bool silent TSRMLS_DC)
+  enum php_mysql_packet_type 
ok_packet, zend_bool silent, 
+  zend_bool ignore_upsert_status 
TSRMLS_DC)
 {
enum_func_status ret = PASS;
php_mysql_packet_command cmd_packet;
@@ -390,7 +394,9 @@
}
 
/* clean UPSERT info */
-   memset(conn-upsert_status, 0, sizeof(conn-upsert_status));
+   if (!ignore_upsert_status) {
+   memset(conn-upsert_status, 0, sizeof(conn-upsert_status));
+   }
SET_ERROR_AFF_ROWS(conn);
SET_EMPTY_ERROR(conn-error_info);
 
@@ -409,7 +415,7 @@
DBG_ERR(Server is gone);
ret = FAIL;
} else if (ok_packet != PROT_LAST) {
-   ret = mysqlnd_simple_command_handle_response(conn, ok_packet, 
silent, command TSRMLS_CC);
+   ret = mysqlnd_simple_command_handle_response(conn, ok_packet, 
silent, command, ignore_upsert_status TSRMLS_CC);
}
 
/*
@@ -435,7 +441,7 @@
 
int2store(buffer, (uint) option);
ret = mysqlnd_simple_command(conn, COM_SET_OPTION, buffer, 
sizeof(buffer),
-
PROT_EOF_PACKET, FALSE TSRMLS_CC);
+
PROT_EOF_PACKET, FALSE, TRUE TSRMLS_CC);
DBG_RETURN(ret);
 }
 /* }}} */
@@ -850,7 +856,7 @@
 
if (PASS != mysqlnd_simple_command(conn, COM_QUERY, query, query_len,
   
PROT_LAST /* we will handle the OK packet*/,
-  
FALSE 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqli/tests mysqli_insert_id_variation.phpt /ext/mysqlnd mysqlnd.c mysqlnd_loaddata.c mysqlnd_ps.c

2008-10-27 Thread Johannes Schlüter
johannesMon Oct 27 17:21:22 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/mysqli/tests   mysqli_insert_id_variation.phpt 

  Modified files:  
/php-src/ext/mysqlndmysqlnd.c mysqlnd_loaddata.c mysqlnd_ps.c 
  Log:
  MFH: Fix #46285 (lastInsertId() returns 0 when a deferenced PDOStatement is
  executed)
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.5.2.28r2=1.5.2.29diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.c
diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.28 
php-src/ext/mysqlnd/mysqlnd.c:1.5.2.29
--- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.28  Wed Oct  1 19:47:17 2008
+++ php-src/ext/mysqlnd/mysqlnd.c   Mon Oct 27 17:21:22 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd.c,v 1.5.2.28 2008/10/01 19:47:17 johannes Exp $ */
+/* $Id: mysqlnd.c,v 1.5.2.29 2008/10/27 17:21:22 johannes Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_wireprotocol.h
@@ -268,7 +268,8 @@
 /* {{{ mysqlnd_simple_command_handle_response */
 enum_func_status
 mysqlnd_simple_command_handle_response(MYSQLND *conn, enum 
php_mysql_packet_type ok_packet,
-  
zend_bool silent, enum php_mysqlnd_server_command command
+  
zend_bool silent, enum php_mysqlnd_server_command command,
+  
zend_bool ignore_upsert_status
   
TSRMLS_DC)
 {
enum_func_status ret;
@@ -309,10 +310,12 @@

ok_response.message, ok_response.message_len,

conn-persistent);
 
-   conn-upsert_status.warning_count = 
ok_response.warning_count;
-   conn-upsert_status.server_status = 
ok_response.server_status;
-   conn-upsert_status.affected_rows = 
ok_response.affected_rows;
-   conn-upsert_status.last_insert_id = 
ok_response.last_insert_id;
+   if (!ignore_upsert_status) {
+   
conn-upsert_status.warning_count = ok_response.warning_count;
+   
conn-upsert_status.server_status = ok_response.server_status;
+   
conn-upsert_status.affected_rows = ok_response.affected_rows;
+   
conn-upsert_status.last_insert_id = ok_response.last_insert_id;
+   }
}
}
PACKET_FREE_ALLOCA(ok_response);
@@ -367,7 +370,8 @@
 enum_func_status
 mysqlnd_simple_command(MYSQLND *conn, enum php_mysqlnd_server_command command,
   const char * const arg, size_t 
arg_len,
-  enum php_mysql_packet_type 
ok_packet, zend_bool silent TSRMLS_DC)
+  enum php_mysql_packet_type 
ok_packet, zend_bool silent, 
+  zend_bool ignore_upsert_status 
TSRMLS_DC)
 {
enum_func_status ret = PASS;
php_mysql_packet_command cmd_packet;
@@ -390,7 +394,9 @@
}
 
/* clean UPSERT info */
-   memset(conn-upsert_status, 0, sizeof(conn-upsert_status));
+   if (!ignore_upsert_status) {
+   memset(conn-upsert_status, 0, sizeof(conn-upsert_status));
+   }
SET_ERROR_AFF_ROWS(conn);
SET_EMPTY_ERROR(conn-error_info);
 
@@ -409,7 +415,7 @@
DBG_ERR(Server is gone);
ret = FAIL;
} else if (ok_packet != PROT_LAST) {
-   ret = mysqlnd_simple_command_handle_response(conn, ok_packet, 
silent, command TSRMLS_CC);
+   ret = mysqlnd_simple_command_handle_response(conn, ok_packet, 
silent, command, ignore_upsert_status TSRMLS_CC);
}
 
/*
@@ -435,7 +441,7 @@
 
int2store(buffer, (uint) option);
ret = mysqlnd_simple_command(conn, COM_SET_OPTION, buffer, 
sizeof(buffer),
-
PROT_EOF_PACKET, FALSE TSRMLS_CC);
+
PROT_EOF_PACKET, FALSE, TRUE TSRMLS_CC);
DBG_RETURN(ret);
 }
 /* }}} */
@@ -850,7 +856,7 @@
 
if (PASS != mysqlnd_simple_command(conn, COM_QUERY, query, query_len,
   
PROT_LAST /* we will handle the OK packet*/,
- 

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

2008-10-27 Thread Johannes Schlüter
johannesMon Oct 27 17:25:44 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  BFN
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.352r2=1.2027.2.547.2.965.2.353diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.352 
php-src/NEWS:1.2027.2.547.2.965.2.353
--- php-src/NEWS:1.2027.2.547.2.965.2.352   Sun Oct 26 12:56:46 2008
+++ php-src/NEWSMon Oct 27 17:25:43 2008
@@ -18,6 +18,8 @@
 
 - Fixed bug causing the algorithm parameter of mhash() to be modified. (Scott)
 
+- Fixed bug #46285 (lastInsertId() returns 0 when a deferenced PDOStatement 
is
+  executed). (Johannes)
 - Fixed bug #46238 (Segmentation fault on static call with empty string 
method).
   (Felipe)
 - Fixed bug #46205 (Closure - Memory leaks when ReflectionException is thrown).



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



[PHP-CVS] cvs: php-src /ext/pdo_mysql mysql_driver.c pdo_mysql.c php_pdo_mysql_int.h /ext/pdo_mysql/tests pdo_mysql_class_constants.phpt

2008-10-27 Thread Johannes Schlüter
johannesMon Oct 27 18:29:57 2008 UTC

  Modified files:  
/php-src/ext/pdo_mysql  mysql_driver.c pdo_mysql.c 
php_pdo_mysql_int.h 
/php-src/ext/pdo_mysql/testspdo_mysql_class_constants.phpt 
  Log:
  Fix #44135 (PDO MySQL does not support CLIENT_FOUND_ROWS)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/mysql_driver.c?r1=1.83r2=1.84diff_format=u
Index: php-src/ext/pdo_mysql/mysql_driver.c
diff -u php-src/ext/pdo_mysql/mysql_driver.c:1.83 
php-src/ext/pdo_mysql/mysql_driver.c:1.84
--- php-src/ext/pdo_mysql/mysql_driver.c:1.83   Tue Oct 14 19:00:11 2008
+++ php-src/ext/pdo_mysql/mysql_driver.cMon Oct 27 18:29:56 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysql_driver.c,v 1.83 2008/10/14 19:00:11 johannes Exp $ */
+/* $Id: mysql_driver.c,v 1.84 2008/10/27 18:29:56 johannes Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -636,6 +636,14 @@
H-max_buffer_size = pdo_attr_lval(driver_options, 
PDO_MYSQL_ATTR_MAX_BUFFER_SIZE, H-max_buffer_size TSRMLS_CC);
 #endif
 
+   if (pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_FOUND_ROWS, 0 
TSRMLS_CC)) {
+   connect_opts |= CLIENT_FOUND_ROWS;
+   }
+
+   if (pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_IGNORE_SPACE, 
0 TSRMLS_CC)) {
+   connect_opts |= CLIENT_IGNORE_SPACE;
+   }
+
if (mysql_options(H-server, MYSQL_OPT_CONNECT_TIMEOUT, (const 
char *)connect_timeout)) {
pdo_mysql_error(dbh);
goto cleanup;
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/pdo_mysql.c?r1=1.22r2=1.23diff_format=u
Index: php-src/ext/pdo_mysql/pdo_mysql.c
diff -u php-src/ext/pdo_mysql/pdo_mysql.c:1.22 
php-src/ext/pdo_mysql/pdo_mysql.c:1.23
--- php-src/ext/pdo_mysql/pdo_mysql.c:1.22  Tue Oct 14 19:00:11 2008
+++ php-src/ext/pdo_mysql/pdo_mysql.c   Mon Oct 27 18:29:56 2008
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: pdo_mysql.c,v 1.22 2008/10/14 19:00:11 johannes Exp $ */
+/* $Id: pdo_mysql.c,v 1.23 2008/10/27 18:29:56 johannes Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -83,6 +83,8 @@
REGISTER_PDO_CLASS_CONST_LONG(MYSQL_ATTR_COMPRESS, 
(long)PDO_MYSQL_ATTR_COMPRESS);
 #endif
REGISTER_PDO_CLASS_CONST_LONG(MYSQL_ATTR_DIRECT_QUERY, 
(long)PDO_MYSQL_ATTR_DIRECT_QUERY);
+   REGISTER_PDO_CLASS_CONST_LONG(MYSQL_ATTR_FOUND_ROWS, 
(long)PDO_MYSQL_ATTR_FOUND_ROWS);
+   REGISTER_PDO_CLASS_CONST_LONG(MYSQL_ATTR_IGNORE_SPACE, 
(long)PDO_MYSQL_ATTR_IGNORE_SPACE);
 
 #ifdef PDO_USE_MYSQLND
pdo_mysqlnd_zval_cache = 
mysqlnd_palloc_init_cache(PDO_MYSQL_G(cache_size));
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/php_pdo_mysql_int.h?r1=1.25r2=1.26diff_format=u
Index: php-src/ext/pdo_mysql/php_pdo_mysql_int.h
diff -u php-src/ext/pdo_mysql/php_pdo_mysql_int.h:1.25 
php-src/ext/pdo_mysql/php_pdo_mysql_int.h:1.26
--- php-src/ext/pdo_mysql/php_pdo_mysql_int.h:1.25  Tue Oct 14 19:00:11 2008
+++ php-src/ext/pdo_mysql/php_pdo_mysql_int.h   Mon Oct 27 18:29:56 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: php_pdo_mysql_int.h,v 1.25 2008/10/14 19:00:11 johannes Exp $ */
+/* $Id: php_pdo_mysql_int.h,v 1.26 2008/10/27 18:29:56 johannes Exp $ */
 
 #ifndef PHP_PDO_MYSQL_INT_H
 #define PHP_PDO_MYSQL_INT_H
@@ -161,6 +161,8 @@
PDO_MYSQL_ATTR_COMPRESS,
 #endif
PDO_MYSQL_ATTR_DIRECT_QUERY,
+   PDO_MYSQL_ATTR_FOUND_ROWS,
+   PDO_MYSQL_ATTR_IGNORE_SPACE
 };
 
 #endif
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt
diff -u php-src/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt:1.2 
php-src/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt:1.3
--- php-src/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt:1.2  Tue Oct 
14 19:00:11 2008
+++ php-src/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt  Mon Oct 27 
18:29:57 2008
@@ -12,6 +12,8 @@
'MYSQL_ATTR_USE_BUFFERED_QUERY' = true,
'MYSQL_ATTR_LOCAL_INFILE'   
= true,
'MYSQL_ATTR_DIRECT_QUERY'   
= true,
+   'MYSQL_ATTR_FOUND_ROWS' 
= true,
+   'MYSQL_ATTR_IGNORE_SPACE'   
= true,
);
 
if (!MySQLPDOTest::isPDOMySQLnd()) {



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



[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/pdo_mysql mysql_driver.c pdo_mysql.c php_pdo_mysql_int.h /ext/pdo_mysql/tests pdo_mysql_class_constants.phpt

2008-10-27 Thread Johannes Schlüter
johannesMon Oct 27 18:32:09 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
/php-src/ext/pdo_mysql  mysql_driver.c pdo_mysql.c 
php_pdo_mysql_int.h 
/php-src/ext/pdo_mysql/testspdo_mysql_class_constants.phpt 
  Log:
  MFH: Fix #44135 (PDO MySQL does not support CLIENT_FOUND_ROWS)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.353r2=1.2027.2.547.2.965.2.354diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.353 
php-src/NEWS:1.2027.2.547.2.965.2.354
--- php-src/NEWS:1.2027.2.547.2.965.2.353   Mon Oct 27 17:25:43 2008
+++ php-src/NEWSMon Oct 27 18:32:08 2008
@@ -51,6 +51,8 @@
 - Fixed bug #45392 (ob_start()/ob_end_clean() and memory_limit). (Ilia)
 - Fixed bug #45382 (timeout bug in stream_socket_enable_crypto).
   (vnegrier at optilian dot com, Ilia)
+- Fixed bug #44135 (PDO MySQL does not support CLIENT_FOUND_ROWS). (Johannes,
+  chx1975 at gmail dot com)
 - Fixed bug #46192 (ArrayObject with objects as storage serialization).
   (Etienne)
 
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/mysql_driver.c?r1=1.59.2.13.2.5.2.5r2=1.59.2.13.2.5.2.6diff_format=u
Index: php-src/ext/pdo_mysql/mysql_driver.c
diff -u php-src/ext/pdo_mysql/mysql_driver.c:1.59.2.13.2.5.2.5 
php-src/ext/pdo_mysql/mysql_driver.c:1.59.2.13.2.5.2.6
--- php-src/ext/pdo_mysql/mysql_driver.c:1.59.2.13.2.5.2.5  Tue Oct 14 
19:00:53 2008
+++ php-src/ext/pdo_mysql/mysql_driver.cMon Oct 27 18:32:08 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysql_driver.c,v 1.59.2.13.2.5.2.5 2008/10/14 19:00:53 johannes Exp $ 
*/
+/* $Id: mysql_driver.c,v 1.59.2.13.2.5.2.6 2008/10/27 18:32:08 johannes Exp $ 
*/
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -636,6 +636,14 @@
H-max_buffer_size = pdo_attr_lval(driver_options, 
PDO_MYSQL_ATTR_MAX_BUFFER_SIZE, H-max_buffer_size TSRMLS_CC);
 #endif
 
+   if (pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_FOUND_ROWS, 0 
TSRMLS_CC)) {
+   connect_opts |= CLIENT_FOUND_ROWS;
+   }
+
+   if (pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_IGNORE_SPACE, 
0 TSRMLS_CC)) {
+   connect_opts |= CLIENT_IGNORE_SPACE;
+   }
+
if (mysql_options(H-server, MYSQL_OPT_CONNECT_TIMEOUT, (const 
char *)connect_timeout)) {
pdo_mysql_error(dbh);
goto cleanup;
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/pdo_mysql.c?r1=1.8.2.13.2.1.2.6r2=1.8.2.13.2.1.2.7diff_format=u
Index: php-src/ext/pdo_mysql/pdo_mysql.c
diff -u php-src/ext/pdo_mysql/pdo_mysql.c:1.8.2.13.2.1.2.6 
php-src/ext/pdo_mysql/pdo_mysql.c:1.8.2.13.2.1.2.7
--- php-src/ext/pdo_mysql/pdo_mysql.c:1.8.2.13.2.1.2.6  Tue Oct 14 19:00:53 2008
+++ php-src/ext/pdo_mysql/pdo_mysql.c   Mon Oct 27 18:32:08 2008
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: pdo_mysql.c,v 1.8.2.13.2.1.2.6 2008/10/14 19:00:53 johannes Exp $ */
+/* $Id: pdo_mysql.c,v 1.8.2.13.2.1.2.7 2008/10/27 18:32:08 johannes Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -83,6 +83,8 @@
REGISTER_PDO_CLASS_CONST_LONG(MYSQL_ATTR_COMPRESS, 
(long)PDO_MYSQL_ATTR_COMPRESS);
 #endif
REGISTER_PDO_CLASS_CONST_LONG(MYSQL_ATTR_DIRECT_QUERY, 
(long)PDO_MYSQL_ATTR_DIRECT_QUERY);
+   REGISTER_PDO_CLASS_CONST_LONG(MYSQL_ATTR_FOUND_ROWS, 
(long)PDO_MYSQL_ATTR_FOUND_ROWS);
+   REGISTER_PDO_CLASS_CONST_LONG(MYSQL_ATTR_IGNORE_SPACE, 
(long)PDO_MYSQL_ATTR_IGNORE_SPACE);
 
 #ifdef PDO_USE_MYSQLND
pdo_mysqlnd_zval_cache = 
mysqlnd_palloc_init_cache(PDO_MYSQL_G(cache_size));
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/php_pdo_mysql_int.h?r1=1.16.2.4.2.1.2.4r2=1.16.2.4.2.1.2.5diff_format=u
Index: php-src/ext/pdo_mysql/php_pdo_mysql_int.h
diff -u php-src/ext/pdo_mysql/php_pdo_mysql_int.h:1.16.2.4.2.1.2.4 
php-src/ext/pdo_mysql/php_pdo_mysql_int.h:1.16.2.4.2.1.2.5
--- php-src/ext/pdo_mysql/php_pdo_mysql_int.h:1.16.2.4.2.1.2.4  Tue Oct 14 
19:00:53 2008
+++ php-src/ext/pdo_mysql/php_pdo_mysql_int.h   Mon Oct 27 18:32:08 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: php_pdo_mysql_int.h,v 1.16.2.4.2.1.2.4 2008/10/14 19:00:53 johannes 
Exp $ */
+/* $Id: php_pdo_mysql_int.h,v 1.16.2.4.2.1.2.5 2008/10/27 18:32:08 johannes 
Exp $ */
 
 #ifndef PHP_PDO_MYSQL_INT_H
 #define PHP_PDO_MYSQL_INT_H
@@ -161,6 +161,8 @@
PDO_MYSQL_ATTR_COMPRESS,
 #endif
PDO_MYSQL_ATTR_DIRECT_QUERY,
+   PDO_MYSQL_ATTR_FOUND_ROWS,
+   PDO_MYSQL_ATTR_IGNORE_SPACE
 };
 
 #endif
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt?r1=1.1.2.3r2=1.1.2.4diff_format=u
Index: php-src/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt
diff -u 

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

2008-10-27 Thread Johannes Schlüter
johannesMon Oct 27 18:33:23 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  Fix NEWS
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.354r2=1.2027.2.547.2.965.2.355diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.354 
php-src/NEWS:1.2027.2.547.2.965.2.355
--- php-src/NEWS:1.2027.2.547.2.965.2.354   Mon Oct 27 18:32:08 2008
+++ php-src/NEWSMon Oct 27 18:33:22 2008
@@ -25,6 +25,8 @@
 - Fixed bug #46205 (Closure - Memory leaks when ReflectionException is thrown).
   (Dmitry)
 - Fixed bug #46194 (SIGSEGV when requested file is not found). (Greg)
+- Fixed bug #46192 (ArrayObject with objects as storage serialization).
+  (Etienne)
 - Fixed bug #46185 (importNode changes the namespace of an XML element). (Rob)
 - Fixed bug #46178 (memory leak in ext/phar). (Greg)
 - Fixed bug #46160 (SPL - Memory leak when exception is thrown in offsetSet).
@@ -53,8 +55,6 @@
   (vnegrier at optilian dot com, Ilia)
 - Fixed bug #44135 (PDO MySQL does not support CLIENT_FOUND_ROWS). (Johannes,
   chx1975 at gmail dot com)
-- Fixed bug #46192 (ArrayObject with objects as storage serialization).
-  (Etienne)
 
 02 Sep 2008, PHP 5.3.0 Alpha 2
 - Removed special treatment of /tmp in sessions for open_basedir.



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



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

2008-10-27 Thread Ilia Alshanetsky
iliaa   Mon Oct 27 23:27:21 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysql  php_mysql.c 
  Log:
  
  Fixed compiler warning
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql.c?r1=1.213.2.6.2.16.2.29r2=1.213.2.6.2.16.2.30diff_format=u
Index: php-src/ext/mysql/php_mysql.c
diff -u php-src/ext/mysql/php_mysql.c:1.213.2.6.2.16.2.29 
php-src/ext/mysql/php_mysql.c:1.213.2.6.2.16.2.30
--- php-src/ext/mysql/php_mysql.c:1.213.2.6.2.16.2.29   Mon Oct 27 12:09:36 2008
+++ php-src/ext/mysql/php_mysql.c   Mon Oct 27 23:27:21 2008
@@ -18,7 +18,7 @@
+--+
 */
  
-/* $Id: php_mysql.c,v 1.213.2.6.2.16.2.29 2008/10/27 12:09:36 andrey Exp $ */
+/* $Id: php_mysql.c,v 1.213.2.6.2.16.2.30 2008/10/27 23:27:21 iliaa Exp $ */
 
 /* TODO:
  *
@@ -639,7 +639,7 @@
 #if !defined(MYSQL_USE_MYSQLND)
if ((MYSQL_VERSION_ID / 100) != (mysql_get_client_version() / 100)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING,
-   Headers and client library 
minor version mismatch. Headers:%d Library:%d,
+   Headers and client library 
minor version mismatch. Headers:%d Library:%ld,
MYSQL_VERSION_ID, 
mysql_get_client_version());
}
 #endif



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