/ Check-in [bd94f4c8]
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 a memory allocation issues in the preupdate hook so that the hook.test script runs clean in valgrind.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | sessions
Files: files | file ages | folders
SHA1: bd94f4c8b1c4590c437030f0122015f1a37e2582
User & Date: drh 2011-03-18 15:13:31
Context
2011-03-18
16:13
Further improvements to documentation in sqlite3session.h. check-in: 07019bb9 user: dan tags: sessions
15:13
Fix a memory allocation issues in the preupdate hook so that the hook.test script runs clean in valgrind. check-in: bd94f4c8 user: drh tags: sessions
13:05
Update comments in sqlite3session.h. More to come. check-in: e73e9082 user: dan tags: sessions
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

install-sh became executable.

Changes to src/vdbeaux.c.

2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
....
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
  while( idx<szHdr && u<p->nField && d<=nKey ){
    u32 serial_type;

    idx += getVarint32(&aKey[idx], serial_type);
    pMem->enc = pKeyInfo->enc;
    pMem->db = pKeyInfo->db;
    pMem->flags = 0;
    pMem->zMalloc = 0;
    d += sqlite3VdbeSerialGet(&aKey[d], serial_type, pMem);
    pMem++;
    u++;
  }
  assert( u<=pKeyInfo->nField + 1 );
  p->nField = u;
  return (void*)p;
................................................................................
    sqlite3VdbeDeleteUnpackedRecord(preupdate.pNewUnpacked);
  }
  if( preupdate.aNew ){
    int i;
    for(i=0; i<pCsr->nField; i++){
      sqlite3VdbeMemRelease(&preupdate.aNew[i]);
    }
    sqlite3_free(preupdate.aNew);
  }
}








|







 







|


<
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
....
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224

  while( idx<szHdr && u<p->nField && d<=nKey ){
    u32 serial_type;

    idx += getVarint32(&aKey[idx], serial_type);
    pMem->enc = pKeyInfo->enc;
    pMem->db = pKeyInfo->db;
    pMem->flags = 0;
    pMem->zMalloc = pMem->z = 0;
    d += sqlite3VdbeSerialGet(&aKey[d], serial_type, pMem);
    pMem++;
    u++;
  }
  assert( u<=pKeyInfo->nField + 1 );
  p->nField = u;
  return (void*)p;
................................................................................
    sqlite3VdbeDeleteUnpackedRecord(preupdate.pNewUnpacked);
  }
  if( preupdate.aNew ){
    int i;
    for(i=0; i<pCsr->nField; i++){
      sqlite3VdbeMemRelease(&preupdate.aNew[i]);
    }
    sqlite3DbFree(db, preupdate.aNew);
  }
}

test/progress.test became a regular file.

tool/mkopts.tcl became a regular file.