SQLite

Check-in [f735c2497e]
Login

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

Overview
Comment:Improved display of record data in the "NNNbd" output of the showdb.exe utility program.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f735c2497eaad15216c90c6b92fd5ceff460220a
User & Date: drh 2014-06-20 13:55:06.139
Context
2014-06-23
10:04
Fix a problem with SQLITE_OMIT_WAL builds. (check-in: 612b6d1b1f user: dan tags: trunk)
2014-06-20
13:55
Improved display of record data in the "NNNbd" output of the showdb.exe utility program. (check-in: f735c2497e user: drh tags: trunk)
01:32
In the showdb.exe utility, for the "NNNbd" command, also show data fields in addition to header fields on each record decoded. Improvements to formatting. (check-in: b451fe0cb9 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to tool/showdb.c.
475
476
477
478
479
480
481
482

483


















484
485
486
487
488
489
490
           double r;
           memcpy(&r, &v, sizeof(r));
           printf("%#g\n", r);
         }else{
           printf("%lld\n", v);
         }
       }else{
         printf("%d bytes of %s\n", szCol[i],

                (typeCol[i]&1)==0 ? "BLOB" : "TEXT");


















       }
       j = ofstCol[i] + szCol[i];
    }
  }
  if( j<nLocal ){
    printBytes(a, x+j, 0);
    printf("... %d bytes of content ...\n", nLocal-j);







|
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
           double r;
           memcpy(&r, &v, sizeof(r));
           printf("%#g\n", r);
         }else{
           printf("%lld\n", v);
         }
       }else{
         int ii, jj;
         char zConst[32];
         if( (typeCol[i]&1)==0 ){
           zConst[0] = 'x';
           zConst[1] = '\'';
           for(ii=2, jj=0; jj<szCol[i] && ii<24; jj++, ii+=2){
             sprintf(zConst+ii, "%02x", pData[jj]);
           }
         }else{
           zConst[0] = '\'';
           for(ii=1, jj=0; jj<szCol[i] && ii<24; jj++, ii++){
             zConst[ii] = isprint(pData[jj]) ? pData[jj] : '.';
           }
           zConst[ii] = 0;
         }
         if( jj<szCol[i] ){
           memcpy(zConst+ii, "...'", 5);
         }else{
           memcpy(zConst+ii, "'", 2);
         }
         printf("%s\n", zConst);
       }
       j = ofstCol[i] + szCol[i];
    }
  }
  if( j<nLocal ){
    printBytes(a, x+j, 0);
    printf("... %d bytes of content ...\n", nLocal-j);