1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Add tests for sqlite3changegroup_add_change().

FossilOrigin-Name: 9d67bedc20c3a59e5488f0eaea6a6611940a9cb63f7cf5e687b061cb5d510943
This commit is contained in:
dan
2024-05-06 17:21:23 +00:00
parent 5b80dbe6b3
commit 0f78aafec8
5 changed files with 152 additions and 82 deletions

View File

@ -6031,11 +6031,14 @@ int sqlite3changegroup_add_change(
sqlite3_changegroup *pGrp,
sqlite3_changeset_iter *pIter
){
if( pIter->in.iCurrent==pIter->in.iNext || pIter->rc!=SQLITE_OK ){
/* Iterator does not point to any valid entry. */
if( pIter->in.iCurrent==pIter->in.iNext
|| pIter->rc!=SQLITE_OK
|| pIter->bInvert
){
/* Iterator does not point to any valid entry or is an INVERT iterator. */
return SQLITE_ERROR;
}
return sessionChangesetToHash(pIter, pGrp, 0);
return sessionOneChangeToHash(pGrp, pIter, 0);
}
/*