/ Check-in [07cc955e]
Login

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

Overview
Comment:Remove some unused code from sqlite3rebaser_rebase().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | sessions-rebase
Files: files | file ages | folders
SHA3-256:07cc955eab0e993a75be82d58e17ca53c8abbcaf851983d235049599c19e582f
User & Date: dan 2018-03-22 20:11:14
Context
2018-03-22
20:35
Add APIs to the sessions module for "rebasing" changesets. check-in: 509506c7 user: dan tags: trunk
20:11
Remove some unused code from sqlite3rebaser_rebase(). Closed-Leaf check-in: 07cc955e user: dan tags: sessions-rebase
19:52
Fix another problem with rebasing updates against multiple remote changes. check-in: c8e7b5a0 user: dan tags: sessions-rebase
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to ext/session/sqlite3session.c.

5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
      /* Append a table header to the output for this new table */
      sessionAppendByte(&sOut, pIter->bPatchset ? 'P' : 'T', &rc);
      sessionAppendVarint(&sOut, pIter->nCol, &rc);
      sessionAppendBlob(&sOut, pIter->abPK, pIter->nCol, &rc);
      sessionAppendBlob(&sOut, (u8*)pIter->zTab, strlen(pIter->zTab)+1, &rc);
    }

    if( pTab ){
      int bPkOnly = (pIter->bPatchset && pIter->op==SQLITE_DELETE);
      int iHash = sessionChangeHash(pTab, bPkOnly, aRec, pTab->nChange);

      for(pChange=pTab->apChange[iHash]; pChange; pChange=pChange->pNext){
        if( sessionChangeEqual(pTab, bPkOnly, aRec, 0, pChange->aRecord) ){
          break;
        }
      }
    }

    if( pChange ){
      assert( pChange->op==SQLITE_DELETE || pChange->op==SQLITE_INSERT );







|
<
|


|







5188
5189
5190
5191
5192
5193
5194
5195

5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
      /* Append a table header to the output for this new table */
      sessionAppendByte(&sOut, pIter->bPatchset ? 'P' : 'T', &rc);
      sessionAppendVarint(&sOut, pIter->nCol, &rc);
      sessionAppendBlob(&sOut, pIter->abPK, pIter->nCol, &rc);
      sessionAppendBlob(&sOut, (u8*)pIter->zTab, strlen(pIter->zTab)+1, &rc);
    }

    if( pTab && rc==SQLITE_OK ){

      int iHash = sessionChangeHash(pTab, 0, aRec, pTab->nChange);

      for(pChange=pTab->apChange[iHash]; pChange; pChange=pChange->pNext){
        if( sessionChangeEqual(pTab, 0, aRec, 0, pChange->aRecord) ){
          break;
        }
      }
    }

    if( pChange ){
      assert( pChange->op==SQLITE_DELETE || pChange->op==SQLITE_INSERT );