From /root/src/boinc/db/db_base.C
int DB_BASE::enumerate(char* clause) {Ok, so when a row is NOT found it returns a 1, but if a row is found it returns a 0. Now, take a look at /root/src/boinc/sched/main.C
int x;
char query[MAX_QUERY_LEN];
MYSQL_ROW row;
if (!cursor.active) {
cursor.active = true;
sprintf(query, "select * from %s %s", table_name, clause);
x = mysql_query(db->mysql, query);
if (x) return mysql_errno(db->mysql);
cursor.rp = mysql_store_result(db->mysql);
if (!cursor.rp) return mysql_errno(db->mysql);
}
row = mysql_fetch_row(cursor.rp);
if (!row) {
mysql_free_result(cursor.rp);
cursor.active = false;
return 1;
} else {
db_parse(row);
}
return 0;
}
found = false;Is that right? While we find rows, gproject.enumerate("") returns 0. Yeah, it looks right... are we getting an error? Posted by torque at October 15, 2003 10:11 AM | TrackBack
while (!gproject.enumerate("")) {
found = true;
}
if (!found) {
log_messages.printf(SchedMessages::CRITICAL, "can't find project\n");
exit(1);
}
I have a fat cursor that covers three letters at a time. I cannot get rid of it. Any sugegstions?
Posted by: Charlie at February 5, 2005 9:17 AMThe Rolling Stones postpone a show in the US to allow singer Sir Mick Jagger time to rest his voice...
Posted by: Aron Cormier at December 14, 2006 4:50 AM