Commit cd5e8ec0 authored by Yoni Fogel's avatar Yoni Fogel

Removed a comment and added an error checking case for c_pget

Addresses #123

git-svn-id: file:///svn/tokudb@971 c7de825b-a66e-492c-adef-691d508d4ae1
parent e95808a1
...@@ -612,7 +612,6 @@ static int toku_c_pget(DBC * c, DBT *key, DBT *pkey, DBT *data, u_int32_t flag) ...@@ -612,7 +612,6 @@ static int toku_c_pget(DBC * c, DBT *key, DBT *pkey, DBT *data, u_int32_t flag)
int r; int r;
DB *db = c->i->db; DB *db = c->i->db;
DB *pdb = db->i->primary; DB *pdb = db->i->primary;
//Not ready for this yet.
if (!pdb) return EINVAL; //c_pget does not work on a primary. if (!pdb) return EINVAL; //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.
...@@ -629,6 +628,7 @@ static int toku_c_pget(DBC * c, DBT *key, DBT *pkey, DBT *data, u_int32_t flag) ...@@ -629,6 +628,7 @@ static int toku_c_pget(DBC * c, DBT *key, DBT *pkey, DBT *data, u_int32_t flag)
if (r != 0) return r; if (r != 0) return r;
r = pdb->get(pdb, c->i->txn, pkey, data, 0); r = pdb->get(pdb, c->i->txn, pkey, data, 0);
if (r == DB_NOTFOUND) goto delete_silently_and_retry; if (r == DB_NOTFOUND) goto delete_silently_and_retry;
if (r != 0) return r;
r = verify_secondary_key(db, pkey, data, key); r = verify_secondary_key(db, pkey, data, key);
if (r != 0) goto delete_silently_and_retry; if (r != 0) goto delete_silently_and_retry;
return r; return r;
......
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