[odb-users] SQLIte issue
    Andrew Cunningham 
    andrew at a-cunningham.com
       
    Wed Apr  6 18:43:35 EDT 2016
    
    
  
After more investigation I found that SQLite is writing  to a PMA cache
file. I gather the PMA buffer should be the size of the main cache, but
there is what I think is a bug in SQLite as follows...
When you set the main cache using  the style
*PRAGMA **schema.**cache_size = -**kibibytes*
*;*
It appears the code that sets up the PMA cache is not understanding that
this value can be -ve and defaults to a small value.
In function sqlite3VdbeSorterInit
....
....
     mxCache = db->aDb[0].pSchema->cache_size;
      if( mxCache<(int)szPma ) mxCache = (int)szPma;
      pSorter->mxPmaSize = MIN((i64)mxCache*pgsz, SQLITE_MAX_PMASZ);
....
    
    
More information about the odb-users
mailing list