// If errcall is set, call it with the format string and optionally the stderrstring (if include_stderrstring). The prefix is passed as a separate argument.
// If errcall is set, call it with the format string and optionally the stderrstring (if include_stderrstring). The prefix is passed as a separate argument.
// If errfile is set, print to the errfile: prefix, fmt string, maybe include the stderr string.
// If errfile is set, print to the errfile: prefix, fmt string, maybe include the stderr string.
...
@@ -96,14 +143,6 @@ void toku_do_error_all_cases(const DB_ENV * env, int error, int include_stderrst
...
@@ -96,14 +143,6 @@ void toku_do_error_all_cases(const DB_ENV * env, int error, int include_stderrst
if(!pdb)returnEINVAL;//c_pget does not work on a primary.
if(!pdb)returnEINVAL;//c_pget does not work on a primary.
// If data and primary_key are both zeroed, the temporary storage used to fill in data is different in the two cases because they come from different trees.
// If data and primary_key are both zeroed, the temporary storage used to fill in data is different in the two cases because they come from different trees.
assert(db->i->brt!=pdb->i->brt);// Make sure they realy are different trees.
assert(db->i->brt!=pdb->i->brt);// Make sure they realy are different trees.
...
@@ -1135,7 +1183,7 @@ delete_silently_and_retry:
...
@@ -1135,7 +1183,7 @@ delete_silently_and_retry:
r=toku_c_get_noassociate(c,key,pkey,flag);
r=toku_c_get_noassociate(c,key,pkey,flag);
if(r!=0)gotodied3;
if(r!=0)gotodied3;
r=pdb->get(pdb,c->i->txn,pkey,data,0);
r=toku_db_get(pdb,c->i->txn,pkey,data,0);
if(r==DB_NOTFOUND)gotodelete_silently_and_retry;
if(r==DB_NOTFOUND)gotodelete_silently_and_retry;
if(r!=0)gotodied3;
if(r!=0)gotodied3;
r=verify_secondary_key(db,pkey,data,key);
r=verify_secondary_key(db,pkey,data,key);
...
@@ -1189,6 +1237,48 @@ static int toku_c_close(DBC * c) {
...
@@ -1189,6 +1237,48 @@ static int toku_c_close(DBC * c) {
return"Database Bad Format (probably a corrupted database)";
return"Database Bad Format (probably a corrupted database)";
}
}
staticcharunknown_result[100];// Race condition if two threads call this at the same time. However even in a bad case, it should be some sort of nul-terminated string.
staticcharunknown_result[100];// Race condition if two threads call this at the same time. However even in a bad case, it should be some sort of null-terminated string.