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

2007-04-15 Thread Ilia Alshanetsky
iliaa   Sun Apr 15 16:50:42 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
/php-src/ext/pdo_mysql  mysql_statement.c 
  Log:
  Fixed bug #40935 (pdo_mysql does not raise an exception on empty
  fetchAll()).
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.649r2=1.2027.2.547.2.650diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.649 php-src/NEWS:1.2027.2.547.2.650
--- php-src/NEWS:1.2027.2.547.2.649 Sat Apr 14 17:39:13 2007
+++ php-src/NEWSSun Apr 15 16:50:41 2007
@@ -10,6 +10,8 @@
   (Johannes)
 - Fixed bug #41034 (json_encode() ignores null byte started keys in arrays).
   (Ilia)
+- Fixed bug #40935 (pdo_mysql does not raise an exception on empty
+  fetchAll()). (Ilia)
 - Fixed bug #40861 (strtotime() doesn't handle double negative relative time
   units correctly). (Derick)
 - Fixed bug #40290 (strtotime() returns unexpected result with particular
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/mysql_statement.c?r1=1.48.2.14.2.4r2=1.48.2.14.2.5diff_format=u
Index: php-src/ext/pdo_mysql/mysql_statement.c
diff -u php-src/ext/pdo_mysql/mysql_statement.c:1.48.2.14.2.4 
php-src/ext/pdo_mysql/mysql_statement.c:1.48.2.14.2.5
--- php-src/ext/pdo_mysql/mysql_statement.c:1.48.2.14.2.4   Sun Apr  8 
15:26:21 2007
+++ php-src/ext/pdo_mysql/mysql_statement.c Sun Apr 15 16:50:42 2007
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: mysql_statement.c,v 1.48.2.14.2.4 2007/04/08 15:26:21 iliaa Exp $ */
+/* $Id: mysql_statement.c,v 1.48.2.14.2.5 2007/04/15 16:50:42 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -413,6 +413,7 @@
 #endif
 
if (!S-result) {
+   strcpy(stmt-error_code, HY000);
return 0;   
}
if ((S-current_data = mysql_fetch_row(S-result)) == NULL) {

-- 
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) / NEWS /ext/pdo_mysql mysql_statement.c

2007-04-15 Thread Lukas Kahwe Smith

Ilia Alshanetsky wrote:

iliaa   Sun Apr 15 16:50:42 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src	NEWS 
/php-src/ext/pdo_mysql	mysql_statement.c 
  Log:

  Fixed bug #40935 (pdo_mysql does not raise an exception on empty
  fetchAll()).


Why should there be an exception for a fetchAll() call in an empty 
result? Or am I misunderstanding the commit message?


regards,
Lukas

--
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) / NEWS /ext/pdo_mysql mysql_statement.c

2007-04-15 Thread Ilia Alshanetsky
Its not really an empty results, but rather a fetchAll() on a result  
of an exec() statement where there is no result set. Without  
emulation enabled this generates a proper error (as indicated in the  
bug report), however with emulation enabled it does not report any  
errors. This patch fixes that misbehavior.




On 15-Apr-07, at 1:03 PM, Lukas Kahwe Smith wrote:


Ilia Alshanetsky wrote:

iliaa   Sun Apr 15 16:50:42 2007 UTC
  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS /php-src/ext/pdo_mysql mysql_statement.c   Log:
  Fixed bug #40935 (pdo_mysql does not raise an exception on empty
  fetchAll()).


Why should there be an exception for a fetchAll() call in an empty  
result? Or am I misunderstanding the commit message?


regards,
Lukas


Ilia Alshanetsky

--
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/pdo_mysql mysql_statement.c

2007-04-08 Thread Ilia Alshanetsky
iliaa   Sun Apr  8 15:26:21 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/pdo_mysql  mysql_statement.c 
/php-srcNEWS 
  Log:
  
  Fixed bug #40822 (pdo_mysql does not return rowCount() on select). 
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/mysql_statement.c?r1=1.48.2.14.2.3r2=1.48.2.14.2.4diff_format=u
Index: php-src/ext/pdo_mysql/mysql_statement.c
diff -u php-src/ext/pdo_mysql/mysql_statement.c:1.48.2.14.2.3 
php-src/ext/pdo_mysql/mysql_statement.c:1.48.2.14.2.4
--- php-src/ext/pdo_mysql/mysql_statement.c:1.48.2.14.2.3   Mon Jan  1 
09:36:05 2007
+++ php-src/ext/pdo_mysql/mysql_statement.c Sun Apr  8 15:26:21 2007
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: mysql_statement.c,v 1.48.2.14.2.3 2007/01/01 09:36:05 sebastian Exp $ 
*/
+/* $Id: mysql_statement.c,v 1.48.2.14.2.4 2007/04/08 15:26:21 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -231,7 +231,7 @@
return 0;
}
 
-   stmt-row_count = 0;
+   stmt-row_count = mysql_num_rows(S-result);
 
if (!stmt-executed) {
stmt-column_count = (int) mysql_num_fields(S-result);
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.629r2=1.2027.2.547.2.630diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.629 php-src/NEWS:1.2027.2.547.2.630
--- php-src/NEWS:1.2027.2.547.2.629 Sun Apr  8 00:18:37 2007
+++ php-src/NEWSSun Apr  8 15:26:21 2007
@@ -1,6 +1,6 @@
 PHPNEWS
 |||
-?? ??? 2007, PHP 5.2.2
+05 Apr 2007, PHP 5.2.2RC1
 - Improved bundled GD
   . Sync to 2.0.35
   . colors allocated henceforth from the resulting image overwrite the palette 
@@ -66,6 +66,7 @@
 - Fixed bug #40836 (Segfault in ext/dom). (Rob)
 - Fixed bug #40833 (Crash when using unset() on an ArrayAccess object retrieved
   via __get()). (Dmitry)
+- Fixed bug #40822 (pdo_mysql does not return rowCount() on select). (Ilia)
 - Fixed bug #40815 (using strings like class::func and static methods in 
   set_exception_handler() might result in crash). (Tony)
 - Fixed bug #40809 (Poor performance of .=). (Dmitry)

-- 
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) / NEWS /ext/pdo_mysql mysql_statement.c

2007-04-08 Thread Antony Dovgal

On 04/08/2007 07:26 PM, Ilia Alshanetsky wrote:

iliaa   Sun Apr  8 15:26:21 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/pdo_mysql	mysql_statement.c 
/php-src	NEWS 
  Log:
  
  Fixed bug #40822 (pdo_mysql does not return rowCount() on select). 


Please do not forget to MFB.

--
Wbr, 
Antony Dovgal


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