*** empty log message ***

svn path=/trunk/boinc/; revision=3766
This commit is contained in:
David Anderson 2004-07-03 16:57:28 +00:00
parent 47ceb7ead4
commit 83ef8624af
2 changed files with 43 additions and 0 deletions

View File

@ -735,6 +735,7 @@ void WORK_ITEM::parse(MYSQL_ROW& r) {
int i=0;
memset(this, 0, sizeof(WORK_ITEM));
res_id = atoi(r[i++]);
#if 0
strcpy2(res_xml_doc_in, r[i++]);
workunitid = atoi(r[i++]);
wu_rsc_memory_bound = atof(r[i++]);
@ -744,6 +745,34 @@ void WORK_ITEM::parse(MYSQL_ROW& r) {
wu_rsc_disk_bound = atof(r[i++]);
strcpy2(wu_name, r[i++]);
strcpy2(wu_xml_doc, r[i++]);
#else
id=atol(r[i++]);
create_time = atoi(r[i++]);
appid = atoi(r[i++]);
strcpy2(name, r[i++]);
strcpy2(xml_doc, r[i++]);
batch = atoi(r[i++]);
rsc_fpops_est = atof(r[i++]);
rsc_fpops_bound = atof(r[i++]);
rsc_memory_bound = atof(r[i++]);
rsc_disk_bound = atof(r[i++]);
need_validate = atoi(r[i++]);
canonical_resultid = atoi(r[i++]);
canonical_credit = atof(r[i++]);
transition_time = atoi(r[i++]);
delay_bound = atoi(r[i++]);
error_mask = atoi(r[i++]);
file_delete_state = atoi(r[i++]);
assimilate_state = atoi(r[i++]);
workseq_next = atoi(r[i++]);
opaque = atof(r[i++]);
min_quorum = atoi(r[i++]);
target_nresults = atoi(r[i++]);
max_error_results = atoi(r[i++]);
max_total_results = atoi(r[i++]);
max_success_results = atoi(r[i++]);
strcpy2(result_template_file, r[i++]);
#endif
}
int DB_WORK_ITEM::enumerate(char* clause) {
@ -752,6 +781,7 @@ int DB_WORK_ITEM::enumerate(char* clause) {
MYSQL_ROW row;
if (!cursor.active) {
#if 0
sprintf(query,
"select result.id as res_id, "
"result.xml_doc_in as res_xml_doc_in, "
@ -767,6 +797,14 @@ int DB_WORK_ITEM::enumerate(char* clause) {
"where workunit.id = result.id %s",
clause
);
#else
sprintf(query,
"select result.id, workunit.* from result, workunit "
"where workunit.id == result.workunitid "
"and result.server_state=2 order by result.random "
"limit 10"
);
#endif
retval = db->do_query(query);
if (retval) return mysql_errno(db->mysql);
cursor.rp = mysql_store_result(db->mysql);

View File

@ -589,6 +589,7 @@ public:
// used by the feeder and scheduler for outgoing work
//
struct WORK_ITEM {
#if 0
int res_id;
int res_server_state;
char res_xml_doc_in[LARGE_BLOB_SIZE];
@ -601,6 +602,10 @@ struct WORK_ITEM {
double wu_transition_time;
char wu_name[256];
char wu_xml_doc[LARGE_BLOB_SIZE];
#else
int res_id;
WORKUNIT wu;
#endif
void parse(MYSQL_ROW& row);
};