Changeset: 9ec30c0590cf for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/9ec30c0590cf
Modified Files:
        sql/backends/monet5/vaults/parquet/parquet.c
Branch: pp_hashjoin
Log Message:

solved an off-by-one error: ATOMIC_INC returns the new value


diffs (18 lines):

diff --git a/sql/backends/monet5/vaults/parquet/parquet.c 
b/sql/backends/monet5/vaults/parquet/parquet.c
--- a/sql/backends/monet5/vaults/parquet/parquet.c
+++ b/sql/backends/monet5/vaults/parquet/parquet.c
@@ -801,12 +801,12 @@ PARQUETread_multi(BAT **R, BAT *b, int c
                pipeline_lock(p);
                if (!r->c[wnr]) {
                        size_t x = ATOMIC_INC(&r->cnt);
-                       if (x >= r->glob.gl_pathc) {
+                       if (x > r->glob.gl_pathc) {
                                r->done[wnr] = 1;
                                pipeline_unlock(p);
                                return 0;
                        }
-                       char *f = r->glob.gl_pathv[x];
+                       char *f = r->glob.gl_pathv[x-1];
                        pqc_file *pq = NULL;
                        lng nrows = r->nrows;
 
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to