| /sqlite-3.40.0/test/ |
| H A D | corruptL.test | 25 | page 1 offset 0 54 | page 2 offset 4096 82 | page 3 offset 8192 147 | page 1 offset 0 268 | page 1 offset 0 395 | page 1 offset 0 597 | page 1 offset 0 648 | page 1 offset 0 741 | page 1 offset 0 856 | page 1 offset 0 [all …]
|
| H A D | corrupt3.test | 36 # Create a database with an overflow page. 49 # Verify that the file format is as we expect. The page size 51 # overflow page. The overflow page is page 3. The pointer to 52 # the overflow page is on the last 4 bytes of page 2. 56 } 1024 ;# The page size is 1024 59 } 0 ;# Unused bytes per page is 0 62 } 3 ;# Overflow page is 3 85 On tree page 2 cell 0: 2nd reference to page 3}}} 87 # Change the pointer for the first page of the overflow 88 # change to be a non-existant page. [all …]
|
| H A D | dbfuzz001.test | 30 | page 1 offset 0 53 | page 2 offset 512 55 | page 3 offset 1024 202 | page 1 offset 0 289 | page 1 offset 0 313 | page 2 offset 512 320 | page 3 offset 1024 335 | page 4 offset 1536 339 | page 5 offset 2048 350 | page 6 offset 2560 [all …]
|
| H A D | corruptF.test | 28 # Create a 6 page database containing a single table - t1. Table t1 29 # consists of page 2 (the root page) and pages 5 and 6 (leaf pages). 40 CREATE TABLE t1(x); /* root page = 2 */ 41 CREATE TABLE t2(x); /* root page = 3 */ 42 CREATE TABLE t3(x); /* root page = 4 */ 61 # list. Page 3 is the free list trunk and page 4 is a leaf. 67 # Change the free-list entry to page 6 and reopen the db file. 74 # is page 6, which is also the right-most leaf page in table t1. 94 # root page of t4. Eventually, page 6 becomes full and the height of the 120 # Change the free-list entry to page 5 and reopen the db file. [all …]
|
| H A D | pageropt.test | 34 # (1) The number of page reads from the database 35 # (2) The number of page writes to the database 36 # (3) The number of page writes to the journal 112 # Verify that the last page of an overflow chain is not read from 115 # the sqlite_master table (1 page) the main page of t1 (1 page) and 118 # Pages written are page 1 (for the freelist pointer), the root page 146 # Note the new optimization that when pulling the very last page off of the 147 # freelist we do not read the content of that page. 164 # Once again, we do not need to read the last page of an overflow chain 180 # a cold cache, only page 1, the root page of table t1, and the trunk [all …]
|
| H A D | corruptD.test | 30 # end of any in-memory buffers as a result of corrupted database page 31 # images. Usually this happens because a field within a database page 32 # that contains an offset to some other structure within the same page 33 # is set to too large a value. A database page contains the following 36 # 1. The page header field that contains the offset to the first 42 # 3. The page header field containing the number of cells on the page 44 # array, which could potentially be off the end of the page). 71 # will not result in buffer overruns as part of page initialization in 73 # page initialization, as trying to do so causes a performance hit. 108 # The following tests, corruptD-1.1.*, focus on the page header field [all …]
|
| H A D | crash5.test | 35 # containing a single table (root page 3) with a single row. 36 # The row has an overflow page (page 4). 68 # have to move the current contents of page 4 (the overflow 69 # page) to make room for the new root page. The bug is that 71 # sqlite mistakenly thinks that the page being moved (page 4) has 72 # been safely synced into the journal. If the page is written 85 # page 4 is among those written. 89 DELETE FROM t1; -- This will put page 4 on the free list. 102 # has a dirty page 4 that it incorrectly believes is already safely 105 # by writing page 4 out to the db file. If it crashes later on,
|
| H A D | corrupt2.test | 67 # Corrupt the page-size (bytes 16 and 17 of page 1). 87 # Corrupt the free-block list on page 1. 107 # Corrupt the free-block list on page 1. 176 # On the root page of table t2 (page 4), set one of the child page-numbers 178 # the pointer-map after moving the content of page 4 to page 3 as part 251 On tree page 2 cell 0: 2nd reference to page 10 284 # the page reference in the parent page must be updated to refer 286 # that page reference before performing the incremental vacuum. 289 # The last page in the database page is the second page 307 # The last page in the database page is a non-root b-tree page. [all …]
|
| H A D | incrvacuum2.test | 42 # Vacuum off a single page. 138 # At one point, when a specific page was being extracted from the b-tree 140 # occurred before the specific page in the free-list trunk were being 142 # extracted page and the page that contains the pointer to it need to 150 # worst case is when a trunk page is removed from the end of the db file. 153 # 1. The previous trunk page (that contains a pointer to the recycled 154 # trunk page), and 155 # 2. The leaf page transformed into a trunk page to replace the recycled 156 # page, and 157 # 3. The trunk page that contained a pointer to the leaf page used
|
| H A D | tkt3918.test | 33 # first free-list trunk page contains only a single leaf. 34 # The leaf page is also the last page in the database. The 35 # second free-list trunk page contains, amongst other things, 36 # page number 4. 46 # page. This will remove the single leaf from the first page in 53 # page 4 from the database free-list. Bug 3918 caused sqlite to
|
| H A D | altercorrupt.test | 32 | page 1 offset 0 60 | page 2 offset 4096 70 | page 3 offset 8192 77 | page 4 offset 12288 89 | page 5 offset 16384 94 | page 6 offset 20480 112 | page 1 offset 0 139 | page 2 offset 4096 149 | page 3 offset 8192 156 | page 4 offset 12288 [all …]
|
| H A D | corruptB.test | 16 # when there exists a page that is both an a descendent or ancestor of 19 # Also test that an SQLITE_CORRUPT error is returned if a B-Tree page 20 # contains a (corrupt) reference to a page greater than the configured 21 # maximum page number. 55 # Set the right-child of a B-Tree rootpage to refer to the root-page itself. 68 # root-page itself. 100 # Set the right-child pointer of the right-child of the root page to point 101 # back to the root page. 114 # Set the left-child pointer of a cell of the right-child of the root page to 115 # point back to the root page. [all …]
|
| H A D | corruptN.test | 28 | page 1 offset 0 52 | page 2 offset 512 59 | page 3 offset 1024 69 | page 4 offset 1536 73 | page 5 offset 2048 85 | page 6 offset 2560 89 | page 7 offset 3072 110 | page 1 offset 0 132 | page 2 offset 4096 135 | page 3 offset 8192 [all …]
|
| H A D | io.test | 78 # and page 1 (db change-counter page). 94 # of abc and the change-counter page. 116 # the new leaf page. 137 # 2) The journal file (to sync the page data), 148 # only write 1 page and require a single fsync(). 151 # written because page 1 - the change-counter page - is written using 207 # modifies a single database page and also appends a page to the file. 213 # bytes 28..31 and so when a page is added to the database, page 1 301 # size is larger than the page-size. 439 # 2) The journal file (to sync the page data), [all …]
|
| H A D | autovacuum.test | 137 # the free root-page location. 139 # root-page it requires is on the free-list. 175 # This test case moves the second page in an over-flow chain. 187 # This test case moves the first page in an over-flow chain. 199 # This test case moves a btree leaf page. 247 # (the sqlite_master root-page and the first pointer map page) on the 284 # These are either the pending_byte page or the pointer map pages 387 # Step 1: Delete av3_i1 (root-page 11). Move root-page of av4_i4 to page 11. 388 # Step 2: Delete av3 (root-page 10). Move root-page of av4_i3 to page 10. 389 # Step 3: Delete sqlite_autoindex_av1_3 (root-page 9). Move av4_i2 to page 9. [all …]
|
| H A D | corrupt7.test | 15 # on corrupt cell offsets in a btree page. 53 # Verify that the file format is as we expect. The page size 58 } 1024 ;# The page size is 1024 61 } 0 ;# Unused bytes per page is 0 65 # Deliberately corrupt some of the cell offsets in the btree page 66 # on page 2 of the database. 73 On tree page 2 cell 15: Offset 65457 out of range 945..1020}} 80 On tree page 2 cell 15: Offset 1201 out of range 945..1020}}
|
| H A D | crash.test | 129 # crash-2.3: Delete 15 or so pages (with a 10 page page-cache), then crash. 325 CREATE TABLE abc(a, b, c); -- Root page 3 326 INSERT INTO abc VALUES(randstr(1500,1500), 0, 0); -- Overflow page 4 342 # 2: Put page 4 on the free-list (was the overflow page for the row deleted). 343 # 3: Write data to page 4 (it becomes the overflow page for the row inserted). 344 # The old page 4 data has been written to the journal file, but the 346 # 4: Create a table, which calls sqlite3pager_movepage() to move page 4 347 # to the end of the database (page 12) to make room for the new root-page. 348 # 5: Put pressure on the pager-cache. This results in page 4 being written 349 # to the database file to make space in the cache to load a new page. The [all …]
|
| H A D | ioerr.test | 26 # This is because the 8th IO call attempts to read page 2 of the database 27 # file when the file on disk is only 1 page. The pager layer detects that 103 # onto an overflow page. 325 # Create a test database. Page 2 is the root page of table t1. The only 326 # row inserted into t1 has an overflow page - page 3. Page 3 will be 362 -- This statement uses the balance_quick() optimization. The new page 363 -- is appended to the database file. But the overflow page used by 388 -- This statement inserts a row into t1 with an overflow page at the 393 -- This transaction will cause the root-page of table t1 to divide 395 -- overflow page inserted in the -sqlprep block above will change and [all …]
|
| H A D | backup4.test | 14 # database is one page in size. 16 # The destination must consist of at least one page as truncating a 27 # file must contain at least one page in order to be recognized as an 65 # consists of a single page only. 88 # Test that if the destination has a page-size larger than the implicit 89 # page-size of the source, the final destination database still consists 90 # of a single page.
|
| H A D | malloc5.test | 66 # one unused page in a single pager cache. The page cannot be freed, as 86 # Call [sqlite3_release_memory] when there is exactly one unused page 94 # Commit the transaction and open a new one. Read 1 page into the cache. 95 # Because the page is not dirty, it is eligible for collection even 108 # causes another page (page 1) to become eligible for recycling. 132 # pages currently in the cache are dirty (page 3) or pinned (page 1). 159 # Load the root-page for table def into the cache. Then query table abc. 299 set stats(page) 366 # sync() to free up the dirty db2 pages. The only page that cannot be 368 # btree layer holds a reference to page 1 in the db2 cache. [all …]
|
| H A D | fts3corrupt4.test | 180 | page 1 offset 0 221 | page 2 offset 4096 225 | page 3 offset 8192 280 | page 1 offset 0 571 | page 1 offset 0 772 | page 1 offset 0 995 | page 1 offset 0 1224 | page 1 offset 0 1447 | page 1 offset 0 1736 | page 1 offset 0 [all …]
|
| /sqlite-3.40.0/doc/ |
| H A D | pager-invariants.txt | 1 *** Throughout this document, a page is deemed to have been synced 3 Otherwise, the page is not synced until the xSync method of the VFS 4 is called successfully on the file containing the page. 7 one or more of the following are true about the page: 9 (a) The original content of the page as it was at the beginning of 13 (b) The page was a freelist leaf page at the start of the transaction. 15 (c) The page number is greater than the largest page that existed in 18 (1) A page of the database file is never overwritten unless one of the 23 (b) The atomic page write optimization is enabled, and the entire 25 number consists of a single page change. [all …]
|
| /sqlite-3.40.0/src/ |
| H A D | test_pcache.c | 110 sqlite3_pcache_page page; /* Base class */ member 158 p->a[i].page.pBuf = (void*)x; in testpcacheCreate() 159 p->a[i].page.pExtra = (void*)&x[szPage]; in testpcacheCreate() 209 return &p->a[i].page; in testpcacheFetch() 246 memset(p->a[j].page.pBuf, 0, p->szPage); in testpcacheFetch() 251 return &p->a[j].page; in testpcacheFetch() 273 memset(p->a[j].page.pBuf, 0, p->szPage); in testpcacheFetch() 274 memset(p->a[j].page.pExtra, 0, p->szExtra); in testpcacheFetch() 277 return &p->a[j].page; in testpcacheFetch() 311 if( &p->a[i].page==pOldPage ){ in testpcacheUnpin() [all …]
|
| /sqlite-3.40.0/ext/repair/test/ |
| H A D | checkfreelist01.test | 65 } {{leaf page 10092 is out of range (child 3 of trunk page 4860)}} 74 } {{leaf page 0 is out of range (child 3 of trunk page 4860)}} 83 } {{leaf page 0 is out of range (child 247 of trunk page 5)}} 92 } {{leaf count out of range (249) on trunk page 5}}
|
| /sqlite-3.40.0/ext/fts5/test/ |
| H A D | fts5corrupt5.test | 37 | page 1 offset 0 74 | page 2 offset 4096 189 | page 3 offset 8192 224 | page 4 offset 12288 227 | page 5 offset 16384 231 | page 6 offset 20480 251 | page 1 offset 0 288 | page 2 offset 4096 403 | page 3 offset 8192 462 | page 1 offset 0 [all …]
|