aboutsummaryrefslogtreecommitdiff
path: root/ext/session/sqlite3session.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/session/sqlite3session.c')
-rw-r--r--ext/session/sqlite3session.c8
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);