andrey Mon, 05 Sep 2011 15:37:58 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=316189
Log: missing from previous commit for #55582 Bug: https://bugs.php.net/55582 (Closed) mysqli_num_rows() returns always 0 for unbuffered, when mysqlnd is used Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c 2011-09-05 15:29:45 UTC (rev 316188) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c 2011-09-05 15:37:58 UTC (rev 316189) @@ -616,19 +616,18 @@ static unsigned long * mysqlnd_fetch_lengths_unbuffered(MYSQLND_RES * const result TSRMLS_DC) { - return result->lengths; + /* simulate output of libmysql */ + return (!result->unbuf || result->unbuf->last_row_data || result->unbuf->eof_reached)? result->lengths:NULL; } /* }}} */ -#if !defined(MYSQLND_USE_OPTIMISATIONS) || MYSQLND_USE_OPTIMISATIONS == 0 /* {{{ mysqlnd_res::fetch_lengths */ PHPAPI unsigned long * _mysqlnd_fetch_lengths(MYSQLND_RES * const result TSRMLS_DC) { return result->m.fetch_lengths? result->m.fetch_lengths(result TSRMLS_CC) : NULL; } /* }}} */ -#endif /* {{{ mysqlnd_fetch_row_unbuffered_c */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php