/ Check-in [7da98ca2]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Fix an ota bug causing attempts to write to tables with more than 8 columns to fail.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | ota-update
Files: files | file ages | folders
SHA1: 7da98ca2422166dc5d68607541707f41b77b5784
User & Date: dan 2014-09-18 11:15:17
Context
2014-09-18
11:31
Merge latest trunk changes with this branch. check-in: 67ea2979 user: dan tags: ota-update
11:15
Fix an ota bug causing attempts to write to tables with more than 8 columns to fail. check-in: 7da98ca2 user: dan tags: ota-update
2014-09-17
19:05
Fix an unintialized variable problem in sqlite3ota.c. check-in: 01268607 user: dan tags: ota-update
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/ota/sqlite3ota.c.

   368    368   
   369    369       zSql = sqlite3_mprintf("PRAGMA main.table_info(%Q)", pIter->zTbl);
   370    370       p->rc = prepareFreeAndCollectError(p->db, &pStmt, &p->zErrmsg, zSql);
   371    371       while( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pStmt) ){
   372    372         if( (nCol % 8)==0 ){
   373    373           int nByte = sizeof(char*) * (nCol+8);
   374    374           char **azNew = (char**)sqlite3_realloc(pIter->azTblCol, nByte);
   375         -        u8 *abNew = (u8*)sqlite3_realloc(pIter->azTblCol, nCol+8);
          375  +        u8 *abNew = (u8*)sqlite3_realloc(pIter->abTblPk, nCol+8);
   376    376   
   377    377           if( azNew ) pIter->azTblCol = azNew;
   378    378           if( abNew ) pIter->abTblPk = abNew;
   379    379           if( azNew==0 || abNew==0 ) p->rc = SQLITE_NOMEM;
   380    380         }
   381    381   
   382    382         if( p->rc==SQLITE_OK ){