/ Check-in [c8ca3e0a]
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:Disable the optimization from [8cb8516d] (omit TableLock instructions for non-sharable databases) on this branch. This branch uses the TableLock instructions to ensure that the db schema is not written from within a BEGIN CONCURRENT transaction.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | begin-concurrent
Files: files | file ages | folders
SHA1: c8ca3e0a8d82dbb077551c2d952cb2043f78333b
User & Date: dan 2017-01-09 06:53:00
Wiki:begin-concurrent
Context
2017-01-09
07:00
Merge the "changebatch" functionality into this branch. check-in: 50fb1eb3 user: dan tags: begin-concurrent
06:53
Disable the optimization from [8cb8516d] (omit TableLock instructions for non-sharable databases) on this branch. This branch uses the TableLock instructions to ensure that the db schema is not written from within a BEGIN CONCURRENT transaction. check-in: c8ca3e0a user: dan tags: begin-concurrent
06:33
Upgrade this branch to 3.16 plus the various fixes that appeared after its release. check-in: d0e212d0 user: dan tags: begin-concurrent
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/build.c.

55
56
57
58
59
60
61

62
63

64
65
66
67
68
69
70
){
  Parse *pToplevel = sqlite3ParseToplevel(pParse);
  int i;
  int nBytes;
  TableLock *p;
  assert( iDb>=0 );


  if( iDb==1 ) return;
  if( !sqlite3BtreeSharable(pParse->db->aDb[iDb].pBt) ) return;

  for(i=0; i<pToplevel->nTableLock; i++){
    p = &pToplevel->aTableLock[i];
    if( p->iDb==iDb && p->iTab==iTab ){
      p->isWriteLock = (p->isWriteLock || isWriteLock);
      return;
    }
  }







>


>







55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
){
  Parse *pToplevel = sqlite3ParseToplevel(pParse);
  int i;
  int nBytes;
  TableLock *p;
  assert( iDb>=0 );

#ifdef SQLITE_OMIT_CONCURRENT
  if( iDb==1 ) return;
  if( !sqlite3BtreeSharable(pParse->db->aDb[iDb].pBt) ) return;
#endif
  for(i=0; i<pToplevel->nTableLock; i++){
    p = &pToplevel->aTableLock[i];
    if( p->iDb==iDb && p->iTab==iTab ){
      p->isWriteLock = (p->isWriteLock || isWriteLock);
      return;
    }
  }