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: 2020-11-20 11:53:00 +0100
From: @joerivanruth
To: clients devs <<bugs-clients>>
Version: 11.39.5 (Oct2020)
Last updated: 2020-11-20 11:53:56 +0100
## Comment 28279
Date: 2020-11-20 11:53:00 +0100
From: @joerivanruth
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0
Build Identifier:
Reproducible: Always
### Steps to Reproduce:
$ rm -f aap.sql
$ cat t.sql
SELECT 42;
$ mclient -d foo aap.sql t.sql
### Actual Results:
aap.sql: cannot open: when opening aap.sql: open failed: No such file or directoryaap.sql: cannot open: when opening aap.sql: open failed: No such file or directoryaap.sql: cannot open: when opening aap.sql: open failed: No such file or directoryaap.sql: cannot open: when opening aap.sql: open failed: No such file or directoryaap.sql: cannot open: when opening aap.sql: open failed: No such file or directoryaap.sql: cannot open: when opening aap.sql:
### Expected Results:
A single message that aap.sql cannot be found
| mclient enters an infinite loop when a file on the command line does not exist | https://api.github.com/repos/MonetDB/MonetDB/issues/7012/comments | 0 | 2020-11-30T17:07:13Z | 2024-06-27T13:11:05Z | https://github.com/MonetDB/MonetDB/issues/7012 | 753,650,199 | 7,012 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-11-15 20:42:24 +0100
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.39.5 (Oct2020)
CC: @PedroTadim
Last updated: 2020-11-24 11:37:23 +0100
## Comment 28270
Date: 2020-11-15 20:42:24 +0100
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36
Build Identifier:
While rand() is called for every tuple, uuid() is called only once and then projected.
sql>select sys.rand() from sys.generate_series(1,5);
+------------+
| %4 |
+============+
| 1369990470 |
| 1138053833 |
| 761390791 |
| 532576399 |
+------------+
4 tuples
sql>select sys.uuid() from sys.generate_series(1,5);
+--------------------------------------+
| %4 |
+======================================+
| f4c13fde-f49c-40d3-862b-c9006b21c6d1 |
| f4c13fde-f49c-40d3-862b-c9006b21c6d1 |
| f4c13fde-f49c-40d3-862b-c9006b21c6d1 |
| f4c13fde-f49c-40d3-862b-c9006b21c6d1 |
+--------------------------------------+
4 tuples
Reproducible: Always
## Comment 28273
Date: 2020-11-16 09:08:53 +0100
From: @PedroTadim
I stumbled upon this about two months ago, and I think the bug is on the rand function rather the uuid one. As the function doesn't have arguments, it has atomic cardinality and from my point of view it makes sense to be only computed once. At the same time, we don't have any hint in the compiler to determine if a function without arguments will be deterministic for every row, eg. pi() is deterministic so it should be computed only once.
I think the solution would be to provide a version with a single argument where we can extract the input's number of rows, then compute it differently for every row.
## Comment 28274
Date: 2020-11-16 18:34:16 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [60d3da464f74](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=60d3da464f74) 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=60d3da464f74](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=60d3da464f74)
Changeset description:
Fixed bug #7011. Add a version of sys.uuid function with a dummy parameter, so it gets a bulk implementation
| uuid() called only once when used in projection list | https://api.github.com/repos/MonetDB/MonetDB/issues/7011/comments | 0 | 2020-11-30T17:07:10Z | 2024-06-27T13:11:04Z | https://github.com/MonetDB/MonetDB/issues/7011 | 753,650,163 | 7,011 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-11-13 10:00:34 +0100
From: Karl <<karl>>
To: SQL devs <<bugs-sql>>
Version: 11.39.5 (Oct2020)
CC: @PedroTadim
Last updated: 2020-11-24 11:37:23 +0100
## Comment 28264
Date: 2020-11-13 10:00:34 +0100
From: Karl <<karl>>
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:82.0) Gecko/20100101 Firefox/82.0
Build Identifier:
Deallocating a specific prepared statement (via deallocate [prepare] <id>) causes all session statements to be deallocated.
This is new in 11.39.5, doesn't happen in 11.37.11.
Reproducible: Always
### Steps to Reproduce:
sql> prepare select 1;
execute prepared statement using: EXEC 0(...)
sql> prepare select 2;
execute prepared statement using: EXEC 1(...)
sql> select count(*) from sys.prepared_statements;
2
sql> deallocate prepare 0;
operation successful
### Actual Results:
sql> select count(*) from sys.prepared_statements;
0
### Expected Results:
sql> select count(*) from sys.prepared_statements;
1
## Comment 28265
Date: 2020-11-13 10:54:28 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [9bb34d385f57](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9bb34d385f57) 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=9bb34d385f57](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=9bb34d385f57)
Changeset description:
Added test and fix for bug #7010, ie don't clean query cache on deallocate mode. It is already handled by the mode itself
| deallocate <id> results in all prepared statements being deallocated (not error-related) | https://api.github.com/repos/MonetDB/MonetDB/issues/7010/comments | 0 | 2020-11-30T17:07:07Z | 2024-06-27T13:11:03Z | https://github.com/MonetDB/MonetDB/issues/7010 | 753,650,121 | 7,010 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-11-10 16:14:10 +0100
From: Muhmud Ahmad <<muhmud.ahmad>>
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
CC: martin.van.dinther
Last updated: 2020-11-13 09:09:09 +0100
## Comment 28258
Date: 2020-11-10 16:14:10 +0100
From: Muhmud Ahmad <<muhmud.ahmad>>
This would be a great addition to the MERGE statement, as per the implementation by SQL Server: https://docs.microsoft.com/en-us/sql/t-sql/statements/merge-transact-sql?view=sql-server-ver15syntax
This would allow you to delete rows from the "merge into" table, where it contains rows that do not exist in the "using" table. For maximum flexibility, we would also need where clause handling as well.
## Comment 28261
Date: 2020-11-12 18:22:18 +0100
From: Martin van Dinther <<martin.van.dinther>>
The WHEN NOT MATCHED BY SOURCE syntax is a non-standard SQL MERGE extension. Only MS SQL Server supports this syntax. See also: https://en.wikipedia.org/wiki/Merge_(SQL)Other_non-standard_implementations
We follow the SQL standard.
You can already remove rows from the "merge into" table using standard DELETE command.
If you still require support for this non-standard SQL MERGE syntax extension, you can contact MonetDB Solutions B.V.
I assume you with "where clause handling" you mean the
WHEN MATCHED [ AND condition ] THEN ...
syntax?
## Comment 28263
Date: 2020-11-13 09:09:09 +0100
From: Muhmud Ahmad <<muhmud.ahmad>>
Yes, that's what I'm currently doing, i.e. a separate DELETE, however, this does mean that I have to use another statement. You're right, it is a non-standard part of the MERGE statement, but does allows for all combinations of DML to be performed; a good idea is still a good idea!
Yes, that's right, I was referring to the ability to add condition handling to the matches/non-matches, which should also allow for multiple when matched/when not matched clauses to be specified.
| MERGE does not currently support WHEN NOT MATCHED BY SOURCE | https://api.github.com/repos/MonetDB/MonetDB/issues/7009/comments | 0 | 2020-11-30T17:07:03Z | 2024-06-28T10:09:03Z | https://github.com/MonetDB/MonetDB/issues/7009 | 753,650,080 | 7,009 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-11-10 11:56:08 +0100
From: @swingbit
To: Merovingian devs <<bugs-merovingian>>
Version: 11.35.19 (Nov2019-SP3)
CC: @PedroTadim
Last updated: 2020-11-24 17:19:48 +0100
## Comment 28256
Date: 2020-11-10 11:56:08 +0100
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36
Build Identifier:
Just as in the summary, create a 11.35 dbfarm, then start it with monetdbd 11.39. No complaints, except that at some point it doesn't work properly (in my case I've seen it hang indefinitely).
As far as I know, monetdbd should refuse to open a dbfarm created with a future release. Am I mistaken?
I am aware that there is no interest in fixing 11.35, and I am also not interested in that. I filed this bug to raise a red flag, in case the same bug (at least, I see it as a bug) affects also more recent releases.
Reproducible: Always
## Comment 28257
Date: 2020-11-10 13:18:01 +0100
From: @swingbit
Sorry, I mixed up the versions:
> create a 11.35 dbfarm, then start it with monetdbd 11.39.
should be
create a 11.39 dbfarm, then start it with monetdbd 11.35.
## Comment 28283
Date: 2020-11-24 14:50:27 +0100
From: @PedroTadim
Hello Roberto,
Sorry for the late responsible, but I think different versions of mserver5 and monetdbd should be interchangeable to use. Can you send a reproducible script of the issue?
## Comment 28284
Date: 2020-11-24 15:10:39 +0100
From: @sjoerdmullender
No, you cannot freely use different versions of monetdbd and mserver5 together. They way mserver5 is started by monetdbd may change between releases. Only use two together that belong to the same release.
What should be possible (and generally is) is using a newer version of both on a database created by an older version.
What does not work is to use an older version on a database created by a newer.
And this latter is where Roberto had a problem. It seems monetdbd doesn't check for this situation.
## Comment 28285
Date: 2020-11-24 15:13:30 +0100
From: @swingbit
I was replying, but yes, what Sjoerd said.
Also because if the two were in fact interchangeable, then 11.39 would not need to run a long upgrade script on a 11.35 database, which it does.
## Comment 28289
Date: 2020-11-24 17:19:48 +0100
From: @PedroTadim
Then we have to check for the older monetdbd for mserver5 created by newer monetdbd case and throw an error/warning.
| monetdbd 11.35 allows to start a dbfarm created with 11.39 | https://api.github.com/repos/MonetDB/MonetDB/issues/7008/comments | 0 | 2020-11-30T17:07:00Z | 2024-06-28T09:32:24Z | https://github.com/MonetDB/MonetDB/issues/7008 | 753,650,043 | 7,008 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-11-06 01:22:00 +0100
From: Dann Corbit <<dcorbit>>
To: clients devs <<bugs-clients>>
Version: 11.39.5 (Oct2020)
Last updated: 2020-11-24 15:19:29 +0100
## Comment 28252
Date: 2020-11-06 01:22:00 +0100
From: Dann Corbit <<dcorbit>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36
Build Identifier:
Installing the ODBC drivers for 32 and 64 bit versions from the MSI files fails.
The error message says, "The setup routines for MonetDB ODBC driver could not be loaded due to system error code 126: The specified module could not be found. (C:\program files\MonetDB\MonetDB ODBC Driver\lib\libMonetODBCs.dll).
Indeed, the folder is empty:
C:\Program Files (x86)\Windows Resource Kits\Tools>dir "c:\program files\MonetDB\MonetDB ODBC Driver\lib\"
Volume in drive C is Windows
Volume Serial Number is 9C44-3903
Directory of c:\program files\MonetDB\MonetDB ODBC Driver\lib
11/05/2020 04:14 PM <DIR> .
11/05/2020 04:14 PM <DIR> ..
0 File(s) 0 bytes
2 Dir(s) 692,307,394,560 bytes free
Reproducible: Always
### Steps to Reproduce:
1.Download the MonetDB MSI files with Last Modified Date of 2020-10-13
2.Run either ODBC driver installer file
3.Try to install
You will get an error popup and the folder will be empty.
### Actual Results:
Install fails and the folder is empty
### Expected Results:
Installation works
## Comment 28253
Date: 2020-11-06 01:23:24 +0100
From: Dann Corbit <<dcorbit>>
Created attachment 697
The error popup for the 64 bit driver installer
> Attached file: [fail.png](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_7007_fail.png_697) (image/png, 14748 bytes)
> Description: The error popup for the 64 bit driver installer
## Comment 28254
Date: 2020-11-06 11:25:53 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [574f237b8201](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=574f237b8201) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=574f237b8201](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=574f237b8201)
Changeset description:
Fix Windows ODBC driver so that it can get installed.
This fixes bug #7007.
## Comment 28286
Date: 2020-11-24 15:19:29 +0100
From: @sjoerdmullender
Fixed in the Oct2020-SP1 release (11.39.7).
| Windows 10 - ODBC drivers do not install for 32 or 64 bit | https://api.github.com/repos/MonetDB/MonetDB/issues/7007/comments | 0 | 2020-11-30T17:06:57Z | 2024-06-27T13:11:00Z | https://github.com/MonetDB/MonetDB/issues/7007 | 753,649,996 | 7,007 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-11-02 03:08:43 +0100
From: william.jing
To: SQL devs <<bugs-sql>>
Version: 11.39.5 (Oct2020)
CC: @PedroTadim
Last updated: 2020-11-03 09:42:37 +0100
## Comment 28245
Date: 2020-11-02 03:08:43 +0100
From: william.jing
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36
Build Identifier:
when we use the Chinese field to sort. the result is incorrect.
Reproducible: Always
### Steps to Reproduce:
we create 2 fields. one is pinyin, the other is Chinese character.
CREATE TABLE if not exists "chinesetest" ( "PinyinName" VARCHAR(256), "ChineseName" VARCHAR(256));
insert into "chinesetest" values ('dongbei','东北');
insert into "chinesetest" values('huadong','华东');
insert into "chinesetest" values('huazhong','华中');
insert into "chinesetest" values('huabei','华北');
insert into "chinesetest" values('huanan','华南');
### Actual Results:
sql>select * from chinesetest order by "ChineseName";
+------------+-------------+
| PinyinName | ChineseName |
+============+=============+
| dongbei | 东北 |
| huazhong | 华中 |
| huadong | 华东 |
| huanan | 华南 |
| huabei | 华北 |
+------------+-------------+
### Expected Results:
sql>select * from chinesetest order by "PinyinName";
+------------+-------------+
| PinyinName | ChineseName |
+============+=============+
| dongbei | 东北 |
| huabei | 华北 |
| huadong | 华东 |
| huanan | 华南 |
| huazhong | 华中 |
+------------+-------------+
## Comment 28246
Date: 2020-11-02 11:15:43 +0100
From: @PedroTadim
Hello William,
The strings are being ordered by the UTF-8 order, which is our default and only available ordering setting. To sort them according to the Chinese order, it requires a Chinese collation. However we don't support collations yet, but it's on our TODO list.
| Chinese field sorting is incorrect | https://api.github.com/repos/MonetDB/MonetDB/issues/7006/comments | 0 | 2020-11-30T17:06:54Z | 2024-06-28T13:04:33Z | https://github.com/MonetDB/MonetDB/issues/7006 | 753,649,964 | 7,006 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-10-29 17:29:07 +0100
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <<bugs-sql>>
Version: 11.39.5 (Oct2020)
CC: @PedroTadim
Last updated: 2020-11-24 11:37:23 +0100
## Comment 28239
Date: 2020-10-29 17:29:07 +0100
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0
Build Identifier:
Dropping a STREAM TABLE does not remove the associated column info from sys._columns creating invalid table_id FK references
Reproducible: Always
### Steps to Reproduce:
CREATE STREAM TABLE strt (id int primary key, nm varchar(123) NOT NULL);
\d
SELECT table_id, * FROM sys._columns WHERE (table_id) NOT IN (SELECT id FROM sys._tables);
-- no rows
DROP TABLE strt;
\d
SELECT table_id, * FROM sys._columns WHERE (table_id) NOT IN (SELECT id FROM sys._tables);
-- shows 2 columns which reference a table_id which does not exist in sys._tables
### Actual Results:
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.39.6 (hg id: 4d973ec7aa13), 'demo'
FOLLOW US on https://twitter.com/MonetDB or https://github.com/MonetDB/MonetDB
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>CREATE STREAM TABLE strt (id int primary key, nm varchar(123) NOT NULL);
operation successful
sql>\d
STREAM TABLE sys.strt
sql>SELECT table_id, * FROM sys._columns WHERE (table_id) NOT IN (SELECT id FROM sys._tables);
+----------+----+------+------+-------------+------------+----------+---------+------+--------+---------+
| table_id | id | name | type | type_digits | type_scale | table_id | default | null | number | storage |
+==========+====+======+======+=============+============+==========+=========+======+========+=========+
+----------+----+------+------+-------------+------------+----------+---------+------+--------+---------+
0 tuples
sql>
sql>DROP TABLE strt;
operation successful
sql>\d
sql>SELECT table_id, * FROM sys._columns WHERE (table_id) NOT IN (SELECT id FROM sys._tables);
+----------+------+------+---------+-------------+------------+----------+---------+-------+--------+---------+
| table_id | id | name | type | type_digits | type_scale | table_id | default | null | number | storage |
+==========+======+======+=========+=============+============+==========+=========+=======+========+=========+
| 8181 | 8177 | id | int | 32 | 0 | 8181 | null | false | 0 | null |
| 8181 | 8180 | nm | varchar | 123 | 0 | 8181 | null | false | 1 | null |
+----------+------+------+---------+-------------+------------+----------+---------+-------+--------+---------+
2 tuples
sql>
### Expected Results:
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.39.6 (hg id: 4d973ec7aa13), 'demo'
FOLLOW US on https://twitter.com/MonetDB or https://github.com/MonetDB/MonetDB
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>CREATE STREAM TABLE strt (id int primary key, nm varchar(123) NOT NULL);
operation successful
sql>\d
STREAM TABLE sys.strt
sql>SELECT table_id, * FROM sys._columns WHERE (table_id) NOT IN (SELECT id FROM sys._tables);
+----------+----+------+------+-------------+------------+----------+---------+------+--------+---------+
| table_id | id | name | type | type_digits | type_scale | table_id | default | null | number | storage |
+==========+====+======+======+=============+============+==========+=========+======+========+=========+
+----------+----+------+------+-------------+------------+----------+---------+------+--------+---------+
0 tuples
sql>
sql>DROP TABLE strt;
operation successful
sql>\d
sql>SELECT table_id, * FROM sys._columns WHERE (table_id) NOT IN (SELECT id FROM sys._tables);
+----------+----+------+------+-------------+------------+----------+---------+------+--------+---------+
| table_id | id | name | type | type_digits | type_scale | table_id | default | null | number | storage |
+==========+====+======+======+=============+============+==========+=========+======+========+=========+
+----------+----+------+------+-------------+------------+----------+---------+------+--------+---------+
0 tuples
sql>
Issue found using new \vsci command in JdbcClient
## Comment 28241
Date: 2020-10-29 20:14:22 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [6554bf8ba1d1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6554bf8ba1d1) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug.
For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=6554bf8ba1d1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=6554bf8ba1d1)
Changeset description:
Add test for bug #7005
## Comment 28243
Date: 2020-10-30 14:09:16 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [140964a47623](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=140964a47623) 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=140964a47623](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=140964a47623)
Changeset description:
Fix for bug #7005, ie don't exclude stream tables from dropping columns
| Dropping a STREAM TABLE does not remove the associated column info from sys._columns | https://api.github.com/repos/MonetDB/MonetDB/issues/7005/comments | 0 | 2020-11-30T17:06:51Z | 2024-06-27T13:10:58Z | https://github.com/MonetDB/MonetDB/issues/7005 | 753,649,924 | 7,005 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-10-29 03:04:02 +0100
From: william.jing
To: SQL devs <<bugs-sql>>
Version: 11.39.5 (Oct2020)
CC: @njnes, @PedroTadim
Last updated: 2020-10-29 15:15:36 +0100
## Comment 28232
Date: 2020-10-29 03:04:02 +0100
From: william.jing
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36
Build Identifier:
When I use the sql_add function, an error occurs at any time.
Reproducible: Always
### Actual Results:
monetdb version is 11.39.5, the sql result is below:
sql>select date '2020-09-28' + (7 * 24 * 60 * 60);
SELECT: no such binary operator 'sql_add(date,int)'
sql>select sql_add(date '2020-09-28' ,7 * 24 * 60 * 60);
SELECT: no such binary operator 'sql_add(date,int)'
sql>select sql_add(date '2020-09-28' ,cast(7 * 24 * 60 * 60*365 as numeric));
SELECT: no such binary operator 'sql_add(date,decimal)'
### Expected Results:
monetdb version is 11.37.11. the sql result is below:
sql>select date '2020-09-28' + (7 * 24 * 60 * 60);
+------------+
| %2 |
+============+
| 2020-10-05 |
+------------+
1 tuple
sql>select sql_add(date '2020-09-28' ,7 * 24 * 60 * 60);
+------------+
| %2 |
+============+
| 2020-10-05 |
+------------+
1 tuple
sql>select sql_add(date '2020-09-28' ,cast(7 * 24 * 60 * 60*365 as numeric));
+------------+
| %3 |
+============+
| 2027-09-27 |
## Comment 28233
Date: 2020-10-29 08:57:16 +0100
From: @PedroTadim
The error is intentional. Adding an integer to a date has is something we cannot compute, because we cannot identify what the integer means (days, months, years, etc.). Use an interval instead:
select date '2020-09-28' + interval '7' day;
| it occurs an error when using sql_add function | https://api.github.com/repos/MonetDB/MonetDB/issues/7004/comments | 0 | 2020-11-30T17:06:46Z | 2024-06-28T13:04:08Z | https://github.com/MonetDB/MonetDB/issues/7004 | 753,649,881 | 7,004 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-10-28 22:42:14 +0100
From: @Mytherin
To: SQL devs <<bugs-sql>>
Version: 11.39.5 (Oct2020)
CC: martin.van.dinther, @PedroTadim, @yzchang
Last updated: 2020-11-24 11:37:24 +0100
## Comment 28230
Date: 2020-10-28 22:42:14 +0100
From: @Mytherin
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15
Build Identifier:
The following query results in a segmentation fault in mserver:
select 0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1;
The same query, but with the multiplication replaced by addition, does return the correct result:
select 0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1;
Reproducible: Always
## Comment 28231
Date: 2020-10-28 22:44:36 +0100
From: @Mytherin
To add, the query succeeds if we include an explicit cast to double on the first constant:
select cast(0.1 as double)*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*
0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*
0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*
0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*
0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1;
## Comment 28234
Date: 2020-10-29 09:16:18 +0100
From: @yzchang
It doesn't crash with changeset [4d973ec7aa13](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4d973ec7aa13)
sql>select
more>0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1;
+------------------------------------------+
| %2 |
+==========================================+
| 0.00000000000000000000000000000000000001 |
+------------------------------------------+
Maybe it's fixed after the release?
## Comment 28235
Date: 2020-10-29 09:25:04 +0100
From: @PedroTadim
While running SQLancer, I found there was an issue on the output scales for large numbers (it caused an assertion error). On the Oct2020 release commit I get wrong results. Meanwhile this got fixed and it will be available on the SP1 release soon.
## Comment 28276
Date: 2020-11-18 18:18:47 +0100
From: Martin van Dinther <<martin.van.dinther>>
The output for query:
select 0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1*0.1;
is still incorrect. It returns 0.000000000000000001
it should return decimal 0.0 or double 1.0e-86.
Tested with MonetDB v11.39.7 (Oct2020-SP1).
Also a test for this issue is missing in sql/test/BugTracker-2020/Tests/.
## Comment 28277
Date: 2020-11-18 18:37:23 +0100
From: @PedroTadim
We truncate the number because we run out of digits, I think this acceptable and the bug can be closed. It's not explicit if the output has to be a decimal or a floating-point.
## Comment 28278
Date: 2020-11-19 15:02:31 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [eb7b7c474646](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=eb7b7c474646) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug.
For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=eb7b7c474646](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=eb7b7c474646)
Changeset description:
Add test and output for bug #7003
| Segfault on large chain of constant decimal multiplication | https://api.github.com/repos/MonetDB/MonetDB/issues/7003/comments | 0 | 2020-11-30T17:06:43Z | 2024-06-27T13:10:56Z | https://github.com/MonetDB/MonetDB/issues/7003 | 753,649,845 | 7,003 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-10-27 18:07:59 +0100
From: @swingbit
To: Merovingian devs <<bugs-merovingian>>
Version: 11.39.5 (Oct2020)
CC: @PedroTadim
Last updated: 2020-11-24 16:42:59 +0100
## Comment 28225
Date: 2020-10-27 18:07:59 +0100
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36
Build Identifier:
$ echo "PID: `pidof mserver5`"
PID:
$ monetdb create x
created database in maintenance mode: x
$ monetdb start x
starting database 'x'... done
$ echo "PID: `pidof mserver5`"
PID: 9183
$ monetdb stop x
stopping database 'x'... FAILED
stop: database is not running: x
$ echo "PID: `pidof mserver5`"
PID: 9183
The log says (notice the negative pid):
2020-10-27 18:02:41 MSG control[7873]: (local): created database 'x'
2020-10-27 18:02:42 MSG control[7873]: (local): served status list
2020-10-27 18:02:42 MSG merovingian[7873]: startup of database under maintenance 'x' forced
2020-10-27 18:02:42 MSG merovingian[7873]: starting database 'x', up min/avg/max: 0s/0s/0s, crash average: 0.00 0.00 0.00 (0-0=0)
2020-10-27 18:02:43 MSG x[9183]: arguments: /home/roberto/MonetDBServer/benchmark/MonetDB/v11.39.202010261820/gcc_generic_0/bin/mserver5 --dbpath=/home/roberto/MonetDBServer/benchmark/sets/text/../../dbfarm/11.39/x --set merovingian_uri=mapi:monetdb://photon.hq.spinque.com:50000/x --set mapi_listenaddr=none --set mapi_usock=/home/roberto/MonetDBServer/benchmark/sets/text/../../dbfarm/11.39/x/.mapi.sock --set monet_vault_key=/home/roberto/MonetDBServer/benchmark/sets/text/../../dbfarm/11.39/x/.vaultkey --set gdk_nr_threads=8 --set max_clients=64 --set sql_optimizer=default_pipe
2020-10-27 18:02:43 MSG x[9183]: MonetDB 5 server v11.39.6 (hg id: 50c57e6bca)
2020-10-27 18:02:43 MSG x[9183]: This is an unreleased version
2020-10-27 18:02:43 MSG x[9183]: Serving database 'x', using 8 threads
2020-10-27 18:02:43 MSG x[9183]: Compiled for x86_64-pc-linux-gnu/64bit with 128bit integers
2020-10-27 18:02:43 MSG x[9183]: Found 15.514 GiB available main-memory of which we use 12.644 GiB
2020-10-27 18:02:43 MSG x[9183]: Copyright (c) 1993 - July 2008 CWI.
2020-10-27 18:02:43 MSG x[9183]: Copyright (c) August 2008 - 2020 MonetDB B.V., all rights reserved
2020-10-27 18:02:43 MSG x[9183]: Visit https://www.monetdb.org/ for further information
2020-10-27 18:02:43 MSG x[9183]: Listening for UNIX domain connection requests on mapi:monetdb:///home/roberto/MonetDBServer/benchmark/sets/text/../../dbfarm/11.39/x/.mapi.sock
2020-10-27 18:02:43 MSG x[9183]: MonetDB/GIS module loaded
2020-10-27 18:02:43 MSG x[9183]: MonetDB/SQL module loaded
2020-10-27 18:02:43 MSG merovingian[7873]: database 'x' has been put into maintenance mode during startup
2020-10-27 18:02:43 MSG control[7873]: (local): started 'x'
2020-10-27 18:02:43 MSG control[7873]: (local): served status list
2020-10-27 18:02:43 ERR merovingian[7873]: strange, trying to kill process -9183 to stop database 'x' which seems to be served by process 9183 instead
2020-10-27 18:02:43 MSG control[7873]: (local): stopped database 'x'
2020-10-27 18:02:43 ERR control[7873]: (local): received stop signal for non running database: x
Reproducible: Always
$ mserver5 --version
MonetDB 5 server 11.39.6 (hg id: 50c57e6bca) (64-bit, 128-bit integers)
This is an unreleased version
Copyright (c) 1993 - July 2008 CWI
Copyright (c) August 2008 - 2020 MonetDB B.V., all rights reserved
Visit https://www.monetdb.org/ for further information
Found 15.5GiB available memory, 8 available cpu cores
Libraries:
libpcre: 8.44 2020-02-12
openssl: OpenSSL 1.1.1g FIPS 21 Apr 2020
libxml2: 2.9.10
Compiled by: roberto@photon.hq.spinque.com (x86_64-pc-linux-gnu)
Compilation: /usr/bin/gcc -mtune=generic -O0 -Werror -Wall -Wextra -Werror-implicit-function-declaration -Wpointer-arith -Wundef -Wformat=2 -Wformat-overflow=1 -Wno-format-truncation -Wno-format-nonliteral -Wno-cast-function-type -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wno-missing-field-initializers -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -Wstack-protector -fstack-protector-all -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wduplicated-cond -Wduplicated-branches -Wrestrict -Wnested-externs -Wmissing-noreturn -Wuninitialized -Wno-char-subscripts -Wunreachable-code
Linking : /usr/bin/ld
## Comment 28236
Date: 2020-10-29 11:44:12 +0100
From: @swingbit
UPDATE:
Although what I reported definitely happened (consistently, multiple times), I could not reproduce the issue on a different system, with the exact same version and compilation options.
Does the negative pid suggest something to you, nevertheless?
## Comment 28237
Date: 2020-10-29 13:29:08 +0100
From: @PedroTadim
A negative PID usually means a process group, but I can't figure out the reason from this bug. At the same time I couldn't reproduce it, and I was about to ask more details from your reproducible steps.
## Comment 28238
Date: 2020-10-29 14:49:31 +0100
From: @swingbit
I still have the one failing. I double-checked that I wasn't mixing versions, I recreated the dbfarm from scratch. It still does the same.
If anyone has ideas about what to test, I'm happy to try.
## Comment 28287
Date: 2020-11-24 16:42:59 +0100
From: @sjoerdmullender
I have no idea what causes this problem, but I did make a change in relevant code. Roberto, can you try if this is still a problem with the latest changeset in the Oct2020 branch? Changeset [bb19aa2c1890](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bb19aa2c1890)
| monetdb stop fails | https://api.github.com/repos/MonetDB/MonetDB/issues/7002/comments | 2 | 2020-11-30T17:06:39Z | 2024-06-27T13:10:55Z | https://github.com/MonetDB/MonetDB/issues/7002 | 753,649,793 | 7,002 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-10-22 12:10:23 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.39.5 (Oct2020)
CC: @njnes, @PedroTadim
Last updated: 2020-11-24 11:37:24 +0100
## Comment 28220
Date: 2020-10-22 12:10:23 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36
Build Identifier:
-- generate 5 integer ids and join with a row_number() on a table
explain
with
ids as (select * from sys.generate_series(1,5)),
t as (select row_number() over() as r, * from sys.functions)
select name from t where r in (select value from ids);
The semijoin between t and ids is translated to a selection over crossproduct (the same with an innerjoin).
function user.main():void;
" X_1:void := querylog.define(""explain with\\nids as (select * from sys.generate_series(1,5)),\\nt as (select row_number() over() as r, * from sys.functions)\\nselect name from t where r in (select value from ids);"":str, ""sequential_pipe"":str, 37:int);"
" X_55:bat[:str] := bat.pack(""sys.t"":str);"
" X_56:bat[:str] := bat.pack(""name"":str);"
" X_57:bat[:str] := bat.pack(""varchar"":str);"
X_58:bat[:int] := bat.pack(256:int);
X_59:bat[:int] := bat.pack(0:int);
X_4:int := sql.mvc();
" C_5:bat[:oid] := sql.tid(X_4:int, ""sys"":str, ""functions"":str);"
" X_17:bat[:str] := sql.bind(X_4:int, ""sys"":str, ""functions"":str, ""name"":str, 0:int);"
" (X_19:bat[:oid], X_20:bat[:str]) := sql.bind(X_4:int, ""sys"":str, ""functions"":str, ""name"":str, 2:int);"
" X_18:bat[:str] := sql.bind(X_4:int, ""sys"":str, ""functions"":str, ""name"":str, 1:int);"
X_21:bat[:str] := sql.delta(X_17:bat[:str], X_19:bat[:oid], X_20:bat[:str], X_18:bat[:str]);
X_22:bat[:str] := algebra.projection(C_5:bat[:oid], X_21:bat[:str]);
X_26:bat[:int] := batsql.row_number(X_22:bat[:str], false:bit, false:bit);
C_47:bat[:oid] := bat.mirror(X_26:bat[:int]);
X_112:int := calc.int(1:bte);
X_113:int := calc.int(5:bte);
X_34:bat[:int] := generator.series(X_112:int, X_113:int);
(X_35:bat[:oid], X_36:bat[:oid]) := algebra.crossproduct(X_26:bat[:int], X_34:bat[:int], false:bit);
X_37:bat[:int] := algebra.projection(X_35:bat[:oid], X_26:bat[:int]);
X_39:bat[:int] := generator.projection(X_36:bat[:oid], X_34:bat[:int]);
X_40:bat[:bit] := batcalc.==(X_37:bat[:int], X_39:bat[:int]);
C_43:bat[:oid] := algebra.select(X_40:bat[:bit], true:bit, true:bit, true:bit, true:bit, false:bit);
X_46:bat[:oid] := algebra.projection(C_43:bat[:oid], X_35:bat[:oid]);
C_48:bat[:oid] := algebra.intersect(C_47:bat[:oid], X_46:bat[:oid], nil:BAT, nil:BAT, false:bit, false:bit, nil:lng);
X_53:bat[:str] := algebra.projection(C_48:bat[:oid], X_22:bat[:str]);
sql.resultSet(X_55:bat[:str], X_56:bat[:str], X_57:bat[:str], X_58:bat[:int], X_59:bat[:int], X_53:bat[:str]);
end user.main;
Reproducible: Always
$ mserver5 --version
MonetDB 5 server 11.39.4 (hg id: e82bd9b8a27) (64-bit, 128-bit integers)
This is an unreleased version
Copyright (c) 1993 - July 2008 CWI
Copyright (c) August 2008 - 2020 MonetDB B.V., all rights reserved
Visit https://www.monetdb.org/ for further information
Found 15.5GiB available memory, 4 available cpu cores
Libraries:
libpcre: 8.44 2020-02-12
openssl: OpenSSL 1.1.1g FIPS 21 Apr 2020
libxml2: 2.9.10
Compiled by: roberto@tardis.spinque.com (x86_64-pc-linux-gnu)
Compilation: /usr/bin/cc -Werror -Wall -Wextra -Werror-implicit-function-declaration -Wpointer-arith -Wundef -Wformat=2 -Wformat-overflow=1 -Wno-format-truncation -Wno-format-nonliteral -Wno-cast-function-type -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wno-missing-field-initializers -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -Wstack-protector -fstack-protector-all -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wduplicated-cond -Wduplicated-branches -Wrestrict -Wnested-externs -Wmissing-noreturn -Wuninitialized -Wno-char-subscripts -Wunreachable-code
Linking : /usr/bin/ld
## Comment 28222
Date: 2020-10-26 11:41:40 +0100
From: @swingbit
A somehow simpler test, by materializing one of the two subqueries into a table. It still uses a cartesian product.
start transaction;
create table i as select * from (VALUES (1),(2),(3)) as x(n);
explain
with t as (select row_number() over() as r, * from sys.functions)
select name from t where r in (select n from i);
## Comment 28223
Date: 2020-10-26 11:49:10 +0100
From: @swingbit
Even simpler, no need for row_number():
create table i as select * from (VALUES (1),(2),(3)) as x(n);
explain
with
t as (select 1 as r, * from sys.functions)
select name from t where r in (select n from i);
## Comment 28224
Date: 2020-10-26 13:03:35 +0100
From: @PedroTadim
I'm just finishing something, then I will look into this.
## Comment 28226
Date: 2020-10-28 16:36:58 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [ca9824e7f56a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ca9824e7f56a) 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=ca9824e7f56a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=ca9824e7f56a)
Changeset description:
fixed bug #7001
(improved checks for when to run a binary join)
## Comment 28227
Date: 2020-10-28 16:38:18 +0100
From: @njnes
The join was indeed incorrectly handled (ie split in cross and selection). Fixed the check for this.
| crossproduct generated for a simple (semi-)join | https://api.github.com/repos/MonetDB/MonetDB/issues/7001/comments | 0 | 2020-11-30T17:06:35Z | 2024-06-27T13:10:54Z | https://github.com/MonetDB/MonetDB/issues/7001 | 753,649,746 | 7,001 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-10-20 12:14:56 +0200
From: Simon AUBERT <<simon.aubert>>
To: SQL devs <<bugs-sql>>
Version: 11.39.5 (Oct2020)
CC: @PedroTadim
Last updated: 2020-10-20 15:22:27 +0200
## Comment 28217
Date: 2020-10-20 12:14:56 +0200
From: Simon AUBERT <<simon.aubert>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36
Build Identifier:
Hello,
apache Hive has a new feature called scheduled query. https://cwiki.apache.org/confluence/display/Hive/Scheduled+Queries
The same would be great, and greater evan if you can play trigger on scheduled queries.
best regards,
Simon
Reproducible: Always
## Comment 28218
Date: 2020-10-20 15:22:27 +0200
From: @PedroTadim
Hello,
You are asking for the 'trails' branch, which we have been developing in the past few years, but it still needs some cleaning before we are able to release it. However you can give it a try.
| Scheduled query as a new feature | https://api.github.com/repos/MonetDB/MonetDB/issues/7000/comments | 0 | 2020-11-30T17:03:29Z | 2024-06-28T10:10:08Z | https://github.com/MonetDB/MonetDB/issues/7000 | 753,647,471 | 7,000 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-10-19 17:33:13 +0200
From: Manuel <<manuel>>
To: SQL devs <<bugs-sql>>
Version: 11.29.7 (Mar2018-SP1)
CC: @PedroTadim, @yzchang
Last updated: 2020-11-24 16:49:23 +0100
## Comment 28213
Date: 2020-10-19 17:33:13 +0200
From: Manuel <<manuel>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36
Build Identifier:
I have an instance of a db farm causing mserver5 to crash immediately with exit status -1073741819. As far as I can tell no information is logged anywhere. I tried adding --trace option, but that seems to have no effect. Anything else I can try to understand what the issue is ?
Reproducible: Always
### Steps to Reproduce:
N/A DB farm contains client data.
## Comment 28214
Date: 2020-10-19 18:39:16 +0200
From: @PedroTadim
Hello Manuel,
You are using a very old version of MonetDB, can you try to upgrade it first? If not, can you send a core dump? So we can analyze it?
## Comment 28215
Date: 2020-10-19 18:46:08 +0200
From: @yzchang
Hai Manuel,
We no longer support Mar2018-SP1. The best you can do is to upgrade to the most recent version Oct2020 and rebuild your database from scratch => for older versions like this, starting with a fresh database is safer than following the upgrade path.
## Comment 28216
Date: 2020-10-20 10:10:12 +0200
From: Manuel <<manuel>>
I understand I am using an older version of monetdb (updating monetdb is very expensive for us), I was wandering if there is a way I can get more information on what the cause of the issue is, and how the database got corrupted in the first place.
## Comment 28288
Date: 2020-11-24 16:49:23 +0100
From: @sjoerdmullender
This looks like an error from Windows. Have you tried Google to find the error? Try searching for "windows -1073741819". That gave some intriguing hits. And it points to problems that have nothing to do with MonetDB...
| Mserver5 crashes on start: debug info | https://api.github.com/repos/MonetDB/MonetDB/issues/6999/comments | 1 | 2020-11-30T17:03:26Z | 2024-06-27T13:10:51Z | https://github.com/MonetDB/MonetDB/issues/6999 | 753,647,445 | 6,999 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-10-16 22:06:47 +0200
From: @mlkersten
To: MonetDB5 devs <<bugs-monetdb5>>
Version: -- development
CC: @kutsurak
Last updated: 2020-11-24 11:37:22 +0100
## Comment 28203
Date: 2020-10-16 22:06:47 +0200
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:81.0) Gecko/20100101 Firefox/81.0
Build Identifier:
The MAL profile buffer is a fixed width buffer of 8KB. This might not be sufficient to hold a complex MAL instruction, such as a copy into using tables with a few hundred columns.
The buffer should grow with the required space.
Reproducible: Always
## Comment 28219
Date: 2020-10-22 08:39:47 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [1b2865035ec4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1b2865035ec4) made by Panagiotis Koutsourakis <kutsurak@monetdbsolutions.com> in the MonetDB repo, refers to this bug.
For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=1b2865035ec4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=1b2865035ec4)
Changeset description:
Reallocate profiler output buffer if it is not enough
This fixes bug #6998.
| MAL profiler buffer limitations | https://api.github.com/repos/MonetDB/MonetDB/issues/6998/comments | 0 | 2020-11-30T17:03:23Z | 2024-06-27T13:10:50Z | https://github.com/MonetDB/MonetDB/issues/6998 | 753,647,412 | 6,998 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-10-16 10:02:58 +0200
From: william.jing
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
CC: justin.jin, @PedroTadim
Last updated: 2020-11-09 09:17:46 +0100
## Comment 28180
Date: 2020-10-16 10:02:58 +0200
From: william.jing
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36
Build Identifier:
the result(column orderbyab) is incorrect when using window function including multiple sort_spec
Reproducible: Always
### Steps to Reproduce:
here is the sql below:
create table "ordertest"(str text, orderA int, orderB int, num int);
insert into "ordertest" values('a',1,1,1);
insert into "ordertest" values('a',2,1,10);
insert into "ordertest" values('a',3,1,20);
insert into "ordertest" values('a',4,1,30);
select *,
sum("num") over(order by orderA) as orderbyA,
sum("num") over(order by orderA,orderB) as orderbyAB,
sum("num") over(order by orderB,orderA) as orderbyBA,
sum("num") over(order by orderB) as orderbyB
from "ordertest";
### Actual Results:
the actual result is below:
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 61 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 61 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 61 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
the result of orderbyab is incorrect
### Expected Results:
the expected result is below:(the result is what run the same sql (also the same raw data) in postgresql)
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 1 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 11 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 31 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
## Comment 28182
Date: 2020-10-16 10:17:19 +0200
From: @sjoerdmullender
*** Bug #6996 has been marked as a duplicate of this bug. ***
## Comment 28184
Date: 2020-10-16 10:17:45 +0200
From: @sjoerdmullender
*** Bug #6995 has been marked as a duplicate of this bug. ***
## Comment 28186
Date: 2020-10-16 10:18:03 +0200
From: @sjoerdmullender
*** Bug #6993 has been marked as a duplicate of this bug. ***
## Comment 28188
Date: 2020-10-16 10:18:18 +0200
From: @sjoerdmullender
*** Bug #6992 has been marked as a duplicate of this bug. ***
## Comment 28190
Date: 2020-10-16 10:18:31 +0200
From: @sjoerdmullender
*** Bug #6991 has been marked as a duplicate of this bug. ***
## Comment 28192
Date: 2020-10-16 10:18:49 +0200
From: @sjoerdmullender
*** Bug #6990 has been marked as a duplicate of this bug. ***
## Comment 28194
Date: 2020-10-16 10:19:03 +0200
From: @sjoerdmullender
*** Bug #6989 has been marked as a duplicate of this bug. ***
## Comment 28196
Date: 2020-10-16 10:19:20 +0200
From: @sjoerdmullender
*** Bug #6988 has been marked as a duplicate of this bug. ***
## Comment 28198
Date: 2020-10-16 10:19:36 +0200
From: @sjoerdmullender
*** Bug #6987 has been marked as a duplicate of this bug. ***
## Comment 28200
Date: 2020-10-16 10:19:50 +0200
From: @sjoerdmullender
*** Bug #6985 has been marked as a duplicate of this bug. ***
## Comment 28202
Date: 2020-10-16 18:58:54 +0200
From: @PedroTadim
I already found the root for this problem. Sometime later this month I will create a new branch to tune window functions to work on this and performance issues such as the one issued on bug #6959.
## Comment 28221
Date: 2020-10-26 09:13:42 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [76805b818767](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=76805b818767) 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=76805b818767](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=76805b818767)
Changeset description:
Bug #6997 has been fixed on this branch
| the result is incorrect when using window function including multiple sort_spec | https://api.github.com/repos/MonetDB/MonetDB/issues/6997/comments | 0 | 2020-11-30T17:03:20Z | 2024-06-27T13:10:49Z | https://github.com/MonetDB/MonetDB/issues/6997 | 753,647,369 | 6,997 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-10-16 07:36:31 +0200
From: william.jing
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
Duplicates: #6997
Last updated: 2020-10-16 10:17:19 +0200
## Comment 28175
Date: 2020-10-16 07:36:31 +0200
From: william.jing
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36
Build Identifier:
the result of orderbyab is incorrect when using window function including multiple sort_spec.
Reproducible: Always
### Steps to Reproduce:
here is the sql below:
create table "ordertest"(str text, orderA int, orderB int, num int);
insert into "ordertest" values('a',1,1,1);
insert into "ordertest" values('a',2,1,10);
insert into "ordertest" values('a',3,1,20);
insert into "ordertest" values('a',4,1,30);
select *,
sum("num") over(order by orderA) as orderbyA,
sum("num") over(order by orderA,orderB) as orderbyAB,
sum("num") over(order by orderB,orderA) as orderbyBA,
sum("num") over(order by orderB) as orderbyB
from "ordertest";
### Actual Results:
the actual result is below:
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 61 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 61 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 61 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
### Expected Results:
the expected result is below:(the result is what run the same sql (also the same raw data) in postgresql)
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 1 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 11 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 31 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
## Comment 28181
Date: 2020-10-16 10:17:19 +0200
From: @sjoerdmullender
*** This bug has been marked as a duplicate of bug #6997 ***
| the result is incorrect when using window function including multiple sort_spec | https://api.github.com/repos/MonetDB/MonetDB/issues/6996/comments | 0 | 2020-11-30T17:03:16Z | 2024-06-28T13:04:17Z | https://github.com/MonetDB/MonetDB/issues/6996 | 753,647,331 | 6,996 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-10-16 07:34:38 +0200
From: william.jing
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
Duplicates: #6997
Last updated: 2020-10-16 10:17:45 +0200
## Comment 28174
Date: 2020-10-16 07:34:38 +0200
From: william.jing
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36
Build Identifier:
when i run window function including multiple sort_spec .the result of orderbyab column is incorrect.
Reproducible: Always
### Steps to Reproduce:
here is the sql below:
create table "ordertest"(str text, orderA int, orderB int, num int);
insert into "ordertest" values('a',1,1,1);
insert into "ordertest" values('a',2,1,10);
insert into "ordertest" values('a',3,1,20);
insert into "ordertest" values('a',4,1,30);
select *,
sum("num") over(order by orderA) as orderbyA,
sum("num") over(order by orderA,orderB) as orderbyAB,
sum("num") over(order by orderB,orderA) as orderbyBA,
sum("num") over(order by orderB) as orderbyB
from "ordertest";
### Actual Results:
the actual result is below:
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 61 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 61 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 61 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
the result of orderbyab column is incorrect.
### Expected Results:
the expected result is below:(the result is what run the same sql (also the same raw data) in postgresql)
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 1 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 11 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 31 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
## Comment 28183
Date: 2020-10-16 10:17:45 +0200
From: @sjoerdmullender
*** This bug has been marked as a duplicate of bug #6997 ***
| the result is incorrect when using window function including multiple sort_spec | https://api.github.com/repos/MonetDB/MonetDB/issues/6995/comments | 0 | 2020-11-30T17:03:13Z | 2024-06-28T13:06:23Z | https://github.com/MonetDB/MonetDB/issues/6995 | 753,647,289 | 6,995 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-10-16 05:48:23 +0200
From: william.jing
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
CC: @PedroTadim
Duplicates: #6985
Last updated: 2020-10-16 09:08:59 +0200
## Comment 28173
Date: 2020-10-16 05:48:23 +0200
From: william.jing
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36
Build Identifier:
when i run window function including multiple sort_spec .the result of orderbyab column is incorrect.
Reproducible: Always
### Steps to Reproduce:
here is the sql below:
create table "ordertest"(str text, orderA int, orderB int, num int);
insert into "ordertest" values('a',1,1,1);
insert into "ordertest" values('a',2,1,10);
insert into "ordertest" values('a',3,1,20);
insert into "ordertest" values('a',4,1,30);
select *,
sum("num") over(order by orderA) as orderbyA,
sum("num") over(order by orderA,orderB) as orderbyAB,
sum("num") over(order by orderB,orderA) as orderbyBA,
sum("num") over(order by orderB) as orderbyB
from "ordertest";
### Actual Results:
the actual result is below:
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 61 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 61 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 61 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
the result of orderbyab column is incorrect.
### Expected Results:
the expected result is below:(the result is what run the same sql (also the same raw data) in postgresql)
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 1 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 11 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 31 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
## Comment 28178
Date: 2020-10-16 09:08:59 +0200
From: @PedroTadim
*** This bug has been marked as a duplicate of bug #6985 ***
| the result is incorrect when using window function including multiple sort_spec | https://api.github.com/repos/MonetDB/MonetDB/issues/6994/comments | 0 | 2020-11-30T17:03:10Z | 2024-06-28T13:06:22Z | https://github.com/MonetDB/MonetDB/issues/6994 | 753,647,237 | 6,994 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-10-16 05:41:25 +0200
From: william.jing
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
Duplicates: #6997
Last updated: 2020-10-16 10:18:03 +0200
## Comment 28172
Date: 2020-10-16 05:41:25 +0200
From: william.jing
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36
Build Identifier:
when i run window function including multiple sort_spec .the result of orderbyab column is incorrect.
Reproducible: Always
### Steps to Reproduce:
here is the sql below:
create table "ordertest"(str text, orderA int, orderB int, num int);
insert into "ordertest" values('a',1,1,1);
insert into "ordertest" values('a',2,1,10);
insert into "ordertest" values('a',3,1,20);
insert into "ordertest" values('a',4,1,30);
select *,
sum("num") over(order by orderA) as orderbyA,
sum("num") over(order by orderA,orderB) as orderbyAB,
sum("num") over(order by orderB,orderA) as orderbyBA,
sum("num") over(order by orderB) as orderbyB
from "ordertest";
### Actual Results:
the actual result is below:
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 61 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 61 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 61 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
the result of orderbyab column is incorrect.
### Expected Results:
the expected result is below:(the result is what run the same sql (also the same raw data) in postgresql)
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 1 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 11 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 31 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
## Comment 28185
Date: 2020-10-16 10:18:03 +0200
From: @sjoerdmullender
*** This bug has been marked as a duplicate of bug #6997 ***
| the result is incorrect when using window function including multiple sort_spec | https://api.github.com/repos/MonetDB/MonetDB/issues/6993/comments | 0 | 2020-11-30T17:03:06Z | 2024-06-28T13:06:21Z | https://github.com/MonetDB/MonetDB/issues/6993 | 753,647,199 | 6,993 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-10-16 05:31:37 +0200
From: william.jing
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
Duplicates: #6997
Last updated: 2020-10-16 10:18:18 +0200
## Comment 28171
Date: 2020-10-16 05:31:37 +0200
From: william.jing
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36
Build Identifier:
here is the sql below:
create table "ordertest"(str text, orderA int, orderB int, num int);
insert into "ordertest" values('a',1,1,1);
insert into "ordertest" values('a',2,1,10);
insert into "ordertest" values('a',3,1,20);
insert into "ordertest" values('a',4,1,30);
select *,
sum("num") over(order by orderA) as orderbyA,
sum("num") over(order by orderA,orderB) as orderbyAB,
sum("num") over(order by orderB,orderA) as orderbyBA,
sum("num") over(order by orderB) as orderbyB
from "ordertest";
Reproducible: Always
### Actual Results:
the actual result is below:
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 61 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 61 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 61 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
### Expected Results:
the expected result is below:(the result is what run the same sql (also the same raw data) in postgresql)
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 1 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 11 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 31 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
## Comment 28187
Date: 2020-10-16 10:18:18 +0200
From: @sjoerdmullender
*** This bug has been marked as a duplicate of bug #6997 ***
| the result is incorrect when using window function including multiple sort_spec | https://api.github.com/repos/MonetDB/MonetDB/issues/6992/comments | 0 | 2020-11-30T17:03:03Z | 2024-06-28T13:06:21Z | https://github.com/MonetDB/MonetDB/issues/6992 | 753,647,159 | 6,992 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-10-16 05:29:42 +0200
From: william.jing
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
Duplicates: #6997
Last updated: 2020-10-16 10:18:31 +0200
## Comment 28170
Date: 2020-10-16 05:29:42 +0200
From: william.jing
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36
Build Identifier:
here is the sql below:
create table "ordertest"(str text, orderA int, orderB int, num int);
insert into "ordertest" values('a',1,1,1);
insert into "ordertest" values('a',2,1,10);
insert into "ordertest" values('a',3,1,20);
insert into "ordertest" values('a',4,1,30);
select *,
sum("num") over(order by orderA) as orderbyA,
sum("num") over(order by orderA,orderB) as orderbyAB,
sum("num") over(order by orderB,orderA) as orderbyBA,
sum("num") over(order by orderB) as orderbyB
from "ordertest";
Reproducible: Always
### Actual Results:
the actual result is below:
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 61 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 61 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 61 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
### Expected Results:
the expected result is below:(the result is what run the same sql (also the same raw data) in postgresql)
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 1 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 11 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 31 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
## Comment 28189
Date: 2020-10-16 10:18:31 +0200
From: @sjoerdmullender
*** This bug has been marked as a duplicate of bug #6997 ***
| the result is incorrect when using window function including multiple sort_spec | https://api.github.com/repos/MonetDB/MonetDB/issues/6991/comments | 0 | 2020-11-30T17:03:00Z | 2024-06-28T13:06:20Z | https://github.com/MonetDB/MonetDB/issues/6991 | 753,647,119 | 6,991 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-10-16 05:13:15 +0200
From: justin.jin
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
Duplicates: #6997
Last updated: 2020-10-16 10:18:49 +0200
## Comment 28169
Date: 2020-10-16 05:13:15 +0200
From: justin.jin
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36
Build Identifier:
here is the sql below:
create table "ordertest"(str text, orderA int, orderB int, num int);
insert into "ordertest" values('a',1,1,1);
insert into "ordertest" values('a',2,1,10);
insert into "ordertest" values('a',3,1,20);
insert into "ordertest" values('a',4,1,30);
select *,
sum("num") over(order by orderA) as orderbyA,
sum("num") over(order by orderA,orderB) as orderbyAB,
sum("num") over(order by orderB,orderA) as orderbyBA,
sum("num") over(order by orderB) as orderbyB
from "ordertest";
orderbyab is incorrect
Reproducible: Always
### Steps to Reproduce:
see details
### Actual Results:
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 61 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 61 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 61 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
### Expected Results:
(the result is what run the same sql (also the same raw data) in postgresql)
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 1 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 11 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 31 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
## Comment 28191
Date: 2020-10-16 10:18:49 +0200
From: @sjoerdmullender
*** This bug has been marked as a duplicate of bug #6997 ***
| the result is incorrect when using window function including multiple sort_spec | https://api.github.com/repos/MonetDB/MonetDB/issues/6990/comments | 0 | 2020-11-30T17:02:57Z | 2024-06-28T13:06:19Z | https://github.com/MonetDB/MonetDB/issues/6990 | 753,647,085 | 6,990 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-10-16 05:08:13 +0200
From: william.jing
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
Duplicates: #6997
Last updated: 2020-10-16 10:19:03 +0200
## Comment 28168
Date: 2020-10-16 05:08:13 +0200
From: william.jing
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36
Build Identifier:
here is the sql below:
create table "ordertest"(str text, orderA int, orderB int, num int);
insert into "ordertest" values('a',1,1,1);
insert into "ordertest" values('a',2,1,10);
insert into "ordertest" values('a',3,1,20);
insert into "ordertest" values('a',4,1,30);
select *,
sum("num") over(order by orderA) as orderbyA,
sum("num") over(order by orderA,orderB) as orderbyAB,
sum("num") over(order by orderB,orderA) as orderbyBA,
sum("num") over(order by orderB) as orderbyB
from "ordertest";
Reproducible: Always
### Actual Results:
the actual result is below:
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 61 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 61 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 61 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
### Expected Results:
the expected result is below:(the result is what run the same sql (also the same raw data) in postgresql)
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 1 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 11 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 31 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
## Comment 28193
Date: 2020-10-16 10:19:03 +0200
From: @sjoerdmullender
*** This bug has been marked as a duplicate of bug #6997 ***
| the result is incorrect when using window function including multiple sort_spec | https://api.github.com/repos/MonetDB/MonetDB/issues/6989/comments | 0 | 2020-11-30T17:02:54Z | 2024-06-28T13:06:18Z | https://github.com/MonetDB/MonetDB/issues/6989 | 753,647,050 | 6,989 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-10-16 05:06:59 +0200
From: william.jing
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 11.37.11 (Jun2020-SP1)
Duplicates: #6997
Last updated: 2020-10-16 10:19:20 +0200
## Comment 28167
Date: 2020-10-16 05:06:59 +0200
From: william.jing
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36
Build Identifier:
here is the sql below:
create table "ordertest"(str text, orderA int, orderB int, num int);
insert into "ordertest" values('a',1,1,1);
insert into "ordertest" values('a',2,1,10);
insert into "ordertest" values('a',3,1,20);
insert into "ordertest" values('a',4,1,30);
select *,
sum("num") over(order by orderA) as orderbyA,
sum("num") over(order by orderA,orderB) as orderbyAB,
sum("num") over(order by orderB,orderA) as orderbyBA,
sum("num") over(order by orderB) as orderbyB
from "ordertest";
Reproducible: Always
### Actual Results:
the actual result is below:
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 61 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 61 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 61 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
### Expected Results:
the expected result is below:(the result is what run the same sql (also the same raw data) in postgresql)
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 1 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 11 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 31 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
## Comment 28195
Date: 2020-10-16 10:19:20 +0200
From: @sjoerdmullender
*** This bug has been marked as a duplicate of bug #6997 ***
| the result is incorrect when using window function including multiple sort_spec | https://api.github.com/repos/MonetDB/MonetDB/issues/6988/comments | 0 | 2020-11-30T17:02:50Z | 2024-06-28T13:06:17Z | https://github.com/MonetDB/MonetDB/issues/6988 | 753,647,001 | 6,988 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-10-16 05:05:46 +0200
From: william.jing
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
Duplicates: #6997
Last updated: 2020-10-16 10:19:36 +0200
## Comment 28166
Date: 2020-10-16 05:05:46 +0200
From: william.jing
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36
Build Identifier:
here is the sql below:
create table "ordertest"(str text, orderA int, orderB int, num int);
insert into "ordertest" values('a',1,1,1);
insert into "ordertest" values('a',2,1,10);
insert into "ordertest" values('a',3,1,20);
insert into "ordertest" values('a',4,1,30);
select *,
sum("num") over(order by orderA) as orderbyA,
sum("num") over(order by orderA,orderB) as orderbyAB,
sum("num") over(order by orderB,orderA) as orderbyBA,
sum("num") over(order by orderB) as orderbyB
from "ordertest";
Reproducible: Always
### Actual Results:
the actual result is below:
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 61 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 61 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 61 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
### Expected Results:
the expected result is below:(the result is what run the same sql (also the same raw data) in postgresql)
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 1 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 11 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 31 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
## Comment 28197
Date: 2020-10-16 10:19:36 +0200
From: @sjoerdmullender
*** This bug has been marked as a duplicate of bug #6997 ***
| the result is incorrect when using window function including multiple sort_spec | https://api.github.com/repos/MonetDB/MonetDB/issues/6987/comments | 0 | 2020-11-30T17:02:47Z | 2024-06-28T13:06:16Z | https://github.com/MonetDB/MonetDB/issues/6987 | 753,646,959 | 6,987 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-10-16 05:04:36 +0200
From: william.jing
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
CC: @PedroTadim
Duplicates: #6985
Last updated: 2020-10-16 09:08:32 +0200
## Comment 28165
Date: 2020-10-16 05:04:36 +0200
From: william.jing
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36
Build Identifier:
here is the sql below:
create table "ordertest"(str text, orderA int, orderB int, num int);
insert into "ordertest" values('a',1,1,1);
insert into "ordertest" values('a',2,1,10);
insert into "ordertest" values('a',3,1,20);
insert into "ordertest" values('a',4,1,30);
select *,
sum("num") over(order by orderA) as orderbyA,
sum("num") over(order by orderA,orderB) as orderbyAB,
sum("num") over(order by orderB,orderA) as orderbyBA,
sum("num") over(order by orderB) as orderbyB
from "ordertest";
Reproducible: Always
### Actual Results:
the actual result is below:
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 61 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 61 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 61 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
### Expected Results:
the expected result is below:(the result is what run the same sql (also the same raw data) in postgresql)
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 1 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 11 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 31 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
## Comment 28176
Date: 2020-10-16 09:08:32 +0200
From: @PedroTadim
*** This bug has been marked as a duplicate of bug #6985 ***
| the result is incorrect when using window function including multiple sort_spec | https://api.github.com/repos/MonetDB/MonetDB/issues/6986/comments | 0 | 2020-11-30T17:02:43Z | 2024-06-28T13:06:15Z | https://github.com/MonetDB/MonetDB/issues/6986 | 753,646,910 | 6,986 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-10-16 05:01:13 +0200
From: william.jing
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
Duplicates: #6997
Last updated: 2020-10-16 10:19:50 +0200
## Comment 28164
Date: 2020-10-16 05:01:13 +0200
From: william.jing
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36
Build Identifier:
here is the sql below:
create table "ordertest"(str text, orderA int, orderB int, num int);
insert into "ordertest" values('a',1,1,1);
insert into "ordertest" values('a',2,1,10);
insert into "ordertest" values('a',3,1,20);
insert into "ordertest" values('a',4,1,30);
select *,
sum("num") over(order by orderA) as orderbyA,
sum("num") over(order by orderA,orderB) as orderbyAB,
sum("num") over(order by orderB,orderA) as orderbyBA,
sum("num") over(order by orderB) as orderbyB
from "ordertest";
the actual result is below:
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 61 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 61 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 61 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
the expected result is below:(the result is what run the same sql (also the same raw data) in postgresql)
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 1 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 11 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 31 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
Reproducible: Always
### Actual Results:
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 61 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 61 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 61 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
### Expected Results:
+------+--------+--------+------+----------+-----------+-----------+----------+
| str | ordera | orderb | num | orderbya | orderbyab | orderbyba | orderbyb |
+======+========+========+======+==========+===========+===========+==========+
| a | 1 | 1 | 1 | 1 | 1 | 1 | 61 |
| a | 2 | 1 | 10 | 11 | 11 | 11 | 61 |
| a | 3 | 1 | 20 | 31 | 31 | 31 | 61 |
| a | 4 | 1 | 30 | 61 | 61 | 61 | 61 |
+------+--------+--------+------+----------+-----------+-----------+----------+
## Comment 28177
Date: 2020-10-16 09:08:32 +0200
From: @PedroTadim
*** Bug #6986 has been marked as a duplicate of this bug. ***
## Comment 28179
Date: 2020-10-16 09:08:59 +0200
From: @PedroTadim
*** Bug #6994 has been marked as a duplicate of this bug. ***
## Comment 28199
Date: 2020-10-16 10:19:50 +0200
From: @sjoerdmullender
*** This bug has been marked as a duplicate of bug #6997 ***
| the result is incorrect when using window function including multiple sort_spec | https://api.github.com/repos/MonetDB/MonetDB/issues/6985/comments | 0 | 2020-11-30T17:02:40Z | 2024-06-28T13:06:14Z | https://github.com/MonetDB/MonetDB/issues/6985 | 753,646,885 | 6,985 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-10-07 15:45:32 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2020-10-07 16:06:33 +0200
## Comment 28156
Date: 2020-10-07 15:45:32 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36
Build Identifier:
At table-checksum may be helpful to test whether two tables are equal, just as it is done with files.
For reference:
- Microsoft SQL Server:
SELECT CHECKSUM_AGG(BINARY_CHECKSUM(*)) FROM TableA
- MariaDB:
CHECKSUM TABLE tbl_name [, tbl_name] ... [ QUICK | EXTENDED ]
I'm mentioning checksum here, but actually any method to quickly compare two tables would be just fine.
I guess MonetDB could would exploit its column storage, and quickly compare the checksum of each corresponding pair of columns of two tables with the same schema and count.
Reproducible: Always
## Comment 28157
Date: 2020-10-07 16:06:33 +0200
From: @swingbit
Of course one could do
sql>\| md5sum -
sql>\D sys.tables
3e5318a46150f90e7bf8469fbef00a9f -
But it would only be ok for interactive use and probably not very efficient.
| TABLE CHECKSUM | https://api.github.com/repos/MonetDB/MonetDB/issues/6984/comments | 0 | 2020-11-30T17:02:37Z | 2024-06-28T10:10:15Z | https://github.com/MonetDB/MonetDB/issues/6984 | 753,646,854 | 6,984 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-10-06 16:46:32 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @PedroTadim
Last updated: 2020-11-24 11:37:22 +0100
## Comment 28152
Date: 2020-10-06 16:46:32 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36
Build Identifier:
monetdb create test
monetdb release test
monetdb set optpipe=whatever test
mclient -d test
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.39.0 (hg id: be68ac80bf), 'mapi:monetdb://photon.hq.spinque.com:56000/test'
FOLLOW US on https://twitter.com/MonetDB or https://github.com/MonetDB/MonetDB
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>select * from sys.tables;
Function 'calc.+' not defined
Related to the optimizer pipe, a question: is the following intentional in Oct2020?
sql>set optimizer='default_pipe';
SET: Variable 'optimizer' unknown
If so, is there a new way to set the optimizer pipe from a client session?
Reproducible: Always
## Comment 28153
Date: 2020-10-06 17:12:09 +0200
From: @PedroTadim
Hello Roberto,
For the last example, can you tell which schema are you on? Due to scoping changes, the parser will attempt to find the variable on the current session's schema.
## Comment 28154
Date: 2020-10-06 17:22:04 +0200
From: @swingbit
Ah I see. I was indeed in a user-created schema.
This works:
sql>set sys.optimizer='default_pipe';
operation successful
## Comment 28155
Date: 2020-10-06 17:32:01 +0200
From: @PedroTadim
It's on our TODO list to add a schema search path for SQL objects. It will solve the problem to bind a sys schema function at another schema, as well as session variables.
About the validation of the MAL pipeline, it's something we have to see as well.
## Comment 28228
Date: 2020-10-28 16:59:16 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [4d973ec7aa13](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4d973ec7aa13) 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=4d973ec7aa13](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=4d973ec7aa13)
Changeset description:
Fix for bug #6983, test if the sql optimizer pipeline is valid when the SQL scenario is launched
## Comment 28244
Date: 2020-10-30 15:26:13 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [ee92764fedeb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ee92764fedeb) 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=ee92764fedeb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=ee92764fedeb)
Changeset description:
Added test and expected result for bug #6983
| monetdb allows to use non-existing optimizer pipe | https://api.github.com/repos/MonetDB/MonetDB/issues/6983/comments | 0 | 2020-11-30T17:02:34Z | 2024-06-27T13:10:34Z | https://github.com/MonetDB/MonetDB/issues/6983 | 753,646,806 | 6,983 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-10-05 07:28:57 +0200
From: Karl Seguin <<no>>
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
CC: @PedroTadim
Last updated: 2020-10-07 18:29:31 +0200
## Comment 28150
Date: 2020-10-05 07:28:57 +0200
From: Karl Seguin <<no>>
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0
Build Identifier:
Seems like when there's a failed foreign constraint, the MonetDB server returns the first defined foreign key, not the one the one that actually failed.
Reproducible: Always
### Steps to Reproduce:
create table a (id int primary key);
insert into a values (1);
create table b (id int primary key);
create table c (a int references a(id), b int references b(id));
insert into c (a, b) values (1, 2);
### Actual Results:
40002!INSERT INTO: FOREIGN KEY constraint 'c.c_a_fkey' violated
### Expected Results:
40002!INSERT INTO: FOREIGN KEY constraint 'c.c_b_fkey' violated
## Comment 28158
Date: 2020-10-07 18:29:31 +0200
From: @PedroTadim
We noticed this, thanks for your report. We will fix it on a future release.
| Wrong constraint name in error message of constraint violation | https://api.github.com/repos/MonetDB/MonetDB/issues/6982/comments | 3 | 2020-11-30T17:02:32Z | 2024-06-27T13:10:33Z | https://github.com/MonetDB/MonetDB/issues/6982 | 753,646,782 | 6,982 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-10-02 11:37:17 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes, @PedroTadim
Last updated: 2020-11-24 11:37:22 +0100
## Comment 28145
Date: 2020-10-02 11:37:17 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36
Build Identifier:
Before Oct2020 it was possible to prepare and execute a DDL statement:
sql>PREPARE create table t as select 3;
execute prepared statement using: EXEC 5(...)
+------+--------+-------+--------+-------+--------+
| type | digits | scale | schema | table | column |
+======+========+=======+========+=======+========+
+------+--------+-------+--------+-------+--------+
0 tuples
sql>EXEC 5();
operation successful
In Oct2020, this results in:
sql>PREPARE create table t as select 3;
execute prepared statement using: EXEC 0(...)
+------+--------+-------+--------+-------+--------+
| type | digits | scale | schema | table | column |
+======+========+=======+========+=======+========+
+------+--------+-------+--------+-------+--------+
0 tuples
sql>EXEC 0();
EXEC: PREPARED Statement missing '0'
The bug is either:
- prepare DDL no longer works correctly
- prepare DDL is no longer allowed, but no error is reported upon prepare
I hope it's the first.
Reproducible: Always
## Comment 28146
Date: 2020-10-02 12:46:37 +0200
From: @PedroTadim
Hello Roberto,
DDL inside prepared statements is something that we never took care actually, because it's something difficult to manage altogether. Currently, whenever a schema change is made, the query cache is cleaned (e.g. drop column statement). There were changes on the query cache on Oct2020 which caused this issue, but it won't be worth to fix for now.
However I'm planning soon to work on a feature branch where prepared statements will be recompiled whenever a schema change is made.
## Comment 28248
Date: 2020-11-03 08:59:20 +0100
From: @njnes
found a small improvement on this, ie don't clean the cache on prepare statements.
## Comment 28249
Date: 2020-11-03 09:00:31 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [dc247c82fba7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dc247c82fba7) 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=dc247c82fba7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=dc247c82fba7)
Changeset description:
fix bug #6981, ie don't clean the query cache on prepare statements
| Oct2020: PREPARE DDL statement silently fails | https://api.github.com/repos/MonetDB/MonetDB/issues/6981/comments | 0 | 2020-11-30T17:02:29Z | 2024-06-27T13:10:32Z | https://github.com/MonetDB/MonetDB/issues/6981 | 753,646,747 | 6,981 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-09-30 19:09:54 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2020-10-19 11:06:22 +0200
## Comment 28132
Date: 2020-09-30 19:09:54 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36
Build Identifier:
In monetdb5/modules/atoms/str.c, I believe this:
command("str", "STRepilogue", strEpilogue, false, "", args(1,1, arg("",void))),
was meant to be:
command("str", "epilogue", strEpilogue, false, "", args(1,1, arg("",void))),
Reproducible: Always
## Comment 28133
Date: 2020-10-01 09:11:20 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [7f972067dd97](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7f972067dd97) 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=7f972067dd97](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=7f972067dd97)
Changeset description:
Use MAL module naming convention for str module prelude and epilogue functions. This fixes bug #6980
| Oct2020: wrong mel definition for str.epilogue | https://api.github.com/repos/MonetDB/MonetDB/issues/6980/comments | 0 | 2020-11-30T17:02:26Z | 2024-06-27T13:10:31Z | https://github.com/MonetDB/MonetDB/issues/6980 | 753,646,698 | 6,980 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-09-30 18:37:30 +0200
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes, @PedroTadim
Last updated: 2020-10-19 11:06:20 +0200
## Comment 28131
Date: 2020-09-30 18:37:30 +0200
From: @skinkie
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4173.0 Safari/537.36
Build Identifier:
The documentation at https://www.monetdb.com/Documentation/SQLReference/FunctionsAndOperators/DateTimeFunctionsOperators states that adding an integer to a timestamp or a date should be possible (it was in the past, but I also recall that a .sql file should be added to the database in order to have some temporal functions. But at least the documentation would then be incomplete.
Reproducible: Always
### Steps to Reproduce:
1. date '2020-09-28' + (7 * 24 * 60 * 60)
### Actual Results:
SELECT: no such binary operator 'sql_add(date,int)'
MonetDB 5 server 11.40.0 (hg id: cf0a10c) (64-bit, 128-bit integers)
This is an unreleased version
Copyright (c) 1993 - July 2008 CWI
Copyright (c) August 2008 - 2020 MonetDB B.V., all rights reserved
Visit https://www.monetdb.org/ for further information
Found 62.8GiB available memory, 12 available cpu cores
Libraries:
libpcre: 8.44 2020-02-12
openssl: OpenSSL 1.1.1h 22 Sep 2020
libxml2: 2.9.10
Compiled by: skinkie@database (x86_64-pc-linux-gnu)
Compilation: /usr/bin/cc -Werror -Wall -Wextra -Werror-implicit-function-declaration -Wpointer-arith -Wundef -Wformat=2 -Wformat-overflow=1 -Wno-format-truncation -Wno-format-nonliteral -Wno-cast-function-type -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wno-missing-field-initializers -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -Wstack-protector -fstack-protector-all -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wduplicated-cond -Wduplicated-branches -Wrestrict -Wnested-externs -Wmissing-noreturn -Wuninitialized -Wno-char-subscripts -Wunreachable-code
Linking : /usr/bin/ld
## Comment 28135
Date: 2020-10-01 10:01:32 +0200
From: @PedroTadim
Hello Stefan,
During this Summer, we made a revision of the temporal types for a more strict SQL standard compliance. It is not specified there the addition/subtraction between temporal and numeric types. This is because it's unclear what the numeric value means to a temporal type, so we can't perform it. For this purpose, the interval types should be used instead: date '2020-09-28' + interval '7' day
The Oct2020 branch was not released yet, so we still have time to update the documentation.
## Comment 28136
Date: 2020-10-01 10:11:55 +0200
From: @skinkie
I would strongly pledge to keep this functionality as is, or allow sec_interval type to be cast to an integer in some way, which is also not possible. By removing this functionality any arithmetic to timestamps is killed.
postgres= select extract(epoch from now() - now());
date_part
-----------
0
sql>select extract(epoch from now() - now());
syntax error in: "select extract(epoch"
sql>select epoch(now() - now());
SELECT: no such unary operator 'epoch(sec_interval)'
sql>select epoch(now()) - epoch(now());
+------+
| %2 |
+======+
| 0 |
+------+
1 tuple
## Comment 28137
Date: 2020-10-01 10:15:14 +0200
From: @skinkie
To me more explicit:
date '2020-09-28' + interval '7' day
A user wants:
date '2020-09-28' + interval column_or_expression day
create table test(i integer, d date);
insert into test values (1, date '2020-09-28');
select d + interval i day from test;
syntax error in: "select d + interval i day"
select d + interval '1' day from test;
+------------+
| %1 |
+============+
| 2020-09-29 |
+------------+
1 tuple
## Comment 28139
Date: 2020-10-01 10:53:36 +0200
From: @PedroTadim
It's not about convenience, it's about what makes sense. Nothing is killed, it's just made correct.
We don't have the functionality to extract the 'epoch' from a timestamp, or interval. I just just checked on the standard, and it's not there, so PostgreSQL has it as an extension.
Intervals and integers are not compatible, so casting is not possible.
On your example, you should do:
create table test(i interval day, d date);
insert into test values (interval '1' day, date '2020-09-28');
select d + i from test;
I see PostgreSQL allows addition between dates and integers as an extension, but it disallows it with time and timestamps.
## Comment 28140
Date: 2020-10-01 11:12:15 +0200
From: @skinkie
(In reply to Pedro Ferreira from comment 4)
> It's not about convenience, it's about what makes sense. Nothing is killed,
> it's just made correct.
With respect to the SQL standard it might be "more correct", but it still lacks an previously acknowledged missing features. I am happy to use a user defined function, because this functionality is obviously available at the MAL layer.
> We don't have the functionality to extract the 'epoch' from a timestamp, or
> interval. I just just checked on the standard, and it's not there, so
> PostgreSQL has it as an extension.
>
> Intervals and integers are not compatible, so casting is not possible.
>
> On your example, you should do:
>
> create table test(i interval day, d date);
> insert into test values (interval '1' day, date '2020-09-28');
> select d + i from test;
>
> I see PostgreSQL allows addition between dates and integers as an extension,
> but it disallows it with time and timestamps.
The above would also fail. I receive a timestamp, and I receive an offset. This would be loaded into the database from a CSV file. I am not able to go from an integer to an interval because the inverse of EXTRACT is not defined. I guess this is the primary problem. But the other way around I can also make an argument I am not able to use any integer functions such as ROUND on an interval while this makes sense too.
## Comment 28141
Date: 2020-10-01 11:39:16 +0200
From: @skinkie
I guess the CSV problem could be handled by multiplication.
select d + i * interval '1' day from test;
But I am not too lucky:
sql>select interval '1' day / interval '1' day from test;
SELECT: no such binary operator 'sql_div(sec_interval,day_interval)'
## Comment 28144
Date: 2020-10-02 11:20:53 +0200
From: @PedroTadim
Dividing intervals is not possible. However an user can do: integer * interval to obtain an interval. More specifically: number * interval '1' second/month is an easy conversion from numbers into intervals. At the same time: extract(second from second interval) and extract(month from interval month) are easy conversions from intervals to numbers.
## Comment 28147
Date: 2020-10-02 13:09:00 +0200
From: @njnes
sql>select interval '1' day / 5 from test;
+-----------+
| %1 |
+===========+
| 17280.000 |
+-----------+
1 tuple
ie. we support division, but only by integers not by interval.
I'm marking this as a wontfix. We have stricter semantics, but I think with the shown solutions it still supports your requirements.
## Comment 28148
Date: 2020-10-02 14:43:33 +0200
From: @skinkie
Niels, Pedro, the suggestion is basically not working, it would only work up to 59 seconds. So in order to work with that extracting seconds + extracting minutes * 60 + extracting hours * 3600 + etc.
select extract(second from interval '3600' second);
+------+
| %2 |
+======+
| 0 |
+------+
1 tuple
select extract(hour from interval '3600' second);
+------+
| %2 |
+======+
| 1 |
+------+
1 tuple
So no, they are not easy conversions. And this behavior is like PostgreSQL so no complaints at this point.
postgres= select extract(epoch from interval '3600' second);
date_part
-----------
3600
(1 row)
So I guess the featurerequest would be: could extract(epoch be implemented?
## Comment 28149
Date: 2020-10-02 18:22:04 +0200
From: @PedroTadim
We can add the epoch function easily. However we can't add it for month intervals, because that cannot be computed. This is because a month has not a consistent number of days to compute an epoch number.
## Comment 28151
Date: 2020-10-05 10:07:41 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [22f0b6b230c9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=22f0b6b230c9) 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=22f0b6b230c9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=22f0b6b230c9)
Changeset description:
Added 'epoch' extract function to datetime related types. This allows to convert an interval value into an integer as a regular cast is not possible as mentioned in bug #6979
| timestamp add integer | https://api.github.com/repos/MonetDB/MonetDB/issues/6979/comments | 0 | 2020-11-30T17:02:22Z | 2024-06-27T13:10:30Z | https://github.com/MonetDB/MonetDB/issues/6979 | 753,646,642 | 6,979 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-09-30 17:39:23 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @PedroTadim
Last updated: 2020-10-19 11:06:20 +0200
## Comment 28128
Date: 2020-09-30 17:39:23 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36
Build Identifier:
I successfully registered with CMake a sql script for my module to be executed upon database creation.
The script, here simplified, creates a schema, a user, and a table in that schema:
CREATE USER "spinque" WITH UNENCRYPTED PASSWORD xxxx NAME 'Test' SCHEMA "sys";
CREATE SCHEMA "spinque" AUTHORIZATION "spinque";
ALTER USER "spinque" SET SCHEMA "spinque";
SET SCHEMA "spinque";
CREATE TABLE info (attribute string, value string);
When I create the database ad I login as user "spinque", I am indeed in the schema "spinque" and, as expected, a table "spinque.info" exists:
created database in maintenance mode: x
taken database out of maintenance mode: x
password:
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.39.0 (hg id: 26c69af56ba), 'mapi:monetdb://tardis.spinque.com:50000/x'
FOLLOW US on https://twitter.com/MonetDB or https://github.com/MonetDB/MonetDB
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>select * from sys.var();
+--------+------------------+--------------+--------------+
| schema | name | type | value |
+========+==================+==============+==============+
| sys | debug | int | 0 |
| sys | current_schema | varchar | spinque |
| sys | current_user | varchar | spinque |
| sys | current_role | varchar | spinque |
| sys | optimizer | varchar | default_pipe |
| sys | current_timezone | sec_interval | 7200000 |
| sys | last_id | bigint | 0 |
| sys | rowcnt | bigint | 37 |
+--------+------------------+--------------+--------------+
8 tuples
sql>select "schema", "table", "column" from sys.storage('spinque','info');
+---------+-------+-----------+
| schema | table | column |
+=========+=======+===========+
| spinque | info | attribute |
| spinque | info | value |
+---------+-------+-----------+
2 tuples
However, the command \d does not show any table:
sql>\d
sql>
Reproducible: Always
$ MonetDB/bin/mserver5 --version
MonetDB 5 server 11.39.0 (hg id: 26c69af56ba) (64-bit, 128-bit integers)
This is an unreleased version
Copyright (c) 1993 - July 2008 CWI
Copyright (c) August 2008 - 2020 MonetDB B.V., all rights reserved
Visit https://www.monetdb.org/ for further information
Found 15.5GiB available memory, 4 available cpu cores
Libraries:
libpcre: 8.44 2020-02-12
openssl: OpenSSL 1.1.1g FIPS 21 Apr 2020
libxml2: 2.9.10
Compiled by: roberto@tardis.spinque.com (x86_64-pc-linux-gnu)
Compilation: /usr/bin/cc -Werror -Wall -Wextra -Werror-implicit-function-declaration -Wpointer-arith -Wundef -Wformat=2 -Wformat-overflow=1 -Wno-format-truncation -Wno-format-nonliteral -Wno-cast-function-type -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wno-missing-field-initializers -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -Wstack-protector -fstack-protector-all -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wduplicated-cond -Wduplicated-branches -Wrestrict -Wnested-externs -Wmissing-noreturn -Wuninitialized -Wno-char-subscripts -Wunreachable-code
Linking : /usr/bin/ld
## Comment 28129
Date: 2020-09-30 18:25:55 +0200
From: @PedroTadim
Hello Roberto, I just did your commands, but my description includes the 'spinque'.'info' table. Are you sure you didn't change the schema before calling \d, because this commands lists tables from the session's current schema.
## Comment 28130
Date: 2020-09-30 18:32:05 +0200
From: @swingbit
This shows that I was in the right schema:
sql>select * from sys.var();
+--------+------------------+--------------+--------------+
| schema | name | type | value |
+========+==================+==============+==============+
| sys | debug | int | 0 |
| sys | current_schema | varchar | spinque |
| sys | current_user | varchar | spinque |
| sys | current_role | varchar | spinque |
| sys | optimizer | varchar | default_pipe |
| sys | current_timezone | sec_interval | 7200000 |
| sys | last_id | bigint | 0 |
| sys | rowcnt | bigint | 37 |
+--------+------------------+--------------+--------------+
8 tuples
But I also tried to explicitly set the schema, same result.
The weird thing is that I was not able to reproduce this unless the script was executed automatically at database creation time.
I can't pinpoint why this happens, but the following sequence should be impossible, and yet I get it:
sql>set schema spinque;
operation successful
sql>select * from sys.var() where name='current_schema';
+--------+----------------+---------+---------+
| schema | name | type | value |
+========+================+=========+=========+
| sys | current_schema | varchar | spinque |
+--------+----------------+---------+---------+
1 tuple
sql>select "schema", "table", "column" from sys.storage('spinque','info');
+---------+-------+-----------+
| schema | table | column |
+=========+=======+===========+
| spinque | info | attribute |
| spinque | info | value |
+---------+-------+-----------+
2 tuples
sql>\d
## Comment 28134
Date: 2020-10-01 09:42:42 +0200
From: @PedroTadim
Hello Roberto,
After some debugging I finally found the issue. When a table is created during the startup scripts, it gets labeled as a 'system' table. This is because tables created during this phase, are generally of high importance. Meanwhile the '\d' command from mclient only lists non system tables. I think the purpose of this command is to list user created tables after the database is generated.
## Comment 28138
Date: 2020-10-01 10:48:54 +0200
From: @swingbit
Hi Pedro, thanks for looking into this.
I understand. Indeed, \dS shows the tables I was looking for.
Then this is not a bug, just a change of behaviour.
I don't know all the implications of having a table as "system table", so I can't really say whether this change of behaviour may impact existing applications (I haven't seen any related issue so far). No knowing can be confusing though, I would suggest to mention it in the release notes.
| Oct2020: \d shows empty result in schema created by include sql script | https://api.github.com/repos/MonetDB/MonetDB/issues/6978/comments | 0 | 2020-11-30T17:02:18Z | 2024-06-27T13:10:29Z | https://github.com/MonetDB/MonetDB/issues/6978 | 753,646,596 | 6,978 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-09-29 07:38:31 +0200
From: @mlkersten
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2020-09-29 07:45:29 +0200
## Comment 28124
Date: 2020-09-29 07:38:31 +0200
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:80.0) Gecko/20100101 Firefox/80.0
Build Identifier:
The command
DEBUG SELECT....
should initiate an interaction with the MAL debugger.
It seems some changes has invalidated this scenario.
Reproducible: Always
| DEBUG sql statement broken again | https://api.github.com/repos/MonetDB/MonetDB/issues/6977/comments | 0 | 2020-11-30T17:02:15Z | 2024-06-28T13:06:13Z | https://github.com/MonetDB/MonetDB/issues/6977 | 753,646,552 | 6,977 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-09-24 13:46:56 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @kutsurak, @njnes
Last updated: 2020-10-19 16:51:19 +0200
## Comment 28117
Date: 2020-09-24 13:46:56 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36
Build Identifier:
When installing Oct2020 from sources, a default emptyd bfarm is created in <INSTALL_PREFIX>/var/monetdb5/dbfarm.
This contains a .merovingian_properties that lists:
logfile=<INSTALL_PREFIX>/var/log/monetdb/merovingian.log
pidfile=<INSTALL_PREFIX>/var/run/monetdb/merovingian.pid
However, subfolders /var/log and /var/run are nor created, so monetdbd refuses to start it.
Reproducible: Always
MonetDB 5 server 11.39.0 (hg id: b7c3c217bc3) (64-bit, 128-bit integers)
This is an unreleased version
Copyright (c) 1993 - July 2008 CWI
Copyright (c) August 2008 - 2020 MonetDB B.V., all rights reserved
Visit https://www.monetdb.org/ for further information
Found 15.5GiB available memory, 4 available cpu cores
Libraries:
libpcre: 8.44 2020-02-12
openssl: OpenSSL 1.1.1g FIPS 21 Apr 2020
libxml2: 2.9.10
Compiled by: roberto@tardis.spinque.com (x86_64-pc-linux-gnu)
Compilation: /usr/bin/cc -Werror -Wall -Wextra -Werror-implicit-function-declaration -Wpointer-arith -Wundef -Wformat=2 -Wformat-overflow=1 -Wno-format-truncation -Wno-format-nonliteral -Wno-cast-function-type -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wno-missing-field-initializers -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -Wstack-protector -fstack-protector-all -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wduplicated-cond -Wduplicated-branches -Wrestrict -Wnested-externs -Wno-char-subscripts -Wunreachable-code
Linking : /usr/bin/ld
## Comment 28120
Date: 2020-09-25 10:50:06 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [2c9a7af2ea88](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2c9a7af2ea88) 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=2c9a7af2ea88](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=2c9a7af2ea88)
Changeset description:
add missing directories (fixing bug #6976)
## Comment 28121
Date: 2020-09-25 10:50:57 +0200
From: @njnes
cmake now also creates those directories (on cmake --target install)
## Comment 28201
Date: 2020-10-16 18:22:51 +0200
From: @swingbit
Niels, I just noticed the following:
1. cmake (configure,build,install) with -DCMAKE_INSTALL_PREFIX=<A>
2. remove <A> completely
3. cmake (configure,build,install) with -DCMAKE_INSTALL_PREFIX=<B> (reusing the same build folder)
The second install installs everything in <B>, except the /var/log and /var/run folders, which are installed in <A> again.
## Comment 28204
Date: 2020-10-19 09:38:45 +0200
From: @sjoerdmullender
If you do this, are there any files that were installed in <B> that contain paths that refer to <A>?
## Comment 28205
Date: 2020-10-19 09:47:31 +0200
From: @sjoerdmullender
(In reply to Sjoerd Mullender from comment 4)
> If you do this, are there any files that were installed in <B> that contain
> paths that refer to <A>?
Look for instance at the file include/monetdb/monetdb_config.h after installation. There are a bunch of path names encoded in there.
## Comment 28206
Date: 2020-10-19 12:10:45 +0200
From: @swingbit
Indeed.
With
<A> = <path>/gcc_generic_0
<B> = <path>/gcc_generic_1
After configuring and compiling <B>, I still find <A> (gcc_generic_0) paths in build:
$ grep -rF 'gcc_generic_0' *
CMakeCache.txt:LOGDIR:PATH=<path>/gcc_generic_0/var/log/monetdb
CMakeCache.txt:RUNDIR:PATH=<path>/gcc_generic_0/var/run/monetdb
monetdb_config.h:define LOGDIR "<path>/gcc_generic_0/var/log/monetdb"
monetdb_config.h:define RUNDIR "<path>/gcc_generic_0/var/run/monetdb"
tools/merovingian/daemon/monetdbd.conf:d <path>/gcc_generic_0/var/run/monetdb 0775 monetdb monetdb -
tools/merovingian/daemon/config/cmake_install.cmake: "<path>/gcc_generic_0/var/log/monetdb/")
tools/merovingian/daemon/config/cmake_install.cmake:file(INSTALL DESTINATION "<path>/gcc_generic_0/var/log/monetdb" TYPE DIRECTORY FILES "")
tools/merovingian/daemon/config/cmake_install.cmake: "<path>/gcc_generic_0/var/run/monetdb/")
tools/merovingian/daemon/config/cmake_install.cmake:file(INSTALL DESTINATION "<path>/gcc_generic_0/var/run/monetdb" TYPE DIRECTORY FILES "")
tools/merovingian/daemon/config/monetdbd:<path>/gcc_generic_0/var/log/monetdb/merovingian.log {
tools/merovingian/daemon/config/monetdbd: [ -s <path>/gcc_generic_0/var/run/monetdb/merovingian.pid ] && kill -HUP $(cat <path>/gcc_generic_0/var/run/monetdb/merovingian.pid)
tools/merovingian/daemon/config/monetdbd.service:PIDFile=<path>/gcc_generic_0/var/run/monetdb/merovingian.pid
tools/merovingian/daemon/config/.merovingian_properties:logfile=<path>/gcc_generic_0/var/log/monetdb/merovingian.log
tools/merovingian/daemon/config/.merovingian_properties:pidfile=<path>/gcc_generic_0/var/run/monetdb/merovingian.pid
## Comment 28207
Date: 2020-10-19 12:30:26 +0200
From: @sjoerdmullender
These paths are relatively easy to fix, but I fear that you'll also find the old paths baked into binaries. Especially in monetdbd and mserver5. The one in monetdbd might be the worst since it is used to find the mserver5 binary.
## Comment 28208
Date: 2020-10-19 12:48:10 +0200
From: @swingbit
I'm not sure if you only mean that this is tricky to fix, or that reusing a build folder with a different prefix should be disallowed.
## Comment 28209
Date: 2020-10-19 12:56:49 +0200
From: @sjoerdmullender
I mean those paths are compiled in, and therefore you cannot expect that just installing everything somewhere else will magically change those paths.
So indeed, I would say, this is not supported.
Although installing in a different location should be possible (it is when you use DESTDIR environment variable--this is prepended to the path at install time). This can be useful if you're installing in a shared file system. Therefore there is still merit in your report.
## Comment 28210
Date: 2020-10-19 13:05:49 +0200
From: @swingbit
Now I'm not sure if we mean the same thing.
I didn't expect to change the paths already encoded in binaries of an existing deployment.
I have used a <build> folder to configure and install, with -DCMAKE_INSTALL_PREFIX=<A>. So I have a deployment in <A>. This won't change anymore.
Then I go to the same <build folder>, and do:
cmake -DCMAKE_INSTALL_PREFIX=<B> <src>
cmake --build .
cmake --build . --target install
What I would expect is that the first cmake command above reconfigures the <build> folder, so that the 3rd command above installs the new build into <B>, completely. Instead, references to <A> are still there, so that part of the build is still installed in <A>.
## Comment 28211
Date: 2020-10-19 14:35:00 +0200
From: @sjoerdmullender
This precise sequence of events was indeed not clear to me.
## Comment 28212
Date: 2020-10-19 16:51:19 +0200
From: @kutsurak
Hi Roberto and Sjoerd,
I followed the steps you specified where
A=/home/kutsurak/work/src/monet/worktrees/Oct2020/build/install
and
B=/tmp/monet/install/bin
and I got the following in my monetdb_config.h
define BINDIR "/tmp/monet/install/bin"
define LIBDIR "/tmp/monet/install/lib"
define DATADIR "/tmp/monet/install/share"
define DATA_DIR "/tmp/monet/install/share"
define LOCALSTATEDIR "/tmp/monet/install/var"
/* undef QXLOCALSTATEDIR */
// define MONETDB_PREFIX
define DATAROOTDIR "/tmp/monet/install/share"
define BIN_DIR "/tmp/monet/install/bin"
define INCLUDEDIR "/tmp/monet/install/include"
define INFODIR "/tmp/monet/install/share/info"
define LIB_DIR "/tmp/monet/install/lib"
define LIBEXECDIR "/tmp/monet/install/libexec"
define LOCALSTATE_DIR "/tmp/monet/install/var"
/* undef MANDIR */
define SYSCONFDIR "/tmp/monet/install/etc"
define LOGDIR "/home/kutsurak/work/src/monet/worktrees/Oct2020/build/install/var/log/monetdb"
define PKGCONFIGDIR "/tmp/monet/install/lib/pkgconfig"
define RUNDIR "/home/kutsurak/work/src/monet/worktrees/Oct2020/build/install/var/run/monetdb"
It seems that the variable cmake CMAKE_INSTALL_FULL_LOCALSTATEDIR is not updated the second time you run cmake. I haven't had time to dig into it yet.
Until we find a proper solution to this, a workaround would be to have different build directories for A and B.
| Oct2020: default dbfarm cannot be started | https://api.github.com/repos/MonetDB/MonetDB/issues/6976/comments | 0 | 2020-11-30T17:02:12Z | 2024-06-27T13:10:27Z | https://github.com/MonetDB/MonetDB/issues/6976 | 753,646,511 | 6,976 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-09-24 09:21:02 +0200
From: @mlkersten
To: MonetDB5 devs <<bugs-monetdb5>>
Version: -- development
Last updated: 2020-09-24 09:21:02 +0200
## Comment 28116
Date: 2020-09-24 09:21:02 +0200
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:80.0) Gecko/20100101 Firefox/80.0
Build Identifier:
The mal_listing() function calls MT_thread_getalgorithm, which gives the global algorithm string. However, this string should be captured in the interpreter and associated with the MAL instruction.
Reproducible: Always
| Algorithm information should be saved in instruction | https://api.github.com/repos/MonetDB/MonetDB/issues/6975/comments | 0 | 2020-11-30T17:02:10Z | 2024-06-28T13:06:13Z | https://github.com/MonetDB/MonetDB/issues/6975 | 753,646,474 | 6,975 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-09-23 14:11:03 +0200
From: @bartscheers
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2020-10-19 11:06:20 +0200
## Comment 28108
Date: 2020-09-23 14:11:03 +0200
From: @bartscheers
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0
Build Identifier:
After cmake build/install of Oct2020 branch (hg id: 95dd5f49b9cd), starting daemon and creating db instance, I cannot load the simplest of FITS files anymore, while it used to work in Jun202-SP1.
Reproducible: Always
### Steps to Reproduce:
1. cmake build/install Oct2020 branch
2. create database instance
3. In mclient: call sys.fitsattach('/abs/path/to/table1.fits')
### Actual Results:
write error on stream
monetdb status, shows crashed database
### Expected Results:
Attaching the file, after which the sys.fitsload() function can be called.
I'll append an empty and non-empty (2 records) basic FITS file
## Comment 28109
Date: 2020-09-23 14:14:35 +0200
From: @bartscheers
Created attachment 695
Empty binary FITS file (only header, empty source list)
This file was generated by a 3-line Python script, which can be shared if you want.
> Attached file: [empty_table1.fits](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6974_empty_table1.fits_695) (application/octet-stream, 5760 bytes)
> Description: Empty binary FITS file (only header, empty source list)
## Comment 28110
Date: 2020-09-23 14:15:21 +0200
From: @bartscheers
Created attachment 696
Non-empty binary FITS file (header, two records of three columns)
> Attached file: [table1.fits](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6974_table1.fits_696) (application/octet-stream, 8640 bytes)
> Description: Non-empty binary FITS file (header, two records of three columns)
## Comment 28122
Date: 2020-09-25 11:51:23 +0200
From: @njnes
fixed by this changeset https://dev.monetdb.org/hg/MonetDB/rev/9d8c649c1c22
ie keep local function hidden in the stream library
| Oct2020-branch cannot attach and load FITS files | https://api.github.com/repos/MonetDB/MonetDB/issues/6974/comments | 0 | 2020-11-30T17:02:07Z | 2024-06-27T13:10:25Z | https://github.com/MonetDB/MonetDB/issues/6974 | 753,646,428 | 6,974 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-09-22 19:12:58 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
CC: @njnes, @PedroTadim, @yzchang
Last updated: 2020-09-25 10:36:15 +0200
## Comment 28103
Date: 2020-09-22 19:12:58 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36
Build Identifier:
Example (notice the wrong int parameter requested):
sql>select wlc.clock();
Error in optimizer multiplex: TypeException:user.s28_0[10]:'wlc.getclock' undefined in: wlc.getclock(X_45:int);
From what I tested it seems to happen with MAL functions defined in a non-sys schema and no parameters - but I could be wrong.
Reproducible: Always
## Comment 28104
Date: 2020-09-22 21:03:04 +0200
From: @PedroTadim
This is a duplicate of bug #6939. It had to do with MAL code generation of unsafe SQL functions with no parameters. It's now fixed for the next feature release in the next few weeks.
## Comment 28105
Date: 2020-09-23 10:39:32 +0200
From: @swingbit
I see the fix, but why is it only fixed in Oct2020? Jun2020 is still the current release.
## Comment 28106
Date: 2020-09-23 12:58:47 +0200
From: @PedroTadim
We are going to release Oct2020 very soon, it was not worth it to make a Jun2020-SP2.
## Comment 28107
Date: 2020-09-23 13:35:27 +0200
From: @swingbit
I'm sorry to hear that.
Not all users rely on binary releases.
We cannot possibly jump on Oct2020, given that even Jun2020 still isn't stable enough for us, and Jun2020 branch isn't going to be fixed. Not ideal.
Have development policies changes since this, which says bug fixes go to the stable branch?
https://www.monetdb.org/blog/monetdb-releases-and-development
## Comment 28111
Date: 2020-09-23 15:09:43 +0200
From: @PedroTadim
Bug fixes should go to stable branch, but ABI changes do not unfortunately.
This Summer we ran a fuzzer called SQLancer which found many bugs all around MonetDB. With many fixes including ABI changes, it was difficult to keep them on Jun2020, so that's why we are making the next feature release earlier than usual.
I keep trying to convince the seniors we need ABI changes on the stable for bug fixes.
However I'm going to backport bug #6939 fix into Jun2020.
## Comment 28113
Date: 2020-09-23 15:27:12 +0200
From: @PedroTadim
Just did it.
## Comment 28114
Date: 2020-09-23 15:43:21 +0200
From: @yzchang
Just to expand on the topic of "development policies":
- The policies are unchanged. Hence, as long as Oct2020 is not released, Jun2020 is still supported.
- We don't plan to release a Jun202-SP2 for reasons explained by Pedro. And for that same reason, bug fixes go first into the Oct2020 branch.
- By request, we back-port fixes to the Jun2020 branch.
## Comment 28118
Date: 2020-09-24 19:05:29 +0200
From: @swingbit
Thanks Pedro and Jennie, for clarifying and for the back-port.
## Comment 28119
Date: 2020-09-25 10:36:15 +0200
From: @njnes
fix was backported
| Some MAL function are mapped incorrectly | https://api.github.com/repos/MonetDB/MonetDB/issues/6973/comments | 0 | 2020-11-30T17:02:03Z | 2024-06-27T13:10:24Z | https://github.com/MonetDB/MonetDB/issues/6973 | 753,646,373 | 6,973 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-09-21 15:43:30 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.35.19 (Nov2019-SP3)
CC: @njnes
Last updated: 2020-09-21 22:30:32 +0200
## Comment 28096
Date: 2020-09-21 15:43:30 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36
Build Identifier:
The following crashes on Nov2019 (11.35.20). It does not crash on Jun2020.
I am aware that Nov2019 is end-of-life, but unfortunately we are not quite ready to switch to Jun2020.
I would really appreciate some help, ideally with a pointer to a changeset that I can back-port from Jun2020.
start transaction;
create table t(i int, s string);
create view v as
select i,s
from (select *
from t,
(VALUES ('ANY')) as y(l)
) as x
where x.l='ANY';
explain select * from sys.storage((select 'sys',s from v));
Notes:
- This looks like a silly query but it is the minimal repeatable test distilled from a sensible generated query
- Any table-returning function makes this crash
- removing the (useless) where clause make it work
- flattening the subselect makes it work
Reproducible: Always
## Comment 28097
Date: 2020-09-21 16:10:11 +0200
From: @swingbit
UPDATE: I found an application--level workaround for this, so although a fix would still be nice, it is no longer urgent for me.
## Comment 28098
Date: 2020-09-21 20:16:52 +0200
From: @njnes
https://dev.monetdb.org/hg/MonetDB/rev/e7e8b6c61a3b?revcount=20 is the important bit of the fixes. But I'm sure it depends on more, ie upgrading is highly recommended (also oct2020 is coming soon).
## Comment 28102
Date: 2020-09-21 22:30:32 +0200
From: @swingbit
Thank you!
| Crash with subselect involving explicit table that is given as input to table-returning function | https://api.github.com/repos/MonetDB/MonetDB/issues/6972/comments | 0 | 2020-11-30T17:01:59Z | 2024-06-27T13:10:23Z | https://github.com/MonetDB/MonetDB/issues/6972 | 753,646,327 | 6,972 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-09-18 11:09:04 +0200
From: @PedroTadim
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
Last updated: 2020-11-24 11:37:24 +0100
## Comment 28094
Date: 2020-09-18 11:09:04 +0200
From: @PedroTadim
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36
Build Identifier:
Using a remote table under a table returning function fails.
Reproducible: Always
### Steps to Reproduce:
1. Create a table udf.
2. Create a remote table.
3. Do: select * from table_udf((select * from remote_table));
### Actual Results:
select * from table_udf((select * from remote_table));
(mapi:monetdb://user@host/dbfarm) Table: missing ‘)'
### Expected Results:
The desired output from the table udf.
I already have a fix. I'm making the bug report
## Comment 28095
Date: 2020-09-18 11:20:32 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [7f2af1be69a6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7f2af1be69a6) 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=7f2af1be69a6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=7f2af1be69a6)
Changeset description:
Added test and fix for bug #6971, ie add table udf support at rel_read
| Parsing table returning function on remote server fails | https://api.github.com/repos/MonetDB/MonetDB/issues/6971/comments | 0 | 2020-11-30T17:01:56Z | 2024-06-27T13:10:21Z | https://github.com/MonetDB/MonetDB/issues/6971 | 753,646,288 | 6,971 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-09-15 08:16:51 +0200
From: william.jing
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
Last updated: 2020-11-25 15:54:47 +0100
## Comment 28079
Date: 2020-09-15 08:16:51 +0200
From: william.jing
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36
Build Identifier:
hi, in our monetdb , we always use week(date'2012-12-30') to get ISO8601 week number, but we don't have a function that could get the US week number.
Reproducible: Always
## Comment 28081
Date: 2020-09-15 09:08:32 +0200
From: @sjoerdmullender
Could you use
(dayofyear(date'2012-12-30') - 1) / 7 + 1
?
You could stick this into a function:
create function usweek(dt date) returns integer begin return (dayofyear(dt) - 1) / 7 + 1; end
## Comment 28083
Date: 2020-09-15 09:48:41 +0200
From: william.jing
i get us week :
select sql_add(date'2016-01-23', 3600*24*(-dayofweek(date'2016-01-23')%7));---get the day of Sunday in the current period (first day is Sunday)
select sql_add(date'2016-01-23', 3600*24*(-dayofweek(date'2016-01-23')%7+6));---get the day of Saturday in the current period (first day is Sunday)
sql_add(date'2016-01-23', 3600*24*(-dayofweek(date'2016-01-23')%7+6)))+6 --- need to add correction factor
(dayofyear(sql_add(date'2016-01-23', 3600*24*(-dayofweek(date'2016-01-23')%7+6)))+6)/7 ---get the us week number
ref:
https://www.sqlservercentral.com/articles/a-simple-formula-to-calculate-the-iso-week-number
https://en.wikipedia.org/wiki/Week
https://www.timeanddate.com/calendar/custom.html?year=2012&country=1&wno=1&holm=1&df=1
## Comment 28084
Date: 2020-09-15 09:51:24 +0200
From: william.jing
i use other functions to calculate the us week number, but the performance is not very well. for example, 3.4M rows, if i use week function to get iso week number, it will take 500ms, but when i calculate us week number, it will take about 2s.
## Comment 28291
Date: 2020-11-25 15:54:14 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [9af4bc30e811](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9af4bc30e811) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=9af4bc30e811](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=9af4bc30e811)
Changeset description:
Implemented function usweekofyear(date) to calculate the week number US style.
This fixes bug #6970.
## Comment 28292
Date: 2020-11-25 15:54:47 +0100
From: @sjoerdmullender
This will be in the next feature release.
| support US week number. | https://api.github.com/repos/MonetDB/MonetDB/issues/6970/comments | 0 | 2020-11-30T17:01:52Z | 2024-06-27T13:10:20Z | https://github.com/MonetDB/MonetDB/issues/6970 | 753,646,239 | 6,970 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-09-15 08:06:23 +0200
From: william.jing
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
CC: @PedroTadim
Duplicates: #6968
Last updated: 2020-09-16 12:43:57 +0200
## Comment 28078
Date: 2020-09-15 08:06:23 +0200
From: william.jing
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36
Build Identifier:
hi,in our project, we need to estimate null == null , if we use or condition, the performance is not well. so we want monetdb support this function. thanks advance.
ref:
https://docs.snowflake.com/en/sql-reference/functions/equal_null.html
Reproducible: Always
## Comment 28091
Date: 2020-09-16 12:43:57 +0200
From: @PedroTadim
*** This bug has been marked as a duplicate of bug #6968 ***
| support EQUAL_NULL Conditional Expression Function | https://api.github.com/repos/MonetDB/MonetDB/issues/6969/comments | 0 | 2020-11-30T17:01:49Z | 2024-06-28T13:06:12Z | https://github.com/MonetDB/MonetDB/issues/6969 | 753,646,195 | 6,969 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-09-15 06:21:36 +0200
From: justin.jin
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
CC: martin.van.dinther, @PedroTadim, william.jing, @yzchang
Last updated: 2020-10-29 18:28:49 +0100
## Comment 28077
Date: 2020-09-15 06:21:36 +0200
From: justin.jin
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36
Build Identifier:
I want to make a null equals to another null.
Currently, the behavior is same to SET ANSI_NULLS ON.
There exists a workaround that using "a.xxx = b.xxx OR (a.xxx IS NULL and b.xxx IS NULL)"
The only problem is the bad performance.
I tried to search some solutions in monetdb documents, but no results.
Does anyone can give me some advices?
Reproducible: Always
## Comment 28080
Date: 2020-09-15 09:08:11 +0200
From: @PedroTadim
Recently we added the 'semantics' flag on the SQL layer, for NULL = NULL comparisons at some places (e.g. a.xxx is NULL). We can add an optimizer where it takes an expression "a.xxx = b.xxx OR (a.xxx IS NULL and b.xxx IS NULL)" and re-write it to "a.xxx = b.xxx" with 'semantics' flag on. However currently I have been very busy with lots of fixes regarding performance, so expect to have low priority.
Meanwhile some of these queries can be re-written with outer joins. Are you sure this optimization is needed?
## Comment 28082
Date: 2020-09-15 09:32:10 +0200
From: justin.jin
We want to treat NULL as a normal value, so the expected results contains full
field from two joined tables.
Using outer join only adding not matched rows from one side (includes NULL), it doesn't meet our expectation.
Replacing "OR" with "UNION ALL" can improving some performance.
But the query time is still too long when 4 or more dimensions and 10+ measures involved(and every one maybe joined several times).
I'm glad to hear the fixing is on the way.
Can we increase the priority since it has impacted the performance?
(In reply to Pedro Ferreira from comment 1)
> Recently we added the 'semantics' flag on the SQL layer, for NULL = NULL
> comparisons at some places (e.g. a.xxx is NULL). We can add an optimizer
> where it takes an expression "a.xxx = b.xxx OR (a.xxx IS NULL and b.xxx IS
> NULL)" and re-write it to "a.xxx = b.xxx" with 'semantics' flag on. However
> currently I have been very busy with lots of fixes regarding performance, so
> expect to have low priority.
>
> Meanwhile some of these queries can be re-written with outer joins. Are you
> sure this optimization is needed?
We want to treat NULL as a normal value, so the expected results contains full
field from two joined tables.
Using outer join only adding not matched rows from one side (includes NULL), it doesn't meet our expectation.
Replacing "OR" with "UNION ALL" can improving some performance.
But the query time is still too long when 4 or more dimensions and 10+ measures involved(and every one maybe joined several times).
I'm glad to hear the fixing is on the way.
Can we increase the priority since it has impacted the performance?
## Comment 28092
Date: 2020-09-16 12:43:57 +0200
From: @PedroTadim
*** Bug #6969 has been marked as a duplicate of this bug. ***
## Comment 28240
Date: 2020-10-29 18:28:49 +0100
From: Martin van Dinther <<martin.van.dinther>>
In SQL NULL is never equal to another NULL by definition.
What you need to do is replace the NULLs in your data column(s) with a non-used domain value, for instance 0 for ints. Simply do:
UPDATE a SET xxx = 0 WHERE xxx IS NULL;
UPDATE b SET xxx = 0 WHERE xxx IS NULL;
Now you can leave out the
OR (a.xxx IS NULL and b.xxx IS NULL)
part from you join/where condition.
If for some reason your are not allowed to update those a.xxx and b.xxx columns are need to retain the NULL info, extend both tables with an copy of those xxx columns which you can update with the values of xxx without nulls.
ALTER TABLE a ADD COLUMN xxx2 int;
UPDATE a SET xxx2 = coalesce(xxx, 0);
ALTER TABLE b ADD COLUMN xxx2 int;
UPDATE b SET xxx2 = coalesce(xxx, 0);
Use those copies to do your join condition on: a.xxx2 = b.xxx2
This will run fast and do what you need in the proper SQL way.
Let me know if we can close this non standard SQL request.
| Support SET ANSI_NULLS ON | OFF | https://api.github.com/repos/MonetDB/MonetDB/issues/6968/comments | 0 | 2020-11-30T17:01:45Z | 2024-06-28T10:10:24Z | https://github.com/MonetDB/MonetDB/issues/6968 | 753,646,156 | 6,968 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-09-14 10:54:55 +0200
From: @drstmane
To: Documentation maintainers <<bugs-docs>>
Version: unspecified
CC: martin.van.dinther
Last updated: 2020-10-08 19:26:12 +0200
## Comment 28075
Date: 2020-09-14 10:54:55 +0200
From: @drstmane
While the default (system-/admin-)username and password for a newly generated database in MonetDB are well known in the experienced MonetDB community,
there seems to be no explicit documentation of them for novice users on neither the MonetDB website nor in any of its other documentation (e.g., manpages, etc.).
This information is at most "nice hidden" in the online tutorial; cf.,
https://www.monetdb.org/index.php/Documentation/Tutorial/GettingStarted/CreateADatabase
https://www.monetdb.org/index.php/Documentation/Tutorial/GettingStarted/CreateUsersAndSchema
See also https://www.monetdb.org/pipermail/users-list/2020-September/010776.html
Please consider documenting this information prominently wherever novice users are supposed to find all the information necessary to smoothly get started with MonetDB.
Thanks!
Stefan
## Comment 28159
Date: 2020-10-08 19:26:12 +0200
From: Martin van Dinther <<martin.van.dinther>>
I have added text:
"Every newly created database contains a system user called monetdb and system schemas such as "sys", "tmp", "profiler" and some more. To connect/login to the database server the first time, you must use monetdb as user name and enter its default password: monetdb. Once connected you may create new users, create new schemas, create tables etc. It is also strongly recommended to change the default password of the monetdb system user via ALTER USER SET PASSWORD command."
to webpage:
https://www.monetdb.org/Documentation/Tutorial/GettingStarted/CreateADatabase
| Default username and password not (explicitly) documented | https://api.github.com/repos/MonetDB/MonetDB/issues/6967/comments | 0 | 2020-11-30T17:01:43Z | 2024-06-27T13:10:17Z | https://github.com/MonetDB/MonetDB/issues/6967 | 753,646,117 | 6,967 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-09-13 08:37:25 +0200
From: @mlkersten
To: GDK devs <<bugs-common>>
Version: 11.37.11 (Jun2020-SP1)
Last updated: 2020-09-14 10:05:09 +0200
## Comment 28070
Date: 2020-09-13 08:37:25 +0200
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:80.0) Gecko/20100101 Firefox/80.0
Build Identifier:
If you add the property dbextra=:memory: to the server settings, all intermediates are supposed not to be flushed to disk explicitly.
It does not seem to work on e.g. TPCH SF-10/SF-100, where we receive an early bailout on starting the server.
2020-09-12 23:37:40 MSG SF-100[154293]: arguments: /home/mk/branches/default/Linux/bin/mserver5 --dbpath=/home/mk/dbfarm/SF-100 --set merovingian_uri=mapi:monetdb://zoom:50000/SF-100 --dbextra=:memory: --set mapi_listenaddr=none --set mapi_usock=/home/mk/dbfarm/SF-100/.mapi.sock --set monet_vault_key=/home/mk/dbfarm/SF-100/.vaultkey --set gdk_nr_threads=8 --set max_clients=64 --set sql_optimizer=default_pipe
2020-09-12 23:37:40 ERR SF-100[154293]: main thread: GDKlockHome: !ERROR: Database lock ':memory:/.gdk_lock' denied
Reproducible: Always
### Actual Results:
Given the resources, keeping the intermediates around should not be a problem.
## Comment 28071
Date: 2020-09-13 13:24:32 +0200
From: @sjoerdmullender
The option is --dbextra=:inmemory, not --dbextra=:memory:.
## Comment 28072
Date: 2020-09-13 16:25:35 +0200
From: @mlkersten
ok. then we should try to avoid confusion between :inmemory: (GDK) and :memory: (in monetdbe).
I propose the short version, which was intended.
if --dfbpath=:memory: then by default dbextra=:memory:
## Comment 28074
Date: 2020-09-14 10:05:09 +0200
From: @sjoerdmullender
For mserver5 there is no such thing as --dbpath=:memory in whatever spelling. It's done using a separate option --in-memory. So --dbextra=:inmemory is a new "invention". For monetdbe I don't see anything like that either. The interface seems to be, call monetdbe_open with a NULL argument for the database and it's in memory, otherwise it's a URL.
So where does this :memory: come from? I can't find it anywhere.
There is conflicting documentation in documentation/monetdbe. In introduction.rst it talks about :inmemory: and in monetdb_api.rst it talks about :memory:. And in both cases, it seems to be talking more abstractly, since when looking at the code, it seems clear that the database must be specified as NULL.
All of this is not saying that we can't change :inmemory to :memory:. It's just asking for enlightenment.
| dbextra=:memory: fails | https://api.github.com/repos/MonetDB/MonetDB/issues/6966/comments | 0 | 2020-11-30T17:01:40Z | 2024-06-28T10:10:29Z | https://github.com/MonetDB/MonetDB/issues/6966 | 753,646,078 | 6,966 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-09-09 19:23:06 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
CC: @njnes
Last updated: 2020-10-19 11:06:21 +0200
## Comment 28060
Date: 2020-09-09 19:23:06 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36
Build Identifier:
This seems to apply to table-returning functions only.
I use sys.storage() as an example of table-returning function.
The following yields a segmentation fault:
explain select distinct sorted from sys.storage('sys');
Removing distinct makes it work.
Enabling assertions reveals that there is a problem here:
rel2bin_table: Assertion `sql->session->status == -10' failed.
Reproducible: Always
## Comment 28065
Date: 2020-09-11 11:26:47 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [618ec6381145](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=618ec6381145) 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=618ec6381145](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=618ec6381145)
Changeset description:
fixing bugs 6964 and 6965
escape functions with return statements in gnerator optimizer
make sure we don't remove the projection list of an table returning function in rel_push_project_down
## Comment 28067
Date: 2020-09-11 11:29:16 +0200
From: @njnes
fixed in the jun branch.
## Comment 28069
Date: 2020-09-11 12:25:33 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [5ff6952a7069](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5ff6952a7069) 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=5ff6952a7069](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=5ff6952a7069)
Changeset description:
Added tests for bugs 6964 and 6965
| Crash when using distinct on the result of a table returning function | https://api.github.com/repos/MonetDB/MonetDB/issues/6965/comments | 0 | 2020-11-30T17:01:37Z | 2024-06-27T13:10:15Z | https://github.com/MonetDB/MonetDB/issues/6965 | 753,646,032 | 6,965 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-09-09 18:24:09 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
CC: @njnes
Last updated: 2020-10-19 11:06:22 +0200
## Comment 28058
Date: 2020-09-09 18:24:09 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36
Build Identifier:
This is not a very useful function, but the result is not what I had expected.
CREATE OR REPLACE FUNCTION test(i integer)
RETURNS TABLE (value integer)
BEGIN
return select value from generate_series(1,i);
END;
sql>select value from test(3);
Cannot access column descriptor
This is the explain:
function user.s22_0():void;
X_2:void := querylog.define("explain select value from test(3);":str, "sequential_pipe":str, 13:int);
X_10:bat[:str] := bat.pack(".%2":str);
X_11:bat[:str] := bat.pack("value":str);
X_12:bat[:str] := bat.pack("int":str);
X_13:bat[:int] := bat.pack(32:int);
X_14:bat[:int] := bat.pack(0:int);
X_8:bat[:int] := user.test(3:int);
sql.resultSet(X_10:bat[:str], X_11:bat[:str], X_12:bat[:str], X_13:bat[:int], X_14:bat[:int], X_8:bat[:int]);
end user.s22_0;
Reproducible: Always
## Comment 28059
Date: 2020-09-09 18:31:26 +0200
From: @swingbit
This is the debug:
sql>debug select value from test(3);
mdb>X_2=0@0:void := querylog.define("explain select value from test(3);", "sequential_pipe", 13:int);
mdb>
mdb>X_10=nil:bat[:str] := bat.pack(".%2");
mdb>
mdb>X_11=nil:bat[:str] := bat.pack("value");
mdb>
mdb>X_12=nil:bat[:str] := bat.pack("int");
mdb>
mdb>X_13=nil:bat[:int] := bat.pack(32:int);
mdb>
mdb>X_14=nil:bat[:int] := bat.pack(0:int);
mdb>
mdb>X_8=nil:bat[:int] := user.test(3:int);
mdb>
mdb>X_7=nil:bat[:int] := generator.parameters(1:int, Ai=3);
mdb>
mdb> return X_7=nil:bat[:int] := generator.X_7=nil:bat[:int];
mdb>
mdb>sql.resultSet(X_10=[1], X_11=[1], X_12=[1], X_13=[1], X_14=[1], X_8=nil:bat[:int]);
mdb>
MAPI = (monetdb) /tmp/.s.monetdb.58000
ERROR = !ERROR: MALException:sql.resultset:HY005!Cannot access column descriptor
## Comment 28064
Date: 2020-09-11 11:26:46 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [618ec6381145](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=618ec6381145) 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=618ec6381145](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=618ec6381145)
Changeset description:
fixing bugs 6964 and 6965
escape functions with return statements in gnerator optimizer
make sure we don't remove the projection list of an table returning function in rel_push_project_down
## Comment 28066
Date: 2020-09-11 11:28:41 +0200
From: @njnes
fixed in the jun branch, ie by disallowing the generator optimizer to rewrite table producing functions.
## Comment 28068
Date: 2020-09-11 12:25:32 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [5ff6952a7069](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5ff6952a7069) 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=5ff6952a7069](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=5ff6952a7069)
Changeset description:
Added tests for bugs 6964 and 6965
| Table returning function: Cannot access column descriptor | https://api.github.com/repos/MonetDB/MonetDB/issues/6964/comments | 0 | 2020-11-30T17:01:33Z | 2024-06-27T13:10:14Z | https://github.com/MonetDB/MonetDB/issues/6964 | 753,645,981 | 6,964 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-09-04 09:13:31 +0200
From: Arshad <<arshad.super>>
To: clients devs <<bugs-clients>>
Version: 11.35.19 (Nov2019-SP3)
CC: martin.van.dinther, @PedroTadim
Last updated: 2020-09-14 07:12:28 +0200
## Comment 28052
Date: 2020-09-04 09:13:31 +0200
From: Arshad <<arshad.super>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36
Build Identifier:
We am importing/fetching data from server into Microsoft Excel via ODBC connection. For a data set with 5 columns and 10000 rows it is roughly taking 10 mins to pull data.
The time to import/fetch data to excel increases when the columns increase. We can confirm that the N/W is not causing the slowness.
Is there any way we can decrease the time taken to fetch ? Increase performance of import/fetch ? Any best-practices or tuning which needs to be done. ?
Thanks
Arshad
Reproducible: Always
### Steps to Reproduce:
1. Open Excel -> Data -> Get Data -> From Other sources -> From ODBC -> Select DSN (MonetDB)
2. Execute Query under "SQL statement" ( Select table1,table2,table3,table4,table5 from TESTDB Limit 10000)
### Actual Results:
It takes around 10 mins (which we think is lots) for 10000 rows of data. 100,000 rows pull goes into hours.
### Expected Results:
I do not have a apple/apple comparison but running same query under isql i could get result under 2 mins.
## Comment 28053
Date: 2020-09-04 13:11:06 +0200
From: @PedroTadim
Is on my TODO list to push topN relation into basetable. It should fix this issue.
## Comment 28054
Date: 2020-09-07 06:07:18 +0200
From: Arshad <<arshad.super>>
Thanks!. I want to try out your patch as soon you complete it.
What we found out is, that the slowness is result of directly calling SQLFetch() every row and then SQLGetData() for every column. That is the reason when the columns are higher in the result-set the time take also increases. What we were expecting is that SQLBindCol() should be called to make the pull faster. Can SQLBindCol() help speed up in case we do not want to manipulate every column ?
## Comment 28063
Date: 2020-09-10 17:44:16 +0200
From: Martin van Dinther <<martin.van.dinther>>
Hi Arshad,
It is the MS program that is doing the SQLFetch() for every row and then SQLGetData() for every column. Other programs typically do an SQLBindCol() once for every column and next only SQLFetch() for every row.
We cannot change/improve the MS program.
As MS Excel also allows you to import csv data files, maybe it is a workaround for you to use the mclient application (similar to isql) to download the table/query data into a local csv file and next laod it into MS Excel.
The fastest way is to use command:
https://www.monetdb.org/Documentation/SQLreference/SQLSyntaxOverviewCOPY_INTO
with the ON CLIENT argument.
Especially if you are going to download large data sets (> 100000 rows and/or many column) this should be much faster than via ODBC.
To use mclient on MS Windows you will need to install the Windows version of MonetDB.
Another problem could be your network bandwidth (and/or latency) as downloading 10000 rows in a LAN environment usually should take much less time than 10 minutes, even with ODBC. Are you running MonetDB server locally or on a remote (cloud) server (WAN)? Try to get some insight in your network bandwidth speed.
By using mclient versus MS Excel and ODBC you can compare download speeds.
## Comment 28073
Date: 2020-09-14 07:12:28 +0200
From: Arshad <<arshad.super>>
Hi Martin,
Thanks for you inputs!
>It is the MS program that is doing the SQLFetch() for every row and then SQLGetData() for every column. Other programs typically do an SQLBindCol() once for every column and next only SQLFetch() for every row.
>We cannot change/improve the MS program.
Agree! It is the client which choose to make a specific call. We were just curious to know if the behavior of driver could be changed by any tuning. We agree with your comment nothing much could be done here for SQLBindCol().
>As MS Excel also allows you to import csv data files, maybe it is a workaround for you to use the mclient application (similar to isql) to download >the table/query data into a local csv file and next laod it into MS Excel.
>The fastest way is to use command:
>https://www.monetdb.org/Documentation/SQLreference/SQLSyntaxOverviewCOPY_INTO
>with the ON CLIENT argument.
>Especially if you are going to download large data sets (> 100000 rows and/or many column) this should be much faster than via ODBC.
>To use mclient on MS Windows you will need to install the Windows version of MonetDB.
You are correct. We did compare with "isql" just to confirm and indeed it was much faster. I am sure mclient will be as fast (based on my previous runs experience). Only downside is that user will have to do two separate steps to get the data loaded. Upside is that will be much faster. Thanks for the URL for COPY_INTO.
>Another problem could be your network bandwidth (and/or latency) as downloading 10000 rows in a LAN environment usually should take much less time >than 10 minutes, even with ODBC. Are you running MonetDB server locally or on a remote (cloud) server (WAN)? Try to get some insight in your network >bandwidth speed.
>By using mclient versus MS Excel and ODBC you can compare download speeds.
MonedDB is hosted on a dedicated server in our lab. We did the speed profiling earlier and we can confirm that the N/W is fast and stable.
Thanks
Arshad
| Importing/fetching data from server into MS Excel via ODBC connection is very slow. | https://api.github.com/repos/MonetDB/MonetDB/issues/6963/comments | 0 | 2020-11-30T17:01:30Z | 2024-06-27T13:10:13Z | https://github.com/MonetDB/MonetDB/issues/6963 | 753,645,955 | 6,963 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-09-03 12:32:11 +0200
From: @yzchang
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
CC: @PedroTadim
Last updated: 2020-10-19 11:06:21 +0200
## Comment 28050
Date: 2020-09-03 12:32:11 +0200
From: @yzchang
Start a fresh database, then run the query in mclient:
SELECT * FROM ids LIMIT 1;
At the mserver5 side, this produces the error:
client1: exp_bin: !ERROR: Could not find %173.id
client1: exp_bin: !ERROR: Query: 'select * from ids limit 1;'
While mclient seems to hang (which might indicate a crash on Mac OS).
Note that "SELECT * FROM ids" works fine.
## Comment 28051
Date: 2020-09-03 13:01:22 +0200
From: @PedroTadim
This is a bug I recently fixed on Oct2020 branch.
| "SELECT * FROM ids LIMIT 1" produces: exp_bin: !ERROR: Could not find %173.id | https://api.github.com/repos/MonetDB/MonetDB/issues/6962/comments | 0 | 2020-11-30T17:01:27Z | 2024-06-27T13:10:12Z | https://github.com/MonetDB/MonetDB/issues/6962 | 753,645,924 | 6,962 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-09-03 10:13:42 +0200
From: xavier <<wysunxavier>>
To: clients devs <<bugs-clients>>
Version: 11.37.11 (Jun2020-SP1)
Last updated: 2020-09-03 10:13:42 +0200
## Comment 28049
Date: 2020-09-03 10:13:42 +0200
From: xavier <<wysunxavier>>
I used the function mapi_send to execute 'SELECT' query, but i had to use function mapi_read_response to get query status.It seems that mapi_read_response is a blocking call.
Could there be a non-blocking call function to get the query status? Or the function exists but I don't know.
Thanks
Xavier
| Could Mapilib have non-blocking functions to ask if the query is over for mapi_send? | https://api.github.com/repos/MonetDB/MonetDB/issues/6961/comments | 1 | 2020-11-30T17:01:24Z | 2024-06-28T10:10:41Z | https://github.com/MonetDB/MonetDB/issues/6961 | 753,645,884 | 6,961 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-08-31 18:26:09 +0200
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <<bugs-sql>>
Version: 11.37.7 (Jun2020)
CC: @PedroTadim
Last updated: 2020-10-19 11:06:19 +0200
## Comment 28038
Date: 2020-08-31 18:26:09 +0200
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:79.0) Gecko/20100101 Firefox/79.0
Build Identifier:
According to the SQL standard 2016 (ISO_IEC_9075-2E_Foundation_2016.pdf page 321) the 2 argument LOG(base, x) function is defined as:
<general logarithm function> ::=
LOG <left paren> <general logarithm base> <comma>
<general logarithm argument> <right paren>
<general logarithm base> ::=
<numeric value expression>
<general logarithm argument> ::=
<numeric value expression>
However MonetDB has implemented the arguments switched so LOG(x, base) instead of LOG(base, x).
Also other RDBMS follow the SQL Standard. See:
https://www.postgresql.org/docs/12/functions-math.html
log(b numeric, x numeric)
https://dev.mysql.com/doc/refman/8.0/en/mathematical-functions.htmlfunction_log
LOG(B,X)
https://docs.oracle.com/cd/B28359_01/olap.111/b28126/dml_functions_2014.htmOLADM590
LOG([base,] expression)
https://en.wikibooks.org/wiki/SQL_Dialects_Reference/Functions_and_expressions/Math_functions/Numeric_functions
Search for Feature: Logarithm of x, base b
The implementation was added in Apr2019 release,
see also: https://www.monetdb.org/bugzilla/show_bug.cgi?id=3416
The implementation should be corrected ASAP to be in compliance with the SQL Standard and behave same as other RDBMS.
Reproducible: Always
### Steps to Reproduce:
Select log(2.0, 64.0); -- 6.0
SELECT LOG(2,65536); -- 16.0
SELECT LOG(10,100); -- 2.0
SELECT LOG(2,42); -- 5.392317422778761
SELECT LOG(1,100); -- NULL
### Actual Results:
sql>Select log(2.0, 64.0); -- 6.0
+--------------------------+
| %2 |
+==========================+
| 0.16666666666666669 |
+--------------------------+
1 tuple
sql>SELECT LOG(2,65536); -- 16.0
+--------------------------+
| %2 |
+==========================+
| 0.0625 |
+--------------------------+
1 tuple
sql>SELECT LOG(10,100); -- 2.0
+--------------------------+
| %2 |
+==========================+
| 0.5 |
+--------------------------+
1 tuple
sql>SELECT LOG(2,42); -- 5.392317422778761
+--------------------------+
| %2 |
+==========================+
| 0.1854490234153689 |
+--------------------------+
1 tuple
sql>SELECT LOG(1,100); -- NULL
+--------------------------+
| %2 |
+==========================+
| 0 |
+--------------------------+
1 tuple
sql>
### Expected Results:
sql>Select log(2.0, 64.0); -- 6.0
+--------------------------+
| %2 |
+==========================+
| 6 |
+--------------------------+
1 tuple
sql>SELECT LOG(2,65536); -- 16.0
+--------------------------+
| %2 |
+==========================+
| 16 |
+--------------------------+
1 tuple
sql>SELECT LOG(10,100); -- 2.0
+--------------------------+
| %2 |
+==========================+
| 2 |
+--------------------------+
1 tuple
sql>SELECT LOG(2,42); -- 5.392317422778761
+--------------------------+
| %2 |
+==========================+
| 5.392317422778761 |
+--------------------------+
1 tuple
sql>SELECT LOG(1,100); -- NULL
+--------------------------+
| %2 |
+==========================+
| inf |
+--------------------------+
1 tuple
sql>
| implementation of log(arg1,arg2) function is not compliant with the SQL standard, arguments are switched | https://api.github.com/repos/MonetDB/MonetDB/issues/6960/comments | 0 | 2020-11-30T17:01:21Z | 2024-06-27T13:10:10Z | https://github.com/MonetDB/MonetDB/issues/6960 | 753,645,848 | 6,960 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-08-31 17:00:22 +0200
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
CC: @PedroTadim
Last updated: 2020-11-09 09:21:54 +0100
## Comment 28030
Date: 2020-08-31 17:00:22 +0200
From: @drstmane
Created attachment 692
test script
A simple running sum
sum() over (order by "key")
even on data that is already sorted on key (and MonetDB should know that)
appear to be very slow with larger data, seemingly quadratic in the number of tuples rather than linear.
See attached script and log for details.
> Attached file: [running-sum.sh](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6959_running-sum.sh_692) (application/x-sh, 2152 bytes)
> Description: test script
## Comment 28031
Date: 2020-08-31 17:00:58 +0200
From: @drstmane
Created attachment 693
output of test script
> Attached file: [running-sum.log](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6959_running-sum.log_693) (text/x-log, 3398 bytes)
> Description: output of test script
## Comment 28034
Date: 2020-08-31 17:35:52 +0200
From: @PedroTadim
This is a known corner case that can be improved. Is on the TODO list to improve the window functions for these scenarios, but I have been very busy with bug fixes and other performance improvements.
## Comment 28126
Date: 2020-09-30 12:16:28 +0200
From: @drstmane
Well, with a "global" Window function, i.e., merely an "order by" but no "partition by", I would not expect quadratic complexity/performance in the first place, but at most n log n, i.e., for the sort ...
## Comment 28127
Date: 2020-09-30 16:30:01 +0200
From: @PedroTadim
After I get done with the alloc-str-branch, which should be around this week, I can go to this. I planning to add 2 more execution scenarios for aggregates as windows functions: cumulative aggregate for your case and segment tree lookup as the more general solution. The naive solution should still be the better solution when the number of rows in the partition is very low.
## Comment 28229
Date: 2020-10-28 17:07:09 +0100
From: @PedroTadim
On window-tunning branch, I added the cumulative aggregate for these cases. The performance should be around nlogn.
## Comment 28255
Date: 2020-11-09 09:21:54 +0100
From: @PedroTadim
Today I merged window-tunning branch into default and it will be available in the next feature release. We ran benchmarks and we identified a great performance increase (now the complexity goes around nlogn). I'm going to close this bug, but if the performance is still not desirable, fell free to reopen it.
The window functions don't run in parallel yet, but I'm planning to do it in the near future.
| "simply" running-sum "sum() over (order by ...)" very slow: quadratic rather than linear!?? | https://api.github.com/repos/MonetDB/MonetDB/issues/6959/comments | 0 | 2020-11-30T17:01:18Z | 2024-06-27T13:10:09Z | https://github.com/MonetDB/MonetDB/issues/6959 | 753,645,816 | 6,959 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-08-31 16:23:44 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.35.19 (Nov2019-SP3)
CC: @njnes
Last updated: 2020-09-09 13:38:56 +0200
## Comment 28027
Date: 2020-08-31 16:23:44 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36
Build Identifier:
Please use the test in attachment.
When the test succeeds, it returns twice the same result (4 tuples).
When the test fails, the second result is empty.
Mind that the bug seems to be data-dependent. The same query won't fail with different data.
With this test, the bug is reproducible on Nov2019-SP3 (11.35.19), compiled with --enable-optimize.
All these fail:
--disable-debug --disable-developer --disable-assert --enable-optimize
--enable-debug=gdb --disable-developer --disable-assert --enable-optimize
--enable-debug=gdb --enable-developer --disable-assert --enable-optimize
--enable-debug=gdb --enable-developer --enable-assert --enable-optimize
Using --disable-optimize makes the test succeed.
For what it matters, I have only tested this on Fedora Core 30, on i7 CPU.
Mind that, because the bug is triggered on Nov2019 by the specific data in the test script, the fact that it doesn't fail on Nov2020 does not mean that Nov2020 is free from this bug. It may be triggered by different data.
Reproducible: Always
## Comment 28028
Date: 2020-08-31 16:25:24 +0200
From: @swingbit
Created attachment 691
Test to reproduce the bug
> Attached file: [bug-6958.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6958_bug-6958.sql_691) (application/sql, 42961 bytes)
> Description: Test to reproduce the bug
## Comment 28029
Date: 2020-08-31 16:27:49 +0200
From: @swingbit
EDIT: When mentioning "Nov2020" in the original report, I obviously meant "Jun2020".
## Comment 28032
Date: 2020-08-31 17:05:07 +0200
From: @sjoerdmullender
I can't reproduce this on Fedora 32 on Jun2020, but I can on Fedora 32 on Nov2019.
So I guess the bug, whatever it is, has been fixed.
## Comment 28033
Date: 2020-08-31 17:11:19 +0200
From: @sjoerdmullender
And of course you know that both Fedora 30 and The Nov2019 branch have reached their respective EOL...
## Comment 28035
Date: 2020-08-31 17:39:50 +0200
From: @swingbit
Yes, I know that.
Regarding FC30, it seems irrelevant in this case, as you reproduced it on FC32.
Regarding Nov2019, I have two different concerns:
The first is that, as I wrote before, I doubt that you can conclude that the bug is solved on Jun2020. It happens to be triggered by this specific data on Nov2019, it may be triggered by different data (or query?) on Jun2020. I spent a considerable amount of time to isolate the conditions to make it reproducible. Fixing it on Nov2019 might fix a hidden bug in Jun2020, you cannot know until you find the cause.
The second is that we have never been able to use the currently official release of MonetDB, the release cycle is just too tight. For production use, at least in our experience, it becomes stable enough only at the end of its life cycle.
## Comment 28040
Date: 2020-09-01 09:45:44 +0200
From: @sjoerdmullender
The problem is in the MAL function mkey.bulk_rotate_xor_hash, implemented by the C function MKEYrotate_xor_hash in monetdb5/modules/mal/mkey.c. There is a history of fixes in the Jun2020 branch for this function to work around a problem with GCC 10.0.1 (at least) optimizing this function incorrectly (or at least, not the way we expected).
The current version in the Jun2020 branch is in a way significantly different from the Nov2019 version. In the Jun2020 version, all bit manipulation that is done is done on unsigned quantities, where in the Nov2019 branch it was done on signed values. But another, possibly very significant change is that we now use -O2 to optimize instead of -O3.
"GCC both on Fedora 31 and 32 have a problem optimizing mkey.c with -O3.
So we use -O2 for GCC when using --enable-optimize. We then don't
need a hacky call to a function in the loop."
The relevant changesets are: [594e62c40d13](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=594e62c40d13) [46a0e6d97c13](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=46a0e6d97c13) [9a13606d13aa](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9a13606d13aa) [b52db4a32b6a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b52db4a32b6a)
## Comment 28041
Date: 2020-09-01 09:59:15 +0200
From: @swingbit
Thank you Sjoerd, that helps a lot.
## Comment 28045
Date: 2020-09-01 12:26:47 +0200
From: @swingbit
Just as additional info (not drawing quick conclusions about compiler choices):
clang -O3 passes this test, with no code patching.
| Wrong join result when compiled with --enable-optimize | https://api.github.com/repos/MonetDB/MonetDB/issues/6958/comments | 0 | 2020-11-30T17:01:07Z | 2024-06-27T13:10:08Z | https://github.com/MonetDB/MonetDB/issues/6958 | 753,645,688 | 6,958 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-08-26 10:29:08 +0200
From: justin.jin
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
CC: @PedroTadim
Last updated: 2020-08-31 17:56:23 +0200
## Comment 28014
Date: 2020-08-26 10:29:08 +0200
From: justin.jin
adding LIMIT in CTE will cause an error "CREATE VIEW: LIMIT not supported"
## Comment 28019
Date: 2020-08-26 17:27:20 +0200
From: @PedroTadim
Hello Justin,
MonetDB only allows the LIMIT clause on the outermost part of a query, e.g. SELECT ... (SELECT ... <limit not allowed here>) LIMIT N. This is to assure the query will always give deterministic output according to the output of subqueries. As CTEs and views are used in the FROM clause, they have the same issue, so the LIMIT clause is not allowed. We should describe it better in the documentation.
| CREATE VIEW: LIMIT not supported | https://api.github.com/repos/MonetDB/MonetDB/issues/6957/comments | 0 | 2020-11-30T17:01:04Z | 2024-06-28T13:06:11Z | https://github.com/MonetDB/MonetDB/issues/6957 | 753,645,652 | 6,957 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-08-24 19:39:38 +0200
From: Jaya Krishna <<rvinjamu>>
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 11.37.11 (Jun2020-SP1)
CC: @PedroTadim
Last updated: 2020-09-01 16:53:06 +0200
## Comment 28009
Date: 2020-08-24 19:39:38 +0200
From: Jaya Krishna <<rvinjamu>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0
Build Identifier:
On TPCH-20 with two splits - across two monetdb nodes, firing a specific query crashes Monetdb. The stack trace in coredump indicates that the crash occured during MAL optimization phase. The same query works just fine on a local TPCH-20 Monetdb instance.
Reproducible: Always
### Steps to Reproduce:
1. Two node setup of monetdb
2. TPCH-20 - All tables except nation and region are generated with two splits - each loaded into one node. Nation and region are replicated in both nodes.
3. Fire the following query -
SELECT
"Customer Nation",
"Customer Region",
avg("Data Model / Lineitem::L_DISCOUNT") AS "L_DISCOUNT_Customer Nation / Customer Nation_Supplier Nation / Supplier Nation",
sum("Data Model / Lineitem::L_QUANTITY") AS "L_QUANTITY_Customer Nation / Customer Nation_Supplier Nation / Supplier Nation",
"O_ORDERDATE - Year",
"Supplier Nation",
"Supplier Region"
FROM
CUSTOMER
INNER JOIN -- LEVEL 1
(
SELECT
"Data Model / Lineitem::L_COMMENT",
"Data Model / Lineitem::L_COMMITDATE",
"Data Model / Lineitem::L_DISCOUNT",
"Data Model / Lineitem::L_EXTENDEDPRICE",
"Data Model / Lineitem::L_LINENUMBER",
"Data Model / Lineitem::L_LINESTATUS",
"Data Model / Lineitem::L_ORDERKEY",
"Data Model / Lineitem::L_PARTKEY",
"Data Model / Lineitem::L_QUANTITY",
"Data Model / Lineitem::L_RECEIPTDATE",
"Data Model / Lineitem::L_RETURNFLAG",
"Data Model / Lineitem::L_SHIPDATE",
"Data Model / Lineitem::L_SHIPINSTRUCT",
"Data Model / Lineitem::L_SHIPMODE",
"Data Model / Lineitem::L_SUPPKEY",
"Data Model / Lineitem::L_TAX",
"Data Model / Nation::N_COMMENT",
"Supplier Nation",
"Data Model / Nation::N_NATIONKEY",
"Data Model / Nation::N_REGIONKEY",
"Data Model / Orders::O_CLERK",
"Data Model / Orders::O_COMMENT",
"Data Model / Orders::O_CUSTKEY",
"Data Model / Orders::O_ORDERDATE",
"Data Model / Orders::O_ORDERKEY",
"Data Model / Orders::O_ORDERPRIORITY",
"Data Model / Orders::O_ORDERSTATUS",
"Data Model / Orders::O_SHIPPRIORITY",
"Data Model / Orders::O_TOTALPRICE",
"Data Model / Partsupp::PS_AVAILQTY",
"Data Model / Partsupp::PS_COMMENT",
"Data Model / Partsupp::PS_PARTKEY",
"Data Model / Partsupp::PS_SUPPKEY",
"Data Model / Partsupp::PS_SUPPLYCOST",
"Data Model / Region::R_COMMENT",
"Supplier Region",
"Data Model / Region::R_REGIONKEY",
S_ACCTBAL AS "Data Model / Supplier::S_ACCTBAL",
S_ADDRESS AS "Data Model / Supplier::S_ADDRESS",
S_COMMENT AS "Data Model / Supplier::S_COMMENT",
S_NAME AS "Data Model / Supplier::S_NAME",
S_NATIONKEY AS "Data Model / Supplier::S_NATIONKEY",
S_PHONE AS "Data Model / Supplier::S_PHONE",
S_SUPPKEY AS "Data Model / Supplier::S_SUPPKEY",
"O_ORDERDATE - Year"
FROM
SUPPLIER
INNER JOIN -- lEVEL 2 START
(
SELECT
"Data Model / Lineitem::L_COMMENT",
"Data Model / Lineitem::L_COMMITDATE",
"Data Model / Lineitem::L_DISCOUNT",
"Data Model / Lineitem::L_EXTENDEDPRICE",
"Data Model / Lineitem::L_LINENUMBER",
"Data Model / Lineitem::L_LINESTATUS",
"Data Model / Lineitem::L_ORDERKEY",
"Data Model / Lineitem::L_PARTKEY",
"Data Model / Lineitem::L_QUANTITY",
"Data Model / Lineitem::L_RECEIPTDATE",
"Data Model / Lineitem::L_RETURNFLAG",
"Data Model / Lineitem::L_SHIPDATE",
"Data Model / Lineitem::L_SHIPINSTRUCT",
"Data Model / Lineitem::L_SHIPMODE",
"Data Model / Lineitem::L_SUPPKEY",
"Data Model / Lineitem::L_TAX",
PS_AVAILQTY AS "Data Model / Partsupp::PS_AVAILQTY",
PS_COMMENT AS "Data Model / Partsupp::PS_COMMENT",
PS_PARTKEY AS "Data Model / Partsupp::PS_PARTKEY",
PS_SUPPKEY AS "Data Model / Partsupp::PS_SUPPKEY",
PS_SUPPLYCOST AS "Data Model / Partsupp::PS_SUPPLYCOST"
FROM
PARTSUPP
INNER JOIN
(
SELECT
L_COMMENT AS "Data Model / Lineitem::L_COMMENT",
L_COMMITDATE AS "Data Model / Lineitem::L_COMMITDATE",
L_DISCOUNT AS "Data Model / Lineitem::L_DISCOUNT",
L_EXTENDEDPRICE AS "Data Model / Lineitem::L_EXTENDEDPRICE",
L_LINENUMBER AS "Data Model / Lineitem::L_LINENUMBER",
L_LINESTATUS AS "Data Model / Lineitem::L_LINESTATUS",
L_ORDERKEY AS "Data Model / Lineitem::L_ORDERKEY",
L_PARTKEY AS "Data Model / Lineitem::L_PARTKEY",
L_QUANTITY AS "Data Model / Lineitem::L_QUANTITY",
L_RECEIPTDATE AS "Data Model / Lineitem::L_RECEIPTDATE",
L_RETURNFLAG AS "Data Model / Lineitem::L_RETURNFLAG",
L_SHIPDATE AS "Data Model / Lineitem::L_SHIPDATE",
L_SHIPINSTRUCT AS "Data Model / Lineitem::L_SHIPINSTRUCT",
L_SHIPMODE AS "Data Model / Lineitem::L_SHIPMODE",
L_SUPPKEY AS "Data Model / Lineitem::L_SUPPKEY",
L_TAX AS "Data Model / Lineitem::L_TAX"
FROM
LINEITEM
) AS LINEITEM
ON PS_SUPPKEY = "Data Model / Lineitem::L_SUPPKEY"
AND PS_PARTKEY = "Data Model / Lineitem::L_PARTKEY"
) -- LEVEL 2 END
AS LINEITEMPARTSUPP
ON S_SUPPKEY = "Data Model / Partsupp::PS_SUPPKEY"
INNER JOIN
(
SELECT
N_COMMENT AS "Data Model / Nation::N_COMMENT",
N_NAME AS "Supplier Nation",
N_NATIONKEY AS "Data Model / Nation::N_NATIONKEY",
N_REGIONKEY AS "Data Model / Nation::N_REGIONKEY"
FROM
NATION
)
AS NATION
ON S_NATIONKEY = "Data Model / Nation::N_NATIONKEY"
INNER JOIN
(
SELECT
R_COMMENT AS "Data Model / Region::R_COMMENT",
R_NAME AS "Supplier Region",
R_REGIONKEY AS "Data Model / Region::R_REGIONKEY"
FROM
REGION
)
AS REGION
ON "Data Model / Nation::N_REGIONKEY" = "Data Model / Region::R_REGIONKEY"
INNER JOIN
(
SELECT
O_CLERK AS "Data Model / Orders::O_CLERK",
O_COMMENT AS "Data Model / Orders::O_COMMENT",
O_CUSTKEY AS "Data Model / Orders::O_CUSTKEY",
O_ORDERDATE AS "Data Model / Orders::O_ORDERDATE",
O_ORDERKEY AS "Data Model / Orders::O_ORDERKEY",
O_ORDERPRIORITY AS "Data Model / Orders::O_ORDERPRIORITY",
O_ORDERSTATUS AS "Data Model / Orders::O_ORDERSTATUS",
O_SHIPPRIORITY AS "Data Model / Orders::O_SHIPPRIORITY",
O_TOTALPRICE AS "Data Model / Orders::O_TOTALPRICE",
Extract(YEAR FROM O_ORDERDATE) AS "O_ORDERDATE - Year"
FROM
ORDERS
)
AS ORDERS
ON "Data Model / Lineitem::L_ORDERKEY" = "Data Model / Orders::O_ORDERKEY"
) -- END OF LEVEL 1
AS CUSTOMERORDERDETAILS
ON C_CUSTKEY = "Data Model / Orders::O_CUSTKEY"
INNER JOIN
(
SELECT
N_COMMENT AS "Data Model / CustomerNation::N_COMMENT",
N_NAME AS "Customer Nation",
N_NATIONKEY AS "Data Model / CustomerNation::N_NATIONKEY",
N_REGIONKEY AS "Data Model / CustomerNation::N_REGIONKEY"
FROM
NATION
)
AS NATION
ON C_NATIONKEY = "Data Model / CustomerNation::N_NATIONKEY"
INNER JOIN
(
SELECT
R_COMMENT AS "Data Model / CustomerRegion::R_COMMENT",
R_NAME AS "Customer Region",
R_REGIONKEY AS "Data Model / CustomerRegion::R_REGIONKEY"
FROM
REGION
)
AS REGION
ON "Data Model / CustomerNation::N_REGIONKEY" = "Data Model / CustomerRegion::R_REGIONKEY"
WHERE
EXTRACT ( YEAR FROM "Data Model / Orders::O_ORDERDATE") >= 1996
AND "Customer Region" IN
(
'EUROPE',
'AMERICA'
)
AND "Supplier Region" IN
(
'EUROPE',
'AMERICA'
)
GROUP BY
CUBE("O_ORDERDATE - Year", "Customer Region", "Customer Nation", "Supplier Region", "Supplier Nation");
### Actual Results:
Server crashes
### Expected Results:
Query should work just fine. In-fact, this works on single node instances - where all data loaded in the same node (verified for TPCH-2 through TPCH-150).
Stack trace from core dump:
Storage: /var/lib/systemd/coredump/core.mserver5.974.5e66510ad8f6410db2f2de5afe6ef4ac.23259.1598289472000000.lz4
Message: Process 23259 (mserver5) of user 974 dumped core.
Stack trace of thread 23284:
0 0x00007fcc12dd068e optimizeMALBlock (libmonetdb5.so.29)
1 0x00007fcc0c7bdbdf SQLrun (lib_sql.so)
2 0x00007fcc0c7bf016 SQLengineIntern (lib_sql.so)
3 0x00007fcc12d1ac26 runScenario (libmonetdb5.so.29)
4 0x00007fcc12d1b10a MSserveClient (libmonetdb5.so.29)
5 0x00007fcc12d1b6b1 MSscheduleClient (libmonetdb5.so.29)
6 0x00007fcc12d7a65b doChallenge (libmonetdb5.so.29)
7 0x00007fcc129fde0f THRstarter (libbat.so.20)
8 0x00007fcc12a2bc3d thread_starter (libbat.so.20)
9 0x00007fcc1014c2de start_thread (libpthread.so.0)
10 0x00007fcc0fe7ca63 __clone (libc.so.6)
Stack trace of thread 23267:
0 0x00007fcc10154e16 do_futex_wait.constprop.1 (libpthread.so.0)
1 0x00007fcc10154f08 __new_sem_wait_slow.constprop.0 (libpthread.so.0)
2 0x00007fcc12d07b88 q_dequeue (libmonetdb5.so.29)
3 0x00007fcc12d07e69 DFLOWworker (libmonetdb5.so.29)
4 0x00007fcc129fde0f THRstarter (libbat.so.20)
5 0x00007fcc12a2bc3d thread_starter (libbat.so.20)
6 0x00007fcc1014c2de start_thread (libpthread.so.0)
7 0x00007fcc0fe7ca63 __clone (libc.so.6)
Stack trace of thread 23270:
0 0x00007fcc10154e16 do_futex_wait.constprop.1 (libpthread.so.0)
1 0x00007fcc10154f08 __new_sem_wait_slow.constprop.0 (libpthread.so.0)
2 0x00007fcc12d07b88 q_dequeue (libmonetdb5.so.29)
3 0x00007fcc12d07e69 DFLOWworker (libmonetdb5.so.29)
4 0x00007fcc129fde0f THRstarter (libbat.so.20)
5 0x00007fcc12a2bc3d thread_starter (libbat.so.20)
6 0x00007fcc1014c2de start_thread (libpthread.so.0)
7 0x00007fcc0fe7ca63 __clone (libc.so.6)
Stack trace of thread 23264:
## Comment 28016
Date: 2020-08-26 11:42:23 +0200
From: @PedroTadim
Hello, I couldn't reproduce the crash on my setup with TPCH-1. Did you create primary and foreign keys on the tables?
## Comment 28017
Date: 2020-08-26 13:19:03 +0200
From: Jaya Krishna <<rvinjamu>>
Yes. We just used the DDL statements as generated by TPCH dbgen. It has primary and foreign keys.
## Comment 28018
Date: 2020-08-26 16:43:23 +0200
From: Jaya Krishna <<rvinjamu>>
gdb bt is :
0 0x00007f1c7a1f768e in optimizeMALBlock (cntxt=0x55af767be930, mb=0x7f1c6a415c10) at opt_support.c:84
1 0x00007f1c73be4bdf in SQLrun () from /usr/lib64/monetdb5/lib_sql.so
2 0x00007f1c73be6016 in SQLengineIntern () from /usr/lib64/monetdb5/lib_sql.so
3 0x00007f1c7a141c26 in runPhase (phase=4, c=0x55af767be930) at mal_scenario.c:503
4 runScenarioBody (once=<optimized out>, c=<optimized out>) at mal_scenario.c:531
5 runScenario (c=c@entry=0x55af767be930, once=once@entry=0) at mal_scenario.c:563
6 0x00007f1c7a14210a in MSserveClient (c=c@entry=0x55af767be930) at mal_session.c:486
7 0x00007f1c7a1426b1 in MSscheduleClient (command=<optimized out>, command@entry=0x7f1c6812dd50 "", challenge=challenge@entry=0x7f1c7298dc83 "cv7AZdMOqY", fin=0x7f1c6c005340,
fout=fout@entry=0x7f1c6c000bf0, protocol=protocol@entry=PROTOCOL_9, blocksize=blocksize@entry=8190) at mal_session.c:373
8 0x00007f1c7a1a165b in doChallenge (data=<optimized out>) at mal_mapi.c:265
9 0x00007f1c79e24e0f in THRstarter (a=0x7f1c6c0058a0) at gdk_utils.c:1466
10 0x00007f1c79e52c3d in thread_starter (arg=0x7f1c6c005900) at gdk_system.c:677
11 0x00007f1c775732de in start_thread () from /lib64/libpthread.so.0
12 0x00007f1c772a3a63 in clone () from /lib64/libc.so.6
## Comment 28020
Date: 2020-08-27 05:23:15 +0200
From: Jaya Krishna <<rvinjamu>>
Data has been generated thus:
dbgen -s 20 -S 1 -C 2 -> generates the first split of the tables.
dbgen -s 20 -S 2 -C 2 -> generates the second split of the tables.
1. Nation and Region being small tables - we replicated on both of the two monetdb nodes we setup.
2. Rest of the tables, we loaded first split on the first node and second split on the second node.
3. On each of the nodes, we then created Remote tables for the splits in the other node.
4. We then created Merge tables on each node - combining the local and remote splits.
5. Table listing on first node is as follows:
MERGE TABLE customer
TABLE customer1
REMOTE TABLE customer2
MERGE TABLE lineitem
TABLE lineitem1
REMOTE TABLE lineitem2
TABLE nation
MERGE TABLE orders
TABLE orders1
REMOTE TABLE orders2
MERGE TABLE part
TABLE part1
REMOTE TABLE part2
MERGE TABLE partsupp
TABLE partsupp1
REMOTE TABLE partsupp2
TABLE region
MERGE TABLE supplier
TABLE supplier1
REMOTE TABLE supplier2
## Comment 28021
Date: 2020-08-27 09:09:16 +0200
From: @PedroTadim
Thanks for the information, I will try to reproduce again today.
## Comment 28022
Date: 2020-08-27 09:14:14 +0200
From: Jaya Krishna <<rvinjamu>>
Thanks. Forgot to mention, the tables on the second node has the mirror structure to first node - just the local and remote table roles are reversed for the partitions/splits.
regards
## Comment 28023
Date: 2020-08-27 09:43:30 +0200
From: Jaya Krishna <<rvinjamu>>
Also, I guess the title of the bug is probably not accurate. Inner Joins of merge tables work. But there is something in this query that is causing the crash.
regards
## Comment 28024
Date: 2020-08-31 12:31:13 +0200
From: Jaya Krishna <<rvinjamu>>
Hi Team ,
any luck with reproducing the issue?
regards
## Comment 28039
Date: 2020-08-31 20:37:11 +0200
From: @PedroTadim
I had trouble setting the foreign keys, because the data was split between the nodes, so I tried to run without them. Everything went fine until I got hit by the OOM killer. Your crash was during the query optimization, so you can reproduce it with just an explain command.
Best regards,
Pedro
## Comment 28044
Date: 2020-09-01 11:26:15 +0200
From: Jaya Krishna <<rvinjamu>>
Yes. you are right in that it occurs in the optimization phase and we should be able to reproduce it even without loading the data. Are you able to reproduce it without loading the data?
## Comment 28046
Date: 2020-09-01 12:55:14 +0200
From: Jaya Krishna <<rvinjamu>>
Created attachment 694
Sequence of DDL statements to set up the 2-node TPCH configuration
Attached file has the table creation statements in sequence - with comments on which of the 2 nodes we need to run them on.
> Attached file: [tablesetup.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6956_tablesetup.txt_694) (text/plain, 23850 bytes)
> Description: Sequence of DDL statements to set up the 2-node TPCH configuration
## Comment 28047
Date: 2020-09-01 16:34:26 +0200
From: @PedroTadim
I realized I attempted to reproduce the crash on the tip of Jun2020 branch. I updated to the SP1 release tag, and I got a crash before the optimization. This is because SP1 release doesn't include the Bug #6938 fix: https://www.monetdb.org/bugzilla/show_bug.cgi?id=6938
Can you attempt to build the tip of Jun2020 branch and run the query?
We are going to make a new feature release in October including this fix.
## Comment 28048
Date: 2020-09-01 16:53:06 +0200
From: Jaya Krishna <<rvinjamu>>
Hmm - a bit unsure. To get around the Bug - 6938, we pushed the alias definitions to the nested source queries. Earlier the aliases were declared in the outermost query and caused a crash when used in the cube phrase. So the current query (with alias definitions pushed inside) works fine on single node setup. This only fails on the distributed setup. Hence I am not sure whether BUG-6938 applies in the current scenario.
regards
Jaya Krishna
| Mserver5 crashes on firing a query involving inner joins of merge tables | https://api.github.com/repos/MonetDB/MonetDB/issues/6956/comments | 0 | 2020-11-30T17:01:00Z | 2024-06-27T13:10:05Z | https://github.com/MonetDB/MonetDB/issues/6956 | 753,645,612 | 6,956 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-08-21 12:44:39 +0200
From: @Mytherin
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
CC: @njnes
Last updated: 2020-10-19 11:06:21 +0200
## Comment 28001
Date: 2020-08-21 12:44:39 +0200
From: @Mytherin
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.2 Safari/605.1.15
Build Identifier:
Rounding a decimal with a non-scalar precision gives an incorrect result. The correct result is obtained when a scalar precision is used.
Consider the following SQL statements:
CREATE TABLE decimals(d DECIMAL(4,1), prec INTEGER);
INSERT INTO decimals VALUES ('999.9', 0);
SELECT ROUND(d, prec) FROM decimals;
-- expected: 1000, actual: 100
SELECT ROUND(CAST(999.9 AS DECIMAL(4,1)), 0);
-- correct result: 1000
SELECT ROUND(d, 0) FROM decimals;
-- correct result: 1000.0
SELECT ROUND(d, 0.1) FROM decimals;
-- expected: error or 1000.0, got 100.0
SELECT ROUND(CAST(999.9 AS DECIMAL(4,1)), 0.1);
-- same result: got 100.0
Reproducible: Always
## Comment 28008
Date: 2020-08-24 13:28:47 +0200
From: @njnes
fixed type conversion in case of round(dec, dec).
| ROUND(DECIMAL, PRECISION) gives incorrect result with non-scalar precision parameter | https://api.github.com/repos/MonetDB/MonetDB/issues/6955/comments | 0 | 2020-11-30T17:00:56Z | 2024-06-27T13:10:04Z | https://github.com/MonetDB/MonetDB/issues/6955 | 753,645,573 | 6,955 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-08-19 19:14:34 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
CC: @PedroTadim
Last updated: 2020-10-19 11:06:20 +0200
## Comment 27998
Date: 2020-08-19 19:14:34 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36
Build Identifier:
I struggled a few hours with a filter function of mine, which no binds to its implementation after switching from Nov2019 to Jun2020. I thought something changed in the binding details.
So I tried with the only filter function implemented with the distribution, which is the LIKE implementation, and it seems broken as well.
Query:
explain select * from (values ('one'), ('two')) as l(s), (values ('three'), ('four')) as r(s) where l.s like r.s;
Nov2019 (likejoin):
(X_29:bat[:oid], X_30:bat[:oid]) := algebra.likejoin(X_15:bat[:str], X_26:bat[:str], "":str, nil:BAT, nil:BAT, true:bit, nil:lng);
Jun2020 (crossproduct + select):
(X_31:bat[:oid], X_32:bat[:oid]) := algebra.crossproduct(X_16:bat[:str], X_30:bat[:str], false:bit);
X_34:bat[:str] := algebra.projection(X_31:bat[:oid], X_16:bat[:str]);X_35:bat[:str] := algebra.projection(X_32:bat[:oid], X_30:bat[:str]); X_38:bat[:bit] := mal.manifold("algebra":str, "like":str, X_34:bat[:str], X_35:bat[:str], "":str);
Reproducible: Always
## Comment 27999
Date: 2020-08-20 11:24:38 +0200
From: @PedroTadim
Hello Roberto,
This was an issue with the cardinality of list of values expressions, which we recently fixed on default branch. I just backported it to Jun2020 on changeset [8b6db4d3910f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8b6db4d3910f)
## Comment 28000
Date: 2020-08-21 10:51:11 +0200
From: @swingbit
That was it. Also my own filter functions work now.
Thanks Pedro.
| FILTER functions no longer find their implementation | https://api.github.com/repos/MonetDB/MonetDB/issues/6954/comments | 0 | 2020-11-30T17:00:52Z | 2024-06-27T13:10:03Z | https://github.com/MonetDB/MonetDB/issues/6954 | 753,645,521 | 6,954 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-08-18 20:36:44 +0200
From: Walter <<walter.weinmann>>
To: clients devs <<bugs-clients>>
Version: 11.37.11 (Jun2020-SP1)
CC: martin.van.dinther
Last updated: 2020-09-09 17:40:11 +0200
## Comment 27994
Date: 2020-08-18 20:36:44 +0200
From: Walter <<walter.weinmann>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36
Build Identifier:
walter@jfww-windows:/mnt/d/SoftDevelopment/Projects/Konnexions/db_seeder_issue_72$ ./run_i72.sh
================================================================================
Start ./run_i72.sh
--------------------------------------------------------------------------------
DB Seeder - Demonstration Issue 72.
--------------------------------------------------------------------------------
DATE TIME : 18.08.2020 20:26:54
--------------------------------------------------------------------------------
253e91a5d27f monetdb/monetdb:latest "monetdbd start -n /…" 4 minutes ago Up 4 minutes 0.0.0.0:50000->50000/tcp db_seeder_db
db_seeder_db
253e91a5d27f monetdb/monetdb:latest "monetdbd start -n /…" 4 minutes ago Exited (0) Less than a second ago db_seeder_db
db_seeder_db
06e10ae4f45ada1c1241686820d42a070f8cdcd6d2b4bb7d35f49c533bd355c4
db_seeder_db
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
06e10ae4f45a monetdb/monetdb:latest "monetdbd start -n /…" Less than a second ago Up Less than a second 0.0.0.0:50000->50000/tcp db_seeder_db
[main] Table COUNTRY : 200 row(s) inserted in total
[main] Table TIMEZONE : 11 row(s) inserted in total
[main] Table COUNTRY_STATE : 600 row(s) inserted in total
[main] Table CITY : 1000 row(s) inserted so far
[main] Table CITY : 1800 row(s) inserted in total
Exception in thread "main" java.sql.BatchUpdateException: Error(s) occurred while executing the batch, see next SQLExceptions for details
at nl.cwi.monetdb.jdbc.MonetStatement.executeBatch(Unknown Source)
at demo.I72.insertCities(I72.java:73)
at demo.I72.main(I72.java:276)
walter@jfww-windows:/mnt/d/SoftDevelopment/Projects/Konnexions/db_seeder_issue_72$
Btachsize is 1000
Crashes with second execcuteBatch()
Reproducible: Always
### Steps to Reproduce:
1. gradle copyJarToLib
2. run_i72
https://github.com/KonnexionsGmbH/db_seeder/blob/master/db_seeder_issue_72.zip
The link above contains a "Mini-Project" (Eclipse / IntelliJ IDEA) with a demo class (I72.java).
## Comment 27995
Date: 2020-08-18 21:32:03 +0200
From: Martin van Dinther <<martin.van.dinther>>
Hi Walter,
Could you try to do a clearBatch() after each executeBatch()?
I didn't see that logic in your I72.java.
Without clearBatch() the batch just keeps growing, and inserting same values again will trigger the primary key uniquesness violation in your case.
To see this error you may need to retrieve all SQLExceptions (they are chained, see https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.htmlgetNextException-- ), not just the first BatchUpdateException (which is a subclass of SQLException). I hope this is clear.
You should also close() the created PreparedStatements when they are no longer needed to free resources on the server, so add a preparedStatement.close() at the end of the body of insertCountries(), insertTimezones(), etc.
Let me know if adding preparedStatement.clearBatch();
after each preparedStatement.executeBatch();
resolves this issue.
## Comment 27996
Date: 2020-08-18 21:50:08 +0200
From: Walter <<walter.weinmann>>
Not closing the preparedStatement was my fault - but it didn't change anything.
clearBatch() is a solution - but this is the first DBMS where this is required - I suppose this should be performed under the hood.
Nevertheless thanks for the help.
## Comment 27997
Date: 2020-08-18 21:58:10 +0200
From: Martin van Dinther <<martin.van.dinther>>
I agree that a successful Statement.executeBatch() should clear the batch itself. I will fix it in the JDBC driver for the next release.
For now you will need to add Statement.clearBatch() as a workaround.
## Comment 28057
Date: 2020-09-09 17:32:28 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset 253363a2ae28, made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the monetdb-java repo, refers to this bug.
For complete details, see https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=253363a2ae28
Changeset description:
Fix for bug #6953.
Also updated Test_Sbatching.java such that no clearBatch() is called anymore after each executeBatch() in a loop.
| Exception in thread "main" java.sql.BatchUpdateException | https://api.github.com/repos/MonetDB/MonetDB/issues/6953/comments | 0 | 2020-11-30T17:00:49Z | 2024-06-27T13:10:02Z | https://github.com/MonetDB/MonetDB/issues/6953 | 753,645,476 | 6,953 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-08-18 18:35:11 +0200
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <<bugs-sql>>
Version: 11.37.7 (Jun2020)
Last updated: 2020-08-18 18:35:11 +0200
## Comment 27993
Date: 2020-08-18 18:35:11 +0200
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:79.0) Gecko/20100101 Firefox/79.0
Build Identifier:
There is currently no command to change the authorization or owner value of an existing schema.
Request to add support for 2 new SQL commands:
ALTER SCHEMA name AUTHORIZATION TO newauth;
ALTER SCHEMA name OWNER TO newowner;
Reproducible: Always
### Steps to Reproduce:
CREATE or replace VIEW schema_names as
select s.name as schema_nm, auth.name as authorization_nm, ownr.name as owner_nm
from schemas s
join auths auth on s.authorization = auth.id
join auths ownr on s.owner = ownr.id
where not s.system
order by s.name;
select * from schema_names;
CREATE USER kxn_user WITH UNENCRYPTED PASSWORD 'monetdb' NAME 'kxn' SCHEMA sys;
CREATE SCHEMA kxn_schema AUTHORIZATION kxn_user;
select * from schema_names;
CREATE SCHEMA AUTHORIZATION kxn_user;
select * from schema_names;
ALTER SCHEMA kxn_schema AUTHORIZATION TO monetdb;
ALTER SCHEMA kxn_user AUTHORIZATION TO monetdb;
select * from schema_names;
ALTER SCHEMA kxn_schema AUTHORIZATION TO kxn_user;
ALTER SCHEMA kxn_user AUTHORIZATION TO kxn_user;
ALTER SCHEMA kxn_schema OWNER TO kxn_user;
ALTER SCHEMA kxn_user OWNER TO kxn_user;
select * from schema_names;
DROP SCHEMA kxn_user;
DROP SCHEMA kxn_schema;
DROP USER kxn_user;
select * from schema_names;
DROP VIEW schema_names;
### Actual Results:
sql>CREATE or replace VIEW schema_names as
more>select s.name as schema_nm, auth.name as authorization_nm, ownr.name as owner_nm
more> from schemas s
more> join auths auth on s.authorization = auth.id
more> join auths ownr on s.owner = ownr.id
more>where not s.system
more>order by s.name;
operation successful
sql>
sql>select * from schema_names;
+-----------+------------------+----------+
| schema_nm | authorization_nm | owner_nm |
+===========+==================+==========+
+-----------+------------------+----------+
0 tuples
sql>CREATE USER kxn_user WITH UNENCRYPTED PASSWORD 'monetdb' NAME 'kxn' SCHEMA sys;
operation successful
sql>CREATE SCHEMA kxn_schema AUTHORIZATION kxn_user;
operation successful
sql>select * from schema_names;
+------------+------------------+----------+
| schema_nm | authorization_nm | owner_nm |
+============+==================+==========+
| kxn_schema | kxn_user | monetdb |
+------------+------------------+----------+
1 tuple
sql>CREATE SCHEMA AUTHORIZATION kxn_user;
operation successful
sql>select * from schema_names;
+------------+------------------+----------+
| schema_nm | authorization_nm | owner_nm |
+============+==================+==========+
| kxn_schema | kxn_user | monetdb |
| kxn_user | kxn_user | monetdb |
+------------+------------------+----------+
2 tuples
sql>ALTER SCHEMA kxn_schema AUTHORIZATION TO monetdb;
syntax error, unexpected AUTHORIZATION, expecting RENAME in: "alter schema kxn_schema authorization"
sql>ALTER SCHEMA kxn_user AUTHORIZATION TO monetdb;
syntax error, unexpected AUTHORIZATION, expecting RENAME in: "alter schema kxn_user authorization"
sql>select * from schema_names;
+------------+------------------+----------+
| schema_nm | authorization_nm | owner_nm |
+============+==================+==========+
| kxn_schema | kxn_user | monetdb |
| kxn_user | kxn_user | monetdb |
+------------+------------------+----------+
2 tuples
sql>ALTER SCHEMA kxn_schema AUTHORIZATION TO kxn_user;
syntax error, unexpected AUTHORIZATION, expecting RENAME in: "alter schema kxn_schema authorization"
sql>ALTER SCHEMA kxn_user AUTHORIZATION TO kxn_user;
syntax error, unexpected AUTHORIZATION, expecting RENAME in: "alter schema kxn_user authorization"
sql>ALTER SCHEMA kxn_schema OWNER TO kxn_user;
syntax error, unexpected IDENT, expecting RENAME in: "alter schema kxn_schema owner"
sql>ALTER SCHEMA kxn_user OWNER TO kxn_user;
syntax error, unexpected IDENT, expecting RENAME in: "alter schema kxn_user owner"
sql>select * from schema_names;
+------------+------------------+----------+
| schema_nm | authorization_nm | owner_nm |
+============+==================+==========+
| kxn_schema | kxn_user | monetdb |
| kxn_user | kxn_user | monetdb |
+------------+------------------+----------+
2 tuples
sql>DROP SCHEMA kxn_user;
operation successful
sql>DROP SCHEMA kxn_schema;
operation successful
sql>DROP USER kxn_user;
operation successful
sql>select * from schema_names;
+-----------+------------------+----------+
| schema_nm | authorization_nm | owner_nm |
+===========+==================+==========+
+-----------+------------------+----------+
0 tuples
sql>
sql>DROP VIEW schema_names;
operation successful
sql>
### Expected Results:
sql>CREATE or replace VIEW schema_names as
more>select s.name as schema_nm, auth.name as authorization_nm, ownr.name as owner_nm
more> from schemas s
more> join auths auth on s.authorization = auth.id
more> join auths ownr on s.owner = ownr.id
more>where not s.system
more>order by s.name;
operation successful
sql>
sql>select * from schema_names;
+-----------+------------------+----------+
| schema_nm | authorization_nm | owner_nm |
+===========+==================+==========+
+-----------+------------------+----------+
0 tuples
sql>CREATE USER kxn_user WITH UNENCRYPTED PASSWORD 'monetdb' NAME 'kxn' SCHEMA sys;
operation successful
sql>CREATE SCHEMA kxn_schema AUTHORIZATION kxn_user;
operation successful
sql>select * from schema_names;
+------------+------------------+----------+
| schema_nm | authorization_nm | owner_nm |
+============+==================+==========+
| kxn_schema | kxn_user | monetdb |
+------------+------------------+----------+
1 tuple
sql>CREATE SCHEMA AUTHORIZATION kxn_user;
operation successful
sql>select * from schema_names;
+------------+------------------+----------+
| schema_nm | authorization_nm | owner_nm |
+============+==================+==========+
| kxn_schema | kxn_user | monetdb |
| kxn_user | kxn_user | monetdb |
+------------+------------------+----------+
2 tuples
sql>ALTER SCHEMA kxn_schema AUTHORIZATION TO monetdb;
operation successful
sql>ALTER SCHEMA kxn_user AUTHORIZATION TO monetdb;
operation successful
sql>select * from schema_names;
+------------+------------------+----------+
| schema_nm | authorization_nm | owner_nm |
+============+==================+==========+
| kxn_schema | monetdb | monetdb |
| kxn_user | monetdb | monetdb |
+------------+------------------+----------+
2 tuples
sql>ALTER SCHEMA kxn_schema AUTHORIZATION TO kxn_user;
operation successful
sql>ALTER SCHEMA kxn_user AUTHORIZATION TO kxn_user;
operation successful
sql>ALTER SCHEMA kxn_schema OWNER TO kxn_user;
operation successful
sql>ALTER SCHEMA kxn_user OWNER TO kxn_user;
operation successful
sql>select * from schema_names;
+------------+------------------+----------+
| schema_nm | authorization_nm | owner_nm |
+============+==================+==========+
| kxn_schema | kxn_user | kxn_user |
| kxn_user | kxn_user | kxn_user |
+------------+------------------+----------+
2 tuples
sql>DROP SCHEMA kxn_user;
operation successful
sql>DROP SCHEMA kxn_schema;
operation successful
sql>DROP USER kxn_user;
operation successful
sql>select * from schema_names;
+-----------+------------------+----------+
| schema_nm | authorization_nm | owner_nm |
+===========+==================+==========+
+-----------+------------------+----------+
0 tuples
sql>
sql>DROP VIEW schema_names;
operation successful
sql>
https://www.postgresql.org/docs/12/sql-alterschema.html
| Add support for altering the authorization and/or owner of a schema | https://api.github.com/repos/MonetDB/MonetDB/issues/6952/comments | 0 | 2020-11-30T17:00:46Z | 2024-06-28T10:10:51Z | https://github.com/MonetDB/MonetDB/issues/6952 | 753,645,447 | 6,952 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-08-18 18:19:27 +0200
From: @mlkersten
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2020-10-19 11:06:19 +0200
## Comment 27992
Date: 2020-08-18 18:19:27 +0200
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Firefox/78.0
Build Identifier:
The mal blocks generated by SQL are all added to the namespace structure, where they remain forever. This results in a growing symbol table.
Perhaps a more conservative name space can be used for SQL query names
Reproducible: Always
## Comment 28089
Date: 2020-09-15 14:29:26 +0200
From: @njnes
no longer issue in oct2020 and up
| Use a different naming scheme for MAL blocks | https://api.github.com/repos/MonetDB/MonetDB/issues/6951/comments | 0 | 2020-11-30T17:00:44Z | 2024-06-27T13:10:00Z | https://github.com/MonetDB/MonetDB/issues/6951 | 753,645,415 | 6,951 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-08-17 23:56:02 +0200
From: @drstmane
To: GDK devs <<bugs-common>>
Version: 11.37.11 (Jun2020-SP1)
Last updated: 2020-10-19 11:06:20 +0200
## Comment 27987
Date: 2020-08-17 23:56:02 +0200
From: @drstmane
Created attachment 690
patch to remove redundant code line
IMHO, there is a redundant/replicated code line in macro finishhash() in gdk/gdk_hash.c (lines 686 & 687 are identical):
$ grep -n4 'c = hash_TYPE(h, v + o - b->hseqbase);' gdk/gdk_hash.c
657-define starthash(TYPE) \
658- do { \
659- const TYPE *restrict v = (const TYPE *) BUNtloc(bi, 0); \
660- for (; p < cnt1; p++) { \
661: c = hash_TYPE(h, v + o - b->hseqbase); \
662- hget = HASHget(h, c); \
663- if (hget == hnil) { \
664- if (h->nheads == maxslots) \
665- break; /* mask too full */ \
--
682-define finishhash(TYPE) \
683- do { \
684- const TYPE *restrict v = (const TYPE *) BUNtloc(bi, 0); \
685- for (; p < ci->ncand; p++) { \
686: c = hash_TYPE(h, v + o - b->hseqbase); \
687: c = hash_TYPE(h, v + o - b->hseqbase); \
688- hget = HASHget(h, c); \
689- h->nheads += hget == hnil; \
690- for (hb = hget; \
691- hb != hnil; \
Apparently, this replicated line sneaked-in with changeset [edd0e661b477](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=edd0e661b477) on branch candidate-exceptions on Thu, 01 Aug 2019; cf.,
https://dev.monetdb.org/hg/MonetDB/rev/edd0e661b477
If indeed redundant, a potential patch is attached.
> Attached file: [gdh_hash.c-finishhash-remove-redundant-line.patch](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6950_gdh_hash.c-finishhash-remove-redundant-line.patch_690) (text/plain, 445 bytes)
> Description: patch to remove redundant code line
## Comment 27991
Date: 2020-08-18 16:52:54 +0200
From: @sjoerdmullender
Fixed in changeset [8f1c162d0237](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8f1c162d0237)
| redundant/replicated code line in gdk/gdk_hash.c | https://api.github.com/repos/MonetDB/MonetDB/issues/6950/comments | 0 | 2020-11-30T17:00:41Z | 2024-06-27T13:09:59Z | https://github.com/MonetDB/MonetDB/issues/6950 | 753,645,372 | 6,950 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-08-14 16:38:55 +0200
From: @mlkersten
To: MonetDB5 devs <<bugs-monetdb5>>
Version: -- development
Last updated: 2020-10-19 11:06:21 +0200
## Comment 27980
Date: 2020-08-14 16:38:55 +0200
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Firefox/78.0
Build Identifier:
The recent change to use CLOCK_REALTIME_COARSE looses precision in
1) SQL performance timing
2) MAL profiler
3) MAL optimizer timing reporting
Reproducible: Always
| Loosing timing precision | https://api.github.com/repos/MonetDB/MonetDB/issues/6949/comments | 0 | 2020-11-30T17:00:38Z | 2024-06-27T13:09:58Z | https://github.com/MonetDB/MonetDB/issues/6949 | 753,645,322 | 6,949 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-08-13 16:27:13 +0200
From: @kutsurak
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
Last updated: 2020-10-19 11:06:20 +0200
## Comment 27979
Date: 2020-08-13 16:27:13 +0200
From: @kutsurak
Created attachment 688
failing msqldump script
MonetDB fails to execute the attached sql script, which was produced using msqldump.
> Attached file: [buggy_msqldump.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6948_buggy_msqldump.sql_688) (application/sql, 598 bytes)
> Description: failing msqldump script
## Comment 27981
Date: 2020-08-14 17:31:24 +0200
From: @kutsurak
Test: https://dev.monetdb.org/hg/MonetDB/rev/ed5d68078986
## Comment 28002
Date: 2020-08-21 16:46:57 +0200
From: @kutsurak
Fixed in atom_strings branch and propagated to default and Oct2020
| msqldump with Empty BLOBs cannot be imported | https://api.github.com/repos/MonetDB/MonetDB/issues/6948/comments | 0 | 2020-11-30T17:00:36Z | 2024-06-27T13:09:57Z | https://github.com/MonetDB/MonetDB/issues/6948 | 753,645,290 | 6,948 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-08-13 12:42:40 +0200
From: @mlkersten
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2020-08-13 12:42:40 +0200
## Comment 27977
Date: 2020-08-13 12:42:40 +0200
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Firefox/78.0
Build Identifier:
If the user types "CREATE INDEX my ON tbl(x)" nothing will happen, because this instruction is considered by the system as a no-op. A warning should be issued instead of staying silent.
Likewise, a warning should be given if you create an ordered index, because it will disappear upon update.
Reproducible: Always
| Create index warnings | https://api.github.com/repos/MonetDB/MonetDB/issues/6947/comments | 0 | 2020-11-30T17:00:33Z | 2024-06-28T10:11:04Z | https://github.com/MonetDB/MonetDB/issues/6947 | 753,645,254 | 6,947 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-08-13 12:35:53 +0200
From: @mlkersten
To: MonetDB5 devs <<bugs-monetdb5>>
Version: -- development
Last updated: 2020-08-13 12:35:53 +0200
## Comment 27976
Date: 2020-08-13 12:35:53 +0200
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Firefox/78.0
Build Identifier:
A sample.subuniform operation over a merge table might be replaced by an independent sample.subuniform on each part, pack all of them, and do the final sample.uniform on the combined result
Reproducible: Always
| Subuniform missed in mergetable optimizer | https://api.github.com/repos/MonetDB/MonetDB/issues/6946/comments | 0 | 2020-11-30T17:00:30Z | 2024-06-28T13:06:10Z | https://github.com/MonetDB/MonetDB/issues/6946 | 753,645,215 | 6,946 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-08-13 06:01:12 +0200
From: Alex Ossipov <<alexo15>>
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
CC: @PedroTadim
Last updated: 2020-08-18 16:53:35 +0200
## Comment 27975
Date: 2020-08-13 06:01:12 +0200
From: Alex Ossipov <<alexo15>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36
Build Identifier:
I want to exclude records that do not match condition in next query:
select a from t where a not in (select b in t)
It does not properly handle nulls returning nothing while there are rows with satisfying condition
Reproducible: Always
### Steps to Reproduce:
1. create table test (a varchar(80),b varchar(80));
2. insert into test values('1','2');
3. select b from test where b not in (select a from test );
output: 2
4. insert into test values(null,'3');
5. select b from test where b not in (select a from test )
wrong output: none while expecting 2 and 3
6. select b from test where b not in (select coalesce(a,'') from test );
correct output: 2,3
query in step 5 should return the same results as query in step 6
## Comment 27983
Date: 2020-08-16 10:02:26 +0200
From: @PedroTadim
Hello Alex,
After analyzing your queries, I can conclude MonetDB's output is right. Because of the NULL value introduced in column 'a', at query 5 the output of NOT IN for both column 'b' values will be NULL (it can't conclude they aren't on the set because of the NULL value). Consequentially, NULL values don't match in the where clause, so the output of query 5 is empty.
Best regards,
Pedro
## Comment 27988
Date: 2020-08-18 06:14:31 +0200
From: Alex Ossipov <<alexo15>>
Hi Pedro
Thank you for confirmation. At first, I thought it was against common sense but it does work properly.
Sorry for the false alarm
Alex
| not in statements incorrectly handle nulls | https://api.github.com/repos/MonetDB/MonetDB/issues/6945/comments | 0 | 2020-11-30T17:00:28Z | 2024-06-28T13:07:52Z | https://github.com/MonetDB/MonetDB/issues/6945 | 753,645,179 | 6,945 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-08-11 02:11:46 +0200
From: Alex Ossipov <<alexo15>>
To: Merovingian devs <<bugs-merovingian>>
Version: 11.37.11 (Jun2020-SP1)
CC: @kutsurak, @PedroTadim
Last updated: 2020-10-19 21:17:59 +0200
## Comment 27973
Date: 2020-08-11 02:11:46 +0200
From: Alex Ossipov <<alexo15>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36
Build Identifier:
I am not able to change listenaddr values to point to ipv6 hostname
Reproducible: Always
### Steps to Reproduce:
1. Built from latest source.
2. ./monetdbd set listenaddr='abc.mycompany.com' /data/monetdb/databases
### Actual Results:
here is error:
set: failed to set property listenaddr: only valid values for listenaddr are "127.0.0.1" or "0.0.0.0"
prior version did not have this problem
## Comment 27974
Date: 2020-08-12 18:32:54 +0200
From: @kutsurak
The value of `listenaddr` instructs monetdbd to listen for connections either to the loopback interface if the value is 127.0.0.1 or to a network interface if it is 0.0.0.0. Other values are meaningless and this is what the error message reflects.
The issuing of this error message is relatively recent: it was introduced i. Before that you could set `listenaddr` to any value but it did not have any effect (I believe it defaulted to 127.0.0.1). Now it is explicitly an error if the value is something different.
I think that we should allow the IPv6 equivalent values as well (i.e. ::1 and ::). I am going to implement this.
From a brief look this also seems like a bug in the manual page of monetdbd.
## Comment 27982
Date: 2020-08-14 19:01:33 +0200
From: Alex Ossipov <<alexo15>>
Is there any ETA to when this fix will be available? I am not able to connect to server since my ipv6 only environment due to this issue.
## Comment 27985
Date: 2020-08-17 09:50:15 +0200
From: @kutsurak
Hi I have a small patch for this that mostly, but not entirely, works. Taking into account some other work I need to do I will try to fix this in the next couple of days.
## Comment 28003
Date: 2020-08-21 17:08:31 +0200
From: @kutsurak
Hi,
We revamped the handling of IPv{4,6} in the server and the daemon a bit. These changes are currently in the Oct2020 branch and will eventually land in the default branch soon (either later today or on Monday).
The property listenaddr of the daemon now accepts the following values:
- ::1, :: (bind only ipv6 interfaces)
- 127.0.0.1, 0.0.0.0 (bind only ipv4 interfaces)
- localhost, all (bind both ipv4 and ipv6 interfaces)
The property ipv6 of the daemon has been removed.
## Comment 28006
Date: 2020-08-22 18:33:11 +0200
From: Alex Ossipov <<alexo15>>
Will I be able to remotely connect if only localhost options are left?
I am currently using hostname resolved to ipv6 only.
## Comment 28007
Date: 2020-08-23 12:34:12 +0200
From: @sjoerdmullender
As Panagiotis wrote:
"The property listenaddr of the daemon now accepts the following values:
- ::1, :: (bind only ipv6 interfaces)
- 127.0.0.1, 0.0.0.0 (bind only ipv4 interfaces)
- localhost, all (bind both ipv4 and ipv6 interfaces)"
Another way of looking at this is:
- ::1, 127.0.0.1, localhost bind to loopback interface only
- ::, 0.0.0.0, all bind to all interfaces
| IPV6 related | https://api.github.com/repos/MonetDB/MonetDB/issues/6944/comments | 0 | 2020-11-30T17:00:25Z | 2024-06-27T13:09:53Z | https://github.com/MonetDB/MonetDB/issues/6944 | 753,645,141 | 6,944 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-08-05 16:22:50 +0200
From: @kutsurak
To: SQL devs <<bugs-sql>>
Version: 11.37.11 (Jun2020-SP1)
Last updated: 2020-10-19 11:06:21 +0200
## Comment 27971
Date: 2020-08-05 16:22:50 +0200
From: @kutsurak
The JSON parser accepts the following while it should not:
select json.isvalid('{"str":"str":"str":"str"}'); -- true
select json.isvalid('"str":"str"'); -- true
etc
The problem is that the recursive descent parser accepts the token ':' after the end of any string.
## Comment 27978
Date: 2020-08-13 16:06:58 +0200
From: @kutsurak
Test: https://dev.monetdb.org/hg/MonetDB/rev/36c85bacfd35
Fix: https://dev.monetdb.org/hg/MonetDB/rev/d2a1dd68289a
| JSON parser is too permissive | https://api.github.com/repos/MonetDB/MonetDB/issues/6943/comments | 0 | 2020-11-30T17:00:22Z | 2024-06-27T13:09:52Z | https://github.com/MonetDB/MonetDB/issues/6943 | 753,645,110 | 6,943 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-29 11:38:14 +0200
From: Daniel Glöckner <<gloeckner.daniel>>
To: SQL devs <<bugs-sql>>
Version: 11.37.7 (Jun2020)
CC: @njnes, @PedroTadim
Last updated: 2020-09-01 10:47:56 +0200
## Comment 27959
Date: 2020-07-29 11:38:14 +0200
From: Daniel Glöckner <<gloeckner.daniel>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36
Build Identifier:
I created a simple 2 node setup for MonetDB. There's a small overhead for SELECT queries targeting remote tables. It's in the range of 70 ms in my case when comparing timings local vs. remote execution of the same query. However, when CLOB columns are selected there's a significant performance degradation which seems to be _proportional to the total amount of data in the table_.
I've executed the test below with a smaller table (5 mio records) and noticed a delay of 1.5 seconds. For 50 million records the delay is ~20 seconds. Note: in both cases the nr of returned records where limited to 50.
When selecting columns of different data types (integer, real) there is no performance degradation.
Reproducible: Always
### Steps to Reproduce:
Use mclient to connect to a remote MonetDB instance
CREATE FUNCTION random_integers(low INTEGER, high INTEGER, amount INTEGER)
RETURNS TABLE(value INTEGER)
LANGUAGE PYTHON {
return numpy.random.randint(low, high, size=(amount,))
};
create table values_node2 as (SELECT value as value_int, md5(rand()) as value_clob, cast(rand() as real) as value_double FROM random_integers(0, 10, 5000000));
Connect to local another MonetDB instance
create remote table values_node2 (value_int integer, value_clob clob, value_double real) on 'mapi:monetdb://10.157.131.25:50000/daal';
select value_int from values_node2 limit 50;
select value_double from values_node2 limit 50;
select value_clob from values_node2 limit 50;
### Actual Results:
select value_int from values_node2 limit 50; completes in 20 ms for 50 mio records
select value_double from values_node2 limit 50; completes in 70 ms for 50 mio records
select value_clob from values_node2 limit 50; completes in 15 seconds! for 50 mio records
### Expected Results:
select value_clob from values_node2 limit 50; completes in < 100 ms for the given data and hardware
The problematic query is executed in 2 ms when it's a local query. This is definitely related to remote tables / remote queries.
## Comment 27960
Date: 2020-07-29 12:03:29 +0200
From: Daniel Glöckner <<gloeckner.daniel>>
Note: this issue is also reproducible with VARCHAR data type.
## Comment 27961
Date: 2020-07-29 13:03:42 +0200
From: Daniel Glöckner <<gloeckner.daniel>>
When using CHARACTER data type this issue does not occur:
Following query takes 1.5 seconds on 5 million records.
select value_clob from values_node2 limit 50;
When casting the query takes only 18 ms.
select cast(value_clob as character(50)) from values_node2 limit 50;
## Comment 27962
Date: 2020-07-29 21:18:47 +0200
From: @PedroTadim
I find this strange because in the backend, all char related types are treated the same. Can you show both the plan and explain output of both the fast and slow queries?
## Comment 27963
Date: 2020-07-30 10:15:05 +0200
From: Daniel Glöckner <<gloeckner.daniel>>
Hi Pedro,
thanks for looking into this.
Here's the requested information:
sql>select value_int from values_node2 limit 10;
+-----------+
| value_int |
+===========+
| 8 |
| 2 |
| 9 |
| 4 |
| 1 |
| 6 |
| 5 |
| 4 |
| 9 |
| 2 |
+-----------+
10 tuples
clk: 34.150 ms
sql>select value_clob from values_node2 limit 10;
+----------------------------------+
| value_clob |
+==================================+
| f261c58072cbc937a5e2452b50d60e39 |
| 23587ca4c40216a117f6501faeb35a9e |
| 78e51806766f2d449fd9eecd39ec76c8 |
| 5b4ddd351ec1fa1c6550c7b6c8bd85ca |
| 207430261937a164846bb2054aac1519 |
| 8d702bd5c0e82190c4277fe71f51a68e |
| cef1fdfe568f5aab20730a42d3666077 |
| c5ee57e71304652cafba5ad96d44f954 |
| 305e48176f4597a4cafbaa66f8429881 |
| 0f1d7e20b44f5105f66240250c6a63a4 |
+----------------------------------+
10 tuples
clk: 1.491 sec
sql>explain select value_int from values_node2 limit 10;
+-------------------------------------------------------------------------------------------------------------------+
| mal |
+===================================================================================================================+
| function user.s602_1():void; |
| X_1:void := querylog.define("select value_int from values_node2 limit 10;":str, "default_pipe":str, 12:int); |
| barrier X_69:bit := language.dataflow(); |
| X_10:bat[:str] := bat.pack(".values_node2":str); |
| X_11:bat[:str] := bat.pack("value_int":str); |
| X_12:bat[:str] := bat.pack("int":str); |
| X_13:bat[:int] := bat.pack(32:int); |
| X_14:bat[:int] := bat.pack(0:int); |
| X_6:bat[:int] := user.%204(); |
| exit X_69:bit; |
| sql.resultSet(X_10:bat[:str], X_11:bat[:str], X_12:bat[:str], X_13:bat[:int], X_14:bat[:int], X_6:bat[:int]); |
| end user.s602_1; |
| inline actions= 0 time=1 usec |
| remap actions= 0 time=1 usec |
| costmodel actions= 1 time=1 usec |
| coercion actions= 1 time=2 usec |
| aliases actions= 1 time=3 usec |
| evaluate actions= 0 time=3 usec |
| emptybind actions= 0 time=0 usec |
| pushselect actions= 0 time=7 usec |
| aliases actions= 0 time=0 usec |
| mitosis actions=1 time=0 usec |
| mergetable actions= 0 time=17 usec |
| deadcode actions= 1 time=4 usec |
| aliases actions= 0 time=0 usec |
| constants actions= 0 time=2 usec |
| commonTerms actions= 0 time=3 usec |
| projectionpath actions= 0 time=1 usec |
| deadcode actions= 0 time=1 usec |
| reorder actions= 1 time=6 usec |
| matpack actions= 0 time=0 usec |
| dataflow actions= 1 time=8 usec |
| multiplex actions= 0 time=0 usec |
| profiler actions= 1 time=0 usec |
| candidates actions= 1 time=0 usec |
| deadcode actions= 0 time=2 usec |
| postfix actions= 0 time=1 usec |
| wlc actions= 0 time=2 usec |
| garbagecollector actions= 1 time=11 usec |
| total actions=29 time=130 usec |
+-------------------------------------------------------------------------------------------------------------------+
40 tuples
clk: 1.820 ms
sql>explain select value_clob from values_node2 limit 10;
+-------------------------------------------------------------------------------------------------------------------+
| mal |
+===================================================================================================================+
| function user.s610_1():void; |
| X_1:void := querylog.define("select value_clob from values_node2 limit 10;":str, "default_pipe":str, 12:int); |
| barrier X_69:bit := language.dataflow(); |
| X_10:bat[:str] := bat.pack(".values_node2":str); |
| X_11:bat[:str] := bat.pack("value_clob":str); |
| X_12:bat[:str] := bat.pack("varchar":str); |
| X_13:bat[:int] := bat.pack(2048:int); |
| X_14:bat[:int] := bat.pack(0:int); |
| X_6:bat[:str] := user.%210(); |
| exit X_69:bit; |
| sql.resultSet(X_10:bat[:str], X_11:bat[:str], X_12:bat[:str], X_13:bat[:int], X_14:bat[:int], X_6:bat[:str]); |
| end user.s610_1; |
| inline actions= 0 time=1 usec |
| remap actions= 0 time=1 usec |
| costmodel actions= 1 time=1 usec |
| coercion actions= 1 time=6 usec |
| aliases actions= 1 time=5 usec |
| evaluate actions= 0 time=5 usec |
| emptybind actions= 0 time=0 usec |
| pushselect actions= 0 time=13 usec |
| aliases actions= 0 time=0 usec |
| mitosis actions=1 time=1 usec |
| mergetable actions= 0 time=23 usec |
| deadcode actions= 1 time=8 usec |
| aliases actions= 0 time=1 usec |
| constants actions= 0 time=3 usec |
| commonTerms actions= 0 time=7 usec |
| projectionpath actions= 0 time=3 usec |
| deadcode actions= 0 time=7 usec |
| reorder actions= 1 time=20 usec |
| matpack actions= 0 time=0 usec |
| dataflow actions= 1 time=16 usec |
| multiplex actions= 0 time=2 usec |
| profiler actions= 1 time=1 usec |
| candidates actions= 1 time=1 usec |
| deadcode actions= 0 time=7 usec |
| postfix actions= 0 time=3 usec |
| wlc actions= 0 time=2 usec |
| garbagecollector actions= 1 time=33 usec |
| total actions=29 time=309 usec |
+-------------------------------------------------------------------------------------------------------------------+
40 tuples
clk: 3.076 ms
## Comment 27964
Date: 2020-07-30 10:16:25 +0200
From: Daniel Glöckner <<gloeckner.daniel>>
If you want to try it out yourself (on your hardware) you may just paste the SQL and UDF given in steps to reproduce ;)
## Comment 27970
Date: 2020-08-04 12:06:25 +0200
From: @PedroTadim
The plan just shows the remote table call. I have to test this by myself to evidence the performance issue.
## Comment 27986
Date: 2020-08-17 16:36:32 +0200
From: Daniel Glöckner <<gloeckner.daniel>>
Hi Pedro,
are you planing to look into this?
For us this is a blocker for evaluating MonetDB unfortunately :(
## Comment 27989
Date: 2020-08-18 10:29:22 +0200
From: @PedroTadim
Despite being in Holiday this week and you not paying consulting hours for our company, I will do it today if I have time :)
## Comment 28025
Date: 2020-08-31 15:22:47 +0200
From: @njnes
Found a problem, ie the remote code sends the full input column;s vheap back.
## Comment 28026
Date: 2020-08-31 16:12:59 +0200
From: Daniel Glöckner <<gloeckner.daniel>>
Hi Niels,
thanks a lot for looking into this.
Your finding might very well explain why the reponse time of my example queries was proportional to the input table size, not to the size of the returned records.
Looking forward to test a fix in our setup!
## Comment 28036
Date: 2020-08-31 17:46:24 +0200
From: @njnes
pused a fix for this issue, ie only send as much data as needed. Please let us know if this solves the issue.
## Comment 28037
Date: 2020-08-31 17:47:09 +0200
From: @njnes
fix was push on the oct2020 branch.
## Comment 28042
Date: 2020-09-01 10:47:56 +0200
From: Daniel Glöckner <<gloeckner.daniel>>
This is working fine on our end. Tested with a recent build of Oct202 branch, git HEAD is at dccd4bd71098fb2022490c34023cfce5c1cc0964.
Thanks a lot for fixing this, guys!
| Performance degradation for remote tables when using CLOB data type | https://api.github.com/repos/MonetDB/MonetDB/issues/6942/comments | 0 | 2020-11-30T17:00:19Z | 2024-06-27T13:09:51Z | https://github.com/MonetDB/MonetDB/issues/6942 | 753,645,065 | 6,942 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-29 09:23:47 +0200
From: Daniel Glöckner <<gloeckner.daniel>>
To: SQL devs <<bugs-sql>>
Version: 11.37.7 (Jun2020)
CC: @PedroTadim
Last updated: 2020-10-19 11:06:22 +0200
## Comment 27954
Date: 2020-07-29 09:23:47 +0200
From: Daniel Glöckner <<gloeckner.daniel>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36
Build Identifier:
When using LIKE in WHERE conditions in SELECT statements on remote tables MonetDB reports the error: "Filter: missing function 'like'"
Reproducible: Always
### Steps to Reproduce:
### Steps to reproduce:
Open mclient connected to monetdb instance 1
create table remote_data (id int, name varchar(2048));
insert into remote_data values (1, 'Name 1');
Open mclient connected to monetdb instance 2
create remote table remote_data (id int, name varchar(2048)) on 'mapi:monetdb://$host:$port/$databasename';
select * from remote_data where name like 'N%';
### Actual Results:
(mapi:monetdb://monetdb@$host/$database) Filter: missing function 'like'
### Expected Results:
1 record is returned for the given test data
## Comment 27958
Date: 2020-07-29 11:12:44 +0200
From: @PedroTadim
I just fixed this issue. Thanks for the bug report. It will be available at the next release.
## Comment 28043
Date: 2020-09-01 10:51:06 +0200
From: Daniel Glöckner <<gloeckner.daniel>>
This is working fine on our end. Tested with a recent build of Oct202 branch, git HEAD is at dccd4bd71098fb2022490c34023cfce5c1cc0964.
Thanks a lot for fixing this, guys!
| SELECT queries on remote table fail when using LIKE in WHERE conditions | https://api.github.com/repos/MonetDB/MonetDB/issues/6941/comments | 0 | 2020-11-30T17:00:15Z | 2024-06-27T13:09:50Z | https://github.com/MonetDB/MonetDB/issues/6941 | 753,645,024 | 6,941 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-29 06:25:18 +0200
From: justin.jin
To: SQL devs <<bugs-sql>>
Version: 11.35.19 (Nov2019-SP3)
Last updated: 2020-07-29 10:10:01 +0200
## Comment 27952
Date: 2020-07-29 06:25:18 +0200
From: justin.jin
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
Build Identifier:
I try to use sys.date_to_str(). But all the result is 'cannot convert date'
I found a sample sql in https://www.monetdb.org/Documentation/ServerAdministration/DateTimeFunctionality
that is:
SELECT departure_timestamp,
date_to_str(departure_date, '%Y-%m-%d') AS "date",
time_to_str(departure_time, '%H:%M') AS "time",
timestamp_to_str(departure_timestamp, '%Y-%m-%d %H:%M') AS "timestamp"
FROM voyages LIMIT 3;
I dump the same 'voyages' table and reduce the sql to:
SELECT
sys.date_to_str(departure_date, '%Y-%m-%d') AS "date"
FROM voyages LIMIT 3;
and still got "cannot convert date"
Reproducible: Always
### Steps to Reproduce:
1. Dump the sample 'voyages'table
2. try "SELECT sys.date_to_str(departure_date, '%Y-%m-%d') AS "date" FROM voyages LIMIT 3;"
3. NG
### Actual Results:
cannot convert date
### Expected Results:
convert date to string successfully
I tried below sql:
SELECT sys.str_to_date(sys.date_to_str(date '2020-03-31', '%Y-%m'), '%Y-%m') + INTERVAL '3' MONTH AS "date";
it works fine and get:
+------------+
| date |
+============+
| 2020-06-00 |
+------------+
## Comment 27953
Date: 2020-07-29 09:07:09 +0200
From: @sjoerdmullender
This works in the Jun2020 release.
The problem was that in the Nov2019 release, conversion from the internal format to a format that the strftime function can deal with (the library function that does the actual formatting) went through a function that limits the timestamps to ones after Jan 1 1970. In the Jun2020 release this was fixed.
## Comment 27955
Date: 2020-07-29 09:30:46 +0200
From: justin.jin
(In reply to Sjoerd Mullender from comment 1)
> This works in the Jun2020 release.
> The problem was that in the Nov2019 release, conversion from the internal
> format to a format that the strftime function can deal with (the library
> function that does the actual formatting) went through a function that
> limits the timestamps to ones after Jan 1 1970. In the Jun2020 release this
> was fixed.
Thanks for your quick response!!
I try to upgrade monetdb by "brew upgrade monetdb".
But it seems only upgrade the interactive terminal.
after connet db with mclient:
Welcome to mclient, the MonetDB/SQL interactive terminal (Jun2020-SP1)
Database: MonetDB v11.35.19 (Nov2019-SP3), 'mapi:monetdb://myMBP:50000/voc'
FOLLOW US on https://twitter.com/MonetDB or https://github.com/MonetDB/MonetDB
I also try uninstall and install monetdb again, but the version is still v11.35.19.
What should I do to upgrade monetdb to latest version?
## Comment 27956
Date: 2020-07-29 09:40:58 +0200
From: justin.jin
(In reply to justin.jin from comment 2)
> (In reply to Sjoerd Mullender from comment 1)
> > This works in the Jun2020 release.
> > The problem was that in the Nov2019 release, conversion from the internal
> > format to a format that the strftime function can deal with (the library
> > function that does the actual formatting) went through a function that
> > limits the timestamps to ones after Jan 1 1970. In the Jun2020 release this
> > was fixed.
>
> Thanks for your quick response!!
>
> I try to upgrade monetdb by "brew upgrade monetdb".
> But it seems only upgrade the interactive terminal.
>
> after connet db with mclient:
> Welcome to mclient, the MonetDB/SQL interactive terminal (Jun2020-SP1)
> Database: MonetDB v11.35.19 (Nov2019-SP3), 'mapi:monetdb://myMBP:50000/voc'
> FOLLOW US on https://twitter.com/MonetDB or
> https://github.com/MonetDB/MonetDB
>
> I also try uninstall and install monetdb again, but the version is still
> v11.35.19.
> What should I do to upgrade monetdb to latest version?
After remove exited dbfram and add a new one, the version is v11.37.11 now.
And the bug is fixed too.
Thanks for your great work!
## Comment 27957
Date: 2020-07-29 10:10:01 +0200
From: @sjoerdmullender
(In reply to justin.jin from comment 2)
> I try to upgrade monetdb by "brew upgrade monetdb".
> But it seems only upgrade the interactive terminal.
>
> after connet db with mclient:
> Welcome to mclient, the MonetDB/SQL interactive terminal (Jun2020-SP1)
> Database: MonetDB v11.35.19 (Nov2019-SP3), 'mapi:monetdb://myMBP:50000/voc'
> FOLLOW US on https://twitter.com/MonetDB or
> https://github.com/MonetDB/MonetDB
>
> I also try uninstall and install monetdb again, but the version is still
> v11.35.19.
> What should I do to upgrade monetdb to latest version?
What may have happened here is that the server process (mserver5) was not restarted after the upgrade. So you were indeed still running the old server.
In any case, I'm glad it's solved for you, so I'll close the ticket.
| sys.date_to_str(): cannot convert date | https://api.github.com/repos/MonetDB/MonetDB/issues/6940/comments | 0 | 2020-11-30T17:00:12Z | 2024-06-27T13:09:49Z | https://github.com/MonetDB/MonetDB/issues/6940 | 753,644,977 | 6,940 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-28 21:07:07 +0200
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <<bugs-sql>>
Version: 11.37.7 (Jun2020)
CC: @PedroTadim
Last updated: 2020-10-19 11:06:21 +0200
## Comment 27950
Date: 2020-07-28 21:07:07 +0200
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:78.0) Gecko/20100101 Firefox/78.0
Build Identifier:
Following queries show errors in optimizer multiplex:
select profiler.getlimit();
select wlc.clock();
select wlc.tick();
select wlr.clock();
select wlr.tick();
Expected to get a (default) value returned.
Reproducible: Always
### Steps to Reproduce:
select profiler.getlimit();
select wlc.clock();
select wlc.tick();
select wlr.clock();
select wlr.tick();
### Actual Results:
sql>select profiler.getlimit();
Error in optimizer multiplex: TypeException:user.s6_0[11]:'profiler.getlimit' undefined in: profiler.getlimit(X_46:int);
sql>select wlc.clock();
Error in optimizer multiplex: TypeException:user.s8_0[10]:'wlc.getclock' undefined in: wlc.getclock(X_45:int);
sql>select wlc.tick();
Error in optimizer multiplex: TypeException:user.s10_0[11]:'wlc.gettick' undefined in: wlc.gettick(X_46:int);
sql>select wlr.clock();
Error in optimizer multiplex: TypeException:user.s12_0[10]:'wlr.getclock' undefined in: wlr.getclock(X_45:int);
sql>select wlr.tick();
Error in optimizer multiplex: TypeException:user.s14_0[11]:'wlr.gettick' undefined in: wlr.gettick(X_46:int);
sql>
### Expected Results:
No errors reported but values returned
## Comment 28062
Date: 2020-09-10 16:46:41 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [5b90753397b1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5b90753397b1) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug.
For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=5b90753397b1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=5b90753397b1)
Changeset description:
Add missing stable out and err files for bug #6939
## Comment 28087
Date: 2020-09-15 13:58:42 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [2de5428c21ec](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2de5428c21ec) 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=2de5428c21ec](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=2de5428c21ec)
Changeset description:
Fix for bug #6939, ie push left first column only if the cardinality is not atomic, otherwise is not required but the side-effect function will be called only once.
Also updated mvc_get_value and mvc_next_value error messages to pair with the bulk counterparts (This was uncovered while running tests).
## Comment 28088
Date: 2020-09-15 14:06:06 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [0618001bca38](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0618001bca38) 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=0618001bca38](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=0618001bca38)
Changeset description:
Queries similar to bug #6939 ending in MAL undefined errors
## Comment 28090
Date: 2020-09-16 12:42:08 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [6814048557bd](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6814048557bd) 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=6814048557bd](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=6814048557bd)
Changeset description:
We cannot assume every function with side effects and no arguments have a correspondent with 1 argument. Test for it. The 'rand' function is the exception. This fixes bug #6939
## Comment 28112
Date: 2020-09-23 15:23:52 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [b16d1540d82f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b16d1540d82f) 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=b16d1540d82f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=b16d1540d82f)
Changeset description:
Backported bug #6939 fix into Jun2020
| Error in optimizer multiplex when selecting profiler.getlimit() or wlc.clock() or wlc.tick() or wlr.clock() or wlr.tick() | https://api.github.com/repos/MonetDB/MonetDB/issues/6939/comments | 0 | 2020-11-30T17:00:09Z | 2024-06-27T13:09:48Z | https://github.com/MonetDB/MonetDB/issues/6939 | 753,644,939 | 6,939 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-28 16:45:15 +0200
From: Jaya Krishna <<rvinjamu>>
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 11.37.7 (Jun2020)
CC: @PedroTadim
Last updated: 2020-10-19 11:06:19 +0200
## Comment 27948
Date: 2020-07-28 16:45:15 +0200
From: Jaya Krishna <<rvinjamu>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0
Build Identifier:
Trying to explain/execute a specific query on TPCH-x data. It crashes mserver5 every time. Following is the stack trace from the core dump.
Storage: /var/lib/systemd/coredump/core.mserver5.974.996f490adbde4b37ade65737779bd504.20803.1595946389000000.lz4
Message: Process 20803 (mserver5) of user 974 dumped core.
Stack trace of thread 20820:
0 0x00007fee21d83a4e optimizeMALBlock (libmonetdb5.so.29)
1 0x00007fee1b76a63f SQLrun (lib_sql.so)
2 0x00007fee1b76ba56 SQLengineIntern (lib_sql.so)
3 0x00007fee21cd3c26 runPhase (libmonetdb5.so.29)
4 0x00007fee21cd410a MSserveClient (libmonetdb5.so.29)
5 0x00007fee21cd46b1 MSscheduleClient (libmonetdb5.so.29)
6 0x00007fee21d3316b doChallenge (libmonetdb5.so.29)
7 0x00007fee219b717f THRstarter (libbat.so.20)
8 0x00007fee219e4edd thread_starter (libbat.so.20)
9 0x00007fee1f1002de start_thread (libpthread.so.0)
10 0x00007fee1ee30a63 __clone (libc.so.6)
Stack trace of thread 20806:
0 0x00007fee1ee257e1 __poll (libc.so.6)
1 0x00007fee21d34963 poll (libmonetdb5.so.29)
2 0x00007fee219e4edd thread_starter (libbat.so.20)
3 0x00007fee1f1002de start_thread (libpthread.so.0)
4 0x00007fee1ee30a63 __clone (libc.so.6)
Stack trace of thread 20818:
0 0x00007fee1f10a210 __nanosleep (libpthread.so.0)
1 0x00007fee219e4c92 MT_sleep_ms (libbat.so.20)
2 0x00007fee1b88f664 store_manager (lib_sql.so)
3 0x00007fee219b717f THRstarter (libbat.so.20)
4 0x00007fee219e4edd thread_starter (libbat.so.20)
5 0x00007fee1f1002de start_thread (libpthread.so.0)
6 0x00007fee1ee30a63 __clone (libc.so.6)
Stack trace of thread 20821:
0 0x00007fee1ee257e1 __poll (libc.so.6)
1 0x00007fee212df369 socket_read (libstream.so.13)
2 0x00007fee212e1317 mnstr_readSht (libstream.so.13)
3 0x00007fee212e14f5 bs_read (libstream.so.13)
Reproducible: Always
### Steps to Reproduce:
1.Explain or execute the following query on TPCH-1 data. The TPCH scale does not matter.
SET SCHEMA tpchperf;
explain SELECT
DM_CustomerNation_N_NAME AS CustomerNation,
DM_CustomerRegion_R_NAME AS CustomerRegion,
avg(DM_Li_L_DISCOUNT) AS L_DISCOUNT_Customer_Nation_Supplier_Nation,
sum(DM_Li_L_QUANTITY) AS L_QUANTITY_Customer_Nation_Supplier_Nation,
O_ORDERDATE_Year,
DM_Nation_N_NAME AS SupplierNation,
DM_Region_R_NAME AS SupplierRegion
FROM
tpchperf.CUSTOMER
INNER JOIN
(
SELECT
DM_Li_L_DISCOUNT,
DM_Li_L_ORDERKEY,DM_Li_L_PARTKEY,
DM_Li_L_QUANTITY,
DM_Nation_N_NAME,
DM_Nation_N_NATIONKEY,DM_Nation_N_REGIONKEY,
DM_Orders_O_CUSTKEY,DM_Orders_O_ORDERDATE,
DM_Orders_O_ORDERKEY,
DM_Partsupp_PS_PARTKEY,
DM_Partsupp_PS_SUPPKEY,
DM_Region_R_NAME,
DM_Region_R_REGIONKEY,
S_NATIONKEY AS DM_Supplier_S_NATIONKEY,
S_SUPPKEY AS DM_Supplier_S_SUPPKEY,O_ORDERDATE_Year
FROM
tpchperf.SUPPLIER
INNER JOIN
(
SELECT
DM_Li_L_DISCOUNT,
DM_Li_L_ORDERKEY,DM_Li_L_PARTKEY,
DM_Li_L_QUANTITY,
PS_PARTKEY AS DM_Partsupp_PS_PARTKEY,PS_SUPPKEY AS DM_Partsupp_PS_SUPPKEY
FROM
tpchperf.PARTSUPP
INNER JOIN
(
SELECT
L_DISCOUNT AS DM_Li_L_DISCOUNT,
L_ORDERKEY AS DM_Li_L_ORDERKEY,
L_PARTKEY AS DM_Li_L_PARTKEY,
L_QUANTITY AS DM_Li_L_QUANTITY,
L_SUPPKEY AS DM_Li_L_SUPPKEY
FROM
tpchperf.LINEITEM
) AS LINEITEM
ON PS_SUPPKEY = DM_Li_L_SUPPKEY
AND PS_PARTKEY = DM_Li_L_PARTKEY
)
AS LINEITEMPARTSUPP
ON S_SUPPKEY = DM_Partsupp_PS_SUPPKEY
INNER JOIN
(
SELECT
N_NAME AS DM_Nation_N_NAME,
N_NATIONKEY AS DM_Nation_N_NATIONKEY,
N_REGIONKEY AS DM_Nation_N_REGIONKEY
FROM
tpchperf.NATION
)
AS NATION
ON S_NATIONKEY = DM_Nation_N_NATIONKEY
INNER JOIN
(
SELECT
R_NAME AS DM_Region_R_NAME,
R_REGIONKEY AS DM_Region_R_REGIONKEY
FROM
tpchperf.REGION
)
AS REGION
ON DM_Nation_N_REGIONKEY = DM_Region_R_REGIONKEY
INNER JOIN
(
SELECT
O_CUSTKEY AS DM_Orders_O_CUSTKEY,
O_ORDERDATE AS DM_Orders_O_ORDERDATE,
O_ORDERKEY AS DM_Orders_O_ORDERKEY,
O_TOTALPRICE AS DM_Orders_O_TOTALPRICE,
Extract(YEAR FROM O_ORDERDATE) AS O_ORDERDATE_Year
FROM
tpchperf.ORDERS
)
AS ORDERS
ON DM_Li_L_ORDERKEY = DM_Orders_O_ORDERKEY
)
AS CUSTOMERORDERDETAILS
ON C_CUSTKEY = DM_Orders_O_CUSTKEY
INNER JOIN
(
SELECT
N_NAME AS DM_CustomerNation_N_NAME,
N_NATIONKEY AS DM_CustomerNation_N_NATIONKEY,
N_REGIONKEY AS DM_CustomerNation_N_REGIONKEY
FROM
tpchperf.NATION
)
AS NATION
ON C_NATIONKEY = DM_CustomerNation_N_NATIONKEY
INNER JOIN
(
SELECT
R_NAME AS DM_CustomerRegion_R_NAME,
R_REGIONKEY AS DM_CustomerRegion_R_REGIONKEY
FROM
tpchperf.REGION
)
AS REGION
ON DM_CustomerNation_N_REGIONKEY = DM_CustomerRegion_R_REGIONKEY
WHERE
O_ORDERDATE_Year >= 1996
AND DM_CustomerRegion_R_NAME IN
(
'EUROPE',
'AMERICA'
)
AND DM_Region_R_NAME IN
(
'EUROPE',
'AMERICA'
)
GROUP BY CUBE(O_ORDERDATE_Year, CustomerRegion, CustomerNation, SupplierRegion, SupplierNation)
2. It crashes the mserver5 process. Interestingly if we just remove the 'CUBE' grouping at the end and make it a plain Group by, it works. Not sure what is happening. This is not related to the data because simple EXPLAIN of query crashes the server.
### Actual Results:
mserver5 crashes.
### Expected Results:
Results retrieved with the listed aggregations, sub-totals and totals as per the grouping set. Forget the results, the system should not crash.
Pretty high end CENTOS Server on VCLOUD. However resources do not matter as simple EXPLAIN is resulting in crash.
## Comment 27949
Date: 2020-07-28 20:18:04 +0200
From: @PedroTadim
I missed the propagation of aliases on grouping columns. It's already fixed and will be available at the next release. Thanks for the report.
## Comment 27951
Date: 2020-07-29 05:27:57 +0200
From: Jaya Krishna <<rvinjamu>>
Thanks for the prompt response. Pleasantly surprised and appreciate it.
regards
Jaya Krishna
| Segmentation fault in MalOptimizer | https://api.github.com/repos/MonetDB/MonetDB/issues/6938/comments | 0 | 2020-11-30T17:00:06Z | 2024-06-27T13:09:47Z | https://github.com/MonetDB/MonetDB/issues/6938 | 753,644,902 | 6,938 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-26 07:42:36 +0200
From: @mlkersten
To: MonetDB5 devs <<bugs-monetdb5>>
Version: -- development
CC: @PedroTadim
Last updated: 2020-10-19 11:06:22 +0200
## Comment 27942
Date: 2020-07-26 07:42:36 +0200
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:78.0) Gecko/20100101 Firefox/78.0
Build Identifier:
As of Jul 19 I lost the usec precision as to be reported by the MAL optimizers.
To illustrate:
2020-07-19T22:07:36:SF-1/19.1:mitosis actions=8 time=110 usec
2020-07-19T22:07:36:SF-1/20.1:mitosis actions=8 time=94 usec
2020-07-19T22:07:36:SF-1/21.1:mitosis actions=8 time=210 usec
2020-07-19T22:07:36:SF-1/22.1:mitosis actions=8 time=42 usec
2020-07-24T11:50:33:SF-100/01.1:mitosis actions=9 time=0 usec
2020-07-24T11:50:33:SF-100/02.1:mitosis actions=8 time=0 usec
2020-07-24T11:50:33:SF-100/03.1:mitosis actions=9 time=0 usec
Reproducible: Always
| Lost the microsecond precisions | https://api.github.com/repos/MonetDB/MonetDB/issues/6937/comments | 0 | 2020-11-30T17:00:03Z | 2024-06-27T13:09:46Z | https://github.com/MonetDB/MonetDB/issues/6937 | 753,644,854 | 6,937 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-24 14:04:20 +0200
From: jpastuszek
To: SQL devs <<bugs-sql>>
Version: 11.37.7 (Jun2020)
CC: @njnes, @PedroTadim, @yzchang
Last updated: 2020-09-21 20:19:07 +0200
## Comment 27935
Date: 2020-07-24 14:04:20 +0200
From: jpastuszek
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
Build Identifier:
I am getting queries randomly aborted with error:
State: HY002, Native error: 0, Message: [unixODBC][MonetDB][ODBC Driver 11.37.7]Object not found
The server logs:
2020-07-22 14:54:56 ERR logs[6446]: DFLOWworker2: createExceptionInternal: !ERROR: MALException:group.subgroup:HY002!Object not found
2020-07-22 14:56:11 ERR logs[6446]: DFLOWworker3: createExceptionInternal: !ERROR: MALException:group.subgroup:HY002!Object not found
2020-07-22 14:56:17 ERR logs[6446]: DFLOWworker1: createExceptionInternal: !ERROR: MALException:group.subgroup:HY002!Object not found
This is happening often but only for specific queries and in specific conditions.
The query needs to be in form:
SELECT
sys.epoch(CAST('2020-07-15 14:12:00.000' AS TIMESTAMP)) + 0 AS chunk,
s AS terms
FROM d
WHERE s = 'xyz'
GROUP BY chunk, terms
Where table d is a merge table containing tables with 700k+ records in total, column s is STRING or JSON column (other column types won't trigger this). There has to be a TIMESTAMP related mathematical operation (+ 0 is enough to trigger). GROUP BY has to have two columns (any one alone won't trigger). The WHERE condition does not need to match any rows.
And one of the merged tables needs to have active INSERTs going on in the background with sort lived transactions (e.g. committed every second). The longer the transaction the less the chance of the query to fail but also the longer the time it will stop failing when retried multiple times.
The actual query I simplified was in this form:
SELECT
CAST((timestamp - CAST('2020-07-15 14:12:00.000' AS TIMESTAMP)) * 1000 / 5040000 AS BIGINT) AS chunk,
logsource AS terms,
CAST(count(*) AS DOUBLE) AS metric,
count(*) AS count
FROM logs.message
WHERE processed_timestamp >= '2020-07-15 06:33:36.471' AND processed_timestamp <= '2020-07-22 22:33:36.471'
AND timestamp >= '2020-07-15 14:33:36.471' AND timestamp <= '2020-07-22 14:33:36.471'
GROUP BY chunk, terms
It is a core query to visualize the data (terms histogram) on a dashboard (Grafana) and I can't find a way to refactor it without triggering the failure at random. Also by the design of the system, I need data (logs) to be inserted in a semi-realtime manner in the background.
Retrying the query won't do as it can take many seconds before the query starts working again.
This is happening with Jun2020 and was not happening with Apr2019, it is a serious regression for my use case.
I tried to reproduce this issue without the original data (on synthetic data) set but without luck so far.
Reproducible: Couldn't Reproduce
## Comment 27937
Date: 2020-07-24 14:24:26 +0200
From: @yzchang
(In reply to jpastuszek@protonmail.com from comment 0)
> Where table d is a merge table containing tables with 700k+ records in
> total, column s is STRING or JSON column (other column types won't trigger
> this). There has to be a TIMESTAMP related mathematical operation (+ 0 is
> enough to trigger). GROUP BY has to have two columns (any one alone won't
> trigger). The WHERE condition does not need to match any rows.
> And one of the merged tables needs to have active INSERTs going on in the
> background with sort lived transactions (e.g. committed every second). The
> longer the transaction the less the chance of the query to fail but also the
> longer the time it will stop failing when retried multiple times.
This is quite an impressive analysis.
Can you give us the schema of your merge table and the ALTER TABLE ... ADD... statements? And some sample data, if possible?
## Comment 27939
Date: 2020-07-24 15:10:59 +0200
From: jpastuszek
Full schema is crated like this:
CREATE MERGE TABLE bug.message (
logentry_no BIGINT,
logentry_id STRING,
processed_timestamp TIMESTAMP,
timestamp TIMESTAMP,
logsource STRING,
logsource_environment STRING,
logsource_service STRING,
logsource_location STRING,
logsource_subsystem STRING,
program STRING,
program_type STRING,
program_name STRING,
program_log STRING,
program_source STRING,
program_thread STRING,
log_level STRING,
tags JSON,
syslog_severity STRING,
syslog_facility STRING,
syslog_tag STRING,
message STRING,
structured_data JSON
)
CREATE TABLE bug.message_future (
logentry_no BIGINT GENERATED ALWAYS AS
IDENTITY (
START WITH 2999010100000000000 INCREMENT BY 1
MINVALUE 2999010100000000000 MAXVALUE 2999010199999999999
CACHE 50 CYCLE
),
logentry_id STRING,
processed_timestamp TIMESTAMP,
timestamp TIMESTAMP,
logsource STRING,
logsource_environment STRING,
logsource_service STRING,
logsource_location STRING,
logsource_subsystem STRING,
program STRING,
program_type STRING,
program_name STRING,
program_log STRING,
program_source STRING,
program_thread STRING,
log_level STRING,
tags JSON,
syslog_severity STRING,
syslog_facility STRING,
syslog_tag STRING,
message STRING,
structured_data JSON
)
ALTER TABLE bug.message ADD TABLE bug.message_future
CREATE TABLE bug.message_past (
logentry_no BIGINT GENERATED ALWAYS AS
IDENTITY (
START WITH 1900010100000000000 INCREMENT BY 1
MINVALUE 1900010100000000000 MAXVALUE 1900010199999999999
CACHE 50 CYCLE
),
logentry_id STRING,
processed_timestamp TIMESTAMP,
timestamp TIMESTAMP,
logsource STRING,
logsource_environment STRING,
logsource_service STRING,
logsource_location STRING,
logsource_subsystem STRING,
program STRING,
program_type STRING,
program_name STRING,
program_log STRING,
program_source STRING,
program_thread STRING,
log_level STRING,
tags JSON,
syslog_severity STRING,
syslog_facility STRING,
syslog_tag STRING,
message STRING,
structured_data JSON
)
ALTER TABLE bug.message ADD TABLE bug.message_past
CREATE TABLE bug.message_20200724 (
logentry_no BIGINT GENERATED ALWAYS AS
IDENTITY (
START WITH 2020072400000000000 INCREMENT BY 1
MINVALUE 2020072400000000000 MAXVALUE 2020072499999999999
CACHE 50 CYCLE
),
logentry_id STRING,
processed_timestamp TIMESTAMP,
timestamp TIMESTAMP,
logsource STRING,
logsource_environment STRING,
logsource_service STRING,
logsource_location STRING,
logsource_subsystem STRING,
program STRING,
program_type STRING,
program_name STRING,
program_log STRING,
program_source STRING,
program_thread STRING,
log_level STRING,
tags JSON,
syslog_severity STRING,
syslog_facility STRING,
syslog_tag STRING,
message STRING,
structured_data JSON
)
ALTER TABLE bug.message ADD TABLE bug.message_20200724
And many more daily partitions message_*.
The query that will randomly fail (you man need to run it between 1 time to like 100 times before it fails, but once it does it will keep failing for few seconds before recovering):
SELECT
sys.epoch(CAST('2020-07-15 14:12:00.000' AS TIMESTAMP)) + 0 AS chunk,
logsource AS terms
FROM logs.message
WHERE logsource = 'xyz'
GROUP BY chunk, terms
Note that it won't fail unless I have a process inserting records to a daily partition table (e.g. message_20200724) with short lived transactions.
I will try to minimize this on Monday and perhaps provide a data set for you to load going from this schema down to a simpler one. I tried to generate some data in similar setting but without much luck with reproduction.
## Comment 27940
Date: 2020-07-24 20:52:47 +0200
From: @PedroTadim
I found this error with SQLancer. Maybe it already got resolved for SP1. It had to do with MAL functions missing conditional execution/candidate lists.
## Comment 27946
Date: 2020-07-27 18:15:52 +0200
From: jpastuszek
I have upgraded to Jun2020-SP1 and some of the queries that were failing are now fixed but not the queries that I need.
Looks like constant TIMESTAMP is now fixed but if I use a column it is still failing:
SELECT
sys.epoch(timestamp) + 0 AS chunk,
logsource AS terms
FROM logs.message
WHERE logsource = 'xyz'
GROUP BY chunk, terms
Also if I use a "terms" column with JSON type it works now, and only STRING terms are an issue.
If I disable "mitosis" (SET optimizer='no_mitosis_pipe') all works fine. So at least I have a usable work-around.
## Comment 27947
Date: 2020-07-28 14:33:49 +0200
From: @PedroTadim
On default I disabled the addition between temporal types and numeric types other than intervals, in order to make it compliant with the SQL standard. This may also be the issue on your query. Can you replace the integer constant with an interval?
## Comment 27965
Date: 2020-07-30 11:00:03 +0200
From: jpastuszek
This is also failing:
SELECT
sys.epoch(sys.epoch(timestamp) + INTERVAL '1' SECOND) AS chunk,
logsource AS terms
FROM logs.message
WHERE logsource = 'xyz'
GROUP BY chunk, terms
## Comment 27966
Date: 2020-07-30 11:36:57 +0200
From: @PedroTadim
I will be continuing running SQLancer and eventually find this issue.
## Comment 27968
Date: 2020-07-31 14:30:03 +0200
From: jpastuszek
OK, this reproduces the issue for me reliably:
CREATE TABLE ts1 (ts TIMESTAMP, s STRING);
CREATE TABLE ts2 (ts TIMESTAMP, s STRING);
CREATE TABLE tl1 (ts TIMESTAMP, s STRING);
INSERT INTO tl1 SELECT now(), 'a' AS s FROM sys.generate_series(0, 200000);
CREATE MERGE TABLE tsl (ts TIMESTAMP, s CLOB);
-- need 3 tables: two small or empty and one large; large needs to be 200k rows or more
ALTER TABLE tsl ADD TABLE ts1;
ALTER TABLE tsl ADD TABLE ts2;
ALTER TABLE tsl ADD TABLE tl1;
----- run the above first; then run the below
INSERT INTO ts1 (ts, s) VALUES (now(), NULL);
SELECT
sys.epoch(ts) + 0 AS chunk,
s AS terms
FROM sys.tsl
WHERE s = 'test'
GROUP BY chunk, terms;
--- SQL Error [HY002]: Object not found
## Comment 27972
Date: 2020-08-06 11:55:00 +0200
From: jpastuszek
I have looked at monetdb5/optimizer/opt_mitosis.h and looks like the explanation of the requirements for 200k+ table is there:
define MINPARTCNT 100000 /* minimal record count per partition */
monetdb5/optimizer/opt_mitosis.c:
153 /* exploit parallelism, but ensure minimal partition size to
154 * limit overhead */
155 pieces = (int) MIN(rowcnt / MINPARTCNT, (BUN) threads);
156 }
We get "pieces > 1" only if the rowcnt is 200k or more. So it is only then when mitosis kick in.
Also the reason for having small and large table in the merge is that it does: "/* locate the largest non-partitioned table */" first.
Also disabling mitosis does make the issue to go away.
## Comment 28055
Date: 2020-09-09 13:54:12 +0200
From: @njnes
running your latest example script (with mserver --forcemito ie always partition), seems to not have the issue anymore (on oct2020 branch).
Could you verify this?
| Query randomly failing with Object not found | https://api.github.com/repos/MonetDB/MonetDB/issues/6936/comments | 0 | 2020-11-30T16:59:59Z | 2024-06-27T13:09:45Z | https://github.com/MonetDB/MonetDB/issues/6936 | 753,644,800 | 6,936 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-22 18:23:54 +0200
From: jpastuszek
To: SQL devs <<bugs-sql>>
Version: 11.37.7 (Jun2020)
CC: @PedroTadim
Last updated: 2020-10-19 11:06:19 +0200
## Comment 27933
Date: 2020-07-22 18:23:54 +0200
From: jpastuszek
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
Build Identifier:
Wrong result for "INTERVAL '1' HOUR / 2.0".
Reproducible: Always
### Steps to Reproduce:
SELECT INTERVAL '1' HOUR / 2, INTERVAL '1' HOUR / 2.0, INTERVAL '1' HOUR * 1000 / 2000, INTERVAL '1' HOUR * 1000.0 / 2000.0;
### Actual Results:
1800.000|180.000|1800.000|1800.000|
### Expected Results:
1800.000|1800.000|1800.000|1800.000|
## Comment 27938
Date: 2020-07-24 14:38:07 +0200
From: jpastuszek
Also probably related:
SELECT INTERVAL '1' HOUR * CAST(1000 AS DOUBLE);
Gives:
SQL Error [22000]: TypeException:user.s66_24[7]:'calc.*' undefined in: X_9:lng := calc.*(X_6:lng, X_8:dbl);
And less minified gives different error:
SELECT
CAST(INTERVAL '1' HOUR * CAST((1000 / 5040000) AS DOUBLE) AS BIGINT) AS chunk,
name AS terms
FROM sys.functions
GROUP BY chunk, terms
SQL Error [42000]: Error in optimizer multiplex: TypeException:user.s84_24[19]:'bat.append' undefined in: bat.append(X_91:bat[:lng], X_97:dbl);
## Comment 27941
Date: 2020-07-24 20:56:19 +0200
From: @PedroTadim
The second issue was found by SQLancer and it is fixed on default by disabling addition between intervals and other numeric types.
## Comment 27967
Date: 2020-07-30 11:40:39 +0200
From: jpastuszek
Also this is wrong:
SELECT INTERVAL '1' HOUR * 1000 / 1800000; -- 2.000
SELECT INTERVAL '1' HOUR / INTERVAL '1800' SECOND; -- 0.002
## Comment 27969
Date: 2020-08-04 10:11:22 +0200
From: @PedroTadim
SELECT INTERVAL '1' HOUR / INTERVAL '1800' SECOND;
This is fixed on typing branch by disabling division between intervals. It will be available on the next feature release.
| Wrong result when dividing interval by literal float | https://api.github.com/repos/MonetDB/MonetDB/issues/6935/comments | 0 | 2020-11-30T16:59:55Z | 2024-06-27T13:09:44Z | https://github.com/MonetDB/MonetDB/issues/6935 | 753,644,756 | 6,935 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-22 16:25:08 +0200
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <<bugs-sql>>
Version: 11.37.7 (Jun2020)
Last updated: 2020-07-27 09:30:11 +0200
## Comment 27931
Date: 2020-07-22 16:25:08 +0200
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:78.0) Gecko/20100101 Firefox/78.0
Build Identifier:
sys.isauuid('e31960fb-dc8b-452d-ab30-b342723e7565XYZ') returns true while it should return false.
The argument string contains invalid end characters XYZ.
Also the provided string is more than 36 characters long and uuid strings are 36 characters.
Apparently sys.isauuid() only looks at the first 36 (or 32 when no hyphens are used) characters and ignores any successive characters, which is not correct.
Also conversion of those invalid uuid strings to uuid objects succeed, while they should return an error: Invalid uuid string value 'the uuid string'
Reproducible: Always
### Steps to Reproduce:
select sys.isauuid('e31960fb-dc8b-452d-ab30-b342723e7565XYZ') as fals;
select sys.isauuid('e31960fbdc8b452dab30b342723e7565XYZ') as fals;
select sys.isauuid('00000000-0000-0000-0000-000000000000XYZ') as fals;
select sys.isauuid('FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFFXYZ') as fals;
select sys.isauuid('00000000000000000000000000000000XYZ') as fals;
select sys.isauuid('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFXYZ') as fals;
select sys.isauuid('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF %$@!') as fals;
select cast('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF %$@!' as uuid) as uuid_val;
select convert('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF %$@!', uuid) as uuid_val;
select uuid'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF %$@!' as uuid_val;
### Actual Results:
sql>select sys.isauuid('e31960fb-dc8b-452d-ab30-b342723e7565XYZ') as fals;
+-------+
| fals |
+=======+
| true |
+-------+
1 tuple
sql>select sys.isauuid('e31960fbdc8b452dab30b342723e7565XYZ') as fals;
+-------+
| fals |
+=======+
| true |
+-------+
1 tuple
sql>select sys.isauuid('00000000-0000-0000-0000-000000000000XYZ') as fals;
+-------+
| fals |
+=======+
| true |
+-------+
1 tuple
sql>select sys.isauuid('FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFFXYZ') as fals;
+-------+
| fals |
+=======+
| true |
+-------+
1 tuple
sql>select sys.isauuid('00000000000000000000000000000000XYZ') as fals;
+-------+
| fals |
+=======+
| true |
+-------+
1 tuple
sql>select sys.isauuid('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFXYZ') as fals;
+-------+
| fals |
+=======+
| true |
+-------+
1 tuple
sql>select sys.isauuid('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF %$@!') as fals;
+-------+
| fals |
+=======+
| true |
+-------+
1 tuple
sql>
sql>select cast('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF %$@!' as uuid) as uuid_val;
+--------------------------------------+
| uuid_val |
+======================================+
| ffffffff-ffff-ffff-ffff-ffffffffffff |
+--------------------------------------+
1 tuple
sql>select convert('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF %$@!', uuid) as uuid_val;
+--------------------------------------+
| uuid_val |
+======================================+
| ffffffff-ffff-ffff-ffff-ffffffffffff |
+--------------------------------------+
1 tuple
sql>select uuid'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF %$@!' as uuid_val;
+--------------------------------------+
| uuid_val |
+======================================+
| ffffffff-ffff-ffff-ffff-ffffffffffff |
+--------------------------------------+
1 tuple
sql>
### Expected Results:
sql>select sys.isauuid('e31960fb-dc8b-452d-ab30-b342723e7565XYZ') as fals;
+-------+
| fals |
+=======+
| false |
+-------+
1 tuple
sql>select sys.isauuid('e31960fbdc8b452dab30b342723e7565XYZ') as fals;
+-------+
| fals |
+=======+
| false |
+-------+
1 tuple
sql>select sys.isauuid('00000000-0000-0000-0000-000000000000XYZ') as fals;
+-------+
| fals |
+=======+
| false |
+-------+
1 tuple
sql>select sys.isauuid('FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFFXYZ') as fals;
+-------+
| fals |
+=======+
| false |
+-------+
1 tuple
sql>select sys.isauuid('00000000000000000000000000000000XYZ') as fals;
+-------+
| fals |
+=======+
| false |
+-------+
1 tuple
sql>select sys.isauuid('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFXYZ') as fals;
+-------+
| fals |
+=======+
| false |
+-------+
1 tuple
sql>select sys.isauuid('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF %$@!') as fals;
+-------+
| fals |
+=======+
| false |
+-------+
1 tuple
sql>
sql>select cast('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF %$@!' as uuid) as uuid_val;
Invalid UUID string value 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF %$@!'
sql>select convert('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF %$@!', uuid) as uuid_val;
Invalid UUID string value 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF %$@!'
sql>select uuid'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF %$@!' as uuid_val;
Invalid UUID string value 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF %$@!'
sql>
## Comment 27934
Date: 2020-07-23 09:07:27 +0200
From: @sjoerdmullender
Test and fix in changesets [445de75f570a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=445de75f570a) and [510d6756bd0b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=510d6756bd0b)
| sys.isauuid() returns wrong answer for some invalid uuid strings | https://api.github.com/repos/MonetDB/MonetDB/issues/6934/comments | 0 | 2020-11-30T16:59:52Z | 2024-06-27T13:09:43Z | https://github.com/MonetDB/MonetDB/issues/6934 | 753,644,715 | 6,934 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-22 15:07:18 +0200
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <<bugs-sql>>
Version: 11.37.7 (Jun2020)
Last updated: 2020-07-22 15:07:18 +0200
## Comment 27930
Date: 2020-07-22 15:07:18 +0200
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:78.0) Gecko/20100101 Firefox/78.0
Build Identifier:
We currently do not support the scalar function IFNULL(expr1, expr2). This function tests whether expr1 IS NULL and if so returns expr2 else it returns expr1. When both expr1 and expr2 are NULL, NULLL is returned.
Request to add a native C implementation for ifnull() (including bulk version) which is more efficient than current alternatives coalesce() and ifthenelse().
Reproducible: Always
### Steps to Reproduce:
create table t6933 (i int, c varchar(8));
insert into t6933 values (1, 'aa1'), (2, null), (null, 'bb2'), (null, null);
select i, c, ifnull(i, 2*3) as "ifnull(i,2*3)", ifnull(c, 'has null') as "ifnull(c,'x')", ifnull(i, c) as "ifnull(i,c)" from t6933;
select c, i, ifnull(c, i) as "ifnull(c,i)" from t6933;
explain select i, c, ifnull(i, c) as "ifnull(i,c)" from t6933;
drop table t6933;
### Actual Results:
sql>create table t6933 (i int, c varchar(8));
operation successful
sql>insert into t6933 values (1, 'aa1'), (2, null), (null, 'bb2'), (null, null);
4 affected rows
sql>select i, c, ifnull(i, 2*3) as "ifnull(i,2*3)", ifnull(c, 'has null') as "ifnull(i,'x')", ifnull(i, c) as "ifnull(i,c)" from t6933;
SELECT: no such binary operator 'ifnull(int,tinyint)'
sql>select c, i, ifnull(c, i) as "ifnull(c,i)" from t6933;
SELECT: no such binary operator 'ifnull(varchar,int)'
sql>explain select i, c, ifnull(i, c) as "ifnull(i,c)" from t6933;
SELECT: no such binary operator 'ifnull(int,varchar)'
sql>drop table t6933;
operation successful
sql>
### Expected Results:
sql>create table t6933 (i int, c varchar(8));
operation successful
sql>insert into t6933 values (1, 'aa1'), (2, null), (null, 'bb2'), (null, null);
4 affected rows
sql>select i, c, ifnull(i, 2*3) as "ifnull(i,2*3)", ifnull(c, 'has null') as "ifnull(c,'x')", ifnull(i, c) as "ifnull(i,c)" from t6933;
+------+------+---------------+---------------+-------------+
| i | c | ifnull(i,2*3) | ifnull(c,'x') | ifnull(i,c) |
+======+======+===============+===============+=============+
| 1 | aa1 | 1 | aa1 | 1 |
| 2 | null | 2 | has null | 2 |
| null | bb2 | 6 | bb2 | bb2 |
| null | null | 6 | has null | null |
+------+------+---------------+---------------+-------------+
4 tuples
sql>select c, i, ifnull(c, i) as "ifnull(c,i)" from t6933;
+------+------+-------------+
| c | i | ifnull(c,i) |
+======+======+=============+
| aa1 | 1 | aa1 |
| null | 2 | 2 |
| bb2 | null | bb2 |
| null | null | null |
+------+------+-------------+
4 tuples
sql>explain select i, c, coalesce(i, c) as "ifnull(i,c)" from t6933;
+----------------------------------------------------------------------------------------------------------------------------------------------------+
| mal |
+====================================================================================================================================================+
| function user.s26_0():void; |
| X_1:void := querylog.define("explain select i, c, ifnull(i, c) as \"ifnull(i,c)\" from t6933;":str, "default_pipe":str, 32:int); |
| X_50:bat[:str] := bat.pack("sys.t6933":str, "sys.t6933":str, "sys.":str); |
| X_51:bat[:str] := bat.pack("i":str, "c":str, "ifnull(i,c)":str); |
| X_52:bat[:str] := bat.pack("int":str, "varchar":str, "varchar":str); |
| X_53:bat[:int] := bat.pack(32:int, 8:int, 10:int); |
| X_54:bat[:int] := bat.pack(0:int, 0:int, 0:int); |
| X_4:int := sql.mvc(); |
| C_5:bat[:oid] := sql.tid(X_4:int, "sys":str, "t6933":str); |
| X_17:bat[:int] := sql.bind(X_4:int, "sys":str, "t6933":str, "i":str, 0:int); |
| X_28:bat[:int] := algebra.projection(C_5:bat[:oid], X_17:bat[:int]); |
| X_22:bat[:str] := sql.bind(X_4:int, "sys":str, "t6933":str, "c":str, 0:int); |
| X_29:bat[:str] := algebra.projection(C_5:bat[:oid], X_22:bat[:str]); |
| X_47:bat[:str] := batcalc.ifnull(X_28:bat[:int], X_29:bat[:str]); |
| sql.resultSet(X_50:bat[:str], X_51:bat[:str], X_52:bat[:str], X_53:bat[:int], X_54:bat[:int], X_28:bat[:int], X_29:bat[:str], X_47:bat[:str]); |
| end user.s26_0; |
+----------------------------------------------------------------------------------------------------------------------------------------------------+
44 tuples
sql>drop table t6933;
operation successful
sql>
The alternatives coalesce(expr1, expr2) and ifthenelse((expr1 IS NULL), expr2, expr1) produces more intermediate bats and are less efficient:
X_17:bat[:bit] := sql.bind(X_4:int, "profiler":str, "b":str, "a":str, 0:int);
X_27:bat[:bit] := algebra.projection(C_5:bat[:oid], X_17:bat[:bit]);
X_22:bat[:bit] := sql.bind(X_4:int, "profiler":str, "b":str, "b":str, 0:int);
X_28:bat[:bit] := algebra.projection(C_5:bat[:oid], X_22:bat[:bit]);
X_29:bat[:bit] := batcalc.isnil(X_27:bat[:bit]);
X_32:bat[:bit] := batcalc.not(X_29:bat[:bit]);
X_36:bat[:bit] := batcalc.ifthenelse(X_32:bat[:bit], X_27:bat[:bit], X_28:bat[:bit]);
By having a native ifnull() we could replace:
X_29:bat[:bit] := batcalc.isnil(X_27:bat[:bit]);
X_32:bat[:bit] := batcalc.not(X_29:bat[:bit]);
X_36:bat[:bit] := batcalc.ifthenelse(X_32:bat[:bit], X_27:bat[:bit], X_28:bat[:bit]);
with one:
X_36:bat[:bit] := batcalc.ifnull(X_27:bat[:bit], X_28:bat[:bit]);
| Add support for scalar function IFNULL(expr1, expr2) | https://api.github.com/repos/MonetDB/MonetDB/issues/6933/comments | 1 | 2020-11-30T16:59:49Z | 2024-06-27T13:09:42Z | https://github.com/MonetDB/MonetDB/issues/6933 | 753,644,675 | 6,933 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-20 16:34:40 +0200
From: jpastuszek
To: SQL devs <<bugs-sql>>
Version: 11.37.7 (Jun2020)
CC: @kutsurak
Last updated: 2020-07-27 09:30:14 +0200
## Comment 27920
Date: 2020-07-20 16:34:40 +0200
From: jpastuszek
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
Build Identifier:
If a number starts with integer followed by exponent (e.g. 1e3) it fails to parse as valid JSON number.
Reproducible: Always
### Steps to Reproduce:
1. SELECT json.isValid('[0.1e12]');
2. SELECT json.isValid('[1e12]');
3. SELECT json.isValid('{"foo":1e12}');
4. SELECT json.number(json.filter('{"foo":1e3}', '$.foo'));
### Actual Results:
1. true
2. false
3. false
4. "JSON syntax error: ',' or '}' expected at offset 8"
### Expected Results:
1. true
2. true
3. true
4. 1000.0
This was working in Apr2019 but fails in Jun2020.
## Comment 27923
Date: 2020-07-21 08:53:27 +0200
From: @kutsurak
Test added: https://dev.monetdb.org/hg/MonetDB/rev/755905f0a391
Fix added: https://dev.monetdb.org/hg/MonetDB/rev/4ffac7fdf1f0
| Syntax error while parsing JSON numbers with exponent | https://api.github.com/repos/MonetDB/MonetDB/issues/6932/comments | 0 | 2020-11-30T16:59:46Z | 2024-06-27T13:09:41Z | https://github.com/MonetDB/MonetDB/issues/6932 | 753,644,631 | 6,932 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-20 12:02:31 +0200
From: Muhmud Ahmad <<muhmud.ahmad>>
To: clients devs <<bugs-clients>>
Version: 11.37.7 (Jun2020)
CC: @kutsurak, muhmud.ahmad
Last updated: 2020-10-19 11:06:21 +0200
## Comment 27919
Date: 2020-07-20 12:02:31 +0200
From: Muhmud Ahmad <<muhmud.ahmad>>
Like the MySQL and PostgreSQL command line clients have \e to open the editor specified in $EDITOR to edit the current line.
## Comment 27984
Date: 2020-08-16 17:58:04 +0200
From: Muhmud Ahmad <<muhmud.ahmad>>
Created attachment 689
Patch that implements the required functionality
> Attached file: [0001-EDITOR-capability.patch](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6931_0001-EDITOR-capability.patch_689) (text/plain, 3644 bytes)
> Description: Patch that implements the required functionality
## Comment 28004
Date: 2020-08-21 17:58:46 +0200
From: @kutsurak
Hi and thanks very much for the patch!
We ended up implementing the feature in a different way, using the GNU readline library.
It is currently in the Oct2020 branch and will eventually (soon) land on default.
It works as follows:
You add some text in the mclient prompt and if you enter a specific keybind, Alt-e by default but the user can rebind this in ~/.inputrc (see the GNU Readline manual for details https://tiswww.case.edu/php/chet/readline/readline.htmlSEC9), the editor specified in VISUAL or EDITOR is started with the text you have already entered.
Edit, save the file and after you exit the editor, all the text contained in the file is copied in the mclient prompt and the cursor is transferred at the end of your input.
## Comment 28005
Date: 2020-08-22 00:00:21 +0200
From: Muhmud Ahmad <<muhmud.ahmad>>
Sounds great, thanks!
| Allow EDITOR to be used for the current command in mclient | https://api.github.com/repos/MonetDB/MonetDB/issues/6931/comments | 0 | 2020-11-30T16:59:42Z | 2024-06-27T13:09:40Z | https://github.com/MonetDB/MonetDB/issues/6931 | 753,644,591 | 6,931 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-17 16:27:38 +0200
From: @PedroTadim
To: SQL devs <<bugs-sql>>
Version: 11.37.7 (Jun2020)
Last updated: 2020-10-19 11:06:21 +0200
## Comment 27916
Date: 2020-07-17 16:27:38 +0200
From: @PedroTadim
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36
Build Identifier:
RUn the statements bellow.
Reproducible: Always
### Steps to Reproduce:
CREATE TABLE t0(c0 VARCHAR(319) NOT NULL, c1 TIME, c2 TIMESTAMP PRIMARY KEY UNIQUE NULL, UNIQUE(c0, c2, c1));
CREATE TABLE t1(c0 CHARACTER LARGE OBJECT,c1 DATE);
select t1.c0 from t1 join t0 on coalesce(trim(t0.c0), 1) like t0.c0;
### Actual Results:
A crash
### Expected Results:
An empty result set.
| SQLancer crash on join with coalesce | https://api.github.com/repos/MonetDB/MonetDB/issues/6930/comments | 0 | 2020-11-30T16:59:38Z | 2024-06-27T13:09:39Z | https://github.com/MonetDB/MonetDB/issues/6930 | 753,644,553 | 6,930 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-17 14:01:03 +0200
From: @PedroTadim
To: SQL devs <<bugs-sql>>
Version: 11.37.7 (Jun2020)
Last updated: 2020-07-27 09:30:16 +0200
## Comment 27915
Date: 2020-07-17 14:01:03 +0200
From: @PedroTadim
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36
Build Identifier:
Run the statements bellow.
Reproducible: Always
### Steps to Reproduce:
CREATE TABLE t0(c0 TIMESTAMP);
SELECT SUM(COALESCE(0.67, dayofmonth(t0.c0))) FROM t0;
### Actual Results:
Error in optimizer multiplex: TypeException:user.s6_0[7]:'calc.date' undefined in: calc.date(X_80:timestamp, X_82:bit);
### Expected Results:
A single NULL value.
| SQLancer calc.date undefined | https://api.github.com/repos/MonetDB/MonetDB/issues/6929/comments | 0 | 2020-11-30T16:59:35Z | 2024-06-27T13:09:38Z | https://github.com/MonetDB/MonetDB/issues/6929 | 753,644,503 | 6,929 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-17 09:40:37 +0200
From: @PedroTadim
To: SQL devs <<bugs-sql>>
Version: 11.37.7 (Jun2020)
Last updated: 2020-07-27 09:30:13 +0200
## Comment 27914
Date: 2020-07-17 09:40:37 +0200
From: @PedroTadim
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36
Build Identifier:
Run the statements bellow.
Reproducible: Always
### Steps to Reproduce:
CREATE TABLE "sys"."t0" ("c0" DECIMAL(18,3) DEFAULT 0.968720);
COPY 5 RECORDS INTO "sys"."t0" FROM stdin USING DELIMITERS E'\t',E'\n','"';
0.938
0.958
0.877
0.550
0.916
select coalesce(1 = true, t0.c0 > 0) from t0;
### Actual Results:
A result set
### Expected Results:
A crash at rel_bin
| SQLancer crash on coalesce | https://api.github.com/repos/MonetDB/MonetDB/issues/6928/comments | 0 | 2020-11-30T16:59:32Z | 2024-06-27T13:09:37Z | https://github.com/MonetDB/MonetDB/issues/6928 | 753,644,465 | 6,928 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-16 17:38:07 +0200
From: @PedroTadim
To: SQL devs <<bugs-sql>>
Version: 11.37.7 (Jun2020)
Last updated: 2020-07-27 09:30:16 +0200
## Comment 27911
Date: 2020-07-16 17:38:07 +0200
From: @PedroTadim
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36
Build Identifier:
Run the statements bellow.
Reproducible: Always
### Steps to Reproduce:
CREATE TABLE "sys"."t0" ("c0" CHARACTER LARGE OBJECT NOT NULL,CONSTRAINT "t0_c0_pkey" PRIMARY KEY ("c0"),CONSTRAINT "t0_c0_unique" UNIQUE ("c0"),CONSTRAINT "t0_c0_unique" UNIQUE ("c0"));
COPY 22 RECORDS INTO "sys"."t0" FROM stdin USING DELIMITERS E'\t',E'\n','"';
"1970-01-19"
"0.9940522485469018"
"Sn"
""
",骭2T*h[99M\nBCϹ㦚X"
"0.8497262043468918"
"18696712"
"A6"
"H "
"7"
"5A9\\RA,P1wjK\\s9{1B"
"0.0585841777572819741970-01-09 00:59:03.000000-2401479681969-12-14"
"0.57004315834853170.632265992946155"
"돡I]OrrT^\\-}y鱏[ॗ%Hß}XZq"
"j"
"5t3瘏mCX穳[t+JS"
"R៹I&[]9j\ne(pHjL<jID"
"0.0256755262112501330.85555714908316971970-01-04"
","
"鲾KI)b k44d"
"3}鄈"
"true"
CREATE TABLE "sys"."t1" ("c0" CHARACTER LARGE OBJECT,"c1" BOOLEAN NOT NULL,CONSTRAINT "t1_c1_unique" UNIQUE ("c1"));
COPY 2 RECORDS INTO "sys"."t1" FROM stdin USING DELIMITERS E'\t',E'\n','"';
"*" true
"Xh{%LTF" false
SELECT SUM(agg0) FROM (SELECT ALL SUM(ALL 0.97) as agg0 FROM t0 CROSS JOIN t1 WHERE ((((t1.c1)AND(t1.c1)))AND(((t0.c0)>(t0.c0))))
UNION ALL SELECT SUM(ALL 0.97) as agg0 FROM t0 CROSS JOIN t1 WHERE NOT (((((t1.c1)AND(t1.c1)))AND(((t0.c0)>(t0.c0)))))
UNION ALL SELECT SUM(ALL 0.97) as agg0 FROM t0 CROSS JOIN t1 WHERE (((((t1.c1)AND(t1.c1)))AND(((t0.c0)>(t0.c0))))) IS NULL) as asdf;
### Actual Results:
Error: inputs not the same size.
### Expected Results:
A result set.
| SQLancer inputs not the same size | https://api.github.com/repos/MonetDB/MonetDB/issues/6927/comments | 0 | 2020-11-30T16:59:28Z | 2024-06-27T13:09:36Z | https://github.com/MonetDB/MonetDB/issues/6927 | 753,644,428 | 6,927 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-16 11:31:15 +0200
From: @PedroTadim
To: SQL devs <<bugs-sql>>
Version: 11.37.7 (Jun2020)
Last updated: 2020-07-27 09:30:16 +0200
## Comment 27909
Date: 2020-07-16 11:31:15 +0200
From: @PedroTadim
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36
Build Identifier:
Run the statements bellow.
Reproducible: Always
### Steps to Reproduce:
CREATE TABLE "sys"."t0" (
"c0" TIME,
"c1" CHARACTER LARGE OBJECT NOT NULL,
CONSTRAINT "t0_c1_pkey" PRIMARY KEY ("c1"),
CONSTRAINT "t0_c1_unique" UNIQUE ("c1")
);
COPY 14 RECORDS INTO "sys"."t0" FROM stdin USING DELIMITERS E'\t',E'\n','"';
19:29:38 ""
05:51:00 "B"
NULL ".n"
NULL "0.0"
20:29:28 "-601098762"
20:59:23 ")TD)Dnö"
22:09:19 "aaJ즳B!sJNG㡩"
09:10:09 "W"
23:43:33 "k"
15:43:27 "-0.0"
20:02:19 "0.7126186870446843"
05:23:53 "1498390845"
00:17:15 "{"
06:51:52 "41230238"
SELECT t0.c0 FROM t0 WHERE (((t0.c0)<>(t0.c0))) IS NULL;
### Actual Results:
Two rows with 22:07:22 and 05:51:00
### Expected Results:
Two rows with NULL values.
| SQLancer query with wrong results | https://api.github.com/repos/MonetDB/MonetDB/issues/6926/comments | 0 | 2020-11-30T16:59:24Z | 2024-06-27T13:09:35Z | https://github.com/MonetDB/MonetDB/issues/6926 | 753,644,387 | 6,926 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-13 18:18:38 +0200
From: jpastuszek
To: SQL devs <<bugs-sql>>
Version: 11.37.7 (Jun2020)
Last updated: 2020-07-27 09:30:13 +0200
## Comment 27905
Date: 2020-07-13 18:18:38 +0200
From: jpastuszek
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
Build Identifier:
This query when run couple of times causes MonetDB (mserver5) to use up all 30GiB of RAM and become very slow (throttling) or crash with allocation error:
SELECT count(*) FROM (SELECT message FROM logs.message_20200326
UNION SELECT message FROM logs.message_20200327
UNION SELECT message FROM logs.message_20200328
UNION SELECT message FROM logs.message_20200329
UNION SELECT message FROM logs.message_20200330
UNION SELECT message FROM logs.message_20200331
UNION SELECT message FROM logs.message_20200401
UNION SELECT message FROM logs.message_20200402
UNION SELECT message FROM logs.message_20200403
UNION SELECT message FROM logs.message_20200404
UNION SELECT message FROM logs.message_20200405
UNION SELECT message FROM logs.message_20200406
UNION SELECT message FROM logs.message_20200407) d
The message column is of type STRING that has between 0 and ~32k characters (average 362) where each row has in average about 5 other rows as duplicates.
When I run this query the server spends time (according to "perf top" command) in:
36.55% [.] strHash
4.70% [.] strPut
2.97% [.] BATgroup_internal
1.04% [.] strCmp
0.66% [.] VarHeapValRaw
0.15% [.] MT_thread_setworking
0.06% [.] pthread_getspecific@plt
0.06% [.] insert_string_bat
0.04% [.] BATproject2
0.01% [.] strcmp@plt
0.00% [.] BATcreatedesc
0.00% [.] HASHmask
0.00% [.] getBBPsize
From query plan it looks like it runs "group.groupdone" (BATgroup_internal) on the tables.
Single run of the query counts 1353683 rows and uses around 9GB of RSS memory that is not freed upon completion of the query. Every next run of the same query the mserver5 process eats up additional 9GB of RSS memory.
Reproducible: Always
### Steps to Reproduce:
1. Run the count(*) query on union of large tables with string column.
2. Observe RSS memory usage of mserver5 process.
3. Keep repeating the query until server dies.
### Actual Results:
Server runs out of memory.
### Expected Results:
MonetDB should free memory after each run of the query.
The query with only two tables in the UNION does not leak, having three makes it leak, the more you add the bigger (proportionally) the leak is.
## Comment 27906
Date: 2020-07-14 09:41:07 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [f5070ee98dcb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f5070ee98dcb) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=f5070ee98dcb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=f5070ee98dcb)
Changeset description:
When resetting a view, make sure the string heap is not shared again.
This fixes bug #6925.
## Comment 27907
Date: 2020-07-14 11:05:50 +0200
From: @sjoerdmullender
The problem was caused by a reference counting issue. A BAT that wasn't actually used anymore at the end of the query kept a reference count of 1 and so was not destroyed. The fix I pushed corrects that. I checked, after a run of the query, the set of BATs that are still in use now remains completely unchanged, so no more leaks here.
## Comment 27908
Date: 2020-07-14 15:34:38 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [6f7dc9f47480](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6f7dc9f47480) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=6f7dc9f47480](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=6f7dc9f47480)
Changeset description:
When resetting a view, make sure the string heap is not shared again.
This fixes bug #6925.
## Comment 27910
Date: 2020-07-16 17:25:07 +0200
From: jpastuszek
Sjoerd,
I have tested your fix on my setup and I still observe the memory leaking.
I have prepared this test to reproduce the leak:
CREATE TEMPORARY TABLE dat AS
SELECT DISTINCT func AS s FROM sys.functions ORDER BY length(func) DESC SAMPLE 100 SEED 0
ON COMMIT PRESERVE ROWS;
CREATE TEMPORARY TABLE t AS
SELECT d.s || ' ' || d2.s || ' ' || d3.s AS s
FROM dat d
CROSS JOIN dat d2
CROSS JOIN dat d3
ON COMMIT PRESERVE ROWS;
CREATE TEMPORARY TABLE t2 AS SELECT 't2 ' || s AS s FROM t ON COMMIT PRESERVE ROWS;
CREATE TEMPORARY TABLE t3 AS SELECT 't3 ' || s AS s FROM t ON COMMIT PRESERVE ROWS;
CREATE TEMPORARY TABLE t4 AS SELECT 't4 ' || s AS s FROM t ON COMMIT PRESERVE ROWS;
CREATE TEMPORARY TABLE t5 AS SELECT 't5 ' || s AS s FROM t ON COMMIT PRESERVE ROWS;
Now, if you run following query multiple times the DB will eventually run out of memory and fail at allocation:
SELECT count(*) FROM (SELECT s FROM t UNION SELECT s FROM t2 UNION SELECT s FROM t3 UNION SELECT s FROM t4 UNION SELECT s FROM t5) d;
I hope this is helpful,
Jakub
## Comment 27912
Date: 2020-07-16 20:16:23 +0200
From: @sjoerdmullender
There was another leak that I fixed in changeset [5d976ee54e97](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5d976ee54e97)
With that fix, does you still have a problem?
I'm also going to try your latest test myself of course.
## Comment 27913
Date: 2020-07-16 20:24:47 +0200
From: @sjoerdmullender
I don't see any leaked BATs and I see the virtual memory size returning to the exact same value between queries. So it looks pretty good, I'd say.
## Comment 27917
Date: 2020-07-17 16:32:37 +0200
From: jpastuszek
OK, adding the second patch does the trick. No more leak. Thank you!
## Comment 27918
Date: 2020-07-17 16:53:33 +0200
From: @sjoerdmullender
Great. Thanks for reporting and testing.
| Count string rows in union of string tables leaks (RSS) memory | https://api.github.com/repos/MonetDB/MonetDB/issues/6925/comments | 0 | 2020-11-30T16:59:21Z | 2024-06-27T13:09:34Z | https://github.com/MonetDB/MonetDB/issues/6925 | 753,644,340 | 6,925 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-10 15:01:44 +0200
From: @PedroTadim
To: SQL devs <<bugs-sql>>
Version: 11.37.7 (Jun2020)
Last updated: 2020-07-27 09:30:12 +0200
## Comment 27900
Date: 2020-07-10 15:01:44 +0200
From: @PedroTadim
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
Build Identifier:
Run the statements bellow.
Reproducible: Always
### Steps to Reproduce:
CREATE TABLE "sys"."t0" ("a" INTEGER, "b" INTEGER NOT NULL, CONSTRAINT "t0_a_b_unique" UNIQUE ("a","b"));
--This copy into must succeed
COPY 39 RECORDS INTO "sys"."t0" FROM stdin USING DELIMITERS E'\t',E'\n','"';
-88162543 18
-88162543 20
-15649686 -544149211
-88162543 1544983640
NULL -22365094
NULL 1606640302
NULL -2022118335
-706411503 -1573662742
-88162543 117340240
NULL 14
1724946985 -1967779742
NULL -1500350327
NULL -174249097
-88162543 29
-88162543 42
10 0
NULL 1861748843
NULL -1709541615
NULL -143945879
NULL 1
NULL 1158178587
-88162543 14
-846070788 0
-88162543 1242658499
1149990738 -106077877
NULL -70926511
NULL 138623502
NULL -1613851459
NULL -724706022
NULL 1259669628
NULL 0
NULL -297079149
1545824064 16
NULL 0
NULL 1526452554
NULL 1813972190
NULL -30
NULL -1536805627
NULL 1602659226
SELECT ALL COUNT(ALL DATE '1970-01-02'), ((rtrim(CAST(0.46268474177081 AS STRING), trim(r'W', r'1214312004')))||(lower(CAST(((r'1739914977')||(INTERVAL '456885933' MONTH)) AS STRING)))) FROM t0 WHERE ((t0.b)<=(t0.a)) GROUP BY 0.15600862153602712556477172256563790142536163330078125, TRUE HAVING MAX(ALL TRUE) UNION ALL SELECT COUNT(ALL DATE '1970-01-02'), ((rtrim(CAST(0.46268474177081 AS STRING), trim(r'W', r'1214312004')))||(lower(CAST(((r'1739914977')||(INTERVAL '456885933' MONTH)) AS STRING)))) FROM t0 WHERE ((t0.b)<=(t0.a)) GROUP BY 0.15600862153602712556477172256563790142536163330078125, TRUE HAVING NOT (MAX(ALL TRUE)) UNION ALL SELECT ALL COUNT(ALL DATE '1970-01-02'), ((rtrim(CAST(0.46268474177081 AS STRING), trim(r'W', r'1214312004')))||(lower(CAST(((r'1739914977')||(INTERVAL '456885933' MONTH)) AS STRING)))) FROM t0 WHERE ((t0.b)<=(t0.a)) GROUP BY 0.15600862153602712556477172256563790142536163330078125, TRUE HAVING (MAX(ALL TRUE)) IS NULL;
### Actual Results:
CSV import fails
GDK reported error: BATgroupminmax: BATgroupmax: b and g must be aligned
### Expected Results:
CSV import to succeed and query to run
| SQLancer query copy on unique pair of columns fails and complex query with GDK error | https://api.github.com/repos/MonetDB/MonetDB/issues/6924/comments | 0 | 2020-11-30T16:59:18Z | 2024-06-27T13:09:33Z | https://github.com/MonetDB/MonetDB/issues/6924 | 753,644,295 | 6,924 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-09 18:45:47 +0200
From: jpastuszek
To: GDK devs <<bugs-common>>
Version: 11.37.7 (Jun2020)
Last updated: 2020-07-27 09:30:14 +0200
## Comment 27896
Date: 2020-07-09 18:45:47 +0200
From: jpastuszek
After migrating from Apr2019-SP1 to Jun2020 (patched with patch from Bug #6922) when selecting data by timestamp column with WHERE statement on the timestamp I get only rows for timestamps just before midnight.
If the query for timestamp column was done against the base table (I use merge tables normally) with no WHERE statement and with ORDER BY statement the data returned by the first query will become correct (fixed).
After some digging I figured out that the "imprints" data files are not migrated to the new timestamp format. Looks like full scan query updates the "imprints" data.
As a workaround I have removed all ".timprints" files corresponding to "timestamp" type of BAT and that resolved the issue for me.
## Comment 27899
Date: 2020-07-10 09:11:07 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [79da4596fddd](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=79da4596fddd) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=79da4596fddd](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=79da4596fddd)
Changeset description:
Destroy index structures when upgrading a BAT to a new format.
This fixes bug #6923.
| Imprints data files for timestamp BAT not migrated to the new format | https://api.github.com/repos/MonetDB/MonetDB/issues/6923/comments | 0 | 2020-11-30T16:59:15Z | 2024-06-27T13:09:32Z | https://github.com/MonetDB/MonetDB/issues/6923 | 753,644,270 | 6,923 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-09 18:34:10 +0200
From: jpastuszek
To: GDK devs <<bugs-common>>
Version: 11.37.7 (Jun2020)
Last updated: 2020-07-27 09:30:15 +0200
## Comment 27895
Date: 2020-07-09 18:34:10 +0200
From: jpastuszek
After migrating from Apr2019-SP1 to Jun2020, timestamp columns in data, that were already stored, are like -4652-01-22 instead of 2020-07-05. If I insert new data and query it, it all works fine. Looks like the data was not migrated correctly or at all.
After some digging in the code I found out that the migration only happens for the first BAT only - so only one BAT is ever migrated.
The reason for that is that the code is missing the handling of case where "ttype" is known after first BAT was migrated via "ATOMunknown_name" code path.
Patch:
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -874,6 +877,11 @@ fixdatebats(void)
strcmp(anme, "daytime") == 0) &&
fixdateheap(b, anme) != GDK_SUCCEED)
return GDK_FAIL;
+ } else if ((b->ttype == TYPE_date ||
+ b->ttype == TYPE_timestamp ||
+ b->ttype == TYPE_daytime) &&
+ fixdateheap(b, ATOMname(b->ttype)) != GDK_SUCCEED) {
+ return GDK_FAIL;
}
}
return GDK_SUCCEED;
With this all BATs are processed and contain correct timestamps.
## Comment 27897
Date: 2020-07-09 23:12:27 +0200
From: @sjoerdmullender
Good find!
I think that this is due to the moving of the time and date types into the GDK layer. In the previous release (Nov2019), TYPE_date etc. values weren't known in the GDK layer and these types were still really unknown to the GDK layer. So in the Nov2019 release, the code worked correctly (I'm pretty sure).
In the Jun2020 release, the date and time types were moved into the GDK layer, so they are no longer unknown at the point this code is run.
Since we officially don't support upgrades from older (more than one version ago) releases (we don't test it), we didn't notice. Having said that, if the upgrade can be made to work easily, we're happy to do it.
In other words, I'm happy with the fix. I'll adapt it a little and check it in.
## Comment 27898
Date: 2020-07-09 23:29:49 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [3ab4599c8f93](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3ab4599c8f93) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=3ab4599c8f93](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=3ab4599c8f93)
Changeset description:
Fix for upgrade of time and date type columns since move of type to GDK.
This fixes bug #6922.
| Timestamp columns not migrated to new format | https://api.github.com/repos/MonetDB/MonetDB/issues/6922/comments | 0 | 2020-11-30T16:59:12Z | 2024-06-27T13:09:31Z | https://github.com/MonetDB/MonetDB/issues/6922 | 753,644,244 | 6,922 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-07 13:46:28 +0200
From: Walter <<walter.weinmann>>
To: buildtools devs <<bugs-buildtools>>
Version: 11.37.7 (Jun2020)
Last updated: 2020-07-07 13:46:28 +0200
## Comment 27894
Date: 2020-07-07 13:46:28 +0200
From: Walter <<walter.weinmann>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
Build Identifier:
I am working on the open source project db_seeder (https://github.com/KonnexionsGmbH/db_seeder) and want to add MonetDB. To keep my work regarding DBMS installation simple, I usually use suitable Docker Images. Unfortunately MonetDB doesn't seem to provide the current release as a docker image (see DockerHub https://hub.docker.com/r/monetdb/monetdb/tags). Also the description for using the image is missing.
I will gladly do this work if you tell me where to find the appropriate development environment (repository, dockerfile etc.).
Reproducible: Always
| DockerHub monetdb/monetdb is outdatet | https://api.github.com/repos/MonetDB/MonetDB/issues/6921/comments | 0 | 2020-11-30T16:59:09Z | 2024-06-28T10:11:14Z | https://github.com/MonetDB/MonetDB/issues/6921 | 753,644,210 | 6,921 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-06 13:29:11 +0200
From: @PedroTadim
To: SQL devs <<bugs-sql>>
Version: 11.37.7 (Jun2020)
Last updated: 2020-07-27 09:30:14 +0200
## Comment 27893
Date: 2020-07-06 13:29:11 +0200
From: @PedroTadim
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
Build Identifier:
Run the statements bellow.
Reproducible: Always
### Steps to Reproduce:
CREATE TABLE t0(c0 boolean, c1 boolean, c2 serial, UNIQUE(c0, c1));
INSERT INTO t0(c1) VALUES((0.5968066098520423) NOT BETWEEN SYMMETRIC (CAST(length(upper(r'z')) AS INT)) AND (1347145665)), (FALSE);
INSERT INTO t0(c0) VALUES(TRUE);
INSERT INTO t0(c1) VALUES(FALSE), (TRUE);
INSERT INTO t0(c2, c0, c1) VALUES(1347145665, (ltrim(lower(r'K'), ((upper(r'296348087'))||(- (1582370739))))) IS NOT NULL, (((lower(r'ö
egK,纗HSJw!{cOw⇒l/l!B*H'))||(((CAST(0.12411368110083143 AS INT))+(-1795901173))))) IN (lower(CAST(TRUE AS STRING)))), (-1795901173, NULL, (0.9575114678279173) NOT IN (2.96348087E8, 0.5010777753365665)), (1922411524, TRUE, (0.5020325273627405) NOT IN (-1388966352, 1163825182));
INSERT INTO t0(c1) VALUES(TRUE);
INSERT INTO t0(c1, c2) VALUES(FALSE, 623585248);
INSERT INTO t0(c0) VALUES(NOT (NOT ((((-1388966352)*(-984145454))) NOT IN (0.7356286)))), (FALSE);
INSERT INTO t0(c0) VALUES(TRUE);
INSERT INTO t0(c2) VALUES(-1235619315);
DELETE FROM t0 WHERE (t0.c0) = FALSE;
INSERT INTO t0(c1, c0, c2) VALUES(TRUE, ((+ (- (1580722914)))>(charindex(CAST(0.347536126443453330381316845887340605258941650390625 AS STRING), ((CAST(TRUE AS STRING(771)))||(0.2182260714120349831546263885684311389923095703125)), length(r'd')))), -1819817735);
UPDATE t0 SET c2 = DEFAULT WHERE ((((t0.c1)OR(CAST(t0.c2 AS BOOLEAN))))OR((CAST(0.6873694879073857 AS DECIMAL)) NOT IN (0.10021624439224552371996423971722833812236785888671875)));
SELECT t0.c0 FROM t0 WHERE ((CAST(t0.c2 AS INT)) NOT BETWEEN ASYMMETRIC (abs(t0.c2)) AND (((t0.c2)/(t0.c2)))) NOT BETWEEN ASYMMETRIC (t0.c0) AND ((t0.c2) NOT IN (t0.c2));
### Actual Results:
!GDK reported error: project_bte: does not match always
### Expected Results:
A result set.
| SQLancer project_bte: does not match always | https://api.github.com/repos/MonetDB/MonetDB/issues/6920/comments | 0 | 2020-11-30T16:59:06Z | 2024-06-27T13:09:29Z | https://github.com/MonetDB/MonetDB/issues/6920 | 753,644,158 | 6,920 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-06 12:17:23 +0200
From: @PedroTadim
To: SQL devs <<bugs-sql>>
Version: 11.37.7 (Jun2020)
Last updated: 2020-07-27 09:30:15 +0200
## Comment 27892
Date: 2020-07-06 12:17:23 +0200
From: @PedroTadim
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
Build Identifier:
Run the query bellow.
Reproducible: Always
### Steps to Reproduce:
select "insert"('屁{珙', 1, 1, '1');
### Actual Results:
Result set construction failed.
### Expected Results:
屁1珙
| SQLancer insert function doesn't handle utf-8 strings | https://api.github.com/repos/MonetDB/MonetDB/issues/6919/comments | 0 | 2020-11-30T16:59:02Z | 2024-06-27T13:09:28Z | https://github.com/MonetDB/MonetDB/issues/6919 | 753,644,116 | 6,919 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-06 10:11:04 +0200
From: @PedroTadim
To: SQL devs <<bugs-sql>>
Version: 11.37.7 (Jun2020)
Last updated: 2020-07-27 09:30:13 +0200
## Comment 27890
Date: 2020-07-06 10:11:04 +0200
From: @PedroTadim
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
Build Identifier:
Run the step bellow.
Reproducible: Always
### Steps to Reproduce:
SELECT sql_max(NULL, '');
### Actual Results:
Strange error.
### Expected Results:
NULL
| SQLancer query compilation error | https://api.github.com/repos/MonetDB/MonetDB/issues/6918/comments | 0 | 2020-11-30T16:58:59Z | 2024-06-27T13:09:27Z | https://github.com/MonetDB/MonetDB/issues/6918 | 753,644,085 | 6,918 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-04 07:52:58 +0200
From: @mlkersten
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2020-07-27 09:30:15 +0200
## Comment 27889
Date: 2020-07-04 07:52:58 +0200
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:77.0) Gecko/20100101 Firefox/77.0
Build Identifier:
If you take an input file as shown below, where a few lines have an extra space, than the decimal parsing fails. This does not happen when reading from STDIN
sql>select * from sys.rejects();
+-------+-------+-------------------------------------------------+--------+
| rowid | fldid | message | input |
+=======+=======+=================================================+========+
| 8 | 2 | line 8 field d 'decimal(8,3)' expected in '5 ' | 0,5 |
| 9 | 2 | line 9 field d 'decimal(8,3)' expected in '67 ' | 0,67 |
+-------+-------+-------------------------------------------------+--------+
Reproducible: Always
### Steps to Reproduce:
create table tmpcopy(i integer, d decimal(8,3));
copy into tmpcopy from '/path/input' delimiters ',','\n' best effort;
select * from sys.rejects();
select * from tmpcopy;
drop table tmpcopy;
and use an input file containing
0,1.2
0,2.34
0,3.456
0,4.456
0,5
0,67
0,890
0,5
0,67
0,890
### Expected Results:
Proper parsing of the decimal ignoring the white space after it.
## Comment 27924
Date: 2020-07-21 09:25:38 +0200
From: @sjoerdmullender
Test added: https://dev.monetdb.org/hg/MonetDB/rev/7d8a14cb4fc1
Fix added: https://dev.monetdb.org/hg/MonetDB/rev/2b2f95657916
| Decimal parsing fails | https://api.github.com/repos/MonetDB/MonetDB/issues/6917/comments | 0 | 2020-11-30T16:58:57Z | 2024-06-27T13:09:26Z | https://github.com/MonetDB/MonetDB/issues/6917 | 753,644,044 | 6,917 |
[
"MonetDB",
"MonetDB"
] | Date: 2020-07-03 17:42:55 +0200
From: @PedroTadim
To: SQL devs <<bugs-sql>>
Version: 11.37.7 (Jun2020)
Last updated: 2020-07-03 18:48:42 +0200
## Comment 27888
Date: 2020-07-03 17:42:55 +0200
From: @PedroTadim
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
Build Identifier:
Runs the statements.
Reproducible: Always
### Steps to Reproduce:
CREATE TABLE "t0" ("c0" BOOLEAN NOT NULL,"c1" SMALLINT NOT NULL,CONSTRAINT "t0_c0_c1_pkey" PRIMARY KEY ("c0", "c1"));
INSERT INTO "t0" VALUES (false, -1);
create view v0(c0, c1, c2, c3) as (select ((t0.c1)<<(cast(0.09114074486978418487836961503489874303340911865234375 as int))), 0.4088967652609865, 0.3848869389602949109274732109042815864086151123046875, t0.c0 from t0 where t0.c0);
SELECT v0.c0 FROM t0 FULL OUTER JOIN v0 ON t0.c0 WHERE ((rtrim(((upper(''))||(v0.c1)))) IS NULL) IS NULL;
### Actual Results:
A single NULL value.
### Expected Results:
empty
| SQLancer query with wrong results | https://api.github.com/repos/MonetDB/MonetDB/issues/6916/comments | 0 | 2020-11-30T16:58:54Z | 2024-06-28T13:07:51Z | https://github.com/MonetDB/MonetDB/issues/6916 | 753,644,001 | 6,916 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T16:49:47Z
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/6915/comments | 0 | 2020-11-30T16:58:51Z | 2020-11-30T16:58:53Z | https://github.com/MonetDB/MonetDB/issues/6915 | 753,643,975 | 6,915 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T16:49:47Z
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/6914/comments | 0 | 2020-11-30T16:58:48Z | 2020-11-30T16:58:50Z | https://github.com/MonetDB/MonetDB/issues/6914 | 753,643,940 | 6,914 |
[
"MonetDB",
"MonetDB"
] | # Deleted Bugzilla Bug
Date: 2020-11-30T16:49:47Z
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/6913/comments | 0 | 2020-11-30T16:58:46Z | 2020-11-30T16:58:48Z | https://github.com/MonetDB/MonetDB/issues/6913 | 753,643,908 | 6,913 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.