mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
some commands are expected to fail (like a delete of a non-existent key)
propagate the error code back the call stack git-svn-id: file:///svn/tokudb@383 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
3def1beae1
commit
99432c5d00
2 changed files with 9 additions and 4 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
# GCOV_FLAGS = -fprofile-arcs -ftest-coverage
|
||||
# PROF_FLAGS = -pg
|
||||
OPTFLAGS = -O2
|
||||
# OPTFLAGS = -O2
|
||||
|
||||
ifeq ($(CYGWIN),cygwin)
|
||||
else
|
||||
|
|
11
newbrt/brt.c
11
newbrt/brt.c
|
@ -869,7 +869,12 @@ static int brt_nonleaf_put_cmd_child (BRT t, BRTNODE node, BRT_CMD *cmd,
|
|||
child_did_split = 0;
|
||||
r = brtnode_put_cmd(t, child, cmd,
|
||||
&child_did_split, &childa, &childb, &childsplitk, debug, txn);
|
||||
assert(r == 0);
|
||||
if (r != 0) {
|
||||
/* putting to the child failed for some reason, so unpin the child and return the error code */
|
||||
int rr = cachetable_unpin_size(t->cf, child->thisnodename, child->dirty, brtnode_size(child));
|
||||
assert(rr == 0);
|
||||
return r;
|
||||
}
|
||||
if (child_did_split) {
|
||||
if (0) printf("brt_nonleaf_insert child_split %p\n", child);
|
||||
assert(cmd->type == BRT_INSERT || cmd->type == BRT_DELETE);
|
||||
|
@ -881,8 +886,8 @@ static int brt_nonleaf_put_cmd_child (BRT t, BRTNODE node, BRT_CMD *cmd,
|
|||
k->app_private, db, txn);
|
||||
assert(r == 0);
|
||||
} else {
|
||||
r = cachetable_unpin_size(t->cf, child->thisnodename, child->dirty, brtnode_size(child));
|
||||
assert(r == 0);
|
||||
int rr = cachetable_unpin_size(t->cf, child->thisnodename, child->dirty, brtnode_size(child));
|
||||
assert(rr == 0);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue