Changeset: cc37da08782e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cc37da08782e
Modified Files:
sql/backends/monet5/sql_statistics.c
Branch: default
Log Message:
Handle statistics on empty columns
Fixing a segfault in analyze call.
diffs (26 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
@@ -111,17 +111,15 @@ sql_analyze(Client cntxt, MalBlkPtr mb,
bsample = NULL;
br = BATsubselect(bn, bsample,
ATOMnilptr(bn->ttype), ATOMnilptr(bn->ttype), 0, 0, 0);
nils = BATcount(br);
- BBPunfix(br->batCacheid);
- if (bn->tkey)
+ if (br->tkey)
uniq = sz;
else {
- br =
BATkunique(BATmirror(bsample));
- uniq = BATcount(br);
-
BBPunfix(br->batCacheid);
+ br =
BATkunique(BATmirror(br));
+ uniq = br?
BATcount(br):0;
}
- if (samplesize > 0) {
+ BBPunfix(br->batCacheid);
+ if( bsample)
BBPunfix(bsample->batCacheid);
- }
sorted = BATtordered(bn);
// Gather the min/max value for
builtin types
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list