Documentation Source Text

Check-in [14e677d1dc]
Login

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

Overview
Comment:Add a "todo" note to fix the schema file-format range. Also fix another todo in fileformat.html.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 14e677d1dc45ad0056ebbe82b4db482d94eae179
User & Date: dan 2009-05-26 15:13:30
Context
2009-05-26
23:13
Improve the internal links from text to glossary definitions in fileformat.html. Also fix a bunch of issues reported by John Machin on the mailing list. check-in: c5aa49ff35 user: dan tags: trunk
15:13
Add a "todo" note to fix the schema file-format range. Also fix another todo in fileformat.html. check-in: 14e677d1dc user: dan tags: trunk
04:32
Modify some requirements in fileformat.html to make them more testable. check-in: 9a9955c381 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to pages/fileformat.in.

   533    533   	<li>If the database is an auto-vacuum database, a flag indicating 
   534    534   	    whether or not the database is in incremental vacuum mode or not.
   535    535   	<li>The default page cache size in pages to use with the database (an 
   536    536   	    integer field).
   537    537         </ol>
   538    538     </ul>
   539    539   
   540         -  <p class=todo>
   541         -    Say something about items 5 and 6 being advisory only. SQLite places an
   542         -    interpretation on each field, but other applications may safely ignore
   543         -    them.
          540  +  <p>
          541  +    Of the six database properties enumerated above, the values taken by the
          542  +    initial three dramatically affect the structure of the database image. Any
          543  +    software system that handles SQLite database images will need to understand
          544  +    and interpret them. Properties 4 to 6 may be considered advisory. Although
          545  +    properties 5 and 6 modify the operation of the SQLite library in 
          546  +    well-defined manners, an alternative SQLite database client is free to
          547  +    interpret them differently, or not interpret them at all. 
   544    548   
   545    549     <p class=todo>
   546    550       The concept of a logical database and its contents should be defined
   547    551       properly in some requirements document so that it can be referenced from
   548    552       here and other places. The definition will be something like the list of
   549    553       bullet points above.
   550    554   
................................................................................
   789    793                 <li> Implicit default (non-NULL) values at the end of table
   790    794                      records (see section <cite>table_btree_content</cite>).
   791    795                 <li> Descending indexes (see section
   792    796                      <cite>index_btree_compare_func</cite>) and Boolean values
   793    797                      in database records (see section <cite>record_format</cite>,
   794    798                      serial types 8 and 9).
   795    799               </ol>
          800  +
          801  +            <p class=todo>
          802  +              Turns out SQLite can be tricked into violating this. If you delete
          803  +	      all tables from a database and then VACUUM the database, the
          804  +              schema layer file-format field somehow gets set to 0.
   796    805               <td>H30120
   797    806   
   798    807           [Tr]<td>48..51 <td>4<td>
   799    808               Default pager cache size. This field is used by SQLite to store
   800    809               the recommended pager cache size to use for the database.
   801    810               <td>H30130
   802    811   
................................................................................
   928    937             [fileformat_import_requirement2 H30210]
   929    938             [fileformat_import_requirement2 H30220]
   930    939           
   931    940   
   932    941       [h3 "The Schema Table" schema_table]
   933    942         <p>
   934    943           Apart from being the page that contains the file-header, page 1 of
   935         -        the database file is special because it is the root page of the
          944  +        a database image is special because it is the root page of the
   936    945           B-Tree structure that contains the schema table data. From the SQL
   937    946           level, the schema table is accessible via the name "sqlite_master".
   938    947         <p>
   939    948           The exact format of the B-Tree structure and the meaning of the term
   940    949           "root page" is discussed in section <cite>btree_structures</cite>.
   941    950           For now, it is sufficient to know that the B-Tree structure is a
   942    951           data structure that stores a set of records. Each record is an