Commit 72c3a0f3 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

Work on getting test_log8 to recover. Addresse #544.

git-svn-id: file:///svn/tokudb@2873 c7de825b-a66e-492c-adef-691d508d4ae1
parent 1f842cf3
...@@ -37,6 +37,12 @@ int toku_logger_find_next_unused_log_file(const char *directory, long long *resu ...@@ -37,6 +37,12 @@ int toku_logger_find_next_unused_log_file(const char *directory, long long *resu
return r; return r;
} }
int logfilenamecompare (const void *ap, const void *bp) {
char *a=*(char**)ap;
char *b=*(char**)bp;
return strcmp(a,b);
}
int toku_logger_find_logfiles (const char *directory, int *n_resultsp, char ***resultp) { int toku_logger_find_logfiles (const char *directory, int *n_resultsp, char ***resultp) {
int result_limit=1; int result_limit=1;
int n_results=0; int n_results=0;
...@@ -59,6 +65,8 @@ int toku_logger_find_logfiles (const char *directory, int *n_resultsp, char ***r ...@@ -59,6 +65,8 @@ int toku_logger_find_logfiles (const char *directory, int *n_resultsp, char ***r
snprintf(fname, fnamelen, "%s/%s", directory, de->d_name); snprintf(fname, fnamelen, "%s/%s", directory, de->d_name);
result[n_results++] = fname; result[n_results++] = fname;
} }
// Return them in increasing order.
qsort(result, n_results, sizeof(result[0]), logfilenamecompare);
*n_resultsp = n_results; *n_resultsp = n_results;
*resultp = result; *resultp = result;
return closedir(d); return closedir(d);
......
...@@ -23,7 +23,7 @@ struct in_db { ...@@ -23,7 +23,7 @@ struct in_db {
struct in_db *next; struct in_db *next;
} *items=0; } *items=0;
int maxcount = 10000; int maxcount = 10;
static void insert_some (int outeri) { static void insert_some (int outeri) {
u_int32_t create_flag = outeri%2 ? DB_CREATE : 0; // Sometimes use DB_CREATE, sometimes don't. u_int32_t create_flag = outeri%2 ? DB_CREATE : 0; // Sometimes use DB_CREATE, sometimes don't.
......
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