issue_owner_repo listlengths 2 2 | issue_body stringlengths 0 261k ⌀ | issue_title stringlengths 1 925 | issue_comments_url stringlengths 56 81 | issue_comments_count int64 0 2.5k | issue_created_at stringlengths 20 20 | issue_updated_at stringlengths 20 20 | issue_html_url stringlengths 37 62 | issue_github_id int64 387k 2.46B | issue_number int64 1 127k |
|---|---|---|---|---|---|---|---|---|---|
[
"MonetDB",
"MonetDB"
] | Date: 2017-02-10 15:55:57 +0100
From: @kutsurak
To: GDK devs <<bugs-common>>
Version: 11.25.5 (Dec2016-SP1)
Last updated: 2017-03-03 10:24:15 +0100
## Comment 24999
Date: 2017-02-10 15:55:57 +0100
From: @kutsurak
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0
Build Identifier:
The server crashes the first time it tries to start with a database created with a version older than Jun2015
Reproducible: Always
### Steps to Reproduce:
1.Start the mserver with a database create with version Jun2015 or older
2.
3.
### Actual Results:
server crashes
### Expected Results:
the database is upgraded
## Comment 25000
Date: 2017-02-10 15:58:50 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [3d7a72d27b63](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3d7a72d27b63) 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=3d7a72d27b63](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3d7a72d27b63)
Changeset description:
Fix for bug #6210.
The BAT was not properly loaded when doing the upgrade.
## Comment 25111
Date: 2017-03-03 10:24:15 +0100
From: @sjoerdmullender
Dec2016-SP2 has been released, incorporating the fix.
| Upgrading a database from Jun2015 or older crashes the server | https://api.github.com/repos/MonetDB/MonetDB/issues/6210/comments | 0 | 2020-11-30T15:31:59Z | 2024-06-27T12:58:20Z | https://github.com/MonetDB/MonetDB/issues/6210 | 753,576,579 | 6,210 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-02-10 05:12:03 +0100
From: @yzchang
To: SQL devs <<bugs-sql>>
Version: 11.23.13 (Jun2016-SP2)
CC: @yzchang
Last updated: 2017-03-03 10:24:11 +0100
## Comment 24997
Date: 2017-02-10 05:12:03 +0100
From: @yzchang
Aggregations over complex OR expressions, such as the following, produce wrong results:
CREATE TABLE test (id INT, a INT, b INT);
INSERT INTO test VALUES (0, 1, 2);
SELECT COUNT(*) FROM test WHERE (b = 1 OR b = 2) AND (a NOT IN (3, 4) OR b <> 1) AND a = 1;
The same problem exists for other aggregations, such as SUM.
## Comment 24998
Date: 2017-02-10 05:14:50 +0100
From: @yzchang
The problem already exists in Jun2016-SP2, but is only recently discovered, and hence the fix went into the Dec2016 branch:
[http//devmonetdborg/hg/MonetDB?cmd=changeset;node=eaf1c8c65072](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=eaf1c8c65072)
Test was added in:
sql/test/BugTracker-2017/Tests/complicated_logic.Bug-105.sql
## Comment 25108
Date: 2017-03-03 10:24:11 +0100
From: @sjoerdmullender
Dec2016-SP2 has been released, incorporating the fix.
| Aggregation over complex OR expressions produce wrong results | https://api.github.com/repos/MonetDB/MonetDB/issues/6209/comments | 0 | 2020-11-30T15:31:55Z | 2024-06-27T12:58:19Z | https://github.com/MonetDB/MonetDB/issues/6209 | 753,576,531 | 6,209 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-02-09 16:32:33 +0100
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <<bugs-sql>>
Version: 11.25.5 (Dec2016-SP1)
Last updated: 2017-02-09 16:32:42 +0100
## Comment 24996
Date: 2017-02-09 16:32:33 +0100
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0
Build Identifier:
Multiple users request possibility to execute some SQL statements/script (such as setting query/session timeout, setting time zone, changing schema, etc.) directly after making a connection by a user. This should be done each time a user connects to the MonetDB server and independent of the used client program.
So be part of the user definition as stored in the server.
See https://www.monetdb.org/pipermail/users-list/2017-February/009688.html
https://www.monetdb.org/bugzilla/show_bug.cgi?id=3322
https://www.monetdb.org/bugzilla/show_bug.cgi?id=3426
Proposed SQL could be: ALTER USER <username> SET logon_cmd = '<the SQL commands>';
For this the system table db_user_info needs to be extended wit an extra column: logon_cmd string;
Initially when the user is created it will be NULL.
It can be set (only by sys admin) via: ALTER USER <username> SET logon_cmd = '<SQL commands>';
It can be unset/cleared via ALTER USER <username> SET logon_cmd = NULL;
It should also allow to specify a set of SQL commands (separated by ;) such as:
ALTER USER "test_user" SET logon_cmd = 'call sys.settimeout(20); call sys.setsession(100); set time zone local;';
Optionally it should also allow to call a user defined stored procedure, such that more complex scripts could be defined in one stored procedure. This allows definition and testing of the script/procedure to be independent of the logon cmd and ease the setting of the same logon_cmd for multiple users.
Reproducible: Always
| Add support to specify execution of some SQL commands at login time for a specific user | https://api.github.com/repos/MonetDB/MonetDB/issues/6208/comments | 0 | 2020-11-30T15:31:53Z | 2024-06-28T13:39:35Z | https://github.com/MonetDB/MonetDB/issues/6208 | 753,576,494 | 6,208 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-02-09 10:59:42 +0100
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.25.5 (Dec2016-SP1)
CC: @njnes
Last updated: 2017-10-26 14:01:33 +0200
## Comment 24993
Date: 2017-02-09 10:59:42 +0100
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Build Identifier:
Starting from this, which works fine :
sql>select name,name from sys.functions group by name limit 2;
+-------------+-------------+
| name | name |
+=============+=============+
| mbr_overlap | mbr_overlap |
| mbr_above | mbr_above |
+-------------+-------------+
2 tuples (2.994ms)
The following, though pointless, should be allowed (group twice on the same column):
sql>select name, name from sys.functions group by name,name limit 2;
SELECT: identifier 'name' ambiguous
By using table qualifiers, it works again:
sql>select f.name, f.name from sys.functions AS f group by name,name limit 2;
+-------------+-------------+
| name | name |
+=============+=============+
| mbr_overlap | mbr_overlap |
| mbr_above | mbr_above |
+-------------+-------------+
2 tuples (4.035ms)
Not a serious issue, but table qualifiers should not be needed. The second attempt has no ambiguous identifiers, as far as I can see.
Reproducible: Always
$ mserver5 --version
MonetDB 5 server v11.25.6 (64-bit, 128-bit integers)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2017 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 15.6GiB available memory, 8 available cpu cores
Libraries:
libpcre: 8.40 2017-01-11 (compiled with 8.40)
openssl: OpenSSL 1.0.2j 26 Sep 2016 (compiled with OpenSSL 1.0.2j-fips 26 Sep 2016)
libxml2: 2.9.3 (compiled with 2.9.3)
Compiled by: roberto@photon.hq.spinque.com (x86_64-unknown-linux-gnu)
Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code
Linking : /usr/bin/ld -m elf_x86_64
## Comment 25738
Date: 2017-10-16 08:55:38 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [02c08819c11f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=02c08819c11f) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=02c08819c11f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=02c08819c11f)
Changeset description:
fixed bug #6207, remove duplicate expressions in group by list.
| identifier ambiguous when grouping and selecting the same column twice | https://api.github.com/repos/MonetDB/MonetDB/issues/6207/comments | 0 | 2020-11-30T15:31:50Z | 2024-06-27T12:58:17Z | https://github.com/MonetDB/MonetDB/issues/6207 | 753,576,441 | 6,207 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-02-08 01:43:02 +0100
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: 11.25.5 (Dec2016-SP1)
CC: @njnes
Last updated: 2017-03-03 10:24:31 +0100
## Comment 24984
Date: 2017-02-08 01:43:02 +0100
From: @drstmane
sql>select cast(1 as decimal(7,3));
+-----------+
| L2 |
+===========+
| 1.000 |
+-----------+
1 tuple (1.115ms)
sql>select cast('1' as decimal(7,3));
+-----------+
| L2 |
+===========+
| 1.000 |
+-----------+
1 tuple (1.064ms)
sql>select cast(10 as decimal(7,3));
+-----------+
| L2 |
+===========+
| 10.000 |
+-----------+
1 tuple (1.100ms)
sql>select cast('10' as decimal(7,3));
+-----------+
| L2 |
+===========+
| 10.000 |
+-----------+
1 tuple (1.036ms)
sql>select cast(100 as decimal(7,3));
+-----------+
| L2 |
+===========+
| 100.000 |
+-----------+
1 tuple (0.997ms)
sql>select cast('100' as decimal(7,3));
+-----------+
| L2 |
+===========+
| 10.000 |
+-----------+
1 tuple (0.953ms)
sql>select cast(110 as decimal(7,3));
+-----------+
| L2 |
+===========+
| 110.000 |
+-----------+
1 tuple (1.073ms)
sql>select cast('110' as decimal(7,3));
+-----------+
| L2 |
+===========+
| 110.000 |
+-----------+
1 tuple (1.056ms)
sql>select cast(1000 as decimal(7,3));
+-----------+
| L2 |
+===========+
| 1000.000 |
+-----------+
1 tuple (0.970ms)
sql>select cast('1000' as decimal(7,3));
+-----------+
| L2 |
+===========+
| 10.000 |
+-----------+
1 tuple (1.063ms)
sql>select cast(1100 as decimal(7,3));
+-----------+
| L2 |
+===========+
| 1100.000 |
+-----------+
1 tuple (1.115ms)
sql>select cast('1100' as decimal(7,3));
+-----------+
| L2 |
+===========+
| 110.000 |
+-----------+
1 tuple (1.409ms)
sql>select cast(1110 as decimal(7,3));
+-----------+
| L2 |
+===========+
| 1110.000 |
+-----------+
1 tuple (1.038ms)
sql>select cast('1110' as decimal(7,3));
+-----------+
| L2 |
+===========+
| 1110.000 |
+-----------+
1 tuple (1.084ms)
## Comment 24987
Date: 2017-02-08 13:01:15 +0100
From: @njnes
the problem is caused by the evaluate optimizer
## Comment 24988
Date: 2017-02-08 13:09:21 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [1a49ca7de68d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1a49ca7de68d) 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=1a49ca7de68d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1a49ca7de68d)
Changeset description:
Only remove trailing zeros if there is a decimal point.
This fixes bug #6206.
## Comment 24989
Date: 2017-02-08 13:10:17 +0100
From: @sjoerdmullender
Sorry, Niels, it was still a bug in the SQL part.
## Comment 24990
Date: 2017-02-08 14:00:07 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [827563bf5dcc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=827563bf5dcc) 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=827563bf5dcc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=827563bf5dcc)
Changeset description:
Added test for bug #6206.
## Comment 25119
Date: 2017-03-03 10:24:31 +0100
From: @sjoerdmullender
Dec2016-SP2 has been released, incorporating the fix.
| casting strings with more than one trailing zero ('0') to decimal goes wrong | https://api.github.com/repos/MonetDB/MonetDB/issues/6206/comments | 0 | 2020-11-30T15:31:47Z | 2024-06-27T12:58:16Z | https://github.com/MonetDB/MonetDB/issues/6206 | 753,576,393 | 6,206 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-02-06 16:10:09 +0100
From: @kutsurak
To: SQL devs <<bugs-sql>>
Version: 11.25.5 (Dec2016-SP1)
CC: @mlkersten, @njnes, @drstmane
Last updated: 2017-03-03 10:24:23 +0100
## Comment 24976
Date: 2017-02-06 16:10:09 +0100
From: @kutsurak
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0
Build Identifier:
Addition with integer literals produces overflows:
Reproducible: Always
### Steps to Reproduce:
1.SELECT 20000+30000;
2.
3.
### Actual Results:
+--------+
| L2 |
+========+
| -15536 |
+--------+
### Expected Results:
+-------+
| L3 |
+=======+
| 50000 |
+-------+
## Comment 24977
Date: 2017-02-06 20:58:04 +0100
From: @mlkersten
Indeed, the SQL compiler does not up-cast the type of the arithmetic expression.
It can not be compensated for in the MAL optimizer, which does not properly check for the overflow either.
The short term solution is to disable the constant evaluate() optimizer.
## Comment 24978
Date: 2017-02-06 21:31:06 +0100
From: @drstmane
sql>declare a smallint;
operation successful (0.939ms)
sql>declare b smallint;
operation successful (1.144ms)
sql>set a = 20000;
operation successful (0.966ms)
sql>set b = 30000;
operation successful (0.974ms)
sql>select a + b;
+-------+
| L2 |
+=======+
| 50000 |
+-------+
1 tuple (1.006ms)
## Comment 24979
Date: 2017-02-06 21:32:15 +0100
From: @drstmane
sql>select cast(20000 as smallint) + cast(30000 as smallint);
+-------+
| L4 |
+=======+
| 50000 |
+-------+
1 tuple (2.386ms)
## Comment 24986
Date: 2017-02-08 12:42:14 +0100
From: @njnes
fixed call conversion operator (ie with proper (large enough) types.
## Comment 24994
Date: 2017-02-09 12:15:39 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [7c14a3a849fb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7c14a3a849fb) made by Jennie Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7c14a3a849fb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7c14a3a849fb)
Changeset description:
Added test for Bug #6205
## Comment 25115
Date: 2017-03-03 10:24:23 +0100
From: @sjoerdmullender
Dec2016-SP2 has been released, incorporating the fix.
| Integer addition overflow | https://api.github.com/repos/MonetDB/MonetDB/issues/6205/comments | 0 | 2020-11-30T15:31:43Z | 2024-06-27T12:58:15Z | https://github.com/MonetDB/MonetDB/issues/6205 | 753,576,350 | 6,205 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-02-05 17:45:19 +0100
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2017-02-12 14:05:46 +0100
## Comment 24975
Date: 2017-02-05 17:45:19 +0100
From: @skinkie
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2868.3 Safari/537.36
Build Identifier:
Below is a session I am trying to extract some data from an 11GB table. As you can observe the first create table sat_analyse takes only 17.6s to create. Doing that operation again twice results in a significant degradation of performance. System is running from memory, and on a SSD RAID-10 setup.
sql>select extract(year from ts), extract(month from ts), extract(day from ts) from m152 limit 10;
+------+------+------+
| L2 | L4 | L6 |
+======+======+======+
| 2016 | 5 | 14 |
| 2016 | 5 | 14 |
| 2016 | 5 | 14 |
| 2016 | 5 | 14 |
| 2016 | 5 | 14 |
| 2016 | 5 | 14 |
| 2016 | 5 | 14 |
| 2016 | 5 | 14 |
| 2016 | 5 | 14 |
| 2016 | 5 | 14 |
+------+------+------+
10 tuples (3.5s)
sql>create table sat_analyse as select vehiclenumber, extract(year from ts), extract(month from ts), extract(day from ts), sat from m152 with data;
operation successful (17.6s)
sql>\d sat_analyse
CREATE TABLE "sys"."sat_analyse" (
"vehiclenumber" INTEGER,
"L3" INTEGER,
"L5" INTEGER,
"L7" INTEGER,
"sat" INTEGER
);
sql>create table sat_analyse as select vehiclenumber, extract(year from ts) as y, extract(month from ts) as m, extract(day from ts) as d, sat from m152 with data;
CREATE TABLE: name 'sat_analyse' already in use
sql>drop table sat_analyse ;
operation successful (8.763ms)
sql>create table sat_analyse as select vehiclenumber, extract(year from ts) as y, extract(month from ts) as m, extract(day from ts) as d, sat from m152 with data;
operation successful (2m 17s)
sql>create table sat_analyse2 as select vehiclenumber, extract(year from ts), extract(month from ts), extract(day from ts), sat from m152 with data;
operation successful (2m 33s)
Reproducible: Always
MonetDB 5 server v11.26.0 (64-bit, 128-bit integers)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2017 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 62.8GiB available memory, 8 available cpu cores
Libraries:
libpcre: 8.38 2015-11-23 (compiled with 8.38)
openssl: OpenSSL 1.0.2h 3 May 2016 (compiled with OpenSSL 1.0.2h 3 May 2016)
libxml2: 2.9.4 (compiled with 2.9.4)
Compiled by: skinkie@chamechaude (x86_64-pc-linux-gnu)
Compilation: gcc -O3 -pipe -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code
Linking : /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64
## Comment 25011
Date: 2017-02-12 14:05:46 +0100
From: @njnes
unable to repeat the performance problems
| Big performance gap between equal operations | https://api.github.com/repos/MonetDB/MonetDB/issues/6204/comments | 0 | 2020-11-30T15:31:39Z | 2024-06-27T12:58:14Z | https://github.com/MonetDB/MonetDB/issues/6204 | 753,576,296 | 6,204 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-02-05 17:29:18 +0100
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2017-03-03 10:24:21 +0100
## Comment 24974
Date: 2017-02-05 17:29:18 +0100
From: @skinkie
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2868.3 Safari/537.36
Build Identifier:
I have just upgraded to the default branch of the MonetDB repository and with a clean installation/dbfarm. I am importing tables to restore the functionality. The last table I want to copy into is a file of 11GB. Originally defined by:
create table m152 (ts timestamp, vehiclenumber integer, lon numeric(9,7), lat numeric(8, 6), sat integer);
When trying to import I end up with the error message below. Since there is no mention of what "Leftover data" is, and is ambiguous if there is a table called leftover data that leaves the end user clueless how to proceed.
copy into m152 from '/mnt/volatile/raw/radiolog-new/M152.csv' delimiters '\t', '\n';
Failed to import table Leftover data 'False'
I figured out that the table definition changed, and should be:
create table m152 (ts timestamp, vehiclenumber integer, lon numeric(9,7), lat numeric(8, 6), sat integer, open boolean);
I would suggest to change the error message to:
Failed to import table m152. More columns were found than defined in the table definition. The extra data found is 'False'.
Reproducible: Always
MonetDB 5 server v11.26.0 (64-bit, 128-bit integers)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2017 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 62.8GiB available memory, 8 available cpu cores
Libraries:
libpcre: 8.38 2015-11-23 (compiled with 8.38)
openssl: OpenSSL 1.0.2h 3 May 2016 (compiled with OpenSSL 1.0.2h 3 May 2016)
libxml2: 2.9.4 (compiled with 2.9.4)
Compiled by: skinkie@chamechaude (x86_64-pc-linux-gnu)
Compilation: gcc -O3 -pipe -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code
Linking : /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64
p.s. <3 importing 11GB :)
209630281 affected rows (1m 41s)
## Comment 25017
Date: 2017-02-13 08:29:13 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [891a9c0505d5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=891a9c0505d5) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=891a9c0505d5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=891a9c0505d5)
Changeset description:
fix bug #6203, ie improve error message on failed copy into command.
approved errors
## Comment 25018
Date: 2017-02-13 08:29:30 +0100
From: @njnes
improved the error message
## Comment 25114
Date: 2017-03-03 10:24:21 +0100
From: @sjoerdmullender
Dec2016-SP2 has been released, incorporating the fix.
| copy into: Failed to import table Leftover data 'False' | https://api.github.com/repos/MonetDB/MonetDB/issues/6203/comments | 0 | 2020-11-30T15:31:37Z | 2024-06-27T12:58:13Z | https://github.com/MonetDB/MonetDB/issues/6203 | 753,576,266 | 6,203 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-02-02 16:04:56 +0100
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <<bugs-sql>>
Version: 11.25.3 (Dec2016)
Last updated: 2017-03-03 10:24:45 +0100
## Comment 24951
Date: 2017-02-02 16:04:56 +0100
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0
Build Identifier:
mserver5 crashes with a segmentation fault. (reproduced it on Linux and on windows).
Restarting the mserver5 again after the crash causes the server to crash automatically again after some 5 seconds (without making any connections).
Only way to resolve that problem is to make a connection and issue a command to remove the ordered index within that 5 seconds time window the server is up!
Reproducible: Always
### Steps to Reproduce:
1. start mserver5 (MonetDB 5 server v11.25.6)
2. start mclient
3. run SQL:
create table test_oidx (c1 int, c2 string);
insert into test_oidx (c1, c2) values (1, 'ccc'), (2, 'bbb'), (3, 'eee'), (4, 'aaa'), (5, 'ddd');
select * from test_oidx order by c2, c1;
create ordered index test_oidx1 on test_oidx (c2);
select * from test_oidx order by c2, c1;
drop index test_oidx1;
drop table test_oidx;
### Actual Results:
bash-4.3$ mclient -p41000
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.25.6 (unreleased), 'demo'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>create table test_oidx (c1 int, c2 string);
operation successful (23.836ms)
sql>insert into test_oidx (c1, c2) values (1, 'ccc'), (2, 'bbb'), (3, 'eee'), (4, 'aaa'), (5, 'ddd');
5 affected rows (13.812ms)
sql>select * from test_oidx order by c2, c1;
+------+------+
| c1 | c2 |
+======+======+
| 4 | aaa |
| 2 | bbb |
| 1 | ccc |
| 5 | ddd |
| 3 | eee |
+------+------+
5 tuples (1.762ms)
sql>create ordered index test_oidx1 on test_oidx (c2);
operation successful (28.573ms)
sql>select * from test_oidx order by c2, c1;
bash-4.3$
### Expected Results:
No crash of the mserver5 process
Potentially more datatypes besides string, such as char, varchar, clob, blob, url, inet, uuid, etc. are not yet supported by the ordered index code.
This requires additional tests for each of the MonetDB data types.
## Comment 24953
Date: 2017-02-02 16:59:55 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [62e0e4bcac1e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=62e0e4bcac1e) 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=62e0e4bcac1e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=62e0e4bcac1e)
Changeset description:
Check for errors. That's better than crashing.
Fixes bug #6202.
## Comment 25125
Date: 2017-03-03 10:24:45 +0100
From: @sjoerdmullender
Dec2016-SP2 has been released, incorporating the fix.
| querying a table with an ordered index on string/varchar column crashes server and makes server unrestartable! | https://api.github.com/repos/MonetDB/MonetDB/issues/6202/comments | 0 | 2020-11-30T15:31:33Z | 2024-06-27T12:58:12Z | https://github.com/MonetDB/MonetDB/issues/6202 | 753,576,217 | 6,202 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-02-02 15:32:48 +0100
From: @eyalroz
To: SQL devs <<bugs-sql>>
Version: 11.25.5 (Dec2016-SP1)
CC: @kutsurak, martin.van.dinther, @njnes
Last updated: 2017-03-03 10:24:32 +0100
## Comment 24948
Date: 2017-02-02 15:32:48 +0100
From: @eyalroz
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0
Build Identifier:
Starting mclient with any database, and executing:
create table t1 (c1 integer);
insert into t1 values (1);
select sum(c2) from (select count(*) / (select count(*) from t1) as c2 from t1) as t;
should yield a single value, of 1. Instead - you get nothing, just a prompt for the next statement. No error message, no result, nothing in merovingian.log .
Seeing this also with 11.23.7 .
Reproducible: Always
## Comment 24950
Date: 2017-02-02 15:42:28 +0100
From: @kutsurak
This actually crashes the server:
mserver5: /home/kutsurak/work/monet/sources/MonetDB/monetdb5/optimizer/opt_garbageCollector.c:102: OPTgarbageCollectorImplementation: Assertion `p->token == ENDsymbol' failed.
## Comment 24952
Date: 2017-02-02 16:21:23 +0100
From: Martin van Dinther <<martin.van.dinther>>
I am also getting an assertion failure but a different one:
>could not find L7.L6
L3.L3
mserver5: ../../../../dev/sql/backends/monet5/rel_bin.c:2404: rel2bin_project: Assertion `0' failed.
This is when using the latest Dec2016 source code (pulled at 2 febr 12:30).
## Comment 24957
Date: 2017-02-02 22:54:32 +0100
From: @njnes
fixed (removed incorrect rewrite in the semantic phase)
## Comment 24958
Date: 2017-02-02 23:05:35 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [d4b01e89ac7a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d4b01e89ac7a) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d4b01e89ac7a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d4b01e89ac7a)
Changeset description:
fixed bug #6201, ie handle group by in selection properly
## Comment 25120
Date: 2017-03-03 10:24:32 +0100
From: @sjoerdmullender
Dec2016-SP2 has been released, incorporating the fix.
| MonetDB completely giving up on certain queries - no error and no result | https://api.github.com/repos/MonetDB/MonetDB/issues/6201/comments | 0 | 2020-11-30T15:31:29Z | 2024-06-27T12:58:11Z | https://github.com/MonetDB/MonetDB/issues/6201 | 753,576,157 | 6,201 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-02-02 15:25:32 +0100
From: @eyalroz
To: SQL devs <<bugs-sql>>
Version: 11.25.5 (Dec2016-SP1)
CC: @kutsurak
Last updated: 2017-02-02 15:53:58 +0100
## Comment 24947
Date: 2017-02-02 15:25:32 +0100
From: @eyalroz
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0
Build Identifier:
Here:
https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/LoadingBulkData
it says that:
"Note that the SQL variant
INSERT INTO table VALUES (1, 2, 3), (3, 4, 5), (6, 7, 8);
is also supported by MonetDB."
however, if I run mclient with any database, and execute:
create table t1 (c1 integer, c2 integer);
insert into table t1 (c1, c2) values (1,2), (10,20);
I get the error:
syntax error, unexpected IDENT, expecting SCOLON in: "insert into table t1"
and this doesn't work either:
insert into table t1 (c1, c2) values (1,2), (10,20);
(same error.)
Reproducible: Always
## Comment 24949
Date: 2017-02-02 15:33:20 +0100
From: @kutsurak
This is actually a syntax error. Try
insert into t1 (c1, c2) values (1,2), (10,20);
(without the "table"). Postgres behaves in exactly the same way.
| INSERT INTO TABLE of multiple records - not really supported? | https://api.github.com/repos/MonetDB/MonetDB/issues/6200/comments | 0 | 2020-11-30T15:31:27Z | 2024-06-28T13:11:43Z | https://github.com/MonetDB/MonetDB/issues/6200 | 753,576,128 | 6,200 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-02-02 15:20:46 +0100
From: @eyalroz
To: clients devs <<bugs-clients>>
Version: 11.25.5 (Dec2016-SP1)
Last updated: 2017-02-02 15:26:04 +0100
## Comment 24946
Date: 2017-02-02 15:20:46 +0100
From: @eyalroz
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0
Build Identifier:
It seems that, at the moment, queries are echoed after the execution concludes rather than when execution starts.
I tried this was a TPCH scale factor 1 database and a query which takes a bit of time between two shorter ones:
select 1;
select sum(sin(l1.l_tax) * cos(l2.l_tax) * l1.l_discount) from lineitem as l1, lineitem as l2 where l1.l_orderkey = l2.l_orderkey and l1.l_returnflag <> 'R' group by l1.l_linestatus;
select 2;
I see the select 1 result, then waited, then I see the results of the other two queries - implying that the middle one is echoed after execution.
Reproducible: Always
| Query echoing should occur before each query is executed | https://api.github.com/repos/MonetDB/MonetDB/issues/6199/comments | 0 | 2020-11-30T15:31:24Z | 2024-06-28T13:11:43Z | https://github.com/MonetDB/MonetDB/issues/6199 | 753,576,089 | 6,199 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-02-02 10:39:15 +0100
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
To: SQL devs <<bugs-sql>>
Version: 11.25.5 (Dec2016-SP1)
CC: @njnes
Last updated: 2017-03-03 10:24:12 +0100
## Comment 24944
Date: 2017-02-02 10:39:15 +0100
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36
Build Identifier:
It seems that COALESCE get compiled to non optimal MAL code:
X_17:bat[:bit] := batcalc.isnil(X_16);
X_20:bat[:bit] := batcalc.not(X_17);
X_22:bat[:bit] := batcalc.isnil(X_20);
X_27:bat[:bit] := batcalc.ifthenelse(X_22,false,X_20);
X_31:bat[:int] := batcalc.ifthenelse(X_27,X_16,0:int);
X_17 cannot contains nil (right?), thus X_20 neither. From that X_22 is superfluous, and likewise for X_27.
I think it should be only:
X_17:bat[:bit] := batcalc.isnil(X_16);
X_20:bat[:bit] := batcalc.not(X_17);
X_31:bat[:int] := batcalc.ifthenelse(X_20,X_16,0:int);
This could even be further simplified into:
X_17:bat[:bit] := batcalc.isnil(X_16);
X_31:bat[:int] := batcalc.ifthenelse(X_17,0:int,X_16);
or:
X_17:bat[:bit] := batcalc.isnotnil(X_16);
X_31:bat[:int] := batcalc.ifthenelse(X_17,X_16,0:int);
Reproducible: Always
## Comment 24945
Date: 2017-02-02 10:44:07 +0100
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
I forgot to say that it is for such an expression:
SELECT COALESCE(value, 0) FROM ..
where X_16 represents the `value' column (of int type) and X_31 is the resulting column.
Tested with the default_pipe.
## Comment 24985
Date: 2017-02-08 12:40:53 +0100
From: @njnes
fixed in Dec2016 version. Indeed for COALESCE we did to many ifthen/isnil combo's. The additional optimization (isnotnil or ifelsethen should be handled (later) at the mal layer))
## Comment 25109
Date: 2017-03-03 10:24:12 +0100
From: @sjoerdmullender
Dec2016-SP2 has been released, incorporating the fix.
| COALESCE could be more optimized | https://api.github.com/repos/MonetDB/MonetDB/issues/6198/comments | 0 | 2020-11-30T15:31:21Z | 2024-06-27T12:58:08Z | https://github.com/MonetDB/MonetDB/issues/6198 | 753,576,042 | 6,198 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-02-01 13:26:24 +0100
From: Antonio <<antonioknight>>
To: buildtools devs <<bugs-buildtools>>
Version: unspecified
CC: @hannesmuehleisen
Last updated: 2017-02-01 14:33:28 +0100
## Comment 24934
Date: 2017-02-01 13:26:24 +0100
From: Antonio <<antonioknight>>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36
Build Identifier:
If you try to use the package https://www.monetdb.org/downloads/MacOSX/Dec2016/
on a MacOsX previous than 10.12 the app fails on startup with a message like this in the log:
!SyntaxException:parseError:!LoaderException:loadLibrary:Loading error failed to open library rapi (from within file '/usr/local/monetdb/lib/monetdb5/lib_rapi.so'): dlopen(/usr/local/monetdb/lib/monetdb5/lib_rapi.so, 10): Symbol not found: _clock_gettime! Referenced from: /usr/local/monetdb/lib/monetdb/external/libR.dylib (which was built for Mac OS X 10.12)! Expected in: /usr/lib/libSystem.B.dylib! in /usr/local/monetdb/lib/monetdb/external/libR.dylib!SyntaxException:parseError:!<identifier> expected>
My MacOsX version is 10.11.6
Reproducible: Always
### Steps to Reproduce:
Just launch monetdb Dec2016 server on MacOsX version less than 10.12
Is this a known limitation of the bundled packages that are provided on the website?
Are you aware of this issue?
## Comment 24939
Date: 2017-02-01 14:33:28 +0100
From: @hannesmuehleisen
The binary packages for OSX are produced on a fairly recent OSX. If you do not have that, issues like the one you describe are possible. You can for example install MonetDB from source (this requires some libraries and the XCode command line utilities for your OSX version) or (ha) upgrade your OS. You can also try the homebrew route of installation.
| Latest Dec2016 version requires MacOsX version >= 10.12 (Sierra), it fails on startup | https://api.github.com/repos/MonetDB/MonetDB/issues/6197/comments | 0 | 2020-11-30T15:31:18Z | 2024-06-28T13:11:42Z | https://github.com/MonetDB/MonetDB/issues/6197 | 753,575,994 | 6,197 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-01-27 13:59:53 +0100
From: @rkoopmanschap
To: SQL devs <<bugs-sql>>
Version: 11.23.13 (Jun2016-SP2)
CC: @kutsurak, @mlkersten, @njnes
Last updated: 2017-03-03 10:24:41 +0100
## Comment 24929
Date: 2017-01-27 13:59:53 +0100
From: @rkoopmanschap
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36
Build Identifier:
The command below crashes MonetDB. The function returns a table and so this is not the correct way to call it. However, it would be better if it did not cause a crash and instead returned an error.
Reproducible: Always
### Steps to Reproduce:
Give the following command in mclient:
SELECT generate_series(1,4);
### Actual Results:
Database crashes
### Expected Results:
An error message
## Comment 24930
Date: 2017-01-27 22:34:43 +0100
From: @mlkersten
The generator function is called in the FROM clause.
select * from generate_series(1,4);
However, this short cut makes sense as well
sql>explain select generate_series(1,4);
+-------------------------------------------------------------------------------------------------+
| mal |
+=================================================================================================+
| function user.s6_1():void; |
| X_3:void := querylog.define("explain select generate_series(1,4);", "default_pipe", 8:int); |
| X_9:bat[:bte] := generator.series(1:bte, 4:bte); |
| sql.resultSet(".L2", "L2", "tinyint", 8:int, 0:int, 7:int, X_9); |
| end user.s6_1;
However, now a crash occurs in mvc_scalar_value_wrap which assumes a scalar and not a BAT. The MAL signature allows for any type.
## Comment 24931
Date: 2017-01-27 22:46:41 +0100
From: @sjoerdmullender
Also see bug #3609 which was basically the same problem, except with the three argument version of generate_series. The difference is that the two argument version goes through rel_binop and the three argument version through rel_nop. The latter was fixed, the former wasn't.
## Comment 24932
Date: 2017-01-27 22:51:20 +0100
From: @kutsurak
The problem is related to binary operators returning tables. Specifically
sql>SELECT 1 + 3;
+------+
| L2 |
+======+
| 4 |
+------+
1 tuple (0.693ms)
works correctly. On the other hand:
sql>SELECT generate_series(1, 4, 2);
SELECT: no such operator 'generate_series'
Furthermore:
sql>CREATE FUNCTION ser(i integer, j integer) RETURNS TABLE(foo integer) LANGUAGE PYTHON {
more>result = dict()
more>result['foo'] = list(range(i, j))
more>return result
more>};
operation successful (8.281ms)
sql>select ser(1, 4);
*server crashes*
I think that the correct behavior is the parse error as in the three argument case (maybe with a more informative error message).
## Comment 24935
Date: 2017-02-01 13:41:34 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [4ecdec1a1ebf](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4ecdec1a1ebf) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4ecdec1a1ebf](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4ecdec1a1ebf)
Changeset description:
fixed bug #6196. Make sure we correctly check the cardinality of table functions.
## Comment 24936
Date: 2017-02-01 13:46:09 +0100
From: @njnes
solved by properly checking when table functions are allowed
## Comment 25124
Date: 2017-03-03 10:24:41 +0100
From: @sjoerdmullender
Dec2016-SP2 has been released, incorporating the fix.
| Database crashes after generate_series query | https://api.github.com/repos/MonetDB/MonetDB/issues/6196/comments | 0 | 2020-11-30T15:31:15Z | 2024-06-27T12:58:06Z | https://github.com/MonetDB/MonetDB/issues/6196 | 753,575,950 | 6,196 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-01-27 12:57:46 +0100
From: Gatis Ozolins <<g.ozolins>>
To: SQL devs <<bugs-sql>>
Version: 11.25.5 (Dec2016-SP1)
Last updated: 2017-03-03 10:24:39 +0100
## Comment 24926
Date: 2017-01-27 12:57:46 +0100
From: Gatis Ozolins <<g.ozolins>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:50.0) Gecko/20100101 Firefox/50.0
Build Identifier:
Only happens if larger decimal type has more than 18 digits after point.
Reproducible: Always
### Steps to Reproduce:
select CAST(CAST(1 AS DECIMAL(20,19)) AS DECIMAL(12,8))
### Actual Results:
-0.84467441
### Expected Results:
1.00000000
## Comment 24927
Date: 2017-01-27 13:12:32 +0100
From: @sjoerdmullender
This was already fixed in the current Dec2016 branch (after the Dec2016-SP1 release). My guess is, the fix was in changeset [542cea1b704c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=542cea1b704c) Also see bug #6192 and changeset [412cc3428d91](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=412cc3428d91)
## Comment 24928
Date: 2017-01-27 13:18:52 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [1bff10f50a19](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1bff10f50a19) 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=1bff10f50a19](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1bff10f50a19)
Changeset description:
Added test for bug #6195.
## Comment 25123
Date: 2017-03-03 10:24:39 +0100
From: @sjoerdmullender
Dec2016-SP2 has been released, incorporating the fix.
| Cast from huge decimal type to smaller returns wrong results | https://api.github.com/repos/MonetDB/MonetDB/issues/6195/comments | 0 | 2020-11-30T15:31:12Z | 2024-06-27T12:58:05Z | https://github.com/MonetDB/MonetDB/issues/6195 | 753,575,893 | 6,195 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-01-27 12:23:25 +0100
From: Gatis Ozolins <<g.ozolins>>
To: SQL devs <<bugs-sql>>
Version: 11.25.5 (Dec2016-SP1)
CC: @njnes
Last updated: 2017-03-03 10:24:27 +0100
## Comment 24924
Date: 2017-01-27 12:23:25 +0100
From: Gatis Ozolins <<g.ozolins>>
## Comment 24925
Date: 2017-01-27 12:24:15 +0100
From: Gatis Ozolins <<g.ozolins>>
select splitpart('100-ača' , '-', 2)
Actual output:
ač
Expected output:
ača
## Comment 24933
Date: 2017-02-01 11:34:08 +0100
From: @njnes
Fixed by returning the full string (not just start + len (as in utf8 characters))
## Comment 24937
Date: 2017-02-01 13:47:07 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [a0c273f4b16f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a0c273f4b16f) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a0c273f4b16f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a0c273f4b16f)
Changeset description:
fixed bug #6194, ie properly count number of bytes (not number of utf8 characters)
## Comment 25117
Date: 2017-03-03 10:24:27 +0100
From: @sjoerdmullender
Dec2016-SP2 has been released, incorporating the fix.
| splitpart returns truncated last part if it contains non ascii caracters | https://api.github.com/repos/MonetDB/MonetDB/issues/6194/comments | 0 | 2020-11-30T15:31:08Z | 2024-06-27T12:58:04Z | https://github.com/MonetDB/MonetDB/issues/6194 | 753,575,840 | 6,194 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-01-27 11:23:33 +0100
From: @sjoerdmullender
To: SQL devs <<bugs-sql>>
Version: 11.25.5 (Dec2016-SP1)
Last updated: 2017-03-03 10:24:57 +0100
## Comment 24921
Date: 2017-01-27 11:23:33 +0100
From: @sjoerdmullender
Even though we're allowed to truncate or round at our discretion, it would be good if we were consistent.
There are also some bugs where rounding is implemented incorrectly.
See allso (closed) bugs 3744, 3310.
## Comment 24922
Date: 2017-01-27 11:39:20 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [412cc3428d91](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=412cc3428d91) 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=412cc3428d91](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=412cc3428d91)
Changeset description:
Be consistent about rounding or truncating values.
There is now a symbol TRUNCATE_NUMBERS that, if defined, which it
currently is not, will cause the code to always truncate towards zero
when values need to be converted from higher precision (number of
decimals after the decimal point) to lower precision, including from
floating point to integer. Without the symbol, we always round.
This checkin also fixes some rounding bugs (don't add 0.5 to a
negative number and then truncate toward zero).
This fixes bug #6193.
Also added test.
## Comment 24923
Date: 2017-01-27 11:41:04 +0100
From: @sjoerdmullender
This bug was fixed.
Since changeset [412cc3428d91](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=412cc3428d91) (which will be in the Dec2016-SP2 release), we round consistently, but there is a compile-time option to always truncate.
## Comment 25132
Date: 2017-03-03 10:24:57 +0100
From: @sjoerdmullender
Dec2016-SP2 has been released, incorporating the fix.
| converting to a smaller precision (fewer or no decimals after decimal point) should round/truncate consistently | https://api.github.com/repos/MonetDB/MonetDB/issues/6193/comments | 0 | 2020-11-30T15:31:05Z | 2024-06-27T12:58:03Z | https://github.com/MonetDB/MonetDB/issues/6193 | 753,575,784 | 6,193 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-01-24 10:13:57 +0100
From: @rkoopmanschap
To: SQL devs <<bugs-sql>>
Version: 11.23.13 (Jun2016-SP2)
Last updated: 2017-03-03 10:24:35 +0100
## Comment 24907
Date: 2017-01-24 10:13:57 +0100
From: @rkoopmanschap
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36
Build Identifier:
After inserting a number that is too large for a numeric table any number that is added to the column is different than the number stored.
Reproducible: Always
### Steps to Reproduce:
Run the following in an mclient:
CREATE TABLE test_table4 (d NUMERIC(12,2));
INSERT INTO test_table4 VALUES (531421754532.553234531231250);
INSERT INTO test_table4 VALUES (531421754532);
INSERT INTO test_table4 VALUES (531421754);
INSERT INTO test_table4 VALUES (53142175);
INSERT INTO test_table4 VALUES (53142);
SELECT * FROM test_table4;
### Actual Results:
+----------------+
| d |
+================+
| 710.43 |
| 709.88 |
| 7950.72 |
| -2894.68 |
| -2198.23 |
+----------------+
### Expected Results:
+----------------+
| d |
+================+
| 531421754.00 |
| 53142175.00 |
| 53142.00 |
+----------------+
## Comment 24908
Date: 2017-01-24 14:27:51 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [542cea1b704c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=542cea1b704c) 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=542cea1b704c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=542cea1b704c)
Changeset description:
Use the correct type for the to-be-casted value.
This fixes bug #6192.
## Comment 24909
Date: 2017-01-24 14:59:35 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [48aa64261885](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=48aa64261885) 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=48aa64261885](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=48aa64261885)
Changeset description:
Test for bug #6192.
## Comment 25121
Date: 2017-03-03 10:24:35 +0100
From: @sjoerdmullender
Dec2016-SP2 has been released, incorporating the fix.
| Numeric column stores wrong values after adding large numbers | https://api.github.com/repos/MonetDB/MonetDB/issues/6192/comments | 0 | 2020-11-30T15:31:02Z | 2024-06-27T12:58:02Z | https://github.com/MonetDB/MonetDB/issues/6192 | 753,575,730 | 6,192 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-01-23 14:52:23 +0100
From: @yzchang
To: GDK devs <<bugs-common>>
Version: 11.25.3 (Dec2016)
Last updated: 2017-03-03 10:24:29 +0100
## Comment 24902
Date: 2017-01-23 14:52:23 +0100
From: @yzchang
With the following queries:
create table bug1 (hit uuid, has_contributed boolean, parent_hit uuid);
insert into bug1 (hit, has_contributed, parent_hit) values ('16caf284-7fa2-4402-8e8a-5e89c644d23a', true, '16caf284-7fa2-4402-8e8a-5e89c644d23a');
insert into bug1 (hit, has_contributed, parent_hit) select * from bug1;
If one repeats the last INSERT INTO query several times to insert more tuples into "bug1", at some moment (after ~8K tuples have been inserted), mserver5 will report:
!ERROR: MT_msync: msync failed
!OS: Cannot allocate memory
*after* the transaction has succeeded.
The error seems to have been caused by that a point, which is not memory-mapped, was past to MY_msync.
The msync() call returns ENOMEM.
## Comment 24903
Date: 2017-01-23 15:26:38 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [6e108baf7828](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6e108baf7828) 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=6e108baf7828](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6e108baf7828)
Changeset description:
Don't call msync with a length argument that is too long.
In fact, don't do all this complicated stuff to calculate start
address and length, just pass the unaltered heap base as start
address, and the occupied size of the heap as the length.
This should fix bug #6191.
## Comment 24904
Date: 2017-01-23 15:30:18 +0100
From: @sjoerdmullender
This was a fairly benign bug. The msync was sometimes called with a "length" parameter which was too large. This resulted in the system call returning an error (ENOMEM) after it had done the work for the valid area. The fix was to not try to round the values for the arguments but to just pass the actual values for the start and size of heap.
## Comment 25118
Date: 2017-03-03 10:24:29 +0100
From: @sjoerdmullender
Dec2016-SP2 has been released, incorporating the fix.
| MT_msync failed with "Cannot allocate memory" | https://api.github.com/repos/MonetDB/MonetDB/issues/6191/comments | 0 | 2020-11-30T15:30:58Z | 2024-06-27T12:58:01Z | https://github.com/MonetDB/MonetDB/issues/6191 | 753,575,692 | 6,191 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-01-19 15:48:52 +0100
From: @rkoopmanschap
To: SQL devs <<bugs-sql>>
Version: 11.23.13 (Jun2016-SP2)
Last updated: 2017-03-03 10:24:25 +0100
## Comment 24896
Date: 2017-01-19 15:48:52 +0100
From: @rkoopmanschap
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36
Build Identifier:
The query using CASE below sometimes crashes the database. This seems to happen the majority of the times it is done, although sometimes it does produce the correct results. Rarely, some variations of these commands give the following error instead of crashing or printing output:
values of bat not unique, cannot set key property
Reproducible: Sometimes
### Steps to Reproduce:
Run the following commands in a mclient session:
CREATE TABLE test_table (foo varchar(250));
INSERT INTO test_table VALUES ('foo1');
INSERT INTO test_table VALUES ('foo4');
INSERT INTO test_table VALUES ('foo2');
SELECT CASE WHEN foo = 'foo1' THEN 1 WHEN foo = 'foo2' THEN 2 END AS result_name FROM test_table GROUP BY result_name;
You may have to run the SELECT query multiple times.
### Actual Results:
The database crashes.
### Expected Results:
+-------------+
| result_name |
+=============+
| 1 |
| null |
| 2 |
+-------------+
## Comment 24898
Date: 2017-01-19 16:18:45 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [d16296e81d5a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d16296e81d5a) 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=d16296e81d5a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d16296e81d5a)
Changeset description:
Allocate enough memory.
This should fix bug #6190.
## Comment 25116
Date: 2017-03-03 10:24:25 +0100
From: @sjoerdmullender
Dec2016-SP2 has been released, incorporating the fix.
| CASE query crashes database | https://api.github.com/repos/MonetDB/MonetDB/issues/6190/comments | 0 | 2020-11-30T15:30:56Z | 2024-06-27T12:58:00Z | https://github.com/MonetDB/MonetDB/issues/6190 | 753,575,650 | 6,190 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-01-19 14:01:57 +0100
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <<bugs-sql>>
Version: 11.25.3 (Dec2016)
CC: @njnes
Last updated: 2017-03-03 10:24:52 +0100
## Comment 24895
Date: 2017-01-19 14:01:57 +0100
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0
Build Identifier:
Removing a NOT NULL constraint from a column which is part of the Pkey should NOT be allowed.
By definition all Primary Key columns in SQL databases are always NOT NULLable.
Even if columns are specified as NULL but included in a PRIMARY KEY clause, they are automatically created as NOT NULL during CREATE TABLE, see below example of PKeyImplicitNotNull.
The removal of a NOT NULL constraint is done via: ALTER TABLE tbl_nm ALTER col_nm SET NULL;
Reproducible: Always
### Steps to Reproduce:
1. Start mserver5 ()
2. Start mclient
3. Run SQL commands:
CREATE TABLE "PKeyNotNull" (
"PK_COL1" varchar(4) NOT NULL,
"PK_COL2" varchar(4) NOT NULL,
"DataCol" int DEFAULT NULL,
PRIMARY KEY ("PK_COL1","PK_COL2") );
\d "PKeyNotNull"
INSERT INTO "PKeyNotNull" values ('C12', NULL, 1);
-- Error: INSERT INTO: NOT NULL constraint violated for column PKeyNotNull.PK_COL2
ALTER TABLE "PKeyNotNull" ALTER "PK_COL2" SET NULL;
-- this is allowed but should NOT be allowed
INSERT INTO "PKeyNotNull" values ('C12', NULL, 2);
SELECT * FROM "PKeyNotNull";
DROP TABLE "PKeyNotNull";
CREATE TABLE "PKeyImplicitNotNull" (
"PK_COL1" varchar(4) NULL,
"PK_COL2" varchar(4) NULL,
"DataCol" int DEFAULT NULL,
PRIMARY KEY ("PK_COL1","PK_COL2") );
\d "PKeyImplicitNotNull"
INSERT INTO "PKeyImplicitNotNull" values ('C12', NULL, 1);
-- Error: INSERT INTO: NOT NULL constraint violated for column PKeyImplicitNotNull.PK_COL2
ALTER TABLE "PKeyImplicitNotNull" ALTER "PK_COL2" SET NULL;
-- this is allowed but should NOT be allowed
INSERT INTO "PKeyImplicitNotNull" values ('C12', NULL, 2);
SELECT * FROM "PKeyImplicitNotNull";
DROP TABLE "PKeyImplicitNotNull";
### Actual Results:
sql>CREATE TABLE "PKeyNotNull" (
more>"PK_COL1" varchar(4) NOT NULL,
more>"PK_COL2" varchar(4) NOT NULL,
more>"DataCol" int DEFAULT NULL,
more>PRIMARY KEY ("PK_COL1","PK_COL2") );
operation successful (28.923ms)
sql>
sql>\d "PKeyNotNull"
CREATE TABLE "sys"."PKeyNotNull" (
"PK_COL1" VARCHAR(4) NOT NULL,
"PK_COL2" VARCHAR(4) NOT NULL,
"DataCol" INTEGER,
CONSTRAINT "PKeyNotNull_PK_COL1_PK_COL2_pkey" PRIMARY KEY ("PK_COL1", "PK_COL2")
);
sql>
sql>INSERT INTO "PKeyNotNull" values ('C12', NULL, 1);
INSERT INTO: NOT NULL constraint violated for column PKeyNotNull.PK_COL2
sql>-- Error: INSERT INTO: NOT NULL constraint violated for column PKeyNotNull.PK_COL2
sql>
sql>ALTER TABLE "PKeyNotNull" ALTER "PK_COL2" SET NULL;
operation successful (5.891ms)
sql>-- this is allowed but should NOT be allowed
sql>INSERT INTO "PKeyNotNull" values ('C12', NULL, 2);
1 affected row (7.429ms)
sql>
sql>SELECT * FROM "PKeyNotNull";
+---------+---------+---------+
| PK_COL1 | PK_COL2 | DataCol |
+=========+=========+=========+
| C12 | null | 2 |
+---------+---------+---------+
1 tuple (1.759ms)
sql>
sql>DROP TABLE "PKeyNotNull";
operation successful (6.041ms)
sql>
sql>
sql>
sql>CREATE TABLE "PKeyImplicitNotNull" (
more>"PK_COL1" varchar(4) NULL,
more>"PK_COL2" varchar(4) NULL,
more>"DataCol" int DEFAULT NULL,
more>PRIMARY KEY ("PK_COL1","PK_COL2") );
operation successful (15.253ms)
sql>
sql>\d "PKeyImplicitNotNull"
CREATE TABLE "sys"."PKeyImplicitNotNull" (
"PK_COL1" VARCHAR(4) NOT NULL,
"PK_COL2" VARCHAR(4) NOT NULL,
"DataCol" INTEGER,
CONSTRAINT "PKeyImplicitNotNull_PK_COL1_PK_COL2_pkey" PRIMARY KEY ("PK_COL1", "PK_COL2")
);
sql>
sql>INSERT INTO "PKeyImplicitNotNull" values ('C12', NULL, 1);
INSERT INTO: NOT NULL constraint violated for column PKeyImplicitNotNull.PK_COL2
sql>-- Error: INSERT INTO: NOT NULL constraint violated for column PKeyImplicitNotNull.PK_COL2
sql>
sql>ALTER TABLE "PKeyImplicitNotNull" ALTER "PK_COL2" SET NULL;
operation successful (10.473ms)
sql>-- this is allowed but should NOT be allowed
sql>INSERT INTO "PKeyImplicitNotNull" values ('C12', NULL, 2);
1 affected row (7.306ms)
sql>
sql>SELECT * FROM "PKeyImplicitNotNull";
+---------+---------+---------+
| PK_COL1 | PK_COL2 | DataCol |
+=========+=========+=========+
| C12 | null | 2 |
+---------+---------+---------+
1 tuple (1.764ms)
sql>
sql>DROP TABLE "PKeyImplicitNotNull";
operation successful (5.862ms)
sql>
### Expected Results:
sql>CREATE TABLE "PKeyNotNull" (
more>"PK_COL1" varchar(4) NOT NULL,
more>"PK_COL2" varchar(4) NOT NULL,
more>"DataCol" int DEFAULT NULL,
more>PRIMARY KEY ("PK_COL1","PK_COL2") );
operation successful (28.923ms)
sql>
sql>\d "PKeyNotNull"
CREATE TABLE "sys"."PKeyNotNull" (
"PK_COL1" VARCHAR(4) NOT NULL,
"PK_COL2" VARCHAR(4) NOT NULL,
"DataCol" INTEGER,
CONSTRAINT "PKeyNotNull_PK_COL1_PK_COL2_pkey" PRIMARY KEY ("PK_COL1", "PK_COL2")
);
sql>
sql>INSERT INTO "PKeyNotNull" values ('C12', NULL, 1);
INSERT INTO: NOT NULL constraint violated for column PKeyNotNull.PK_COL2
sql>-- Error: INSERT INTO: NOT NULL constraint violated for column PKeyNotNull.PK_COL2
sql>
sql>ALTER TABLE "PKeyNotNull" ALTER "PK_COL2" SET NULL;
ALTER TABLE: Not allowed to make column PKeyNotNull.PK_COL2 NULLable as it is part of the Primary Key.
sql>-- this is allowed but should NOT be allowed
sql>INSERT INTO "PKeyNotNull" values ('C12', NULL, 2);
INSERT INTO: NOT NULL constraint violated for column PKeyNotNull.PK_COL2
sql>
sql>SELECT * FROM "PKeyNotNull";
+---------+---------+---------+
| PK_COL1 | PK_COL2 | DataCol |
+=========+=========+=========+
+---------+---------+---------+
0 tuples (1.759ms)
sql>
sql>DROP TABLE "PKeyNotNull";
operation successful (6.041ms)
sql>
sql>
sql>
sql>CREATE TABLE "PKeyImplicitNotNull" (
more>"PK_COL1" varchar(4) NULL,
more>"PK_COL2" varchar(4) NULL,
more>"DataCol" int DEFAULT NULL,
more>PRIMARY KEY ("PK_COL1","PK_COL2") );
operation successful (15.253ms)
sql>
sql>\d "PKeyImplicitNotNull"
CREATE TABLE "sys"."PKeyImplicitNotNull" (
"PK_COL1" VARCHAR(4) NOT NULL,
"PK_COL2" VARCHAR(4) NOT NULL,
"DataCol" INTEGER,
CONSTRAINT "PKeyImplicitNotNull_PK_COL1_PK_COL2_pkey" PRIMARY KEY ("PK_COL1", "PK_COL2")
);
sql>
sql>INSERT INTO "PKeyImplicitNotNull" values ('C12', NULL, 1);
INSERT INTO: NOT NULL constraint violated for column PKeyImplicitNotNull.PK_COL2
sql>-- Error: INSERT INTO: NOT NULL constraint violated for column PKeyImplicitNotNull.PK_COL2
sql>
sql>ALTER TABLE "PKeyImplicitNotNull" ALTER "PK_COL2" SET NULL;
ALTER TABLE: Not allowed to make column PKeyImplicitNotNull.PK_COL2 NULLable as it is part of the Primary Key.
sql>-- this is allowed but should NOT be allowed
sql>INSERT INTO "PKeyImplicitNotNull" values ('C12', NULL, 2);
INSERT INTO: NOT NULL constraint violated for column PKeyImplicitNotNull.PK_COL2
sql>
sql>SELECT * FROM "PKeyImplicitNotNull";
+---------+---------+---------+
| PK_COL1 | PK_COL2 | DataCol |
+=========+=========+=========+
+---------+---------+---------+
0 tuples (1.764ms)
sql>
sql>DROP TABLE "PKeyImplicitNotNull";
operation successful (5.862ms)
sql>
Primary Key constraints may not include NULLable columns, but Unique constraints may. So if a NULLable column needs to be part of a uniqueness constraint use UNIQUE clause.
## Comment 24938
Date: 2017-02-01 14:01:22 +0100
From: @njnes
added checks
## Comment 25129
Date: 2017-03-03 10:24:52 +0100
From: @sjoerdmullender
Dec2016-SP2 has been released, incorporating the fix.
| Removing a NOT NULL constraint from a PKey column should NOT be allowed | https://api.github.com/repos/MonetDB/MonetDB/issues/6189/comments | 0 | 2020-11-30T15:30:52Z | 2024-06-27T12:57:59Z | https://github.com/MonetDB/MonetDB/issues/6189 | 753,575,593 | 6,189 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-01-19 07:07:46 +0100
From: @mlkersten
To: MonetDB5 devs <<bugs-monetdb5>>
Version: -- development
Last updated: 2019-07-28 21:18:01 +0200
## Comment 24894
Date: 2017-01-19 07:07:46 +0100
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:50.0) Gecko/20100101 Firefox/50.0
Build Identifier:
sys.queue is the prime handle to pause/resume queries. It uses a tag to identify which one. However, concurrent calls of the same prepared SQL can not be distinguished.
Furthermore, it should also be capable to pause/resume recursive plans.
Reproducible: Always
### Steps to Reproduce:
start two longing queries in two sessions and try to pause one.
## Comment 27186
Date: 2019-07-28 21:18:01 +0200
From: @mlkersten
A call to a prepared statement is a synchronous call. This means that the thread responsible has to wait for its completion.
An option is to variable to be read when you issue a query
and add it to the mal plan.
SET qryname='my label';
SELECT ...
This approach won't work due to possible concurrency conflicts.
The alternative is to introduce a SQL statement modifier:
RUN 'my label' SELECT ....
This would conflict with TRACE/EXPLAIN/PLAN
It would only help in identifying the query by id rather then differences in text.
| Multiple calls not distinguishable in sys.queue | https://api.github.com/repos/MonetDB/MonetDB/issues/6188/comments | 0 | 2020-11-30T15:30:49Z | 2024-06-28T13:11:41Z | https://github.com/MonetDB/MonetDB/issues/6188 | 753,575,544 | 6,188 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-01-13 15:26:25 +0100
From: muesli4
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2017-07-17 16:07:40 +0200
## Comment 24891
Date: 2017-01-13 15:26:25 +0100
From: muesli4
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0
Build Identifier:
Nested WITH queries don't work in MonetDB.
Reproducible: Always
## Comment 24892
Date: 2017-01-13 15:26:54 +0100
From: muesli4
Created attachment 531
A test case.
> Attached file: [test_case.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6187_test_case.sql_531) (application/sql, 100 bytes)
> Description: A test case.
## Comment 24954
Date: 2017-02-02 17:31:22 +0100
From: @sjoerdmullender
(In reply to muesli4 from comment 0)
> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101
> Firefox/50.0
> Build Identifier:
>
> Nested WITH queries don't work in MonetDB.
True, but cascading them does.
Your example:
WITH t0(x) as (
WITH t1(y) as (
select 0
)
select * FROM t1
)
SELECT * FROM t0;
My rewrite:
with t1(y) as (
select 0
),
t0(x) as (
select * from t1
)
select * from t0;
## Comment 25010
Date: 2017-02-12 14:04:23 +0100
From: @njnes
Nested WITH queries aren't supported as they aren't part of the sql standard (as far as we know)
## Comment 25024
Date: 2017-02-15 17:11:16 +0100
From: @njnes
I checked the standard and nesting is indeed available (over looked it the first time). Also almost all of the code was there already, mostly some parsing changes were needed. This will be included in the next feature release.
| Nested WITH queries not supported | https://api.github.com/repos/MonetDB/MonetDB/issues/6187/comments | 0 | 2020-11-30T15:30:46Z | 2024-06-27T12:57:56Z | https://github.com/MonetDB/MonetDB/issues/6187 | 753,575,487 | 6,187 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-01-13 13:08:07 +0100
From: Manuel <<manuel>>
To: SQL devs <<bugs-sql>>
Version: 11.23.13 (Jun2016-SP2)
CC: @mlkersten, @njnes
Last updated: 2017-03-03 10:24:54 +0100
## Comment 24887
Date: 2017-01-13 13:08:07 +0100
From: Manuel <<manuel>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Build Identifier:
The following query
select * from "test_join_left_table" as "ta" where not exists (select 1 as "one" from (select "t2"."A", "t2"."B", "t2"."C", "t2"."D", "t2"."l_c" from ((select "t0"."A" as "A", cast("B" as CLOB) as "B", "t0"."C" as "C", "t0"."D" as "D", null as "l_c" from "unitTestDontDelete" as "t0") union all (select "t1"."a" as "A", "t1"."b" as "B", cast(null as double) as "C", cast(null as timestamp) as "D", "t1"."l_c" as "l_c" from "test_join_left_table" as "t1")) as "t2") as "tb" where ("ta"."l_c" = "tb"."l_c" or ("ta"."l_c" is null and "tb"."l_c" is null)))
returns no data back instead of an empty result set as expected.
In the logs I can see:
.....
2017-01-13 11:35:23 ERR visokio[4975]: t2.B
2017-01-13 11:35:23 ERR visokio[4975]: t2.C
2017-01-13 11:35:24 ERR visokio[4975]: could not find L65.D
2017-01-13 11:35:24 ERR visokio[4975]: L55.A
2017-01-13 11:35:24 ERR visokio[4975]: L57.B
....
If I remove the null casting within the exists clause:
select * from "test_join_left_table" as "ta" where not exists (select 1 as "one" from (select "t2"."A", "t2"."B", "t2"."C", "t2"."D", "t2"."l_c" from ((select "t0"."A" as "A", cast("B" as CLOB) as "B", "t0"."C" as "C", "t0"."D" as "D", null as "l_c" from "unitTestDontDelete" as "t0") union all (select "t1"."a" as "A", "t1"."b" as "B", cast(null as double) as "C", null as "D", "t1"."l_c" as "l_c" from "test_join_left_table" as "t1")) as "t2") as "tb" where ("ta"."l_c" = "tb"."l_c" or ("ta"."l_c" is null and "tb"."l_c" is null)))
The query produced the expected results.
Reproducible: Always
### Steps to Reproduce:
1. Create the example tables as in attachments
2. Run the query
select * from "test_join_left_table" as "ta" where not exists (select 1 as "one" from (select "t2"."A", "t2"."B", "t2"."C", "t2"."D", "t2"."l_c" from ((select "t0"."A" as "A", cast("B" as CLOB) as "B", "t0"."C" as "C", "t0"."D" as "D", null as "l_c" from "unitTestDontDelete" as "t0") union all (select "t1"."a" as "A", "t1"."b" as "B", cast(null as double) as "C", cast(null as timestamp) as "D", "t1"."l_c" as "l_c" from "test_join_left_table" as "t1")) as "t2") as "tb" where ("ta"."l_c" = "tb"."l_c" or ("ta"."l_c" is null and "tb"."l_c" is null)))
3. No result set is returned instead of an empty result set
### Actual Results:
nothing
### Expected Results:
an empty result set:
+---+---+-----+
| a | b | l_c |
+===+===+=====+
+---+---+-----+
This will result in an error if the query is executed programmatically e.g., via a jdbc driver
## Comment 24888
Date: 2017-01-13 13:10:11 +0100
From: Manuel <<manuel>>
Created attachment 529
First table used in the example query
> Attached file: [unitTest.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6186_unitTest.sql_529) (application/octet-stream, 581 bytes)
> Description: First table used in the example query
## Comment 24889
Date: 2017-01-13 13:10:55 +0100
From: Manuel <<manuel>>
Created attachment 530
Second table used in the example
> Attached file: [joinleft.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6186_joinleft.sql_530) (application/octet-stream, 261 bytes)
> Description: Second table used in the example
## Comment 24905
Date: 2017-01-23 17:15:47 +0100
From: @sjoerdmullender
Reproducible:
could not find L65.D
L55.A
L57.B
L62.C
L67.l_c
t2.A
t2.B
t2.C
mserver5: .../sql/backends/monet5/rel_bin.c:2404: rel2bin_project: Assertion `0' failed.
Thread 29 "mserver5" received signal SIGABRT, Aborted.
## Comment 24906
Date: 2017-01-23 20:45:27 +0100
From: @mlkersten
Probably related to Bug #6177
## Comment 24942
Date: 2017-02-01 21:23:54 +0100
From: @njnes
cannot repeat the problem on the current versions (ie default and dec2016)
## Comment 24943
Date: 2017-02-01 22:36:07 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [150bd238b590](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=150bd238b590) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=150bd238b590](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=150bd238b590)
Changeset description:
fixed bug #6186, preperly rename apply operators
## Comment 25130
Date: 2017-03-03 10:24:54 +0100
From: @sjoerdmullender
Dec2016-SP2 has been released, incorporating the fix.
| Null casting causes no results (silent server crash?) | https://api.github.com/repos/MonetDB/MonetDB/issues/6186/comments | 0 | 2020-11-30T15:30:42Z | 2024-06-27T12:57:55Z | https://github.com/MonetDB/MonetDB/issues/6186 | 753,575,415 | 6,186 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-01-12 16:39:28 +0100
From: muesli4
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2017-01-13 15:22:54 +0100
## Comment 24883
Date: 2017-01-12 16:39:28 +0100
From: muesli4
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0
Build Identifier:
The following query yields a strange error:
WITH t0(so, o1) AS (
SELECT ROW_NUMBER() OVER (ORDER BY c ASC) AS so, c
FROM ( SELECT 1 AS o1) AS a2(c)
)
SELECT * FROM t0 TOP 1;
Result:
syntax error, unexpected sqlINT, expecting SCOLON in: "with t0(so, o1) as (
select row_number() over (order by c asc) as so, c
"
Somewhat unrelated: If you could fix this it would really help me get vital results for my master thesis. :)
Reproducible: Always
## Comment 24884
Date: 2017-01-12 16:47:32 +0100
From: muesli4
Created attachment 528
Snippet and proposed test case.
> Attached file: [error.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6185_error.sql_528) (application/sql, 150 bytes)
> Description: Snippet and proposed test case.
## Comment 24886
Date: 2017-01-12 17:24:59 +0100
From: @sjoerdmullender
I think the problem is your use of TOP. That's not recognized in MonetDB.
Maybe you want LIMIT, or a combination of ORDER BY and LIMIT:
WITH t0(so, o1) AS (
SELECT ROW_NUMBER() OVER (ORDER BY c ASC) AS so, c
FROM ( SELECT 1 AS o1) AS a2(c)
)
SELECT * FROM t0 LIMIT 1;
## Comment 24890
Date: 2017-01-13 15:22:54 +0100
From: muesli4
(In reply to Sjoerd Mullender from comment 2)
> I think the problem is your use of TOP. That's not recognized in MonetDB.
> Maybe you want LIMIT, or a combination of ORDER BY and LIMIT:
> WITH t0(so, o1) AS (
> SELECT ROW_NUMBER() OVER (ORDER BY c ASC) AS so, c
> FROM ( SELECT 1 AS o1) AS a2(c)
> )
> SELECT * FROM t0 LIMIT 1;
Thanks Sjoerd. I actually used the limit just to reduce the error, in the process I messed up. Now I found the real error, which is nested WITH queries. I will reopen another bug report for it.
| WITH statement fails | https://api.github.com/repos/MonetDB/MonetDB/issues/6185/comments | 0 | 2020-11-30T15:30:39Z | 2024-06-28T13:11:41Z | https://github.com/MonetDB/MonetDB/issues/6185 | 753,575,368 | 6,185 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-01-11 17:18:35 +0100
From: Manuel <<manuel>>
To: SQL devs <<bugs-sql>>
Version: 11.23.13 (Jun2016-SP2)
Last updated: 2017-01-26 14:56:41 +0100
## Comment 24880
Date: 2017-01-11 17:18:35 +0100
From: Manuel <<manuel>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Build Identifier:
Queries like
select * from "unitTestDontDelete" where "B" < 5 AND "B" >= 5;
select * from "unitTestDontDelete" where "A" < 'Cat2' AND "A" >= 'Cat2'
select * from "unitTestDontDelete" where "C" < 5.5 AND "C" >= 5.5;
return extra records where no records is expected
Reproducible: Always
### Steps to Reproduce:
1.Create table "unitTestDontDelete" as in attachment
2.Execute a query like select * from "unitTestDontDelete" where "B" < 5 AND "B" >= 5;
3. The result set is not empty as expected
### Actual Results:
Cat2 5 5.5 2013-06-15 16:15:15.0
### Expected Results:
[empty]
## Comment 24881
Date: 2017-01-11 17:19:24 +0100
From: Manuel <<manuel>>
Created attachment 527
example table
> Attached file: [unitTest.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6184_unitTest.sql_527) (application/octet-stream, 581 bytes)
> Description: example table
## Comment 24882
Date: 2017-01-12 09:19:27 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [1ba49a99910f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1ba49a99910f) 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=1ba49a99910f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1ba49a99910f)
Changeset description:
Fix select for (half) open interval where left and right the same.
According to the comments near BATselect, this should give an empty
result, and now it does. Some incorrect usage was also fixed.
This fixes bug #6184.
## Comment 24918
Date: 2017-01-26 14:56:41 +0100
From: @kutsurak
Fixed in version Dec2016-SP1.
| Incorrect result set - Extra records in result set | https://api.github.com/repos/MonetDB/MonetDB/issues/6184/comments | 0 | 2020-11-30T15:30:36Z | 2024-06-27T12:57:53Z | https://github.com/MonetDB/MonetDB/issues/6184 | 753,575,326 | 6,184 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-01-11 16:24:30 +0100
From: Antonio <<antonioknight>>
To: clients devs <<bugs-clients>>
Version: 11.25.3 (Dec2016)
CC: martin.van.dinther
Last updated: 2017-07-13 16:56:07 +0200
## Comment 24879
Date: 2017-01-11 16:24:30 +0100
From: Antonio <<antonioknight>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Build Identifier:
Say you have a table with a column named 'my column' (no singles quote included)
If you execute any query the ResultSetMetaData.getColumnLabel and getColumnName methods will return a String equals to '"my column"', including the double quotes characters.
Previous version of MonetDB used to return just the name of the column without this additional double quotes.
If you compare this behaviour with other vendors out there it is clear that the previous behaviour was fine and now this seems a bug.
Reproducible: Always
### Steps to Reproduce:
1. Create a table e.g. 'my_table' with a field called 'my column' (no single quotes included)
2. execute SELECT * from my_table;
3. The ResultSetMetaData.getColumnName will return a String containing '"my_column"' instead of 'my_column'
### Actual Results:
"my column"
### Expected Results:
my column
## Comment 24897
Date: 2017-01-19 15:55:40 +0100
From: Martin van Dinther <<martin.van.dinther>>
I can reproduce this problem with monetdb-jdbc-2.24.jar.
A root case analysis showed that in Oct2014-SP1 release the format of the MAPI column names header has been changed to allow correct parsing of names which contain a space or comma or tab or or ". See bug #3616.
The MonetDB JDBC driver has not been adapted to the new MAPI format, hence you experience this problem. We will start work on correcting this.
## Comment 24899
Date: 2017-01-19 18:28:04 +0100
From: Antonio <<antonioknight>>
(In reply to Martin van Dinther from comment 1)
> I can reproduce this problem with monetdb-jdbc-2.24.jar.
>
> A root case analysis showed that in Oct2014-SP1 release the format of the
> MAPI column names header has been changed to allow correct parsing of names
> which contain a space or comma or tab or or ". See bug #3616.
>
> The MonetDB JDBC driver has not been adapted to the new MAPI format, hence
> you experience this problem. We will start work on correcting this.
Thank you for your message, indeed it is reproducible regardless the jdbc driver version (I tried with 2.11 to 2.24)
## Comment 24900
Date: 2017-01-19 19:08:31 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset 839ffec1d36d, made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the monetdb-java repo, refers to this bug.
For complete details, see http://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=839ffec1d36d
Changeset description:
Fix for bug #6183.
Also created and added test program to test get column names & lables of columns containing a space or a comma or a tab or a or a combination of tab and comma or an escaped ".
## Comment 24901
Date: 2017-01-19 19:29:20 +0100
From: Martin van Dinther <<martin.van.dinther>>
Created attachment 532
patched MonetDB JDBC driver with fix for issue 6183 for testing
Hi Antonio,
I attached a patched MonetDB JDBC driver, see monetdb-jdbc-2.24-fix6183.jar
This allows you to test the fix for your configuration/use case before we create a new release.
Let us know if it resolves your reported issue.
Thx,
Martino
> Attached file: [monetdb-jdbc-2.24-fix6183.jar](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6183_monetdb-jdbc-2.24-fix6183.jar_532) (text/plain, 124694 bytes)
> Description: patched MonetDB JDBC driver with fix for issue 6183 for testing
## Comment 25144
Date: 2017-03-09 15:38:05 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [8ac493d731ca](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8ac493d731ca) 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=8ac493d731ca](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=8ac493d731ca)
Changeset description:
Add invocation and test results of new jdbc test for bug #6183.
## Comment 25145
Date: 2017-03-09 16:17:54 +0100
From: Martin van Dinther <<martin.van.dinther>>
Fix will be included in next release of the JDBC driver (monetdb-jdbc-2.25.jar)
## Comment 25463
Date: 2017-07-13 16:56:07 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset 890dce2d5305, made by Pedro Ferreira <pedro.ferreira@monetdbsolutions.com> in the monetdb-java repo, refers to this bug.
For complete details, see https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=890dce2d5305
Changeset description:
Merged changes for Bug #6183
| ResultSet returns double quoted column name if name contains space characters | https://api.github.com/repos/MonetDB/MonetDB/issues/6183/comments | 0 | 2020-11-30T15:30:32Z | 2024-06-27T12:57:52Z | https://github.com/MonetDB/MonetDB/issues/6183 | 753,575,280 | 6,183 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-01-02 11:50:03 +0100
From: @yzchang
To: clients devs <<bugs-clients>>
Version: 11.25.3 (Dec2016)
Last updated: 2017-01-26 14:56:19 +0100
## Comment 24863
Date: 2017-01-02 11:50:03 +0100
From: @yzchang
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/602.3.12 (KHTML, like Gecko) Version/10.0.2 Safari/602.3.12
Build Identifier:
$ mclient -s 'call sys.shutdown(10);'
Assertion failed: (v->vtype == TYPE_int), function CLTshutdown, file /Users/jennie/monet/Dec2016/monetdb5/modules/mal/clients.c, line 543.
[1]+ Abort trap: 6 mserver5 --dbpath=/tmp/dbfarms/dec2016/test --daemon=yes
Reproducible: Always
### Steps to Reproduce:
1. Just execute the SQL query "call sys.shutdown(10);" to trigger the assertion
### Actual Results:
The MonetDB server is shutdown, but an assertion is triggered at the (m)client side.
### Expected Results:
The MonetDB server is shutdown, without any errors/assertions.
## Comment 24864
Date: 2017-01-02 12:32:26 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [765a4e5f0ee2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=765a4e5f0ee2) 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=765a4e5f0ee2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=765a4e5f0ee2)
Changeset description:
Fix for bug #6182.
## Comment 24865
Date: 2017-01-02 12:35:07 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [3b402acd37ab](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3b402acd37ab) 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=3b402acd37ab](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3b402acd37ab)
Changeset description:
Test for bug #6182.
## Comment 24914
Date: 2017-01-26 14:56:19 +0100
From: @kutsurak
Fixed in version Dec2016-SP1.
| sys.shutdown triggers assertion in clients.c | https://api.github.com/repos/MonetDB/MonetDB/issues/6182/comments | 0 | 2020-11-30T15:30:29Z | 2024-06-27T12:57:51Z | https://github.com/MonetDB/MonetDB/issues/6182 | 753,575,240 | 6,182 |
[
"MonetDB",
"MonetDB"
] | Date: 2017-01-01 23:52:22 +0100
From: muesli4
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 11.25.3 (Dec2016)
CC: @mlkersten
Last updated: 2019-04-30 12:36:05 +0200
## Comment 24860
Date: 2017-01-01 23:52:22 +0100
From: muesli4
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0
Build Identifier:
Running the snippet results in: ERROR = !SyntaxException:user.f152[0]:RETURN missing
(Couldn't reduce it further.)
Reproducible: Always
## Comment 24861
Date: 2017-01-01 23:53:23 +0100
From: muesli4
Created attachment 525
Snippet that doesn't work.
> Attached file: [missing return.mal](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6181_missing_return.mal_525) (application/octet-stream, 10311 bytes)
> Description: Snippet that doesn't work.
## Comment 24862
Date: 2017-01-01 23:54:00 +0100
From: muesli4
Created attachment 526
Snippet that works.
> Attached file: [without comments.mal](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6181_without_comments.mal_526) (application/octet-stream, 7261 bytes)
> Description: Snippet that works.
## Comment 24983
Date: 2017-02-07 19:46:02 +0100
From: @mlkersten
Works for me on the Dec2016 branch as follows:
mserver5 y
where y contains the function.
It will produce a !SyntaxException:user.f152[0]:RETURN missing
if you do it as follows:
mserver5 <y
It is known to lead to an exception in the Default branch as of mid December 2016, because we removed the superflous 'sub' in the MAL interface.
The exception would complain about the 'algebra.subselect'
## Comment 25384
Date: 2017-06-20 15:34:35 +0200
From: @sjoerdmullender
The problem is in MALreader/MCreadClient. For some reason, this stops reading (when reading from mclient) after 10240 bytes. The file is just a little longer, causing the last sql.bind and return statements to be missed in the plan.
@Martin: use mclient -lmal to send the file to the server.
## Comment 25388
Date: 2017-06-21 10:01:40 +0200
From: @mlkersten
When I run it on Jul2017 branch as follow
mserver5 <x.mal
...
>mserver5: /export/scratch1/mk/Jul2017//package/monetdb5/mal/mal_instruction.c:151: resizeMalBlk: Assertion `mb->vsize >= mb->ssize' failed.
Aborted (core dumped)
This assertion uses the fact that each MAL statement has at least one return variable that should be accommodated by the symbol table.
## Comment 26926
Date: 2019-03-18 23:54:00 +0100
From: @mlkersten
This seems to work on default Mar 2019
| comments cause error with return in function | https://api.github.com/repos/MonetDB/MonetDB/issues/6181/comments | 0 | 2020-11-30T15:30:25Z | 2024-06-27T12:57:50Z | https://github.com/MonetDB/MonetDB/issues/6181 | 753,575,167 | 6,181 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-12-29 12:22:49 +0100
From: @eyalroz
To: buildtools devs <<bugs-buildtools>>
Version: 11.25.21 (Dec2016-SP4)
CC: @drstmane
Last updated: 2017-06-20 16:24:13 +0200
## Comment 24859
Date: 2016-12-29 12:22:49 +0100
From: @eyalroz
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0
Build Identifier:
The build configuration script decides whether or not to enable BLAS support by looking for the liblas-config file (typically usr/bin/liblas-config). That's not good enough, since you can have liblas-dev installed without liblas-c-dev alongside it (I'm referring to Debian/Ubuntu package names). If that's the case, the build fails with the error:
libtool: compile: gcc ... etc etc etc ... -c lidar.c -fPIC -DPIC -o .libs/lib_lidar_la-lidar.o
lidar.c:21:32: fatal error: liblas/capi/liblas.h: No such file or directory
that file belongs to liblas-c-dev:
$ apt-file find liblas/capi/liblas.h
liblas-c-dev: /usr/include/liblas/capi/liblas.h
Reproducible: Always
Same problem exists with v11.23.13 .
## Comment 25253
Date: 2017-04-19 15:47:50 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [4c80241c0c5b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4c80241c0c5b) 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=4c80241c0c5b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4c80241c0c5b)
Changeset description:
Test for liblas/capi/liblas.h include file separately.
This fixes bug #6180.
## Comment 25386
Date: 2017-06-20 16:24:13 +0200
From: @sjoerdmullender
This fix already made it in Dec2016-SP4.
| Wrong file used in dependency check for LAS library | https://api.github.com/repos/MonetDB/MonetDB/issues/6180/comments | 0 | 2020-11-30T15:30:22Z | 2024-06-27T12:57:49Z | https://github.com/MonetDB/MonetDB/issues/6180 | 753,575,132 | 6,180 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-12-28 11:49:56 +0100
From: @sjoerdmullender
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 11.25.3 (Dec2016)
Last updated: 2017-01-26 14:56:13 +0100
## Comment 24857
Date: 2016-12-28 11:49:56 +0100
From: @sjoerdmullender
The mergetable optimizer creates the following sequence from the instruction A := sample.subuniform(b,n):
t1 := sample.subuniform(b1,n);
t2 := sample.subuniform(b2,n);
t3 := sample.subuniform(b3,n);
t4 := sample.subuniform(b4,n);
a := mat.pack(t1,t2,t3,t4);
a := sample.subuniform(a,n);
This is wrong:
sample.subuniform() returns a candidate list for its argument bat, so the last call to sample.subuniform() returns an index into the result of the mat.pack(). The result *should* be subset of the result of the mat.pack(). In other words, there is an algebra.projection() missing.
## Comment 24858
Date: 2016-12-28 11:51:20 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [d1af8f50919b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d1af8f50919b) 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=d1af8f50919b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d1af8f50919b)
Changeset description:
Add an extra algebra.projection call to the transformation of sample.subuniform.
This fixes bug #6179.
## Comment 24913
Date: 2017-01-26 14:56:13 +0100
From: @kutsurak
Fixed in version Dec2016-SP1.
| mergetable optimizer messes up sample | https://api.github.com/repos/MonetDB/MonetDB/issues/6179/comments | 0 | 2020-11-30T15:30:19Z | 2024-06-27T12:57:48Z | https://github.com/MonetDB/MonetDB/issues/6179 | 753,575,090 | 6,179 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-12-25 23:12:12 +0100
From: Anthony Damico <<ajdamico>>
To: SQL devs <<bugs-sql>>
Version: 11.25.3 (Dec2016)
CC: ajdamico, @hannesmuehleisen
Last updated: 2017-01-26 14:56:43 +0100
## Comment 24856
Date: 2016-12-25 23:12:12 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0
Build Identifier:
tested on dec2016 release
Reproducible: Always
### Steps to Reproduce:
you can download the two cols csv file here: http://filebin.ca/36dXIRbOlBmY/twocols.csv
it will load directly into R without the external download
four sql commands to recreate so long as you have "two cols.csv" loaded at the correct filepath
CREATE TABLE x (tailnum STRING, arr_delay INTEGER)
COPY OFFSET 2 INTO x FROM 'c:\\Users\\anthonyd\\Desktop\\two cols.csv' USING DELIMITERS ',','\n','"' NULL as ''
SELECT tailnum , AVG( arr_delay ) FROM x WHERE tailnum = 'N907MQ' GROUP BY tailnum
SELECT * FROM ( SELECT tailnum , AVG( arr_delay ) FROM x GROUP BY tailnum ) AS xxx WHERE tailnum = 'N907MQ'
minimal reproducible example R code
load the latest versions of everything
devtools::install_github("hannesmuehleisen/MonetDBLite",ref="Dec2016Lite-R")
install.packages( c( 'DBI' , 'nycflights13' ) )
library(nycflights13)
library(DBI)
db <- dbConnect( MonetDBLite::MonetDBLite() )
two columns
x <- flights[ c( 'tailnum' , 'arr_delay' ) ]
dbWriteTable( db , 'x' , x )
dbGetQuery( db , "SELECT tailnum , AVG( arr_delay ) FROM x WHERE tailnum = 'N907MQ' GROUP BY tailnum" )
tailnum L3
1 N907MQ 91.5
dbGetQuery( db , "SELECT * FROM ( SELECT tailnum , AVG( arr_delay ) FROM x GROUP BY tailnum ) AS xxx WHERE tailnum = 'N907MQ'" )
tailnum L3
1 N907MQ NA
### Actual Results:
neither of these queries should return missing values?
dbGetQuery( db , "SELECT tailnum , AVG( arr_delay ) FROM x WHERE tailnum = 'N907MQ' GROUP BY tailnum" )
tailnum L3
1 N907MQ 91.5
dbGetQuery( db , "SELECT * FROM ( SELECT tailnum , AVG( arr_delay ) FROM x GROUP BY tailnum ) AS xxx WHERE tailnum = 'N907MQ'" )
tailnum L3
1 N907MQ NA
sorry if i'm doing something dumb. thanks!
## Comment 24866
Date: 2017-01-02 18:23:52 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [41e0ace65aed](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=41e0ace65aed) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=41e0ace65aed](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=41e0ace65aed)
Changeset description:
Smaller test for Bug #6178
## Comment 24867
Date: 2017-01-03 09:31:06 +0100
From: @hannesmuehleisen
Bug only appears when running mserver with --forcemito
## Comment 24868
Date: 2017-01-03 09:31:08 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [a9ebbd5b2e53](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a9ebbd5b2e53) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a9ebbd5b2e53](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a9ebbd5b2e53)
Changeset description:
Update for Bug #6178, issue only appears when using AVG
## Comment 24869
Date: 2017-01-03 12:25:09 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [c10ab2216eec](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c10ab2216eec) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c10ab2216eec](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c10ab2216eec)
Changeset description:
Fix for Bug #6178
## Comment 24919
Date: 2017-01-26 14:56:43 +0100
From: @kutsurak
Fixed in version Dec2016-SP1.
| AVG + GROUP BY returns NULL for some records that should have results | https://api.github.com/repos/MonetDB/MonetDB/issues/6178/comments | 0 | 2020-11-30T15:30:15Z | 2024-06-27T12:57:47Z | https://github.com/MonetDB/MonetDB/issues/6178 | 753,575,040 | 6,178 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-12-24 15:57:49 +0100
From: @mlkersten
To: SQL devs <<bugs-sql>>
Version: 11.17.13 (Jan2014-SP1)
CC: @njnes
Last updated: 2017-03-03 10:24:07 +0100
## Comment 24852
Date: 2016-12-24 15:57:49 +0100
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:50.0) Gecko/20100101 Firefox/50.0
Build Identifier:
Error found by sqlsmith
assertion raised in opt_garbagecollector
Reproducible: Always
### Steps to Reproduce:
select distinct 14 as c0
from sys.querylog_calls as ref_0
where ref_0.cpu is not NULL
limit 141;
## Comment 24853
Date: 2016-12-24 19:31:41 +0100
From: @mlkersten
Code generation in SQL is not properly finished, as the trace below shows.
Watch for "Could not find L1.id and L1.cpu
>select distinct 14 as c0 from sys.querylog_calls as ref_0 where ref_0.cpu is not NULL limit 141;
could not find L1.id
L1.cpu
=FINISHED inline 0
function user.s0_0():void;
X_0:void := querylog.define("select distinct 14 as c0 from sys.querylog_calls as ref_0 where ref_0.cpu is not null limit 141;":str, "default_pipe":str, 10:int);
sql.mvc();
calc.lng(141:lng);
calc.lng(1:lng);
(X_8:bat[:oid], X_9:bat[:timestamp], X_10:bat[:timestamp], X_11:bat[:str], X_12:bat[:lng], X_13:bat[:lng], X_14:bat[:lng], X_15:bat[:int], X_16:bat[:int]) := sql.querylog_calls();
X_17:int := calc.int(nil:int);
X_19:int := calc.int(nil:int);
X_20:bat[:oid] := algebra.select(X_15:bat[:int], X_17:int, X_19:int, true:bit, true:bit, true:bit);
algebra.projection(X_20:bat[:oid], X_15:bat[:int]);
optimizer.remap();
optimizer.costModel();
optimizer.coercions();
optimizer.evaluate();
optimizer.emptybind();
optimizer.pushselect();
optimizer.aliases();
optimizer.mitosis();
optimizer.mergetable();
optimizer.deadcode();
optimizer.aliases();
optimizer.constants();
optimizer.commonTerms();
optimizer.projectionpath();
optimizer.deadcode();
optimizer.reorder();
optimizer.matpack();
optimizer.dataflow();
optimizer.querylog();
optimizer.multiplex();
optimizer.generator();
optimizer.profiler();
optimizer.candidates();
optimizer.garbageCollector();
inline actions= 0 time=1 usec
## Comment 24854
Date: 2016-12-24 20:22:47 +0100
From: @mlkersten
An freshly created database is enough.
## Comment 24855
Date: 2016-12-24 20:26:01 +0100
From: @mlkersten
Another hit against the same assertion:
select distinct
57 as c0
from
sys.privileges as ref_41
left join sys.queue as ref_42
right join sys._tables as ref_43
on (ref_42.progress = ref_43.id )
right join bam.export as ref_44
on (ref_43.commit_action = ref_44.flag )
inner join sys.querylog_history as ref_45
on (ref_42.started = ref_45.defined )
on (ref_41.grantable = ref_43.id )
where ref_44.tlen is NULL
limit 78;
could not find ref_41.obj_id
ref_41.grantable
L1.started
L1.progress
ref_43.id
ref_43.commit_action
ref_44.flag
ref_44.tlen
qd.id
qd.owner
qd.defined
ql.id
## Comment 25012
Date: 2017-02-12 14:14:29 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [31c48c70f4da](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=31c48c70f4da) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=31c48c70f4da](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=31c48c70f4da)
Changeset description:
fixed bug #6177
## Comment 25013
Date: 2017-02-12 14:15:12 +0100
From: @njnes
Fixed a problem in the deadcode optimizer.
## Comment 25105
Date: 2017-03-03 10:24:07 +0100
From: @sjoerdmullender
Dec2016-SP2 has been released, incorporating the fix.
| Server crashes | https://api.github.com/repos/MonetDB/MonetDB/issues/6177/comments | 0 | 2020-11-30T15:30:12Z | 2024-06-27T12:57:46Z | https://github.com/MonetDB/MonetDB/issues/6177 | 753,575,019 | 6,177 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-12-23 18:38:22 +0100
From: @swingbit
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 11.25.21 (Dec2016-SP4)
Last updated: 2017-06-20 16:26:19 +0200
## Comment 24851
Date: 2016-12-23 18:38:22 +0100
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36
Build Identifier:
Loading MAL modules which still declare BATs in the binary format (pre-headless) makes mserver5 crash with SEGFAULT.
$ mserver5 --dbpath=/export/data/roberto/dbfarms/dbfarm.Spinque_Dec2016.preview/trec2 --set merovingian_uri=mapi:monetdb://photon.hq.spinque.com:55500/trec2 --set mapi_open=false --set mapi_port=0 --set mapi_usock=/export/data/roberto/dbfarms/dbfarm.Spinque_Dec2016.preview/trec2/.mapi.sock --set monet_vault_key=/export/data/roberto/dbfarms/dbfarm.Spinque_Dec2016.preview/trec2/.vaultkey --set gdk_nr_threads=8 --set max_clients=64 --set sql_optimizer=default_pipe --set embedded_r=true
MonetDB 5 server v11.25.4
This is an unreleased version
Serving database 'trec2', using 8 threads
Compiled for x86_64-unknown-linux-gnu/64bit with 128bit integers
Found 13.260 GiB available main-memory.
Copyright (c) 1993-July 2008 CWI.
Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
!SyntaxException:parseError:command tconcat ( left:bat[:oid,:any_1], right:bat[:oid,:any_1])
!SyntaxException:parseError: ^']' expected
!SyntaxException:parseError: :bat[:oid,:any_1]
!SyntaxException:parseError: ^',' expected
Segmentation fault (core dumped)
Reproducible: Always
## Comment 25254
Date: 2017-04-19 16:05:32 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [caa5eb85cec4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=caa5eb85cec4) 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=caa5eb85cec4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=caa5eb85cec4)
Changeset description:
Don't return a pointer into freed memory.
This fixes bug #6176.
## Comment 25387
Date: 2017-06-20 16:26:19 +0200
From: @sjoerdmullender
Fixed in Dec2016-SP4.
| mserver5 SEGFAULT upon pre-headless MAL bat declaration | https://api.github.com/repos/MonetDB/MonetDB/issues/6176/comments | 0 | 2020-11-30T15:30:09Z | 2024-06-27T12:57:45Z | https://github.com/MonetDB/MonetDB/issues/6176 | 753,574,964 | 6,176 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-12-22 15:52:32 +0100
From: Martin van Dinther <<martin.van.dinther>>
To: Karan Kapoor <<95kkapoor>>
Version: 11.25.3 (Dec2016)
CC: 95kkapoor, khushikashyap123, webhostinguk
Last updated: 2019-01-24 14:55:21 +0100
## Comment 24849
Date: 2016-12-22 15:52:32 +0100
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0
Build Identifier:
After installing MonetDB/SQL server (release v11.25.3 "Dec2016"), starting the server using M5server.bat, I get pop-up error msg:
The program can't start because python27.dll is missing from your computer. Try reinstalling the program to fix the program.
The server does not crash, but it is also not usable as it does not complete its initialisation steps and does not listen on the default port 50000.
Reproducible: Always
### Steps to Reproduce:
1. Install MonetDB5-SQL-Installer-x86_64-20161217.msi or MonetDB5-SQL-Installer-i386-20161217.msi on a computer which does NOT have python installed.
2. Start server via: M5server.bat
### Actual Results:
On the console window I get:
"HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.7\InstallPath"\"" not found.
MonetDB/Python Disabled: Python 2.7 installation not found.
MonetDB 5 server v11.25.3 "Dec2016"
Serving database 'demo', using 4 threads
Compiled for i686-pc-winnt/32bit
Found 3.240 GiB available main-memory.
Copyright (c) 1993-July 2008 CWI.
Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
!SyntaxException:parseError:
!LoaderException:loadLibrary:Loading error failed to open library pyapi (from within file 'C:\Program Files\MonetDB5\2016Dec\lib\monetdb5\lib_pyapi.dll'): The specified module could not be found.
!SyntaxException:parseError:
!<identifier> expected
>
### Expected Results:
No pop-up error dialog message and succesfull start-up of mserver5.
The problem has been analysed and fixed in [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=87f38df2b46b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=87f38df2b46b)
It will be part of the next release.
As a temporary workaround you can resolve the loadLibrary problem yourself by disabling the import of pyapi.
This is specified in file: lib/monetdb/autoload/50_pyapi.mal
Either edit the file and add a in front of the line: include pyapi;
or rename the file to 50_pyapi.mal.org such that it will no longer be loaded and executed anymore.
Alternatively you can also install python 2.7.
## Comment 24850
Date: 2016-12-22 15:55:27 +0100
From: Martin van Dinther <<martin.van.dinther>>
The problem has been fixed in [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=87f38df2b46b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=87f38df2b46b)
It will be part of the next release.
## Comment 24911
Date: 2017-01-26 14:55:57 +0100
From: @kutsurak
Fixed in version Dec2016-SP1.
| The program can't start because python27.dll is missing from your computer. | https://api.github.com/repos/MonetDB/MonetDB/issues/6175/comments | 0 | 2020-11-30T15:30:06Z | 2024-06-27T12:57:44Z | https://github.com/MonetDB/MonetDB/issues/6175 | 753,574,926 | 6,175 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-12-21 15:02:53 +0100
From: Gatis Ozolins <<g.ozolins>>
To: Merovingian devs <<bugs-merovingian>>
Version: 11.25.3 (Dec2016)
Last updated: 2017-07-28 22:44:22 +0200
## Comment 24839
Date: 2016-12-21 15:02:53 +0100
From: Gatis Ozolins <<g.ozolins>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:50.0) Gecko/20100101 Firefox/50.0
Build Identifier:
starting database 'DWH'... FAILED
start: starting 'DWH' failed: database 'DWH' has crashed after starting, manual intervention needed, check monetdbd's logfile for details
Output from dmesg:
[1655210.722058] mserver5[47623]: segfault at 0 ip 00007fbe1b736c68 sp 00007ffc6622e010 error 4 in libmonetdb5.so.22.0.0[7fbe1b6ee000+15a000]
Reproducible: Always
## Comment 24840
Date: 2016-12-21 15:21:06 +0100
From: Gatis Ozolins <<g.ozolins>>
Problem was with custom mal function placed in /usr/lib64/monetdb5/autoload
It still had :oid prefixes
## Comment 24841
Date: 2016-12-21 15:22:54 +0100
From: @sjoerdmullender
I'm glad you were able to find and solve it.
However, a crash for such a problem isn't good.
## Comment 25523
Date: 2017-07-28 22:44:22 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [182df737b80c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=182df737b80c) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=182df737b80c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=182df737b80c)
Changeset description:
add test for bug #6174
| Can't start database after upgrade from 11.23.13 to 11.25.3 (segfault) | https://api.github.com/repos/MonetDB/MonetDB/issues/6174/comments | 0 | 2020-11-30T15:30:02Z | 2024-06-28T13:11:40Z | https://github.com/MonetDB/MonetDB/issues/6174 | 753,574,885 | 6,174 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6173/comments | 0 | 2020-11-30T15:29:59Z | 2020-11-30T15:30:01Z | https://github.com/MonetDB/MonetDB/issues/6173 | 753,574,842 | 6,173 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6172/comments | 0 | 2020-11-30T15:29:56Z | 2020-11-30T15:29:58Z | https://github.com/MonetDB/MonetDB/issues/6172 | 753,574,800 | 6,172 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6171/comments | 0 | 2020-11-30T15:29:53Z | 2020-11-30T15:29:54Z | https://github.com/MonetDB/MonetDB/issues/6171 | 753,574,757 | 6,171 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6170/comments | 0 | 2020-11-30T15:29:49Z | 2020-11-30T15:29:52Z | https://github.com/MonetDB/MonetDB/issues/6170 | 753,574,719 | 6,170 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6169/comments | 0 | 2020-11-30T15:29:47Z | 2020-11-30T15:29:49Z | https://github.com/MonetDB/MonetDB/issues/6169 | 753,574,677 | 6,169 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6168/comments | 0 | 2020-11-30T15:29:44Z | 2020-11-30T15:29:46Z | https://github.com/MonetDB/MonetDB/issues/6168 | 753,574,638 | 6,168 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6167/comments | 0 | 2020-11-30T15:29:42Z | 2020-11-30T15:29:43Z | https://github.com/MonetDB/MonetDB/issues/6167 | 753,574,605 | 6,167 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6166/comments | 0 | 2020-11-30T15:29:39Z | 2020-11-30T15:29:41Z | https://github.com/MonetDB/MonetDB/issues/6166 | 753,574,572 | 6,166 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6165/comments | 0 | 2020-11-30T15:29:36Z | 2020-11-30T15:29:38Z | https://github.com/MonetDB/MonetDB/issues/6165 | 753,574,520 | 6,165 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6164/comments | 0 | 2020-11-30T15:29:34Z | 2020-11-30T15:29:35Z | https://github.com/MonetDB/MonetDB/issues/6164 | 753,574,491 | 6,164 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6163/comments | 0 | 2020-11-30T15:29:32Z | 2020-11-30T15:29:33Z | https://github.com/MonetDB/MonetDB/issues/6163 | 753,574,453 | 6,163 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6162/comments | 0 | 2020-11-30T15:29:29Z | 2020-11-30T15:29:30Z | https://github.com/MonetDB/MonetDB/issues/6162 | 753,574,407 | 6,162 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6161/comments | 0 | 2020-11-30T15:29:26Z | 2020-11-30T15:29:27Z | https://github.com/MonetDB/MonetDB/issues/6161 | 753,574,370 | 6,161 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6160/comments | 0 | 2020-11-30T15:29:24Z | 2020-11-30T15:29:25Z | https://github.com/MonetDB/MonetDB/issues/6160 | 753,574,334 | 6,160 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6159/comments | 0 | 2020-11-30T15:29:22Z | 2020-11-30T15:29:23Z | https://github.com/MonetDB/MonetDB/issues/6159 | 753,574,289 | 6,159 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6158/comments | 0 | 2020-11-30T15:29:19Z | 2020-11-30T15:29:21Z | https://github.com/MonetDB/MonetDB/issues/6158 | 753,574,255 | 6,158 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6157/comments | 0 | 2020-11-30T15:29:17Z | 2020-11-30T15:29:18Z | https://github.com/MonetDB/MonetDB/issues/6157 | 753,574,225 | 6,157 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6156/comments | 0 | 2020-11-30T15:29:15Z | 2020-11-30T15:29:16Z | https://github.com/MonetDB/MonetDB/issues/6156 | 753,574,195 | 6,156 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6155/comments | 0 | 2020-11-30T15:29:13Z | 2020-11-30T15:29:14Z | https://github.com/MonetDB/MonetDB/issues/6155 | 753,574,166 | 6,155 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6154/comments | 0 | 2020-11-30T15:29:11Z | 2020-11-30T15:29:12Z | https://github.com/MonetDB/MonetDB/issues/6154 | 753,574,136 | 6,154 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6153/comments | 0 | 2020-11-30T15:29:09Z | 2020-11-30T15:29:10Z | https://github.com/MonetDB/MonetDB/issues/6153 | 753,574,114 | 6,153 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6152/comments | 0 | 2020-11-30T15:29:07Z | 2020-11-30T15:29:08Z | https://github.com/MonetDB/MonetDB/issues/6152 | 753,574,084 | 6,152 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6151/comments | 0 | 2020-11-30T15:29:04Z | 2020-11-30T15:29:06Z | https://github.com/MonetDB/MonetDB/issues/6151 | 753,574,060 | 6,151 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-12-16 20:13:49 +0100
From: Manuel <<manuel>>
To: SQL devs <<bugs-sql>>
Version: 11.23.13 (Jun2016-SP2)
CC: @njnes
Last updated: 2017-01-26 14:56:38 +0100
## Comment 24786
Date: 2016-12-16 20:13:49 +0100
From: Manuel <<manuel>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Build Identifier:
When I execute this query
select "t3e"."c22_store_phone_number" as "c3c_r_c"
from (
(select null as "c22_store_phone_number" from "test_join_right_table") union all
(select "store_phone_number" as "c22_store_phone_number" from "lineitem_denormalized_first1k")
) as "t3e"
where exists (select 1 as "one" from "test_join_right_table" as "t3d" where ("t3e"."c22_store_phone_number" = "t3d"."r_c" or ("t3e"."c22_store_phone_number" is null and "t3d"."r_c" is null)))
I get 4 extra records that should not be part of the result set.
Please find the DDL and all files necessary to reproduce the issue attached.
I expect only null values to be in the result set. Note that each condition in the final or produces the correct result.
Reproducible: Always
### Steps to Reproduce:
1. Execute the sql statements in 'create_join_tables.sql' to create one of the two tables, and insert the records.
2. Execute the sql statement in 'create_lineitem_denormalized_first1k' to create the schema for the second table.
3. Populate this second table with the CSV contained in 'lineitem_denormalized_first1k_headerless.csv'. You should be able to do so by running a command like: mclient -d visokio -s "COPY INTO lineitem_denormalized_first1k FROM '/home/visokio/lineitem_denormalized_headerless.csv' USING DELIMITERS ',','\\n','\"'"
4. Run the query :
select "t3e"."c22_store_phone_number" as "c3c_r_c"
from (
(select null as "c22_store_phone_number" from "test_join_right_table") union all
(select "store_phone_number" as "c22_store_phone_number" from "lineitem_denormalized_first1k")
) as "t3e"
where exists (select 1 as "one" from "test_join_right_table" as "t3d" where ("t3e"."c22_store_phone_number" = "t3d"."r_c" or ("t3e"."c22_store_phone_number" is null and "t3d"."r_c" is null)))
The records
| +44-875-777-1712 |
| +44-875-777-1712 |
| +44-875-777-1712 |
| +44-875-777-1712 |
should not be part part of the output I think.
### Actual Results:
+------------------+
| c3c_r_c |
+==================+
| null |
| null |
| null |
| null |
| +44-875-777-1712 |
| +44-875-777-1712 |
| +44-875-777-1712 |
| +44-875-777-1712 |
+------------------+
### Expected Results:
+------------------+
| c3c_r_c |
+==================+
| null |
| null |
| null |
| null |
+------------------+
## Comment 24787
Date: 2016-12-16 20:26:09 +0100
From: Manuel <<manuel>>
Created attachment 521
DDL for one of the test table
> Attached file: [create_join_tables.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6150_create_join_tables.sql_521) (application/octet-stream, 358 bytes)
> Description: DDL for one of the test table
## Comment 24788
Date: 2016-12-16 20:26:34 +0100
From: Manuel <<manuel>>
Created attachment 522
DDL for the other test table
> Attached file: [create_lineitem_denormalized_first1k.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6150_create_lineitem_denormalized_first1k.sql_522) (application/octet-stream, 1238 bytes)
> Description: DDL for the other test table
## Comment 24789
Date: 2016-12-16 20:27:23 +0100
From: Manuel <<manuel>>
Created attachment 523
CSV contained the data for the second test table
> Attached file: [lineitem_denormalized_first1k_headerless.csv](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6150_lineitem_denormalized_first1k_headerless.csv_523) (application/vnd.ms-excel, 319403 bytes)
> Description: CSV contained the data for the second test table
## Comment 24791
Date: 2016-12-16 20:27:44 +0100
From: Manuel <<manuel>>
Created attachment 524
The query that produces the wrong result
> Attached file: [query.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6150_query.txt_524) (text/plain, 449 bytes)
> Description: The query that produces the wrong result
## Comment 24870
Date: 2017-01-06 20:31:29 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [8069d2353d05](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8069d2353d05) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=8069d2353d05](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=8069d2353d05)
Changeset description:
fix bug #6150, ie be more carefull with semijoin rewrites
## Comment 24871
Date: 2017-01-06 20:32:06 +0100
From: @njnes
fixed, improved the semijoin push down rewriter
## Comment 24872
Date: 2017-01-09 14:58:42 +0100
From: Manuel <<manuel>>
(In reply to Niels Nes from comment 6)
> fixed, improved the semijoin push down rewriter
Thanks a lot.
## Comment 24917
Date: 2017-01-26 14:56:38 +0100
From: @kutsurak
Fixed in version Dec2016-SP1.
| Query giving wrong results, extra records are appearing | https://api.github.com/repos/MonetDB/MonetDB/issues/6150/comments | 0 | 2020-11-30T15:29:01Z | 2024-06-27T12:57:36Z | https://github.com/MonetDB/MonetDB/issues/6150 | 753,574,003 | 6,150 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6149/comments | 0 | 2020-11-30T15:28:59Z | 2020-11-30T15:29:01Z | https://github.com/MonetDB/MonetDB/issues/6149 | 753,573,969 | 6,149 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6148/comments | 0 | 2020-11-30T15:28:55Z | 2020-11-30T15:28:58Z | https://github.com/MonetDB/MonetDB/issues/6148 | 753,573,919 | 6,148 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6147/comments | 0 | 2020-11-30T15:28:53Z | 2020-11-30T15:28:54Z | https://github.com/MonetDB/MonetDB/issues/6147 | 753,573,886 | 6,147 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6146/comments | 0 | 2020-11-30T15:28:50Z | 2020-11-30T15:28:52Z | https://github.com/MonetDB/MonetDB/issues/6146 | 753,573,847 | 6,146 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T15:21:56Z
This bug was created during the import from Bugzilla.
GitHub Issues Tracker allows to assign consecutive
ids only. So this dummy issue was created in place of
a deleted Bugzilla Bug.
Please ignore this report.
| Deleted Bugzilla Bug | https://api.github.com/repos/MonetDB/MonetDB/issues/6145/comments | 0 | 2020-11-30T15:28:48Z | 2020-11-30T15:28:49Z | https://github.com/MonetDB/MonetDB/issues/6145 | 753,573,817 | 6,145 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-12-15 12:56:55 +0100
From: Andreas Lang <<andreas.lang>>
To: buildtools devs <<bugs-buildtools>>
Version: unspecified
Last updated: 2016-12-15 15:48:36 +0100
## Comment 24775
Date: 2016-12-15 12:56:55 +0100
From: Andreas Lang <<andreas.lang>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36
Build Identifier:
There are only a few packages published but most packages from the repositories are missing. Right now monetdb cannot be installed/updated on the affected systems.
Reproducible: Always
### Steps to Reproduce:
1. Check package description.
### Actual Results:
https://www.monetdb.org/downloads/deb/dists/xenial/monetdb/binary-amd64/Packages
### Expected Results:
https://www.monetdb.org/downloads/deb/dists/wily/monetdb/binary-amd64/Packages
It seems to be the same for 32 and 64 bit builds.
## Comment 24776
Date: 2016-12-15 14:58:19 +0100
From: @sjoerdmullender
This should be fixed now.
Can you check?
## Comment 24779
Date: 2016-12-15 15:48:36 +0100
From: Andreas Lang <<andreas.lang>>
Yes, thank you, works for me now.
| Xenial and yakkety builds are missing packages | https://api.github.com/repos/MonetDB/MonetDB/issues/6144/comments | 0 | 2020-11-30T15:28:45Z | 2024-06-27T12:57:34Z | https://github.com/MonetDB/MonetDB/issues/6144 | 753,573,777 | 6,144 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-12-14 17:27:52 +0100
From: @eyalroz
To: clients devs <<bugs-clients>>
Version: 11.23.7 (Jun2016-SP1)
Last updated: 2017-02-02 18:09:30 +0100
## Comment 24772
Date: 2016-12-14 17:27:52 +0100
From: @eyalroz
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0
Build Identifier:
I'm using the USDT ontime flight data: https://github.com/eyalroz/usdt-ontime-tools
I run the query:
sql>select count(*) / ( select count(*) * 1.0 from ontime where cancelled = false) as cnt, depdelay from ontime where cancelled = false group by depdelay ORDER BY cnt DESC LIMIT 5;
and get:
+-------------------------------------------+----------+
| cnt | depdelay |
+===========================================+==========+
| 0.156 | 0 |
| 0.069 | -3 |
| 0.068 | -2 |
| 0.067 | -5 |
| 0.065 | -4 |
+-------------------------------------------+----------+
Now, I'm sure that further down in the column the number of digits necessary is much higher - but not in my limited set of records; so I should not (I think) get such a wide column.
Reproducible: Always
I'm not sure I chose the right "product" and "component" combination since I don't know which code is responsible for setting the output size.
## Comment 24774
Date: 2016-12-14 18:16:25 +0100
From: @sjoerdmullender
*** Bug #6142 has been marked as a duplicate of this bug. ***
## Comment 24955
Date: 2017-02-02 17:55:21 +0100
From: @sjoerdmullender
doubles are always returned as if they needed 24 characters. It's too expensive to calculate the actual width (we'd have to either create a string column from the doubles or do the conversion twice).
## Comment 24956
Date: 2017-02-02 18:09:30 +0100
From: @eyalroz
(In reply to Sjoerd Mullender from comment 2)
> doubles are always returned as if they needed 24 characters.
Well, the bug report is about that...
> It's too
> expensive to calculate the actual width (we'd have to either create a string
> column from the doubles or do the conversion twice).
If I use mclient in an interactive session, with the default, aligned output mode - it's a valid assumption, I believe, that the amount of data I intend to print to the console is limited. In this case I don't think it's too expensive to calculate.
| Width is wrong when limiting a double column with limited values requiring shorter width | https://api.github.com/repos/MonetDB/MonetDB/issues/6143/comments | 0 | 2020-11-30T15:28:42Z | 2024-06-28T13:11:39Z | https://github.com/MonetDB/MonetDB/issues/6143 | 753,573,737 | 6,143 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-12-14 17:27:20 +0100
From: @eyalroz
To: clients devs <<bugs-clients>>
Version: 11.23.7 (Jun2016-SP1)
Duplicates: #6143
Last updated: 2016-12-14 18:16:25 +0100
## Comment 24771
Date: 2016-12-14 17:27:20 +0100
From: @eyalroz
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0
Build Identifier:
I'm using the USDT ontime flight data
I run the query:
sql>select count(*) / ( select count(*) * 1.0 from ontime where cancelled = false) as cnt, depdelay from ontime where cancelled = false group by depdelay ORDER BY cnt DESC LIMIT 5;
and get:
+-------------------------------------------+----------+
| cnt | depdelay |
+===========================================+==========+
| 0.156 | 0 |
| 0.069 | -3 |
| 0.068 | -2 |
| 0.067 | -5 |
| 0.065 | -4 |
+-------------------------------------------+----------+
Now, I'm sure that further down in the column the number of digits necessary is much higher - but not in my limited set of records; so I should not (I think) get such a wide column.
Reproducible: Always
I'm not sure I chose the right "product" and "component" combination since I don't know which code is responsible for setting the output size.
## Comment 24773
Date: 2016-12-14 18:16:25 +0100
From: @sjoerdmullender
*** This bug has been marked as a duplicate of bug #6143 ***
| Width is wrong when limiting a double column with limited values requiring shorter width | https://api.github.com/repos/MonetDB/MonetDB/issues/6142/comments | 0 | 2020-11-30T15:28:39Z | 2024-06-28T13:11:39Z | https://github.com/MonetDB/MonetDB/issues/6142 | 753,573,698 | 6,142 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-12-13 22:18:45 +0100
From: @eyalroz
To: SQL devs <<bugs-sql>>
Version: 11.23.13 (Jun2016-SP2)
CC: @kutsurak, @mlkersten, @njnes
Last updated: 2017-03-03 10:24:36 +0100
## Comment 24770
Date: 2016-12-13 22:18:45 +0100
From: @eyalroz
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0
Build Identifier:
Suppose we have a table t1 with a column c2. Now, consider the query:
select count(c1) as c2 from (select count(*) AS c1, c2 from t1 group by c2) AS t2 group by c2;
This is a silly query but a valid one. Now, suppose we introduce the following typo:
select count(c1_) as c2 from (select count(*) AS c1, c2 from t1 group by c2) AS t2 group by c2;
this query has a typo - c1_ instead of c1. The error message we should be getting is:
SELECT: identifier 'c1_' unknown
but instead we get:
SELECT: cannot use non GROUP BY column 'c1_' in query results without an aggregate function
which suggests that c1_ is an actual column, which just can't be used as it is.
Reproducible: Always
## Comment 24940
Date: 2017-02-01 21:12:23 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [796b82e6111d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=796b82e6111d) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=796b82e6111d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=796b82e6111d)
Changeset description:
fixes for bug #6141 (ie improved error messages)
## Comment 24941
Date: 2017-02-01 21:13:45 +0100
From: @njnes
fixed error message
## Comment 25122
Date: 2017-03-03 10:24:36 +0100
From: @sjoerdmullender
Dec2016-SP2 has been released, incorporating the fix.
| Getting an error message regarding a non-GROUP-BY column rather than an unknown identifier | https://api.github.com/repos/MonetDB/MonetDB/issues/6141/comments | 0 | 2020-11-30T15:28:36Z | 2024-06-27T12:57:31Z | https://github.com/MonetDB/MonetDB/issues/6141 | 753,573,652 | 6,141 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-12-08 15:22:58 +0100
From: @rkoopmanschap
To: SQL devs <<bugs-sql>>
Version: 11.23.13 (Jun2016-SP2)
CC: @njnes, @yzchang
Last updated: 2017-01-26 14:56:04 +0100
## Comment 24766
Date: 2016-12-08 15:22:58 +0100
From: @rkoopmanschap
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36
Build Identifier:
The results of the query below are incorrect. It joins 2 tables that are generated in subqueries. The first table is:
+---------+------------+
| key_var | value_var1 |
+=========+============+
| 1 | 11 |
| 2 | 27 |
+---------+------------+
The second table is:
+---------+------------+
| key_var | value_var2 |
+=========+============+
| 1 | 630 |
| 2 | 420 |
+---------+------------+
Joining these tables on key_var should result in 2 rows, but the result returns 4. It seems as if they are joined with a cross join, rather than with an inner join.
In the december 2016 release branch the query result still has 4 rows, but the values in rows themselves are now correct. So it is still not working correctly, because only 2 rows should be returned.
Reproducible: Always
### Steps to Reproduce:
create schema test;
SET SCHEMA test;
create table "test"."foo"
(
"key_var" int,
"value_var2" int
);
create table "test"."bar"
(
"key_var" int,
"value_var1" int
);
insert into "test"."foo" values (1, 630);
insert into "test"."foo" values (2, 420);
insert into "test"."bar" values (1, 11);
insert into "test"."bar" values (2, 27);
SELECT *
FROM
(
SELECT t1. "key_var" AS "key_var",
SUM(t2. "value_var1") AS "value_var1"
FROM "test"."bar" t2
RIGHT OUTER JOIN
(
SELECT t2. "key_var" AS "key_var"
FROM "test"."foo" t2
GROUP BY t2. "key_var"
) t1
ON t1. "key_var" = t2. "key_var"
GROUP BY t1. "key_var"
) t2
INNER JOIN
(
SELECT t3. "key_var" AS "key_var",
SUM(t3. "value_var2") AS "value_var2"
FROM "test"."foo" t3
GROUP BY t3. "key_var"
) t1
ON t2."key_var" = t1."key_var";
### Actual Results:
+---------+------------+---------+------------+
| key_var | value_var1 | key_var | value_var2 |
+=========+============+=========+============+
| 1 | 11 | 1 | 630 |
| 1 | 11 | 2 | 420 |
| 2 | 27 | 1 | 630 |
| 2 | 27 | 2 | 420 |
+---------+------------+---------+------------+
### Expected Results:
+---------+------------+---------+------------+
| key_var | value_var2 | key_var | value_var1 |
+=========+============+=========+============+
| 1 | 630 | 1 | 11 |
| 2 | 420 | 2 | 27 |
+---------+------------+---------+------------+
## Comment 24780
Date: 2016-12-16 18:22:07 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [a5450ec40d16](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a5450ec40d16) made by Richard Koopmanschap <richard.koopmanschap@monetdbsolutions.com> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a5450ec40d16](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a5450ec40d16)
Changeset description:
Added test for bug #6140
## Comment 24843
Date: 2016-12-21 18:24:29 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [f5e97fd4b691](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f5e97fd4b691) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f5e97fd4b691](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f5e97fd4b691)
Changeset description:
fix for bug #6140, ie the push project up properly detects more ambigious
expression names
## Comment 24844
Date: 2016-12-21 18:32:20 +0100
From: @njnes
fixed checked into the dec2016 branch.
## Comment 24847
Date: 2016-12-22 14:06:07 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [e420421d4be7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e420421d4be7) made by Richard Koopmanschap <richard.koopmanschap@monetdbsolutions.com> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e420421d4be7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e420421d4be7)
Changeset description:
Added test for bug #6140
## Comment 24848
Date: 2016-12-22 14:07:12 +0100
From: @yzchang
(In reply to MonetDB Mercurial Repository from comment 4)
> Changeset [e420421d4be7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e420421d4be7) made by Richard Koopmanschap
> <richard.koopmanschap@monetdbsolutions.com> in the MonetDB repo, refers to
> this bug.
>
> For complete details, see
> [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e420421d4be7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e420421d4be7)
>
> Changeset description:
>
> Added test for bug #6140
Back ported the tests from default to Dec2016
## Comment 24912
Date: 2017-01-26 14:56:04 +0100
From: @kutsurak
Fixed in version Dec2016-SP1.
| INNER JOIN gives the results of a CROSS JOIN | https://api.github.com/repos/MonetDB/MonetDB/issues/6140/comments | 0 | 2020-11-30T15:28:32Z | 2024-06-27T12:57:30Z | https://github.com/MonetDB/MonetDB/issues/6140 | 753,573,593 | 6,140 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-12-07 18:11:26 +0100
From: Richard Hughes <<richard.monetdb>>
To: buildtools devs <<bugs-buildtools>>
Version: 11.23.13 (Jun2016-SP2)
Last updated: 2016-12-21 13:07:32 +0100
## Comment 24759
Date: 2016-12-07 18:11:26 +0100
From: Richard Hughes <<richard.monetdb>>
Looks like a mistaken equality in the control file. < confusingly means <= (see paragraph 4 of https://www.debian.org/doc/debian-policy/ch-relationships.html)
Fix:
diff -r [ee4843caa75a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ee4843caa75a) debian/control
--- a/debian/control Wed Dec 07 15:18:10 2016 +0100
+++ b/debian/control Wed Dec 07 17:07:06 2016 +0000
@@ -16,7 +16,7 @@
Package: libmonetdb13
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
-Conflicts: libmonetdb5-server-geom (< ${source:Version})
+Conflicts: libmonetdb5-server-geom (<< ${source:Version})
Description: MonetDB core library
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
## Comment 24760
Date: 2016-12-08 09:57:07 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [1e281b8dc9a8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1e281b8dc9a8) 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=1e281b8dc9a8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1e281b8dc9a8)
Changeset description:
Utterly unconventional Debian syntax.
Fixes bug #6139.
| Debian libmonetdb13 conflicts with libmonetdb5-server-geom | https://api.github.com/repos/MonetDB/MonetDB/issues/6139/comments | 0 | 2020-11-30T15:28:29Z | 2024-06-27T12:57:29Z | https://github.com/MonetDB/MonetDB/issues/6139 | 753,573,537 | 6,139 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-12-02 12:21:24 +0100
From: Richard Hughes <<richard.monetdb>>
To: GDK devs <<bugs-common>>
Version: 11.23.13 (Jun2016-SP2)
CC: arkr17997, rosecorthan23
Last updated: 2019-09-13 08:42:15 +0200
## Comment 24748
Date: 2016-12-02 12:21:24 +0100
From: Richard Hughes <<richard.monetdb>>
Build is default branch [8086d2d529f2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8086d2d529f2)
varchar (and other variable-length columns) store their actual values in a separate .theap file, with a hash structure in order to eliminate duplicate values. This works well for heaps smaller than 64KB, however heaps larger than that switch to an alternate set of heuristics, whose implementation details make it much less effective than it should be. This causes unnecessarily high disk usage, with the corresponding performance decrease due to more data needing to be accessed.
To reproduce:
sql>create table foo as select cast(value as varchar(64)) as v from generate_series(cast(0 as int),2500) with data;
sql>select count(*) from foo;insert into foo values ('dupe');select heapsize from sys.storage() where "table"='foo';
The second line should be run repeatedly. This is the easiest possible case of duplicate elimination (inserting the exact same value as last time), however the heapsize still increases over time. The de-duplication appears to get lost during bl_restart(), so running that line once every 30 seconds shows the heapsize increasing each time.
The duplicate elimination breaks because BATload_intern() calls strCleanHash(), which memsets the entire hash table to zero - any time the BAT is unloaded and reloaded then all de-duplication is lost. The change in [4faed73ce142](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4faed73ce142) made unload/reload happen significantly more frequently than it used to. The explanation for the hash zeroing appears in a comment in [e6d90b529745](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e6d90b529745) "heap may have been mmaped-ed, appended-by-force, and then corrupted by crash".
If that is the only reason for the wipe then I reckon this might work instead:
diff -r [8086d2d529f2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8086d2d529f2) gdk/gdk_atoms.c
--- a/gdk/gdk_atoms.c Thu Dec 01 21:29:14 2016 +0100
+++ b/gdk/gdk_atoms.c Fri Dec 02 11:02:02 2016 +0000
@@ -1131,8 +1131,11 @@
{
(void) rebuild;
if (!GDK_ELIMDOUBLES(h)) {
- /* flush hash table for security */
- memset(h->base, 0, GDK_STRHASHSIZE);
+ stridx_t *bucket = (stridx_t*)h->base;
+ int i;
+ for (i = 0; i < GDK_STRHASHTABLE; ++i)
+ if (bucket[i] >= h->free)
+ bucket[i] = 0;
} else {
/* rebuild hash table for double elimination
*
If there are other reasons for the wipe (e.g. dealing with files from older versions which may be differently formatted) then that won't work. It will work for the case of a change to the hash function, although it won't be particularly effective until new values are inserted with the new hash function.
The only alternative I can currently think of is to rebuild the hash table based on the first 64KB of data and hope that the value distribution in the column hasn't changed too much over time. It may be worth, however, thinking about ways to avoid the cost of the 'else' branch too - rebuilding the whole hash table every time the BAT is loaded is not an insignificant amount of CPU usage.
## Comment 24959
Date: 2017-02-03 10:06:10 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [2ff5b4701e0e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2ff5b4701e0e) 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=2ff5b4701e0e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2ff5b4701e0e)
Changeset description:
Only clean out the hash table at start of string heap when starting server.
The idea behind cleaning the hash at all is that we can't trust the
contents of the hash table after a server restart since we may have
been half way through changing the string heap when the server shut
down (new entries were added, but not committed, so on restart the
free pointer was reset and the hash table points into limbo).
We now only clean out the hash table at server start, not when
reloading the heap during normal operations.
This should fix bug #6138.
## Comment 25080
Date: 2017-03-02 15:42:22 +0100
From: @sjoerdmullender
I implemented a different fix: only clean the hash table the first time a string heap is loaded after server restart.
Looking at your proposed fix I see that it can't work. The contents of the hash table are offsets within the last 64k "page" of the string heap, not offsets from the start of the string heap. This means that if a string heap grew across a page border before a server crash, the offsets are completely off.
I don't remember what exact circumstances caused me to conclude that we needed to clean out the hash table, but assuming that we really needed to do this, my current solution seems to me to be the best we can do.
## Comment 26753
Date: 2018-12-25 07:23:06 +0100
From: Thanos <<arkr17997>>
I am here for the share this amazing post need to follow here http://syncsettingswindows10.com and save the all internet setting of windows latest version for the easily update to system.
## Comment 27281
Date: 2019-09-13 08:42:15 +0200
From: Shelton <<rosecorthan23>>
Online VAPE SHOP offers top quality http://schloss34.bravesites.com
| Weak duplicate elimination in string heaps > 64KB | https://api.github.com/repos/MonetDB/MonetDB/issues/6138/comments | 0 | 2020-11-30T15:28:25Z | 2024-06-27T12:57:28Z | https://github.com/MonetDB/MonetDB/issues/6138 | 753,573,494 | 6,138 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-12-02 07:50:51 +0100
From: daniel.zvinca
To: SQL devs <<bugs-sql>>
Version: 11.23.13 (Jun2016-SP2)
CC: daniel.zvinca
Last updated: 2016-12-02 08:00:31 +0100
## Comment 24747
Date: 2016-12-02 07:50:51 +0100
From: daniel.zvinca
User-Agent: Mozilla/5.0 (Linux; Android 6.0.1; SM-T810 Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.85 Safari/537.36
Build Identifier:
As a column store engine, MonetDB should be able to add or change directly values from external files in natural order. A similar syntax for bulk update makes also sense. UPDATE qname SET (ucolumn1, ucolumn2, ...) COPY [BINARY] FROM 'csvfile'|('binfile1', 'binfile2')
Reproducible: Always
### Actual Results:
Even if is not at all standard SQL, a full replacement of a column with some late computed values in other environments is a common action. Inserting binary into a temporary table and then updating the target column using a row_number() like join does not look reasonable. Using a common primary key for both target dataset and temporary table would introduce even more unnecessary overhead, yet it looks to me the only safe approach I could come up with.
| ALTER TABLE qname ADD COLUMN ncołumn COPY [BINARY] FROM 'external_file' | https://api.github.com/repos/MonetDB/MonetDB/issues/6137/comments | 0 | 2020-11-30T15:28:21Z | 2024-06-28T06:57:49Z | https://github.com/MonetDB/MonetDB/issues/6137 | 753,573,448 | 6,137 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-12-01 20:15:01 +0100
From: daniel.zvinca
To: clients devs <<bugs-clients>>
Version: 11.23.13 (Jun2016-SP2)
CC: @hannesmuehleisen
Last updated: 2017-01-10 13:20:20 +0100
## Comment 24745
Date: 2016-12-01 20:15:01 +0100
From: daniel.zvinca
User-Agent: Mozilla/5.0 (Linux; Android 6.0.1; SM-T810 Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.85 Safari/537.36
Build Identifier:
Build application using Embarcadero 64bit compiler. mapi dll was succesfully imported and statically linked to application. Most of the mapi functions work just fine, but platform specific implementations like FILE * are not portable.
1. FILE * is not a portable structure, host program passing FIlE * will crash.
2. Freeing char * memory allocated in dll library (mapi_quote...) will crash host program.
3. similar discussion for stream related functions
Reproducible: Always
### Steps to Reproduce:
1.import libmapi.dll > libmapi.a (using Embarcadero tools for 64 bit)
2.static link libmapi.a
3.run any function from mapi using FILE * will crash the application
4.free(mapi_quote(mapi hdl, char *str)) will crash the application
### Actual Results:
application compiles just fine, it also works fine for most of the functions, but it crashes in above situations
if dll is using its own allocator, char * cannot be freed by host application, so mapifreechar function is required in mapilib, or
FILE *cannot be passed from host application, not being a portable structure
## Comment 24873
Date: 2017-01-10 12:52:19 +0100
From: @hannesmuehleisen
I'd suggest to recompile the MAPI lib with your compiler then?
## Comment 24874
Date: 2017-01-10 13:20:20 +0100
From: daniel.zvinca
This seems to be quite of a task even for tested Microsoft compiler, nevermind a not tested one. For comparison sqlite, mysql, firebird, to name just a few database engines have all portable Client C API in their dll's. The least I would suggest to be done is to conditionally publish the nonportable api in the header file.
| some of MAPI arguments are not portable | https://api.github.com/repos/MonetDB/MonetDB/issues/6136/comments | 0 | 2020-11-30T15:28:19Z | 2024-06-28T13:11:38Z | https://github.com/MonetDB/MonetDB/issues/6136 | 753,573,415 | 6,136 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-12-01 17:17:49 +0100
From: Gatis Ozolins <<g.ozolins>>
To: SQL devs <<bugs-sql>>
Version: 11.23.3 (Jun2016)
Last updated: 2016-12-15 15:31:38 +0100
## Comment 24742
Date: 2016-12-01 17:17:49 +0100
From: Gatis Ozolins <<g.ozolins>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:50.0) Gecko/20100101 Firefox/50.0
Build Identifier:
When connection to MonetDB server,
if I use localhost then connection is instant
but if I use external interface, then connection takes 10seconds
Reproducible: Sometimes
### Steps to Reproduce:
-bash-4.2$ time mclient -h 192.168.23.139 -d DWH run.sql
+--------------+
| single_value |
+==============+
| 1 |
+--------------+
1 tuple
real 0m10.024s
user 0m0.004s
sys 0m0.007s
-bash-4.2$ time mclient -h localhost -d DWH run.sql
+--------------+
| single_value |
+==============+
| 1 |
+--------------+
1 tuple
real 0m0.015s
user 0m0.005s
sys 0m0.007s
Looking at ltrace output wait happens between mapi_error and mapi_reconnect.
## Comment 24777
Date: 2016-12-15 15:09:16 +0100
From: Gatis Ozolins <<g.ozolins>>
I found that this DNS issue.
If I put 192.168.23.139 in hosts file, then connection is instant
## Comment 24778
Date: 2016-12-15 15:31:38 +0100
From: @sjoerdmullender
DNS is outside our scope. Sounds like a system configuration error.
| Connection to external interface takes 10seconds | https://api.github.com/repos/MonetDB/MonetDB/issues/6135/comments | 0 | 2020-11-30T15:28:15Z | 2024-06-28T13:11:37Z | https://github.com/MonetDB/MonetDB/issues/6135 | 753,573,362 | 6,135 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-12-01 13:30:30 +0100
From: Gatis Ozolins <<g.ozolins>>
To: GDK devs <<bugs-common>>
Version: 11.27.5 (Jul2017-SP1)
CC: ajdamico, @hannesmuehleisen, @PedroTadim, winney.deng
Last updated: 2019-11-28 10:00:06 +0100
## Comment 24740
Date: 2016-12-01 13:30:30 +0100
From: Gatis Ozolins <<g.ozolins>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:50.0) Gecko/20100101 Firefox/50.0
Build Identifier:
Query results in: HEAPalloc: Insufficient space for HEAP of 1168033427456 bytes.
Reproducible: Always
### Steps to Reproduce:
table_data.tar.gz
CREATE TABLE all_dates (d_date date, month_code varchar(7));
CREATE TABLE book (code varchar(15));
CREATE TABLE category (id bigint, category_code varchar(30), subcategory_code varchar(30));
CREATE TABLE fact (s1_id varchar(25), s2_id varchar(25), s3_id varchar(25), s4_id varchar(25), book_code varchar(15), category_id bigint, location_id bigint, d_period date);
CREATE TABLE location (id bigint, code varchar(30));
CREATE TABLE segment1 (id varchar(150), code varchar(150));
CREATE TABLE segment2 (id varchar(150), code varchar(150));
CREATE TABLE segment3 (id varchar(150), code varchar(150));
CREATE TABLE segment4 (id varchar(150), code varchar(150));
COPY INTO category FROM 'category.csv' DELIMITERS '|' , '\n', '"';
COPY INTO all_dates FROM 'all_dates.csv' DELIMITERS '|' , '\n', '"';
COPY INTO book FROM 'book.csv' DELIMITERS '|' , '\n', '"';
COPY INTO fact FROM 'fact.csv' DELIMITERS '|' , '\n', '"';
COPY INTO location FROM 'location.csv' DELIMITERS '|' , '\n', '"';
COPY INTO segment1 FROM 'segment1.csv' DELIMITERS '|' , '\n', '"';
COPY INTO segment2 FROM 'segment2.csv' DELIMITERS '|' , '\n', '"';
COPY INTO segment3 FROM 'segment3.csv' DELIMITERS '|' , '\n', '"';
COPY INTO segment4 FROM 'segment4.csv' DELIMITERS '|' , '\n', '"';
SELECT loc.code
,cat.subcategory_code
,cat.category_code
,s1.code
,s2.code
,s3.code
,s4.code
,d.d_date
,d.month_code
FROM category cat
,book b
,location loc
,all_dates d
,segment4 s4
,segment3 s3
,segment2 s2
,segment1 s1
,fact f
WHERE b.code = f.book_code
AND d.d_date = f.d_period
AND s4.id = f.s4_id
AND s3.id = f.s3_id
AND s2.id = f.s2_id
AND s1.id = f.s1_id
AND loc.id = f.location_id
AND b.code = 'G2FIN'
AND cat.id = f.category_id
AND f.book_code = 'G2FIN'
AND ( cat.subcategory_code = 200 OR cat.subcategory_code = 301 OR cat.subcategory_code >= 221 )
AND ( cat.subcategory_code = 200 OR cat.subcategory_code = 301 OR cat.subcategory_code <= 290 )
AND ( s1.code = '03' OR cat.subcategory_code = 25 )
AND d.month_code BETWEEN '2016.01' AND '2016.10';
### Actual Results:
GDK reported error.
GDKextendf: could not extend file.
!OS: No space left on device.
HEAPalloc: Insufficient space for HEAP of 1168033427456 bytes.
### Expected Results:
Query returns results
It seems there is something wrong with "OR" parsing/processing.
As soon as I remove "( s1.code = '03' OR cat.subcategory_code = 25 )", query momentary returns results.
Also depending on how many tables/columns are in SQL, sometimes it just takes 100G of hdd space/virtual memory and never returns result.
## Comment 24741
Date: 2016-12-01 13:31:10 +0100
From: Gatis Ozolins <<g.ozolins>>
Created attachment 520
Data to reproduce this issue
> Attached file: [table_data.tar.gz](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6134_table_data.tar.gz_520) (application/gzip, 99993 bytes)
> Description: Data to reproduce this issue
## Comment 24842
Date: 2016-12-21 16:03:54 +0100
From: Gatis Ozolins <<g.ozolins>>
Tested with 11.25.3: still produces same error
## Comment 24875
Date: 2017-01-10 15:26:59 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [d21bef4f8fdd](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d21bef4f8fdd) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d21bef4f8fdd](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d21bef4f8fdd)
Changeset description:
Added test for Bug #6134
## Comment 24876
Date: 2017-01-10 15:36:39 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [f0eaa26022fe](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f0eaa26022fe) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f0eaa26022fe](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f0eaa26022fe)
Changeset description:
new files, Bug #6134
## Comment 24877
Date: 2017-01-10 15:41:49 +0100
From: @hannesmuehleisen
From looking at plan, it seems like the joins deteriorate into cross products when adding that single condition.
## Comment 24878
Date: 2017-01-10 15:55:08 +0100
From: @hannesmuehleisen
This also happens in default
## Comment 25681
Date: 2017-10-06 18:05:10 +0200
From: Gatis Ozolins <<g.ozolins>>
Still hapens only latest version.
I found one workaround: if I change order of tables listed in FROM section, then query executes successfully in less than 1 second.
However we can't control order of tables listed as SQL generated by BI.
## Comment 27233
Date: 2019-08-19 09:19:27 +0200
From: winney.deng
We see the same error with SQL select query in version: v11.33.3, v11.31.13 and current development version.
Test environment:
Memory: 4G
Swap: 1.8G
Free disk: 31G
### Steps to reproduce:
1. Load data into monetdb:
We loaded about 760k tuples into tableA and 2846k tuples into tableB from csv files by sql COPY command.
2. Do below SQL select command:
select fdd.*
from "tableA" fdd,
"tableB" rp
where fdd."me" = rp."me" and
( fdd."date_id" = '2019-06-26' or fdd."date_id" = '2019-06-27' or
fdd."date_id" = '2019-06-28' or fdd."date_id" = '2019-06-27' or
fdd."date_id" = '2019-06-28' or fdd."date_id" = '2019-06-27');
After doing the above select query, we found
1. Monetdb data file increase very fast (before query it is 3.7G, after query 34G)
When monetdb crashed, killed and restarted, the disk space was freed.
2. Swap was exhausted by monetdb
3. Below errors were seen in log (v11.33.13, dev version) or screen(v11.33.3):
GDK reported error: GDKextendf: could not extend file
OS: No space left on device
HEAPalloc: Insufficient space for HEAP of 9093120 bytes.
Below are logs from the current dev version (Aug. 2019)
-------------------------------------------------------
2019-08-19 06:26:15 ERR db[214]: DFLOWworker5:!OS: No space left on device
2019-08-19 06:26:15 ERR db[214]: DFLOWworker5:!ERROR: HEAPalloc: Insufficient space for HEAP of 587759616 bytes.
2019-08-19 06:26:15 ERR db[214]: DFLOWworker5:!ERROR:MALException:mat.pack:HY001!Could not allocate space
2019-08-19 06:26:16 ERR db[214]: DFLOWworker16:!ERROR: GDKextendf: could not extend file
2019-08-19 06:26:16 ERR db[214]: DFLOWworker16:!OS: No space left on device
2019-08-19 06:26:16 ERR db[214]: DFLOWworker16:!ERROR: HEAPalloc: Insufficient space for HEAP of 587759616 bytes.
2019-08-19 06:26:16 ERR db[214]: DFLOWworker16:!ERROR:MALException:mat.pack:HY001!Could not allocate space
2019-08-19 06:26:16 ERR db[214]: DFLOWworker12:!ERROR: GDKextendf: could not extend file
2019-08-19 06:26:16 ERR db[214]: DFLOWworker12:!OS: No space left on device
2019-08-19 06:26:16 ERR db[214]: DFLOWworker12:!ERROR: HEAPalloc: Insufficient space for HEAP of 587792384 bytes.
2019-08-19 06:26:16 ERR db[214]: DFLOWworker12:!ERROR:MALException:mat.pack:HY001!Could not allocate space
## Comment 27254
Date: 2019-08-23 12:10:16 +0200
From: @PedroTadim
In the main development branch of MonetDB we optimized IN statements as well OR clauses inside WHERE statements to perform a single semi-join instead of multiple theta-select statements. The performance of these queries should improve in the next feature release of MonetDB.
## Comment 27411
Date: 2019-11-15 13:47:05 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [3cf4189df085](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3cf4189df085) made by Pedro Ferreira <pedro.ferreira@monetdbsolutions.com> in the MonetDB repo, refers to this bug.
For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=3cf4189df085](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=3cf4189df085)
Changeset description:
Fixes for bug #6134, ie run rel_push_select_down optimizer after rel_join_order, so the later gets more optimizing options to push down joins.
Also some identitation fixes and limit the depth of rel_find_joins to 20 relations bellow in the relation tree.
| Query produces error: HEAPalloc: Insufficient space for HEAP of 1168033427456 bytes. | https://api.github.com/repos/MonetDB/MonetDB/issues/6134/comments | 0 | 2020-11-30T15:28:12Z | 2024-06-27T12:57:23Z | https://github.com/MonetDB/MonetDB/issues/6134 | 753,573,313 | 6,134 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-11-28 16:21:26 +0100
From: Dean De Leo <<dleo>>
To: SQL devs <<bugs-sql>>
Version: 11.23.13 (Jun2016-SP2)
CC: @njnes
Last updated: 2017-03-03 10:24:50 +0100
## Comment 24728
Date: 2016-11-28 16:21:26 +0100
From: Dean De Leo <<dleo>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.100 Safari/537.36
Build Identifier:
While preparing the attached statement, the server crashes during the query semantic phase due to an unexpected null pointer.
On Linux, debug build up to 62173:60942e23e88f (default branch), empty tables.
Reproducible: Always
### Steps to Reproduce:
1. See attached repro, schema included.
### Actual Results:
Segmentation fault
## Comment 24729
Date: 2016-11-28 16:21:45 +0100
From: Dean De Leo <<dleo>>
Created attachment 518
repro1.sql
> Attached file: [prepare.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6133_prepare.sql_518) (application/sql, 1114 bytes)
> Description: repro1.sql
## Comment 24730
Date: 2016-11-28 16:23:12 +0100
From: Dean De Leo <<dleo>>
Created attachment 519
debugger backtrace (.txt)
> Attached file: [backtrace.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6133_backtrace.txt_519) (text/plain, 4016 bytes)
> Description: debugger backtrace (.txt)
## Comment 24731
Date: 2016-11-28 16:27:37 +0100
From: Dean De Leo <<dleo>>
Simpler repro script:
DROP TABLE test105;
CREATE TABLE test105 (A INT, B INT);
PREPARE
INSERT INTO test105
SELECT temp.t1, parent.B
FROM ( VALUES (?, ?) ) AS temp(t1, t2)
JOIN test105 parent ON (parent.A = temp.t2)
;
## Comment 25025
Date: 2017-02-15 20:12:05 +0100
From: @njnes
fixed by recent changes
## Comment 25026
Date: 2017-02-15 20:18:05 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [03e3845c01e0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=03e3845c01e0) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=03e3845c01e0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=03e3845c01e0)
Changeset description:
added test for bug #6133
## Comment 25128
Date: 2017-03-03 10:24:50 +0100
From: @sjoerdmullender
Dec2016-SP2 has been released, incorporating the fix.
| A crash occurs when preparing an INSERT on joined tables during the query semantic phase | https://api.github.com/repos/MonetDB/MonetDB/issues/6133/comments | 0 | 2020-11-30T15:28:09Z | 2024-06-27T12:57:22Z | https://github.com/MonetDB/MonetDB/issues/6133 | 753,573,266 | 6,133 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-11-28 15:40:43 +0100
From: Dean De Leo <<dleo>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Duplicates: #6131
Last updated: 2020-09-21 20:32:54 +0200
## Comment 24726
Date: 2016-11-28 15:40:43 +0100
From: Dean De Leo <<dleo>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.100 Safari/537.36
Build Identifier:
In case a FK constraint is violated during an INSERT, MonetDB prints the wrong identifier of the constraint being violated.
The repro is also related to bug #6131
Reproducible: Always
### Steps to Reproduce:
1. See attached repro script
## Comment 24727
Date: 2016-11-28 15:41:26 +0100
From: Dean De Leo <<dleo>>
Created attachment 517
repro.sql
> Attached file: [repro1.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6132_repro1.sql_517) (application/sql, 509 bytes)
> Description: repro.sql
## Comment 26807
Date: 2019-01-18 11:39:55 +0100
From: @sjoerdmullender
The problem is actually that any constraint is being violated. There are no constraints being violated, but the serever reports that one is.
If you were to add the constraints *after* the insert (using ALTER TABLE), no constraints will be reported as being violated.
The real problem is that you have a constraint on one column of a table that references another column of that same table, and in addition that you're adding a tuple where the referenced value is added at the same time as the referencing value (i.e. both the primary and foreign key are in the same tuple).
This works:
CREATE TABLE test102(
T INT NOT NULL PRIMARY KEY
);
CREATE TABLE test101(
A INT NOT NULL PRIMARY KEY,
B INT NOT NULL,
C INT NOT NULL
);
INSERT INTO test102 VALUES (102); --ok
INSERT INTO test101 VALUES (101, 102, 101);
ALTER TABLE test101 ADD CONSTRAINT "fB" FOREIGN KEY (B) REFERENCES test102(T);
ALTER TABLE test101 ADD CONSTRAINT "fC" FOREIGN KEY (C) REFERENCES test101(A);
## Comment 26847
Date: 2019-01-23 13:40:20 +0100
From: @njnes
similar problem as bug #6131 then
## Comment 28100
Date: 2020-09-21 20:32:54 +0200
From: @njnes
*** This bug has been marked as a duplicate of bug #6131 ***
| Wrong identifier reported when a FK constraint is violated | https://api.github.com/repos/MonetDB/MonetDB/issues/6132/comments | 0 | 2020-11-30T15:28:05Z | 2024-06-28T06:58:28Z | https://github.com/MonetDB/MonetDB/issues/6132 | 753,573,199 | 6,132 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-11-28 15:34:23 +0100
From: Dean De Leo <<dleo>>
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2020-09-21 20:32:54 +0200
## Comment 24724
Date: 2016-11-28 15:34:23 +0100
From: Dean De Leo <<dleo>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.100 Safari/537.36
Build Identifier:
Performing an INSERT seems to violate the foreign key constraints that refer the same table, where the referred key is also the same inserted key. This is inconsistent with the behaviour of disabling the foreign key, inserting the data, and eventually re-enabling the foreign key constraint. In this latter case the INSERT statements succeed.
AFAIK any foreign key constraint should be checked after the update has taken place, so that the former statement should be allowed.
Reproducible: Always
### Steps to Reproduce:
1. See attached repro
### Actual Results:
The INSERT statement is rejected due to the foreign key being violated
### Expected Results:
The INSERT statement should be allowed
## Comment 24725
Date: 2016-11-28 15:35:09 +0100
From: Dean De Leo <<dleo>>
Created attachment 516
repro.sql
> Attached file: [repro2.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6131_repro2.sql_516) (application/sql, 388 bytes)
> Description: repro.sql
## Comment 25146
Date: 2017-03-09 17:18:20 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [73b379ba7970](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=73b379ba7970) 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=73b379ba7970](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=73b379ba7970)
Changeset description:
Add test for bug #6131
## Comment 28101
Date: 2020-09-21 20:32:54 +0200
From: @njnes
*** Bug #6132 has been marked as a duplicate of this bug. ***
| FK constraint violated in self table references | https://api.github.com/repos/MonetDB/MonetDB/issues/6131/comments | 0 | 2020-11-30T15:28:01Z | 2024-06-28T06:58:46Z | https://github.com/MonetDB/MonetDB/issues/6131 | 753,573,131 | 6,131 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-11-23 16:44:29 +0100
From: Dean De Leo <<dleo>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2017-03-03 10:24:58 +0100
## Comment 24711
Date: 2016-11-23 16:44:29 +0100
From: Dean De Leo <<dleo>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36
Build Identifier:
The DBMS crashes on the attached due to an unexpected NULL pointer. Possibly related to bug #6114
On Linux, tip of the default branch, debug build, empty tables.
Reproducible: Always
### Steps to Reproduce:
1. Load the attached schema
2. Issue the attached query
3. Server crash
### Actual Results:
Segmentation fault while attempting to read the memory address 0x20.
## Comment 24712
Date: 2016-11-23 16:45:30 +0100
From: Dean De Leo <<dleo>>
Created attachment 513
schema.sql
> Attached file: [schema.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6130_schema.sql_513) (application/sql, 8571 bytes)
> Description: schema.sql
## Comment 24713
Date: 2016-11-23 16:46:37 +0100
From: Dean De Leo <<dleo>>
Created attachment 514
query.sql
> Attached file: [Q04.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6130_Q04.sql_514) (application/sql, 996 bytes)
> Description: query.sql
## Comment 24714
Date: 2016-11-23 16:48:18 +0100
From: Dean De Leo <<dleo>>
Created attachment 515
debugger backtrace (.txt)
> Attached file: [backtrace.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6130_backtrace.txt_515) (text/plain, 5085 bytes)
> Description: debugger backtrace (.txt)
## Comment 25014
Date: 2017-02-12 14:18:43 +0100
From: @njnes
fixed by changes to deadcode optimizer
## Comment 25015
Date: 2017-02-12 14:19:48 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [1bb2f68b79ef](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1bb2f68b79ef) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1bb2f68b79ef](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1bb2f68b79ef)
Changeset description:
fixes for bug #6130
## Comment 25133
Date: 2017-03-03 10:24:58 +0100
From: @sjoerdmullender
Dec2016-SP2 has been released, incorporating the fix.
| Query rewriter crashes on a NULL pointer when having a correlated subquery | https://api.github.com/repos/MonetDB/MonetDB/issues/6130/comments | 0 | 2020-11-30T15:27:58Z | 2024-06-27T12:57:19Z | https://github.com/MonetDB/MonetDB/issues/6130 | 753,573,087 | 6,130 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-11-23 13:16:29 +0100
From: @eyalroz
To: GDK devs <<bugs-common>>
Version: 11.23.13 (Jun2016-SP2)
Last updated: 2016-11-24 11:41:52 +0100
## Comment 24710
Date: 2016-11-23 13:16:29 +0100
From: @eyalroz
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0
Build Identifier:
If you GDKinit() without having BBPaddfarm()'ed before, the code tries to dereference a null pointer: GDKfilepath() is run with farm_id 0, and it has the line:
pathlen = (farmid == NOFARM ? 0 : strlen(BBPfarms[farmid].dirname) + 1)
since NOFARM is -1, this runs strlen(BBPfarms[0].dirname), i.e. strlen(0x0), which segfaults.
Even if there should be a failure, I believe it should be a bit more graceful (e.g. GDKinit should ensure there's as many BBPfarms as the index supplied to it, and if not, write and error message and die.
Additionally, if BBPinit() is run when no farms are present, it defaults to first adding the current directory as a farm:
if (BBPfarms[0].dirname == NULL)
BBPaddfarm(".", (1 << PERSISTENT) | (1 << TRANSIENT));
why not do the same in GDKinit()?
Reproducible: Always
| BBPinit supports no BBPfarms initially, but GDKinit doesn't (and crashes) | https://api.github.com/repos/MonetDB/MonetDB/issues/6129/comments | 0 | 2020-11-30T15:27:55Z | 2024-06-28T06:59:55Z | https://github.com/MonetDB/MonetDB/issues/6129 | 753,573,046 | 6,129 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-11-22 23:06:46 +0100
From: @eyalroz
To: GDK devs <<bugs-common>>
Version: 11.23.13 (Jun2016-SP2)
Last updated: 2016-11-30 10:32:53 +0100
## Comment 24709
Date: 2016-11-22 23:06:46 +0100
From: @eyalroz
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0
Build Identifier:
In common/utils/ , there's a file named s_nextafterf.c , which gets included by mutils.c in the same directory in case the system doesn't have that C99 function in <math.h> . Now, this s_nextafterf.c does:
include "math.h"
but there is no file named. math.h in the source tarball. This means that whenever that file is included, the build breaks; and that means that the build breaks on a typical system which has a pre-C99 C library.
Handle as you see fit...
Reproducible: Always
Fijne feestdagen :-)
## Comment 24732
Date: 2016-11-29 13:36:08 +0100
From: @sjoerdmullender
math.h is supposed to come from /usr/include, so it is not part of the MonetDB sources.
If it is missing from /usr/include, fix your system, if the compiler doesn't find it, fix the compiler.
## Comment 24735
Date: 2016-11-29 23:00:42 +0100
From: @eyalroz
(In reply to Sjoerd Mullender from comment 1)
> math.h is supposed to come from /usr/include, so it is not part of the
> MonetDB sources.
That would be <math.h>, not "math.h", wouldn't it?
## Comment 24736
Date: 2016-11-30 10:32:53 +0100
From: @sjoerdmullender
(In reply to Eyal Rozenberg from comment 2)
> (In reply to Sjoerd Mullender from comment 1)
> > math.h is supposed to come from /usr/include, so it is not part of the
> > MonetDB sources.
>
> That would be <math.h>, not "math.h", wouldn't it?
Either way works. The latter searches in more places, but also in the standard location.
| A dependency for s_nextafterf.c is missing | https://api.github.com/repos/MonetDB/MonetDB/issues/6128/comments | 0 | 2020-11-30T15:27:52Z | 2024-06-28T07:04:54Z | https://github.com/MonetDB/MonetDB/issues/6128 | 753,573,004 | 6,128 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-11-21 16:15:14 +0100
From: Dean De Leo <<dleo>>
To: clients devs <<bugs-clients>>
Version: -- development
CC: martin.van.dinther
Last updated: 2016-11-25 15:35:33 +0100
## Comment 24706
Date: 2016-11-21 16:15:14 +0100
From: Dean De Leo <<dleo>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36
Build Identifier:
The JDBC driver does not allow to bind variables where markers appear in the SELECT clause. This might be useful inside a WITH clause, to avoid repeating the same value multiple times, e.g.:
WITH p AS ( SELECT ? AS id )
SELECT * FROM myTable t WHERE t.id = (SELECT id FROM p) OR t.friendId = (SELECT id FROM p);
Note that this feature is at least allowed by SQLite3...
On Linux, debug build, default branch at 62170:60942e23e88f, JDBC driver v2.23.
Reproducible: Always
### Steps to Reproduce:
1. See the attached java snippet
### Actual Results:
The following exception is thrown in the host process:
Exception in thread "main" java.sql.SQLException: SELECT: subquery result missing
at nl.cwi.monetdb.jdbc.MonetConnection$ResponseList.executeQuery(MonetConnection.java:2602)
at nl.cwi.monetdb.jdbc.MonetConnection$ResponseList.processQuery(MonetConnection.java:2350)
at nl.cwi.monetdb.jdbc.MonetStatement.internalExecute(MonetStatement.java:507)
at nl.cwi.monetdb.jdbc.MonetStatement.execute(MonetStatement.java:345)
at nl.cwi.monetdb.jdbc.MonetPreparedStatement.<init>(MonetPreparedStatement.java:106)
at nl.cwi.monetdb.jdbc.MonetConnection.prepareStatement(MonetConnection.java:923)
at nl.cwi.monetdb.jdbc.MonetConnection.prepareStatement(MonetConnection.java:845)
### Expected Results:
The external value should be properly bound to the parameter marker.
## Comment 24707
Date: 2016-11-21 16:19:36 +0100
From: Dean De Leo <<dleo>>
Created attachment 512
repro.java
> Attached file: [repro.java](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6127_repro.java_512) (text/x-java, 1169 bytes)
> Description: repro.java
## Comment 24708
Date: 2016-11-21 16:20:25 +0100
From: Dean De Leo <<dleo>>
Comment on attachment 512
repro.java
Need to rename JDBC_Repro.java per Java convention.
## Comment 24715
Date: 2016-11-24 13:07:25 +0100
From: Martin van Dinther <<martin.van.dinther>>
It appears that your SQL queries
"WITH v AS ( SELECT ? AS p ) SELECT * FROM jdbc_test WHERE A = (SELECT p FROM v);"
cannot be prepared, due to syntax error.
Try with mclient:
sql>CREATE TABLE jdbc_test (A INT NOT NULL PRIMARY KEY, B INT NOT NULL);
operation successful (20.914ms)
sql>INSERT INTO jdbc_test VALUES (1, 1), (2, 2), (3, 3);
3 affected rows (12.811ms)
sql>select * from jdbc_test;
+------+------+
| a | b |
+======+======+
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
+------+------+
3 tuples (1.200ms)
sql>prepare WITH v AS ( SELECT ? AS p ) SELECT * FROM jdbc_test WHERE A = (SELECT p FROM v);
SELECT: subquery result missing
sql>prepare WITH p AS ( SELECT ? AS id )
more>SELECT * FROM myTable t WHERE t.id = (SELECT id FROM p) OR t.friendId = (SELECT id FROM p);
SELECT: subquery result missing
sql>
So the problem is in your usage of SQL query syntax, not the JDBC driver.
The "SELECT ? AS id" is not proper usage of parameterised SQL queries.
Use instead:
SELECT * FROM jdbc_test WHERE A = ?;
from mclient:
sql>prepare SELECT * FROM jdbc_test WHERE A = ?;
execute prepared statement using: EXEC 9(...)
+------+--------+-------+--------+-----------+--------+
| type | digits | scale | schema | table | column |
+======+========+=======+========+===========+========+
| int | 32 | 0 | | jdbc_test | a |
| int | 32 | 0 | | jdbc_test | b |
| int | 32 | 0 | null | null | null |
+------+--------+-------+--------+-----------+--------+
3 tuples (1.257ms)
sql>exec 9(2);
+------+------+
| a | b |
+======+======+
| 2 | 2 |
+------+------+
1 tuple (0.775ms)
sql>exec 9(3);
+------+------+
| a | b |
+======+======+
| 3 | 3 |
+------+------+
1 tuple (0.700ms)
sql>exec 9(4);
+---+---+
| a | b |
+===+===+
+---+---+
0 tuples (0.712ms)
sql>
## Comment 24716
Date: 2016-11-24 13:55:01 +0100
From: Dean De Leo <<dleo>>
Ouch I was not aware you can prepare statements using mclient, nice :)
For an use case, please consider the following more realistic query as instance:
params AS (
SELECT
id, month_ AS month0, (CASE (month_ +1) WHEN 13 THEN 1 ELSE month_ +1 END) AS month1
FROM (
SELECT
2199023256684 AS id, /* param 1 */
12 AS month_ /* param 2*/
) AS tmp
),
f0 AS ( SELECT dst AS id FROM friends WHERE src = (SELECT id FROM params) ),
f1 AS ( /* friends -o- friends */
SELECT DISTINCT dst AS id FROM friends f
WHERE f.src IN (SELECT id FROM f0)
AND f.dst NOT IN (SELECT id FROM f0)
AND f.dst <> (SELECT id FROM params)
),
mytags AS (
SELECT tag_id FROM person_tags WHERE person_id = (SELECT id FROM params)
),
matches AS (
SELECT
p.id,
p.firstName,
p.lastName,
p.gender,
places.name AS place_name
FROM f1
JOIN persons p ON (f1.id = p.id)
JOIN places ON (p.place_id = places.id)
WHERE /* birthdate >= 21/month_ */
EXTRACT(MONTH FROM p.birthDay) = (SELECT month0 FROM params)
AND EXTRACT(DAY FROM p.birthDay) >= 21
OR /* birthdate < 22/month_ +1 */
EXTRACT(MONTH FROM p.birthDay) = (SELECT month1 FROM params)
AND EXTRACT(DAY FROM p.birthDay) < 22
)
[...]
Here (SELECT id FROM params) appears 3 times. If I wanted replace the value 2199023256684 with a parameter marker, using the current supported syntax the marker should appear 3 times as well. So it should be bound 3 times from the host language, even though this is the same exact variable. Another disadvantage of this approach is that, potentially, it might inhibit certain rewriting rules, as the optimiser cannot infer whether this is the same variable...
I wonder whether there is a way to bind the value 2199023256684 from the host language only once, without having some sort of magic text such as @MYPARAM@ and performing a rough string replacement in the query, before executing it.
## Comment 24717
Date: 2016-11-24 17:03:54 +0100
From: Martin van Dinther <<martin.van.dinther>>
Your params virtual table:
params AS (
SELECT
id, month_ AS month0, (CASE (month_ +1) WHEN 13 THEN 1 ELSE month_ +1 END) AS month1
FROM (
SELECT
2199023256684 AS id, /* param 1 */
12 AS month_ /* param 2*/
) AS tmp
),
synthesizes a table with one row of 3 columns: id, month0 and month1
As your are using
= (SELECT id FROM params)
code and not
IN (SELECT id FROM params)
you expect the params table query to always return 1 value.
In that case you can use session variables:
DECLARE params_id bigint;
SET params_id = 2199023256684;
DECLARE params_month0 tinyint;
SET params_month0 = 12;
SELECT params_id, params_month0;
and replace:
= (SELECT id FROM params)
with
= params_id
replace:
= (SELECT month0 FROM params)
with
= params_month0
replace:
= (SELECT month1 FROM params)
with
= (CASE (params_month0 +1) WHEN 13 THEN 1 ELSE params_month0 +1 END)
By (re)setting the session variables, it is easy (and in one place) to use different values, e.g.:
SET params_id = 219902325999;
SET params_month0 = 6;
You SQL query code now no longer needs the
params AS (SELECT ...),
part and also does not have any parameters anymore.
This approach also improves performance when the query is executed multiple times (for different values of the params_id and params_month0) as the query is the same each time (pulled from cache).
## Comment 24723
Date: 2016-11-25 15:35:33 +0100
From: Dean De Leo <<dleo>>
Hi Martin,
ok, I've understood the workaround. Thanks for having looked into this.
Dean
| Cannot bind variables with markers in the SELECT clause | https://api.github.com/repos/MonetDB/MonetDB/issues/6127/comments | 0 | 2020-11-30T15:27:48Z | 2024-06-28T07:05:25Z | https://github.com/MonetDB/MonetDB/issues/6127 | 753,572,945 | 6,127 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-11-18 20:48:15 +0100
From: muesli4
To: GDK devs <<bugs-common>>
Version: 11.23.13 (Jun2016-SP2)
Last updated: 2016-12-21 13:08:09 +0100
## Comment 24704
Date: 2016-11-18 20:48:15 +0100
From: muesli4
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0
Build Identifier:
There is not much else to say.
Reproducible: Always
### Actual Results:
!MALException:batcalc.==:bad input types lng,void.
### Expected Results:
I would expect comparing a BAT with voids and one with oids to be succesfull.
## Comment 24705
Date: 2016-11-18 20:49:06 +0100
From: muesli4
Created attachment 511
An example that can be used as a test case. ;)
> Attached file: [bug.mal](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6126_bug.mal_511) (application/octet-stream, 170 bytes)
> Description: An example that can be used as a test case. ;)
## Comment 24733
Date: 2016-11-29 13:58:44 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [86cb2d8b2a70](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=86cb2d8b2a70) 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=86cb2d8b2a70](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=86cb2d8b2a70)
Changeset description:
Don't treat TYPE_oid as TYPE_int/TYPE_lng in comparisons.
This fixes bug #6126.
| batcalc.== can't handle void BATs | https://api.github.com/repos/MonetDB/MonetDB/issues/6126/comments | 0 | 2020-11-30T15:27:45Z | 2024-06-27T12:57:15Z | https://github.com/MonetDB/MonetDB/issues/6126 | 753,572,889 | 6,126 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-11-17 17:05:20 +0100
From: Dean De Leo <<dleo>>
To: SQL devs <<bugs-sql>>
Version: 11.23.13 (Jun2016-SP2)
CC: martin.van.dinther, @njnes
Last updated: 2016-12-21 13:06:52 +0100
## Comment 24700
Date: 2016-11-17 17:05:20 +0100
From: Dean De Leo <<dleo>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.90 Safari/537.36
Build Identifier:
The query rewriter enters in an infinite recursion on the attached query.
On Linux, default development branch up to 62173:60942e23e88f 13/Nov/16, debug build, empty tables.
Reproducible: Always
### Steps to Reproduce:
1. Issue the attached query, the schema is included.
2. Boom
### Actual Results:
The server crashes with a segfault.
## Comment 24701
Date: 2016-11-17 17:06:06 +0100
From: Dean De Leo <<dleo>>
Created attachment 509
repro.sql
> Attached file: [query10_repro.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6125_query10_repro.sql_509) (application/sql, 329 bytes)
> Description: repro.sql
## Comment 24702
Date: 2016-11-17 17:06:32 +0100
From: Dean De Leo <<dleo>>
Created attachment 510
debugger backtrace
> Attached file: [backtrace10.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6125_backtrace10.txt_510) (text/plain, 5710 bytes)
> Description: debugger backtrace
## Comment 24720
Date: 2016-11-24 19:05:36 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [c59ecb13b9da](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c59ecb13b9da) 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=c59ecb13b9da](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c59ecb13b9da)
Changeset description:
Add test script for bug #6125
## Comment 24721
Date: 2016-11-24 19:11:25 +0100
From: Martin van Dinther <<martin.van.dinther>>
Changed version to Jun2016-SP2 as the issue (causing crash of mserver5) occurs in that version already.
## Comment 24752
Date: 2016-12-03 12:08:14 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [b72b05357cdd](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b72b05357cdd) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b72b05357cdd](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b72b05357cdd)
Changeset description:
fixes for bugs 6124, 6125 and 6121
The apply rename optimizer step has been rewriten.
Apply optimizer now create new relational operators (doesn't steal
the structures, ie safe against referenced subqueries).
## Comment 24756
Date: 2016-12-03 18:34:20 +0100
From: @njnes
fixed by rewriting the apply optimizers
| Stack overflow in the query rewriter with a query having an OR condition and a nested SELECT subexpression | https://api.github.com/repos/MonetDB/MonetDB/issues/6125/comments | 0 | 2020-11-30T15:27:41Z | 2024-06-27T12:57:14Z | https://github.com/MonetDB/MonetDB/issues/6125 | 753,572,847 | 6,125 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-11-17 14:37:34 +0100
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <<bugs-sql>>
Version: 11.23.13 (Jun2016-SP2)
CC: @njnes
Last updated: 2016-12-21 13:06:56 +0100
## Comment 24698
Date: 2016-11-17 14:37:34 +0100
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0
Build Identifier:
CASE <column> WHEN NULL THEN 0 ELSE 1 END
returns different result from equivalent:
CASE WHEN <column> IS NULL THEN 0 ELSE 1 END
Reproducible: Always
### Steps to Reproduce:
1. start mserver5 (MonetDB 5 server v11.23.14)
2. start mclient
3. execute SQLs:
CREATE TABLE table_two (this_column INTEGER);
INSERT INTO table_two VALUES (1);
INSERT INTO table_two VALUES (2);
INSERT INTO table_two VALUES (null);
SELECT * FROM table_two;
SELECT this_column, (CASE WHEN this_column IS NULL THEN 0 ELSE 1 END) AS new_column FROM table_two;
-- correct output
SELECT this_column, (CASE this_column WHEN NULL THEN 0 ELSE 1 END) AS new_column FROM table_two;
-- incorrect output for the NULL case
DROP TABLE table_two;
### Actual Results:
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.23.14 (unreleased), 'demo'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>CREATE TABLE table_two (this_column INTEGER);
operation successful (30.384ms)
sql>INSERT INTO table_two VALUES (1);
1 affected row (7.501ms)
sql>INSERT INTO table_two VALUES (2);
1 affected row (8.050ms)
sql>INSERT INTO table_two VALUES (null);
1 affected row (8.038ms)
sql>SELECT * FROM table_two;
+-------------+
| this_column |
+=============+
| 1 |
| 2 |
| null |
+-------------+
3 tuples (0.475ms)
sql>SELECT this_column, (CASE WHEN this_column IS NULL THEN 0 ELSE 1 END) AS new_column FROM table_two;
+-------------+------------+
| this_column | new_column |
+=============+============+
| 1 | 1 |
| 2 | 1 |
| null | 0 |
+-------------+------------+
3 tuples (0.680ms)
sql>-- correct output
sql>SELECT this_column, (CASE this_column WHEN NULL THEN 0 ELSE 1 END) AS new_column FROM table_two;
+-------------+------------+
| this_column | new_column |
+=============+============+
| 1 | 1 |
| 2 | 1 |
| null | 1 |
+-------------+------------+
3 tuples (1.140ms)
sql>-- incorrect output for the NULL case
sql>DROP TABLE table_two;
operation successful (11.339ms)
### Expected Results:
sql>SELECT this_column, (CASE WHEN this_column IS NULL THEN 0 ELSE 1 END) AS new_column FROM table_two;
+-------------+------------+
| this_column | new_column |
+=============+============+
| 1 | 1 |
| 2 | 1 |
| null | 0 |
+-------------+------------+
3 tuples (0.680ms)
sql>SELECT this_column, (CASE this_column WHEN NULL THEN 0 ELSE 1 END) AS new_column FROM table_two;
+-------------+------------+
| this_column | new_column |
+=============+============+
| 1 | 1 |
| 2 | 1 |
| null | 0 |
+-------------+------------+
3 tuples (1.140ms)
## Comment 24699
Date: 2016-11-17 15:34:11 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [1947e5ba7370](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1947e5ba7370) 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=1947e5ba7370](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1947e5ba7370)
Changeset description:
Add test script for Bug #6124
## Comment 24751
Date: 2016-12-03 12:08:11 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [b72b05357cdd](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b72b05357cdd) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b72b05357cdd](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b72b05357cdd)
Changeset description:
fixes for bugs 6124, 6125 and 6121
The apply rename optimizer step has been rewriten.
Apply optimizer now create new relational operators (doesn't steal
the structures, ie safe against referenced subqueries).
## Comment 24754
Date: 2016-12-03 15:01:44 +0100
From: @njnes
when NULL != when IS NULL. The output output is correct, ie NULL IS NULL == TRUE while NULL != NULL == TRUE.
| CASE <column> WHEN NULL THEN 0 ELSE 1 END returns wrong result | https://api.github.com/repos/MonetDB/MonetDB/issues/6124/comments | 0 | 2020-11-30T15:27:38Z | 2024-06-27T12:57:12Z | https://github.com/MonetDB/MonetDB/issues/6124 | 753,572,792 | 6,124 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-11-16 17:53:00 +0100
From: Dean De Leo <<dleo>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2016-12-21 13:08:23 +0100
## Comment 24690
Date: 2016-11-16 17:53:00 +0100
From: Dean De Leo <<dleo>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.90 Safari/537.36
Build Identifier:
I'm hitting the assertion reported again in bug #6115 with a more complex query this time.
On Linux, tip of the default branch, debug build, empty tables.
Reproducible: Always
### Steps to Reproduce:
1. Load the attached schema.
2. Issue the query.
3. Assertion hit!
### Actual Results:
An assertion fails and the server crashes.
## Comment 24691
Date: 2016-11-16 17:53:54 +0100
From: Dean De Leo <<dleo>>
Created attachment 506
schema.sql
> Attached file: [schema.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6123_schema.sql_506) (application/sql, 7731 bytes)
> Description: schema.sql
## Comment 24692
Date: 2016-11-16 17:54:31 +0100
From: Dean De Leo <<dleo>>
Created attachment 507
query6.sql
> Attached file: [Q6.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6123_Q6.txt_507) (text/plain, 1274 bytes)
> Description: query6.sql
## Comment 24693
Date: 2016-11-16 17:55:08 +0100
From: Dean De Leo <<dleo>>
Created attachment 508
debugger backtrace
> Attached file: [backtrace6.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6123_backtrace6.txt_508) (text/plain, 6372 bytes)
> Description: debugger backtrace
## Comment 24757
Date: 2016-12-04 14:16:03 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [7158d059e8ac](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7158d059e8ac) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7158d059e8ac](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7158d059e8ac)
Changeset description:
fixed bug #6123, ie handle correlated in subqueries in selection better
## Comment 24758
Date: 2016-12-04 14:16:39 +0100
From: @njnes
fixed by improved correlated in handling
| Assertion hit in the codegen #2 | https://api.github.com/repos/MonetDB/MonetDB/issues/6123/comments | 0 | 2020-11-30T15:27:35Z | 2024-06-27T12:57:11Z | https://github.com/MonetDB/MonetDB/issues/6123 | 753,572,752 | 6,123 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-11-16 15:58:00 +0100
From: Anthony Damico <<ajdamico>>
To: SQL devs <<bugs-sql>>
Version: 11.23.13 (Jun2016-SP2)
CC: ajdamico, arkr17997, martin.van.dinther
Last updated: 2019-02-12 14:01:07 +0100
## Comment 24689
Date: 2016-11-16 15:58:00 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0
Build Identifier:
this feature request uses the same example queries as https://www.monetdb.org/bugzilla/show_bug.cgi?id=6121
i am not sure if these three commands should be allowed according to the SQL standard:
SELECT ( table_one.this_column IN ( SELECT this_column FROM table_two ) ) AS new_column FROM table_one ;
SELECT ( CASE WHEN ( table_one.this_column IN ( SELECT this_column FROM table_two ) ) THEN 1 ELSE 0 END ) AS new_column FROM table_one ;
SELECT COUNT(*) , ( CASE WHEN ( table_one.this_column IN ( SELECT this_column FROM table_two ) ) THEN 1 ELSE 0 END ) AS new_column FROM table_one GROUP BY new_column ;
Reproducible: Always
### Steps to Reproduce:
CREATE TABLE table_one (this_column INTEGER) ;
INSERT INTO table_one VALUES (1) ;
INSERT INTO table_one VALUES (2) ;
INSERT INTO table_one VALUES (3) ;
INSERT INTO table_one VALUES (4) ;
INSERT INTO table_one VALUES (5) ;
CREATE TABLE table_two (this_column INTEGER) ;
INSERT INTO table_two VALUES (1) ;
INSERT INTO table_two VALUES (2) ;
related quaries that work without issue
SELECT SUM( ( table_one.this_column IN ( SELECT this_column FROM table_two ) ) ) FROM table_one ;
SELECT MAX( ( table_one.this_column IN ( SELECT this_column FROM table_two ) ) ) FROM table_one ;
SELECT AVG( CASE WHEN table_one.this_column IN ( SELECT this_column FROM table_two ) THEN 1 ELSE 0 END ) AS new_column FROM table_one ;
three examples with no proper error and no proper result
SELECT ( table_one.this_column IN ( SELECT this_column FROM table_two ) ) AS new_column FROM table_one ;
SELECT ( CASE WHEN ( table_one.this_column IN ( SELECT this_column FROM table_two ) ) THEN 1 ELSE 0 END ) AS new_column FROM table_one ;
SELECT COUNT(*) , ( CASE WHEN ( table_one.this_column IN ( SELECT this_column FROM table_two ) ) THEN 1 ELSE 0 END ) AS new_column FROM table_one GROUP BY new_column ;
if these are not supported by the SQL standard, then please close this feature request.
## Comment 24722
Date: 2016-11-24 19:17:10 +0100
From: Martin van Dinther <<martin.van.dinther>>
You can use sub-queries in the select-list, but they need to return a scalar value (and preferably be correlated) for each row of table_one. So use for instance:
SELECT this_column, (SELECT COUNT(*) FROM table_two t2 WHERE t2.this_column = table_one.this_column) AS new_column FROM table_one;
For the derivation of whether a match of this_column value exists in t2 or not, use:
SELECT this_column, (CASE WHEN (SELECT COUNT(*) FROM table_two t2 WHERE t2.this_column = table_one.this_column) = 0 THEN 0 ELSE 1 END) AS new_column FROM table_one;
+-------------+------------+
| this_column | new_column |
+=============+============+
| 1 | 1 |
| 2 | 1 |
| 3 | 0 |
| 4 | 0 |
| 5 | 0 |
+-------------+------------+
5 tuples (37.294ms)
You can use groupings on this query result, such as:
SELECT COUNT(*), (CASE WHEN (SELECT COUNT(*) FROM table_two t2 WHERE t2.this_column = table_one.this_column) = 0 THEN 0 ELSE 1 END) AS new_column FROM table_one GROUP BY new_column;
This query unfortunately does not return a result in the Jun2016-SP2 release, which is a defect. See Bug #6121.
To (temporarily) workaround this defect problem, I found you can use a view. Create it via:
CREATE VIEW table_one_vw AS
SELECT this_column, (CASE WHEN (SELECT COUNT(*) FROM table_two t2 WHERE t2.this_column = table_one.this_column) = 0 THEN 0 ELSE 1 END) AS new_column FROM table_one;
and next do the grouping on the view:
SELECT COUNT(*), new_column FROM table_one_vw GROUP BY new_column;
or with multiple aggregations per group:
SELECT COUNT(*) AS count, MIN(this_column) AS min_this_column, MAX(this_column) AS max_this_column, AVG(this_column) AS avg_this_column, SUM(this_column) AS sum_this_column, new_column FROM table_one_vw GROUP BY new_column;
+-------+----------+----------+--------------------------+----------+----------+
| count | min_this | max_this | avg_this_column | sum_this | new_colu |
: : _column : _column : : _column : mn :
+=======+==========+==========+==========================+==========+==========+
| 2 | 1 | 2 | 1.5 | 3 | 1 |
| 3 | 3 | 5 | 4 | 12 | 0 |
+-------+----------+----------+--------------------------+----------+----------+
2 tuples (50.325ms)
These solutions give correct results, even if the values in this_column contain duplicates in table_one or in table_two or in both. Try it.
If you do not want to create a view (once), you can also use a WITH common table expression construct:
WITH table_one_cte AS (SELECT this_column, (CASE (SELECT COUNT(*) FROM table_two t2 WHERE t2.this_column = table_one.this_column) WHEN 0 THEN 0 ELSE 1 END) AS new_column FROM table_one)
SELECT COUNT(*) AS count, MIN(this_column) AS min_this_column, MAX(this_column) AS max_this_column, AVG(this_column) AS avg_this_column, SUM(this_column) AS sum_this_column, new_column FROM table_one_cte GROUP BY new_column;
| feature request: allow some SELECT a.col IN ( b.col FROM b ) FROM a behavior? | https://api.github.com/repos/MonetDB/MonetDB/issues/6122/comments | 0 | 2020-11-30T15:27:31Z | 2024-06-28T07:05:41Z | https://github.com/MonetDB/MonetDB/issues/6122 | 753,572,711 | 6,122 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-11-16 15:54:52 +0100
From: Anthony Damico <<ajdamico>>
To: SQL devs <<bugs-sql>>
Version: 11.23.13 (Jun2016-SP2)
CC: ajdamico, martin.van.dinther, @njnes
Last updated: 2017-02-09 14:53:25 +0100
## Comment 24688
Date: 2016-11-16 15:54:52 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0
Build Identifier:
using the example below, mserver window says
could not find table_one.this_column L2.L1
but mclient window returns no result and does not give an error
Reproducible: Always
### Steps to Reproduce:
CREATE TABLE table_one (this_column INTEGER) ;
INSERT INTO table_one VALUES (1) ;
INSERT INTO table_one VALUES (2) ;
INSERT INTO table_one VALUES (3) ;
INSERT INTO table_one VALUES (4) ;
INSERT INTO table_one VALUES (5) ;
CREATE TABLE table_two (this_column INTEGER) ;
INSERT INTO table_two VALUES (1) ;
INSERT INTO table_two VALUES (2) ;
related quaries that work without issue
SELECT SUM( ( table_one.this_column IN ( SELECT this_column FROM table_two ) ) ) FROM table_one ;
SELECT MAX( ( table_one.this_column IN ( SELECT this_column FROM table_two ) ) ) FROM table_one ;
SELECT AVG( CASE WHEN table_one.this_column IN ( SELECT this_column FROM table_two ) THEN 1 ELSE 0 END ) AS new_column FROM table_one ;
three examples with no proper error and no proper result
SELECT ( table_one.this_column IN ( SELECT this_column FROM table_two ) ) AS new_column FROM table_one ;
SELECT ( CASE WHEN ( table_one.this_column IN ( SELECT this_column FROM table_two ) ) THEN 1 ELSE 0 END ) AS new_column FROM table_one ;
SELECT COUNT(*) , ( CASE WHEN ( table_one.this_column IN ( SELECT this_column FROM table_two ) ) THEN 1 ELSE 0 END ) AS new_column FROM table_one GROUP BY new_column ;
### Actual Results:
could not find table_one.this_column
L2.L1
in mserver window
### Expected Results:
error or result?
thanks!
## Comment 24697
Date: 2016-11-17 14:00:21 +0100
From: Martin van Dinther <<martin.van.dinther>>
when executing query:
SELECT ( table_one.this_column IN ( SELECT this_column FROM table_two ) ) AS new_column FROM table_one ;
or query:
SELECT ( CASE WHEN ( table_one.this_column IN ( SELECT this_column FROM table_two ) ) THEN 1 ELSE 0 END ) AS new_column FROM table_one ;
on Jun2016 branch (MonetDB 5 server v11.23.14 with assertions enabled) I get assertion (on mserver5 console):
could not find table_one.this_column
L2.L1
mserver5: ../../../../dev/sql/backends/monet5/rel_bin.c:2391: rel2bin_project: Assertion `0' failed.
So related to problem as reported in 6119.
for query:
SELECT COUNT(*) , ( CASE WHEN ( table_one.this_column IN ( SELECT this_column FROM table_two ) ) THEN 1 ELSE 0 END ) AS new_column FROM table_one GROUP BY new_column ;
on Jun2016 branch (MonetDB 5 server v11.23.14 with assertions enabled) I get assertion (on mserver5 console):
>mserver5: ../../../../dev/sql/backends/monet5/rel_bin.c:2617: rel2bin_groupby: Assertion `0' failed.
## Comment 24718
Date: 2016-11-24 17:47:29 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [3449bb84e1fb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3449bb84e1fb) 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=3449bb84e1fb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3449bb84e1fb)
Changeset description:
Add test script for bug #6121
## Comment 24750
Date: 2016-12-03 12:08:06 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [b72b05357cdd](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b72b05357cdd) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b72b05357cdd](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b72b05357cdd)
Changeset description:
fixes for bugs 6124, 6125 and 6121
The apply rename optimizer step has been rewriten.
Apply optimizer now create new relational operators (doesn't steal
the structures, ie safe against referenced subqueries).
## Comment 24753
Date: 2016-12-03 14:58:25 +0100
From: @njnes
fixed in Dec2016 ( ie handle in-subquery within aggregate expression properly)
## Comment 24995
Date: 2017-02-09 14:53:25 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [9b7490e6a80f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9b7490e6a80f) 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=9b7490e6a80f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9b7490e6a80f)
Changeset description:
Update instructions have side effects.
Test sql/test/BugTracker-2016/select-in-from.Bug-6121 creates a plan
in which batcalc.min is calculated on two BATs, both of which are
appended to later on in the plan. What you definitely don't want to
happen (and what this fixes) is that the append happens concurrently
with, or even before, the batcalc.min.
| SELECT a.col IN ( b.col FROM b ) FROM a statements with no error but no result | https://api.github.com/repos/MonetDB/MonetDB/issues/6121/comments | 0 | 2020-11-30T15:27:29Z | 2024-06-27T12:57:09Z | https://github.com/MonetDB/MonetDB/issues/6121 | 753,572,669 | 6,121 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-11-16 15:10:09 +0100
From: Anthony Damico <<ajdamico>>
To: SQL devs <<bugs-sql>>
Version: 11.23.13 (Jun2016-SP2)
CC: ajdamico
Last updated: 2016-12-21 13:07:55 +0100
## Comment 24687
Date: 2016-11-16 15:10:09 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0
Build Identifier:
these pairs of statements produce the same statistical result, but they should not?
UPDATE mtcars SET mpg = 0 WHERE cyl = 4
SELECT QUANTILE( mpg , 0.5 ) FROM mtcars
UPDATE mtcars SET mpg = NULL WHERE cyl = 4
SELECT QUANTILE( mpg , 0.5 ) FROM mtcars
Reproducible: Always
### Steps to Reproduce:
code to copy & paste into R console
i have noted the expected and actual results below
library(DBI)
library(MonetDBLite)
db <- dbConnect( MonetDBLite() )
dbWriteTable( db , 'mtcars' , mtcars )
CORRECT: 14.7
dbSendQuery( db , "UPDATE mtcars SET mpg = 0 WHERE cyl = 4" )
dbGetQuery( db , "SELECT MEDIAN( mpg ) FROM mtcars" )
CORRECT: 16.4
dbSendQuery( db , "UPDATE mtcars SET mpg = NULL WHERE cyl = 4" )
dbGetQuery( db , "SELECT MEDIAN( mpg ) FROM mtcars" )
CORRECT: 14.7
dbSendQuery( db , "UPDATE mtcars SET mpg = 0 WHERE cyl = 4" )
dbGetQuery( db , "SELECT QUANTILE( mpg , 0.5 ) FROM mtcars" )
INCORRECT: 14.7
dbSendQuery( db , "UPDATE mtcars SET mpg = NULL WHERE cyl = 4" )
dbGetQuery( db , "SELECT QUANTILE( mpg , 0.5 ) FROM mtcars" )
### Actual Results:
NULL values treated as zero
### Expected Results:
NULL values removed from query
MEDIAN() works as expected. did not check other functions on
https://www.monetdb.org/Documentation/SQLreference/StatisticFunctions
thanks!!
## Comment 24734
Date: 2016-11-29 17:18:07 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [cdcc35039aae](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cdcc35039aae) 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=cdcc35039aae](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=cdcc35039aae)
Changeset description:
Skip nils when calculating quantiles, just as we do for median.
This fixes bug #6120.
| QUANTILE() treats NULL as if it is zero | https://api.github.com/repos/MonetDB/MonetDB/issues/6120/comments | 0 | 2020-11-30T15:27:26Z | 2024-06-27T12:57:08Z | https://github.com/MonetDB/MonetDB/issues/6120 | 753,572,629 | 6,120 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-11-10 16:19:27 +0100
From: Dean De Leo <<dleo>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: martin.van.dinther, @mlkersten, @njnes, @drstmane
Last updated: 2016-12-21 13:07:09 +0100
## Comment 24679
Date: 2016-11-10 16:19:27 +0100
From: Dean De Leo <<dleo>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.90 Safari/537.36
Build Identifier:
An assertion in the code is hit with a complex query somewhere in the MAL optimiser. As consequence the DBMS aborts its execution.
On Linux, tip of the default branch, debug build, empty tables, schema attached.
Reproducible: Always
### Steps to Reproduce:
1. Load the attached schema
2. Issue the attached query
3. Boom
### Actual Results:
The server hits an assertion in the code and aborts, see the attached backtrace.
## Comment 24680
Date: 2016-11-10 16:19:58 +0100
From: Dean De Leo <<dleo>>
Created attachment 503
schema.sql
> Attached file: [schema.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6119_schema.sql_503) (application/sql, 7731 bytes)
> Description: schema.sql
## Comment 24681
Date: 2016-11-10 16:20:21 +0100
From: Dean De Leo <<dleo>>
Created attachment 504
query5.sql
> Attached file: [query5.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6119_query5.sql_504) (application/sql, 1028 bytes)
> Description: query5.sql
## Comment 24682
Date: 2016-11-10 16:20:43 +0100
From: Dean De Leo <<dleo>>
Created attachment 505
backtrace.txt
> Attached file: [backtrace5.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6119_backtrace5.txt_505) (text/plain, 3293 bytes)
> Description: backtrace.txt
## Comment 24694
Date: 2016-11-16 18:00:46 +0100
From: Dean De Leo <<dleo>>
Simpler repro (or related crash):
<pre>
DROP TABLE subt;
DROP TABLE t;
CREATE TABLE subt (A1 BIGINT);
CREATE TABLE t (B BIGINT);
SELECT (B IN (SELECT A1 FROM subt)) FROM t;
</pre>
## Comment 24695
Date: 2016-11-16 18:05:39 +0100
From: @drstmane
The last comment is the same kind of query (and hence problem?) as reported in bug #6121 !??
## Comment 24696
Date: 2016-11-17 12:40:00 +0100
From: Martin van Dinther <<martin.van.dinther>>
in default branch (MonetDB 5 server v11.26.0) I get assertion (on mserver5 console):
could not find t.b
L4.L3
mserver5: ../../../dev/monetdb5/optimizer/opt_garbageCollector.c:104: OPTgarbageCollectorImplementation: Assertion `p->token == ENDsymbol' failed.
in Dec2016 branch (MonetDB 5 server v11.25.0) I get assertion (on mserver5 console):
could not find t.b
L4.L3
mserver5: ../../../../dev/sql/backends/monet5/rel_bin.c:2402: rel2bin_project: Assertion `0' failed.
in Jun2016 branch (MonetDB 5 server v11.23.14) I get assertion (on mserver5 console):
could not find t.b
L2.L1
mserver5: ../../../../dev/sql/backends/monet5/rel_bin.c:2391: rel2bin_project: Assertion `0' failed.
## Comment 24719
Date: 2016-11-24 18:27:47 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [b8c955e61def](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b8c955e61def) 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=b8c955e61def](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b8c955e61def)
Changeset description:
Add test script for bug #6119
## Comment 24755
Date: 2016-12-03 15:03:04 +0100
From: @njnes
very hard problem in the apply handling (ie nested subqueries). Fixed by reimplementation of apply
| Assertion hit in the MAL optimiser on a complex query | https://api.github.com/repos/MonetDB/MonetDB/issues/6119/comments | 0 | 2020-11-30T15:27:24Z | 2024-06-27T12:57:07Z | https://github.com/MonetDB/MonetDB/issues/6119 | 753,572,599 | 6,119 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-11-10 14:22:52 +0100
From: Richard Hughes <<richard.monetdb>>
To: GDK devs <<bugs-common>>
Version: 11.21.19 (Jul2015-SP4)
Last updated: 2016-12-21 13:07:02 +0100
## Comment 24678
Date: 2016-11-10 14:22:52 +0100
From: Richard Hughes <<richard.monetdb>>
Depressing disclaimer: I got this core dump from our production systems. It has happened once, and it happened on a Jul2015 build (b9cb28d6243b).
Program terminated with signal SIGSEGV, Segmentation fault.
[Switching to thread 1 (Thread 0x7fa5893f2700 (LWP 2939))]
0 strPut (h=0x7fa4ce3b3c90, dst=0x7fa5893f1a50,
v=0x7fa20d1cfbc0 "*********************") at gdk_atoms.c:1207
1207 } else if (*bucket) {
(gdb) bt
0 strPut (h=0x7fa4ce3b3c90, dst=0x7fa5893f1a50,
v=0x7fa20d1cfbc0 "*********************") at gdk_atoms.c:1207
1 0x00007fa593473e7f in BATappend (b=b@entry=0x7fa3ff1861d0,
n=n@entry=0x7fa10ce97420, force=force@entry=0 '\000') at gdk_batop.c:779
2 0x00007fa593cd0c98 in MATpackIncrement (cntxt=<optimized out>,
mb=<optimized out>, stk=0x7fa3232561e0, p=0x7fa579577a10) at mat.c:174
3 0x00007fa593c029e0 in runMALsequence (cntxt=0x0, mb=0x7fa5790702e0,
startpc=1480622080, stoppc=220003286, stk=0x7fa3232561e0, env=0x42,
pcicaller=0x0) at mal_interpreter.c:631
4 0x00007fa593c04a28 in DFLOWworker (T=0x0) at mal_dataflow.c:378
5 0x00007fa5923050a4 in start_thread (arg=0x7fa5893f2700)
at pthread_create.c:309
6 0x00007fa59203a62d in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
(gdb) p bucket
$1 = (stridx_t *) 0x408
(gdb) p *h
$2 = {
free = 140829,
size = 262144,
base = 0x0,
filename = 0x7fa401fbdd90 "01/33/13332.theap",
copied = 0,
hashash = 1,
forcemap = 0,
storage = STORE_MMAP,
newstorage = STORE_MMAP,
dirty = 1 '\001',
farmid = 0 '\000',
parentid = 5850
}
(gdb) up
1 0x00007fa593473e7f in BATappend (b=b@entry=0x7fa3ff1861d0,
n=n@entry=0x7fa10ce97420, force=force@entry=0 '\000') at gdk_batop.c:779
779 bunfastapp_nocheck(b, r, BUNtail(ni, p), Tsize(b));
(gdb) p *b
$3 = {
batCacheid = 2916,
H = 0x7fa3ff186210,
T = 0x7fa3ff1862b0,
S = 0x7fa3ff186350
}
(gdb) p *b->T
$4 = {
id = 0x7fa5938978a0 "t",
width = 4,
type = 13 '\r',
shift = 2 '\002',
varsized = 1,
key = 0,
dense = 0,
nonil = 1,
nil = 0,
sorted = 0,
revsorted = 0,
align = 0,
nokey = {0, 0},
nosorted = 0,
norevsorted = 0,
nodense = 0,
seq = 0,
heap = {
free = 53576,
size = 93184,
base = 0x7fa3c337bd40 "\020 ",
filename = 0x7fa57955cbe0 "55/5544.tail",
copied = 0,
hashash = 0,
forcemap = 0,
storage = STORE_MEM,
newstorage = STORE_MEM,
dirty = 1 '\001',
farmid = 0 '\000',
parentid = 0
},
vheap = 0x7fa4ce3b3c90,
hash = 0x0,
imprints = 0x0,
props = 0x0
}
...so we've got an obvious NULL pointer dereference. h->base was NULL because:
(gdb) thread 20
[Switching to thread 20 (Thread 0x7fa562638700 (LWP 23571))]
0 0x00007fa59203672a in mmap64 () at ../sysdeps/unix/syscall-template.S:81
81 ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) bt
0 0x00007fa59203672a in mmap64 () at ../sysdeps/unix/syscall-template.S:81
1 0x00007fa5936dcb64 in MT_mmap (path=<optimized out>,
mode=<optimized out>, len=262144) at gdk_posix.c:344
2 0x00007fa59364004c in GDKmmap (
path=0x7fa3e5c03910 "./bat/01/33/13332.theap", mode=19458, len=262144)
at gdk_utils.c:915
3 0x00007fa5936c2d41 in GDKload (farmid=19458,
nme=0x40000 <error: Cannot access memory at address 0x40000>,
ext=0x7fa3e5c03910 "./bat/01/33/13332.theap", size=262144,
maxsize=0x7fa4ce3b3c98, mode=STORE_MMAP) at gdk_storage.c:526
4 0x00007fa593604c9d in HEAPload_intern (h=0x7fa4ce3b3c90,
nme=0x7fa562636940 "01/33/13332", ext=0x7fa56263694c "theap",
suffix=0x6e1d1c27 <error: Cannot access memory at address 0x6e1d1c27>,
trunc=-440387312) at gdk_heap.c:668
5 0x00007fa593605aa0 in HEAPload (trunc=<optimized out>,
ext=<optimized out>, nme=<optimized out>, h=<optimized out>)
at gdk_heap.c:678
6 HEAPextend (h=0x7fa4ce3b3c90, size=262144, mayshare=1) at gdk_heap.c:274
7 0x00007fa5936441aa in strPut (h=0x7fa4ce3b3c90, dst=0x7fa562637a50,
v=0x7fa1e38ca5b8 "*****************") at gdk_atoms.c:1248
8 0x00007fa593473e7f in BATappend (b=b@entry=0x7fa5788e3a50,
n=n@entry=0x7fa401b21d40, force=force@entry=0 '\000') at gdk_batop.c:779
9 0x00007fa593cd0c98 in MATpackIncrement (cntxt=<optimized out>,
mb=<optimized out>, stk=0x7fa3232561e0, p=0x7fa5783af4e0) at mat.c:174
10 0x00007fa593c029e0 in runMALsequence (cntxt=0x0, mb=0x7fa5790702e0,
startpc=3, stoppc=-1, stk=0x7fa3232561e0, env=0x0, pcicaller=0x0)
at mal_interpreter.c:631
11 0x00007fa593c04a28 in DFLOWworker (T=0x0) at mal_dataflow.c:378
12 0x00007fa5923050a4 in start_thread (arg=0x7fa562638700)
at pthread_create.c:309
13 0x00007fa59203a62d in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
(gdb) f 8
8 0x00007fa593473e7f in BATappend (b=b@entry=0x7fa5788e3a50,
n=n@entry=0x7fa401b21d40, force=force@entry=0 '\000') at gdk_batop.c:779
779 bunfastapp_nocheck(b, r, BUNtail
(ni, p), Tsize(b));
(gdb) p *b
$5 = {
batCacheid = 38038,
H = 0x7fa5788e3a90,
T = 0x7fa5788e3b30,
S = 0x7fa5788e3bd0
}
(gdb) p *b->T
$6 = {
id = 0x7fa5938978a0 "t",
width = 4,
type = 13 '\r',
shift = 2 '\002',
varsized = 1,
key = 0,
dense = 0,
nonil = 1,
nil = 0,
sorted = 0,
revsorted = 0,
align = 0,
nokey = {0, 0},
nosorted = 0,
norevsorted = 0,
nodense = 0,
seq = 0,
heap = {
free = 50728,
size = 93184,
base = 0x7fa579799340 "\020 ",
filename = 0x7fa578937080 "11/22/112226.tail",
copied = 0,
hashash = 0,
forcemap = 0,
storage = STORE_MEM,
newstorage = STORE_MEM,
dirty = 1 '\001',
farmid = 0 '\000',
parentid = 0
},
vheap = 0x7fa4ce3b3c90,
hash = 0x0,
imprints = 0x0,
props = 0x0
}
Notice that these two threads are both doing strPut on vheap 0x7fa4ce3b3c90 concurrently. For completeness, here's the parent of that vheap (although I don't think it's important to the story):
(gdb) p *BBP[0][5850].cache[0]->T
$7 = {
id = 0x7fa5938978a0 "t",
width = 4,
type = 13 '\r',
shift = 2 '\002',
varsized = 1,
key = 0,
dense = 0,
nonil = 1,
nil = 0,
sorted = 0,
revsorted = 0,
align = 2084731012,
nokey = {0, 0},
nosorted = 0,
norevsorted = 0,
nodense = 0,
seq = 0,
heap = {
free = 15064668,
size = 16777216,
base = 0x7fa441840000 <error: Cannot access memory at address 0x7fa441840000>,
filename = 0x7fa5840a13f0 "01/33/13332.tail",
copied = 0,
hashash = 0,
forcemap = 0,
storage = STORE_MMAP,
newstorage = STORE_MMAP,
dirty = 0 '\000',
farmid = 0 '\000',
parentid = 0
},
vheap = 0x7fa4ce3b3c90,
hash = 0x0,
imprints = 0x0,
props = 0x0
}
My idea for a fix (against the default branch as of today) is:
diff -r [05a0bf0401ff](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=05a0bf0401ff) gdk/gdk_batop.c
--- a/gdk/gdk_batop.c Thu Nov 10 08:55:59 2016 +0100
+++ b/gdk/gdk_batop.c Thu Nov 10 13:02:31 2016 +0000
@@ -481,6 +481,8 @@
BATsetcount(b, BATcount(b) + BATcount(n));
} else {
BATiter ni = bat_iterator(n);
+ if (unshare_string_heap(b) != GDK_SUCCEED)
+ return GDK_FAIL;
BATloop(n, p, q) {
bunfastapp_nocheck(b, r, BUNtail(ni, p), Tsize(b));
What do you think? Does this seem like a plausible theory? If it is, can you think of what the reproduction recipe might be?
[My apologies for yet again starting with a conclusion and trying to work backwards from there]
## Comment 24684
Date: 2016-11-14 17:08:43 +0100
From: Richard Hughes <<richard.monetdb>>
Here's a recipe for going down the vulnerable code path. I ran it with gdk_nr_threads=2 and the default_pipe:
create table foo as select cast(value as varchar(64)) as v from generate_series(cast(0 as int),250000) with data;
create table bar as select cast(value as varchar(64)) as v from generate_series(cast(-1000 as int),-950) with data;
select v from (select * from foo union all select * from bar) x(v) where v<>'test';
That gets me into strPut() when the destination BAT doesn't own its vheap, i.e. b->T->vheap->parentid != b->batCacheid
I haven't managed to reproduce the crash from this test yet, presumably either because I don't have enough concurrency or because the heap is already adequately-sized.
I've also been staring at the implementation of insert_string_bat() and I have a suspicion that the final call to bunfastins() in that function also requires a call to unshare_string_heap(). It's complicated, though, so I'm not 100% sure.
## Comment 24737
Date: 2016-11-30 19:22:37 +0100
From: @sjoerdmullender
(In reply to Richard Hughes from comment 1)
> Here's a recipe for going down the vulnerable code path. I ran it with
> gdk_nr_threads=2 and the default_pipe:
>
> create table foo as select cast(value as varchar(64)) as v from
> generate_series(cast(0 as int),250000) with data;
> create table bar as select cast(value as varchar(64)) as v from
> generate_series(cast(-1000 as int),-950) with data;
> select v from (select * from foo union all select * from bar) x(v) where
> v<>'test';
>
> That gets me into strPut() when the destination BAT doesn't own its vheap,
> i.e. b->T->vheap->parentid != b->batCacheid
This case looks pretty benign, but I will make a couple of small changes to really make it benign. What I see happening here is that b and n both use the same string heap from a third bat. Since they both use the same string heap, their offsets are completely compatible and we don't have to mess with the string heap (it necessarily contains all strings of n). I will just make sure that the offsets are copied in this case by setting toff to 0.
> I haven't managed to reproduce the crash from this test yet, presumably
> either because I don't have enough concurrency or because the heap is
> already adequately-sized.
Maybe that is actually a slightly different case.
> I've also been staring at the implementation of insert_string_bat() and I
> have a suspicion that the final call to bunfastins() in that function also
> requires a call to unshare_string_heap(). It's complicated, though, so I'm
> not 100% sure.
This should be taken care of by the only call to unshare_string_heap already in insert_string_bat. Only a transient bat can use another bat's string heap (the test for role == TRANSIENT), and in that case, if we can't share the string heaps of b and n (toff is not set to a new value, so remains ~0), the string heap is unshared. And only in this case should we get to the final bunfastins.
## Comment 24738
Date: 2016-11-30 19:23:16 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [6230882d2425](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6230882d2425) 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=6230882d2425](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6230882d2425)
Changeset description:
Always call insert_string_bat to append string bats.
In the function, deal with all variations of sharing or not sharing
string heaps, and also with special cases as BOUND2BTRUE.
This hopefully fixes bug #6118.
## Comment 24739
Date: 2016-12-01 13:04:05 +0100
From: Richard Hughes <<richard.monetdb>>
I'm not sure. I pulled your changes and put a breakpoint on strPut(), using the same query as before. Here's the mclient session:
sql>\f x
sql>select * from sys.storage() where "table" in ('foo','bar');
-[ RECORD 1 ]--------
schema | sys
table | foo
column | v
type | varchar
mode | writable
location | 06/666
count | 250000
typewidth | 2
columnsize | 1000000
heapsize | 4033709
hashes | 0
phash | false
imprints | 0
sorted | false
-[ RECORD 2 ]--------
schema | sys
table | bar
column | v
type | varchar
mode | writable
location | 17/1744
count | 50
typewidth | 4
columnsize | 100
heapsize | 9389
hashes | 0
phash | false
imprints | 0
sorted | false
sql>\f sql
sql>debug select v from (select * from foo union all select * from bar) x(v) where v<>'test';
mdb>mdb.start();
mdb>s
mdb>X_2=0@0:void := user.s2_1("test");
mdb>X_40=0@0:void := querylog.define("select v from (select * from foo union all select * from bar) x(v) where v<>\\'test\\';","default_pipe",62);
mdb>barrier X_89=false := language.dataflow();
mdb>X_26=nil:bat[:str] := bat.new(nil:oid,nil:str);
mdb>X_32=nil:bat[:str] := bat.append(X_26=<tmp_1641>[0],".x");
mdb>X_27=nil:bat[:str] := bat.new(nil:oid,nil:str);
mdb>X_34=nil:bat[:str] := bat.append(X_27=<tmp_1240>[0],"v");
mdb>X_28=nil:bat[:str] := bat.new(nil:oid,nil:str);
mdb>X_35=nil:bat[:str] := bat.append(X_28=<tmp_605>[0],"varchar");
mdb>X_29=nil:bat[:int] := bat.new(nil:oid,nil:int);
mdb>X_37=nil:bat[:int] := bat.append(X_29=<tmp_2156>[0],64);
mdb>X_31=nil:bat[:int] := bat.new(nil:oid,nil:int);
mdb>X_39=nil:bat[:int] := bat.append(X_31=<tmp_2155>[0],0);
mdb>X_3=nil:bat[:str] := bat.new(nil:oid,nil:str);
mdb>X_2=0 := sql.mvc();
mdb>X_57=nil:bat[:str] := sql.bind(X_2=0,"sys","foo","v",0,0,2);
mdb>X_55=nil:bat[:oid] := sql.tid(X_2=0,"sys","foo",0,2);
mdb>X_63=nil:bat[:oid] := algebra.subselect(X_57=<tmp_1137>[125000],X_55=<tmp_1501>[125000],A0="test",A0="test",true,true,true);
mdb>(X_59=nil:bat[:oid],X_60=nil:bat[:str]) := sql.bind(X_2=0,"sys","foo","v",2,0,2);
mdb>X_65=nil:bat[:oid] := algebra.subselect(X_60=<tmp_1752>[0],nil:bat[:oid],A0="test",A0="test",true,true,true);
mdb>X_67=nil:bat[:oid] := sql.subdelta(X_63=<tmp_1036>[125000],X_55=<tmp_1501>[125000],X_59=<tmp_1613>[0],X_65=<tmp_1341>[0]);
mdb>X_69=nil:bat[:str] := sql.projectdelta(X_67=<tmp_1036>[125000],X_57=<tmp_1137>[125000],X_59=<tmp_1613>[0],X_60=<tmp_1752>[0]);
mdb>X_58=nil:bat[:str] := sql.bind(X_2=0,"sys","foo","v",0,1,2);
mdb>X_56=nil:bat[:oid] := sql.tid(X_2=0,"sys","foo",1,2);
mdb>X_64=nil:bat[:oid] := algebra.subselect(X_58=<tmp_1036>[125000],X_56=<tmp_1441>[125000],A0="test",A0="test",true,true,true);
mdb>(X_61=nil:bat[:oid],X_62=nil:bat[:str]) := sql.bind(X_2=0,"sys","foo","v",2,1,2);
mdb>X_66=nil:bat[:oid] := algebra.subselect(X_62=<tmp_1752>[0],nil:bat[:oid],A0="test",A0="test",true,true,true);
mdb>X_11=nil:bat[:str] := sql.bind(X_2=0,"sys","foo","v",1);
mdb>C_51=nil:bat[:oid] := algebra.subselect(X_11=<tmp_1752>[0],X_56=<tmp_1441>[125000],A0="test",A0="test",true,true,true);
mdb>X_68=nil:bat[:oid] := sql.subdelta(X_64=<tmp_1541>[125000],X_56=<tmp_1441>[125000],X_61=<tmp_1613>[0],X_66=<tmp_2167>[0],C_51=<tmp_503>[0]);
mdb>X_70=nil:bat[:str] := sql.projectdelta(X_68=<tmp_1541>[125000],X_58=<tmp_1036>[125000],X_61=<tmp_1613>[0],X_62=<tmp_1752>[0],X_11=<tmp_1752>[0]);
mdb>X_71=nil:bat[:str] := mat.packIncrement(X_69=<tmp_1341>[125000],2);
mdb>X_14=nil:bat[:str] := mat.packIncrement(X_71=<tmp_1541>[125000],X_70=<tmp_503>[125000]);
mdb>X_15=nil:bat[:str] := bat.append(X_3=<tmp_1177>[0],X_14=<tmp_1541>[250000],true);
mdb>X_18=nil:bat[:str] := sql.bind(X_2=0,"sys","bar","v",0);
mdb>C_16=nil:bat[:oid] := sql.tid(X_2=0,"sys","bar");
mdb>C_52=nil:bat[:oid] := algebra.subselect(X_18=<tmp_1744>[50],C_16=<tmp_1541>[50],A0="test",A0="test",true,true,true);
mdb>(C_19=nil:bat[:oid],r1_28=nil:bat[:str]) := sql.bind(X_2=0,"sys","bar","v",2);
mdb>C_53=nil:bat[:oid] := algebra.subselect(r1_28=<tmp_1752>[0],nil:bat[:oid],A0="test",A0="test",true,true,true);
mdb>X_21=nil:bat[:str] := sql.bind(X_2=0,"sys","bar","v",1);
mdb>C_54=nil:bat[:oid] := algebra.subselect(X_21=<tmp_1752>[0],C_16=<tmp_1541>[50],A0="test",A0="test",true,true,true);
mdb>C_22=nil:bat[:oid] := sql.subdelta(C_52=<tmp_503>[50],C_16=<tmp_1541>[50],C_19=<tmp_1613>[0],C_53=<tmp_1341>[0],C_54=<tmp_2167>[0]);
mdb>X_23=nil:bat[:str] := sql.projectdelta(C_22=<tmp_503>[50],X_18=<tmp_1744>[50],C_19=<tmp_1613>[0],r1_28=<tmp_1752>[0],X_21=<tmp_1752>[0]);
mdb>X_24=nil:bat[:str] := bat.append(X_15=<tmp_1177>[250000],X_23=<tmp_2167>[50],true);
at this point my breakpoint got hit:
Breakpoint 4, strPut (h=0x63ec70, dst=0x7fffe1191da0,
v=0x7fffd81696a0 "-1000") at gdk_atoms.c:1182
1182 {
(gdb) bt
0 strPut (h=0x63ec70, dst=0x7fffe1191da0, v=0x7fffd81696a0 "-1000")
at gdk_atoms.c:1182
1 0x00007ffff7019bdd in insert_string_bat (b=0x7fffd812fdf0,
n=0x7fffd8151070, force=1) at gdk_batop.c:358
2 0x00007ffff701c427 in BATappend (b=0x7fffd812fdf0, n=0x7fffd8151070,
force=1 '\001') at gdk_batop.c:491
3 0x00007ffff79e171b in BKCappend_force_wrap (r=0x7fffd815e890,
bid=0x7fffd815e770, uid=0x7fffd815e870, force=0x7fffd815e730 "\001")
at bat5.c:384
4 0x00007ffff795210d in malCommandCall (stk=0x7fffd815e4f0,
pci=0x7fffd8140a70) at mal_interpreter.c:89
5 0x00007ffff7954f00 in runMALsequence (cntxt=0x7ffff10d0330,
mb=0x7fffd810ef90, startpc=1, stoppc=62, stk=0x7fffd815e4f0,
env=0x7fffd815a390, pcicaller=0x7fffd80d4b30) at mal_interpreter.c:670
6 0x00007ffff7955640 in runMALsequence (cntxt=0x7ffff10d0330,
mb=0x7fffd80d4890, startpc=1, stoppc=0, stk=0x7fffd815a390, env=0x0,
pcicaller=0x0) at mal_interpreter.c:760
7 0x00007ffff79537d6 in runMAL (cntxt=0x7ffff10d0330, mb=0x7fffd80d4890,
mbcaller=0x0, env=0x0) at mal_interpreter.c:354
8 0x00007fffefa296bb in SQLengineIntern (c=0x7ffff10d0330,
be=0x7fffd80cc870) at sql_execute.c:453
9 0x00007fffefa275fa in SQLengine (c=0x7ffff10d0330) at sql_scenario.c:1365
10 0x00007ffff79818f4 in runPhase (c=0x7ffff10d0330, phase=4)
at mal_scenario.c:531
11 0x00007ffff7981b22 in runScenarioBody (c=0x7ffff10d0330)
at mal_scenario.c:575
12 0x00007ffff7981c32 in runScenario (c=0x7ffff10d0330) at mal_scenario.c:595
13 0x00007ffff79837b8 in MSserveClient (dummy=0x7ffff10d0330)
at mal_session.c:457
14 0x00007ffff798320e in MSscheduleClient (
command=0x7fffd80008d0 "\300\305\f\330\377\177",
challenge=0x7fffe1192e70 "1RhefoXU4bL", fin=0x7fffd8002980,
fout=0x7fffd4002b60) at mal_session.c:342
15 0x00007ffff7a3e186 in doChallenge (data=0x7fffd40008d0) at mal_mapi.c:205
16 0x00007ffff73973ee in thread_starter (arg=0x7fffd4004c50)
at gdk_system.c:485
17 0x00007ffff5ea90a4 in start_thread (arg=0x7fffe1193700)
at pthread_create.c:309
18 0x00007ffff5bde62d in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
(gdb) up
1 0x00007ffff7019bdd in insert_string_bat (b=0x7fffd812fdf0,
n=0x7fffd8151070, force=1) at gdk_batop.c:358
358 bunfastapp(b, tp);
(gdb) p *b->T
$5 = {id = 0x7ffff75cf79b "t", width = 4, type = 13 '\r', shift = 2 '\002',
varsized = 1, key = 0, dense = 0, nonil = 1, nil = 0, sorted = 0,
revsorted = 0, align = 0, nokey = {0, 0}, nosorted = 0, norevsorted = 1,
nodense = 0, seq = 0, heap = {free = 1000004, size = 1245184,
base = 0x7fffe0351000 "\020 ", filename = 0x7fffd8130060 "11/1177.tail",
copied = 0, hashash = 0, forcemap = 0, storage = STORE_MMAP,
newstorage = STORE_MMAP, dirty = 1 '\001', farmid = 0 '\000',
parentid = 0}, vheap = 0x63ec70, hash = 0x0, imprints = 0x0, props = 0x0}
(gdb) p b->batCacheid
$6 = 639
(gdb) p b->T->vheap->parentid
$7 = 438
(gdb) p *BBP[0][438].cache[0]->T
$8 = {id = 0x7ffff75cf79b "t", width = 4, type = 13 '\r', shift = 2 '\002',
varsized = 1, key = 0, dense = 0, nonil = 1, nil = 0, sorted = 0,
revsorted = 0, align = 1075432, nokey = {0, 0}, nosorted = 10,
norevsorted = 1, nodense = 0, seq = 0, heap = {free = 1000000,
size = 1048576, base = 0x7fffe0991000 "\020 ",
filename = 0x7fffd810ce20 "06/666.tail", copied = 0, hashash = 0,
forcemap = 0, storage = STORE_MMAP, newstorage = STORE_MMAP,
dirty = 0 '\000', farmid = 0 '\000', parentid = 0}, vheap = 0x63ec70,
hash = 0x0, imprints = 0x0, props = 0x0}
(gdb) p b->T->vheap
$9 = (Heap *) 0x63ec70
(gdb) p *b->T->vheap
$10 = {free = 4033709, size = 4259840, base = 0x7fffe0581000 "",
filename = 0x7fffd8151a70 "06/666.theap", copied = 0, hashash = 1,
forcemap = 0, storage = STORE_MMAP, newstorage = STORE_MMAP,
dirty = 0 '\000', farmid = 0 '\000', parentid = 438}
This seems to be telling me that strPut() is writing to the PERSISTENT vheap owned by the column foo.v. If I dump bat/06/666.theap as hex then I see it contains negative values at the end, which I think ought to be impossible. Weirdly, it also grows by a full set of -1000..-950 values every time I run the SELECT, so somehow double elimination isn't working.
## Comment 24743
Date: 2016-12-01 17:54:19 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [a4160f607bef](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a4160f607bef) 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=a4160f607bef](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a4160f607bef)
Changeset description:
Unshare the string heap when we may write to it.
This should fix bug #6118.
## Comment 24744
Date: 2016-12-01 18:45:46 +0100
From: Richard Hughes <<richard.monetdb>>
Thanks. That now works in all the situations I can think of testing.
While you were looking at that, I got distracted by the lack of double-elimination. It turns out that that happens because BATload_intern() calls strCleanHash() which wipes out the complete hash table for any vheap >= 64KB. The BBP policy changed recently(ish) to unload BATs much more aggressively, meaning that the hash table is cleared between most transactions. I had to go all the way back to r17805 for the explanation for the wiping: "heap may have been mmaped-ed, appended-by-force, and then corrupted by crash"
Is this unnecessary disk consumption of interest to you? If yes, it shouldn't be tracked in this bug. If no, then ignore it and I'll wait until there's actual evidence that it's a problem.
## Comment 24746
Date: 2016-12-01 21:13:18 +0100
From: @sjoerdmullender
(In reply to Richard Hughes from comment 6)
> Thanks. That now works in all the situations I can think of testing.
Good to hear.
> While you were looking at that, I got distracted by the lack of
> double-elimination. It turns out that that happens because BATload_intern()
> calls strCleanHash() which wipes out the complete hash table for any vheap
> >= 64KB. The BBP policy changed recently(ish) to unload BATs much more
> aggressively, meaning that the hash table is cleared between most
> transactions. I had to go all the way back to r17805 for the explanation for
> the wiping: "heap may have been mmaped-ed, appended-by-force, and then
> corrupted by crash"
>
> Is this unnecessary disk consumption of interest to you? If yes, it
> shouldn't be tracked in this bug. If no, then ignore it and I'll wait until
> there's actual evidence that it's a problem.
I think it's worthwhile to open a bug report so that we don't forget. It's probably not very difficult to fix this. Just recreate the hash table instead of merely clearing it.
## Comment 24749
Date: 2016-12-02 12:22:01 +0100
From: Richard Hughes <<richard.monetdb>>
(In reply to Sjoerd Mullender from comment 7)
> I think it's worthwhile to open a bug report so that we don't forget. It's
> probably not very difficult to fix this. Just recreate the hash table
> instead of merely clearing it.
Bug #6138.
## Comment 24761
Date: 2016-12-08 10:05:36 +0100
From: @sjoerdmullender
This bug seems finally fixed.
| SIGSEGV in strPut due to shared heap | https://api.github.com/repos/MonetDB/MonetDB/issues/6118/comments | 0 | 2020-11-30T15:27:20Z | 2024-06-27T12:57:06Z | https://github.com/MonetDB/MonetDB/issues/6118 | 753,572,534 | 6,118 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-11-09 11:16:43 +0100
From: Dean De Leo <<dleo>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2016-12-21 13:08:12 +0100
## Comment 24666
Date: 2016-11-09 11:16:43 +0100
From: Dean De Leo <<dleo>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36
Build Identifier:
The attached query causes an assertion to be fired in the query rewriting stage.
On Linux, tip of the default branch, debug build, empty tables.
Reproducible: Always
### Steps to Reproduce:
1. Load the attached schema.
2. Issue the attached query
3. An assertion is fired by the server
### Actual Results:
See the attached backtrace
### Expected Results:
Server failures are bad. Assuming they should never occur.
## Comment 24667
Date: 2016-11-09 11:17:22 +0100
From: Dean De Leo <<dleo>>
Created attachment 500
Database schema
> Attached file: [schema.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6117_schema.sql_500) (application/sql, 7731 bytes)
> Description: Database schema
## Comment 24668
Date: 2016-11-09 11:17:38 +0100
From: Dean De Leo <<dleo>>
Created attachment 501
Repro query (query4.sql)
> Attached file: [query4.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6117_query4.sql_501) (application/sql, 897 bytes)
> Description: Repro query (query4.sql)
## Comment 24669
Date: 2016-11-09 11:17:57 +0100
From: Dean De Leo <<dleo>>
Created attachment 502
Backtrace
> Attached file: [backtrace4.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6117_backtrace4.txt_502) (text/plain, 3553 bytes)
> Description: Backtrace
## Comment 24673
Date: 2016-11-09 23:07:16 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [bfc05edc1fa1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bfc05edc1fa1) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bfc05edc1fa1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bfc05edc1fa1)
Changeset description:
fixes for bugs 6114, 6115, 6116 and 6117
improved dead code elimination for cases with references to sub queries (ie its a dag)
push simple select like expressions downs
split_project test is added here but only crashes in the dec2016/default.
## Comment 24677
Date: 2016-11-10 08:07:22 +0100
From: @njnes
we cannot split expressions in set operators. Also improved the handling of the split project optimizer
| Assertion hit in the query rewriting stage during the push down phase | https://api.github.com/repos/MonetDB/MonetDB/issues/6117/comments | 0 | 2020-11-30T15:27:17Z | 2024-06-27T12:57:05Z | https://github.com/MonetDB/MonetDB/issues/6117 | 753,572,492 | 6,117 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-11-09 11:10:43 +0100
From: Dean De Leo <<dleo>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2016-12-21 13:07:22 +0100
## Comment 24661
Date: 2016-11-09 11:10:43 +0100
From: Dean De Leo <<dleo>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36
Build Identifier:
The server crashes due to an assertion when issuing certain kind of scalar subqueries.
Reproducible: Always
### Steps to Reproduce:
1. Load the attached schema
2. Issue the attached query
3. Assertion hit
### Actual Results:
See attached backtrace
### Expected Results:
Server failures are bad. Assuming they should never occur.
## Comment 24662
Date: 2016-11-09 11:11:32 +0100
From: Dean De Leo <<dleo>>
Created attachment 497
DBMS schema
> Attached file: [schema.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6116_schema.sql_497) (application/sql, 7731 bytes)
> Description: DBMS schema
## Comment 24663
Date: 2016-11-09 11:11:53 +0100
From: Dean De Leo <<dleo>>
Created attachment 498
Repro query (query3.sql)
> Attached file: [query3.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6116_query3.sql_498) (application/sql, 520 bytes)
> Description: Repro query (query3.sql)
## Comment 24664
Date: 2016-11-09 11:12:24 +0100
From: Dean De Leo <<dleo>>
Created attachment 499
Backtrace
> Attached file: [backtrace3.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6116_backtrace3.txt_499) (text/plain, 4271 bytes)
> Description: Backtrace
## Comment 24665
Date: 2016-11-09 11:12:45 +0100
From: Dean De Leo <<dleo>>
On Linux, tip of the default branch, debug build, empty tables.
## Comment 24672
Date: 2016-11-09 23:07:12 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [bfc05edc1fa1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bfc05edc1fa1) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bfc05edc1fa1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bfc05edc1fa1)
Changeset description:
fixes for bugs 6114, 6115, 6116 and 6117
improved dead code elimination for cases with references to sub queries (ie its a dag)
push simple select like expressions downs
split_project test is added here but only crashes in the dec2016/default.
## Comment 24676
Date: 2016-11-10 08:06:08 +0100
From: @njnes
fixed a problem with semijoin and select expressions (ie they get pushed down more now)
| Codegen does not support certain kind of selects on scalar subqueries | https://api.github.com/repos/MonetDB/MonetDB/issues/6116/comments | 0 | 2020-11-30T15:27:14Z | 2024-06-27T12:57:04Z | https://github.com/MonetDB/MonetDB/issues/6116 | 753,572,444 | 6,116 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-11-09 11:05:15 +0100
From: Dean De Leo <<dleo>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2016-12-21 13:07:46 +0100
## Comment 24658
Date: 2016-11-09 11:05:15 +0100
From: Dean De Leo <<dleo>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36
Build Identifier:
Hello, I'm hitting the attached assertion somewhere in the codegen.
On Linux, tip of the default branch, debug build, empty tables.
Reproducible: Always
### Steps to Reproduce:
1. Start a fresh of mserver5
2. Issue the attached query. The schema is included.
3. Boom
### Actual Results:
See attached back trace.
### Expected Results:
Server failures are bad. Assuming they should never occur.
## Comment 24659
Date: 2016-11-09 11:05:56 +0100
From: Dean De Leo <<dleo>>
Created attachment 495
Repro query, schema included
> Attached file: [query2_crash_repro.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6115_query2_crash_repro.sql_495) (application/sql, 1396 bytes)
> Description: Repro query, schema included
## Comment 24660
Date: 2016-11-09 11:06:44 +0100
From: Dean De Leo <<dleo>>
Created attachment 496
Backtrace
> Attached file: [backtrace2.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6115_backtrace2.txt_496) (text/plain, 7597 bytes)
> Description: Backtrace
## Comment 24671
Date: 2016-11-09 23:07:09 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [bfc05edc1fa1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bfc05edc1fa1) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bfc05edc1fa1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bfc05edc1fa1)
Changeset description:
fixes for bugs 6114, 6115, 6116 and 6117
improved dead code elimination for cases with references to sub queries (ie its a dag)
push simple select like expressions downs
split_project test is added here but only crashes in the dec2016/default.
## Comment 24675
Date: 2016-11-10 08:05:29 +0100
From: @njnes
fixed by the some solution as bug #6114 (ie dead code elimination)
| Assertion hit in the codegen | https://api.github.com/repos/MonetDB/MonetDB/issues/6115/comments | 0 | 2020-11-30T15:27:11Z | 2024-06-27T12:57:03Z | https://github.com/MonetDB/MonetDB/issues/6115 | 753,572,402 | 6,115 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-11-09 10:57:40 +0100
From: Dean De Leo <<dleo>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2016-12-21 13:07:44 +0100
## Comment 24654
Date: 2016-11-09 10:57:40 +0100
From: Dean De Leo <<dleo>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36
Build Identifier:
The server crashes due to a null pointer unexpected in the query rewriter.
On Linux, tip of the default branch, debug build, empty tables.
Reproducible: Always
### Steps to Reproduce:
1. Load the schema.sql
2. Issue query1a.sql
3. boom
### Actual Results:
The DBMS crashes with a segmentation fault, see backtrace1.txt
### Expected Results:
Server failures are bad. Assuming they should never occur.
## Comment 24655
Date: 2016-11-09 10:58:27 +0100
From: Dean De Leo <<dleo>>
Created attachment 492
Database schema
> Attached file: [schema.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6114_schema.sql_492) (application/sql, 7731 bytes)
> Description: Database schema
## Comment 24656
Date: 2016-11-09 10:59:01 +0100
From: Dean De Leo <<dleo>>
Created attachment 493
Query (query1a.sql)
> Attached file: [query1a.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6114_query1a.sql_493) (application/sql, 1393 bytes)
> Description: Query (query1a.sql)
## Comment 24657
Date: 2016-11-09 10:59:26 +0100
From: Dean De Leo <<dleo>>
Created attachment 494
Back trace from the debugger
> Attached file: [backtrace1.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6114_backtrace1.txt_494) (text/plain, 5120 bytes)
> Description: Back trace from the debugger
## Comment 24670
Date: 2016-11-09 23:07:04 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [bfc05edc1fa1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bfc05edc1fa1) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bfc05edc1fa1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bfc05edc1fa1)
Changeset description:
fixes for bugs 6114, 6115, 6116 and 6117
improved dead code elimination for cases with references to sub queries (ie its a dag)
push simple select like expressions downs
split_project test is added here but only crashes in the dec2016/default.
## Comment 24674
Date: 2016-11-10 08:04:38 +0100
From: @njnes
fixed a problem with dead code elimination
| segfault raised in the query rewriter due to a null pointer | https://api.github.com/repos/MonetDB/MonetDB/issues/6114/comments | 0 | 2020-11-30T15:27:07Z | 2024-06-27T12:57:02Z | https://github.com/MonetDB/MonetDB/issues/6114 | 753,572,348 | 6,114 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-11-02 10:16:08 +0100
From: @eyalroz
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 11.23.13 (Jun2016-SP2)
Last updated: 2016-11-02 11:06:56 +0100
## Comment 24643
Date: 2016-11-02 10:16:08 +0100
From: @eyalroz
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0
Build Identifier:
My DB's bat/DELETE_ME folder somehow has a files named
.nfs000000000070a4b700019109
which contains a copy of BBP.dir; this is likely since I have a less process looking at BBP.dir
I now get occasional crashes executing queries in mclient, with the merovingian.log saying:
2016-11-02 10:07:24 MSG merovingian[25046]: proxying client (local) for database 'usdt-ontime' to mapi:monetdb:///ufs/eyalroz/dbfarms/monetdb/usdt-ontime/.mapi.sock?database=usdt-ontime
2016-11-02 10:07:24 MSG merovingian[25046]: target connection is on local UNIX domain socket, passing on filedescriptor instead of proxying
2016-11-02 10:07:24 ERR usdt-ontime[18704]: !GDKerror:!ERROR: GDKremovedir: rmdir(/ufs/eyalroz/dbfarms/monetdb/usdt-ontime/bat/DELETE_ME) failed.
2016-11-02 10:07:24 ERR usdt-ontime[18704]: !OS: Directory not empty
2016-11-02 10:07:24 ERR usdt-ontime[18704]: !ERROR: BBPsync: rename(/ufs/eyalroz/dbfarms/monetdb/usdt-ontime/bat/BACKUP/SUBCOMMIT,/ufs/eyalroz/dbfarms/monetdb/usdt-ontime/bat/DELETE_ME) failed.
2016-11-02 10:07:24 ERR usdt-ontime[18704]:
2016-11-02 10:08:59 ERR usdt-ontime[18704]: !ERROR: bm_subcommit: commit failed
2016-11-02 10:08:59 ERR usdt-ontime[18704]: !ERROR: logger_exit: logger_commit failed
2016-11-02 10:08:59 ERR usdt-ontime[18704]: !FATAL: write-ahead logging failure, disk full?2016-11-02 10:08:59 ERR usdt-ontime[18704]:
2016-11-02 10:08:59 MSG usdt-ontime[18704]: !ERROR: GDKremovedir: rmdir(/ufs/eyalroz/dbfarms/monetdb/usdt-ontime/bat/DELETE_ME) failed.
2016-11-02 10:08:59 MSG usdt-ontime[18704]: !OS: Directory not empty
2016-11-02 10:08:59 MSG usdt-ontime[18704]: !ERROR: BBPsync: rename(/ufs/eyalroz/dbfarms/monetdb/usdt-ontime/bat/BACKUP/SUBCOMMIT,/ufs/eyalroz/dbfarms/monetdb/usdt-ontime/bat/DELETE_ME) failed.
2016-11-02 10:08:59 MSG merovingian[25046]: database 'usdt-ontime' (18704) has exited with exit status 1
I believe the behavior this case should be more robust. After all, this extra file does not actually impede or interrupt anything mserver5 needs to be doing.
Reproducible: Always
## Comment 24644
Date: 2016-11-02 11:00:20 +0100
From: @sjoerdmullender
This happens because:
1. you have your database on an NFS (network) file system, and
2. you are looking at files inside the database (dbfarm) while running the server.
The .nfs* files are remnants of trying to delete (unlink) a file on an NFS-mounted file system while the file is in use. Since you are the one using the file, and not mserver5, this is a problem outside the scope of mserver5 and therefore will not be fixed.
## Comment 24645
Date: 2016-11-02 11:06:56 +0100
From: @eyalroz
(In reply to Sjoerd Mullender from comment 1)
> This happens because:
> 1. you have your database on an NFS (network) file system, and
> 2. you are looking at files inside the database (dbfarm) while running the
> server.
Yes, indeed, and the file goes away when all processes close their file descriptors.
> The .nfs* files are remnants of trying to delete (unlink) a file on an
> NFS-mounted file system while the file is in use. Since you are the one
> using the file, and not mserver5, this is a problem outside the scope of
> mserver5 and therefore will not be fixed.
Robust interaction with other processes' activity on the system is not, I believe, outside the scope. While I'm obviously not expecting that this be handled as some high-priority issue, it is a significant one on systems in which users may be reading files for various purposes - grepping data, making routine backup copies etc. Such read-only activity should not make mserver5 crash.
| mserver5 crashes when leftover NFS-related files present in bat/DELETE_ME | https://api.github.com/repos/MonetDB/MonetDB/issues/6113/comments | 0 | 2020-11-30T15:27:03Z | 2024-06-28T07:06:05Z | https://github.com/MonetDB/MonetDB/issues/6113 | 753,572,291 | 6,113 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-10-28 12:39:18 +0200
From: Richard Hughes <<richard.monetdb>>
To: SQL devs <<bugs-sql>>
Version: 11.23.13 (Jun2016-SP2)
CC: @njnes
Last updated: 2017-03-03 10:24:05 +0100
## Comment 24640
Date: 2016-10-28 12:39:18 +0200
From: Richard Hughes <<richard.monetdb>>
This only happened for one of my databases - many others upgraded fine.
Log says:
2016-10-28 10:40:50 MSG testdb[26405]: insert into sys.systemfunctions (select id from sys.functions where name = 'storage' a
2016-10-28 10:40:51 ERR testdb[26405]: !ParseException:SQLparser:DROP FUNCTION: no such function 'isauuid' (uuid)
2016-10-28 10:40:55 MSG merovingian[25817]: database 'testdb' (26405) has crashed (dumped core)
I guess the absence of isauuid(uuid) in this particular database is because it was created after [f30d4f669802](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f30d4f669802)
The backtrace is:
Thread 5 "mserver5" received signal SIGSEGV, Segmentation fault.
0x00007ffff0dbfca8 in sql_update_median (sql=<optimized out>,
c=<optimized out>) at sql_upgrades.c:1502
1502 in sql_upgrades.c
(gdb) bt
0 0x00007ffff0dbfca8 in sql_update_median (sql=<optimized out>,
c=<optimized out>) at sql_upgrades.c:1502
1 SQLupgrades (c=0x0, c@entry=0x7ffff136d330, m=0x7fffe00103d0)
at sql_upgrades.c:1985
2 0x00007ffff0db8c5b in SQLinitClient (c=0x7ffff136d330)
at sql_scenario.c:581
3 0x00007ffff7a08106 in runPhase (phase=5, c=0x7ffff136d330)
at mal_scenario.c:531
4 runScenarioBody (c=c@entry=0x7ffff136d330) at mal_scenario.c:558
5 0x00007ffff7a08d9d in runScenario (c=c@entry=0x7ffff136d330)
at mal_scenario.c:595
6 0x00007ffff7a092e0 in MSserveClient (dummy=dummy@entry=0x7ffff136d330)
at mal_session.c:457
7 0x00007ffff7a09946 in MSscheduleClient (
command=command@entry=0x7fffe00008d0 "0",
challenge=challenge@entry=0x7fffebffee80 "9JhRYk6qx", fin=0x7fffe0002980,
fout=fout@entry=0x7fffe4002b60) at mal_session.c:342
8 0x00007ffff7a8ab96 in doChallenge (data=<optimized out>) at mal_mapi.c:205
9 0x00007ffff74dde4f in thread_starter (arg=<optimized out>)
at gdk_system.c:485
10 0x00007ffff61420a4 in start_thread (arg=0x7fffebfff700)
at pthread_create.c:309
11 0x00007ffff5e7762d in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
The sequence of events is that the DROP FUNCTION error has left m->session->status non-zero, so the next statement which executes after that aborts immediately after parsing (at sql_execute.c:145) but does not set 'msg'. SQLstatementIntern() therefore returns NULL (success) but also leaves '*result' as NULL. sql_update_median() crashes shortly afterwards, being unable to cope with this contradiction.
There are two requests in this bug, therefore:
1) Fix upgrades from post-f30d4f669802 builds of Jul2015.
2) Make it easier to diagnose this and/or possible to continue with the upgrade in case of small glitches. As it stands, I have an unusable database until I apply a fix for (1), and it took me about an hour to figure out why.
## Comment 24641
Date: 2016-10-28 15:33:52 +0200
From: Richard Hughes <<richard.monetdb>>
Created attachment 490
Proposed fix
This works for me.
> Attached file: [jul2015-jun2016-upgrade-crash-bug6112.diff](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6112_jul2015-jun2016-upgrade-crash-bug6112.diff_490) (text/plain, 1091 bytes)
> Description: Proposed fix
## Comment 25027
Date: 2017-02-15 20:22:17 +0100
From: @njnes
patch was merged
## Comment 25104
Date: 2017-03-03 10:24:05 +0100
From: @sjoerdmullender
Dec2016-SP2 has been released, incorporating the fix.
| Crash upgrading Jul2015->Jun2016 | https://api.github.com/repos/MonetDB/MonetDB/issues/6112/comments | 0 | 2020-11-30T15:26:59Z | 2024-06-27T12:57:00Z | https://github.com/MonetDB/MonetDB/issues/6112 | 753,572,243 | 6,112 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-10-27 18:07:52 +0200
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <<bugs-sql>>
Version: 11.23.13 (Jun2016-SP2)
Last updated: 2017-03-03 10:24:48 +0100
## Comment 24639
Date: 2016-10-27 18:07:52 +0200
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0
Build Identifier:
in sys.types the number of max digits for decimals are:
+------------+---------+--------+-------+-------+--------+
| systemname | sqlname | digits | scale | radix | eclass |
+============+=========+========+=======+=======+========+
| bte | decimal | 2 | 1 | 10 | 10 |
| sht | decimal | 4 | 1 | 10 | 10 |
| int | decimal | 9 | 1 | 10 | 10 |
| lng | decimal | 18 | 1 | 10 | 10 |
| hge | decimal | 39 | 1 | 10 | 10 |
+------------+---------+--------+-------+-------+--------+
For hge the max number of digits should be 38 and not 39.
Reproducible: Always
### Steps to Reproduce:
1. Start mserver5
2. Start mclient
3. Run SQL commands:
SELECT systemname, sqlname, digits, scale, radix, eclass FROM sys.types where sqlname = 'decimal' order by digits;
CREATE TABLE "t_dec39" (val DECIMAL(39)); -- should and will error
CREATE TABLE "t_dec39.5" (val DECIMAL(39,5)); -- should and will error
### Actual Results:
bash-4.3$ mclient
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.26.0 (unreleased), 'demo'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>SELECT systemname, sqlname, digits, scale, radix, eclass FROM sys.types where sqlname = 'decimal' order by digits;
+------------+---------+--------+-------+-------+--------+
| systemname | sqlname | digits | scale | radix | eclass |
+============+=========+========+=======+=======+========+
| bte | decimal | 2 | 1 | 10 | 10 |
| sht | decimal | 4 | 1 | 10 | 10 |
| int | decimal | 9 | 1 | 10 | 10 |
| lng | decimal | 18 | 1 | 10 | 10 |
| hge | decimal | 39 | 1 | 10 | 10 |
+------------+---------+--------+-------+-------+--------+
5 tuples (2.524ms)
sql>
sql>CREATE TABLE "t_dec39" (val DECIMAL(39));
decimal of 39 digits are not supported in: "create table "t_dec39" (val decimal(39)"
syntax error, unexpected ')' in: ")"
sql>CREATE TABLE "t_dec39.5" (val DECIMAL(39,5));
decimal(39,5) isn't supported because P=39 > 38 in: "create table "t_dec39.5" (val decimal(39,5)"
syntax error, unexpected ')' in: ")"
sql>
### Expected Results:
+------------+---------+--------+-------+-------+--------+
| systemname | sqlname | digits | scale | radix | eclass |
+============+=========+========+=======+=======+========+
| bte | decimal | 2 | 1 | 10 | 10 |
| sht | decimal | 4 | 1 | 10 | 10 |
| int | decimal | 9 | 1 | 10 | 10 |
| lng | decimal | 18 | 1 | 10 | 10 |
| hge | decimal | 38 | 1 | 10 | 10 |
+------------+---------+--------+-------+-------+--------+
Only applies to MonetDB servers which support HUGEINT (so _int128)
## Comment 24960
Date: 2017-02-03 13:37:44 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [84b7fc2a39e7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=84b7fc2a39e7) 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=84b7fc2a39e7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=84b7fc2a39e7)
Changeset description:
Report maximum number of digits correctly for decimals in sys.types.
The SQL parser already only accepted 18/38 digits, now sys.types also
reports those values.
This fixes bug #6111.
## Comment 25127
Date: 2017-03-03 10:24:48 +0100
From: @sjoerdmullender
Dec2016-SP2 has been released, incorporating the fix.
| Maximum number of digits for hge decimal is listed as 39 in sys.types. Should be 38 as DECIMAL(39) is not supported. | https://api.github.com/repos/MonetDB/MonetDB/issues/6111/comments | 0 | 2020-11-30T15:26:56Z | 2024-06-27T12:56:59Z | https://github.com/MonetDB/MonetDB/issues/6111 | 753,572,210 | 6,111 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.