/ Check-in [b9eda2249a]
Login

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

Overview
Comment:Fix the build for when -DSQLITE_SMALL_STACK is used.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: b9eda2249ab5cf523093e4849c317d9a4b1743f7e15d96bdd6bb6cc423302914
User & Date: drh 2019-07-30 21:00:13
Context
2019-07-31
12:13
Do not allow the json_set() function to overwrite the same element more than once. check-in: f237f60e4f user: drh tags: trunk
2019-07-30
21:00
Fix the build for when -DSQLITE_SMALL_STACK is used. check-in: b9eda2249a user: drh tags: trunk
14:22
Improved fix for ticket [ced41c7c7d6b4d36] that keeps skip-scan enabled, but avoids identifying a skip-scan as order-distinct (because it is not) and thus forces a separate b-tree to implement the DISTINCT clause of a query. This undoes check-in [a871d69c6de65038] and substitutes a new fix. check-in: 89bf0399e8 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbe.c.

  2980   2980         }else{
  2981   2981           pRec->uTemp = 0;
  2982   2982         }
  2983   2983         nHdr++;
  2984   2984       }else if( pRec->flags & (MEM_Int|MEM_IntReal) ){
  2985   2985         /* Figure out whether to use 1, 2, 4, 6 or 8 bytes. */
  2986   2986         i64 i = pRec->u.i;
  2987         -      u64 u;
         2987  +      u64 uu;
  2988   2988         testcase( pRec->flags & MEM_Int );
  2989   2989         testcase( pRec->flags & MEM_IntReal );
  2990   2990         if( i<0 ){
  2991         -        u = ~i;
         2991  +        uu = ~i;
  2992   2992         }else{
  2993         -        u = i;
         2993  +        uu = i;
  2994   2994         }
  2995   2995         nHdr++;
  2996         -      testcase( u==127 );               testcase( u==128 );
  2997         -      testcase( u==32767 );             testcase( u==32768 );
  2998         -      testcase( u==8388607 );           testcase( u==8388608 );
  2999         -      testcase( u==2147483647 );        testcase( u==2147483648 );
  3000         -      testcase( u==140737488355327LL ); testcase( u==140737488355328LL );
  3001         -      if( u<=127 ){
         2996  +      testcase( uu==127 );               testcase( uu==128 );
         2997  +      testcase( uu==32767 );             testcase( uu==32768 );
         2998  +      testcase( uu==8388607 );           testcase( uu==8388608 );
         2999  +      testcase( uu==2147483647 );        testcase( uu==2147483648 );
         3000  +      testcase( uu==140737488355327LL ); testcase( uu==140737488355328LL );
         3001  +      if( uu<=127 ){
  3002   3002           if( (i&1)==i && file_format>=4 ){
  3003         -          pRec->uTemp = 8+(u32)u;
         3003  +          pRec->uTemp = 8+(u32)uu;
  3004   3004           }else{
  3005   3005             nData++;
  3006   3006             pRec->uTemp = 1;
  3007   3007           }
  3008         -      }else if( u<=32767 ){
         3008  +      }else if( uu<=32767 ){
  3009   3009           nData += 2;
  3010   3010           pRec->uTemp = 2;
  3011         -      }else if( u<=8388607 ){
         3011  +      }else if( uu<=8388607 ){
  3012   3012           nData += 3;
  3013   3013           pRec->uTemp = 3;
  3014         -      }else if( u<=2147483647 ){
         3014  +      }else if( uu<=2147483647 ){
  3015   3015           nData += 4;
  3016   3016           pRec->uTemp = 4;
  3017         -      }else if( u<=140737488355327LL ){
         3017  +      }else if( uu<=140737488355327LL ){
  3018   3018           nData += 6;
  3019   3019           pRec->uTemp = 5;
  3020   3020         }else{
  3021   3021           nData += 8;
  3022   3022           if( pRec->flags & MEM_IntReal ){
  3023   3023             /* If the value is IntReal and is going to take up 8 bytes to store
  3024   3024             ** as an integer, then we might as well make it an 8-byte floating