create_work: show DB error messages

This commit is contained in:
David Anderson 2015-04-13 23:58:59 -07:00
parent 96a3a59d7e
commit f81105f707
2 changed files with 11 additions and 3 deletions

View File

@ -42,8 +42,9 @@
// restore permanent mode - used only in set_X_mode() GUI RPC
// values of ACTIVE_TASK::scheduler_state and ACTIVE_TASK::next_scheduler_state
// "SCHEDULED" is synonymous with "executing" except when CPU throttling
// is in use.
// "SCHEDULED" doesn't mean the task is actually running;
// e.g. it won't be running if tasks are suspended or CPU throttling is in use
//
#define CPU_SCHED_UNINITIALIZED 0
#define CPU_SCHED_PREEMPTED 1
#define CPU_SCHED_SCHEDULED 2

View File

@ -442,7 +442,11 @@ int main(int argc, char** argv) {
retval = wu.insert_batch(values);
if (retval) {
fprintf(stderr,
"wu.insert_batch() failed: %d\n", retval
"wu.insert_batch() failed: %d; size %d\n",
retval, (int)values.size()
);
fprintf(stderr,
"MySQL error: %s\n", boinc_db.error_string()
);
exit(1);
}
@ -455,6 +459,9 @@ int main(int argc, char** argv) {
fprintf(stderr,
"wu.insert_batch() failed: %d\n", retval
);
fprintf(stderr,
"MySQL error: %s\n", boinc_db.error_string()
);
exit(1);
}
}