Move fetch_all implementation out of mysqlnd

There doesn't seem to be any compelling reason to implement this
in mysqlnd rather than mysqli. It's just a loop over fetch_into.

This makes the function available under libmysqlclient as well,
and thus fixes bug #79372.
This commit is contained in:
Nikita Popov 2020-12-18 12:13:17 +01:00
parent be93e5a120
commit 037512cfce
12 changed files with 24 additions and 67 deletions

View file

@ -102,7 +102,6 @@ PHPAPI void mysqlnd_debug(const char *mode);
#define mysqlnd_fetch_row_c(result) (result)->m.fetch_row_c((result))
#define mysqlnd_fetch_row_zval(result, row_ptr, fetched) \
(result)->m.fetch_row((result), (row_ptr), 0, (fetched))
#define mysqlnd_fetch_all(result, flags, return_value) (result)->m.fetch_all((result), (flags), (return_value) ZEND_FILE_LINE_CC)
#define mysqlnd_get_connection_stats(conn, values) ((conn)->data)->m->get_statistics((conn)->data, (values) ZEND_FILE_LINE_CC)
#define mysqlnd_get_client_stats(values) _mysqlnd_get_client_stats(mysqlnd_global_stats, (values) ZEND_FILE_LINE_CC)