SQLite

Check-in [9196ce4073]
Login

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

Overview
Comment:Fix a faulty assert() statement.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | orderby-planning
Files: files | file ages | folders
SHA1: 9196ce407379ca3b151b601b98848771e5cb4e8f
User & Date: drh 2014-05-02 15:25:24.157
Context
2014-05-02
16:22
Failure to extend a temp file for use with mmap() in vdbesort.c is benign. (check-in: d4d396387d user: drh tags: orderby-planning)
15:25
Fix a faulty assert() statement. (check-in: 9196ce4073 user: drh tags: orderby-planning)
13:09
Merge latest trunk enhancements and fixes into the orderby-planning branch. (check-in: 84862d3a09 user: drh tags: orderby-planning)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/vdbesort.c.
729
730
731
732
733
734
735
736
737
738
739

740
741
742
743
744
745
746
    return SQLITE_NOMEM;
  }

  p = pSorter->pRecord;
  while( p ){
    SorterRecord *pNext;
    if( pSorter->aMemory ){
      assert( p->u.iNext<pSorter->nMemory );
      if( (u8*)p==pSorter->aMemory ){
        pNext = 0;
      }else{

        pNext = (SorterRecord*)&pSorter->aMemory[p->u.iNext];
      }
    }else{
      pNext = p->u.pNext;
    }
    p->u.pNext = 0;
    for(i=0; aSlot[i]; i++){







<



>







729
730
731
732
733
734
735

736
737
738
739
740
741
742
743
744
745
746
    return SQLITE_NOMEM;
  }

  p = pSorter->pRecord;
  while( p ){
    SorterRecord *pNext;
    if( pSorter->aMemory ){

      if( (u8*)p==pSorter->aMemory ){
        pNext = 0;
      }else{
        assert( p->u.iNext<pSorter->nMemory );
        pNext = (SorterRecord*)&pSorter->aMemory[p->u.iNext];
      }
    }else{
      pNext = p->u.pNext;
    }
    p->u.pNext = 0;
    for(i=0; aSlot[i]; i++){