提交 922ec1d9 authored 作者: Thomas Mueller's avatar Thomas Mueller

typo

上级 b46ebd09
...@@ -27,7 +27,7 @@ import org.h2.value.Value; ...@@ -27,7 +27,7 @@ import org.h2.value.Value;
import org.h2.value.ValueNull; import org.h2.value.ValueNull;
/** /**
* This is the most common type of index, a btree index. * This is the most common type of index, a b-tree index.
* The index structure is: * The index structure is:
* <ul> * <ul>
* <li>There is one {@link BtreeHead} that points to the root page. * <li>There is one {@link BtreeHead} that points to the root page.
...@@ -44,7 +44,7 @@ import org.h2.value.ValueNull; ...@@ -44,7 +44,7 @@ import org.h2.value.ValueNull;
*/ */
public class BtreeIndex extends BaseIndex implements RecordReader { public class BtreeIndex extends BaseIndex implements RecordReader {
// TODO index / btree: tune page size // TODO index / b-tree: tune page size
// final static int MAX_PAGE_SIZE = 256; // final static int MAX_PAGE_SIZE = 256;
private Storage storage; private Storage storage;
......
...@@ -20,7 +20,7 @@ import org.h2.util.ObjectArray; ...@@ -20,7 +20,7 @@ import org.h2.util.ObjectArray;
import org.h2.value.Value; import org.h2.value.Value;
/** /**
* An outer page of a btree index. * An outer page of a b-tree index.
* *
* Page format: * Page format:
* <pre> * <pre>
...@@ -92,7 +92,7 @@ public class BtreeLeaf extends BtreePage { ...@@ -92,7 +92,7 @@ public class BtreeLeaf extends BtreePage {
int i = (l + r) >>> 1; int i = (l + r) >>> 1;
SearchRow row = pageData.get(i); SearchRow row = pageData.get(i);
if (SysProperties.CHECK && row == null) { if (SysProperties.CHECK && row == null) {
Message.throwInternalError("btree corrupt"); Message.throwInternalError("b-tree corrupt");
} }
int comp = index.compareRows(row, oldRow); int comp = index.compareRows(row, oldRow);
if (comp == 0) { if (comp == 0) {
......
...@@ -135,7 +135,7 @@ public class BtreeNode extends BtreePage { ...@@ -135,7 +135,7 @@ public class BtreeNode extends BtreePage {
} }
} }
int at = l; int at = l;
// merge is not implemented to allow concurrent usage of btrees // merge is not implemented to allow concurrent usage
BtreePage page = index.getPage(session, pageChildren.get(at)); BtreePage page = index.getPage(session, pageChildren.get(at));
SearchRow first = page.remove(session, oldRow); SearchRow first = page.remove(session, oldRow);
if (first == null) { if (first == null) {
......
...@@ -33,7 +33,7 @@ public abstract class BtreePage extends Record { ...@@ -33,7 +33,7 @@ public abstract class BtreePage extends Record {
*/ */
protected BtreeIndex index; protected BtreeIndex index;
// TODO memory: the btree page needs a lot of memory (in the cache) - // TODO memory: the b-tree page needs a lot of memory (in the cache) -
// probably better not use ObjectArray but array // probably better not use ObjectArray but array
/** /**
......
...@@ -37,12 +37,12 @@ public class Page { ...@@ -37,12 +37,12 @@ public class Page {
public static final int TYPE_DATA_OVERFLOW = 3; public static final int TYPE_DATA_OVERFLOW = 3;
/** /**
* A btree leaf page (without overflow: + FLAG_LAST). * A b-tree leaf page (without overflow: + FLAG_LAST).
*/ */
public static final int TYPE_BTREE_LEAF = 4; public static final int TYPE_BTREE_LEAF = 4;
/** /**
* A btree node page (never has overflow pages). * A b-tree node page (never has overflow pages).
*/ */
public static final int TYPE_BTREE_NODE = 5; public static final int TYPE_BTREE_NODE = 5;
......
...@@ -12,7 +12,7 @@ import org.h2.result.Row; ...@@ -12,7 +12,7 @@ import org.h2.result.Row;
import org.h2.result.SearchRow; import org.h2.result.SearchRow;
/** /**
* The cursor implementation for the page btree index. * The cursor implementation for the page b-tree index.
*/ */
public class PageBtreeCursor implements Cursor { public class PageBtreeCursor implements Cursor {
......
...@@ -259,7 +259,7 @@ class PageBtreeLeaf extends PageBtree { ...@@ -259,7 +259,7 @@ class PageBtreeLeaf extends PageBtree {
} }
public String toString() { public String toString() {
return "page[" + getPos() + "] btree leaf table:" + index.getId() + " entries:" + entryCount; return "page[" + getPos() + "] b-tree leaf table:" + index.getId() + " entries:" + entryCount;
} }
} }
...@@ -360,7 +360,7 @@ class PageBtreeNode extends PageBtree { ...@@ -360,7 +360,7 @@ class PageBtreeNode extends PageBtree {
* Set the cursor to the first row of the next page. * Set the cursor to the first row of the next page.
* *
* @param cursor the cursor * @param cursor the cursor
* @param row the current row * @param ROW the current row
*/ */
void nextPage(PageBtreeCursor cursor, int pageId) throws SQLException { void nextPage(PageBtreeCursor cursor, int pageId) throws SQLException {
int i; int i;
...@@ -389,7 +389,7 @@ class PageBtreeNode extends PageBtree { ...@@ -389,7 +389,7 @@ class PageBtreeNode extends PageBtree {
* Set the cursor to the last row of the previous page. * Set the cursor to the last row of the previous page.
* *
* @param cursor the cursor * @param cursor the cursor
* @param row the current row * @param ROW the current row
*/ */
void previousPage(PageBtreeCursor cursor, int pageId) throws SQLException { void previousPage(PageBtreeCursor cursor, int pageId) throws SQLException {
int i; int i;
...@@ -416,7 +416,7 @@ class PageBtreeNode extends PageBtree { ...@@ -416,7 +416,7 @@ class PageBtreeNode extends PageBtree {
public String toString() { public String toString() {
return "page[" + getPos() + "] btree node table:" + index.getId() + " entries:" + entryCount; return "page[" + getPos() + "] b-tree node table:" + index.getId() + " entries:" + entryCount;
} }
......
...@@ -185,7 +185,7 @@ class PageDataNode extends PageData { ...@@ -185,7 +185,7 @@ class PageDataNode extends PageData {
boolean remove(int key) throws SQLException { boolean remove(int key) throws SQLException {
int at = find(key); int at = find(key);
// merge is not implemented to allow concurrent usage of btrees // merge is not implemented to allow concurrent usage
// TODO maybe implement merge // TODO maybe implement merge
PageData page = index.getPage(childPageIds[at], getPos()); PageData page = index.getPage(childPageIds[at], getPos());
boolean empty = page.remove(key); boolean empty = page.remove(key);
......
...@@ -72,7 +72,7 @@ public class PageStore implements CacheWriter { ...@@ -72,7 +72,7 @@ public class PageStore implements CacheWriter {
// TODO var int: see google protocol buffers // TODO var int: see google protocol buffers
// TODO don't save parent (only root); remove setPageId // TODO don't save parent (only root); remove setPageId
// TODO implement checksum - 0 for empty // TODO implement checksum - 0 for empty
// TODO btree index with fixed size values doesn't need offset and so on // TODO b-tree index with fixed size values doesn't need offset and so on
// TODO remove parent, use tableId if required // TODO remove parent, use tableId if required
// TODO replace CRC32 // TODO replace CRC32
// TODO PageBtreeNode: 4 bytes offset - others use only 2 // TODO PageBtreeNode: 4 bytes offset - others use only 2
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论