SQLite
Check-in [18d1b402]
Not logged in
Overview
SHA1 Hash:18d1b402f2dbe78f1a1113bb356b710e348365ef
Date: 2014-03-29 10:01:58
User: dan
Comment:Fix a broken assert() in vdbesort.c.
Tags And Properties
Context
2014-03-31
19:57
[2774710d] Add the SQLITE_MAX_WORKER_THREADS compile time option. And the SQLITE_CONFIG_WORKER_THREADS sqlite3_config() switch. (user: dan, tags: threads)
2014-03-29
19:48
[83a105c8] Closed-Leaf: Changes to make the multi-threaded sorter sort stably. (user: dan, tags: threads-closed)
10:01
[18d1b402] Fix a broken assert() in vdbesort.c. (user: dan, tags: threads)
09:34
[a683c05f] Fix a problem in vdbesort.c causing spurious SQLITE_NOMEM errors when using memsys3 or memsys5. (user: dan, tags: threads)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbesort.c

1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
      pThread->aListMemory = pSorter->aMemory;
      pSorter->aMemory = aMem;
    }

    if( bUseFg==0 ){
      /* Launch a background thread for this operation */
      void *pCtx = (void*)pThread;
      assert( pSorter->aMemory==0 || pThread->aListMemory==0 );
      if( pThread->aListMemory ){
        if( pSorter->aMemory==0 ){
          pSorter->aMemory = sqlite3Malloc(pSorter->nMemory);
          if( pSorter->aMemory==0 ) return SQLITE_NOMEM;
        }else{
          pSorter->nMemory = sqlite3MallocSize(pSorter->aMemory);
        }







|







1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
      pThread->aListMemory = pSorter->aMemory;
      pSorter->aMemory = aMem;
    }

    if( bUseFg==0 ){
      /* Launch a background thread for this operation */
      void *pCtx = (void*)pThread;
      assert( pSorter->aMemory==0 || pThread->aListMemory!=0 );
      if( pThread->aListMemory ){
        if( pSorter->aMemory==0 ){
          pSorter->aMemory = sqlite3Malloc(pSorter->nMemory);
          if( pSorter->aMemory==0 ) return SQLITE_NOMEM;
        }else{
          pSorter->nMemory = sqlite3MallocSize(pSorter->aMemory);
        }