Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add header comments for new methods in pager.c. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | begin-concurrent |
Files: | files | file ages | folders |
SHA1: |
437c7e219d3240767a28f73487bc26c3 |
User & Date: | dan 2015-08-27 19:57:16.810 |
Context
2015-08-28
| ||
09:27 | Merge latest trunk changes with this branch. (check-in: 57bc0194f4 user: dan tags: begin-concurrent) | |
2015-08-27
| ||
19:57 | Add header comments for new methods in pager.c. (check-in: 437c7e219d user: dan tags: begin-concurrent) | |
19:22 | Add test cases for concurrent transactions and long-lived SELECT statements. (check-in: fd4798cb7a user: dan tags: begin-concurrent) | |
Changes
Changes to src/pager.c.
︙ | ︙ | |||
1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 | assert( rc==SQLITE_OK || rc==SQLITE_NOMEM ); } } return rc; } #ifdef SQLITE_ENABLE_CONCURRENT int sqlite3PagerBeginConcurrent(Pager *pPager){ int rc = SQLITE_OK; if( pPager->pAllRead==0 ){ pPager->pAllRead = sqlite3BitvecCreate(pPager->dbSize); if( pPager->pAllRead==0 ){ rc = SQLITE_NOMEM; } } return rc; } void sqlite3PagerEndConcurrent(Pager *pPager){ sqlite3BitvecDestroy(pPager->pAllRead); pPager->pAllRead = 0; } int sqlite3PagerIsWal(Pager *pPager){ return pPager->pWal!=0; } #endif /* ** Free the Pager.pInJournal and Pager.pAllRead bitvec objects. | > > > > > > > > > > > > > | 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 | assert( rc==SQLITE_OK || rc==SQLITE_NOMEM ); } } return rc; } #ifdef SQLITE_ENABLE_CONCURRENT /* ** If they are not already, begin recording all pages read from the pager layer ** by the b-tree layer This is used by concurrent transactions. Return ** SQLITE_OK if successful, or an SQLite error code (SQLITE_NOMEM) if an error ** occurs. */ int sqlite3PagerBeginConcurrent(Pager *pPager){ int rc = SQLITE_OK; if( pPager->pAllRead==0 ){ pPager->pAllRead = sqlite3BitvecCreate(pPager->dbSize); if( pPager->pAllRead==0 ){ rc = SQLITE_NOMEM; } } return rc; } /* ** Stop recording all pages read from the pager layer by the b-tree layer ** and discard any current records. */ void sqlite3PagerEndConcurrent(Pager *pPager){ sqlite3BitvecDestroy(pPager->pAllRead); pPager->pAllRead = 0; } /* ** Return true if the database is in wal mode. False otherwise. */ int sqlite3PagerIsWal(Pager *pPager){ return pPager->pWal!=0; } #endif /* ** Free the Pager.pInJournal and Pager.pAllRead bitvec objects. |
︙ | ︙ |