/ Check-in [46fec9b1]
Login

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

Overview
Comment:Make sure the ANALYZE command allocates enough VDBE registers.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | sqlite_stat4
Files: files | file ages | folders
SHA1: 46fec9b1a1c4616df5a634dbf9235bd13408d3a9
User & Date: drh 2013-08-15 16:15:00
Context
2013-08-15
16:18
Change some assert() statements in vdbe.c to ensure that a memory cell used to store a VdbeCursor object is not also used for some other purpose. check-in: 71070c9f user: dan tags: sqlite_stat4
16:15
Make sure the ANALYZE command allocates enough VDBE registers. check-in: 46fec9b1 user: drh tags: sqlite_stat4
14:39
Add tests for sqlite_stat4 sample selection. And a fix for the same. check-in: 1fb4d9d6 user: dan tags: sqlite_stat4
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/analyze.c.

   780    780     int regChng = iMem++;        /* Index of changed index field */
   781    781     int regTemp = iMem++;        /* Temporary use register */
   782    782     int regTabname = iMem++;     /* Register containing table name */
   783    783     int regIdxname = iMem++;     /* Register containing index name */
   784    784     int regStat1 = iMem++;       /* Value for the stat column of sqlite_stat1 */
   785    785     int regPrev = iMem;          /* MUST BE LAST (see below) */
   786    786   
   787         -  pParse->nMem = MAX(pParse->nMem, regChng);
          787  +  pParse->nMem = MAX(pParse->nMem, iMem);
   788    788     v = sqlite3GetVdbe(pParse);
   789    789     if( v==0 || NEVER(pTab==0) ){
   790    790       return;
   791    791     }
   792    792     if( pTab->tnum==0 ){
   793    793       /* Do not gather statistics on views or virtual tables */
   794    794       return;