diff options
Diffstat (limited to '')
-rw-r--r-- | www/fileformat.html | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/www/fileformat.html b/www/fileformat.html index f6fb7cc..8a9bcb6 100644 --- a/www/fileformat.html +++ b/www/fileformat.html @@ -250,21 +250,21 @@ in production.</p> <p>At any point in time, every page in the main database has a single use which is one of the following: </p><ul> -<li>The lock-byte page -</li><li>A freelist page -<ul> -<li>A freelist trunk page -</li><li>A freelist leaf page -</li></ul> -</li><li>A b-tree page +<li>A b-tree page <ul> <li>A table b-tree interior page </li><li>A table b-tree leaf page </li><li>An index b-tree interior page </li><li>An index b-tree leaf page </li></ul> +</li><li>A freelist page +<ul> +<li>A freelist trunk page +</li><li>A freelist leaf page +</li></ul> </li><li>A payload overflow page </li><li>A pointer map page +</li><li>The lock-byte page </li></ul> @@ -274,15 +274,6 @@ are also usually an integer number of pages in size, with the one exception that when the database is first opened, the first 100 bytes of the database file (the database file header) are read as a sub-page size unit.</p> -<p>Before any information-bearing page of the database is modified, -the original unmodified content of that page is written into the -rollback journal. If a transaction is interrupted and needs to be -rolled back, the rollback journal can then be used to restore the -database to its original state. Freelist leaf pages bear no -information that would need to be restored on a rollback and so they -are not written to the journal prior to modification, in order to -reduce disk I/O.</p> - <a name="database_header"></a> <h2 id="the_database_header"><span>1.3. </span>The Database Header</h2> @@ -520,7 +511,10 @@ The format version number can be made to default to 1 instead of 4 by setting <a href="compile.html#default_file_format">SQLITE_DEFAULT_FILE_FORMAT</a>=1 at compile-time. </p> -<h3 id="suggested_cache_size"><span>1.3.11. </span>Suggested cache size</h3> +<p>If the database is completely empty, if it has no schema, then the +schema format number can be zero. + +</p><h3 id="suggested_cache_size"><span>1.3.11. </span>Suggested cache size</h3> <p>The 4-byte big-endian signed integer at offset 48 is the suggested cache size in pages for the database file. The value is a suggestion @@ -1842,9 +1836,19 @@ file and has the same name as the database file but with the string associated with a give database and hence there can only be one write transaction open against a single database at one time.</p> -<p>If a transaction is aborted due to an application crash, an operating -system crash, or a hardware power failure or crash, then the database may -be left in an inconsistent state. The next time SQLite attempts to open +<p>Before any information-bearing page of the database is modified, +the original unmodified content of that page is written into the +rollback journal. If a transaction is interrupted and needs to be +rolled back, the rollback journal can then be used to restore the +database to its original state. Freelist leaf pages bear no +information that would need to be restored on a rollback and so they +are not written to the journal prior to modification, in order to +reduce disk I/O.</p> + +<p>If a transaction is aborted due to an application crash, or a single, +or an operating system crash, or a hardware power failure or crash, then +the main database file might be left in an inconsistent state. +The next time SQLite attempts to open the database file, the presence of the rollback journal file will be detected and the journal will be automatically played back to restore the database to its state at the start of the incomplete transaction.</p> @@ -2201,5 +2205,5 @@ file, and since the wal-index is a transient structure, no further information about the format of the wal-index will be provided here. Additional details on the format of the wal-index are contained in the separate <a href="walformat.html#walidxfmt">WAL-index File Format</a> document.</p> -<p align="center"><small><i>This page last modified on <a href="https://sqlite.org/docsrc/honeypot" id="mtimelink" data-href="https://sqlite.org/docsrc/finfo/pages/fileformat2.in?m=af2cdeaf41">2024-04-20 09:25:12</a> UTC </small></i></p> +<p align="center"><small><i>This page last modified on <a href="https://sqlite.org/docsrc/honeypot" id="mtimelink" data-href="https://sqlite.org/docsrc/finfo/pages/fileformat2.in?m=745ac9d6ba">2024-07-24 10:03:34</a> UTC </small></i></p> |