SQLite

Check-in [5d554e4d]
Login

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

Overview
Comment:The fix at [2bf5413dc2c19d5f] was incomplete in that it failed to clear the reusable register cache that might contain registers in the STAT4 buffer region. This additional change corrects the problem. Forum post 83cb4a95a0. Test case in TH3.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 5d554e4d0f59a4309fed40e4fb26c7be42f1d4d55ccdcaaf7b4d445aa3122955
User & Date: drh 2023-03-25 18:31:24
Context
2023-03-25
18:41
Add the tag-20230325-1 comment that was omitted from the prior check-in. (check-in: a13c01d0 user: drh tags: trunk)
18:33
The fix at [13c8c60bb6b4447b] was incomplete in that it failed to clear the reusable register cache that might contain registers in the STAT4 buffer region. This additional change corrects the problem. (check-in: 671bf6f5 user: drh tags: branch-3.41)
18:31
The fix at [2bf5413dc2c19d5f] was incomplete in that it failed to clear the reusable register cache that might contain registers in the STAT4 buffer region. This additional change corrects the problem. Forum post 83cb4a95a0. Test case in TH3. (check-in: 5d554e4d user: drh tags: trunk)
12:27
Even tighter bounds on the maximum length of the filename for sqlite3_load_extension(). (check-in: 78729141 user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/analyze.c.

1293
1294
1295
1296
1297
1298
1299















1300
1301
1302
1303
1304
1305
1306
          }
          if( nColX>mxCol ) mxCol = nColX;
        }

        /* Allocate space to compute results for the largest index */
        pParse->nMem = MAX(pParse->nMem, regCol+mxCol);
        doOnce = 0;















      }

      addrNext = sqlite3VdbeCurrentAddr(v);
      callStatGet(pParse, regStat, STAT_GET_ROWID, regSampleRowid);
      addrIsNull = sqlite3VdbeAddOp1(v, OP_IsNull, regSampleRowid);
      VdbeCoverage(v);
      callStatGet(pParse, regStat, STAT_GET_NEQ, regEq);







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
          }
          if( nColX>mxCol ) mxCol = nColX;
        }

        /* Allocate space to compute results for the largest index */
        pParse->nMem = MAX(pParse->nMem, regCol+mxCol);
        doOnce = 0;
#ifdef SQLITE_DEBUG
        /* Verify that setting pParse->nTempReg to zero below really
        ** is needed in some cases, in order to excise all temporary
        ** registers from the middle of the STAT4 buffer.  
        ** https://sqlite.org/forum/forumpost/83cb4a95a0 (2023-03-25)
        */
        if( pParse->nTempReg>0 ){
          int kk;
          for(kk=0; kk<pParse->nTempReg; kk++){
            int regT = pParse->aTempReg[kk];
            testcase( regT>=regCol && regT<regCol+mxCol );
          }
        }
#endif
        pParse->nTempReg = 0;
      }

      addrNext = sqlite3VdbeCurrentAddr(v);
      callStatGet(pParse, regStat, STAT_GET_ROWID, regSampleRowid);
      addrIsNull = sqlite3VdbeAddOp1(v, OP_IsNull, regSampleRowid);
      VdbeCoverage(v);
      callStatGet(pParse, regStat, STAT_GET_NEQ, regEq);