mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 23:04:20 +01:00
[t:2542] Fix some bugs in the PUT loader.
Put, once it has returned one error, will continue to return errors (-1) git-svn-id: file:///svn/toku/tokudb@19682 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
a652e5ed72
commit
eadaf07bd8
1 changed files with 8 additions and 3 deletions
11
src/loader.c
11
src/loader.c
|
@ -258,7 +258,7 @@ int toku_loader_put(DB_LOADER *loader, DBT *key, DBT *val)
|
|||
|
||||
// skip put if error already found
|
||||
if ( loader->i->err_errno != 0 ) {
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ( loader->i->loader_flags & LOADER_USE_PUTS ) {
|
||||
|
@ -292,7 +292,7 @@ int toku_loader_put(DB_LOADER *loader, DBT *key, DBT *val)
|
|||
|
||||
// deliberately return content free value
|
||||
// - must call error_callback to get error info
|
||||
return -1;
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -304,7 +304,12 @@ int toku_loader_close(DB_LOADER *loader)
|
|||
if ( loader->i->error_callback != NULL ) {
|
||||
loader->i->error_callback(loader->i->dbs[loader->i->err_i], loader->i->err_i, loader->i->err_errno, &loader->i->err_key, &loader->i->err_val, loader->i->error_extra);
|
||||
}
|
||||
r = toku_brt_loader_abort(loader->i->brt_loader, TRUE);
|
||||
if ( !(loader->i->loader_flags & LOADER_USE_PUTS ) ) {
|
||||
r = toku_brt_loader_abort(loader->i->brt_loader, TRUE);
|
||||
}
|
||||
else {
|
||||
r = loader->i->err_errno;
|
||||
}
|
||||
}
|
||||
else { // no error outstanding
|
||||
if ( !(loader->i->loader_flags & LOADER_USE_PUTS ) ) {
|
||||
|
|
Loading…
Add table
Reference in a new issue