Commit 19c20152 authored by Yoni Fogel's avatar Yoni Fogel

Addresses #293

Added missing error checking code.
Rangewrite lock returns ENOSYS until/if ever it gets implemented.

git-svn-id: file:///svn/tokudb@1879 c7de825b-a66e-492c-adef-691d508d4ae1
parent 871626a9
......@@ -933,7 +933,19 @@ int toku_lt_acquire_range_write_lock(toku_lock_tree* tree, DB_TXN* txn,
__toku_lt_is_infinite(key_left)) return EINVAL;
if (tree->duplicates && key_right != data_right &&
__toku_lt_is_infinite(key_right)) return EINVAL;
assert(FALSE);
toku_point left;
toku_point right;
__toku_init_point(&left, tree, key_left, data_left);
__toku_init_point(&right, tree, key_right, data_right);
/* Verify left <= right. */
if ((key_left != key_right || data_left != data_right) &&
__toku_lt_point_cmp(&left, &right) > 0) return EDOM;
return ENOSYS;
//We are not ready for this.
//Not needed for Feb 1 release.
}
......
......@@ -251,6 +251,8 @@ int toku_lt_acquire_write_lock(toku_lock_tree* tree, DB_TXN* txn,
* If (key_left, data_left) > (key_right, data_right) or
* In a nodup db: if (key_left) > (key_right)
* (According to the db's comparison functions.
* ENOSYS: THis is not yet implemented. Till it is, it will return ENOSYS,
* if other errors do not occur first.
* Asserts:
* The EINVAL and ERANGE cases described will use assert to abort instead of returning errors.
* If this library is ever exported to users, we will use error datas instead.
......
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