SQLite

Check-in [a14fa876f0]
Login

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

Overview
Comment:Fix an uninitialized variable causing a problem during fts5 table initialization.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | fts5
Files: files | file ages | folders
SHA1: a14fa876f0eb66028e302b908967cc4a05ede9fc
User & Date: dan 2014-08-09 18:22:59.679
Context
2014-08-11
19:44
Replace the hash table borrowed from fts3. (check-in: 617e2fac1c user: dan tags: fts5)
2014-08-09
18:22
Fix an uninitialized variable causing a problem during fts5 table initialization. (check-in: a14fa876f0 user: dan tags: fts5)
18:02
Use multiple memory allocations for a single Fts5Structure object. This is probably less efficient but much easier to get right. (check-in: 2821825f7a user: dan tags: fts5)
Changes
Unified Diff Ignore Whitespace Patch
Changes to ext/fts5/fts5_storage.c.
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
int sqlite3Fts5StorageOpen(
  Fts5Config *pConfig, 
  Fts5Index *pIndex, 
  int bCreate, 
  Fts5Storage **pp,
  char **pzErr                    /* OUT: Error message */
){
  int rc;
  Fts5Storage *p;                 /* New object */
  int nByte;                      /* Bytes of space to allocate */

  nByte = sizeof(Fts5Storage)               /* Fts5Storage object */
        + pConfig->nCol * sizeof(i64);      /* Fts5Storage.aTotalSize[] */
  *pp = p = (Fts5Storage*)sqlite3_malloc(nByte);
  if( !p ) return SQLITE_NOMEM;







|







164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
int sqlite3Fts5StorageOpen(
  Fts5Config *pConfig, 
  Fts5Index *pIndex, 
  int bCreate, 
  Fts5Storage **pp,
  char **pzErr                    /* OUT: Error message */
){
  int rc = SQLITE_OK;
  Fts5Storage *p;                 /* New object */
  int nByte;                      /* Bytes of space to allocate */

  nByte = sizeof(Fts5Storage)               /* Fts5Storage object */
        + pConfig->nCol * sizeof(i64);      /* Fts5Storage.aTotalSize[] */
  *pp = p = (Fts5Storage*)sqlite3_malloc(nByte);
  if( !p ) return SQLITE_NOMEM;