/ Check-in [9ca737c0]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Fix showstat4.c so that it decodes typecodes 8 and 9 correctly.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9ca737c0b41f87998d842e7772c3e483bb291c50
User & Date: drh 2014-06-24 20:19:21
Context
2014-06-26
21:28
Revise the affinity returned for expressions flagged as 'generic'. Fix for [9a8b09f8e6]. check-in: 92f7ad43 user: mistachkin tags: trunk
20:21
Attempt to use sqlite_stat4 data to estimate the number of rows visited by a range query that uses a skip-scan. This code is largely untested. check-in: 01dc8102 user: dan tags: stat4-skipscan
2014-06-24
20:19
Fix showstat4.c so that it decodes typecodes 8 and 9 correctly. check-in: 9ca737c0 user: drh tags: trunk
00:59
Add the showstat4.exe utility program for decoding and displaying the content of the sqlite_stat4 table in a database. check-in: b4d9f605 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tool/showstat4.c.

102
103
104
105
106
107
108


109
110
111
112
113
114
115
        case 10:
        case 11: sz = 0;  break;
        default: sz = (int)(iVal-12)/2;  break;
      }
      if( y+sz>nSample ) break;
      if( iVal==0 ){
        printf("%sNULL", zSep);


      }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;







>
>







102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
        case 10:
        case 11: sz = 0;  break;
        default: sz = (int)(iVal-12)/2;  break;
      }
      if( y+sz>nSample ) break;
      if( iVal==0 ){
        printf("%sNULL", zSep);
      }else if( iVal==8 || iVal==9 ){
        printf("%s%d", zSep, ((int)iVal)-8);
      }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;