Documentation Source Text

Check-in [7e6a5768d9]
Login

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

Overview
Comment:Fix a bug in the formula to compute the layout of index b-tree cells.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7e6a5768d9483969c3cb53e65d6097b203d29f9e
User & Date: dan 2009-04-29 10:16:53.000
Context
2009-04-29
14:33
Update trigger documentation. (check-in: 1179f9425f user: drh tags: trunk)
10:16
Fix a bug in the formula to compute the layout of index b-tree cells. (check-in: 7e6a5768d9 user: dan tags: trunk)
2009-04-28
15:51
fileformat.html updates. (check-in: 7962286919 user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to pages/fileformat.in.
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
          big-endian unsigned integer. The size of the part of the record 
          stored within the B-Tree cell (<i>local-size</i> in figure 
          <cite>figure_indexlongrecord</cite>) is calculated according to the 
          following algorithm:
        <pre>
            <i>min-local</i> := (<i>usable-size</i> - 12) * <i>min-embedded-fraction</i> / 255 - 23
            <i>max-local</i> := (<i>usable-size</i> - 12) * <i>max-embedded-fraction</i> / 255 - 23
            <i>local-size</i> := (<i>record-size</i> - <i>min-local</i>) % (<i>usable-size</i> - 4)
            if( <i>local-size</i> &gt; <i>max-local</i> )
                <i>local-size</i> := <i>min-local</i>
</pre>
        <p>
          In the formula above, <i>usable-size</i> is the page-size
          in bytes less the number of unused bytes left at the end of every
          page (as read from byte offset 20 of the file header), and







|







1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
          big-endian unsigned integer. The size of the part of the record 
          stored within the B-Tree cell (<i>local-size</i> in figure 
          <cite>figure_indexlongrecord</cite>) is calculated according to the 
          following algorithm:
        <pre>
            <i>min-local</i> := (<i>usable-size</i> - 12) * <i>min-embedded-fraction</i> / 255 - 23
            <i>max-local</i> := (<i>usable-size</i> - 12) * <i>max-embedded-fraction</i> / 255 - 23
            <i>local-size</i> := <i>min-local</i> + (<i>record-size</i> - <i>min-local</i>) % (<i>usable-size</i> - 4)
            if( <i>local-size</i> &gt; <i>max-local</i> )
                <i>local-size</i> := <i>min-local</i>
</pre>
        <p>
          In the formula above, <i>usable-size</i> is the page-size
          in bytes less the number of unused bytes left at the end of every
          page (as read from byte offset 20 of the file header), and