SQLite4
Check-in [1b27f1ca1e]
Not logged in

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

Overview
Comment:And another bug in merging.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1b27f1ca1ef355edccf81cf09dc26bdaedad82e1
User & Date: dan 2014-01-23 19:00:36
Context
2014-01-25
15:14
Fix a problem with iterating in reverse order through the merge-tree. check-in: 6998cd99b8 user: dan tags: trunk
2014-01-23
19:00
And another bug in merging. check-in: 1b27f1ca1e user: dan tags: trunk
18:00
Fix another bug in level merging. check-in: 24aea74e9f user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/bt_main.c.

1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911

    btCsrSetup(db, pHdr->iMRoot, &pSub->mcsr);
    if( bLast==0 ){
      rc = btCsrSeek(&pSub->mcsr, 0, pSub->aPrefix, n, BT_SEEK_GE, 0);
    }else{
      u8 aPrefix[8];
      btPutU32(aPrefix, (u32)iter.iAge + (iter.iLvl==0 ? 1 : 0));
      btPutU32(&aPrefix[4], ~(u32)(iter.iLvl - (iter.iLvl==0 ? 0 : 1)));
      rc = btCsrSeek(&pSub->mcsr, 0, aPrefix, n, BT_SEEK_LE, 0);
      if( rc==SQLITE4_OK ){
        rc = btCsrStep(&pSub->mcsr, 0);
      }
    }
    if( rc==SQLITE4_INEXACT ) rc = SQLITE4_OK;
    if( rc==SQLITE4_OK ) rc = fiSubCsrCheckPrefix(pSub);







|







1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911

    btCsrSetup(db, pHdr->iMRoot, &pSub->mcsr);
    if( bLast==0 ){
      rc = btCsrSeek(&pSub->mcsr, 0, pSub->aPrefix, n, BT_SEEK_GE, 0);
    }else{
      u8 aPrefix[8];
      btPutU32(aPrefix, (u32)iter.iAge + (iter.iLvl==0 ? 1 : 0));
      btPutU32(&aPrefix[4], ~((u32)iter.iLvl - (u32)1));
      rc = btCsrSeek(&pSub->mcsr, 0, aPrefix, n, BT_SEEK_LE, 0);
      if( rc==SQLITE4_OK ){
        rc = btCsrStep(&pSub->mcsr, 0);
      }
    }
    if( rc==SQLITE4_INEXACT ) rc = SQLITE4_OK;
    if( rc==SQLITE4_OK ) rc = fiSubCsrCheckPrefix(pSub);