diff options
author | dan <dan@noemail.net> | 2018-03-21 19:46:36 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2018-03-21 19:46:36 +0000 |
commit | 95ccb6dc8e7bf98a54a53fc8bf08cfa387bb5e7a (patch) | |
tree | 50e29366876ffe5bdda3fbfe6323aefc770614ae /ext/session/sqlite3session.c | |
parent | 24a0c4534aa0f8be54ecd47050fb0bd71e9cb7bf (diff) | |
download | sqlite-95ccb6dc8e7bf98a54a53fc8bf08cfa387bb5e7a.tar.gz sqlite-95ccb6dc8e7bf98a54a53fc8bf08cfa387bb5e7a.zip |
Fix some documentation and other issues with the code on this branch.
FossilOrigin-Name: a9ec68627a4533ca6aa7cc1b73f864db615a80e86eda9e33660f22d269a1ba1e
Diffstat (limited to 'ext/session/sqlite3session.c')
-rw-r--r-- | ext/session/sqlite3session.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/session/sqlite3session.c b/ext/session/sqlite3session.c index 1e3820a8f..b4440fc2c 100644 --- a/ext/session/sqlite3session.c +++ b/ext/session/sqlite3session.c @@ -3681,7 +3681,6 @@ static int sessionStat1Sql(sqlite3 *db, SessionApplyCtx *p){ "AND (?4 OR stat IS ?3)" ); } - assert( rc==SQLITE_OK ); return rc; } @@ -4384,7 +4383,7 @@ static int sessionChangesetApply( sqlite3_exec(db, "RELEASE changeset_apply", 0, 0, 0); } - if( rc==SQLITE_OK && ppRebase && pnRebase ){ + if( rc==SQLITE_OK && bPatchset==0 && ppRebase && pnRebase ){ *ppRebase = (void*)sApply.rebase.aBuf; *pnRebase = sApply.rebase.nBuf; sApply.rebase.aBuf = 0; @@ -5146,6 +5145,11 @@ static int sessionRebase( } bNew = 0; + /* A patchset may not be rebased */ + if( pIter->bPatchset ){ + rc = SQLITE_ERROR; + } + /* Append a table header to the output for this new table */ sessionAppendByte(&sOut, pIter->bPatchset ? 'P' : 'T', &rc); sessionAppendVarint(&sOut, pIter->nCol, &rc); |