/ Check-in [9196ce40]
Login

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

Overview
Comment:Fix a faulty assert() statement.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | orderby-planning
Files: files | file ages | folders
SHA1:9196ce407379ca3b151b601b98848771e5cb4e8f
User & Date: drh 2014-05-02 15:25:24
Context
2014-05-02
16:22
Failure to extend a temp file for use with mmap() in vdbesort.c is benign. check-in: d4d39638 user: drh tags: orderby-planning
15:25
Fix a faulty assert() statement. check-in: 9196ce40 user: drh tags: orderby-planning
13:09
Merge latest trunk enhancements and fixes into the orderby-planning branch. check-in: 84862d3a user: drh tags: orderby-planning
Changes
Hide Diffs Unified Diffs 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++){