diff --git a/db/boinc_db.C b/db/boinc_db.C index f62fc5eef1..c92047e0f0 100644 --- a/db/boinc_db.C +++ b/db/boinc_db.C @@ -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; - return -1; + + // 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; diff --git a/db/boinc_db.h b/db/boinc_db.h index 7435d87a85..1d57a99785 100755 --- a/db/boinc_db.h +++ b/db/boinc_db.h @@ -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, diff --git a/sched/transitioner.C b/sched/transitioner.C index c61fa156cb..ffba216be1 100644 --- a/sched/transitioner.C +++ b/sched/transitioner.C @@ -76,7 +76,7 @@ void handle_wu(DB_TRANSITIONER_ITEM_SET& transitioner, std::vector