/ Check-in [9675b622]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Update the showdb.c utility so that it works with databases larger than 4GiB. (CVS 6656)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:9675b6223645fe01b202cbefae63f3209a50efcc
User & Date: drh 2009-05-19 03:21:53
Context
2009-05-19
14:21
Improvements to the SQLITE_INT_TO_PTR macro to reduce the number of warnings. For some platforms it might be necessary to compile with the -DHAVE_STDINT_H flag. Ticket #3860. (CVS 6657) check-in: 1b0ee9d1 user: drh tags: trunk
03:21
Update the showdb.c utility so that it works with databases larger than 4GiB. (CVS 6656) check-in: 9675b622 user: drh tags: trunk
2009-05-18
16:04
Fix memdb.test so that it works when OMIT_AUTOVACUUM is defined. (CVS 6649) check-in: 8c3c0c24 user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to tool/showdb.c.

    21     21   }
    22     22   
    23     23   static print_page(int iPg){
    24     24     unsigned char *aData;
    25     25     int i, j;
    26     26     aData = malloc(pagesize);
    27     27     if( aData==0 ) out_of_memory();
    28         -  lseek(db, (iPg-1)*pagesize, SEEK_SET);
           28  +  lseek(db, (iPg-1)*(long long int)pagesize, SEEK_SET);
    29     29     read(db, aData, pagesize);
    30     30     fprintf(stdout, "Page %d:\n", iPg);
    31     31     for(i=0; i<pagesize; i += perLine){
    32     32       fprintf(stdout, " %03x: ",i);
    33     33       for(j=0; j<perLine; j++){
    34     34         fprintf(stdout,"%02x ", aData[i+j]);
    35     35       }