Documentation Source Text

Check-in [3b3c197a19]
Login

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

Overview
Comment:Fix typos and a mixup over BLOB and text serial types in the file format document.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3b3c197a19847dada00f1afe178a8cc4ec050888
User & Date: drh 2011-11-24 19:40:33.588
Context
2011-11-25
17:51
Update the changes log for sqlite3_stmt_busy(). (check-in: 8092164ae8 user: drh tags: trunk)
2011-11-24
19:40
Fix typos and a mixup over BLOB and text serial types in the file format document. (check-in: 3b3c197a19 user: drh tags: trunk)
2011-11-17
18:03
Update the "changes" log for the next release. Fix all hyperlinks. (check-in: 4643d06dfe user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to pages/fileformat2.in.
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
not used by SQLite.</p>

<tcl>hd_fragment validfor {version-valid-for number}</tcl>
<h4>1.2.15 Write library version number and version-valid-for number</h4>

<p>^The 4-byte big-endian integer at offset 96 stores the 
[SQLITE_VERSION_NUMBER] value for the SQLite library that most
recently modified the database file.  ^The 4-byte big-ending integer at
offset 92 is the value of the [change counter] when the version number
was stored.  The integer at offset 92 indicates which transaction
the version number is valid for and is sometimes called the
"version-valid-for number".

<h4>1.2.16 Header space reserved for expansion</h4>








|







342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
not used by SQLite.</p>

<tcl>hd_fragment validfor {version-valid-for number}</tcl>
<h4>1.2.15 Write library version number and version-valid-for number</h4>

<p>^The 4-byte big-endian integer at offset 96 stores the 
[SQLITE_VERSION_NUMBER] value for the SQLite library that most
recently modified the database file.  ^The 4-byte big-endian integer at
offset 92 is the value of the [change counter] when the version number
was stored.  The integer at offset 92 indicates which transaction
the version number is valid for and is sometimes called the
"version-valid-for number".

<h4>1.2.16 Header space reserved for expansion</h4>

617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
pages.
<li>A 4-byte big-endian integer page number for the first page of the
overflow page list - omitted if all payload fits on the b-tree page.
</ul></p></dd>

<dt><p>Table B-Tree Interior Cell:</p></dt>
<dd><p><ul>
<li>A 4-byte big-ending page number which is the left child pointer.
<li>A varint which is the integer key
</ul></p></dd>

<dt><p>Index B-Tree Leaf Cell:</p></dt>
<dd><p><ul>
<li>A varint which is the total number of bytes of key payload, including any
overflow
<li>The initial portion of the payload that does not spill to overflow
pages.
<li>A 4-byte big-endian integer page number for the first page of the
overflow page list - omitted if all payload fits on the b-tree page.
</ul></p></dd>

<dt><p>Index B-Tree Interior Cell:</p></dt>
<dd><p><ul>
<li>A 4-byte big-ending page number which is the left child pointer.
<li>A varint which is the total number of bytes of key payload, including any
overflow
<li>The initial portion of the payload that does not spill to overflow
pages.
<li>A 4-byte big-endian integer page number for the first page of the
overflow page list - omitted if all payload fits on the b-tree page.
</ul></p></dd>







|















|







617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
pages.
<li>A 4-byte big-endian integer page number for the first page of the
overflow page list - omitted if all payload fits on the b-tree page.
</ul></p></dd>

<dt><p>Table B-Tree Interior Cell:</p></dt>
<dd><p><ul>
<li>A 4-byte big-endian page number which is the left child pointer.
<li>A varint which is the integer key
</ul></p></dd>

<dt><p>Index B-Tree Leaf Cell:</p></dt>
<dd><p><ul>
<li>A varint which is the total number of bytes of key payload, including any
overflow
<li>The initial portion of the payload that does not spill to overflow
pages.
<li>A 4-byte big-endian integer page number for the first page of the
overflow page list - omitted if all payload fits on the b-tree page.
</ul></p></dd>

<dt><p>Index B-Tree Interior Cell:</p></dt>
<dd><p><ul>
<li>A 4-byte big-endianpage number which is the left child pointer.
<li>A varint which is the total number of bytes of key payload, including any
overflow
<li>The initial portion of the payload that does not spill to overflow
pages.
<li>A 4-byte big-endian integer page number for the first page of the
overflow page list - omitted if all payload fits on the b-tree page.
</ul></p></dd>
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
first pair of columns that are not equal determines the relative order
of the two records.  The sort order of individual columns is as
follows:</p>

<ol>
<li>^NULL values (serial type 0) sort first
<li>^Numeric values (serial types 1 through 9) sort next and in numeric order
<li>^Text values (even serial types 12 and larger) sort next in the order
    determined by the columns [collating function]
<li>^BLOB values (odd serial types 13 and larger) sort last in order 
    determined by memcmp().
</ol>

<p>A [collating function] for each column is necessary in order to compute
the order of text fields.  ^SQLite defines three built-in collating functions:
</p>








|

|







905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
first pair of columns that are not equal determines the relative order
of the two records.  The sort order of individual columns is as
follows:</p>

<ol>
<li>^NULL values (serial type 0) sort first
<li>^Numeric values (serial types 1 through 9) sort next and in numeric order
<li>^Text values (odd serial types 13 and larger) sort next in the order
    determined by the columns [collating function]
<li>^BLOB values (even serial types 12 and larger) sort last in order 
    determined by memcmp().
</ol>

<p>A [collating function] for each column is necessary in order to compute
the order of text fields.  ^SQLite defines three built-in collating functions:
</p>