summaryrefslogtreecommitdiff
path: root/src/btree/bt_misc.c
diff options
context:
space:
mode:
authorKeith Bostic <keith.bostic@wiredtiger.com>2011-05-19 12:12:20 -0400
committerKeith Bostic <keith.bostic@wiredtiger.com>2011-05-19 12:12:20 -0400
commit3339889ff06d7452d9b72aa252ead12714711a8a (patch)
tree88f409451f4086cf562845e126dedf49939c25cc /src/btree/bt_misc.c
parenta258cac708ccec3c9c53bed72ed05b76addd75f4 (diff)
downloadmongo-3339889ff06d7452d9b72aa252ead12714711a8a.tar.gz
Store keys less than 64 bytes and data items less than 128 bytes using only a
single overhead byte.
Diffstat (limited to 'src/btree/bt_misc.c')
-rw-r--r--src/btree/bt_misc.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/btree/bt_misc.c b/src/btree/bt_misc.c
index 2c27e84775c..dbaed80216f 100644
--- a/src/btree/bt_misc.c
+++ b/src/btree/bt_misc.c
@@ -6,6 +6,7 @@
*/
#include "wt_internal.h"
+#include "cell.i"
/*
* __wt_page_type_string --
@@ -46,23 +47,27 @@ __wt_page_type_string(u_int type)
const char *
__wt_cell_type_string(WT_CELL *cell)
{
- switch (WT_CELL_TYPE(cell)) {
+ switch (__wt_cell_type_raw(cell)) {
case WT_CELL_DATA:
return ("data");
case WT_CELL_DATA_OVFL:
return ("data-overflow");
+ case WT_CELL_DATA_SHORT:
+ return ("data-short");
case WT_CELL_DEL:
return ("deleted");
case WT_CELL_KEY:
return ("key");
case WT_CELL_KEY_OVFL:
return ("key-overflow");
+ case WT_CELL_KEY_SHORT:
+ return ("key-short");
case WT_CELL_OFF:
return ("off-page");
case WT_CELL_OFF_RECORD:
return ("off-page-records");
default:
- break;
+ return ("unknown");
}
- return ("unknown");
+ /* NOTREACHED */
}