I've just manually added it to the column and it works fine now. Should I look 
for all timestamps that can be null and apply ON UPDATE CURRENT_TIMESTAMP?

Regards
Kevin



On 10/09/2013, at 3:08 PM, David Anderson <[email protected]> wrote:

>From the following:
http://dev.mysql.com/doc/refman/5.6/en/timestamp-initialization.html
it looks like the semantics of "timestamp" may have changed in 5.6.
Maybe we need to declare that field differently.
(We use "timestamp" in workunit, result, and several forum-related tables.)

I don't have a 5.6 server set up right now; I'll do that soon.
In the meantime, can anyone poke around and see what's going on?

-- David

On 10-Sep-2013 12:01 AM, Kevin Vinsen wrote:
> I'm running 5.6.12 and I'm missing the on update CURRENT_TIMESTAMP
> 
> Are there other timestamps that should have that?
> 
> Regards
> Kevin
> 
> 
> 
> On 10/09/2013, at 2:49 PM, David Anderson <[email protected]> wrote:
> 
> 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.
> 

_______________________________________________
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.

Reply via email to