/ Check-in [5ec37c62]
Login

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

Overview
Comment:Enhance the showstat4 utility program to show the full precision of floating point values in sqlite_stat4 tables.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 5ec37c62f65b2870dcd7a906912da787367f3912a96b6f3536355fad65903575
User & Date: drh 2017-07-15 17:57:31
Context
2017-07-15
20:25
Fix a missing \n at the end of a comment causing a line to be too long. No code changes. check-in: 687bd478 user: drh tags: trunk
17:57
Enhance the showstat4 utility program to show the full precision of floating point values in sqlite_stat4 tables. check-in: 5ec37c62 user: drh tags: trunk
08:02
Fix another minor problem in test file like.test. check-in: 0953e746 user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tool/showstat4.c.

114
115
116
117
118
119
120

121

122

123
124
125
126
127
128
129
      }else if( iVal<=7 ){
        v = (signed char)aSample[y];
        for(j=1; j<sz; j++){
          v = (v<<8) + aSample[y+j];
        }
        if( iVal==7 ){
          double r;

          memcpy(&r, &v, sizeof(r));

          printf("%s%#g", zSep, r);

        }else{
          printf("%s%lld", zSep, v);
        }
      }else if( (iVal&1)==0 ){
        printf("%sx'", zSep);
        for(j=0; j<sz; j++){
          printf("%02x", aSample[y+j]);







>

>
|
>







114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
      }else if( iVal<=7 ){
        v = (signed char)aSample[y];
        for(j=1; j<sz; j++){
          v = (v<<8) + aSample[y+j];
        }
        if( iVal==7 ){
          double r;
          char *z;
          memcpy(&r, &v, sizeof(r));
          z = sqlite3_mprintf("%s%!.15g", zSep, r);
          printf("%s", z);
          sqlite3_free(z);
        }else{
          printf("%s%lld", zSep, v);
        }
      }else if( (iVal&1)==0 ){
        printf("%sx'", zSep);
        for(j=0; j<sz; j++){
          printf("%02x", aSample[y+j]);