Commit f7ed08cb authored by Yoni Fogel's avatar Yoni Fogel

closes #5300 Fix bug where indexer would ignore return value from loader

git-svn-id: file:///svn/toku/tokudb@46164 c7de825b-a66e-492c-adef-691d508d4ae1
parent a2c7736c
......@@ -157,7 +157,7 @@ toku_indexer_create_indexer(DB_ENV *env,
uint32_t db_flags[/*N*/] UU(),
uint32_t indexer_flags)
{
int rval = 0;
int rval;
DB_INDEXER *indexer = 0; // set later when created
*indexerp = NULL;
......@@ -202,12 +202,12 @@ toku_indexer_create_indexer(DB_ENV *env,
//
for (int i = 0; i < N; i++) {
DB_LOADER* loader = NULL;
int r = env->create_loader(env, txn, &loader, dest_dbs[i], 1, &dest_dbs[i], NULL, NULL, DB_PRELOCKED_WRITE | LOADER_USE_PUTS);
if (r) {
rval = env->create_loader(env, txn, &loader, dest_dbs[i], 1, &dest_dbs[i], NULL, NULL, DB_PRELOCKED_WRITE | LOADER_USE_PUTS);
if (rval) {
goto create_exit;
}
r = loader->close(loader);
if (r) {
rval = loader->close(loader);
if (rval) {
goto create_exit;
}
}
......
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