Commit fa5f276d authored by Yoni Fogel's avatar Yoni Fogel

Addresses #523

Fixes a bug with escalation caught by valgrind.


git-svn-id: file:///svn/tokudb@2904 c7de825b-a66e-492c-adef-691d508d4ae1
parent 33715e64
...@@ -1177,7 +1177,7 @@ static inline int toku__escalate_reads_from_border_range(toku_lock_tree* tree, ...@@ -1177,7 +1177,7 @@ static inline int toku__escalate_reads_from_border_range(toku_lock_tree* tree,
u_int32_t i; u_int32_t i;
u_int32_t removed = 0; u_int32_t removed = 0;
for (i = 0; i < numfound; i++) { for (i = 0; i < numfound; i++) {
if (!toku__dominated(&tree->buf[0], border_range)) { continue; } if (!toku__dominated(&tree->buf[i], border_range)) { continue; }
r = toku_rt_delete(self_read, &tree->buf[i]); r = toku_rt_delete(self_read, &tree->buf[i]);
if (r != 0) { r = toku__lt_panic(tree, r); goto cleanup; } if (r != 0) { r = toku__lt_panic(tree, r); goto cleanup; }
#if !defined(TOKU_RT_NOOVERLAPS) #if !defined(TOKU_RT_NOOVERLAPS)
......
...@@ -41,12 +41,6 @@ int intcmp(DB *db __attribute__((__unused__)), const DBT* a, const DBT* b) { ...@@ -41,12 +41,6 @@ int intcmp(DB *db __attribute__((__unused__)), const DBT* a, const DBT* b) {
return x - y; return x - y;
} }
int charcmp(DB *db __attribute__((__unused__)), const DBT* a, const DBT* b) {
int x = *(char*)a->data;
int y = *(char*)b->data;
return x - y;
}
int dbcmp (DB *db __attribute__((__unused__)), const DBT *a, const DBT*b) { int dbcmp (DB *db __attribute__((__unused__)), const DBT *a, const DBT*b) {
return toku_keycompare(a->data, a->size, b->data, b->size); return toku_keycompare(a->data, a->size, b->data, b->size);
......
...@@ -47,7 +47,8 @@ void init_query(BOOL dups) { ...@@ -47,7 +47,8 @@ void init_query(BOOL dups) {
void setup_tree(BOOL dups) { void setup_tree(BOOL dups) {
num_locks = 0; num_locks = 0;
r = toku_lt_create(&lt, db, dups, dbpanic, &max_locks, &num_locks, intcmp, charcmp, assert(lt == NULL);
r = toku_lt_create(&lt, db, dups, dbpanic, &max_locks, &num_locks, intcmp, intcmp,
toku_malloc, toku_free, toku_realloc); toku_malloc, toku_free, toku_realloc);
CKERR(r); CKERR(r);
assert(lt); assert(lt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment