bfs: fixed wrong key comparison in validator.
* bplustree_header::DataType() is not compatible with the type constants compareKeys() expects. Use _CompareKeys() instead.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2001-2012, Axel Dörfler, [email protected].
|
* Copyright 2001-2014, Axel Dörfler, [email protected].
|
||||||
* This file may be used under the terms of the MIT License.
|
* This file may be used under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Roughly based on 'btlib' written by Marcus J. Ranum - it shares
|
* Roughly based on 'btlib' written by Marcus J. Ranum - it shares
|
||||||
@@ -2362,8 +2362,8 @@ BPlusTree::_ValidateChildren(TreeCheck& check, uint32 level, off_t offset,
|
|||||||
uint16 keyLength;
|
uint16 keyLength;
|
||||||
uint8* key = parent->KeyAt(i, &keyLength);
|
uint8* key = parent->KeyAt(i, &keyLength);
|
||||||
if (largestKey != NULL) {
|
if (largestKey != NULL) {
|
||||||
int result = compareKeys(fHeader.DataType(), key, keyLength,
|
int result = _CompareKeys(key, keyLength, largestKey,
|
||||||
largestKey, largestKeyLength);
|
largestKeyLength);
|
||||||
if (result >= 0) {
|
if (result >= 0) {
|
||||||
dprintf("inode %" B_PRIdOFF ": node %" B_PRIdOFF " key %"
|
dprintf("inode %" B_PRIdOFF ": node %" B_PRIdOFF " key %"
|
||||||
B_PRIu32 " larger than it should!\n",
|
B_PRIu32 " larger than it should!\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user