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-05-13 14:00:28 +0200 From: @mlkersten To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.21 (Dec2016-SP4) CC: @njnes Last updated: 2017-07-17 16:07:50 +0200 ## Comment 25314 Date: 2017-05-13 14:00:28 +0200 From: @mlkersten User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:53.0) Gecko/20100101 Firefox/53.0 Build Identifier: The following query has problems dealing with the LIMIT clause Reproducible: Always ### Steps to Reproduce: select subq_0.c0 as c1 from (select ref_0.grantor as c0, 39 as c1 from sys.auths as ref_0 limit 151) as subq_0 where subq_0.c1 is NULL; ## Comment 25364 Date: 2017-05-31 17:00:50 +0200 From: @njnes fixed
Object not found in LIMIT clause (sqlsmith)
https://api.github.com/repos/MonetDB/MonetDB/issues/6312/comments
0
2020-11-30T15:48:02Z
2024-06-27T12:59:34Z
https://github.com/MonetDB/MonetDB/issues/6312
753,589,465
6,312
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6311/comments
0
2020-11-30T15:47:59Z
2020-11-30T15:48:00Z
https://github.com/MonetDB/MonetDB/issues/6311
753,589,426
6,311
[ "MonetDB", "MonetDB" ]
Date: 2017-05-13 09:35:01 +0200 From: @mlkersten To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.21 (Dec2016-SP4) CC: @njnes Last updated: 2017-07-17 16:07:24 +0200 ## Comment 25309 Date: 2017-05-13 09:35:01 +0200 From: @mlkersten User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:53.0) Gecko/20100101 Firefox/53.0 Build Identifier: Name resolution of columns seems to be broken in LATERAL expressions. !42S22!SELECT: no such column 'ref_0.message' Reproducible: Always ### Steps to Reproduce: select ref_0.message as c0 from sys.rejects as ref_0, lateral (select (select name from sys.objects) as c0 from sys.args as sample_1 right join tmp._columns as ref_4 inner join sys.part as ref_6 inner join sys.types as sample_5 on (ref_6.p_comment = sample_5.systemname ) right join sys.netcdf_vars as ref_7 on (sample_5.digits = ref_7.var_id ) on (ref_4.name = sample_5.systemname ) right join sys.user_role as sample_8 inner join sys.partsupp as ref_10 on (sample_8.role_id = ref_10.ps_partkey ) on (ref_4.name = ref_10.ps_comment ) on (sample_1.name = ref_10.ps_comment ) ) as subq_0;. ## Comment 25310 Date: 2017-05-13 09:36:22 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [0d7e061a84d4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0d7e061a84d4) made by Martin Kersten <mk@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0d7e061a84d4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0d7e061a84d4) Changeset description: Test for bug #6310 ## Comment 25312 Date: 2017-05-13 10:02:08 +0200 From: @mlkersten It requires the TPCH schema ## Comment 25313 Date: 2017-05-13 11:00:39 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [fea5dccda850](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fea5dccda850) 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=fea5dccda850](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=fea5dccda850) Changeset description: fix for bug #6310, ie properly use the left part of a lateral join, when the left part isn't used in the right part. ## Comment 25365 Date: 2017-05-31 17:02:27 +0200 From: @njnes fixed
Name resolution error (sqlsmith)
https://api.github.com/repos/MonetDB/MonetDB/issues/6310/comments
0
2020-11-30T15:47:56Z
2024-06-27T12:59:33Z
https://github.com/MonetDB/MonetDB/issues/6310
753,589,372
6,310
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6309/comments
0
2020-11-30T15:47:53Z
2020-11-30T15:47:55Z
https://github.com/MonetDB/MonetDB/issues/6309
753,589,347
6,309
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6308/comments
0
2020-11-30T15:47:51Z
2020-11-30T15:47:52Z
https://github.com/MonetDB/MonetDB/issues/6308
753,589,317
6,308
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6307/comments
0
2020-11-30T15:47:48Z
2020-11-30T15:47:50Z
https://github.com/MonetDB/MonetDB/issues/6307
753,589,276
6,307
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6306/comments
0
2020-11-30T15:47:46Z
2020-11-30T15:47:47Z
https://github.com/MonetDB/MonetDB/issues/6306
753,589,242
6,306
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6305/comments
0
2020-11-30T15:47:43Z
2020-11-30T15:47:45Z
https://github.com/MonetDB/MonetDB/issues/6305
753,589,209
6,305
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6304/comments
0
2020-11-30T15:47:40Z
2020-11-30T15:47:42Z
https://github.com/MonetDB/MonetDB/issues/6304
753,589,164
6,304
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6303/comments
0
2020-11-30T15:47:38Z
2020-11-30T15:47:39Z
https://github.com/MonetDB/MonetDB/issues/6303
753,589,139
6,303
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6302/comments
0
2020-11-30T15:47:35Z
2020-11-30T15:47:37Z
https://github.com/MonetDB/MonetDB/issues/6302
753,589,110
6,302
[ "MonetDB", "MonetDB" ]
Date: 2017-05-12 10:45:34 +0200 From: Ronald Blankendaal &lt;<r.blankendaal>&gt; To: clients devs &lt;<bugs-clients>&gt; Version: 11.25.21 (Dec2016-SP4) CC: @PedroTadim Last updated: 2017-05-12 17:49:00 +0200 ## Comment 25298 Date: 2017-05-12 10:45:34 +0200 From: Ronald Blankendaal &lt;<r.blankendaal>&gt; User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0 Build Identifier: Using just the MonetDBLite-Java embedded API, I'm having some issues with 'select' queries returning either 0 rows, or 1 row. Reproducible: Always ### Steps to Reproduce: QueryResultRowSet rows = qrs.fetchAllRowValues() or rs.iterator().forEachRemaining(...) ### Actual Results: --> 0 rows throws java.lang.ArrayIndexOutOfBoundsException: "The start index must be larger than 1!" --> 1 row throws java.lang.ArrayIndexOutOfBoundsException: Retrieving 0 rows? --> 2 or more rows seems to work fine. ### Expected Results: --> 0 rows: just an empty resultset --> 1 row: a resultset with just one row of data By the way, the T getTYPEByColumnIndexAndRow(int column, int row) methods seem to work fine in all cases. ## Comment 25299 Date: 2017-05-12 17:49:00 +0200 From: @PedroTadim This was an interpretation issue. I just fixed it. You can download the jar again and search for more bugs!
MonetDBLite-Java embedded API ArrayIndexOutOfBoundsException
https://api.github.com/repos/MonetDB/MonetDB/issues/6301/comments
0
2020-11-30T15:47:32Z
2024-06-27T12:59:30Z
https://github.com/MonetDB/MonetDB/issues/6301
753,589,070
6,301
[ "MonetDB", "MonetDB" ]
Date: 2017-05-11 11:12:11 +0200 From: @mlkersten To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.21 (Dec2016-SP4) Last updated: 2017-06-12 15:14:44 +0200 ## Comment 25288 Date: 2017-05-11 11:12:11 +0200 From: @mlkersten User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Build Identifier: Due to resource limitations it may happen that QLOGcatalog(), QLOGcalls(),dump_trace() fail to create the BATs needed. Then it should not lead to crash. These functions should return a proper error message or MAL_SUCCEED Reproducible: Always ## Comment 25289 Date: 2017-05-11 11:13:41 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [8b3a41d9fcb6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8b3a41d9fcb6) made by martin.kersten@cwi.nl in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=8b3a41d9fcb6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=8b3a41d9fcb6) Changeset description: Direct fix for bug #6300 The API fix should go to the Default branch ## Comment 25326 Date: 2017-05-14 22:15:33 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [b5dd3b37a0b7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b5dd3b37a0b7) made by Martin Kersten <mk@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b5dd3b37a0b7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b5dd3b37a0b7) Changeset description: Better check for failing BAT creation Fixes Bug-6300 and found a few more cases that require better control on succesful creation of a group of BATs. ## Comment 25327 Date: 2017-05-14 22:16:51 +0200 From: @mlkersten fixed, including a few more multi-bat creations
Protect against missing BATs (sqlsmith)
https://api.github.com/repos/MonetDB/MonetDB/issues/6300/comments
0
2020-11-30T15:47:29Z
2024-06-27T12:59:29Z
https://github.com/MonetDB/MonetDB/issues/6300
753,589,044
6,300
[ "MonetDB", "MonetDB" ]
Date: 2017-05-09 14:33:58 +0200 From: @rkoopmanschap To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.21 (Dec2016-SP4) CC: @njnes Last updated: 2017-09-20 09:13:43 +0200 ## Comment 25286 Date: 2017-05-09 14:33:58 +0200 From: @rkoopmanschap User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36 Build Identifier: The sys.epoch function does not work properly if you pass it a float parameter. The parameter has to be either casted to an integer or multiplied by 1000. This can be confusing as you may accidentally call it with the wrong data type. Reproducible: Always ### Steps to Reproduce: 1. Run the following queries: 2. SELECT sys.epoch(1483261200.0); 3. SELECT sys.epoch(1483261200); ### Actual Results: sql>SELECT sys.epoch(1483261200.0); +----------------------------+ | L2 | +============================+ | 1970-01-18 04:01:01.200000 | +----------------------------+ 1 tuple (2.292ms) sql>SELECT sys.epoch(1483261200); +----------------------------+ | L2 | +============================+ | 2017-01-01 09:00:00.000000 | +----------------------------+ 1 tuple (0.883ms) ### Expected Results: The float parameter should return the same result or it should throw an error that floats are not supported. ## Comment 25287 Date: 2017-05-09 18:37:19 +0200 From: @rkoopmanschap To expand on this, there is an epoch function for bigints and one for ints. The int version expects seconds since 1970 and the bigint version expects milliseconds. If you pass it a float, the float seems to be converted into a bigint and the bigint version is called. So, this is not really a bug. But it seems very confusing that the 'milliseconds to timestamp' function is named the same as the 'seconds to timestamp' function, with the type of parameter being the only difference. Some operations, like division, also automatically converts your int to bigint and so it is not always clear what the type of your variable is. This makes bugs in user code likely to happen. It may make sense to rename the bigint epoch function to something that more accurately reflects what it is doing, or to make it behave in the same way as the int version. ## Comment 25651 Date: 2017-09-20 09:13:43 +0200 From: @njnes 1483261200.0 is not a float but a decimal and doesn't fit in a int. Therefor it ends up in the bigint case. Not a bug, but indeed not so clear as well.
sys.epoch function returns wrong results if parameter is a float
https://api.github.com/repos/MonetDB/MonetDB/issues/6299/comments
0
2020-11-30T15:47:26Z
2024-06-28T13:10:49Z
https://github.com/MonetDB/MonetDB/issues/6299
753,588,992
6,299
[ "MonetDB", "MonetDB" ]
Date: 2017-05-02 18:46:22 +0200 From: Anthony Bucci &lt;<anthony>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.21 (Dec2016-SP4) CC: anthony, imus, kesil, @PedroTadim, shery40, @yzchang Last updated: 2020-06-03 16:58:53 +0200 ## Comment 25283 Date: 2017-05-02 18:46:22 +0200 From: Anthony Bucci &lt;<anthony>&gt; User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0 Build Identifier: A query of the form SELECT length(fieldname) FROM tablename LIMIT 1 takes an unexpectedly long time to execute on a table with several million rows. It's taking approximately 7 seconds on my hardware, whereas the corresponding SELECT fieldname FROM tablename LIMIT 1 runs in milliseconds. SELECT max(length(fieldname)) FROM tablename (maximizing the length value over the entire table) runs in 7 seconds as well. I tried converting the CLOB to a VARCHAR but this change does not appear to affect the behavior. I am not adept at reading monetdb's EXPLAIN output, but it appears to me that the execution plan first computes length of the plaintext field over the entire table, and then returns the first row of that result set. Reproducible: Always ### Steps to Reproduce: 1. CREATE TABLE "sys"."testtable" ( "field1" VARCHAR(100), "field2" VARCHAR(100), "raw_text" CHARACTER LARGE OBJECT, "simple_text" CHARACTER LARGE OBJECT, "plaintext" CHARACTER LARGE OBJECT, "id" UUID ); 2. populate with data (approximately 6 million rows) 3. select length(plaintext) from testtable limit 1; ### Actual Results: Observe that the SELECT in step 3 takes a considerable amount of time to execute, roughly the same amount of time as maximizing length over the entire table (select max(length(plaintext)) from testtable;) ### Expected Results: The SELECT in step 3 should execute as quickly as a simple SELECT/LIMIT of the field in question, e.g. as quickly as the query select plaintext from testtable limit 1; I am not adept at reading monetdb's EXPLAIN output, but it appears to me that the execution plan first computes length of the plaintext field over the entire table, and then returns the first row of that result set. I would expect monetdb to first create a result set with a single row and only compute length on the plaintext field of that set, then return it, which should result in an execution that takes negligibly longer than simply selecting the field. user@machine:~$ mserver5 --version MonetDB 5 server v11.25.21 "Dec2016-SP4" (64-bit, 128-bit integers) 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 7.7GiB available memory, 2 available cpu cores Libraries: libpcre: 8.38 2015-11-23 (compiled with 8.38) openssl: OpenSSL 1.0.2g 1 Mar 2016 (compiled with OpenSSL 1.0.2g-fips 1 Mar 2016) libxml2: 2.9.3 (compiled with 2.9.3) Compiled by: pbuilder@dev.monetdb.org (x86_64-pc-linux-gnu) Compilation: gcc -O3 -fomit-frame-pointer -pipe -g -D_FORTIFY_SOURCE=2 Linking : /usr/bin/ld -m elf_x86_64 user@machine:~$ mclient --version mclient, the MonetDB interactive terminal (Dec2016-SP4) support for command-line editing compiled-in character encoding: UTF-8 user@machine:~$ mclient -u monetdb -d uspto-esa password: Welcome to mclient, the MonetDB/SQL interactive terminal (Dec2016-SP4) Database: MonetDB v11.25.21 (Dec2016-SP4), 'mapi:monetdb://machine:50000/uspto-esa' Type \q to quit, \? for a list of available commands auto commit mode: on sql>\d testtable CREATE TABLE "sys"."testtable" ( "field1" VARCHAR(100), "field2" VARCHAR(100), "raw_text" CHARACTER LARGE OBJECT, "simple_text" CHARACTER LARGE OBJECT, "plaintext" CHARACTER LARGE OBJECT, "id" UUID ); sql>select plaintext from testtable limit 1; [RESULT] 1 tuple (38.735ms) sql>select length(plaintext) from testtable limit 1; [RESULT] 1 tuple (7.6s) sql>select max(length(plaintext)) from testtable; [RESULT] 1 tuple (7.1s) sql>plan select length(plaintext) from testtable limit 1; +-------------------------------------------------------+ | rel | +=======================================================+ | top N ( | | | project ( | | | | table(sys.testtable) [ testtable.plaintext ] COUNT | | | ) [ sys.length(testtable.plaintext) as L2.L2 ] | | ) [ bigint "1" ] | +-------------------------------------------------------+ 5 tuples (1.047ms) sql>explain select length(plaintext) from testtable limit 1; +-----------------------------------------------------------------------------------------------------------+ | mal | +===========================================================================================================+ | function user.s4_1():void; | | X_0:void := querylog.define("select length(plaintext) from testtable limit 1;","default_pipe",32:int); | | barrier X_96 := language.dataflow(); | | X_29 := bat.new(nil:str); | | X_35 := bat.new(nil:int); | | X_33 := bat.new(nil:int); | | X_32 := bat.new(nil:str); | | X_31 := bat.new(nil:str); | | X_3 := sql.mvc(); | | C_61:bat[:oid] := sql.tid(X_3,"sys","testtable",0:int,2:int); | | X_64:bat[:str] := sql.bind(X_3,"sys","testtable","plaintext",0:int,0:int,2:int); | | X_67 := algebra.projection(C_61,X_64); | | X_69 := batstr.length(X_67); | | X_71 := algebra.subslice(X_69,0:lng,0:lng); | | C_63:bat[:oid] := sql.tid(X_3,"sys","testtable",1:int,2:int); | | X_65:bat[:str] := sql.bind(X_3,"sys","testtable","plaintext",0:int,1:int,2:int); | | X_68 := algebra.projection(C_63,X_65); | | X_70 := batstr.length(X_68); | | X_72 := algebra.subslice(X_70,0:lng,0:lng); | | X_86 := mat.packIncrement(X_71,2:int); | | X_73 := mat.packIncrement(X_86,X_72); | | X_26 := algebra.subslice(X_73,0:lng,0:lng); | | X_75 := algebra.projection(X_71,X_69); | | X_76 := algebra.projection(X_72,X_70); | | X_89 := mat.packIncrement(X_75,2:int); | | X_74 := mat.packIncrement(X_89,X_76); | | X_27 := algebra.projection(X_26,X_74); | | language.pass(X_71); | | language.pass(X_69); | | language.pass(X_72); | | language.pass(X_70); | | exit X_96; | | X_36 := bat.append(X_29,"sys.L2"); | | X_38 := bat.append(X_31,"L2"); | | X_40 := bat.append(X_32,"int"); | | X_42 := bat.append(X_33,32:int); | | X_44 := bat.append(X_35,0:int); | | sql.resultSet(X_36,X_38,X_40,X_42,X_44,X_27); | | end user.s4_1; | | inline actions= 0 time=5 usec | | remap actions= 1 time=27 usec | | costmodel actions= 1 time=4 usec | | coercion actions= 2 time=14 usec | | evaluate actions= 2 time=64 usec | | emptybind actions= 3 time=45 usec | | pushselect actions= 0 time=21 usec | | aliases actions= 3 time=15 usec | | mitosis actions= 1 time=60 usec | | mergetable actions= 4 time=118 usec | | deadcode actions= 5 time=24 usec | | aliases actions= 0 time=10 usec | | constants actions= 7 time=19 usec | | commonTerms actions= 0 time=19 usec | | projectionpath actions= 0 time=14 usec | | deadcode actions= 0 time=19 usec | | reorder actions= 1 time=72 usec | | reduce actions=42 time=32 usec | | matpack actions= 2 time=27 usec | | dataflow actions=34 time=173 usec | | multiplex actions= 0 time=17 usec | | profiler actions= 1 time=20 usec | | candidates actions= 1 time=6 usec | | garbagecollector actions= 1 time=89 usec | | total actions= 1 time=1680 usec | +-----------------------------------------------------------------------------------------------------------+ 64 tuples (5.183ms) sql>trace select length(plaintext) from testtable limit 1; [RESULT] 1 tuple (8.7s) +---------+------------------------------------------------------------------------------------------------------------+ | usec | statement | +=========+============================================================================================================+ | 127 | X_0="select length(plaintext) from testtable limit 1;":void := querylog.define("select length(plaintext) fr | : : om testtable limit 1;":str,"default_pipe":str,32:int); : | 124 | X_35=<tmp_4713>[0]:bat[:int] := bat.new(nil:int); | | 92 | X_33=<tmp_5120>[0]:bat[:int] := bat.new(nil:int); | | 112 | X_32=<tmp_5222>[0]:bat[:str] := bat.new(nil:str); | | 95 | X_31=<tmp_5322>[0]:bat[:str] := bat.new(nil:str); | | 89 | X_3=0:int := sql.mvc(); | | 264 | X_29=<tmp_4612>[0]:bat[:str] := bat.new(nil:str); | | 159 | C_61=<tmp_5422>[3243727]:bat[:oid] := sql.tid(X_3=0:int,"sys":str,"testtable":str,0:int,2:int); | | 148 | C_63=<tmp_4105>[3243727]:bat[:oid] := sql.tid(X_3=0:int,"sys":str,"testtable":str,1:int,2:int); | | 244 | X_64=<tmp_5015>[3243727]:bat[:str] := sql.bind(X_3=0:int,"sys":str,"testtable":str,"plaintext":str,0:int,0: | : : int,2:int); : | 284 | X_67=<tmp_4005>[3243727]:bat[:str] := algebra.projection(C_61=<tmp_5422>[3243727]:bat[:oid],X_64=<tmp_5015 | : : >[3243727]:bat[:str]); : | 4245 | X_65=<tmp_5522>[3243727]:bat[:str] := sql.bind(X_3=0:int,"sys":str,"testtable":str,"plaintext":str,0:int,1: | : : int,2:int); : | 117 | X_68=<tmp_5625>[3243727]:bat[:str] := algebra.projection(C_63=<tmp_4105>[3243727]:bat[:oid],X_65=<tmp_5522 | : : >[3243727]:bat[:str]); : | 6421959 | X_70=<tmp_5522>[3243727]:bat[:int] := batstr.length(X_68=<tmp_5625>[3243727]:bat[:str]); | | 110 | X_72=<tmp_5625>[1]:bat[:oid] := algebra.subslice(X_70=<tmp_5522>[3243727]:bat[:int],0:lng,0:lng); | | 99 | X_76=<tmp_4105>[1]:bat[:int] := algebra.projection(X_72=<tmp_5625>[1]:bat[:oid],X_70=<tmp_5522>[3243727]:b | : : at[:int]); : | 74 | language.pass(X_70=<tmp_5522>[3243727]:bat[:int]); | | 7415885 | X_69=<tmp_5015>[3243727]:bat[:int] := batstr.length(X_67=<tmp_4005>[3243727]:bat[:str]); | | 109 | X_71=<tmp_4005>[1]:bat[:oid] := algebra.subslice(X_69=<tmp_5015>[3243727]:bat[:int],0:lng,0:lng); | | 102 | X_86=<tmp_5422>[1]:bat[:oid] := mat.packIncrement(X_71=<tmp_4005>[1]:bat[:oid],2:int); | | 233 | X_75=<tmp_5522>[1]:bat[:int] := algebra.projection(X_71=<tmp_4005>[1]:bat[:oid],X_69=<tmp_5015>[3243727]:b | : : at[:int]); : | 77 | language.pass(X_71=<tmp_4005>[1]:bat[:oid]); | | 95 | X_89=<tmp_4005>[1]:bat[:int] := mat.packIncrement(X_75=<tmp_5522>[1]:bat[:int],2:int); | | 89 | X_74=<tmp_4005>[2]:bat[:int] := mat.packIncrement(X_89=<tmp_4005>[2]:bat[:int],X_76=<tmp_4105>[1]:bat[:int | : : ]); : | 70 | language.pass(X_69=<tmp_5015>[3243727]:bat[:int]); | | 97 | X_73=<tmp_5422>[2]:bat[:oid] := mat.packIncrement(X_86=<tmp_5422>[2]:bat[:oid],X_72=<tmp_5625>[1]:bat[:oid | : : ]); : | 72 | language.pass(X_72=<tmp_5625>[1]:bat[:oid]); | | 98 | X_26=<tmp_5625>[1]:bat[:oid] := algebra.subslice(X_73=<tmp_5422>[2]:bat[:oid],0:lng,0:lng); | | 94 | X_27=<tmp_5422>[1]:bat[:int] := algebra.projection(X_26=<tmp_5625>[1]:bat[:oid],X_74=<tmp_4005>[2]:bat[:in | : : t]); : | 7446593 | barrier X_96=false:bit := language.dataflow(); | | 106 | X_36=<tmp_4612>[1]:bat[:str] := bat.append(X_29=<tmp_4612>[1]:bat[:str],"sys.L2":str); | | 84 | X_38=<tmp_5322>[1]:bat[:str] := bat.append(X_31=<tmp_5322>[1]:bat[:str],"L2":str); | | 84 | X_40=<tmp_5222>[1]:bat[:str] := bat.append(X_32=<tmp_5222>[1]:bat[:str],"int":str); | | 94 | X_42=<tmp_5120>[1]:bat[:int] := bat.append(X_33=<tmp_5120>[1]:bat[:int],32:int); | | 82 | X_44=<tmp_4713>[1]:bat[:int] := bat.append(X_35=<tmp_4713>[1]:bat[:int],0:int); | | 168 | X_28=5:int := sql.resultSet(X_36=<tmp_4612>[1]:bat[:str],X_38=<tmp_5322>[1]:bat[:str],X_40=<tmp_5222>[1]:b | : : at[:str],X_42=<tmp_5120>[1]:bat[:int],X_44=<tmp_4713>[1]:bat[:int],X_27=<tmp_5422>[1]:bat[:int]); : +---------+------------------------------------------------------------------------------------------------------------+ 36 tuples (8.7s) ## Comment 25284 Date: 2017-05-03 13:30:14 +0200 From: @yzchang The situation is indeed caused by that LIMIT is not pushed down (shown clearly in the TRACE output). It's been on our TODO list for quite sometime to push down some simple LIMIT cases... Can you please mark this ticket as an "enhancement" with higher importance? If possible, a quicker workaround is of course to first select the 1 "fieldname", before computing its length(). It's unrelated to CLOB or VARCHAR. Computing the length of a CLOB or a VARCHAR should have the same cost. So changing the data type won't help. ## Comment 25285 Date: 2017-05-03 15:59:17 +0200 From: Anthony Bucci &lt;<anthony>&gt; Thank you, I've changed the ticket to enhancement and raised the importance to High. I'll experiment with the workaround you suggest. (In reply to Ying Zhang from comment 1) > The situation is indeed caused by that LIMIT is not pushed down (shown > clearly in the TRACE output). It's been on our TODO list for quite sometime > to push down some simple LIMIT cases... Can you please mark this ticket as > an "enhancement" with higher importance? > > If possible, a quicker workaround is of course to first select the 1 > "fieldname", before computing its length(). > > It's unrelated to CLOB or VARCHAR. Computing the length of a CLOB or a > VARCHAR should have the same cost. So changing the data type won't help. ## Comment 27673 Date: 2020-04-17 14:11:05 +0200 From: @PedroTadim A new optimization was added today that pushes down limit and sample relations under projections. It will be available in the next feature release in June.
unexpectedly slow execution of SELECT length(fieldname) FROM tablename LIMIT 1 queries
https://api.github.com/repos/MonetDB/MonetDB/issues/6298/comments
0
2020-11-30T15:47:22Z
2024-06-27T12:59:27Z
https://github.com/MonetDB/MonetDB/issues/6298
753,588,953
6,298
[ "MonetDB", "MonetDB" ]
Date: 2017-04-28 16:46:46 +0200 From: @PedroTadim To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.15 (Dec2016-SP3) CC: @njnes Last updated: 2017-06-12 15:14:39 +0200 ## Comment 25274 Date: 2017-04-28 16:46:46 +0200 From: @PedroTadim User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36 Build Identifier: The server gets a SIGABRT signal (assertion error). Reproducible: Always ### Steps to Reproduce: 1. CREATE TABLE tab1(col0 INTEGER, col1 INTEGER, col2 INTEGER); 2. CREATE TABLE tab2(col0 INTEGER, col1 INTEGER, col2 INTEGER); 3. SELECT ALL - COUNT ( * ) + - 12 * - COUNT ( * ) AS col2 FROM tab2, tab1 AS cor0; ### Actual Results: The server gets a SIGABRT signal. ### Expected Results: A result set with 0 value. The backtrace: 0 0x00007ffff4afb91f in raise () from /lib64/libc.so.6 1 0x00007ffff4afd51a in abort () from /lib64/libc.so.6 2 0x00007ffff4af3da7 in __assert_fail_base () from /lib64/libc.so.6 3 0x00007ffff4af3e52 in __assert_fail () from /lib64/libc.so.6 4 0x00007fffe8cb1647 in rel2bin_project (sql=0x7fffb000d4b0, rel=0x7fffb010f910, refs=0x7fffb0113200, topn=0x0) at rel_bin.c:2433 5 0x00007fffe8cbbdbf in subrel_bin (sql=0x7fffb000d4b0, rel=0x7fffb010f910, refs=0x7fffb0113200) at rel_bin.c:4640 6 0x00007fffe8cbc0fe in output_rel_bin (sql=0x7fffb000d4b0, rel=0x7fffb010f910) at rel_bin.c:4708 7 0x00007fffe8c72d7f in sql_relation2stmt (c=0x7fffb000d4b0, r=0x7fffb010f910) at sql.c:141 8 0x00007fffe8c9832c in SQLparser (c=0x7fffea362328) at sql_scenario.c:1092 9 0x00007ffff79a7f0a in runPhase (c=0x7fffea362328, phase=1) at mal_scenario.c:517 10 0x00007ffff79a804e in runScenarioBody (c=0x7fffea362328) at mal_scenario.c:550 11 0x00007ffff79a81f1 in runScenario (c=0x7fffea362328) at mal_scenario.c:579 12 0x00007ffff79a9d37 in MSserveClient (dummy=0x7fffea362328) at mal_session.c:448 13 0x00007ffff79a97e1 in MSscheduleClient (command=0x7fffb00008d0 "0", challenge=0x7fffc49eddf0 "SeT4Bsaecx2", fin=0x7fffb0002980, fout=0x7fffbc002b60) at mal_session.c:339 14 0x00007ffff7a49858 in doChallenge (data=0x7fffbc0008d0) at mal_mapi.c:197 15 0x00007ffff7633bca in thread_starter (arg=0x7fffbc004c50) at gdk_system.c:485 16 0x00007ffff4e936ca in start_thread () from /lib64/libpthread.so.0 17 0x00007ffff4bcdf7f in clone () from /lib64/libc.so.6 ## Comment 25275 Date: 2017-04-28 16:51:46 +0200 From: @PedroTadim The assertion error: mserver5: rel_bin.c:2433: rel2bin_project: Assertion `0' failed. ## Comment 25278 Date: 2017-04-30 23:29:59 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [e4578a201e15](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e4578a201e15) 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=e4578a201e15](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e4578a201e15) Changeset description: fixes for the bugs 6297, 6296, 6294, 6291 and 6291 problems were in various relational optimizers ## Comment 25295 Date: 2017-05-11 15:10:11 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [a2dd125f133f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a2dd125f133f) 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=a2dd125f133f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a2dd125f133f) Changeset description: Add test for Bug #6297
7th sqllitelogictest crash :(
https://api.github.com/repos/MonetDB/MonetDB/issues/6297/comments
0
2020-11-30T15:47:18Z
2024-06-27T12:59:26Z
https://github.com/MonetDB/MonetDB/issues/6297
753,588,906
6,297
[ "MonetDB", "MonetDB" ]
Date: 2017-04-28 16:32:47 +0200 From: @PedroTadim To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.15 (Dec2016-SP3) CC: @njnes Last updated: 2017-06-12 15:14:41 +0200 ## Comment 25272 Date: 2017-04-28 16:32:47 +0200 From: @PedroTadim User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36 Build Identifier: One more sqllitelogictest crash. Reproducible: Always ### Steps to Reproduce: 1. CREATE TABLE tab0(col0 INTEGER, col1 INTEGER, col2 INTEGER); 2. CREATE TABLE tab2(col0 INTEGER, col1 INTEGER, col2 INTEGER); 3. SELECT DISTINCT - COUNT ( DISTINCT 74 ) AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1; ### Actual Results: A result set with a -1 value. ### Expected Results: An empty result set. 0x00007fffe8d6c66f in rel_push_count_down (changes=0x7fffc49ed838, sql=0x7fffb000d4b0, rel=0x7fffb00f8010) at rel_optimizer.c:1652 1652 ((sql_exp *) rel->exps->h->data)->type == e_aggr && The backtrace: 0 0x00007fffe8d6c66f in rel_push_count_down (changes=0x7fffc49ed838, sql=0x7fffb000d4b0, rel=0x7fffb00f8010) at rel_optimizer.c:1652 1 0x00007fffe8d8b056 in rewrite_topdown (sql=0x7fffb000d4b0, rel=0x7fffb00f8010, rewriter=0x7fffe8d6c5ac <rel_push_count_down>, has_changes=0x7fffc49ed838) at rel_optimizer.c:8651 2 0x00007fffe8d8b189 in rewrite_topdown (sql=0x7fffb000d4b0, rel=0x7fffb00f79e0, rewriter=0x7fffe8d6c5ac <rel_push_count_down>, has_changes=0x7fffc49ed838) at rel_optimizer.c:8680 3 0x00007fffe8d8b189 in rewrite_topdown (sql=0x7fffb000d4b0, rel=0x7fffb00f6690, rewriter=0x7fffe8d6c5ac <rel_push_count_down>, has_changes=0x7fffc49ed838) at rel_optimizer.c:8680 4 0x00007fffe8d8b189 in rewrite_topdown (sql=0x7fffb000d4b0, rel=0x7fffb00f6810, rewriter=0x7fffe8d6c5ac <rel_push_count_down>, has_changes=0x7fffc49ed838) at rel_optimizer.c:8680 5 0x00007fffe8d8b7b6 in _rel_optimizer (sql=0x7fffb000d4b0, rel=0x7fffb00f6810, level=2) at rel_optimizer.c:8800 6 0x00007fffe8d8bbe7 in _rel_optimizer (sql=0x7fffb000d4b0, rel=0x7fffb00f6810, level=2) at rel_optimizer.c:8867 7 0x00007fffe8d8bbe7 in _rel_optimizer (sql=0x7fffb000d4b0, rel=0x7fffb00f6810, level=1) at rel_optimizer.c:8867 8 0x00007fffe8d8bc3a in rel_optimizer (sql=0x7fffb000d4b0, rel=0x7fffb00f6810) at rel_optimizer.c:8875 9 0x00007fffe8c72c94 in sql_symbol2relation (c=0x7fffb000d4b0, sym=0x7fffb00f5fb0) at sql.c:121 10 0x00007fffe8c9830c in SQLparser (c=0x7fffea362328) at sql_scenario.c:1091 11 0x00007ffff79a7f0a in runPhase (c=0x7fffea362328, phase=1) at mal_scenario.c:517 12 0x00007ffff79a804e in runScenarioBody (c=0x7fffea362328) at mal_scenario.c:550 13 0x00007ffff79a81f1 in runScenario (c=0x7fffea362328) at mal_scenario.c:579 14 0x00007ffff79a9d37 in MSserveClient (dummy=0x7fffea362328) at mal_session.c:448 15 0x00007ffff79a97e1 in MSscheduleClient (command=0x7fffb00008d0 "0", challenge=0x7fffc49eddf0 "14tudnr0Wn", fin=0x7fffb0002980, fout=0x7fffbc002b60) at mal_session.c:339 16 0x00007ffff7a49858 in doChallenge (data=0x7fffbc0008d0) at mal_mapi.c:197 17 0x00007ffff7633bca in thread_starter (arg=0x7fffbc004c50) at gdk_system.c:485 18 0x00007ffff4e936ca in start_thread () from /lib64/libpthread.so.0 19 0x00007ffff4bcdf7f in clone () from /lib64/libc.so.6 ## Comment 25273 Date: 2017-04-28 16:34:10 +0200 From: @PedroTadim The actual result is a SIGSEV. The expected result is a -1. ## Comment 25277 Date: 2017-04-30 23:29:57 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [e4578a201e15](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e4578a201e15) 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=e4578a201e15](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e4578a201e15) Changeset description: fixes for the bugs 6297, 6296, 6294, 6291 and 6291 problems were in various relational optimizers ## Comment 25294 Date: 2017-05-11 15:01:12 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [e5b199766548](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e5b199766548) 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=e5b199766548](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e5b199766548) Changeset description: Add test for Bug #6296
Another sqllitelogictest crash :(
https://api.github.com/repos/MonetDB/MonetDB/issues/6296/comments
0
2020-11-30T15:47:15Z
2024-06-27T12:59:25Z
https://github.com/MonetDB/MonetDB/issues/6296
753,588,859
6,296
[ "MonetDB", "MonetDB" ]
Date: 2017-04-24 22:14:04 +0200 From: Leon Helwerda &lt;<l.s.helwerda>&gt; To: clients devs &lt;<bugs-clients>&gt; Version: 11.25.15 (Dec2016-SP3) CC: @kutsurak Last updated: 2017-05-01 13:44:57 +0200 ## Comment 25267 Date: 2017-04-24 22:14:04 +0200 From: Leon Helwerda &lt;<l.s.helwerda>&gt; User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Firefox/52.0 Build Identifier: The msqldump command should provide a dump in a format that can be used to repopulate or migrate a database. By default, it uses COPY INTO statements, but for various reasons one can switch to INSERT INTO (reasons could be to import into different DBMS or because the COPY INTO record is too long for loading into memory of a resource-limited server). For COPY INTO, it does not matter that fields of type TIMESTAMP do not have quotes. However for INSERT INTO these fields must be escaped, otherwise the MonetDB query interface rejects the statement. Reproducible: Always ### Steps to Reproduce: $ monetdb create test $ monetdb release test $ monetdb start test $ mclient -u monetdb -d test sql>CREATE TABLE events(id INTEGER, start TIMESTAMP); sql>INSERT INTO events VALUES (1, '2017-01-01 00:00:00'), (2, '2017-02-05 12:34:56'); sql>\q $ msqldump -u monetdb -d test -N -t events > events.sql $ cat events.sql -- msqldump dump table events -- MonetDB v11.25.15 (Dec2016-SP3), 'mapi:monetdb://localhost:50000/test' CREATE TABLE "sys"."events" ( "id" INTEGER, "start" TIMESTAMP ); INSERT INTO "sys"."events" VALUES (1, 2017-01-01 00:00:00.000000); INSERT INTO "sys"."events" VALUES (2, 2017-02-05 12:34:56.000000); $ mclient -u monetdb -d test -s 'DROP TABLE events' $ mclient -u monetdb -d test events.sql ### Actual Results: operation successful syntax error, unexpected sqlINT, expecting ')' or ',' in: "insert into "sys"."events" values (1, 2017-01-01 00" syntax error, unexpected sqlINT, expecting ')' or ',' in: "insert into "sys"."events" values (2, 2017-02-05 12" The table is created but is not populated from the entries in the dump. ### Expected Results: The table imports all rows of the dumped table, like the variant with COPY INTO does (by not passing -N to msqldump). ## Comment 25268 Date: 2017-04-25 10:20:31 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [b9f673db5b0e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b9f673db5b0e) made by Panagiotis Koutsourakis <kutsurak@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b9f673db5b0e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b9f673db5b0e) Changeset description: Properly quote time stamps when dumping db This fixes bug #6295
msqldump writes unescaped timestamp values when using inserts
https://api.github.com/repos/MonetDB/MonetDB/issues/6295/comments
0
2020-11-30T15:47:12Z
2024-06-27T12:59:24Z
https://github.com/MonetDB/MonetDB/issues/6295
753,588,818
6,295
[ "MonetDB", "MonetDB" ]
Date: 2017-04-24 10:51:46 +0200 From: @PedroTadim To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.15 (Dec2016-SP3) CC: @njnes Last updated: 2017-06-12 15:14:51 +0200 ## Comment 25266 Date: 2017-04-24 10:51:46 +0200 From: @PedroTadim User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36 Build Identifier: One more sqllitelogictest crash on the SQL layer. Reproducible: Always ### Steps to Reproduce: 1. CREATE TABLE tab0(pk INTEGER PRIMARY KEY, col0 INTEGER, col1 FLOAT, col2 TEXT, col3 INTEGER, col4 FLOAT, col5 TEXT); 2. SELECT + 86 / - + 59 + + - col1 + - - 40 FROM tab0 WHERE NOT + col2 IS NOT NULL; ### Actual Results: The server gets a SIGSEGV in a exp_simplify_math function call. ### Expected Results: An empty result set. The backtrace is bellow. The rewrite function is called recursively many many times. 0 0x00007fffe8d70d3d in exp_simplify_math (sql=0x0, e=0x0, changes=0x0) at rel_optimizer.c:2678 1 0x00007fffe8d7215f in exp_simplify_math (sql=0x7fffb000cf50, e=0x7fffb00ba0e0, changes=0x7fffc47ef874) at rel_optimizer.c:2941 2 0x00007fffe8d721bb in exp_simplify_math (sql=0x7fffb000cf50, e=0x7fffb00ba140, changes=0x7fffc47ef874) at rel_optimizer.c:2944 3 0x00007fffe8d7215f in exp_simplify_math (sql=0x7fffb000cf50, e=0x7fffb00ba3f0, changes=0x7fffc47ef874) at rel_optimizer.c:2941 4 0x00007fffe8d71b82 in exp_simplify_math (sql=0x7fffb000cf50, e=0x7fffb00ba4b0, changes=0x7fffc47ef874) at rel_optimizer.c:2846 5 0x00007fffe8d7234d in rel_simplify_math (changes=0x7fffc47ef874, sql=0x7fffb000cf50, rel=0x7fffb00b8b10) at rel_optimizer.c:2969 6 0x00007fffe8d8afbc in rewrite (sql=0x7fffb000cf50, rel=0x7fffb00b8b10, rewriter=0x7fffe8d721ee <rel_simplify_math>, has_changes=0x7fffc49ed978) at rel_optimizer.c:8637 7 0x00007fffe8d8afee in rewrite (sql=0x7fffb000cf50, rel=0x7fffb00b8b10, rewriter=0x7fffe8d721ee <rel_simplify_math>, has_changes=0x7fffc49ed978) at rel_optimizer.c:8640 8 0x00007fffe8d8afee in rewrite (sql=0x7fffb000cf50, rel=0x7fffb00b8b10, rewriter=0x7fffe8d721ee <rel_simplify_math>, has_changes=0x7fffc49ed978) at rel_optimizer.c:8640 9 0x00007fffe8d8afee in rewrite (sql=0x7fffb000cf50, rel=0x7fffb00b8b10, rewriter=0x7fffe8d721ee <rel_simplify_math>, has_changes=0x7fffc49ed978) at rel_optimizer.c:8640 10 0x00007fffe8d8afee in rewrite (sql=0x7fffb000cf50, rel=0x7fffb00b8b10, rewriter=0x7fffe8d721ee <rel_simplify_math>, has_changes=0x7fffc49ed978) at rel_optimizer.c:8640 11 0x00007fffe8d8afee in rewrite (sql=0x7fffb000cf50, rel=0x7fffb00b8b10, rewriter=0x7fffe8d721ee <rel_simplify_math>, has_changes=0x7fffc49ed978) at rel_optimizer.c:8640 12 0x00007fffe8d8afee in rewrite (sql=0x7fffb000cf50, rel=0x7fffb00b8b10, rewriter=0x7fffe8d721ee <rel_simplify_math>, has_changes=0x7fffc49ed978) at rel_optimizer.c:8640 ..... 32648 0x00007fffe8d8afee in rewrite (sql=0x7fffb000cf50, rel=0x7fffb00b8b10, rewriter=0x7fffe8d721ee <rel_simplify_math>, has_changes=0x7fffc49ed978) at rel_optimizer.c:8640 32649 0x00007fffe8d8afee in rewrite (sql=0x7fffb000cf50, rel=0x7fffb00b8b10, rewriter=0x7fffe8d721ee <rel_simplify_math>, has_changes=0x7fffc49ed978) at rel_optimizer.c:8640 32650 0x00007fffe8d8b386 in _rel_optimizer (sql=0x7fffb000cf50, rel=0x7fffb00b8b10, level=0) at rel_optimizer.c:8723 32651 0x00007fffe8d8bc3a in rel_optimizer (sql=0x7fffb000cf50, rel=0x7fffb00b8b10) at rel_optimizer.c:8875 32652 0x00007fffe8c72c94 in sql_symbol2relation (c=0x7fffb000cf50, sym=0x7fffb00b78a0) at sql.c:121 32653 0x00007fffe8c9830c in SQLparser (c=0x7fffea362328) at sql_scenario.c:1091 32654 0x00007ffff79a7f0a in runPhase (c=0x7fffea362328, phase=1) at mal_scenario.c:517 32655 0x00007ffff79a804e in runScenarioBody (c=0x7fffea362328) at mal_scenario.c:550 32656 0x00007ffff79a81f1 in runScenario (c=0x7fffea362328) at mal_scenario.c:579 32657 0x00007ffff79a9d37 in MSserveClient (dummy=0x7fffea362328) at mal_session.c:448 32658 0x00007ffff79a97e1 in MSscheduleClient (command=0x7fffb00008d0 "0", challenge=0x7fffc49eddf0 "r1C1YGQwcK2", fin=0x7fffb0002980, fout=0x7fffbc002b60) at mal_session.c:339 32659 0x00007ffff7a49858 in doChallenge (data=0x7fffbc0008d0) at mal_mapi.c:197 32660 0x00007ffff7633bca in thread_starter (arg=0x7fffbc004c50) at gdk_system.c:485 32661 0x00007ffff4e936ca in start_thread () from /lib64/libpthread.so.0 32662 0x00007ffff4bcdf7f in clone () from /lib64/libc.so.6 ## Comment 25280 Date: 2017-04-30 23:30:04 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [e4578a201e15](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e4578a201e15) 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=e4578a201e15](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e4578a201e15) Changeset description: fixes for the bugs 6297, 6296, 6294, 6291 and 6291 problems were in various relational optimizers ## Comment 25281 Date: 2017-05-02 10:11:02 +0200 From: @PedroTadim This bug still persists on my machine with the latest changeset of the Dec2016 branch. ## Comment 25293 Date: 2017-05-11 14:56:07 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [7e3ef5acacd0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7e3ef5acacd0) 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=7e3ef5acacd0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7e3ef5acacd0) Changeset description: Add test for Bug #6294
Sqlitelogictest crash
https://api.github.com/repos/MonetDB/MonetDB/issues/6294/comments
0
2020-11-30T15:47:09Z
2024-06-27T12:59:23Z
https://github.com/MonetDB/MonetDB/issues/6294
753,588,787
6,294
[ "MonetDB", "MonetDB" ]
Date: 2017-04-23 08:44:19 +0200 From: @mlkersten To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.15 (Dec2016-SP3) CC: @njnes, @drstmane Last updated: 2017-05-31 17:03:17 +0200 ## Comment 25263 Date: 2017-04-23 08:44:19 +0200 From: @mlkersten User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Firefox/52.0 Build Identifier: The CAST() operator should provide a consistent model for type conversion. The following works: select cast(now() - TIMESTAMP '1970/01/01 00:00:00.000' as bigint); But these are not supported: select cast(TIMESTAMP '1970/01/01 00:00:00.000' as bigint); select cast(now() as bigint); Reproducible: Always ## Comment 25264 Date: 2017-04-23 11:23:58 +0200 From: @drstmane Since the casts start with different types, this is IMHO fully consistent: type sec_interval can be cast to an integer number; type timestamp cannot be cast to an integer number. The rational is IMHO as follows: - type sec_interval can (semantically meaningful) be cast to an integer number that gives the number of seconds in that interval, - type timestamp cannot (easily/intuitively) be cast to an integer number --- unless there is an implicit assumption / explicit agreement what the semantics should be, i.e., what the resulting number represents. If the SQL standard defines cast from timestamp to integer, we should consider supporting it, if not, I see no real need for it. ## Comment 25265 Date: 2017-04-23 22:20:45 +0200 From: @mlkersten In the current implementation the TIMESTAMP can be turned into an INTEGER using the sys.epoch function.
Inconsistent typing in CAST expressions over TIMESTAMP
https://api.github.com/repos/MonetDB/MonetDB/issues/6293/comments
0
2020-11-30T15:47:06Z
2024-06-28T13:10:48Z
https://github.com/MonetDB/MonetDB/issues/6293
753,588,742
6,293
[ "MonetDB", "MonetDB" ]
Date: 2017-04-23 08:18:16 +0200 From: @mlkersten To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.15 (Dec2016-SP3) CC: @njnes Last updated: 2017-07-17 16:07:25 +0200 ## Comment 25261 Date: 2017-04-23 08:18:16 +0200 From: @mlkersten User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Firefox/52.0 Build Identifier: Create a table over which we run a small complex query. Then wrapping the same text in a function causes the the system to complain about 'too many nested operators'. Looks like an infinite loop in rel_logical_value() Test file added 0 sql_error (sql=0x7f1e3c108250, error_code=10, format=0x7f1e6c99cd90 "SELECT: too many nested operators") at /export/scratch1/mk/Dec2016//package/sql/server/sql_parser.y:6023 1 0x00007f1e6c8bbb63 in rel_logical_value_exp (sql=0x7f1e3c108250, rel=0x7f1e53001588, sc=0x7f1e3c0dbc30, f=2) at /export/scratch1/mk/Dec2016//package/sql/server/rel_select.c:1870 2 0x00007f1e6c8c8a00 in rel_value_exp2 (sql=0x7f1e3c108250, rel=0x7f1e53001588, se=0x7f1e3c0dbc30, f=2, ek=..., is_last=0x7f1e52e05dac) at /export/scratch1/mk/Dec2016//package/sql/server/rel_select.c:4461 3 0x00007f1e6c8c8ab2 in rel_value_exp (sql=0x7f1e3c108250, rel=0x7f1e53001588, se=0x7f1e3c0dbc30, f=2, ek=...) at /export/scratch1/mk/Dec2016//package/sql/server/rel_select.c:4476 4 0x00007f1e6c8bdcee in rel_logical_value_exp (sql=0x7f1e3c108250, rel=0x7f1e53001588, sc=0x7f1e3c0dbc30, f=2) at /export/scratch1/mk/Dec2016//package/sql/server/rel_select.c:2284 5 0x00007f1e6c8c8a00 in rel_value_exp2 (sql=0x7f1e3c108250, rel=0x7f1e53001588, se=0x7f1e3c0dbc30, f=2, ek=..., is_last=0x7f1e52e0615c) at /export/scratch1/mk/Dec2016//package/sql/server/rel_select.c:4461 6 0x00007f1e6c8c8ab2 in rel_value_exp (sql=0x7f1e3c108250, rel=0x7f1e53001588, se=0x7f1e3c0dbc30, f=2, ek=...) at /export/scratch1/mk/Dec2016//package/sql/server/rel_select.c:4476 7 0x00007f1e6c8bdcee in rel_logical_value_exp (sql=0x7f1e3c108250, rel=0x7f1e53001588, sc=0x7f1e3c0dbc30, f=2) at /export/scratch1/mk/Dec2016//package/sql/server/rel_select.c:2284 8 0x00007f1e6c8c8a00 in rel_value_exp2 (sql=0x7f1e3c108250, rel=0x7f1e53001588, se=0x7f1e3c0dbc30, f=2, ek=..., is_last=0x7f1e52e0650c) at /export/scratch1/mk/Dec2016//package/sql/server/rel_select.c:4461 9 0x00007f1e6c8c8ab2 in rel_value_exp (sql=0x7f1e3c108250, rel=0x7f1e53001588, se=0x7f1e3c0dbc30, f=2, ek=...) at /export/scratch1/mk/Dec2016//package/sql/server/rel_select.c:4476 10 0x00007f1e6c8bdcee in rel_logical_value_exp (sql=0x7f1e3c108250, rel=0x7f1e53001588, sc=0x7f1e3c0dbc30, f=2) at /export/scratch1/mk/Dec2016//package/sql/server/rel_select.c:2284 11 0x00007f1e6c8c8a00 in rel_value_exp2 (sql=0x7f1e3c108250, rel=0x7f1e53001588, se=0x7f1e3c0dbc30, f=2, ek=..., is_last=0x7f1e52e068bc) at /export/scratch1/mk/Dec2016//package/sql/server/rel_select.c:4461 12 0x00007f1e6c8c8ab2 in rel_value_exp (sql=0x7f1e3c108250, rel=0x7f1e53001588, se=0x7f1e3c0dbc30, f=2, ek=...) at /export/scratch1/mk/Dec2016//package/sql/server/rel_select.c:4476 13 0x00007f1e6c8bdcee in rel_logical_value_exp (sql=0x7f1e3c108250, rel=0x7f1e53001588, sc=0x7f1e3c0dbc30, f=2) at /export/scratch1/mk/Dec2016//package/sql/server/rel_select.c:2284 14 0x00007f1e6c8c8a00 in rel_value_exp2 (sql=0x7f1e3c108250, rel=0x7f1e53001588, se=0x7f1e3c0dbc30, f=2, ek=..., is_last=0x7f1e52e06c6c) at /export/scratch1/mk/Dec2016//package/sql/server/rel_select.c:4461 15 0x00007f1e6c8c8ab2 in rel_value_exp (sql=0x7f1e3c108250, rel=0x7f1e53001588, se=0x7f1e3c0dbc30, f=2, ek=...) at /export/scratch1/mk/Dec2016//package/sql/server/rel_select.c:4476 16 0x00007f1e6c8bdcee in rel_logical_value_exp (sql=0x7f1e3c108250, rel=0x7f1e53001588, sc=0x7f1e3c0dbc30, f=2) at /export/scratch1/mk/Dec2016//package/sql/server/rel_select.c:2284 Reproducible: Always ## Comment 25262 Date: 2017-04-23 08:21:26 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [3f6e864df6b4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3f6e864df6b4) made by Martin Kersten <mk@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3f6e864df6b4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3f6e864df6b4) Changeset description: Added test for bug #6292 ## Comment 25296 Date: 2017-05-11 15:26:21 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [9bb37272aa9f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9bb37272aa9f) 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=9bb37272aa9f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9bb37272aa9f) Changeset description: Add missing nestedoperators.Bug-6292.stable.* files for Bug #6292 ## Comment 25375 Date: 2017-06-07 15:09:09 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [16a4efa7b3dc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=16a4efa7b3dc) 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=16a4efa7b3dc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=16a4efa7b3dc) Changeset description: fixed nested operators bug #6292 (ie allow with in function creation) ## Comment 25376 Date: 2017-06-07 15:09:45 +0200 From: @njnes added missing handling of with in function creation
Runaway SQL optimizer in too many nested operators
https://api.github.com/repos/MonetDB/MonetDB/issues/6292/comments
0
2020-11-30T15:47:03Z
2024-06-27T12:59:20Z
https://github.com/MonetDB/MonetDB/issues/6292
753,588,698
6,292
[ "MonetDB", "MonetDB" ]
Date: 2017-04-22 03:53:00 +0200 From: Roberto Nunes Mourão &lt;<robertonunesmourao>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.15 (Dec2016-SP3) CC: martin.van.dinther Last updated: 2017-06-12 15:14:48 +0200 ## Comment 25260 Date: 2017-04-22 03:53:00 +0200 From: Roberto Nunes Mourão &lt;<robertonunesmourao>&gt; User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0 Build Identifier: After executing a query that uses a function which returns a sample of a table, mclient does not show any result on the first time. Executing the same query again, mclient exits. Function example: CREATE FUNCTION amostra(pdate date, st char(2)) RETURNS TABLE(v decimal(7, 2)) BEGIN RETURN SELECT value FROM payments WHERE payment_date = pdate AND state = st SAMPLE 400; END; Query example: select avg(v) from amostra('2011-01-01', 'DF'); Reproducible: Always ### Steps to Reproduce: 1. Create a function using the SAMPLE operator. 2. Execute a query using the function. 3. Execute the query again. ### Actual Results: First, the query returned nothing. On the second time, mclient exited and a Ubuntu crash message appeared. ### Expected Results: Show the query results. The original CSV data to create the table uses 37GB. Despite it, the queries were working very well. There is no merovingian.log. mserver --version: MonetDB 5 server v11.25.15 "Dec2016-SP3" (64-bit, 128-bit integers) 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.7GiB available memory, 8 available cpu cores Libraries: libpcre: 8.38 2015-11-23 (compiled with 8.38) openssl: OpenSSL 1.0.2g 1 Mar 2016 (compiled with OpenSSL 1.0.2g-fips 1 Mar 2016) libxml2: 2.9.3 (compiled with 2.9.3) Compiled by: pbuilder@dev.monetdb.org (x86_64-pc-linux-gnu) Compilation: gcc -O3 -fomit-frame-pointer -pipe -g -D_FORTIFY_SOURCE=2 Linking : /usr/bin/ld -m elf_x86_64 ## Comment 25279 Date: 2017-04-30 23:30:02 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [e4578a201e15](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e4578a201e15) 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=e4578a201e15](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e4578a201e15) Changeset description: fixes for the bugs 6297, 6296, 6294, 6291 and 6291 problems were in various relational optimizers ## Comment 25292 Date: 2017-05-11 14:10:18 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [a1ab1d2552a2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a1ab1d2552a2) 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=a1ab1d2552a2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a1ab1d2552a2) Changeset description: Add test for Bug #6291
crash if executes a function with sample operator
https://api.github.com/repos/MonetDB/MonetDB/issues/6291/comments
0
2020-11-30T15:46:59Z
2024-06-27T12:59:19Z
https://github.com/MonetDB/MonetDB/issues/6291
753,588,655
6,291
[ "MonetDB", "MonetDB" ]
Date: 2017-04-21 15:14:56 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.15 (Dec2016-SP3) Last updated: 2017-06-12 15:21:50 +0200 ## Comment 25256 Date: 2017-04-21 15:14:56 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Build Identifier: Assertion failure: mserver5: ../../../dev/sql/server/rel_optimizer.c:8536: rel_apply_rewrite: Assertion `col' failed. when running query: SELECT s.name AS schema_nm, s.system AS is_system_schema , (SELECT CAST(COUNT(*) as int) FROM sys.functions f WHERE f.schema_id = s.id AND f.type <> 2 AND f.id NOT IN (SELECT function_id FROM sys.systemfunctions)) AS " user defined functions" , (SELECT CAST(COUNT(*) as int) FROM sys.functions f WHERE f.schema_id = s.id AND f.type = 2 AND f.id NOT IN (SELECT function_id FROM sys.systemfunctions)) AS " user defined procedures" FROM sys.schemas AS s WHERE s.name IN ('json', 'profiler', 'sys'); The problem is with the: AND f.id NOT IN (SELECT function_id FROM sys.systemfunctions) part. Without it the query does not crash. Reproducible: Always ### Steps to Reproduce: 1. Start mserver5 (MonetDB 5 server v11.25.20 with assertions enabled) 2. Start mclient 3. Run query: SELECT s.name AS schema_nm, s.system AS is_system_schema , (SELECT CAST(COUNT(*) as int) FROM sys.functions f WHERE f.schema_id = s.id AND f.type <> 2 AND f.id NOT IN (SELECT function_id FROM sys.systemfunctions)) AS " user defined functions" , (SELECT CAST(COUNT(*) as int) FROM sys.functions f WHERE f.schema_id = s.id AND f.type = 2 AND f.id NOT IN (SELECT function_id FROM sys.systemfunctions)) AS " user defined procedures" FROM sys.schemas AS s WHERE s.name IN ('json', 'profiler', 'sys'); ### Actual Results: Crash of mserver5, with assertion failure. mserver5: ../../../dev/sql/server/rel_optimizer.c:8536: rel_apply_rewrite: Assertion `col' failed. ### Expected Results: No crash and no assertion violation. ## Comment 25290 Date: 2017-05-11 13:44:39 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [d46b715e0f7a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d46b715e0f7a) 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=d46b715e0f7a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d46b715e0f7a) Changeset description: Add test for Bug #6290 ## Comment 25291 Date: 2017-05-11 13:48:46 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; Fix has been implemented as part of [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e4578a201e15](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e4578a201e15)
Crash (and assertion failure) with a correlated subquery with NOT IN in the select-list
https://api.github.com/repos/MonetDB/MonetDB/issues/6290/comments
0
2020-11-30T15:46:56Z
2024-06-27T12:59:18Z
https://github.com/MonetDB/MonetDB/issues/6290
753,588,611
6,290
[ "MonetDB", "MonetDB" ]
Date: 2017-04-21 13:32:13 +0200 From: @joerivanruth To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: @joerivanruth, @njnes Last updated: 2017-07-17 16:07:29 +0200 ## Comment 25255 Date: 2017-04-21 13:32:13 +0200 From: @joerivanruth User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36 Build Identifier: I have a MERGE TABLE which includes a REMOTE TABLE. Accessing the merge table fails in various ways. Attached a shell script and some sql files. In demo.sh, you can select a wide table (line 3, COMMON=wide.sql) or a narrow table (COMMON=narrow.sql). The script assumes a running monetdbd with two databases foo and bar. On foo, it creates a schema 'atraf' with a MERGE TABLE containing a REMOTE TABLE from bar. On bar, it creates the table referred to by foo. Then it runs a query on the merge table. The result varies by platform and table width. 1) on Ubuntu (Xenial64), both narrow and wide fail with: an error occurred on connection: Connection lost 2) on OSX, narrow hangs, and the session is not cleaned up from sys.sessions after Control-C. 3) on OSX with a wide table, database bar reports at query time a syntax error in the DDL: :: query on foo ::::::::::::::::::::::::::::::::::::::::::::::::::::::: SET SCHEMA atraf; auto commit mode: on (mapi:monetdb://monetdb@localhost/bar) operator expected "DestStateFips" varchar(10) default null, ^<identifier> expected "DestStateName" varchar(100) default null, ... So this is probably a memory corruption error. Reproducible: Always ### Steps to Reproduce: 1. start monetdbd, and start+release two databases 'foo' and 'bar'. 2. run the attached script. 3. optionally, switch line 3, COMMON=, between wide.sql and narrow.sql ### Actual Results: See above: a crash, a hang or garbage errors ### Expected Results: a query result. ## Comment 25257 Date: 2017-04-21 15:17:50 +0200 From: @joerivanruth Created attachment 550 Tar file containing the scripts > Attached file: [crash.tar](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6289_crash.tar_550) (application/x-tar, 11776 bytes) > Description: Tar file containing the scripts ## Comment 25276 Date: 2017-04-30 23:27:41 +0200 From: @njnes if exists isn't supported on the released versions yet a test without monetdbd shows no problems (on fedora) ## Comment 25282 Date: 2017-05-02 14:02:25 +0200 From: @joerivanruth You're right, I was actually testing on 'default', not a released version. I can't seem to remove the version now :( I still see the behaviour on OS X and Ubuntu, with and without monetdbd. ## Comment 25396 Date: 2017-06-28 10:57:44 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [ec29ede4f97c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ec29ede4f97c) 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=ec29ede4f97c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ec29ede4f97c) Changeset description: fixed bug in rel_read, solves bug #6289 ## Comment 25397 Date: 2017-06-28 11:00:49 +0200 From: @njnes fixed the problem in rel_read ## Comment 25399 Date: 2017-06-28 13:21:26 +0200 From: @joerivanruth Created attachment 553 Shell- and sql script demonstrating another failure Another test case > Attached file: [crash2.tar.gz](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6289_crash2.tar.gz_553) (application/x-gzip, 1278 bytes) > Description: Shell- and sql script demonstrating another failure ## Comment 25400 Date: 2017-06-28 13:24:57 +0200 From: @joerivanruth Unfortunately, I still get failures with MERGE tables. On Linux (rocks085) this script yields + mclient -e -d foo -s 'SET SCHEMA atraf; SELECT COUNT(DISTINCT "Year") FROM ontime;' SET SCHEMA atraf; SELECT COUNT(DISTINCT "Year") FROM ontime; auto commit mode: on (mapi:monetdb://monetdb@localhost/bar) operator expected On OS X it's slightly different: + mclient -e -d foo -s 'SET SCHEMA atraf; SELECT COUNT(DISTINCT "Year") FROM ontime;' SET SCHEMA atraf; SELECT COUNT(DISTINCT "Year") FROM ontime; auto commit mode: on (mapi:monetdb://monetdb@localhost/bar) operator expected "DestStateFips" varchar(10) default null, ^<identifier> expected "DestStateName" varchar(100) default null, ^<identifier> expected This continues for quite a while, ending in "Div5WheelsOff" varchar(10) default null, ^<identifier> expected "Div5TailNum" varchar(10) default null ^<identifier> expected ); ^<identifier> expected Note these error messages about the DDL occur when querying the merge table. ## Comment 25406 Date: 2017-07-03 20:51:39 +0200 From: @njnes fixed a problem in RMTput, ie buffer to small
Crashes and hangs with remote tables
https://api.github.com/repos/MonetDB/MonetDB/issues/6289/comments
0
2020-11-30T15:46:52Z
2024-06-27T12:59:17Z
https://github.com/MonetDB/MonetDB/issues/6289
753,588,566
6,289
[ "MonetDB", "MonetDB" ]
Date: 2017-04-18 17:16:24 +0200 From: @joerivanruth To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.15 (Dec2016-SP3) CC: @njnes Last updated: 2017-05-01 13:32:41 +0200 ## Comment 25245 Date: 2017-04-18 17:16:24 +0200 From: @joerivanruth With the following script I would expect to receive two empty results. Instead, I get "unable to find banana.t(num)". This is both on default and on Dec2016_SP4_release. DROP SCHEMA banana; CREATE SCHEMA banana; SET SCHEMA banana; CREATE MERGE TABLE t ( num DECIMAL(8,2) DEFAULT NULL ); CREATE TABLE t0 ( num DECIMAL(8,2) DEFAULT NULL ); ALTER TABLE t ADD TABLE t0; SELECT * FROM t; CREATE FUNCTION foo () RETURNS TABLE (i DECIMAL(8,2)) BEGIN RETURN SELECT * FROM t; END; -- this fails unexpectedly SELECT * FROM foo(); ## Comment 25248 Date: 2017-04-19 13:58:09 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [6df359498f13](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6df359498f13) 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=6df359498f13](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6df359498f13) Changeset description: fixed bug #6288, ie meretable wasn't rewritten within functions Found/fixed problem in atom_mul, initialize result type ## Comment 25249 Date: 2017-04-19 13:58:59 +0200 From: @njnes Fixed, the use of mergetables in functions wasn't handled properly (in the optimizers). Now we rewrite it.
Function cannot find column in merge table
https://api.github.com/repos/MonetDB/MonetDB/issues/6288/comments
0
2020-11-30T15:46:49Z
2024-06-27T12:59:16Z
https://github.com/MonetDB/MonetDB/issues/6288
753,588,527
6,288
[ "MonetDB", "MonetDB" ]
Date: 2017-04-16 16:40:13 +0200 From: Anthony Damico &lt;<ajdamico>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.15 (Dec2016-SP3) CC: ajdamico, @njnes Last updated: 2017-10-26 14:01:43 +0200 ## Comment 25244 Date: 2017-04-16 16:40:13 +0200 From: Anthony Damico &lt;<ajdamico>&gt; User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 Build Identifier: hi, here's a minimal example.. CORR appears to return the same type as the first argument but i'm not sure it should ever return an integer? Reproducible: Always ### Steps to Reproduce: CREATE TABLE x ( a DOUBLE , b DOUBLE ); INSERT INTO x VALUES (1.0,2.0); INSERT INTO x VALUES (2.0,3.0); SELECT * FROM x; SELECT CORR( a , b ) FROM x; SELECT CORR( a , CAST( b AS INTEGER ) ) FROM x; SELECT CORR( CAST( a AS INTEGER ) , b ) FROM x; ### Actual Results: returns same type as first argument ### Expected Results: return some type with decimals thanks ## Comment 25652 Date: 2017-09-20 09:54:08 +0200 From: @njnes seems a bug in the auto coersion of inputs of the aggregate function. In the example case(s) we would expect always a double result type. If however both inputs are changed into integers we would (should) use that output time. ## Comment 25657 Date: 2017-09-20 11:13:35 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [ac56f9c146f1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ac56f9c146f1) 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=ac56f9c146f1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=ac56f9c146f1) Changeset description: fixed bug #6287, ie incase of numeric multi argument aggregators up cast all arguments to the largest type, when resolving the aggregator. ## Comment 25658 Date: 2017-09-20 11:22:27 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [d6e71ec46d34](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d6e71ec46d34) 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=d6e71ec46d34](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=d6e71ec46d34) Changeset description: add test for bug #6287
should the CORR function return some numeric type that allows fractions?
https://api.github.com/repos/MonetDB/MonetDB/issues/6287/comments
0
2020-11-30T15:46:46Z
2024-06-27T12:59:15Z
https://github.com/MonetDB/MonetDB/issues/6287
753,588,488
6,287
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6286/comments
0
2020-11-30T15:46:42Z
2020-11-30T15:46:45Z
https://github.com/MonetDB/MonetDB/issues/6286
753,588,432
6,286
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6285/comments
0
2020-11-30T15:46:39Z
2020-11-30T15:46:41Z
https://github.com/MonetDB/MonetDB/issues/6285
753,588,394
6,285
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6284/comments
0
2020-11-30T15:46:37Z
2020-11-30T15:46:39Z
https://github.com/MonetDB/MonetDB/issues/6284
753,588,360
6,284
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6283/comments
0
2020-11-30T15:46:34Z
2020-11-30T15:46:35Z
https://github.com/MonetDB/MonetDB/issues/6283
753,588,317
6,283
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6282/comments
0
2020-11-30T15:46:31Z
2020-11-30T15:46:32Z
https://github.com/MonetDB/MonetDB/issues/6282
753,588,264
6,282
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6281/comments
0
2020-11-30T15:46:28Z
2020-11-30T15:46:30Z
https://github.com/MonetDB/MonetDB/issues/6281
753,588,226
6,281
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6280/comments
0
2020-11-30T15:46:25Z
2020-11-30T15:46:27Z
https://github.com/MonetDB/MonetDB/issues/6280
753,588,177
6,280
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6279/comments
0
2020-11-30T15:46:21Z
2020-11-30T15:46:23Z
https://github.com/MonetDB/MonetDB/issues/6279
753,588,131
6,279
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6278/comments
0
2020-11-30T15:46:18Z
2020-11-30T15:46:19Z
https://github.com/MonetDB/MonetDB/issues/6278
753,588,071
6,278
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6277/comments
0
2020-11-30T15:46:15Z
2020-11-30T15:46:17Z
https://github.com/MonetDB/MonetDB/issues/6277
753,588,022
6,277
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6276/comments
0
2020-11-30T15:46:11Z
2020-11-30T15:46:13Z
https://github.com/MonetDB/MonetDB/issues/6276
753,587,978
6,276
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6275/comments
0
2020-11-30T15:46:08Z
2020-11-30T15:46:10Z
https://github.com/MonetDB/MonetDB/issues/6275
753,587,940
6,275
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6274/comments
0
2020-11-30T15:46:04Z
2020-11-30T15:46:06Z
https://github.com/MonetDB/MonetDB/issues/6274
753,587,882
6,274
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6273/comments
0
2020-11-30T15:46:01Z
2020-11-30T15:46:03Z
https://github.com/MonetDB/MonetDB/issues/6273
753,587,847
6,273
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6272/comments
0
2020-11-30T15:45:58Z
2020-11-30T15:46:00Z
https://github.com/MonetDB/MonetDB/issues/6272
753,587,811
6,272
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6271/comments
0
2020-11-30T15:45:55Z
2020-11-30T15:45:57Z
https://github.com/MonetDB/MonetDB/issues/6271
753,587,781
6,271
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6270/comments
0
2020-11-30T15:45:52Z
2020-11-30T15:45:54Z
https://github.com/MonetDB/MonetDB/issues/6270
753,587,730
6,270
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6269/comments
0
2020-11-30T15:45:48Z
2020-11-30T15:45:51Z
https://github.com/MonetDB/MonetDB/issues/6269
753,587,670
6,269
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6268/comments
0
2020-11-30T15:45:45Z
2020-11-30T15:45:47Z
https://github.com/MonetDB/MonetDB/issues/6268
753,587,622
6,268
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6267/comments
0
2020-11-30T15:45:41Z
2020-11-30T15:45:43Z
https://github.com/MonetDB/MonetDB/issues/6267
753,587,577
6,267
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6266/comments
0
2020-11-30T15:45:38Z
2020-11-30T15:45:40Z
https://github.com/MonetDB/MonetDB/issues/6266
753,587,541
6,266
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6265/comments
0
2020-11-30T15:45:34Z
2020-11-30T15:45:37Z
https://github.com/MonetDB/MonetDB/issues/6265
753,587,492
6,265
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6264/comments
0
2020-11-30T15:45:32Z
2020-11-30T15:45:33Z
https://github.com/MonetDB/MonetDB/issues/6264
753,587,456
6,264
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6263/comments
0
2020-11-30T15:45:29Z
2020-11-30T15:45:31Z
https://github.com/MonetDB/MonetDB/issues/6263
753,587,422
6,263
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T15:44:36Z 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/6262/comments
0
2020-11-30T15:45:26Z
2020-11-30T15:45:28Z
https://github.com/MonetDB/MonetDB/issues/6262
753,587,376
6,262
[ "MonetDB", "MonetDB" ]
Date: 2017-04-13 14:02:07 +0200 From: @swingbit To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.15 (Dec2016-SP3) CC: @mlkersten, @njnes Last updated: 2017-10-26 14:01:35 +0200 ## Comment 25218 Date: 2017-04-13 14:02:07 +0200 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36 Build Identifier: Here's a minimal example: CREATE table t(a int); START TRANSACTION; INSERT INTO t VALUES (1); explain SELECT * FROM t as t1, t as t2 ; ROLLBACK; The output of Jun2016 looks like this: C_2:bat[:oid] := sql.tid(X_1,"spinque","t"); X_5:bat[:int] := sql.bind(X_1,"spinque","t","a",0); (C_8:bat[:oid],r1_8:bat[:int]) := sql.bind(X_1,"spinque","t","a",2); X_11:bat[:int] := sql.bind(X_1,"spinque","t","a",1); X_13 := sql.delta(X_5,C_8,r1_8,X_11); X_14 := algebra.projection(C_2,X_13); (C_15,r1_22) := algebra.crossproduct(X_14,X_14); Notice that, as you would expect, the final crossproduct appens between two instances of X_14 The output of Dec2016 looks like this: C_4:bat[:oid] := sql.tid(X_3,"spinque","t"); X_7:bat[:int] := bat.new(nil:int); X_10:bat[:oid] := bat.new(nil:oid); r1_11:bat[:int] := bat.new(nil:int); X_13:bat[:int] := sql.bind(X_3,"spinque","t","a",1:int); X_15 := sql.delta(X_7,X_10,r1_11,X_13); X_16 := algebra.projection(C_4,X_15); X_18:bat[:int] := bat.new(nil:int); X_19:bat[:oid] := bat.new(nil:oid); r1_20:bat[:int] := bat.new(nil:int); X_22 := sql.delta(X_18,X_19,r1_20,X_13); X_23 := algebra.projection(C_4,X_22); (X_24,r1_25) := algebra.crossproduct(X_16,X_23); Notice that now the final crossproduct is using two different variables. The content of X_16 and X_23 is obviously the same, but the commonTerms optimizer can no longer simplify them because the application of delta tables is now based on bat.new(), which is not reusable. Please don't stop at this simple example. In a more complex query that for example reuses the same views in multiple places, this leads to such views being computed over and over. This is currently a complete show-stopper for us. All our plans becomes several times longer and query times explode. As much as I like Dec2016 in many other ways, we will have to step back to Jun2016. If I may raise a (hopefully constructive) concern, I keep seeing what look to me like conflicting goals: on the one hands, much effort put into a simple assembly-like language, which is perfect for optimizations like commonTerms (crucial in real applications!), but on the other hand choices that clearly go in the opposite direction, first and foremost the usage of operators with side-effects (e.g. new, in-place append, packIncrement), which make many optimizations almost useless. See also https://www.monetdb.org/bugzilla/show_bug.cgi?id=3992, it has never been tackled. Reproducible: Always $ mserver5 --version MonetDB 5 server v11.25.12 (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 25246 Date: 2017-04-19 09:58:27 +0200 From: @swingbit Digging a bit into it, I found that optimizer.emptybind() turns sql.emptybind() calls into bat.new() calls. Removing this optimizer gives: C_4:bat[:oid] := sql.tid(X_3,"spinque","t"); X_7:bat[:int] := sql.emptybind(X_3,"spinque","t","a",0:int); (C_10:bat[:oid],r1_11:bat[:int]) := sql.emptybind(X_3,"spinque","t","a",2:int); X_13:bat[:int] := sql.bind(X_3,"spinque","t","a",1:int); X_15 := sql.delta(X_7,C_10,r1_11,X_13); X_16 := algebra.projection(C_4,X_15); X_18:bat[:int] := sql.emptybind(X_3,"spinque","t","a",0:int); (C_19:bat[:oid],r1_20:bat[:int]) := sql.emptybind(X_3,"spinque","t","a",2:int); X_22 := sql.delta(X_18,C_19,r1_20,X_13); X_23 := algebra.projection(C_4,X_22); (X_24,r1_25) := algebra.crossproduct(X_16,X_23); However, sql.emptybat still results not reusable, which seems weird to me. I think the following is missing: diff -r 80c50983077c monetdb5/optimizer/opt_support.c --- a/monetdb5/optimizer/opt_support.c Tue Mar 28 15:09:09 2017 +0200 +++ b/monetdb5/optimizer/opt_support.c Wed Apr 19 09:51:00 2017 +0200 @@ -437,6 +437,8 @@ if (getFunctionId(p) == bindRef) return FALSE; if (getFunctionId(p) == bindidxRef) return FALSE; if (getFunctionId(p) == binddbatRef) return FALSE; + if (getFunctionId(p) == emptybindRef) return FALSE; + if (getFunctionId(p) == emptybindidxRef) return FALSE; if (getFunctionId(p) == columnBindRef) return FALSE; if (getFunctionId(p) == copy_fromRef) return FALSE; /* assertions are the end-point of a flow path */ Could you please comment on the purpose of optimizer.emptybind() ? ## Comment 25247 Date: 2017-04-19 10:00:20 +0200 From: @swingbit Forgot to mention, probably it was clear already: by removing optimizer.emptybind and adding those two lines to hasSideEffects() function, plans are back to normal. ## Comment 25382 Date: 2017-06-13 16:58:58 +0200 From: @swingbit It turns out that removing optimizer.emptybind() from the default pipeline (together with the little patch to hasSideEffects() function) did solve the plan explosion issue, but I see now that in some cases the resulting plan is not correct. However, reintroducing it gives me unacceptable plans. Getting stuck with older versions is no real solution. I'm a bit frustrated with no good option forward. Does anyone have a little time to look at this and comment? ## Comment 25571 Date: 2017-08-13 20:28:21 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [7018c1058588](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7018c1058588) made by Martin Kersten <mk@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=7018c1058588](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=7018c1058588) Changeset description: Avoid removal of sql.bind operations Empty persistent table operations should only be removed when there are no other updates within the same transaction addressing bug #6261 ## Comment 25572 Date: 2017-08-13 20:31:15 +0200 From: @mlkersten Reduced the aggressive replacement of empty bat producing operation in the empty-bind operations to cope with the issue reported in the first example. X_4 := sql.mvc(); C_5:bat[:oid] := sql.tid(X_4, "sys", "t"); X_8:bat[:int] := sql.bind(X_4, "sys", "t", "a", 0:int); (C_13:bat[:oid], X_14:bat[:int]) := sql.bind(X_4, "sys", "t", "a", 2:int); X_11:bat[:int] := sql.bind(X_4, "sys", "t", "a", 1:int); X_16 := sql.delta(X_8, C_13, X_14, X_11); X_17 := algebra.projection(C_5, X_16); (X_25, X_26) := algebra.crossproduct(X_17, X_17); X_28 := algebra.projection(X_26, X_17); X_27 := algebra.projection(X_25, X_17);
New handling of delta tables hurts badly reusage of bats
https://api.github.com/repos/MonetDB/MonetDB/issues/6261/comments
0
2020-11-30T15:45:21Z
2024-06-27T12:59:07Z
https://github.com/MonetDB/MonetDB/issues/6261
753,587,300
6,261
[ "MonetDB", "MonetDB" ]
Date: 2017-04-13 11:58:26 +0200 From: @PedroTadim To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.15 (Dec2016-SP3) CC: @njnes Last updated: 2017-05-01 13:33:40 +0200 ## Comment 25217 Date: 2017-04-13 11:58:26 +0200 From: @PedroTadim User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36 Build Identifier: One more sqlitelogictest crash :) The mserver gets a SIGSEGV with a SQL query. Reproducible: Always ### Steps to Reproduce: CREATE TABLE tab0(pk INTEGER PRIMARY KEY, col0 INTEGER, col1 FLOAT, col2 TEXT, col3 INTEGER, col4 FLOAT, col5 TEXT); INSERT INTO tab0 VALUES(0,698,169.42,'apdbu',431,316.15,'sqvis'); INSERT INTO tab0 VALUES(1,538,676.36,'fuqeu',514,685.97,'bgwrq'); INSERT INTO tab0 VALUES(2,90,205.26,'yrrzx',123,836.88,'kpuhc'); INSERT INTO tab0 VALUES(3,620,864.8,'myrdv',877,820.98,'oxkuv'); INSERT INTO tab0 VALUES(4,754,677.3,'iofrg',67,665.49,'bzqba'); INSERT INTO tab0 VALUES(5,107,710.19,'lhfro',286,504.28,'kwwsg); INSERT INTO tab0 VALUES(6,904,193.16,'eozui',48,698.55,'ejyzs'); INSERT INTO tab0 VALUES(7,606,650.64,'ovmce',417,962.43,'dvkbh'); INSERT INTO tab0 VALUES(8,535,18.11,'ijika',630,489.63,'hpnyu'); INSERT INTO tab0 VALUES(9,501,776.40,'cvygg',725,75.5,'etlyv'); SELECT * FROM tab0 AS cor0 WHERE NOT NULL IN ( col3 ); ### Actual Results: The server gets a SIGSEGV (details bellow). ### Expected Results: An empty result set. The SIGSEGV: Thread 6 "mserver5" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffc49f1700 (LWP 781)] 0x00007fffe8d5f3bf in exp_subtype (e=0x0) at rel_exp.c:654 654 switch(e->type) { Backtrace: 0 0x00007fffe8d5f3bf in exp_subtype (e=0x0) at rel_exp.c:654 1 0x00007fffe8d3a8b4 in rel_logical_value_exp (sql=0x7fffb000d4b0, rel=0x7fffc49f04b0, sc=0x7fffb00e3130, f=1) at rel_select.c:2058 2 0x00007fffe8d468d8 in rel_value_exp2 (sql=0x7fffb000d4b0, rel=0x7fffc49f04b0, se=0x7fffb00e3130, f=1, ek=..., is_last=0x7fffc49f047c) at rel_select.c:4461 3 0x00007fffe8d4698a in rel_value_exp (sql=0x7fffb000d4b0, rel=0x7fffc49f04b0, se=0x7fffb00e3130, f=1, ek=...) at rel_select.c:4476 4 0x00007fffe8d3e77f in rel_logical_exp (sql=0x7fffb000d4b0, rel=0x7fffb00e3290, sc=0x7fffb00e3150, f=1) at rel_select.c:2779 5 0x00007fffe8d4766e in rel_select_exp (sql=0x7fffb000d4b0, rel=0x7fffb00e3290, sn=0x7fffb00e3210, ek=...) at rel_select.c:4684 6 0x00007fffe8d488f7 in rel_query (sql=0x7fffb000d4b0, rel=0x0, sq=0x7fffb00e3210, toplevel=1, ek=..., apply=8) at rel_select.c:4966 7 0x00007fffe8d4a343 in rel_subquery (sql=0x7fffb000d4b0, rel=0x0, sq=0x7fffb00e3210, ek=..., apply=8) at rel_select.c:5349 8 0x00007fffe8d4a454 in rel_selects (sql=0x7fffb000d4b0, s=0x7fffb00e3210) at rel_select.c:5370 9 0x00007fffe8d3179e in rel_semantic (sql=0x7fffb000d4b0, s=0x7fffb00e3210) at rel_semantic.c:210 10 0x00007fffe8c74c18 in sql_symbol2relation (c=0x7fffb000d4b0, sym=0x7fffb00e3210) at sql.c:117 11 0x00007fffe8c9a24b in SQLparser (c=0x7fffea363328) at sql_scenario.c:1078 12 0x00007ffff79a7f24 in runPhase (c=0x7fffea363328, phase=1) at mal_scenario.c:517 13 0x00007ffff79a8068 in runScenarioBody (c=0x7fffea363328) at mal_scenario.c:550 14 0x00007ffff79a820b in runScenario (c=0x7fffea363328) at mal_scenario.c:579 15 0x00007ffff79a9d51 in MSserveClient (dummy=0x7fffea363328) at mal_session.c:448 16 0x00007ffff79a97fb in MSscheduleClient (command=0x7fffb00008d0 "0", challenge=0x7fffc49f0df0 "EACsk9qc", fin=0x7fffb0002980, fout=0x7fffbc002b60) at mal_session.c:339 17 0x00007ffff7a4986b in doChallenge (data=0x7fffbc0008d0) at mal_mapi.c:197 18 0x00007ffff7633c2a in thread_starter (arg=0x7fffbc004c50) at gdk_system.c:485 19 0x00007ffff4e946ca in start_thread () from /lib64/libpthread.so.0 20 0x00007ffff4bcef7f in clone () from /lib64/libc.so.6 ## Comment 25250 Date: 2017-04-19 14:08:48 +0200 From: @njnes fixed. added some more defensive code. ## Comment 25251 Date: 2017-04-19 15:12:46 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [c150cc9de5d5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c150cc9de5d5) 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=c150cc9de5d5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c150cc9de5d5) Changeset description: fixed bug #6260, ie crash in the in type checking. approved output (properties aren't stable?)
Sqlitelogictest crash
https://api.github.com/repos/MonetDB/MonetDB/issues/6260/comments
0
2020-11-30T15:45:18Z
2024-06-27T12:59:07Z
https://github.com/MonetDB/MonetDB/issues/6260
753,587,267
6,260
[ "MonetDB", "MonetDB" ]
Date: 2017-04-12 16:43:26 +0200 From: @PedroTadim To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.15 (Dec2016-SP3) CC: @njnes Last updated: 2017-05-01 13:45:01 +0200 ## Comment 25213 Date: 2017-04-12 16:43:26 +0200 From: @PedroTadim User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36 Build Identifier: The server crashes after performing a select query with a long where clause. The problem persists with and without parenthesis in the where clauses. Reproducible: Always ### Steps to Reproduce: 1. CREATE TABLE tab0(pk INTEGER PRIMARY KEY, col0 INTEGER, col1 FLOAT, col2 TEXT, col3 INTEGER, col4 FLOAT, col5 TEXT); 2. SELECT pk FROM tab0 WHERE (col1 < 94.60) AND (col0 < 90) AND col3 >= 40 AND (col0 > 89); ### Actual Results: The server gets an assertion error: mserver5: gdk_select.c:900: BAT_scanselect: Assertion `!lval || !hval || (*cmp)(tl, th) <= 0' failed. The backtrace: 0 0x00007ffff4afc91f in raise () from /lib64/libc.so.6 1 0x00007ffff4afe51a in abort () from /lib64/libc.so.6 2 0x00007ffff4af4da7 in __assert_fail_base () from /lib64/libc.so.6 3 0x00007ffff4af4e52 in __assert_fail () from /lib64/libc.so.6 4 0x00007ffff73a7170 in BAT_scanselect (b=0x627b80, s=0x7fff9c0031b0, bn=0x7fff9c003760, tl=0x7fffa7bfc760, th=0x7fffa7bfc770, li=1, hi=1, equi=0, anti=0, lval=1, hval=1, maximum=10, use_imprints=1) at gdk_select.c:900 5 0x00007ffff73ad62d in BATselect (b=0x627b80, s=0x7fff9c0031b0, tl=0x7fffa7bfc760, th=0x7fffa7bfc770, li=1, hi=1, anti=0) at gdk_select.c:1843 6 0x00007ffff79f9f10 in ALGsubselect2 (result=0x7fffb0130380, bid=0x7fffb01302c0, sid=0x7fffb0130340, low=0x7fffb0130160, high=0x7fffb0130120, li=0x7fffb01303a0 "", hi=0x7fffb01303a0 "", anti=0x7fffb01303a0 "") at algebra.c:257 7 0x00007ffff7981ca9 in malCommandCall (stk=0x7fffb0130040, pci=0x7fffb0129370) at mal_interpreter.c:117 8 0x00007ffff7984643 in runMALsequence (cntxt=0x7fffea363328, mb=0x7fffb011be00, startpc=14, stoppc=15, stk=0x7fffb0130040, env=0x0, pcicaller=0x0) at mal_interpreter.c:669 9 0x00007ffff79898de in DFLOWworker (T=0x7ffff7d34540 <workers+320>) at mal_dataflow.c:403 10 0x00007ffff4e946ca in start_thread () from /lib64/libpthread.so.0 11 0x00007ffff4bcef7f in clone () from /lib64/libc.so.6 ## Comment 25214 Date: 2017-04-12 17:02:31 +0200 From: @njnes I'm unable to repeat the problem using your steps 1/2. Did you also insert some data? ## Comment 25215 Date: 2017-04-12 18:02:40 +0200 From: @PedroTadim Yes! INSERT INTO tab0 VALUES(0,45,106.20,'qixrh',119,127.82,'lqafj') INSERT INTO tab0 VALUES(1,47,107.11,'avveo',120,128.36,'tzjrc') INSERT INTO tab0 VALUES(2,48,108.0,'htssi',121,132.69,'ablzu') INSERT INTO tab0 VALUES(3,116,109.7,'hvapv',123,133.8,'azmay') INSERT INTO tab0 VALUES(4,55,110.92,'wffzp',124,134.70,'qjqzu') INSERT INTO tab0 VALUES(5,117,112.62,'hkmcc',126,135.82,'rfnvr') INSERT INTO tab0 VALUES(6,119,113.87,'yofgi',127,136.86,'jgucx') INSERT INTO tab0 VALUES(7,64,114.12,'clvcm',128,137.57,'bywfe') INSERT INTO tab0 VALUES(8,67,5.69,'htdpm',129,138.11,'tqmqj') INSERT INTO tab0 VALUES(9,121,115.87,'czgiu',130,139.21,'vqktb') ## Comment 25216 Date: 2017-04-12 21:07:15 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [bd6083feb3f7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bd6083feb3f7) 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=bd6083feb3f7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bd6083feb3f7) Changeset description: After NORMALIZE, range can be empty. This fixes bug #6259.
crash on select query from sqlitelogictests
https://api.github.com/repos/MonetDB/MonetDB/issues/6259/comments
0
2020-11-30T15:45:13Z
2024-06-27T12:59:06Z
https://github.com/MonetDB/MonetDB/issues/6259
753,587,203
6,259
[ "MonetDB", "MonetDB" ]
Date: 2017-04-07 11:59:03 +0200 From: @kutsurak To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.15 (Dec2016-SP3) Last updated: 2017-05-01 13:32:08 +0200 ## Comment 25205 Date: 2017-04-07 11:59:03 +0200 From: @kutsurak User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Build Identifier: Specially crafted netcdf and fits files, could allow attackers to execute arbitrary SQL. Due to the way the function SQLstatementIntern is called in both these cases, an attacker cannot actually get any data out of the database, but could delete data, insert data or create/drop/alter tables. Examples are attached. Reproducible: Always ## Comment 25206 Date: 2017-04-07 12:00:54 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [9415609bc718](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9415609bc718) made by Panagiotis Koutsourakis <kutsurak@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9415609bc718](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9415609bc718) Changeset description: Fix security vulnerability in FITS and NETCDF datavaults This solves Bug #6258
Vulnerability in FITS and NETCDF data vaults
https://api.github.com/repos/MonetDB/MonetDB/issues/6258/comments
0
2020-11-30T15:45:10Z
2024-06-27T12:59:05Z
https://github.com/MonetDB/MonetDB/issues/6258
753,587,159
6,258
[ "MonetDB", "MonetDB" ]
Date: 2017-04-06 16:30:21 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.15 (Dec2016-SP3) CC: @njnes Last updated: 2017-05-01 13:33:02 +0200 ## Comment 25201 Date: 2017-04-06 16:30:21 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Build Identifier: Query: SELECT s.name, /* s.id AS schema_id, */ s.authorization, s.owner, s.system , (SELECT CAST(COUNT(*) as int) FROM sys.tables t WHERE t.schema_id = s.id) AS " tables/views" , (SELECT CAST(COUNT(*) as int) FROM sys.tables t WHERE t.schema_id = s.id AND t.system AND t.query is NULL) AS " system tables" , (SELECT CAST(COUNT(*) as int) FROM sys.tables t WHERE t.schema_id = s.id AND NOT t.system AND t.query is NULL) AS " user tables" , (SELECT CAST(COUNT(*) as int) FROM sys.tables t WHERE t.schema_id = s.id AND t.system AND t.query is NOT NULL) AS " system views" , (SELECT CAST(COUNT(*) as int) FROM sys.tables t WHERE t.schema_id = s.id AND NOT t.system AND t.query is NOT NULL) AS " user views" -- SELECT * FROM sys.schemas s WHERE s.name IN ('tmp','json','profiler'); Produces wrong number of tables/views (1) where it should be 0. Reproducible: Always ### Steps to Reproduce: CREATE VIEW sys.schema_stats AS SELECT s.name, /* s.id AS schema_id, */ s.authorization, s.owner, s.system , (SELECT CAST(COUNT(*) as int) FROM sys.tables t WHERE t.schema_id = s.id) AS " tables/views" , (SELECT CAST(COUNT(*) as int) FROM sys.tables t WHERE t.schema_id = s.id AND t.system AND t.query is NULL) AS " system tables" , (SELECT CAST(COUNT(*) as int) FROM sys.tables t WHERE t.schema_id = s.id AND NOT t.system AND t.query is NULL) AS " user tables" , (SELECT CAST(COUNT(*) as int) FROM sys.tables t WHERE t.schema_id = s.id AND t.system AND t.query is NOT NULL) AS " system views" , (SELECT CAST(COUNT(*) as int) FROM sys.tables t WHERE t.schema_id = s.id AND NOT t.system AND t.query is NOT NULL) AS " user views" -- SELECT * FROM sys.schemas s WHERE s.name IN ('tmp','json','profiler') ; --ORDER BY s.name; SELECT * FROM sys.schema_stats; --SELECT count(*) as " sys tables/views" FROM sys.tables WHERE schema_id IN (SELECT id FROM sys.schemas WHERE name = 'sys'); SELECT count(*) as " tmp tables/views" FROM sys.tables WHERE schema_id IN (SELECT id FROM sys.schemas WHERE name = 'tmp'); SELECT count(*) as " json tables/views" FROM sys.tables WHERE schema_id IN (SELECT id FROM sys.schemas WHERE name = 'json'); SELECT count(*) as " profiler tables/views" FROM sys.tables WHERE schema_id IN (SELECT id FROM sys.schemas WHERE name = 'profiler'); --SELECT count(*) as " sys system tables" FROM sys.tables WHERE schema_id IN (SELECT id FROM sys.schemas WHERE name = 'sys') AND system AND query is NULL; SELECT count(*) as " tmp system tables" FROM sys.tables WHERE schema_id IN (SELECT id FROM sys.schemas WHERE name = 'tmp') AND system AND query is NULL; SELECT count(*) as " json system tables" FROM sys.tables WHERE schema_id IN (SELECT id FROM sys.schemas WHERE name = 'json') AND system AND query is NULL; SELECT count(*) as " profiler system tables" FROM sys.tables WHERE schema_id IN (SELECT id FROM sys.schemas WHERE name = 'profiler') AND system AND query is NULL; --SELECT count(*) as " sys user tables" FROM sys.tables WHERE schema_id IN (SELECT id FROM sys.schemas WHERE name = 'sys') AND NOT system AND query is NULL; SELECT count(*) as " tmp user tables" FROM sys.tables WHERE schema_id IN (SELECT id FROM sys.schemas WHERE name = 'tmp') AND NOT system AND query is NULL; SELECT count(*) as " json user tables" FROM sys.tables WHERE schema_id IN (SELECT id FROM sys.schemas WHERE name = 'json') AND NOT system AND query is NULL; SELECT count(*) as " profiler user tables" FROM sys.tables WHERE schema_id IN (SELECT id FROM sys.schemas WHERE name = 'profiler') AND NOT system AND query is NULL; --SELECT count(*) as " sys system views" FROM sys.tables WHERE schema_id IN (SELECT id FROM sys.schemas WHERE name = 'sys') AND system AND query is NOT NULL; SELECT count(*) as " tmp system views" FROM sys.tables WHERE schema_id IN (SELECT id FROM sys.schemas WHERE name = 'tmp') AND system AND query is NOT NULL; SELECT count(*) as " json system views" FROM sys.tables WHERE schema_id IN (SELECT id FROM sys.schemas WHERE name = 'json') AND system AND query is NOT NULL; SELECT count(*) as " profiler system views" FROM sys.tables WHERE schema_id IN (SELECT id FROM sys.schemas WHERE name = 'profiler') AND system AND query is NOT NULL; --SELECT count(*) as " sys user views" FROM sys.tables WHERE schema_id IN (SELECT id FROM sys.schemas WHERE name = 'sys') AND NOT system AND query is NOT NULL; SELECT count(*) as " tmp user views" FROM sys.tables WHERE schema_id IN (SELECT id FROM sys.schemas WHERE name = 'tmp') AND NOT system AND query is NOT NULL; SELECT count(*) as " json user views" FROM sys.tables WHERE schema_id IN (SELECT id FROM sys.schemas WHERE name = 'json') AND NOT system AND query is NOT NULL; SELECT count(*) as " profiler user views" FROM sys.tables WHERE schema_id IN (SELECT id FROM sys.schemas WHERE name = 'profiler') AND NOT system AND query is NOT NULL; DROP VIEW sys.schema_stats; ### Actual Results: name authorization owner system tables/views system tables user tables system views user views tmp 2 3 true 6 6 1 1 1 json 3 3 true 1 1 1 1 1 profiler 3 3 true 1 1 1 1 1 ### Expected Results: name authorization owner system tables/views system tables user tables system views user views tmp 2 3 true 6 6 0 0 0 json 3 3 true 0 0 0 0 0 profiler 3 3 true 0 0 0 0 0 ## Comment 25202 Date: 2017-04-06 16:41:03 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [2082c0b4ada4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2082c0b4ada4) 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=2082c0b4ada4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2082c0b4ada4) Changeset description: Add test for Bug #6257 ## Comment 25211 Date: 2017-04-10 22:36:00 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [ed98f4df49d1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ed98f4df49d1) 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=ed98f4df49d1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ed98f4df49d1) Changeset description: fixed bug #6257, ie pas proper column when rewriting the LOJ apply down a groupby with a count(*). fixed crash caused by a wrong function lookup. ## Comment 25212 Date: 2017-04-10 22:37:23 +0200 From: @njnes fixed. Now we pass a unique column (identity) of the inner table to the count aggregator (count(*) rewrite).
wrong count values (1 instead of 0) for correlated aggregation queries
https://api.github.com/repos/MonetDB/MonetDB/issues/6257/comments
0
2020-11-30T15:45:07Z
2024-06-27T12:59:03Z
https://github.com/MonetDB/MonetDB/issues/6257
753,587,124
6,257
[ "MonetDB", "MonetDB" ]
Date: 2017-04-06 11:22:04 +0200 From: Mark &lt;<m.raasveldt>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.15 (Dec2016-SP3) CC: @njnes Last updated: 2017-05-01 13:44:59 +0200 ## Comment 25197 Date: 2017-04-06 11:22:04 +0200 From: Mark &lt;<m.raasveldt>&gt; When performing a FULL OUTER JOIN with three or more BETWEEN clauses OR'd together an assertion is triggered in the SQL layer: Assertion failed: (0), function exp_bin, file rel_bin.c, line 690. Code to reproduce: START TRANSACTION; CREATE TABLE t1(x INTEGER, y INTEGER); CREATE TABLE t2(a INTEGER, b INTEGER); -- this works fine SELECT * FROM t1 FULL OUTER JOIN t2 ON x BETWEEN a AND b OR y BETWEEN a AND b; -- this triggers an assertion SELECT * FROM t1 FULL OUTER JOIN t2 ON x BETWEEN a AND b OR y BETWEEN a AND b OR a BETWEEN x AND y; ROLLBACK; ## Comment 25198 Date: 2017-04-06 11:25:31 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [064c92514664](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=064c92514664) made by Mark Raasveldt <m.raasveldt@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=064c92514664](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=064c92514664) Changeset description: Add test for Bug #6256. ## Comment 25207 Date: 2017-04-08 14:02:30 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [b232610d9c87](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b232610d9c87) 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=b232610d9c87](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b232610d9c87) Changeset description: fixed crash in full outer joins with only range expressions (or-ed together). see bug #6256
Assertion Trigger on FULL OUTER JOIN with more than two BETWEEN clauses
https://api.github.com/repos/MonetDB/MonetDB/issues/6256/comments
0
2020-11-30T15:45:04Z
2024-06-27T12:59:02Z
https://github.com/MonetDB/MonetDB/issues/6256
753,587,070
6,256
[ "MonetDB", "MonetDB" ]
Date: 2017-04-04 15:08:48 +0200 From: @swingbit To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.15 (Dec2016-SP3) CC: @mlkersten Last updated: 2017-04-04 17:18:46 +0200 ## Comment 25195 Date: 2017-04-04 15:08:48 +0200 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36 Build Identifier: sql>trace select name from sys.tables; ... X_44=<tmp_654>[1]:bat[:str] := bat.append(X_37=<tmp_654>[1]:bat[:str],"name":str); ... Because the append is in-place, the same bat (tmp_654) is used for the operand and the result. But the trace output is printed after the instruction is executed, so using the same information for operand and result. The same happens with other in-place instructions, like mat.packIncrement() Reproducible: Always $ mserver5 --version MonetDB 5 server v11.25.12 (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 -O3 -fomit-frame-pointer -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 -D_FORTIFY_SOURCE=2 Linking : /usr/bin/ld -m elf_x86_64 ## Comment 25196 Date: 2017-04-04 17:18:46 +0200 From: @mlkersten The TRACE shows the end-of-instruction statistics and, indeed, this leads to a possible confusing on tuple count. The solution for performance analysis is to use the Stethoscope and Tomograph primitives.
TRACE info incorrect for in-place instructions
https://api.github.com/repos/MonetDB/MonetDB/issues/6255/comments
0
2020-11-30T15:45:00Z
2024-06-28T13:10:47Z
https://github.com/MonetDB/MonetDB/issues/6255
753,587,023
6,255
[ "MonetDB", "MonetDB" ]
Date: 2017-03-30 14:40:41 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.9 (Dec2016-SP2) CC: @njnes Last updated: 2020-02-12 09:20:13 +0100 ## Comment 25191 Date: 2017-03-30 14:40:41 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Build Identifier: mserver5: ../../../../dev/sql/backends/monet5/rel_bin.c:2419: rel2bin_project: Assertion `0' failed. Reproducible: Always ### Steps to Reproduce: CREATE VIEW sys.view_stats AS SELECT s.name AS schema_nm, s.id AS schema_id, t.name AS table_nm, t.id AS table_id, t.system AS is_system_view , (SELECT CAST(COUNT(*) as int) FROM sys.columns c WHERE c.table_id = t.id) AS " columns" FROM sys.tables t JOIN sys.schemas s ON t.schema_id = s.id WHERE query IS NOT NULL ; --ORDER BY s.name, t.name; SELECT * FROM sys.view_stats; -- prints worrying output in console, see below. SELECT * FROM sys.view_stats WHERE is_system_view; -- crash SELECT * FROM sys.view_stats WHERE NOT is_system_view; -- crash DROP VIEW sys.view_stats; ### Actual Results: builtin opt gdk_dbpath = /export/scratch2/dinther/INSTALL/var/monetdb5/dbfarm/demo builtin opt gdk_debug = 0 builtin opt gdk_vmtrim = no builtin opt monet_prompt = > builtin opt monet_daemon = no builtin opt mapi_port = 50000 builtin opt mapi_open = false builtin opt mapi_autosense = false builtin opt sql_optimizer = default_pipe builtin opt sql_debug = 0 cmdline opt embedded_r = true cmdline opt embedded_py = true cmdline opt mapi_port = 41000 cmdline opt gdk_debug = 10 MonetDB 5 server v11.25.14 This is an unreleased version Serving database 'demo', using 8 threads Compiled for x86_64-unknown-linux-gnu/64bit with 128bit integers Found 15.589 GiB available main-memory. 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 Listening for connection requests on mapi:monetdb://127.0.0.1:41000/ MonetDB/GIS module loaded MonetDB/SQL module loaded MonetDB/Python module loaded MonetDB/R module loaded > SQL catalog created, loading sql scripts once >could not find L121.id t.type_digits t.type_scale t.table_id t.default t.null t.number t.storage L120.%TID% mserver5: ../../../../dev/sql/backends/monet5/rel_bin.c:2419: rel2bin_project: Assertion `0' failed. ./start_INSTALL_mserver5.sh: line 7: 3171 Aborted (core dumped) /export/scratch2/dinther/INSTALL/bin/mserver5 -d10 --set embedded_r=true --set embedded_py=true --set mapi_port=41000 bash-4.3$ mclient -p 41000 Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.25.14 (unreleased), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>\d sql>CREATE VIEW sys.view_stats AS more>SELECT s.name AS schema_nm, s.id AS schema_id, t.name AS table_nm, t.id AS table_id, t.system AS is_system_view more>, (SELECT CAST(COUNT(*) as int) FROM sys.columns c WHERE c.table_id = t.id) AS " columns" more> FROM sys.tables t JOIN sys.schemas s ON t.schema_id = s.id more>WHERE query IS NOT NULL more>; --ORDER BY s.name, t.name; operation successful (24.245ms) sql>\d VIEW sys.view_stats sql>SELECT * FROM sys.view_stats; sql> bash-4.3$ ### Expected Results: No assertion failure. No crash of mserver5 process. ## Comment 25192 Date: 2017-03-30 14:47:31 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [08b7ae073169](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=08b7ae073169) 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=08b7ae073169](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=08b7ae073169) Changeset description: Add test for Bug #6254 ## Comment 25193 Date: 2017-04-03 10:25:23 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [b6bb4fb088f2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b6bb4fb088f2) 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=b6bb4fb088f2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b6bb4fb088f2) Changeset description: fixed bug #6254, ie make sure we push left outer down if allowed. fixed problem in apply renames, only rename on the side which may have a conflict (ie uses the apply relation/expressions). ## Comment 25194 Date: 2017-04-03 19:13:11 +0200 From: @njnes fixed in dec2016, ie make sure we push left outer apply relational operations down selects when possible ## Comment 26068 Date: 2018-01-11 16:22:57 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [70fff99d6931](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=70fff99d6931) made by Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=70fff99d6931](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=70fff99d6931) Changeset description: Approve of changed crash_correlated_subqueries_in_select.Bug-6254 output ## Comment 27538 Date: 2020-02-12 09:20:13 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [6bfc51fb1fb9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6bfc51fb1fb9) 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=6bfc51fb1fb9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=6bfc51fb1fb9) Changeset description: Reworked crash_correlated_subqueries_in_select.Bug-6254 test. Don't use system tables on regular tests, because their contents change between release, thus requiring a reapproval
Crash (and assertion failure) after querying a view which uses a correlated subquery in the select-list
https://api.github.com/repos/MonetDB/MonetDB/issues/6254/comments
0
2020-11-30T15:44:56Z
2024-06-27T12:59:00Z
https://github.com/MonetDB/MonetDB/issues/6254
753,586,975
6,254
[ "MonetDB", "MonetDB" ]
Date: 2017-03-29 13:55:52 +0200 From: @bartscheers To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.9 (Dec2016-SP2) CC: @kutsurak Last updated: 2017-03-31 13:28:47 +0200 ## Comment 25185 Date: 2017-03-29 13:55:52 +0200 From: @bartscheers User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Build Identifier: CALL fitsattach('/to/fits/file') or CALL sys.fitsattach('/to/fits/file') results in errors. Reproducible: Always ### Steps to Reproduce: 1. get the fits file 2. run the script (3 cases: a) default: works; b) user/pw: works; c) user/pw/schema: not working 3. ### Actual Results: call without sys prefix SELECT: no such unary operator 'fitsattach(char)' SELECT: no such table 'fits_tables' call with sys prefix INSERT INTO: no such table 'fits_columns' INSERT INTO: no such table 'fits_columns' SELECT: no such table 'fits_tables' ### Expected Results: Same results as for the other two cases ## Comment 25186 Date: 2017-03-29 14:00:59 +0200 From: @bartscheers Created attachment 547 script Cannot attach the 2MB fits file. Hopefully you have one yourself. > Attached file: [fitsattach.sh](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6253_fitsattach.sh_547) (application/x-shellscript, 1214 bytes) > Description: script ## Comment 25187 Date: 2017-03-29 14:01:31 +0200 From: @bartscheers Created attachment 548 sql to set user/pw > Attached file: [prep_user.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6253_prep_user.sql_548) (application/sql, 103 bytes) > Description: sql to set user/pw ## Comment 25188 Date: 2017-03-29 14:01:56 +0200 From: @bartscheers Created attachment 549 script to set user/pw/schema > Attached file: [prep_schema.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6253_prep_schema.sql_549) (application/sql, 195 bytes) > Description: script to set user/pw/schema ## Comment 25190 Date: 2017-03-30 13:59:49 +0200 From: @kutsurak Fixed in changeset [bb76f5c6a6fc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bb76f5c6a6fc)
FITS Data Vaults does not work when using user/pw and other than sys schema name
https://api.github.com/repos/MonetDB/MonetDB/issues/6253/comments
0
2020-11-30T15:44:53Z
2024-06-27T12:58:59Z
https://github.com/MonetDB/MonetDB/issues/6253
753,586,929
6,253
[ "MonetDB", "MonetDB" ]
Date: 2017-03-24 13:51:12 +0100 From: Frank Krüger &lt;<frank.krueger2>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.5 (Dec2016-SP1) CC: frank.krueger2, @njnes Last updated: 2017-03-29 11:11:56 +0200 ## Comment 25177 Date: 2017-03-24 13:51:12 +0100 From: Frank Krüger &lt;<frank.krueger2>&gt; User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Firefox/52.0 Build Identifier: I'm working on a database with a very large table containing accelerometer sensor data. The table has the following format: CREATE TABLE "raw"."accelerometer" ( "ID" BIGINT NOT NULL DEFAULT next value for "raw"."seq_6631", "RECORDING$ID" INTEGER, "DateTime" TIMESTAMP, "TICK" INTEGER, "X" REAL, "Y" REAL, "Z" REAL, CONSTRAINT "accelerometer_ID_pkey" PRIMARY KEY ("ID"), CONSTRAINT "accelerometer_RECORDING$ID_fkey" FOREIGN KEY ("RECORDING$ID") REFERENCES "raw"."recording" ("ID") ); CREATE INDEX "acc_rec" ON "raw"."accelerometer" ("RECORDING$ID"); Currently it contains 5.6*10^9 rows with 1011 different "RECORDING$ID"'s. The database uses about 400GB space on a 700GB SSD. The machine has 48 cores and about 420GB RAM. So on the hardware side, there should be no bottleneck. I'm using the current version (Dec2016-SP2) of the database with R-integration enabled. Now the Problem: Running the query `select count("ID") from raw.accelerometer where "RECORDING$ID"=513;` lasts about 2-4 minutes: sql>select count("ID") from raw.accelerometer where "RECORDING$ID"=513; +---------+ | L3 | +=========+ | 4264008 | +---------+ 1 tuple (4m 24s) This time reduces to about 2m 30s for the second and next repetitions of the query. I would assume that the query should be much faster. During the 'waiting' time, `iotop` shows that the mserver5 process writes with more than 200M/s to the ssd, while `free -m` shows at least 200GB of free memory. explain tells me the following: sql>explain select count("ID") from raw.accelerometer where "RECORDING$ID"=513; +-----------------------------------------------------------------------------------------------------------------------------------+ | mal | +===================================================================================================================================+ | function user.s34_1():void; | | X_0:void := querylog.define("select count(\"ID\") from raw.accelerometer where \"RECORDING$ID\"=230;","default_pipe",11:int); | | barrier X_63 := language.dataflow(); | | X_3 := sql.mvc(); | | X_7:bat[:int] := sql.bind(X_3,"raw","accelerometer","RECORDING$ID",0:int); | | C_4:bat[:oid] := sql.tid(X_3,"raw","accelerometer"); | | C_18 := algebra.thetasubselect(X_7,C_4,513:int,"=="); | | X_20:bat[:lng] := sql.bind(X_3,"raw","accelerometer","ID",0:int); | | X_27 := algebra.projection(C_18,X_20); | | X_28 := aggr.count(X_27,true); | | exit X_63; | | sql.resultSet("raw.L4","L3","bigint",64:int,0:int,7:int,X_28); | | end user.s34_1; | | inline actions= 0 time=2 usec | | remap actions= 0 time=10 usec | | costmodel actions= 1 time=2 usec | | coercion actions= 0 time=2 usec | | evaluate actions= 1 time=11427 usec | | emptybind actions= 6 time=55174 usec | | pushselect actions= 3 time=46 usec | | aliases actions= 5 time=13 usec | | mergetable actions= 0 time=11523 usec | | deadcode actions= 6 time=10 usec | | aliases actions= 0 time=5 usec | | constants actions= 2 time=11 usec | | commonTerms actions= 0 time=20 usec | | projectionpath actions= 0 time=17 usec | | deadcode actions= 0 time=9446 usec | | reorder actions= 1 time=26589 usec | | reduce actions=40 time=29 usec | | matpack actions= 0 time=4 usec | | dataflow actions=28 time=58 usec | | multiplex actions= 0 time=7 usec | | profiler actions= 1 time=9 usec | | candidates actions= 1 time=1 usec | | garbagecollector actions= 1 time=22 usec | | total actions= 1 time=115083 usec | +-----------------------------------------------------------------------------------------------------------------------------------+ 37 tuples (3.0s) plan tells me the following: sql>plan select count("ID") from raw.accelerometer where "RECORDING$ID"=513; +----------------------------------------------------------------------------------------------------------+ | rel | +==========================================================================================================+ | project ( | | | group by ( | | | | select ( | | | | | table(raw.accelerometer) [ accelerometer.ID NOT NULL HASHCOL , accelerometer.RECORDING$ID ] COUNT | | | | ) [ accelerometer.RECORDING$ID = int "513" ] | | | ) [ ] [ sys.count no nil (accelerometer.ID NOT NULL HASHCOL ) NOT NULL as L3.L3 ] | | ) [ L3 NOT NULL as L4.L3 ] | +----------------------------------------------------------------------------------------------------------+ 7 tuples (70.542ms) sql> Reproducible: Always Since the query and the table is very simple, I'm assuming that this is a Bug. ## Comment 25178 Date: 2017-03-26 20:05:11 +0200 From: @njnes Frank the query is indeed very simpel (ie a point select). Monetdb will create a hash table on the fly, during the first query you run. That will give the write io you see. In your case the hash table will be about 40GB in size. For your query and data distribution this hash isn't very usefull (a full scan or alternative index/order) is faster. The current optimizer cannot detect this (yet). So monetdb will do the in efficient hash building single threaded and the hash will have long chain lists. ## Comment 25179 Date: 2017-03-27 12:22:04 +0200 From: Frank Krüger &lt;<frank.krueger2>&gt; Niels, i would assume that the second and further runs of the same query are significant faster. The problem is that this is not the case. Is there anything I can do to improve the performance? (not only for such simple queries) ## Comment 25181 Date: 2017-03-29 11:11:56 +0200 From: @njnes the second time the query is run the hash is indeed used, but for these distributions (ie small number of different values, but lots of rows) hash isn't efficient. Sorting, parititioning etc should be used. You could try to use the (relatively new) ordered index, ie create ordered index OrderedIdxName on tableT(colC);
Bad Performance on getting number of rows in very large table
https://api.github.com/repos/MonetDB/MonetDB/issues/6252/comments
0
2020-11-30T15:44:49Z
2024-06-27T12:58:58Z
https://github.com/MonetDB/MonetDB/issues/6252
753,586,882
6,252
[ "MonetDB", "MonetDB" ]
Date: 2017-03-23 17:33:25 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.9 (Dec2016-SP2) CC: @njnes Last updated: 2019-09-27 15:08:41 +0200 ## Comment 25174 Date: 2017-03-23 17:33:25 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Build Identifier: Segmentation fault in mserver5 process after creating an ordered index on system table statistics and querying the sys.statistics table. Also should we allow users to add an ordered indexes on any system table? Probably not. If not allowed, we should check and return an error in the create ordered index code. Reproducible: Always ### Steps to Reproduce: ANALYZE sys.statistics; SELECT * FROM sys.statistics; -- update the values for sample, count, unique, nils, minval, maxval, sorted, revsorted of sys.statistics ANALYZE sys.statistics; SELECT * FROM sys.statistics; CREATE ORDERED INDEX stat_oidx ON sys.statistics (width); SELECT * FROM sys.statistics; -- now mserver5 is crashed !! ### Expected Results: No segmentation fault & crash of mserver5 process. ## Comment 25175 Date: 2017-03-23 17:57:04 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [c320f5e97d1d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c320f5e97d1d) 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=c320f5e97d1d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c320f5e97d1d) Changeset description: Add test for Bug #6251 (Crash after adding an ordered index on sys.statistics column and querying sys.statistics) ## Comment 25176 Date: 2017-03-23 18:10:02 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; Restarting the mserver5 again after the crash causes the server to crash automatically again after some 5 seconds (without making any connections)! The only way to resolve that problem is to make a connection with mclient and issue a command to remove the ordered index (DROP INDEX stat_oidx;) within that 5 seconds time-window the server is up. ## Comment 25182 Date: 2017-03-29 11:17:19 +0200 From: @njnes was fixed (made sure we do not run storage functions on indices without storaged data) ## Comment 27331 Date: 2019-09-27 15:08:41 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [ce174124a3f7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ce174124a3f7) 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=ce174124a3f7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=ce174124a3f7) Changeset description: Don't output the row with type value timestamp from bug #6251 test. On Windows the timestamp precision is less tan on UNIX, so the output values of stamp column are the same, causing wrong output. At the same time, there is a probability for all values of stamp column to generated with the same timestamp, making the test non-deterministic. Also backported recent bugfixes from Nov2019 branch.
Crash after adding an ordered index on sys.statistics column and querying sys.statistics
https://api.github.com/repos/MonetDB/MonetDB/issues/6251/comments
0
2020-11-30T15:44:45Z
2024-06-27T12:58:57Z
https://github.com/MonetDB/MonetDB/issues/6251
753,586,836
6,251
[ "MonetDB", "MonetDB" ]
Date: 2017-03-23 15:59:15 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.9 (Dec2016-SP2) CC: @njnes Last updated: 2017-03-31 13:28:41 +0200 ## Comment 25173 Date: 2017-03-23 15:59:15 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Build Identifier: mserver5: ../../dev/gdk/gdk_bat.c:2246: BATassertProps: Assertion `!b->tkey' failed. Reproducible: Always ### Steps to Reproduce: See test: sql/test/orderidx/Tests/oidx_all_types.sql QUERY = select "blob100" from all_types order by "blob100" DESC; ERROR = !write error on stream ## Comment 25183 Date: 2017-03-29 11:32:16 +0200 From: @njnes ordered indices do not have a sql side bat, ie don't access these structures. ## Comment 25184 Date: 2017-03-29 12:50:13 +0200 From: @njnes the sorting of blob's isn't supported by the mal atom functions, currently only a not equal function is precent. We should deside if we want order for blobs, or (if not) we should not allow order by statements on the sql layer. ## Comment 25189 Date: 2017-03-30 10:51:50 +0200 From: @sjoerdmullender Changesets [4b93dae5fb21](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4b93dae5fb21) and [675095ddbd82](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=675095ddbd82) implemented a sort on BLOBs.
Assertion failure when querying a Blob column with order by DESC
https://api.github.com/repos/MonetDB/MonetDB/issues/6250/comments
0
2020-11-30T15:34:09Z
2024-06-27T12:58:56Z
https://github.com/MonetDB/MonetDB/issues/6250
753,578,419
6,250
[ "MonetDB", "MonetDB" ]
Date: 2017-03-22 15:32:26 +0100 From: @mlkersten To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: @njnes Last updated: 2018-03-29 15:39:24 +0200 ## Comment 25170 Date: 2017-03-22 15:32:26 +0100 From: @mlkersten User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:51.0) Gecko/20100101 Firefox/51.0 Build Identifier: According to the SQL standard DEFAULT is a valid expression in the context of inserts and updates. It is currently not supported. Reproducible: Always ## Comment 25398 Date: 2017-06-28 11:20:55 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [24d1f738cf7c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=24d1f738cf7c) made by Pedro Ferreira <pedro.ferreira@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=24d1f738cf7c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=24d1f738cf7c) Changeset description: INSERT INTO and UPDATE statements with default values of columns. Fixes bug #6249 ## Comment 25417 Date: 2017-07-05 22:25:29 +0200 From: @njnes thanks pedro for fixing this issue. ## Comment 25418 Date: 2017-07-05 23:51:56 +0200 From: @sjoerdmullender (In reply to Niels Nes from comment 2) > thanks pedro for fixing this issue. Indeed. But can somebody please add a blurb in the sql/ChangeLog file (using the appropriate tools). ## Comment 26324 Date: 2018-03-29 15:39:24 +0200 From: @sjoerdmullender The Mar2018 version has been released.
DEFAULT in row-values missing (sqlsmith)
https://api.github.com/repos/MonetDB/MonetDB/issues/6249/comments
0
2020-11-30T15:34:06Z
2024-06-27T12:58:55Z
https://github.com/MonetDB/MonetDB/issues/6249
753,578,378
6,249
[ "MonetDB", "MonetDB" ]
Date: 2017-03-21 09:41:14 +0100 From: Dean De Leo &lt;<dleo>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: @njnes Last updated: 2017-03-31 13:28:29 +0200 ## Comment 25166 Date: 2017-03-21 09:41:14 +0100 From: Dean De Leo &lt;<dleo>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36 Build Identifier: Related to bug #6246, my query still cannot bind to the table expression in the from clause in an update statement. The bug is still present after https://www.monetdb.org/hg/MonetDB/rev/235ab012ead8 Reproducible: Always ### Steps to Reproduce: 1. See repro ### Actual Results: An error "no such column 'xxx'" is raised ### Expected Results: Referred fields should be bound to the table expr~ in the FROM clause. ## Comment 25167 Date: 2017-03-21 09:41:34 +0100 From: Dean De Leo &lt;<dleo>&gt; Created attachment 546 repro.sql > Attached file: [update_repro.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6248_update_repro.sql_546) (application/sql, 1289 bytes) > Description: repro.sql ## Comment 25168 Date: 2017-03-21 10:00:16 +0100 From: Dean De Leo &lt;<dleo>&gt; okay, there is a small mistake in the query :D undirectedEdges AS ( SELECT person1, person2, CAST(SUM(cost) AS bigint) AS weight FROM commentsByFriends GROUP BY person1, person2 ) but the error raised is still unhelpful.. it should be `SELECT: cannot use non GROUP BY column 'cost' in query results without an aggregate function' ## Comment 25172 Date: 2017-03-22 20:42:01 +0100 From: @njnes fixed the error message
update statements: the semantic stage does not resolve the relation in the from clause
https://api.github.com/repos/MonetDB/MonetDB/issues/6248/comments
0
2020-11-30T15:34:03Z
2024-06-27T12:58:54Z
https://github.com/MonetDB/MonetDB/issues/6248
753,578,327
6,248
[ "MonetDB", "MonetDB" ]
Date: 2017-03-21 00:31:28 +0100 From: @mlkersten To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: @njnes Last updated: 2017-03-31 13:28:52 +0200 ## Comment 25164 Date: 2017-03-21 00:31:28 +0100 From: @mlkersten ## Comment 25165 Date: 2017-03-21 00:33:04 +0100 From: @mlkersten Type error in code generation? !TypeException:user.s4_0[130]:'bat.append' undefined in: bat.append(X_185:bat[:str], X_159:bat[:int], true:bit); select sample_2.storage as c0, sample_25.name as c1 from sys.netcdf_vars as sample_1 inner join tmp._columns as sample_2 on (sample_1.name = sample_2.name ) right join (select sample_21.name as c0, sample_21.id as c1, (select table_id from tmp.idxs) as c2 from sys.keys as sample_21 where ((select pu from bam.rg) is not NULL) or ((select depend_id from sys.dependencies) is not NULL)) as subq_0 right join sys.netcdf_files as sample_24 right join sys.nation as ref_25 on (sample_24.location = ref_25.n_name ) on (subq_0.c1 = sample_24.file_id ) on (sample_2.type_scale = subq_0.c1 ) left join tmp.objects as sample_25 on (ref_25.n_nationkey = sample_25.id ) where (sample_1.vartype is NULL) or (sample_1.ndim is not NULL) ## Comment 25169 Date: 2017-03-22 14:40:55 +0100 From: @njnes Added missing type check ## Comment 25171 Date: 2017-03-22 19:37:05 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [0040aa1b780b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0040aa1b780b) 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=0040aa1b780b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0040aa1b780b) Changeset description: fixed bug #6247 fixed problems with rewrite like
Type analysis issue (sqlsmith)
https://api.github.com/repos/MonetDB/MonetDB/issues/6247/comments
0
2020-11-30T15:33:59Z
2024-06-27T12:58:53Z
https://github.com/MonetDB/MonetDB/issues/6247
753,578,276
6,247
[ "MonetDB", "MonetDB" ]
Date: 2017-03-19 22:06:05 +0100 From: Dean De Leo &lt;<dleo>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: @njnes Last updated: 2017-04-25 18:56:16 +0200 ## Comment 25158 Date: 2017-03-19 22:06:05 +0100 From: Dean De Leo &lt;<dleo>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36 Build Identifier: Given an update statement such as: UPDATE ... SET ... FROM ( subquery_with_clause ) AS ident WHERE ...; The identifier `ident' should act as a valid table reference for both the SET and WHERE clauses. Current development version of MonetDB seems to ignore it, instead raising an error such as: SELECT: no such column 'alias.xxx' Reproducible: Always ### Steps to Reproduce: 1. See the attached repro ### Actual Results: An error is raised in the semantic stage ### Expected Results: The given alias should be bound to the referred table ## Comment 25159 Date: 2017-03-19 22:06:59 +0100 From: Dean De Leo &lt;<dleo>&gt; Created attachment 545 repro.sql > Attached file: [repro.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6246_repro.sql_545) (application/sql, 659 bytes) > Description: repro.sql ## Comment 25162 Date: 2017-03-20 21:27:23 +0100 From: @njnes fixed in dec2016, ie added missing alias handling. ## Comment 25163 Date: 2017-03-20 22:38:15 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [235ab012ead8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=235ab012ead8) 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=235ab012ead8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=235ab012ead8) Changeset description: fixed bug #6246, ie handle alias in with subquery ## Comment 25269 Date: 2017-04-25 18:56:16 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [4ac696b61828](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4ac696b61828) made by Dean De Leo <deandeleo@hotmail.co.uk> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4ac696b61828](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4ac696b61828) Changeset description: Backport hg://63221:235ab012ead8 fixed bug #6246, ie handle alias in with subquery
update statements: references to a table do not bind to its alias
https://api.github.com/repos/MonetDB/MonetDB/issues/6246/comments
0
2020-11-30T15:33:56Z
2024-06-27T12:58:52Z
https://github.com/MonetDB/MonetDB/issues/6246
753,578,226
6,246
[ "MonetDB", "MonetDB" ]
Date: 2017-03-17 10:37:29 +0100 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.5 (Dec2016-SP1) CC: @njnes Last updated: 2017-03-31 13:28:26 +0200 ## Comment 25155 Date: 2017-03-17 10:37:29 +0100 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.76 Safari/537.36 Build Identifier: All versions since at least Jul2015-SP4 are affected. Reproducible: Always ### Steps to Reproduce: 1. SELECT name, (SELECT COUNT(*) FROM sys.tables WHERE schema_id = s.id AND 1+1=3) AS table_count FROM sys.schemas AS s; Notice the 1+1=3 condition. ### Actual Results: From Jul2015-SP4 up to Dec2016-SP1, the database crashes. With Dec2016-SP2 and Dec2016-SP3, the results are wrongs: +------+-------------+ | name | table_count | +======+=============+ | sys | 38 | | tmp | 6 | +------+-------------+ 2 tuples (11.789ms) ### Expected Results: 0 for table_count. Another example. This query gives NULL up to Jun2016-SP2 (which is not normal and should be 0), then crash on Dec2016-SP1, and gives wrong results on Dec2016-SP2 and Dec2016-SP3 (1 instead of 0). sql>SELECT name, (SELECT COUNT(*) FROM sys.tables WHERE schema_id = s.id AND NOT system) AS table_count FROM sys.schemas AS s; +----------+-------------+ | name | table_count | +==========+=============+ | sys | 1 | | tmp | 1 | | json | 1 | | profiler | 1 | +----------+-------------+ while none of the schema have no system tables, thus we should have only 0 here too. ... ## Comment 25160 Date: 2017-03-20 14:02:04 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [ad28781a31b5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ad28781a31b5) 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=ad28781a31b5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ad28781a31b5) Changeset description: fix bug #6245, ie properly handle outer-join in apply rewriter ## Comment 25161 Date: 2017-03-20 14:02:25 +0100 From: @njnes fixed in Dec2016 branch
Nested query crashes all versions of MonetDB or gives wrong result starting from Dec2016-SP2
https://api.github.com/repos/MonetDB/MonetDB/issues/6245/comments
0
2020-11-30T15:33:53Z
2024-06-27T12:58:51Z
https://github.com/MonetDB/MonetDB/issues/6245
753,578,191
6,245
[ "MonetDB", "MonetDB" ]
Date: 2017-03-16 18:00:23 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: -- development Last updated: 2018-03-29 15:39:12 +0200 ## Comment 25154 Date: 2017-03-16 18:00:23 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Build Identifier: MonetDB does not yet support the SQL command: TRUNCATE TABLE <tablename> See: https://en.wikipedia.org/wiki/Truncate_(SQL) The command is part of the SQL:2008 standard See: https://en.wikipedia.org/wiki/SQL:2008 In DWH situations were data needs to be refreshed often (via ETL or import of external csv data) it would be nice to be able to quickly remove all data from an existing table, before loading the new data. Support for TRUNCATE TABLE would be good for performance, compatibility and ease of migration reasons. The implementation should (of course) be faster than the alternative: DELETE FROM <tablename>; This could for instance be done by excluding the deleted rows from the transaction log (and thus a rollback of this command is no longer possible). Also we could move the existing BATs (of the columns of the table) and create new empty ones. On commit remove the moved BATs, on rollback undo the move. Reproducible: Always ### Steps to Reproduce: 1. CREATE TABLE import_mydata (ID int NOT NULL PRIMARY KEY, name varchar(30) NOT NULL, x double, y double, z double); 2. COPY INTO import_mydata FROM 'mydata_2017_03_16.tsv'; 3. SELECT COUNT(*) AS count FROM import_mydata; 4. TRUNCATE TABLE import_mydata; 5. SELECT COUNT(*) AS count FROM import_mydata; https://www.monetdb.org/Documentation/Manuals/SQLreference/Features/unsupported F202 TRUNCATE TABLE https://en.wikipedia.org/wiki/Truncate_(SQL) https://en.wikipedia.org/wiki/SQL:2008 ## Comment 26181 Date: 2018-02-08 18:45:57 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; TRUNCATE [ TABLE ] qname [ CONTINUE IDENTITY | RESTART IDENTITY ] [ RESTRICT | CASCADE ] functionality (and more) added in changeset [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=2838cc1c63b5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=2838cc1c63b5) ## Comment 26308 Date: 2018-03-29 15:39:12 +0200 From: @sjoerdmullender The Mar2018 version has been released.
Add support for: TRUNCATE TABLE
https://api.github.com/repos/MonetDB/MonetDB/issues/6244/comments
0
2020-11-30T15:33:49Z
2024-06-27T12:58:50Z
https://github.com/MonetDB/MonetDB/issues/6244
753,578,137
6,244
[ "MonetDB", "MonetDB" ]
Date: 2017-03-15 16:04:41 +0100 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.5 (Dec2016-SP1) CC: @njnes Last updated: 2017-03-31 13:28:31 +0200 ## Comment 25151 Date: 2017-03-15 16:04:41 +0100 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.76 Safari/537.36 Build Identifier: It's probably close to the issue 6205, where a static optimization doesn't produce the correct value. Reproducible: Always ### Steps to Reproduce: 1. SELECT 1 + NULL ### Actual Results: sql>select 1 + null; +------+ | L2 | +======+ | -127 | +------+ 1 tuple (1.179ms) ### Expected Results: A NULL value instead. No problem (fortunately) when done through a table: sql>select a + b from (select 1, null) q(a, b); +------+ | L6 | +======+ | null | +------+ 1 tuple (1.301ms) (Tested with Dec2016-SP3, not currently listed.) ## Comment 25152 Date: 2017-03-15 23:04:34 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [25a00e2e9008](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=25a00e2e9008) 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=25a00e2e9008](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=25a00e2e9008) Changeset description: Use VARcalc* functions to do calculations. This way you get nil handling and overflow checking. This fixes bug #6243.
Static optimization gives wrong result (1 + NULL = -127)
https://api.github.com/repos/MonetDB/MonetDB/issues/6243/comments
0
2020-11-30T15:33:47Z
2024-06-27T12:58:49Z
https://github.com/MonetDB/MonetDB/issues/6243
753,578,109
6,243
[ "MonetDB", "MonetDB" ]
Date: 2017-03-07 11:55:07 +0100 From: @mlkersten To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.5 (Dec2016-SP1) CC: @njnes Last updated: 2017-03-31 13:28:21 +0200 ## Comment 25140 Date: 2017-03-07 11:55:07 +0100 From: @mlkersten User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0 Build Identifier: UsingTPCH SF1 uncovered a segvault on Dec It looks like an error caused by using deadbeef; (gdb) print tbls[j] $3 = (sql_table *) 0xbdbdbdbd0079656b Thread 3212 "mserver5" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffd45d4700 (LWP 7438)] 0x00007fffeecc3b18 in rel_reduce_groupby_exps (changes=0x7fffd45d3774, sql=0x7fffac130610, rel=0x7fffac8b7510) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:4787 4787 if (tbls[j]->pkey) { 0 0x00007fffeecc3b18 in rel_reduce_groupby_exps (changes=0x7fffd45d3774, sql=0x7fffac130610, rel=0x7fffac8b7510) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:4787 1 0x00007fffeecd35fa in rewrite (sql=0x7fffac130610, rel=0x7fffac8b7510, rewriter=0x7fffeecc36ad <rel_reduce_groupby_exps>, has_changes=0x7fffd45d38f8) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:8600 2 0x00007fffeecd362c in rewrite (sql=0x7fffac130610, rel=0x7fffac8b7510, rewriter=0x7fffeecc36ad <rel_reduce_groupby_exps>, has_changes=0x7fffd45d38f8) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:8603 3 0x00007fffeecd362c in rewrite (sql=0x7fffac130610, rel=0x7fffac8b7510, rewriter=0x7fffeecc36ad <rel_reduce_groupby_exps>, has_changes=0x7fffd45d38f8) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:8603 4 0x00007fffeecd34d1 in rewrite (sql=0x7fffac130610, rel=0x7fffac8c0650, rewriter=0x7fffeecc36ad <rel_reduce_groupby_exps>, has_changes=0x7fffd45d38f8) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:8578 5 0x00007fffeecd3524 in rewrite (sql=0x7fffac130610, rel=0x7fffac8c0b50, rewriter=0x7fffeecc36ad <rel_reduce_groupby_exps>, has_changes=0x7fffd45d38f8) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:8586 6 0x00007fffeecd3524 in rewrite (sql=0x7fffac130610, rel=0x7fffac8c0fa0, rewriter=0x7fffeecc36ad <rel_reduce_groupby_exps>, has_changes=0x7fffd45d38f8) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:8586 7 0x00007fffeecd3ebb in _rel_optimizer (sql=0x7fffac130610, rel=0x7fffac8c0fa0, level=0) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:8777 8 0x00007fffeecd4236 in rel_optimizer (sql=0x7fffac130610, rel=0x7fffac8c0fa0) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:8836 9 0x00007fffeebbba74 in sql_symbol2relation (c=0x7fffac130610, sym=0x7fffac5f20a0) at /export/scratch1/home/mk/default//package/sql/backends/monet5/sql.c:121 10 0x00007fffeebe107b in SQLparser (c=0x7ffff098a328) Reproducible: Always ### Steps to Reproduce: select subq_0.c7 as c0, ref_5.role_id as c1 from sys.partsupp as ref_1 right join sys.user_role as ref_5 right join sys.netcdf_attrs as ref_6 on (ref_5.login_id = ref_6.file_id ) on (ref_1.ps_availqty = ref_6.file_id ), lateral (select distinct (select clk from sys.tracelog) as c0, ref_1.ps_availqty as c1, ref_17.n_name as c2, ref_17.n_comment as c3, ref_17.n_nationkey as c4, ref_5.role_id as c5, ref_6.att_name as c6, (select pg from bam.rg) as c7, ref_16.type as c8, (select db_alias from sys.connections) as c9 from tmp.idxs as ref_15 left join sys.geometry_columns as ref_16 on (ref_15.name = ref_16.f_table_schema ) inner join sys.nation as ref_17 on (ref_16.srid = ref_17.n_nationkey ) right join sys.idxs as ref_18 on (ref_15.table_id = ref_18.id ) where 98 is NULL) as subq_0 where (select id from tmp.keys) is not NULL limit 104; ## Comment 25150 Date: 2017-03-15 14:53:14 +0100 From: @njnes fixed a problem in the optimizer
Crash on rel_reduce_groupby_exps (sqlsmith)
https://api.github.com/repos/MonetDB/MonetDB/issues/6242/comments
0
2020-11-30T15:33:43Z
2024-06-27T12:58:48Z
https://github.com/MonetDB/MonetDB/issues/6242
753,578,070
6,242
[ "MonetDB", "MonetDB" ]
Date: 2017-03-07 11:05:39 +0100 From: Preetham Nayak &lt;<preethammnayak>&gt; To: clients devs &lt;<bugs-clients>&gt; Version: 11.25.9 (Dec2016-SP2) Last updated: 2017-04-19 15:13:23 +0200 ## Comment 25139 Date: 2017-03-07 11:05:39 +0100 From: Preetham Nayak &lt;<preethammnayak>&gt; I am getting "unable to retrieve startup status" error while executing monetdb start /path/to/mydbfarm Please any suggestion ## Comment 25252 Date: 2017-04-19 15:13:23 +0200 From: @sjoerdmullender I haven't been able to repoduce this, but some hopefully helpful comments. This is not the right way to use monetdb start. It expects the name of a database which is a directory inside the database farm (dbfarm). The latter is the directory that was the argument to the monetdbd start command (note the extra 'd'). You could look in the log file (called merovingian.log by default) to see whether you can find more information. This log file is usually located in the dbfarm directory. In any case, there should be a file .merovingian_properties in the dbfarm directory which contains the location of the log file.
Error while using start command
https://api.github.com/repos/MonetDB/MonetDB/issues/6241/comments
0
2020-11-30T15:33:40Z
2024-06-28T13:10:47Z
https://github.com/MonetDB/MonetDB/issues/6241
753,578,013
6,241
[ "MonetDB", "MonetDB" ]
Date: 2017-03-03 18:00:44 +0100 From: Manuel &lt;<manuel>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.13 (Jun2016-SP2) CC: @PedroTadim Last updated: 2019-11-29 17:55:30 +0100 ## Comment 25138 Date: 2017-03-03 18:00:44 +0100 From: Manuel &lt;<manuel>&gt; User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 Build Identifier: It would be useful to be able to evaluate the average value over a column with type timestamp. Is there a workaround for this ? Reproducible: Always ### Steps to Reproduce: create a table with a column with type timestamp insert some records in the table try do a simple query like select avg("D") from <tableName>; ### Actual Results: the query fails with an error like: Error: types timestamp(7,0) and double(53,0) are not equal for column 'D' SQLState: 22000 ErrorCode: 0 ### Expected Results: The average value of a timestamp column ## Comment 27433 Date: 2019-11-29 17:55:30 +0100 From: @PedroTadim We can't calculate the average of a timestamp column. Extract the number of seconds then use the avg aggregate on it.
Average over timestamp columns
https://api.github.com/repos/MonetDB/MonetDB/issues/6240/comments
0
2020-11-30T15:33:37Z
2024-06-28T13:39:37Z
https://github.com/MonetDB/MonetDB/issues/6240
753,577,975
6,240
[ "MonetDB", "MonetDB" ]
Date: 2017-03-02 18:45:03 +0100 From: @swingbit To: MonetDB5 devs &lt;<bugs-monetdb5>&gt; Version: 11.25.5 (Dec2016-SP1) Last updated: 2017-10-26 14:01:32 +0200 ## Comment 25092 Date: 2017-03-02 18:45:03 +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: Simple test which (to me) gives unexplainable profiling output. -- create 500M integers create table seq as select value from sys.generate_series(cast(1 as int),cast(500000000 as int)) with data; -- get 10 of them into a second table create table x as select * from seq sample 10 with data; -- make sure we get a linear and easy to read plan alter table seq set read only; alter table x set read only; set optimizer='sequential_pipe'; -- measure the time needed to obtain a MAL plan for a simple join (1-2 ms on my machine) explain select seq.value from seq, x where seq.value=x.value; -- trace the same query trace select seq.value from seq, x where seq.value=x.value; Here's the problem, I cannot explain the timings. - Dec2016, tip of hg, optimized compilation, 16GB ram, dbfarm on SSD. - Wall-clock timing is 2.4 seconds (this is correctly reported, it does take this time). - It takes the same time without trace. - MAL plan generation was 1-2 ms. Negligible - The single instructions take almost no time. - Execution is linear on one thread - The join is expected to be the only meaty operation, but it is reported to take 219usec. I find it hard to believe. - Still, 2.4 seconds for this join seem too long (500M x 10, integers, with the large table sorted) Please find in attachment the outputs for EXPLAIN, TRACE, and STETHOSCOPE. Reproducible: Always $ mserver5 --version MonetDB 5 server v11.25.10 (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 25093 Date: 2017-03-02 18:45:33 +0100 From: @swingbit Created attachment 541 explain output > Attached file: [6239_explain.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6239_6239_explain.txt_541) (text/plain, 6146 bytes) > Description: explain output ## Comment 25094 Date: 2017-03-02 18:45:52 +0100 From: @swingbit Created attachment 542 trace output > Attached file: [6239_trace.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6239_6239_trace.txt_542) (text/plain, 5368 bytes) > Description: trace output ## Comment 25095 Date: 2017-03-02 18:46:15 +0100 From: @swingbit Created attachment 543 stethoscope output > Attached file: [6239_stethoscope.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6239_6239_stethoscope.txt_543) (text/plain, 12500 bytes) > Description: stethoscope output ## Comment 25096 Date: 2017-03-02 19:00:05 +0100 From: @swingbit Correction: Both tables are sorted, and I verified that a mergejoin is used. 219usec seem too short for this join, but 2.4 seconds are definitly too long. ## Comment 25097 Date: 2017-03-02 19:33:00 +0100 From: @swingbit Second correction: compilation was not optimized. I tried with optimized compilation, nothing changes. ## Comment 25098 Date: 2017-03-02 20:48:58 +0100 From: @sjoerdmullender You could run the server with the option -d2097152 ( -d$((1<<21)) ) to get algorithm debug output on the server console (standard error). It will print, among other things, the exact time the join operation took. It is calculated at the lowest level, so it won't be any more accurate than that. When I try your scenario on my machine, I get 491usec in the trace output, and at the same time 475usec on the server console. It also tells me it does a mergejoin_int. ## Comment 25099 Date: 2017-03-02 20:55:50 +0100 From: @swingbit That is good news. The join IS very fast on this large-ish but easy join. Do you also get more than 2 seconds wall-clock for the entire query though? If so, the question is where the time goes. ## Comment 25101 Date: 2017-03-02 21:05:52 +0100 From: @sjoerdmullender Are you using a debug build? In particular, do you have assertions enabled? If so, try running the server with -d33554432 ( -d$((1<<25)) ) to disable cleaning of memory. I profiled the query using callgrind and I saw that a huge amount of time was spent freeing (and writing debug patterns to the to-be-freed memory). Without callgrind, I got about 2.5 seconds wall clock time for the query. Without callgrind and with -d33554432 it took a staggering 3.6 milliseconds. ## Comment 25102 Date: 2017-03-02 21:13:16 +0100 From: @sjoerdmullender I didn't do my test correctly. The fast time was the time for the explain. The select was in fact about 22ms. ## Comment 25103 Date: 2017-03-02 21:21:42 +0100 From: @sjoerdmullender It's too late for this. I now put the SQL statements in a script and run it with mclient -ims -d$DB script.sql If I run mserver without options (debug build, with assertions, not optimized), the select (without TRACE keyword, but after the EXPLAIN), takes 2.6 seconds. If I run mserver with -d33554432 the select takes 3.4 milliseconds. ## Comment 25135 Date: 2017-03-03 12:03:34 +0100 From: @swingbit Sjoerd, I can confirm your timings. Only compiling with --disable-debug --disable-developer --enable-optimize does not change anything, still 2.3 seconds. Using debug mask 33554432 makes the whole select execute on my machine in 1.2ms and 1.9ms (88usec for the subjoin) without and with trace, respectively. Now, these are the timings I'd love to have in production :D ## Comment 25136 Date: 2017-03-03 12:07:23 +0100 From: @swingbit What are the risks of not cleaning the freed memory? ## Comment 25137 Date: 2017-03-03 12:47:19 +0100 From: @swingbit I checked the code of GDKfree(). It clarifies that zeroing the to-be-freed memory is actually a debug measure to simplify detection of double-frees. For production builds, this is not needed. What perhaps is not very clear is that --disable-developer DOES NOT imply --disable-assert. I got <1ms wall-clock time by using these configure switches, and no debug bitmask: --disable-debug --disable-developer --disable-assert --enable-optimize Would't you agree that --disable-developer should imply --disable-assert ? On a different note, is the profiling information on a developer build to be considered wrong or correct? It sure isn't very informative. ## Comment 25613 Date: 2017-09-05 12:37:14 +0200 From: @sjoerdmullender I've changed the description of the --enable-developer option. It's orthogonal to the other options, but it should be clearer now what it's for. Can this report be closed now? ## Comment 25615 Date: 2017-09-06 09:24:11 +0200 From: @swingbit It can be closed, for me. Thanks. ## Comment 25617 Date: 2017-09-06 09:35:14 +0200 From: @sjoerdmullender "Fixed" by clarifying the configure option that apparently caused some confusion.
Incorrect profiling
https://api.github.com/repos/MonetDB/MonetDB/issues/6239/comments
0
2020-11-30T15:33:33Z
2024-06-27T12:58:45Z
https://github.com/MonetDB/MonetDB/issues/6239
753,577,926
6,239
[ "MonetDB", "MonetDB" ]
Date: 2017-03-02 18:09:26 +0100 From: @swingbit To: MonetDB5 devs &lt;<bugs-monetdb5>&gt; Version: 11.25.5 (Dec2016-SP1) CC: @mlkersten Last updated: 2017-03-02 21:05:28 +0100 ## Comment 25086 Date: 2017-03-02 18:09:26 +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: Simple test which (to me) gives unexplainable profiling output. -- create 500M integers create table seq as select value from sys.generate_series(cast(1 as int),cast(500000000 as int)) with data; -- get 10 of them into a second table create table x as select * from seq sample 10 with data; -- make sure we get a linear and easy to read plan alter table seq set read only; alter table x set read only; set optimizer='sequential_pipe'; -- measure the time needed to obtain a MAL plan for a simple join (1-2 ms on my machine) explain select seq.value from seq, x where seq.value=x.value; -- trace the same query trace select seq.value from seq, x where seq.value=x.value; Here's the problem, I cannot explain the timings. - Dec2016, tip of hg, optimized compilation, 16GB ram, dbfarm on SSD. - Wall-clock timing is 2.3 seconds (this is correctly reported, it does take this time). - It takes the same time without trace. - MAL plan generation was 1-2 ms. Negligible - The single instructions take almost no time. - Execution is linear on one thread - The join is expected to be the only meaty operation, but it is reported to take 140usec. I find it hard to believe. - Still, 2.3 seconds for this join seem too long (500M x 10, integers, with the large table sorted) +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | usec | statement | +======+===========================================================================================================================================================================================================+ | 182 | X_0="explain select seq.value from seq, x where seq.value=x.value;":void := querylog.define("explain select seq.value from seq, x where seq.value=x.value;":str,"sequential_pipe":str,16:int); | | 128 | X_23=<tmp_1354>[0]:bat[:str] := bat.new(nil:str); | | 116 | X_29=<tmp_657>[0]:bat[:int] := bat.new(nil:int); | | 225 | X_27=<tmp_1414>[0]:bat[:int] := bat.new(nil:int); | | 102 | X_26=<tmp_1203>[0]:bat[:str] := bat.new(nil:str); | | 100 | X_25=<tmp_632>[0]:bat[:str] := bat.new(nil:str); | | 96 | X_3=0:int := sql.mvc(); | | 173 | C_4=<tmp_1564>[499999999]:bat[:oid] := sql.tid(X_3=0:int,"spinque":str,"seq":str); | | 171 | X_7=<tmp_36>[499999999]:bat[:int] := sql.bind(X_3=0:int,"spinque":str,"seq":str,"value":str,0:int); | | 135 | X_10=<tmp_1735>[499999999]:bat[:int] := algebra.projection(C_4=<tmp_1564>[499999999]:bat[:oid],X_7=<tmp_36>[499999999]:bat[:int]); | | 139 | C_11=<tmp_1564>[10]:bat[:oid] := sql.tid(X_3=0:int,"spinque":str,"x":str); | | 153 | X_13=<tmp_434>[10]:bat[:int] := sql.bind(X_3=0:int,"spinque":str,"x":str,"value":str,0:int); | | 130 | X_14=<tmp_33>[10]:bat[:int] := algebra.projection(C_11=<tmp_1564>[10]:bat[:oid],X_13=<tmp_434>[10]:bat[:int]); | | 253 | (X_15=<tmp_1564>[10]:bat[:oid],r1_16=<tmp_437>[10]:bat[:oid]) := algebra.subjoin(X_10=<tmp_1735>[499999999]:bat[:int],X_14=<tmp_33>[10]:bat[:int],nil:BAT,nil:BAT,false:bit,nil:lng); | | 124 | X_21=<tmp_33>[10]:bat[:int] := algebra.projection(X_15=<tmp_1564>[10]:bat[:oid],X_10=<tmp_1735>[499999999]:bat[:int]); | | 109 | X_30=<tmp_1354>[1]:bat[:str] := bat.append(X_23=<tmp_1354>[1]:bat[:str],"spinque.seq":str); | | 73 | X_32=<tmp_632>[1]:bat[:str] := bat.append(X_25=<tmp_632>[1]:bat[:str],"value":str); | | 79 | X_33=<tmp_1203>[1]:bat[:str] := bat.append(X_26=<tmp_1203>[1]:bat[:str],"int":str); | | 106 | X_35=<tmp_1414>[1]:bat[:int] := bat.append(X_27=<tmp_1414>[1]:bat[:int],32:int); | | 93 | X_37=<tmp_657>[1]:bat[:int] := bat.append(X_29=<tmp_657>[1]:bat[:int],0:int); | | 164 | X_22=17:int := sql.resultSet(X_30=<tmp_1354>[1]:bat[:str],X_32=<tmp_632>[1]:bat[:str],X_33=<tmp_1203>[1]:bat[:str],X_35=<tmp_1414>[1]:bat[:int],X_37=<tmp_657>[1]:bat[:int],X_21=<tmp_33>[10]:bat[:int]); | +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 21 tuples (2.3s) I used stethoscope to inspect this trace more closely, it reports the same timings and doesn't give (to me) any more clue: [ 0, "18:03:45.478928", "user.s64_1[0]55", 4, "start", 0, 2009, 0, 0, 0, 0, 0, 806, "function user.s64_1():void;" ] [ 1, "18:03:45.479097", "user.s64_1[1]55", 4, "start", 0, 2009, 0, 0, 0, 0, 0, 0, "X_0=0@0:void := querylog.define(\"explain select seq.value from seq, x where seq.value=x.value;\":str,\"sequential_pipe\":str,16:int);" ] [ 2, "18:03:45.479383", "user.s64_1[1]55", 4, "done ", 182, 2009, 0, 0, 0, 0, 0, 0, "X_0=\"explain select seq.value from seq, x where seq.value=x.value;\":void := querylog.define(\"explain select seq.value from seq, x where seq.value=x.value;\":str,\"sequential_pipe\":str,16:int);" ] [ 3, "18:03:45.479518", "user.s64_1[2]55", 4, "start", 0, 2009, 0, 0, 0, 0, 0, 0, "X_23=nil:bat[:str] := bat.new(nil:str);" ] [ 4, "18:03:45.479736", "user.s64_1[2]55", 4, "done ", 128, 2009, 0, 0, 0, 0, 0, 0, "X_23=<tmp_1354>[0]:bat[:str] := bat.new(nil:str);" ] [ 5, "18:03:45.479849", "user.s64_1[3]55", 4, "start", 0, 2009, 0, 0, 0, 0, 0, 0, "X_29=nil:bat[:int] := bat.new(nil:int);" ] [ 6, "18:03:45.480080", "user.s64_1[3]55", 4, "done ", 116, 2009, 0, 0, 0, 0, 0, 0, "X_29=<tmp_657>[0]:bat[:int] := bat.new(nil:int);" ] [ 7, "18:03:45.480311", "user.s64_1[4]55", 4, "start", 0, 2009, 0, 0, 0, 0, 0, 0, "X_27=nil:bat[:int] := bat.new(nil:int);" ] [ 8, "18:03:45.480618", "user.s64_1[4]55", 4, "done ", 225, 2009, 0, 0, 0, 0, 0, 0, "X_27=<tmp_1414>[0]:bat[:int] := bat.new(nil:int);" ] [ 9, "18:03:45.480725", "user.s64_1[5]55", 4, "start", 0, 2009, 0, 0, 0, 0, 0, 0, "X_26=nil:bat[:str] := bat.new(nil:str);" ] [ 10, "18:03:45.480881", "user.s64_1[5]55", 4, "done ", 102, 2009, 0, 0, 0, 0, 0, 0, "X_26=<tmp_1203>[0]:bat[:str] := bat.new(nil:str);" ] [ 11, "18:03:45.480964", "user.s64_1[6]55", 4, "start", 0, 2009, 0, 0, 0, 0, 0, 0, "X_25=nil:bat[:str] := bat.new(nil:str);" ] [ 12, "18:03:45.481148", "user.s64_1[6]55", 4, "done ", 100, 2009, 0, 0, 0, 0, 0, 0, "X_25=<tmp_632>[0]:bat[:str] := bat.new(nil:str);" ] [ 13, "18:03:45.481253", "user.s64_1[7]55", 4, "start", 0, 2009, 0, 0, 0, 0, 0, 0, "X_3=0:int := sql.mvc();" ] [ 14, "18:03:45.481393", "user.s64_1[7]55", 4, "done ", 96, 2009, 0, 0, 0, 0, 0, 0, "X_3=0:int := sql.mvc();" ] [ 15, "18:03:45.481462", "user.s64_1[8]55", 4, "start", 0, 2009, 0, 0, 0, 0, 0, 0, "C_4=nil:bat[:oid] := sql.tid(X_3=0:int,\"spinque\":str,\"seq\":str);" ] [ 16, "18:03:45.481726", "user.s64_1[8]55", 4, "done ", 173, 2009, 0, 0, 0, 0, 0, 0, "C_4=<tmp_1564>[499999999]:bat[:oid] := sql.tid(X_3=0:int,\"spinque\":str,\"seq\":str);" ] [ 17, "18:03:45.481834", "user.s64_1[9]55", 4, "start", 0, 2009, 0, 0, 0, 0, 0, 0, "X_7=nil:bat[:int] := sql.bind(X_3=0:int,\"spinque\":str,\"seq\":str,\"value\":str,0:int);" ] [ 18, "18:03:45.482181", "user.s64_1[9]55", 4, "done ", 171, 2009, 0, 0, 0, 0, 0, 0, "X_7=<tmp_36>[499999999]:bat[:int] := sql.bind(X_3=0:int,\"spinque\":str,\"seq\":str,\"value\":str,0:int);" ] [ 19, "18:03:45.482306", "user.s64_1[10]55", 4, "start", 0, 2009, 0, 0, 0, 0, 0, 0, "X_10=nil:bat[:int] := algebra.projection(C_4=<tmp_1564>[499999999]:bat[:oid],X_7=<tmp_36>[499999999]:bat[:int]);" ] [ 20, "18:03:45.482523", "user.s64_1[10]55", 4, "done ", 135, 2009, 1907, 0, 0, 0, 0, 0, "X_10=<tmp_1735>[499999999]:bat[:int] := algebra.projection(C_4=<tmp_1564>[499999999]:bat[:oid],X_7=<tmp_36>[499999999]:bat[:int]);" ] [ 21, "18:03:45.482637", "user.s64_1[11]55", 4, "start", 0, 2009, 0, 0, 0, 0, 0, 0, "C_11=nil:bat[:oid] := sql.tid(X_3=0:int,\"spinque\":str,\"x\":str);" ] [ 22, "18:03:45.482856", "user.s64_1[11]55", 4, "done ", 139, 2009, 0, 0, 0, 0, 0, 0, "C_11=<tmp_1564>[10]:bat[:oid] := sql.tid(X_3=0:int,\"spinque\":str,\"x\":str);" ] [ 23, "18:03:45.482959", "user.s64_1[12]55", 4, "start", 0, 2009, 0, 0, 0, 0, 0, 0, "X_13=nil:bat[:int] := sql.bind(X_3=0:int,\"spinque\":str,\"x\":str,\"value\":str,0:int);" ] [ 24, "18:03:45.483201", "user.s64_1[12]55", 4, "done ", 153, 2009, 0, 0, 0, 0, 0, 0, "X_13=<tmp_434>[10]:bat[:int] := sql.bind(X_3=0:int,\"spinque\":str,\"x\":str,\"value\":str,0:int);" ] [ 25, "18:03:45.483318", "user.s64_1[13]55", 4, "start", 0, 2009, 0, 0, 0, 0, 0, 0, "X_14=nil:bat[:int] := algebra.projection(C_11=<tmp_1564>[10]:bat[:oid],X_13=<tmp_434>[10]:bat[:int]);" ] [ 26, "18:03:45.483527", "user.s64_1[13]55", 4, "done ", 130, 2009, 0, 0, 0, 0, 0, 0, "X_14=<tmp_33>[10]:bat[:int] := algebra.projection(C_11=<tmp_1564>[10]:bat[:oid],X_13=<tmp_434>[10]:bat[:int]);" ] [ 27, "18:03:45.483638", "user.s64_1[14]55", 4, "start", 0, 2009, 0, 0, 0, 0, 0, 0, "(X_15=nil:bat[:oid],r1_16=nil:bat[:oid]) := algebra.subjoin(X_10=<tmp_1735>[499999999]:bat[:int],X_14=<tmp_33>[10]:bat[:int],nil:BAT,nil:BAT,false:bit,nil:lng);" ] [ 28, "18:03:45.483967", "user.s64_1[14]55", 4, "done ", 253, 2009, 0, 0, 0, 0, 0, 0, "(X_15=<tmp_1564>[10]:bat[:oid],r1_16=<tmp_437>[10]:bat[:oid]) := algebra.subjoin(X_10=<tmp_1735>[499999999]:bat[:int],X_14=<tmp_33>[10]:bat[:int],nil:BAT,nil:BAT,false:bit,nil:lng);" ] [ 29, "18:03:46.668369", "user.s64_1[15]55", 4, "start", 0, 2010, 0, 0, 0, 0, 0, 167, "X_21=nil:bat[:int] := algebra.projection(X_15=<tmp_1564>[10]:bat[:oid],X_10=<tmp_1735>[499999999]:bat[:int]);" ] [ 30, "18:03:46.668552", "user.s64_1[15]55", 4, "done ", 124, 2010, 0, 0, 0, 0, 0, 0, "X_21=<tmp_33>[10]:bat[:int] := algebra.projection(X_15=<tmp_1564>[10]:bat[:oid],X_10=<tmp_1735>[499999999]:bat[:int]);" ] [ 31, "18:03:47.812925", "user.s64_1[16]55", 4, "start", 0, 2010, 0, 0, 0, 0, 0, 161, "X_30=nil:bat[:str] := bat.append(X_23=<tmp_1354>[0]:bat[:str],\"spinque.seq\":str);" ] [ 32, "18:03:47.813101", "user.s64_1[16]55", 4, "done ", 109, 2010, 0, 0, 0, 0, 0, 0, "X_30=<tmp_1354>[1]:bat[:str] := bat.append(X_23=<tmp_1354>[1]:bat[:str],\"spinque.seq\":str);" ] [ 33, "18:03:47.813174", "user.s64_1[17]55", 4, "start", 0, 2010, 0, 0, 0, 0, 0, 0, "X_32=nil:bat[:str] := bat.append(X_25=<tmp_632>[0]:bat[:str],\"value\":str);" ] [ 34, "18:03:47.813328", "user.s64_1[17]55", 4, "done ", 73, 2010, 0, 0, 0, 0, 0, 0, "X_32=<tmp_632>[1]:bat[:str] := bat.append(X_25=<tmp_632>[1]:bat[:str],\"value\":str);" ] [ 35, "18:03:47.813393", "user.s64_1[18]55", 4, "start", 0, 2010, 0, 0, 0, 0, 0, 0, "X_33=nil:bat[:str] := bat.append(X_26=<tmp_1203>[0]:bat[:str],\"int\":str);" ] [ 36, "18:03:47.813549", "user.s64_1[18]55", 4, "done ", 79, 2010, 0, 0, 0, 0, 0, 0, "X_33=<tmp_1203>[1]:bat[:str] := bat.append(X_26=<tmp_1203>[1]:bat[:str],\"int\":str);" ] [ 37, "18:03:47.813622", "user.s64_1[19]55", 4, "start", 0, 2010, 0, 0, 0, 0, 0, 0, "X_35=nil:bat[:int] := bat.append(X_27=<tmp_1414>[0]:bat[:int],32:int);" ] [ 38, "18:03:47.813806", "user.s64_1[19]55", 4, "done ", 106, 2010, 0, 0, 0, 0, 0, 0, "X_35=<tmp_1414>[1]:bat[:int] := bat.append(X_27=<tmp_1414>[1]:bat[:int],32:int);" ] [ 39, "18:03:47.813885", "user.s64_1[20]55", 4, "start", 0, 2010, 0, 0, 0, 0, 0, 0, "X_37=nil:bat[:int] := bat.append(X_29=<tmp_657>[0]:bat[:int],0:int);" ] [ 40, "18:03:47.814032", "user.s64_1[20]55", 4, "done ", 93, 2010, 0, 0, 0, 0, 0, 0, "X_37=<tmp_657>[1]:bat[:int] := bat.append(X_29=<tmp_657>[1]:bat[:int],0:int);" ] [ 41, "18:03:47.814101", "user.s64_1[21]55", 4, "start", 0, 2010, 0, 0, 0, 0, 0, 0, "X_22=0:int := sql.resultSet(X_30=<tmp_1354>[1]:bat[:str],X_32=<tmp_632>[1]:bat[:str],X_33=<tmp_1203>[1]:bat[:str],X_35=<tmp_1414>[1]:bat[:int],X_37=<tmp_657>[1]:bat[:int],X_21=<tmp_33>[10]:bat[:int]);" ] [ 42, "18:03:47.814309", "user.s64_1[21]55", 4, "done ", 164, 2010, 0, 0, 0, 0, 0, 0, "X_22=17:int := sql.resultSet(X_30=<tmp_1354>[1]:bat[:str],X_32=<tmp_632>[1]:bat[:str],X_33=<tmp_1203>[1]:bat[:str],X_35=<tmp_1414>[1]:bat[:int],X_37=<tmp_657>[1]:bat[:int],X_21=<tmp_33>[10]:bat[:int]);" ] [ 43, "18:03:47.814474", "user.s64_1[23]55", 4, "start", 0, 2010, 0, 0, 0, 0, 0, 0, "bat.new(nil:str);" ] [ 44, "18:03:47.814531", "user.s64_1[23]55", 4, "done ", 57, 2010, 0, 0, 0, 0, 0, 0, "bat.new(nil:str);" ] [ 45, "18:03:47.814614", "user.s64_1[24]55", 4, "start", 0, 2010, 0, 0, 0, 0, 0, 0, "bat.append(X_64=<tmp_33>[0]:bat[:str],\".trace\":str);" ] [ 46, "18:03:47.814680", "user.s64_1[24]55", 4, "done ", 65, 2010, 0, 0, 0, 0, 0, 0, "bat.append(X_64=<tmp_33>[1]:bat[:str],\".trace\":str);" ] [ 47, "18:03:47.814741", "user.s64_1[25]55", 4, "start", 0, 2010, 0, 0, 0, 0, 0, 0, "bat.append(X_66=<tmp_33>[1]:bat[:str],\".trace\":str);" ] [ 48, "18:03:47.814805", "user.s64_1[25]55", 4, "done ", 63, 2010, 0, 0, 0, 0, 0, 0, "bat.append(X_66=<tmp_33>[2]:bat[:str],\".trace\":str);" ] [ 49, "18:03:47.814865", "user.s64_1[26]55", 4, "start", 0, 2010, 0, 0, 0, 0, 0, 0, "bat.new(nil:str);" ] [ 50, "18:03:47.814941", "user.s64_1[26]55", 4, "done ", 75, 2010, 0, 0, 0, 0, 0, 0, "bat.new(nil:str);" ] [ 51, "18:03:47.815021", "user.s64_1[27]55", 4, "start", 0, 2010, 0, 0, 0, 0, 0, 0, "bat.append(X_69=<tmp_657>[0]:bat[:str],\"usec\":str);" ] [ 52, "18:03:47.815129", "user.s64_1[27]55", 4, "done ", 107, 2010, 0, 0, 0, 0, 0, 0, "bat.append(X_69=<tmp_657>[1]:bat[:str],\"usec\":str);" ] [ 53, "18:03:47.815218", "user.s64_1[28]55", 4, "start", 0, 2010, 0, 0, 0, 0, 0, 0, "bat.append(X_69=<tmp_657>[1]:bat[:str],\"statement\":str);" ] [ 54, "18:03:47.815313", "user.s64_1[28]55", 4, "done ", 94, 2010, 0, 0, 0, 0, 0, 0, "bat.append(X_69=<tmp_657>[2]:bat[:str],\"statement\":str);" ] [ 55, "18:03:47.815399", "user.s64_1[29]55", 4, "start", 0, 2010, 0, 0, 0, 0, 0, 0, "bat.new(nil:str);" ] [ 56, "18:03:47.815475", "user.s64_1[29]55", 4, "done ", 75, 2010, 0, 0, 0, 0, 0, 0, "bat.new(nil:str);" ] [ 57, "18:03:47.815532", "user.s64_1[30]55", 4, "start", 0, 2010, 0, 0, 0, 0, 0, 0, "bat.append(X_74=<tmp_1414>[0]:bat[:str],\"bigint\":str);" ] [ 58, "18:03:47.815604", "user.s64_1[30]55", 4, "done ", 70, 2010, 0, 0, 0, 0, 0, 0, "bat.append(X_74=<tmp_1414>[1]:bat[:str],\"bigint\":str);" ] [ 59, "18:03:47.815670", "user.s64_1[31]55", 4, "start", 0, 2010, 0, 0, 0, 0, 0, 0, "bat.append(X_75=<tmp_1414>[1]:bat[:str],\"clob\":str);" ] [ 60, "18:03:47.815738", "user.s64_1[31]55", 4, "done ", 68, 2010, 0, 0, 0, 0, 0, 0, "bat.append(X_75=<tmp_1414>[2]:bat[:str],\"clob\":str);" ] [ 61, "18:03:47.815802", "user.s64_1[32]55", 4, "start", 0, 2010, 0, 0, 0, 0, 0, 0, "bat.new(nil:int);" ] [ 62, "18:03:47.815878", "user.s64_1[32]55", 4, "done ", 76, 2010, 0, 0, 0, 0, 0, 0, "bat.new(nil:int);" ] [ 63, "18:03:47.815957", "user.s64_1[33]55", 4, "start", 0, 2010, 0, 0, 0, 0, 0, 0, "bat.append(X_79=<tmp_1203>[0]:bat[:int],64:int);" ] [ 64, "18:03:47.816035", "user.s64_1[33]55", 4, "done ", 77, 2010, 0, 0, 0, 0, 0, 0, "bat.append(X_79=<tmp_1203>[1]:bat[:int],64:int);" ] [ 65, "18:03:47.816106", "user.s64_1[34]55", 4, "start", 0, 2010, 0, 0, 0, 0, 0, 0, "bat.append(X_81=<tmp_1203>[1]:bat[:int],0:int);" ] [ 66, "18:03:47.816176", "user.s64_1[34]55", 4, "done ", 69, 2010, 0, 0, 0, 0, 0, 0, "bat.append(X_81=<tmp_1203>[2]:bat[:int],0:int);" ] [ 67, "18:03:47.816239", "user.s64_1[35]55", 4, "start", 0, 2010, 0, 0, 0, 0, 0, 0, "bat.new(nil:int);" ] [ 68, "18:03:47.816304", "user.s64_1[35]55", 4, "done ", 64, 2010, 0, 0, 0, 0, 0, 0, "bat.new(nil:int);" ] [ 69, "18:03:47.816361", "user.s64_1[36]55", 4, "start", 0, 2010, 0, 0, 0, 0, 0, 0, "bat.append(X_85=<tmp_632>[0]:bat[:int],0:int);" ] [ 70, "18:03:47.816437", "user.s64_1[36]55", 4, "done ", 76, 2010, 0, 0, 0, 0, 0, 0, "bat.append(X_85=<tmp_632>[1]:bat[:int],0:int);" ] [ 71, "18:03:47.816508", "user.s64_1[37]55", 4, "start", 0, 2010, 0, 0, 0, 0, 0, 0, "bat.append(X_86=<tmp_632>[1]:bat[:int],0:int);" ] [ 72, "18:03:47.816560", "user.s64_1[37]55", 4, "done ", 51, 2010, 0, 0, 0, 0, 0, 0, "bat.append(X_86=<tmp_632>[2]:bat[:int],0:int);" ] [ 73, "18:03:47.816641", "user.s64_1[40]55", 4, "start", 0, 2010, 0, 0, 0, 0, 0, 0, "sql.resultSet(X_64=<tmp_33>[2]:bat[:str],X_69=<tmp_657>[2]:bat[:str],X_74=<tmp_1414>[2]:bat[:str],X_79=<tmp_1203>[2]:bat[:int],X_85=<tmp_632>[2]:bat[:int],X_88=<tmp_1354>[21]:bat[:any],X_89=<tmp_1735>[21]:bat[:any]);" ] [ 74, "18:03:47.816794", "user.s64_1[40]55", 4, "done ", 153, 2010, 0, 0, 0, 0, 0, 0, "sql.resultSet(X_64=<tmp_33>[2]:bat[:str],X_69=<tmp_657>[2]:bat[:str],X_74=<tmp_1414>[2]:bat[:str],X_79=<tmp_1203>[2]:bat[:int],X_85=<tmp_632>[2]:bat[:int],X_88=<tmp_1354>[21]:bat[:any],X_89=<tmp_1735>[21]:bat[:any]);" ] [ 75, "18:03:47.816868", "user.s64_1[41]55", 4, "start", 0, 2010, 0, 0, 0, 0, 0, 0, "end user.s64_1;" ] [ 76, "18:03:47.816902", "user.s64_1[41]55", 4, "done ", 34, 2010, 0, 0, 0, 0, 0, 0, "end user.s64_1;" ] [ 77, "18:03:47.816933", "user.s64_1[0]55", 4, "done ", 2338005, 2010, 0, 0, 0, 0, 0, 0, "function user.s64_1():void;" ] Reproducible: Always $ mserver5 --version MonetDB 5 server v11.25.10 (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 25087 Date: 2017-03-02 18:19:04 +0100 From: @swingbit This horrible word-wrap makes traces very unreadable (can it be disabled?). Adding output from trace and stethoscope as attachments ## Comment 25088 Date: 2017-03-02 18:19:46 +0100 From: @swingbit Created attachment 539 trace output > Attached file: [6238_trace.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6238_6238_trace.txt_539) (text/plain, 5343 bytes) > Description: trace output ## Comment 25089 Date: 2017-03-02 18:28:15 +0100 From: @swingbit Created attachment 540 stethoscope output > Attached file: [6238_stethoscope.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6238_6238_stethoscope.txt_540) (text/plain, 12519 bytes) > Description: stethoscope output ## Comment 25090 Date: 2017-03-02 18:34:36 +0100 From: @swingbit This report turned out too messy, and I even uploaded wrong files. Let me close this report and open a new one. ## Comment 25100 Date: 2017-03-02 21:05:28 +0100 From: @mlkersten Recall that the latest stethoscope output can be produced as JSON as well using the -j option. This gives all the information emitted by the profiler. Hopefully, this is more readable.
Incorrect profiling
https://api.github.com/repos/MonetDB/MonetDB/issues/6238/comments
0
2020-11-30T15:33:28Z
2024-06-28T13:11:48Z
https://github.com/MonetDB/MonetDB/issues/6238
753,577,860
6,238
[ "MonetDB", "MonetDB" ]
Date: 2017-03-01 16:52:32 +0100 From: @swingbit To: GDK devs &lt;<bugs-common>&gt; Version: 11.25.5 (Dec2016-SP1) Last updated: 2017-03-31 13:28:43 +0200 ## Comment 25075 Date: 2017-03-01 16:52:32 +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: The following trace line looked strange to me: | 312749 | C_161=<tmp_2405>[0]:bat[:oid] := algebra.subinter(X_131=<tmp_2344>[30395024]:bat[:oid],X_160=<tmp_2407>[0]:bat[:oid],nil:BAT,nil:BAT,false:bit,nil:lng); 312 milliseconds for a no-op (right bat is empty) Looking at the code, I have the impression that joininitresults does not handle this case properly, i.e. it returns a result size equal to the count of the left bat. Hence, it allocates a result bat for 30395024 tuples, for nothing. I didn't check carefully whether the actual join also misses an early-exit condition. Reproducible: Always $ mserver5 --version MonetDB 5 server v11.25.10 (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 25076 Date: 2017-03-01 17:37:15 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [310b7a4f966d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=310b7a4f966d) 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=310b7a4f966d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=310b7a4f966d) Changeset description: Better check to see whether join result is empty. This fixes bug #6237.
semijoin with empty right bat does not return immediately
https://api.github.com/repos/MonetDB/MonetDB/issues/6237/comments
0
2020-11-30T15:33:24Z
2024-06-27T12:58:43Z
https://github.com/MonetDB/MonetDB/issues/6237
753,577,802
6,237
[ "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/6236/comments
0
2020-11-30T15:33:21Z
2020-11-30T15:33:22Z
https://github.com/MonetDB/MonetDB/issues/6236
753,577,755
6,236
[ "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/6235/comments
0
2020-11-30T15:33:18Z
2020-11-30T15:33:20Z
https://github.com/MonetDB/MonetDB/issues/6235
753,577,719
6,235
[ "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/6234/comments
0
2020-11-30T15:33:16Z
2020-11-30T15:33:18Z
https://github.com/MonetDB/MonetDB/issues/6234
753,577,679
6,234
[ "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/6233/comments
0
2020-11-30T15:33:12Z
2020-11-30T15:33:14Z
https://github.com/MonetDB/MonetDB/issues/6233
753,577,630
6,233
[ "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/6232/comments
0
2020-11-30T15:33:10Z
2020-11-30T15:33:11Z
https://github.com/MonetDB/MonetDB/issues/6232
753,577,591
6,232
[ "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/6231/comments
0
2020-11-30T15:33:07Z
2020-11-30T15:33:08Z
https://github.com/MonetDB/MonetDB/issues/6231
753,577,543
6,231
[ "MonetDB", "MonetDB" ]
Date: 2017-02-28 16:59:21 +0100 From: @swingbit To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.5 (Dec2016-SP1) Last updated: 2017-03-31 13:28:40 +0200 ## Comment 25065 Date: 2017-02-28 16:59:21 +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: ANALYZE fails with !42000!syntax error, unexpected $end, expecting ')' or ',': end of input stream in "insert into sys.statistics (column_id,type,width,stamp,"sample",count,"unique",n" on the given example in attachment Reproducible: Always ## Comment 25066 Date: 2017-02-28 17:00:04 +0100 From: @swingbit Created attachment 538 failing sql script with copy into and analyze > Attached file: [6230_syntaxerror.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6230_6230_syntaxerror.sql_538) (application/sql, 64209 bytes) > Description: failing sql script with copy into and analyze ## Comment 25068 Date: 2017-02-28 19:42:01 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [e960625b33da](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e960625b33da) 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=e960625b33da](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e960625b33da) Changeset description: Allocate enough memory for query. This fixes bugs 6229 and 6230.
ANALYZE, syntax error
https://api.github.com/repos/MonetDB/MonetDB/issues/6230/comments
0
2020-11-30T15:33:04Z
2024-06-27T12:58:40Z
https://github.com/MonetDB/MonetDB/issues/6230
753,577,487
6,230
[ "MonetDB", "MonetDB" ]
Date: 2017-02-28 16:55:30 +0100 From: @swingbit To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.5 (Dec2016-SP1) Last updated: 2017-03-31 13:28:38 +0200 ## Comment 25063 Date: 2017-02-28 16:55:30 +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: ANALYZE fails with "unexpected end of input" on the given example in attachment (seems to be due to double ") Reproducible: Always ## Comment 25064 Date: 2017-02-28 16:57:17 +0100 From: @swingbit Created attachment 537 failing sql script with copy into and analyze > Attached file: [6229_ueof.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6229_6229_ueof.sql_537) (application/sql, 5925 bytes) > Description: failing sql script with copy into and analyze ## Comment 25067 Date: 2017-02-28 19:41:58 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [e960625b33da](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e960625b33da) 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=e960625b33da](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e960625b33da) Changeset description: Allocate enough memory for query. This fixes bugs 6229 and 6230.
ANALYZE, unexpected end of input
https://api.github.com/repos/MonetDB/MonetDB/issues/6229/comments
0
2020-11-30T15:33:00Z
2024-06-27T12:58:39Z
https://github.com/MonetDB/MonetDB/issues/6229
753,577,442
6,229
[ "MonetDB", "MonetDB" ]
Date: 2017-02-24 13:06:49 +0100 From: Frank Krüger &lt;<frank.krueger2>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.5 (Dec2016-SP1) Last updated: 2017-03-31 13:28:22 +0200 ## Comment 25057 Date: 2017-02-24 13:06:49 +0100 From: Frank Krüger &lt;<frank.krueger2>&gt; User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:51.0) Gecko/20100101 Firefox/51.0 Build Identifier: A table has been created that contains several real typed columns by: create table raw.ACCELEROMETER("ID" BIGSERIAL, "RECORDING$ID" INT REFERENCES raw.recording("ID"), "DateTime" TIMESTAMP, "TICK" INT, "X" REAL, "Y" REAL, "Z" REAL); When querying the product of one of the real typed columns with itself, a TypeException is thrown: sql>select "X"*"X" from raw.accelerometer limit 10; TypeException:user.main[19]:'mmath.pow' undefined in: mmath.pow(X_1210:flt,2:dbl); When querying the the same by use of the power function directly everything seems to be fine: sql>select power("X",2) from raw.accelerometer limit 10; +-----------------+ | L2 | +=================+ | 0.9511128 | | 0.9692405 | | 0.9692405 | | 0.9672725 | | 0.9638332 | | 0.9520881 | | 0.95257616 | | 0.95257616 | | 0.95257616 | | 0.9520881 | +-----------------+ 10 tuples (6.4s) Also querying the result of a real typed column with another works fine. It seems that is a problem with the implicit use of the power function, where the exponent is typed as double instead of real. This is also confirmed by the output of plan: > mclient data -s "plan select \"X\"*\"X\" from raw.accelerometer limit 10;" +----------------------------------------------------------------+ | rel | +================================================================+ | top N ( | | | project ( | | | | table(raw.accelerometer) [ accelerometer.X ] COUNT | | | ) [ sys.power(accelerometer.X, double "2.000000") as L2.L2 ] | | ) [ bigint "10" ] | +----------------------------------------------------------------+ 5 tuples > mclient data -s "plan select power(\"X\",2) from raw.accelerometer limit 10;" +--------------------------------------------------------------+ | rel | +==============================================================+ | top N ( | | | project ( | | | | table(raw.accelerometer) [ accelerometer.X ] COUNT | | | ) [ sys.power(accelerometer.X, real "2.000000") as L2.L2 ] | | ) [ bigint "10" ] | +--------------------------------------------------------------+ 5 tuples Reproducible: Always ### Steps to Reproduce: 1.create table bla("X" REAL); 2.insert into bla values(2.1); 3.select "X"*"X" from bla; ### Actual Results: The mclient tool produces the following output: TypeException:user.main[19]:'mmath.pow' undefined in: mmath.pow(X_14540:flt,2:dbl); ### Expected Results: Produce the same result as call to power("X",2) directly In an earlier version (Database: MonetDB v11.23.7 (Jun2016-SP1)) this worked without problems. ## Comment 25058 Date: 2017-02-24 14:22:55 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [b7ceaad28f73](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b7ceaad28f73) 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=b7ceaad28f73](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b7ceaad28f73) Changeset description: Use correct type when creating an atom of type flt. This fixes bug #6228. ## Comment 25059 Date: 2017-02-24 16:52:57 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [6c45dfa31141](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6c45dfa31141) 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=6c45dfa31141](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6c45dfa31141) Changeset description: Test for bug #6228.
mclient crashes if real column is multiplied by it itself
https://api.github.com/repos/MonetDB/MonetDB/issues/6228/comments
0
2020-11-30T15:32:57Z
2024-06-27T12:58:38Z
https://github.com/MonetDB/MonetDB/issues/6228
753,577,392
6,228
[ "MonetDB", "MonetDB" ]
Date: 2017-02-23 17:12:12 +0100 From: Manuel &lt;<manuel>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.13 (Jun2016-SP2) CC: @njnes Last updated: 2017-03-31 13:28:34 +0200 ## Comment 25055 Date: 2017-02-23 17:12:12 +0100 From: Manuel &lt;<manuel>&gt; User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 Build Identifier: Good afternoon, I have been trying using distributed query processing monetdb. This is my setup: - two hosts 'A' and 'B' running monetdb. 'A' and 'B' have the same amount of resources (cpus, memory, storage ....) On host 'A' I have a setup: - table 'T1' containing 10 million records. On host 'B' I have setup: - table 'T2' containing another set of 10 million records - remote table 'T1' mapped to T1 on host 'A' - table 'T3' a table containing the records of 'T1' and 'T2' (as a local table: this contains 20 million records), - merge table 'T3_remote' as the merge table of 'T2' (local table) and 'T1' (remote table). 'T3' and 'T3_remote' will effectively contain the same 20 million records, one with all records saved locally, the other as a merge table of a local table and a remote table. All tables have the same schema: ( "customer_gender" CHAR(1), "customer_region" VARCHAR(15) NOT NULL, "customer_country" VARCHAR(40) NOT NULL, "customer_state" VARCHAR(40), "customer_city" VARCHAR(50) NOT NULL, "customer_date_of_birth" DATE, "customer_id" INTEGER NOT NULL, "product_family" VARCHAR(20) NOT NULL, "product_category" VARCHAR(30) NOT NULL, "product_subcategory" VARCHAR(30) NOT NULL, "product_name" VARCHAR(50) NOT NULL, "product_id" INTEGER NOT NULL, "store_id" INTEGER NOT NULL, "store_longitude" DECIMAL(12,8) NOT NULL, "store_latitude" DECIMAL(12,8) NOT NULL, "store_name" VARCHAR(50) NOT NULL, "store_manager" VARCHAR(50) NOT NULL, "store_phone_number" VARCHAR(20) NOT NULL, "store_region" VARCHAR(15) NOT NULL, "store_country" VARCHAR(40) NOT NULL, "store_state" VARCHAR(40), "store_city" VARCHAR(50) NOT NULL, "order_date" DATE NOT NULL, "year_begin_date" DATE, "quarter_begin_date" DATE, "month_begin_date" DATE, "yyyymm" INTEGER, "yyyymmdd" INTEGER, "ddmonyyyy" VARCHAR(9), "line_price" DECIMAL(12,2) NOT NULL, "line_cost" DECIMAL(12,2) NOT NULL, "line_margin" DECIMAL(13,2) NOT NULL, "line_margin_percent" DECIMAL(12,8) NOT NULL ); All queries will be performed against the Monetdb instance running on host 'B'. If I try to execute a simple query like : select * from "T1" where product_id > 1757; The query execution fails with the error (of course the query runs fine on the local table): TypeException:user.l4[6]:'algebra.thetasubselect' undefined in: algebra.thetasubselect(X_40:bat[:int],X_41:any,">":str); SQLState: 22000 ErrorCode: 0 Error: (mapi:monetdb://monetdb@192.168.1.46/visokio) 'algebra.thetasubselect' undefined in: algebra.thetasubselect(X_46:bat[:int],X_47:any,">":str); SQLState: 22000 ErrorCode: 0 I receive similar errors on every query containing a where clause. Queries with where conditions also fail on T3_remote. If I try queries without a where condition they are able to run on the remote table, but it seems that same query executed distributedly runs much slower than the query executed on the local table. For example the query: select count(*), avg("line_cost"), "product_family" from "T3_remote" group by "product_family" takes from 17 seconds up to 28 seconds to execute, while the same query executed against the local table (containing the same records) select count(*), avg("line_cost"), "product_family" from "T3" group by "product_family" takes 0.2 up to 4 seconds. Am I doing something wrong? Is there a reason why I cannot execute a query containing a where clause ? Also, why is the query involving the remote table so much slower than the same query executed on the local table ? Isn't the query executed in a distribute manner supposed to leverage the processing power of both machines ? Thank you for your help, let me know if you need some additional information, log files, the actual data of the tables .... Best regards, Manuel Reproducible: Always ### Actual Results: Being able to perform a query on a remote table with a where clause ## Comment 25153 Date: 2017-03-16 08:41:53 +0100 From: @njnes fixed in the Dec2016 branch
Monetdb fails on remote tables
https://api.github.com/repos/MonetDB/MonetDB/issues/6227/comments
0
2020-11-30T15:32:54Z
2024-06-27T12:58:37Z
https://github.com/MonetDB/MonetDB/issues/6227
753,577,361
6,227
[ "MonetDB", "MonetDB" ]
Date: 2017-02-22 10:24:26 +0100 From: @swingbit To: Merovingian devs &lt;<bugs-merovingian>&gt; Version: 11.25.5 (Dec2016-SP1) Last updated: 2017-02-22 10:24:36 +0100 ## Comment 25054 Date: 2017-02-22 10:24:26 +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: From a conversation in the users mailing-list: >> 'mserver5 --single-user' can also be set with 'monetdb set singleuser=yes'. >> However, 'monetdb get all' doesn't show 'singleuser' as one of the options, I had to guess it myself. >> It would be nice if monetdb could show an actual list of available options, instead a manually compiled one. > Development of mserver5 and monetdbd is not synced, so some features added later to mserver5 are not (completely) added to monetdbd. We should update monetdbd, and its documentation/help message/etc. Mind firing a new feature request? Feature request: have monetdbd and mserver5 options aligned. Reproducible: Always
monetdbd and mserver5 options aligned
https://api.github.com/repos/MonetDB/MonetDB/issues/6226/comments
0
2020-11-30T15:32:51Z
2024-06-28T13:39:36Z
https://github.com/MonetDB/MonetDB/issues/6226
753,577,323
6,226
[ "MonetDB", "MonetDB" ]
Date: 2017-02-22 09:52:32 +0100 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.5 (Dec2016-SP1) Last updated: 2017-07-17 16:07:33 +0200 ## Comment 25053 Date: 2017-02-22 09:52:32 +0100 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; 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: The modulo operator should have the same order of evaluation as the division. - 10*10/3 == 33, since it is evaluated as (10*10)/3. - 10*10%3 == 10, which is wrong because it was evaluated as 10*(10%3) Reproducible: Always ### Steps to Reproduce: Evaluate 10 * 10 % 3 ### Actual Results: 10 ### Expected Results: 1 ## Comment 25084 Date: 2017-03-02 17:48:39 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [469a57574048](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=469a57574048) 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=469a57574048](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=469a57574048) Changeset description: Fixed operator precedence of % to be equal to * and /. This fixes bug #6225. ## Comment 25085 Date: 2017-03-02 17:51:31 +0100 From: @sjoerdmullender The SQL standard doesn't mention the % operator for modulo/remainder, so I guess we can do whatever we want. But I agree it's a good idea to follow the lead of languages such as C where % / and * all have equal priority. The SQL standard only mentions MOD as in <modulus expression> ::= <MOD <left paren> <numeric value expression dividend> <comma> <numeric value expression divisor> <right paren>
Order of evaluation of the modulo operator
https://api.github.com/repos/MonetDB/MonetDB/issues/6225/comments
0
2020-11-30T15:32:49Z
2024-06-27T12:58:35Z
https://github.com/MonetDB/MonetDB/issues/6225
753,577,294
6,225
[ "MonetDB", "MonetDB" ]
Date: 2017-02-21 21:55:20 +0100 From: Dean De Leo &lt;<dleo>&gt; To: MonetDB5 devs &lt;<bugs-monetdb5>&gt; Version: 11.25.5 (Dec2016-SP1) CC: @mlkersten Last updated: 2017-03-03 10:24:09 +0100 ## Comment 25047 Date: 2017-02-21 21:55:20 +0100 From: Dean De Leo &lt;<dleo>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36 Build Identifier: It is currently possible to create types having as part of their name underscores, e.g. "my_type". However apparently it is not possible to refer to them in the function signatures. Reproducible: Always ### Steps to Reproduce: See attached repro ### Actual Results: The parser raises the error "Type identifier expected" when encountering a type with an underscore as part of a function signature. ### Expected Results: Either the function signature should be accepted or the character _ is considered illegal when defining a new type (atom). ## Comment 25048 Date: 2017-02-21 21:55:45 +0100 From: Dean De Leo &lt;<dleo>&gt; Created attachment 536 repro.mal > Attached file: [repro.mal](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6224_repro.mal_536) (application/octet-stream, 232 bytes) > Description: repro.mal ## Comment 25049 Date: 2017-02-21 22:02:45 +0100 From: @mlkersten Type identifiers indeed can not contain the '_', because it separates the name from its index. It is reserved for type variables, which aids type resolution e.g. function f(a:any_1, b:any):any_1 tells that the result type is the same as the first argument. The type for 'b' can be anything. ## Comment 25050 Date: 2017-02-21 22:09:01 +0100 From: Dean De Leo &lt;<dleo>&gt; sure, but then how do you refer to such types? since they can be created.. :) ## Comment 25051 Date: 2017-02-21 22:11:12 +0100 From: @mlkersten For the time being don't create them. Once MAL itself is revisited for a clean up, this might be one of the issues looked into. There is indeed some old cruft. ## Comment 25056 Date: 2017-02-24 10:33:46 +0100 From: @mlkersten A fix has been checked in and the test added ## Comment 25107 Date: 2017-03-03 10:24:09 +0100 From: @sjoerdmullender Dec2016-SP2 has been released, incorporating the fix.
mal_parser: cannot refer to types containing an underscore
https://api.github.com/repos/MonetDB/MonetDB/issues/6224/comments
0
2020-11-30T15:32:46Z
2024-06-27T12:58:34Z
https://github.com/MonetDB/MonetDB/issues/6224
753,577,259
6,224
[ "MonetDB", "MonetDB" ]
Date: 2017-02-20 06:41:54 +0100 From: Antonio Saragga &lt;<antseabra>&gt; To: GDK devs &lt;<bugs-common>&gt; Version: 11.25.5 (Dec2016-SP1) Last updated: 2017-02-20 06:41:54 +0100 ## Comment 25043 Date: 2017-02-20 06:41:54 +0100 From: Antonio Saragga &lt;<antseabra>&gt; User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 Build Identifier: On windows using MonedDB v11.25.3 trying to start server (mserver5.bat) get the following error message: !mvc_init: unable to create system tables !SQLException:SQLinit:Catalogue initialization failed However mserver5.exe inside the bin directory appears to start the server just fine Reproducible: Always ### Steps to Reproduce: 1.Run M5server.bat 2. 3. ### Actual Results: Error message described above. The server doesn't start ### Expected Results: The server should start
error message "mvc_init: unable to create system tables..." trying to start server (mserver5.bat)
https://api.github.com/repos/MonetDB/MonetDB/issues/6221/comments
0
2020-11-30T15:32:37Z
2024-06-28T13:11:47Z
https://github.com/MonetDB/MonetDB/issues/6221
753,577,129
6,221
[ "MonetDB", "MonetDB" ]
Date: 2017-02-19 15:07:54 +0100 From: @mlkersten To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.13 (Jan2014-SP1) CC: @njnes Last updated: 2017-03-15 11:16:11 +0100 ## Comment 25038 Date: 2017-02-19 15:07:54 +0100 From: @mlkersten User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:51.0) Gecko/20100101 Firefox/51.0 Build Identifier: Segfault Thread 3156 "mserver5" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffd496c700 (LWP 1572)] 0x00007fffef0ba29c in sql_ref_inc (r=0x0) at /export/scratch1/home/mk/default//package/sql/common/sql_mem.c:30 30 assert(r->refcnt > 0); (gdb) where 0 0x00007fffef0ba29c in sql_ref_inc (r=0x0) at /export/scratch1/home/mk/default//package/sql/common/sql_mem.c:30 1 0x00007fffef03591a in rel_dup (r=0x0) at /export/scratch1/home/mk/default//package/sql/server/rel_rel.c:42 2 0x00007fffef01a1ca in rel_query (sql=0x7fffac0cd460, rel=0x0, sq=0x7fffacdd6ea0, toplevel=1, ek=..., apply=8) at /export/scratch1/home/mk/default//package/sql/server/rel_select.c:4885 3 0x00007fffef01c018 in rel_subquery (sql=0x7fffac0cd460, rel=0x0, sq=0x7fffacdd6ea0, ek=..., apply=8) at /export/scratch1/home/mk/default//package/sql/server/rel_select.c:5322 4 0x00007fffef01c129 in rel_selects (sql=0x7fffac0cd460, s=0x7fffacdd6ea0) at /export/scratch1/home/mk/default//package/sql/server/rel_select.c:5343 5 0x00007fffef00368a in rel_semantic (sql=0x7fffac0cd460, s=0x7fffacdd6ea0) Reproducible: Always ### Steps to Reproduce: select 51 as c0 from sys.user_role as ref_19, lateral (select ref_19.role_id as c0, (select name from sys.idxs) as c1, ref_20.column_id as c2 from sys.statistics as ref_20 where (select name from sys.netcdf_dims) is not NULL) as subq_1, lateral (select ref_119.function_id as c0, (select sorted from sys.statistics) as c1, subq_1.c0 as c2, subq_1.c2 as c3, cast(coalesce(ref_19.login_id, ref_120.pi) as int) as c4, cast(coalesce(subq_1.c2, 18) as int) as c5, ref_19.role_id as c6, subq_1.c0 as c7, ref_120.lb as c8 from sys.systemfunctions as ref_119 inner join bam.rg as ref_120 on (ref_119.function_id = ref_120.pi ) where subq_1.c0 is NULL) as subq_2 where ref_19.login_id is not NULL; ## Comment 25077 Date: 2017-03-01 22:41:44 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [9fdb3a8b4c32](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9fdb3a8b4c32) 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=9fdb3a8b4c32](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9fdb3a8b4c32) Changeset description: Fix or crash reported in bug #6220.
Segfault in sql_ref_inc (sqlsmith)
https://api.github.com/repos/MonetDB/MonetDB/issues/6220/comments
0
2020-11-30T15:32:33Z
2024-06-28T13:11:46Z
https://github.com/MonetDB/MonetDB/issues/6220
753,577,080
6,220
[ "MonetDB", "MonetDB" ]
Date: 2017-02-19 14:26:17 +0100 From: @mlkersten To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.13 (Jan2014-SP1) CC: @njnes Last updated: 2017-03-31 13:28:28 +0200 ## Comment 25037 Date: 2017-02-19 14:26:17 +0100 From: @mlkersten User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:51.0) Gecko/20100101 Firefox/51.0 Build Identifier: Another crash in the rel_optimizer 4126for (m = exps->h; m && !fnd; m = m->next) { 0 0x00007fab5e3c00d2 in rel_push_join_down (changes=0x7fab44ce88e8, sql=0x7fab3000d4b0, rel=0x7fab300d86c0) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:4126 1 0x00007fab5e3d372c in rewrite_topdown (sql=0x7fab3000d4b0, rel=0x7fab300d86c0, rewriter=0x7fab5e3bfe42 <rel_push_join_down>, has_changes=0x7fab44ce88e8) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:8614 2 0x00007fab5e3d380c in rewrite_topdown (sql=0x7fab3000d4b0, rel=0x7fab300dab30, rewriter=0x7fab5e3bfe42 <rel_push_join_down>, has_changes=0x7fab44ce88e8) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:8635 3 0x00007fab5e3d380c in rewrite_topdown (sql=0x7fab3000d4b0, rel=0x7fab300df9f0, rewriter=0x7fab5e3bfe42 <rel_push_join_down>, has_changes=0x7fab44ce88e8) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:8635 4 0x00007fab5e3d385f in rewrite_topdown (sql=0x7fab3000d4b0, rel=0x7fab300e03d0, rewriter=0x7fab5e3bfe42 <rel_push_join_down>, has_changes=0x7fab44ce88e8) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:8643 5 0x00007fab5e3d3e75 in _rel_optimizer (sql=0x7fab3000d4b0, rel=0x7fab300e03d0, level=0) Reproducible: Always ### Steps to Reproduce: select subq_0.c1 as c0, subq_0.c2 as c1 from (select ref_25.name as c0, (select sessiontimeout from sys.sessions) as c1, 63 as c2, ref_24.var_id as c3, ref_25.name as c4, (select sorted from sys.storage) as c5 from sys.idxs as ref_23 inner join sys.netcdf_vardim as ref_24 left join sys.db_user_info as ref_25 on (ref_24.dimpos = ref_25.default_schema ) on (ref_23.id = ref_24.var_id ) right join tmp.objects as ref_26 on (ref_25.name = ref_26.name ) where EXISTS ( select distinct ref_27.table_id as c0 from tmp.keys as ref_27 right join tmp.keys as ref_28 on (ref_27.type = ref_28.id ) where ref_27.type is not NULL)) as subq_0 where subq_0.c5 is NULL; ## Comment 25040 Date: 2017-02-19 15:38:20 +0100 From: @mlkersten An easier one to trigger it: select ref_0.system as c0, (select value from sys.environment) as c1 from sys.tables as ref_0 where EXISTS ( select distinct ref_5.id as c0, ref_5.digits as c1, ref_6.eclass as c2 from sys.types as ref_5 inner join sys.types as ref_6 on (ref_5.digits = ref_6.id ) where ref_6.digits is not NULL) limit 116; ## Comment 25041 Date: 2017-02-19 16:33:35 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [de9359d0cdd4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=de9359d0cdd4) 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=de9359d0cdd4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=de9359d0cdd4) Changeset description: prevent crash in bug #6219 (ie be carefull with missing expression lists) ## Comment 25078 Date: 2017-03-02 14:22:53 +0100 From: @njnes solved the handling of unions
Crash in rel_optimizer (sqlsmith)
https://api.github.com/repos/MonetDB/MonetDB/issues/6219/comments
0
2020-11-30T15:32:30Z
2024-06-27T12:58:30Z
https://github.com/MonetDB/MonetDB/issues/6219
753,577,032
6,219
[ "MonetDB", "MonetDB" ]
Date: 2017-02-17 12:41:10 +0100 From: @sjoerdmullender To: GDK devs &lt;<bugs-common>&gt; Version: 11.25.5 (Dec2016-SP1) Last updated: 2017-03-03 10:24:14 +0100 ## Comment 25031 Date: 2017-02-17 12:41:10 +0100 From: @sjoerdmullender create table x (i int, j int); copy 8 records into x from stdin; 0|0 1|0 NULL|1 NULL|1 0|2 1|2 2|0 2|2 select quantile(i,0.5),j from x group by j; this *should* return a table 1 0 null 1 1 2 but instead returns 1 0 null 1 null 2 ## Comment 25032 Date: 2017-02-17 12:44:14 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [519b5572aaa3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=519b5572aaa3) 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=519b5572aaa3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=519b5572aaa3) Changeset description: Fix for bug #6218. ## Comment 25110 Date: 2017-03-03 10:24:14 +0100 From: @sjoerdmullender Dec2016-SP2 has been released, incorporating the fix.
grouped quantiles with all null group causes following groups to return null
https://api.github.com/repos/MonetDB/MonetDB/issues/6218/comments
0
2020-11-30T15:32:27Z
2024-06-27T12:58:29Z
https://github.com/MonetDB/MonetDB/issues/6218
753,576,987
6,218
[ "MonetDB", "MonetDB" ]
Date: 2017-02-16 17:47:12 +0100 From: @mlkersten To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.13 (Jan2014-SP1) CC: @njnes Last updated: 2017-03-03 10:24:08 +0100 ## Comment 25030 Date: 2017-02-16 17:47:12 +0100 From: @mlkersten User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:51.0) Gecko/20100101 Firefox/51.0 Build Identifier: Found by sqlsmith 0x00007f688a1b51ce in rewrite (sql=0x7f685c12bb70, rel=0x7f685c2b57b0, rewriter=0x7f688a1a5281 <rel_reduce_groupby_exps>, has_changes=0x7f6870aca8e8) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:8600 2 0x00007f688a1b50f8 in rewrite (sql=0x7f685c12bb70, rel=0x7f685c2b8c80, rewriter=0x7f688a1a5281 <rel_reduce_groupby_exps>, has_changes=0x7f6870aca8e8) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:8586 3 0x00007f688a1b50f8 in rewrite (sql=0x7f685c12bb70, Reproducible: Always ### Steps to Reproduce: select ref_2.name as c0, ref_2.name as c1, ref_2.condition as c2, 90 as c3, ref_2.condition as c4, ref_2.id as c5 from sys.triggers as ref_2 where 24 is NULL; ## Comment 25033 Date: 2017-02-19 14:00:34 +0100 From: @njnes fixed by creating the missing list first. ## Comment 25036 Date: 2017-02-19 14:05:27 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [53b86a794d0c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=53b86a794d0c) 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=53b86a794d0c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=53b86a794d0c) Changeset description: add tests for bugs 6216 and 6217 ## Comment 25106 Date: 2017-03-03 10:24:08 +0100 From: @sjoerdmullender Dec2016-SP2 has been released, incorporating the fix.
Segfault in rel_optimizer (sqlsmith)
https://api.github.com/repos/MonetDB/MonetDB/issues/6217/comments
0
2020-11-30T15:32:24Z
2024-06-27T12:58:28Z
https://github.com/MonetDB/MonetDB/issues/6217
753,576,944
6,217
[ "MonetDB", "MonetDB" ]
Date: 2017-02-16 15:36:22 +0100 From: @mlkersten To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.5 (Dec2016-SP1) CC: @njnes Last updated: 2017-03-31 13:28:20 +0200 ## Comment 25029 Date: 2017-02-16 15:36:22 +0100 From: @mlkersten User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0 Build Identifier: Sqlsmith detected error mserver5: /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:2404: rel2bin_project: Assertion `0' failed. Reproducible: Always ### Steps to Reproduce: select ref_11.type_digits as c0 from (select ref_8.login_id as c0, ref_8.login_id as c1, ref_8.login_id as c2, ref_8.role_id as c3, ref_8.role_id as c4, 45 as c5 from sys.user_role as ref_8 where ref_8.role_id is NULL) as subq_0 inner join sys.idxs as ref_9 on (subq_0.c5 = ref_9.id ) inner join sys.columns as ref_11 on (subq_0.c5 = ref_11.id ) where ref_9.table_id is NULL limit 146; ## Comment 25034 Date: 2017-02-19 14:01:13 +0100 From: @njnes fixed by creating the missing list first ## Comment 25035 Date: 2017-02-19 14:05:21 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [53b86a794d0c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=53b86a794d0c) 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=53b86a794d0c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=53b86a794d0c) Changeset description: add tests for bugs 6216 and 6217 ## Comment 25042 Date: 2017-02-19 18:55:49 +0100 From: @mlkersten This one shows it is not solved: select ref_0.depend_type as c0, ref_0.id as c1, (select name from sys.objects) as c2, ref_0.depend_type as c3 from sys.dependencies as ref_0 where (true) or (((cast(coalesce((select type_scale from sys._columns) , ref_0.depend_id) as int) is not NULL) or (ref_0.depend_type is NULL)) or (ref_0.depend_type is NULL)) limit 114; ## Comment 25148 Date: 2017-03-15 11:14:38 +0100 From: @njnes doesn't crash with the new example
Assertion raised (sqlsmith)
https://api.github.com/repos/MonetDB/MonetDB/issues/6216/comments
0
2020-11-30T15:32:20Z
2024-06-27T12:58:27Z
https://github.com/MonetDB/MonetDB/issues/6216
753,576,897
6,216
[ "MonetDB", "MonetDB" ]
Date: 2017-02-16 11:10:40 +0100 From: @mlkersten To: MonetDB5 devs &lt;<bugs-monetdb5>&gt; Version: 11.25.5 (Dec2016-SP1) Last updated: 2019-03-19 09:32:13 +0100 ## Comment 25028 Date: 2017-02-16 11:10:40 +0100 From: @mlkersten User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0 Build Identifier: Sqlsmith raised issue: WARNING To speedup user.columnsize a bulk operator implementation is needed X_61:bat[:lng] := mal.multiplex("user":str,"columnsize":str,X_46:bat[:str],X_53:bat[:lng],X_60:bat[:lng]); WARNING To speedup user.heapsize a bulk operator implementation is needed X_71:bat[:lng] := mal.multiplex("user":str,"heapsize":str,X_46:bat[:str],X_60:bat[:lng],X_70:bat[:int]); WARNING To speedup user.hashsize a bulk operator implementation is needed X_80:bat[:lng] := mal.multiplex("user":str,"hashsize":str,X_79:bat[:bit],X_53:bat[:lng]); WARNING To speedup user.imprintsize a bulk operator implementation is needed X_82:bat[:lng] := mal.multiplex("user":str,"imprintsize":str,X_53:bat[:lng],X_46:bat[:str]); Reproducible: Always ## Comment 26927 Date: 2019-03-18 23:58:27 +0100 From: @mlkersten They are actually SQL functions. Turning them into MAL function can be considered a feature request. Not a serious defect. ## Comment 26934 Date: 2019-03-19 09:32:13 +0100 From: @sjoerdmullender Don't claim it was fixed when it wasn't.
Bulk operators missing
https://api.github.com/repos/MonetDB/MonetDB/issues/6215/comments
0
2020-11-30T15:32:17Z
2024-06-28T13:11:46Z
https://github.com/MonetDB/MonetDB/issues/6215
753,576,853
6,215
[ "MonetDB", "MonetDB" ]
Date: 2017-02-13 12:38:56 +0100 From: muesli4 To: MonetDB5 devs &lt;<bugs-monetdb5>&gt; Version: -- development CC: @mlkersten Last updated: 2019-03-19 08:16:13 +0100 ## Comment 25020 Date: 2017-02-13 12:38:56 +0100 From: muesli4 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0 Build Identifier: With the Jun2016 release I had success with the mitosis optimizer with MAL code from my custom code generator. As of recently (maybe slightly before Dec2016) the mitosis optimizer no longer triggers. For a dual core CPU the effect is barely noticeable, but with 16 hardware threads this means a performance degradation by factor 2-3. Reproducible: Always The used version is from Feburary 12th out of the Dec2016 branch. I will add two code pieces for comparison (original SQL query and a slightly different version compiled to MAL, although with the same overall semantics). ## Comment 25021 Date: 2017-02-13 12:40:03 +0100 From: muesli4 Created attachment 534 The default TPC-H Q1 in SQL. > Attached file: [tpch_q1.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6214_tpch_q1.sql_534) (application/sql, 592 bytes) > Description: The default TPC-H Q1 in SQL. ## Comment 25022 Date: 2017-02-13 12:40:51 +0100 From: muesli4 Created attachment 535 Output of a code generator that compiles from a slightly different version of TPC-H Q1 (but semantically equal). > Attached file: [tpch_q1.mal](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6214_tpch_q1.mal_535) (application/octet-stream, 6641 bytes) > Description: Output of a code generator that compiles from a slightly different version of TPC-H Q1 (but semantically equal). ## Comment 26930 Date: 2019-03-19 08:16:13 +0100 From: @mlkersten The mitosis optimizer looks at the size of the columns. This information comes from the sql optimizer, where it is known how to access the underlying column storage using the schema.table.column information. This knowledge is not available within the MAL optimizers. In the straight line MAL plan this information does not seem to be included, which means that there is no reason to split the (empty) columns.
mitosis optimizer not triggering in custom MAL code
https://api.github.com/repos/MonetDB/MonetDB/issues/6214/comments
0
2020-11-30T15:32:13Z
2024-06-28T13:11:45Z
https://github.com/MonetDB/MonetDB/issues/6214
753,576,785
6,214
[ "MonetDB", "MonetDB" ]
Date: 2017-02-12 22:35:40 +0100 From: @mlkersten To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.13 (Jan2014-SP1) CC: @njnes Last updated: 2017-03-03 10:25:00 +0100 ## Comment 25016 Date: 2017-02-12 22:35:40 +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: A few examples queries produced using SQLsmith causes a crash when ran against an empty database. They have been added to BugTracker-2017 Reproducible: Always ## Comment 25019 Date: 2017-02-13 08:30:24 +0100 From: @njnes fixed problem with select push down on sub relations with unions ## Comment 25134 Date: 2017-03-03 10:25:00 +0100 From: @sjoerdmullender Dec2016-SP2 has been released, incorporating the fix.
SQLsmith causes server to crash
https://api.github.com/repos/MonetDB/MonetDB/issues/6213/comments
0
2020-11-30T15:32:10Z
2024-06-27T12:58:23Z
https://github.com/MonetDB/MonetDB/issues/6213
753,576,740
6,213
[ "MonetDB", "MonetDB" ]
Date: 2017-02-12 10:00:02 +0100 From: @yzchang To: SQL devs &lt;<bugs-sql>&gt; Version: -- development Last updated: 2017-02-12 10:31:40 +0100 ## Comment 25006 Date: 2017-02-12 10:00:02 +0100 From: @yzchang It would be useful to introduce new ways, e.g. through some SQL queries or functions calls, to acquire information of the current client connections, after having deleted the sys.connections table recently (https://www.monetdb.org/bugzilla/show_bug.cgi?id=3996). ## Comment 25007 Date: 2017-02-12 10:31:40 +0100 From: @sjoerdmullender Get it out of your head: sys.connections had *nothing* to do with client connections.
querying client connections information
https://api.github.com/repos/MonetDB/MonetDB/issues/6212/comments
0
2020-11-30T15:32:07Z
2024-06-28T13:39:36Z
https://github.com/MonetDB/MonetDB/issues/6212
753,576,708
6,212
[ "MonetDB", "MonetDB" ]
Date: 2017-02-11 14:29:34 +0100 From: Anthony Damico &lt;<ajdamico>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.25.3 (Dec2016) CC: ajdamico, @hannesmuehleisen, @mlkersten Last updated: 2017-06-08 19:27:32 +0200 ## Comment 25001 Date: 2017-02-11 14:29:34 +0100 From: Anthony Damico &lt;<ajdamico>&gt; User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0 Build Identifier: r code triggers the error. very difficult to narrow down: when i tested on 500,000 or more records, the error occurred. when i tested on 400,000 or fewer records, the error disappeared thanks!! Reproducible: Always ### Steps to Reproduce: large set of UNION ALL commands union_all_columns <- c( "NULL AS group_col", "NULL AS group_col", "NULL AS group_col", "NULL AS group_col", "NULL AS group_col", "NULL AS group_col", "NULL AS group_col", "NULL AS group_col", "NULL AS group_col", " ( CASE WHEN between_value THEN 'YES' WHEN NOT between_value THEN 'NO' ELSE 'MISSING' END ) AS group_col", " ( CASE WHEN between_value THEN 'YES' WHEN NOT between_value THEN 'NO' ELSE 'MISSING' END ) AS group_col", " ( CASE WHEN between_value THEN 'YES' WHEN NOT between_value THEN 'NO' ELSE 'MISSING' END ) AS group_col", " ( CASE WHEN between_value THEN 'YES' WHEN NOT between_value THEN 'NO' ELSE 'MISSING' END ) AS group_col", " ( CASE WHEN between_value THEN 'YES' WHEN NOT between_value THEN 'NO' ELSE 'MISSING' END ) AS group_col", " ( CASE WHEN between_value THEN 'YES' WHEN NOT between_value THEN 'NO' ELSE 'MISSING' END ) AS group_col", " ( CASE WHEN between_value THEN 'YES' WHEN NOT between_value THEN 'NO' ELSE 'MISSING' END ) AS group_col", " ( CASE WHEN between_value THEN 'YES' WHEN NOT between_value THEN 'NO' ELSE 'MISSING' END ) AS group_col", " ( CASE WHEN high_value THEN 'YES' WHEN NOT high_value THEN 'NO' ELSE 'MISSING' END ) AS group_col", " ( CASE WHEN high_value THEN 'YES' WHEN NOT high_value THEN 'NO' ELSE 'MISSING' END ) AS group_col", " ( CASE WHEN high_value THEN 'YES' WHEN NOT high_value THEN 'NO' ELSE 'MISSING' END ) AS group_col", " ( CASE WHEN high_value THEN 'YES' WHEN NOT high_value THEN 'NO' ELSE 'MISSING' END ) AS group_col", " ( CASE WHEN high_value THEN 'YES' WHEN NOT high_value THEN 'NO' ELSE 'MISSING' END ) AS group_col", " ( CASE WHEN high_value THEN 'YES' WHEN NOT high_value THEN 'NO' ELSE 'MISSING' END ) AS group_col", " ( CASE WHEN high_value THEN 'YES' WHEN NOT high_value THEN 'NO' ELSE 'MISSING' END ) AS group_col", " ( CASE WHEN high_value THEN 'YES' WHEN NOT high_value THEN 'NO' ELSE 'MISSING' END ) AS group_col", " ( CASE WHEN some_value THEN 'YES' WHEN NOT some_value THEN 'NO' ELSE 'MISSING' END ) AS group_col", " ( CASE WHEN some_value THEN 'YES' WHEN NOT some_value THEN 'NO' ELSE 'MISSING' END ) AS group_col", " ( CASE WHEN some_value THEN 'YES' WHEN NOT some_value THEN 'NO' ELSE 'MISSING' END ) AS group_col", " ( CASE WHEN some_value THEN 'YES' WHEN NOT some_value THEN 'NO' ELSE 'MISSING' END ) AS group_col", " ( CASE WHEN some_value THEN 'YES' WHEN NOT some_value THEN 'NO' ELSE 'MISSING' END ) AS group_col", " ( CASE WHEN some_value THEN 'YES' WHEN NOT some_value THEN 'NO' ELSE 'MISSING' END ) AS group_col", " ( CASE WHEN some_value THEN 'YES' WHEN NOT some_value THEN 'NO' ELSE 'MISSING' END ) AS group_col", " ( CASE WHEN some_value THEN 'YES' WHEN NOT some_value THEN 'NO' ELSE 'MISSING' END ) AS group_col" ) these_queries <- paste0( "SELECT " , union_all_columns , " , AVG( numcol_one_numcol_two ) AS avg_one , AVG( numcol_three ) AS avg_two , AVG( numcol_four ) AS avg_three , AVG( numcol_five ) AS avg_four FROM ( ( " , paste0( "( SELECT a.stringcol_one , a.stringcol_two , ( CASE WHEN some_value IS NULL THEN FALSE ELSE some_value END ) AS some_value , ( CASE WHEN high_value IS NULL THEN FALSE ELSE high_value END ) AS high_value , ( CASE WHEN numcol_one_numcol_two IS NULL THEN 0 ELSE numcol_one_numcol_two END ) AS numcol_one_numcol_two , FALSE AS between_value , ( CASE WHEN numcol_three IS NULL THEN 0 ELSE numcol_three END ) AS numcol_three , ( CASE WHEN numcol_four IS NULL THEN 0 ELSE numcol_four END ) AS numcol_four , ( CASE WHEN numcol_five IS NULL THEN 0 ELSE numcol_five END ) AS numcol_five FROM ( SELECT stringcol_one , '" , 1:12 , "' AS stringcol_two FROM table_one ) AS a LEFT JOIN ( SELECT stringcol_one , CAST( MAX( ( numcol_two > 0 ) ) AS BOOLEAN ) AS some_value , CAST( ( SUM( numcol_one + numcol_two ) >= 0 ) AS BOOLEAN ) AS high_value FROM table_two GROUP BY stringcol_one ) AS z ON a.stringcol_one = z.stringcol_one LEFT JOIN ( SELECT stringcol_one , stringcol_two , SUM( numcol_one + numcol_two ) AS numcol_one_numcol_two , SUM( numcol_three ) AS numcol_three , SUM( numcol_four ) AS numcol_four , SUM( numcol_five ) AS numcol_five FROM table_two GROUP BY stringcol_one , stringcol_two ) AS b ON a.stringcol_one = b.stringcol_one AND a.stringcol_two = b.stringcol_two )" , collapse = ") UNION ALL (" ) , ") ) AS y GROUP BY group_col" ) this bug does NOT appear if you lower the number of unique records in table_one from 500,000 to 400,000 in other words, if you set table_one_numrecs to 400000 instead of 500000, there's no error here table_one_numrecs <- 400000 table_one_numrecs <- 500000 table_two_numrecs <- table_one_numrecs * 20 one column table of strings table_one <- data.frame( stringcol_one = digest::sha1( seq( table_one_numrecs ) ) ) here's what the first six records of both tables look like. head( table_one ) this table includes random number generation. set the seed so the random numbers are the same every time for perfect reproducibility set.seed(1) table_two <- data.frame( stringcol_one = sample( table_one$stringcol_one , table_two_numrecs , replace = TRUE ) , stringcol_two = sample( as.character( 1:12 ) , table_two_numrecs , replace = TRUE ) , numcol_one = runif( table_one_numrecs , 0 , 1000000 ) / 100 , numcol_two = runif( table_one_numrecs , 0 , 1000000 ) / 100 , numcol_three = runif( table_one_numrecs , 0 , 1000000 ) / 100 , numcol_four = runif( table_one_numrecs , 0 , 1000000 ) / 100 , numcol_five = runif( table_one_numrecs , 0 , 1000000 ) / 100 ) here's what the first six records of table two looks like head( table_two ) one-time install install.packages( "devtools" ) library(devtools) install_github( "hannesmuehleisen/MonetDBLite" ) where do you want the database stored on your local computer? dbdir <- tempdir() currently saving database to print( dbdir ) library(DBI) db <- dbConnect( MonetDBLite::MonetDBLite() , dbdir ) add both tables to the database dbWriteTable( db , 'table_one' , table_one ) dbWriteTable( db , 'table_two' , table_two ) here's the full stacked query this_query <- paste( "( (" , paste( these_queries , collapse = ") UNION ALL (" ) , ") )" ) here's the error this_level <- dbGetQuery( db , this_query ) error output Error in .local(conn, statement, ...) : Unable to execute statement '( ( SELECT NULL AS group_col , AVG( numcol_one_numcol_two ) AS avg_one , AVG( numcol_three ) AS...'. Server says 'MALException:opt.remap:Function 'mkey.hash' not defined'. straightforward way to export the PLAN and EXPLAIN to a text file query_plan <- dbGetQuery( db , paste( "PLAN" , this_query ) ) query_explain <- dbGetQuery( db , paste( "EXPLAIN" , this_query ) ) change these paths to save the PLAN and EXPLAIN output writeLines( query_plan[ , 1 ] , "C:/Users/AnthonyD/Desktop/plan.txt" ) writeLines( query_explain[ , 1 ] , "C:/Users/AnthonyD/Desktop/explain.txt" ) ### Actual Results: error ### Expected Results: result ## Comment 25002 Date: 2017-02-11 14:38:54 +0100 From: Anthony Damico &lt;<ajdamico>&gt; while experimenting with this bug, very similar queries also gave me these errors: MALException:opt.remap:Function 'calc.>' not defined MALException:opt.remap:Function 'calc.isnil' not defined. ## Comment 25003 Date: 2017-02-11 17:05:28 +0100 From: Anthony Damico &lt;<ajdamico>&gt; Created attachment 533 stones15 script run here's something strange: same error on unix (cwi's stones15) but PLAN and EXPLAIN also throw errors. PLAN and EXPLAIN work without issue on windows > Attached file: [stones15 result.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6211_stones15_result.txt_533) (text/plain, 10878 bytes) > Description: stones15 script run ## Comment 25004 Date: 2017-02-11 17:16:22 +0100 From: Anthony Damico &lt;<ajdamico>&gt; hi, here are plan & explain on windows. (too big to attach) thanks!! plan: https://drive.google.com/file/d/0B3LuuP081KDYZEtZel8xSlh4dXM/view?usp=sharing explain: https://drive.google.com/file/d/0B3LuuP081KDYWlFsTmFvbnNMQ0E/view?usp=sharing sessionInfo() R version 3.3.2 (2016-10-31) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows Server 2012 R2 x64 (build 9600) locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] DBI_0.5-1 loaded via a namespace (and not attached): [1] MonetDBLite_0.3.2 codetools_0.2-15 digest_0.6.12 ## Comment 25005 Date: 2017-02-11 23:05:54 +0100 From: @mlkersten Comment on attachment 533 stones15 script run A reason for mkey.hash to fail being found may occur if it passed a TYPE_void value. Given the "NULL as group_col" may trigger this somewhere. It is worth setting an assertion on all known storage types that need not be covered by the default case. ## Comment 25023 Date: 2017-02-14 19:21:31 +0100 From: Anthony Damico &lt;<ajdamico>&gt; hi Martin, when i replace the first block with the second block and re-run the program, the exact same error occurs.. thanks "NULL AS group_col", "NULL AS group_col", "NULL AS group_col", "NULL AS group_col", "NULL AS group_col", "NULL AS group_col", "NULL AS group_col", "NULL AS group_col", "NULL AS group_col", "CAST( NULL AS STRING ) AS group_col", "CAST( NULL AS STRING ) AS group_col", "CAST( NULL AS STRING ) AS group_col", "CAST( NULL AS STRING ) AS group_col", "CAST( NULL AS STRING ) AS group_col", "CAST( NULL AS STRING ) AS group_col", "CAST( NULL AS STRING ) AS group_col", "CAST( NULL AS STRING ) AS group_col", "CAST( NULL AS STRING ) AS group_col", ## Comment 25039 Date: 2017-02-19 15:34:11 +0100 From: Anthony Damico &lt;<ajdamico>&gt; hi, if you're not using R, this is easy to reproduce within mclient. table_one is just one column with one record, it's only used for the left joins. table 2 is gigantic (but easy to reproduce within an R session). as stated above, this query does not break if table two is eight million records instead of ten million records. table one (tiny): https://drive.google.com/file/d/0B3LuuP081KDYUU9HTl9Gd0ExTlU/view table two (0.5GB): https://docs.google.com/uc?id=0B3LuuP081KDYMDlaZGtqVmZWb1k&export=download here are the straightforward import commands: CREATE TABLE table_one (stringcol_one STRING) COPY OFFSET 2 INTO table_one FROM 'C:/Users/anthonyd/Google Drive/public/table_one.csv' USING DELIMITERS ',','\n','"' NULL as '' CREATE TABLE table_two (stringcol_one STRING, stringcol_two STRING, numcol_one DOUBLE PRECISION, numcol_two DOUBLE COPY OFFSET 2 INTO table_two FROM 'path/to/table_two.csv' USING DELIMITERS ',','\n','"' NULL as '' here's the smallest possible query to reproduce the error: https://drive.google.com/file/d/0B3LuuP081KDYbkVjemp0NmZ3dXM/view thanks ## Comment 25060 Date: 2017-02-27 12:44:42 +0100 From: @hannesmuehleisen trying to convert this to a test case ## Comment 25061 Date: 2017-02-27 13:00:09 +0100 From: @hannesmuehleisen This seems to be a MonetDBLite-only bug, working fine with standalone MonetDB Dec2016 and default branches. ## Comment 25062 Date: 2017-02-27 16:13:51 +0100 From: Anthony Damico &lt;<ajdamico>&gt; reopening because the snippet below makes me strongly suspect that monetdblite is not the issue here. here's a listing of monetdblite github sha identifiers between december 8th 2016 and february 27th 2017 that contain the text "merge branch". i tested about 15 different sha timepoints and the error appeared and disappeared. something is hiding this bug and then revealing it again. hope this makes sense, thanks tested and worked at 1, 3, 4, 6, 7, 9, 11, 12, 16, 20, 25, 35 tested and failed at 4, 5, 8, 10, 30 culprits <- c( "0f411044f70a66d3ee01cdfed6a3ad7914158ac1", "34b468b44c85c23dce57003aef05bfc3e638268d", "28fc595d98f8c59ea9aae8f879b487b43c71755f", "0d4db6e625f8c2ca2353179a1a252a3dd3cb9dfc", "3a59fab2ec0fc494c301de00ab3d9ea102a4e4ba", "630831874c9ebb9764cc0a0e7eab531066e1bf72", "aaa3c31bf2b5aa70aad1ec5702e71f2ae26cadfd", "f9def2b630f9866eb3ae1ec60d753b00080575c3", "96b22eb7a7982a791d611496f5245d2790bc7157", "8325485c493b9cc453da9b1f57aa31bb1513c586", "7f8a68a93177066e877a8f74f6de3002628994fb", "b6033b357f31fdfdf32da69d1895fb378d793f37", "91bec35c03e9b476632e8737223bbfc956f81645", "ce253514dfb7e96d976ab5918a8e414ba87124ab", "f02c3c65b87269c7d4130405b3d59a172476844a", "7a7472fdac9809607c1c03f51bcb70206ec7d3f6", "e0829a59edc40abc850811988daf3b323178f778", "6a384d3b99079c0d5122b064deb5e15961241659", "fd15cdb0a4cc63aa4bd74cfd9a056d07b4bf85e5", "5bab55bd365ef0768b4435bb53473cb5e93cc31e", "3ab6207274cafa16c1b60d75ea38030b2b92b8a3", "3bda481587aabf7906574337777f48f48078d237", "daca6109d3489171805ecd8008b6ee3dd57dd0b6", "72ed4c4448966f71a3657bb43c5bc17545f5f4c6", "4134d8f92e68dcf7d1364c9633b5819599df1a12", "e22e8b3e9f369f38981b013054bc6576b987aacf", "54908f7b3c3a33f9b6d2bcb33c74a78044aff4a9", "23c2ecd46255cb706d244918897b23c94d1f144b", "cf01eec85dc5942d86b4d5749884e338b9bea215", "7d707c684f65057f36328c8a1ef1e52bdaac4f77", "b1da007f2f8a33332b1c38309f10652970f8e709", "64b64af666f1721169adcbfd576f2c35e22dfaba", "c145f66231fa5c8370f85677d824a6666f4a92c6", "c4439d00bdd1cfee03f6d5956696967bf23ab2f1", "8aafac4dbcb6f1782937fe3b5ab7bdac0abd6e95", "fcb21f4c4223024922221d4ed1a8e78d647d8abe", "a8821cd6e48fa5fa39f450effb20f8c158411ac1", "1c495925830ba57b4ad95db0fc7b3791d3987d3a" ) this_sha <- culprits[ WHICH_SHA_TO_TEST ] devtools::install_github( "hannesmuehleisen/MonetDBLite" , ref = this_sha ) ## Comment 25149 Date: 2017-03-15 14:40:37 +0100 From: @mlkersten Running it against default does not cause a problem. However, a recent change on the properties of bat.append() leads to collecting all intermediates from the subqueries first, before they are accumulated. In the default, a more precise optimizer step has been included to avoid this behavior in most circumstances. If all intermediates are kept around too long, then likely your memory fills and an possible malloc at any place can cause unexpected errors. Lots of work on this issue is being undertaken on Default. ## Comment 25157 Date: 2017-03-18 10:19:48 +0100 From: Anthony Damico &lt;<ajdamico>&gt; Created attachment 544 R script fails to trigger error with mserver hi, thanks again for spending time on this issue. hannes set up the dev mserver for me on rocks010 so i was able to attached the 20170318 script (attached) on both that version and also on the latest release of mserver (Dec2016-SP2). the bug does not occur on mserver in either version. i also tested on today's MonetDBLite github version, and it is still occurring there. given the instability of this bug, hannes, do you think you could backport the dev stream and see if that resolves it? if backporting doesn't solve it, then for me to investigate further, i might need a monetdblite branch at the same timepoint as mserver? one note that indicates that this *is* a monetdblite bug is that the bug *does* occur at the sha id that appears to be in line with Dec2016-SP2 [2]? but i am not sure the commits line up perfectly? [1] https://www.monetdb.org/bugzilla/show_bug.cgi?id=6211c9 [2] https://github.com/hannesmuehleisen/MonetDBLite/commit/1f28199f2393506a7bfd2894ce10e482af1b7d0b > Attached file: [20170318 test UNION ALL on external mserver.R](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6211_20170318_test_UNION_ALL_on_external_mserver.R_544) (application/octet-stream, 7157 bytes) > Description: R script fails to trigger error with mserver ## Comment 25329 Date: 2017-05-15 21:57:35 +0200 From: Anthony Damico &lt;<ajdamico>&gt; hi, so the new MonetDBLite branch with the Jul2017 release tag at https://github.com/hannesmuehleisen/MonetDBLite/tree/Jul2017Lite-R still hits this bug. copying and pasting my code into an R console ends with Server says 'MALException:opt.remap:Function 'calc.>' not defined'. and gives you the PLAN and EXPLAIN output. is there any way to get a windows build of mserver.exe that is lined up with the default merge of mserver? this email thread makes it look difficult: https://www.monetdb.org/pipermail/users-list/2016-February/008850.html i would like to verify whether this is an mserver or monetdblite bug? thanks ## Comment 25381 Date: 2017-06-08 19:27:32 +0200 From: Anthony Damico &lt;<ajdamico>&gt; hi, if these two versions have equivalent mserver builds, then this is a monetdblite bug and not an mserver bug.. http://monetdb.cwi.nl/testweb/web/63930:16a4efa7b3dc/MonetDB5-SQL-Installer-x86_64-16a4efa7b3dc.msi devtools::install_github( "hannesmuehleisen/MonetDBLite" , ref = "Jul2017Lite-R" ) tracked here instead: https://github.com/hannesmuehleisen/MonetDBLite/issues/126 thanks
MALException:opt.remap:Function 'mkey.hash' not defined
https://api.github.com/repos/MonetDB/MonetDB/issues/6211/comments
0
2020-11-30T15:32:02Z
2024-06-28T13:11:44Z
https://github.com/MonetDB/MonetDB/issues/6211
753,576,635
6,211