diff options
author | Andrey Hristov <andrey@php.net> | 2011-02-16 16:36:33 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2011-02-16 16:36:33 +0000 |
commit | 1bdc780d30450593c1289845e95e9749ff38181a (patch) | |
tree | ba2c3854738e5dbf8861e5768a766fff1d2926f0 /ext/mysqlnd | |
parent | d41c8bd74a3d5da642b3651dc80d5475f04b95b1 (diff) | |
download | php-git-1bdc780d30450593c1289845e95e9749ff38181a.tar.gz |
fixed a problem in mysqlnd. 0 was always as num_rows returned for
unbuffered sets (text protocol and PS).
Diffstat (limited to 'ext/mysqlnd')
-rw-r--r-- | ext/mysqlnd/mysqlnd_result.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mysqlnd/mysqlnd_result.c b/ext/mysqlnd/mysqlnd_result.c index 2979e56667..947e788635 100644 --- a/ext/mysqlnd/mysqlnd_result.c +++ b/ext/mysqlnd/mysqlnd_result.c @@ -1401,7 +1401,7 @@ static uint64_t MYSQLND_METHOD(mysqlnd_res, num_rows)(const MYSQLND_RES * const result TSRMLS_DC) { /* Be compatible with libmysql. We count row_count, but will return 0 */ - return result->stored_data? result->stored_data->row_count:0; + return result->stored_data? result->stored_data->row_count:(result->unbuf && result->unbuf->eof_reached? result->unbuf->row_count:0); } /* }}} */ |