That's odd;
workunit.mod_time is of type "timestamp",
which means that it's supposed to get automatically set (by MySQL)
to the current date/time whenever the row is modified.
When you do "explain workunit" in mysql, what do you see for mod_time?
On my server (5.5.23) I see
Field: mod_time
Type: timestamp
Null: NO
Key:
Default: CURRENT_TIMESTAMP
Extra: on update CURRENT_TIMESTAMP
What version of MySQL are you using?
-- David
On 09-Sep-2013 10:07 PM, Kevin Vinsen wrote:
Is the db_purge working in the latest and greatest from Git?
I'm using it like this
db_purge -min_age_days 14 --max_wu_per_file 10000 --gzip --daily_dir --one_pass
-d 3
Looking at the code in db_purge.cpp the do_pass routine
bool did_something = false;
DB_WORKUNIT wu;
char buf[256];
if (min_age_days) {
min_age_seconds = (int) min_age_days*86400;
if (id_modulus) {
sprintf(buf,
"where file_delete_state=%d and mod_time<current_timestamp() -
interval %d second and id %% %d = %d limit %d",
FILE_DELETE_DONE, min_age_seconds, id_modulus, id_remainder,
DB_QUERY_LIMIT
);
} else {
sprintf(buf,
"where file_delete_state=%d and mod_time<current_timestamp() -
interval %d second limit %d",
FILE_DELETE_DONE, min_age_seconds, DB_QUERY_LIMIT
);
}
} else {
if (id_modulus) {
sprintf(buf,
"where file_delete_state=%d and id %% %d = %d limit %d",
FILE_DELETE_DONE, id_modulus, id_remainder, DB_QUERY_LIMIT
);
} else {
sprintf(buf,
"where file_delete_state=%d limit %d",
FILE_DELETE_DONE, DB_QUERY_LIMIT
);
}
}
int n=0;
while (1) {
retval = wu.enumerate(buf);
if (retval) {
The code should create the where clause
where file_delete_state=%d and mod_time<current_timestamp() - interval %d
second limit %d
But in my database for work units mod_time is null for everything. Looking at
file_deleter.cpp it seems to only set file_delete_state.
Anyone seen anything like this before?
Regards
Kevin
_______________________________________________
boinc_dev mailing list
[email protected]
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.
_______________________________________________
boinc_dev mailing list
[email protected]
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.