Bug #13432 | C API: sending a group of rows at a time | ||
---|---|---|---|
Submitted: | 23 Sep 2005 16:05 | Modified: | 13 Oct 2005 18:37 |
Reporter: | Jacek Becla | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S4 (Feature request) |
Version: | ANY | OS: | Any (ANY) |
Assigned to: | CPU Architecture: | Any |
[23 Sep 2005 16:05]
Jacek Becla
[23 Sep 2005 16:14]
Andrey Hristov
That's already possible with Server-side cursors. A SS cursor is a prepared statement which has special attribute - cursors. Cursors support parallel execution of several queries as well as fetching in bunches. Use mysql_stmt_attr_set() on a PS to make it cursor STMT_ATTR_CURSOR_TYPE, with value CURSOR_TYPE_READ_ONLY. Number of prefetched rows with STMT_ATTR_PREFETCH_ROWS. (libmysql.c)
[13 Oct 2005 18:37]
Paul DuBois
See: http://dev.mysql.com/doc/refman/5.0/en/mysql-stmt-attr-set.html For an example program that uses this feature, see tests/mysql_client_test.c in a MySQL 5.0 source distribution.