Ticket Change Details
Not logged in
Overview

Artifact ID: 2df8e511fd162db7f6e89651031e17f751b0d7b0
Ticket: 2ee159304e721349aae20e7a8155c7e6c2b041a9
Error in timeline (armv5tel-linux) showing events
User & Date: anonymous 2010-11-30 20:33:57
Changes

  1. Appended to comment:
    
    
    <hr /><i>anonymous claiming to be viric added on 2010-11-30 20:33:57:</i><br />
    So, manifest_parse includes:
    <verbatim>
            p->rDate = db_double(0.0, "SELECT julianday(%Q)", next_token(&x,0));
    </verbatim>
    
    While the tag_insert called in manifest_crosslink() does:
    <verbatim>
      db_prepare(&s,
        "REPLACE INTO tagxref(tagid,tagtype,srcId,origid,value,mtime,rid)"
        " VALUES(%d,%d,%d,%d,%Q,:mtime,%d)",
        tagid, tagtype, srcId, rid, zValue, rid
      );
      db_bind_double(&s, ":mtime", mtime);
    </verbatim>
    
    While the call at manifest_crosslink() does:
    <verbatim>
        prior = db_int(0,
          "SELECT rid FROM tagxref"
          " WHERE tagid=%d AND mtime<%.17g"
          " ORDER BY mtime DESC",
          tagid, p->rDate
        );
    </verbatim>
    
    I think that the <tt>%.17g</tt> printf kind of prompt should be moved into db_bind_double, as before. Otherwise there may be rounding problems, like those I am experiencing.
    
    Notice that the tag_insert resulted, in both computers, in:
    <verbatim>
    REPLACE INTO tagxref(tagid,tagtype,srcId,origid,value,mtime,rid) VALUES(11,1,74,74,'365',2455525.42240741,74);
    </verbatim>
    
    While the printf-style SQL queries with <tt>%.17g</tt> had different results in the two computers.