Documentation Source Text

Check-in [2ceac5efd8]
Login

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

Overview
Comment:Update the file format documentation to show that the database size is stored in the header at offset 28.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2ceac5efd811d118b878fcf790de3142ddb86263
User & Date: drh 2010-03-23 13:12:31
Context
2010-03-23
21:39
Attempt to provide a renderer for the bubble syntax that produces all text output for users not wanting the graphical version. check-in: b1e7df7e11 user: shaneh tags: trunk
13:12
Update the file format documentation to show that the database size is stored in the header at offset 28. check-in: 2ceac5efd8 user: drh tags: trunk
2010-03-10
23:17
Fix typo in change log for 3.6.23. check-in: 128ffc00f3 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/fileformat.in.

717
718
719
720
721
722
723
724






725

726
727
728
729
730
731
732
....
2980
2981
2982
2983
2984
2985
2986
2987
            reorganization is not performed until explicitly requested
            by the user.
            <td>H30171

      </table>

      <p>
        The four byte block beginning at offset 28 is unused. As is the






        32 byte block beginning at offset 68.

      </p>

      <p>
        The following requirements state that certain database header
        fields must contain defined constant values, even though the sqlite 
        database file format is designed to allow various values. These fields
        were intended to be flexible when the SQLite database image format
................................................................................
  [Ref 3 atomic_commit_page {
    SQLite Online Documentation,<u>How SQLite Implements Atomic Commit</u>,
    <a href="atomiccommit.html">http://www.sqlite.org/atomiccommit.html</a>.
  }]
  </table>
}
</tcl>








|
>
>
>
>
>
>
|
>







 







<
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
....
2987
2988
2989
2990
2991
2992
2993

            reorganization is not performed until explicitly requested
            by the user.
            <td>H30171

      </table>

      <p>
        The four byte block beginning at offset 28 stores a big-endian integer
        which is the number of pages in the database.  Older versions of
        SQLite set this integer to zero.  For compatibility, SQLite database
        readers should be able to deal with either value.
      </p>

      <p>
        The 32 byte block beginning at offset 68 is currently unused.
        This might change in a future release of SQLite.
      </p>

      <p>
        The following requirements state that certain database header
        fields must contain defined constant values, even though the sqlite 
        database file format is designed to allow various values. These fields
        were intended to be flexible when the SQLite database image format
................................................................................
  [Ref 3 atomic_commit_page {
    SQLite Online Documentation,<u>How SQLite Implements Atomic Commit</u>,
    <a href="atomiccommit.html">http://www.sqlite.org/atomiccommit.html</a>.
  }]
  </table>
}
</tcl>

Changes to pages/fileformat2.in.

116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<tr><td valign=top align=center>22<td valign=top align=center>1<td align=left>
Minimum embedded payload fraction.  Must be 32.
<tr><td valign=top align=center>23<td valign=top align=center>1<td align=left>
Leaf payload fraction.  Must be 32.
<tr><td valign=top align=center>24<td valign=top align=center>4<td align=left>
File change counter.
<tr><td valign=top align=center>28<td valign=top align=center>4<td align=left>
Reserved for expansion.  Must be zero.
<tr><td valign=top align=center>32<td valign=top align=center>4<td align=left>
Page number of the first freelist trunk page.
<tr><td valign=top align=center>36<td valign=top align=center>4<td align=left>
Total number of freelist pages.
<tr><td valign=top align=center>40<td valign=top align=center>4<td align=left>
The schema cookie.
<tr><td valign=top align=center>44<td valign=top align=center>4<td align=left>







|







116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<tr><td valign=top align=center>22<td valign=top align=center>1<td align=left>
Minimum embedded payload fraction.  Must be 32.
<tr><td valign=top align=center>23<td valign=top align=center>1<td align=left>
Leaf payload fraction.  Must be 32.
<tr><td valign=top align=center>24<td valign=top align=center>4<td align=left>
File change counter.
<tr><td valign=top align=center>28<td valign=top align=center>4<td align=left>
Size of the database file in pages.
<tr><td valign=top align=center>32<td valign=top align=center>4<td align=left>
Page number of the first freelist trunk page.
<tr><td valign=top align=center>36<td valign=top align=center>4<td align=left>
Total number of freelist pages.
<tr><td valign=top align=center>40<td valign=top align=center>4<td align=left>
The schema cookie.
<tr><td valign=top align=center>44<td valign=top align=center>4<td align=left>

Changes to pages/index.in.

46
47
48
49
50
51
52








53
54
55
56
57
58
59
60
  sponsor[2] = '<tr><td align="center">\
    <a href="http://www.bloomberg.com/">\
   <img src="images/foreignlogos/bloomberg.gif" alt="bloomberg.com" border="0">\
    </a></td><td>\
    <a href="http://www.bloomberg.com/">Bloomberg</a> - \
    A world leader in financial-information technology.</td></tr>'









  count = 3
  while( count>0 ){
    i = Math.floor(Math.random()*4)
    if( sponsor[i]!=null ){
      document.write(sponsor[i])
      sponsor[i] = null
      count--
    }







>
>
>
>
>
>
>
>
|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
  sponsor[2] = '<tr><td align="center">\
    <a href="http://www.bloomberg.com/">\
   <img src="images/foreignlogos/bloomberg.gif" alt="bloomberg.com" border="0">\
    </a></td><td>\
    <a href="http://www.bloomberg.com/">Bloomberg</a> - \
    A world leader in financial-information technology.</td></tr>'

   sponsor[3] = '<tr><td align="center">\
    <a href="http://www.adobe.com/">\
    <img src="images/foreignlogos/adobe-logo.gif" alt="adobe.com" border="0">\
    </a></td><td>\
    <a href="http://www.adobe.com/">Adobe</a> revolutionizes how the \
    world engages with ideas and information - anywhere, anytime, and \
    through any medium.</td></tr>'

  count = 4
  while( count>0 ){
    i = Math.floor(Math.random()*4)
    if( sponsor[i]!=null ){
      document.write(sponsor[i])
      sponsor[i] = null
      count--
    }