Commit 23f72d66 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul Committed by Yoni Fogel

Merge and retstart 2571. Refs #2571. [t:2571]

{{{
svn merge -r 20030:20036 https://svn.tokutek.com/tokudb/toku/tokudb.2571
}}}
.


git-svn-id: file:///svn/toku/tokudb@20066 c7de825b-a66e-492c-adef-691d508d4ae1
parent ab7dec99
......@@ -560,7 +560,8 @@ static int finish_primary_rows_internal (BRTLOADER bl)
// now we have been asked to finish up.
// Be sure to destroy the rowsets.
{
int ra[bl->N];
int *MALLOC_N(bl->N, ra);
if (ra==NULL) return errno;
cilk_for (int i = 0; i < bl->N; i++) {
struct rowset *rows = &(bl->rows[i]);
......@@ -571,11 +572,13 @@ static int finish_primary_rows_internal (BRTLOADER bl)
}
// Implicit cilk_sync after that cilk_for loop.
// accept any of the error codes (in this case, the last one).
int r = 0;
for (int i = 0; i < bl->N; i++)
if (ra[i] != 0)
r = ra[i];
toku_free(ra);
return r;
}
CILK_END
......
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