aboutsummaryrefslogtreecommitdiff
path: root/ext/session/sqlite3session.c
diff options
context:
space:
mode:
authordan <dan@noemail.net>2014-10-15 20:02:21 +0000
committerdan <dan@noemail.net>2014-10-15 20:02:21 +0000
commitabae0c4f1d3b9ce7a9d6342b61ec000117df1d63 (patch)
tree2c08e8f064403ba424a6fd7f7c3afe236fa51754 /ext/session/sqlite3session.c
parentf11b256b0bad2e843f4df0205bd7093f632aa38d (diff)
downloadsqlite-abae0c4f1d3b9ce7a9d6342b61ec000117df1d63.tar.gz
sqlite-abae0c4f1d3b9ce7a9d6342b61ec000117df1d63.zip
Fix a problem causing sqlite3changeset_concat() to fail to detect attempts to concatenate patchsets which changesets.
FossilOrigin-Name: 236704a9d1551a50a55bd6e0b6473191a7a7dd21
Diffstat (limited to 'ext/session/sqlite3session.c')
-rw-r--r--ext/session/sqlite3session.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/session/sqlite3session.c b/ext/session/sqlite3session.c
index fe7d6e5a2..f861bd1ec 100644
--- a/ext/session/sqlite3session.c
+++ b/ext/session/sqlite3session.c
@@ -3911,12 +3911,18 @@ int sessionChangesetConcat(
assert( xOutput==0 || (ppOut==0 && pnOut==0) );
+ assert( pLeft->zTab==0 && pRight->zTab==0 );
rc = sessionChangesetToHash(pLeft, &pList);
+ assert( pLeft->zTab || pList==0 );
if( rc==SQLITE_OK ){
rc = sessionChangesetToHash(pRight, &pList);
}
bPatch = pLeft->bPatchset || pRight->bPatchset;
+ if( pLeft->zTab && pRight->zTab && pLeft->bPatchset!=pRight->bPatchset ){
+ rc = SQLITE_ERROR;
+ }
+
/* Create the serialized output changeset based on the contents of the
** hash tables attached to the SessionTable objects in list pList.
*/