/ Check-in [8467c31a]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Have sqlite3changegroup_output_strm() call its output function more regularly.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 8467c31aa0bf24e597f680748460a99f425c49f5ab741c3574c339aa56857146
User & Date: dan 2018-09-28 20:46:41
Context
2018-09-28
23:53
Fix test cases so that they work with ICU. check-in: d04b2013 user: drh tags: trunk
20:58
Merge latest trunk into this branch. check-in: 86750c92 user: dan tags: begin-concurrent
20:46
Have sqlite3changegroup_output_strm() call its output function more regularly. check-in: 8467c31a user: dan tags: trunk
18:51
Fix a bug in the sqlite_memstat virtual table that was causing it to report the amount of memory used as zero bytes. check-in: 8a758a87 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ext/session/sqlite3session.c.

4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875


4876
4877
4878
4879
4880
4881
4882
    sessionAppendTableHdr(&buf, pGrp->bPatch, pTab, &rc);
    for(i=0; i<pTab->nChange; i++){
      SessionChange *p;
      for(p=pTab->apChange[i]; p; p=p->pNext){
        sessionAppendByte(&buf, p->op, &rc);
        sessionAppendByte(&buf, p->bIndirect, &rc);
        sessionAppendBlob(&buf, p->aRecord, p->nRecord, &rc);
      }
    }

    if( rc==SQLITE_OK && xOutput && buf.nBuf>=SESSIONS_STRM_CHUNK_SIZE ){
      rc = xOutput(pOut, buf.aBuf, buf.nBuf);
      buf.nBuf = 0;
    }


  }

  if( rc==SQLITE_OK ){
    if( xOutput ){
      if( buf.nBuf>0 ) rc = xOutput(pOut, buf.aBuf, buf.nBuf);
    }else{
      *ppOut = buf.aBuf;







<
<
<
|
|
|
|
>
>







4862
4863
4864
4865
4866
4867
4868



4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
    sessionAppendTableHdr(&buf, pGrp->bPatch, pTab, &rc);
    for(i=0; i<pTab->nChange; i++){
      SessionChange *p;
      for(p=pTab->apChange[i]; p; p=p->pNext){
        sessionAppendByte(&buf, p->op, &rc);
        sessionAppendByte(&buf, p->bIndirect, &rc);
        sessionAppendBlob(&buf, p->aRecord, p->nRecord, &rc);



        if( rc==SQLITE_OK && xOutput && buf.nBuf>=SESSIONS_STRM_CHUNK_SIZE ){
          rc = xOutput(pOut, buf.aBuf, buf.nBuf);
          buf.nBuf = 0;
        }
      }
    }
  }

  if( rc==SQLITE_OK ){
    if( xOutput ){
      if( buf.nBuf>0 ) rc = xOutput(pOut, buf.aBuf, buf.nBuf);
    }else{
      *ppOut = buf.aBuf;