It appears that column "nils" of sys.statistics always contains 0 after running ANALYSE on all columns of all tables of schemas: sys, tmp and profiler.
I expected that columns "nils" would contain the number of nils/NULLs found in the specific column.
Reproducible: Always
Steps to Reproduce:
Run SQL commands:
ANALYSE sys;
ANALYSE tmp;
ANALYSE profiler;
SELECT * FROM sys.statistics WHERE nils <> 0.
SELECT * FROM sys.statistics WHERE minval = 'nil' OR maxval = 'nil';
SELECT * FROM sys.statistics WHERE (minval = 'nil' OR maxval = 'nil') AND nils <> 0;
Actual Results:
nils always contain 0 for all columns analyzed, although there are many columns which have 'nil' as minimum or maximum value.
Expected Results:
For columns that have NULLs/nils value, the number of occurences in that column.
Fix memory leak reported on
http://monetdb.cwi.nl/testweb/web/showtestoutput.php?serial=66173:f34a57f73307&target=GNU-Fedora-x86_64-sanitize&module=sql&test=sql%2Ftest%2FBugTracker-2017%2Fstatistics_nils_not_eq_zero.Bug-6331&which=err
The leak is introduced recently via [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=78237ac1720c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=78237ac1720c)
I also found and removed two unneccesary GDKfree() calls to pointers which are already NULL.
The text was updated successfully, but these errors were encountered:
Date: 2017-06-01 19:02:33 +0200
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <>
Version: 11.25.23 (Dec2016-SP5)
Last updated: 2018-03-29 16:44:25 +0200
Comment 25370
Date: 2017-06-01 19:02:33 +0200
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0
Build Identifier:
It appears that column "nils" of sys.statistics always contains 0 after running ANALYSE on all columns of all tables of schemas: sys, tmp and profiler.
I expected that columns "nils" would contain the number of nils/NULLs found in the specific column.
Reproducible: Always
Steps to Reproduce:
ANALYSE sys;
ANALYSE tmp;
ANALYSE profiler;
SELECT * FROM sys.statistics WHERE nils <> 0.
SELECT * FROM sys.statistics WHERE minval = 'nil' OR maxval = 'nil';
SELECT * FROM sys.statistics WHERE (minval = 'nil' OR maxval = 'nil') AND nils <> 0;
Actual Results:
nils always contain 0 for all columns analyzed, although there are many columns which have 'nil' as minimum or maximum value.
Expected Results:
For columns that have NULLs/nils value, the number of occurences in that column.
Comment 25383
Date: 2017-06-20 11:28:37 +0200
From: MonetDB Mercurial Repository <>
Changeset b4f5f29a002f made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.
For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b4f5f29a002f
Changeset description:
Comment 25390
Date: 2017-06-22 14:14:15 +0200
From: MonetDB Mercurial Repository <>
Changeset 567718e3de97 made by Martin van Dinther martin.van.dinther@monetdbsolutions.com in the MonetDB repo, refers to this bug.
For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=567718e3de97
Changeset description:
Comment 26330
Date: 2018-03-29 16:44:25 +0200
From: MonetDB Mercurial Repository <>
Changeset 8920ec11dedc made by Martin van Dinther martin.van.dinther@monetdbsolutions.com in the MonetDB repo, refers to this bug.
For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=8920ec11dedc
Changeset description:
The text was updated successfully, but these errors were encountered: