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: 2013-12-12 12:46:16 +0100
From: @swingbit
To: GDK devs <<bugs-common>>
Version: 11.21.19 (Jul2015-SP4)
CC: @njnes, renalkoclok
Last updated: 2020-06-03 09:10:27 +0200
## Comment 19416
Date: 2013-12-12 12:46:16 +0100
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36
Build Identifier:
This is based on my assumption (please correct me otherwise), that each client connection opens a new thread.
Apparently, too many clients are already open for this database:
$ mclient -d 20131211_equip_rss_3
maximum concurrent client limit reached (65), please try again later
The limit for this database is indeed 64 (BTW: why does the error mention 65?)
$ monetdb get all 20131211_equip_rss_3
name prop source value
20131211_equip_rss_3 name - 20131211_equip_rss_3
20131211_equip_rss_3 type default database
20131211_equip_rss_3 shared default yes
20131211_equip_rss_3 nthreads default 8
20131211_equip_rss_3 optpipe default default_pipe
20131211_equip_rss_3 readonly default no
20131211_equip_rss_3 nclients default 64
However, only 18 threads seem to be existing for this database:
$ ps -eLf | grep mserver5 | grep 20131211_equip_rss_3 | wc -l
18
And even only 53 threads in TOTAL for monetdb:
$ ps -eLf | grep mserver5 | wc -l
53
Reproducible: Always
$ mserver5 --version
MonetDB 5 server v11.15.20 (64-bit, 64-bit oids)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2013 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 15.6GiB available memory, 8 available cpu cores
Libraries:
libpcre: 8.32 2012-11-30 (compiled with 8.32)
openssl: OpenSSL 1.0.1e 11 Feb 2013 (compiled with OpenSSL 1.0.1e-fips 11 Feb 2013)
libxml2: 2.9.1 (compiled with 2.9.1)
Compiled by: roberto@photon.spinque.com (x86_64-unknown-linux-gnu)
Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code
Linking : /usr/bin/ld -m elf_x86_64
## Comment 19417
Date: 2013-12-12 13:11:51 +0100
From: @swingbit
Additional confirmation that only 18 threads were belonging to that database (53-35=18):
$ monetdb stop 20131211_equip_rss_3
stopping database '20131211_equip_rss_3'... done
$ ps -eLf | grep mserver5 | wc -l
35
## Comment 19420
Date: 2013-12-13 14:05:59 +0100
From: @njnes
roberto how can we reproduce the error/bug?
## Comment 19421
Date: 2013-12-13 14:11:04 +0100
From: @swingbit
Yes, good question.
At the moment I cannot provide a reproducible test.
Just a hint that the count can, apparently, be incorrect under certain circumstances.
My hope was that, even without a test, it would be not too difficult to double-check the conditions that increment / reduce the count.
## Comment 19422
Date: 2013-12-13 15:09:58 +0100
From: @sjoerdmullender
(In reply to comment 3)
> My hope was that, even without a test, it would be not too difficult to
> double-check the conditions that increment / reduce the count.
It's not that simple: the message is issued when there are no free slots, but why that is the case isn't immediately obvious.
## Comment 19425
Date: 2013-12-13 15:50:08 +0100
From: @swingbit
Of course, I understand.
If I find a way to make it reproducible I'll post it.
In the meantime, it's at least good to know that this can happen.
## Comment 27765
Date: 2020-06-03 09:10:27 +0200
From: @sjoerdmullender
The content of attachment 666 has been deleted for the following reason:
spam
| Bogus (?) "Maximum concurrent client limit reached (65)" | https://api.github.com/repos/MonetDB/MonetDB/issues/3410/comments | 0 | 2020-11-30T12:36:36Z | 2024-06-28T07:19:42Z | https://github.com/MonetDB/MonetDB/issues/3410 | 753,443,489 | 3,410 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-12-10 10:47:28 +0100
From: @arjenderijke
To: SQL devs <<bugs-sql>>
Version: -- development
CC: martin.van.dinther, @PedroTadim
Last updated: 2020-06-15 09:28:02 +0200
## Comment 19405
Date: 2013-12-10 10:47:28 +0100
From: @arjenderijke
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20121207 Iceweasel/3.5.16 (like Firefox/3.5.16)
Build Identifier:
We need an aggregate function for creating an json array in a group by query. If you have a table: ( 1, 1), (1, 2) , (1, 3)
the query: select column1, to_json_arry(column2) from table group by column1;
should return record: (1, '[ 1, 2, 3 ]')
We also need the reverse function "from_json_array", "that is, from the return record in the example create the table.
And also a "json_array_element" function that returns a specific element from a json array.
Reproducible: Always
## Comment 27688
Date: 2020-05-01 20:38:49 +0200
From: Martin van Dinther <<martin.van.dinther>>
FYI: There exists (checked in Nov2019 release) json aggregate function: json.tojsonarray(column_expr).
The column_expr must be of type double (for numeric values) or clob (for character strings).
Example:
create table t3409 (column1 int, column2 int);
insert into t3409 values (1, 1), (1, 2), (1, 3);
select column1, json.tojsonarray(column2) from t3409 group by column1;
-- returns: 1 [ "1", "2", "3" ]
This is almost as requested (the array elements surrounded by double quotes, so converted to strings, that could be improved).
See also
https://www.monetdb.org/Documentation/Manuals/SQLreference/JSONFunctions
At the end the aggregate functions are listed.
| Aggregate function to generate json array | https://api.github.com/repos/MonetDB/MonetDB/issues/3409/comments | 0 | 2020-11-30T12:36:34Z | 2024-06-27T12:01:57Z | https://github.com/MonetDB/MonetDB/issues/3409 | 753,443,454 | 3,409 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-12-10 10:34:03 +0100
From: @arjenderijke
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2014-02-20 15:03:08 +0100
## Comment 19404
Date: 2013-12-10 10:34:03 +0100
From: @arjenderijke
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20121207 Iceweasel/3.5.16 (like Firefox/3.5.16)
Build Identifier:
A query that has a number of nested concat statements causes mserver to crash.
Reproducible: Always
### Steps to Reproduce:
1. select concat(concat(concat(...... , ), ...) from table
2.
3.
### Actual Results:
Connection terminated
In merovingian.log you see:
2013-12-10 10:27:51 MSG merovingian[17187]: database 'demo' (17208) was killed by signal SIGSEGV
## Comment 19406
Date: 2013-12-10 13:01:53 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [067195f12153](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=067195f12153) made by Arjen de Rijke <arjen.de.rijke@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=067195f12153](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=067195f12153)
Changeset description:
add test for bug #3408
## Comment 19410
Date: 2013-12-11 12:12:07 +0100
From: @njnes
Fixed by initializing the stacked variables
## Comment 19623
Date: 2014-02-20 15:03:08 +0100
From: @sjoerdmullender
Jan2014 has been released.
| nested concat query crashed server | https://api.github.com/repos/MonetDB/MonetDB/issues/3408/comments | 0 | 2020-11-30T12:36:32Z | 2024-06-27T12:01:56Z | https://github.com/MonetDB/MonetDB/issues/3408 | 753,443,422 | 3,408 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-12-10 10:25:30 +0100
From: @arjenderijke
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2013-12-11 12:44:41 +0100
## Comment 19403
Date: 2013-12-10 10:25:30 +0100
From: @arjenderijke
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20121207 Iceweasel/3.5.16 (like Firefox/3.5.16)
Build Identifier:
When dumping a table to a sql file that contains a uuid column, the dump is incorrect. If you then try to restore the table, you get an error:
value ... not inserted, expecting type uuid
Reproducible: Always
## Comment 19408
Date: 2013-12-10 13:26:25 +0100
From: @arjenderijke
If you have a table with a uuid column, the dump file that is created looks like this:
START TRANSACTION;
SET SCHEMA "sys";
CREATE TABLE "sys"."testuuid" (
"column1" UUID
);
COPY 1 RECORDS INTO "sys"."testuuid" FROM stdin USING DELIMITERS '\t','\n','"';
38fded43-79ef-41b0-a2af-05d20d7c4d51
COMMIT;
## Comment 19411
Date: 2013-12-11 12:35:24 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [69433fa7fefe](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=69433fa7fefe) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=69433fa7fefe](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=69433fa7fefe)
Changeset description:
Implemented uuid.fromstr.
This fixes bug #3407.
## Comment 19412
Date: 2013-12-11 12:44:13 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [f3de6d12f7b2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f3de6d12f7b2) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f3de6d12f7b2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f3de6d12f7b2)
Changeset description:
Added test for bug #3407.
| Dump of uuid column incorrect | https://api.github.com/repos/MonetDB/MonetDB/issues/3407/comments | 0 | 2020-11-30T12:36:29Z | 2024-06-27T12:01:55Z | https://github.com/MonetDB/MonetDB/issues/3407 | 753,443,396 | 3,407 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-12-10 10:05:21 +0100
From: @arjenderijke
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2019-01-21 17:20:44 +0100
## Comment 19402
Date: 2013-12-10 10:05:21 +0100
From: @arjenderijke
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20121207 Iceweasel/3.5.16 (like Firefox/3.5.16)
Build Identifier:
We need to add functions in order to handle queries with "is (not) null" clauses on json columns
Reproducible: Always
## Comment 19407
Date: 2013-12-10 13:22:24 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [c56b27a02e4e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c56b27a02e4e) made by Arjen de Rijke <arjen.de.rijke@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c56b27a02e4e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c56b27a02e4e)
Changeset description:
add test for bug #3406
## Comment 19409
Date: 2013-12-10 14:06:13 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [2480b7bc649d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2480b7bc649d) made by Stefan Manegold <Stefan.Manegold@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2480b7bc649d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2480b7bc649d)
Changeset description:
json_is_null.Bug-3406: removed (ignored) warning from stable output
(yes, it's ignored and does not "harm" --- but without is "nicer" ;-))
## Comment 26828
Date: 2019-01-21 17:20:44 +0100
From: @sjoerdmullender
Has been implemented a long time ago.
| Add null handling function for the json atom | https://api.github.com/repos/MonetDB/MonetDB/issues/3406/comments | 0 | 2020-11-30T12:36:27Z | 2024-06-27T12:01:54Z | https://github.com/MonetDB/MonetDB/issues/3406 | 753,443,375 | 3,406 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-12-10 10:01:15 +0100
From: @arjenderijke
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2016-04-11 11:44:54 +0200
## Comment 19401
Date: 2013-12-10 10:01:15 +0100
From: @arjenderijke
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20121207 Iceweasel/3.5.16 (like Firefox/3.5.16)
Build Identifier:
We need the bulk version of all the json functions, such as json_filter, json_text, json_length
Reproducible: Always
| Add bulk versions of json functions | https://api.github.com/repos/MonetDB/MonetDB/issues/3405/comments | 0 | 2020-11-30T12:36:25Z | 2024-06-28T13:40:16Z | https://github.com/MonetDB/MonetDB/issues/3405 | 753,443,350 | 3,405 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-12-06 14:00:39 +0100
From: @swingbit
To: GDK devs <<bugs-common>>
Version: 11.15.19 (Feb2013-SP6)
Last updated: 2014-02-20 15:02:41 +0100
## Comment 19394
Date: 2013-12-06 14:00:39 +0100
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36
Build Identifier:
Very difficult to make a reproducible test, but it seems to be happening when committing a large transaction which includes creation of tables + PK, FK, unique constraints. If needed I can provide access to a live gdb session on the database that reached the assertion.
mserver5: /opt/spinque/MonetDBServer/MonetDB.Spinque_Feb2013/src/gdk/gdk_bbp.c:3168: do_backup: As
sertion `h->storage == STORE_MMAP' failed.
The actual value for h->storage is STORE_MEM.
The problem seems to occur after changeset [aa2e3065be7e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=aa2e3065be7e)
Reproducible: Always
$ mserver5 --version
MonetDB 5 server v11.15.20 (64-bit, 64-bit oids)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2013 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 15.6GiB available memory, 8 available cpu cores
Libraries:
libpcre: 8.32 2012-11-30 (compiled with 8.32)
openssl: OpenSSL 1.0.1e 11 Feb 2013 (compiled with OpenSSL 1.0.1e-fips 11 Feb 2013)
libxml2: 2.9.1 (compiled with 2.9.1)
Compiled by: roberto@photon.spinque.com (x86_64-unknown-linux-gnu)
Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code
Linking : /usr/bin/ld -m elf_x86_64
## Comment 19395
Date: 2013-12-06 14:10:01 +0100
From: @swingbit
Sorry, I should have at least posted the bt:
0 do_backup (srcdir=0x7fc052c48a10 "bat/01/", nme=0x7fc052c48a50 "167", extbase=0x7fc05c29a822 "tail", h=0x2818af8, tp=3, dirty=1,
subcommit=1 '\001') at /opt/spinque/MonetDBServer/MonetDB.Spinque_Feb2013/src/gdk/gdk_bbp.c:3168
1 0x00007fc05bdab1bd in BBPbackup (b=0x28189c0, subcommit=1 '\001')
at /opt/spinque/MonetDBServer/MonetDB.Spinque_Feb2013/src/gdk/gdk_bbp.c:3247
2 0x00007fc05bdab51e in BBPsync (cnt=1316, subcommit=0x7fc01cf265a0)
at /opt/spinque/MonetDBServer/MonetDB.Spinque_Feb2013/src/gdk/gdk_bbp.c:3298
3 0x00007fc05bd8e037 in TMsubcommit_list (subcommit=0x7fc01cf265a0, cnt=1316)
at /opt/spinque/MonetDBServer/MonetDB.Spinque_Feb2013/src/gdk/gdk_tm.c:198
4 0x00007fc05be7aad6 in bm_subcommit (list_bid=0x2937680, list_nme=0x2937d60, catalog_bid=0x2937680, catalog_nme=0x2937d60,
extra=0x7fc01cef6cc0, debug=0) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Feb2013/src/gdk/gdk_logger.c:1009
5 0x00007fc05be7fc5a in bm_commit (lg=0x2937500) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Feb2013/src/gdk/gdk_logger.c:2040
6 0x00007fc05be79bba in logger_commit (lg=0x2937500) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Feb2013/src/gdk/gdk_logger.c:928
7 0x00007fc05be7cbdd in logger_exit (lg=0x2937500) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Feb2013/src/gdk/gdk_logger.c:1534
8 0x00007fc05be7cd1b in logger_restart (lg=0x2937500) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Feb2013/src/gdk/gdk_logger.c:1560
9 0x00007fc053dfbea0 in bl_restart () at /opt/spinque/MonetDBServer/MonetDB.Spinque_Feb2013/src/sql/storage/bat/bat_logger.c:271
10 0x00007fc053de3422 in store_manager () at /opt/spinque/MonetDBServer/MonetDB.Spinque_Feb2013/src/sql/storage/store.c:1553
11 0x00007fc053d6b93a in mvc_logmanager () at /opt/spinque/MonetDBServer/MonetDB.Spinque_Feb2013/src/sql/server/sql_mvc.c:149
12 0x0000003476c07c53 in start_thread () from /lib64/libpthread.so.0
13 0x00000034764f5dbd in clone () from /lib64/libc.so.6
## Comment 19396
Date: 2013-12-06 15:24:07 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [593bae62ca1e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=593bae62ca1e) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=593bae62ca1e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=593bae62ca1e)
Changeset description:
Remove assertion.
I wasn't really sure about the assertion anyway and I guess the
situation can occur that a backup file already exists when a BAT gets
subcommitted.
This fixes bug #3404.
## Comment 19397
Date: 2013-12-06 15:24:58 +0100
From: @sjoerdmullender
This particular bug can't occur anymore: the assertion that went off has been removed.
## Comment 19604
Date: 2014-02-20 15:02:41 +0100
From: @sjoerdmullender
Jan2014 has been released.
| Assertion `h->storage == STORE_MMAP' failed. | https://api.github.com/repos/MonetDB/MonetDB/issues/3404/comments | 0 | 2020-11-30T12:36:22Z | 2024-06-27T12:01:53Z | https://github.com/MonetDB/MonetDB/issues/3404 | 753,443,325 | 3,404 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-12-02 16:56:25 +0100
From: Klaudiusz <<klaudiusz223>>
To: SQL devs <<bugs-sql>>
Version: 11.15.17 (Feb2013-SP5)
CC: @njnes
Last updated: 2014-02-20 15:02:52 +0100
## Comment 19373
Date: 2013-12-02 16:56:25 +0100
From: Klaudiusz <<klaudiusz223>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36
Build Identifier:
I can't apply NOT NULL constraint if there were previously null values in this table.
Reproducible: Always
### Steps to Reproduce:
CREATE TABLE foo (i INT);
INSERT INTO foo (i) VALUES (NULL);
DELETE from foo where i IS NULL;
ALTER TABLE foo ALTER COLUMN i SET NOT NULL;
### Actual Results:
ALTER TABLE: NOT NULL constraint violated for column foo.i
### Expected Results:
operation successful
MonetDB 5 server v11.15.20 (64-bit, 64-bit oids)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2013 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 252.2GiB available memory, 32 available cpu cores
Libraries:
libpcre: 7.8 2008-09-05 (compiled with 7.8)
openssl: OpenSSL 1.0.0 29 Mar 2010 (compiled with OpenSSL 1.0.0-fips 29 Mar 2010)
libxml2: 2.7.6 (compiled with 2.7.6)
Compiled by: -@- (x86_64-unknown-linux-gnu)
Compilation: gcc -O3 -fomit-frame-pointer -pipe -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/bin/ld -m elf_x86_64
## Comment 19391
Date: 2013-12-04 11:13:43 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [8e8a60bd9949](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8e8a60bd9949) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=8e8a60bd9949](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=8e8a60bd9949)
Changeset description:
fixed bug #3403, ie check for NULL's on the real column not only on the
persistent column part (ie not looking at deletes and updates).
## Comment 19392
Date: 2013-12-04 11:23:02 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [ff6511d8ac0c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ff6511d8ac0c) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ff6511d8ac0c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ff6511d8ac0c)
Changeset description:
added test for bug #3403
## Comment 19609
Date: 2014-02-20 15:02:52 +0100
From: @sjoerdmullender
Jan2014 has been released.
| NOT NULL constraint can't be applied after deleting rows with null values | https://api.github.com/repos/MonetDB/MonetDB/issues/3403/comments | 0 | 2020-11-30T12:36:19Z | 2024-06-27T12:01:52Z | https://github.com/MonetDB/MonetDB/issues/3403 | 753,443,303 | 3,403 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-12-02 11:07:15 +0100
From: @sjoerdmullender
To: MonetDB5 devs <<bugs-monetdb5>>
Version: -- development
CC: @mlkersten
Last updated: 2014-10-31 14:14:18 +0100
## Comment 19372
Date: 2013-12-02 11:07:15 +0100
From: @sjoerdmullender
Since there are still lots of scalar functions for which there is no bulk version, we should create a C implementation of mal.multiplex so that we can avoid the interpreter overhead of an iterator loop. In addition, we wouldn't break the dataflow.
## Comment 19516
Date: 2014-02-01 11:29:26 +0100
From: @mlkersten
The mal.manifold() has been added. It implements the multiplex over multiple aligned tables and a single output table.
## Comment 20364
Date: 2014-10-31 14:14:18 +0100
From: @sjoerdmullender
Oct2014 has been released.
| We should have a C implementation of mal.multiplex. | https://api.github.com/repos/MonetDB/MonetDB/issues/3402/comments | 0 | 2020-11-30T12:36:17Z | 2024-06-27T12:01:51Z | https://github.com/MonetDB/MonetDB/issues/3402 | 753,443,284 | 3,402 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-11-29 10:17:00 +0100
From: Will M <<will.muldrew>>
To: SQL devs <<bugs-sql>>
Version: 11.15.17 (Feb2013-SP5)
CC: @njnes
Last updated: 2014-02-20 15:02:38 +0100
## Comment 19360
Date: 2013-11-29 10:17:00 +0100
From: Will M <<will.muldrew>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/28.0.1500.71 Chrome/28.0.1500.71 Safari/537.36
Build Identifier:
If querying with an invalid calendar date results are strange and inconsistent. I think this should be a parse error. e.g. In a similar situation MSSQL says:
Msg 242, Level 16, State 3, Line 1
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
While it should be hard to come up with bogus dates in a fully integrated system, if using SQL interactively it's quite easy to do this and accidentally issue huge queries, or get confusing results!
Reproducible: Always
### Steps to Reproduce:
sql>create table datebug (time timestamp, foo INT);
operation successful (15.898ms)
sql>insert into datebug values ('2013-01-01 00:00:00', 1);
1 affected row (3.944ms)
sql>insert into datebug values ('2013-02-01 00:00:00', 2);
1 affected row (5.756ms)
sql>insert into datebug values ('2013-03-01 00:00:00', 3);
1 affected row (3.311ms)
sql>insert into datebug values ('2013-04-01 00:00:00', 4);
1 affected row (3.452ms)
sql>insert into datebug values ('2013-05-01 00:00:00', 5);
1 affected row (3.299ms)
sql>insert into datebug values ('2013-06-01 00:00:00', 6);
1 affected row (3.464ms)
sql>select * from datebug where time < '2013-02-28';
+----------------------------+------+
| time | foo |
+============================+======+
| 2013-01-01 [000000000000](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=000000000000) | 1 |
| 2013-02-01 [000000000000](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=000000000000) | 2 |
+----------------------------+------+
2 tuples (2.295ms)
sql>select * from datebug where time < '2013-02-29';
+------+-----+
| time | foo |
+======+=====+
+------+-----+
0 tuples (2.055ms)
sql>select * from datebug where time > '2013-01-01' and time < '2013-02-30';
+----------------------------+------+
| time | foo |
+============================+======+
| 2013-02-01 [000000000000](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=000000000000) | 2 |
| 2013-03-01 [000000000000](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=000000000000) | 3 |
| 2013-04-01 [000000000000](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=000000000000) | 4 |
| 2013-05-01 [000000000000](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=000000000000) | 5 |
| 2013-06-01 [000000000000](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=000000000000) | 6 |
+----------------------------+------+
5 tuples (3.176ms)
sql>select * from datebug where time > '2013-01-01' and time < 'foobar';
timestamp (foobar) has incorrect format
### Actual Results:
As above
### Expected Results:
Some sort of parsing error (e.g. like the 'timestamp (foobar) has incorrect format' error)
## Comment 19364
Date: 2013-12-01 13:20:26 +0100
From: @njnes
properly return error on incorrect dates (not just nil)
## Comment 19365
Date: 2013-12-01 13:21:47 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [42a22ed752bf](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=42a22ed752bf) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=42a22ed752bf](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=42a22ed752bf)
Changeset description:
fixed bug #3401 and added test for it.
The date_tostr now returns 0 (ie no characters parsed) on error.
## Comment 19601
Date: 2014-02-20 15:02:38 +0100
From: @sjoerdmullender
Jan2014 has been released.
| inconsistent/strange handling of invalid dates (e.g. 2013-02-29) in where clause | https://api.github.com/repos/MonetDB/MonetDB/issues/3401/comments | 0 | 2020-11-30T12:36:14Z | 2024-06-27T12:01:50Z | https://github.com/MonetDB/MonetDB/issues/3401 | 753,443,255 | 3,401 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-11-26 10:40:43 +0100
From: @hannesmuehleisen
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2016-04-11 11:45:42 +0200
## Comment 19359
Date: 2013-11-26 10:40:43 +0100
From: @hannesmuehleisen
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.19 Safari/537.36
Build Identifier:
MySQL uses backticks (`) to escape DB identifiers such as table and column names. Since those are not used yet by MonetDB, it would be possible to also support those.
Also, MySQL supports restricting integer types with a length. These could be rewritten into DECIMAL or NUMERIC.
These changes would make it easier to migrate between MySQL and MonetDB.
Reproducible: Always
| Support Backticks in SQL queries and redundant size restrictions in DDL statements | https://api.github.com/repos/MonetDB/MonetDB/issues/3400/comments | 0 | 2020-11-30T12:36:12Z | 2024-06-28T13:40:16Z | https://github.com/MonetDB/MonetDB/issues/3400 | 753,443,229 | 3,400 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-11-25 18:24:26 +0100
From: @gijzelaerr
To: SQL devs <<bugs-sql>>
Version: 11.15.17 (Feb2013-SP5)
CC: @mlkersten, @njnes, @drstmane
Last updated: 2014-02-20 15:02:32 +0100
## Comment 19357
Date: 2013-11-25 18:24:26 +0100
From: @gijzelaerr
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36
Build Identifier:
$ monetdb create bla
$ monetdb release bla
$ mclient bla
sql>create table bla (id int);
sql>select (select id) from bla;
Connection terminated
$ monetdb status bla
name state health remarks
bla C 55s 0% 0s crashed on 2013-11-25 18:20:36
Reproducible: Always
### Steps to Reproduce:
1. run code in details
### Actual Results:
crash
### Expected Results:
no crash
11.15.17-20131008 (debian packages)
## Comment 19358
Date: 2013-11-25 22:53:37 +0100
From: @mlkersten
thanks, bug confirmed on default.
## Comment 19361
Date: 2013-11-29 16:35:11 +0100
From: @drstmane
A first gdb trace (with Feb2013):
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffee1b1700 (LWP 16055)]
0x00007fffef267548 in rel_groupby (sql=0x7fffe0005470, l=0x0, groupbyexps=0x0) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_select.c:921
921 rel->nrcols = l->nrcols;
Missing separate debuginfos, use: debuginfo-install bzip2-libs-1.0.6-7.fc18.x86_64 cfitsio-3.300-2.fc18.x86_64 cyrus-sasl-lib-2.1.23-37.fc18.x86_64 geos-3.3.2-3.fc18.x86_64 glibc-2.16-34.fc18.x86_64 keyutils-libs-1.5.6-1.fc18.x86_64 krb5-libs-1.10.3-17.fc18.x86_64 libcom_err-1.42.5-1.fc18.x86_64 libcurl-7.27.0-12.fc18.x86_64 libgcc-4.7.2-8.fc18.x86_64 libidn-1.26-1.fc18.x86_64 libselinux-2.1.12-7.3.fc18.x86_64 libssh2-1.4.3-2.fc18.x86_64 libstdc++-4.7.2-8.fc18.x86_64 libuuid-2.22.2-7.fc18.x86_64 libxml2-2.9.1-1.fc18.1.x86_64 ncurses-libs-5.9-11.20130511.fc18.x86_64 nspr-4.10.1-1.fc18.x86_64 nss-3.15.2-1.fc18.x86_64 nss-softokn-freebl-3.15.2-1.fc18.x86_64 nss-util-3.15.2-1.fc18.x86_64 openldap-2.4.35-4.fc18.1.x86_64 openssl-libs-1.0.1e-30.fc18.x86_64 pcre-8.31-5.fc18.x86_64 readline-6.2-5.fc18.x86_64 xz-libs-5.1.2-2alpha.fc18.x86_64 zlib-1.2.7-9.fc18.x86_64
(gdb) bt
0 0x00007fffef267548 in rel_groupby (sql=0x7fffe0005470, l=0x0, groupbyexps=0x0) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_select.c:921
1 0x00007fffef277217 in rel_value_exp2 (sql=0x7fffe0005470, rel=0x7fffee1b09a0, se=0x7fffe00c50d0, f=2, ek=..., is_last=0x7fffee1b08ac) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_select.c:4602
2 0x00007fffef277660 in rel_value_exp (sql=0x7fffe0005470, rel=0x7fffee1b09a0, se=0x7fffe00c50d0, f=2, ek=...) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_select.c:4670
3 0x00007fffef277745 in column_exp (sql=0x7fffe0005470, rel=0x7fffee1b09a0, column_e=0x7fffe00c51d0, f=2) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_select.c:4683
4 0x00007fffef2779a8 in rel_column_exp (sql=0x7fffe0005470, rel=0x7fffee1b09a0, column_e=0x7fffe00c51d0, f=2) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_select.c:4727
5 0x00007fffef278547 in rel_select_exp (sql=0x7fffe0005470, rel=0x7fffe00c56c0, sn=0x7fffe00c5490, ek=...) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_select.c:4920
6 0x00007fffef27927c in rel_query (sql=0x7fffe0005470, rel=0x0, sq=0x7fffe00c5490, toplevel=1, ek=..., apply=8) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_select.c:5125
7 0x00007fffef27aba7 in rel_subquery (sql=0x7fffe0005470, rel=0x0, sq=0x7fffe00c5490, ek=..., apply=8) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_select.c:5500
8 0x00007fffef27ac44 in rel_selects (sql=0x7fffe0005470, s=0x7fffe00c5490) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_select.c:5511
9 0x00007fffef264453 in rel_semantic (sql=0x7fffe0005470, s=0x7fffe00c5490) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_semantic.c:263
10 0x00007fffef1ec34b in sql_symbol2relation (c=0x7fffe0005470, sym=0x7fffe00c5490) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/backends/monet5/sql.mx:1751
11 0x00007fffef1b8b06 in SQLparser (c=0x627f88) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/backends/monet5/sql_scenario.c:1712
12 0x00007ffff7a65bd2 in runPhase (c=0x627f88, phase=1) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/monetdb5/mal/mal_scenario.c:522
13 0x00007ffff7a65d24 in runScenarioBody (c=0x627f88) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/monetdb5/mal/mal_scenario.c:557
14 0x00007ffff7a65ede in runScenario (c=0x627f88) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/monetdb5/mal/mal_scenario.c:586
15 0x00007ffff7a67054 in MSserveClient (dummy=0x627f88) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/monetdb5/mal/mal_session.c:446
16 0x0000003e16c07d15 in start_thread () from /lib64/libpthread.so.0
17 0x0000003e160f253d in clone () from /lib64/libc.so.6
(gdb) li
916 }
917 }
918 rel->l = l;
919 rel->r = groupbyexps;
920 rel->exps = aggrs;
921 rel->nrcols = l->nrcols;
922 rel->op = op_groupby;
923 return rel;
924 }
925
(gdb) p l
$1 = (sql_rel *) 0x0
(gdb) p l->nrcols
Cannot access memory at address 0x20
## Comment 19363
Date: 2013-12-01 12:08:31 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [b82b64682eb4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b82b64682eb4) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b82b64682eb4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b82b64682eb4)
Changeset description:
fixed bug #3399, if no apply is found/needed we can fallback to an
empty projection.
fixed bug in pqueue.c: handle voids (again)
## Comment 19597
Date: 2014-02-20 15:02:32 +0100
From: @sjoerdmullender
Jan2014 has been released.
| server crashed on simple (malformed) query | https://api.github.com/repos/MonetDB/MonetDB/issues/3399/comments | 0 | 2020-11-30T12:36:09Z | 2024-06-27T12:01:48Z | https://github.com/MonetDB/MonetDB/issues/3399 | 753,443,190 | 3,399 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-11-15 17:11:36 +0100
From: Kostis Kyzirakos <<kostis.kyzirakos>>
To: Merovingian devs <<bugs-merovingian>>
Version: 11.15.17 (Feb2013-SP5)
Last updated: 2013-12-03 13:59:36 +0100
## Comment 19338
Date: 2013-11-15 17:11:36 +0100
From: Kostis Kyzirakos <<kostis.kyzirakos>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0
Build Identifier:
The user is allowed to start monetdbd on a given dbfarm that may have not yet been initialized.
Reproducible: Always
### Steps to Reproduce:
1. Create a new directory
export TEMP_DB_FARM="/tmp/$(echo ${RANDOM})"
mkdir ${TEMP_DB_FARM}
2. Start monetdbd without initializing the new directory
monetdbd start ${TEMP_DB_FARM}
3. monetdbd will start without complaining about the fact that the dbfarm has not been initialized. The user is able to create/start/stop/... databases.
monetdb create sound
created database in maintenance mode: sound
monetdb start sound
starting database 'sound'... done
monetdb stop sound
stopping database 'sound'... done
4. However, the user is unable to stop or manage monetdbd.
monetdbd stop ${TEMP_DB_FARM}
unable to read properties from .: No such file or directory
monetdbd get all ${TEMP_DB_FARM}
unable to read properties from .: No such file or directory
### Expected Results:
monetdbd should shamelessly refuse to start serving an uninitialized dbfarm
## Comment 19339
Date: 2013-11-15 19:12:51 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [b215b05c5c79](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b215b05c5c79) made by Fabian Groffen <fabian@monetdb.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b215b05c5c79](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b215b05c5c79)
Changeset description:
merovingian: refuse to startup when properties are missing
dbfarms that we can't read .merovingian_properties from are either
messed up in terms of permissions, or created by a simple mkdir, such as
in bug #3398. Refuse starting up since this affects any other
operations on monetdbd (although it functions just fine), such as
shutdown via monetdbd stop ....
## Comment 19340
Date: 2013-11-15 19:13:21 +0100
From: @grobian
Fixed in Feb2013 branch. Should go in next release. Thanks!
## Comment 19381
Date: 2013-12-03 13:59:36 +0100
From: @sjoerdmullender
Feb2013-SP6 has been released.
| Cannot stop monetdbd after erroneously starting an uninitialized dbfarm | https://api.github.com/repos/MonetDB/MonetDB/issues/3398/comments | 0 | 2020-11-30T12:36:07Z | 2024-06-27T12:01:47Z | https://github.com/MonetDB/MonetDB/issues/3398 | 753,443,167 | 3,398 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-11-14 11:18:46 +0100
From: Dieter <<mayerd>>
To: clients devs <<bugs-clients>>
Version: 11.15.17 (Feb2013-SP5)
CC: mayerd
Last updated: 2013-12-03 13:59:32 +0100
## Comment 19331
Date: 2013-11-14 11:18:46 +0100
From: Dieter <<mayerd>>
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; MALC)
Build Identifier:
When using prepared INSERT-Statements "unkown error"-message is shown and
INSERT-Statements are not executed.
Reproducible: Always
### Steps to Reproduce:
1. Create the samples table in the database "voc"
create table prices (currency char(3) ,
valid_from char(8), price decimal(15,2));
2. Define the ODBC-System-DSN: MonetDB
3. Execute the VB-Script monetpara.vbs
### Actual Results:
Error message "unbekannter Fehler" (means "unkown error") is displayed.
### Expected Results:
3 records should be inserted via the prepared input statement.
## Comment 19332
Date: 2013-11-14 11:20:33 +0100
From: Dieter <<mayerd>>
Created attachment 249
VB-Script for testing
> Attached file: [monetpara.vbs](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3397_monetpara.vbs_249) (text/plain, 1217 bytes)
> Description: VB-Script for testing
## Comment 19333
Date: 2013-11-14 14:41:34 +0100
From: @sjoerdmullender
Can you please create a log and attach it to this bug report.
To create a log, you need to start the application that uses the MonetDB ODBC driver with an extra environment variable. Probably the easiest way to do that is to start a cmd window (Start -> Run... -> cmd.exe) and in that window type
set ODBCDEBUG=C:\....\odbc.log
and then start your application from this window.
The bit after the = should be the absolute pathname of a file you can write to. After the application is done it should contain a log of the complete interaction with the driver. Before attaching the file, please make sure it doesn't contain any sensitive information.
## Comment 19335
Date: 2013-11-15 09:13:46 +0100
From: Dieter <<mayerd>>
Created attachment 250
ODBC logfile
ODBC log for error situation
> Attached file: [odbc.log](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3397_odbc.log_250) (text/plain, 5701 bytes)
> Description: ODBC logfile
## Comment 19347
Date: 2013-11-20 10:59:12 +0100
From: @sjoerdmullender
Looks like this is due to an incorrect implementation of the (deprecated) SQLParamOptions function.
## Comment 19348
Date: 2013-11-20 11:00:23 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [53fd890a72af](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=53fd890a72af) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=53fd890a72af](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=53fd890a72af)
Changeset description:
Fix implementation of SQLParamOptions function.
This should fix bug #3397.
## Comment 19349
Date: 2013-11-20 11:10:36 +0100
From: @sjoerdmullender
With the fix I was able to run the test script. Without the fix, I wasn't.
## Comment 19351
Date: 2013-11-21 09:40:59 +0100
From: Dieter <<mayerd>>
Thanks for your action on this issue.
Can you provide a precompiled Version of the corrected ODBC.dll for
32bit/64bit Windows 7-Plattform. I'd like to test it in my environment and give you a feedback.
## Comment 19352
Date: 2013-11-21 11:21:48 +0100
From: @sjoerdmullender
You can try out the release candidate for the Feb2013-SP6 release at <http://dev.monetdb.org/downloads/testing/>.
## Comment 19375
Date: 2013-12-03 13:59:32 +0100
From: @sjoerdmullender
Feb2013-SP6 has been released.
| Error in ODBC-Driver when using Prepared Statements | https://api.github.com/repos/MonetDB/MonetDB/issues/3397/comments | 0 | 2020-11-30T12:36:04Z | 2024-06-27T12:01:46Z | https://github.com/MonetDB/MonetDB/issues/3397 | 753,443,136 | 3,397 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-11-13 16:25:18 +0100
From: @mlkersten
To: SQL devs <<bugs-sql>>
Version: 11.15.11 (Feb2013-SP3)
CC: @njnes
Last updated: 2013-12-03 13:59:39 +0100
## Comment 19329
Date: 2013-11-13 16:25:18 +0100
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Firefox/24.0
Build Identifier:
a.mckinley@analyticsengines.com produced a bug report on the mailinglist.
Hi all,
I am trying to evaluate the performance of MonetDB for an analytical workload.
I am using MonetDB-11.15.17 built from source on Ubuntu 13.04.
I have encountered a problem with user using defined functions in SQL which I have reduced to this test case.
I appears that whenever I have over 200,000 rows in the table, the UDF returns null.
First create a test data set with the following python:
import random
with open("test_data.csv","w") as f:
for i in range(0,1000000):
f.write("%s,%s\n" % (random.random(),random.random()))
Then I use the following to load the data, and try using a simple UDF in SQL.
CREATE TABLE TEST (
x float,
y float
);
COPY 200000 RECORDS INTO TEST from '/home/alastair/test_data.csv' USING DELIMITERS ',','\n','"' NULL AS '';
CREATE FUNCTION MY_UDF (x float, y float)
RETURNS float
BEGIN
DECLARE ret float;
set ret = LOG(x/y);
RETURN ret;
END;
SELECT 'udf alone',MY_UDF(0.1,0.2);
SELECT 'udf from table',MY_UDF(t.x,t.y) FROM TEST as t limit 1; -- this returns NULL with 200000 records
DROP FUNCTION MY_UDF;
DROP TABLE TEST;
The value returned my MY_UDF is null with 200,000 records, changing to 199,999 records in COPY INTO produces the correct result.
If I use a UDF built in C, the problem does not exist at all.
Reproducible: Always
## Comment 19330
Date: 2013-11-13 16:27:43 +0100
From: @mlkersten
A condensed version of this bug has been added to the repository as BugTracker_2013/Tests/udf_error.Bug-3396
## Comment 19334
Date: 2013-11-14 15:29:08 +0100
From: @njnes
the 200.000 rows aren't needed to trigger the bug. Just setting the --forcemito
will do. This clearly points into the merge table direction. Its likely related to handling if/then else in the mergetable code.
## Comment 19337
Date: 2013-11-15 15:50:38 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [9aa381c5d6bf](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9aa381c5d6bf) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9aa381c5d6bf](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9aa381c5d6bf)
Changeset description:
fixed bug #3396. Make sure mergetable overwrites the mat result, like the
original plan does.
## Comment 19341
Date: 2013-11-16 13:24:44 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [045ed91ead43](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=045ed91ead43) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=045ed91ead43](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=045ed91ead43)
Changeset description:
fixed crash in BATappend (cannot use memcpy on void bat)
approved output
after addition of quantile aggregate
after readded groups optimizer
approved output for bug #3396 (fix came from merge with feb2013, proper handling of variable overwriting in mergetable optimizer)
## Comment 19386
Date: 2013-12-03 13:59:39 +0100
From: @sjoerdmullender
Feb2013-SP6 has been released.
| Improper UDF expansion | https://api.github.com/repos/MonetDB/MonetDB/issues/3396/comments | 0 | 2020-11-30T12:36:02Z | 2024-06-27T12:01:45Z | https://github.com/MonetDB/MonetDB/issues/3396 | 753,443,102 | 3,396 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-11-08 06:12:15 +0100
From: movingon
To: SQL devs <<bugs-sql>>
Version: 11.15.17 (Feb2013-SP5)
CC: @mlkersten, @njnes
Last updated: 2013-12-03 13:59:33 +0100
## Comment 19326
Date: 2013-11-08 06:12:15 +0100
From: movingon
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36 CoolNovo/2.0.9.20
Build Identifier:
SQL error when performing sample queries to perform.
Reproducible: Always
### Steps to Reproduce:
1.sample table create
--------------------------
create table aaa (a varchar(100), b varchar(100), c int);
2. data insert
--------------------------
insert into aaa values ('a1aaaaaaaaaaaaaaaaa', 'b1bbbbbbbbbbbbbbbbbb', 100);
insert into aaa values ('a2aaaaaaaaaaaaaaaaa', 'b2bbbbbbbbbbbbbbbbbb', 100);
insert into aaa values ('a3aaaaaaaaaaaaaaaaa', 'b3bbbbbbbbbbbbbbbbbb', 100);
3. execute SQL
--------------------------
SELECT a, CASE WHEN c>=100.000000
AND c<=200.000000 THEN 'IntValue1' WHEN c>=200.000000
AND c<=300.000000 THEN 'IntValue2' ELSE 'Out of range' END AS CaseSentence
FROM aaa
WHERE
(
a = 'aaa'
and
(
(
CASE WHEN c>=100.000000
AND c<=200.000000 THEN 'IntValue1' WHEN c>=200.000000
AND c<=300.000000 THEN 'IntValue2' ELSE 'Out of range' END
) = 'IntValue1'
)
)
or
(
a = 'bbb'
and
(
(
CASE WHEN c>=100.000000
AND c<=200.000000 THEN 'IntValue1' WHEN c>=200.000000
AND c<=300.000000 THEN 'IntValue2' ELSE 'Out of range' END
) = 'IntValue2'
)
);
### Actual Results:
TypeException:user.s8_1[35]:'calc.ifthenelse' undefined in: _228:any := calc.ifthenelse(_222:bit, _54:bit, _224:bit, _226:oid)
TypeException:user.s8_1[37]:'bat.insert' undefined in: _231:any := bat.insert(_217:bat[:oid,:bit], _229:oid, _228:any)
TypeException:user.s8_1[52]:'calc.ifthenelse' undefined in: _246:any := calc.ifthenelse(_240:bit, _71:bit, _242:bit, _244:oid)
TypeException:user.s8_1[54]:'bat.insert' undefined in: _249:any := bat.insert(_237:bat[:oid,:bit], _247:oid, _246:any)
TypeException:user.s8_1[62]:'calc.ifthenelse' undefined in: _264:any := calc.ifthenelse(_260:bit, A13:str, A14:str, _262:oid)
TypeException:user.s8_1[64]:'bat.insert' undefined in: _267:any := bat.insert(_255:bat[:oid,:str], _265:oid, _264:any)
TypeException:user.s8_1[73]:'calc.ifthenelse' undefined in: _282:any := calc.ifthenelse(_276:bit, A10:str, _278:str, _280:oid)
TypeException:user.s8_1[75]:'bat.insert' undefined in: _285:any := bat.insert(_273:bat[:oid,:str], _283:oid, _282:any)
TypeException:user.s8_1[98]:'calc.ifthenelse' undefined in: _302:any := calc.ifthenelse(_296:bit, _88:bit, _298:bit, _300:oid)
TypeException:user.s8_1[100]:'bat.insert' undefined in: _305:any := bat.insert(_291:bat[:oid,:bit], _303:oid, _302:any)
TypeException:user.s8_1[124]:'calc.ifthenelse' undefined in: _320:any := calc.ifthenelse(_314:bit, _88:bit, _316:bit, _318:oid)
TypeException:user.s8_1[126]:'bat.insert' undefined in: _323:any := bat.insert(_311:bat[:oid,:bit], _321:oid, _320:any)
TypeException:user.s8_1[134]:'calc.ifthenelse' undefined in: _338:any := calc.ifthenelse(_334:bit, A22:str, A23:str, _336:oid)
TypeException:user.s8_1[136]:'bat.insert' undefined in: _341:any := bat.insert(_329:bat[:oid,:str], _339:oid, _338:any)
TypeException:user.s8_1[145]:'calc.ifthenelse' undefined in: _356:any := calc.ifthenelse(_350:bit, A19:str, _352:str, _354:oid)
TypeException:user.s8_1[147]:'bat.insert' undefined in: _359:any := bat.insert(_347:bat[:oid,:str], _357:oid, _356:any)
program contains errors
### Expected Results:
SQL is performed successfully and no result data.
## Comment 19327
Date: 2013-11-08 12:15:27 +0100
From: @mlkersten
Added the test script. Explain shows a lot of iterators.
## Comment 19342
Date: 2013-11-16 13:57:01 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [db8112175827](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=db8112175827) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=db8112175827](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=db8112175827)
Changeset description:
fixed bug #3395 (only calc functions which 'require' a candidate list (div), should be called with an extra argument, ie not ifthenelse).
also fixed the test itself (removed extra table, and bogus cast statements).
## Comment 19343
Date: 2013-11-16 13:57:03 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [d2ecf368fd11](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d2ecf368fd11) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d2ecf368fd11](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d2ecf368fd11)
Changeset description:
added test output for bug #3395
## Comment 19344
Date: 2013-11-16 13:58:33 +0100
From: @njnes
Fixed, ie exclude candidate list in call to ifthenelse
## Comment 19377
Date: 2013-12-03 13:59:33 +0100
From: @sjoerdmullender
Feb2013-SP6 has been released.
| error occurred during a query: "'CASE WHEN" sentence | https://api.github.com/repos/MonetDB/MonetDB/issues/3395/comments | 0 | 2020-11-30T12:35:59Z | 2024-06-27T12:01:44Z | https://github.com/MonetDB/MonetDB/issues/3395 | 753,443,069 | 3,395 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-11-04 15:52:32 +0100
From: @arjenderijke
To: SQL devs <<bugs-sql>>
Version: 11.15.17 (Feb2013-SP5)
CC: @njnes
Last updated: 2013-12-03 13:59:36 +0100
## Comment 19320
Date: 2013-11-04 15:52:32 +0100
From: @arjenderijke
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0
Build Identifier:
If you define a temporary table within a function, you cannot used special columntypes. If you select the function, you get an errormessage: Cannot find column type.
This does not happen if you use the standard columntypes like integer, float
Reproducible: Always
## Comment 19321
Date: 2013-11-04 16:13:44 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [9ee5aecf7b01](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9ee5aecf7b01) made by Arjen de Rijke <arjen.de.rijke@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9ee5aecf7b01](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9ee5aecf7b01)
Changeset description:
add test for bug #3394
## Comment 19328
Date: 2013-11-11 22:20:44 +0100
From: @njnes
now we also handle created types in declared tables
## Comment 19380
Date: 2013-12-03 13:59:36 +0100
From: @sjoerdmullender
Feb2013-SP6 has been released.
| "Cannot find column type" error in temporary tables in functions | https://api.github.com/repos/MonetDB/MonetDB/issues/3394/comments | 0 | 2020-11-30T12:35:56Z | 2024-06-27T12:01:43Z | https://github.com/MonetDB/MonetDB/issues/3394 | 753,443,046 | 3,394 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-11-04 15:20:21 +0100
From: Pete Hollobon <<pete>>
To: SQL devs <<bugs-sql>>
Version: 11.15.19 (Feb2013-SP6)
CC: pete
Last updated: 2014-02-20 15:02:39 +0100
## Comment 19319
Date: 2013-11-04 15:20:21 +0100
From: Pete Hollobon <<pete>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36
Build Identifier:
When using COPY ... INTO ..., using a non-standard string quote, any instances of that quote character in tables are not escaped, but the default string quote (") is escaped.
Reproducible: Always
### Steps to Reproduce:
create table pete_test.dumptest (a clob, b clob);
insert into pete_test.dumptest values ('one|two', 'three"four');
COPY (SELECT * FROM pete_test.dumptest) INTO STDOUT DELIMITERS ',', '\n', '|';
### Actual Results:
&1 0 1 2 1
% pete_test.dumptest, pete_test.dumptest table_name
% a, b name
% clob, clob type
% 7, 10 length
% 0 0, 0 0 typesizes
|one|two|,|three\"four|
&2 1 -1
### Expected Results:
|one\|two|,|three"four|
## Comment 19322
Date: 2013-11-05 11:24:10 +0100
From: Pete Hollobon <<pete>>
The same issue exists for non-standard record separators - newline is always escaped, the actual record separator used is not.
## Comment 19389
Date: 2013-12-03 14:24:45 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [14d425f1286f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=14d425f1286f) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=14d425f1286f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=14d425f1286f)
Changeset description:
Propagate quotes and separators down to "tostr" function.
Added test as well.
This fixes bug #3393.
## Comment 19390
Date: 2013-12-03 14:25:19 +0100
From: @sjoerdmullender
Fixed in Jan2014 branch since it involves an ABI change.
## Comment 19602
Date: 2014-02-20 15:02:39 +0100
From: @sjoerdmullender
Jan2014 has been released.
| "COPY .. INTO ..." - escape of string quotes | https://api.github.com/repos/MonetDB/MonetDB/issues/3393/comments | 0 | 2020-11-30T12:35:54Z | 2024-06-27T12:01:42Z | https://github.com/MonetDB/MonetDB/issues/3393 | 753,443,024 | 3,393 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-11-02 14:58:46 +0100
From: Baraa <<bem85>>
To: clients devs <<bugs-clients>>
Version: 11.15.17 (Feb2013-SP5)
CC: bem85
Last updated: 2013-12-03 13:59:31 +0100
## Comment 19315
Date: 2013-11-02 14:58:46 +0100
From: Baraa <<bem85>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36
Build Identifier:
I have oracle 11g database (64bit) on "host1" and monetdb (64bit) on "host2"
Using Monetdb ODBC driver I created a dblink from oracle to MonetDB.
some queries are working correctly but other queries are either giving some connection errors or returning the results with wrong values( datatype conversion). For my case it is the Integer column who poses a problem.
Reproducible: Always
### Steps to Reproduce:
1. In oracle I created a DB link "monora" (I used unixODBC as ODBC driver manager)
2. in monetDB I have the following table
CREATE TABLE "sys"."patientc" (
"id" INTEGER,
"age" INTEGER,
"mothername" VARCHAR(30),
"city" VARCHAR(20)
);
3. In oracle: I execute the following query:
select "id" from "patientc"@monora where rownum<20;
### Actual Results:
ID
--------
1
8589934592
2
1.2885E+10
3
1.7180E+10
4
2.1475E+10
5
2.5770E+10
6
3.0065E+10
7
3.4360E+10
8
3.8655E+10
9
4.2950E+10
10
### Expected Results:
ID
--------
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
## Comment 19316
Date: 2013-11-02 15:04:10 +0100
From: Baraa <<bem85>>
Created attachment 248
the attachmenet is the odbc log file
> Attached file: [sql.log](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3392_sql.log_248) (text/plain, 135921 bytes)
> Description: the attachmenet is the odbc log file
## Comment 19317
Date: 2013-11-02 15:16:42 +0100
From: Baraa <<bem85>>
In the log file you find the errors produced when executing the same query four times.
One of the executions, does not give error but it retreives the integer values as shown in the actual results.
## Comment 19325
Date: 2013-11-06 11:49:50 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [4cfad18a81ae](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4cfad18a81ae) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4cfad18a81ae](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4cfad18a81ae)
Changeset description:
SQL_C_SLONG refers to 32 bit int, not to potentially 64 bit long.
This hopefully fixes bug #3392.
## Comment 19350
Date: 2013-11-20 11:12:51 +0100
From: @sjoerdmullender
I'm assuming the patch fixed the problem. If not, please reopen.
## Comment 19374
Date: 2013-12-03 13:59:31 +0100
From: @sjoerdmullender
Feb2013-SP6 has been released.
| ODBC datatype conversion for INTEGER not working properly | https://api.github.com/repos/MonetDB/MonetDB/issues/3392/comments | 0 | 2020-11-30T12:35:52Z | 2024-06-27T12:01:41Z | https://github.com/MonetDB/MonetDB/issues/3392 | 753,443,001 | 3,392 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-10-25 23:18:24 +0200
From: Klaudiusz <<klaudiusz223>>
To: SQL devs <<bugs-sql>>
Version: 11.15.17 (Feb2013-SP5)
CC: @njnes
Last updated: 2014-02-20 15:03:11 +0100
## Comment 19307
Date: 2013-10-25 23:18:24 +0200
From: Klaudiusz <<klaudiusz223>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36
Build Identifier:
if there is foreign key
SELECT dim_perf.name from "sys"."fact_perf" join dim_perf using (dim_key) group by dim_perf.name ;
is more than 10x slower than
SELECT dim_perf.name,count(id) from "sys"."fact_perf" join dim_perf using (dim_key) group by dim_perf.name ;
In the second query MonetDB uses all CPU cores in first only one.
Reproducible: Always
### Steps to Reproduce:
-- 100 000 000 rows
CREATE TABLE "sys"."fact_perf" (
"id" BIGINT,
"value" DOUBLE,
"dim_key" BIGINT
);
-- 10 000 rows
CREATE TABLE "sys"."dim_perf" (
"dim_key" BIGINT,
"name" VARCHAR(15)
);
ALTER TABLE dim_perf ADD PRIMARY KEY (dim_key) ;
ALTER TABLE fact_perf ADD CONSTRAINT dim_key_fk FOREIGN KEY (dim_key) REFERENCES dim_perf (dim_key) MATCH FULL ;
-- This query is problematic with FK
-- During this query MonetDB uses only one CPU core
-- (1) ( Duration - 15.1s)
SELECT dim_perf.name from "sys"."fact_perf" join dim_perf using (dim_key) group by dim_perf.name ;
-- If I add count(id) to this query then performance is OK. Monet uses all CPU cores
-- (2) ( Duration 1.3s)
SELECT dim_perf.name,count(id) from "sys"."fact_perf" join dim_perf using (dim_key) group by dim_perf.name ;
-- If I drop FK
ALTER TABLE fact_perf DROP CONSTRAINT dim_key_fk ;
-- performance is much better than in (1) but not as good as in (2)
-- (3) ( Duration 2.6s)
SELECT dim_perf.name from "sys"."fact_perf" join dim_perf using (dim_key) group by dim_perf.name ;
MonetDB 5 server v11.15.18 (64-bit, 64-bit oids)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2013 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 252.2GiB available memory, 32 available cpu cores
Libraries:
libpcre: 7.8 2008-09-05 (compiled with 7.8)
openssl: OpenSSL 1.0.0 29 Mar 2010 (compiled with OpenSSL 1.0.0-fips 29 Mar 2010)
libxml2: 2.7.6 (compiled with 2.7.6)
Compiled by: (x86_64-unknown-linux-gnu)
Compilation: gcc -O3 -fomit-frame-pointer -pipe -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/bin/ld -m elf_x86_64
## Comment 19308
Date: 2013-10-25 23:19:33 +0200
From: Klaudiusz <<klaudiusz223>>
-- (1) with FK
EXPLAIN SELECT dim_perf.name from "sys"."fact_perf" join dim_perf using (dim_key) group by dim_perf.name ;
+--------------------------------------------------------------------------+
| mal |
+==========================================================================+
| function user.s28_3{autoCommit=true}():void; |
| X_30 := nil:bat[:oid,:str]; |
| barrier X_52 := language.dataflow(); |
| X_2 := sql.mvc(); |
| X_3:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf"); |
| X_6 := sql.bind_idxbat(X_2,"sys","fact_perf","dim_key_fk",0); |
| (X_9,r1_9) := sql.bind_idxbat(X_2,"sys","fact_perf","dim_key_fk",2); |
| X_12 := sql.bind_idxbat(X_2,"sys","fact_perf","dim_key_fk",1); |
| X_14 := sql.delta(X_6,X_9,r1_9,X_12); |
| X_15 := algebra.leftfetchjoin(X_3,X_14); |
| X_16:bat[:oid,:oid] := sql.tid(X_2,"sys","dim_perf"); |
| (X_18,r1_18) := algebra.join(X_15,X_16); |
| X_20 := sql.bind(X_2,"sys","dim_perf","name",0); |
| (X_22,r1_22) := sql.bind(X_2,"sys","dim_perf","name",2); |
| X_24 := sql.bind(X_2,"sys","dim_perf","name",1); |
| X_25 := sql.delta(X_20,X_22,r1_22,X_24); |
| X_26:bat[:oid,:str] := algebra.leftfetchjoinPath(r1_18,X_16,X_25); |
| (X_27,r1_28,r2_28) := group.subgroupdone(X_26); |
| X_30 := algebra.leftfetchjoin(r1_28,X_26); |
| language.pass(X_16); |
| language.pass(X_26); |
| exit X_52; |
| X_31 := sql.resultSet(1,1,X_30); |
| sql.rsColumn(X_31,"sys.dim_perf","name","varchar",15,0,X_30); |
| X_36 := io.stdout(); |
| sql.exportResult(X_36,X_31); |
| end s28_3; |
+--------------------------------------------------------------------------+
## Comment 19309
Date: 2013-10-25 23:24:48 +0200
From: Klaudiusz <<klaudiusz223>>
Created attachment 246
EXPLAIN (2) WITH FK
> Attached file: [explain_2_with_fk.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3391_explain_2_with_fk.txt_246) (text/plain, 76401 bytes)
> Description: EXPLAIN (2) WITH FK
## Comment 19310
Date: 2013-10-25 23:34:40 +0200
From: Klaudiusz <<klaudiusz223>>
EXPLAIN SELECT dim_perf.name from "sys"."fact_perf" join dim_perf using (dim_key) group by dim_perf.name ;
+---------------------------------------------------------------------------------------------------------+
| mal |
+=========================================================================================================+
| function user.s8_1{autoCommit=true}():void; |
| X_28 := nil:bat[:oid,:str]; |
| barrier X_765 := language.dataflow(); |
| X_2 := sql.mvc(); |
| X_54:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",0,32); |
| X_120:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,0,32); |
| (X_186:bat[:oid,:oid] ,X_187:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,0,32); |
| X_315 := sql.delta(X_120,X_186,X_187); |
| X_379 := algebra.leftfetchjoin(X_54,X_315); |
| X_10:bat[:oid,:oid] := sql.tid(X_2,"sys","dim_perf"); |
| X_12 := sql.bind(X_2,"sys","dim_perf","dim_key",0); |
| (X_13,r1_19) := sql.bind(X_2,"sys","dim_perf","dim_key",2); |
| X_15 := sql.bind(X_2,"sys","dim_perf","dim_key",1); |
| X_16 := sql.delta(X_12,X_13,r1_19,X_15); |
| X_17 := algebra.leftfetchjoin(X_10,X_16); |
| (X_443,X_444) := algebra.join(X_379,X_17); |
| X_18 := sql.bind(X_2,"sys","dim_perf","name",0); |
| (X_20,r1_28) := sql.bind(X_2,"sys","dim_perf","name",2); |
| X_22 := sql.bind(X_2,"sys","dim_perf","name",1); |
| X_23 := sql.delta(X_18,X_20,r1_28,X_22); |
| X_24 := algebra.leftfetchjoin(X_10,X_23); |
| X_539 := algebra.leftfetchjoin(X_444,X_24); |
| (X_603,X_604,X_605) := group.subgroupdone(X_539); |
| X_606 := algebra.leftfetchjoin(X_604,X_539); |
| X_56:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",1,32); |
| X_122:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,1,32); |
| (X_189:bat[:oid,:oid] ,X_190:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,1,32); |
| X_317 := sql.delta(X_122,X_189,X_190); |
| X_381 := algebra.leftfetchjoin(X_56,X_317); |
| (X_446,X_447) := algebra.join(X_381,X_17); |
| X_541 := algebra.leftfetchjoin(X_447,X_24); |
| (X_607,X_608,X_609) := group.subgroupdone(X_541); |
| X_610 := algebra.leftfetchjoin(X_608,X_541); |
| X_58:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",2,32); |
| X_124:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,2,32); |
| (X_192:bat[:oid,:oid] ,X_193:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,2,32); |
| X_319 := sql.delta(X_124,X_192,X_193); |
| X_383 := algebra.leftfetchjoin(X_58,X_319); |
| (X_449,X_450) := algebra.join(X_383,X_17); |
| X_543 := algebra.leftfetchjoin(X_450,X_24); |
| (X_611,X_612,X_613) := group.subgroupdone(X_543); |
| X_614 := algebra.leftfetchjoin(X_612,X_543); |
| X_60:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",3,32); |
| X_126:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,3,32); |
| (X_195:bat[:oid,:oid] ,X_196:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,3,32); |
| X_321 := sql.delta(X_126,X_195,X_196); |
| X_385 := algebra.leftfetchjoin(X_60,X_321); |
| (X_452,X_453) := algebra.join(X_385,X_17); |
| X_545 := algebra.leftfetchjoin(X_453,X_24); |
| (X_615,X_616,X_617) := group.subgroupdone(X_545); |
| X_618 := algebra.leftfetchjoin(X_616,X_545); |
| X_62:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",4,32); |
| X_128:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,4,32); |
| (X_198:bat[:oid,:oid] ,X_199:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,4,32); |
| X_323 := sql.delta(X_128,X_198,X_199); |
| X_387 := algebra.leftfetchjoin(X_62,X_323); |
| (X_455,X_456) := algebra.join(X_387,X_17); |
| X_547 := algebra.leftfetchjoin(X_456,X_24); |
| (X_619,X_620,X_621) := group.subgroupdone(X_547); |
| X_622 := algebra.leftfetchjoin(X_620,X_547); |
| X_64:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",5,32); |
| X_130:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,5,32); |
| (X_201:bat[:oid,:oid] ,X_202:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,5,32); |
| X_325 := sql.delta(X_130,X_201,X_202); |
| X_389 := algebra.leftfetchjoin(X_64,X_325); |
| (X_458,X_459) := algebra.join(X_389,X_17); |
| X_549 := algebra.leftfetchjoin(X_459,X_24); |
| (X_623,X_624,X_625) := group.subgroupdone(X_549); |
| X_626 := algebra.leftfetchjoin(X_624,X_549); |
| X_66:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",6,32); |
| X_132:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,6,32); |
| (X_204:bat[:oid,:oid] ,X_205:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,6,32); |
| X_327 := sql.delta(X_132,X_204,X_205); |
| X_391 := algebra.leftfetchjoin(X_66,X_327); |
| (X_461,X_462) := algebra.join(X_391,X_17); |
| X_551 := algebra.leftfetchjoin(X_462,X_24); |
| (X_627,X_628,X_629) := group.subgroupdone(X_551); |
| X_630 := algebra.leftfetchjoin(X_628,X_551); |
| X_68:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",7,32); |
| X_134:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,7,32); |
| (X_207:bat[:oid,:oid] ,X_208:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,7,32); |
| X_329 := sql.delta(X_134,X_207,X_208); |
| X_393 := algebra.leftfetchjoin(X_68,X_329); |
| (X_464,X_465) := algebra.join(X_393,X_17); |
| X_553 := algebra.leftfetchjoin(X_465,X_24); |
| (X_631,X_632,X_633) := group.subgroupdone(X_553); |
| X_634 := algebra.leftfetchjoin(X_632,X_553); |
| X_70:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",8,32); |
| X_136:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,8,32); |
| (X_210:bat[:oid,:oid] ,X_211:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,8,32); |
| X_331 := sql.delta(X_136,X_210,X_211); |
| X_395 := algebra.leftfetchjoin(X_70,X_331); |
| (X_467,X_468) := algebra.join(X_395,X_17); |
| X_555 := algebra.leftfetchjoin(X_468,X_24); |
| (X_635,X_636,X_637) := group.subgroupdone(X_555); |
| X_638 := algebra.leftfetchjoin(X_636,X_555); |
| X_72:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",9,32); |
| X_138:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,9,32); |
| (X_213:bat[:oid,:oid] ,X_214:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,9,32); |
| X_333 := sql.delta(X_138,X_213,X_214); |
| X_397 := algebra.leftfetchjoin(X_72,X_333); |
| (X_470,X_471) := algebra.join(X_397,X_17); |
| X_557 := algebra.leftfetchjoin(X_471,X_24); |
| (X_639,X_640,X_641) := group.subgroupdone(X_557); |
| X_642 := algebra.leftfetchjoin(X_640,X_557); |
| X_74:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",10,32); |
| X_140:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,10,32); |
| (X_216:bat[:oid,:oid] ,X_217:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,10,32); |
| X_335 := sql.delta(X_140,X_216,X_217); |
| X_399 := algebra.leftfetchjoin(X_74,X_335); |
| (X_473,X_474) := algebra.join(X_399,X_17); |
| X_559 := algebra.leftfetchjoin(X_474,X_24); |
| (X_643,X_644,X_645) := group.subgroupdone(X_559); |
| X_646 := algebra.leftfetchjoin(X_644,X_559); |
| X_76:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",11,32); |
| X_142:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,11,32); |
| (X_220:bat[:oid,:oid] ,X_221:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,11,32); |
| X_337 := sql.delta(X_142,X_220,X_221); |
| X_401 := algebra.leftfetchjoin(X_76,X_337); |
| (X_476,X_477) := algebra.join(X_401,X_17); |
| X_561 := algebra.leftfetchjoin(X_477,X_24); |
| (X_647,X_648,X_649) := group.subgroupdone(X_561); |
| X_650 := algebra.leftfetchjoin(X_648,X_561); |
| X_78:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",12,32); |
| X_144:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,12,32); |
| (X_223:bat[:oid,:oid] ,X_224:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,12,32); |
| X_339 := sql.delta(X_144,X_223,X_224); |
| X_403 := algebra.leftfetchjoin(X_78,X_339); |
| (X_479,X_480) := algebra.join(X_403,X_17); |
| X_563 := algebra.leftfetchjoin(X_480,X_24); |
| (X_651,X_652,X_653) := group.subgroupdone(X_563); |
| X_654 := algebra.leftfetchjoin(X_652,X_563); |
| X_80:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",13,32); |
| X_146:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,13,32); |
| (X_226:bat[:oid,:oid] ,X_227:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,13,32); |
| X_341 := sql.delta(X_146,X_226,X_227); |
| X_405 := algebra.leftfetchjoin(X_80,X_341); |
| (X_482,X_483) := algebra.join(X_405,X_17); |
| X_565 := algebra.leftfetchjoin(X_483,X_24); |
| (X_655,X_656,X_657) := group.subgroupdone(X_565); |
| X_658 := algebra.leftfetchjoin(X_656,X_565); |
| X_82:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",14,32); |
| X_148:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,14,32); |
| (X_229:bat[:oid,:oid] ,X_230:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,14,32); |
| X_343 := sql.delta(X_148,X_229,X_230); |
| X_407 := algebra.leftfetchjoin(X_82,X_343); |
| (X_485,X_486) := algebra.join(X_407,X_17); |
| X_567 := algebra.leftfetchjoin(X_486,X_24); |
| (X_659,X_660,X_661) := group.subgroupdone(X_567); |
| X_662 := algebra.leftfetchjoin(X_660,X_567); |
| X_84:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",15,32); |
| X_150:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,15,32); |
| (X_232:bat[:oid,:oid] ,X_233:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,15,32); |
| X_345 := sql.delta(X_150,X_232,X_233); |
| X_409 := algebra.leftfetchjoin(X_84,X_345); |
| (X_488,X_489) := algebra.join(X_409,X_17); |
| X_569 := algebra.leftfetchjoin(X_489,X_24); |
| (X_663,X_664,X_665) := group.subgroupdone(X_569); |
| X_666 := algebra.leftfetchjoin(X_664,X_569); |
| X_87:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",16,32); |
| X_153:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,16,32); |
| (X_235:bat[:oid,:oid] ,X_236:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,16,32); |
| X_347 := sql.delta(X_153,X_235,X_236); |
| X_411 := algebra.leftfetchjoin(X_87,X_347); |
| (X_491,X_492) := algebra.join(X_411,X_17); |
| X_571 := algebra.leftfetchjoin(X_492,X_24); |
| (X_667,X_668,X_669) := group.subgroupdone(X_571); |
| X_670 := algebra.leftfetchjoin(X_668,X_571); |
| X_89:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",17,32); |
| X_155:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,17,32); |
| (X_238:bat[:oid,:oid] ,X_239:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,17,32); |
| X_349 := sql.delta(X_155,X_238,X_239); |
| X_413 := algebra.leftfetchjoin(X_89,X_349); |
| (X_494,X_495) := algebra.join(X_413,X_17); |
| X_573 := algebra.leftfetchjoin(X_495,X_24); |
| (X_671,X_672,X_673) := group.subgroupdone(X_573); |
| X_674 := algebra.leftfetchjoin(X_672,X_573); |
| X_91:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",18,32); |
| X_157:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,18,32); |
| (X_241:bat[:oid,:oid] ,X_242:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,18,32); |
| X_351 := sql.delta(X_157,X_241,X_242); |
| X_415 := algebra.leftfetchjoin(X_91,X_351); |
| (X_497,X_498) := algebra.join(X_415,X_17); |
| X_575 := algebra.leftfetchjoin(X_498,X_24); |
| (X_675,X_676,X_677) := group.subgroupdone(X_575); |
| X_678 := algebra.leftfetchjoin(X_676,X_575); |
| X_93:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",19,32); |
| X_159:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,19,32); |
| (X_244:bat[:oid,:oid] ,X_245:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,19,32); |
| X_353 := sql.delta(X_159,X_244,X_245); |
| X_417 := algebra.leftfetchjoin(X_93,X_353); |
| (X_500,X_501) := algebra.join(X_417,X_17); |
| X_577 := algebra.leftfetchjoin(X_501,X_24); |
| (X_679,X_680,X_681) := group.subgroupdone(X_577); |
| X_682 := algebra.leftfetchjoin(X_680,X_577); |
| X_95:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",20,32); |
| X_161:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,20,32); |
| (X_247:bat[:oid,:oid] ,X_248:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,20,32); |
| X_355 := sql.delta(X_161,X_247,X_248); |
| X_419 := algebra.leftfetchjoin(X_95,X_355); |
| (X_503,X_504) := algebra.join(X_419,X_17); |
| X_579 := algebra.leftfetchjoin(X_504,X_24); |
| (X_683,X_684,X_685) := group.subgroupdone(X_579); |
| X_686 := algebra.leftfetchjoin(X_684,X_579); |
| X_97:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",21,32); |
| X_163:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,21,32); |
| (X_250:bat[:oid,:oid] ,X_251:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,21,32); |
| X_357 := sql.delta(X_163,X_250,X_251); |
| X_421 := algebra.leftfetchjoin(X_97,X_357); |
| (X_506,X_507) := algebra.join(X_421,X_17); |
| X_581 := algebra.leftfetchjoin(X_507,X_24); |
| (X_687,X_688,X_689) := group.subgroupdone(X_581); |
| X_690 := algebra.leftfetchjoin(X_688,X_581); |
| X_99:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",22,32); |
| X_165:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,22,32); |
| (X_254:bat[:oid,:oid] ,X_255:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,22,32); |
| X_359 := sql.delta(X_165,X_254,X_255); |
| X_423 := algebra.leftfetchjoin(X_99,X_359); |
| (X_509,X_510) := algebra.join(X_423,X_17); |
| X_583 := algebra.leftfetchjoin(X_510,X_24); |
| (X_691,X_692,X_693) := group.subgroupdone(X_583); |
| X_694 := algebra.leftfetchjoin(X_692,X_583); |
| X_101:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",23,32); |
| X_167:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,23,32); |
| (X_257:bat[:oid,:oid] ,X_258:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,23,32); |
| X_361 := sql.delta(X_167,X_257,X_258); |
| X_425 := algebra.leftfetchjoin(X_101,X_361); |
| (X_512,X_513) := algebra.join(X_425,X_17); |
| X_585 := algebra.leftfetchjoin(X_513,X_24); |
| (X_695,X_696,X_697) := group.subgroupdone(X_585); |
| X_698 := algebra.leftfetchjoin(X_696,X_585); |
| X_103:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",24,32); |
| X_169:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,24,32); |
| (X_260:bat[:oid,:oid] ,X_261:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,24,32); |
| X_363 := sql.delta(X_169,X_260,X_261); |
| X_427 := algebra.leftfetchjoin(X_103,X_363); |
| (X_515,X_516) := algebra.join(X_427,X_17); |
| X_587 := algebra.leftfetchjoin(X_516,X_24); |
| (X_699,X_700,X_701) := group.subgroupdone(X_587); |
| X_702 := algebra.leftfetchjoin(X_700,X_587); |
| X_105:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",25,32); |
| X_171:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,25,32); |
| (X_263:bat[:oid,:oid] ,X_264:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,25,32); |
| X_365 := sql.delta(X_171,X_263,X_264); |
| X_429 := algebra.leftfetchjoin(X_105,X_365); |
| (X_518,X_519) := algebra.join(X_429,X_17); |
| X_589 := algebra.leftfetchjoin(X_519,X_24); |
| (X_703,X_704,X_705) := group.subgroupdone(X_589); |
| X_706 := algebra.leftfetchjoin(X_704,X_589); |
| X_107:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",26,32); |
| X_173:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,26,32); |
| (X_266:bat[:oid,:oid] ,X_267:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,26,32); |
| X_367 := sql.delta(X_173,X_266,X_267); |
| X_431 := algebra.leftfetchjoin(X_107,X_367); |
| (X_521,X_522) := algebra.join(X_431,X_17); |
| X_591 := algebra.leftfetchjoin(X_522,X_24); |
| (X_707,X_708,X_709) := group.subgroupdone(X_591); |
| X_710 := algebra.leftfetchjoin(X_708,X_591); |
| X_109:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",27,32); |
| X_175:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,27,32); |
| (X_269:bat[:oid,:oid] ,X_270:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,27,32); |
| X_369 := sql.delta(X_175,X_269,X_270); |
| X_433 := algebra.leftfetchjoin(X_109,X_369); |
| (X_524,X_525) := algebra.join(X_433,X_17); |
| X_593 := algebra.leftfetchjoin(X_525,X_24); |
| (X_711,X_712,X_713) := group.subgroupdone(X_593); |
| X_714 := algebra.leftfetchjoin(X_712,X_593); |
| X_111:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",28,32); |
| X_177:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,28,32); |
| (X_272:bat[:oid,:oid] ,X_273:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,28,32); |
| X_371 := sql.delta(X_177,X_272,X_273); |
| X_435 := algebra.leftfetchjoin(X_111,X_371); |
| (X_527,X_528) := algebra.join(X_435,X_17); |
| X_595 := algebra.leftfetchjoin(X_528,X_24); |
| (X_715,X_716,X_717) := group.subgroupdone(X_595); |
| X_718 := algebra.leftfetchjoin(X_716,X_595); |
| X_113:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",29,32); |
| X_179:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,29,32); |
| (X_275:bat[:oid,:oid] ,X_276:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,29,32); |
| X_373 := sql.delta(X_179,X_275,X_276); |
| X_437 := algebra.leftfetchjoin(X_113,X_373); |
| (X_530,X_531) := algebra.join(X_437,X_17); |
| X_597 := algebra.leftfetchjoin(X_531,X_24); |
| (X_719,X_720,X_721) := group.subgroupdone(X_597); |
| X_722 := algebra.leftfetchjoin(X_720,X_597); |
| X_115:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",30,32); |
| X_181:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,30,32); |
| (X_278:bat[:oid,:oid] ,X_279:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,30,32); |
| X_375 := sql.delta(X_181,X_278,X_279); |
| X_439 := algebra.leftfetchjoin(X_115,X_375); |
| (X_533,X_534) := algebra.join(X_439,X_17); |
| X_599 := algebra.leftfetchjoin(X_534,X_24); |
| (X_723,X_724,X_725) := group.subgroupdone(X_599); |
| X_726 := algebra.leftfetchjoin(X_724,X_599); |
| X_117:bat[:oid,:oid] := sql.tid(X_2,"sys","fact_perf",31,32); |
| X_183:bat[:oid,:lng] := sql.bind(X_2,"sys","fact_perf","dim_key",0,31,32); |
| (X_281:bat[:oid,:oid] ,X_282:bat[:oid,:lng] ) := sql.bind(X_2,"sys","fact_perf","dim_key",2,31,32); |
| X_8 := sql.bind(X_2,"sys","fact_perf","dim_key",1); |
| X_377 := sql.delta(X_183,X_281,X_282,X_8); |
| X_441 := algebra.leftfetchjoin(X_117,X_377); |
| (X_536,X_537) := algebra.join(X_441,X_17); |
| X_601 := algebra.leftfetchjoin(X_537,X_24); |
| (X_727,X_728,X_729) := group.subgroupdone(X_601); |
| X_730 := algebra.leftfetchjoin(X_728,X_601); |
| X_732 := mat.packIncrement(X_606,32); |
| X_734 := mat.packIncrement(X_732,X_610); |
| X_735 := mat.packIncrement(X_734,X_614); |
| X_736 := mat.packIncrement(X_735,X_618); |
| X_737 := mat.packIncrement(X_736,X_622); |
| X_738 := mat.packIncrement(X_737,X_626); |
| X_739 := mat.packIncrement(X_738,X_630); |
| X_740 := mat.packIncrement(X_739,X_634); |
| X_741 := mat.packIncrement(X_740,X_638); |
| X_742 := mat.packIncrement(X_741,X_642); |
| X_743 := mat.packIncrement(X_742,X_646); |
| X_744 := mat.packIncrement(X_743,X_650); |
| X_745 := mat.packIncrement(X_744,X_654); |
| X_746 := mat.packIncrement(X_745,X_658); |
| X_747 := mat.packIncrement(X_746,X_662); |
| X_748 := mat.packIncrement(X_747,X_666); |
| X_749 := mat.packIncrement(X_748,X_670); |
| X_750 := mat.packIncrement(X_749,X_674); |
| X_751 := mat.packIncrement(X_750,X_678); |
| X_752 := mat.packIncrement(X_751,X_682); |
| X_753 := mat.packIncrement(X_752,X_686); |
| X_754 := mat.packIncrement(X_753,X_690); |
| X_755 := mat.packIncrement(X_754,X_694); |
| X_756 := mat.packIncrement(X_755,X_698); |
| X_757 := mat.packIncrement(X_756,X_702); |
| X_758 := mat.packIncrement(X_757,X_706); |
| X_759 := mat.packIncrement(X_758,X_710); |
| X_760 := mat.packIncrement(X_759,X_714); |
| X_761 := mat.packIncrement(X_760,X_718); |
| X_762 := mat.packIncrement(X_761,X_722); |
| X_763 := mat.packIncrement(X_762,X_726); |
| X_25 := mat.packIncrement(X_763,X_730); |
| (X_26,r1_34,X_731) := group.subgroupdone(X_25); |
| X_28 := algebra.leftfetchjoin(r1_34,X_25); |
| language.pass(X_10); |
| language.pass(X_539); |
| language.pass(X_541); |
| language.pass(X_543); |
| language.pass(X_545); |
| language.pass(X_547); |
| language.pass(X_549); |
| language.pass(X_551); |
| language.pass(X_553); |
| language.pass(X_555); |
| language.pass(X_557); |
| language.pass(X_559); |
| language.pass(X_561); |
| language.pass(X_563); |
| language.pass(X_565); |
| language.pass(X_567); |
| language.pass(X_569); |
| language.pass(X_571); |
| language.pass(X_573); |
| language.pass(X_575); |
| language.pass(X_577); |
| language.pass(X_579); |
| language.pass(X_581); |
| language.pass(X_583); |
| language.pass(X_585); |
| language.pass(X_587); |
| language.pass(X_589); |
| language.pass(X_591); |
| language.pass(X_593); |
| language.pass(X_595); |
| language.pass(X_597); |
| language.pass(X_599); |
| language.pass(X_17); |
| language.pass(X_24); |
| language.pass(X_601); |
| language.pass(X_25); |
| exit X_765; |
| X_764:bat[:oid,:str] := nil:bat[:oid,:str]; |
| X_29 := sql.resultSet(1,1,X_28); |
| sql.rsColumn(X_29,"sys.dim_perf","name","varchar",15,0,X_28); |
| X_35 := io.stdout(); |
| sql.exportResult(X_35,X_29); |
| end s8_1; |
+---------------------------------------------------------------------------------------------------------+
## Comment 19336
Date: 2013-11-15 12:35:31 +0100
From: @njnes
I tested with a small test set and --forcemito (ie even on small sizes the mitosis optimizer kicks in). And then I see that both queries get horizontally partitioned.
## Comment 19353
Date: 2013-11-22 00:34:42 +0100
From: Klaudiusz <<klaudiusz223>>
(In reply to comment 4)
> I tested with a small test set and --forcemito (ie even on small sizes the
> mitosis optimizer kicks in). And then I see that both queries get
> horizontally partitioned.
I've tested --forcemito option and I can confirm that with --forcemito everything works OK, but unfortunately without --forcemito problem still exist (at least by me)
-- (4) --forcemito Duration - 2 s slightly worse than (2)
SELECT dim_perf.name from "sys"."fact_perf" join dim_perf using (dim_key) group by dim_perf.name ;
Please let me know if there is anything else what can I do to investigate this problem.
BTW is it safe to use --forcemito option as workaround in a production environment ?
How can I pass this option from monetdbd to mserver5 ? I had to use some ugly hack for testing.
## Comment 19354
Date: 2013-11-22 07:46:34 +0100
From: @njnes
If forcemito helps then your database isn't large enough to trigger mitosis. The largest table should be atleast MINPARTCNT, ie larger then 100000 rows.
## Comment 19355
Date: 2013-11-22 12:26:08 +0100
From: Klaudiusz <<klaudiusz223>>
(In reply to comment 6)
> If forcemito helps then your database isn't large enough to trigger mitosis.
> The largest table should be atleast MINPARTCNT, ie larger then 100000 rows.
The largest table has 100000000 rows, the smaller one 10000.
Even if I change MINPARTCNT to 9000 problem still exist.
Let me summarize.
If I drop FK then mitosis is triggered.
If I add agregator (for example count(id)) mitosis is also triggered.
for example this two queries are equal:
SELECT dim_perf.name from "sys"."fact_perf" join dim_perf using (dim_key) group by dim_perf.name order by rand(count(id));
SELECT dim_perf.name from "sys"."fact_perf" join dim_perf using (dim_key) group by dim_perf.name;
If there is FK then only the first query triggers mitosis.
If there is no FK then both query trigger mitosis.
## Comment 19356
Date: 2013-11-23 15:05:26 +0100
From: Klaudiusz <<klaudiusz223>>
It looks like mitosis optimizer doesn't recognize that the larger table is involved in query.
SELECT dim_perf.name from "sys"."fact_perf" join dim_perf using (dim_key) group by dim_perf.name;
in log:
opt_mitosis: target is sys.dim_perf with 4 rows of size 8 into 5642340522 rows/piece 32 threads 1 pieces fixed parts 0 fixed size 0
SELECT dim_perf.name from "sys"."fact_perf" join dim_perf using (dim_key) group by dim_perf.name order by count(id);
in log:
opt_mitosis: target is sys.fact_perf with 111000000 rows of size 8 into 5642340522 rows/piece 32 threads 32 pieces fixed parts 0 fixed size 0
forcemito helps only partially due to this part in code
pieces = (int) MIN((wrd) threads, rowcnt);
If the smaller table isn't large enough query will be not spread across all cpu cores.
## Comment 19366
Date: 2013-12-01 13:34:19 +0100
From: @njnes
okay this seems to indicate that the rowcnt of a foreignkey isn't properly used/set. So the code to pass the rowcnt count be wrong or the code to use a foreignkey in mitosis.
## Comment 19367
Date: 2013-12-01 13:41:57 +0100
From: @njnes
Could you test the following patch?
diff --git a/monetdb5/optimizer/opt_mitosis.c b/monetdb5/optimizer/opt_mitosis.c
--- a/monetdb5/optimizer/opt_mitosis.c
+++ b/monetdb5/optimizer/opt_mitosis.c
@@ -79,7 +79,7 @@ OPTmitosisImplementation(Client cntxt, M
return 0;
/* locate the largest non-partitioned table */
- if (getModuleId(p) != sqlRef || getFunctionId(p) != bindRef)
+ if (getModuleId(p) != sqlRef || (getFunctionId(p) != bindRef && getFunctionId(p) != bindidxRef))
continue;
/* don't split insert BATs */
if (getVarConstant(mb, getArg(p, 5)).val.ival == 1)
## Comment 19368
Date: 2013-12-01 18:29:20 +0100
From: Klaudiusz <<klaudiusz223>>
(In reply to comment 10)
> Could you test the following patch?
It works! Query is spread across all cpu cores. Thank you!
## Comment 19369
Date: 2013-12-01 20:43:58 +0100
From: @njnes
Fix checked into the Feb branch
## Comment 19370
Date: 2013-12-01 20:45:12 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [9be54f5eba3e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9be54f5eba3e) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9be54f5eba3e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9be54f5eba3e)
Changeset description:
fix for (performance) bug #3391
## Comment 19371
Date: 2013-12-01 21:51:32 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [914695159abb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=914695159abb) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=914695159abb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=914695159abb)
Changeset description:
fixed performance bug #3391
## Comment 19625
Date: 2014-02-20 15:03:11 +0100
From: @sjoerdmullender
Jan2014 has been released.
| Bad performance with GROUP BY and FK with out aggregate function | https://api.github.com/repos/MonetDB/MonetDB/issues/3391/comments | 0 | 2020-11-30T12:35:48Z | 2024-06-27T12:01:40Z | https://github.com/MonetDB/MonetDB/issues/3391 | 753,442,957 | 3,391 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-10-24 16:08:53 +0200
From: Robin Cijvat <<robin>>
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 11.15.19 (Feb2013-SP6)
CC: @mlkersten
Last updated: 2014-10-31 14:14:45 +0100
## Comment 19303
Date: 2013-10-24 16:08:53 +0200
From: Robin Cijvat <<robin>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.16 Safari/537.36
Build Identifier:
See summary
Reproducible: Always
## Comment 20389
Date: 2014-10-31 14:14:45 +0100
From: @sjoerdmullender
Oct2014 has been released.
| Missing definition for pushSht in monetdb5/mal/mal_builder.h | https://api.github.com/repos/MonetDB/MonetDB/issues/3390/comments | 0 | 2020-11-30T12:35:45Z | 2024-06-27T12:01:39Z | https://github.com/MonetDB/MonetDB/issues/3390 | 753,442,930 | 3,390 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-10-22 18:19:10 +0200
From: Klaudiusz <<klaudiusz223>>
To: SQL devs <<bugs-sql>>
Version: 11.15.17 (Feb2013-SP5)
Last updated: 2013-12-03 13:59:40 +0100
## Comment 19297
Date: 2013-10-22 18:19:10 +0200
From: Klaudiusz <<klaudiusz223>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36
Build Identifier:
median of set with one value (?) with "group by" doesn't work.
Reproducible: Always
### Steps to Reproduce:
CREATE table a (k int,b int);
INSERT into a values (1,2);
INSERT into a values (2,2);
INSERT into a values (3,3);
INSERT into a values (4,65);
INSERT into a values (5,21);
INSERT into a values (6,null);
INSERT into a values (7,null);
INSERT into a values (8,null);
INSERT into a values (9,null);
SELECT median(b) from a group by k;
### Actual Results:
mclient exited.
In merovingian.log:
MSG merovingian[5991]: database 'test' (6210) was killed by signal SIGSEGV
### Expected Results:
+--------------------------+
| L1 |
+==========================+
| 2 |
| 2 |
| 3 |
| 65 |
| 21 |
| null |
| null |
| null |
| null |
+--------------------------+
MonetDB 5 server v11.15.18 (64-bit, 64-bit oids)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2013 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 252.2GiB available memory, 32 available cpu cores
Libraries:
libpcre: 7.8 2008-09-05 (compiled with 7.8)
openssl: OpenSSL 1.0.0 29 Mar 2010 (compiled with OpenSSL 1.0.0-fips 29 Mar 2010)
libxml2: 2.7.6 (compiled with 2.7.6)
Compiled by: (x86_64-unknown-linux-gnu)
Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wmissing-include-dirs
Linking : /usr/bin/ld -m elf_x86_64
## Comment 19298
Date: 2013-10-22 20:43:10 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [fb66b11cc3bd](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fb66b11cc3bd) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=fb66b11cc3bd](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=fb66b11cc3bd)
Changeset description:
When calculating grouped medians, deal with dense group bat.
Also added test.
This fixes bug #3389.
## Comment 19299
Date: 2013-10-22 20:45:29 +0200
From: @sjoerdmullender
Fixed.
## Comment 19388
Date: 2013-12-03 13:59:40 +0100
From: @sjoerdmullender
Feb2013-SP6 has been released.
| median function with "group by" - SIGSEGV | https://api.github.com/repos/MonetDB/MonetDB/issues/3389/comments | 0 | 2020-11-30T12:35:43Z | 2024-06-27T12:01:38Z | https://github.com/MonetDB/MonetDB/issues/3389 | 753,442,906 | 3,389 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-10-17 22:58:03 +0200
From: Klaudiusz <<klaudiusz223>>
To: SQL devs <<bugs-sql>>
Version: 11.15.17 (Feb2013-SP5)
CC: @njnes
Last updated: 2013-12-03 13:59:37 +0100
## Comment 19283
Date: 2013-10-17 22:58:03 +0200
From: Klaudiusz <<klaudiusz223>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36
Build Identifier:
Following query doesn't return anything.
SELECT sum(b) from a group by k order by case when sum(b) is null then 1 else 0 end,sum(b);
Reproducible: Always
### Steps to Reproduce:
CREATE table a (k int,b int);
INSERT into a values (1,2);
INSERT into a values (2,2);
INSERT into a values (3,3);
INSERT into a values (4,65);
INSERT into a values (5,21);
INSERT into a values (6,null);
INSERT into a values (7,null);
INSERT into a values (8,null);
INSERT into a values (9,null);
SELECT sum(b) from a group by k order by case when sum(b) is null then 1 else 0 end,sum(b);
### Actual Results:
nothing
### Expected Results:
+------+
| L1 |
+======+
| 2 |
| 2 |
| 3 |
| 21 |
| 65 |
| null |
| null |
| null |
| null |
+------+
MonetDB 5 server v11.15.17 "Feb2013-SP5" (64-bit, 64-bit oids)
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2013 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 15.6GiB available memory, 4 available cpu cores
Libraries:
libpcre: 7.8 2008-09-05 (compiled with 7.8)
openssl: OpenSSL 1.0.0 29 Mar 2010 (compiled with OpenSSL 1.0.0-fips 29 Mar 2010)
libxml2: 2.7.6 (compiled with 2.7.6)
Compiled by: n@n(x86_64-unknown-linux-gnu)
Compilation: gcc -g -O2
Linking : /usr/bin/ld -m elf_x86_64
## Comment 19284
Date: 2013-10-18 09:20:07 +0200
From: Klaudiusz <<klaudiusz223>>
It seems that this bug exists only in Feb2013-SP5 tag (and probably also in Feb2013-SP4).
I've checked Feb2013 and default branches and results are as expected.
So probably it is fixed.
## Comment 19285
Date: 2013-10-18 09:20:38 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [7d15a64ac3b2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7d15a64ac3b2) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7d15a64ac3b2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7d15a64ac3b2)
Changeset description:
Added test for bug #3388.
## Comment 19286
Date: 2013-10-18 09:37:40 +0200
From: @sjoerdmullender
Actually, when assertions are enabled, the test causes an assertion failure in the current Feb2013 branch.
## Comment 19287
Date: 2013-10-20 13:07:45 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [28744b9863d5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=28744b9863d5) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=28744b9863d5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=28744b9863d5)
Changeset description:
partial fix for bug #3388, ie fixed the sql language part of the bug.
Todo handle sum with null's in case of mitosis/mergetable properly.
## Comment 19288
Date: 2013-10-20 15:25:46 +0200
From: @njnes
fixed in 2 steps. Fixed the crash on rewriting the groupby/orderby part. and fixed a bug in handling null only sets.
## Comment 19296
Date: 2013-10-22 15:12:04 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [92f9d7980dd3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=92f9d7980dd3) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=92f9d7980dd3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=92f9d7980dd3)
Changeset description:
Complete changeset [798d9ad8af9a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=798d9ad8af9a) handle all cases.
Also, do it with fewer times calculating the same expression.
See bug #3388.
## Comment 19382
Date: 2013-12-03 13:59:37 +0100
From: @sjoerdmullender
Feb2013-SP6 has been released.
| case statement in "order by" clause doesn't work when used together with "group by" | https://api.github.com/repos/MonetDB/MonetDB/issues/3388/comments | 0 | 2020-11-30T12:35:40Z | 2024-06-27T12:01:37Z | https://github.com/MonetDB/MonetDB/issues/3388 | 753,442,884 | 3,388 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-10-16 21:28:14 +0200
From: @bartscheers
To: clients devs <<bugs-clients>>
Version: 11.15.17 (Feb2013-SP5)
Last updated: 2013-12-03 13:59:33 +0100
## Comment 19279
Date: 2013-10-16 21:28:14 +0200
From: @bartscheers
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:24.0) Gecko/20100101 Firefox/24.0
Build Identifier:
When my schema name is SP5_db, I can query tables without a prefix, but when I use SP5.table it responds with: "no such schema 'sp5_db'". Note the lower case conversion.
Reproducible: Always
### Steps to Reproduce:
1. create new db by running ./prep.sh
2. create schema by running mclient -dSP5_db < prep.sql
3. create table "version" by running mclient -dSP5_db -uSP5_db < version.sql
4. mclient -dSP5_db -uSP5_db
5. sql>select * from SP5_db.version ;
### Actual Results:
SELECT: no such schema 'sp5_db'
### Expected Results:
Same as without prefix:
sql>select * from version;
+----------+-------+
| name | value |
+==========+=======+
| revision | 1 |
+----------+-------+
## Comment 19280
Date: 2013-10-16 21:31:52 +0200
From: @sjoerdmullender
You need to use double quotes to protect the server from mapping upper and lower case to each other:
select * from "SP5_db".version ;
If this for some reason also doesn't work, you can reopen this bug report.
## Comment 19281
Date: 2013-10-16 21:37:41 +0200
From: @bartscheers
Yes, quotes do work.
But I use the tab autofill in mclient, and SP5_db is generated without quotes by server or mclient.
select * from vers<tab>
becomes:
select * from SP5_db.version;
## Comment 19282
Date: 2013-10-16 21:40:24 +0200
From: @sjoerdmullender
Why didn't you say so in the first place! ;-)
So the bug is that mclient should properly quote names it fills in.
## Comment 19294
Date: 2013-10-22 14:19:02 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [cf7a5da3cb12](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cf7a5da3cb12) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=cf7a5da3cb12](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=cf7a5da3cb12)
Changeset description:
Quote schema and table name generated by TAB completion.
This fixes bug #3387.
## Comment 19295
Date: 2013-10-22 14:19:26 +0200
From: @sjoerdmullender
Fixed.
## Comment 19378
Date: 2013-12-03 13:59:33 +0100
From: @sjoerdmullender
Feb2013-SP6 has been released.
| mclient does not properly double quote schema names when using autofill tab | https://api.github.com/repos/MonetDB/MonetDB/issues/3387/comments | 0 | 2020-11-30T12:35:38Z | 2024-06-27T12:01:36Z | https://github.com/MonetDB/MonetDB/issues/3387 | 753,442,862 | 3,387 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-10-16 09:33:05 +0200
From: Ashish Kumar Singh <<ashishk>>
To: GDK devs <<bugs-common>>
Version: 11.15.17 (Feb2013-SP5)
CC: ashishk, @hannesmuehleisen
Last updated: 2013-10-17 17:17:55 +0200
## Comment 19276
Date: 2013-10-16 09:33:05 +0200
From: Ashish Kumar Singh <<ashishk>>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.69 Safari/537.36
Build Identifier:
Hi ,
I am seeing below message in my monetdb instance please help in figuring out what happenned?
-set sql_optimizer=default_pipe --set monet_daemon=yes
2013-10-16 02:34:08 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:09 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:09 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:10 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:10 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:11 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:11 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:12 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:12 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:13 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:13 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:14 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:14 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:15 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:15 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:16 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:16 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:17 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:17 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:18 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:18 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:19 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:19 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:20 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:20 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:21 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:21 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:22 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:22 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:23 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:23 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:24 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:24 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:25 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:25 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:26 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:26 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:27 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:27 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:28 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:28 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:29 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:29 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:30 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:30 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:31 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:31 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:32 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:32 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:33 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:33 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:34 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:34 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:35 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:35 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:36 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:36 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:37 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:37 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:38 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:38 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:39 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:39 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:40 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:40 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:41 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:41 ERR merovingian[17763]: unknown state: 42013-10-16 02:34:42 ERR merovingian[17763]: unknown state: 42013-10-16 02:3
2013-10-16 03:24:49 MSG pbsworksdb[23763]: MonetDB 5 server v11.15.11 "Feb2013-SP3"
2013-10-16 03:24:49 MSG pbsworksdb[23763]: Serving database 'pbsworksdb', using 8 threads
2013-10-16 03:24:49 MSG pbsworksdb[23763]: Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked
2013-10-16 03:24:49 MSG pbsworksdb[23763]: Found 66.949 GiB available main-memory.
2013-10-16 03:24:49 MSG pbsworksdb[23763]: Copyright (c) 1993-July 2008 CWI.
2013-10-16 03:24:49 MSG pbsworksdb[23763]: Copyright (c) August 2008-2013 MonetDB B.V., all rights reserved
2013-10-16 03:24:49 MSG pbsworksdb[23763]: Visit http://www.monetdb.org/ for further information
2013-10-16 03:24:49 MSG pbsworksdb[23763]: Listening for UNIX domain connection requests on mapi:monetdb:///qa/opt/pbsworks/12.1_rc4_chev_pro/portal/thirdparty/monetdb/pbsworksdata/pbsworksdb/.mapi.sock
2013-10-16 03:24:49 MSG pbsworksdb[23763]: still reading write-ahead log "/qa/opt/pbsworks/12.1_rc4_chev_pro/portal/thirdparty/monetdb/pbsworksdata/pbsworksdb/sql_logs/sql/log.133" (7% done)
2013-10-16 03:25:01 MSG pbsworksdb[23763]: still reading write-ahead log "/qa/opt/pbsworks/12.1_rc4_chev_pro/portal/thirdparty/monetdb/pbsworksdata/pbsworksdb/sql_logs/sql/log.133" (13% done)
2013-10-16 03:25:12 MSG pbsworksdb[23763]: still reading write-ahead log "/qa/opt/pbsworks/12.1_rc4_chev_pro/portal/thirdparty/monetdb/pbsworksdata/pbsworksdb/sql_logs/sql/log.133" (20% done)
2013-10-16 03:25:23 MSG pbsworksdb[23763]: still reading write-ahead log "/qa/opt/pbsworks/12.1_rc4_chev_pro/portal/thirdparty/monetdb/pbsworksdata/pbsworksdb/sql_logs/sql/log.133" (26% done)
2013-10-16 03:25:34 MSG pbsworksdb[23763]: still reading write-ahead log "/qa/opt/pbsworks/12.1_rc4_chev_pro/portal/thirdparty/monetdb/pbsworksdata/pbsworksdb/sql_logs/sql/log.133" (32% done)
2013-10-16 03:25:45 MSG pbsworksdb[23763]: still reading write-ahead log "/qa/opt/pbsworks/12.1_rc4_chev_pro/portal/thirdparty/monetdb/pbsworksdata/pbsworksdb/sql_logs/sql/log.133" (39% done)
2013-10-16 03:25:56 MSG pbsworksdb[23763]: still reading write-ahead log "/qa/opt/pbsworks/12.1_rc4_chev_pro/portal/thirdparty/monetdb/pbsworksdata/pbsworksdb/sql_logs/sql/log.133" (44% done)
2013-10-16 03:26:07 MSG pbsworksdb[23763]: still reading write-ahead log "/qa/opt/pbsworks/12.1_rc4_chev_pro/portal/thirdparty/monetdb/pbsworksdata/pbsworksdb/sql_logs/sql/log.133" (49% done)
2013-10-16 03:26:18 MSG pbsworksdb[23763]: still reading write-ahead log "/qa/opt/pbsworks/12.1_rc4_chev_pro/portal/thirdparty/monetdb/pbsworksdata/pbsworksdb/sql_logs/sql/log.133" (56% done)
2013-10-16 03:26:29 MSG pbsworksdb[23763]: still reading write-ahead log "/qa/opt/pbsworks/12.1_rc4_chev_pro/portal/thirdparty/monetdb/pbsworksdata/pbsworksdb/sql_logs/sql/log.133" (62% done)
2013-10-16 03:26:42 MSG pbsworksdb[23763]: still reading write-ahead log "/qa/opt/pbsworks/12.1_rc4_chev_pro/portal/thirdparty/monetdb/pbsworksdata/pbsworksdb/sql_logs/sql/log.133" (64% done)
2013-10-16 03:26:54 MSG pbsworksdb[23763]: still reading write-ahead log "/qa/opt/pbsworks/12.1_rc4_chev_pro/portal/thirdparty/monetdb/pbsworksdata/pbsworksdb/sql_logs/sql/log.133" (71% done)
2013-10-16 03:27:05 MSG pbsworksdb[23763]: still reading write-ahead log "/qa/opt/pbsworks/12.1_rc4_chev_pro/portal/thirdparty/monetdb/pbsworksdata/pbsworksdb/sql_logs/sql/log.133" (76% done)
2013-10-16 03:27:16 MSG pbsworksdb[23763]: still reading write-ahead log "/qa/opt/pbsworks/12.1_rc4_chev_pro/portal/thirdparty/monetdb/pbsworksdata/pbsworksdb/sql_logs/sql/log.133" (80% done)
2013-10-16 03:27:27 MSG pbsworksdb[23763]: still reading write-ahead log "/qa/opt/pbsworks/12.1_rc4_chev_pro/portal/thirdparty/monetdb/pbsworksdata/pbsworksdb/sql_logs/sql/log.133" (85% done)
2013-10-16 03:27:39 MSG pbsworksdb[23763]: still reading write-ahead log "/qa/opt/pbsworks/12.1_rc4_chev_pro/portal/thirdparty/monetdb/pbsworksdata/pbsworksdb/sql_logs/sql/log.133" (92% done)
2013-10-16 03:27:50 MSG pbsworksdb[23763]: still reading write-ahead log "/qa/opt/pbsworks/12.1_rc4_chev_pro/portal/thirdparty/monetdb/pbsworksdata/pbsworksdb/sql_logs/sql/log.133" (98% done)
Reproducible: Didn't try
## Comment 19277
Date: 2013-10-16 11:25:51 +0200
From: @hannesmuehleisen
Hi Ashish,
to me this looks like the DB just took some time (about 3 minutes according to the logs) to start.
Were you able to connect afterwards? What did you do before? What table structure, how much data, how did you load the data? Also, please do check if this issue is reproducible and then describe the precise circumstance that lead to it.
Thanks,
Hannes
| Database is not starting | https://api.github.com/repos/MonetDB/MonetDB/issues/3386/comments | 0 | 2020-11-30T12:35:35Z | 2024-06-27T12:01:35Z | https://github.com/MonetDB/MonetDB/issues/3386 | 753,442,826 | 3,386 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-10-15 23:52:53 +0200
From: Tim H. <<monetdb.bug.reporter>>
To: SQL devs <<bugs-sql>>
Version: 11.15.7 (Feb2013-SP2)
CC: @hannesmuehleisen, @njnes, @drstmane
Last updated: 2013-12-03 13:59:39 +0100
## Comment 19273
Date: 2013-10-15 23:52:53 +0200
From: Tim H. <<monetdb.bug.reporter>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.69 Safari/537.36
Build Identifier:
A simple query fails with 'identifier not found', but the identifier is referring to a column name in the table being queried.
Reproducible: Always
### Steps to Reproduce:
create table err_stddev2(col1 double);
insert into err_stddev2 values(2.4);
insert into err_stddev2 values(2.6);
SELECT sys.stddev_pop(col1) * sys.stddev_pop(col1) FROM err_stddev2;
### Actual Results:
SELECT: identifier 'col1' unknown
### Expected Results:
<the answer>
## Comment 19274
Date: 2013-10-16 00:01:30 +0200
From: Tim H. <<monetdb.bug.reporter>>
-- this works
SELECT sys.stddev_pop(col1) * avg(col1) FROM err_stddev2;
SELECT sys.stddev_pop(col1), avg(col1) FROM err_stddev2;
-- this fails: SELECT: identifier 'col1' unknown
SELECT avg(col1) * sys.stddev_pop(col1) FROM err_stddev2;
SELECT avg(col1), sys.stddev_pop(col1) FROM err_stddev2;
## Comment 19275
Date: 2013-10-16 08:35:22 +0200
From: @hannesmuehleisen
Interesting bug, this is also still an issue with Feb2013-SP5 and in the default branch.
## Comment 19278
Date: 2013-10-16 12:56:45 +0200
From: @drstmane
I can reproduce the problem with the latest (post Feb2013-SP5 release candidate) version of the Feb2013 branch:
sql>create table err_stddev2(col1 double);
operation successful (0.928ms)
sql>insert into err_stddev2 values(2.4);
1 affected row (0.616ms)
sql>insert into err_stddev2 values(2.6);
1 affected row (0.306ms)
sql>SELECT sys.stddev_pop(col1) * sys.stddev_pop(col1) FROM err_stddev2;
SELECT: identifier 'col1' unknown
sql>
sql>SELECT sys.stddev_pop(col1) * avg(col1) FROM err_stddev2;
+--------------------------+
| sql_mul_L1 |
+==========================+
| 0.25000000000000022 |
+--------------------------+
1 tuple (1.522ms)
sql>SELECT sys.stddev_pop(col1), avg(col1) FROM err_stddev2;
+--------------------------+--------------------------+
| L1 | L2 |
+==========================+==========================+
| 0.10000000000000009 | 2.5 |
+--------------------------+--------------------------+
1 tuple (5.862ms)
sql>
sql>SELECT avg(col1) * sys.stddev_pop(col1) FROM err_stddev2;
SELECT: identifier 'col1' unknown
sql>SELECT avg(col1), sys.stddev_pop(col1) FROM err_stddev2;
SELECT: identifier 'col1' unknown
## Comment 19289
Date: 2013-10-20 17:26:14 +0200
From: @njnes
fixed by falling back to an aggregate when the unary operator fails
## Comment 19387
Date: 2013-12-03 13:59:39 +0100
From: @sjoerdmullender
Feb2013-SP6 has been released.
| Simple query fails with 'identifier not found' | https://api.github.com/repos/MonetDB/MonetDB/issues/3385/comments | 0 | 2020-11-30T12:35:32Z | 2024-06-27T12:01:34Z | https://github.com/MonetDB/MonetDB/issues/3385 | 753,442,800 | 3,385 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-10-13 13:57:25 +0200
From: @mlkersten
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2019-04-30 12:36:00 +0200
## Comment 19272
Date: 2013-10-13 13:57:25 +0200
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Firefox/24.0
Build Identifier:
The following Postgresql window functions are not yet provided.
percent_rank() double precision relative rank of the current row: (rank - 1) / (total rows - 1)
cume_dist() double precision relative rank of the current row: (number of rows preceding or peer with current row) / (total rows)
ntile(num_buckets integer) integer integer ranging from 1 to the argument value, dividing the partition as equally as possible
lag(value any [, offset integer [, default any ]]) same type as value returns value evaluated at the row that is offset rows before the current row within the partition; if there is no such row, instead return default. Both offset and default are evaluated with respect to the current row. If omitted, offset defaults to 1 and default to null
lead(value any [, offset integer [, default any ]]) same type as value returns value evaluated at the row that is offset rows after the current row within the partition; if there is no such row, instead return default. Both offset and default are evaluated with respect to the current row. If omitted, offset defaults to 1 and default to null
first_value(value any) same type as value returns value evaluated at the row that is the first row of the window frame
last_value(value any) same type as value returns value evaluated at the row that is the last row of the window frame
nth_value(value any, nth integer) same type as value returns value evaluated at the row that is the nth row of the window frame (counting from 1); null if no such row
Reproducible: Always
## Comment 26827
Date: 2019-01-21 17:14:53 +0100
From: @sjoerdmullender
Will be in next feature release.
| Auxiliary window functions | https://api.github.com/repos/MonetDB/MonetDB/issues/3384/comments | 0 | 2020-11-30T12:35:30Z | 2024-06-27T12:01:33Z | https://github.com/MonetDB/MonetDB/issues/3384 | 753,442,778 | 3,384 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-10-11 18:59:12 +0200
From: Christian Braun <<hcb>>
To: SQL devs <<bugs-sql>>
Version: 11.15.19 (Feb2013-SP6)
CC: klaudiusz223, @njnes
Last updated: 2014-02-20 15:02:27 +0100
## Comment 19268
Date: 2013-10-11 18:59:12 +0200
From: Christian Braun <<hcb>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0
Build Identifier:
SELECT "a", COUNT(DISTINCT "b") FROM "test"."table1" GROUP BY "a"
is about 50 times slower then running multiple queries with the group by replaced with a where clause. When not using distinct the group by and multiple queries perform equally good.
Reproducible: Always
## Comment 19269
Date: 2013-10-11 19:00:25 +0200
From: Christian Braun <<hcb>>
Created attachment 241
sql script
> Attached file: [distinct_group_by.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3383_distinct_group_by.sql_241) (text/x-delimtext, 1396 bytes)
> Description: sql script
## Comment 19270
Date: 2013-10-11 19:01:03 +0200
From: Christian Braun <<hcb>>
Created attachment 242
log file showing bug
> Attached file: [distinct_group_by.log](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3383_distinct_group_by.log_242) (application/octet-stream, 4265 bytes)
> Description: log file showing bug
## Comment 19271
Date: 2013-10-11 19:01:34 +0200
From: Christian Braun <<hcb>>
Created attachment 243
explain of select statements
> Attached file: [distinct_group_by-explain.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3383_distinct_group_by-explain.txt_243) (text/plain, 282744 bytes)
> Description: explain of select statements
## Comment 19290
Date: 2013-10-20 17:34:44 +0200
From: @njnes
Could you add the ddl statements and the output of plan followed by the distinct
query.
## Comment 19291
Date: 2013-10-21 10:48:01 +0200
From: Christian Braun <<hcb>>
Created attachment 244
DDL statement
> Attached file: [bug_ddl.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3383_bug_ddl.txt_244) (text/plain, 1105 bytes)
> Description: DDL statement
## Comment 19292
Date: 2013-10-21 10:51:57 +0200
From: Christian Braun <<hcb>>
Created attachment 245
explain of "select count distinct group by"
> Attached file: [bug_distinct_group_by.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3383_bug_distinct_group_by.txt_245) (text/plain, 51052 bytes)
> Description: explain of "select count distinct group by"
## Comment 19293
Date: 2013-10-21 10:54:55 +0200
From: Christian Braun <<hcb>>
Thanks for looking into this. I attached the files. I had to replace column and table names with generic identifies.
## Comment 19306
Date: 2013-10-25 18:37:35 +0200
From: Klaudiusz <<klaudiusz223>>
Hi,
I have also encountered this problem. The easiest workaround is rewriting the query like this:
For the query (1)
SELECT "a", COUNT(DISTINCT "b") FROM "test"."table1" GROUP BY "a"
Write
(2)
SELECT "a",count("b") from (SELECT DISTINCT "a", "b" FROM "test"."table1" ) as d GROUP BY "a"
In the first query MonetDB uses only one CPU core. In the second uses all cores.
## Comment 19311
Date: 2013-10-26 14:22:56 +0200
From: Christian Braun <<hcb>>
Thanks for the tip. But unfortunately it does not work as a workaround:
[1]
SELECT "a", COUNT("b") FROM (SELECT DISTINCT "a", "b" FROM "test"."table1") AS t GROUP BY "a";
48 seconds
[2]
SELECT "a", COUNT(1) FROM (SELECT DISTINCT "a", "b" FROM "test"."table1") AS t GROUP BY "a";
3187 seconds
[3]
SELECT "a", COUNT(DISTINCT("b")) FROM "test"."table1" GROUP BY "a";
78 seconds
[4]
SELECT 0, COUNT(DISTINCT "b") FROM "test"."table1" WHERE "a" = 0
UNION SELECT 1, COUNT(DISTINCT "b") FROM "test"."table1" WHERE "a" = 1
UNION SELECT 2, COUNT(DISTINCT "b") FROM "test"."table1" WHERE "a" = 2
UNION SELECT 3, COUNT(DISTINCT "b") FROM "test"."table1" WHERE "a" = 3
UNION SELECT 4, COUNT(DISTINCT "b") FROM "test"."table1" WHERE "a" = 4
UNION SELECT 5, COUNT(DISTINCT "b") FROM "test"."table1" WHERE "a" = 5
;
2 seconds
[1], [2] and [3] run on a single cpu core most of the time.
[2] seems to be different issue. I would have expected [1] and [2] have the same execution time.
The above test is with a small dataset. When i run queries like [3] on larger datasets they do not finish after 10 hours.
## Comment 19312
Date: 2013-10-26 14:24:06 +0200
From: Christian Braun <<hcb>>
Created attachment 247
log file with timing for distinct in sub query
> Attached file: [bug_h3.log](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3383_bug_h3.log_247) (application/octet-stream, 2225 bytes)
> Description: log file with timing for distinct in sub query
## Comment 19313
Date: 2013-10-26 23:58:01 +0200
From: Klaudiusz <<klaudiusz223>>
That's odd! After your comment I wanted reproduce my performance results and I couldn't do that on fresh table. But on another table (created some time ago) Monet used all cores and performance was really OK.
Then I realized I had quite big performance improvement after database restart.
So try to restart your database if you can and check it again. I'v checked that on 3 new tables created before restart.
I hope there is a better solution to force monet to use all CPU.
My another observation is that changing order of columns in sub query
has influence on duration.
Try
SELECT "a", COUNT("b") FROM (SELECT DISTINCT "b","a" FROM "test"."table1") AS t GROUP BY "a";
vs
SELECT "a", COUNT("b") FROM (SELECT DISTINCT "a","b" FROM "test"."table1") AS t GROUP BY "a";
I hope that helps you. I'm using Feb2013 branch
MonetDB 5 server v11.15.18 (64-bit, 64-bit oids)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2013 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 252.2GiB available memory, 32 available cpu cores
Libraries:
libpcre: 7.8 2008-09-05 (compiled with 7.8)
openssl: OpenSSL 1.0.0 29 Mar 2010 (compiled with OpenSSL 1.0.0-fips 29 Mar 2010)
libxml2: 2.7.6 (compiled with 2.7.6)
Compiled by: (x86_64-unknown-linux-gnu)
Compilation: gcc -O3 -fomit-frame-pointer -pipe -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/bin/ld -m elf_x86_64
## Comment 19314
Date: 2013-10-27 10:13:31 +0100
From: Christian Braun <<hcb>>
Thank you for following up. Restarting the database did not make a difference. But switching the column order helped:
[5]
SELECT "a", COUNT("b") FROM (SELECT DISTINCT "a", "b" FROM "test"."table1") AS t GROUP BY "a";
50 seconds
[6]
SELECT "a", COUNT("b") FROM (SELECT DISTINCT "b", "a" FROM "test"."table1") AS t GROUP BY "a";
3 seconds
## Comment 19414
Date: 2013-12-11 15:08:31 +0100
From: @njnes
The relational optimizer now rewrites a, count(distinct) group by a into
a, count(b) from ( select a, b from .. group by a, b) as t group by a;
Also the optimizer reorders the group by expressions (a,b) if it has enough information (ie if the types differ or if one is ordered).
## Comment 19428
Date: 2013-12-17 13:26:43 +0100
From: Klaudiusz <<klaudiusz223>>
Will this patch (http://dev.monetdb.org/hg/MonetDB/rev/78eca92f6d68) be merged into Feb2013 branch?
## Comment 19595
Date: 2014-02-20 15:02:27 +0100
From: @sjoerdmullender
Jan2014 has been released.
| Bad performance with DISTINCT GROUP BY | https://api.github.com/repos/MonetDB/MonetDB/issues/3383/comments | 0 | 2020-11-30T12:35:27Z | 2024-06-27T12:01:32Z | https://github.com/MonetDB/MonetDB/issues/3383 | 753,442,742 | 3,383 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-10-08 09:10:05 +0200
From: @hannesmuehleisen
To: SQL devs <<bugs-sql>>
Version: 11.15.11 (Feb2013-SP3)
CC: @njnes
Last updated: 2013-12-03 13:59:33 +0100
## Comment 19252
Date: 2013-10-08 09:10:05 +0200
From: @hannesmuehleisen
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.37 Safari/537.36
Build Identifier:
The response to the PREPARE ... statement usually contains the schema of the response to the prepared query. However, if the query contains a LIMIT, the response is empty.
Reproducible: Always
### Steps to Reproduce:
1. PREPARE SELECT * FROM tables LIMIT 42;
### Actual Results:
sql>prepare select * from tables limit 42;
execute prepared statement using: EXEC 4(...)
+------+--------+-------+--------+-------+--------+
| type | digits | scale | schema | table | column |
+======+========+=======+========+=======+========+
+------+--------+-------+--------+-------+--------+
0 tuples (2.089ms)
### Expected Results:
+----------+--------+-------+--------+--------+---------------+
| type | digits | scale | schema | table | column |
+==========+========+=======+========+========+===============+
| int | 32 | 0 | | tables | id |
| varchar | 1024 | 0 | | tables | name |
| int | 32 | 0 | | tables | schema_id |
| varchar | 2048 | 0 | | tables | query |
| smallint | 16 | 0 | | tables | type |
| boolean | 1 | 0 | | tables | system |
| smallint | 16 | 0 | | tables | commit_action |
| boolean | 1 | 0 | | tables | readonly |
| tinyint | 8 | 0 | | tables | temporary |
+----------+--------+-------+--------+--------+---------------+
9 tuples (2.035ms)
## Comment 19253
Date: 2013-10-08 09:11:58 +0200
From: @hannesmuehleisen
Maybe also allow ORDER BY/LIMIT OFFSET in subqueries for compatibility reasons as this is fixed.
## Comment 19257
Date: 2013-10-08 16:15:41 +0200
From: @sjoerdmullender
The problem lies in mvc_export_prepare which checks whether the query being prepared is an op_project, and if so generates the table with information about the result set.
In the case of a select with limit, the query is an op_topn, about which the code knows nothing.
I guess there are also other possibilities.
## Comment 19258
Date: 2013-10-09 09:33:32 +0200
From: @njnes
We won't support order by/limit offset in subqueries, only in inserts. This isn't likely to change. Sofar no examples exists to why this would be needed.
## Comment 19259
Date: 2013-10-09 09:47:04 +0200
From: @njnes
fixed by properly handling the topn case in the mvc_export_prepare code. The exec-ute code allready handled this case.
## Comment 19261
Date: 2013-10-09 11:51:16 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [46ab29b898c2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=46ab29b898c2) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=46ab29b898c2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=46ab29b898c2)
Changeset description:
fixed bug #3382 (added test to Bug #2552, which are very related)
## Comment 19379
Date: 2013-12-03 13:59:33 +0100
From: @sjoerdmullender
Feb2013-SP6 has been released.
| Response to PREPARE emtpy if query contains a LIMIT | https://api.github.com/repos/MonetDB/MonetDB/issues/3382/comments | 0 | 2020-11-30T12:35:25Z | 2024-06-27T12:01:31Z | https://github.com/MonetDB/MonetDB/issues/3382 | 753,442,716 | 3,382 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-10-03 15:17:56 +0200
From: Tim H. <<monetdb.bug.reporter>>
To: clients devs <<bugs-clients>>
Version: 11.15.15 (Feb2013-SP4)
Last updated: 2013-10-22 14:42:08 +0200
## Comment 19239
Date: 2013-10-03 15:17:56 +0200
From: Tim H. <<monetdb.bug.reporter>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.76 Safari/537.36
Build Identifier:
This issue reproduces when using the ODBC driver from both node.js and python scripts to select * from sys.tables.
In a node.js script the query never finishes and the ODBC log files with 100s of MB of data after a few minutes. In a python script that uses the ODBC driver to perform the same query, it simply crashes.
Reproducible: Always
### Steps to Reproduce:
(This example requires node.js)
Make a directory C:\temp\example
Change to this directory in a command prompt and run:
npm install odbc util
Create C:\temp\example\hang.js with the following contents
var odbc = require("odbc")
, util = require('util')
, db = new odbc.Database()
;
var connectionString = "DSN=monetdb;UID=monetdb;PWD=monetdb";
db.open(connectionString, function(err) {
db.query("select * from sys.tables;", function(err, rows, moreResultSets) {
console.log(util.inspect(rows, null, 10));
db.close(function() {
console.log("Database connection closed");
});
});
});
Now run: node hangs.js
### Actual Results:
The call to the ODBC driver never returns and the program hangs.
### Expected Results:
The results of the query should be printed to the console.
Log the ODBC details by creating a system environment variable:
ODBCDEBUG=c:\temp\example\odbc.log
When running the above example, this file will fill with 100s of MB of data if you let it run for 10 minutes or more.
## Comment 19241
Date: 2013-10-04 10:30:13 +0200
From: @sjoerdmullender
I can reproduce the problem with your script.
But I'm not at all sure whether the problem is in the ODBC driver. The log that is produced contains (relevant bits extracted):
SQLExecDirectW 22f67630
SQLExecDirect: "select * from sys.tables;"
ODBCInitResult: querytype Q_TABLE, rowcount 32
SQLFetch 22f67630
SQLNumResultCols 22f67630
[getting values for column various attributes]
SQLGetData 22f67630 1 SQL_C_SLONG
SQLGetData 22f67630 2 SQL_C_WCHAR
SQLGetData 22f67630 2 SQL_C_WCHAR
[this last statement repeated over and over again]
I am able to run this inside the debugger and see exactly what's going on.
Luckily I can also see the code that node.js uses to retrieve the data. There I see that it calls SQLGetData multiple times because of this:
if ( == ret) {
//we have captured all of the data
break;
}
else if (SQL_SUCCEEDED(ret)) {
//we have not captured all of the data yet
where ret is the return value from SQLGetData. The MonetDB ODBC driver returns SQL_SUCCESS, which according to the documentation should be returned when all data was successfully transfered. It seems to me the bug is in the node.js ODBC library. It does not distinguish between SQL_SUCCESS (data complete) and SQL_SUCCESS_WITH_INFO (data transfered, but there is more).
Having ssid this, the MonetDB ODBC driver could be more robust here and return SQL_NO_DATA for the second call to SQLGetData.
I base my interpretation of the return valus on http://msdn.microsoft.com/en-us/library/ms715441%28v=vs.85%29.aspx section Retrieving Variable-Length Data in Parts.
## Comment 19242
Date: 2013-10-04 14:22:36 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [98edd5aa0196](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=98edd5aa0196) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=98edd5aa0196](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=98edd5aa0196)
Changeset description:
Implemented retrieving variable-length data in parts with SQLGetData.
This fixes bug #3381.
## Comment 19243
Date: 2013-10-04 15:08:55 +0200
From: @sjoerdmullender
This will be in the next release.
| Windows ODBC driver hangs or crashes on simple queries | https://api.github.com/repos/MonetDB/MonetDB/issues/3381/comments | 0 | 2020-11-30T12:35:22Z | 2024-06-27T12:01:30Z | https://github.com/MonetDB/MonetDB/issues/3381 | 753,442,676 | 3,381 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-10-03 10:25:33 +0200
From: Pete Hollobon <<pete>>
To: clients devs <<bugs-clients>>
Version: 11.15.15 (Feb2013-SP4)
CC: pete
Last updated: 2013-10-22 14:42:10 +0200
## Comment 19234
Date: 2013-10-03 10:25:33 +0200
From: Pete Hollobon <<pete>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.76 Safari/537.36
Build Identifier:
The Python DBAPI driver throws an exception when fetching EXPLAIN query results:
Python 2.7.3 (default, Sep 26 2012, 21:51:14)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import monetdb.sql
>>> db = monetdb.sql.connect(database="demo")
>>> cursor = db.cursor()
>>> cursor.execute("explain select count(*) from sys.tables")
31
>>> cursor.fetchone()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "monetdb/sql/cursors.py", line 205, in fetchone
result = self.__rows[self.rownumber - self.__offset]
IndexError: list index out of range
>>>
I've attached patches that fix this issue for both Python 2 and 3 versions of the driver, so it works as expected:
>>> import monetdb.sql
>>> db = monetdb.sql.connect(database="demo")
>>> cursor = db.cursor()
>>> cursor.execute("explain select count(*) from sys.tables")
31
>>> cursor.fetchone()
('function user.s0_14():void;',)
>>> cursor.fetchone()
(' X_2:bat[:oid,:wrd] := bat.new(nil:oid,nil:wrd);',)
Thanks,
Pete.
Reproducible: Always
## Comment 19235
Date: 2013-10-03 10:26:17 +0200
From: Pete Hollobon <<pete>>
Created attachment 239
Python 2 fix
> Attached file: [file_3380.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3380_file_3380.txt_239) (text/plain, 1186 bytes)
> Description: Python 2 fix
## Comment 19236
Date: 2013-10-03 10:29:59 +0200
From: Pete Hollobon <<pete>>
Created attachment 240
Python 3 fix
> Attached file: [file_3380.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3380_file_3380.txt_240) (text/plain, 1106 bytes)
> Description: Python 3 fix
## Comment 19237
Date: 2013-10-03 10:53:08 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [119925c03cba](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=119925c03cba) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=119925c03cba](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=119925c03cba)
Changeset description:
Added test for bug #3380.
## Comment 19238
Date: 2013-10-03 10:53:10 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [c4693598a20e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c4693598a20e) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c4693598a20e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c4693598a20e)
Changeset description:
Fixed bug #3380.
Thanks to Pete Hollobon for finding and fixing the bug.
| Python DBAPI driver throws exception when fetching EXPLAIN results | https://api.github.com/repos/MonetDB/MonetDB/issues/3380/comments | 0 | 2020-11-30T12:35:20Z | 2024-06-27T12:01:29Z | https://github.com/MonetDB/MonetDB/issues/3380 | 753,442,647 | 3,380 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-30 15:00:08 +0200
From: Anthony Damico <<ajdamico>>
To: SQL devs <<bugs-sql>>
Version: 11.15.15 (Feb2013-SP4)
CC: ajdamico, @hannesmuehleisen
Duplicates: #3376
Last updated: 2013-09-30 16:49:38 +0200
## Comment 19220
Date: 2013-09-30 15:00:08 +0200
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0
Build Identifier:
this appears to be related (but i'm not 100% sure)
http://bugs.monetdb.org/show_bug.cgi?id=3376
sql>create table c10_dom_pre_fpc as (SELECT * FROM ac_dom) UNION ALL (SELECT * F
ROM al_dom) UNION ALL (SELECT * FROM am_dom) UNION ALL (SELECT * FROM ap_dom) UN
ION ALL (SELECT * FROM ba_dom) UNION ALL (SELECT * FROM ce_dom) UNION ALL (SELEC
T * FROM df_dom) UNION ALL (SELECT * FROM es_dom) UNION ALL (SELECT * FROM go_do
m) UNION ALL (SELECT * FROM ma_dom) UNION ALL (SELECT * FROM mg_dom) UNION ALL (
SELECT * FROM ms_dom) UNION ALL (SELECT * FROM mt_dom) UNION ALL (SELECT * FROM
pa_dom) UNION ALL (SELECT * FROM pb_dom) UNION ALL (SELECT * FROM pe_dom) UNION
ALL (SELECT * FROM pi_dom) UNION ALL (SELECT * FROM pr_dom) UNION ALL (SELECT *
FROM rj_dom) UNION ALL (SELECT * FROM rn_dom) UNION ALL (SELECT * FROM ro_dom) U
NION ALL (SELECT * FROM rr_dom) UNION ALL (SELECT * FROM rs_dom) UNION ALL (SELE
CT * FROM sc_dom) UNION ALL (SELECT * FROM se_dom) UNION ALL (SELECT * FROM sp1_
dom) UNION ALL (SELECT * FROM sp2_rm_dom) UNION ALL (SELECT * FROM to_dom ) WITH
DATA;
GDK reported error.
HEAPextend: failed to extend to 755914244096 for 02\65\26501.tail: MT_mremap() f
Reproducible: Always
### Steps to Reproduce:
install the latest instance of R and also monetdb SP-4
open up R and set your working directory with something like this:
setwd( "C:/My Directory/CENSO/" )
then run these three lines and let the program run for a few hours.
install.packages( c( "MonetDB.R" , "RCurl" , "downloader" ) )
library(downloader)
source_url( "https://raw.github.com/ajdamico/usgsd/master/Censo%20Demografico/download%20and%20import.R" , prompt = FALSE , echo = TRUE )
the program will crash at this line--
https://github.com/ajdamico/usgsd/blob/master/Censo%20Demografico/download%20and%20import.RL298
when it crashes, you can re-open the mserver with "censo_demografico.bat" and connect to it with mclient censo_demografico -p 50011
that should let you investigate and re-run the command that is actually breaking:
create table c10_dom_pre_fpc as (SELECT * FROM ac_dom) UNION ALL (SELECT * FROM al_dom) UNION ALL (SELECT * FROM am_dom) UNION ALL (SELECT * FROM ap_dom) UNION ALL (SELECT * FROM ba_dom) UNION ALL (SELECT * FROM ce_dom) UNION ALL (SELECT * FROM df_dom) UNION ALL (SELECT * FROM es_dom) UNION ALL (SELECT * FROM go_dom) UNION ALL (SELECT * FROM ma_dom) UNION ALL (SELECT * FROM mg_dom) UNION ALL (SELECT * FROM ms_dom) UNION ALL (SELECT * FROM mt_dom) UNION ALL (SELECT * FROM pa_dom) UNION ALL (SELECT * FROM pb_dom) UNION ALL (SELECT * FROM pe_dom) UNION ALL (SELECT * FROM pi_dom) UNION ALL (SELECT * FROM pr_dom) UNION ALL (SELECT * FROM rj_dom) UNION ALL (SELECT * FROM rn_dom) UNION ALL (SELECT * FROM ro_dom) UNION ALL (SELECT * FROM rr_dom) UNION ALL (SELECT * FROM rs_dom) UNION ALL (SELECT * FROM sc_dom) UNION ALL (SELECT * FROM se_dom) UNION ALL (SELECT * FROM sp1_dom) UNION ALL (SELECT * FROM sp2_rm_dom) UNION ALL (SELECT * FROM to_dom ) WITH DATA;
### Actual Results:
in mserver----
MonetDB 5 server v11.15.15 "Feb2013-SP4"
Serving database 'censo_demografico', using 8 threads
Compiled for x86_64-pc-winnt/64bit with 64bit OIDs dynamically linked
Found 7.860 GiB available main-memory.
Copyright (c) 1993-July 2008 CWI.
Copyright (c) August 2008-2013 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Listening for connection requests on mapi:monetdb://127.0.0.1:50011/
MonetDB/JAQL module loaded
MonetDB/SQL module loaded
>= .\..\..\gdk\gdk_posix.c:800: MT_mremap(bat\02\65\26501.tail,468c50000,1889785
61024,755914244096): GDKextend() failed
in mclient----
C:\Windows\System32>cd ..
C:\Windows>cd ..
C:\>cd "Program Files"
C:\Program Files>cd MonetDB
C:\Program Files\MonetDB>mclient censo_demografico -p 50011
'mclient' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files\MonetDB>mclient
'mclient' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files\MonetDB>ls
'ls' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files\MonetDB>dir
Volume in drive C has no label.
Volume Serial Number is 882E-FD8A
Directory of C:\Program Files\MonetDB
09/06/2013 04:34 PM <DIR> .
09/06/2013 04:34 PM <DIR> ..
09/27/2013 12:27 PM <DIR> MonetDB5
0 File(s) 0 bytes
3 Dir(s) 451,568,218,112 bytes free
C:\Program Files\MonetDB>cd MonetDB5
C:\Program Files\MonetDB\MonetDB5>mclient censo_demografico -p 50011
user(win32):monetdb
password:
Welcome to mclient, the MonetDB/SQL interactive terminal (Feb2013-SP4)
Database: MonetDB v11.15.15 (Feb2013-SP4), 'censo_demografico'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>create table c10_dom_pre_fpc as (SELECT * FROM ac_dom) UNION ALL (SELECT * F
ROM al_dom) UNION ALL (SELECT * FROM am_dom) UNION ALL (SELECT * FROM ap_dom) UN
ION ALL (SELECT * FROM ba_dom) UNION ALL (SELECT * FROM ce_dom) UNION ALL (SELEC
T * FROM df_dom) UNION ALL (SELECT * FROM es_dom) UNION ALL (SELECT * FROM go_do
m) UNION ALL (SELECT * FROM ma_dom) UNION ALL (SELECT * FROM mg_dom) UNION ALL (
SELECT * FROM ms_dom) UNION ALL (SELECT * FROM mt_dom) UNION ALL (SELECT * FROM
pa_dom) UNION ALL (SELECT * FROM pb_dom) UNION ALL (SELECT * FROM pe_dom) UNION
ALL (SELECT * FROM pi_dom) UNION ALL (SELECT * FROM pr_dom) UNION ALL (SELECT *
FROM rj_dom) UNION ALL (SELECT * FROM rn_dom) UNION ALL (SELECT * FROM ro_dom) U
NION ALL (SELECT * FROM rr_dom) UNION ALL (SELECT * FROM rs_dom) UNION ALL (SELE
CT * FROM sc_dom) UNION ALL (SELECT * FROM se_dom) UNION ALL (SELECT * FROM sp1_
dom) UNION ALL (SELECT * FROM sp2_rm_dom) UNION ALL (SELECT * FROM to_dom ) WITH
DATA;
GDK reported error.
HEAPextend: failed to extend to 755914244096 for 02\65\26501.tail: MT_mremap() f
ailed
sql>
sql>
### Expected Results:
a table :)
## Comment 19224
Date: 2013-09-30 16:49:38 +0200
From: @hannesmuehleisen
*** This bug has been marked as a duplicate of bug #3376 ***
| >= .\..\..\gdk\gdk_posix.c:800: MT_mremap(bat\02\65\26501.tail,468c50000,1889785 61024,755914244096): GDKextend() failed | https://api.github.com/repos/MonetDB/MonetDB/issues/3379/comments | 0 | 2020-11-30T12:35:16Z | 2024-06-28T07:19:42Z | https://github.com/MonetDB/MonetDB/issues/3379 | 753,442,607 | 3,379 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-30 14:48:52 +0200
From: Anthony Damico <<ajdamico>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: ajdamico, @drstmane
Last updated: 2016-04-29 07:57:38 +0200
## Comment 19219
Date: 2013-09-30 14:48:52 +0200
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0
Build Identifier:
i know you don't support every type casting/conversion, but double x boolean seems like a common combination. is it possible to start supporting this? thanks!!
Reproducible: Always
### Steps to Reproduce:
only two of these three commands work in monetdb..
integer x boolean works
SELECT SUM( 10 * TRUE ) FROM ( values ( 1 ) ) AS temp;
double x boolean breaks
SELECT SUM( 10.0 * TRUE ) FROM ( values ( 1 ) ) AS temp;
double x integer works
SELECT SUM( 10.0 * CAST( TRUE AS INTEGER ) ) FROM ( values ( 1 ) ) AS temp;
### Actual Results:
sql> integer x boolean works
sql>SELECT SUM( 10 * TRUE ) FROM ( values ( 1 ) ) AS temp;
+------+
| L3 |
+======+
| 10 |
+------+
1 tuple (11.546ms)
sql>
sql> double x boolean breaks
sql>SELECT SUM( 10.0 * TRUE ) FROM ( values ( 1 ) ) AS temp;
TypeException:user.s8_2[5]:'calc.sht' undefined in: _11:any := calc.sht(_10:bit,
_12:int, _8:int)
TypeException:user.s8_2[7]:'sql.single' undefined in: _14:bat[:oid,:int] := sql.
single(_13:dbl)
program contains errors
sql>
sql> double x integer works
sql>SELECT SUM( 10.0 * CAST( TRUE AS INTEGER ) ) FROM ( values ( 1 ) ) AS temp;
+----------------------+
| L3 |
+======================+
| 10.00 |
+----------------------+
1 tuple (0.435ms)
sql>
### Expected Results:
convert TRUE to CAST( TRUE AS INTEGER ) i guess?
## Comment 19228
Date: 2013-09-30 19:00:52 +0200
From: @drstmane
FYI:
While the reported case uses / missed a BOOLEAN to DECIMAL conversion,
also the BOOLEAN to REA/DOUBLE appears to be "missing" (assuming we want that at all):
sql>\f
Current formatter: sql
sql>\f raw
sql>\f
Current formatter: raw
sql>select 10;
% .L table_name
% single_value name
% tinyint type
% 2 length
[ 10 ]
sql>select 10 * true;
% .L table_name
% sql_mul_single_value name
% smallint type
% 2 length
[ 10 ]
sql>select 10.0;
% .L table_name
% single_value name
% decimal type
% 5 length
[ 10.0 ]
sql>select 10.0 * true;
MAPI = monetdb@localhost:50000
QUERY = select 10.0 * true;
ERROR = !TypeException:user.s19_1[5]:'calc.sht' undefined in: _10:any := calc.sht(_9:bit, _11:int, _7:int)
!program contains errors
sql>select cast(10.0 as real);
% .L table_name
% single_value name
% real type
% 15 length
[ 10 ]
sql>select cast(10.0 as real) * true;
MAPI = monetdb@localhost:50000
QUERY = select cast(10.0 as real) * true;
ERROR = !TypeException:user.s21_1[5]:'calc.lng' undefined in: _10:any := calc.lng(_9:bit, _11:int, _8:int)
!program contains errors
sql>select cast(10.0 as double);
% .L table_name
% single_value name
% double type
% 24 length
[ 10 ]
sql>select cast(10.0 as double) * true;
MAPI = monetdb@localhost:50000
QUERY = select cast(10.0 as double) * true;
ERROR = !TypeException:user.s23_1[5]:'calc.lng' undefined in: _10:any := calc.lng(_9:bit, _11:int, _8:int)
!program contains errors
## Comment 22114
Date: 2016-04-29 07:57:38 +0200
From: Anthony Damico <<ajdamico>>
*** Bug #3781 has been marked as a duplicate of this bug. ***
| possible to support double x boolean type casting in the next update? | https://api.github.com/repos/MonetDB/MonetDB/issues/3378/comments | 0 | 2020-11-30T12:35:14Z | 2024-06-28T13:40:15Z | https://github.com/MonetDB/MonetDB/issues/3378 | 753,442,580 | 3,378 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-30 11:44:30 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.15.3 (Feb2013-SP1)
CC: @njnes
Last updated: 2013-10-22 14:42:10 +0200
## Comment 19217
Date: 2013-09-30 11:44:30 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36
Build Identifier:
I have data and scripts ready to reproduce this, but the data is quite big (14g uncompressed), so I cannot attach it here. I also tried on smaller data samples, but then I cannot reproduce it.
Please write me an email to get a link to data and scripts, I rather not make it public.
The bug seems to pop up only in Feb2013_SP4 (it works fine on another installation that is up to changeset 49170:c0bf1946fc19), and this is its summary:
Two queries, Q1 and Q2, are executed within the same transaction. They both (although slightly differently) join a small table against a large table, and take the "top" 2 tuples. They both have no side-effects, they are simple SELECT queries.
What happens:
Case 1:
START TRANSACTION;
Q1; -- 2 tuples out, as expected
Case 2:
START TRANSACTION;
Q2; -- 2 tuples out, as expected
Case 3:
START TRANSACTION;
Q1; -- 2 tuples out, as expected
Q2; -- BUG: 8 tuples out !!!
Reproducible: Always
Compiled from Mercurial repo, changeset 49170:c0bf1946fc19
MonetDB 5 server v11.15.16 (64-bit, 64-bit oids)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2013 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 15.6GiB available memory, 8 available cpu cores
Libraries:
libpcre: 8.32 2012-11-30 (compiled with 8.32)
openssl: OpenSSL 1.0.1e 11 Feb 2013 (compiled with OpenSSL 1.0.1e-fips 11 Feb 2013)
libxml2: 2.9.1 (compiled with 2.9.1)
Compiled by: roberto@photon.spinque.com (x86_64-unknown-linux-gnu)
Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code
Linking : /usr/bin/ld -m elf_x86_64
## Comment 19232
Date: 2013-10-02 16:56:38 +0200
From: @njnes
fixed by making sure a view only shares a hash with its parent if this
full column is used (ie not a slice)
| Query interfering with next query in same transaction, after SP4 | https://api.github.com/repos/MonetDB/MonetDB/issues/3377/comments | 0 | 2020-11-30T12:35:11Z | 2024-06-27T12:01:26Z | https://github.com/MonetDB/MonetDB/issues/3377 | 753,442,556 | 3,377 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-30 10:44:08 +0200
From: Christian Braun <<hcb>>
To: SQL devs <<bugs-sql>>
Version: 11.15.15 (Feb2013-SP4)
CC: ajdamico, @hannesmuehleisen
Last updated: 2013-10-22 14:42:08 +0200
## Comment 19212
Date: 2013-09-30 10:44:08 +0200
From: Christian Braun <<hcb>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0
Build Identifier:
The error started after updating from Feb2013-SP3 to SP4.
COPY 879429 RECORDS INTO qwe.qwe FROM '/var/tmp/mito_fDop54' USING DELIMITERS '\t','\n';
ERROR = !value from line 1188 field 2 not inserted: !ERROR: HEAPextend: failed to extend to 17592186044416 for 60/34/603401.tail: MT_mremap() failed
Attached are the log files from the client and server. The failing field in the client.log is of type varchar(255).
2013-09-30 04:09:06 MSG merovingian[17461]: database 'db' (14996) was killed by signal SIGBUS
This crash happened after MonetDB filled up all available hard drive space (0.5TB). On restart the the space was released.
Reproducible: Always
### Steps to Reproduce:
1.CREATE TABLE
2.run 50 times COPY 1000000 RECORDS INTO
3.COPY INTO fails with HEAPExtend
## Comment 19213
Date: 2013-09-30 10:45:13 +0200
From: Christian Braun <<hcb>>
Created attachment 236
client log file
> Attached file: [client.log](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3376_client.log_236) (application/octet-stream, 1892 bytes)
> Description: client log file
## Comment 19214
Date: 2013-09-30 10:45:30 +0200
From: Christian Braun <<hcb>>
Created attachment 237
server log file
> Attached file: [merovingian.log](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3376_merovingian.log_237) (application/octet-stream, 6060 bytes)
> Description: server log file
## Comment 19218
Date: 2013-09-30 12:35:30 +0200
From: @hannesmuehleisen
What is your table structure? Could you provide sample data?
## Comment 19221
Date: 2013-09-30 15:02:09 +0200
From: Christian Braun <<hcb>>
Created attachment 238
script to trigger to the bug
> Attached file: [import.sh](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3376_import.sh_238) (text/x-sh, 786 bytes)
> Description: script to trigger to the bug
## Comment 19222
Date: 2013-09-30 15:07:46 +0200
From: Christian Braun <<hcb>>
The attached script creates the table and test data. After about 50 copy into statements the HEAPextend failure happens.
## Comment 19223
Date: 2013-09-30 16:25:32 +0200
From: @sjoerdmullender
The problem is in the use of the heap cache.
The simple solution is to disable the heap cache by setting HEAP_CACHE_SIZE to 0 in gdk_heap.c and recompiling.
To elaborate on the problem, the query causes a heap to be used from the heap cache. This heap is used as the offset heap of a string bat. The string bat is appended to and because of that, the offset heap has to be upgraded to a wider offset heap. The function doing the upgrading doubles (or in the case we saw, quadrupled) the size of the heap. Afterwards the bat is freed and the heap given back to the cache. This cycle repeats a few times, and so the file in the heap cache grows exponentially. Eventually it grows so large that the system can't memory map it anymore and the server gives an error message (and sometime it crashes).
## Comment 19225
Date: 2013-09-30 16:49:38 +0200
From: @hannesmuehleisen
*** Bug #3379 has been marked as a duplicate of this bug. ***
## Comment 19226
Date: 2013-09-30 17:06:15 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [49cc8f100cb4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=49cc8f100cb4) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=49cc8f100cb4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=49cc8f100cb4)
Changeset description:
Get rid of the heap cache.
This fixes bug #3376 and relates to bug #3323.
In bug #3323, comment 15, I already remarked that using the heap cache
is actually slower on Linux than not using the heap cache.
In addition to this, using the heap cache can be very detrimental as
witnessed by bug #3376. What happens there is that a new string bat is
created and then appended to. The appended string bat is big enough
so that the offset heap needs to be memory mapped, so the heap cache
is used to find a usable heap. In this case, there is only one file
there, so it is used. BATappend then needs to widen the offset heap,
so it calls GDKupgradevarheap. That function doubles (or in this
case, quadruples) the size of the heap it was given since it doesn't
know the required BAT capacity. Then the BAT is freed and the heap
returned to the cache. This cycle repeats a few times, and this
repetition causes the heap to grow exponentially, eventually leading
to the errors seen in the bug report.
## Comment 19255
Date: 2013-10-08 11:28:32 +0200
From: @hannesmuehleisen
Fixed by removing the heap cache.
| COPY INTO fails with HEAPextend: failed to extend: MT_mremap() failed | https://api.github.com/repos/MonetDB/MonetDB/issues/3376/comments | 0 | 2020-11-30T12:35:08Z | 2024-06-27T12:01:25Z | https://github.com/MonetDB/MonetDB/issues/3376 | 753,442,514 | 3,376 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-27 16:28:52 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.15.3 (Feb2013-SP1)
CC: @njnes
Last updated: 2013-10-22 14:42:08 +0200
## Comment 19203
Date: 2013-09-27 16:28:52 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36
Build Identifier:
create table x (s string);
insert into x values('%able%');
select * from sys.tables, x where name like s;
This gives:
GDK reported error.
BATfetchjoin(tmpr_11744,tmp_11736) does not hit always (|bn|=0 != 4=|l|) => can't use fetchjoin.
Reproducible: Always
## Comment 19230
Date: 2013-10-02 11:08:07 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [2255b42087dd](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2255b42087dd) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2255b42087dd](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2255b42087dd)
Changeset description:
fixed bug #3375. Handle swapping of join operants (in case of filter joins).
## Comment 19231
Date: 2013-10-02 11:08:32 +0200
From: @njnes
fixed, properly handle the swapped join condition
## Comment 19246
Date: 2013-10-04 18:16:23 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [44580ebcfa76](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=44580ebcfa76) made by Stefan Manegold <Stefan.Manegold@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=44580ebcfa76](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=44580ebcfa76)
Changeset description:
swapped_likejoin.Bug-3375: approve default branch output
| LIKE join: BATfetchjoin does not hit always | https://api.github.com/repos/MonetDB/MonetDB/issues/3375/comments | 0 | 2020-11-30T12:35:06Z | 2024-06-27T12:01:24Z | https://github.com/MonetDB/MonetDB/issues/3375 | 753,442,490 | 3,375 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-27 14:12:50 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.21.19 (Jul2015-SP4)
CC: @mlkersten, @njnes
Last updated: 2016-06-23 10:24:06 +0200
## Comment 19200
Date: 2013-09-27 14:12:50 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36
Build Identifier:
A UNIQUE constraint on a column does not set tkey property on the corresponding BAT.
This has a performance impact on the algorithms which check that property for optimization purposes and find it unset.
For example:
create table x as select distinct name from sys.tables with data;
alter table x add unique (name);
select * from x where name='tables';
This calls a BATsubselect, which does check the tkey property. It finds it unset, so it cannot compute the correct result estimate (which would be 1 in this case).
Another thing: it builds a hash table on the fly to perform a hash-select. But isn't a hash table already built and stored persistently, with the unique constraint? Can't that one be used?
Same considerations for join and other operators.
Reproducible: Always
## Comment 19262
Date: 2013-10-09 14:41:56 +0200
From: @njnes
unfortunately unique keys are not that unique, only if also the NOT NULL constraint holds we could set tkey.
## Comment 19263
Date: 2013-10-09 14:46:33 +0200
From: @swingbit
Good point.
Then the key property should be set when a column is marked unique and not null.
## Comment 19302
Date: 2013-10-23 15:00:38 +0200
From: @sjoerdmullender
I believe changesets [0dc0ef3e0c0f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0dc0ef3e0c0f) and [f6d11cb5e2d3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f6d11cb5e2d3) fixed this issue.
Roberto, can you check?
## Comment 19304
Date: 2013-10-24 18:18:43 +0200
From: @swingbit
Yes, the property is set as expected, thanks
## Comment 19383
Date: 2013-12-03 13:59:37 +0100
From: @sjoerdmullender
Feb2013-SP6 has been released.
## Comment 20862
Date: 2015-05-11 17:27:06 +0200
From: @swingbit
This issue was fixed in Feb2013 SP6, but it seems it's back in Oct2014.
A column marked NOT NULL and with a UNIQUE constraint does not have the tkey property set.
## Comment 20875
Date: 2015-05-20 21:57:09 +0200
From: @njnes
with deletes (mark by the oid lists) we cannot set the bat tkey.
## Comment 20876
Date: 2015-05-20 22:06:55 +0200
From: @njnes
somehow the combination of the extend (group by result for distinct) and
leftfetchjoin to retrieve the column data doesn't result in a set tkey in
the create table with data. In a single select distinct it is set. So
indeed some more fixing needed.
## Comment 21597
Date: 2015-11-25 22:34:05 +0100
From: @mlkersten
Is this one fixed in the latest release?
## Comment 21735
Date: 2016-01-18 11:42:47 +0100
From: @swingbit
Martin: not yet in Jul2015 SP2
## Comment 22057
Date: 2016-04-17 10:07:32 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [3fa0a17123c9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3fa0a17123c9) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3fa0a17123c9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3fa0a17123c9)
Changeset description:
mark a extend.project(grpby) column as key (when we only have one grpby column).
This solves bug #3374 (and possibly other performance issues)
## Comment 22058
Date: 2016-04-17 10:08:23 +0200
From: @njnes
We now generate a setKey when we know the result of the distinct (in this case) is unique (ie a single column result). Then the key info is propagated solving the rest of the problems.
| UNIQUE constraint does not set tkey property on the corresponding BAT | https://api.github.com/repos/MonetDB/MonetDB/issues/3374/comments | 0 | 2020-11-30T12:35:03Z | 2024-06-27T12:01:23Z | https://github.com/MonetDB/MonetDB/issues/3374 | 753,442,457 | 3,374 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-27 08:01:23 +0200
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: 11.15.15 (Feb2013-SP4)
CC: @njnes
Last updated: 2013-10-22 14:42:08 +0200
## Comment 19184
Date: 2013-09-27 08:01:23 +0200
From: @drstmane
Setting a table read-only, as done in the test for bug #3362, fails on bigendian (PowerPC & SPARC); cf.,
http://monetdb.cwi.nl/testweb/web/showtestoutput.php?serial=49012:b11b671870af&target=GNU-Darwin-powerpc-propcheck&module=sql&test=sql%2Ftest%2FBugTracker-2013%2Falter_resets_readonly.Bug-3362&which=out
http://monetdb.cwi.nl/testweb/web/showtestoutput.php?serial=49012:b11b671870af&target=GNU-Gentoo-powerpc-assert-dbfarm&module=sql&test=sql%2Ftest%2FBugTracker-2013%2Falter_resets_readonly.Bug-3362&which=out
http://monetdb.cwi.nl/testweb/web/showtestoutput.php?serial=49012:b11b671870af&target=GNU-Solaris-sparc-dbfarm&module=sql&test=sql%2Ftest%2FBugTracker-2013%2Falter_resets_readonly.Bug-3362&which=out
http://monetdb.cwi.nl/testweb/web/showtestoutput.php?serial=49012:b11b671870af&target=GNU-Solaris-sparcv9-oid32-dbfarm&module=sql&test=sql%2Ftest%2FBugTracker-2013%2Falter_resets_readonly.Bug-3362&which=out
http://monetdb.cwi.nl/testweb/web/showtestoutput.php?serial=49012:b11b671870af&target=GNU-Solaris-sparcv9-dbfarm&module=sql&test=sql%2Ftest%2FBugTracker-2013%2Falter_resets_readonly.Bug-3362&which=out
## Comment 19189
Date: 2013-09-27 09:31:25 +0200
From: @njnes
changed c interface to solve type problem.
## Comment 19207
Date: 2013-09-28 09:29:01 +0200
From: @njnes
solved using proper type (bit)
| Setting table to read-only (Bug 3362) fails on big-endian | https://api.github.com/repos/MonetDB/MonetDB/issues/3373/comments | 0 | 2020-11-30T12:35:01Z | 2024-06-27T12:01:22Z | https://github.com/MonetDB/MonetDB/issues/3373 | 753,442,427 | 3,373 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-26 18:38:20 +0200
From: Bryan <<monetdb>>
To: SQL devs <<bugs-sql>>
Version: 11.15.19 (Feb2013-SP6)
CC: @mlkersten, @njnes, @yzchang
Last updated: 2014-02-20 15:02:57 +0100
## Comment 19179
Date: 2013-09-26 18:38:20 +0200
From: Bryan <<monetdb>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.76 Safari/537.36
Build Identifier:
The following query never returns a result set, with full cpu utilization until the database is shutdown.
SELECT
year_value,
quarter_value,
month_value,
equipment_id,
assigned_location_id,
equipment_owner_id,
equipment_type_id,
equipment_model_id,
equipment_manufacturer_id,
is_rented,
sum(seconds) as seconds,
sum(case when is_utilized = 1 then seconds else 0 end) as utilized_seconds,
1 as equipment_count,
max(case when is_utilized = 1 then 1 else 0 end) as used_equipment_count,
sum(rental_expense) as rental_expense,
count(*) as fact_count,
now() as create_date
FROM fact_utilization_hourly as f
join dim_date_hour as d on f.date_hour_id = d.date_hour_id
--where date_value between '2010-04-01' and '2010-10-31'
GROUP BY year_value,
quarter_value,
month_value,
equipment_id,
assigned_location_id,
equipment_owner_id,
equipment_type_id,
equipment_model_id,
equipment_manufacturer_id,
is_rented;
This is somewhat data dependent; as this never ending query manifests when there is only a few days of data (~4M rows in the fact ) table or when we have 41 months (~261M rows) but does NOT manifest with our 9 month (~50M row test set).
All the above queries return successfully in July2012SP2 & Oct2012SP3 on both Windows and Linux.
Reproducible: Always
### Steps to Reproduce:
1. Submit the query above
2.
3.
### Actual Results:
MonetDB shows a "normal" cpu pattern for about 10 minutes (appears to be in sync with disk i/o) then disk i/o stops and cpu's spike to 100% forever.
After 16 hours need to shutdown the database to allow other connections as this query has consumed full cpu.
### Expected Results:
Query to return data. Note: the 50M rows set took about 9 minutes to complete the query and insert. Removing the Insert and wrapping with a select count(*) from (...) a also never returns.
## Comment 19180
Date: 2013-09-26 18:39:57 +0200
From: Bryan <<monetdb>>
Created attachment 234
Tables structures and MAL explain plan
> Attached file: [agg_month_1_feb2013sp3.lst](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3372_agg_month_1_feb2013sp3.lst_234) (application/octet-stream, 118671 bytes)
> Description: Tables structures and MAL explain plan
## Comment 19181
Date: 2013-09-26 18:40:31 +0200
From: Bryan <<monetdb>>
Created attachment 235
Oct2012SP3 explain plan (query completes)
> Attached file: [agg_month_1_oct2012sp3.lst](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3372_agg_month_1_oct2012sp3.lst_235) (application/octet-stream, 96483 bytes)
> Description: Oct2012SP3 explain plan (query completes)
## Comment 19182
Date: 2013-09-26 18:41:49 +0200
From: Bryan <<monetdb>>
We have multiple queries that follow the same pattern, aggregating to Year/Quarter/Month and or other denormilizations of various FKs, all fail as above.
## Comment 19183
Date: 2013-09-26 19:16:15 +0200
From: @mlkersten
Thank you for your detailed report, we'll look into it
Martin
## Comment 19209
Date: 2013-09-30 00:18:27 +0200
From: @yzchang
Corrected the MonetDB version, since this bug report was submitted before Feb2013-SP4 was released, and attachment 234 includes MAL explain plan of Feb2013-SP3.
## Comment 19398
Date: 2013-12-08 17:50:29 +0100
From: @njnes
was this fixed by the SP6 release? If not, the only way to progress is to have data (generated/anon.. is fine).
## Comment 19413
Date: 2013-12-11 13:04:28 +0100
From: @njnes
openbi.com reply indicates this is fixed now. Open issue seems to be related to more IO WAIT. This is a new problem, so for now we close this bug.
## Comment 19614
Date: 2014-02-20 15:02:57 +0100
From: @sjoerdmullender
Jan2014 has been released.
| Large group by queries never complete - server at 100% cpu(all cores) until MonetDB stopped | https://api.github.com/repos/MonetDB/MonetDB/issues/3372/comments | 0 | 2020-11-30T12:34:58Z | 2024-06-27T12:01:21Z | https://github.com/MonetDB/MonetDB/issues/3372 | 753,442,396 | 3,372 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-26 10:52:35 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.15.19 (Feb2013-SP6)
CC: @njnes
Last updated: 2014-02-20 15:03:06 +0100
## Comment 19178
Date: 2013-09-26 10:52:35 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36
Build Identifier:
Take the following :
explain
with x as (select '%max%' as s)
select name from sys.functions, x
where name LIKE s;
I would expect a join, i.e. a bat-oriented like implementation to be called.
Instead, the like is computed in a loop as follows (only the relevant bit):
| barrier (X_78,X_79) := iterator.new(X_27); |
| X_81 := algebra.fetch(X_28,X_78); |
| X_83 := str.like(X_79,X_81,""); |
| X_84 := algebra.fetch(X_72,X_78); |
| bat.insert(X_74,X_84,X_83); |
| redo (X_78,X_79) := iterator.next(X_27); |
| exit (X_78,X_79); |
Looking at the available functions, I see:
| 5116 | like | create filter function "like"(val string, pat string, esc string) external name algebra.likesubselect;
A filter function is bound to give me a join, I thought.
However, if I rewrite my query as this:
explain
with x as (select '%max%' as s)
select name from sys.functions, x
where "ilike"(name,s,'');
I still get the same loop, and no algebra.likesubselect() call.
Reproducible: Always
## Comment 19187
Date: 2013-09-27 09:24:45 +0200
From: @njnes
currently we don't rewrite joins into selects (ie where one side of the join is a single value).
## Comment 19191
Date: 2013-09-27 10:00:40 +0200
From: @swingbit
I didn't mean a rewrite into select. On the contrary, it is exactly the join that I would expect (in this case with a singleton on one side, but that wasn't the point). Instead, I get loops with fetch, like, fetch, insert. These are literally killing the query.
Forget the singleton, an consider the following. I call the function "ilike" explicitly with 3 arguments, which should trigger algebra.likesubselect:
| 5116 | like | create filter function "like"(val string, pat string, esc string) external name algebra.likesubselect;
But even by just using the LIKE operator, this should be a join, not a loop.
start transaction;
create table x (s string);
insert into x values ('%max%'),('%min%');
explain
select name from sys.functions, x
where "ilike"(name,s,'');
+-----------------------------------------------------------------------+
| mal |
+=======================================================================+
| function user.s2_1(A0:str):void; |
| X_30:bat[:oid,:str] := nil:bat[:oid,:str]; |
| X_31:bat[:oid,:str] := nil:bat[:oid,:str]; |
| barrier X_62 := language.dataflow(); |
| X_2 := sql.mvc(); |
| X_3:bat[:oid,:oid] := sql.tid(X_2,"sys","functions"); |
| X_6 := sql.bind(X_2,"sys","functions","id",0); |
| (X_9,r1_9) := sql.bind(X_2,"sys","functions","id",2); |
| X_12 := sql.bind(X_2,"sys","functions","id",1); |
| X_14 := sql.delta(X_6,X_9,r1_9,X_12); |
| X_15 := algebra.leftfetchjoin(X_3,X_14); |
| X_16:bat[:oid,:oid] := sql.tid(X_2,"spinque","x"); |
| X_19 := sql.bind(X_2,"spinque","x","s",0); |
| X_21 := algebra.leftfetchjoin(X_16,X_19); |
| (X_22,r1_26) := algebra.crossproduct(X_15,X_21); |
| X_24 := sql.bind(X_2,"sys","functions","name",0); |
| (X_26,r1_30) := sql.bind(X_2,"sys","functions","name",2); |
| X_28 := sql.bind(X_2,"sys","functions","name",1); |
| X_29 := sql.delta(X_24,X_26,r1_30,X_28); |
| X_30:bat[:oid,:str] := algebra.leftfetchjoinPath(X_22,X_3,X_29); |
| X_31:bat[:oid,:str] := algebra.leftfetchjoin(r1_26,X_21); |
| language.pass(X_3); |
| language.pass(X_21); |
| exit X_62; |
| X_72:bat[:str,:oid] := bat.reverse(X_30); |
| X_74 := bat.new(nil:oid,nil:bit); |
| barrier (X_78,X_79) := iterator.new(X_30); |
| X_81 := algebra.fetch(X_31,X_78); |
| X_83 := str.ilike(X_79,X_81,A0); |
| X_84 := algebra.fetch(X_72,X_78); |
| bat.insert(X_74,X_84,X_83); |
| redo (X_78,X_79) := iterator.next(X_30); |
| exit (X_78,X_79); |
| X_31:bat[:oid,:str] := nil:bat[:oid,:str]; |
| X_72:bat[:str,:oid] := nil:bat[:str,:oid]; |
| X_32:bat[:oid,:bit] := X_74; |
| X_36 := algebra.subselect(X_32,true,true,true,true,false); |
| X_38 := algebra.leftfetchjoin(X_36,X_30); |
| X_40 := sql.resultSet(1,1,X_38); |
| sql.rsColumn(X_40,"sys.functions","name","varchar",256,0,X_38); |
| X_47 := io.stdout(); |
| sql.exportResult(X_47,X_40); |
| end s2_1; |
+-----------------------------------------------------------------------+
43 tuples (3.048ms)
## Comment 19195
Date: 2013-09-27 10:44:57 +0200
From: @njnes
this case goes indeed wrong, but thats only the function. The ilike/like operator do get a join when the right hand side has more then one row.
## Comment 19196
Date: 2013-09-27 10:48:18 +0200
From: @swingbit
True, the LIKE operator goes right.
Question: Why is the singleton case using a loop? Wouldn't a join still be faster, avoiding all the MAL overhead?
## Comment 19197
Date: 2013-09-27 11:08:48 +0200
From: @njnes
sure the singleton case could be a join too, but we currently have a problem detecting the difference between join and select case in this part of the code (ie implementation short coming, which should be solvable somehow).
So basically we are looking at 2 problems
1) ilike/like = true -> ilike/like filter rewrites fail somehow for the join case
2) the join(a, const) isn't handled efficiently (falls back to an incorrect/inefficient select)
## Comment 19198
Date: 2013-09-27 11:15:45 +0200
From: @swingbit
I see, thanks for the details.
## Comment 19399
Date: 2013-12-08 21:10:58 +0100
From: @njnes
relational join's with between atleast one constant relation are now rewritten into select's.
## Comment 19622
Date: 2014-02-20 15:03:06 +0100
From: @sjoerdmullender
Jan2014 has been released.
| (i)like generates batloop instead of algebra.likesubselect | https://api.github.com/repos/MonetDB/MonetDB/issues/3371/comments | 0 | 2020-11-30T12:34:55Z | 2024-06-27T12:01:19Z | https://github.com/MonetDB/MonetDB/issues/3371 | 753,442,373 | 3,371 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-24 21:46:38 +0200
From: Tim H. <<monetdb.bug.reporter>>
To: SQL devs <<bugs-sql>>
Version: 11.15.15 (Feb2013-SP4)
CC: @njnes
Last updated: 2013-10-22 14:42:07 +0200
## Comment 19176
Date: 2013-09-24 21:46:38 +0200
From: Tim H. <<monetdb.bug.reporter>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.66 Safari/537.36
Build Identifier:
The built-in SQL environment settings can be updated by a SET statement. For example, "set role hr" updates current_role to "hr". The issue is that current_role is updated even when the SET statement fails (e.g. when there is no role named "hr"). This bug affects all of the built-in session variables except "optimizer".
Reproducible: Always
### Steps to Reproduce:
1. Run the following SQL statement while logged into a new database with the monetdb user:
set role blah;
select current_role;
set schema xyz;
select current_schema;
### Actual Results:
sql>set role blah;
Role (blah) missing
sql>select current_role;
+--------------+
| single_value |
+==============+
| blah |
+--------------+
1 tuple (4.3s)
sql>set schema xyz;
Schema (xyz) missing
sql>select current_schema;
+--------------+
| single_value |
+==============+
| xyz |
+--------------+
1 tuple (1.389ms)
### Expected Results:
sql>set role blah;
Role (blah) missing
sql>select current_role;
+--------------+
| single_value |
+==============+
| monetdb |
+--------------+
1 tuple (4.3s)
sql>set schema xyz;
Schema (xyz) missing
sql>select current_schema;
+--------------+
| single_value |
+==============+
| sys |
+--------------+
1 tuple (1.389ms)
It's not clear what the purpose of the following commands are:
set user='some_user';
set session authorization 'some_user';
Both update the current_user variable, even when no user with the given name exists. And even when the user does exist, having the updated current_user variable does not change the effective user for the session (controlled by user_id in the mvc struct).
## Comment 19190
Date: 2013-09-27 09:54:03 +0200
From: @njnes
Added test (env_errors.Bug-3370.sql). The bug is fixed by only applying the changes after checking if the value is valid.
## Comment 19194
Date: 2013-09-27 10:33:39 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [ca5728fc9b7f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ca5728fc9b7f) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ca5728fc9b7f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ca5728fc9b7f)
Changeset description:
fixed bug #3370
| SQL environment settings are updated even when the set statement fails | https://api.github.com/repos/MonetDB/MonetDB/issues/3370/comments | 0 | 2020-11-30T12:34:53Z | 2024-06-27T12:01:18Z | https://github.com/MonetDB/MonetDB/issues/3370 | 753,442,352 | 3,370 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-24 16:35:22 +0200
From: @hannesmuehleisen
To: SQL devs <<bugs-sql>>
Version: 11.15.15 (Feb2013-SP4)
Last updated: 2013-10-04 09:23:26 +0200
## Comment 19171
Date: 2013-09-24 16:35:22 +0200
From: @hannesmuehleisen
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.37 Safari/537.36
Build Identifier:
When retrieving a large number of rows from a very wide table (195243 rows, 243 columns), a \0 character sometimes appears in the MAPI stream, breaking client interfaces. Attached is a protocol hexdump that shows the \0 byte in line 1231. Issue only appears on Windows, the SQL script to create the DB is also attached. If present, the \0 seems to always appear in place of the \t field separator.
Reproducible: Always
## Comment 19172
Date: 2013-09-24 16:35:39 +0200
From: @hannesmuehleisen
Created attachment 233
MAPI Protocol Hexdump
> Attached file: [ro_pes.mapi.bz2](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3369_ro_pes.mapi.bz2_233) (application/x-bzip, 58245 bytes)
> Description: MAPI Protocol Hexdump
## Comment 19173
Date: 2013-09-24 16:37:39 +0200
From: @hannesmuehleisen
The dataset that produces the error is too large to be attached to this bug. It is available at http://homepages.cwi.nl/~hannes/ro_pes.sql.bz2
## Comment 19174
Date: 2013-09-24 16:37:53 +0200
From: @hannesmuehleisen
Once again, this only happens on Windows
## Comment 19175
Date: 2013-09-24 16:55:28 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [8352c84dd429](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8352c84dd429) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=8352c84dd429](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=8352c84dd429)
Changeset description:
R Connector: Possible workaround for Windows Bug #3369 and some more sanity checking
## Comment 19177
Date: 2013-09-25 13:40:45 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [1a4434c8768e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1a4434c8768e) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1a4434c8768e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1a4434c8768e)
Changeset description:
Bring functions output_line and output_line_dense more in line.
This, with the previous changeset [27fec685f5d3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=27fec685f5d3) fixes bug #3369.
## Comment 19240
Date: 2013-10-04 09:23:26 +0200
From: @sjoerdmullender
This was release in Feb2013-SP4, but we still need a test.
| \0 Byte appears in MAPI | https://api.github.com/repos/MonetDB/MonetDB/issues/3369/comments | 0 | 2020-11-30T12:34:51Z | 2024-06-27T12:01:17Z | https://github.com/MonetDB/MonetDB/issues/3369 | 753,442,324 | 3,369 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-24 10:52:23 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.15.15 (Feb2013-SP4)
CC: @njnes
Last updated: 2013-12-03 13:59:38 +0100
## Comment 19170
Date: 2013-09-24 10:52:23 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36
Build Identifier:
The query below triggers a topN on a SORTED column. The column is sorted as it only contains '1' values. I indeed checked with the debugger, for this column the sortedness properties read as:
[ 33@0, "tsorted", "1" ]
[ 34@0, "trevsorted", "1" ]
Still, the time taken by pqueue.topn_max() instruction clearly shows that real sorting is taking place.
The trace:
-- Use sequential optimizer just to have a more readable trace. This does not affect the bug report.
sql>set optimizer='sequential_pipe';
operation successful (0.331ms)
-- This triggers a TOPN on a SORTED column
sql>trace select * from dict order by prob limit 10;
+--------------------------------+------+---------+--------------------------+
| idstr | id | type | prob |
+================================+======+=========+==========================+
| entity.hashtag:skoob | 1 | hashtag | 1 |
| entity.lang:en | 2 | lang | 1 |
| entity.lang:es | 3 | lang | 1 |
| entity.lang:ja | 4 | lang | 1 |
| entity.tweet:32629192428359680 | 5 | tweet | 1 |
| entity.tweet:32629397479493632 | 6 | tweet | 1 |
| entity.tweet:32629410402140161 | 7 | tweet | 1 |
| entity.tweet:32629426382438401 | 8 | tweet | 1 |
| entity.tweet:32629756331560960 | 9 | tweet | 1 |
| entity.hashtag:icantdateyou | 0 | hashtag | 1 |
+--------------------------------+------+---------+--------------------------+
10 tuples (339.959ms)
+--------+----------------------------------------------------------------------------------------------------------------+
| ticks | stmt |
+========+================================================================================================================+
| 4 | X_2 := sql.mvc(); |
| 19 | X_3=<tmp_7605>[10430345] := sql.bind(X_2=0,"spinque","dict","prob",0); |
| 329160 | X_9=<tmp_22416>[10] := pqueue.topn_max(X_3=<tmp_7605>[10430345],10:wrd); |
| 23 | X_10=<tmpr_22157>[10] := algebra.subslice(X_9=<tmp_22416>[10],0:wrd,9:wrd); |
| 14 | X_11=<tmp_7574>[10430345] := sql.bind(X_2=0,"spinque","dict","idstr",0); |
| 29 | X_13=<tmp_22416>[10] := algebra.leftfetchjoin(X_10=<tmpr_22157>[10],X_11=<tmp_7574>[10430345]); |
| 17 | X_14=<tmpr_22607>[10] := algebra.subslice(X_13=<tmp_22416>[10],0:wrd,9:wrd); |
| 9 | X_15=<tmp_22362>[10] := algebra.leftfetchjoin(X_14=<tmpr_22607>[10],X_13=<tmp_22416>[10]); |
| 10 | X_58=<tmp_22204>[10] := algebra.leftfetchjoin(X_14=<tmpr_22607>[10],X_10=<tmpr_22157>[10]); |
| 14 | X_25:bat[:oid,:dbl] =<tmp_22157>[10] := algebra.leftfetchjoin(X_58=<tmp_22204>[10],X_3=<tmp_7605>[10430345]); |
| 7 | X_22=<tmp_7502>[10430345] := sql.bind(X_2=0,"spinque","dict","type",0); |
| 18 | X_24:bat[:oid,:str] =<tmp_22607>[10] := algebra.leftfetchjoin(X_58=<tmp_22204>[10],X_22=<tmp_7502>[10430345]); |
| 7 | X_17=<tmp_7504>[10430345] := sql.bind(X_2=0,"spinque","dict","id",0); |
| 13 | X_21:bat[:oid,:int] =<tmp_22473>[10] := algebra.leftfetchjoin(X_58=<tmp_22204>[10],X_17=<tmp_7504>[10430345]); |
| 7 | X_27 := sql.resultSet(4,1,X_15=<tmp_22362>[10]); |
| 7 | sql.rsColumn(X_27=1,"spinque.dict","idstr","clob",0,0,X_15=<tmp_22362>[10]); |
| 5 | sql.rsColumn(X_27=1,"spinque.dict","id","int",32,0,X_21=<tmp_22473>:bat[:oid,:int][10]); |
| 4 | sql.rsColumn(X_27=1,"spinque.dict","type","clob",0,0,X_24=<tmp_22607>:bat[:oid,:str][10]); |
| 4 | sql.rsColumn(X_27=1,"spinque.dict","prob","double",51,0,X_25=<tmp_22157>:bat[:oid,:dbl][10]); |
| 2 | X_43 := io.stdout(); |
| 99 | sql.exportResult(X_43=="104d2":streams,X_27=1); |
| 3 | end s1_7; |
| 330642 | X_5:void := user.s1_7(); |
+--------+----------------------------------------------------------------------------------------------------------------+
23 tuples (340.215ms)
The same happens with algebra.subsort(). Here as well, sorting should be a no-op. Again, I have verified with the debugger that the "prob" column has both "tsorted" and "trevsorted" set to 1, as it is constant.
sql>trace select * from dict order by prob;
[.... long result ....]
+----------+-----------------------------------------------------------------------------------------------------------------------------------------------+
| ticks | stmt |
+==========+===============================================================================================================================================+
| 3 | X_2 := sql.mvc(); |
| 18 | X_3=<tmp_7605>[10430345] := sql.bind(X_2=0,"spinque","dict","prob",0); |
| 1044287 | (X_8=<tmp_22157>[10430345],r1_12=<tmp_22607>[10430345],r2_12=<tmp_22416>[10430345]) := algebra.subsort(X_3=<tmp_7605>[10430345],false,false); |
| 19 | X_12=<tmp_7574>[10430345] := sql.bind(X_2=0,"spinque","dict","idstr",0); |
| 179487 | X_14=<tmp_22416>[10430345] := algebra.leftfetchjoin(r1_12=<tmp_22607>[10430345],X_12=<tmp_7574>[10430345]); |
| 300968 | X_21=<tmp_22157>[10430345] := algebra.leftfetchjoin(r1_12=<tmp_22607>[10430345],X_3=<tmp_7605>[10430345]); |
| 16 | X_18=<tmp_7502>[10430345] := sql.bind(X_2=0,"spinque","dict","type",0); |
| 162502 | X_20=<tmp_22362>[10430345] := algebra.leftfetchjoin(r1_12=<tmp_22607>[10430345],X_18=<tmp_7502>[10430345]); |
| 15 | X_15=<tmp_7504>[10430345] := sql.bind(X_2=0,"spinque","dict","id",0); |
| 175569 | X_17=<tmp_22473>[10430345] := algebra.leftfetchjoin(r1_12=<tmp_22607>[10430345],X_15=<tmp_7504>[10430345]); |
| 15 | X_23 := sql.resultSet(4,1,X_14=<tmp_22416>[10430345]); |
| 7 | sql.rsColumn(X_23=3,"spinque.dict","idstr","clob",0,0,X_14=<tmp_22416>[10430345]); |
| 4 | sql.rsColumn(X_23=3,"spinque.dict","id","int",32,0,X_17=<tmp_22473>[10430345]); |
| 5 | sql.rsColumn(X_23=3,"spinque.dict","type","clob",0,0,X_20=<tmp_22362>[10430345]); |
| 5 | sql.rsColumn(X_23=3,"spinque.dict","prob","double",51,0,X_21=<tmp_22157>[10430345]); |
| 2 | X_38 := io.stdout(); |
| 54714576 | sql.exportResult(X_38=="104d2":streams,X_23=3); |
| 3 | end s2_7; |
| 56647146 | X_5:void := user.s2_7(); |
Same issue when using "row_number() OVER(ORDER BY prob)", with "prob" again being a constant column (thus sorted).
Reproducible: Always
## Comment 19199
Date: 2013-09-27 11:57:08 +0200
From: @njnes
We need to add these cases to the (pqueue) topn code (ie use slice (0/n or count-n, count) depending on order/min or max que).
## Comment 19201
Date: 2013-09-27 15:29:56 +0200
From: @njnes
within the pqueue code we use slice now.
## Comment 19202
Date: 2013-09-27 15:44:59 +0200
From: @swingbit
What about algebra.subsort() ?
I experience the same problem.
## Comment 19264
Date: 2013-10-09 17:17:53 +0200
From: @swingbit
I need to reopen this, as only the pqueue case has been resolved, but not the algebra.subsort case (see second part of the original report)
## Comment 19300
Date: 2013-10-23 10:41:11 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [6cfed0167e2e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6cfed0167e2e) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6cfed0167e2e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6cfed0167e2e)
Changeset description:
Added another shortcut in BATsubsort.
If the input is already sorted and we need to return group
information, we can take a shortcut if the input is also key or
constant.
This should fix bug #3368.
## Comment 19301
Date: 2013-10-23 10:41:54 +0200
From: @sjoerdmullender
Roberto, can you check with the latest fix?
## Comment 19305
Date: 2013-10-24 18:32:58 +0200
From: @swingbit
Confirmed!
## Comment 19385
Date: 2013-12-03 13:59:38 +0100
From: @sjoerdmullender
Feb2013-SP6 has been released.
| BAT sortedness info ignored on ORDER BY and TOPN | https://api.github.com/repos/MonetDB/MonetDB/issues/3368/comments | 0 | 2020-11-30T12:34:48Z | 2024-06-27T12:01:16Z | https://github.com/MonetDB/MonetDB/issues/3368 | 753,442,297 | 3,368 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-24 10:27:26 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.15.15 (Feb2013-SP4)
CC: @njnes
Last updated: 2013-10-22 14:42:07 +0200
## Comment 19169
Date: 2013-09-24 10:27:26 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36
Build Identifier:
This query comes from bug #3366, which might be related to this.
The sorting on a constant column is there only for the sake of the example of course.
The following gives the expected result:
create table x as select name, 1 as a from sys.tables with data;
WITH y AS (
SELECT name, a, row_number() OVER(ORDER BY x.a DESC) as r FROM x
)
SELECT name, a FROM y WHERE r <= 20 ORDER BY r;
The following, gives "relational query without result":
create table x as select name, 1 as a from sys.tables with data;
WITH y AS (
SELECT name, a, row_number() OVER(ORDER BY x.a DESC) as r FROM x
)
SELECT name, a FROM y WHERE r <= 20 ORDER BY y.r;
The only difference is "ORDER BY y.r" instead of "ORDER BY r".
Reproducible: Always
## Comment 19186
Date: 2013-09-27 09:20:11 +0200
From: @njnes
could you test this on the sp4 ?
## Comment 19192
Date: 2013-09-27 10:09:03 +0200
From: @swingbit
Yep! This seems to be fixed on SP4.
## Comment 19206
Date: 2013-09-27 18:23:45 +0200
From: @swingbit
Oops.
I'm sorry, but I need to reopen it. This query still fails (v11.15.16,
changeset 49170:c0bf1946fc19):
create table x as select id, CAST(1 as double) as prob from sys.functions with data;
create table y as select id, CAST(1 as double) as prob from sys.functions with data;
with x1 as ( select id, prob, row_number() OVER(ORDER BY id desc) as r from x)
select y.*, x1.prob
from x1, y
where x1.r <=2
and x1.id = y.id
-- order by r; -- this works
order by x1.r; -- this doesn't work
## Comment 19229
Date: 2013-10-02 09:06:03 +0200
From: @njnes
Seems to work just fine in the Feb2013 branch, ie will get be part of a SP5.
| Fully qualified order by column gives "relational query without result" | https://api.github.com/repos/MonetDB/MonetDB/issues/3367/comments | 0 | 2020-11-30T12:34:45Z | 2024-06-27T12:01:15Z | https://github.com/MonetDB/MonetDB/issues/3367 | 753,442,261 | 3,367 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-24 10:17:07 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.15.3 (Feb2013-SP1)
CC: @njnes
Last updated: 2013-09-27 10:27:13 +0200
## Comment 19168
Date: 2013-09-24 10:17:07 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36
Build Identifier:
If this works (it does):
create table x as select name, 1 as a from sys.tables with data;
SELECT name, a, row_number() OVER(ORDER BY a DESC) from x;
then I would expect this to work as well (it doesn't):
create table x as select name, 1 as a from sys.tables with data;
SELECT name, a, row_number() OVER(ORDER BY a DESC) as r from x where r < 5;
That gives however:
SELECT: identifier 'r' unknown
Using the fully qualified name (where x.r < 5) doesn't help either.
The only solution is to use a subquery:
create table x as select name, 1 as a from sys.tables with data;
WITH y AS (
SELECT name, a, row_number() OVER(ORDER BY x.a DESC) as r FROM x
)
SELECT name, a FROM y WHERE r <= 20;
I think the row_number() function and its alias should be in the scope of the original query.
Reproducible: Always
## Comment 19185
Date: 2013-09-27 09:17:44 +0200
From: @njnes
thats not how sql is defined. Only the from part is known in the where block.
## Comment 19193
Date: 2013-09-27 10:27:13 +0200
From: @swingbit
You are completely right, my bad.
It was not about the row_number() OVER(), at all.
| rownum() (and its alias) not recognised in current scope | https://api.github.com/repos/MonetDB/MonetDB/issues/3366/comments | 0 | 2020-11-30T12:34:42Z | 2024-06-28T07:19:41Z | https://github.com/MonetDB/MonetDB/issues/3366 | 753,442,224 | 3,366 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-20 23:50:56 +0200
From: Tim H. <<monetdb.bug.reporter>>
To: SQL devs <<bugs-sql>>
Version: 11.17.9 (Jan2014)
CC: @dnedev, @njnes
Last updated: 2015-08-28 13:42:26 +0200
## Comment 19167
Date: 2013-09-20 23:50:56 +0200
From: Tim H. <<monetdb.bug.reporter>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.66 Safari/537.36
Build Identifier:
If a user has a *non-default* current_role that is the schema authorization for the current_schema then this user will be unable to grant object privileges on tables in the current_schema.
Reproducible: Always
### Steps to Reproduce:
1. Connect as user monetdb and run the following SQL statements:
create role hr_role;
create schema hr authorization hr_role;
create user blake with password 'password' name 'Blake' schema "hr";
create user clark with password 'password' name 'Clark' schema "hr";
grant hr_role to blake;
2. Connect as user blake and run the following SQL statements:
set role hr_role;
create table employees (id bigint,name varchar(20));
grant select on employees to clark;
grant select on employees to clark from current_role;
### Actual Results:
operation successful
operation successful
CREATE TABLE: insufficient privileges for user 'blake' in schema 'hr'
CREATE TABLE: insufficient privileges for user 'blake' in schema 'hr'
### Expected Results:
operation successful
operation successful
CREATE TABLE: insufficient privileges for user 'blake' in schema 'hr'
operation successful
A debugging session reveals that in sql_grant_table_privs, the grantor is set to sql->user_id whether or not "from current_role" is used in the grant command. This suggests an issue in sql_parser.y.
---
The GRANT syntax documentation has errors at http://www.monetdb.org/Documentation/SQLreference/Permissions.
Instead of this:
grant:
GRANT privileges TO grantees [ WITH GRANT OPTION ] [ WITH ADMIN grantor ]
| GRANT authid_list TO grantees [ WITH ADMIN OPTION ] [ WITH ADMIN grantor ]
It should read this:
grant:
GRANT privileges TO grantees [ WITH GRANT OPTION ] [ FROM grantor ]
| GRANT authid_list TO grantees [ WITH ADMIN OPTION ] [ FROM grantor ]
Also, the following should be on a new line:
grantees: [ PUBLIC | authid ] ','...
## Comment 21074
Date: 2015-08-01 15:17:56 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [30d12a4105a0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=30d12a4105a0) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=30d12a4105a0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=30d12a4105a0)
Changeset description:
Bug fixes
Bug #3759 fixed types of returned bats (ie use timestamps instead of lng) in modules/mal/clients.c
Bug #3769 fixed crash (triggered assert) by properly looking for referenced groupby columns in push aggr down
optimizer in rel_optimizer.c
Bug #3760 fixed correlated subquery handling in rel_select.c, ie merge only distinct expressions.
Bug #3761 fixed by properly adding the zero_or_one aggregation only when needed (ie when the cardinality of
the outer query is a column/table, ie when we expect one value per row for the subquery).
Bug #3364 fixed in sql_privileges.c, ie allow set role when role_id == auth_id (ie default role).
Bug #3365 fixed in sql_privileges.c, the sql_grant_table_privs always added 'all' privileges in one go
in rel_schema.c properly pass the login_id or role_id based on the 'from current_{role/user}'
part of the grant statement
Bug #3476 was already fixed by previous revoke / schema fixes.
in gdk/gdk_select.c fixed problem with anti select and nils (stop before first nil instead of last)
## Comment 21094
Date: 2015-08-03 17:18:58 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [fa8ff2df52b2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fa8ff2df52b2) made by Vera Matei <vera.matei@monetdbsolutions.com> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=fa8ff2df52b2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=fa8ff2df52b2)
Changeset description:
Added the test case (from bugzilla) for bug #3365.
## Comment 21212
Date: 2015-08-28 13:42:26 +0200
From: @sjoerdmullender
Jul2015 has been released.
| Unable to grant object privileges while having a non-default current_role | https://api.github.com/repos/MonetDB/MonetDB/issues/3365/comments | 0 | 2020-11-30T12:34:40Z | 2024-06-27T12:01:13Z | https://github.com/MonetDB/MonetDB/issues/3365 | 753,442,203 | 3,365 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-20 00:52:01 +0200
From: Tim H. <<monetdb.bug.reporter>>
To: SQL devs <<bugs-sql>>
Version: 11.17.9 (Jan2014)
CC: @njnes
Last updated: 2015-08-28 13:42:51 +0200
## Comment 19166
Date: 2013-09-20 00:52:01 +0200
From: Tim H. <<monetdb.bug.reporter>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.66 Safari/537.36
Build Identifier:
sql>
+--------------+
| single_value |
+==============+
| monetdb |
+--------------+
sql>
Role (monetdb) missing
Reproducible: Always
### Steps to Reproduce:
1. Connect to the database as monetdb
2. SQL: select current_role;
3. SQL: set role "monetdb";
### Actual Results:
+--------------+
| single_value |
+==============+
| monetdb |
+--------------+
1 tuple (1.250ms)
Role (monetdb) missing
### Expected Results:
+--------------+
| single_value |
+==============+
| monetdb |
+--------------+
operation successful
The above example is contrived, but this issue affects any user who switches to a a different role and then wants to switch back to the default role.
## Comment 21073
Date: 2015-08-01 15:17:34 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [30d12a4105a0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=30d12a4105a0) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=30d12a4105a0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=30d12a4105a0)
Changeset description:
Bug fixes
Bug #3759 fixed types of returned bats (ie use timestamps instead of lng) in modules/mal/clients.c
Bug #3769 fixed crash (triggered assert) by properly looking for referenced groupby columns in push aggr down
optimizer in rel_optimizer.c
Bug #3760 fixed correlated subquery handling in rel_select.c, ie merge only distinct expressions.
Bug #3761 fixed by properly adding the zero_or_one aggregation only when needed (ie when the cardinality of
the outer query is a column/table, ie when we expect one value per row for the subquery).
Bug #3364 fixed in sql_privileges.c, ie allow set role when role_id == auth_id (ie default role).
Bug #3365 fixed in sql_privileges.c, the sql_grant_table_privs always added 'all' privileges in one go
in rel_schema.c properly pass the login_id or role_id based on the 'from current_{role/user}'
part of the grant statement
Bug #3476 was already fixed by previous revoke / schema fixes.
in gdk/gdk_select.c fixed problem with anti select and nils (stop before first nil instead of last)
## Comment 21088
Date: 2015-08-01 16:26:27 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [3b151fb999d8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3b151fb999d8) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3b151fb999d8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3b151fb999d8)
Changeset description:
added test for bug #3364
## Comment 21089
Date: 2015-08-01 16:26:50 +0200
From: @njnes
allow resetting the default role
## Comment 21218
Date: 2015-08-28 13:42:51 +0200
From: @sjoerdmullender
Jul2015 has been released.
| Cannot set role back to a user's default role | https://api.github.com/repos/MonetDB/MonetDB/issues/3364/comments | 0 | 2020-11-30T12:34:38Z | 2024-06-27T12:01:12Z | https://github.com/MonetDB/MonetDB/issues/3364 | 753,442,175 | 3,364 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-13 18:02:12 +0200
From: milan <<milan.martak>>
To: SQL devs <<bugs-sql>>
Version: 11.15.3 (Feb2013-SP1)
CC: milan.martak, @njnes
Last updated: 2013-09-27 13:47:17 +0200
## Comment 19157
Date: 2013-09-13 18:02:12 +0200
From: milan <<milan.martak>>
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0
Build Identifier:
Lets have 2 (almost) identical tables, the only difference is size of the a1 attribute. See the table definition in steps to reproduce.
Executing the SELECT with JOIN these 2 tables over all columns works fine
SELECT p.a1, p.a2, p.a3, v.a3
FROM mmtest10 v JOIN mmtest20 p ON ( p.a1 = v.a1 AND p.a2 = v.a2 AND p.a3 = v.a3 AND p.a4 = v.a4 );
However, after creating UK on all columns for one of the tables as here
ALTER TABLE mmtest20 ADD CONSTRAINT mmtest20_uk1 UNIQUE (a1,a2,a3,a4);
and then running the same SQL again - the server would crash (SIGSEGV).
Also note that
- when you remove any of the 4 conditions in the JOIN, it works fine (this is i guess because the optimizer would not choose the UK)
- when the a1 column definitions are the same size, everything works fine
- the behavior is always the same no matter if there is some data or not
Reproducible: Always
### Steps to Reproduce:
1.
CREATE TABLE mmtest10
( a1 varchar(4) NOT NULL,
a2 bigint NOT NULL,
a3 bigint NOT NULL,
a4 bigint NOT NULL );
2.
CREATE TABLE mmtest20
( a1 varchar(9) NOT NULL,
a2 bigint NOT NULL,
a3 bigint NOT NULL,
a4 bigint NOT NULL );
3.
ALTER TABLE mmtest20 ADD CONSTRAINT mmtest20_uk1 UNIQUE (a1,a2,a3,a4);
4.
SELECT p.a1, p.a2, p.a3, v.a3
FROM mmtest10 v JOIN mmtest20 p
ON ( p.a1 = v.a1
AND p.a2 = v.a2
AND p.a3 = v.a3
AND p.a4 = v.a4
);
### Actual Results:
database 'xxx' (10048) was killed by signal SIGSEGV
### Expected Results:
SELECT executed successfully (empty resultset)
## Comment 19158
Date: 2013-09-15 17:35:01 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [79e66f677113](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=79e66f677113) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=79e66f677113](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=79e66f677113)
Changeset description:
fixed bug #3363 (ie make sure push_func down optimizer adds a relation name)
| a join causes SIGSEGV after creation of Unique Key | https://api.github.com/repos/MonetDB/MonetDB/issues/3363/comments | 0 | 2020-11-30T12:34:35Z | 2024-06-27T12:01:11Z | https://github.com/MonetDB/MonetDB/issues/3363 | 753,442,145 | 3,363 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-12 14:43:26 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.15.3 (Feb2013-SP1)
CC: @njnes
Last updated: 2013-09-27 13:47:19 +0200
## Comment 19156
Date: 2013-09-12 14:43:26 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36
Build Identifier:
As the example below shows, the READ ONLY property is reset silently by a primary key constraint. The same holds for a foreign key constraints - I haven't tried other ALTER TABLE statements.
I guess there should be no reason to reset the flag. If a reason exists, then this change shouldn't be silent.
sql>create table x(a int);
operation successful (0.333ms)
sql>insert into x values (1),(2),(3);
3 affected rows (0.337ms)
sql>
sql>alter table x set read only;
operation successful (0.336ms)
sql>select readonly from sys.tables where name='x';
+----------+
| readonly |
+==========+
| true |
+----------+
1 tuple (1.531ms)
sql>alter table x add primary key (a);
operation successful (1.617ms)
sql>select readonly from sys.tables where name='x';
+----------+
| readonly |
+==========+
| false |
+----------+
1 tuple (1.445ms)
s
Reproducible: Always
## Comment 19160
Date: 2013-09-18 16:09:31 +0200
From: @njnes
fixed, it the intermediat table representation didn't properly set
the readonly status.
## Comment 19161
Date: 2013-09-18 16:36:53 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [45a59d9fadb5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=45a59d9fadb5) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=45a59d9fadb5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=45a59d9fadb5)
Changeset description:
fixed bug #3362
## Comment 19188
Date: 2013-09-27 09:31:11 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [c0bf1946fc19](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c0bf1946fc19) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c0bf1946fc19](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c0bf1946fc19)
Changeset description:
use type bit for readonly/readwrite, to match the boolean column type,
should fix Bug #3362.
| ALTER TABLE operations silently remove previously set READ ONLY property | https://api.github.com/repos/MonetDB/MonetDB/issues/3362/comments | 0 | 2020-11-30T12:34:33Z | 2024-06-27T12:01:10Z | https://github.com/MonetDB/MonetDB/issues/3362 | 753,442,115 | 3,362 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-09 17:11:03 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @mlkersten, @njnes, @drstmane
Last updated: 2020-09-23 17:31:10 +0200
## Comment 19143
Date: 2013-09-09 17:11:03 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36
Build Identifier:
Perhaps I missed something in the recent MonetDB developments, but after noticing unexpected MAL plan explosions (see BUG #3294), I came to this simple query:
explain
select name from sys.functions where mod='str'
union all
select name from sys.functions where mod='str';
Which translates to:
+----------------------------------------------------------------+
| mal |
+================================================================+
| function user.s2_1(A0:str,A1:str):void; |
| X_4:bat[:oid,:str] := bat.new(nil:oid,nil:str); |
| X_3 := sql.mvc(); |
| X_10 := sql.bind(X_3,"sys","functions","mod",0); |
| X_7:bat[:oid,:oid] := sql.tid(X_3,"sys","functions"); |
| X_56 := algebra.subselect(X_10,X_7,A0,A0,true,true,false); |
| (X_13,r1_13) := sql.bind(X_3,"sys","functions","mod",2); |
| X_57 := algebra.subselect(r1_13,A0,A0,true,true,false); |
| X_16 := sql.bind(X_3,"sys","functions","mod",1); |
| X_58 := algebra.subselect(X_16,X_7,A0,A0,true,true,false); |
| X_18 := sql.subdelta(X_56,X_7,X_13,X_57,X_58); |
| X_21 := sql.bind(X_3,"sys","functions","name",0); |
| (X_23,r1_28) := sql.bind(X_3,"sys","functions","name",2); |
| X_25 := sql.bind(X_3,"sys","functions","name",1); |
| X_26 := sql.projectdelta(X_18,X_21,X_23,r1_28,X_25); |
| X_27 := bat.append(X_4,X_26,true); |
| X_28:bat[:oid,:oid] := X_7; |
| X_29 := sql.projectdelta(X_28,X_10,X_13,r1_13,X_16); |
| X_30 := algebra.subselect(X_29,A1,A1,true,true,false); |
| X_33 := sql.projectdelta(X_28,X_21,X_23,r1_28,X_25); |
| X_35 := algebra.leftfetchjoin(X_30,X_33); |
| X_36 := bat.append(X_27,X_35,true); |
| X_38 := sql.resultSet(1,1,X_36); |
| sql.rsColumn(X_38,".L","name","varchar",256,0,X_36); |
| X_43 := io.stdout(); |
| sql.exportResult(X_43,X_38); |
| end s2_1; |
| optimizer.dataflow() |
+----------------------------------------------------------------+
It looks to me that this repeats twice the same select. Is that true?
Reproducible: Always
## Comment 19144
Date: 2013-09-09 17:41:02 +0200
From: @mlkersten
Roberto,
The select statements are not identical.
They depend on different components
| X_56 := algebra.subselect(X_10,X_7,A0,A0,true,true,false); | mod,0
| X_57 := algebra.subselect(r1_13,A0,A0,true,true,false); | mod,2
| X_58 := algebra.subselect(X_16,X_7,A0,A0,true,true,false); | mod,1
| X_30 := algebra.subselect(X_29,A1,A1,true,true,false); | projection
Optimizer seems to have squeezed it as it should.
regards, Martin
## Comment 19145
Date: 2013-09-09 17:49:16 +0200
From: @swingbit
Hi Martin,
I was aware of the 0,1,2 binds.
What I don't understand is: if the result consists of the same selection appended twice, why does X_36 (the second append) read as:
X_36 := bat.append(X_27,X_35,true);
and not as
X_36 := bat.append(X_27,X_26,true);
?
## Comment 19146
Date: 2013-09-09 18:02:30 +0200
From: @swingbit
To further clarify, this is an explain from an older MonetDB version (Dec2011), where you can clearly see that the result of the same select is appended twice to the final result.
In the one I posted in the original report, it seems to me that the same select is *computed twice*.
+----------------------------------------------------------------------+
| mal |
+======================================================================+
| function user.s2_9():void; |
| X_30:bat[:oid,:str] := bat.new(nil:oid,nil:str); |
| X_1 := sql.mvc(); |
| X_21:bat[:oid,:str] := sql.bind(X_1,"sys","functions","mod",0); |
| X_22 := algebra.uselect(X_21,"str":str); |
| X_19:bat[:oid,:str] := sql.bind(X_1,"sys","functions","mod",2); |
| X_23 := algebra.kdifference(X_22,X_19); |
| X_20 := algebra.uselect(X_19,"str":str); |
| X_24 := algebra.kunion(X_23,X_20); |
| X_17:bat[:oid,:str] := sql.bind(X_1,"sys","functions","mod",1); |
| X_18 := algebra.uselect(X_17,"str":str); |
| X_25 := algebra.kunion(X_24,X_18); |
| X_15:bat[:oid,:oid] := sql.bind_dbat(X_1,"sys","functions",1); |
| X_16 := bat.reverse(X_15); |
| X_26 := algebra.kdifference(X_25,X_16); |
| X_27 := algebra.markT(X_26,0@0:oid); |
| X_28 := bat.reverse(X_27); |
| X_9:bat[:oid,:str] := sql.bind(X_1,"sys","functions","name",0); |
| X_7:bat[:oid,:str] := sql.bind(X_1,"sys","functions","name",2); |
| X_11 := algebra.kdifference(X_9,X_7); |
| X_12 := algebra.kunion(X_11,X_7); |
| X_4:bat[:oid,:str] := sql.bind(X_1,"sys","functions","name",1); |
| X_13 := algebra.kunion(X_12,X_4); |
| X_29 := algebra.leftjoin(X_28,X_13); |
| X_33 := bat.append(X_30,X_29,true); |
| X_35 := bat.append(X_33,X_29,true); |
| X_36 := sql.resultSet(1,1,X_35); |
| sql.rsColumn(X_36,".functions","name":str,"varchar",256,0,X_35); |
| X_44 := io.stdout(); |
| sql.exportResult(X_44,X_36); |
| end s2_9; |
+----------------------------------------------------------------------+
## Comment 19147
Date: 2013-09-09 18:12:35 +0200
From: @mlkersten
A critical test for common term elimination is that instructions should be side-effect free. Appends are not.
Also the equality of the arguments A0, and A1 can not be determined statically.
It would have to be detected at the SQL level leading to a template with just one argument.
## Comment 19148
Date: 2013-09-09 18:23:16 +0200
From: @swingbit
A difference that I notice with the Dec2011 plan that I posted is indeed that the two strings are now parameters of the function.
This justifies your explanation about arguments A0 and A1.
Understanding why this is happening doesn't really satisfy me though. The behaviour of the older version was far more correct, I believe. Notice that in real-life queries I get very long plan portions repeated over and over again, just because of this.
Do you think this is the way it should behave?
## Comment 19149
Date: 2013-09-09 18:32:44 +0200
From: @drstmane
Possibly related:
I recently had the problem with Feb2013 (or more precisely SciQL-2, but I don't expect that it was related / limited to the SciQL extensions on to of Feb2013) that when using a UNION ALL of several sub-queries in a function declaration, common sub-expressions --- in my specific case an aggregation that was identical in the select- and the having-clause of a group by sub-query --- were not recognized as such, i.e., the identical aggregation was evaluated twice. In my case, introducing a separate sub-function per sub-query and UNION ALL over the sub-function calls "solved" the problem.
(Given to many other obligations, I did not have/find the time to file my problem as a proper bug report ... :-()
While I assumed the problem was related to "too complicated" function definitions, it might actually be that it is related to UNION ALL queries --- the most prominent commonality between Roborto's and my case.
Would this make this bug report "valid", again?
## Comment 19150
Date: 2013-09-09 18:36:08 +0200
From: @drstmane
NB:
While appends are indeed not side-effect free, selections are.
Roberto's point / question is why the identical selects are not shared / re-used, but evaluated twice ("redundantly").
The same holds for the identical aggregations in my group-by-having case.
(I'll try to provide a reproducible example, but cannot promise when ...)
## Comment 19151
Date: 2013-09-09 18:38:22 +0200
From: @mlkersten
Indeed, in this case it all boils down to the handling of constants at the SQL level to derive templates. It is up to the SQL engineer to validate and reassign it.
## Comment 19152
Date: 2013-09-09 19:23:14 +0200
From: @drstmane
For what it's worth:
While both share UNION ALL, a notable difference between Roberto's and my case is that the common sub-expression appears "across" the UNION ALL in Roberto's case, while it appears within a sub-query "under" the UNION ALL in my case.
## Comment 19153
Date: 2013-09-09 19:49:08 +0200
From: @drstmane
Having said that, with the following simple SQL-only example trying to mimic my (actually more complex SciQL) case, I cannot reproduce the problem, i.e., common subexpression elimination works fine with Feb2013-SP3 & latest Feb2013 from HG (changeset 23a797ab1392):
create table bug_3361_stm ( a int, b int );
explain
select a, sum(b), min(b) from bug_3361_StM group by a having sum(b) > 0 and min(b) > 0
union all
select a, sum(b), max(b) from bug_3361_StM group by a having sum(b) < 0 and max(b) < 0;
+------------------------------------------------------------------------+
| mal |
+========================================================================+
| function user.s7_1{autoCommit=true}(A0:lng,A1:int,A2:lng,A3:int):void; |
| X_7:bat[:oid,:int] := bat.new(nil:oid,nil:int); |
| X_6 := sql.mvc(); |
| X_10:bat[:oid,:oid] := sql.tid(X_6,"sys","bug_3361_stm"); |
| X_13 := sql.bind(X_6,"sys","bug_3361_stm","b",0); |
| (X_16,r1_16) := sql.bind(X_6,"sys","bug_3361_stm","b",2); |
| X_19 := sql.bind(X_6,"sys","bug_3361_stm","b",1); |
| X_21 := sql.delta(X_13,X_16,r1_16,X_19); |
| X_22 := algebra.leftfetchjoin(X_10,X_21); |
| X_23 := sql.bind(X_6,"sys","bug_3361_stm","a",0); |
| (X_25,r1_25) := sql.bind(X_6,"sys","bug_3361_stm","a",2); |
| X_27 := sql.bind(X_6,"sys","bug_3361_stm","a",1); |
| X_28 := sql.delta(X_23,X_25,r1_25,X_27); |
| X_29 := algebra.leftfetchjoin(X_10,X_28); |
| (X_30,r1_30,r2_30) := group.subgroupdone(X_29); |
| X_33:bat[:oid,:lng] := aggr.subsum(X_22,X_30,r1_30,true,true); |
^^^^ ^^^
| X_34:bat[:oid,:int] := aggr.submin(X_22,X_30,r1_30,true); |
^^^^ ^^^
| X_38 := algebra.leftfetchjoin(r1_30,X_29); |
| X_42:bat[:oid,:int] := aggr.submax(X_22,X_30,r1_30,true); |
^^^^ ^^^
| X_35 := algebra.thetasubselect(X_34,A1,">"); |
^^^^
| X_37 := algebra.thetasubselect(X_33,X_35,A0,">"); |
^^^^
| X_39 := algebra.leftfetchjoin(X_37,X_38); |
| X_40 := bat.append(X_7,X_39,true); |
| X_43 := algebra.thetasubselect(X_42,A3,"<"); |
^^^^
| X_45 := algebra.thetasubselect(X_33,X_43,A2,"<"); |
^^^^
| X_46 := algebra.leftfetchjoin(X_45,X_38); |
| X_47 := bat.append(X_40,X_46,true); |
| X_56:bat[:oid,:int] := bat.new(nil:oid,nil:int); |
| X_58 := algebra.leftfetchjoin(X_37,X_34); |
^^^^
| X_59 := bat.append(X_56,X_58,true); |
| X_60 := algebra.leftfetchjoin(X_45,X_42); |
^^^^
| X_61 := bat.append(X_59,X_60,true); |
| X_49:bat[:oid,:lng] := bat.new(nil:oid,nil:lng); |
| X_52 := algebra.leftfetchjoin(X_37,X_33); |
^^^^
| X_53 := bat.append(X_49,X_52,true); |
| X_54 := algebra.leftfetchjoin(X_45,X_33); |
^^^^
| X_55 := bat.append(X_53,X_54,true); |
| X_62 := sql.resultSet(3,1,X_47); |
| sql.rsColumn(X_62,".L10","a","int",32,0,X_47); |
| sql.rsColumn(X_62,".L10","L1","bigint",32,0,X_55); |
| sql.rsColumn(X_62,".L10","L2","int",32,0,X_61); |
| X_76 := io.stdout(); |
| sql.exportResult(X_76,X_62); |
| end s7_1; |
+------------------------------------------------------------------------+
44 tuples (3.083ms)
## Comment 19154
Date: 2013-09-09 20:29:27 +0200
From: @drstmane
And another difference between Roberto's and my case is that in Roberto's case the common sub-expression contains a literal, while mine does not.
As Martin pointed out, the current (Feb2013) query translation creates a MAL plan (function) that uses separate function arguments for each literal, even if in the given instance some literals happen to have the same values. Thus, while there is a common sub-expression in the SQL query, this is no longer "visible"/present in the generated MAL plan.
## Comment 19155
Date: 2013-09-11 11:51:48 +0200
From: @swingbit
How literals are passed as function parameters seems indeed the be the main cause here.
If I rewrite my original query as
explain
with sel as (select name from sys.functions where mod='str')
select name from sel
union all
select name from sel;
Then I get the MAL plan that I would expect:
+----------------------------------------------------------------+
| mal |
+================================================================+
| function user.s5_1(A0:str):void; |
| X_3:bat[:oid,:str] := bat.new(nil:oid,nil:str); |
| X_2 := sql.mvc(); |
| X_9 := sql.bind(X_2,"sys","functions","mod",0); |
| X_6:bat[:oid,:oid] := sql.tid(X_2,"sys","functions"); |
| X_48 := algebra.subselect(X_9,X_6,A0,A0,true,true,false); |
| (X_12,r1_12) := sql.bind(X_2,"sys","functions","mod",2); |
| X_49 := algebra.subselect(r1_12,A0,A0,true,true,false); |
| X_15 := sql.bind(X_2,"sys","functions","mod",1); |
| X_50 := algebra.subselect(X_15,X_6,A0,A0,true,true,false); |
| X_17 := sql.subdelta(X_48,X_6,X_12,X_49,X_50); |
| X_20 := sql.bind(X_2,"sys","functions","name",0); |
| (X_22,r1_27) := sql.bind(X_2,"sys","functions","name",2); |
| X_24 := sql.bind(X_2,"sys","functions","name",1); |
| X_25 := sql.projectdelta(X_17,X_20,X_22,r1_27,X_24); |
| X_26 := bat.append(X_3,X_25,true); |
| X_27 := bat.append(X_26,X_25,true); |
| X_28 := sql.resultSet(1,1,X_27); |
| sql.rsColumn(X_28,".L","name","varchar",256,0,X_27); |
| X_35 := io.stdout(); |
| sql.exportResult(X_35,X_28); |
| end s5_1; |
| optimizer.dataflow() |
+----------------------------------------------------------------+
I would put it this way: rewriting the sql query helps the translator produce better MAL code. Ideally, that should not be needed, as SQL is supposed to be declarative. Especially considering that in many real-life applications query are generated - thus more likely to contain verbose patterns, I would consider this something to try and improve. A good reason is also that it came as an unexpected side effect of other developments, reducing the effectiveness of previously working code optimizations.
Will this report be reconsidered?
## Comment 20104
Date: 2014-08-29 10:29:45 +0200
From: @swingbit
A year later, I'd like to reopen this bug report.
It was marked as "INVALID", but as the discussion shows, it was not invalid at all.
Perhaps you want to mark it as "WON'T FIX", but I hope you reconsider, as I find it serious for every non-trivial query scenario.
## Comment 20536
Date: 2014-12-17 16:55:21 +0100
From: @njnes
On the sql side the 2 variables are created because of the query cache. For now you could switch off the query cache (set cache=false). This should push the problem back to the commonterms optimizer. Currently the optimizer fails at finding the duplicates.
## Comment 20537
Date: 2014-12-17 16:57:10 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [9a7952fd5a0c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9a7952fd5a0c) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9a7952fd5a0c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9a7952fd5a0c)
Changeset description:
- improved usage for filter functions
- improved push down of selects (with multiple tid() statements)
- made enabling/disabling cache function again (needed for bug #3361)
## Comment 20931
Date: 2015-06-19 18:23:12 +0200
From: @swingbit
Setting cache=false does indeed inline the parameters.
However commonTerms cannot find the duplicates yet. I don't really understand why.
Notice that the problem I am describing here is the root of MAL plans longer than 30K lines (where I would expect max 2-3K lines).
On Oct2014-SP4, with cache=false (Jul2015 behaves the same):
sql>set cache=false;
operation successful (0.641ms)
sql>explain
more>select name from sys.functions where mod='str'
more>union all
more>select name from sys.functions where mod='str';
+-------------------------------------------------------------------------------+
| mal |
+===============================================================================+
| function user.main{autoCommit=true}():void; |
| barrier X_63 := language.dataflow(); |
| X_3:bat[:oid,:str] := bat.new(nil:oid,nil:str); |
| X_2 := sql.mvc(); |
| X_9:bat[:oid,:str] := sql.bind(X_2,"sys","functions","mod",0); |
| X_6:bat[:oid,:oid] := sql.tid(X_2,"sys","functions"); |
| X_48 := algebra.subselect(X_9,X_6,"str":str,"str":str,true,true,false); |
| (X_12,r1_12) := sql.bind(X_2,"sys","functions","mod",2); |
| X_49 := algebra.subselect(r1_12,"str":str,"str":str,true,true,false); |
| X_15:bat[:oid,:str] := sql.bind(X_2,"sys","functions","mod",1); |
| X_50 := algebra.subselect(X_15,X_6,"str":str,"str":str,true,true,false); |
| X_17 := sql.subdelta(X_48,X_6,X_12,X_49,X_50); |
| X_19:bat[:oid,:str] := sql.bind(X_2,"sys","functions","name",0); |
| (X_21,r1_28) := sql.bind(X_2,"sys","functions","name",2); |
| X_23:bat[:oid,:str] := sql.bind(X_2,"sys","functions","name",1); |
| X_24 := sql.projectdelta(X_17,X_19,X_21,r1_28,X_23); |
| X_25 := bat.append(X_3,X_24,true); |
| X_27:bat[:oid,:oid] := X_6; |
| X_51 := algebra.subselect(X_9,X_27,"str":str,"str":str,true,true,false); |
| X_52 := algebra.subselect(X_15,X_27,"str":str,"str":str,true,true,false); |
| X_29 := sql.subdelta(X_51,X_27,X_12,X_49,X_52); |
| X_31 := sql.projectdelta(X_29,X_19,X_21,r1_28,X_23); |
| X_32 := bat.append(X_25,X_31,true); |
| language.pass(X_6); |
| language.pass(X_9); |
| language.pass(X_15); |
| language.pass(X_27); |
| language.pass(X_12); |
| language.pass(X_49); |
| language.pass(X_19); |
| language.pass(X_21); |
| language.pass(r1_28); |
| language.pass(X_23); |
| exit X_63; |
| X_33 := sql.resultSet(1,1,X_32); |
| sql.rsColumn(X_33,".L","name","varchar",256,0,X_32); |
| X_39 := io.stdout(); |
| sql.exportResult(X_39,X_33); |
| end main; |
+-------------------------------------------------------------------------------+
39 tuples (3.649ms)
## Comment 20932
Date: 2015-06-19 18:37:22 +0200
From: @mlkersten
Indeed, the window for searching for constants in a MAL plan is limited
and also not handled at the SQL layer as such.
The underlying reason is that constants are not separately administered
from ordinary variables.
Similarly, the window for searching identical instructions is limited.
Otherwise, the common term optimizer would become way too expensive O(n^2)
In this case we have
X_48 := algebra.subselect(X_9,X_6,"str":str,"str":str,true,true,false)
X_49 := algebra.subselect(r1_12,"str":str,"str":str,true,true,false);
X_50 := algebra.subselect(X_15,X_6,"str":str,"str":str,true,true,false);
X_51 := algebra.subselect(X_9,X_27,"str":str,"str":str,true,true,false)
X_52 := algebra.subselect(X_15,X_27,"str":str,"str":str,true,true,false);
None of the arguments pairs are identical and in this simple common term
matching fails. The fact that X_27 is an alias for X_6 is not (yet) taken
into account. This could be handled by an extra alias removal before the
commonterms optimizer starts. [TODO]
## Comment 20933
Date: 2015-06-19 18:49:47 +0200
From: @swingbit
Martin, do you mean that simply adding the existing aliasRemoval before commonTerms in the current pipeline would do the trick? Or would they need changes anyway?
I am aware of the limited window. We discussed this a few times and I still don't agree with it. ;-)
That's why there is no limit in my code (that's the only change), so the window cannot be a reason in this case.
Yes, that optimizer is expensive, but with the current limitations it's hardly ever useful and its failed application can be way worse than its quadratic execution on long plans (that's my opinion of course).
## Comment 20934
Date: 2015-06-19 20:38:53 +0200
From: @mlkersten
If you add the alias optimizer:
....
"optimizer.deadcode();"
"optimizer.aliases();"
"optimizer.commonTerms();"
....
You will get the following more interesting result.
sql>set cache=false;
operation successful (0.629ms)
sql>explain select name from sys.functions where mod='str'
more>union
more>select name from sys.functions where mod='str' ;
+--------------------------------------------------------------------------------------+
| mal |
+======================================================================================+
| function user.main{autoCommit=true}():void; |
| X_38 := bat.new(nil:oid,nil:str); |
| X_46 := bat.append(X_38,".L"); |
| X_41 := bat.new(nil:oid,nil:str); |
| X_48 := bat.append(X_41,"name"); |
| X_42 := bat.new(nil:oid,nil:str); |
| X_50 := bat.append(X_42,"varchar"); |
| X_43 := bat.new(nil:oid,nil:int); |
| X_52 := bat.append(X_43,256); |
| X_45 := bat.new(nil:oid,nil:int); |
| X_54 := bat.append(X_45,0); |
| X_3:bat[:oid,:str] := bat.new(nil:oid,nil:str); |
| X_2 := sql.mvc(); |
| X_9:bat[:oid,:str] := sql.bind(X_2,"sys","functions","mod",0); |
| X_6:bat[:oid,:oid] := sql.tid(X_2,"sys","functions"); |
| X_69 := algebra.subselect(X_9,X_6,"str","str",true,true,false); |
| (X_12,r1_12) := sql.bind(X_2,"sys","functions","mod",2); |
| X_70 := algebra.subselect(r1_12,nil:bat[:oid,:oid],"str","str",true,true,false); |
| X_15:bat[:oid,:str] := sql.bind(X_2,"sys","functions","mod",1); |
| X_72 := algebra.subselect(X_15,X_6,"str","str",true,true,false); |
| X_18 := sql.subdelta(X_69,X_6,X_12,X_70,X_72); |
| X_20:bat[:oid,:str] := sql.bind(X_2,"sys","functions","name",0); |
| (X_22,r1_25) := sql.bind(X_2,"sys","functions","name",2); |
| X_24:bat[:oid,:str] := sql.bind(X_2,"sys","functions","name",1); |
| X_25 := sql.projectdelta(X_18,X_20,X_22,r1_25,X_24); |
| (X_26,r1_31,r2_31) := group.subgroupdone(X_25); |
| X_29 := algebra.leftfetchjoin(r1_31,X_25); |
| X_30 := bat.append(X_3,X_29,true); |
| X_32 := bat.append(X_30,X_29,true); |
| (X_33,r1_64,r2_64) := group.subgroupdone(X_32); |
| X_36 := algebra.leftfetchjoin(r1_64,X_32); |
| sql.resultSet(X_46,X_48,X_50,X_52,X_54,X_36); |
| end user.main; |
| optimizer.mitosis() |
| optimizer.dataflow() |
+--------------------------------------------------------------------------------------+
35 tuples (4.034ms)
Happy? ;)
## Comment 20936
Date: 2015-06-22 10:46:43 +0200
From: @swingbit
Thanks, that looks much better indeed :)
From my point of view this bug report can be closed as fixed.
However.... ;) I hope you don't mind if I submit others on the same topic. Re-use of intermediate results remains a nasty issue with generated SQL queries.
## Comment 21211
Date: 2015-08-28 13:42:22 +0200
From: @sjoerdmullender
Jul2015 has been released.
## Comment 22034
Date: 2016-04-14 12:07:04 +0200
From: @swingbit
The conclusion for this issues seemed to be, from the last comments, that that aliases optimizer should have been placed before the commonTerms optimizer, in order to catch instructions that are not identical but equivalent.
The bug has been closed as fixed in Jul2015, but I see the default pipe hasn't changed.
Is there a reason? Was that not a good fix?
## Comment 22036
Date: 2016-04-14 12:57:05 +0200
From: @swingbit
Actually: the test case
explain
select name from sys.functions where mod='str'
union all
select name from sys.functions where mod='str';
eventually worked correctly by
- setting cache to false
- calling aliases optimizer before commonTerms optimizer
Now this seems not to be enough any more.
To me this remains a serious issue. Plans are exploding and repeating 40-50 times the same computations.
## Comment 22037
Date: 2016-04-14 13:08:01 +0200
From: @mlkersten
Yes, the issue is known and we are considering to make caching default false. Calling the optimizer for each query instead. That would remove this issue.
## Comment 22060
Date: 2016-04-17 11:41:10 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [6db31f60efeb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6db31f60efeb) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6db31f60efeb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6db31f60efeb)
Changeset description:
apply the alias optimizer after the pushselect as the later introduces
new aliases. Partial solution to bug #3361.
## Comment 22061
Date: 2016-04-17 11:42:47 +0200
From: @njnes
reordered the optimizers such that the alias gets removed. This solve the commonterms problem. For now still the cache needs to be disabled. We are still thinking/testing if the agressive statement cache could be removed (or only used for a smaller set of statements (is updates)).
## Comment 22125
Date: 2016-05-06 19:02:04 +0200
From: @swingbit
Just a reminder that the commit above modifies only default_pipe. The others still have the pushselect optimizer after the alias optimizer.
## Comment 28115
Date: 2020-09-23 17:31:10 +0200
From: @njnes
the oct2020 will no longer have the query cache, ie should run these issues without problems.
| constants as MAL function parameters prevent intermediate reuse | https://api.github.com/repos/MonetDB/MonetDB/issues/3361/comments | 0 | 2020-11-30T12:34:29Z | 2024-06-27T12:01:09Z | https://github.com/MonetDB/MonetDB/issues/3361 | 753,442,069 | 3,361 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-07 06:41:59 +0200
From: Tim H. <<monetdb.bug.reporter>>
To: SQL devs <<bugs-sql>>
Version: 11.15.7 (Feb2013-SP2)
CC: @njnes
Last updated: 2013-09-27 13:47:14 +0200
## Comment 19139
Date: 2013-09-07 06:41:59 +0200
From: Tim H. <<monetdb.bug.reporter>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.66 Safari/537.36
Build Identifier:
Start mserver5 so that it initializes a new database. Then load the TPCH schema plus keys. Finally, plan the TPCH queries. Do this twice, each time with a newly initialized database. Diffing the two outputs will show where uninitialized memory is written as a string in the plan.
Reproducible: Always
### Steps to Reproduce:
mkdir /tmp/mtest-19378/
rm -rf /tmp/db-19378
mserver5 --dbpath=/tmp/db-19378 --debug=10 --set gdk_nr_threads=0 --set mapi_open=true --set mapi_port=35809 --set mapi_usock=/tmp/mtest-19378/.s.monetdb.35809 --set monet_prompt= --forcemito --set mal_listing=2 &
mclient -lsql -ftest -Eutf-8 -i -e --port=35809 < tpch_query_plans.sql > run1
pkill mserver5
rm -rf /tmp/db-19378
mserver5 --dbpath=/tmp/db-19378 --debug=10 --set gdk_nr_threads=0 --set mapi_open=true --set mapi_port=35809 --set mapi_usock=/tmp/mtest-19378/.s.monetdb.35809 --set monet_prompt= --forcemito --set mal_listing=2 &
mclient -lsql -ftest -Eutf-8 -i -e --port=35809 < tpch_query_plans.sql > run2
diff run1 run2
### Actual Results:
568,570c568,570
< | | | | | table(sys.customer) [ customer.c_custkey NOT NULL HASHCOL as �.c_custkey, customer.c_name NOT NULL as �.c_name, customer.%TID% NOT NULL as �.%TID%, customer.%customer_c_custkey_pkey NOT NULL HASHIDX as �.%customer_c_custkey_pkey, customer.%customer_c_nationkey_fkey NOT NULL JOINIDX sys.customer.customer_c_nationkey_fkey as �.%customer_c_nationkey_fkey ] COUNT
< | | | | ) [ customer.c_custkey NOT NULL HASHCOL = �.c_custkey NOT NULL HASHCOL FETCH ]
< | | | ) [ customer.c_custkey NOT NULL HASHCOL , orders.o_orderkey NOT NULL HASHCOL , L6.L6 NOT NULL, �.c_custkey NOT NULL, �.c_name NOT NULL as customer.c_name ],
---
> | | | | | table(sys.customer) [ customer.c_custkey NOT NULL HASHCOL as �.c_custkey, customer.c_name NOT NULL as �.c_name, customer.%TID% NOT NULL as �.%TID%, customer.%customer_c_custkey_pkey NOT NULL HASHIDX as �.%customer_c_custkey_pkey, customer.%customer_c_nationkey_fkey NOT NULL JOINIDX sys.customer.customer_c_nationkey_fkey as �.%customer_c_nationkey_fkey ] COUNT
> | | | | ) [ customer.c_custkey NOT NULL HASHCOL = �.c_custkey NOT NULL HASHCOL FETCH ]
> | | | ) [ customer.c_custkey NOT NULL HASHCOL , orders.o_orderkey NOT NULL HASHCOL , L6.L6 NOT NULL, �.c_custkey NOT NULL, �.c_name NOT NULL as customer.c_name ],
### Expected Results:
<no difference between run1 and run2>
This is with a build of the MonetDB repository Feb2013 branch @48758, configured with all the defaults. I.e. just ./configure. Note that there is a SQL file referenced in the repro steps. I will attach it to this bug.
I'm marking this as critical because memory issues in C programs can cause bad things to happen.
## Comment 19140
Date: 2013-09-07 06:42:54 +0200
From: Tim H. <<monetdb.bug.reporter>>
Created attachment 232
SQL file referenced in the repro steps
> Attached file: [tpch_query_plans.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3360_tpch_query_plans.sql_232) (application/octet-stream, 13914 bytes)
> Description: SQL file referenced in the repro steps
## Comment 19141
Date: 2013-09-09 02:36:00 +0200
From: @njnes
fixed, added missing strdup
## Comment 19142
Date: 2013-09-09 02:36:58 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [23a797ab1392](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=23a797ab1392) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=23a797ab1392](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=23a797ab1392)
Changeset description:
fixed strdup issue, ie bug #3360
| uninitialized memory causing bad output in query plans | https://api.github.com/repos/MonetDB/MonetDB/issues/3360/comments | 0 | 2020-11-30T12:34:27Z | 2024-06-27T12:01:07Z | https://github.com/MonetDB/MonetDB/issues/3360 | 753,442,045 | 3,360 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-04 09:22:08 +0200
From: @bartscheers
To: SQL devs <<bugs-sql>>
Version: 11.15.11 (Feb2013-SP3)
CC: @njnes
Last updated: 2013-09-04 10:33:35 +0200
## Comment 19119
Date: 2013-09-04 09:22:08 +0200
From: @bartscheers
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0
Build Identifier:
The documentation states that tan2(x,y), the inverse tangent on x/y should exist, but it doesn't.
BTW, atan2 would be a better name.
Reproducible: Always
### Steps to Reproduce:
1.select 3*tan2(sqrt(3),-1);
2.or
3.select 3*atan2(sqrt(3),-1);
### Actual Results:
SELECT: no such binary operator 'tan2(real,real)'
### Expected Results:
3.141592653589793
## Comment 19120
Date: 2013-09-04 09:43:30 +0200
From: @njnes
its named atan in sql. The atan2 needs 2 arguments.
## Comment 19122
Date: 2013-09-04 10:15:39 +0200
From: @bartscheers
Yes, atan exists, but atan2() or tan2() is not implemented.
## Comment 19123
Date: 2013-09-04 10:33:35 +0200
From: @bartscheers
Ok thanks.
"select atan(x,y);" gives the expected results.
Then the documentation at http://www.monetdb.org/Documentation/SQLreference/BuiltinFunctions is a bit confusing.
| atan2 function does not exist | https://api.github.com/repos/MonetDB/MonetDB/issues/3359/comments | 0 | 2020-11-30T12:34:24Z | 2024-06-28T07:19:41Z | https://github.com/MonetDB/MonetDB/issues/3359 | 753,442,010 | 3,359 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-04 09:11:45 +0200
From: @bartscheers
To: SQL devs <<bugs-sql>>
Version: 11.15.11 (Feb2013-SP3)
CC: @njnes
Last updated: 2013-09-27 13:47:18 +0200
## Comment 19118
Date: 2013-09-04 09:11:45 +0200
From: @bartscheers
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0
Build Identifier:
When mclient tries to connect to a remote database, but provides an invalid user or password, the server will have a connection that stays in CLOSE_WAIT state.
Reproducible: Always
### Steps to Reproduce:
1. create (empty) db on remote server
2. access from client: mclient -hremote.server -dremotedb -p50000
3. provide an incorrect password (or username) to get
InvalidCredentialsException:checkCredentials:invalid credentials for user 'monetdb'
### Actual Results:
On the server it shows (netstat -ap):
tcp 1 0 remote.server:50000 client:42231 CLOSE_WAIT 30210/mserver5 t
### Expected Results:
No entry
This also happens when another schema/user/pw than the default sys/monetdb is in place
## Comment 19125
Date: 2013-09-04 14:37:45 +0200
From: @njnes
for now solved by closing the streams properly after login failures. This gives slightly different time_waits then normal (successfull) connections as those
are first closed by the client.
| Remote client connection stays in CLOSE_WAIT state | https://api.github.com/repos/MonetDB/MonetDB/issues/3358/comments | 0 | 2020-11-30T12:34:22Z | 2024-06-27T12:01:05Z | https://github.com/MonetDB/MonetDB/issues/3358 | 753,441,983 | 3,358 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-03 08:59:03 +0200
From: @grobian
To: clients devs <<bugs-clients>>
Version: -- development
CC: martin.van.dinther
Last updated: 2016-12-21 13:07:18 +0100
## Comment 19114
Date: 2013-09-03 08:59:03 +0200
From: @grobian
Now that bug #3354 is implemented, we can implement Statement.setQueryTimeout():
http://docs.oracle.com/javase/1.4.2/docs/api/java/sql/Statement.htmlsetQueryTimeout%28int%29
We actually need a way to query the server for the current timeout, in case the user manually changes this beyond the scope of the driver. Also, we need to ensure a proper exception is thrown when the timeout expires.
## Comment 24465
Date: 2016-10-06 16:48:01 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset 3fa949cbc783, made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the monetdb-java repo, refers to this bug.
For complete details, see http://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=3fa949cbc783
Changeset description:
Implemented Statement methods: getQueryTimeout() and setQueryTimeout(int seconds).
getQueryTimeout() used to always return 0, now it returns the query timeout retrieved from the server.
setQueryTimeout(int seconds) used to always throw SQLException: query time outs not supported.
Now it sets the query timeout for the current connection/session on the server.
This fixes bug #3357
## Comment 24466
Date: 2016-10-06 17:07:52 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [55bacab34c04](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=55bacab34c04) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=55bacab34c04](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=55bacab34c04)
Changeset description:
Add invocation and test results of new jdbc test for bug #3357.
| Implement setQueryTimeout() | https://api.github.com/repos/MonetDB/MonetDB/issues/3357/comments | 0 | 2020-11-30T12:34:19Z | 2024-06-27T12:01:05Z | https://github.com/MonetDB/MonetDB/issues/3357 | 753,441,942 | 3,357 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-02 18:49:39 +0200
From: monetdb-bugzilla
To: clients devs <<bugs-clients>>
Version: 11.15.15 (Feb2013-SP4)
CC: radovan.biciste
Last updated: 2013-10-22 14:42:08 +0200
## Comment 19108
Date: 2013-09-02 18:49:39 +0200
From: monetdb-bugzilla
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:23.0) Gecko/20100101 Firefox/23.0
Build Identifier:
When retrieving details about the columns of a table, the driver does not return the correct information when the index based getters are used rather than the getters that provide a column name.
Example:
ResultSet rs = connection.getMetaData().getColumns("demo", "voc", "invoices", "%");
rs.next();
String isNullable = rs.getString("IS_NULLABLE"); // returns "YES"
String isNullable = rs.getString(18); // returns a null value
The same is true for getInt("DECIMAL_DIGITS") vs. getInt(9)
Reproducible: Always
### Steps to Reproduce:
1. use DatabaseMetaData.getColumns() to obtain details about table columns
2. use getString(18) --> null value return
3.
### Actual Results:
getString(18) returns null
getInt(9) returns 0
### Expected Results:
getString(18) should return the same value as getString("IS_NULLABLE")
getInt(9) should return the same value as getInt("DECIMAL_DIGITS)
I have observed this behaviour with the JDBC driver versions 2.8 and 2.9 against a MonetDB Server 11.15.3
## Comment 19109
Date: 2013-09-02 19:42:45 +0200
From: @grobian
from http://docs.oracle.com/javase/6/docs/api/java/sql/DatabaseMetaData.htmlgetColumns%28java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String%29 I cannot deduce that the column mapping should be exactly as the specification says
## Comment 19112
Date: 2013-09-02 20:23:42 +0200
From: monetdb-bugzilla
Next to each column name there is the index number where that column is supposed to be.
1. TABLE_CAT String => table catalog (may be null)
2. TABLE_SCHEM String => table schema (may be null)
3. TABLE_NAME String => table name
4. ....
5. ....
Using the index works in all other DBMS (Oracle, Postgres, SQL Server, DB2, H2, HSQLDB, Derby, Teradata, Cubrid, MySQL, Firebird, Ingres, Informix, NuoDB, SQLite, Vertica, even Excel and Access through ODBC)
## Comment 19115
Date: 2013-09-03 09:54:08 +0200
From: Radovan Bičiště <<radovan.biciste>>
Created attachment 229
modified MonetDatabaseMetaData.java class
I reordered columns in metadata query in getColumns method and fixed couple column number (adding 1) in metadate methods.
Please consider changes for adding into distribution.
Thank you.
> Attached file: [MonetDatabaseMetaData.java](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3356_MonetDatabaseMetaData.java_229) (text/plain, 113534 bytes)
> Description: modified MonetDatabaseMetaData.java class
## Comment 19116
Date: 2013-09-03 10:03:04 +0200
From: @grobian
Can you please attach a patch? I think the changes are fine, but can't easily check from here/this way.
## Comment 19117
Date: 2013-09-03 10:09:16 +0200
From: Radovan Bičiště <<radovan.biciste>>
Created attachment 230
proposed patch
Hopefully the patch is in the right direction.
Created by command:
diff MonetDatabaseMetaData.java.ORG MonetDatabaseMetaData.java > MonetDatabaseMetaData.java.diff
> Attached file: [MonetDatabaseMetaData.java.diff](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3356_MonetDatabaseMetaData.java.diff_230) (text/plain, 1589 bytes)
> Description: proposed patch
## Comment 19124
Date: 2013-09-04 10:44:18 +0200
From: @grobian
Changes look OK to me. I assume they pass the tests?
## Comment 19126
Date: 2013-09-04 15:14:18 +0200
From: Radovan Bičiště <<radovan.biciste>>
(In reply to comment 6)
> Changes look OK to me. I assume they pass the tests?
I did not run any tests included in the source code tree.
## Comment 19129
Date: 2013-09-05 16:40:45 +0200
From: Radovan Bičiště <<radovan.biciste>>
Created attachment 231
patch for getImportedKeys method
I'm sorry for bugging. I found another glitch in the MetaData. Method keyQuery did not return the columns in the other described in JDBC specification. It caused method getImportedKeys and others to malfunction in SQL Workbench.
Please validate the proposed patch. I only run make clean and make in java folder. My quick tests in SQL Workbench seems to work fine.
> Attached file: [MonetDatabaseMetaData.java.diff](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3356_MonetDatabaseMetaData.java.diff_231) (text/plain, 2806 bytes)
> Description: patch for getImportedKeys method
## Comment 19130
Date: 2013-09-05 18:20:06 +0200
From: @grobian
I cannot apply your patch:
patch unexpectedly ends in middle of line
patch: **** Only garbage was found in the patch input.
## Comment 19131
Date: 2013-09-05 18:24:07 +0200
From: @grobian
(In reply to comment 9)
> I cannot apply your patch:
>
> patch unexpectedly ends in middle of line
> patch: **** Only garbage was found in the patch input.
ignore that, I no longer understand BugZilla's buttons/links/output
## Comment 19132
Date: 2013-09-05 18:53:57 +0200
From: @grobian
(In reply to comment 8)
> Created attachment 231 [details]
> patch for getImportedKeys method
>
> I'm sorry for bugging. I found another glitch in the MetaData. Method
> keyQuery did not return the columns in the other described in JDBC
> specification. It caused method getImportedKeys and others to malfunction in
> SQL Workbench.
> Please validate the proposed patch. I only run make clean and make in java
> folder. My quick tests in SQL Workbench seems to work fine.
your patch breaks Test_JdbcClient on the foreign key constraint dumping, so something is no longer matching
## Comment 19133
Date: 2013-09-05 21:50:01 +0200
From: Radovan Bičiště <<radovan.biciste>>
I'm not able to compile tests with Java 1.7.0_25:
rbiciste@rbiciste-suse:~/MonetDB-11.13.9/java> sudo make install
make install-recursive
make[1]: Entering directory `/home/rbiciste/MonetDB-11.13.9/java'
Making install in tests
make[2]: Entering directory `/home/rbiciste/MonetDB-11.13.9/java/tests'
make install-am
make[3]: Entering directory `/home/rbiciste/MonetDB-11.13.9/java/tests'
"/usr/bin/ant" -f "`readlink -f ./build.xml`" -Dbuilddir="`readlink -f /home/rbiciste/MonetDB-11.13.9/java/tests/jar_jdbctests`" -Djardir="`readlink -f /home/rbiciste/MonetDB-11.13.9/java/tests`" -Dbasedir="`readlink -f .`" jar_jdbctests
Buildfile: /home/rbiciste/MonetDB-11.13.9/java/tests/build.xml
prepare:
find_driver:
jdbc:
compile:
[echo] Compiling JDBC tests
[javac] Compiling 1 source file to /home/rbiciste/MonetDB-11.13.9/java/tests/jar_jdbctests
[javac] ----------
[javac] 1. ERROR in /home/rbiciste/MonetDB-11.13.9/java/tests/jar_jdbctests/src/nl/cwi/monetdb/jdbc/MonetDriver.java (at line 1)
[javac] /*
[javac] ^
[javac] The type java.sql.Wrapper cannot be resolved. It is indirectly referenced from required .class files
[javac] ----------
[javac] 2. ERROR in /home/rbiciste/MonetDB-11.13.9/java/tests/jar_jdbctests/src/nl/cwi/monetdb/jdbc/MonetDriver.java (at line 29)
[javac] import java.sql.SQLFeatureNotSupportedException;
[javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[javac] The import java.sql.SQLFeatureNotSupportedException cannot be resolved
[javac] ----------
[javac] 3. ERROR in /home/rbiciste/MonetDB-11.13.9/java/tests/jar_jdbctests/src/nl/cwi/monetdb/jdbc/MonetDri
[javac] ver.java (at line 377)
[javac] public Logger getParentLogger() throws SQLFeatureNotSupportedException {
[javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[javac] SQLFeatureNotSupportedException cannot be resolved to a type
[javac] ----------
[javac] 4. ERROR in /home/rbiciste/MonetDB-11.13.9/java/tests/jar_jdbctests/src/nl/cwi/monetdb/jdbc/MonetDriver.java (at line 378)
[javac] throw new SQLFeatureNotSupportedException("java.util.logging not in use", "0
[javac] A000");
[javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[javac] SQLFeatureNotSupportedException cannot be resolved to a type
[javac] ----------
[javac] 4 problems (4 errors)
BUILD FAILED
/home/rbiciste/MonetDB-11.13.9/java/tests/build.xml:60: Compile failed; see the compiler error output for details.
Total time: 1 second
make[3]: *** [jar_jdbctests_ant_target] Error 1
make[3]: Leaving directory `/home/rbiciste/MonetDB-11.13.9/java/tests'
make[2]: *** [install] Error 2
make[2]: Leaving directory `/home/rbiciste/MonetDB-11.13.9/java/tests'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/rbiciste/MonetDB-11.13.9/java'
make: *** [install] Error 2
rbiciste@rbiciste-suse:~/MonetDB-11.13.9/java>
## Comment 19244
Date: 2013-10-04 15:42:39 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [868919fa3005](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=868919fa3005) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=868919fa3005](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=868919fa3005)
Changeset description:
Applied patch from bug #3356.
The patch looks good, applies cleanly, and the tests pass.
## Comment 19245
Date: 2013-10-04 15:44:25 +0200
From: @sjoerdmullender
Assuming that the patch does indeed fix the problem, I'm closing this.
We do still need a test (hence the keyword).
## Comment 19247
Date: 2013-10-04 21:02:00 +0200
From: @grobian
(In reply to comment 14)
> Assuming that the patch does indeed fix the problem, I'm closing this.
> We do still need a test (hence the keyword).
as noted in comment 11, the patch breaks the constraint dumping test, e.g.
http://monetdb.cwi.nl/testweb/web/showtestoutput.php?serial=49143:868919fa3005&target=GNU-Darwin-i386-propcheck&module=sql&test=sql%2Fjdbc%2Ftests%2FTest_JdbcClient&which=out
please revert.
## Comment 19248
Date: 2013-10-04 21:03:20 +0200
From: @grobian
(http://monetdb.cwi.nl/testweb/web/testchange.php?test=49143:868919fa3005/GNU-Darwin-i386-propcheck/sql/mTests/sql%2Fjdbc%2Ftests%2FTest_JdbcClient)
## Comment 19249
Date: 2013-10-05 10:55:28 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [4e1be37a5d65](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4e1be37a5d65) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4e1be37a5d65](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4e1be37a5d65)
Changeset description:
Hopefully better fix for bug #3356.
The only thing this patch does is to rearrange columns to comply with
the specification (unlike the previous attempt at a fix which did a
bit more).
All JDBC tests pass.
## Comment 19250
Date: 2013-10-07 17:32:29 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [6ba6b5e2f37f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6ba6b5e2f37f) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6ba6b5e2f37f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6ba6b5e2f37f)
Changeset description:
Added test for bug #3356.
## Comment 19251
Date: 2013-10-07 17:33:06 +0200
From: @sjoerdmullender
Fixed with a smaller patch than the original.
Also added a test.
| DatabaseMetaData.getColumns() doesn't work correctly when using index-based getters | https://api.github.com/repos/MonetDB/MonetDB/issues/3356/comments | 0 | 2020-11-30T12:34:17Z | 2024-06-27T12:01:03Z | https://github.com/MonetDB/MonetDB/issues/3356 | 753,441,905 | 3,356 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-02 10:27:58 +0200
From: @mlkersten
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2016-04-11 11:45:20 +0200
## Comment 19107
Date: 2013-09-02 10:27:58 +0200
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:23.0) Gecko/20100101 Firefox/23.0
Build Identifier:
Introduce a method to limit the storage resources for queries/sessions.
Reproducible: Always
| Control the amount of (temp) space | https://api.github.com/repos/MonetDB/MonetDB/issues/3355/comments | 0 | 2020-11-30T12:34:14Z | 2024-06-28T13:40:14Z | https://github.com/MonetDB/MonetDB/issues/3355 | 753,441,880 | 3,355 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-09-02 10:26:21 +0200
From: @mlkersten
To: SQL devs <<bugs-sql>>
Version: 11.15.11 (Feb2013-SP3)
Last updated: 2014-02-20 15:02:44 +0100
## Comment 19106
Date: 2013-09-02 10:26:21 +0200
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:23.0) Gecko/20100101 Firefox/23.0
Build Identifier:
Make the MAL interpreter time out available in SQL.
Preferable to available at transaction level, including the idle time a transaction consumes.
Reproducible: Always
## Comment 19113
Date: 2013-09-03 08:51:19 +0200
From: @mlkersten
Most of the stuff was already available in MAL.
Both query and session timeouts can be set by specifying the max seconds allowed.
The session timeout check runs at the beginning of a query.
The query timeout is checked between all MAL instructions.
To make it work, you probable have to re-compile from scratch.
From SQL (once 22_clients.sql is (re-)loaded) you can
call settimeout(10); -- terminates queries after 10 seonds
call settimeout(5,300); -- terminates queries after 5 seconds and session after 5 minutes
call settimeout(0,0); -- turns off the limit (to be called before
session timeout has fired
## Comment 19215
Date: 2013-09-30 11:20:22 +0200
From: @sjoerdmullender
This bug was not fixed in Feb2013-SP4 but will be in the next feature release.
## Comment 19605
Date: 2014-02-20 15:02:44 +0100
From: @sjoerdmullender
Jan2014 has been released.
| Introduce query time-out | https://api.github.com/repos/MonetDB/MonetDB/issues/3354/comments | 0 | 2020-11-30T12:34:12Z | 2024-06-27T12:01:01Z | https://github.com/MonetDB/MonetDB/issues/3354 | 753,441,857 | 3,354 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-08-29 00:57:54 +0200
From: @mlkersten
To: SQL devs <<bugs-sql>>
Version: 11.15.7 (Feb2013-SP2)
CC: @njnes
Last updated: 2013-09-27 13:47:18 +0200
## Comment 19102
Date: 2013-08-29 00:57:54 +0200
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:23.0) Gecko/20100101 Firefox/23.0
Build Identifier:
The system allows to turn an individual table to become readonly. There is, however, no way back (except by copying it into another table).
The SQL statement
ALTER TABLE xyz SET READ ONLY;
should be complemented with
ALTER TABLE xyz UNSET READ ONLY;
Which seems a few liner fix in sql_parser, rel_schema
Reproducible: Always
## Comment 19103
Date: 2013-08-31 14:43:00 +0200
From: @njnes
ALTER table xyz SET READ WRITE
## Comment 19104
Date: 2013-08-31 15:35:37 +0200
From: @mlkersten
Do you also allow for
ALTER TABLE xyz SET WRITE ONLY
to allow for inserts but no updates?
## Comment 19105
Date: 2013-08-31 16:06:44 +0200
From: @njnes
no just alter read only and read write (for now). The write only would require more work (ie changes to the storage layer, so only added if there is a use case).
| Readonly tables call for UNSET | https://api.github.com/repos/MonetDB/MonetDB/issues/3353/comments | 0 | 2020-11-30T12:34:10Z | 2024-06-27T12:01:01Z | https://github.com/MonetDB/MonetDB/issues/3353 | 753,441,830 | 3,353 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-08-27 14:58:57 +0200
From: Klaudiusz <<klaudiusz223>>
To: Merovingian devs <<bugs-merovingian>>
Version: 11.15.11 (Feb2013-SP3)
Last updated: 2013-09-27 13:47:16 +0200
## Comment 19086
Date: 2013-08-27 14:58:57 +0200
From: Klaudiusz <<klaudiusz223>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36
Build Identifier:
Using median function on decimal column raise an error:
value (x) exceeds limit of type bte
Reproducible: Always
### Steps to Reproduce:
create table t1 (a numeric(10,2),b double);
insert into t1 values (41.18,41.18);
insert into t1 values (31.13,31.13);
insert into t1 values (21.22,21.22);
insert into t1 values (31.4,31.4);
insert into t1 values (121.5,121.5);
insert into t1 values (111.6,111.6);
insert into t1 values (222.8,222.8);
select median(a) from t1;
select median(b) from t1;
### Actual Results:
value (223) exceeds limits of type bte
### Expected Results:
41.18
MonetDB 5 server v11.15.11 "Feb2013-SP3" (64-bit, 64-bit oids)
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2013 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 7.7GiB available memory, 4 available cpu cores
Libraries:
libpcre: 8.30 2012-02-04 (compiled with 8.30)
openssl: OpenSSL 1.0.1c 10 May 2012 (compiled with OpenSSL 1.0.1c 10 May 2012)
libxml2: 2.8.0 (compiled with 2.8.0)
Compiled by: root@dev.monetdb.org (x86_64-pc-linux-gnu)
Compilation: gcc -O3 -fomit-frame-pointer -pipe -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/bin/ld -m elf_x86_64
## Comment 19090
Date: 2013-08-27 15:25:50 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [c8c3062bbf37](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c8c3062bbf37) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c8c3062bbf37](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c8c3062bbf37)
Changeset description:
Added test for bug #3352.
## Comment 19091
Date: 2013-08-27 15:26:59 +0200
From: @sjoerdmullender
This has already been fixed for the next release.
| Median function with decimal type doesn't work | https://api.github.com/repos/MonetDB/MonetDB/issues/3352/comments | 0 | 2020-11-30T12:34:07Z | 2024-06-27T12:01:00Z | https://github.com/MonetDB/MonetDB/issues/3352 | 753,441,795 | 3,352 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-08-27 11:32:17 +0200
From: @hannesmuehleisen
To: SQL devs <<bugs-sql>>
Version: 11.15.11 (Feb2013-SP3)
Last updated: 2013-09-27 13:47:16 +0200
## Comment 19082
Date: 2013-08-27 11:32:17 +0200
From: @hannesmuehleisen
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.14 Safari/537.36
Build Identifier:
COPY INTO does not work on files compressed using GZIP.
The files:
cat foo.csv
1
2
3
4
5
➜ ~ zcat /ufs/hannes/foo.csv.gz
1
2
3
4
5
➜ ~ bzcat foo.csv.bz2
1
2
3
4
5
In mclient:
sql>create table foo(i integer);
operation successful (21.246ms)
sql>copy into foo from '/ufs/hannes/foo.csv';
5 affected rows (121.611ms)
sql>delete from foo;
5 affected rows (8.241ms)
sql>copy into foo from '/ufs/hannes/foo.csv.gz';
0 affected rows (75.695ms) -- <<< THIS IS WRONG
sql>delete from foo;
0 affected rows (14.127ms)
sql>copy into foo from '/ufs/hannes/foo.csv.bz2';
5 affected rows (110.278ms)
Reproducible: Always
### Steps to Reproduce:
1. create csv file and compress using gzip
2. use COPY INTO to load the csv into the table
### Actual Results:
no data is imported (0 affected rows)
### Expected Results:
data is imported
## Comment 19083
Date: 2013-08-27 11:32:40 +0200
From: @hannesmuehleisen
Created attachment 226
gzipped CSV
> Attached file: [foo.csv.gz](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3351_foo.csv.gz_226) (application/gzip, 38 bytes)
> Description: gzipped CSV
## Comment 19084
Date: 2013-08-27 11:32:55 +0200
From: @hannesmuehleisen
Created attachment 227
plain CSV
> Attached file: [foo.csv](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3351_foo.csv_227) (text/csv, 10 bytes)
> Description: plain CSV
## Comment 19085
Date: 2013-08-27 11:33:14 +0200
From: @hannesmuehleisen
Created attachment 228
bzipped CSV
> Attached file: [foo.csv.bz2](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3351_foo.csv.bz2_228) (application/x-bzip, 43 bytes)
> Description: bzipped CSV
## Comment 19096
Date: 2013-08-28 09:26:52 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [3fd7041a188d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3fd7041a188d) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3fd7041a188d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3fd7041a188d)
Changeset description:
Added test for bug #3351.
## Comment 19097
Date: 2013-08-28 09:38:03 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [c4244249cff1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c4244249cff1) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c4244249cff1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c4244249cff1)
Changeset description:
gzerror() does not return NULL in case of no error.
This fixes bug #3351.
## Comment 19098
Date: 2013-08-28 09:38:30 +0200
From: @sjoerdmullender
Fixed.
| gzip'ed files cannot be bulkloaded into DB | https://api.github.com/repos/MonetDB/MonetDB/issues/3351/comments | 0 | 2020-11-30T12:34:05Z | 2024-06-27T12:00:58Z | https://github.com/MonetDB/MonetDB/issues/3351 | 753,441,766 | 3,351 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-08-26 20:52:53 +0200
From: Simon Brodt <<simon.brodt>>
To: clients devs <<bugs-clients>>
Version: 11.21.19 (Jul2015-SP4)
CC: martin.van.dinther, @njnes
Last updated: 2016-10-13 19:42:42 +0200
## Comment 19081
Date: 2013-08-26 20:52:53 +0200
From: Simon Brodt <<simon.brodt>>
The Method int java.sql.Statement.executeUpdate(String sql) returns -1 on INSERT statement. However only a non-begative value (number of affected rows, at least 0) is permitted.
## Comment 19110
Date: 2013-09-02 19:52:40 +0200
From: @grobian
You should have gotten an Exception instead, so that appears to be the real problem to me
## Comment 19111
Date: 2013-09-02 19:55:29 +0200
From: @grobian
I need to have the schema+query here, preferably a jdbc debuglog. Given what you report in $subject, the server might be at fault here actually.
## Comment 24510
Date: 2016-10-13 19:30:36 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset 3fa84d6924a6, made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the monetdb-java repo, refers to this bug.
For complete details, see http://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=3fa84d6924a6
Changeset description:
Add test program for Bug #3350
## Comment 24511
Date: 2016-10-13 19:42:42 +0200
From: Martin van Dinther <<martin.van.dinther>>
Added test program to try to reproduce the problem.
stmt.executeUpdate(sql) returns 1 for INSERT.
On failure it throws a SQLException.
Could NOT reproduce the situation where it returned -1.
Note: I tested with monetdb-jdbc-2.23.jar
Closing the issue.
| int java.sql.Statement.executeUpdate(String sql) returns -1 on INSERT statement | https://api.github.com/repos/MonetDB/MonetDB/issues/3350/comments | 0 | 2020-11-30T12:34:02Z | 2024-06-28T07:19:41Z | https://github.com/MonetDB/MonetDB/issues/3350 | 753,441,734 | 3,350 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-08-22 11:34:40 +0200
From: Robin Cijvat <<robin>>
To: SQL devs <<bugs-sql>>
Version: 11.15.11 (Feb2013-SP3)
CC: @njnes
Last updated: 2013-09-27 13:47:13 +0200
## Comment 19051
Date: 2013-08-22 11:34:40 +0200
From: Robin Cijvat <<robin>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.89 Safari/537.36
Build Identifier:
Instead of showing the left and right result next to each other, the right result is displayed twice next to each other.
Reproducible: Always
### Steps to Reproduce:
Execute the following SQL:
CREATE TABLE test (x int, y int);
insert into test (x, y) VALUES (1, 1);
insert into test (x, y) VALUES (1, 2);
SELECT *
FROM (
SELECT a1.x, a1.y, a2.x, a2.y
FROM (
SELECT *
FROM test
) AS a1 JOIN (
SELECT *
FROM test
) AS a2 ON a1.x = a2.x
) AS t;
### Actual Results:
+------+------+------+------+
| x | y | x | y |
+======+======+======+======+
| 1 | 1 | 1 | 1 |
| 1 | 2 | 1 | 2 |
| 1 | 1 | 1 | 1 |
| 1 | 2 | 1 | 2 |
+------+------+------+------+
### Expected Results:
+------+------+------+------+
| x | y | x | y |
+======+======+======+======+
| 1 | 1 | 1 | 1 |
| 1 | 1 | 1 | 2 |
| 1 | 2 | 1 | 1 |
| 1 | 2 | 1 | 2 |
+------+------+------+------+
Problem is fixed if the columns are given aliases as follows:
SELECT *
FROM (
SELECT a1.x AS x1, a1.y AS y1, a2.x AS x2, a2.y AS y2
FROM (
SELECT *
FROM test
) AS a1 JOIN (
SELECT *
FROM test
) AS a2 ON a1.x = a2.x
) AS t;
## Comment 19053
Date: 2013-08-23 09:44:22 +0200
From: @njnes
Indeed we do not handle the first query correctly as it has ambiguous names.
## Comment 19054
Date: 2013-08-23 10:04:56 +0200
From: Robin Cijvat <<robin>>
Ok, but the syntax of the outer query suggests that everything gets selected that is selected in the inner query, despite the naming of the columns. In the case it is left this way, won't it be a good idea to at least let this sort of construct trigger an error? Otherwise it might lead to confusion or even the usage of wrong query results if someone (like myself) assumes wrong things about these sort of queries.
## Comment 19055
Date: 2013-08-23 10:55:59 +0200
From: @njnes
added an error for duplicate column names
## Comment 19056
Date: 2013-08-23 11:42:02 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [2810a6a4ef0e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2810a6a4ef0e) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2810a6a4ef0e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2810a6a4ef0e)
Changeset description:
fixed bug #3349, ie check for duplicate column names after table level rename.
| When selecting everything from a joined result, column contents are incorrect in one of my use cases. | https://api.github.com/repos/MonetDB/MonetDB/issues/3349/comments | 0 | 2020-11-30T12:33:59Z | 2024-06-27T12:00:56Z | https://github.com/MonetDB/MonetDB/issues/3349 | 753,441,701 | 3,349 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-08-21 15:22:01 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.15.3 (Feb2013-SP1)
CC: @mlkersten, @njnes
Last updated: 2013-09-27 13:47:15 +0200
## Comment 19043
Date: 2013-08-21 15:22:01 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36
Build Identifier:
create table x (a CLOB);
insert into x VALUES ('aapX');
insert into x VALUES ('abc|aapX');
insert into x VALUES ('abc|aap_beer');
select * from x where a like 'abc%'; -- 2 results, as expected
select * from x where a like 'abc|aap%'; -- 2 results, as expected
select * from x where a like 'abc|aap_%'; -- 3 results, expected 1 result
Reproducible: Always
MonetDB 5 server v11.15.12 (64-bit, 64-bit oids)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2013 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 15.6GiB available memory, 8 available cpu cores
Libraries:
libpcre: 8.32 2012-11-30 (compiled with 8.31)
openssl: OpenSSL 1.0.1e 11 Feb 2013 (compiled with OpenSSL 1.0.1e-fips 11 Feb 2013)
libxml2: 2.9.1 (compiled with 2.9.1)
Compiled by: roberto@photon.spinque.com (x86_64-unknown-linux-gnu)
Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code
Linking : /usr/bin/ld -m elf_x86_64
## Comment 19044
Date: 2013-08-21 15:44:53 +0200
From: @mlkersten
Dont forget the '_' is a placeholder for a single arbitrary character
## Comment 19045
Date: 2013-08-21 15:48:38 +0200
From: @swingbit
Oops. Sorry, didn't know that!
## Comment 19046
Date: 2013-08-21 16:11:10 +0200
From: @swingbit
Hold on.
If the way to escape the '_' is as below (which I couldn't find in the documentation, but only in bits of sql code on the web - this should be a bug by itself), then I still don't get the expected result:
create table x (a CLOB);
insert into x VALUES ('aapX');
insert into x VALUES ('abc|aapX');
insert into x VALUES ('abc|aap_beer');
select * from x where a like 'abc|aap_%' escape '_';
+--------------+
| a |
+==============+
| abc|aapX |
| abc|aap_beer |
+--------------+
2 tuples (0.456ms)
The first tuple is wrong.
## Comment 19050
Date: 2013-08-22 11:00:47 +0200
From: @njnes
I think the problem is the handling of the | (or) in this case. I'll have to check sql standard if the | should really behave as such.
## Comment 19052
Date: 2013-08-23 09:31:57 +0200
From: @njnes
fixed, ie the bug was in the handling of '|'. Also the added a test which shows the use of the escape character.
| SQL: LIKE incorrect with _ | https://api.github.com/repos/MonetDB/MonetDB/issues/3348/comments | 0 | 2020-11-30T12:33:57Z | 2024-06-27T12:00:56Z | https://github.com/MonetDB/MonetDB/issues/3348 | 753,441,666 | 3,348 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-08-20 23:26:50 +0200
From: @mlkersten
To: SQL devs <<bugs-sql>>
Version: -- development
CC: alexo15, castro8583bennett, @PedroTadim, @drstmane
Last updated: 2019-12-05 16:39:53 +0100
## Comment 19039
Date: 2013-08-20 23:26:50 +0200
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:23.0) Gecko/20100101 Firefox/23.0
Build Identifier:
Recursive functions are not (yet) recognized by the SQL compiler.
Reproducible: Always
### Steps to Reproduce:
CREATE FUNCTION fibonacci(i integer)
RETURNS integer
BEGIN
if ( i = 0) THEN RETURN 0; END IF;
if ( i = 1) THEN RETURN 1; END IF;
RETURN f(CAST(i-1 AS INTEGER))+f(CAST(i-2 AS INTEGER));
END;
SELECT fibonacci(0);
SELECT fibonacci(1);
SELECT fibonacci(2);
## Comment 19048
Date: 2013-08-21 23:40:23 +0200
From: @drstmane
This is actually a feature request, isn't it?
## Comment 19049
Date: 2013-08-22 07:18:50 +0200
From: @mlkersten
i consider it a bug, because allowing to define a function include dealing with self references during type analysis.
## Comment 26948
Date: 2019-04-04 16:22:17 +0200
From: Alex Ossipov <<alexo15>>
I wanted to bring it on again since it was not fixed and these days MonetDB is missing hierarchical CTE support while MySQL,PostgreSQL implemented it in current versions.
To expand on Martin's post it would be extremely valuable to add this support similar to MySQL:
WITH RECURSIVE fibonacci (n, fib_n, next_fib_n) AS
(
SELECT 1, 0, 1
UNION ALL
SELECT n + 1, next_fib_n, fib_n + next_fib_n
FROM fibonacci WHERE n < 10
)
SELECT * FROM fibonacci;
## Comment 27262
Date: 2019-09-05 17:35:05 +0200
From: Castro B <<castro8583bennett>>
Support for recursive calls seems so basic thing. Wondering why it's not possible with Monet too.
,https://bondereduction.ci
## Comment 27448
Date: 2019-12-05 16:39:53 +0100
From: @PedroTadim
This feature is now supported. Recursive CTEs are requested at bug #6702.
| Recursive SQL functions should be supported | https://api.github.com/repos/MonetDB/MonetDB/issues/3347/comments | 0 | 2020-11-30T12:33:54Z | 2024-06-27T12:00:55Z | https://github.com/MonetDB/MonetDB/issues/3347 | 753,441,639 | 3,347 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-08-20 17:26:15 +0200
From: @drstmane
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 11.15.11 (Feb2013-SP3)
CC: @mlkersten
Last updated: 2013-09-27 13:47:18 +0200
## Comment 19035
Date: 2013-08-20 17:26:15 +0200
From: @drstmane
Created attachment 223
SciQL test script
On my 8-core (4 physical core with hyperthreading, the attached SciQL script finished succesfully in less than 2 seconds (debug build) when run with t = {1,7,8} threads (mserver5 --set gdk_nr_threads=t).
However, when run with t={2,3,4,5,6} threads, the script hangs as several threads --- 3(!) when the server run with 2(!) threads --- hang on the MT_sema_down(&q->s, "q_dequeue"); in dataflow's q_dequeue() function; see also the gdk trace below.
This happens with the latest version of the SciQL-2 branch (changeset c935ec8da74c), but similar (or identical?) behaviour has been observed also with earlier versions, i.e., before the recent re-cast of the worker-pool had been propagated from the Feb2013 branch.
(gdb) thread apply all bt
Thread 8 (Thread 0x7fffea7d7700 (LWP 27115)):
0 0x000000337ce0d6a0 in sem_wait () from /lib64/libpthread.so.0
1 0x00007ffff7903b3b in q_dequeue (q=0x7fffd4003660) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_dataflow.c:210
2 0x00007ffff7905530 in DFLOWscheduler (flow=0x7fffd40035d0) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_dataflow.c:573
3 0x00007ffff7905b33 in runMALdataflow (cntxt=0x628028, mb=0x7fffdc2eed50, startpc=12, stoppc=43, stk=0x7fffd4003e70) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_dataflow.c:653
4 0x00007ffff7aa719f in MALstartDataflow (cntxt=0x628028, mb=0x7fffdc2eed50, stk=0x7fffd4003e70, pci=0x7fffdc526270) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/modules/mal/language.c:136
5 0x00007ffff790083c in runMALsequence (cntxt=0x628028, mb=0x7fffdc2eed50, startpc=1, stoppc=54, stk=0x7fffd4003e70, env=0x7fffdc591100, pcicaller=0x7fffdc5257b0) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_interpreter.c:650
6 0x00007ffff7900c8f in runMALsequence (cntxt=0x628028, mb=0x7fffdc33b810, startpc=38, stoppc=39, stk=0x7fffdc591100, env=0x0, pcicaller=0x0) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_interpreter.c:730
7 0x00007ffff7903f95 in DFLOWworker (t=0x7ffff7f2e028 <workers+8>) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_dataflow.c:301
8 0x000000337ce07d15 in start_thread () from /lib64/libpthread.so.0
9 0x000000337c2f253d in clone () from /lib64/libc.so.6
Thread 7 (Thread 0x7fffea9d8700 (LWP 27114)):
0 0x000000337ce0d6a0 in sem_wait () from /lib64/libpthread.so.0
1 0x00007ffff7903b3b in q_dequeue (q=0x7fffe00037b0) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_dataflow.c:210
2 0x00007ffff7905530 in DFLOWscheduler (flow=0x7fffe0003670) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_dataflow.c:573
3 0x00007ffff7905b33 in runMALdataflow (cntxt=0x628028, mb=0x7fffdc528030, startpc=12, stoppc=43, stk=0x7fffe00040b0) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_dataflow.c:653
4 0x00007ffff7aa719f in MALstartDataflow (cntxt=0x628028, mb=0x7fffdc528030, stk=0x7fffe00040b0, pci=0x7fffdc525390) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/modules/mal/language.c:136
5 0x00007ffff790083c in runMALsequence (cntxt=0x628028, mb=0x7fffdc528030, startpc=1, stoppc=54, stk=0x7fffe00040b0, env=0x7fffdc591100, pcicaller=0x7fffdc56f5b0) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_interpreter.c:650
6 0x00007ffff7900c8f in runMALsequence (cntxt=0x628028, mb=0x7fffdc33b810, startpc=41, stoppc=42, stk=0x7fffdc591100, env=0x0, pcicaller=0x0) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_interpreter.c:730
7 0x00007ffff7903f95 in DFLOWworker (t=0x7ffff7f2e020 <workers>) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_dataflow.c:301
8 0x000000337ce07d15 in start_thread () from /lib64/libpthread.so.0
9 0x000000337c2f253d in clone () from /lib64/libc.so.6
Thread 6 (Thread 0x7fffeabd9700 (LWP 27113)):
0 0x000000337ce0d6a0 in sem_wait () from /lib64/libpthread.so.0
1 0x00007ffff7903b3b in q_dequeue (q=0x7fffdc338b90) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_dataflow.c:210
2 0x00007ffff7905530 in DFLOWscheduler (flow=0x7fffdc2eb7c0) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_dataflow.c:573
3 0x00007ffff7905b33 in runMALdataflow (cntxt=0x628028, mb=0x7fffdc33b810, startpc=21, stoppc=42, stk=0x7fffdc591100) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_dataflow.c:653
4 0x00007ffff7aa719f in MALstartDataflow (cntxt=0x628028, mb=0x7fffdc33b810, stk=0x7fffdc591100, pci=0x7fffdc33e8d0) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/modules/mal/language.c:136
5 0x00007ffff790083c in runMALsequence (cntxt=0x628028, mb=0x7fffdc33b810, startpc=1, stoppc=104, stk=0x7fffdc591100, env=0x7fffdc594120, pcicaller=0x7fffdc582590) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_interpreter.c:650
6 0x00007ffff7900c8f in runMALsequence (cntxt=0x628028, mb=0x7fffdc11d020, startpc=1, stoppc=288, stk=0x7fffdc594120, env=0x7fffdc58bdf0, pcicaller=0x7fffdc2f3cc0) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_interpreter.c:730
7 0x00007ffff7900c8f in runMALsequence (cntxt=0x628028, mb=0x7fffdc313f00, startpc=1, stoppc=0, stk=0x7fffdc58bdf0, env=0x0, pcicaller=0x0) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_interpreter.c:730
8 0x00007ffff78ffd01 in callMAL (cntxt=0x628028, mb=0x7fffdc313f00, env=0x7fffeabd8b48, argv=0x7fffeabd8ba0, debug=0 '\000') at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_interpreter.c:472
9 0x00007fffef073b06 in SQLexecutePrepared (c=0x628028, be=0x7fffdc02b470, q=0x7fffdc2044c0) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/sql/backends/monet5/sql_scenario.c:1888
10 0x00007fffef073f42 in SQLengineIntern (c=0x628028, be=0x7fffdc02b470) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/sql/backends/monet5/sql_scenario.c:1951
11 0x00007fffef0745c7 in SQLengine (c=0x628028) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/sql/backends/monet5/sql_scenario.c:2057
12 0x00007ffff792e12a in runPhase (c=0x628028, phase=4) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_scenario.c:522
13 0x00007ffff792e313 in runScenarioBody (c=0x628028) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_scenario.c:566
14 0x00007ffff792e436 in runScenario (c=0x628028) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_scenario.c:586
15 0x00007ffff792f4a8 in MSserveClient (dummy=0x628028) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_session.c:431
16 0x000000337ce07d15 in start_thread () from /lib64/libpthread.so.0
17 0x000000337c2f253d in clone () from /lib64/libc.so.6
Thread 5 (Thread 0x7fffeadda700 (LWP 27110)):
0 0x000000337c2eb863 in select () from /lib64/libc.so.6
1 0x00007ffff713bb95 in MT_sleep_ms (ms=50) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/gdk/gdk_posix.c:1226
2 0x00007fffef198995 in store_manager () at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/sql/storage/store.c:1593
3 0x00007fffef11806e in mvc_logmanager () at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/sql/server/sql_mvc.c:195
4 0x000000337ce07d15 in start_thread () from /lib64/libpthread.so.0
5 0x000000337c2f253d in clone () from /lib64/libc.so.6
Thread 4 (Thread 0x7fffeafdb700 (LWP 27109)):
0 0x000000337c2eb863 in select () from /lib64/libc.so.6
1 0x00007ffff7aad259 in SERVERlistenThread (Sock=0x1a5cd10) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/modules/mal/mal_mapi.c:209
2 0x000000337ce07d15 in start_thread () from /lib64/libpthread.so.0
3 0x000000337c2f253d in clone () from /lib64/libc.so.6
Thread 3 (Thread 0x7ffff03cb700 (LWP 27108)):
0 0x000000337c2eb863 in select () from /lib64/libc.so.6
1 0x00007ffff713bb95 in MT_sleep_ms (ms=1000) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/gdk/gdk_posix.c:1226
2 0x00007ffff791d9ac in profilerHeartbeat (dummy=0x0) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_profiler.c:1431
3 0x000000337ce07d15 in start_thread () from /lib64/libpthread.so.0
4 0x000000337c2f253d in clone () from /lib64/libc.so.6
Thread 2 (Thread 0x7ffff05cc700 (LWP 27107)):
0 0x000000337c2eb863 in select () from /lib64/libc.so.6
1 0x00007ffff713bb95 in MT_sleep_ms (ms=50) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/gdk/gdk_posix.c:1226
2 0x00007ffff707712c in GDKvmtrim (limit=0x7ffff779ecf8 <GDK_mem_maxsize>) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/gdk/gdk_utils.c:921
3 0x000000337ce07d15 in start_thread () from /lib64/libpthread.so.0
4 0x000000337c2f253d in clone () from /lib64/libc.so.6
Thread 1 (Thread 0x7ffff6b3e840 (LWP 27082)):
0 0x000000337ce0e12d in read () from /lib64/libpthread.so.0
1 0x0000003380e2a3c1 in rl_getc () from /lib64/libreadline.so.6
2 0x0000003380e2abc9 in rl_read_key () from /lib64/libreadline.so.6
3 0x0000003380e15d51 in readline_internal_char () from /lib64/libreadline.so.6
4 0x0000003380e162a5 in readline () from /lib64/libreadline.so.6
5 0x00007ffff791e7d2 in getConsoleInput (c=0x627d40, prompt=0x65ac70 ">", linemode=0, exit_on_error=1) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_readline.c:329
6 0x00007ffff791ed94 in readConsole (cntxt=0x627d40) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_readline.c:473
7 0x00007ffff792f6f2 in MALreader (c=0x627d40) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_session.c:491
8 0x00007ffff792e12a in runPhase (c=0x627d40, phase=0) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_scenario.c:522
9 0x00007ffff792e229 in runScenarioBody (c=0x627d40) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_scenario.c:552
10 0x00007ffff792e436 in runScenario (c=0x627d40) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_scenario.c:586
11 0x00007ffff792f4a8 in MSserveClient (dummy=0x627d40) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/monetdb5/mal/mal_session.c:431
12 0x000000000040367c in main (argc=3, av=0x7fffffffd6c8) at /ufs/manegold/_/Monet/HG/__ANY__/source/MonetDB/tools/mserver/mserver5.c:622
(gdb)
> Attached file: [deadlock.sciql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3346_deadlock.sciql_223) (application/octet-stream, 4253 bytes)
> Description: SciQL test script
## Comment 19036
Date: 2013-08-20 19:54:35 +0200
From: @mlkersten
Yes, there might be a potential deadlock in the following situation. Recall that we have a single pool per session. If we call a function containing a parallel block, then we effectively have reduced the available pool with 1 worker, because the calling MAL instruction is put on hold without releasing the worker thread. After a few calls, all workers may be occupied by handling a MAL function call, putting new instructions in the queue.
## Comment 19037
Date: 2013-08-20 21:22:52 +0200
From: @mlkersten
Situation is re-created with the test BugTracker-2013/Tests/nestedcalls.sql
A related on is BugTracker-2013/Tests/recursive.sql
## Comment 19040
Date: 2013-08-21 08:41:04 +0200
From: @drstmane
Please be aware that the problem exists (also) in the Feb2013 (release) branch (and SciQL-2 branch that is spawned off the Feb2013 branch). --- You added you tests (only) to the default (development) branch.
## Comment 19041
Date: 2013-08-21 08:48:32 +0200
From: @drstmane
Do I understand you correctly, that with "an unfortunate constellation" of nested/recursive MAL function calls --- only if the calling or the called or both functions involve dataflow blocks? ---, all worker threads might become DFLOWscheduler's, and thus there are no threads left to do the actual work (DFLOWworker), and thus, all DFLOWscheduler's wait for the work to be done by no awailable worker threads?
Given that the DFLOWscheduler is not supposed/expected to do much work itself, would it be an option to spawn a new scheduler-thread with each (non-inlined/-inlineable) MAL function call --- only if the calling or the called or both functions involve dataflow blocks? ---, thus keeping the worker threads free to do the "real" work?
## Comment 19042
Date: 2013-08-21 11:39:30 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [98ac58eef94c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=98ac58eef94c) made by Stefan Manegold <Stefan.Manegold@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=98ac58eef94c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=98ac58eef94c)
Changeset description:
revert unintened(?) changes that "slipped in" with changeset [489815265a61](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=489815265a61)
these appear unrelated to fixing bug #3346,
and rather the result of too coarse copy-&-paste
## Comment 19047
Date: 2013-08-21 23:37:05 +0200
From: @drstmane
More exhaustive testing indicates that Martin's fix (changeset [489815265a61](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=489815265a61) ff.) does also work fine with the initial SciQL problem.
Thanks to Martin for the prompt fix and for providing a concise SQL-only test in sql/test/BugTracker-2013/Tests/nestedcalls.sql .
| Deadlock in mal_dataflow's q_dequeue() (SciQL-2 branch) | https://api.github.com/repos/MonetDB/MonetDB/issues/3346/comments | 0 | 2020-11-30T12:33:51Z | 2024-06-27T12:00:54Z | https://github.com/MonetDB/MonetDB/issues/3346 | 753,441,607 | 3,346 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-08-20 02:54:37 +0200
From: Tim H. <<monetdb.bug.reporter>>
To: SQL devs <<bugs-sql>>
Version: 11.15.7 (Feb2013-SP2)
CC: @mlkersten, @njnes, @drstmane
Last updated: 2013-09-27 13:47:16 +0200
## Comment 19031
Date: 2013-08-20 02:54:37 +0200
From: Tim H. <<monetdb.bug.reporter>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36
Build Identifier:
Suppose a "copy binary into <table_name> from ..." command is called such that <table_name> is a valid table and the from clause contains one bat file for every column. If the bat files have mismatched BATcount values, then the import fails with the wrong error message: "table <table_name> not found"
Reproducible: Always
### Steps to Reproduce:
1. Put the attached (to this bug) bat files in /path/to/bat/files/
2. Execute SQL statement:
create table bug (n_nationkey INTEGER,n_regionkey INTEGER);
3. Execute SQL statement:
copy binary into bug from '/path/to/bat/files/n_nationkey.sorted', '/path/to/bat/files/n_regionkey.sorted';
### Actual Results:
table bug not found
### Expected Results:
/path/to/bat/files/n_regionkey.sorted has an incompatible number of rows with the previously-processed file
The issue is in sql.c:mvc_bin_import_table_wrap
if (i!=(pci->retc + 2) && cnt != BATcount(c))
throw(SQL, "sql", "table %s not found", tname);
## Comment 19032
Date: 2013-08-20 02:55:04 +0200
From: Tim H. <<monetdb.bug.reporter>>
Created attachment 221
Binary file referenced in the repro steps
> Attached file: [n_nationkey.sorted](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3345_n_nationkey.sorted_221) (application/octet-stream, 40 bytes)
> Description: Binary file referenced in the repro steps
## Comment 19033
Date: 2013-08-20 02:55:13 +0200
From: Tim H. <<monetdb.bug.reporter>>
Created attachment 222
Binary file referenced in the repro steps
> Attached file: [n_regionkey.sorted](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3345_n_regionkey.sorted_222) (application/octet-stream, 20 bytes)
> Description: Binary file referenced in the repro steps
## Comment 19034
Date: 2013-08-20 07:27:51 +0200
From: @mlkersten
This is a testcase and duplicate of bug #3325
## Comment 19038
Date: 2013-08-20 22:50:39 +0200
From: Tim H. <<monetdb.bug.reporter>>
It's related, but not quite a duplicate of 3325. 3325 doesn't mention the incorrect error message, which is what this bug is about.
## Comment 19057
Date: 2013-08-23 11:42:04 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [7a5b6b8d583d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7a5b6b8d583d) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7a5b6b8d583d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7a5b6b8d583d)
Changeset description:
fixed bug #3345
## Comment 19058
Date: 2013-08-23 11:43:05 +0200
From: @njnes
proper error returned
## Comment 19059
Date: 2013-08-23 12:42:07 +0200
From: @drstmane
Niels,
could you please also checkin the (correct/expected) stable output of the test for this bug?
sql/test/BugTracker-2013/Tests/binary_copy_into.Bug-3345.SQL.py
Thanks!
Stefan
## Comment 19128
Date: 2013-09-04 23:30:55 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [1609eae18f34](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1609eae18f34) made by Stefan Manegold <Stefan.Manegold@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1609eae18f34](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1609eae18f34)
Changeset description:
binary_copy_into.Bug-3345: make test outout independent of local paths/directories
## Comment 19134
Date: 2013-09-05 23:17:12 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [02bf23417cee](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=02bf23417cee) made by Stefan Manegold <Stefan.Manegold@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=02bf23417cee](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=02bf23417cee)
Changeset description:
binary_copy_into.Bug-3345: make test output independent of Windows vs Unix path separators
| copy binary into fails with the wrong error message | https://api.github.com/repos/MonetDB/MonetDB/issues/3345/comments | 0 | 2020-11-30T12:33:49Z | 2024-06-27T12:00:52Z | https://github.com/MonetDB/MonetDB/issues/3345 | 753,441,580 | 3,345 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-08-16 22:52:59 +0200
From: Tim H. <<monetdb.bug.reporter>>
To: SQL devs <<bugs-sql>>
Version: 11.15.7 (Feb2013-SP2)
CC: @mlkersten, @njnes
Last updated: 2013-08-18 16:37:57 +0200
## Comment 19018
Date: 2013-08-16 22:52:59 +0200
From: Tim H. <<monetdb.bug.reporter>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36
Build Identifier:
The callHistory table shows wrong (impossibly large) execute times for statements that finish instantly. For example, a recent "set history=false" call shows an execute time of 867166753. I don't know what the units are, but for any reasonable choice (e.g. milliseconds), this value is too large.
Reproducible: Always
### Steps to Reproduce:
1. Connect as monetdb using mclient
2. Run SQL:
call resetHistory();
set history=true;
set history=false;
select * from queryLog where execute > 100000;
### Actual Results:
(a row is returned)
### Expected Results:
No rows returned
This bug prevents the proper reporting of long-running queries.
## Comment 19019
Date: 2013-08-16 22:57:12 +0200
From: @mlkersten
It is indeed a known initialization problem. The system clock value is read and retained.
The query history mechanism is being replaced in the next feature release.
http://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/QueryHistory
http://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/QueryHistoryNew
## Comment 19024
Date: 2013-08-18 16:37:57 +0200
From: @njnes
won't fix as the feature (is replaced/will be replaced) in the new feature release
| wrong execute times recorded in callHistory table | https://api.github.com/repos/MonetDB/MonetDB/issues/3344/comments | 0 | 2020-11-30T12:33:46Z | 2024-06-28T07:19:40Z | https://github.com/MonetDB/MonetDB/issues/3344 | 753,441,555 | 3,344 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-08-15 11:28:55 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.15.3 (Feb2013-SP1)
CC: @njnes
Last updated: 2013-08-16 16:08:09 +0200
## Comment 19002
Date: 2013-08-15 11:28:55 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36
Build Identifier:
Are variable declarations created within a transaction supposed to survive the rollback?
In the following, I would expect variable a to be un-declared upon rollback:
sql>start transaction;
auto commit mode: off
sql>declare a integer;
operation successful (0.294ms)
sql>rollback;
auto commit mode: on
sql>start transaction;
auto commit mode: off
sql>declare a integer;
Variable 'a' already declared
Reproducible: Always
$ mserver5 --version
MonetDB 5 server v11.15.12 (64-bit, 64-bit oids)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2013 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 15.6GiB available memory, 8 available cpu cores
Libraries:
libpcre: 8.31 2012-07-06 (compiled with 8.31)
openssl: OpenSSL 1.0.1e 11 Feb 2013 (compiled with OpenSSL 1.0.1e-fips 11 Feb 2013)
libxml2: 2.9.1 (compiled with 2.9.1)
Compiled by: roberto@photon.spinque.com (x86_64-unknown-linux-gnu)
Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code
Linking : /usr/bin/ld -m elf_x86_64
## Comment 19010
Date: 2013-08-16 15:59:37 +0200
From: @njnes
The scope of a declared variable at the toplevel is your clients session, ie not a single transaction
## Comment 19011
Date: 2013-08-16 16:08:09 +0200
From: @swingbit
Alright, my bad then.
| Variable declared within a transaction survives rollback | https://api.github.com/repos/MonetDB/MonetDB/issues/3343/comments | 0 | 2020-11-30T12:33:44Z | 2024-06-28T07:19:40Z | https://github.com/MonetDB/MonetDB/issues/3343 | 753,441,520 | 3,343 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-08-15 00:53:49 +0200
From: Tim H. <<monetdb.bug.reporter>>
To: SQL devs <<bugs-sql>>
Version: 11.15.7 (Feb2013-SP2)
CC: @njnes
Last updated: 2013-09-27 13:47:13 +0200
## Comment 19001
Date: 2013-08-15 00:53:49 +0200
From: Tim H. <<monetdb.bug.reporter>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0
Build Identifier:
There is no sys.median function overload for the decimal type, so calling select on sys.median on a decimal column causes MonetDB to try to find an automatic conversion. Unfortunately it chooses tinyint instead of decimal for the conversion, and the query fails at runtime.
Reproducible: Always
### Steps to Reproduce:
1. Connect as user monetdb in mclient
2. Run the following commands
create table part (p_partkey integer not null, p_name varchar(55) not null, p_mfgr char(25) not null, p_brand char(10) not null, p_type varchar(25) not null, p_size integer not null, p_container char(10) not null, p_retailprice decimal(12,2) not null, p_comment varchar(23) not null);
copy 5 records into part from stdin;
1|goldenrod lavender spring chocolate lace|Manufacturer1|Brand13|PROMO BURNISHED COPPER|7|JUMBO PKG|901.00|ly. slyly ironi|
2|maroon sky cream royal snow|Manufacturer1|Brand13|LARGE BRUSHED BRASS|1|LG CASE|902.00|lar accounts amo|
3|brown blue puff midnight black|Manufacturer4|Brand42|STANDARD POLISHED BRASS|21|WRAP CASE|903.00|egular deposits hag|
4|orange goldenrod peach misty seashell|Manufacturer3|Brand34|SMALL PLATED BRASS|14|MED DRUM|904.00|p furiously r|
5|midnight linen almond tomato plum|Manufacturer3|Brand32|STANDARD POLISHED TIN|15|SM PKG|905.00| wake carefully |
select sys.median(cast (p_retailprice as double)) from part;
select sys.median(p_retailprice) from part;
### Actual Results:
value (901) exceeds limits of type bte
### Expected Results:
+--------------------------+
| L1 |
+==========================+
| 903 |
+--------------------------+
The issue is in the _rel_aggr function in rel_select.c. After not finding an exact match for sys.median(decimal), the code calls sql_find_aggr. This returns only one sys.median definition (there are 10), which is the sys.median defined for tinyint.
## Comment 19027
Date: 2013-08-18 23:05:14 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [46f634cbe540](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=46f634cbe540) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=46f634cbe540](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=46f634cbe540)
Changeset description:
fixed bug #3342, ie cast a numeric up when a direct aggregation function isn't found.
## Comment 19028
Date: 2013-08-18 23:08:03 +0200
From: @njnes
fixed, when a direct aggregation function is missing we now cast numerics to a super type.
| incorrect automatic cast from decimal to tinyint | https://api.github.com/repos/MonetDB/MonetDB/issues/3342/comments | 0 | 2020-11-30T12:33:41Z | 2024-06-27T12:00:49Z | https://github.com/MonetDB/MonetDB/issues/3342 | 753,441,501 | 3,342 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-08-12 23:51:32 +0200
From: Tim H. <<monetdb.bug.reporter>>
To: GDK devs <<bugs-common>>
Version: 11.15.7 (Feb2013-SP2)
CC: @njnes
Last updated: 2013-09-27 13:47:13 +0200
## Comment 18993
Date: 2013-08-12 23:51:32 +0200
From: Tim H. <<monetdb.bug.reporter>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36
Build Identifier:
mserver5 segfaults when I do the following in the same database session: create a table, load it with data and then issue a query that uses rank().
Reproducible: Always
### Steps to Reproduce:
1. Build and install monet from the source tarball
2. In bash run mserver5 with no arguments
3. Start an mclient session with the default database 'demo' and the monetdb user.
4. Run the following commands in the same mclient session (I will attach the referenced files to this bug):
drop table orders;
\< /path/to/orders.sql
copy into "orders" from '/path/to/orders.tbl';
select rank() over(partition by o_custkey) from orders;
### Actual Results:
connection terminated
### Expected Results:
+----------------+
| rank_o_custkey |
+================+
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
+----------------+
This problem does not reproduce if I kill and re-run mserver5 after the orders table is loaded.
gdb trace:
(gdb) where
0 0x00007ffff750b2b0 in lngCmp () from /deploy/lib/libbat.so.9
1 0x00007ffff75225c9 in GDKqsort_impl_any () from /deploy/lib/libbat.so.9
2 0x00007ffff75251f9 in GDKqsort () from /deploy/lib/libbat.so.9
3 0x00007ffff74a7c99 in do_sort () from /deploy/lib/libbat.so.9
4 0x00007ffff74a83e9 in BATsubsort () from /deploy/lib/libbat.so.9
5 0x00007ffff7bd6438 in ALGsubsort33 () from /deploy/lib/libmonetdb5.so.14
6 0x00007ffff7bd6608 in ALGsubsort13 () from /deploy/lib/libmonetdb5.so.14
7 0x00007ffff7b24c6b in runMALsequence () from /deploy/lib/libmonetdb5.so.14
8 0x00007ffff7b26a2e in DFLOWworker () from /deploy/lib/libmonetdb5.so.14
9 0x00000034ee007851 in start_thread (arg=0x7fffefb8c700) at pthread_create.c:301
10 0x00000034ed4e811d in clone () from /lib64/libc.so.6
## Comment 18994
Date: 2013-08-12 23:52:39 +0200
From: Tim H. <<monetdb.bug.reporter>>
Created attachment 218
SQL file referenced in the repro steps
> Attached file: [orders.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3341_orders.sql_218) (application/octet-stream, 303 bytes)
> Description: SQL file referenced in the repro steps
## Comment 18995
Date: 2013-08-12 23:53:10 +0200
From: Tim H. <<monetdb.bug.reporter>>
Created attachment 219
Data file referenced in the repro steps
> Attached file: [orders.tbl](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3341_orders.tbl_219) (application/octet-stream, 3226 bytes)
> Description: Data file referenced in the repro steps
## Comment 19008
Date: 2013-08-16 15:48:03 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [bce79e07ae3a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bce79e07ae3a) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bce79e07ae3a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bce79e07ae3a)
Changeset description:
fixed bug #3341 instead of 3441
## Comment 19009
Date: 2013-08-16 15:48:45 +0200
From: @njnes
fixed, ie don't sort allready sorted void columns
| segfault caused by select rank() on a newly-loaded table | https://api.github.com/repos/MonetDB/MonetDB/issues/3341/comments | 0 | 2020-11-30T12:33:39Z | 2024-06-27T12:00:48Z | https://github.com/MonetDB/MonetDB/issues/3341 | 753,441,472 | 3,341 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-08-12 13:17:19 +0200
From: @grobian
To: SQL devs <<bugs-sql>>
Version: 11.15.11 (Feb2013-SP3)
CC: @njnes
Last updated: 2019-01-09 11:49:53 +0100
## Comment 18989
Date: 2013-08-12 13:17:19 +0200
From: @grobian
sql>select "function", (sum(fv.claim_tb) - sum(fv.used_tb)) * 100 / toc.total_overcapacity from sys.filer_volumes as fv, (select sum(claim_tb) - sum(used_tb) as total_overcapacity from sys.filer_volumes) as toc group by fv."function" order by fv."function";
MAPI = (monetdb) /tmp/.s.monetdb.52100
ACTION= read_line
QUERY = select "function", (sum(fv.claim_tb) - sum(fv.used_tb)) * 100 / toc.total_overcapacity from sys.filer_volumes as fv, (select sum(claim_tb) - sum(used_tb) as total_overcapacity from sys.filer_volumes) as toc group by fv."function" order by fv."function";
ERROR = !Connection terminated
Welcome to mclient, the MonetDB/SQL interactive terminal (Feb2013-c94f47b62764)
Database: MonetDB v11.15.8 (Feb2013-c94f47b62764), 'mapi:monetdb://gaia.local:52100/filerdata'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>\d sys.filer_volumes
CREATE TABLE "sys"."filer_volumes" (
"filer" VARCHAR(256) NOT NULL,
"volume" VARCHAR(256) NOT NULL,
"claim_tb" INTEGER,
"used_tb" INTEGER,
"used_perc" SMALLINT,
"function" VARCHAR(24),
CONSTRAINT "filer_volumes_filer_volume_pkey" PRIMARY KEY ("filer", "volume")
);
sql>
merovingian.log:
2013-08-12 09:20:04 MSG filerdata[74564]: arguments: /Users/fgroffen/develop/Mon
etDB/Feb2013/program-x86_64/bin/mserver5 --dbpath=/Users/fgroffen/develop/MonetD
B/monetdb-dbfarms/Feb2013-52100/filerdata --set merovingian_uri=mapi:monetdb://g
aia.local:52100/filerdata --set mapi_open=false --set mapi_port=0 --set mapi_uso
ck=/Users/fgroffen/develop/MonetDB/monetdb-dbfarms/Feb2013-52100/filerdata/.mapi
.sock --set monet_vault_key=/Users/fgroffen/develop/MonetDB/monetdb-dbfarms/Feb2
013-52100/filerdata/.vaultkey --set gdk_nr_threads=4 --set max_clients=64 --set
sql_optimizer=default_pipe --set monet_daemon=yes
2013-08-12 09:20:04 MSG filerdata[74564]: MonetDB 5 server v11.15.8 "Feb2013-c
94f47b62764"
2013-08-12 09:20:04 MSG filerdata[74564]: Serving database 'filerdata', using
4 threads
2013-08-12 09:20:04 MSG filerdata[74564]: Compiled for x86_64-apple-darwin11/6
4bit with 64bit OIDs dynamically linked
2013-08-12 09:20:04 MSG filerdata[74564]: Found 8.000 GiB available main-memor
y.
2013-08-12 09:20:04 MSG filerdata[74564]: Copyright (c) 1993-July 2008 CWI.
2013-08-12 09:20:04 MSG filerdata[74564]: Copyright (c) August 2008-2013 Monet
DB B.V., all rights reserved
2013-08-12 09:20:04 MSG filerdata[74564]: Visit http://www.monetdb.org/ for further information
2013-08-12 09:20:04 MSG filerdata[74564]: Listening for UNIX domain connection requests on mapi:monetdb:///Users/fgroffen/develop/MonetDB/monetdb-dbfarms/Feb2013-52100/filerdata/.mapi.sock
2013-08-12 09:20:04 MSG filerdata[74564]: MonetDB/JAQL module loaded
2013-08-12 09:20:04 MSG filerdata[74564]: MonetDB/SQL module loaded
2013-08-12 13:09:13 ERR filerdata[74564]: Assertion failed: (0), function rel2bin_project, file /Users/fgroffen/develop/MonetDB/Feb2013/hgrepo/sql/backends/monet5/rel_bin.c, line 2310.
2013-08-12 13:09:13 MSG filerdata[74564]: could not find toc.total_overcapacity
2013-08-12 13:09:13 MSG filerdata[74564]: fv.function
2013-08-12 13:09:13 MSG filerdata[74564]: fv.L3
2013-08-12 13:09:13 MSG filerdata[74564]: fv.L4
2013-08-12 13:09:13 MSG filerdata[74564]: fv.function
2013-08-12 13:09:18 MSG merovingian[74552]: database 'filerdata' (74564) was killed by signal SIGABRT
It's really toy data:
sql>select count(*) from sys.filer_volumes;
+------+
| L1 |
+======+
| 192 |
+------+
1 tuple (0.882ms)
sql>select * from sys.filer_volumes limit 4;
+----------------+-----------+----------+---------+-----------+----------+
| filer | volume | claim_tb | used_tb | used_perc | function |
+================+===========+==========+=========+===========+==========+
| filer-1 | X/ | 63 | 62 | 99 | size |
| filer-2 | Y/ | 62 | 62 | 99 | size |
| filer-3 | A/ | 61 | 23 | 38 | size |
| filer-4 | B/ | 28 | 23 | 83 | size |
+----------------+-----------+----------+---------+-----------+----------+
4 tuples (1.864ms)
## Comment 18999
Date: 2013-08-14 20:56:19 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [3e860a8ce292](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3e860a8ce292) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3e860a8ce292](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3e860a8ce292)
Changeset description:
fixed bug #3340. Cannot use non-groupby columns after groupby.
## Comment 19000
Date: 2013-08-14 21:16:54 +0200
From: @njnes
fixed. You cannot use columns (of the inner query) after the groupby.
## Comment 26783
Date: 2019-01-09 11:49:53 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [fa366cd68200](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fa366cd68200) 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=fa366cd68200](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=fa366cd68200)
Changeset description:
We will approve bug #6608 error messages (same issue as in bug #3340).
| crash on seeming incorrect SQL query | https://api.github.com/repos/MonetDB/MonetDB/issues/3340/comments | 0 | 2020-11-30T12:33:36Z | 2024-06-27T12:00:47Z | https://github.com/MonetDB/MonetDB/issues/3340 | 753,441,442 | 3,340 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-08-11 15:48:27 +0200
From: @mlkersten
To: SQL devs <<bugs-sql>>
Version: 11.15.7 (Feb2013-SP2)
CC: @njnes
Last updated: 2013-11-19 10:18:37 +0100
## Comment 18988
Date: 2013-08-11 15:48:27 +0200
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:22.0) Gecko/20100101 Firefox/22.0
Build Identifier:
A segvault occurs
327 rel->nrcols = l->nrcols;
(gdb) where
0 0x00007f23e917b9c8 in rel_groupby (sql=0x7f23dc005470, l=0x0, groupbyexps=0x0) at /export/scratch1/mk/sciql//package/sql/server/rel_select.c:1327
1 0x00007f23e918e10a in rel_value_exp2 (sql=0x7f23dc005470, rel=0x7f23e3ffe990, se=0x7f23dc1b0090, f=2, ek=..., is_last=0x7f23e3ffe89c)
at /export/scratch1/mk/sciql//package/sql/server/rel_select.c:5456
Test file added as BugTracker-2013/Tests/pivot.Bug-*.sql
Reproducible: Always
## Comment 19022
Date: 2013-08-18 16:34:57 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [2f5e9233e51a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2f5e9233e51a) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2f5e9233e51a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2f5e9233e51a)
Changeset description:
fixed bug #3339, we do not allow multiple values /rows as arguments for table returning functions.
## Comment 19023
Date: 2013-08-18 16:35:37 +0200
From: @njnes
fixed, we disallow multiple inputs into table returning funciions
## Comment 19345
Date: 2013-11-19 10:18:37 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [f10e5c3dbf41](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f10e5c3dbf41) made by Stefan Manegold <Stefan.Manegold@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f10e5c3dbf41](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f10e5c3dbf41)
Changeset description:
pivot.Bug-3339: provided stable output; NEEDS TO BE CHECKED/FIXED
(having tests without correct/expected stable output
IMHO does not make much sense ...)
| Segvault in complex function call | https://api.github.com/repos/MonetDB/MonetDB/issues/3339/comments | 0 | 2020-11-30T12:33:34Z | 2024-06-27T12:00:46Z | https://github.com/MonetDB/MonetDB/issues/3339 | 753,441,409 | 3,339 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-08-09 11:39:01 +0200
From: Freek van Dooren <<f.van.dooren>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @drstmane
Last updated: 2019-01-21 17:07:51 +0100
## Comment 18986
Date: 2013-08-09 11:39:01 +0200
From: Freek van Dooren <<f.van.dooren>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:22.0) Gecko/20100101 Firefox/22.0
Build Identifier:
For our application it would be preferred to lock a table when updating or inserting so as to prevent end users from reading from the same tables whilst doing this. The reading of the tables should fail instead of the updating, however there is no control over timing of these events, since reading and updating are done from applications on different (virtual) servers on the same database. Updates on multiple tables are necessary for correct data insertion it is our conclusion that locking of entire tables is the best solution.
Perhaps this has already been implemented in a newer version of MonetDB, although I have found no evidence for this on monetdb.org. We are currently in the process of upgrading to the latest version (11.15.11).
Reproducible: Always
## Comment 18987
Date: 2013-08-09 12:43:03 +0200
From: @drstmane
For the time being --- and that is unlikely to change in the near future, if at all ---, MonetDB uses optimistic concurrency control. I.e., instead of blocking (potentially) conflicting concurrent transactions using locks, the server will, once a conflict occurs, abort (n-1) of n conflicting transactions and notify the respective applications accordingly. It's up to the application(s) to handle these aborts and "hide" them from the end-user where applicable / desirable.
## Comment 26826
Date: 2019-01-21 17:07:51 +0100
From: @sjoerdmullender
If only a single client is updating a table in a transaction, all other read-only transactions should (already) be able to go ahead without error.
You can use multi-query transactions if you want to guarantee consistent data if there may be concurrent update queries. If you're using multi-query read-only transactions, you could even end those with ROLLBACK instead of COMMIT to make sure other transactions are not affected.
Closing this with WONTFIX since we're not likely to implement table locking.
| Lock Table | https://api.github.com/repos/MonetDB/MonetDB/issues/3338/comments | 0 | 2020-11-30T12:33:32Z | 2024-06-28T13:40:13Z | https://github.com/MonetDB/MonetDB/issues/3338 | 753,441,381 | 3,338 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-08-08 21:49:33 +0200
From: Dieter <<mayerd>>
To: clients devs <<bugs-clients>>
Version: 11.15.11 (Feb2013-SP3)
CC: mayerd
Last updated: 2013-09-27 13:47:15 +0200
## Comment 18983
Date: 2013-08-08 21:49:33 +0200
From: Dieter <<mayerd>>
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; MALC)
Build Identifier:
Accessing MonetDB database (Fedora) via "OLEDB-Provider for ODBC" (Windows7) the application gets wrong column data because of wrong schema information for the columns in the result set.
When querying the table via Excel the output is displayed right, because Excel doesn't care about correct schema information, but requests all column data in WCHAR-Format from ODBC. Therefore the DECIMAL column and the VARCHAR column are obviously both in the right. But this is a implementation of Microsoft knowing that there were many careless implemented ODBC drivers in ealier years.
But any other application depends on correct schema information from the ODBC driver and that seems to be the reason why they get the wrong column data from the MonetDB ODBC driver. You can check it with a simple VB Script on Windows 7.
When accessing data with Visual Basic by using ADO, the "Microsoft OLEB-Provider for ODBC" strongly relies on this and also gets the wrongly coded data. A test script "monetDB.vbs" is attached. Here we can see that the schema information is not as expected by the standard.
Reproducible: Always
### Steps to Reproduce:
1.create table voc.customer
( cname varchar(100),
sales decimal(15, 2) );
2. Then I imported following customer.csv (in UTF-8 format):
"cname";"sales"
"Müller Österreich - Polish: ońśłąęóźż";50.78
with:
COPY 1 OFFSET 2 RECORDS INTO voc.customer from '/home/aruba/customer.csv' USING DELIMITERS ';','\r\n', '"' NULL as '' ;
3. select * from customer;
### Actual Results:
cname sales
---------------------------------------------- -------
Müller Österreich - Polish: ońśłąęóźż 50
### Expected Results:
cname sales
---------------------------------------------- -------
Müller Österreich - Polish: ońśłąęóźż 50,78
A test script "monetDB.vbs" is attached. Executing this with double-click on Windows we can see that the schema information is not as expected by the standard.
It gives us:
- for column cname the Type=129 char (but you store a NVARCHAR)
- for column sales the Precision 15 and Scale also 15 (should 2 in our case)
"cname" should be given as NVARCHAR in SQL-term, that means Type 202=adVarWChar out of the ODBC driver
and
"sales" should be given as DECIMAL with Precision 15 and Scale 2 together with Type 14 or 131 out of the ODBC driver
I would expect that if the schema information given by the Monet ODBC driver (for Windows) to the application will be corrected, that the described problems are solved.
## Comment 18984
Date: 2013-08-08 21:52:39 +0200
From: Dieter <<mayerd>>
Created attachment 215
MonetDB.vbs Testscript for retrieving column/schema inf.
> Attached file: [monetDB.vbs](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3337_monetDB.vbs_215) (application/octet-stream, 4128 bytes)
> Description: MonetDB.vbs Testscript for retrieving column/schema inf.
## Comment 18985
Date: 2013-08-08 22:02:18 +0200
From: Dieter <<mayerd>>
The Testscript should be slightly changed if using another System DSN as "MonetDB" on Windows and other user ("voc") pw ("voc") for my "voc" database.
The output file Schema.txt will be created in folder c:\temp.
So make shure it exists before executing the script.
## Comment 19079
Date: 2013-08-26 16:42:24 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [523e5550df9d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=523e5550df9d) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=523e5550df9d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=523e5550df9d)
Changeset description:
Fix for part of bug #3337: return proper value for decimal_digits in SQLcolumns().
## Comment 19087
Date: 2013-08-27 15:12:01 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [ae491bc2025a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ae491bc2025a) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ae491bc2025a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ae491bc2025a)
Changeset description:
Inside the ODBC driver, treat server's character data as wide characters.
This solves another part of bug #3337: the string data is now displayed
correctly.
## Comment 19088
Date: 2013-08-27 15:12:03 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [a6d834db6449](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a6d834db6449) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a6d834db6449](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a6d834db6449)
Changeset description:
Initialize precision and scale information with data from server.
This fixes part of bug #3337: the decimal value is now displayed in full.
## Comment 19089
Date: 2013-08-27 15:20:24 +0200
From: @sjoerdmullender
Most of the issues reported have been fixed.
However, one difference with the expected output remains. The type reported for the cnames column is now 130 (adWChar) and not 202 (adVarWChar). Why, I don't know. The column is now reported as being of type SQL_WVARCHAR, but something somewhere doesn't translate that to adVarWChar, but to adWChar.
## Comment 19092
Date: 2013-08-27 21:31:59 +0200
From: Dieter <<mayerd>>
Hi Sjoerd,
thanks for your really engaged efforts. I'd like to test your corrections.
When do you expect to publish the next release of MonetDB with these changes?
Or would you recommend to compile the changed sources by myself? (Today I dont have any experience to do a compile and make with your source distribution).
Kind regards, Dieter
## Comment 19093
Date: 2013-08-27 22:03:20 +0200
From: @sjoerdmullender
Depending on your platform, I could give you a precompiled version.
So, what is your platform?
## Comment 19094
Date: 2013-08-27 22:29:44 +0200
From: Dieter <<mayerd>>
I am using the MonetDb ODBC driver on Windows 7 64bit.
Can you supply a non-debug (release compiled) version because of best runtime performance with a short explanation what I must do to install it.
## Comment 19095
Date: 2013-08-28 09:11:26 +0200
From: @sjoerdmullender
(In reply to comment 9)
> I am using the MonetDb ODBC driver on Windows 7 64bit.
> Can you supply a non-debug (release compiled) version because of best
> runtime performance with a short explanation what I must do to install it.
I'll send a mail off-list with instructions.
## Comment 19137
Date: 2013-09-06 15:31:28 +0200
From: @sjoerdmullender
Things seem to work.
| Monet ODBC gives wrong schema information | https://api.github.com/repos/MonetDB/MonetDB/issues/3337/comments | 0 | 2020-11-30T12:33:29Z | 2024-06-27T12:00:44Z | https://github.com/MonetDB/MonetDB/issues/3337 | 753,441,349 | 3,337 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-08-08 10:27:52 +0200
From: @hannesmuehleisen
To: SQL devs <<bugs-sql>>
Version: -- development
CC: akkaran046, barrysingh103, @njnes
Last updated: 2020-03-12 09:38:02 +0100
## Comment 18981
Date: 2013-08-08 10:27:52 +0200
From: @hannesmuehleisen
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.41 Safari/537.36
Build Identifier:
Truncating tables is an everyday operation. Ideally, if all rows are removed (and certainly if the table is dropped), the related files on disk should also be removed. However, this seems to be not the case. In effect, there is currently no way of truncating a table without using the following workaround:
create table sometable_copy as select * from sometable with no data;
drop table sometable;
create table sometable as select * from sometable_copy with no data;
Reproducible: Always
### Steps to Reproduce:
1. create and start new database
2. create table
3. copy data into table
4. delete from table
5. restart DB
6. observe BAT files as reported by storage(), they are still present
### Actual Results:
BAT files are still present and at their original size
### Expected Results:
BAT files would be either gone or empty
monetdb create sstest
monetdb release sstest
mclient sstest -s "create table starships(class string, speed int, flux int);"
mclient sstest -s "copy into sys.starships from '/export/scratch2/hannes/starships/starships.csv.noheader' using delimiters ',','\r\n';"
mclient sstest -s "select "location","count" from storage() where \"table\"='starships';"
+----------+----------+
| location | count |
+==========+==========+
| 04/453 | 68399658 |
| 04/460 | 68399658 |
| 04/461 | 68399658 |
+----------+----------+
3 tuples
ls sstest/bat/04/460.tail -lh
-rw------- 1 hannes da 261M Aug 8 10:14 sstest/bat/04/460.tail
okay, files are there and big, now let's delete the rows
mclient sstest -s "delete from starships;"
mclient sstest -s "select "location","count" from storage() where \"table\"='starships';"
+----------+-------+
| location | count |
+==========+=======+
| 04/453 | 0 |
| 04/460 | 0 |
| 04/461 | 0 |
+----------+-------+
3 tuples
file remains with original size
ls sstest/bat/04/460.tail -lh
-rw------- 1 hannes da 261M Aug 8 10:14 sstest/bat/04/460.tail
drop the table
mclient sstest -s "drop table starships;"
mclient sstest -s "select "location","count" from storage() where \"table\"='starships';"
+----------+-------+
| location | count |
+==========+=======+
+----------+-------+
0 tuples
file *still* remains
ls sstest/bat/04/460.tail -lh
-rw------- 1 hannes da 261M Aug 8 10:14 sstest/bat/04/460.tail
also remains after db is stopped
monetdb stop sstest
ls sstest/bat/04/460.tail -lh
-rw------- 1 hannes da 261M Aug 8 10:14 sstest/bat/04/460.tail
file is removed after db is restarted
monetdb start sstest
ls sstest/bat/04/460.tail -lh
ls: cannot access sstest/bat/04/460.tail: No such file or directory
now let's see if the file also is removed after only a DELETE FROM table
create, start, create table and copy into as above
mclient sstest -s "select "location","count" from storage() where \"table\"='starships';"
+----------+----------+
| location | count |
+==========+==========+
| 04/453 | 68399658 |
| 04/460 | 68399658 |
| 04/461 | 68399658 |
+----------+----------+
3 tuples
ls sstest/bat/04/460.tail -lh
-rw------- 1 hannes da 261M Aug 8 10:20 sstest/bat/04/460.tail
okay
mclient sstest -s "select "location","count" from storage() where \"table\"='starships';"
+----------+-------+
| location | count |
+==========+=======+
| 04/453 | 0 |
| 04/460 | 0 |
| 04/461 | 0 |
+----------+-------+
3 tuples
file again remains
ls sstest/bat/04/460.tail -lh
-rw------- 1 hannes da 261M Aug 8 10:20 sstest/bat/04/460.tail
also after stopping the server
monetdb stop sstest
ls sstest/bat/04/460.tail -lh
-rw------- 1 hannes da 261M Aug 8 10:20 sstest/bat/04/460.tail
restart server
monetdb start sstest
mclient sstest -s "select "location","count" from storage() where \"table\"='starships';"
+----------+-------+
| location | count |
+==========+=======+
| 04/453 | 0 |
| 04/460 | 0 |
| 04/461 | 0 |
+----------+-------+
3 tuples
file is still there with original size
ls sstest/bat/04/460.tail -lh
-rw------- 1 hannes da 261M Aug 8 10:20 sstest/bat/04/460.tail
## Comment 19060
Date: 2013-08-23 13:25:14 +0200
From: @njnes
seems fixed after truncating of cached heaps. Were can I find the test files?
## Comment 19061
Date: 2013-08-23 13:29:41 +0200
From: @hannesmuehleisen
CSV file is at http://homepages.cwi.nl/~hannes/starships.csv.noheader.bz2
## Comment 19064
Date: 2013-08-23 16:17:26 +0200
From: @njnes
added a test in benchmarks/tpch/fileleak. This shows indeed that the current HEAPshrink fixes this.
## Comment 26768
Date: 2018-12-31 07:14:12 +0100
From: martin garix <<akkaran046>>
Download mozilla firefox latest version,this is batter search browser then more,i am sure you felling very well https://foxdownload.org i have giving the 4 star this game,now looking here,and using the one of the simple method.
| DB files not removed if all rows are deleted, even after restart | https://api.github.com/repos/MonetDB/MonetDB/issues/3336/comments | 0 | 2020-11-30T12:33:27Z | 2024-06-27T12:00:43Z | https://github.com/MonetDB/MonetDB/issues/3336 | 753,441,322 | 3,336 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-08-07 15:53:32 +0200
From: @mlkersten
To: SQL devs <<bugs-sql>>
Version: -- development
CC: martin.van.dinther, @njnes
Last updated: 2019-12-05 17:44:10 +0100
## Comment 18978
Date: 2013-08-07 15:53:32 +0200
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:22.0) Gecko/20100101 Firefox/22.0
Build Identifier:
Column constraints should lead to a transaction abort and a proper error message.
Reproducible: Always
### Steps to Reproduce:
create table ary(x integer check(x >0 and x <2));
insert into ary values(1);
insert into ary values(0);
insert into ary values(2);
insert into ary values(-1);
insert into ary values(3);
drop table ary;
### Expected Results:
Transaction abort message
Added as test case
## Comment 19138
Date: 2013-09-06 15:37:18 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [29124fc819a5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=29124fc819a5) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=29124fc819a5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=29124fc819a5)
Changeset description:
Added test for bug #3335.
## Comment 19210
Date: 2013-09-30 10:36:13 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [9035bcb21e62](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9035bcb21e62) made by Stefan Manegold <Stefan.Manegold@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9035bcb21e62](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9035bcb21e62)
Changeset description:
check-constraint.Bug-3335: fixed expected stable output
## Comment 19211
Date: 2013-09-30 10:39:08 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [798a080e3bee](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=798a080e3bee) made by Stefan Manegold <Stefan.Manegold@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=798a080e3bee](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=798a080e3bee)
Changeset description:
constraint_checking.Bug_3335: removed redundant test;
see also sql/test/BugTracker-2013/Tests/check-constraint.Bug-3335.*
## Comment 27453
Date: 2019-12-05 17:44:10 +0100
From: Martin van Dinther <<martin.van.dinther>>
CHECK column constraint clause is no longer allowed as of Nov2019 release.
So SQL statement:
create table ary(x integer check(x >0 and x <2));
will now fail with error:
CONSTRAINT CHECK: check constraints not supported
See: [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=7c11c29d7774](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=7c11c29d7774)
See also bug #3568 comment 4.
| Constraint checking without error reporting | https://api.github.com/repos/MonetDB/MonetDB/issues/3335/comments | 0 | 2020-11-30T12:33:24Z | 2024-06-27T12:00:42Z | https://github.com/MonetDB/MonetDB/issues/3335 | 753,441,297 | 3,335 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-08-07 09:44:12 +0200
From: @drstmane
To: GDK devs <<bugs-common>>
Version: 11.15.11 (Feb2013-SP3)
Last updated: 2013-09-27 17:03:11 +0200
## Comment 18977
Date: 2013-08-07 09:44:12 +0200
From: @drstmane
Since recent changes, most probably changeset [3b88af94c574](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3b88af94c574) test sql/test/pg_regress/Tests/load fails on 32-bit systems, only, with, e.g.,
QUERY = COPY INTO hash_name_heap FROM '/Volumes/scratch/monet/GNU-Darwin-i386-propcheck-eb30bdbf91d9-Feb2013/MonetDB/sql/test/pg_regress/data/hash.data' USING DELIMITERS '\t', '\n';
ERROR = !value from line 3332 field 2 not inserted: !ERROR: HEAPextend: failed to extend to 2151677952 for 15/1574.tail: MT_mremap() failed
!failed to import table
cf.,
http://monetdb.cwi.nl/testweb/web/testgrid.php?serial=48384:eb30bdbf91d9&order=platform,arch,compiler&targets=GNU-Darwin-i386-propcheck,GNU-Darwin-powerpc-propcheck,GNU-Darwin-x86_64-oid32,GNU-Darwin-x86_64,GNU-Fedora-x86_64-assert-propcheck,GNU-Fedora-x86_64-dbfarm,GNU-Fedora-x86_64-oid32-assert-propcheck,GNU-Fedora-x86_64-oid32-dbfarm,GNU-Fedora-x86_64-thrs=1-assert,GNU-Fedora-x86_64-thrs=1-propcheck-dist,GNU-Fedora-x86_64-thrs=32-propcheck-rpm,GNU-Fedora-x86_64-thrs=53-assert,GNU-FreeBSD-x86_64,GNU-Gentoo-powerpc-assert-dbfarm,GNU-Solaris-sparc-dbfarm,GNU-Solaris-sparcv9-dbfarm,GNU-Solaris-sparcv9-oid32-dbfarm,GNU-Ubuntu-i386-dbfarm,Int-Fedora-x86_64-assert,Int-Fedora-x86_64-oid32-assert,Int-Fedora-x86_64-oid32-propcheck,Int-Fedora-x86_64-propcheck,Int-Windows7-x86_64-assert,Int-Windows7-x86_64-oid32-assert,Int-WindowsXP-i386-assert,Mic-Windows7-i386-installer,Mic-Windows7-x86_64-installer,Mic-Windows7-x86_64-oid32-installer&module=sql&tstlimit=sql/test/pg_regress
http://monetdb.cwi.nl/testweb/web/showtestoutput.php?serial=48384:eb30bdbf91d9&target=GNU-Darwin-i386-propcheck&module=sql&test=sql%2Ftest%2Fpg_regress%2Fload&which=err
http://monetdb.cwi.nl/testweb/web/testchange.php?test=48384:eb30bdbf91d9/GNU-Darwin-i386-propcheck/sql/mTests/sql%2Ftest%2Fpg_regress%2Fload
http://monetdb.cwi.nl/testweb/web/commits.php?serial=48211:3d497320d912
http://dev.monetdb.org/hg/MonetDB/rev/3b88af94c574
## Comment 19099
Date: 2013-08-28 11:44:20 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [55190feabdea](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=55190feabdea) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=55190feabdea](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=55190feabdea)
Changeset description:
Don't use ridiculously large buffer on 32-bit systems.
This fixes bug #3334.
## Comment 19205
Date: 2013-09-27 17:03:11 +0200
From: @sjoerdmullender
This was fixed in SP4.
| On 32-bit systems, test sql/test/pg_regress/Tests/load fails since recent changes | https://api.github.com/repos/MonetDB/MonetDB/issues/3334/comments | 0 | 2020-11-30T12:33:22Z | 2024-06-27T12:00:41Z | https://github.com/MonetDB/MonetDB/issues/3334 | 753,441,269 | 3,334 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-08-05 09:14:57 +0200
From: Radovan Bičiště <<radovan.biciste>>
To: SQL devs <<bugs-sql>>
Version: 11.15.11 (Feb2013-SP3)
CC: @njnes
Last updated: 2013-08-06 11:11:39 +0200
## Comment 18971
Date: 2013-08-05 09:14:57 +0200
From: Radovan Bičiště <<radovan.biciste>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:22.0) Gecko/20100101 Firefox/22.0
Build Identifier:
Attached procedure is not in the database even the create statement completed successfully. Drop operation fails afterwords. Nothing is in the database log.
Reproducible: Always
### Steps to Reproduce:
1. run the create procedure statement.
2. run the drop statement.
3. the drop statement fails because the procedure does not exist.
### Expected Results:
The procedure is created.
## Comment 18972
Date: 2013-08-05 09:16:56 +0200
From: Radovan Bičiště <<radovan.biciste>>
Created attachment 214
create script
> Attached file: [crm_segm_typ_klienta_rl.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3333_crm_segm_typ_klienta_rl.sql_214) (text/plain, 2452 bytes)
> Description: create script
## Comment 18974
Date: 2013-08-06 09:16:08 +0200
From: @njnes
With this script I get a error when creating the procedure
SELECT: identifier 'v_stitek_id' unknown
Probably some more ddl statements are needed?
## Comment 18975
Date: 2013-08-06 10:10:16 +0200
From: Radovan Bičiště <<radovan.biciste>>
That was it. It is strange that the error was not reported in our environment. I'm sorry for bugging.
## Comment 18976
Date: 2013-08-06 11:11:39 +0200
From: @njnes
I tested with the default and Feb2013 branch. Possibly the fix is in after
the SP3 release. So a possible Feb2013 sp4 or later will solve your problem.
| Procedure not created in database but statement completed successfully | https://api.github.com/repos/MonetDB/MonetDB/issues/3333/comments | 0 | 2020-11-30T12:33:19Z | 2024-06-27T12:00:40Z | https://github.com/MonetDB/MonetDB/issues/3333 | 753,441,245 | 3,333 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-08-02 22:17:11 +0200
From: Tim H. <<monetdb.bug.reporter>>
To: SQL devs <<bugs-sql>>
Version: 11.15.11 (Feb2013-SP3)
CC: @njnes
Last updated: 2013-09-27 13:47:17 +0200
## Comment 18970
Date: 2013-08-02 22:17:11 +0200
From: Tim H. <<monetdb.bug.reporter>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0
Build Identifier:
Using the TPCH orders table with the SF1 data set loaded, I cannot compute the median of any column. E.g.
sql>select median(o_totalprice) from orders;
MEDIAN: no such operator 'median(decimal)'
sql>select median(o_shippriority) from orders;
MEDIAN: no such operator 'median(int)'
Reproducible: Always
### Steps to Reproduce:
1. Create the orders table from the TPCH schema
2. Load the data for scale factor 1 (SF1)
3. Log in as user other than monetdb
4. select median(o_totalprice) from orders;
### Actual Results:
MEDIAN: no such operator 'median(decimal)'
### Expected Results:
+--------------------------+
| L1 |
+==========================+
| {the answer} |
+--------------------------+
Sometimes I see a different error: value ({some number}) exceeds limits of type bte
Example:
sql>select max(o_totalprice), min (o_totalprice), avg (o_totalprice), median(o_totalprice) from pub.orders;
value (130445) exceeds limits of type bte
## Comment 18982
Date: 2013-08-08 21:30:41 +0200
From: @njnes
Using a cast it should work okay.
## Comment 18990
Date: 2013-08-12 22:08:48 +0200
From: Tim H. <<monetdb.bug.reporter>>
The issue appears to be that aggregation functions aren't resolved correctly when a non-admin user is using a different default schema.
Here are the steps to reproduce:
As monetdb:
CREATE ROLE "test_role";
CREATE SCHEMA "test" WITH AUTHORIZATION "test_role";
CREATE USER "admin" WITH PASSWORD '12345' NAME 'Admin' SCHEMA "test";
GRANT "test_role" to "admin";
As admin do the following commands in mclient (use the attached files):
sql>\< /path/to/part.sql
sql>copy into "part" from '/path/to/part.tbl';
Then try the following queries (still as the admin user):
select median(cast (p_retailprice AS double)) from part;
select sys.median(cast (p_retailprice AS double)) from part;
select sys."median"(cast (p_retailprice AS double)) from part;
## Comment 18991
Date: 2013-08-12 22:09:48 +0200
From: Tim H. <<monetdb.bug.reporter>>
Created attachment 216
Script to create the example table referenced in the repro steps.
> Attached file: [part.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3332_part.sql_216) (application/octet-stream, 287 bytes)
> Description: Script to create the example table referenced in the repro steps.
## Comment 18992
Date: 2013-08-12 22:10:51 +0200
From: Tim H. <<monetdb.bug.reporter>>
Created attachment 217
Data file referenced in the repro steps
> Attached file: [part.tbl](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3332_part.tbl_217) (application/octet-stream, 591 bytes)
> Description: Data file referenced in the repro steps
## Comment 18997
Date: 2013-08-14 17:14:44 +0200
From: @njnes
fixed in feb2013, we now handle qualified names (ie schema.aggregationname) properly.
## Comment 18998
Date: 2013-08-14 17:15:46 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [e4557e11b80c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e4557e11b80c) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e4557e11b80c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e4557e11b80c)
Changeset description:
added test for bug #3332
| MEDIAN: no such operator 'median(decimal)' | https://api.github.com/repos/MonetDB/MonetDB/issues/3332/comments | 0 | 2020-11-30T12:33:17Z | 2024-06-27T12:00:39Z | https://github.com/MonetDB/MonetDB/issues/3332 | 753,441,212 | 3,332 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-07-31 08:15:36 +0200
From: jun liu <<junliu44>>
To: GDK devs <<bugs-common>>
Version: 11.15.15 (Feb2013-SP4)
CC: @hannesmuehleisen
Last updated: 2013-10-22 14:42:11 +0200
## Comment 18951
Date: 2013-07-31 08:15:36 +0200
From: jun liu <<junliu44>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4
Build Identifier:
To execute SQL like: "select id from table sample 0.1"
It will return same result set every time, but random result expected.
Reproducible: Always
## Comment 18952
Date: 2013-07-31 08:22:08 +0200
From: jun liu <<junliu44>>
example:
sql>select uid from users sample 5;
+------------+
| uid |
+============+
| 1826098154 |
| 1840137980 |
| 1735367250 |
| 1887581187 |
| 1354129612 |
+------------+
5 tuples (3.2s)
sql>select uid from users sample 5;
+------------+
| uid |
+============+
| 1826098154 |
| 1840137980 |
| 1735367250 |
| 1887581187 |
| 1354129612 |
+------------+
5 tuples (3.3s)
## Comment 19204
Date: 2013-09-27 16:41:25 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [2bccc8cfa356](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2bccc8cfa356) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2bccc8cfa356](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2bccc8cfa356)
Changeset description:
Reverse order of mar_tail and reverse.
This fixes bug #3331.
This should not be propagated.
| SAMPLE will return same result every time. | https://api.github.com/repos/MonetDB/MonetDB/issues/3331/comments | 0 | 2020-11-30T12:33:14Z | 2024-06-27T12:00:38Z | https://github.com/MonetDB/MonetDB/issues/3331 | 753,441,178 | 3,331 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-07-30 16:55:34 +0200
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: 11.15.11 (Feb2013-SP3)
CC: @njnes
Last updated: 2013-09-27 13:47:16 +0200
## Comment 18945
Date: 2013-07-30 16:55:34 +0200
From: @drstmane
The following group-by query result in a corrupt plan when mitosis is enabled (with little sample data, --forcemito is required):
create table error (x int, y int, intensity int);
copy 2 records into error from stdin delimiters ',','\n';
1,2,3
4,5,6
select
tilex,
tiley,
intensity,
count(*) as count
from (
select
floor(x/16) as tilex,
floor(y/16) as tiley,
intensity
from
error
) as image
group by
tilex,
tiley,
intensity
;
results in
TypeException:user.s0_1[58]:'_65' may not be used before being initialized
TypeException:user.s0_1[45]:'_65' may not be used before being initialized
TypeException:user.s0_1[43]:'_65' may not be used before being initialized
TypeException:user.s0_1[43]:'_65' may not be used before being initialized
var X_65 occurs indeed only once in the EXPLAIN output:
$ grep _65 error.explain
| (X_68,r1_68,r2_68) := group.subgroup(X_45,X_65);
$ grep -9 _65 error.explain
| X_169:bat[:oid,:int] := sql.bind(X_4,"sys","error","intensity",0,0,2); |
| X_170:bat[:oid,:int] := sql.bind(X_4,"sys","error","intensity",0,1,2); |
| (X_171:bat[:oid,:oid] ,X_172:bat[:oid,:int] ) := sql.bind(X_4,"sys","error","intensity",2,0,2); |
| (X_173:bat[:oid,:oid] ,X_174:bat[:oid,:int] ) := sql.bind(X_4,"sys","error","intensity",2,1,2); |
| X_56 := sql.bind(X_4,"sys","error","intensity",1); |
| X_193 := sql.delta(X_169,X_171,X_172); |
| X_194 := sql.delta(X_170,X_173,X_174,X_56); |
| X_195 := algebra.leftfetchjoin(X_154,X_193); |
| X_196 := algebra.leftfetchjoin(X_156,X_194); |
| (X_68,r1_68,r2_68) := group.subgroup(X_45,X_65); |
| (X_71,r1_71,r2_71) := group.subgroupdone(X_25,X_68); |
| X_77 := algebra.leftfetchjoin(r1_71,X_25); |
| X_85 := algebra.leftfetchjoin(r1_71,X_45); |
| X_59 := mat.pack(X_195,X_196); |
| X_93 := algebra.leftfetchjoin(r1_71,X_59); |
| X_99:bat[:oid,:wrd] := aggr.subcount(X_71,X_71,r1_71,false); |
| X_107 := sql.resultSet(4,1,X_77); |
| sql.rsColumn(X_107,"sys.image","tilex","real",24,0,X_77); |
| sql.rsColumn(X_107,"sys.image","tiley","real",24,0,X_85); |
## Comment 18946
Date: 2013-07-30 20:20:51 +0200
From: @njnes
sovled by handling batmmath in mitosis/mergetable
## Comment 18950
Date: 2013-07-30 22:44:05 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [ce1402f55e09](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ce1402f55e09) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ce1402f55e09](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ce1402f55e09)
Changeset description:
fixed bug #3330, ie handle batmmath in mitosis
| Corrupt mitosis plan with group-by query | https://api.github.com/repos/MonetDB/MonetDB/issues/3330/comments | 0 | 2020-11-30T12:33:12Z | 2024-06-27T12:00:37Z | https://github.com/MonetDB/MonetDB/issues/3330 | 753,441,159 | 3,330 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-07-30 15:56:32 +0200
From: Radovan Bičiště <<radovan.biciste>>
To: SQL devs <<bugs-sql>>
Version: 11.15.11 (Feb2013-SP3)
CC: @njnes
Last updated: 2013-09-27 13:47:14 +0200
## Comment 18943
Date: 2013-07-30 15:56:32 +0200
From: Radovan Bičiště <<radovan.biciste>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:22.0) Gecko/20100101 Firefox/22.0
Build Identifier:
We use SQLWorkbench as a client but the same problem happens using mclient.
This SQL runs fine as standalone:
INSERT INTO crmkartastitek (
cislo_karty,
stitek_id,
stitek_nazev,
stitek_upresneni,
stitek_hodnota_decimal
)
select cislo_karty,170,'KEO','',round(avg(obrat),2)
from
(select ckp.cislo_karty, ckp.id_expedice, sum(ckp.pcena_sd) as obrat
from crmkartapohyby ckp
join crmkartaaktivita ck on ckp.cislo_karty = ck.cislo_karty
where ckp.pohyb in ('VR', 'VV')
and ck.aktivita between 1 and 3 -- omezení na LM a L3M
group by ckp.cislo_karty, ckp.id_expedice
) as exp_pripady
group by cislo_karty;
But when wrapped in procedure raises an error as follows:
CREATE PROCEDURE crm_segm_keo_rl(p_interval INT, p_datum timestamp)
BEGIN
-- hlavička procedury
DECLARE v_proc VARCHAR(250);
SET v_proc = 'crm_segm_kpn_rl';
-- nastav id pravidla
DECLARE v_stitek_id int;
DECLARE v_stitek_nazev,v_stitek_upresneni VARCHAR(200);
-- nastav štítek
SET v_stitek_id = 170;
SELECT nazev,upresneni INTO v_stitek_nazev,v_stitek_upresneni FROM crmregstitek WHERE stitek_id = v_stitek_id;
-- proveď výpočet pouze pokud spouštím měsíční přepočet
IF p_interval = crm_segm_vrat_spusteni(v_stitek_id) THEN
INSERT INTO crmkartastitek (
cislo_karty,
stitek_id,
stitek_nazev,
stitek_upresneni,
stitek_hodnota_decimal
)
select cislo_karty,v_stitek_id,v_stitek_nazev,v_stitek_upresneni,round(avg(obrat),2)
from
(select ckp.cislo_karty, ckp.id_expedice, sum(ckp.pcena_sd) as obrat
from crmkartapohyby ckp
join crmkartaaktivita ck on ckp.cislo_karty = ck.cislo_karty
where ckp.pohyb in ('VR', 'VV')
and ck.aktivita between 1 and 3 -- omezení na LM a L3M
group by ckp.cislo_karty, ckp.id_expedice
) as exp_pripady
group by cislo_karty;
END IF;
END;
Procedure is created fine.
call crm_segm_keo_rl(3,timestamp '2013-07-01 00:00:00');
Causes:
An error occurred when executing the SQL command:
call crm_segm_keo_rl(3,timestamp '2013-07-01 00:00:00')
TypeException:user.crm_segm_keo_rl[362]:'aggr.subavg' undefined in: _546:bat[:any,:dbl] := aggr.subavg(_543:bat[:oid,:dbl], _209:bat[:oid,:oid], r1_209:bat[:oid,:oid], _535:bit) [SQL State=22000]
Next: TypeException:user.s4_24[5]:'user.crm_segm_keo_rl' undefined in: _9:void := user.crm_segm_keo_rl(_5:int, _7:timestamp) [SQL State=22000]
Next: program contains errors [SQL State=39000]
Reproducible: Always
### Steps to Reproduce:
1. create procedure with SQL that uses AVG function.
2. run procedure.
### Actual Results:
Received the error:
An error occurred when executing the SQL command:
call crm_segm_keo_rl(3,timestamp '2013-07-01 00:00:00')
TypeException:user.crm_segm_keo_rl[362]:'aggr.subavg' undefined in: _546:bat[:any,:dbl] := aggr.subavg(_543:bat[:oid,:dbl], _209:bat[:oid,:oid], r1_209:bat[:oid,:oid], _535:bit) [SQL State=22000]
Next: TypeException:user.s4_24[5]:'user.crm_segm_keo_rl' undefined in: _9:void := user.crm_segm_keo_rl(_5:int, _7:timestamp) [SQL State=22000]
Next: program contains errors [SQL State=39000]
### Expected Results:
successful end of the procedure run
## Comment 18944
Date: 2013-07-30 16:07:13 +0200
From: Radovan Bičiště <<radovan.biciste>>
Created attachment 213
simple test case
Simplified test case.
> Attached file: [test_avg.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3329_test_avg.sql_213) (text/x-sql, 252 bytes)
> Description: simple test case
## Comment 18954
Date: 2013-07-31 10:01:43 +0200
From: @njnes
fixed, the correct interface requires another bit (abort on error).
## Comment 18957
Date: 2013-07-31 10:49:29 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [6b9d21862a6a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6b9d21862a6a) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6b9d21862a6a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6b9d21862a6a)
Changeset description:
fixed bug #3329, ie handle abort on error bit on subavg call
fixed bug #3319, return error on unique/primary/foreign constraints on declared tables
fixed bug #3318, correctly find the declared tables
## Comment 18962
Date: 2013-07-31 12:52:49 +0200
From: Radovan Bičiště <<radovan.biciste>>
Simple workaround is to use combination of SUM and COUNT.
| Function AVG fails during runtime in a procedure | https://api.github.com/repos/MonetDB/MonetDB/issues/3329/comments | 0 | 2020-11-30T12:33:10Z | 2024-06-27T12:00:36Z | https://github.com/MonetDB/MonetDB/issues/3329 | 753,441,139 | 3,329 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-07-23 13:52:02 +0200
From: tim.staley
To: SQL devs <<bugs-sql>>
Version: 11.15.11 (Feb2013-SP3)
CC: @mlkersten, @njnes
Last updated: 2013-08-23 14:11:26 +0200
## Comment 18942
Date: 2013-07-23 13:52:02 +0200
From: tim.staley
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31
Build Identifier:
One of our users (running the LOFAR-TKP Trap pipeline) noticed that having performed a pipeline run they were not seeing the expected results in the database. Further inspection revealed that 4 mserver5 instances were serving the database, all stuck at 100% core usage. Stopping and restarting the database seems to have resolved the issue for now.
Reproducible: Didn't try
### Steps to Reproduce:
Pipeline user is re-running the pipeline now, will post back it problem re-occurs.
## Comment 19015
Date: 2013-08-16 22:02:33 +0200
From: @mlkersten
Redo this experiment on the FEB13-SP4 version, because it may be a result of the limited worker pool. I expect it be disappeared.
## Comment 19063
Date: 2013-08-23 14:11:26 +0200
From: @mlkersten
Most likely solved by the latest update of thread management in Feb'013
| Several mserver5 threads stuck at 100% CPU usage serving same database. | https://api.github.com/repos/MonetDB/MonetDB/issues/3328/comments | 0 | 2020-11-30T12:33:07Z | 2024-06-27T12:00:34Z | https://github.com/MonetDB/MonetDB/issues/3328 | 753,441,118 | 3,328 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-07-19 14:03:52 +0200
From: @yzchang
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2019-01-21 17:00:46 +0100
## Comment 18927
Date: 2013-07-19 14:03:52 +0200
From: @yzchang
Triggered by thread "Must the file be deleted after \"copy binary into table
from file\"" on July 19, 2013:
3) In case the copy into file, e.g., due to a failing sanity check after the
file is moved, that data is factually lost, i.e., the files are gone, but no
data is loaded into the database; we need to either document this clearly, or
make the implementation behave like a transaction.
For now, we should document this behaviour. But a long term solution is to implement the transactional behaviour.
## Comment 26825
Date: 2019-01-21 17:00:46 +0100
From: @sjoerdmullender
Since files are no longer deleted by COPY BINARY INTO, is this still a problem?
| Transactional behaviour of BinaryBulkLoad | https://api.github.com/repos/MonetDB/MonetDB/issues/3327/comments | 0 | 2020-11-30T12:33:05Z | 2024-06-28T13:40:13Z | https://github.com/MonetDB/MonetDB/issues/3327 | 753,441,100 | 3,327 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-07-19 14:00:37 +0200
From: @yzchang
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2019-01-21 16:59:51 +0100
## Comment 18926
Date: 2013-07-19 14:00:37 +0200
From: @yzchang
Triggered by thread "Must the file be deleted after \"copy binary into table
from file\"" on July 19, 2013:
2) The actual behavior currently differs between data types; for numerical
types, the user-provided files are moved as explained above; for stings, the
files are read and processed, i.e., the used-provided file remains in place
as-is. We need to consider unifying this behavior, e.g., by deleting also the
user provided files for strings once they have been processed/loaded.
I'd vote for deleting the files containing strings as well, for reasons of storage.
## Comment 26824
Date: 2019-01-21 16:59:51 +0100
From: @sjoerdmullender
This has been fixed in the sense that files are never deleted anymore when using COPY BINARY INTO.
| consistent behaviour of BinaryBulkLoad | https://api.github.com/repos/MonetDB/MonetDB/issues/3326/comments | 0 | 2020-11-30T12:33:03Z | 2024-06-27T12:00:32Z | https://github.com/MonetDB/MonetDB/issues/3326 | 753,441,069 | 3,326 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-07-19 13:55:00 +0200
From: @yzchang
To: Documentation maintainers <<bugs-docs>>
Version: unspecified
CC: @mlkersten
Last updated: 2019-01-18 13:39:32 +0100
## Comment 18925
Date: 2013-07-19 13:55:00 +0200
From: @yzchang
Triggered by thread "Must the file be deleted after \"copy binary into table from file\"" on July 19, 2013:
1) The actual behavior (move) is actually different than the copy that the documentation at http://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/BinaryBulkLoad suggests. We need to fix the latter.
2) The actual behavior currently differs between data types; for numerical types, the user-provided files are moved as explained above; for stings, the files are read and processed, i.e., the used-provided file remains in place as-is. We need to consider unifying this behavior, e.g., by deleting also the user provided files for strings once they have been processed/loaded.
3) In case the copy into file, e.g., due to a failing sanity check after the file is moved, that data is factually lost, i.e., the files are gone, but no data is loaded into the database; we need to either document this clearly, or make the implementation behave like a transaction.
## Comment 18928
Date: 2013-07-19 14:09:17 +0200
From: @mlkersten
1) has been addressed on the website already
## Comment 21008
Date: 2015-07-15 17:09:14 +0200
From: @sjoerdmullender
I think we should actually reconsider the implementation (and hence also the documentation): we should probably always *copy* the data, and then the data also doesn't have to be on the same disk partition as the database.
## Comment 26808
Date: 2019-01-18 13:39:32 +0100
From: @sjoerdmullender
For several years now, COPY BINARY copies the data from the source files. It does not in any way modify the referenced files.
I have also updated the documentation.
| BinaryBulkLoad documentation mismatches implementation | https://api.github.com/repos/MonetDB/MonetDB/issues/3325/comments | 0 | 2020-11-30T12:33:00Z | 2024-06-27T12:00:31Z | https://github.com/MonetDB/MonetDB/issues/3325 | 753,441,044 | 3,325 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-07-18 04:10:50 +0200
From: hlfwmqd
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @drstmane
Last updated: 2016-04-11 11:46:05 +0200
## Comment 18921
Date: 2013-07-18 04:10:50 +0200
From: hlfwmqd
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11
Build Identifier:
when i use the command, i can use it dump the table content into a file, but it doesnt support dumping ***BINARY format*** data into a file, which function can be very useful to give a example on how to use "COPY BINARY INTO TABLE FROM FILE". Also, postgresql support this feature i often use.
Reproducible: Always
## Comment 18922
Date: 2013-07-18 08:31:00 +0200
From: @drstmane
This is a feature request (request for enhancement).
| "copy subquery into file " doesnt support writing binary data into file | https://api.github.com/repos/MonetDB/MonetDB/issues/3324/comments | 0 | 2020-11-30T12:32:58Z | 2024-06-28T13:40:12Z | https://github.com/MonetDB/MonetDB/issues/3324 | 753,441,012 | 3,324 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-07-17 11:14:56 +0200
From: Alistair Sutherland <<alistair.sutherland>>
To: GDK devs <<bugs-common>>
Version: 11.15.15 (Feb2013-SP4)
CC: @hannesmuehleisen, @mlkersten
Last updated: 2013-10-22 14:42:11 +0200
## Comment 18917
Date: 2013-07-17 11:14:56 +0200
From: Alistair Sutherland <<alistair.sutherland>>
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)
Build Identifier:
I've recently been conducting some performance testing of MonetDB with a variety of servers (from 4 core-8GB RAM to 20 core-64GB RAM) with various data sizes, in an attempt to gain a better understanding of how MonetDB scales.
During the performance tests it became obvious that much of the processing was IO bound due to:
1) Columns being unmapped from memory overly aggressively (even when there was plenty of memory still available).
2) The constant mapping/unmapping of memory mapped bat files for intermediate results.
I've attached a patch which attempts to address both issues. The first patch(gdk_utils.c) is to update the memory limit at which the GDKvmtrim kicks in to be 80% memory usage.
The second patch (gdk_heap.c) limits the number of mmap/munmap calls via the existing 'heap caching' mechanism which was not working at all! When the heap cache reached it's capacity (which it does quickly after startup), the HeapCacheFind() function would never find any mmapped files due to an 'off-by-one-error'. If it could enter the HeapCacheFind() function the logic to select a cached heap of the correct size was incorrect and the moving of the cached memory file to bat directory was also broken.
In addition to fixing up the caching code, I've also wired in the heap cache into the case where extending a malloced heap results in a swap over to memory mapped storage.
Reproducible: Always
### Steps to Reproduce:
1. Run MonetDB and execute queries.
2. Observe that the heapcache is not used (check dbfarm 'HC' directory and observe cached files are never used).
3. Observe that performance suffers from unnecessary hard page faults.
### Actual Results:
Columns trimmed from BPP cache even though low memory usage.
Heapcache not used.
High numbers of hard page faults.
### Expected Results:
Columns remain cached in memory where possible.
Heapcache used where possible.
Low numbers of hard page faults when memory available.
## Comment 18918
Date: 2013-07-17 11:15:45 +0200
From: Alistair Sutherland <<alistair.sutherland>>
Created attachment 212
Heapcache fixes
> Attached file: [CachingFixes.patch](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3323_CachingFixes.patch_212) (text/plain, 8487 bytes)
> Description: Heapcache fixes
## Comment 18919
Date: 2013-07-17 11:51:01 +0200
From: @sjoerdmullender
Thanks for the patch. We will study it.
For completeness I repeat the remarks I made on the mailing list.
The heapcache isn't without problems. One serious issue is that the heaps that end up there were for temporary bats in which we are not interested anymore. However, the kernel doesn't know we're not interested in the contents, so it will write the data to disk. Maybe not immediately, but eventually. This is unnecessary I/O.
The other issue I want to raise is that I have made a change to the
Feb2013 branch after the latest release (SP3) which addresses some mmap inefficiencies. On Linux there is a mremap system call which can be used to grow (and possibly move) a memory map. If that system call is available, we now use it. On systems where the system call is not available, we now try to mmap extra space after the existing mmap, and if that fails, we munmap the whole area and mmap it larger somewhere else. The upshow of this is that we no longer write the data to disk if we need to grow a memory map. I am curious how this change performs in your tests.
## Comment 18929
Date: 2013-07-19 16:45:37 +0200
From: @sjoerdmullender
The patch seems to do a number of more-or-less unrelated things. In addition, there seem to be gratuitous code changes (indentation, putting "{" on a new line, using spaces for indentation instead of tabs) which make it harder to assess the merits of the patch.
I'll try to go through some of the things I saw.
The HEAP_CACHE_SIZE constant was replaced by a variable that is never changed. This seems to me to be a gratuitous change.
The old code used a variable cursz to find the best cached heap. The patched code uses variables curdiffsz and diffsz. Unfortunately, the new code is wrong. The new variables are of type "int" which may cause overflow in their calculation. The old code was carefully constructed to not cause overflow. It is unclear to me whether the new code would work any better than the old (if we ignore the overflow issue). Please explain why you think the new code is better.
Other changes I see are:
If the cached heap is much larger than what is needed (more than 30%), the cached file is not used. Is this a smart thing to do? Wouldn't you end up with lots of cached heaps that are too large to be of use?
A call to GDKextend was deleted. Probably because that already happens in GDKload. Probably a good idea.
When going from a malloced heap to a memory mapped heap, the patched code now considers using the heap cache. If it turns out that the heap cache does work well, this is probably a good idea.
The change in gdk_utils.c is also unrelated. The old code was working on the idea that if the memory usage of the server grows (memdiff >= 0) but the resident set size of the process shrinks somewhat significantly, the O/S is taking away real memory that we actually wanted to use. Therefore that was a good time to reduce our memory footprint by calling BBPtrim. The problem this was trying to solve was to dynamically adapt to the amount of memory the process gets from the O/S. It seems to work reasonably well when, e.g., two servers are started on the same system and both compete for all available memory. Having said this, what would be really great if the server could better determine which bats are still needed or will be needed in the near future. This is, unfortunately, a very difficult thing to do in GDKvmtrim. That code doesn't know (and, because of modularization, can't know) what the server is up to.
Please see the commit messages for changesets [1b007b309a89](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1b007b309a89) and [4f72f353b22b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4f72f353b22b)
## Comment 18930
Date: 2013-07-19 18:49:59 +0200
From: Alistair Sutherland <<alistair.sutherland>>
Hi, thanks for reviewing the patch, I'll attempt to answer your queries.
> The HEAP_CACHE_SIZE constant was replaced by a variable that is never changed.
> This seems to me to be a gratuitous change.
Ah, I was planning on wiring the HEAP_CACHE_SIZE into "GDKgetenv" framework to allowing users to configure the size of the cache (and effectively disable it by setting it to 0) but I must have never got round to it...
> The old code used a variable cursz to find the best cached heap. The patched
> code uses variables curdiffsz and diffsz. Unfortunately, the new code is wrong.
> The new variables are of type "int" which may cause overflow in their calculation.
> The old code was carefully constructed to not cause overflow. It is unclear to me
> whether the new code would work any better than the old (if we ignore the overflow
> issue). Please explain why you think the new code is better.
Ok, the int overflow was an oversight. The problem with the old code is that it doesn't actually "prefer smallest larger than or equal to requested, otherwise largest smaller than requested". Imagine the scenario with 3 heap caches of size: 5MB, 15MB, 10MB and a cache request of 10MB. The first time around the loop "e == NULL" so we set cursz to 5MB. For the next two iterations cursz is not less than 15MB or 10MB so we end up sticking with 5MB...
This is over and above the other bug where hc->used is never less than hc->sz (after the cache reaches capacity) which resulted in the caching code never being used.
> If the cached heap is much larger than what is needed (more than 30%), the cached
> file is not used. Is this a smart thing to do? Wouldn't you end up with lots of
> cached heaps that are too large to be of use?
If we don't do this we can end up with the dbfarm taking up a lot more disk space than is necessary. If every 1MB cache request (which isn't for a temporary) takes a 1.5GB heap cache entry then all of a sudden the dbfarm is huge.
> A call to GDKextend was deleted. Probably because that already happens in GDKload. Probably a good idea.
It's more than that. The GDKLoad function requires that the filepath is relative to "bat" directory. This wasn't happening so all attempts to resize files were failing, again resulting in the cache not being used.
> This is, unfortunately, a very difficult thing to do in GDKvmtrim. That code doesn't know (and, because of modularization, can't know) what the server
> is up to. Please see the commit messages for changesets [1b007b309a89](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1b007b309a89) and [4f72f353b22b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4f72f353b22b)
I can see what you are trying to do but even on a 12GB RAM machine we should be able to keep all columns in memory (for a table with 100M rows and 5 columns). After the vmtrim change (and heap cache fixes) I get no disk IO, before the changes the disk was thrashing due to hard page faults.
## Comment 18931
Date: 2013-07-19 19:36:21 +0200
From: @mlkersten
The MonetDB philosophy is *not* to introduce low level steering parameters.
If that is crucial in a rare situation, then there should be enough expertise to patch the code and compile.
## Comment 18932
Date: 2013-07-19 19:38:22 +0200
From: @mlkersten
To be more precise, we don't want steering parameters to become visible as user tuneable knobs.
For the remainder, thanks for looking so deeply into the code base.
Martin
## Comment 18933
Date: 2013-07-22 11:40:00 +0200
From: @sjoerdmullender
(In reply to comment 4)
> > The old code used a variable cursz to find the best cached heap. The patched
> > code uses variables curdiffsz and diffsz. Unfortunately, the new code is wrong.
> > The new variables are of type "int" which may cause overflow in their calculation.
> > The old code was carefully constructed to not cause overflow. It is unclear to me
> > whether the new code would work any better than the old (if we ignore the overflow
> > issue). Please explain why you think the new code is better.
>
> Ok, the int overflow was an oversight. The problem with the old code is that
> it doesn't actually "prefer smallest larger than or equal to requested,
> otherwise largest smaller than requested". Imagine the scenario with 3 heap
> caches of size: 5MB, 15MB, 10MB and a cache request of 10MB. The first time
> around the loop "e == NULL" so we set cursz to 5MB. For the next two
> iterations cursz is not less than 15MB or 10MB so we end up sticking with
> 5MB...
I think a better fix (avoiding the possibility of overflow) is to add an extra condition to the test. In the bit starting with e == NULL I added "|| cursz < *maxzs". This ensures that the test also succeeds when looking at a heap cache that is at least as large as the requested size and the current best size is smaller than the requested size.
## Comment 18934
Date: 2013-07-22 11:43:28 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [610572053204](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=610572053204) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=610572053204](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=610572053204)
Changeset description:
Fix for one of the problems in bug #3323.
When going through the heap cache and the first heap is smaller than
requested, we want to match any heap that is at least as large as
requested.
## Comment 18935
Date: 2013-07-22 11:49:07 +0200
From: @sjoerdmullender
(In reply to comment 4)
> This is over and above the other bug where hc->used is never less than
> hc->sz (after the cache reaches capacity) which resulted in the caching code
> never being used.
The fix for this is to compare hc->used with 0 in HEAPcacheFind. There needs to be at least one used entry for it to make sense to look for one. It doesn't matter how hc->used compares with hc->sz.
## Comment 18936
Date: 2013-07-22 11:52:12 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [dee4d23f51ab](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dee4d23f51ab) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=dee4d23f51ab](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=dee4d23f51ab)
Changeset description:
Fix for one of the problems in bug #3323.
Once the heap cache was full, it was never used anymore. When we want
to find a cache file for use, it only matters whether there are any in
the cache, not whether the cache is full.
## Comment 18937
Date: 2013-07-22 12:56:45 +0200
From: @sjoerdmullender
(In reply to comment 4)
> > A call to GDKextend was deleted. Probably because that already happens in GDKload. Probably a good idea.
>
> It's more than that. The GDKLoad function requires that the filepath is
> relative to "bat" directory. This wasn't happening so all attempts to resize
> files were failing, again resulting in the cache not being used.
I fixed this differently. I now use the recently introduced function MT_mremap to extend the memory map (which is what was being attempted here).
## Comment 18938
Date: 2013-07-22 12:58:52 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [93b8c8c0dee0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=93b8c8c0dee0) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=93b8c8c0dee0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=93b8c8c0dee0)
Changeset description:
Fix for one of the problems in bug #3323.
When the code decided to use a pre-existing memory map, and the map
needed to be extended, the remapping of the extended file failed due
to incorrect use of the file name parameters. We now use MT_mremap to
do the extending and remapping.
## Comment 18940
Date: 2013-07-22 18:20:22 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [3b88af94c574](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3b88af94c574) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3b88af94c574](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3b88af94c574)
Changeset description:
Fix for one of the problems in bug #3323.
Allocate a heap from the heap cache when extending a heap from memory
to memory map.
## Comment 18941
Date: 2013-07-22 18:22:06 +0200
From: @sjoerdmullender
(In reply to comment 3)
> When going from a malloced heap to a memory mapped heap, the patched code
> now considers using the heap cache. If it turns out that the heap cache
> does work well, this is probably a good idea.
I implemented this slightly differently.
But thanks a lot for the patches. They were very inspiring.
## Comment 18969
Date: 2013-08-01 15:28:30 +0200
From: @sjoerdmullender
I have now addressed most of the problems you have described in the report. The one thing I did not address yet is the change to gdk_utils.c.
I have done a bunch of experiments to compare a number of configurations. The experiment was to load the TPC-H data, apply the constraints, and then run the 22 queries 10 times in succession. All without restarting the server. I did this mostly on my 8 GiB laptop, and I tried both scale factor 5 and 10 (i.e., roughly 5 GiB of data and 10 GiB of data, so one fits, and one doesn't).
I tried the following configurations:
- "as is"
- disabled heap cache (setting HEAP_CACHE_SIZE to 0)
- disabled the vmtrim thread (run server with option --set gdk_vmtrim=no)
- combination of the two above
Note that the vmtrim thread is the one that checks the resident set size, the change you made in gdk_utils.c.
Before starting each experiment, I cleared the operating system buffer cache by doing "echo 3 > /proc/sys/vm/drop_caches".
I measured the following:
- time from start to finish
- amount of data read from disk
- amount of data written to disk
The latter two measures were done using systemtap and tapping into the submit_bio() function in the Linux kernel.
As a side note, when running the queries in scale factor 5, I saw that basically nothing was being read after the first round of queries. In other words, everything needed was kept in memory.
On Linux (which is what my laptop runs), it was clear that using the heap cache was a looser in all three measures. It took longer, and more data was read and written.
Having the vmtrim thread was sometimes better, sometimes worse, and usually when it was better for one measure in scale factor 5, it was worse in 10, and vice versa. In any case, the difference was never big.
The conclusion: despite the fixes that went into getting the heap cache to work, it may be better to remove it altogether. And the vmtrim thread we can leave or remove (remove is better from a maintenance point of view).
However, Linux is not the whole world. There is also Windows to consider.
On Windows, initial experiments show that the heap cache is beneficial. Probably because creating and deleting large files is very expensive. I am now experimenting with sparse files on Windows in the hope that creating those is faster than when not using sparse files. This experiment is unlikely to be finished before I leave for a two week vacation tomorrow.
## Comment 19227
Date: 2013-09-30 17:06:17 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [49cc8f100cb4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=49cc8f100cb4) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=49cc8f100cb4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=49cc8f100cb4)
Changeset description:
Get rid of the heap cache.
This fixes bug #3376 and relates to bug #3323.
In bug #3323, comment 15, I already remarked that using the heap cache
is actually slower on Linux than not using the heap cache.
In addition to this, using the heap cache can be very detrimental as
witnessed by bug #3376. What happens there is that a new string bat is
created and then appended to. The appended string bat is big enough
so that the offset heap needs to be memory mapped, so the heap cache
is used to find a usable heap. In this case, there is only one file
there, so it is used. BATappend then needs to widen the offset heap,
so it calls GDKupgradevarheap. That function doubles (or in this
case, quadruples) the size of the heap it was given since it doesn't
know the required BAT capacity. Then the BAT is freed and the heap
returned to the cache. This cycle repeats a few times, and this
repetition causes the heap to grow exponentially, eventually leading
to the errors seen in the bug report.
## Comment 19254
Date: 2013-10-08 11:25:38 +0200
From: @hannesmuehleisen
The heap cache is gone.
| Heapcache bugs/performance issues | https://api.github.com/repos/MonetDB/MonetDB/issues/3323/comments | 0 | 2020-11-30T12:32:55Z | 2024-06-27T12:00:29Z | https://github.com/MonetDB/MonetDB/issues/3323 | 753,440,978 | 3,323 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-07-12 13:10:30 +0200
From: Michael König <<michael.koenig>>
To: clients devs <<bugs-clients>>
Version: -- development
CC: martin.van.dinther
Last updated: 2019-02-12 13:57:40 +0100
## Comment 18916
Date: 2013-07-12 13:10:30 +0200
From: Michael König <<michael.koenig>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1
Build Identifier:
MonetDB's data source section in odbc.ini should provide an option for running a query every time a connection is opened.
Reproducible: Always
Typical usage scenario:
-----------------------
Since ODBC does not support time zone information, the result of queries for timestamps depends on the session time zone of the connection. To make sure that all users retrieve the same values, we would like to fix the session time zone to UTC. A workaround is to fire a SET TIME ZONE query every time a session is created.
Client applications using ODBC should not need knowledge of the specifics of a database represented by an ODBC data source. Thus, client applications should not be forced to execute a (not standardized) statement such as SET TIME ZONE themselves.
The correct place for such a query would be in the configuration of the data source, i.e., in odbc.ini. Here, the logic for fixing the time zone is centralized instead of being scattered around different client applications.
Other databases such as MySQL and PostgreSQL (and probably many more) provide such an option in the odbc.ini file. Here is an excerpt of how a PostgreSQL data source looks like:
[PostgreSQL database]
Driver = PostgreSQL ODBC Driver
Database = test_database
Servername = test_server
Port = 5432
Protocol = 8.3.9
ConnSettings = set time zone 'UTC';
I would like to see a similar option for MonetDB's ODBC driver.
## Comment 19512
Date: 2014-01-31 16:13:48 +0100
From: Martin van Dinther <<martin.van.dinther>>
A more generic solution is suggested in id=3426
## Comment 19513
Date: 2014-01-31 17:02:33 +0100
From: Michael König <<michael.koenig>>
I agree that the solution suggested in 3426 would indeed resolve my issue. Still, it would require appropriate rights (and syntax skills) on the database which my solution would not.
| Run a statement each time a connection is created via ODBC | https://api.github.com/repos/MonetDB/MonetDB/issues/3322/comments | 0 | 2020-11-30T12:32:53Z | 2024-06-28T13:40:11Z | https://github.com/MonetDB/MonetDB/issues/3322 | 753,440,949 | 3,322 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-07-11 18:55:41 +0200
From: Glauber <<glauberal>>
To: SQL devs <<bugs-sql>>
Version: 11.15.11 (Feb2013-SP3)
CC: @njnes
Last updated: 2013-07-31 17:06:17 +0200
## Comment 18912
Date: 2013-07-11 18:55:41 +0200
From: Glauber <<glauberal>>
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36
Build Identifier:
Constantemente venho me deparando com status de crash do banco de dados.
Utilizo este banco como DW e uso a função COPY como principal forma de ETL.
Após dias de uso do banco o mesmo emite o status de crash e não consigo acessa-lo mais.
Quando isso ocorreu eu destruo o database e crio novamente.
Tenho um core dump do último crash mas não conseguir identificar a causa do crash.
O que posso fazer para encontrar uma solução definitiva para este problema?
Reproducible: Couldn't Reproduce
monetdb -version
MonetDB Database Server Toolkit v1.1 (Feb2013-SP3)
Log merovingian.log
2013-07-11 03:31:51 MSG merovingian[1179]: proxying client localhost:36837 for database 'bd_erp_dw' to mapi:monetdb:///u/pentaho/monetdb/bd_erp_dw/.mapi.sock?database=bd_erp_dw
2013-07-11 03:31:51 MSG merovingian[1179]: target connection is on local UNIX domain socket, passing on filedescriptor instead of proxying
2013-07-11 03:31:51 MSG merovingian[1179]: proxying client localhost:36838 for database 'bd_erp_dw' to mapi:monetdb:///u/pentaho/monetdb/bd_erp_dw/.mapi.sock?database=bd_erp_dw
2013-07-11 03:31:51 MSG merovingian[1179]: target connection is on local UNIX domain socket, passing on filedescriptor instead of proxying
2013-07-11 03:31:52 MSG merovingian[1179]: proxying client localhost:36840 for database 'bd_erp_dw' to mapi:monetdb:///u/pentaho/monetdb/bd_erp_dw/.mapi.sock?database=bd_erp_dw
2013-07-11 03:31:52 MSG merovingian[1179]: target connection is on local UNIX domain socket, passing on filedescriptor instead of proxying
2013-07-11 03:31:52 MSG merovingian[1179]: proxying client localhost:36841 for database 'bd_erp_dw' to mapi:monetdb:///u/pentaho/monetdb/bd_erp_dw/.mapi.sock?database=bd_erp_dw
2013-07-11 03:31:52 MSG merovingian[1179]: target connection is on local UNIX domain socket, passing on filedescriptor instead of proxying
2013-07-11 03:31:52 MSG merovingian[1179]: proxying client localhost:36842 for database 'bd_erp_dw' to mapi:monetdb:///u/pentaho/monetdb/bd_erp_dw/.mapi.sock?database=bd_erp_dw
2013-07-11 03:31:52 MSG merovingian[1179]: target connection is on local UNIX domain socket, passing on filedescriptor instead of proxying
2013-07-11 07:30:01 MSG control[1179]: (local): served status list
2013-07-11 07:30:01 MSG merovingian[1179]: sending process 18668 (database 'bd_erp_dw') the TERM signal
2013-07-11 07:30:01 MSG merovingian[1179]: database 'bd_erp_dw' (18668) has exited with exit status 0
2013-07-11 07:30:02 MSG merovingian[1179]: database 'bd_erp_dw' has shut down
2013-07-11 07:30:02 MSG control[1179]: (local): stopped database 'bd_erp_dw'
2013-07-11 07:30:02 MSG control[1179]: (local): served status list
2013-07-11 07:30:02 MSG merovingian[1179]: sending process 22009 (database 'bd_erp_dw_lnx') the TERM signal
2013-07-11 07:30:02 MSG merovingian[1179]: database 'bd_erp_dw_lnx' (22009) has exited with exit status 0
2013-07-11 07:30:02 MSG merovingian[1179]: database 'bd_erp_dw_lnx' has shut down
2013-07-11 07:30:02 MSG control[1179]: (local): stopped database 'bd_erp_dw_lnx'
2013-07-11 08:15:14 MSG merovingian[1179]: starting database 'bd_erp_dw', up min/avg/max: 21h/22h/23h, crash average: 0.00 0.00 0.00 (2-2=0)
2013-07-11 08:15:15 MSG bd_erp_dw[27677]: arguments: /usr/bin/mserver5 --dbpath=/u/pentaho/monetdb/bd_erp_dw --set merovingian_uri=mapi:monetdb://bi:50000/bd_erp_dw --set mapi_open=false --set mapi_port=0 --set mapi_usock=/u/pentaho/mon
2013-07-11 08:15:18 MSG merovingian[1179]: database 'bd_erp_dw' (27677) has crashed (dumped core)
2013-07-11 08:15:18 ERR merovingian[1179]: client error: database 'bd_erp_dw' has crashed after starting, manual intervention needed, check monetdbd's logfile for details
2013-07-11 08:15:19 MSG merovingian[1179]: database 'bd_erp_dw' has crashed after start on 2013-07-11 08:15:15, attempting restart, up min/avg/max: 21h/22h/23h, crash average: 1.00 0.10 0.03 (3-2=1)
2013-07-11 08:15:19 MSG bd_erp_dw[27684]: arguments: /usr/bin/mserver5 --dbpath=/u/pentaho/monetdb/bd_erp_dw --set merovingian_uri=mapi:monetdb://bi:50000/bd_erp_dw --set mapi_open=false --set mapi_port=0 --set mapi_usock=/u/pentaho/mon
2013-07-11 08:15:19 MSG merovingian[1179]: database 'bd_erp_dw' (27684) has crashed (dumped core)
2013-07-11 08:15:19 ERR merovingian[1179]: client error: database 'bd_erp_dw' has crashed after starting, manual intervention needed, check monetdbd's logfile for details
2013-07-11 08:23:52 MSG merovingian[1179]: database 'bd_erp_dw' has crashed after start on 2013-07-11 08:15:19, attempting restart, up min/avg/max: 21h/22h/23h, crash average: 1.00 0.20 0.07 (4-2=2)
2013-07-11 08:23:53 MSG bd_erp_dw[27694]: arguments: /usr/bin/mserver5 --dbpath=/u/pentaho/monetdb/bd_erp_dw --set merovingian_uri=mapi:monetdb://bi:50000/bd_erp_dw --set mapi_open=false --set mapi_port=0 --set mapi_usock=/u/pentaho/mon
2013-07-11 08:23:53 MSG merovingian[1179]: database 'bd_erp_dw' (27694) has crashed (dumped core)
2013-07-11 08:23:53 ERR merovingian[1179]: client error: database 'bd_erp_dw' has crashed after starting, manual intervention needed, check monetdbd's logfile for details
2013-07-11 08:23:59 MSG merovingian[1179]: database 'bd_erp_dw' has crashed after start on 2013-07-11 08:23:52, attempting restart, up min/avg/max: 21h/22h/23h, crash average: 1.00 0.30 0.10 (5-2=3)
2013-07-11 08:23:59 MSG bd_erp_dw[27699]: arguments: /usr/bin/mserver5 --dbpath=/u/pentaho/monetdb/bd_erp_dw --set merovingian_uri=mapi:monetdb://bi:50000/bd_erp_dw --set mapi_open=false --set mapi_port=0 --set mapi_usock=/u/pentaho/mon
2013-07-11 08:23:59 MSG merovingian[1179]: database 'bd_erp_dw' (27699) has crashed (dumped core)
2013-07-11 08:23:59 ERR merovingian[1179]: client error: database 'bd_erp_dw' has crashed after starting, manual intervention needed, check monetdbd's logfile for details
2013-07-11 08:24:09 MSG merovingian[1179]: database 'bd_erp_dw' has crashed after start on 2013-07-11 08:23:59, attempting restart, up min/avg/max: 21h/22h/23h, crash average: 1.00 0.40 0.13 (6-2=4)
2013-07-11 08:24:09 MSG bd_erp_dw[27704]: arguments: /usr/bin/mserver5 --dbpath=/u/pentaho/monetdb/bd_erp_dw --set merovingian_uri=mapi:monetdb://bi:50000/bd_erp_dw --set mapi_open=false --set mapi_port=0 --set mapi_usock=/u/pentaho/mon
2013-07-11 08:24:09 MSG merovingian[1179]: database 'bd_erp_dw' (27704) has crashed (dumped core)
2013-07-11 08:24:09 ERR merovingian[1179]: client error: database 'bd_erp_dw' has crashed after starting, manual intervention needed, check monetdbd's logfile for details
2013-07-11 08:24:12 MSG merovingian[1179]: database 'bd_erp_dw' has crashed after start on 2013-07-11 08:24:09, attempting restart, up min/avg/max: 21h/22h/23h, crash average: 1.00 0.50 0.17 (7-2=5)
2013-07-11 08:24:12 MSG bd_erp_dw[27709]: arguments: /usr/bin/mserver5 --dbpath=/u/pentaho/monetdb/bd_erp_dw --set merovingian_uri=mapi:monetdb://bi:50000/bd_erp_dw --set mapi_open=false --set mapi_port=0 --set mapi_usock=/u/pentaho/mon
2013-07-11 08:24:12 MSG merovingian[1179]: database 'bd_erp_dw' (27709) has crashed (dumped core)
2013-07-11 08:24:12 ERR merovingian[1179]: client error: database 'bd_erp_dw' has crashed after starting, manual intervention needed, check monetdbd's logfile for details
2013-07-11 08:24:22 MSG merovingian[1179]: database 'bd_erp_dw' has crashed after start on 2013-07-11 08:24:12, attempting restart, up min/avg/max: 21h/22h/23h, crash average: 1.00 0.60 0.20 (8-2=6)
2013-07-11 08:24:22 MSG bd_erp_dw[27714]: arguments: /usr/bin/mserver5 --dbpath=/u/pentaho/monetdb/bd_erp_dw --set merovingian_uri=mapi:monetdb://bi:50000/bd_erp_dw --set mapi_open=false --set mapi_port=0 --set mapi_usock=/u/pentaho/mon
2013-07-11 08:24:22 MSG merovingian[1179]: database 'bd_erp_dw' (27714) has crashed (dumped core)
2013-07-11 08:24:22 ERR merovingian[1179]: client error: database 'bd_erp_dw' has crashed after starting, manual intervention needed, check monetdbd's logfile for details
2013-07-11 08:24:52 MSG merovingian[1179]: database 'bd_erp_dw' has crashed after start on 2013-07-11 08:24:22, attempting restart, up min/avg/max: 21h/22h/23h, crash average: 1.00 0.70 0.23 (9-2=7)
2013-07-11 08:24:52 MSG bd_erp_dw[27719]: arguments: /usr/bin/mserver5 --dbpath=/u/pentaho/monetdb/bd_erp_dw --set merovingian_uri=mapi:monetdb://bi:50000/bd_erp_dw --set mapi_open=false --set mapi_port=0 --set mapi_usock=/u/pentaho/mon
2013-07-11 08:24:52 MSG merovingian[1179]: database 'bd_erp_dw' (27719) has crashed (dumped core)
2013-07-11 08:24:52 ERR merovingian[1179]: client error: database 'bd_erp_dw' has crashed after starting, manual intervention needed, check monetdbd's logfile for details
2013-07-11 08:26:51 MSG control[1179]: (local): served status list
2013-07-11 08:27:36 MSG merovingian[1179]: database 'bd_erp_dw' has crashed after start on 2013-07-11 08:24:52, attempting restart, up min/avg/max: 21h/22h/23h, crash average: 1.00 0.80 0.27 (10-2=8)
2013-07-11 08:27:36 MSG bd_erp_dw[27939]: arguments: /usr/bin/mserver5 --dbpath=/u/pentaho/monetdb/bd_erp_dw --set merovingian_uri=mapi:monetdb://bi:50000/bd_erp_dw --set mapi_open=false --set mapi_port=0 --set mapi_usock=/u/pentaho/mon
2013-07-11 08:27:36 MSG merovingian[1179]: database 'bd_erp_dw' (27939) has crashed (dumped core)
2013-07-11 08:27:36 ERR merovingian[1179]: client error: database 'bd_erp_dw' has crashed after starting, manual intervention needed, check monetdbd's logfile for details
2013-07-11 08:42:35 MSG control[1179]: (local): served status list
## Comment 18913
Date: 2013-07-11 20:42:12 +0200
From: Glauber <<glauberal>>
Created attachment 210
core dump to mserver
> Attached file: [_usr_bin_mserver5.0.zip.001](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3321__usr_bin_mserver5.0.zip.001_210) (application/octet-stream, 1000000 bytes)
> Description: core dump to mserver
## Comment 18914
Date: 2013-07-11 20:42:40 +0200
From: Glauber <<glauberal>>
Created attachment 211
core dump to mserver part
> Attached file: [_usr_bin_mserver5.0.zip.002](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3321__usr_bin_mserver5.0.zip.002_211) (application/octet-stream, 525590 bytes)
> Description: core dump to mserver part
## Comment 18915
Date: 2013-07-11 20:45:13 +0200
From: Glauber <<glauberal>>
Excuse me.
I've been constantly encountering status crash database.
I use this bank as DW and use the COPY function as the main form of ETL.
After days of using the bank the same issues the status of crash and I can not access it anymore.
When this occurred I destroy the database and create again.
I have a core dump of the last crash but can not identify the cause of the crash.
What can I do to find a solution to this problem?
## Comment 18953
Date: 2013-07-31 09:38:28 +0200
From: @njnes
It seems your core files aren't complete (base64 decode fails).
Please send a backtrack of the crashing mserver5 instead.
| Constant status database crash. | https://api.github.com/repos/MonetDB/MonetDB/issues/3321/comments | 0 | 2020-11-30T12:32:50Z | 2024-06-27T12:00:27Z | https://github.com/MonetDB/MonetDB/issues/3321 | 753,440,910 | 3,321 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-07-10 18:33:42 +0200
From: Stella Giannakopoulou <<sgian>>
To: SQL devs <<bugs-sql>>
Version: 11.15.11 (Feb2013-SP3)
CC: charnik, @njnes, sgian, @drstmane
Last updated: 2013-07-31 09:41:54 +0200
## Comment 18910
Date: 2013-07-10 18:33:42 +0200
From: Stella Giannakopoulou <<sgian>>
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:22.0) Gecko/20100101 Firefox/22.0
Build Identifier:
I have created a table with a single column (varchar) and i am using the function "locate" in order to find the first occurence of a whitespace. I have also created a user defined function which calls the "locate" function. If i try to execute the user defined function in a select query, i am getting "Connection terminated" and the merovingian.log says that my database was killed by signal SIGSEGV.
Reproducible: Always
### Steps to Reproduce:
1. The script that creates the database is the following:
DROP FUNCTION parse_name;
DROP TABLE Label;
CREATE FUNCTION parse_name(name VARCHAR(250))
RETURNS INTEGER
BEGIN
DECLARE space_location INTEGER;
set space_location = (locate(' ', name));
return space_location;
END;
CREATE TABLE Label (
name VARCHAR(250)
);
COPY 6 RECORDS INTO Label FROM stdin;
Water
Coniferous forest
Railway tracks
Bridge
Urban - Buildings - type 1
Urban - Buildings - type 2
2. Execute the query:
select parse_name(name) from label;
### Actual Results:
Connection terminated
### Expected Results:
+---------------------+
| locate_single_value |
+=====================+
| 0 |
| 11 |
| 8 |
| 0 |
| 6 |
| 6 |
+---------------------+
When executing the following query:
select locate(' ', name) from label;
i am getting the expected results.
I have also tried to call some other string functions too inside my function and i am getting the same results. For example, i have modified the "parse_name" function as follows:
CREATE FUNCTION pcre_replace(a STRING, pattern STRING, replace STRING, flags STRING) returns STRING EXTERNAL NAME pcre.replace;
CREATE FUNCTION parse_name(name VARCHAR(250))
RETURNS VARCHAR(250)
BEGIN
DECLARE resul VARCHAR(250);
set resul = pcre_replace(name, '[ -/\()>]', '', 'i');
return resul;
END;
or
CREATE FUNCTION prefix(s STRING, l int) returns string external name str.prefix;
CREATE FUNCTION parse_name(name VARCHAR(250))
RETURNS VARCHAR(250)
BEGIN
DECLARE resul VARCHAR(250);
set resul = prefix(name, 1);
return resul;
END;
and i get the same error.
## Comment 18911
Date: 2013-07-10 18:37:09 +0200
From: Stella Giannakopoulou <<sgian>>
Created attachment 209
The sql dump of my database
> Attached file: [database_dump.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3320_database_dump.sql_209) (text/x-sql, 411 bytes)
> Description: The sql dump of my database
## Comment 18924
Date: 2013-07-18 09:50:52 +0200
From: @drstmane
Works fine for me with 64-bit Feb2013-SP3 on 64-bit Fedora 18.
| Receiving SIGSEGV when calling string functions inside a user defined function | https://api.github.com/repos/MonetDB/MonetDB/issues/3320/comments | 0 | 2020-11-30T12:32:48Z | 2024-06-28T07:23:22Z | https://github.com/MonetDB/MonetDB/issues/3320 | 753,440,887 | 3,320 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-07-09 09:30:24 +0200
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: 11.15.11 (Feb2013-SP3)
CC: @njnes
Last updated: 2013-09-27 13:47:18 +0200
## Comment 18909
Date: 2013-07-09 09:30:24 +0200
From: @drstmane
create function MyFunc2()
returns int
begin
declare table t (a int unique);
insert into t values (1);
return select count(*) from t;
end;
select MyFunc2();
drop function MyFunc2;
results in
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffee3d1700 (LWP 15276)]
0x00007fffef489899 in mvc_bind_key (m=0x7fffe0005470, s=0x0, kname=0x7fffef773fa0 "t_a_unique") at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/sql_mvc.c:678
678 node *n = list_find_name(s->keys, kname);
Missing separate debuginfos, use: debuginfo-install bzip2-libs-1.0.6-3.fc15.x86_64 cfitsio-3.280-2.fc16.x86_64 cyrus-sasl-lib-2.1.23-27.fc16.x86_64 geos-3.3.1-1.fc16.x86_64 glibc-2.14.90-24.fc16.9.x86_64 keyutils-libs-1.5.2-1.fc16.x86_64 krb5-libs-1.9.4-3.fc16.x86_64 libcom_err-1.41.14-2.fc15.x86_64 libcurl-7.21.7-8.fc16.x86_64 libgcc-4.6.3-2.fc16.x86_64 libidn-1.22-3.fc16.x86_64 libselinux-2.1.6-6.fc16.x86_64 libssh2-1.2.7-4.fc16.x86_64 libstdc++-4.6.3-2.fc16.x86_64 libuuid-2.20.1-2.3.fc16.x86_64 libxml2-2.7.8-8.fc16.x86_64 ncurses-libs-5.9-2.20110716.fc16.x86_64 nspr-4.9.4-1.fc16.x86_64 nss-3.14.1-3.fc16.x86_64 nss-softokn-freebl-3.14.1-3.fc16.x86_64 nss-util-3.14.1-1.fc16.x86_64 openldap-2.4.26-8.fc16.x86_64 openssl-1.0.0j-1.fc16.x86_64 pcre-8.12-9.fc16.x86_64 readline-6.2-2.fc16.x86_64 zlib-1.2.5-7.fc16.x86_64
(gdb) bt
0 0x00007fffef489899 in mvc_bind_key (m=0x7fffe0005470, s=0x0, kname=0x7fffef773fa0 "t_a_unique") at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/sql_mvc.c:678
1 0x00007fffef4af74b in column_constraint_type (sql=0x7fffe0005470, name=0x7fffef773fa0 "t_a_unique", s=0x7fffe009cf80, ss=0x0, t=0x7fffe009dd10, cs=0x7fffe009de50) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_schema.c:279
2 0x00007fffef4afb9d in column_option (sql=0x7fffe0005470, s=0x7fffe009d020, ss=0x0, t=0x7fffe009dd10, cs=0x7fffe009de50) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_schema.c:368
3 0x00007fffef4afe23 in column_options (sql=0x7fffe0005470, opt_list=0x7fffe009d040, ss=0x0, t=0x7fffe009dd10, cs=0x7fffe009de50) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_schema.c:424
4 0x00007fffef4b0753 in create_column (sql=0x7fffe0005470, s=0x7fffe009d140, ss=0x0, t=0x7fffe009dd10, alter=0) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_schema.c:593
5 0x00007fffef4b0a15 in table_element (sql=0x7fffe0005470, s=0x7fffe009d140, ss=0x0, t=0x7fffe009dd10, alter=0) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_schema.c:649
6 0x00007fffef4b16c5 in rel_create_table (sql=0x7fffe0005470, ss=0x181a490, temp=3, sname=0x0, name=0x7fffe009cf10 "t", table_elements_or_subquery=0x7fffe009d1b0, commit_action=1, loc=0x0) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_schema.c:838
7 0x00007fffef4d28bd in rel_psm_declare_table (sql=0x7fffe0005470, n=0x7fffe009d1f0) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_psm.c:166
8 0x00007fffef4d3ffd in sequential_block (sql=0x7fffe0005470, restype=0x7fffe009cea8, blk=0x7fffe009cef0, opt_label=0x0, is_func=1) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_psm.c:540
9 0x00007fffef4d4c8e in rel_create_func (sql=0x7fffe0005470, qname=0x7fffe009ce30, params=0x0, res=0x7fffe009ced0, ext_name=0x0, body=0x7fffe009cef0, type=1) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_psm.c:763
10 0x00007fffef4d6501 in rel_psm (sql=0x7fffe0005470, s=0x7fffe009dc60) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_psm.c:1074
11 0x00007fffef4906eb in rel_semantic (sql=0x7fffe0005470, s=0x7fffe009dc60) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_semantic.c:214
12 0x00007fffef4191e6 in sql_symbol2relation (c=0x7fffe0005470, sym=0x7fffe009dc60) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/backends/monet5/sql.mx:1723
13 0x00007fffef3e571d in SQLparser (c=0x62d028) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/backends/monet5/sql_scenario.c:1700
14 0x00007ffff7a73363 in runPhase (c=0x62d028, phase=1) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/monetdb5/mal/mal_scenario.c:522
15 0x00007ffff7a734b5 in runScenarioBody (c=0x62d028) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/monetdb5/mal/mal_scenario.c:557
16 0x00007ffff7a7366f in runScenario (c=0x62d028) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/monetdb5/mal/mal_scenario.c:586
17 0x00007ffff7a746e8 in MSserveClient (dummy=0x62d028) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/monetdb5/mal/mal_session.c:431
18 0x0000003cf3c07d90 in start_thread () from /lib64/libpthread.so.0
19 0x0000003cf30f119d in clone () from /lib64/libc.so.6
(gdb) li
673 }
674
675 sql_key *
676 mvc_bind_key(mvc *m, sql_schema *s, char *kname)
677 {
678 node *n = list_find_name(s->keys, kname);
679 sql_key *k;
680
681 (void) m;
682 if (!n)
(gdb) l s
671
672 return c;
673 }
674
675 sql_key *
676 mvc_bind_key(mvc *m, sql_schema *s, char *kname)
677 {
678 node *n = list_find_name(s->keys, kname);
679 sql_key *k;
680
(gdb) p s
$1 = (sql_schema *) 0x0
(gdb) up
1 0x00007fffef4af74b in column_constraint_type (sql=0x7fffe0005470, name=0x7fffef773fa0 "t_a_unique", s=0x7fffe009cf80, ss=0x0, t=0x7fffe009dd10, cs=0x7fffe009de50) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_schema.c:279
279 if (name && mvc_bind_key(sql, ss, name)) {
(gdb) li
274
275 if (kt == pkey && t->pkey) {
276 (void) sql_error(sql, 02, "42000!CONSTRAINT PRIMARY KEY: a table can have only one PRIMARY KEY\n");
277 return res;
278 }
279 if (name && mvc_bind_key(sql, ss, name)) {
280 (void) sql_error(sql, 02, "42000!CONSTRAINT PRIMARY KEY: key %s already exists", name);
281 return res;
282 }
283 k = (sql_key*)mvc_create_ukey(sql, t, name, kt);
(gdb) p ss
$2 = (sql_schema *) 0x0
(gdb) up
2 0x00007fffef4afb9d in column_option (sql=0x7fffe0005470, s=0x7fffe009d020, ss=0x0, t=0x7fffe009dd10, cs=0x7fffe009de50) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_schema.c:368
368 res = column_constraint_type(sql, opt_name, sym, ss, t, cs);
(gdb) li
363
364 if (!sym) /* For now we only parse CHECK Constraints */
365 return SQL_OK;
366 if (!opt_name)
367 opt_name = column_constraint_name(sym, cs, t);
368 res = column_constraint_type(sql, opt_name, sym, ss, t, cs);
369 } break;
370 case SQL_DEFAULT: {
371 char *err = NULL, *r = symbol2string(sql, s->data.sym, &err);
372
(gdb) p ss
$3 = (sql_schema *) 0x0
(gdb) up
3 0x00007fffef4afe23 in column_options (sql=0x7fffe0005470, opt_list=0x7fffe009d040, ss=0x0, t=0x7fffe009dd10, cs=0x7fffe009de50) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_schema.c:424
424 int res = column_option(sql, n->data.sym, ss, t, cs);
(gdb) li
419
420 if (opt_list) {
421 dnode *n = NULL;
422
423 for (n = opt_list->h; n; n = n->next) {
424 int res = column_option(sql, n->data.sym, ss, t, cs);
425
426 if (res == SQL_ERR)
427 return SQL_ERR;
428 }
(gdb) p ss
$4 = (sql_schema *) 0x0
(gdb) up
4 0x00007fffef4b0753 in create_column (sql=0x7fffe0005470, s=0x7fffe009d140, ss=0x0, t=0x7fffe009dd10, alter=0) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_schema.c:593
593 if (column_options(sql, opt_list, ss, t, cs) == SQL_ERR)
(gdb) li
588 if (cs) {
589 sql_error(sql, 02, "42S21!%s TABLE: a column named '%s' already exists\n", (alter)?"ALTER":"CREATE", cname);
590 return SQL_ERR;
591 }
592 cs = mvc_create_column(sql, t, cname, ctype);
593 if (column_options(sql, opt_list, ss, t, cs) == SQL_ERR)
594 return SQL_ERR;
595 }
596
597 if (res == SQL_ERR)
(gdb) p ss
$5 = (sql_schema *) 0x0
(gdb) up
5 0x00007fffef4b0a15 in table_element (sql=0x7fffe0005470, s=0x7fffe009d140, ss=0x0, t=0x7fffe009dd10, alter=0) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_schema.c:649
649 res = create_column(sql, s, ss, t, alter);
(gdb) li
644 return SQL_ERR;
645 }
646
647 switch (s->token) {
648 case SQL_COLUMN:
649 res = create_column(sql, s, ss, t, alter);
650 break;
651 case SQL_CONSTRAINT:
652 res = table_constraint(sql, s, ss, t);
653 break;
(gdb) p ss
$6 = (sql_schema *) 0x0
(gdb) up
6 0x00007fffef4b16c5 in rel_create_table (sql=0x7fffe0005470, ss=0x181a490, temp=3, sname=0x0, name=0x7fffe009cf10 "t", table_elements_or_subquery=0x7fffe009d1b0, commit_action=1, loc=0x0) at /ufs/manegold/_/Monet/HG/Feb2013/source/MonetDB/sql/server/rel_schema.c:838
838 int res = table_element(sql, sym, s, t, 0);
(gdb) p ss
$7 = (sql_schema *) 0x181a490
(gdb) p *ss
$8 = {base = {wtime = 0, rtime = 0, flag = 0, id = 2000, name = 0x181a580 "sys"}, auth_id = 2, owner = 3, tables = {sa = 0x1a08d70, destroy = 0x7fffef4f51af <table_destroy>, set = 0x181a7c0, dset = 0x0, nelm = 0x0}, types = {sa = 0x1a08d70, destroy = 0, set = 0x1826d30, dset = 0x0, nelm = 0x0}, funcs = {
sa = 0x1a08d70, destroy = 0, set = 0x1823ad0, dset = 0x0, nelm = 0x0}, seqs = {sa = 0x1a08d70, destroy = 0, set = 0x0, dset = 0x0, nelm = 0x0}, keys = 0x181a590, idxs = 0x181a5c0, triggers = 0x181a5f0, internal = 0x0, tr = 0x0}
## Comment 18956
Date: 2013-07-31 10:46:43 +0200
From: @njnes
solved, we do not handle declared tables with unique/primary or foreign key constraints, ie we properly return an error now.
## Comment 18959
Date: 2013-07-31 10:49:30 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [6b9d21862a6a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6b9d21862a6a) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6b9d21862a6a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6b9d21862a6a)
Changeset description:
fixed bug #3329, ie handle abort on error bit on subavg call
fixed bug #3319, return error on unique/primary/foreign constraints on declared tables
fixed bug #3318, correctly find the declared tables
| UNIQUE column in DECLAREd TABLE in FUNCTION results in segfault | https://api.github.com/repos/MonetDB/MonetDB/issues/3319/comments | 0 | 2020-11-30T12:32:45Z | 2024-06-27T12:00:25Z | https://github.com/MonetDB/MonetDB/issues/3319 | 753,440,855 | 3,319 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-07-09 09:24:31 +0200
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: 11.15.11 (Feb2013-SP3)
CC: @njnes
Last updated: 2013-09-27 13:47:17 +0200
## Comment 18908
Date: 2013-07-09 09:24:31 +0200
From: @drstmane
While INSERT appears to work fine, UPDATE does not work with / does not see DECLAREd TABLE in SQL FUNCTION:
$ cat /tmp/x.sql
create function MyFunc1()
returns int
begin
declare table t (a int);
insert into t values (1);
update t set i = 0;
return 0;
end;
select MyFunc1();
drop function MyFunc1;
$ mclient /tmp/x.sql
UPDATE: no such table 't'
SELECT: no such operator 'myfunc1'
DROP FUNCTION: no such function 'myfunc1'
## Comment 18955
Date: 2013-07-31 10:45:41 +0200
From: @njnes
fixed, ie we now properly find declared tables also in the update_table code
## Comment 18958
Date: 2013-07-31 10:49:30 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [6b9d21862a6a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6b9d21862a6a) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6b9d21862a6a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6b9d21862a6a)
Changeset description:
fixed bug #3329, ie handle abort on error bit on subavg call
fixed bug #3319, return error on unique/primary/foreign constraints on declared tables
fixed bug #3318, correctly find the declared tables
| UPDATE does not work with DECLEAREd TABLE in FUNCTION | https://api.github.com/repos/MonetDB/MonetDB/issues/3318/comments | 0 | 2020-11-30T12:32:42Z | 2024-06-27T12:00:24Z | https://github.com/MonetDB/MonetDB/issues/3318 | 753,440,818 | 3,318 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-07-03 12:09:33 +0200
From: Dieter <<mayerd>>
To: SQL devs <<bugs-sql>>
Version: 11.15.11 (Feb2013-SP3)
CC: @njnes
Last updated: 2015-12-16 08:43:31 +0100
## Comment 18900
Date: 2013-07-03 12:09:33 +0200
From: Dieter <<mayerd>>
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; MALC)
Build Identifier:
SELECT Statement ends with error:
[MonetDB][ODBC Driver 11.15.11]cannot use non GROUP BY column 'valid_from' in query results without an aggregate function
select vid, date, cur, val,
(select max(price) from prices p where
p.valid_from =
(select max(q.valid_from) from prices q
where q.valid_from <= v.date
and q.currency = v.cur )
) as Preis
from vouchers v;
Reproducible: Always
### Steps to Reproduce:
Here my steps:
create table prices (currency char(3) ,
valid_from char(8), price decimal(15,2));
insert into prices values('USD', '20130101' , 1.2);
insert into prices values('USD', '20130201' , 1.3);
create table vouchers (vid int, date char(8), cur char(3), val decimal(15,2));
insert into vouchers values(1, '20130110' , 'USD' , 1000.0)
insert into vouchers values(1, '20130210' , 'USD' , 2000.0)
select vid, date, cur, val,
(select max(price) from prices p where
p.valid_from =
(select max(q.valid_from) from prices q
where q.valid_from <= v.date
and q.currency = v.cur )
) as Preis
from vouchers v;
### Actual Results:
error message:
[MonetDB][ODBC Driver 11.15.11]cannot use non GROUP BY column 'valid_from' in query results without an aggregate function
### Expected Results:
There should be 2 records in the result set,
each with the appropriate price.
one record with id=1, date=20130110 cur=USD val=1000 price 1.2
one record with id=2, date=20130210 cur=USD val=2000 price 1.3
The SELECT should give for each voucher the valid price from the table prices
depending on the date of the voucher and the valid_from date of each price.
## Comment 18960
Date: 2013-07-31 11:36:48 +0200
From: @njnes
fixed, by a large rewrite of the parser. We now handle many more correlated cases in a cleaner way (using a relational apply operator)
## Comment 21668
Date: 2015-12-16 08:43:31 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [02b5c58d1717](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=02b5c58d1717) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=02b5c58d1717](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=02b5c58d1717)
Changeset description:
removed old hack from merge table optimizer, ie handling group by/group by combinations.
(fixing old bug #3317, which broke after recent fixes)
| correlated subselect does not work | https://api.github.com/repos/MonetDB/MonetDB/issues/3317/comments | 0 | 2020-11-30T12:32:40Z | 2024-06-27T12:00:23Z | https://github.com/MonetDB/MonetDB/issues/3317 | 753,440,788 | 3,317 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-07-01 15:40:06 +0200
From: Jonathan Lajus <<lajus>>
To: SQL devs <<bugs-sql>>
Version: 11.15.11 (Feb2013-SP3)
CC: lajus, @njnes
Last updated: 2013-08-18 16:41:05 +0200
## Comment 18897
Date: 2013-07-01 15:40:06 +0200
From: Jonathan Lajus <<lajus>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0
Build Identifier:
When running R with monetinR package under valgrind. Happens only for the first callString.
The package execute the same code than mserver5 (main function), with the few exceptions:
+callString(mal_clients, "sql.init();\n", 0);
+callString(mal_clients, "sql.start();\n", 0);
-MSserveClient(mal_clients);
All queries are called by a: callString(query);
That's why I think it's monetdb issue but I may miss something to initialize.
Reproducible: Always
### Steps to Reproduce:
1. Launch R with monetinR package
2. call monetinR::init function (similar to mserver5 main function as described in details)
3. send a query (monetinR::dummy which call callString("explain SELECT optimizer;");)
### Actual Results:
The expected result plus valgrind errors:
==10531== Invalid read of size 8
==10531== at 0x145F340B: scanner_query_processed (sql_scan.c:408)
==10531== by 0x14587D11: sqlcleanup (sql.mx:1838)
==10531== by 0x14555F9F: SQLengineIntern (sql_scenario.c:1970)
==10531== by 0x14556249: SQLengine (sql_scenario.c:2013)
==10531== by 0x109EC2D5: callString (mal_import.c:406)
==10531== by 0x10720ED8: monetinR_dummy (Rinterface.c:262)
[R stack]
==10531== Address 0xc258c70 is 32 bytes inside a block of size 48 free'd
==10531== at 0x4A077E6: free (vg_replace_malloc.c:446)
==10531== by 0x11C880B0: bstream_destroy (stream.c:3210)
==10531== by 0x109DBEF2: MCpopClientInput (mal_client.c:120)
==10531== by 0x109EC109: callString (mal_import.c:403)
==10531== by 0x10720ED8: monetinR_dummy (Rinterface.c:262)
[R stack]
This is one sample but there are others valgrind errors.
### Expected Results:
&1 0 8 1 8
% .explain table_name
% mal name
% clob type
% 68 length
=function user.s0_0{autoCommit=true}():void;
= X_2 := sql.mvc();
= X_4:str := sql.getVariable(X_2,"optimizer");
= sql.exportValue(1,".","single_value","varchar",1024,0,4,X_4,"");
=end s0_0;
= querylog.define("explain select optimizer;","leaker_pipe")
= optimizer.mitosis()
= optimizer.dataflow()
## Comment 18899
Date: 2013-07-03 09:04:12 +0200
From: @njnes
callString creates a temporary stream, your sql.start() call
will create a sql client context, which will include (expects) a
input stream. It even expects that all input will come from this stream.
As this isn't the case (callString destroys it) you get this problems.
After sql.start you should probably switch to using SQLcompileIntern.
Then still the sql context destruction on the end needs more work.
## Comment 18939
Date: 2013-07-22 14:31:18 +0200
From: Jonathan Lajus <<lajus>>
(In reply to comment 1)
> callString creates a temporary stream, your sql.start() call
> will create a sql client context, which will include (expects) a
> input stream. It even expects that all input will come from this stream.
> As this isn't the case (callString destroys it) you get this problems.
> After sql.start you should probably switch to using SQLcompileIntern.
> Then still the sql context destruction on the end needs more work.
Finally, what was a valgrind error leaded sometimes to a tricky segmentation fault (tricky because the error happened only once on ten tests and didn't appeared at all when I used debbuging tool).
Anyway, I didn't find any SQLcompileIntern function so I assume you meant SQLstatementIntern in sql_scenario. It will also create a new context and destroy it nicely at the end (at least, I expect so).
The thing is, it seems it doesn't use the same parser than the casual SQL client. For example, the instruction EXPLAIN is dismissed. The instruction "EXPLAIN SELECT * FROM whatever;" will return the same result than "SELECT * FROM whatever;".
It's not a big deal but it's inconvenient for debugging purposes. And I don't know if it will *only* dismiss MonetDB specific keywords (I hope so).
| sqlcleanup will read/write freed stream client.fdin after a callString | https://api.github.com/repos/MonetDB/MonetDB/issues/3316/comments | 0 | 2020-11-30T12:32:38Z | 2024-06-28T07:23:21Z | https://github.com/MonetDB/MonetDB/issues/3316 | 753,440,755 | 3,316 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-06-26 13:08:12 +0200
From: Pete Hollobon <<pete>>
To: SQL devs <<bugs-sql>>
Version: 11.15.11 (Feb2013-SP3)
CC: @njnes
Last updated: 2013-09-27 13:47:18 +0200
## Comment 18892
Date: 2013-06-26 13:08:12 +0200
From: Pete Hollobon <<pete>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36
Build Identifier:
When using a subquery in a DELETE, if one references a column that does not exist in the subquery context, but does exist in the outer table being deleted from, strange things happen:
Welcome to mclient, the MonetDB/SQL interactive terminal (Feb2013-SP2)
Database: MonetDB v11.15.7 (Feb2013-SP2), 'mapi:monetdb://glx:50000/test'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>create table x (a integer);
operation successful (1.714ms)
sql>create table y (b integer);
operation successful (1.790ms)
sql>insert into x values (1), (2), (3), (4);
4 affected rows (1.448ms)
sql>insert into y values (1), (2), (3), (4);
4 affected rows (1.648ms)
sql>select * from x;
+------+
| a |
+======+
| 1 |
| 2 |
| 3 |
| 4 |
+------+
4 tuples (0.849ms)
sql>select * from y;
+------+
| b |
+======+
| 1 |
| 2 |
| 3 |
| 4 |
+------+
4 tuples (0.920ms)
sql>select a from y;
SELECT: identifier 'a' unknown
sql>delete from x where a in (select nonexistant from y);
SELECT: identifier 'nonexistant' unknown
sql>delete from x where a in (select a from y);
4 affected rows (35.053ms)
sql>select * from x;
+---+
| a |
+===+
+---+
0 tuples (1.007ms)
sql>insert into x values (1), (2), (3), (4);
4 affected rows (1.272ms)
sql>delete from x where a in (select a from y where a < 10);
8 affected rows (3.040ms)
sql>select * from x;
+---+
| a |
+===+
+---+
0 tuples (0.506ms)
Reproducible: Always
## Comment 18893
Date: 2013-06-26 13:14:18 +0200
From: Pete Hollobon <<pete>>
Actually, thinking about it, most of that is normal - the only thing that seems odd is the row count here:
sql>delete from x where a in (select a from y where a < 10);
8 affected rows (3.040ms)
## Comment 18895
Date: 2013-06-26 13:49:36 +0200
From: @njnes
Indeed only the deleted row count of 8 seems is wrong (we cannot delete more rows than inserted).
## Comment 18896
Date: 2013-06-26 13:53:49 +0200
From: Pete Hollobon <<pete>>
Interestingly that count increases every time one inserts more rows into the table and runs the delete again. It looks like it's including rows marked as deleted in the count.
## Comment 18963
Date: 2013-07-31 13:46:50 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [2ee5dc3af6c5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2ee5dc3af6c5) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2ee5dc3af6c5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2ee5dc3af6c5)
Changeset description:
fixed bug #3315, bailout in pushselect down on tinter
## Comment 18964
Date: 2013-07-31 13:47:20 +0200
From: @njnes
fixed
| Incorrect behavior with subqueries in DELETE | https://api.github.com/repos/MonetDB/MonetDB/issues/3315/comments | 0 | 2020-11-30T12:32:35Z | 2024-06-27T12:00:21Z | https://github.com/MonetDB/MonetDB/issues/3315 | 753,440,723 | 3,315 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-06-24 08:36:07 +0200
From: @drstmane
To: MonetDB5 devs <<bugs-monetdb5>>
Version: -- development
Last updated: 2013-07-08 11:45:09 +0200
## Comment 18891
Date: 2013-06-24 08:36:07 +0200
From: @drstmane
Tests monetdb5/modules/atoms/Tests/json00.mal & monetdb5/modules/atoms/Tests/json02.mal fail on big-endian systems (PowerPC & SPARC), suggesting an endianess problem somewhere in related code. Cf.,
http://monetdb.cwi.nl/testweb/web/showtestoutput.php?serial=47938:db39d8fe0e1d&target=GNU-Darwin-powerpc&module=monetdb5&test=monetdb5%2Fmodules%2Fatoms%2Fjson00&which=out
http://monetdb.cwi.nl/testweb/web/showtestoutput.php?serial=47938:db39d8fe0e1d&target=GNU-Darwin-powerpc&module=monetdb5&test=monetdb5%2Fmodules%2Fatoms%2Fjson02&which=out
## Comment 18906
Date: 2013-07-08 11:45:09 +0200
From: @sjoerdmullender
The error does not seem to occur anymore. My guess is, it was fixed with changeset [f72d0fffb4ea](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f72d0fffb4ea)
| Tests json00.mal & json02.mal fail on big-endian systems | https://api.github.com/repos/MonetDB/MonetDB/issues/3314/comments | 0 | 2020-11-30T12:32:32Z | 2024-06-27T12:00:20Z | https://github.com/MonetDB/MonetDB/issues/3314 | 753,440,693 | 3,314 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-06-20 21:53:13 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.15.1 (Feb2013)
CC: @njnes
Last updated: 2015-05-08 10:28:53 +0200
## Comment 18873
Date: 2013-06-20 21:53:13 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36
Build Identifier:
The script in attachment contains a schema definition (no data) and a final EXPLAIN statement. The MAL plan generation fails with an assertion in rel2bin_project.
Reproducible: Always
### Actual Results:
2013-06-20 21:47:42 ERR x[32241]: mserver5: /opt/spinque/MonetDBServer/MonetDB.Spinque_Feb2013/src/sql/backends/monet5/rel_bin.c:2390: rel2bin_project: Assertion `0' failed.
2013-06-20 21:47:42 MSG x[32241]: could not find L2.L2
2013-06-20 21:47:42 MSG x[32241]: s.prob
2013-06-20 21:47:42 MSG x[32241]: d.idstr
2013-06-20 21:47:42 MSG x[32241]: d.id
2013-06-20 21:47:42 MSG x[32241]: d.type
2013-06-20 21:47:42 MSG x[32241]: d.%TID%
2013-06-20 21:47:42 MSG x[32241]: d.%dict_id_pkey
2013-06-20 21:47:42 MSG x[32241]: L1.id
2013-06-20 21:47:42 MSG x[32241]: L1.pid
2013-06-20 21:47:42 MSG x[32241]: L1.class
2013-06-20 21:47:42 MSG x[32241]: L1.xml
2013-06-20 21:47:42 MSG x[32241]: L1.json
2013-06-20 21:47:42 MSG x[32241]: L1.prob
changeset: 47997:918b41d7564d
branch: Feb2013
parent: 47995:223fee7295a2
user: Hannes Muehleisen <hannes@cwi.nl>
date: Wed Jun 19 15:23:34 2013 +0200
summary: Post release build.
$ mserver5 --version
MonetDB 5 server v11.15.10 (64-bit, 64-bit oids)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2013 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 15.6GiB available memory, 8 available cpu cores
Libraries:
libpcre: 8.31 2012-07-06 (compiled with 8.31)
openssl: OpenSSL 1.0.1e 11 Feb 2013 (compiled with OpenSSL 1.0.1e-fips 11 Feb 2013)
libxml2: 2.9.1 (compiled with 2.9.1)
Compiled by: roberto@photon.spinque.com (x86_64-unknown-linux-gnu)
Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code
Linking : /usr/bin/ld -m elf_x86_64
## Comment 18874
Date: 2013-06-20 21:55:48 +0200
From: @swingbit
Created attachment 206
SQL test script
> Attached file: [MonetDB_BUG3313.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3313_MonetDB_BUG3313.sql_206) (application/octet-stream, 13131 bytes)
> Description: SQL test script
## Comment 18876
Date: 2013-06-22 17:08:30 +0200
From: @njnes
fixed. We use hash tables to speed up the search for expressions. The expression was hashed using the 'old' expression names. Also added the test.
## Comment 18879
Date: 2013-06-22 17:48:22 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [2b0eb9d109d6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2b0eb9d109d6) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2b0eb9d109d6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2b0eb9d109d6)
Changeset description:
fixed bug #3313 and added test
## Comment 19208
Date: 2013-09-28 18:36:35 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [3a217ab8dbb9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3a217ab8dbb9) made by Stefan Manegold <Stefan.Manegold@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3a217ab8dbb9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3a217ab8dbb9)
Changeset description:
test hashed_exp.Bug-3313 requires GEOM support
## Comment 20855
Date: 2015-05-08 10:28:53 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [bc8ff45b95d1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bc8ff45b95d1) made by Foteini Alvanaki <foteini.alvanaki@monetdbsolutions.com> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bc8ff45b95d1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bc8ff45b95d1)
Changeset description:
hashed_exp.Bug-3313 updated
| Assertion in rel2bin_project | https://api.github.com/repos/MonetDB/MonetDB/issues/3313/comments | 0 | 2020-11-30T12:32:30Z | 2024-06-27T12:00:19Z | https://github.com/MonetDB/MonetDB/issues/3313 | 753,440,673 | 3,313 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-06-20 20:59:39 +0200
From: Brandon Jackson <<monetdbuser>>
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 11.15.19 (Feb2013-SP6)
CC: @mlkersten
Last updated: 2014-02-01 11:27:38 +0100
## Comment 18870
Date: 2013-06-20 20:59:39 +0200
From: Brandon Jackson <<monetdbuser>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36
Build Identifier:
MonetDB appears to be crashing (double free errors) at some point during the process of shutting down. It starts up without error. We have a cron job stop monetdb each morning at 2 AM and then restart it a few minutes later by issuing the commands:
monetdb stop -a
monetdbd stop /home/monetdb/sg-farm
After a few minutes:
monetdbd start /home/monetdb/sg-farm
monetdb start -a
Whatever the problem, it causes the failure count to go up, so our database is marked as gradually more unhealthy.
Reproducible: Always
## Comment 18871
Date: 2013-06-20 21:02:11 +0200
From: Brandon Jackson <<monetdbuser>>
Created attachment 204
Log file from server start and stop.
> Attached file: [merovingian.log.gz](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3312_merovingian.log.gz_204) (application/gzip, 122358 bytes)
> Description: Log file from server start and stop.
## Comment 18872
Date: 2013-06-20 21:03:17 +0200
From: Brandon Jackson <<monetdbuser>>
Created attachment 205
The startup script we use.
Feel free to use and distribute this script as you see fit. I wanted to provide insight into how we are starting and stopping monetdb each night.
> Attached file: [manage_monetdb.sh](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3312_manage_monetdb.sh_205) (application/octet-stream, 1148 bytes)
> Description: The startup script we use.
## Comment 19014
Date: 2013-08-16 21:48:48 +0200
From: @mlkersten
Sofar not being able to reproduce it. A double free is not acceptable, but unclear how to trace it. The valgrind runs do not indicate an error.
Consider it for the time being as closed.
## Comment 19515
Date: 2014-02-01 11:27:38 +0100
From: @mlkersten
consider it close until further reporting details
| /usr/bin/mserver5: double free or corruption (top) | https://api.github.com/repos/MonetDB/MonetDB/issues/3312/comments | 0 | 2020-11-30T12:32:27Z | 2024-06-27T12:00:18Z | https://github.com/MonetDB/MonetDB/issues/3312 | 753,440,640 | 3,312 |
[
"MonetDB",
"MonetDB"
] | Date: 2013-06-20 11:13:44 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.15.3 (Feb2013-SP1)
CC: @mlkersten, @njnes
Last updated: 2013-09-27 13:47:16 +0200
## Comment 18866
Date: 2013-06-20 11:13:44 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36
Build Identifier:
I could not really pinpoint the exact cause for this bug, however I have a reproducible test and a few remarks.
The query triggering the bug:
SELECT x.idstr, '{ "pid":"'||x.idstr||'" }' as json
FROM y, x
WHERE y.subject=x.id;
The assertion: src/monetdb5/modules/atoms/str.c:1357: strLength: Assertion `l <2147483647' failed.
gdb sais:
Thread 10 (Thread 0x7f99a5a5d700 (LWP 1209)):
0 0x0000003d8dc35ba5 in raise () from /lib64/libc.so.6
1 0x0000003d8dc37358 in abort () from /lib64/libc.so.6
2 0x0000003d8dc2e972 in __assert_fail_base () from /lib64/libc.so.6
3 0x0000003d8dc2ea22 in __assert_fail () from /lib64/libc.so.6
4 0x00007f99c0058743 in strLength (res=0x7f99a5a5c430, s=0x7f998418a7f0 "{ \"pid\":\"\310\064\" }") at /opt/spinque/MonetDBServer/MonetDB.Spinque_Feb2013/src/monetdb5/modules/atoms/str.c:1357
5 0x00007f99b77ea23f in bat_max_strlength (b=0x7f9984003e50) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Feb2013/src/sql/backends/monet5/sql_result.c:219
6 0x00007f99b77ef6a4 in export_length (s=0x7f99a0004b00, mtype=12, eclass=4, digits=0, scale=0, tz=0, bid=4194, p=0x0) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Feb2013/src/sql/backends/monet5/sql_result.c:1189
7 0x00007f99b77f06ba in mvc_export_head (m=0x7f9998005470, s=0x7f99a0004b00, res_id=2, only_header=1) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Feb2013/src/sql/backends/monet5/sql_result.c:1477
8 0x00007f99b77f0aff in mvc_export_result (m=0x7f9998005470, s=0x7f99a0004b00, res_id=2) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Feb2013/src/sql/backends/monet5/sql_result.c:1546
...
Note that:
- The string \"pid\":\"\310\064\", for which strLength fails, DOES NOT exist in the data. It must be the wrong outcome of previous intermediate results.
- removing the join with y, it works
- removing the concatenation bit, it works
- removing the first column from the target list, it works
- disabling mitosis, it works
- with less data, it works
Reproducible: Always
### Actual Results:
/src/monetdb5/modules/atoms/str.c:1357: strLength: Assertion `l <2147483647' failed.
changeset: 47997:918b41d7564d
branch: Feb2013
parent: 47995:223fee7295a2
user: Hannes Muehleisen <hannes@cwi.nl>
date: Wed Jun 19 15:23:34 2013 +0200
summary: Post release build.
$ mserver5 --version
MonetDB 5 server v11.15.10 (64-bit, 64-bit oids)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2013 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 15.6GiB available memory, 8 available cpu cores
Libraries:
libpcre: 8.31 2012-07-06 (compiled with 8.31)
openssl: OpenSSL 1.0.1e 11 Feb 2013 (compiled with OpenSSL 1.0.1e-fips 11 Feb 2013)
libxml2: 2.9.1 (compiled with 2.9.1)
Compiled by: roberto@photon.spinque.com (x86_64-unknown-linux-gnu)
Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code
Linking : /usr/bin/ld -m elf_x86_64
## Comment 18867
Date: 2013-06-20 11:16:21 +0200
From: @swingbit
I cannot make the test with real data public. I can send the file if you ask me by email.
## Comment 18869
Date: 2013-06-20 11:41:41 +0200
From: @mlkersten
Could you run it with valgrind? It seems there might be an issue much earlier in the process.
## Comment 18875
Date: 2013-06-22 15:46:53 +0200
From: @njnes
Fixed. This was a very interesting bug. The problem was caused by a concurrent mat pack which triggered a BATappend, which again called string_insert_bat.
That string_insert_bat has a nice optimization for the case when we don't eliminate duplicates anymore, ie its simply copies the var-heap.
This is all fine, but the bun (offset) copying was done by disabling
the varsized atom marker. Which caused the concurrent string concat function to see the offset as strings.
| strLength assertion on join and concat | https://api.github.com/repos/MonetDB/MonetDB/issues/3311/comments | 0 | 2020-11-30T12:32:24Z | 2024-06-27T12:00:17Z | https://github.com/MonetDB/MonetDB/issues/3311 | 753,440,602 | 3,311 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.