mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 12:01:42 +01:00
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
This commit is contained in:
parent
907ca3199f
commit
b19081a24a
2 changed files with 15 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue