/ Check-in [b7a26427]
Login

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

Overview
Comment:Get ANALYZE working again with -DSQLITE_ENABLE_STAT2 and virtual tables.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:b7a26427afc43c9bbdf365b775379eb57187bc97
User & Date: drh 2010-09-28 17:34:46
Context
2010-09-28
17:37
Merge accidental fork. check-in: 33c8b9c7 user: drh tags: trunk
17:34
Get ANALYZE working again with -DSQLITE_ENABLE_STAT2 and virtual tables. check-in: b7a26427 user: drh tags: trunk
15:55
Disallow statements of the form "CREATE TEMP TABLE main.t1 ...". check-in: dd1b34ba user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/analyze.c.

   132    132     int regFirst = iMem++;       /* Index of first sample to record */
   133    133   #endif
   134    134   
   135    135     v = sqlite3GetVdbe(pParse);
   136    136     if( v==0 || NEVER(pTab==0) ){
   137    137       return;
   138    138     }
   139         -  if( pTab->pSelect ){
   140         -    /* Do not gather statistics on views */
          139  +  if( pTab->tnum==0 ){
          140  +    /* Do not gather statistics on views or virtual tables */
   141    141       return;
   142    142     }
   143    143     if( memcmp(pTab->zName, "sqlite_", 7)==0 ){
   144    144       /* Do not gather statistics on system tables */
   145    145       return;
   146    146     }
   147    147     assert( sqlite3BtreeHoldsAllMutexes(db) );