Changeset: d704f2501441 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/d704f2501441
Modified Files:
sql/backends/monet5/sql_statistics.c
Branch: analyze-fix
Log Message:
Use lock instead of iterator
diffs (16 lines):
diff --git a/sql/backends/monet5/sql_statistics.c
b/sql/backends/monet5/sql_statistics.c
--- a/sql/backends/monet5/sql_statistics.c
+++ b/sql/backends/monet5/sql_statistics.c
@@ -131,10 +131,10 @@ sql_analyze(Client cntxt, MalBlkPtr mb,
/* Collect new sorted and revsorted
properties */
/* At the moment the heap must be
locked around the BATordered calls to prevent a race condition on it */
- BATiter bi = bat_iterator(b);
+ MT_lock_set(&b->theaplock);
(void) BATordered(b);
(void) BATordered_rev(b);
- bat_iterator_end(&bi);
+ MT_lock_unset(&b->theaplock);
/* Check for nils existence */
(void) BATcount_no_nil(b, NULL);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list