[Sqlrelay-discussion] routerconnections only return 10 rows
Brought to you by:
mused
|
From: <boc...@du...> - 2006-11-27 04:06:48
|
Hi all
I updated to version 0.38 recently and found routing and filtering is a
great idea.
While, I found some problem with the route.
Using the sqlrelay.conf.example,
I can only get first 10 rows when accessing the database with routed
sqlrconnection.
I found there is a FETCH_AT_ONCE=10 in
src/connections/route/routeconnections.h
Routeconnections connect to database (mysql) with ResultSetBufferSize = 10
It seems routeconnections not get more rows.
Is there something I missed?
I think nobody received my last mail, for I have sent it wrong address.
I found this today:
Routerconnection.C
bool routercursor::fetchRow() {
if (nextrow<cur->rowCount()) {
nextrow++;
return true;
}
return false;
}
BUT:
rowCount() only return count of the result set buffer.
This should be cur->endOfResultSet()
--- src/connections/router/routerconnection.C 2006-11-27
10:26:31.949039296 +0800
+++ src/connections/router/routerconnection.C 2006-11-27 10:26:24.277205592
+0800
@@ -708,7 +708,8 @@
}
bool routercursor::fetchRow() {
- if (nextrow<cur->rowCount()) {
+ //if (nextrow<cur->rowCount()) {
+ if (!cur->endOfResultSet()) {
nextrow++;
return true;
}
|