Commit 063a10e0 authored by Vincenzo Liberatore's avatar Vincenzo Liberatore

Addresses #293

Addresses #307
Write lock tests. Bug fix on borderwrite check. 

git-svn-id: file:///svn/tokudb@2078 c7de825b-a66e-492c-adef-691d508d4ae1
parent d3640b34
......@@ -824,12 +824,10 @@ static int __toku_lt_borderwrite_insert(toku_lock_tree* tree,
int r;
toku_range_tree* borderwrite = tree->borderwrite; assert(borderwrite);
const u_int32_t query_size = 1;
toku_range buffer[query_size];
u_int32_t buflen = query_size;
toku_range* buf = &buffer[0];
u_int32_t numfound;
r = toku_rt_find(borderwrite, query, query_size, &buf, &buflen, &numfound);
r = toku_rt_find(borderwrite, query, query_size, &tree->buf, &tree->buflen,
&numfound);
if (r!=0) return __toku_lt_panic(tree);
assert(numfound <= query_size);
......
......@@ -9,6 +9,8 @@
#include <errno.h>
int verbose=0;
BOOL want_panic = FALSE;
int toku_keycompare (bytevec key1, ITEMLEN key1len, bytevec key2, ITEMLEN key2len) {
int comparelen = key1len<key2len ? key1len : key2len;
const unsigned char *k1;
......@@ -41,6 +43,7 @@ BOOL panicked = FALSE;
int dbpanic(DB* db) {
if (verbose) printf("AHH!!!! Run away %p!!!\n", db);
panicked = TRUE;
assert(want_panic);
return EINVAL;
}
......
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