1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-30 05:23:50 +03:00

Catch a test that happened to work

git-svn-id: file:///svn/tokudb@75 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
Bradley C. Kuszmaul
2007-07-31 21:59:33 +00:00
parent 75395214ce
commit 14f557112f
2 changed files with 8 additions and 2 deletions

View File

@@ -78,6 +78,7 @@ static void test_pma_find (void) {
pma->N = N;
for (i=0; i<N; i++) pma->pairs[i].key=0;
assert(pma_index_limit(pma)==N);
pma->compare_fun = default_compare_fun;
r=pmainternal_find(pma, fill_dbt(&k, "hello", 5), 0);
assert(r==0);
@@ -111,16 +112,18 @@ static void test_pma_find (void) {
void test_smooth_region_N (int N) {
struct pair pairs[N];
char *strings[100];
char string[100];
char string[N];
int i;
int len;
if (N<10) len=1;
else if (N<100) len=2;
else len=8;
for (i=0; i<N; i++) {
snprintf(string, 10, "%0*d", len, i);
strings[i] = strdup(string);
}
assert(N<30);
for (i=0; i<(1<<N)-1; i++) {
int insertat;
@@ -158,6 +161,9 @@ void test_smooth_region_N (int N) {
}
}
}
for (i=0; i<N; i++) {
free(strings[i]);
}
}

View File

@@ -504,9 +504,9 @@ int pma_free (PMA *pmap) {
}
}
toku_free(pma->pairs);
toku_free(pma);
if (pma->skey) toku_free(pma->skey);
if (pma->sval) toku_free(pma->sval);
toku_free(pma);
*pmap=0;
return 0;
}