1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Fix off-by-one errors in the header comments of btree.c. Ticket #2272. (CVS 3726)

FossilOrigin-Name: a70ea7202d8ffb0321ff8f2e5036731bb1742eb8
This commit is contained in:
drh
2007-03-27 14:05:22 +00:00
parent cf64372910
commit a4124a06cc
3 changed files with 12 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
C More\sstrict\saliasing\sfixes.\s\sThe\ssingle\ssource\sfile\slibrary\snow\sruns\nsuccessfully\swith\s-fstrict-alias.\s(CVS\s3725) C Fix\soff-by-one\serrors\sin\sthe\sheader\scomments\sof\sbtree.c.\s\sTicket\s#2272.\s(CVS\s3726)
D 2007-03-27T13:36:37 D 2007-03-27T14:05:23
F Makefile.in 1fe3d0b46e40fd684e1e61f8e8056cefed16de9f F Makefile.in 1fe3d0b46e40fd684e1e61f8e8056cefed16de9f
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935 F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -58,7 +58,7 @@ F src/alter.c 2c79ec40f65e33deaf90ca493422c74586e481a3
F src/analyze.c 7d2b7ab9a9c2fd6e55700f69064dfdd3e36d7a8a F src/analyze.c 7d2b7ab9a9c2fd6e55700f69064dfdd3e36d7a8a
F src/attach.c 9b5a9c50fb92883e3404353b225674142da826cd F src/attach.c 9b5a9c50fb92883e3404353b225674142da826cd
F src/auth.c 902f4722661c796b97f007d9606bd7529c02597f F src/auth.c 902f4722661c796b97f007d9606bd7529c02597f
F src/btree.c 0659070eb438bae32cec8afebe6d8d390024d952 F src/btree.c 27e62fc50dba2ac0b4210402804ac12321ad8e59
F src/btree.h 066444ee25bd6e6accb997bfd2cf5ace14dbcd00 F src/btree.h 066444ee25bd6e6accb997bfd2cf5ace14dbcd00
F src/build.c d178bd7c8117f5f47694da9a0d5f336e85528180 F src/build.c d178bd7c8117f5f47694da9a0d5f336e85528180
F src/callback.c 31d22b4919c7645cbcbb1591ce2453e8c677c558 F src/callback.c 31d22b4919c7645cbcbb1591ce2453e8c677c558
@@ -442,7 +442,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513 F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
P 1dd9d0775a8199047de30218af71a31c731fedb1 P c8a8a189a82500aab501e9949f5b197c0b80b3a9
R 788fdfcff1fda81d98ec4386ff9fe62b R 4093f5fe8a47b839b227af98195abbcf
U drh U drh
Z a721db4fcd13afdccda21f5563fa1a8b Z 6e347bdb933f7ff4141334d59e940f6d

View File

@@ -1 +1 @@
c8a8a189a82500aab501e9949f5b197c0b80b3a9 a70ea7202d8ffb0321ff8f2e5036731bb1742eb8

View File

@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give. ** May you share freely, never taking more than you give.
** **
************************************************************************* *************************************************************************
** $Id: btree.c,v 1.342 2007/03/26 22:05:01 drh Exp $ ** $Id: btree.c,v 1.343 2007/03/27 14:05:23 drh Exp $
** **
** This file implements a external (disk-based) database using BTrees. ** This file implements a external (disk-based) database using BTrees.
** For a detailed discussion of BTrees, refer to ** For a detailed discussion of BTrees, refer to
@@ -22,13 +22,13 @@
** entries and N+1 pointers to subpages. ** entries and N+1 pointers to subpages.
** **
** ---------------------------------------------------------------- ** ----------------------------------------------------------------
** | Ptr(0) | Key(0) | Ptr(1) | Key(1) | ... | Key(N) | Ptr(N+1) | ** | Ptr(0) | Key(0) | Ptr(1) | Key(1) | ... | Key(N-1) | Ptr(N) |
** ---------------------------------------------------------------- ** ----------------------------------------------------------------
** **
** All of the keys on the page that Ptr(0) points to have values less ** All of the keys on the page that Ptr(0) points to have values less
** than Key(0). All of the keys on page Ptr(1) and its subpages have ** than Key(0). All of the keys on page Ptr(1) and its subpages have
** values greater than Key(0) and less than Key(1). All of the keys ** values greater than Key(0) and less than Key(1). All of the keys
** on Ptr(N+1) and its subpages have values greater than Key(N). And ** on Ptr(N) and its subpages have values greater than Key(N-1). And
** so forth. ** so forth.
** **
** Finding a particular key requires reading O(log(M)) pages from the ** Finding a particular key requires reading O(log(M)) pages from the
@@ -41,7 +41,7 @@
** page. If the payload is larger than the preset amount then surplus ** page. If the payload is larger than the preset amount then surplus
** bytes are stored on overflow pages. The payload for an entry ** bytes are stored on overflow pages. The payload for an entry
** and the preceding pointer are combined to form a "Cell". Each ** and the preceding pointer are combined to form a "Cell". Each
** page has a small header which contains the Ptr(N+1) pointer and other ** page has a small header which contains the Ptr(N) pointer and other
** information such as the size of key and data. ** information such as the size of key and data.
** **
** FORMAT DETAILS ** FORMAT DETAILS
@@ -123,7 +123,7 @@
** 3 2 number of cells on this page ** 3 2 number of cells on this page
** 5 2 first byte of the cell content area ** 5 2 first byte of the cell content area
** 7 1 number of fragmented free bytes ** 7 1 number of fragmented free bytes
** 8 4 Right child (the Ptr(N+1) value). Omitted on leaves. ** 8 4 Right child (the Ptr(N) value). Omitted on leaves.
** **
** The flags define the format of this btree page. The leaf flag means that ** The flags define the format of this btree page. The leaf flag means that
** this page has no children. The zerodata flag means that this page carries ** this page has no children. The zerodata flag means that this page carries