mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=3763
This commit is contained in:
parent
c15b0bc10f
commit
3a85d20931
|
@ -646,6 +646,7 @@ int DB_TRANSITIONER_ITEM_SET::enumerate(
|
|||
return -1;
|
||||
}
|
||||
last_item.parse(row);
|
||||
nitems_this_query = 1;
|
||||
}
|
||||
|
||||
items.clear();
|
||||
|
@ -654,9 +655,17 @@ int DB_TRANSITIONER_ITEM_SET::enumerate(
|
|||
row = mysql_fetch_row(cursor.rp);
|
||||
if (!row) {
|
||||
cursor.active = false;
|
||||
|
||||
// if got fewer rows than requested, last group is complete
|
||||
//
|
||||
if (nitems_this_query < nresult_limit) {
|
||||
return 0;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
new_item.parse(row);
|
||||
nitems_this_query++;
|
||||
if (new_item.id != last_item.id) {
|
||||
last_item = new_item;
|
||||
return 0;
|
||||
|
|
|
@ -573,6 +573,7 @@ class DB_TRANSITIONER_ITEM_SET : public DB_BASE_SPECIAL {
|
|||
public:
|
||||
DB_TRANSITIONER_ITEM_SET();
|
||||
TRANSITIONER_ITEM last_item;
|
||||
int nitems_this_query;
|
||||
|
||||
int enumerate(
|
||||
int transition_time,
|
||||
|
|
|
@ -76,7 +76,7 @@ void handle_wu(DB_TRANSITIONER_ITEM_SET& transitioner, std::vector<TRANSITIONER_
|
|||
for (unsigned int i=0; i<items.size(); i++) {
|
||||
switch (items[i].res_server_state) {
|
||||
case RESULT_SERVER_STATE_UNSENT:
|
||||
if (items[i].res_id) { nunsent++ };
|
||||
if (items[i].res_id) nunsent++;
|
||||
break;
|
||||
case RESULT_SERVER_STATE_IN_PROGRESS:
|
||||
if (items[i].res_id) {
|
||||
|
@ -125,7 +125,7 @@ void handle_wu(DB_TRANSITIONER_ITEM_SET& transitioner, std::vector<TRANSITIONER_
|
|||
}
|
||||
break;
|
||||
case RESULT_OUTCOME_CLIENT_ERROR:
|
||||
if (items[i].res_id) { nerrors++ };
|
||||
if (items[i].res_id) nerrors++;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue