/ 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 Unified Diffs Ignore Whitespace Patch

Changes to tool/showdb.c.

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
}

static print_page(int iPg){
  unsigned char *aData;
  int i, j;
  aData = malloc(pagesize);
  if( aData==0 ) out_of_memory();
  lseek(db, (iPg-1)*pagesize, SEEK_SET);
  read(db, aData, pagesize);
  fprintf(stdout, "Page %d:\n", iPg);
  for(i=0; i<pagesize; i += perLine){
    fprintf(stdout, " %03x: ",i);
    for(j=0; j<perLine; j++){
      fprintf(stdout,"%02x ", aData[i+j]);
    }







|







21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
}

static print_page(int iPg){
  unsigned char *aData;
  int i, j;
  aData = malloc(pagesize);
  if( aData==0 ) out_of_memory();
  lseek(db, (iPg-1)*(long long int)pagesize, SEEK_SET);
  read(db, aData, pagesize);
  fprintf(stdout, "Page %d:\n", iPg);
  for(i=0; i<pagesize; i += perLine){
    fprintf(stdout, " %03x: ",i);
    for(j=0; j<perLine; j++){
      fprintf(stdout,"%02x ", aData[i+j]);
    }