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: 2016-05-19 12:17:30 +0200
From: @yzchang
To: SQL devs <<bugs-sql>>
Version: 11.21.19 (Jul2015-SP4)
CC: @njnes, @yzchang
Last updated: 2016-06-23 10:24:25 +0200
## Comment 22151
Date: 2016-05-19 12:17:30 +0200
From: @yzchang
The "RELEASE SAVEPOIN ..." query below causes a SEGFAULT in
0x00007fffe8a6ccfa in tr_merge_dbat (tr=0x7fffcc10c760, tdb=0x0)
at /net/toulouse/export/scratch2/zhang/monet-source/Jun2016/sql/storage/bat/bat_storage.c:2089
2089 if (tdb->cached) {
CREATE TABLE test (a int);
START TRANSACTION ;
SAVEPOINT failsafe;
ALTER TABLE test ADD COLUMN b int;
RELEASE SAVEPOINT failsafe;
COMMIT;
The crash seems to have been particularly caused by the use of ALTER TABLE, since it doesn't happen after, e.g., an "INSERT INTO test...".
## Comment 22152
Date: 2016-05-19 14:53:42 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [19ada2e374e8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=19ada2e374e8) made by Jennie Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=19ada2e374e8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=19ada2e374e8)
Changeset description:
Added test for bug #4010
## Comment 22154
Date: 2016-05-19 16:14:55 +0200
From: @yzchang
Just for the records, next to ALTER TABLE, an UPDATE causes mserver5 to crash at the same place. For instance, these queries:
drop table t;
create table t (i int, j int);
insert into t values (10, 20);
start transaction;
savepoint sp;
UPDATE t set i = 42 where j = 20;
release savepoint sp;
commit;
select * from t;
## Comment 22155
Date: 2016-05-19 16:23:34 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [a40033240ec6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a40033240ec6) made by Jennie Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a40033240ec6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a40033240ec6)
Changeset description:
Added a second test cast for Bug #4010
## Comment 22174
Date: 2016-05-24 23:11:33 +0200
From: @njnes
fixed
## Comment 22180
Date: 2016-05-26 14:19:04 +0200
From: @yzchang
Just for the record, this bug was fixed by [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2eaffa87695a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2eaffa87695a)
## Comment 22181
Date: 2016-05-26 16:49:06 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [17d2b854e0fa](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=17d2b854e0fa) made by Jennie Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=17d2b854e0fa](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=17d2b854e0fa)
Changeset description:
Added test for bug #4010
## Comment 22182
Date: 2016-05-26 16:50:04 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [c1144dfa2ca0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c1144dfa2ca0) made by Jennie Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c1144dfa2ca0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c1144dfa2ca0)
Changeset description:
Added a second test cast for Bug #4010
## Comment 22183
Date: 2016-05-26 16:52:25 +0200
From: @yzchang
That was just back porting tests accidentally added in Jun2016 to Jul2015
| RELEASE SAVEPOINT after ALTER TABLE crashes mserver5 | https://api.github.com/repos/MonetDB/MonetDB/issues/4010/comments | 0 | 2020-11-30T13:34:12Z | 2024-06-27T12:37:37Z | https://github.com/MonetDB/MonetDB/issues/4010 | 753,483,138 | 4,010 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-05-18 14:39:54 +0200
From: Richard Hughes <<richard.monetdb>>
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 11.21.19 (Jul2015-SP4)
CC: @mlkersten
Last updated: 2016-07-13 15:29:55 +0200
## Comment 22144
Date: 2016-05-18 14:39:54 +0200
From: Richard Hughes <<richard.monetdb>>
Build is Jul2015 [df58cfe6f8b9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=df58cfe6f8b9)
mserver5 was observed to be using 5.4GB of unshared private memory after 2 weeks of uptime when it had been used a lot.
I have tracked this down to the mal_namespace hash table. The entries are not actually using very much memory but the fact that they are leaked and allocated between queries seems to cause pathological behaviour from malloc where it creates massive heap fragmentation. I'm using an unmodified malloc from glibc 2.19.
A script to analyze the address space produces an overall usage of 1,274,123,872 out of 5,017,976,512 bytes being tracked by malloc.
Looking at a very small slice of the address space in detail:
7f865826dc50: P-- 157264
7f86582942a0: U --A 64
7f86582942e0: P-- 62224
7f86582a35f0: U --A 80
7f86582a3640: P-- 333088
7f86582f4b60: U --A 80
7f86582f4bb0: P-- 19024
7f86582f9600: U --A 48
7f86582f9630: P-- 209536
7f865832c8b0: U --A 48
7f865832c8e0: P-- 14528
7f86583301a0: U --A 64
7f86583301e0: P-- 158704
7f8658356dd0: U --A 48
7f8658356e00: U P-A 2080
7f8658357620: P-- 1104
7f8658357a70: U --A 48
7f8658357aa0: P-- 37040
7f8658360b50: U --A 48
7f8658360b80: P-- 18448
7f8658365390: U --A 64
7f86583653d0: P-- 128
Lines with 'U' are considered in-use by malloc. Note that malloc rounds allocations up to 16 bytes, and allocations through GDKmalloc() have 40 bytes total overhead (16 from glibc, 24 from GDK). Inspection of the contents of those blocks and a lot of poking around led me to conclude that they're a mixture of struct NAME from mal_namespace.c and their corresponding strings (almost all of the form "s1234_2", i.e. names of functions implicitly created by the SQL front-end).
I can think of a few possible mitigations for this problem:
1) Write a specialized allocator for mal_namespace, to prevent the allocations interspersing with other allocations having a different lifetime (not a complete fix, but would remove the problem).
2) Try a different malloc.
3) Play with mallopt(3) to see if any of the options help with avoiding the fragmentation.
4) Do as suggested in the comment above delName() (which is never called anywhere) and make the namespace private to each client.
5) Replace the namespace hash with a two-stage data structure, a global one like currently and a slower second-stage one used only for names known to be transient, which can then be wiped occasionally when the server is known to be idle.
## Comment 22145
Date: 2016-05-18 14:43:06 +0200
From: Richard Hughes <<richard.monetdb>>
Created attachment 397
Specialized pool allocator for mal_namespace data
Here's an implementation of option (1) above. In the two weeks I've been running this patch, mserver5's private memory has stabilized at 2.3GB with exactly the same type of load (compared to 5.4GB and still growing before).
Note that I've been slightly lazy in this patch and used new gcc atomic intrinsics. If you're going to take this upstream then you'll need to replace them with something more portable.
> Attached file: [namespace-pool-alloc.patch](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_4009_namespace-pool-alloc.patch_397) (text/plain, 3357 bytes)
> Description: Specialized pool allocator for mal_namespace data
## Comment 22150
Date: 2016-05-19 07:27:54 +0200
From: @mlkersten
Dear Richard,
Thanks for this analysis and a possible solution.
Indeed, this has been a long standing issue, but also not a high priority due
to the time it becomes visible. With your sample case, its priority has been
increased and a first patch has been applied.
A more fundamental approach is needed along option 4) or 5), which requires more work.
## Comment 22153
Date: 2016-05-19 15:52:27 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [d84ad1a28059](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d84ad1a28059) 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=d84ad1a28059](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d84ad1a28059)
Changeset description:
Namespace implementation updated.
Get rid of ehash: we can append to a linked list after having searched
it without extra cost without the need for an extra pointer.
Declare hash as an array instead of a pointer to an array that has to
be allocated.
Reduce the size of identifiers to IDLENGTH (64) from MAXIDENTLEN
(1024).
Allocate name records from a big chunk of memory to reduce malloc
overhead and potential memory fragmentation.
Hopefully all of this reduces the problems described in bug #4009.
| mal_namespace leak causes pathological heap fragmentation | https://api.github.com/repos/MonetDB/MonetDB/issues/4009/comments | 0 | 2020-11-30T13:34:09Z | 2024-06-27T12:37:36Z | https://github.com/MonetDB/MonetDB/issues/4009 | 753,483,100 | 4,009 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-05-17 18:08:33 +0200
From: Gatis Ozolins <<g.ozolins>>
To: clients devs <<bugs-clients>>
Version: 11.21.19 (Jul2015-SP4)
Last updated: 2016-05-18 18:05:06 +0200
## Comment 22143
Date: 2016-05-17 18:08:33 +0200
From: Gatis Ozolins <<g.ozolins>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:46.0) Gecko/20100101 Firefox/46.0
Build Identifier:
When env variable $ODBCINI is defined then none of parameters are taken from $ODBCINI file, instead they are taken from /etc/odbc.ini
Reproducible: Always
### Steps to Reproduce:
Create odbc.ini file in different location and set env variable ODBCINI.
Try to connect with isql
### Actual Results:
Client unable to establish connection
[ISQL]ERROR: Could not SQLConnect
### Expected Results:
+---------------------------------------+
| Connected! |
## Comment 22146
Date: 2016-05-18 16:26:46 +0200
From: @sjoerdmullender
I can't reproduce this.
I have a file ~/tmp/.odbc.ini and an environment variable ODBCINI=$HOME/tmp/.odbc.ini. Then using a DSN that is defined in that file, I run isql and I get connected.
If ODBCINI points to a non-existing file, isql fails to connect.
I don't have a file /etc/odbc.ini, and for these tests also no file ~/.odbc.ini.
I've also tested a few other file names (i.e. not .odbc.ini) and they all work.
Since the MonetDB ODBC driver does not itself open the .odbc.ini file but instead relies on the unixODBC library, I need some more convincing that there is actually a bug in the driver.
## Comment 22148
Date: 2016-05-18 16:42:33 +0200
From: Gatis Ozolins <<g.ozolins>>
It only happens if odbc.ini permissions are 440
Maybe it is bug in unixODBC.
I currently have version 2.3.2
## Comment 22149
Date: 2016-05-18 18:05:06 +0200
From: @sjoerdmullender
This is indeed a bug in unixODBC. While looking into this, I did see an attempt in the library to open the file for writing in order to make sure the file existed. I didn't investigate whether that particular line of code was getting executed, but if it did, it would explain the problem.
In any case, not our bug.
| ODBC doesn't work with $ODBCINI variable | https://api.github.com/repos/MonetDB/MonetDB/issues/4008/comments | 0 | 2020-11-30T13:34:07Z | 2024-06-28T13:12:23Z | https://github.com/MonetDB/MonetDB/issues/4008 | 753,483,072 | 4,008 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-05-17 09:48:33 +0200
From: Guillaume Savary <<guillaume.savary>>
To: SQL devs <<bugs-sql>>
Version: 11.21.5 (Jul2015)
CC: @kutsurak, oyan288
Last updated: 2019-01-22 12:47:26 +0100
## Comment 22141
Date: 2016-05-17 09:48:33 +0200
From: Guillaume Savary <<guillaume.savary>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0
Build Identifier:
COPY [N RECORDS] INTO tablename [(col names, ...)] FROM ...
The CSV columns are not configurable in the COPY command.
Use cases: for example the same CSV must be inserted in multiple databases/tables with a subset of the total CSV columns. Or after an 'ALTER TABLE ADD COLUMN' a new column was added at the end of the table in some cases and is builtin in an other order in other cases. Finally, sometimes you do not managed the CSV you get and they are too big to reformat them before COPY.
* MySQL does it in "LOAD DATA"
* Postgresql does it in "COPY table FROM"
* mongodb does it partialy with "mongoimport"
* Oracle does it with "LOAD DATA"
Reproducible: Always
## Comment 25683
Date: 2017-10-07 20:12:15 +0200
From: Oyan Muhammad <<oyan288>>
Created attachment 570
ap an
## Comment 25688
Date: 2017-10-11 13:49:53 +0200
From: @sjoerdmullender
The content of attachment 570 has been deleted for the following reason:
spam
## Comment 26834
Date: 2019-01-22 12:47:26 +0100
From: @sjoerdmullender
Both the table and the file can (now) have a list of column names to select which columns to fill using which columns from the CSV file.
See https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/CSV_bulk_loads
| Request: ability to select and order the columns to import from a CSV file. | https://api.github.com/repos/MonetDB/MonetDB/issues/4007/comments | 0 | 2020-11-30T13:34:05Z | 2024-06-27T12:37:34Z | https://github.com/MonetDB/MonetDB/issues/4007 | 753,483,047 | 4,007 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-05-13 07:02:52 +0200
From: Robin Cijvat <<robin.cijvat>>
To: Merovingian devs <<bugs-merovingian>>
Version: 11.21.19 (Jul2015-SP4)
CC: oyan288, renalkoclok
Last updated: 2020-06-03 09:17:51 +0200
## Comment 22140
Date: 2016-05-13 07:02:52 +0200
From: Robin Cijvat <<robin.cijvat>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.36 Safari/537.36
Build Identifier:
Using the NodeJS MAPI client, I encountered the error that when I open multiple (50) connections using monetdbd, mserver5 does not initiate communication on some of the sockets. This problem did not occur every time on my machine, but about 1/4 times. This problem seems to never occur when starting mserver5 manually, without monetdbd.
Reproducible: Always
### Steps to Reproduce:
1. Start monetdbd
2. Make >50 connections to the database using a MAPI client
3. Verify this bug by checking whether there is at least one opened socket where mserver5 does not initiate communication
## Comment 25684
Date: 2017-10-07 20:13:16 +0200
From: Oyan Muhammad <<oyan288>>
Created attachment 571
ap an
## Comment 25687
Date: 2017-10-11 13:48:41 +0200
From: @sjoerdmullender
The content of attachment 571 has been deleted for the following reason:
spam
## Comment 27773
Date: 2020-06-03 09:17:51 +0200
From: @sjoerdmullender
The content of attachment 674 has been deleted for the following reason:
spam
| monetdbd does not always properly setup a socket between an mserver5 process and a MAPI client | https://api.github.com/repos/MonetDB/MonetDB/issues/4006/comments | 0 | 2020-11-30T13:34:03Z | 2024-06-28T13:12:22Z | https://github.com/MonetDB/MonetDB/issues/4006 | 753,483,020 | 4,006 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-05-09 12:19:30 +0200
From: Richard Hughes <<richard.monetdb>>
To: SQL devs <<bugs-sql>>
Version: 11.21.19 (Jul2015-SP4)
CC: @njnes
Last updated: 2016-12-21 13:08:04 +0100
## Comment 22132
Date: 2016-05-09 12:19:30 +0200
From: Richard Hughes <<richard.monetdb>>
Build is Jul2015 [df58cfe6f8b9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=df58cfe6f8b9)
To reproduce, starting from a blank database:
create table foo1 (id bigint not null, t timestamp not null);
create table foo2 as select * from foo1 with no data;
insert into foo1 values (4283,timestamp '2016-5-3');
insert into foo1 values (4284,timestamp '2016-5-6');
insert into foo2 values (4284,timestamp '2016-5-7');
update foo1 set (t)=(select t from foo2 where foo2.id=foo1.id);
The final line produces "UPDATE: NOT NULL constraint violated for column 'foo1.t'".
This used to work. I'm bisecting it right now...
## Comment 22133
Date: 2016-05-09 13:05:43 +0200
From: Richard Hughes <<richard.monetdb>>
The first bad revision is:
changeset: 57902:2153348bd11a
branch: Jul2015
user: Niels Nes <niels@cwi.nl>
date: Wed Nov 25 17:26:56 2015 +0100
summary: fix bug #3838, ie handle outer joins with updates
## Comment 22134
Date: 2016-05-09 13:26:03 +0200
From: Richard Hughes <<richard.monetdb>>
OK, reading through bug #3838 comment 2 implies that the old behaviour was wrong and the new behaviour is right.
That might be true - this syntax is not supported by any other vendor that I know of and I don't have access to the ANSI SQL spec in order to check.
A workaround of "update foo1 set (t)=(select t from foo2 where foo2.id=foo1.id) where exists(select * from foo2 where foo2.id=foo1.id);" does do what I want (although slightly less efficiently than before).
Please close/notabug this bug if the new behaviour is the correct behaviour, although if you could suggest a more efficient way of doing an inner join in an UPDATE statement as well then I'd appreciate it.
## Comment 22235
Date: 2016-07-05 19:02:43 +0200
From: @njnes
we now also support a from clause within an update statement,
update foo1 set t = v from etc.
| Correlated update causes incorrect null constraint violation | https://api.github.com/repos/MonetDB/MonetDB/issues/4005/comments | 0 | 2020-11-30T13:34:00Z | 2024-06-27T12:37:32Z | https://github.com/MonetDB/MonetDB/issues/4005 | 753,482,990 | 4,005 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-05-07 05:16:14 +0200
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.13 (Jul2015-SP2)
CC: ajdamico
Last updated: 2016-05-07 10:37:42 +0200
## Comment 22126
Date: 2016-05-07 05:16:14 +0200
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
Build Identifier:
Downloading GitHub repo hannesmuehleisen/MonetDBLite@master
from URL https://api.github.com/repos/hannesmuehleisen/MonetDBLite/zipball/master
Installing MonetDBLite
"C:/PROGRA~1/R/R-32~1.5/bin/x64/R" --no-site-file --no-environ --no-save \
--no-restore --quiet CMD INSTALL \
"C:/Users/anthonyd/AppData/Local/Temp/Rtmp6bLNjL/devtools1bc44f5930f/hannesmuehleisen-MonetDBLite-bfc1e4b" \
--library="C:/Users/anthonyd/Documents/R/win-library/3.2" --install-tests
* installing *source* package 'MonetDBLite' ...
./configure.win: cannot create src/tools/embedded/windows/sedscript: directory nonexistent
cp: cannot stat 'src/tools/embedded/windows/monetdb_config.h.in': No such file or directory
src/tools/embedded/windows/pmc.sh: Can't open src/tools/embedded/windows/pmc.sh: No such file or directory
> download.file('http://dev.monetdb.org/Assets/R/misc/msvcr100-64.dll', 'src/tools/embedded/windows/msvcr100.dll', mode='wb')
Error in download.file("http://dev.monetdb.org/Assets/R/misc/msvcr100-64.dll", :
cannot open destfile 'src/tools/embedded/windows/msvcr100.dll', reason 'No such file or directory'
Execution halted
> setwd('src/tools/embedded/windows/'); tf <- tempfile(); download.file('http://dev.monetdb.org/Assets/R/misc/pcre-8.37.zip', tf, mode='wb'); unzip(tf)
Error in setwd("src/tools/embedded/windows/") :
cannot change working directory
Execution halted
make: *** No targets specified and no makefile found. Stop.
find: 'monetdb5/mal': No such file or directory
find: 'monetdb5/modules': No such file or directory
find: 'monetdb5/optimizer': No such file or directory
find: 'tools/embedded': No such file or directory
c:/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lpcre
collect2: ld returned 1 exit status
cp: cannot stat 'src/tools/embedded/windows/pcre-8.37/libs//x64/pcre.dll': No such file or directory
cp: cannot stat 'src/tools/embedded/windows/msvcr100.dll': No such file or directory
Warning: running command 'sh ./configure.win' had status 1
ERROR: configuration failed for package 'MonetDBLite'
* removing 'C:/Users/anthonyd/Documents/R/win-library/3.2/MonetDBLite'
* restoring previous 'C:/Users/anthonyd/Documents/R/win-library/3.2/MonetDBLite'
Error: Command failed (1)
>
Reproducible: Always
### Steps to Reproduce:
failed on two separate machines
## Comment 22127
Date: 2016-05-07 10:37:42 +0200
From: @hannesmuehleisen
https://github.com/hannesmuehleisen/MonetDBLite/issues/1
| devtools::install_github( "hannesmuehleisen/MonetDBLite" ) fails on windows | https://api.github.com/repos/MonetDB/MonetDB/issues/4004/comments | 0 | 2020-11-30T13:33:57Z | 2024-06-28T13:12:21Z | https://github.com/MonetDB/MonetDB/issues/4004 | 753,482,956 | 4,004 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-05-05 17:42:34 +0200
From: Nikola Knezevic <<nikkne>>
To: SQL devs <<bugs-sql>>
Version: 11.21.19 (Jul2015-SP4)
CC: @njnes
Last updated: 2016-07-05 19:25:06 +0200
## Comment 22123
Date: 2016-05-05 17:42:34 +0200
From: Nikola Knezevic <<nikkne>>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36
Build Identifier:
I'm splitting my data into per-day tables and importing them into monetdb. Before the import, I first create a per-day table and then use 'ALTER TABLE "table" ADD TABLE "table__2016-05-03";' command (passed to cursor.execute() in python. "table" is defined to be a MERGE TABLE.
Now, I had only a single day that was populated on the initial run, when both MERGE TABLE and day table were created. Today, I added a new day table and ran this:
sql> SELECT day, count(*) FROM "trades" GROUP BY day;
+------------+---------+
| day | L1 |
+============+=========+
| 2016-04-26 | 2959601 |
+------------+---------+
sql>select day, count(*) from "trades__2016-05-02" group by day;
+------------+---------+
| day | L1 |
+============+=========+
| 2016-05-02 | 2220143 |
+------------+---------+
So, the output is missing the current day, and I thought my python code didn't properly tie these tables together. However, inspecting sys.* tables gives me this:
sql>\d
(snip...)
MERGE TABLE my_namespace.trades
TABLE my_namespace.trades__2016-04-26
TABLE my_namespace.trades__2016-05-02
(snip...)
sql>select * from sys.tables where name like 'trades%';
+-------+--------------------+-----------+-------+------+--------+---------------+--------+-----------+
| id | name | schema_id | query | type | system | commit_action | access | temporary |
+=======+====================+===========+=======+======+========+===============+========+===========+
| 13480 | trades | 6497 | null | 3 | false | 0 | 0 | 0 |
| 13518 | trades__2016-04-26 | 6497 | null | 0 | false | 0 | 0 | 0 |
| 16203 | trades__2016-05-02 | 6497 | null | 0 | false | 0 | 0 | 0 |
+-------+--------------------+-----------+-------+------+--------+---------------+--------+-----------+
3 tuples (3.323ms)
sql>select * from sys.dependencies where depend_id=13480;
+-------+-----------+-------------+
| id | depend_id | depend_type |
+=======+===========+=============+
| 13518 | 13480 | 2 |
| 16203 | 13480 | 2 |
+-------+-----------+-------------+
Finally, if I manually add the table, it succeeds:
sql>alter table "trades" add table "trades__2016-05-02";
operation successful (13.894ms)
sql>select day, count(*) from "trades" group by day;
+------------+---------+
| day | L1 |
+============+=========+
| 2016-04-26 | 2959601 |
| 2016-05-02 | 2220143 |
+------------+---------+
2 tuples (44.196ms)
sql>select * from sys.tables where name like 'trades%';
+-------+--------------------+-----------+-------+------+--------+---------------+--------+-----------+
| id | name | schema_id | query | type | system | commit_action | access | temporary |
+=======+====================+===========+=======+======+========+===============+========+===========+
| 13480 | trades | 6497 | null | 3 | false | 0 | 0 | 0 |
| 13518 | trades__2016-04-26 | 6497 | null | 0 | false | 0 | 0 | 0 |
| 16203 | trades__2016-05-02 | 6497 | null | 0 | false | 0 | 0 | 0 |
+-------+--------------------+-----------+-------+------+--------+---------------+--------+-----------+
3 tuples (7.445ms)
sql>select * from sys.dependencies where depend_id=13480;
+-------+-----------+-------------+
| id | depend_id | depend_type |
+=======+===========+=============+
| 13518 | 13480 | 2 |
| 16203 | 13480 | 2 |
+-------+-----------+-------------+
2 tuples (1.714ms)
Reproducible: Always
### Steps to Reproduce:
1. invoke mclient:
CREATE MERGE TABLE x (aday date, val int);
CREATE TABLE "x_1" (aday date, val int);
COPY 3 RECORDS INTO "x_1" FROM stdin USING DELIMITERS '|','\n';
2016-05-02|675
2016-05-02|589
2016-05-02|866
ALTER TABLE x ADD TABLE "x_1";
2. call the following python script:
import monetdb.sql
monet_conn = monetdb.sql.connect(hostname='localhost',
username='xxx',
password='xxx',
database='db')
cursor = monet_conn.cursor()
dest_create_partition = 'CREATE TABLE "x_2" (aday date, val int); COMMIT;'
cursor.execute(dest_create_partition)
cursor.execute('ALTER TABLE "x" ADD TABLE "x_2"; COMMIT;')
cursor.close()
cursor = monet_conn.cursor()
cursor.execute("INSERT INTO \"x_2\" VALUES ('2016-05-05', 100); COMMIT;")
cursor.close()
monet_conn.close()
3. invoke mclient:
sql>\d x
CREATE MERGE TABLE "p_eu_perf_w2w_eurex03"."x" (
"aday" DATE,
"val" INTEGER
);
sql>\d x_1
CREATE TABLE "p_eu_perf_w2w_eurex03"."x_1" (
"aday" DATE,
"val" INTEGER
);
sql>\d x_2
CREATE TABLE "p_eu_perf_w2w_eurex03"."x_2" (
"aday" DATE,
"val" INTEGER
);
### Actual Results:
sql>SELECT aday, count(*) FROM x GROUP BY aday;
+------------+------+
| aday | L1 |
+============+======+
| 2016-05-02 | 3 |
+------------+------+
1 tuple (1.865ms)
### Expected Results:
sql>SELECT aday, count(*) FROM x GROUP BY aday;
+------------+------+
| aday | L1 |
+============+======+
| 2016-05-02 | 3 |
+------------+------+
| 2016-05-05 | 1 |
+------------+------+
1 tuple (1.865ms)
## Comment 22129
Date: 2016-05-08 17:11:47 +0200
From: @njnes
couldn't repeat the problem on the jul2015 branch.
| 'ALTER TABLE x ADD TABLE y' called from monetdb-python does not merge the data in x from y | https://api.github.com/repos/MonetDB/MonetDB/issues/4003/comments | 0 | 2020-11-30T13:33:55Z | 2024-06-27T12:37:30Z | https://github.com/MonetDB/MonetDB/issues/4003 | 753,482,921 | 4,003 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-05-05 16:48:44 +0200
From: Gatis Ozolins <<g.ozolins>>
To: clients devs <<bugs-clients>>
Version: 11.21.19 (Jul2015-SP4)
CC: renalkoclok
Last updated: 2020-06-03 09:08:21 +0200
## Comment 22122
Date: 2016-05-05 16:48:44 +0200
From: Gatis Ozolins <<g.ozolins>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:45.0) Gecko/20100101 Firefox/45.0
Build Identifier:
Seems that there is no support for DECIMAL HUGEINT datatypes in ODBC client
Reproducible: Always
### Steps to Reproduce:
create table dwh.test (col_big BIGINT, col_huge HUGEINT, col_dec DECIMAL (15,2), col_dec_huge DECIMAL(38,10));
insert into dwh.test (col_big, col_huge, col_dec, col_dec_huge) VALUES(1000000, 1000000, 1000000, 1000000);
select col_big, col_huge, col_dec, col_dec_huge from dwh.test
### Actual Results:
col_big col_huge col_dec col_dec_huge
------------------------------------------------
1000000 1000000 1000000.00 7091869.0845032448
### Expected Results:
col_big col_huge col_dec col_dec_huge
------------------------------------------------
1000000 1000000 1000000.00 1000000.00
## Comment 22147
Date: 2016-05-18 16:29:56 +0200
From: @sjoerdmullender
There is indeed not yet any support in the MonetDB ODBC driver for hugeint. I have not yet figured out what that support should look like.
## Comment 22186
Date: 2016-05-30 16:43:00 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [59887f02c7a5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=59887f02c7a5) 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=59887f02c7a5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=59887f02c7a5)
Changeset description:
Use a large enough type to store a fraction factor.
This fixes bug #4002.
Note that this does not implement HUGEINT support in the MonetDB ODBC
driver, but it fixes the immediate problem of the bug.
## Comment 22187
Date: 2016-05-30 16:49:06 +0200
From: @sjoerdmullender
The problem in this bug turned out to be the scale of 10, not the total number of digits in the DECIMAL.
Internally in the driver, we calculated a value 10-to-the-power-of-scale (here: a 1 with 10 zeros), and the result was stored in a (32 bit) signed int. That doesn't fit, so there was overflow which was not checked. The fix is to store the value in a 64 bit (unsigned) int where it does fit. This is no solution for when values are starting to have more digits than fit in 64 bit integers, but we will have more problems that just this one.
Even though this particular problem was solved, I won't close the bug, since the more general problem of HUGEINT support in the ODBC driver remains.
## Comment 27762
Date: 2020-06-03 09:08:10 +0200
From: @sjoerdmullender
The content of attachment 663 has been deleted for the following reason:
spam
| DECIMAL HUGEINT columns in ODBC return wrong values | https://api.github.com/repos/MonetDB/MonetDB/issues/4002/comments | 0 | 2020-11-30T13:33:53Z | 2024-06-28T13:12:21Z | https://github.com/MonetDB/MonetDB/issues/4002 | 753,482,895 | 4,002 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-30 13:08:31 +0200
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.13 (Jul2015-SP2)
CC: ajdamico
Last updated: 2016-05-23 11:16:05 +0200
## Comment 22118
Date: 2016-04-30 13:08:31 +0200
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
Build Identifier:
MonetDBLite just ignores them, i think?
Reproducible: Always
### Steps to Reproduce:
library(DBI)
library(MonetDB.R)
library(MonetDBLite)
db <- dbConnect( MonetDBLite() )
dbSendQuery( db , "CREATE TABLE test AS SELECT 1 AS one WITH DATA" )
dbGetQuery( db , "EXPLAIN SELECT * FROM TEST" )
### Actual Results:
> dbGetQuery( db , "EXPLAIN SELECT * FROM TEST" )
one
1 1
### Expected Results:
sql>EXPLAIN SELECT * FROM TEST;
+-----------------------------------------------------------------------------+
| mal |
+=============================================================================+
| function user.s3_1{autoCommit=true}():void; |
| X_33:void := querylog.define("explain select * from test;","default_pip |
: e",23); :
| barrier X_45 := language.dataflow(); |
| X_17 := bat.new(nil:oid,nil:str); |
| X_25 := bat.append(X_17,"sys.test"); |
| X_20 := bat.new(nil:oid,nil:str); |
| X_27 := bat.append(X_20,"one"); |
| X_21 := bat.new(nil:oid,nil:str); |
| X_28 := bat.append(X_21,"tinyint"); |
| X_22 := bat.new(nil:oid,nil:int); |
| X_30 := bat.append(X_22,8); |
| X_24 := bat.new(nil:oid,nil:int); |
| X_32 := bat.append(X_24,0); |
| X_2 := sql.mvc(); |
| X_3:bat[:oid,:oid] := sql.tid(X_2,"sys","test"); |
| X_6:bat[:oid,:bte] := sql.bind(X_2,"sys","test","one",0); |
| (X_9,r1_9) := sql.bind(X_2,"sys","test","one",2); |
| X_12:bat[:oid,:bte] := sql.bind(X_2,"sys","test","one",1); |
| X_14 := sql.delta(X_6,X_9,r1_9,X_12); |
| X_15 := algebra.leftfetchjoin(X_3,X_14); |
| exit X_45; |
| sql.resultSet(X_25,X_27,X_28,X_30,X_32,X_15); |
| end user.s3_1; |
+-----------------------------------------------------------------------------+
23 tuples (0.541ms)
sql>
## Comment 22168
Date: 2016-05-23 11:16:05 +0200
From: @hannesmuehleisen
Filed at https://github.com/hannesmuehleisen/MonetDBLite/issues/18
| MonetDBLite feature request: allow debugging commands like EXPLAIN | https://api.github.com/repos/MonetDB/MonetDB/issues/4001/comments | 0 | 2020-11-30T13:33:50Z | 2024-06-28T07:19:58Z | https://github.com/MonetDB/MonetDB/issues/4001 | 753,482,855 | 4,001 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-29 14:50:01 +0200
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.13 (Jul2015-SP2)
CC: ajdamico
Last updated: 2016-05-23 11:04:53 +0200
## Comment 22116
Date: 2016-04-29 14:50:01 +0200
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
Build Identifier:
a session-ender
Reproducible: Always
### Steps to Reproduce:
library(DBI) load the DBI package (implements the R-database coding)
library(MonetDB.R) load the MonetDB.R package (connects r to a monet database)
library(MonetDBLite) load MonetDBLite package (creates database files in R)
db <- dbConnect( MonetDBLite() )
dbWriteTable( db , 'mtcars' , mtcars )
sql <-
"SELECT
t1.row_number() over () AS id ,
t1.hp ,
t1.wt ,
SUM( t2.wt ) AS cumwt
FROM mtcars t1 INNER JOIN mtcars t2 ON t1.hp >= t2.hp
GROUP BY id , t1.hp , t1.wt"
dbGetQuery( db , sql )
### Actual Results:
crash
### Expected Results:
error
## Comment 22117
Date: 2016-04-30 07:05:24 +0200
From: Anthony Damico <<ajdamico>>
the query is legal (so changing the bug title)
the bug is limited to MonetDBLite. lines below show it working with a MonetDB.R connection to mserver.
> library(DBI)
> library(MonetDB.R)
> library(MonetDBLite)
Warning message:
package ‘MonetDBLite’ was built under R version 3.2.5
> db <- dbConnect( MonetDB.R() , "monetdb://localhost:50000/demo"
+ )
> dbWriteTable( db , 'mtcars' , mtcars )
[1] TRUE
> sql <-
+ "SELECT
+ t1.row_number() over () AS id ,
+ t1.hp ,
+ t1.wt ,
+ SUM( t2.wt ) AS cumwt
+ FROM mtcars t1 INNER JOIN mtcars t2 ON t1.hp >= t2.hp
+ GROUP BY id , t1.hp , t1.wt"
>
> dbGetQuery( db , sql )
id hp wt cumwt
1 1 110 2.620 2.620
2 2 110 2.620 2.875
3 3 110 2.620 2.320
4 4 110 2.620 3.215
5 5 110 2.620 3.460
6 6 110 2.620 3.190
## Comment 22160
Date: 2016-05-23 11:04:53 +0200
From: @hannesmuehleisen
Filed in https://github.com/hannesmuehleisen/MonetDBLite/issues/13
| MonetDBLite crashes R console from statement with row_number() window function on windows | https://api.github.com/repos/MonetDB/MonetDB/issues/4000/comments | 0 | 2020-11-30T13:26:24Z | 2024-06-28T13:12:20Z | https://github.com/MonetDB/MonetDB/issues/4000 | 753,477,334 | 4,000 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-28 16:26:09 +0200
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <<bugs-sql>>
Version: 11.21.19 (Jul2015-SP4)
CC: @njnes
Last updated: 2016-06-23 10:24:17 +0200
## Comment 22108
Date: 2016-04-28 16:26:09 +0200
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Build Identifier:
scalar system function sys.length(string) returns wrong value for strings which have spaces at the end. The spaces are valid and significant characters and therefore should be counted also.
If somebody does not want to have to have trailing spaces in a string to be counted they should use length(rtrim(string)) to get the length without the trailing spaces.
Reproducible: Always
### Steps to Reproduce:
1. start mserver5 (Jul2015)
2. start mclient
3. run SQL commands:
SELECT length('123 ') as "four";
SELECT length('123 ') as "ten";
SELECT length('1234567890') as "ten";
SELECT length(' 67890') as "ten";
SELECT length(reverse(' 67890')) as "ten";
SELECT sys.length('123 ') as "four";
SELECT sys.length('123 ') as "ten";
SELECT sys.length('1234567890') as "ten";
SELECT sys.length(' 67890') as "ten";
SELECT sys.length(reverse(' 67890')) as "ten";
CREATE TABLE tchar (val CHAR(9) NOT NULL);
INSERT INTO tchar VALUES ('A'), (' BC ');
SELECT val, length(val) FROM tchar;
-- returns wrong length for second row
UPDATE tchar SET val = val || ' ';
SELECT val, length(val) FROM tchar;
-- returns wrong length for both rows
UPDATE tchar SET val = (val || 'x');
SELECT val, length(val) FROM tchar;
SELECT val, length(val) FROM tchar WHERE length(val) <> 9;
UPDATE tchar SET val = rpad(val, length(val), ' ') WHERE length(val) <> 9;
SELECT val, length(val) FROM tchar WHERE length(val) = 9;
-- returns wrong length
DROP TABLE tchar;
### Actual Results:
bash-4.3$ mclient
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.21.20 (unreleased), 'demo'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>SELECT length('123 ') as "four";
+------+
| four |
+======+
| 3 |
+------+
1 tuple (0.959ms)
sql>SELECT length('123 ') as "ten";
+------+
| ten |
+======+
| 3 |
+------+
1 tuple (0.510ms)
sql>SELECT length('1234567890') as "ten";
+------+
| ten |
+======+
| 10 |
+------+
1 tuple (0.674ms)
sql>SELECT length(' 67890') as "ten";
+------+
| ten |
+======+
| 10 |
+------+
1 tuple (0.571ms)
sql>SELECT length(reverse(' 67890')) as "ten";
+------+
| ten |
+======+
| 5 |
+------+
1 tuple (0.642ms)
sql>
sql>SELECT sys.length('123 ') as "four";
+------+
| four |
+======+
| 3 |
+------+
1 tuple (0.767ms)
sql>SELECT sys.length('123 ') as "ten";
+------+
| ten |
+======+
| 3 |
+------+
1 tuple (0.587ms)
sql>SELECT sys.length('1234567890') as "ten";
+------+
| ten |
+======+
| 10 |
+------+
1 tuple (0.631ms)
sql>SELECT sys.length(' 67890') as "ten";
+------+
| ten |
+======+
| 10 |
+------+
1 tuple (0.582ms)
sql>SELECT sys.length(reverse(' 67890')) as "ten";
+------+
| ten |
+======+
| 5 |
+------+
1 tuple (0.650ms)
sql>
sql>CREATE TABLE tchar (val CHAR(9) NOT NULL);
operation successful (19.663ms)
sql>INSERT INTO tchar VALUES ('A'), (' BC ');
2 affected rows (7.656ms)
sql>SELECT val, length(val) FROM tchar;
+-----------+------------+
| val | length_val |
+===========+============+
| A | 1 |
| BC | 3 |
+-----------+------------+
2 tuples (2.177ms)
sql>-- returns wrong length for second row
sql>UPDATE tchar SET val = val || ' ';
2 affected rows (4.864ms)
sql>SELECT val, length(val) FROM tchar;
+-----------+------------+
| val | length_val |
+===========+============+
| A | 1 |
| BC | 3 |
+-----------+------------+
2 tuples (0.497ms)
sql>-- returns wrong length for both rows
sql>UPDATE tchar SET val = (val || 'x');
2 affected rows (6.601ms)
sql>SELECT val, length(val) FROM tchar;
+-----------+------------+
| val | length_val |
+===========+============+
| A x | 6 |
| BC x | 9 |
+-----------+------------+
2 tuples (0.549ms)
sql>SELECT val, length(val) FROM tchar WHERE length(val) <> 9;
+-----------+------------+
| val | length_val |
+===========+============+
| A x | 6 |
+-----------+------------+
1 tuple (0.783ms)
sql>UPDATE tchar SET val = rpad(val, length(val), ' ') WHERE length(val) <> 9;
1 affected row (5.077ms)
sql>SELECT val, length(val) FROM tchar WHERE length(val) = 9;
+-----------+------------+
| val | length_val |
+===========+============+
| BC x | 9 |
+-----------+------------+
1 tuple (2.564ms)
sql>-- returns wrong length
sql>DROP TABLE tchar;
operation successful (4.708ms)
sql>
### Expected Results:
sql>SELECT length('123 ') as "four";
+------+
| four |
+======+
| 4 |
+------+
1 tuple (0.959ms)
sql>SELECT length('123 ') as "ten";
+------+
| ten |
+======+
| 10 |
+------+
1 tuple (0.510ms)
sql>SELECT length('1234567890') as "ten";
+------+
| ten |
+======+
| 10 |
+------+
1 tuple (0.674ms)
sql>SELECT length(' 67890') as "ten";
+------+
| ten |
+======+
| 10 |
+------+
1 tuple (0.571ms)
sql>SELECT length(reverse(' 67890')) as "ten";
+------+
| ten |
+======+
| 10 |
+------+
1 tuple (0.642ms)
sql>
sql>CREATE TABLE tchar (val CHAR(9) NOT NULL);
operation successful (19.663ms)
sql>INSERT INTO tchar VALUES ('A'), (' BC ');
2 affected rows (7.656ms)
sql>SELECT val, length(val) FROM tchar;
+-----------+------------+
| val | length_val |
+===========+============+
| A | 1 |
| BC | 4 |
+-----------+------------+
2 tuples (2.177ms)
sql>UPDATE tchar SET val = val || ' ';
2 affected rows (4.864ms)
sql>SELECT val, length(val) FROM tchar;
+-----------+------------+
| val | length_val |
+===========+============+
| A | 5 |
| BC | 8 |
+-----------+------------+
2 tuples (0.497ms)
sql>UPDATE tchar SET val = (val || 'x');
2 affected rows (6.601ms)
sql>SELECT val, length(val) FROM tchar;
+-----------+------------+
| val | length_val |
+===========+============+
| A x | 6 |
| BC x | 9 |
+-----------+------------+
2 tuples (0.549ms)
sql>SELECT val, length(val) FROM tchar WHERE length(val) <> 9;
+-----------+------------+
| val | length_val |
+===========+============+
| A x | 6 |
+-----------+------------+
1 tuple (0.783ms)
sql>UPDATE tchar SET val = rpad(val, length(val), ' ') WHERE length(val) <> 9;
1 affected row (5.077ms)
sql>SELECT val, length(val) FROM tchar WHERE length(val) = 9;
+-----------+------------+
| val | length_val |
+===========+============+
| A x | 9 |
| BC x | 9 |
+-----------+------------+
2 tuples (2.564ms)
sql>-- returns wrong length
sql>DROP TABLE tchar;
operation successful (4.708ms)
sql>
## Comment 22130
Date: 2016-05-08 19:47:57 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [3936a187f5e7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3936a187f5e7) 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=3936a187f5e7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3936a187f5e7)
Changeset description:
properly return full string length (fixes bug #3999)
## Comment 22131
Date: 2016-05-08 19:49:23 +0200
From: @njnes
removed the incorrect sql string length function.
## Comment 22135
Date: 2016-05-12 12:03:23 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [4095ba42f46f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4095ba42f46f) 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=4095ba42f46f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4095ba42f46f)
Changeset description:
Add test for Bug #3999
| length() returns wrong length for strings which have spaces at the end of the string | https://api.github.com/repos/MonetDB/MonetDB/issues/3999/comments | 0 | 2020-11-30T13:26:22Z | 2024-06-27T12:12:01Z | https://github.com/MonetDB/MonetDB/issues/3999 | 753,477,298 | 3,999 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-28 15:41:09 +0200
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <<bugs-sql>>
Version: 11.21.19 (Jul2015-SP4)
Last updated: 2016-05-30 16:55:46 +0200
## Comment 22107
Date: 2016-04-28 15:41:09 +0200
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Build Identifier:
The system table sys.systemfunctions contains function ids of all system functions. So it is a Foreign Key to sys.functions.id.
However the referential integrity is not enforced.
So it could result in invalid FK references.
This can happen due to:
- the db upgrade program dropping (or adding ??) new system functions, see also comment 2 of Bug #3997 (https://www.monetdb.org/bugzilla/show_bug.cgi?id=3997c2)
- user manipulation of the sys.systemfunctions table
I suggest that the db-upgrade program at the end ALWAYS does following SQL command (to cleanup invalid FKs):
delete from "sys"."systemfunctions" where function_id NOT IN (select id from "sys"."functions");
Reproducible: Always
### Steps to Reproduce:
1. start mserver5 (Jul2015)
2. start mclient
3. run SQL commands:
drop function sys.isaUUID(string);
create function sys.isaUUID(u string) returns boolean external name uuid."isaUUID";
drop function sys.isaUUID(uuid);
create function sys.isaUUID(u uuid) returns boolean external name uuid."isaUUID";
select * from "sys"."systemfunctions" where function_id NOT IN (select id from "sys"."functions");
-- to remove the invalid FK rows do:
delete from "sys"."systemfunctions" where function_id NOT IN (select id from "sys"."functions");
### Actual Results:
bash-4.3$ mclient
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.21.20 (unreleased), 'demo'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>drop function sys.isaUUID(string);
operation successful (18.152ms)
sql>create function sys.isaUUID(u string) returns boolean external name uuid."isaUUID";
operation successful (15.702ms)
sql>
sql>drop function sys.isaUUID(uuid);
operation successful (8.043ms)
sql>create function sys.isaUUID(u uuid) returns boolean external name uuid."isaUUID";
operation successful (15.817ms)
sql>
sql>select * from "sys"."systemfunctions" where function_id NOT IN (select id from "sys"."functions");
+-------------+
| function_id |
+=============+
| 7440 |
| 7444 |
+-------------+
2 tuples (2.029ms)
sql>
sql>-- to remove the invalid FK rows do:
sql>delete from "sys"."systemfunctions" where function_id NOT IN (select id from "sys"."functions");
2 affected rows (20.295ms)
sql>
### Expected Results:
after db-upgrade no rows should be returned when running SQL query:
select * from "sys"."systemfunctions" where function_id NOT IN (select id from "sys"."functions");
## Comment 22188
Date: 2016-05-30 16:55:46 +0200
From: @sjoerdmullender
I'd say this is *not* a bug. As soon as you start messing with the "sys" schema, you're on your own.
If you create a database with the Jul2015 branch and then start a Jun2016 server serving that database, the database will be upgraded. The upgrade will (among much else) do the two DROP queries. After the upgrade, the query
select * from "sys"."systemfunctions" where function_id NOT IN (select id from "sys"."functions");
returns 0 rows.
| system table sys.systemfunctions may contain invalid FK references to table sys.functions after a db-upgrade | https://api.github.com/repos/MonetDB/MonetDB/issues/3998/comments | 0 | 2020-11-30T13:26:19Z | 2024-06-28T13:12:19Z | https://github.com/MonetDB/MonetDB/issues/3998 | 753,477,263 | 3,998 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-28 13:46:48 +0200
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <<bugs-sql>>
Version: 11.21.19 (Jul2015-SP4)
Last updated: 2016-06-23 10:24:30 +0200
## Comment 22103
Date: 2016-04-28 13:46:48 +0200
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Build Identifier:
functions sys.isaUUID(str) and sys.isaUUID(uuid) should have been created to return a boolean. Instead they are created returning a uuid:
select * from functions where name ilike 'isaUUID';
-- list two rows
select * from args where func_id in (select id from functions where name ilike 'isaUUID');
-- list four rows, the result return types are marked: uuid !! This should be boolean.
Reproducible: Always
### Steps to Reproduce:
1. start mserver5 (Jul2015)
2. start mclient
3. Run SQL commands:
CREATE TABLE testUUID (s varchar(36), u UUID);
INSERT INTO testUUID (s, u) VALUES ('ad887b3d-08f7-c308-7285-354a1857cbc8', convert('ad887b3d-08f7-c308-7285-354a1857cbc8', uuid));
INSERT INTO testUUID (s, u) VALUES ('7393ad7e-4fcf-461a-856e-b70027fe1a9e', convert('7393ad7e-4fcf-461a-856e-b70027fe1a9e', uuid));
INSERT INTO testUUID (s, u) VALUES ('c005d6fd-20c3-4d01-91a5-bbe676593530', convert('c005d6fd-20c3-4d01-91a5-bbe676593530', uuid));
SELECT * FROM testUUID ORDER BY s;
SELECT s, u, isaUUID(s) as a_isa_UUID FROM testUUID ORDER BY s;
SELECT s, u, isaUUID(u) as u_isa_UUID FROM testUUID ORDER BY s;
SELECT * FROM testUUID WHERE isaUUID(s) = TRUE ORDER BY s;
SELECT * FROM testUUID WHERE isaUUID(u) = TRUE ORDER BY s;
SELECT MIN(u) AS mn, MAX(u) AS mx, COUNT(u) AS cnt, COUNT(DISTINCT u) AS cnt_d FROM testUUID;
SELECT SUM(u) AS sumu FROM testUUID;
SELECT AVG(u) AS sumu FROM testUUID;
DROP TABLE testUUID;
### Actual Results:
bash-4.3$ mclient
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.21.20 (unreleased), 'demo'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>CREATE TABLE testUUID (s varchar(36), u UUID);
operation successful (24.150ms)
sql>INSERT INTO testUUID (s, u) VALUES ('ad887b3d-08f7-c308-7285-354a1857cbc8', convert('ad887b3d-08f7-c308-7285-354a1857cbc8', uuid));
1 affected row (5.896ms)
sql>INSERT INTO testUUID (s, u) VALUES ('7393ad7e-4fcf-461a-856e-b70027fe1a9e', convert('7393ad7e-4fcf-461a-856e-b70027fe1a9e', uuid));
1 affected row (5.976ms)
sql>INSERT INTO testUUID (s, u) VALUES ('c005d6fd-20c3-4d01-91a5-bbe676593530', convert('c005d6fd-20c3-4d01-91a5-bbe676593530', uuid));
1 affected row (6.244ms)
sql>SELECT * FROM testUUID ORDER BY s;
+--------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
| s | u |
+======================================+======================================================================================================================================+
| 7393ad7e-4fcf-461a-856e-b70027fe1a9e | 7393ad7e-4fcf-461a-856e-b70027fe1a9e |
| ad887b3d-08f7-c308-7285-354a1857cbc8 | ad887b3d-08f7-c308-7285-354a1857cbc8 |
| c005d6fd-20c3-4d01-91a5-bbe676593530 | c005d6fd-20c3-4d01-91a5-bbe676593530 |
+--------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
3 tuples (1.153ms)
sql>SELECT s, u, isaUUID(s) as a_isa_UUID FROM testUUID ORDER BY s;
TypeException:user.s5_2[41]:'bat.append' undefined in: bat.append(X_80:bat[:oid,:uuid],X_87:bit);
program contains errors
sql>SELECT s, u, isaUUID(u) as u_isa_UUID FROM testUUID ORDER BY s;
TypeException:user.s6_2[42]:'uuid.isaUUID' undefined in: uuid.isaUUID(X_87:uuid);
program contains errors
sql>SELECT * FROM testUUID WHERE isaUUID(s) = TRUE ORDER BY s;
types uuid(0,0) and boolean(1,0) are not equal
sql>SELECT * FROM testUUID WHERE isaUUID(u) = TRUE ORDER BY s;
types uuid(0,0) and boolean(1,0) are not equal
sql>
sql>SELECT MIN(u) AS mn, MAX(u) AS mx, COUNT(u) AS cnt, COUNT(DISTINCT u) AS cnt_d FROM testUUID;
+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------+------+------+
| mn | mx | cnt | cnt_ |
: : : : d :
+===============================================================================+===============================================================================+======+======+
| 7393ad7e-4fcf-461a-856e-b70027fe1a9e | c005d6fd-20c3-4d01-91a5-bbe676593530 | 3 | 3 |
+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------+------+------+
1 tuple (4.751ms)
sql>SELECT SUM(u) AS sumu FROM testUUID;
types uuid(0,0) and tinyint(8,0) are not equal for column 'u'
sql>SELECT AVG(u) AS sumu FROM testUUID;
types uuid(0,0) and double(53,0) are not equal for column 'u'
sql>
sql>DROP TABLE testUUID;
operation successful (3.783ms)
sql>
### Expected Results:
Using functions sys.isaUUID(str) and sys.isaUUID(uuid) should not fail but return a boolean.
This needs to be corrected in sql/scripts/45_uuid.sql
Instead of:
create function sys.isaUUID(u uuid)
returns uuid external name uuid."isaUUID";
create function sys.isaUUID(u string)
returns uuid external name uuid."isaUUID";
It should become:
create function sys.isaUUID(u uuid)
returns boolean external name uuid."isaUUID";
create function sys.isaUUID(u string)
returns boolean external name uuid."isaUUID";
Also the upgrade program code needs to be extended.
## Comment 22104
Date: 2016-04-28 14:26:14 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [fd9aac3a6906](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fd9aac3a6906) 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=fd9aac3a6906](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=fd9aac3a6906)
Changeset description:
Added test for Bug #3997
## Comment 22105
Date: 2016-04-28 15:03:33 +0200
From: Martin van Dinther <<martin.van.dinther>>
To correct the problem for an existing database run commands (as admin):
drop function sys.isaUUID(uuid);
create function sys.isaUUID(u uuid) returns boolean external name uuid."isaUUID";
drop function sys.isaUUID(string);
create function sys.isaUUID(u string) returns boolean external name uuid."isaUUID";
-- check the new return types
select * from args where func_id in (select id from functions where name ilike 'isaUUID');
-- the result return types are now boolean
-- also patch the contents of table sys.systemfunctions (as we dropped 2 system functions)
select * from "sys"."systemfunctions" where function_id NOT IN (select id from "sys"."functions");
-- will show two (or more) rows, remove all those invalid FK rows
delete from "sys"."systemfunctions" where function_id NOT IN (select id from "sys"."functions");
-- check if the new function id's also exist in the systemfunctions table
select * from "sys"."functions" where name ilike 'isaUUID';
-- should list two rows
select * from "sys"."functions" where name ilike 'isaUUID' and id NOT IN (select id from "sys"."systemfunctions")
-- if rows are listed add the function id's to table sys.systemfunctions
insert into "sys"."systemfunctions" select id from "sys"."functions" where name ilike 'isaUUID' and id NOT IN (select id from "sys"."systemfunctions");
## Comment 22106
Date: 2016-04-28 15:36:11 +0200
From: Martin van Dinther <<martin.van.dinther>>
Correction for last 2 SQL statements of comment2, it should be:
select * from "sys"."functions" where name ilike 'isaUUID' and id NOT IN (select function_id from "sys"."systemfunctions")
-- list two rows, add the function id's to table sys.systemfunctions
insert into "sys"."systemfunctions" (select id from "sys"."functions" where name ilike 'isaUUID' and id NOT IN (select function_id from "sys"."systemfunctions"));
-- two rows inserted
## Comment 22115
Date: 2016-04-29 13:33:45 +0200
From: @sjoerdmullender
(In reply to Martin van Dinther from comment 2)
> To correct the problem for an existing database run commands (as admin):
> drop function sys.isaUUID(uuid);
> create function sys.isaUUID(u uuid) returns boolean external name
> uuid."isaUUID";
This part doesn't work. A uuid is not a str, so the MAL function isn't found. However, the function doesn't actually make any sense: if the argument is of type UUID, it is *by definition* a UUID, so the function should always return TRUE:
create function sys.isaUUID(u uuid) returns boolean begin return true; end;
## Comment 22119
Date: 2016-05-02 11:44:38 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [2b223d498fe4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2b223d498fe4) 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=2b223d498fe4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2b223d498fe4)
Changeset description:
Turn sys.isauuid into a Boolean returning function.
This fixes bug #3997.
## Comment 22120
Date: 2016-05-03 09:36:39 +0200
From: @sjoerdmullender
Fix will be in next feature release.
| calling scalar functions sys.isaUUID(str) or sys.isaUUID(uuid) fail | https://api.github.com/repos/MonetDB/MonetDB/issues/3997/comments | 0 | 2020-11-30T13:26:17Z | 2024-06-27T12:11:58Z | https://github.com/MonetDB/MonetDB/issues/3997 | 753,477,225 | 3,997 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-28 12:34:19 +0200
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <<bugs-sql>>
Version: 11.21.19 (Jul2015-SP4)
CC: @njnes, serinalevis9
Last updated: 2019-02-12 13:54:48 +0100
## Comment 22102
Date: 2016-04-28 12:34:19 +0200
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Build Identifier:
Query: select * from sys.connections;
should list the connections conencted on the MonetDB server.
However it always returns no rows, no matter how many clients (mclient or JdbcClient or other connections) are connected to the MonetDB server.
This makes it impossible to find out who's or which clients are connected to the server.
Reproducible: Always
### Steps to Reproduce:
1. start mserver5 process (Jul2105)
2. start mclient
3. execute SQL query: select * from sys.connections;
4. start a second mclient with the same credentials
5. execute SQL query: select * from sys.connections;
### Actual Results:
bash-4.3$ ./start_INSTALL_mserver5.sh
builtin opt gdk_dbpath = /export/scratch2/dinther/INSTALL/var/monetdb5/dbfarm/demo
builtin opt gdk_debug = 0
builtin opt gdk_vmtrim = no
builtin opt monet_prompt = >
builtin opt monet_daemon = no
builtin opt mapi_port = 50000
builtin opt mapi_open = false
builtin opt mapi_autosense = false
builtin opt sql_optimizer = default_pipe
builtin opt sql_debug = 0
cmdline opt embedded_r = true
cmdline opt mapi_port = 41000
cmdline opt gdk_debug = 10
MonetDB 5 server v11.21.20
This is an unreleased version
Serving database 'demo', using 8 threads
Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs and 128bit integers dynamically linked
Found 15.589 GiB available main-memory.
Copyright (c) 1993-July 2008 CWI.
Copyright (c) August 2008-2015 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:50000/
MonetDB/GIS module loaded
Start processing logs sql/sql_logs version 52200
Finished processing logs sql/sql_logs
MonetDB/SQL module loaded
MonetDB/R module loaded
> SQL catalog created, loading sql scripts once
loading sql script: 09_like.sql
loading sql script: 10_math.sql
loading sql script: 11_times.sql
loading sql script: 12_url.sql
loading sql script: 13_date.sql
loading sql script: 14_inet.sql
loading sql script: 15_querylog.sql
loading sql script: 16_tracelog.sql
loading sql script: 17_temporal.sql
loading sql script: 20_vacuum.sql
loading sql script: 21_dependency_functions.sql
loading sql script: 22_clients.sql
loading sql script: 23_skyserver.sql
loading sql script: 24_zorder.sql
loading sql script: 25_debug.sql
loading sql script: 26_sysmon.sql
loading sql script: 27_rejects.sql
loading sql script: 39_analytics.sql
loading sql script: 39_analytics_hge.sql
loading sql script: 40_geom.sql
loading sql script: 40_json.sql
loading sql script: 40_json_hge.sql
loading sql script: 41_md5sum.sql
loading sql script: 45_uuid.sql
loading sql script: 46_gsl.sql
loading sql script: 51_sys_schema_extension.sql
loading sql script: 72_fits.sql
loading sql script: 74_netcdf.sql
loading sql script: 75_storagemodel.sql
loading sql script: 80_statistics.sql
loading sql script: 80_udf.sql
loading sql script: 80_udf_hge.sql
loading sql script: 85_bam.sql
loading sql script: 90_generator.sql
loading sql script: 90_generator_hge.sql
loading sql script: 99_system.sql
bash-4.3$ mclient
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.21.20 (unreleased), 'demo'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>select * from sys.connections;
+----+--------+------+----+----------+------+----------+----------+
| id | server | port | db | db_alias | user | password | language |
+====+========+======+====+==========+======+==========+==========+
+----+--------+------+----+----------+------+----------+----------+
0 tuples (2.079ms)
sql>
### Expected Results:
For each connected client program or connection, a row listing the connection information.
When using mclient it should list at least one row; the connection made by mclient.
## Comment 22189
Date: 2016-05-30 17:11:06 +0200
From: @sjoerdmullender
The table sys.connections has nothing to do with MAPI connections. It is a remnant from experimental code which was removed in February 2012 (changeset 8ee024048e42).
The bug is rather that the table still exists.
## Comment 22307
Date: 2016-08-19 16:00:37 +0200
From: @njnes
should we cleanup the mvc_connect_catalog code (including this table)?
## Comment 22327
Date: 2016-08-29 11:41:11 +0200
From: @sjoerdmullender
(In reply to Niels Nes from comment 2)
> should we cleanup the mvc_connect_catalog code (including this table)?
Yes.
## Comment 24980
Date: 2017-02-06 22:20:16 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [873075e01254](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=873075e01254) 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=873075e01254](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=873075e01254)
Changeset description:
Removed table sys.connections.
This "fixes" bug #3996.
## Comment 24981
Date: 2017-02-06 22:24:53 +0100
From: @sjoerdmullender
The sys.connections table will be removed in the next feature release. This should end the confusion.
| select * from sys.connections always returns 0 rows. Expected to see at least one row for the active connection. | https://api.github.com/repos/MonetDB/MonetDB/issues/3996/comments | 0 | 2020-11-30T13:26:14Z | 2024-06-27T12:11:57Z | https://github.com/MonetDB/MonetDB/issues/3996 | 753,477,201 | 3,996 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-27 14:56:46 +0200
From: monetdb
To: clients devs <<bugs-clients>>
Version: 11.21.19 (Jul2015-SP4)
CC: martin.van.dinther
Last updated: 2016-06-23 10:24:40 +0200
## Comment 22101
Date: 2016-04-27 14:56:46 +0200
From: monetdb
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.75 Safari/537.36
Build Identifier:
nl.cwi.monetdb.jdbc.MonetResultSet.getObject(MonetResultSet.java:1945)
Reproducible: Always
### Steps to Reproduce:
1.using jetbrains datagrip, this error occurs after connection
I fixed the driver source code by inserting at line 1945 (it is a copy/paste of the already existing code at line 1579) :
/* statement is null for virtual result sets such as the ones that hold generated keys */
if (this.getStatement() == null) {
return getObject(columnName, new HashMap<String, Class<?>>());
}
btw, is there a repository we can contribute to ?
## Comment 22136
Date: 2016-05-12 12:44:32 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [92ae5904dd8d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=92ae5904dd8d) 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=92ae5904dd8d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=92ae5904dd8d)
Changeset description:
Fix for Bug #3995
## Comment 22137
Date: 2016-05-12 12:57:19 +0200
From: Martin van Dinther <<martin.van.dinther>>
Thanks for reporting the issue.
As you can see in the changeset I used a different solution which is more in line with all the others getXxxx(String ColumnName) methods.
It will call the getObject(int columnIndex) method which already has the logic for dealing with:
if (this.getStatement() == null) { ...
So no need to duplicate that logic and code.
| NullPointerException when calling getObject() | https://api.github.com/repos/MonetDB/MonetDB/issues/3995/comments | 0 | 2020-11-30T13:26:12Z | 2024-06-27T12:11:57Z | https://github.com/MonetDB/MonetDB/issues/3995 | 753,477,180 | 3,995 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-27 10:30:50 +0200
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.13 (Jul2015-SP2)
CC: ajdamico
Last updated: 2016-06-23 10:24:44 +0200
## Comment 22100
Date: 2016-04-27 10:30:50 +0200
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Build Identifier:
ESC key does not work.. the session is over
Reproducible: Always
### Steps to Reproduce:
R version 3.2.4 Revised (2016-03-16 r70336) -- "Very Secure Dishes"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> install.packages( c("MonetDB.R", "MonetDBLite" , "DBI" ) , repos=c("https://dev.monetdb.org/Assets/R/", "http://cran.rstudio.com/"))
Installing packages into ‘C:/Users/AnthonyD/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
trying URL 'https://dev.monetdb.org/Assets/R/bin/windows/contrib/3.2/MonetDB.R_1.0.2.zip'
Content type 'application/zip' length 136636 bytes (133 KB)
downloaded 133 KB
trying URL 'https://dev.monetdb.org/Assets/R/bin/windows/contrib/3.2/MonetDBLite_0.2.3.zip'
Content type 'application/zip' length 6028873 bytes (5.7 MB)
downloaded 5.7 MB
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/DBI_0.3.1.zip'
Content type 'application/zip' length 162505 bytes (158 KB)
downloaded 158 KB
package ‘MonetDB.R’ successfully unpacked and MD5 sums checked
package ‘MonetDBLite’ successfully unpacked and MD5 sums checked
package ‘DBI’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\AnthonyD\AppData\Local\Temp\Rtmp4mBhlA\downloaded_packages
>
> library(DBI)
Warning message:
package ‘DBI’ was built under R version 3.2.5
> library(MonetDB.R)
> library(MonetDBLite)
Warning message:
package ‘MonetDBLite’ was built under R version 3.2.5
>
> db <- dbConnect( MonetDBLite() )
>
> dbDisconnect( db , shutdown = TRUE )
### Actual Results:
infinite freeze
## Comment 22109
Date: 2016-04-29 07:51:02 +0200
From: Anthony Damico <<ajdamico>>
THANKS HANNES
| MonetDBLite dbDisconnect with shutdown=TRUE freezes the console on windows | https://api.github.com/repos/MonetDB/MonetDB/issues/3994/comments | 0 | 2020-11-30T13:26:10Z | 2024-06-27T12:11:56Z | https://github.com/MonetDB/MonetDB/issues/3994 | 753,477,137 | 3,994 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-26 09:05:41 +0200
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.13 (Jul2015-SP2)
CC: ajdamico
Last updated: 2016-05-23 11:14:32 +0200
## Comment 22098
Date: 2016-04-26 09:05:41 +0200
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Build Identifier:
if the first monetdb connection fails, the session is ruined
Reproducible: Always
### Steps to Reproduce:
R session one
library(DBI)
library(MonetDB.R)
library(MonetDBLite)
you will need this same filepath in session two
( my_tempdir <- tempdir() )
db <- dbConnect( MonetDBLite() , my_tempdir )
copy this folder path to clipboard
dput( my_tempdir )
keep R session one open
R session two
library(DBI)
library(MonetDB.R)
library(MonetDBLite)
use the same `my_tempdir` as session one
my_tempdir <- [[use output of session one `dput` here]]
expected error:
db <- dbConnect( MonetDBLite() , my_tempdir )
Error in MonetDBLite::monetdb_embedded_startup(embedded, !getOption("monetdb.debug.embedded", :
Failed to initialize embedded MonetDB !FATAL: GDKlockHome: Database lock '.gdk_lock' denied
CLOSE R session one
remain in R session two
still does not connect to database created in session one
db <- dbConnect( MonetDBLite() , my_tempdir )
Error in MonetDBLite::monetdb_embedded_startup(embedded, !getOption("monetdb.debug.embedded", :
Failed to initialize embedded MonetDB !FATAL: BBPaddfarm: bad rolemask
also does not connect to a different database..
db <- dbConnect( MonetDBLite() , tempdir() )
Error in MonetDBLite::monetdb_embedded_startup(embedded, !getOption("monetdb.debug.embedded", :
Failed to initialize embedded MonetDB !FATAL: BBPaddfarm: bad rolemask
related to shutdown=TRUE
## Comment 22112
Date: 2016-04-29 07:56:39 +0200
From: Anthony Damico <<ajdamico>>
*** Bug #3884 has been marked as a duplicate of this bug. ***
## Comment 22166
Date: 2016-05-23 11:14:32 +0200
From: @hannesmuehleisen
filed at https://github.com/hannesmuehleisen/MonetDBLite/issues/17
| MonetDBLite mistaken first connection permanently prevents server initiation within the session | https://api.github.com/repos/MonetDB/MonetDB/issues/3993/comments | 0 | 2020-11-30T13:26:06Z | 2024-06-28T13:12:19Z | https://github.com/MonetDB/MonetDB/issues/3993 | 753,477,098 | 3,993 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-25 18:06:25 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.21.19 (Jul2015-SP4)
CC: @mlkersten
Last updated: 2019-07-27 23:30:30 +0200
## Comment 22096
Date: 2016-04-25 18:06:25 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.86 Safari/537.36
Build Identifier:
If I'm not mistaken, the bat.new() + bat.append() pattern that is used to implement union is marked as "side effect" and thus not reusable. However, at least within the same transaction, I don't see why it shouldn't. This can have a serious performance impact.
Example:
start transaction;
-- a small table
create table t(value int);
insert into t values (0),(1);
-- a union
create view x as
select * from t
union all
select * from t;
-- use the previous union twice, it actually creates two copies of it
explain select x1.value
from x x1,x x2
where x1.value = x2.value;
+----------------------------------------------------------------------------------------------------------------------------+
| mal |
+============================================================================================================================+
| function user.s8_1():void; |
| X_43:void := querylog.define("explain select x1.value\nfrom x x1,x x2\nwhere x1.value = x2.value;","default_pipe",30); |
| barrier X_57 := language.dataflow(); |
| X_25 := bat.new(nil:oid,nil:str); |
| X_33 := bat.append(X_25,".x1"); |
| X_27 := bat.new(nil:oid,nil:str); |
| X_35 := bat.append(X_27,"value"); |
| X_29 := bat.new(nil:oid,nil:str); |
| X_37 := bat.append(X_29,"int"); |
| X_30 := bat.new(nil:oid,nil:int); |
| X_39 := bat.append(X_30,32); |
| X_32 := bat.new(nil:oid,nil:int); |
| X_41 := bat.append(X_32,0); |
| X_2:bat[:oid,:int] := bat.new(nil:oid,nil:int); |
| X_1 := sql.mvc(); |
| X_5:bat[:oid,:oid] := sql.tid(X_1,"spinque","t"); |
| X_8:bat[:oid,:int] := sql.bind(X_1,"spinque","t","value",0); |
| X_11 := algebra.leftfetchjoin(X_5,X_8); |
| X_12 := bat.append(X_2,X_11,true); |
| X_14 := bat.append(X_12,X_11,true); |
| X_15:bat[:oid,:int] := bat.new(nil:oid,nil:int); |
| X_16 := bat.append(X_15,X_11,true); |
| X_17 := bat.append(X_16,X_11,true); |
| (X_18,r1_27) := algebra.subjoin(X_14,X_17,nil:BAT,nil:BAT,false,nil:lng); |
| X_23 := algebra.leftfetchjoin(X_18,X_14); |
| language.pass(X_11); |
| language.pass(X_14); |
| exit X_57; |
| sql.resultSet(X_33,X_35,X_37,X_39,X_41,X_23); |
| end user.s8_1; |
+----------------------------------------------------------------------------------------------------------------------------+
In the explain above it is guaranteed that X_16 = X_12 and X_17 = X_14.
However they get recomputed.
When this happens at the beginning of a plan, the plan becomes almost 2x bigger. Every times this happens again, the plan forks into two identical branches. The growth becomes exponential and quickly out of control for plans not as trivial as the one above. Not only the same results get recomputed, but the plan becomes so big that it takes even seconds to generate, for queries that should be built + executed in less that 100ms.
This is strictly related to bug #3361. Different causes, but same effect.
Reproducible: Always
## Comment 22097
Date: 2016-04-25 20:24:57 +0200
From: @mlkersten
In this particular case, a human may detect the recurring macro pattern involving 4 MAL instructions. Algorithmically it is a much harder case, most likely NP-complete, because you have to be prepared for arbitrary long/complex patterns.
Also notice that you plan is not parallel, which aggravates the performance impact.
The recycler optimizer may detect it, but sure how it will work out currently.
## Comment 22099
Date: 2016-04-26 09:30:57 +0200
From: @swingbit
I suppose it all stems from the fact that C := bat.append(A,B) modifies A (appends in place), and this is probably done to avoid data copying that would instead happen with something like C := concat(A,B) (where A and B are not modified).
Obviously the two patterns
A' := bat.new(..);
C' := bat.append(A',A);
C := bat.append(C',B);
and
C := bat.concat(A,B);
are fully equivalent in terms of data copying, but the first pattern is faster for any subsequent append.
Even so, isn't it the case that any of the results in the first pattern (in any pattern, actually) can be considered reusable as long as it is not used by instructions with side-effects?
Then:
- A' cannot be reused, because it is modified by the first append
- C' cannot be reused, because it is modified by the second append
- C can be reused, because it isn't used by any instruction with side-effect.
In the worst case I see a quadratic search space, which is the same as the standard commonTerms optimizer.
Am I missing something?
## Comment 22124
Date: 2016-05-06 19:00:34 +0200
From: @swingbit
As a quick proof of concept, I changed the translation of UNION, to use a side-effect-free operation.
UNION now maps to algebra.tconcat() command (see below, X_9). For now I have implemented this naively as two BATloops that append all tuples from the two arguments into a new bat (similar to tunion, except that it does not remove duplicates and produce a void head).
The example I originally posted is no longer duplicating work:
+----------------------------------------------------------------------------------------------------------------------------+
| mal |
+============================================================================================================================+
| function user.s5_1():void; |
| X_34:void := querylog.define("explain select x1.value\nfrom x x1,x x2\nwhere x1.value = x2.value;","default_pipe",25); |
| barrier X_48 := language.dataflow(); |
| X_17 := bat.new(nil:oid,nil:str); |
| X_25 := bat.append(X_17,"spinque.x1"); |
| X_20 := bat.new(nil:oid,nil:str); |
| X_27 := bat.append(X_20,"value"); |
| X_21 := bat.new(nil:oid,nil:str); |
| X_28 := bat.append(X_21,"int"); |
| X_22 := bat.new(nil:oid,nil:int); |
| X_30 := bat.append(X_22,32); |
| X_24 := bat.new(nil:oid,nil:int); |
| X_32 := bat.append(X_24,0); |
| X_1 := sql.mvc(); |
| X_2:bat[:oid,:oid] := sql.tid(X_1,"spinque","t"); |
| X_5:bat[:oid,:int] := sql.bind(X_1,"spinque","t","value",0); |
| X_8 := algebra.leftfetchjoin(X_2,X_5); |
| X_9 := algebra.tconcat(X_8,X_8); |
| (X_10,r1_20) := algebra.subjoin(X_9,X_9,nil:BAT,nil:BAT,false,nil:lng); |
| X_15 := algebra.leftfetchjoin(X_10,X_9); |
| language.pass(X_8); |
| language.pass(X_9); |
| exit X_48; |
| sql.resultSet(X_25,X_27,X_28,X_30,X_32,X_15); |
| end user.s5_1; |
+----------------------------------------------------------------------------------------------------------------------------+
I tried this on one of our long queries, obtaining the same results for:
- UNION -> bat.append() : 2517 MAL instructions
- UNION -> algebra.tconcat() : 694 MAL instructions
## Comment 22128
Date: 2016-05-08 11:18:04 +0200
From: @swingbit
The solution above (tconcat) is, as far as I can tell, simple, safe, and effective. The advantages of in-place append can be exploited only when unioning at least 3 (large) tables in the same query. The benefit balance is for me clearly on the tconcat side, so we will most likely keep it in our codebase.
About this report: I have a working solution now - feel free to close as won't fix if the existing translation fits better the patterns you observe.
I would be still interested to learn whether you guys would consider this as a viable option in general, and if not, why.
## Comment 25569
Date: 2017-08-12 17:56:53 +0200
From: @mlkersten
I contrived example which is hard to detect in general.
I would say that this view is an application error:
create view x as
select * from t
union all
select * from t;
In most cases the view components will identify a different part of the database.
create view x as
select * from t where value > 0
union all
select * from t where value < 0;
The same holds for the multiple uses:
explain select x1.value
from x x1,x x2
where x1.value = x2.value and x1.value == 0 and x2.value >1
Detecting repetition at the MAL level is practically impossible and
calculation of a view only once within a query kills potential
other optimizations.
## Comment 25570
Date: 2017-08-13 02:29:12 +0200
From: @swingbit
Martin, based on my experience and my experiments I cannot agree with your last comment.
However I think this needs a more in-depth discussion than what is allowed on this platform. As you know I am keen to come and show some results soon.
## Comment 27182
Date: 2019-07-27 23:30:30 +0200
From: @mlkersten
Combining a serial append operation into a single multi-concat bears with it
the consequence that temporary variables are kept around longer than strictly
necessary. This means that the footprint becomes twice the final result
A' := bat.new(..);
B' := bat.append(A',A);
C' := bat.append(B', B);
D := bat.append(C', C);
....
N := bat.append(M', M)
into
N = tconcat(B,C,D,...,M)
which looks like a mat.pack where we also do it incremental to avoid this
enlarged footprint.
A side issue is that we don't know the size of the components and we have to
keep in mind that their oid ranges may be used as well in the query.
A nested construction ( concat(concat(A,B), concat(C,D)) would become more expensive as you would copy too much around.
Relaxing the side-effect is something to look into further. For simple cases it does not hold and could this program be executed in parallel.
The following might work
B' := mat.packincrement(A,<unknown>);
C' := mat.packincrement(B', B);
D := mat.packincrement(C', C);
....
N := mat.packincrement(M', M)
| unions not reusable -> plans explode | https://api.github.com/repos/MonetDB/MonetDB/issues/3992/comments | 0 | 2020-11-30T13:26:04Z | 2024-06-28T13:12:18Z | https://github.com/MonetDB/MonetDB/issues/3992 | 753,477,059 | 3,992 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-25 11:40:56 +0200
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.13 (Jul2015-SP2)
CC: ajdamico
Last updated: 2016-06-23 10:24:35 +0200
## Comment 22089
Date: 2016-04-25 11:40:56 +0200
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Build Identifier:
"need to check again we had a bug that made dbReadTable slow if it was set to FALSE"
Reproducible: Always
## Comment 22092
Date: 2016-04-25 16:30:39 +0200
From: @hannesmuehleisen
fixed
## Comment 22094
Date: 2016-04-25 16:32:41 +0200
From: Anthony Damico <<ajdamico>>
thanx
| MonetDBLite feature request: default monetdb.sequential to FALSE on windows | https://api.github.com/repos/MonetDB/MonetDB/issues/3991/comments | 0 | 2020-11-30T13:26:02Z | 2024-06-27T12:11:53Z | https://github.com/MonetDB/MonetDB/issues/3991 | 753,477,028 | 3,991 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-24 05:02:17 +0200
From: Andre Mikulec <<Andre_Mikulec>>
To: GDK devs <<bugs-common>>
Version: 11.21.19 (Jul2015-SP4)
CC: @hannesmuehleisen
Last updated: 2016-04-24 14:20:01 +0200
## Comment 22085
Date: 2016-04-24 05:02:17 +0200
From: Andre Mikulec <<Andre_Mikulec>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36
Build Identifier:
I am following the example here.
Embedded R in MonetDB
Submitted by hannes on Fri, 10/31/2014 - 12:54
https://www.monetdb.org/content/embedded-r-monetdb
From the CLIENT I did.
NOTE: The client does not know WHERE R(R.exe/R.dll) is located,
so the article does not make sense.
> CREATE FUNCTION rapi00() RETURNS TABLE (d INTEGER) LANGUAGE R { seq(1,10); };
sql>SELECT d FROM rapi00() AS r WHERE d > 5;
TypeException:user.s8_1[2]:'rapi.eval' undefined in: X_4:bat[:oid,:int] := rapi.eval(nil:ptr,"{ seq(1,10); };":str);
program contains errors
I tried embedded R.
I installed into R 3.2.4 like this.
> install.packages(c('MonetDB.R', 'MonetDBLite'),
repos=c('https://dev.monetdb.org/Assets/R/', 'http://cran.rstudio.com/'))
within R from the EMBEDDED I DID.
> library(DBI)
> dbdir <- tempdir()
> con <- dbConnect(MonetDB.R::MonetDB(), embedded = dbdir)
> dbSendQuery(con, "CREATE FUNCTION rapi00() RETURNS TABLE (d INTEGER) LANGUAGE R { seq(1,10) }")
An object of class "MonetDBEmbeddedResult"
Slot "env":
<environment: 0x00000000451fc158>
> dbGetQuery(con, "SELECT d FROM rapi00() AS r WHERE d > 5")
Error in .local(conn, statement, ...) :
Unable to execute statement 'SELECT d FROM rapi00() AS r WHERE d > 5'.
Server says 'SQLException:SQLparser:Errors encountered in query'.
Please help.
Thank you,
Andre Mikulec
Andre_Mikulec@Hotmail.com
Reproducible: Always
### Steps to Reproduce:
1. Be within R 3.2.4
2. install.packages(c('MonetDB.R', 'MonetDBLite'),
repos=c('https://dev.monetdb.org/Assets/R/', 'http://cran.rstudio.com/'))
3. library(DBI)
4. dbdir <- tempdir()
5. con <- dbConnect(MonetDB.R::MonetDB(), embedded = dbdir)
6. dbSendQuery(con, "CREATE FUNCTION rapi00() RETURNS TABLE (d INTEGER) LANGUAGE R { seq(1,10) }")
7. dbGetQuery(con, "SELECT d FROM rapi00() AS r WHERE d > 5")
### Actual Results:
Error in .local(conn, statement, ...) :
Unable to execute statement 'SELECT d FROM rapi00() AS r WHERE d > 5'.
Server says 'SQLException:SQLparser:Errors encountered in query'.
### Expected Results:
+------+
| d |
+======+
| 6 |
| 7 |
| 8 |
| 9 |
| 10 |
+------+
## Comment 22087
Date: 2016-04-24 14:20:01 +0200
From: @hannesmuehleisen
There is no support for R UDFs in MonetDBLite (for now). Similarly, R UDFs are currently not supported on Windows.
| Embedded R in MonetDB not working | https://api.github.com/repos/MonetDB/MonetDB/issues/3990/comments | 0 | 2020-11-30T13:25:59Z | 2024-06-28T13:12:17Z | https://github.com/MonetDB/MonetDB/issues/3990 | 753,477,002 | 3,990 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-24 03:31:26 +0200
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.13 (Jul2015-SP2)
CC: ajdamico
Last updated: 2016-05-23 11:21:19 +0200
## Comment 22084
Date: 2016-04-24 03:31:26 +0200
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Build Identifier:
not sure if this qualifies as a bug, but the behavior is surprising
minimal reproducible example with timestamps below
comparing MonetDBLite 0.2.3 versus mserver Jul2015-SP4
Reproducible: Always
### Steps to Reproduce:
library(DBI)
library(MonetDBLite)
library(MonetDB.R)
x1 <- paste( rep( "( SELECT * FROM x )" , 1000 ) , collapse = ' UNION ALL ' )
v <- paste( "( SELECT * FROM ( " , x1 , " ) AS z ) AS y" )
db1 <- dbConnect( MonetDBLite() )
batfile <-
monetdb.server.setup(
database.directory = paste0( tempdir() , '/MonetDB' ) ,
monetdb.program.path =
ifelse(
.Platform$OS.type == "windows" ,
"C:/Program Files/MonetDB/MonetDB5" ,
""
) ,
dbname = "mydb" ,
dbport = 50000
)
monetdb.server.start( batfile )
monet.url <- paste0( "monetdb://localhost:50000/mydb" )
db2 <- dbConnect( MonetDB.R() , monet.url , wait = TRUE )
system.time( dbWriteTable( db1 , 'x' , mtcars[ rep( seq( nrow( mtcars ) , 10000 ) ) , ] ) )
user system elapsed
0.08 0.00 0.25
system.time( w1 <- dbGetQuery( db1 , paste( "SELECT" , paste0( "SUM(" , names( mtcars ) , ")" , collapse = "," ) , "FROM" , v , "WHERE mpg > 20" ) ) )
user system elapsed
14.45 2.56 20.28
system.time( dbWriteTable( db2 , 'x' , mtcars[ rep( seq( nrow( mtcars ) , 10000 ) ) , ] ) )
user system elapsed
2.07 0.03 2.78
system.time( w2 <- dbGetQuery( db2 , paste( "SELECT" , paste0( "SUM(" , names( mtcars ) , ")" , collapse = "," ) , "FROM" , v , "WHERE mpg > 20" ) ) )
user system elapsed
0.00 0.05 3.68
### Actual Results:
mserver 4x faster on my 8 core windows laptop
### Expected Results:
no difference
## Comment 22086
Date: 2016-04-24 14:18:56 +0200
From: @hannesmuehleisen
Try
options(monetdb.sequential=FALSE)
before starting MonetDBLite
Sequential mode is default for now because of an issue that by now should be resolved.
## Comment 22088
Date: 2016-04-25 11:30:53 +0200
From: Anthony Damico <<ajdamico>>
setting monetdb.sequential to FALSE did double the speed of the slow MonetDBLite query, so i'll change the title.
reopening because monetdblite is still 3x slower than standalone mserver on windows for a pretty simple stacking and summing query? but not sure if this matters so no big deal if you close again :)
> system.time( dbWriteTable( db1 , 'x' , mtcars[ rep( seq( nrow( mtcars ) , 10000 ) ) , ] ) )
user system elapsed
0.03 0.00 0.67
>
> system.time( w1 <- dbGetQuery( db1 , paste( "SELECT" , paste0( "SUM(" , names( mtcars ) , ")" , collapse = "," ) , "FROM" , v , "WHERE mpg > 20" ) ) )
user system elapsed
10.27 1.52 10.73
>
> system.time( dbWriteTable( db2 , 'x' , mtcars[ rep( seq( nrow( mtcars ) , 10000 ) ) , ] ) )
user system elapsed
1.53 0.02 2.83
>
> system.time( w2 <- dbGetQuery( db2 , paste( "SELECT" , paste0( "SUM(" , names( mtcars ) , ")" , collapse = "," ) , "FROM" , v , "WHERE mpg > 20" ) ) )
user system elapsed
0 0 3
## Comment 22090
Date: 2016-04-25 16:19:18 +0200
From: @hannesmuehleisen
grafted commit 59488:623aa3f321dd to Jun2016 that makes SELECT * FROM table and SELECT * FROM table SAMPLE 10 fast again
## Comment 22091
Date: 2016-04-25 16:26:24 +0200
From: @hannesmuehleisen
works fine for me
## Comment 22095
Date: 2016-04-25 16:35:29 +0200
From: Anthony Damico <<ajdamico>>
[10:34:45 AM] Hannes Mühleisen: yeah i’m going to worry about that once all functional issues are fixed
[10:34:53 AM] Hannes Mühleisen: i meant to close another bug
## Comment 22170
Date: 2016-05-23 11:21:19 +0200
From: @hannesmuehleisen
Filed at https://github.com/hannesmuehleisen/MonetDBLite/issues/20
| MonetDBLite query much slower than standalone mserver | https://api.github.com/repos/MonetDB/MonetDB/issues/3989/comments | 0 | 2020-11-30T13:25:57Z | 2024-06-28T13:12:16Z | https://github.com/MonetDB/MonetDB/issues/3989 | 753,476,975 | 3,989 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-22 15:31:04 +0200
From: Richard Hughes <<richard.monetdb>>
To: GDK devs <<bugs-common>>
Version: 11.19.11 (Oct2014-SP3)
Duplicates: #4050
Last updated: 2016-10-25 15:16:35 +0200
## Comment 22080
Date: 2016-04-22 15:31:04 +0200
From: Richard Hughes <<richard.monetdb>>
Created attachment 394
merovingian.log
Build is Oct2014 [35dd891a5d01](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=35dd891a5d01) (2015-03-23).
I filled up the hard disk; lots of things started failing, as expected.
Upon freeing up some space, the database still refused to start: "!FATAL: Logger_new: inconsistent database, catalog does not exist"
I have attached:
1) The contents of merovingian.log around the time of failure
2) The contents of BBP.dir as it was when I got to it
3) The output of ls -lR
By comparing (2) and (3) you can see that the sql_catalog_bid should be at 01/103.{head|tail}, but that those files do not exist. This is the immediate cause of the FATAL error above.
The SIGBUS which took down mserver5 for the first time is, I believe, fixed in more recent releases (I'm trying to get the machine upgraded, honest!).
If you believe that problems which may have caused irrecoverable corruption of this type have been fixed in more recent releases as well then feel free to close this bug with extreme prejudice. I filed this bug because I don't remember seeing any changes of this kind in release notes or checkin comments.
I don't have an core dumps for any of this stuff - they were trying to be written to the disk that was full.
> Attached file: [merovingian-diskfullcorruption.log](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3988_merovingian-diskfullcorruption.log_394) (text/plain, 7129 bytes)
> Description: merovingian.log
## Comment 22081
Date: 2016-04-22 15:31:50 +0200
From: Richard Hughes <<richard.monetdb>>
Created attachment 395
BBP.dir
> Attached file: [BBP.dir](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3988_BBP.dir_395) (text/plain, 146146 bytes)
> Description: BBP.dir
## Comment 22082
Date: 2016-04-22 15:32:38 +0200
From: Richard Hughes <<richard.monetdb>>
Created attachment 396
directory listing of database
> Attached file: [ls-lR.gz](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3988_ls-lR.gz_396) (application/octet-stream, 390075 bytes)
> Description: directory listing of database
## Comment 24624
Date: 2016-10-25 15:16:35 +0200
From: Richard Hughes <<richard.monetdb>>
*** This bug has been marked as a duplicate of bug #4050 ***
| Corrupt, unstartable database after disk full | https://api.github.com/repos/MonetDB/MonetDB/issues/3988/comments | 0 | 2020-11-30T13:25:55Z | 2024-06-28T13:12:16Z | https://github.com/MonetDB/MonetDB/issues/3988 | 753,476,947 | 3,988 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-21 14:26:35 +0200
From: anthonin.bonnefoy
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 11.21.13 (Jul2015-SP2)
Last updated: 2016-06-23 10:24:15 +0200
## Comment 22077
Date: 2016-04-21 14:26:35 +0200
From: anthonin.bonnefoy
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 Iceweasel/45.0
Build Identifier:
An "COPY INTO" of a malformed csv trigger a segfault.
Reproducible: Always
### Steps to Reproduce:
1. Create a test table
CREATE TABLE test (a TEXT, b BIGINT);
2. Create the csv file
echo -n '"a\n"b"\t"c\nd"\n' > data.csv
3. Import it
mclient db -s "COPY INTO test FROM '$PWD/data.csv' DELIMITERS '\t','\n','\"' NULL AS '<NULL>';"
### Actual Results:
A SIGSEGV with the given traceback:
(gdb) bt
0 0x00007f7b3d9fbd32 in SQLload_parse_line (task=0x7f7b351e9960, idx=0) at tablet.c:1089
1 0x00007f7b3d9fbfff in SQLworker (arg=0x7f7b351e9960) at tablet.c:1135
2 0x00007f7b3be510a4 in start_thread (arg=0x7f7b349ed700) at pthread_create.c:309
3 0x00007f7b3bb8687d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
## Comment 22078
Date: 2016-04-21 14:58:30 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [aedcd743f056](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=aedcd743f056) 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=aedcd743f056](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=aedcd743f056)
Changeset description:
Add NULL pointer check.
This fixes bug #3987.
## Comment 22079
Date: 2016-04-21 14:58:36 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [df58cfe6f8b9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=df58cfe6f8b9) 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=df58cfe6f8b9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=df58cfe6f8b9)
Changeset description:
Added test for bug #3987.
| Segfault on malformed csv import | https://api.github.com/repos/MonetDB/MonetDB/issues/3987/comments | 0 | 2020-11-30T13:25:53Z | 2024-06-27T12:11:48Z | https://github.com/MonetDB/MonetDB/issues/3987 | 753,476,913 | 3,987 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-21 10:29:46 +0200
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.13 (Jul2015-SP2)
CC: ajdamico
Last updated: 2016-05-23 11:18:13 +0200
## Comment 22073
Date: 2016-04-21 10:29:46 +0200
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Build Identifier:
i think this should just break noisily if the names or types aren't exactly the same
Reproducible: Always
### Steps to Reproduce:
library(DBI)
library(MonetDB.R)
library(MonetDBLite)
db <- dbConnect( MonetDBLite() )
x <- mtcars
dbWriteTable( db , 'x' , x )
x <- x[ , sort( names( x ) ) ]
dbWriteTable( db , 'x' , x , append = TRUE )
dbReadTable( db , 'x' )
### Actual Results:
UNION ALL stacking
## Comment 22169
Date: 2016-05-23 11:18:13 +0200
From: @hannesmuehleisen
Filed at https://github.com/hannesmuehleisen/MonetDBLite/issues/14
| MonetDBLite feature request: dbWriteTable append=TRUE does not behave like rbind | https://api.github.com/repos/MonetDB/MonetDB/issues/3986/comments | 0 | 2020-11-30T13:25:50Z | 2024-06-28T07:19:57Z | https://github.com/MonetDB/MonetDB/issues/3986 | 753,476,886 | 3,986 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-20 01:49:18 +0200
From: Clint Cummins <<ccummins>>
To: clients devs <<bugs-clients>>
Version: 11.21.19 (Jul2015-SP4)
Last updated: 2016-06-23 10:24:27 +0200
## Comment 22064
Date: 2016-04-20 01:49:18 +0200
From: Clint Cummins <<ccummins>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36
Build Identifier:
When trying to run a SQL query from Ruby to MonetDB using the ruby-monetdb-sql gem, the query fails at an early point, when trying to set the timezone offset, if the timezone offset is negative (in USA, etc.).
Reproducible: Always
### Steps to Reproduce:
1. gem 'ruby-monetdb-sql' in Gemfile
2. require 'MonetDB' in ruby code
3. db = MonetDB.new
4. db.conn(...connnection parameters...)
5. res = db.query("select * from tbl")
### Actual Results:
Error message with traceback to MonetDBConnection.rb line 403, in set_timezone().
I didn't save the actual error message, since I have a working code fix for it, below.
### Expected Results:
res filled with query results.
Code change which fixes this bug:
Code was (clients/ruby/lib/MonetDBConnection.rb line 402):
if tz_offset <= 9 verify minute count!
Change to:
verify minute count!
if tz_offset <= -10
tz_offset = "'" + tz_offset.to_s + ":00'"
elsif tz_offset < 0
tz_offset = -tz_offset
tz_offset = "'-0" + tz_offset.to_s + ":00'"
elsif tz_offset <= 9
After this, ruby runs great with MonetDB in the USA!
## Comment 22065
Date: 2016-04-20 10:12:05 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [5247c923260e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5247c923260e) 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=5247c923260e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=5247c923260e)
Changeset description:
Fix setting time zone for negative offsets.
This fixes bug #3985.
## Comment 22066
Date: 2016-04-20 10:16:33 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset b4cf00b05ef1, made by Sjoerd Mullender <sjoerd@acm.org> in the monetdb-ruby repo, refers to this bug.
For complete details, see http://dev.monetdb.org/hg/monetdb-ruby?cmd=changeset;node=b4cf00b05ef1
Changeset description:
Fix setting time zone for negative offsets.
Port of changesets [5247c923260e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5247c923260e) and [084abef09d5d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=084abef09d5d) from MonetDB.
This fixes bug #3985.
## Comment 22068
Date: 2016-04-20 10:23:52 +0200
From: @sjoerdmullender
Thanks for the fix. It'll be in the next release.
| ruby-monetdb-sql gem fails for negative timezone offset (USA, etc.) | https://api.github.com/repos/MonetDB/MonetDB/issues/3985/comments | 0 | 2020-11-30T13:25:48Z | 2024-06-27T12:11:46Z | https://github.com/MonetDB/MonetDB/issues/3985 | 753,476,864 | 3,985 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-19 22:34:27 +0200
From: @mlkersten
To: buildtools devs <<bugs-buildtools>>
Version: 11.21.19 (Jul2015-SP4)
Last updated: 2016-06-23 10:24:26 +0200
## Comment 22062
Date: 2016-04-19 22:34:27 +0200
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Firefox/45.0
Build Identifier:
Using the MonetDB package installer on Mac expands the ~/.profile each time you install the package. Perhaps we should warn the user about this 'pollution'
Reproducible: Always
### Actual Results:
Set MonetDB path
export PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
export PATH=$PATH:/Users/mlkersten/monetdb//Darwin/bin
export PATH=$PATH:/usr/libexec/java_home
Set MonetDB path
export PATH=$PATH:/usr/local/monetdb/bin
Set MonetDB path
export PATH=$PATH:/usr/local/monetdb/bin
## Comment 22063
Date: 2016-04-19 23:08:04 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [a93d4305f49b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a93d4305f49b) 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=a93d4305f49b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a93d4305f49b)
Changeset description:
Properly check whether the MonetDB bin directory is already in $PATH.
This should fix bug #3984.
## Comment 22067
Date: 2016-04-20 10:23:12 +0200
From: @sjoerdmullender
Fixing it is infinitely better than warning people. ;-)
| Multiple paths in the .profile | https://api.github.com/repos/MonetDB/MonetDB/issues/3984/comments | 0 | 2020-11-30T13:25:46Z | 2024-06-27T12:11:46Z | https://github.com/MonetDB/MonetDB/issues/3984 | 753,476,837 | 3,984 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-14 16:10:06 +0200
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <<bugs-sql>>
Version: 11.21.19 (Jul2015-SP4)
CC: @njnes
Last updated: 2016-06-23 10:24:16 +0200
## Comment 22042
Date: 2016-04-14 16:10:06 +0200
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Build Identifier:
The number of columns of a FK should match the number of columns of the PK or UNIQUE contraint definition.
If the FK has less columns than the PK or UNIQUE definition, than a warning should be given. Currently no warning is given.
Reproducible: Always
### Steps to Reproduce:
1. Start mserver5
2. Start mclient
3. Run SQL commands:
CREATE TABLE parent2(a int, b int, PRIMARY KEY(a,b));
-- normal correct FK definition:
CREATE TABLE child1(x int, y int, FOREIGN KEY(x,y) REFERENCES parent2);
-- FK definition with more columns than the PK:
CREATE TABLE child3(x int,y int,z int, FOREIGN KEY(x,y,z) REFERENCES parent2);
-- it correctly returns an error
-- FK definition with less columns than the PK:
CREATE TABLE child2(x int REFERENCES parent2);
-- it is accepted but I prefer to get a warning
-- show PK columns
SELECT * FROM dependencies_columns_on_keys() WHERE usr LIKE 'parent%';
-- show FK columns
SELECT * FROM dependencies_keys_on_foreignkeys() WHERE usr LIKE 'child%';
### Actual Results:
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.23.0 (unreleased), 'demo'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>CREATE TABLE parent2(a int, b int, PRIMARY KEY(a,b));
operation successful (34.092ms)
sql>-- normal correct FK definition:
sql>CREATE TABLE child1(x int, y int, FOREIGN KEY(x,y) REFERENCES parent2);
operation successful (14.854ms)
sql>
sql>-- FK definition with more columns than the PK:
sql>CREATE TABLE child3(x int,y int,z int, FOREIGN KEY(x,y,z) REFERENCES parent2);
CONSTRAINT FOREIGN KEY: not all columns are handled
sql>-- it correctly returns an error
sql>
sql>-- FK definition with less columns than the PK:
sql>CREATE TABLE child2(x int REFERENCES parent2);
operation successful (12.990ms)
sql>-- it is accepted but I prefer to get a warning
sql>SELECT * FROM dependencies_columns_on_keys() WHERE usr LIKE 'parent%';
+------+------------------+----------+
| sch | usr | dep_type |
+======+==================+==========+
| a | parent2_a_b_pkey | DEP_KEY |
| b | parent2_a_b_pkey | DEP_KEY |
+------+------------------+----------+
2 tuples (7.291ms)
sql>SELECT * FROM dependencies_keys_on_foreignkeys() WHERE usr LIKE 'child%';
+------------------+-----------------+----------+
| sch | usr | dep_type |
+==================+=================+==========+
| parent2_a_b_pkey | child1_x_y_fkey | DEP_FKEY |
| parent2_a_b_pkey | child2_x_fkey | DEP_FKEY |
+------------------+-----------------+----------+
2 tuples (2.848ms)
sql>
### Expected Results:
return a warning after SQL command:
CREATE TABLE child2(x int REFERENCES parent2);
## Comment 22043
Date: 2016-04-14 17:02:44 +0200
From: Martin van Dinther <<martin.van.dinther>>
Additional info:
Creation of the partial FK via:
ALTER TABLE "sys"."child2" ADD CONSTRAINT "child2_x_fkey" FOREIGN KEY ("x") REFERENCES "sys"."parent2" ("a");
fails with an error: CONSTRAINT FOREIGN KEY: could not find referenced PRIMARY KEY in table 'parent2'
So there is a difference in behavior when the partial FK is created as part of the CREATE TABLE versus using an ALTER TABLE.
in mclient run additional commands:
sql>\D
START TRANSACTION;
SET SCHEMA "sys";
CREATE TABLE "sys"."parent2" (
"a" INTEGER NOT NULL,
"b" INTEGER NOT NULL,
CONSTRAINT "parent2_a_b_pkey" PRIMARY KEY ("a", "b")
);
CREATE TABLE "sys"."child1" (
"x" INTEGER,
"y" INTEGER
);
CREATE TABLE "sys"."child2" (
"x" INTEGER
);
ALTER TABLE "sys"."child1" ADD CONSTRAINT "child1_x_y_fkey" FOREIGN KEY ("x", "y") REFERENCES "sys"."parent2" ("a", "b");
ALTER TABLE "sys"."child2" ADD CONSTRAINT "child2_x_fkey" FOREIGN KEY ("x") REFERENCES "sys"."parent2" ("a");
COMMIT;
sql>
-- remove the tables
sql>DROP TABLE parent2 CASCADE;
operation successful (26.447ms)
sql>DROP TABLE child1;
operation successful (8.040ms)
sql>DROP TABLE child2;
operation successful (7.883ms)
sql>\D
START TRANSACTION;
COMMIT;
-- use the SQL script output of \D to recreate the tables
sql>SET SCHEMA "sys";
auto commit mode: on
sql>CREATE TABLE "sys"."parent2" (
more>"a" INTEGER NOT NULL,
more>"b" INTEGER NOT NULL,
more>CONSTRAINT "parent2_a_b_pkey" PRIMARY KEY ("a", "b")
more>);
operation successful (35.310ms)
sql>CREATE TABLE "sys"."child1" (
more>"x" INTEGER,
more>"y" INTEGER
more>);
operation successful (14.637ms)
sql>CREATE TABLE "sys"."child2" (
more>"x" INTEGER
more>);
operation successful (15.743ms)
sql>ALTER TABLE "sys"."child1" ADD CONSTRAINT "child1_x_y_fkey" FOREIGN KEY ("x", "y") REFERENCES "sys"."parent2" ("a", "b");
operation successful (22.705ms)
sql>ALTER TABLE "sys"."child2" ADD CONSTRAINT "child2_x_fkey" FOREIGN KEY ("x") REFERENCES "sys"."parent2" ("a");
CONSTRAINT FOREIGN KEY: could not find referenced PRIMARY KEY in table 'parent2'
-- the last statement is not accepted where the FK definition as part of the CREATE TABLE is accepted!
sql>\D
START TRANSACTION;
SET SCHEMA "sys";
CREATE TABLE "sys"."parent2" (
"a" INTEGER NOT NULL,
"b" INTEGER NOT NULL,
CONSTRAINT "parent2_a_b_pkey" PRIMARY KEY ("a", "b")
);
CREATE TABLE "sys"."child1" (
"x" INTEGER,
"y" INTEGER
);
CREATE TABLE "sys"."child2" (
"x" INTEGER
);
ALTER TABLE "sys"."child1" ADD CONSTRAINT "child1_x_y_fkey" FOREIGN KEY ("x", "y") REFERENCES "sys"."parent2" ("a", "b");
COMMIT;
sql>
## Comment 22052
Date: 2016-04-16 13:44:07 +0200
From: @njnes
also in single column constraint case check for the referenced side properly
## Comment 22053
Date: 2016-04-16 15:33:12 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [91ab24eed935](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=91ab24eed935) 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=91ab24eed935](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=91ab24eed935)
Changeset description:
add test for bug #3983
| Creation of a Foreign Key which partially maps to a primary key is accepted without a warning | https://api.github.com/repos/MonetDB/MonetDB/issues/3983/comments | 0 | 2020-11-30T13:25:44Z | 2024-06-27T12:11:45Z | https://github.com/MonetDB/MonetDB/issues/3983 | 753,476,812 | 3,983 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-14 15:15:20 +0200
From: @sjoerdmullender
To: SQL devs <<bugs-sql>>
Version: 11.21.19 (Jul2015-SP4)
Last updated: 2020-07-10 22:40:30 +0200
## Comment 22041
Date: 2016-04-14 15:15:20 +0200
From: @sjoerdmullender
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Build Identifier:
The SQL standard has the following syntax description for strings:
<character string literal> ::=
[ <introducer><character set specification> ]
<quote> [ <character representation>... ] <quote>
[ { <separator> <quote> [ <character representation>... ] <quote> }... ]
<character representation> ::=
<nonquote character>
| <quote> <quote>
<quote> ::=
'
Ignoring the character set specification, it is clear that \ is *not* a special character in SQL strings. Only the quote (') is special, and it needs to be doubled to include it in a string.
The MonetDB SQL parser treats \ like it is to be treated in C. There is no basis for that in the SQL standard.
Also see bug #3965, comment 5.
Reproducible: Always
### Steps to Reproduce:
1.select '\101';
2.
3.
### Actual Results:
'A'
### Expected Results:
'\101'
## Comment 22069
Date: 2016-04-20 10:26:51 +0200
From: @sjoerdmullender
Note that there is also the possibility (in the standard) of having Unicode strings, as in:
select U&'\0041';
--> 'A'
This is completely not implemented.
This, by the way, does seem to be the only place where the backslash ("reverse solidus") has any meaning in the SQL standard.
## Comment 27903
Date: 2020-07-10 22:36:45 +0200
From: @sjoerdmullender
The Unicode strings have been implemented.
The parsing of strings is now in a transitional phase. We have E-strings (E'string content') that are parsed with backslash interpretation, we have R-strings (R'string content') that are parsed according to the SQL standard (apart from the initial R), and we have plain strings that are currently equivalent to E-strings, but that will at some point change to be equivalent to R-strings.
## Comment 27904
Date: 2020-07-10 22:40:30 +0200
From: @sjoerdmullender
By the way, the E and R prefixes can of course also be spelled with lowercase.
| SQL string parsing is incorrect | https://api.github.com/repos/MonetDB/MonetDB/issues/3982/comments | 0 | 2020-11-30T13:25:42Z | 2024-06-28T13:12:15Z | https://github.com/MonetDB/MonetDB/issues/3982 | 753,476,781 | 3,982 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-14 14:58:44 +0200
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <<bugs-sql>>
Version: 11.21.19 (Jul2015-SP4)
CC: @njnes
Last updated: 2016-06-23 10:24:20 +0200
## Comment 22040
Date: 2016-04-14 14:58:44 +0200
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Build Identifier:
In a LEFT JOIN not all rows of the lhs of the join are included in the output
Reproducible: Always
### Steps to Reproduce:
1. start mserver5
2. start mclient
3. issue SQL qery:
SELECT *
FROM (
SELECT 'apple' as fruit
UNION ALL SELECT 'banana'
) a
JOIN (
SELECT 'apple' as fruit
UNION ALL SELECT 'banana'
) b ON a.fruit=b.fruit
LEFT JOIN (
SELECT 1 as isyellow
) c ON b.fruit='banana';
should return two rows instead of one.
### Actual Results:
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.23.0 (unreleased), 'demo'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>SELECT *
more>FROM (
more> SELECT 'apple' as fruit
more> UNION ALL SELECT 'banana'
more>) a
more>JOIN (
more> SELECT 'apple' as fruit
more> UNION ALL SELECT 'banana'
more>) b ON a.fruit=b.fruit
more>LEFT JOIN (
more> SELECT 1 as isyellow
more>) c ON b.fruit='banana';
+--------+--------+----------+
| fruit | fruit | isyellow |
+========+========+==========+
| banana | banana | 1 |
+--------+--------+----------+
1 tuple (4.786ms)
sql>
sql>SELECT *
more>FROM (
more> SELECT 'apple' as fruit
more> UNION ALL SELECT 'banana'
more>) a
more>JOIN (
more> SELECT 'apple' as fruit
more> UNION ALL SELECT 'banana'
more>) b ON a.fruit=b.fruit;
+--------+--------+
| fruit | fruit |
+========+========+
| apple | apple |
| banana | banana |
+--------+--------+
2 tuples (3.457ms)
sql>
sql>SELECT *
more>FROM (
more> SELECT 'apple' as fruit
more> UNION ALL SELECT 'banana'
more>) a
more>LEFT JOIN (
more> SELECT 1 as isyellow
more>) c ON a.fruit='banana';
+--------+----------+
| fruit | isyellow |
+========+==========+
| banana | 1 |
| apple | null |
+--------+----------+
2 tuples (3.467ms)
sql>
### Expected Results:
Two (instead of one) rows:
+--------+----------+
| fruit | isyellow |
+========+==========+
| banana | 1 |
| apple | null |
+--------+----------+
Copied issue from https://www.sqlite.org/src/info/c2a19d81652f40568c
## Comment 22045
Date: 2016-04-16 10:08:17 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [0481a6a7831d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0481a6a7831d) 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=0481a6a7831d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0481a6a7831d)
Changeset description:
fixed bug #3981, ie only rewrite joins with constants into selects (ie not outerjoins). Added a test for Bug #3981.
## Comment 22046
Date: 2016-04-16 10:18:27 +0200
From: @njnes
Fixed relational optimizer, which incorrectly rewrote the left join with constant into a select.
| Incorrect LEFT JOIN when FROM clause contains nested subqueries | https://api.github.com/repos/MonetDB/MonetDB/issues/3981/comments | 0 | 2020-11-30T13:25:40Z | 2024-06-27T12:11:43Z | https://github.com/MonetDB/MonetDB/issues/3981 | 753,476,752 | 3,981 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-12 17:16:17 +0200
From: @yzchang
To: SQL devs <<bugs-sql>>
Version: 11.21.19 (Jul2015-SP4)
CC: @yzchang
Last updated: 2016-06-23 10:24:37 +0200
## Comment 22031
Date: 2016-04-12 17:16:17 +0200
From: @yzchang
Just for the record: before changeset:6b5eafd51c81 (https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6b5eafd51c81), the UPDATE query below will crash mserver. This is because (some) JOINs with references in both sides are not correctly handled in rel_apply_*.
The crash was fixed by changeset:6b5eafd51c81, however, this fix is not included in Jul2015-SP4, because this bug was discovered after the Jul2015-SP4 RC was created.
CREATE TABLE foo (barid INT, name VARCHAR(25), result BOOLEAN);
CREATE TABLE bar (id INT, version VARCHAR(25));
UPDATE foo SET result =
(
SELECT TRUE
FROM (
SELECT DISTINCT B.version
FROM foo AS F
INNER JOIN bar AS B ON (F.barid = B.id)
) AS X
WHERE X.version =
(
SELECT
version
FROM bar
WHERE barid = foo.barid
)
AND foo.name='0000'
);
## Comment 22032
Date: 2016-04-12 17:37:35 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [7ef51571b68c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7ef51571b68c) made by Jennie Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7ef51571b68c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7ef51571b68c)
Changeset description:
Added test for bug #3980
| JOIN with references on both sides crashes mserver | https://api.github.com/repos/MonetDB/MonetDB/issues/3980/comments | 0 | 2020-11-30T13:25:38Z | 2024-06-27T12:11:42Z | https://github.com/MonetDB/MonetDB/issues/3980 | 753,476,727 | 3,980 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-12 13:30:43 +0200
From: Marc Ballarin <<marc.ballarin>>
To: SQL devs <<bugs-sql>>
Version: 11.21.19 (Jul2015-SP4)
CC: @njnes
Last updated: 2016-04-16 16:17:32 +0200
## Comment 22030
Date: 2016-04-12 13:30:43 +0200
From: Marc Ballarin <<marc.ballarin>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Build Identifier:
The epoch function silently gives wrong results when given a BIGINT argument.
This automatically happens when doing arithmetic in the argument, e.g. when doing something like epoch(1460453860-300).
See https://www.monetdb.org/pipermail/users-list/2016-April/009053.html
Reproducible: Always
### Steps to Reproduce:
1. SELECT epoch(1460453860-300)
### Actual Results:
1970-01-17 21:40:53.560000
### Expected Results:
2016-04-12 09:27:40.000000
It works correctly when explicitly casting the intermediate result to INTEGER:
SELECT epoch(CAST(1460453860-300 AS INTEGER));
-> 2016-04-12 09:32:40.000000
## Comment 22050
Date: 2016-04-16 13:18:05 +0200
From: @njnes
fixed the implementation, ie both int and lng cases now expect seconds (not milli seconds)
## Comment 22051
Date: 2016-04-16 13:21:27 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [4263fe684799](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4263fe684799) 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=4263fe684799](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4263fe684799)
Changeset description:
add test for bug #3979
## Comment 22056
Date: 2016-04-16 16:17:32 +0200
From: @njnes
It seems the epoch( bigint) is expected to pass milli seconds, ie make sure you multiply by 1000 first. (reverting the previous fix, as that backs old semantics)
| The epoch functions gives wrong results when given a BIGINT argument | https://api.github.com/repos/MonetDB/MonetDB/issues/3979/comments | 0 | 2020-11-30T13:25:35Z | 2024-06-28T13:13:43Z | https://github.com/MonetDB/MonetDB/issues/3979 | 753,476,688 | 3,979 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-07 14:18:28 +0200
From: Rob Erie <<rob.erie>>
To: SQL devs <<bugs-sql>>
Version: 11.21.19 (Jul2015-SP4)
CC: @njnes
Last updated: 2016-06-23 10:24:31 +0200
## Comment 22023
Date: 2016-04-07 14:18:28 +0200
From: Rob Erie <<rob.erie>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36
Build Identifier:
Created required tables in MonetDB for testing correlation and performance. Ran SQL query in steps to reproduce received error as indicated in Actual Results.
Reproducible: Always
### Steps to Reproduce:
1.run SQL: select milageRange, sys.corr(numberOfTheseParts,avgHomeValue) FROM aPartsByZipRange INNER JOIN avgHomeValueZipPeriod ON zipCode = zip where numberOfTheseParts <> 0 and avgHomeValue <>0 group by milageRange;
### Actual Results:
TypeException:user.s78_2[44]:'aggr.subcorr' undefined in: X_75:bat[:any,:int] := aggr.subcorr(X_72:bat[:oid,:int],X_74:bat[:oid,:int],X_67:bat[:oid,:oid],r1_67:bat[:oid,:oid],true:bit);
program contains errors
### Expected Results:
Correlation between variables by milageRange
Environment Info:
Amazon Web Service Instance
Red Hat Enterprise Linux Server release 7.2 (Maipo) (Linux 3.10.0-327.el7.x86_64 1 SMP Thu Oct 29 17:29:29 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux)
MySQL Server version: 5.7.11-log MySQL Community Server
Java version "1.8.0_74"; Java(TM) SE Runtime Environment (build 1.8.0_74-b02); Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode).
Apache Tomcat 7.0.54
Welcome to mclient, the MonetDB/SQL interactive terminal (Jul2015-SP3)
Database: MonetDB v11.21.17 (Jul2015-SP3), 'mapi:monetdb://ip-10-153-0-5.ec2.internal:50000/set_mktng'
mserver5 --version:
MonetDB 5 server v11.21.17 "Jul2015-SP3" (64-bit, 64-bit oids, 128-bit integers)
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 31.0GiB 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 )
libxml2: 2.9.1 (compiled with 2.9.1)
Compiled by: mockbuild@ (x86_64-redhat-linux-gnu)
Compilation: gcc -O3 -fomit-frame-pointer -pipe -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_FORTIFY_SOURCE=2
Linking : /usr/bin/ld -m elf_x86_64 -Wl,-z,relro
SQL:
select milageRange, sys.corr(numberOfTheseParts,avgHomeValue) FROM aPartsByZipRange INNER JOIN avgHomeValueZipPeriod ON zipCode = zip group by milageRange;
Result:
TypeException:user.s6_1[35]:'aggr.subcorr' undefined in: X_64:bat[:any,:int] := aggr.subcorr(X_54:bat[:oid,:int],X_63:bat[:oid,:int],X_38:bat[:oid,:oid],r1_38:bat[:oid,:oid],true:bit);
program contains errors
Explain:
explain select milageRange, sys.corr(numberOfTheseParts,avgHomeValue) FROM aPartsByZipRange INNER JOIN avgHomeValueZipPeriod ON zipCode = zip group by milageRange;
TypeException:user.s7_1[35]:'aggr.subcorr' undefined in: X_64:bat[:any,:int] := aggr.subcorr(X_54:bat[:oid,:int],X_63:bat[:oid,:int],X_38:bat[:oid,:oid],r1_38:bat[:oid,:oid],true:bit);
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| mal |
+=========================================================================================================================================================================================================+
| function user.s7_1{autoCommit=true}():void; |
| sql.mvc(); |
| X_3:bat[:oid,:oid] := sql.tid(X_2,"set_mktng","apartsbyziprange"); |
| X_6:bat[:oid,:int] := sql.bind(X_2,"set_mktng","apartsbyziprange","zipcode",0); |
| (X_9,r1_9) := sql.bind(X_2,"set_mktng","apartsbyziprange","zipcode",2); |
| X_12:bat[:oid,:int] := sql.bind(X_2,"set_mktng","apartsbyziprange","zipcode",1); |
| sql.delta(X_6,X_9,r1_9,X_12); |
| algebra.leftfetchjoin(X_3,X_14); |
| X_16:bat[:oid,:oid] := sql.tid(X_2,"set_mktng","avghomevaluezipperiod"); |
| X_18:bat[:oid,:int] := sql.bind(X_2,"set_mktng","avghomevaluezipperiod","zip",0); |
| (X_20,r1_20) := sql.bind(X_2,"set_mktng","avghomevaluezipperiod","zip",2); |
| X_22:bat[:oid,:int] := sql.bind(X_2,"set_mktng","avghomevaluezipperiod","zip",1); |
| sql.delta(X_18,X_20,r1_20,X_22); |
| algebra.leftfetchjoin(X_16,X_23); |
| (X_25,r1_25) := algebra.subjoin(X_15,X_24,nil:BAT,nil:BAT,false,nil:lng); |
| X_30:bat[:oid,:str] := sql.bind(X_2,"set_mktng","apartsbyziprange","milagerange",0); |
| (X_32,r1_32) := sql.bind(X_2,"set_mktng","apartsbyziprange","milagerange",2); |
| X_34:bat[:oid,:str] := sql.bind(X_2,"set_mktng","apartsbyziprange","milagerange",1); |
| sql.delta(X_30,X_32,r1_32,X_34); |
| algebra.leftfetchjoin(X_3,X_35); |
| algebra.leftfetchjoin(X_25,X_36); |
| (X_38,r1_38,r2_38) := group.subgroupdone(X_37); |
| algebra.leftfetchjoin(r1_38,X_37); |
| X_42:bat[:oid,:int] := sql.bind(X_2,"set_mktng","apartsbyziprange","numberoftheseparts",0); |
| (X_47,r1_47) := sql.bind(X_2,"set_mktng","apartsbyziprange","numberoftheseparts",2); |
| X_50:bat[:oid,:int] := sql.bind(X_2,"set_mktng","apartsbyziprange","numberoftheseparts",1); |
| sql.delta(X_42,X_47,r1_47,X_50); |
| algebra.leftfetchjoin(X_3,X_52); |
| algebra.leftfetchjoin(X_25,X_53); |
| X_55:bat[:oid,:int] := sql.bind(X_2,"set_mktng","avghomevaluezipperiod","avghomevalue",0); |
| (X_58,r1_58) := sql.bind(X_2,"set_mktng","avghomevaluezipperiod","avghomevalue",2); |
| X_60:bat[:oid,:int] := sql.bind(X_2,"set_mktng","avghomevaluezipperiod","avghomevalue",1); |
| sql.delta(X_55,X_58,r1_58,X_60); |
| algebra.leftfetchjoin(X_16,X_61); |
| algebra.leftfetchjoin(r1_25,X_62); |
| X_64:bat[:any,:int] := aggr.subcorr(X_54,X_63,X_38,r1_38,true); |
| bat.new(nil:oid,nil:str); |
| bat.new(nil:oid,nil:str); |
| bat.new(nil:oid,nil:str); |
| bat.new(nil:oid,nil:int); |
| bat.new(nil:oid,nil:int); |
| bat.append(X_67,"set_mktng.apartsbyziprange"); |
| bat.append(X_70,"milagerange"); |
| bat.append(X_71,"varchar"); |
| bat.append(X_72,18); |
| bat.append(X_74,0); |
| bat.append(X_75,"set_mktng.L1"); |
| bat.append(X_77,"L1"); |
| bat.append(X_79,"int"); |
| bat.append(X_81,32); |
| bat.append(X_83,0); |
| sql.resultSet(X_85,X_87,X_89,X_91,X_93,X_41,X_64); |
| end user.s7_1; |
| querylog.define("explain select milagerange, sys.corr(numberoftheseparts,avghomevalue) from apartsbyziprange inner join avghomevaluezipperiod on zipcode = zip group by milagerange;","default_pipe") |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
54 tuples (0.921ms)
Plan:
>plan select milageRange, sys.corr(numberOfTheseParts,avgHomeValue) FROM aPartsByZipRange INNER JOIN avgHomeValueZipPeriod ON zipCode = zip group by milageRange;
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| rel |
+========================================================================================================================================================================================================================+
| project ( |
| | group by ( |
| | | join ( |
| | | | table(set_mktng.apartsbyziprange) [ apartsbyziprange.zipcode, apartsbyziprange.milagerange NOT NULL, apartsbyziprange.numberoftheseparts NOT NULL ] COUNT , |
| | | | table(set_mktng.avghomevaluezipperiod) [ avghomevaluezipperiod.zip NOT NULL, avghomevaluezipperiod.avghomevalue NOT NULL ] COUNT |
| | | ) [ apartsbyziprange.zipcode = avghomevaluezipperiod.zip NOT NULL ] |
| | ) [ apartsbyziprange.milagerange NOT NULL ] [ apartsbyziprange.milagerange NOT NULL, sys.corr no nil (apartsbyziprange.numberoftheseparts NOT NULL, avghomevaluezipperiod.avghomevalue NOT NULL) NOT NULL as L1.L1 ] |
| ) [ apartsbyziprange.milagerange NOT NULL, L1 NOT NULL as L1.L1 ] |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8 tuples (0.493ms)
merovingian.log:
2016-04-07 07:53:55 MSG merovingian[3057]: Merovingian 1.7 (Jul2015-SP3) starting
2016-04-07 07:53:55 MSG merovingian[3057]: monitoring dbfarm /tmpdata/monetdb/
2016-04-07 07:53:55 MSG merovingian[3057]: accepting connections on TCP socket 0.0.0.0:50000
2016-04-07 07:53:55 MSG merovingian[3057]: accepting connections on UNIX domain socket /tmp/.s.monetdb.50000
2016-04-07 07:53:55 MSG discovery[3057]: listening for UDP messages on 0.0.0.0:50000
2016-04-07 07:53:55 MSG control[3057]: accepting connections on UNIX domain socket /tmp/.s.merovingian.50000
2016-04-07 07:53:55 MSG discovery[3057]: new neighbour ip-10-153-0-5.ec2.internal (ip-10-153-0-5.ec2.internal)
2016-04-07 07:53:57 MSG discovery[3057]: new database mapi:monetdb://ip-10-153-0-5.ec2.internal:50000/set_mktng (ttl=660s)
2016-04-07 07:58:35 MSG merovingian[3057]: starting database 'set_mktng', up min/avg/max: 1d/1d/1d, crash average: 0.00 0.00 0.00 (1-1=0)
2016-04-07 07:58:36 MSG set_mktng[3102]: arguments: /usr/bin/mserver5 --dbpath=/tmpdata/monetdb/set_mktng --set merovingian_uri=mapi:monetdb://ip-10-153-0-5.ec2.internal:50000/set_mktng --set mapi_ open=false --set mapi_port=0 --set mapi_usock=/tmpdata/monetdb/set_mktng/.mapi.sock --set monet_vault_key=/tmpdata/monetdb/set_mktng/.vaultkey --set gdk_nr_threads=8 --set max_clients=64 --set sql_ optimizer=default_pipe --set monet_daemon=yes
2016-04-07 07:58:37 MSG set_mktng[3102]: MonetDB 5 server v11.21.17 "Jul2015-SP3"
2016-04-07 07:58:37 MSG set_mktng[3102]: Serving database 'set_mktng', using 8 threads
2016-04-07 07:58:37 MSG set_mktng[3102]: Compiled for x86_64-redhat-linux-gnu/64bit with 64bit OIDs and 128bit integers dynamically linked
2016-04-07 07:58:37 MSG set_mktng[3102]: Found 31.013 GiB available main-memory.
2016-04-07 07:58:37 MSG set_mktng[3102]: Copyright (c) 1993-July 2008 CWI.
2016-04-07 07:58:37 MSG set_mktng[3102]: Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved
2016-04-07 07:58:37 MSG set_mktng[3102]: Visit http://www.monetdb.org/ for further information
2016-04-07 07:58:37 MSG set_mktng[3102]: Listening for UNIX domain connection requests on mapi:monetdb:///tmpdata/monetdb/set_mktng/.mapi.sock
2016-04-07 07:58:37 MSG set_mktng[3102]: MonetDB/GIS module loaded
2016-04-07 07:58:37 MSG set_mktng[3102]: Start processing logs sql/sql_logs version 52200
2016-04-07 07:58:37 MSG set_mktng[3102]: Start reading the write-ahead log 'sql_logs/sql/log.20'
2016-04-07 07:58:37 MSG set_mktng[3102]: Finished reading the write-ahead log 'sql_logs/sql/log.20'
2016-04-07 07:58:37 MSG set_mktng[3102]: Finished processing logs sql/sql_logs
2016-04-07 07:58:37 MSG set_mktng[3102]: MonetDB/SQL module loaded
2016-04-07 07:58:38 MSG merovingian[3057]: proxying client (local) for database 'set_mktng' to mapi:monetdb:///tmpdata/monetdb/set_mktng/.mapi.sock?database=set_mktng
2016-04-07 07:58:38 MSG merovingian[3057]: target connection is on local UNIX domain socket, passing on filedescriptor instead of proxying
[root@ip-10-153-0-5 monetdb] cat merovingian.log
2016-04-07 07:53:55 MSG merovingian[3057]: Merovingian 1.7 (Jul2015-SP3) starting
2016-04-07 07:53:55 MSG merovingian[3057]: monitoring dbfarm /tmpdata/monetdb/
2016-04-07 07:53:55 MSG merovingian[3057]: accepting connections on TCP socket 0.0.0.0:50000
2016-04-07 07:53:55 MSG merovingian[3057]: accepting connections on UNIX domain socket /tmp/.s.monetdb.50000
2016-04-07 07:53:55 MSG discovery[3057]: listening for UDP messages on 0.0.0.0:50000
2016-04-07 07:53:55 MSG control[3057]: accepting connections on UNIX domain socket /tmp/.s.merovingian.50000
2016-04-07 07:53:55 MSG discovery[3057]: new neighbour ip-10-153-0-5.ec2.internal (ip-10-153-0-5.ec2.internal)
2016-04-07 07:53:57 MSG discovery[3057]: new database mapi:monetdb://ip-10-153-0-5.ec2.internal:50000/set_mktng (ttl=660s)
2016-04-07 07:58:35 MSG merovingian[3057]: starting database 'set_mktng', up min/avg/max: 1d/1d/1d, crash average: 0.00 0.00 0.00 (1-1=0)
2016-04-07 07:58:36 MSG set_mktng[3102]: arguments: /usr/bin/mserver5 --dbpath=/tmpdata/monetdb/set_mktng --set merovingian_uri=mapi:monetdb://ip-10-153-0-5.ec2.internal:50000/set_mktng --set mapi_open=false --set mapi_port=0 --set mapi_usock=/tmpdata/monetdb/set_mktng/.mapi.sock --set monet_vault_key=/tmpdata/monetdb/set_mktng/.vaultkey --set gdk_nr_threads=8 --set max_clients=64 --set sql_optimizer=default_pipe --set monet_daemon=yes
2016-04-07 07:58:37 MSG set_mktng[3102]: MonetDB 5 server v11.21.17 "Jul2015-SP3"
2016-04-07 07:58:37 MSG set_mktng[3102]: Serving database 'set_mktng', using 8 threads
2016-04-07 07:58:37 MSG set_mktng[3102]: Compiled for x86_64-redhat-linux-gnu/64bit with 64bit OIDs and 128bit integers dynamically linked
2016-04-07 07:58:37 MSG set_mktng[3102]: Found 31.013 GiB available main-memory.
2016-04-07 07:58:37 MSG set_mktng[3102]: Copyright (c) 1993-July 2008 CWI.
2016-04-07 07:58:37 MSG set_mktng[3102]: Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved
2016-04-07 07:58:37 MSG set_mktng[3102]: Visit http://www.monetdb.org/ for further information
2016-04-07 07:58:37 MSG set_mktng[3102]: Listening for UNIX domain connection requests on mapi:monetdb:///tmpdata/monetdb/set_mktng/.mapi.sock
2016-04-07 07:58:37 MSG set_mktng[3102]: MonetDB/GIS module loaded
2016-04-07 07:58:37 MSG set_mktng[3102]: Start processing logs sql/sql_logs version 52200
2016-04-07 07:58:37 MSG set_mktng[3102]: Start reading the write-ahead log 'sql_logs/sql/log.20'
2016-04-07 07:58:37 MSG set_mktng[3102]: Finished reading the write-ahead log 'sql_logs/sql/log.20'
2016-04-07 07:58:37 MSG set_mktng[3102]: Finished processing logs sql/sql_logs
2016-04-07 07:58:37 MSG set_mktng[3102]: MonetDB/SQL module loaded
2016-04-07 07:58:38 MSG merovingian[3057]: proxying client (local) for database 'set_mktng' to mapi:monetdb:///tmpdata/monetdb/set_mktng/.mapi.sock?database=set_mktng
2016-04-07 07:58:38 MSG merovingian[3057]: target connection is on local UNIX domain socket, passing on filedescriptor instead of proxying
## Comment 22047
Date: 2016-04-16 13:05:34 +0200
From: @njnes
the corr and friend functions were overlooked when switching to the sub* interface. This is now fixed.
## Comment 22048
Date: 2016-04-16 13:08:13 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [b2d229a59b68](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b2d229a59b68) 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=b2d229a59b68](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b2d229a59b68)
Changeset description:
added test for bug #3978
## Comment 22049
Date: 2016-04-16 13:09:16 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [25dba272d62f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=25dba272d62f) 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=25dba272d62f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=25dba272d62f)
Changeset description:
fixes for bug #3978, ie use the (not so) new sub* interface
for aggregates.
| SQL returns TypeException 'aggr.subcorr' undefined for sys.corr function | https://api.github.com/repos/MonetDB/MonetDB/issues/3978/comments | 0 | 2020-11-30T13:25:32Z | 2024-06-27T12:11:40Z | https://github.com/MonetDB/MonetDB/issues/3978 | 753,476,659 | 3,978 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-07 04:40:20 +0200
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.19 (Jul2015-SP4)
CC: ajdamico
Last updated: 2016-04-13 10:37:17 +0200
## Comment 22020
Date: 2016-04-07 04:40:20 +0200
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Build Identifier:
> install.packages( c("MonetDB.R", "MonetDBLite" , "survey" , "SAScii" , "descr" , "downloader" , "digest" , "stringr" , "R.utils" ) , repos=c("http://dev.monetdb.org/Assets/R/", "http://cran.rstudio.com/"))
Installing packages into ‘C:/Users/anthonyd/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
Warning: unable to access index for repository http://dev.monetdb.org/Assets/R/src/contrib:
cannot open URL 'http://dev.monetdb.org/Assets/R/src/contrib/PACKAGES'
Warning: unable to access index for repository http://dev.monetdb.org/Assets/R/bin/windows/contrib/3.2:
cannot open URL 'http://dev.monetdb.org/Assets/R/bin/windows/contrib/3.2/PACKAGES'
Reproducible: Always
### Steps to Reproduce:
install.packages( "MonetDBLite" , repos="http://dev.monetdb.org/Assets/R/")
### Actual Results:
failure
## Comment 22021
Date: 2016-04-07 08:59:57 +0200
From: @hannesmuehleisen
try using https, e.g. install.packages( "MonetDBLite", repos="https://dev.monetdb.org/Assets/R/")
| dev.monetdb.org/Assets/R does not install MonetDBLite 0.2.2 on windows | https://api.github.com/repos/MonetDB/MonetDB/issues/3977/comments | 0 | 2020-11-30T13:25:29Z | 2024-06-27T12:11:39Z | https://github.com/MonetDB/MonetDB/issues/3977 | 753,476,616 | 3,977 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-06 17:47:03 +0200
From: Richard Hughes <<richard.monetdb>>
To: MonetDB5 devs <<bugs-monetdb5>>
Version: -- development
Last updated: 2016-12-21 13:07:51 +0100
## Comment 22018
Date: 2016-04-06 17:47:03 +0200
From: Richard Hughes <<richard.monetdb>>
Created attachment 393
Patch
The attached patch makes expressions of the form "col LIKE 'x'" run approximately 8 times faster.
This seems like a totally useless optimization, except that the ILIKE operator is by far the fastest way to do a case-insensitive string comparison. Some benchmarks:
select count(*) from t where lower(x)='x': 159s
select count(*) from t where x ilike 'x' [pre-patch]: 4.1s
select count(*) from t where x ilike 'x' [with patch]: 0.520s
The implementation is not very neat but the performance gain is worth it to us.
> Attached file: [pcre-strcmp.patch](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3976_pcre-strcmp.patch_393) (application/octet-stream, 4648 bytes)
> Description: Patch
## Comment 22019
Date: 2016-04-06 21:24:39 +0200
From: @sjoerdmullender
Interesting idea. I'll take a closer look.
Another idea so that I don't forget:
If pattern ends in % and has no other _ or %, use strncmp or strncasecmp.
## Comment 22022
Date: 2016-04-07 12:03:52 +0200
From: Richard Hughes <<richard.monetdb>>
That optimization is actually already covered by the 'use_re' code path. See re_simple() for the conditions under which it is invoked and re_match_ignore() for the matcher.
Adding to my benchmarks above:
select count(*) from t where x ilike 'x%': 0.411s
select count(*) from t where x ilike '%x%': 3.8s
I'm slightly curious about how the first one ended up even faster than my implementation. It's possible that glibc's strncasecmp is faster than strcasecmp I suppose.
Here's a list of expressions that I would consider to be theoretically amenable to a simplified matcher but which still fall back to the pcre matcher:
'x%' escape ''
'x' escape ''
'%x'
I wrote this patch in order to speed up a set of queries I have that are very frequently run. I got my 8x speed-up for my use case and so I'm happy - anything beyond that is a bonus.
## Comment 24685
Date: 2016-11-15 14:00:23 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [35d404f6597c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=35d404f6597c) 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=35d404f6597c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=35d404f6597c)
Changeset description:
Use str(case)cmp for (I)LIKE comparisons without wildcards.
This is from the patch in bug #3976.
## Comment 24686
Date: 2016-11-15 14:01:13 +0100
From: @sjoerdmullender
This is in the Dec2016 branch.
| Performance enhancement to LIKE without wildcards | https://api.github.com/repos/MonetDB/MonetDB/issues/3976/comments | 0 | 2020-11-30T13:25:27Z | 2024-06-27T12:11:38Z | https://github.com/MonetDB/MonetDB/issues/3976 | 753,476,579 | 3,976 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-05 15:00:32 +0200
From: Richard Hughes <<richard.monetdb>>
To: SQL devs <<bugs-sql>>
Version: 11.21.17 (Jul2015-SP3)
CC: @njnes
Last updated: 2016-06-23 10:24:21 +0200
## Comment 22012
Date: 2016-04-05 15:00:32 +0200
From: Richard Hughes <<richard.monetdb>>
I spotted this when reading through the code, so I don't have a reproduction recipe or a clear idea of how to provoke it. Can I ask somebody to take a look and confirm my suspicions:
sql/storage/store.c:1639 (in current Jul2015):
while (store_nr_active) { /* find a moment to flush */
MT_lock_unset(&bs_lock, "store_manager");
MT_sleep_ms(50);
if (GDKexiting())
continue;
MT_lock_set(&bs_lock, "store_manager");
}
If GDKexiting() then it looks to me like you will double-unlock bs_lock, either at line 1640 (if store_nr_active!=0 still) or line 1652 (otherwise). Either way you'll go into undefined behaviour.
## Comment 22013
Date: 2016-04-05 15:31:03 +0200
From: @sjoerdmullender
I think you're right. I think that continue should be a return. And I'm also not happy about the other continue.
I'll fix it.
## Comment 22014
Date: 2016-04-05 15:33:26 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [e7474ae2fc10](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e7474ae2fc10) 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=e7474ae2fc10](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e7474ae2fc10)
Changeset description:
When exiting, exit.
This fixes bug #3975.
| Suspicious code in store_manager() on exit path | https://api.github.com/repos/MonetDB/MonetDB/issues/3975/comments | 0 | 2020-11-30T13:25:25Z | 2024-06-27T12:11:37Z | https://github.com/MonetDB/MonetDB/issues/3975 | 753,476,554 | 3,975 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-05 14:43:20 +0200
From: Richard Hughes <<richard.monetdb>>
To: SQL devs <<bugs-sql>>
Version: 11.21.17 (Jul2015-SP3)
CC: @njnes
Last updated: 2016-06-23 10:24:43 +0200
## Comment 22011
Date: 2016-04-05 14:43:20 +0200
From: Richard Hughes <<richard.monetdb>>
Build is Jul2015 [5126d5e2f869](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5126d5e2f869)
To reproduce:
sql>create table foo (a int, b int);
sql>prepare select count(b) from (select a,b from foo union all select null,null from foo) t;
Expected result:
A preparation response.
Actual result (from a debug build):
could not find L1.L1
foo.a
mserver5: rel_bin.c:2378: rel2bin_project: Assertion `0' failed.
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffee59f700 (LWP 6905)]
0x00007ffff5a32067 in __GI_raise (sig=sig@entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
0 0x00007ffff5a32067 in __GI_raise (sig=sig@entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
1 0x00007ffff5a33448 in __GI_abort () at abort.c:89
2 0x00007ffff5a2b266 in __assert_fail_base (
fmt=0x7ffff5b64528 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
assertion=assertion@entry=0x7fffefe48485 "0",
file=file@entry=0x7fffefe4847b "rel_bin.c", line=line@entry=2378,
function=function@entry=0x7fffefe48b20 <__PRETTY_FUNCTION__.13373> "rel2bin_
project") at assert.c:92
3 0x00007ffff5a2b312 in __GI___assert_fail (assertion=0x7fffefe48485 "0",
file=0x7fffefe4847b "rel_bin.c", line=2378,
function=0x7fffefe48b20 <__PRETTY_FUNCTION__.13373> "rel2bin_project")
at assert.c:101
4 0x00007fffefcd63c9 in rel2bin_project (sql=0x7fffe400ec10,
rel=0x7fffe40cc510, refs=0x7fffe40cec30, topn=0x0) at rel_bin.c:2378
5 0x00007fffefce0a8b in subrel_bin (sql=0x7fffe400ec10, rel=0x7fffe40cc510,
refs=0x7fffe40cec30) at rel_bin.c:4580
6 0x00007fffefcd72ba in rel2bin_groupby (sql=0x7fffe400ec10,
rel=0x7fffe40ce1d0, refs=0x7fffe40cec30) at rel_bin.c:2573
7 0x00007fffefce0ae7 in subrel_bin (sql=0x7fffe400ec10, rel=0x7fffe40ce1d0,
refs=0x7fffe40cec30) at rel_bin.c:4588
8 0x00007fffefcd4906 in rel2bin_union (sql=0x7fffe400ec10,
rel=0x7fffe40ce4b0, refs=0x7fffe40cec30) at rel_bin.c:2053
9 0x00007fffefce09ff in subrel_bin (sql=0x7fffe400ec10, rel=0x7fffe40ce4b0,
refs=0x7fffe40cec30) at rel_bin.c:4568
10 0x00007fffefcd72ba in rel2bin_groupby (sql=0x7fffe400ec10,
rel=0x7fffe40cc8a0, refs=0x7fffe40cec30) at rel_bin.c:2573
11 0x00007fffefce0ae7 in subrel_bin (sql=0x7fffe400ec10, rel=0x7fffe40cc8a0,
refs=0x7fffe40cec30) at rel_bin.c:4588
12 0x00007fffefcd62bb in rel2bin_project (sql=0x7fffe400ec10,
rel=0x7fffe40cca20, refs=0x7fffe40cec30, topn=0x0) at rel_bin.c:2363
13 0x00007fffefce0a8b in subrel_bin (sql=0x7fffe400ec10, rel=0x7fffe40cca20,
refs=0x7fffe40cec30) at rel_bin.c:4580
14 0x00007fffefce0dc7 in output_rel_bin (sql=0x7fffe400ec10,
rel=0x7fffe40cca20) at rel_bin.c:4648
15 0x00007fffefc9989f in sql_relation2stmt (c=0x7fffe400ec10,
r=0x7fffe40cca20) at sql.c:134
16 0x00007fffefcc09f4 in SQLparser (c=0x7ffff0fd7328) at sql_scenario.c:1184
17 0x00007ffff792856a in runPhase (c=0x7ffff0fd7328, phase=1)
at mal_scenario.c:515
18 0x00007ffff7928705 in runScenarioBody (c=0x7ffff0fd7328)
at mal_scenario.c:550
19 0x00007ffff79288a8 in runScenario (c=0x7ffff0fd7328) at mal_scenario.c:579
20 0x00007ffff792a353 in MSserveClient (dummy=0x7ffff0fd7328)
at mal_session.c:439
21 0x00007ffff7929d4e in MSscheduleClient (command=0x7fffe40008d0 "0",
challenge=0x7fffee59ee70 "uKYg5NLETOO", fin=0x7fffe4006b40,
fout=0x7fffe40049c0) at mal_session.c:319
22 0x00007ffff7a1b6f7 in doChallenge (data=0x7fffe00008d0) at mal_mapi.c:184
23 0x00007ffff732f363 in thread_starter (arg=0x7fffe0000a50)
at gdk_system.c:458
24 0x00007ffff5db00a4 in start_thread (arg=0x7fffee59f700)
at pthread_create.c:309
25 0x00007ffff5ae587d in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
A release build silently gives no result to the query. The query works fine when executed in a non-prepared way, producing the expected zero cell.
## Comment 22016
Date: 2016-04-06 12:31:20 +0200
From: @njnes
fixed, the relational optimizer renamed expressions incorrectly.
## Comment 22017
Date: 2016-04-06 12:32:35 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [dca3d2f676ed](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dca3d2f676ed) 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=dca3d2f676ed](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=dca3d2f676ed)
Changeset description:
fixed bug #3974, ie rename expression properly
| Prepared statement rel_bin.c:2378: rel2bin_project: Assertion `0' failed. | https://api.github.com/repos/MonetDB/MonetDB/issues/3974/comments | 0 | 2020-11-30T13:25:23Z | 2024-06-27T12:11:36Z | https://github.com/MonetDB/MonetDB/issues/3974 | 753,476,532 | 3,974 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-04 14:49:43 +0200
From: Kovacs, Kalman <<kalman.kovacs>>
To: clients devs <<bugs-clients>>
Version: 11.21.19 (Jul2015-SP4)
CC: kalman.kovacs, martin.van.dinther
Last updated: 2016-12-21 13:08:19 +0100
## Comment 22007
Date: 2016-04-04 14:49:43 +0200
From: Kovacs, Kalman <<kalman.kovacs>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36
Build Identifier:
Sometimes JDBC does not answer for a connection request. In the code it seems that the sockTimeout is not set at the start of making a new connection.
Reproducible: Sometimes
We think that in the constructors of nl.cwi.monetdb.mcl.net.MapiSocket a new int parameter (sockTimeout) is required.
So right after a new Socket is created, its setSoTimeout method should be called with the new (sockTimeout) parameter.
So at nl.cwi.monetdb.jdbc.MonetConnection when you calls server.connect the parameter (sockTimeout) should be add to the parameters.
## Comment 22008
Date: 2016-04-05 10:55:43 +0200
From: Kovacs, Kalman <<kalman.kovacs>>
We have rethought our solution for this problem, that is:
0., Do not make a new constructor of MapiSocket
1., There should be a new local variable in MapiSocket:
private int soTimeout = 0;
2., Make up the setSoTimeout method to handle the timeout setting before and after the Socket creation:
public void setSoTimeout(int s) throws SocketException {
if (s < 0) {
throw new IllegalArgumentException("timeout can't be negative");
}
// limit time to wait on blocking operations (0 = indefinite)
soTimeout = s;
//We have to check wheather the socket has been created already
if (con != null) {
con.setSoTimeout(s);
}
}
3., In MonetConnection we set socket timeout, before calling connect:
try {
// Socket timeout should set before the socket created.
server.setSoTimeout(sockTimeout);
List<String> warnings =
server.connect(hostname, port, username, password);
for (String warning : warnings) {
addWarning(warning, "01M02");
}
## Comment 22009
Date: 2016-04-05 11:00:40 +0200
From: Kovacs, Kalman <<kalman.kovacs>>
And - of course - in the MapiSocket's connect method we have to set socket timeout right after the new socket was created:
if (makeConnection) {
con = new Socket(host, port);
// Set socket timeout
con.setSoTimeout(soTimeout);
// set nodelay, as it greatly speeds up small messages (like we
// often do)
con.setTcpNoDelay(true);
## Comment 24703
Date: 2016-11-17 17:42:49 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset 6cc63d6cb224, 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=6cc63d6cb224
Changeset description:
Implemented fix as suggested in Bug #3973
The MapiSocket object now supports getting and setting the socket timeout, even before the TCP socket is created.
Also improved the close() method to continue closing all opened resources, even if one of them failed to close.
To set the socket timeout specify it in the JDBC URL, for example:
jdbc:monetdb://localhost:50000/demo?so_timeout=8000
This enables the timeout and sets it to 8000 milliseconds (= 8 seconds).
By default the timeout is not set, so wait infinitely.
| JDBC hangs | https://api.github.com/repos/MonetDB/MonetDB/issues/3973/comments | 0 | 2020-11-30T13:25:21Z | 2024-06-27T12:11:35Z | https://github.com/MonetDB/MonetDB/issues/3973 | 753,476,505 | 3,973 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-04 10:09:08 +0200
From: Vijay Krishna <<vijayakrishna55>>
To: GDK devs <<bugs-common>>
Version: 11.21.17 (Jul2015-SP3)
CC: @njnes, vijayakrishna55
Last updated: 2016-06-23 10:24:01 +0200
## Comment 22001
Date: 2016-04-04 10:09:08 +0200
From: Vijay Krishna <<vijayakrishna55>>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36
Build Identifier:
Data model : 10 tables - each with ~600 columns - all tables are EMPTY (No rows).
Query : One query that involves with 25 joins across all the 10 tables.
(Attached the create table statements and the actual query to simulate)
MonetDB version : July2015-SP3 (compiled from source code)
Environment :
Machine - CentOS VM
RAM - 128 GB
Free disk space - ~650 GB
The query is ran.
Expected result : return an empty set in a few seconds (or even minutes).
Actual result : the query rebooted this high end CentOS machine.
RAM - 128 GB utilised completely.
Swap memory - more than 600 GB was swapped from Hard disk before the system reboot.
After reboot, once I started the mserver again, the swap memory was freed.
Debugging :
1) Actually, the problem is not with executing the query - it was with generating the plan for the query. The same problem occurs while we try with "PLAN" or "EXPLAIN" the same query.
2) This happens with all the optimizers - even with minimal_pipe.
Issues :
1) Why should a query that runs on 10 EMPTY tables require memory in hundreds of GBs? (Remember all tables are empty tables).
2) Even if the Hard disk was full, why didn't the mserver throw an Out of Memory Exception without rebooting the machine?
Reproducible: Always
### Steps to Reproduce:
1. Create the tables as in the create statements.
2. Execute the attached query.
3.
### Actual Results:
Machine reboots after eating up all the RAM and free hard disk space.
However, after reboot, if you start mserver again, the used hard disk space is freed.
### Expected Results:
Should return a result in a few seconds.
## Comment 22002
Date: 2016-04-04 10:10:23 +0200
From: Vijay Krishna <<vijayakrishna55>>
Created attachment 391
Sample Create table queries of the data model
> Attached file: [create.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3972_create.sql_391) (application/octet-stream, 119221 bytes)
> Description: Sample Create table queries of the data model
## Comment 22003
Date: 2016-04-04 10:11:23 +0200
From: Vijay Krishna <<vijayakrishna55>>
Created attachment 392
The problematic query that eats up disk space and ultimately crashing the server
> Attached file: [crashQuery.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3972_crashQuery.sql_392) (application/octet-stream, 3293 bytes)
> Description: The problematic query that eats up disk space and ultimately crashing the server
## Comment 22044
Date: 2016-04-14 18:33:21 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [a0f99c9ccbe6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a0f99c9ccbe6) made by Jennie Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a0f99c9ccbe6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a0f99c9ccbe6)
Changeset description:
Added test for bug #3972
## Comment 22054
Date: 2016-04-16 15:38:29 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [2737d13aca59](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2737d13aca59) 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=2737d13aca59](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2737d13aca59)
Changeset description:
fixes for bug #3972,
no longer wrap outerjoins with projects.
don't add extra internal columns (recursively)
improve optimizer for this case
## Comment 22055
Date: 2016-04-16 15:42:12 +0200
From: @njnes
the outerjoin query introduced many projections which the relational optimizer didn't handle well. The optimizer is improved and way less projection columns are generated. The query now runs fine.
| Drastic Memory leak of 600GBs while generating plan for Query with 25 joins | https://api.github.com/repos/MonetDB/MonetDB/issues/3972/comments | 0 | 2020-11-30T13:25:19Z | 2024-06-27T12:11:34Z | https://github.com/MonetDB/MonetDB/issues/3972 | 753,476,476 | 3,972 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-04 07:27:20 +0200
From: souri ratnaparkhi <<souri.ratnaparkhi>>
To: SQL devs <<bugs-sql>>
Version: 11.21.17 (Jul2015-SP3)
CC: @mlkersten, @njnes, souri.ratnaparkhi
Last updated: 2016-04-06 08:28:04 +0200
## Comment 21998
Date: 2016-04-04 07:27:20 +0200
From: souri ratnaparkhi <<souri.ratnaparkhi>>
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36
Build Identifier:
I take backup of database folder of monetdb from mydfarm. When i restore it few tables have no access.
Reproducible: Always
### Steps to Reproduce:
1.Take backup of database folder from mydfarm
2.Stop monetdb
3.Restore it again in mydfarm folder
4.Start monetdb
5.select count(*) from table_name;
### Actual Results:
SELECT: no such table 'table_name'
### Expected Results:
It should give count of records
1)select * from tables where name='mis_funded_info';
+------+-----------------+-----------+-------+------+--------+---------------+--------+-----------+
| id | name | schema_id | query | type | system | commit_action | access | temporary |
+======+=================+===========+=======+======+========+===============+========+===========+
| 403 | mis_funded_info | 2000 | null | 0 | false | 0 | 0 | 0 |
+------+-----------------+-----------+-------+------+--------+---------------+--------+-----------+
1 tuple (10.974ms)
2)select * from _columns where table_id=403;
+------+------------------------+---------+-------------+------------+----------+---------+-------+--------+---------+
| id | name | type | type_digits | type_scale | table_id | default | null | number | storage |
+======+========================+=========+=============+============+==========+=========+=======+========+=========+
| 388 | upload_date | date | 0 | 0 | 403 | null | true | 0 | null |
| 389 | product_description | varchar | 25 | 0 | 403 | null | true | 1 | null |
| 390 | product_type | varchar | 5 | 0 | 403 | null | true | 2 | null |
| 391 | party_code | varchar | 20 | 0 | 403 | null | true | 3 | null |
| 392 | account_number | varchar | 50 | 0 | 403 | null | true | 4 | null |
| 393 | facility_number | varchar | 50 | 0 | 403 | null | true | 5 | null |
| 394 | party_name | varchar | 200 | 0 | 403 | null | true | 6 | null |
| 395 | facility_outstanding | double | 53 | 0 | 403 | null | true | 7 | null |
| 396 | facility_start_date | date | 0 | 0 | 403 | null | true | 8 | null |
| 397 | facility_due_date | date | 0 | 0 | 403 | null | true | 9 | null |
| 398 | facility_close_date | date | 0 | 0 | 403 | null | true | 10 | null |
| 399 | faclitty_close_flag | varchar | 2 | 0 | 403 | null | true | 11 | null |
| 400 | exchangerate | double | 53 | 0 | 403 | null | true | 12 | null |
| 401 | nrml_accrued_amount_cr | double | 53 | 0 | 403 | null | true | 13 | null |
| 402 | nrml_accrued_amount_dr | double | 53 | 0 | 403 | null | true | 14 | null |
+------+------------------------+---------+-------------+------------+----------+---------+-------+--------+---------+
15 tuples (3.211ms)
3)select count(*) from mis_funded_info;
SELECT: no such table 'mis_funded_info'
Though table is present it gives error no such table. Please let me know proper way to take backup, so that when i restore it all tables are restored.
## Comment 21999
Date: 2016-04-04 07:43:58 +0200
From: souri ratnaparkhi <<souri.ratnaparkhi>>
Created attachment 390
mis_funded_info is a table with 100 plus columns. When i take backup of database folder of mydfarm and restore it, this particular table data cannot be accssed.
### Steps to Reproduce:
1.Take backup of database folder from mydfarm
2.Stop monetdb
3.Restore it again in mydfarm folder
4.Start monetdb
5.select count(*) from table_name;
### Actual Results:
SELECT: no such table 'table_name'
Commands executed in attachment.
1)select * from tables where name='mis_funded_info';
2)select * from _columns where table_id=403;
3)select count(*) from mis_funded_info;
It give no such table, though table is present.
> Attached file: [monetdb_issue.png](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3971_monetdb_issue.png_390) (image/png, 211453 bytes)
> Description: mis_funded_info is a table with 100 plus columns. When i take backup of database folder of mydfarm and restore it, this particular table data cannot be accssed.
## Comment 22000
Date: 2016-04-04 08:20:09 +0200
From: @mlkersten
Before you take a backup of the database directory, you FIRST have to
"monetdb stop <dbname>"
Issue not confirmed
| Cannot access table when backup is restored | https://api.github.com/repos/MonetDB/MonetDB/issues/3971/comments | 0 | 2020-11-30T13:25:16Z | 2024-06-27T12:11:33Z | https://github.com/MonetDB/MonetDB/issues/3971 | 753,476,446 | 3,971 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-01 15:36:49 +0200
From: @PedroTadim
To: Documentation maintainers <<bugs-docs>>
Version: unspecified
Last updated: 2016-04-01 15:36:49 +0200
## Comment 21997
Date: 2016-04-01 15:36:49 +0200
From: @PedroTadim
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36
Build Identifier:
The documentation on the website for binary copy explains only how to serialize integers, floats and strings. It's missing information on how to serialize time/date/timestamp/decimal/numeric types, null values and a possible reference to endianness.
Reproducible: Always
### Steps to Reproduce:
https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/BinaryBulkLoad
| Better instructions for how to generate the binary files for binary copy statement | https://api.github.com/repos/MonetDB/MonetDB/issues/3970/comments | 0 | 2020-11-30T13:25:15Z | 2024-06-28T13:13:42Z | https://github.com/MonetDB/MonetDB/issues/3970 | 753,476,427 | 3,970 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-04-01 15:27:27 +0200
From: @PedroTadim
To: SQL devs <<bugs-sql>>
Version: 11.21.19 (Jul2015-SP4)
CC: martin.van.dinther
Duplicates: #3568
Last updated: 2016-04-21 12:32:06 +0200
## Comment 21996
Date: 2016-04-01 15:27:27 +0200
From: @PedroTadim
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36
Build Identifier:
While a table is being created, it is possible to add a CHECK constraint for a column validation. However, later on the inserts the the CHECK constraint is never validated, so it has no meaning, allowing to insert bad values.
Reproducible: Always
### Steps to Reproduce:
1. Create a table with a check constraint. For example "CREATE TABLE testing (vala integer CHECK (vala > 0));"
2. Then make a supposed invalid insert like "INSERT into testing values (-1);" and it's allowed.
### Actual Results:
The invalid values are inserted on the table despite the CHECK constraint.
### Expected Results:
An error message every time this happens, and the incorrect values not being inserted.
The keyword could be removed instead, and later give a error while creating or updating a table.
## Comment 22075
Date: 2016-04-21 12:31:48 +0200
From: Martin van Dinther <<martin.van.dinther>>
Known issue. See also bug #3568, bug #3335 and bug #3569.
*** This bug has been marked as a duplicate of bug #3568 ***
| A column with the CHECK constraint has no effect on validation | https://api.github.com/repos/MonetDB/MonetDB/issues/3969/comments | 0 | 2020-11-30T13:25:12Z | 2024-06-28T07:19:57Z | https://github.com/MonetDB/MonetDB/issues/3969 | 753,476,404 | 3,969 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-27 23:42:49 +0200
From: @mlkersten
To: SQL devs <<bugs-sql>>
Version: 11.17.13 (Jan2014-SP1)
CC: @njnes
Last updated: 2016-04-11 11:16:04 +0200
## Comment 21986
Date: 2016-03-27 23:42:49 +0200
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:44.0) Gecko/20100101 Firefox/44.0
Build Identifier:
A table producing function that contains an invalid table definition is not captured properly. It raises an assertion error.
Test added.
Reproducible: Always
### Steps to Reproduce:
-- should not raise an assertion
create function places3()
returns table( "schema" string, "table" string, "schema" string)
external name iot.places;
select * from places3();
## Comment 21987
Date: 2016-03-30 11:21:16 +0200
From: @njnes
added checks for ambigious names in the returning table
## Comment 21988
Date: 2016-03-30 11:26:00 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [fad4a317b5ee](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fad4a317b5ee) 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=fad4a317b5ee](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=fad4a317b5ee)
Changeset description:
fix for bug #3968
## Comment 21995
Date: 2016-04-01 09:59:50 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [0462dab575fb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0462dab575fb) made by Martin Kersten <mk@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0462dab575fb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0462dab575fb)
Changeset description:
Add testcase for bug #3968
## Comment 22025
Date: 2016-04-11 11:16:04 +0200
From: @sjoerdmullender
Jul2015-SP4 has been released.
| Missing double use of column names | https://api.github.com/repos/MonetDB/MonetDB/issues/3968/comments | 0 | 2020-11-30T13:25:10Z | 2024-06-27T12:11:30Z | https://github.com/MonetDB/MonetDB/issues/3968 | 753,476,376 | 3,968 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-27 11:02:04 +0200
From: @drstmane
To: GDK devs <<bugs-common>>
Version: -- development
Last updated: 2016-04-04 12:41:37 +0200
## Comment 21984
Date: 2016-03-27 11:02:04 +0200
From: @drstmane
When starting mserver5 by hand, Jun2016 branch (and newer?) does not longer create the prefix of the dbpath, while it did with Jul2015 and older.
Is this a bug or a feature?
11:01:15 manegold@rome:/tmp $ l /tmp/Ju*
ls: cannot access /tmp/Ju*: No such file or directory
11:01:18 manegold@rome:/tmp $ mserver5 --version
MonetDB 5 server v11.23.0 (64-bit, 64-bit oids, 128-bit integers)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2015 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.38 2015-11-23 (compiled with 8.38)
openssl: OpenSSL 1.0.1k 8 Jan 2015 (compiled with OpenSSL 1.0.1k-fips 8 Jan 2015)
libxml2: 2.9.3 (compiled with 2.9.3)
Compiled by: manegold@rome.da.cwi.nl (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
11:01:25 manegold@rome:/tmp $ mserver5 --dbpath=/tmp/Jun2016/dbfarm
!FATAL: BBPaddfarm: /tmp/Jun2016/dbfarm: cannot create directory
11:01:30 manegold@rome:/tmp $ mkdir /tmp/Jun2016
11:01:37 manegold@rome:/tmp $ mserver5 --dbpath=/tmp/Jun2016/dbfarm
MonetDB 5 server v11.23.0
This is an unreleased version
Serving database 'dbfarm', using 8 threads
Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs and 128bit integers dynamically linked
Found 15.589 GiB available main-memory.
Copyright (c) 1993-July 2008 CWI.
Copyright (c) August 2008-2015 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:50000/
MonetDB/GIS module loaded
MonetDB/SQL module loaded
>11:01:42 manegold@rome:/tmp $
11:01:43 manegold@rome:/tmp $ l /tmp/Ju*
total 980
drwxr-x--- 3 manegold da 4096 Mar 27 11:01 ./
drwxrwxrwt. 18 root root 991232 Mar 27 11:01 ../
drwxr-x--- 4 manegold da 4096 Mar 27 11:01 dbfarm/
11:01:47 manegold@rome:/tmp $
## Comment 21985
Date: 2016-03-27 13:54:33 +0200
From: @sjoerdmullender
(In reply to Stefan Manegold from comment 0)
> When starting mserver5 by hand, Jun2016 branch (and newer?) does not longer
> create the prefix of the dbpath, while it did with Jul2015 and older.
>
> Is this a bug or a feature?
Bug.
## Comment 22004
Date: 2016-04-04 11:32:38 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [f54d3b64cf22](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f54d3b64cf22) 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=f54d3b64cf22](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f54d3b64cf22)
Changeset description:
Create parent directories for dbpath.
This fixes bug #3967.
## Comment 22005
Date: 2016-04-04 11:36:43 +0200
From: @sjoerdmullender
Fixed unreleased code.
## Comment 22006
Date: 2016-04-04 12:41:37 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [fdbb27d97ffd](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fdbb27d97ffd) 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=fdbb27d97ffd](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=fdbb27d97ffd)
Changeset description:
Create parent directories for dbpath.
This fixes bug #3967.
| Jun2016 branch (and newer?) no longer creates dbpath path prefix? | https://api.github.com/repos/MonetDB/MonetDB/issues/3967/comments | 0 | 2020-11-30T13:25:07Z | 2024-06-27T12:11:29Z | https://github.com/MonetDB/MonetDB/issues/3967 | 753,476,353 | 3,967 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-25 12:19:42 +0100
From: Anthony Damico <<ajdamico>>
To: SQL devs <<bugs-sql>>
Version: 11.21.19 (Jul2015-SP4)
CC: ajdamico, @njnes
Last updated: 2016-04-17 10:11:24 +0200
## Comment 21982
Date: 2016-03-25 12:19:42 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Build Identifier:
table used in the screeenshots (with import code below) but this behavior is common and should be reproducible on any ram-intensive process
https://downloads.cms.gov/BSAPUF/2008_BSA_Carrier_Line_Items_PUF_1.zip
overall, the system knows how much ram is being used, but you cannot distinguish monetdb from other processes unless you do the subtraction.
Reproducible: Always
### Steps to Reproduce:
CREATE TABLE test (car_line_id STRING, bene_sex_ident_cd INTEGER, bene_age_cat_cd INTEGER, car_line_icd9_dgns_cd STRING, car_line_hcpcs_cd STRING, car_line_betos_cd STRING, car_line_srvc_cnt INTEGER, car_line_prvdr_type_cd INTEGER, car_line_cms_type_srvc_cd STRING, car_line_place_of_srvc_cd INTEGER, car_hcpcs_pmt_amt INTEGER);
COPY OFFSET 2 INTO test FROM 'C:\Users\anthonyd\Desktop\2008_BSA_Carrier_Line_Items_PUF_1\2008_BSA_Carrier_Line_Items_PUF_1.csv' USING DELIMITERS ',','\n','"' NULL as '' ;
### Actual Results:
screenshot of starting state
http://s15.postimg.org/pzb8yv1jv/starting_state_of_processes.png
screenshot of ram usage during import around 50 millionth record
http://s14.postimg.org/8xz3f0nrl/during_big_import.png
### Expected Results:
mserver.exe should display ram being used by the process
ghost ram! ;) thanks
## Comment 21983
Date: 2016-03-25 12:26:52 +0100
From: Anthony Damico <<ajdamico>>
not as easy to reproduce, but more indicative of the problem- here is a screenshot from our 224gb server. 42% of ram usage and yet the largest ram process appears to only be taking up 68 megabytes
http://s24.postimg.org/3zopo9i11/90gb_ram_in_use_but_not_displayed.png
## Comment 22059
Date: 2016-04-17 10:11:24 +0200
From: @njnes
the mserver just allocates memory using standard libraries, ie how could windows not know what the mserver is using. I guess that the difference comes from the memory mapped files. This is also on other OSes listed seperately.
| mserver.exe does not accurately tell windows OS how much RAM is being used | https://api.github.com/repos/MonetDB/MonetDB/issues/3966/comments | 0 | 2020-11-30T13:25:05Z | 2024-06-28T13:13:41Z | https://github.com/MonetDB/MonetDB/issues/3966 | 753,476,334 | 3,966 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-23 23:15:39 +0100
From: Gennadiy <<gennadiy1g>>
To: SQL devs <<bugs-sql>>
Version: 11.21.13 (Jul2015-SP2)
CC: @hannesmuehleisen, @njnes
Last updated: 2016-04-14 13:40:36 +0200
## Comment 21949
Date: 2016-03-23 23:15:39 +0100
From: Gennadiy <<gennadiy1g>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:38.9) Gecko/20100101 Goanna/2.0 Firefox/38.9 PaleMoon/26.1.1
Build Identifier:
I am trying to load data from a text file that has single quote character in its name into a table:
> "C:\Program Files\MonetDB\MonetDB5\mclient.bat" --port=50000 --user=monetdb
password:
Welcome to mclient, the MonetDB/SQL interactive terminal (Jul2015-SP2)
Database: MonetDB v11.21.13 (Jul2015-SP2), 'soft10_20160318_172621'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>
sql>
sql>COPY 120 OFFSET 2 RECORDS INTO "observations_to_score1" FROM 'C:\\tmp\\sachin's_data_with_requested_column_03_03_2016.csv' USING DELIMITERS ',', '\n', '"' LOCKED;
more>
more>
Everything works fine if there is no single quote character in the name of the file:
sql>COPY 120 OFFSET 2 RECORDS INTO "observations_to_score1" FROM 'C:\\tmp\\sachins_data_with_requested_column_03_03_2016.csv' USING DELIMITERS ',', '\n', '"' LOCKED;
120 affected rows (12.3s)
I was trying to precede the single quote character by a \ (backslash) or to double it, but it still did not work:
sql>COPY 120 OFFSET 2 RECORDS INTO "observations_to_score1" FROM 'C:\\tmp\\sachin\'s_data_with_requested_column_03_03_2016.csv' USING DELIMITERS ',', '\n', '"' LOCKED;
could not open file 'C:\\tmp\\sachin\'s_data_with_requested_column_03_03_2016.csv': No such file or directory
sql>COPY 120 OFFSET 2 RECORDS INTO "observations_to_score1" FROM 'C:\\tmp\\sachin''s_data_with_requested_column_03_03_2016.csv' USING DELIMITERS ',', '\n', '"' LOCKED;
could not open file 'C:\\tmp\\sachin\'s_data_with_requested_column_03_03_2016.csv': No such file or directory
> dir c:\tmp\sa*.csv
Volume in drive C is S3A9506D003
Volume Serial Number is 00B9-C775
Directory of c:\tmp
2016-03-18 17:12 144,202 sachin's_data_with_requested_column_03_03_2016.csv
2016-03-18 17:12 144,202 sachins_data_with_requested_column_03_03_2016.csv
2 File(s) 288,404 bytes
0 Dir(s) 377,532,665,856 bytes free
I am using the following version of MonetDB:
MonetDB 5 server v11.21.13 "Jul2015-SP2"
Serving database 'soft10_20160318_172621', using 4 threads
Compiled for x86_64-pc-winnt/64bit with 64bit OIDs dynamically linked
Found 3.799 GiB available main-memory.
Copyright (c) 1993-July 2008 CWI.
Copyright (c) August 2008-2015 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:50000/
Start processing logs sql/sql_logs version 52200
Start reading the write-ahead log 'sql_logs\sql\log.11'
Finished reading the write-ahead log 'sql_logs\sql\log.11'
Finished processing logs sql/sql_logs
MonetDB/SQL module loaded
>
Reproducible: Always
## Comment 21989
Date: 2016-03-30 12:33:47 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [bbacfc235a00](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bbacfc235a00) 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=bbacfc235a00](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bbacfc235a00)
Changeset description:
fix bug #3965, ie convert internal represenation of the filename, such
that single quotes can be used in filenames.
## Comment 21990
Date: 2016-03-30 12:45:41 +0200
From: @njnes
internal filename strings are now properly converted to allow for single quotes.
Use '' in your sql to pass the quote.
## Comment 22024
Date: 2016-04-11 11:16:00 +0200
From: @sjoerdmullender
Jul2015-SP4 has been released.
## Comment 22033
Date: 2016-04-14 10:43:57 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [59a69a3cac1e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=59a69a3cac1e) 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=59a69a3cac1e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=59a69a3cac1e)
Changeset description:
Convert internal representation of file names for COPY BINARY INTO.
Also see changeset [bbacfc235a00](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bbacfc235a00) and bug #3965.
## Comment 22038
Date: 2016-04-14 13:40:03 +0200
From: @hannesmuehleisen
eh this broke all of our R import scripts on windows :(
## Comment 22039
Date: 2016-04-14 13:40:36 +0200
From: @hannesmuehleisen
including the automated csv import included in the MonetDB R package.
| Not possible to quote/escape single quote character in the name of the file to load. | https://api.github.com/repos/MonetDB/MonetDB/issues/3965/comments | 0 | 2020-11-30T13:25:02Z | 2024-06-27T12:11:27Z | https://github.com/MonetDB/MonetDB/issues/3965 | 753,476,303 | 3,965 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-23 14:32:16 +0100
From: Anthony Damico <<ajdamico>>
To: SQL devs <<bugs-sql>>
Version: 11.21.19 (Jul2015-SP4)
CC: ajdamico
Last updated: 2016-05-23 11:40:59 +0200
## Comment 21944
Date: 2016-03-23 14:32:16 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Build Identifier:
from sqlite vignette
Reproducible: Always
### Steps to Reproduce:
library(DBI)
library(MonetDBLite)
library(MonetDB.R)
mydb <- dbConnect(MonetDBLite())
dbWriteTable(mydb, "iris", iris)
dbGetQuery(mydb, 'SELECT * FROM iris WHERE "Sepal.Length" < :x',
params = list(x = 4.6))
## Comment 22165
Date: 2016-05-23 11:12:52 +0200
From: @hannesmuehleisen
This is true for MonetDB in general. Making it a feature request.
## Comment 22171
Date: 2016-05-23 11:40:59 +0200
From: Anthony Damico <<ajdamico>>
switching to bugs-sql@monetdb.org then?
| colon (e.g. :x) parameters does not work in prepared statements | https://api.github.com/repos/MonetDB/MonetDB/issues/3964/comments | 0 | 2020-11-30T13:25:00Z | 2024-06-28T07:19:57Z | https://github.com/MonetDB/MonetDB/issues/3964 | 753,476,265 | 3,964 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-23 03:12:31 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: -- development
CC: ajdamico
Last updated: 2016-05-23 11:08:04 +0200
## Comment 21941
Date: 2016-03-23 03:12:31 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Build Identifier:
importing ten large tables on ten cores is 7x as fast with a monetdb session that allows multiple connections. until monetdblite can compete with multicore imports, monetdb server control code should not be deprecated.
reproducible script below
Reproducible: Always
### Steps to Reproduce:
library(DBI)
library(MonetDBLite)
library(MonetDB.R)
create ten csv files with 1,000,000 records each
for( j in 1:10 ){
tf <- tempfile()
write.csv( mtcars[ rep( 1:32 , 31250 ) , ] , tf , row.names = FALSE )
assign( paste0( "tf" , j ) , tf )
}
monetdblite import of 10,000,000 records
db <- dbConnect( MonetDBLite() )
system.time( {
for( j in 1:10 ) {
tablename <- basename( get( paste0( 'tf' , j ) ) )
dbWriteTable( db , tablename , mtcars[ 0 , ] )
dbSendUpdate(db, paste0("COPY OFFSET 2 INTO ", tablename, " FROM '", get( paste0( 'tf' , j ) ) , "' using delimiters ',','\\n','\"' NULL AS ''" ) )
}
} )
external mserver import of 10,000,000 records
batfile <-
monetdb.server.setup(
database.directory = paste0( tempdir() , "/MonetDB" ) ,
monetdb.program.path =
ifelse(
.Platform$OS.type == "windows" ,
"C:/Program Files/MonetDB/MonetDB5" ,
""
) ,
dbname = "mydb" ,
dbport = 50000
)
dbname <- "mydb"
dbport <- 50000
monetdb.server.start( batfile )
monet.url <- paste0( "monetdb://localhost:" , dbport , "/" , dbname )
mydb <- dbConnect( MonetDB.R() , monet.url , wait = TRUE )
pid <- as.integer( dbGetQuery( mydb , "SELECT value FROM env() WHERE name = 'monet_pid'" )[[1]] )
library(snow)
cl<-makeCluster(10,type="SOCK")
myfun <-
function( myfile , murl ){
library(DBI)
library(MonetDBLite)
library(MonetDB.R)
tablename <- basename( myfile )
con <- dbConnect( MonetDB.R() , murl , wait = TRUE )
dbSendUpdate(con, paste0("COPY OFFSET 2 INTO ", tablename, " FROM '", myfile , "' using delimiters ',','\\n','\"' NULL AS ''" ) )
TRUE
}
system.time({
for( j in 1:10 ) {
tablename <- basename( get( paste0( 'tf' , j ) ) )
dbWriteTable( mydb , tablename , mtcars[ 0 , ] )
}
clusterApply(cl,sapply( paste0( 'tf' , 1:10 ) , get ) ,myfun , murl = monet.url)
})
stopCluster(cl)
monetdb.server.stop( pid )
### Actual Results:
monetdblite time:
user system elapsed
58.28 2.87 98.41
external mserver time:
user system elapsed
0.04 0.02 14.12
## Comment 21942
Date: 2016-03-23 08:07:21 +0100
From: @hannesmuehleisen
Are you sure the results are the same? I would suspect the parallel copy into into the same table to create some transaction commit conflicts...
## Comment 21943
Date: 2016-03-23 14:28:41 +0100
From: Anthony Damico <<ajdamico>>
re-read the code, they are being copied into different tables
## Comment 21951
Date: 2016-03-24 19:21:54 +0100
From: Anthony Damico <<ajdamico>>
would either of these be feasible?
(1) easy user conversion between a monetdblite dbfolder and a standalone mserver folder? -- the directories appear to generally have the same structure, so maybe there's a way to make an on/off switch
(2) distributed processing of multiple SQL commands at once? -- you mentioned that parallelizing dbwritetable is possible, maybe parallelizing distinct SQL commands within the same embedded session is also be possible - so long as there's no transaction conflict. something like:
`dbSendParallel( db , vector_of_sql_commands )`
returns a list of the series of dbSendQuery results?
## Comment 22162
Date: 2016-05-23 11:08:04 +0200
From: @hannesmuehleisen
Filed at https://github.com/hannesmuehleisen/MonetDBLite/issues/14
| MonetDBLite import speed should be reasonably competitive with standalone mserver | https://api.github.com/repos/MonetDB/MonetDB/issues/3963/comments | 0 | 2020-11-30T13:24:57Z | 2024-06-28T07:19:56Z | https://github.com/MonetDB/MonetDB/issues/3963 | 753,476,241 | 3,963 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-23 00:21:51 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.19 (Jul2015-SP4)
CC: ajdamico
Last updated: 2016-05-23 11:11:48 +0200
## Comment 21939
Date: 2016-03-23 00:21:51 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Build Identifier:
if it didn't return an error, obviously the user got it right! ;)
Reproducible: Always
### Steps to Reproduce:
library(DBI)
library(MonetDBLite)
library(MonetDB.R)
db <- dbConnect(MonetDBLite())
dbWriteTable( db , 'IRIS' , iris )
dbReadTable( db , 'IRIS' )
### Actual Results:
Identifier(s) "IRIS" contain uppercase or reserved SQL characters and need(s) to be quoted in queries.
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
### Expected Results:
just table-y goodness
## Comment 22164
Date: 2016-05-23 11:11:48 +0200
From: @hannesmuehleisen
Filed at https://github.com/hannesmuehleisen/MonetDBLite/issues/16
| MonetDBLite dbReadTable doesn't need to print the quoting warning | https://api.github.com/repos/MonetDB/MonetDB/issues/3962/comments | 0 | 2020-11-30T13:24:54Z | 2024-06-28T13:13:40Z | https://github.com/MonetDB/MonetDB/issues/3962 | 753,476,204 | 3,962 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-22 23:18:38 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.19 (Jul2015-SP4)
CC: ajdamico
Last updated: 2016-05-23 11:10:35 +0200
## Comment 21938
Date: 2016-03-22 23:18:38 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Build Identifier:
the column ordering by itself isn't the problem, it's appending plus date field
Reproducible: Always
### Steps to Reproduce:
library(DBI)
library(MonetDB.R)
library(MonetDBLite)
db <- dbConnect( MonetDBLite() )
x <- mtcars
this causes the problem
x$hello <- Sys.Date() - seq( nrow( x ) )
dbWriteTable( db , 'x' , x )
x <- x[ , sort( names( x ) ) ]
dbWriteTable( db , 'x' , x , append = TRUE )
### Actual Results:
Error in .local(conn, name, value, ...) :
Failed to insert data: MALException:embedded:Could not convert column 6 qsec to type 10
### Expected Results:
stacked tables
## Comment 22163
Date: 2016-05-23 11:10:35 +0200
From: @hannesmuehleisen
Filed at https://github.com/hannesmuehleisen/MonetDBLite/issues/15
| DATE field screws up dbWriteTable appending in MonetDBLite | https://api.github.com/repos/MonetDB/MonetDB/issues/3961/comments | 0 | 2020-11-30T13:24:52Z | 2024-06-28T13:13:40Z | https://github.com/MonetDB/MonetDB/issues/3961 | 753,476,183 | 3,961 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-22 22:33:26 +0100
From: Anthony Damico <<ajdamico>>
To: SQL devs <<bugs-sql>>
Version: 11.21.13 (Jul2015-SP2)
CC: ajdamico, @njnes
Last updated: 2016-03-23 15:42:55 +0100
## Comment 21937
Date: 2016-03-22 22:33:26 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Build Identifier:
if the two tables are out of order BUT the column types align, the UNION ALL is stacking the wrong columns on top of another.. i only noticed because it crashed
if types align then users are getting the wrong columns stacked on top of each other
Reproducible: Always
### Steps to Reproduce:
character column then numeric column
CREATE TABLE x ( a clob , b integer );
numeric column then character column
CREATE TABLE y ( b integer , a clob);
CREATE TABLE z AS ( SELECT * FROM x ) UNION ALL ( SELECT * FROM y ) WITH DATA;
### Actual Results:
Error in .local(conn, statement, ...) :
Unable to execute statement 'CREATE TABLE z AS ( SELECT * FROM x ) UNION ALL ( SELECT * FROM y ) WITH DATA'.
Server says 'ParseException:SQLparser:types clob(0,0) and int(32,0) are not equal for column 'a''.
### Expected Results:
column ordering based on first table
## Comment 21940
Date: 2016-03-23 01:56:03 +0100
From: Anthony Damico <<ajdamico>>
example that does not crash but is still wrong
CREATE TABLE x ( a integer , b integer );
CREATE TABLE y ( b integer , a integer);
INSERT INTO x VALUES ( 1 , 2 ) ;
INSERT INTO y VALUES ( 3 , 4 ) ;
CREATE TABLE z AS ( SELECT * FROM x ) UNION ALL ( SELECT * FROM y ) WITH DATA;
SELECT * FROM z;
## Comment 21945
Date: 2016-03-23 14:50:39 +0100
From: @njnes
sql select *, simply gives the columns in the order the underlying table defines them. So doing a union like this is simply incorrect. First project the columns properly with a select a,b for example.
## Comment 21946
Date: 2016-03-23 14:57:27 +0100
From: Anthony Damico <<ajdamico>>
hi, no problem if you don't support this, but if this is an invalid call, then you absolutely must throw an error whenever SELECT * gets used with UNION ALL.
many users will expect this to work. and suddenly when it does not work, most users will not even realize it did not work. here's what people would do and not ever notice that `z` is incorrect--
CREATE TABLE x ( a integer , b integer );
CREATE TABLE y ( b integer , a integer);
INSERT INTO x VALUES ( 1 , 2 ) ;
INSERT INTO y VALUES ( 3 , 4 ) ;
CREATE TABLE z AS ( SELECT * FROM x ) UNION ALL ( SELECT * FROM y ) WITH DATA;
SELECT * FROM z;
it's definitely screwing up unsuspecting users who are simply going to assume that it worked properly.
thanks niels!
## Comment 21948
Date: 2016-03-23 15:42:55 +0100
From: @njnes
postgres=
postgres= CREATE TABLE x ( a integer , b integer );
CREATE TABLE
postgres= CREATE TABLE y ( b integer , a integer);
CREATE TABLE
postgres= INSERT INTO x VALUES ( 1 , 2 ) ;
INSERT 0 1
postgres= INSERT INTO y VALUES ( 3 , 4 ) ;
INSERT 0 1
postgres= select * from x;
a | b
---+---
1 | 2
(1 row)
postgres= select * from y;
b | a
---+---
3 | 4
(1 row)
postgres= CREATE TABLE z AS ( SELECT * FROM x ) UNION ALL ( SELECT * FROM y ) WITH DATA;
SELECT 2
postgres= SELECT * FROM z;
a | b
---+---
1 | 2
3 | 4
(2 rows)
ie what we do is normal behaviour....
| SELECT * with UNION ALL does not check column order | https://api.github.com/repos/MonetDB/MonetDB/issues/3960/comments | 0 | 2020-11-30T13:24:49Z | 2024-06-28T13:13:39Z | https://github.com/MonetDB/MonetDB/issues/3960 | 753,476,163 | 3,960 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-22 17:01:41 +0100
From: @drstmane
To: Documentation maintainers <<bugs-docs>>
Version: unspecified
Last updated: 2016-03-22 19:33:39 +0100
## Comment 21935
Date: 2016-03-22 17:01:41 +0100
From: @drstmane
https://monetdb.org/Documentation/Manuals/MonetDB/MAL/Types
lists "chr" as MAL type, but MAL (and IMHO all of MonetDB) does not support a "chr" (single-character) type.
(NB. even it we would support such type, it could not be single byte, since it needs to be able to hold all valid UTF-8 characters ...)
## Comment 21936
Date: 2016-03-22 19:33:39 +0100
From: @sjoerdmullender
Fixed. Replaced chr by missing bte.
| website lists wrong (non-exiting) MAL type chr | https://api.github.com/repos/MonetDB/MonetDB/issues/3959/comments | 0 | 2020-11-30T13:24:47Z | 2024-06-27T12:11:21Z | https://github.com/MonetDB/MonetDB/issues/3959 | 753,476,134 | 3,959 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-21 10:11:48 +0100
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2016-04-11 11:46:01 +0200
## Comment 21932
Date: 2016-03-21 10:11:48 +0100
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36
Build Identifier:
When I do
sql> set optimizer='sequential_pipe';
sql> TRACE CREATE TABLE x AS <select statement> WITH DATA;
I get an output similar to this:
+----------+----------------------------------+
| ticks | statement |
+==========+==================================+
| 13212 | <select statement> |
| 9057211 | <select statement> |
| 0 | end user.s41_1; |
| 15027376 | function user.s41_1(...):void; |
| 15027472 | X_4=0@0:void := user.s41_1(...); |
+----------+----------------------------------+
57 tuples (15.0s)
That is misleading, because then numbers just don't add up.
In the toy example above, 9057211 + 13212 is the cost of the select statement, but the total cost is reported as 15027472.
What is missing is the cost of the CREATE TABLE statement itself.
Is it possible to include that cost in the trace?
Reproducible: Always
## Comment 21933
Date: 2016-03-21 10:25:04 +0100
From: @swingbit
In case including the cost of the create statement isn't possible, I would expect the reported cost of the function (last two lines of the trace), to report the actual cost of the select statement (the sum of all previous statements), while the query timing - 57 tuples (15.0s) - stays the same.
| TRACE timings are misleading with CREATE TABLE statements | https://api.github.com/repos/MonetDB/MonetDB/issues/3958/comments | 0 | 2020-11-30T13:24:45Z | 2024-06-28T07:19:56Z | https://github.com/MonetDB/MonetDB/issues/3958 | 753,476,107 | 3,958 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-18 16:51:16 +0100
From: anthonin.bonnefoy
To: GDK devs <<bugs-common>>
Version: 11.21.5 (Jul2015)
CC: @njnes
Last updated: 2016-03-30 12:47:37 +0200
## Comment 21931
Date: 2016-03-18 16:51:16 +0100
From: anthonin.bonnefoy
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 Iceweasel/45.0
Build Identifier:
Sometimes, a theap bat has a free size in BBP.dir superior to its' size on disk.
When we request sys.storage, we get a segfault during the bat loading.
The problem occured today with the last Jul2015_SP3_release version.
The oldest occurrence of this problem was in 17 Dec.
It occurred more than 8 times on different client machines (some vm, some physical).
Each times, I fixed the BBP.dir to match what is on disk.
I still could not reproduce it (still trying…).
Our application insert data every minutes.
A table contains 2 hours of data. We never update or delete elements inside it.
Once the last element is inserted, the table is never modified.
After the last insert, the table is used in a subselect like this
INSERT INTO smb_l2_1456963200_1457049600 (..., path, ...)
SELECT ..., '\001' AS path, ...
FROM smb_l1_1457020800_1457028000
A call to sys.storage is done regularly to check size and drop the oldest tables if necessary.
Here is the bat details I could get:
First case:
BBP.dir:
29488 32 tmp_71460 tmpr_71460 07/14/71460 403826021 2 7279 0 0 7279 8192 0 0 0 0 void 0 1 1793 0 0 0 1 0 1367503019 0 0 0 str 4 3 0 0 1 5 2 0 1371123245 29116 32768 0 92452 131072 0
Table + column File Last modification Size
smb_l1_1457020800_1457028000_path 07/14/71460.tail 03/03/16_19:03:51.582904372 29116
smb_l1_1457020800_1457028000_path 07/14/71460.theap 03/03/16_19:03:51.582904372 92018
Second case:
BBP.dir:
68790 32 tmp_206266 tmpr_206266 20/62/206266 807303195 2 20819545 0 0 20819545 20824064 0 0 0 0 void 0 1 1793 0 0 0 0 0 94276104 0 0 0 str 4 3 0 0 1 190 10 0 95620610 83278180 83296256 1 93254 131072 0
Table + column File Last modification Size
smb_l1_1458043200_1458050400_tree 20/62/206266.tail 03/15/16_15:05:26.4601184260 83296256
smb_l1_1458043200_1458050400_tree 20/62/206266.theap 03/15/16_15:05:26.4601184260 92606
The last insertion on this bat happened at 2016-03-15T15:05:11.310453+00:00
At 2016-03-15T15:55:18.816467+00:00, a sys.storage is correctly executed
At 2016-03-15T16:04:30.855214+00:00, the sys.storage segfault due to incorrect free size
Second case, after I fixed the BBP.dir size, restarted our application, the problem came back on the exact same bat:
BBP.dir:
68790 32 tmp_206266 tmpr_206266 20/62/206266 813529777 2 20819545 0 0 20819545 20824064 0 0 0 0 void 0 1 1793 0 0 0 0 0 94276104 0 0 0 str 4 3 0 0 1 190 10 0 95620610 83278180 83296256 1 92682 131072 0
Table + file informations, same as before:
smb_l1_1458043200_1458050400_tree 20/62/206266.tail 03/15/16_15:05:26.4601184260 83296256
smb_l1_1458043200_1458050400_tree 20/62/206266.theap 03/15/16_15:05:26.4601184260 92606
Relaunch time with sys.storage at startup: 2016-03-16T07:55:32.199505+00:00
Segfault time on second sys.storage: 2016-03-16T07:57:19.479262+00:00
Third case:
BBP.dir:
7630 32 tmp_16716 tmpr_16716 01/67/16716 39512265 2 105827 0 0 105827 114688 0 0 0 0 void 0 1 1793 0 0 0 0 0 6949864 0 0 0 str 4 3 0 0 0 1 2 0 7821667 423308 458752 1 84055 131072 0
Table + file informations:
http_l1_1456826400_1456833600_user_agent 01/67/16716.tail 03/01/16_13:03:04.7333961010 458752
http_l1_1456826400_1456833600_user_agent 01/67/16716.theap 03/01/16_13:03:11.2254317060 83795
Last insertion: 2016-03-01T12:03:04.982644+00:00
Last correct sys.storage: 2016-03-01T13:03:11.399343+00:00
sys.storage with segfault: 2016-03-01T13:23:05.652350+00:00
Fourth case:
BBP.dir:
68351 32 tmp_205377 tmpr_205377 20/53/205377 1880370 2 3114090 0 0 3114090 3129344 0 0 0 0 void 0 1 1793 0 0 0 0 0 285461549 0 0 0 str 4 3 0 0 1 2286 2285 0 286393092 12456360 12517376 1 185314 196608 0
Table + file informations:
tcp_l1_1458201600_1458208800_captured_pcap 20/53/205377.tail 03/17/16_11:04:08.5102524580 12517376
tcp_l1_1458201600_1458208800_captured_pcap 20/53/205377.theap 03/17/16_11:04:08.5062521410 185303
Last insertion: 2016-03-17T11:03:08.925185+00:00
Last working sys.storage: 2016-03-17T11:21:12.295127+00:00
Segfault time: 2016-03-17T11:39:09.198912+00:00
Fifth case, same machine as fourth, after a version update:
BBP.dir:
70521 32 tmp_211571 tmpr_211571 21/15/211571 3160002 2 2948449 0 0 2948449 2965504 0 0 0 0 void 0 1 1793 0 0 0 1 0 313188415 0 0 0 str 4 3 0 0 1 1805 1804 0 314580606 11793796 11862016 1 192498 196608 0
Table + File informations:
tcp_l1_1458288000_1458295200_captured_pcap 21/15/211571.tail 03/18/16_11:03:52.6342762500 11862016
tcp_l1_1458288000_1458295200_captured_pcap 21/15/211571.theap 03/18/16_11:03:54.8463926460 192487
Last insertion: 2016-03-18T11:03:08.658192+00:00
Segfault time: 2016-03-18T11:49:05.918645+00:00
From what I could gather (some interpretations might be wrong):
- It only affects theap whose size is lower than the mmap threshold.
- If affects bats which are not modified anymore
- From the second case (bis), no queries have been done on the table in question (except being loaded through sys.storage)
- The difference in size does not look like a random memory corruption, more like strPut has been called with the incorrect heap
- The bat is not flagged as dirty since no modification is done on file even after log flushes.
- I thought it was the string deduplication which might trigger the bug. But some bats (tcp_l1_1458288000_1458295200_captured_pcap) are composed of a lot of null values and 3159 unique strings like 405080/F4/VD5KBVKdIul+3+kq6veA_1458288148.pcap
Reproducible: Couldn't Reproduce
## Comment 21991
Date: 2016-03-30 12:47:37 +0200
From: @njnes
in the 2015 branch a fix for this problem was added. Please test this version.
| Incorrect free size in BBP.dir | https://api.github.com/repos/MonetDB/MonetDB/issues/3957/comments | 0 | 2020-11-30T13:24:42Z | 2024-06-27T12:11:19Z | https://github.com/MonetDB/MonetDB/issues/3957 | 753,476,072 | 3,957 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-17 20:48:22 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.19 (Jul2015-SP4)
CC: ajdamico
Last updated: 2016-06-23 10:24:44 +0200
## Comment 21928
Date: 2016-03-17 20:48:22 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0
Build Identifier:
Error in .local(conn, statement, ...) :
Unable to execute statement 'select * from pnad2011 limit 1'.
Server says 'integer value too large or not a number (1) in: "select * from pnad2011 limit 1"
' [22003].
Reproducible: Always
### Steps to Reproduce:
devtools::install_github( "djalmapessoa/convey" )
library(convey)
library(survey)
library(downloader)
if you set this to output, then no crash!
options( monetdb.log.query = "s:/temp/query log.txt" )
if you set this to TRUE, then no crash!
options( monetdb.debug.query = TRUE )
if you debug and walk through, then no crash!
debug( convey:::survey.design.svypoormed )
setwd( "C:/My Directory/PNAD/" )
setInternet2( FALSE ) only windows users need this line
options( encoding = "windows-1252" ) only macintosh and *nix users need this line
download just 2011 (pretty fast)
years.to.download <- 2011
source_url( "https://raw.githubusercontent.com/ajdamico/asdfree/master/Pesquisa%20Nacional%20por%20Amostra%20de%20Domicilios/download%20all%20microdata.R" , prompt = FALSE , echo = TRUE )
pnad.dbfolder <- paste0( getwd() , "/MonetDB" )
db <- dbConnect( MonetDBLite() , pnad.dbfolder )
dbListTables(db)
sample.pnad <- svydesign( id = ~v4618 , strata = ~v4617 , data = 'pnad2011' , weights = ~pre_wgt , nest = TRUE , dbtype = "MonetDBLite" , dbname = pnad.dbfolder )
sample.pnad <- convey_prep( sample.pnad )
this is the line that is going to crash, but it should work fine
dbGetQuery( db , "select * from pnad2011 limit 1" )
options(survey.lonely.psu = "adjust")
svypoormed( ~v4720 , sample.pnad , na.rm = TRUE )
ERROR
### Actual Results:
Error in .local(conn, statement, ...) :
Unable to execute statement 'select * from pnad2011 limit 1'.
Server says 'integer value too large or not a number (1) in: "select * from pnad2011 limit 1"
' [22003].
### Expected Results:
the same result as *any* of these three workarounds:
if you set this to output, then no crash!
options( monetdb.log.query = "s:/temp/query log.txt" )
if you set this to TRUE, then no crash!
options( monetdb.debug.query = TRUE )
if you debug and walk through, then no crash!
debug( convey:::survey.design.svypoormed )
tested on windows R version 3.2.3 and 3.2.4
used today's MonetDBLite build
## Comment 21929
Date: 2016-03-18 09:02:44 +0100
From: @hannesmuehleisen
this is not a crash but an incorrect answer...
## Comment 21930
Date: 2016-03-18 13:08:44 +0100
From: Anthony Damico <<ajdamico>>
hi, i've just confirmed that this bug is reproducible on rocks040
for mac/unix, make sure to set
options( encoding = "windows-1252" )
thanks
## Comment 22074
Date: 2016-04-21 10:43:37 +0200
From: Anthony Damico <<ajdamico>>
no longer crashes there. now the error is within svypoormed (which is a `convey` issue instead)
>
> svypoormed( ~v4720 , sample.pnad , na.rm = TRUE )
Error in eval(expr, envir, enclos) : object 'v4720' not found
## Comment 22083
Date: 2016-04-23 16:09:09 +0200
From: Anthony Damico <<ajdamico>>
hi, this breaks again on both windows and unix :( sessionInfo below
i have added a `limit1` test to eanthony so it's incorporated into perpetual testing once fixed..
https://github.com/MonetDB/eanthony/commit/dbfd62426c205f9082039c064231b06b8e343036
thanks
> svypoormed( ~v4720 , sample.pnad , na.rm = TRUE )
Error in .local(conn, statement, ...) :
Unable to execute statement 'select * from pnad2011 limit 1'.
Server says 'integer value too large or not a number (1) in: "select * from pnad2011 limit 1"
' [22003].
In addition: There were 24 warnings (use warnings() to see them)
> sessionInfo()
R version 3.2.4 (2016-03-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Fedora 20 (Heisenbug)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] grid stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] ff_2.2-13 bit_1.1-13 digest_0.6.9 R.utils_2.3.0
[5] R.oo_1.20.0 R.methodsS3_1.7.1 descr_1.1.2 SAScii_1.0
[9] MonetDBLite_0.2.3 MonetDB.R_1.0.2 DBI_0.3.1 downloader_0.4
[13] survey_3.30-3 convey_0.1.0
loaded via a namespace (and not attached):
[1] codetools_0.2-14 xtable_1.8-3
>
## Comment 22093
Date: 2016-04-25 16:32:06 +0200
From: @hannesmuehleisen
this works for me
| MonetDBLite unable to execute LIMIT 1 statement | https://api.github.com/repos/MonetDB/MonetDB/issues/3956/comments | 0 | 2020-11-30T13:24:39Z | 2024-06-27T12:11:17Z | https://github.com/MonetDB/MonetDB/issues/3956 | 753,476,036 | 3,956 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-15 15:08:00 +0100
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.19.9 (Oct2014-SP2)
CC: @njnes
Last updated: 2016-03-25 09:59:45 +0100
## Comment 21910
Date: 2016-03-15 15:08:00 +0100
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36
Build Identifier:
This query was automatically generated, hence a bit verbose. I simplified it manually as much as I could:
-- START QUERY
start transaction;
create table input_double (a1 string, a2 double, prob double);
INSERT INTO input_double VALUES ('latitude',52.0,1.0);
INSERT INTO input_double VALUES ('longitude',5.1,1.0);
CREATE TABLE v(a1 int, a2 point, prob double);
insert into v values(0,sys.point(50,4),1);
insert into v values(1,sys.point(51,5),1);
insert into v values(2,sys.point(52,6),1);
CREATE VIEW p AS
SELECT sys.point(a1,a2) AS a1, prob AS prob
FROM (
SELECT tmp_2.a2 AS a1, tmp_3.a2 AS a2, tmp_2.prob * tmp_3.prob AS prob
FROM
(SELECT a2, prob FROM input_double WHERE a1 = 'latitude') AS tmp_2,
(SELECT a2, prob FROM input_double WHERE a1 = 'longitude') AS tmp_3
) AS tmp;
CREATE VIEW r AS
SELECT a1 AS a1, sys.distance(a2,a3) AS prob
FROM (
SELECT v.a1 AS a1, v.a2 AS a2, p.a1 AS a3, v.prob * p.prob AS prob
FROM v,p
) AS tmp;
explain select * from r;
-- END QUERY
As it is, this generates a MAL loop for the call sys.distance(point,point):
| barrier (X_98,X_99) := iterator.new(X_40);
| X_101 := algebra.fetch(X_35,X_98);
| X_103 := geom.Distance(X_99,X_101);
| bat.append(X_94,X_103);
| redo (X_98,X_99) := iterator.next(X_40);
| exit (X_98,X_99);
Two problems:
Problem 1)
The manifold version is not generated as it should.
However, the manifold version IS generated when I make this simple change (don't ask me why!)
from:
CREATE VIEW r AS
SELECT a1 AS a1, sys.distance(a2,a3) AS prob
to:
CREATE VIEW r AS
SELECT a1 AS a1, prob * sys.distance(a2,a3) AS prob
Problem 2)
The loop as it is appears to be wrong.
The explain shows
"TypeException:user.s430_1[53]:'geom.Distance' undefined in: geom.Distance(X_99:wkb,X_101:int);"
Which means the loop is fetching integer values rather than point values.
Reproducible: Always
$ mserver5 --version
MonetDB 5 server v11.21.14 (64-bit, 64-bit oids, 128-bit integers)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2015 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.38 2015-11-23 (compiled with 8.37)
openssl: OpenSSL 1.0.1k 8 Jan 2015 (compiled with OpenSSL 1.0.1k-fips 8 Jan 2015)
libxml2: 2.9.3 (compiled with 2.9.3)
Compiled by: roberto@photon.hq.spinque.com (x86_64-unknown-linux-gnu)
Compilation: gcc -O3 -pipe -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code -D_FORTIFY_SOURCE=2
Linking : /usr/bin/ld -m elf_x86_64
## Comment 21914
Date: 2016-03-16 13:33:16 +0100
From: @njnes
The merge_project rewriter, rewrote the projections incorrectly, ie it mapped the second argument of the distance call to the v.a1 value (an int). This caused all the problems you indicated. Ie function unknown -> no manifold. etc.
## Comment 21915
Date: 2016-03-16 14:14:36 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [eb4112071e54](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=eb4112071e54) 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=eb4112071e54](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=eb4112071e54)
Changeset description:
fixes for bug #3955, ie make sure we don't rewrite projections when a name
conflict can occure, because of the rewrite.
## Comment 21974
Date: 2016-03-25 09:59:45 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| (incorrect) MAL loop instead of manifold triggered by simple change in target list | https://api.github.com/repos/MonetDB/MonetDB/issues/3955/comments | 0 | 2020-11-30T13:24:37Z | 2024-06-27T12:11:16Z | https://github.com/MonetDB/MonetDB/issues/3955 | 753,476,001 | 3,955 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-14 22:39:44 +0100
From: @mlkersten
To: SQL devs <<bugs-sql>>
Version: 11.17.13 (Jan2014-SP1)
CC: @njnes
Last updated: 2016-04-01 09:59:45 +0200
## Comment 21904
Date: 2016-03-14 22:39:44 +0100
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:44.0) Gecko/20100101 Firefox/44.0
Build Identifier:
A simple scheme to create a consolidated aggregation table causes an
assertion error to be triggered
0 0x00007f10509fb9c8 in raise () from /lib64/libc.so.6
1 0x00007f10509fd65a in abort () from /lib64/libc.so.6
2 0x00007f10509f4187 in __assert_fail_base () from /lib64/libc.so.6
3 0x00007f10509f4232 in __assert_fail () from /lib64/libc.so.6
4 0x00007f1044eaa0b9 in rel2bin_project (sql=0x7f10280145f0, rel=0x7f1028150d50, refs=0x7f10281568d0, topn=0x0)
at /export/scratch1/mk/default//package/sql/backends/monet5/rel_bin.c:2387
5 0x00007f1044eb4799 in subrel_bin (sql=0x7f10280145f0, rel=0x7f1028150d50, refs=0x7f10281568d0)
at /export/scratch1/mk/default//package/sql/backends/monet5/rel_bin.c:4589
6 0x00007f1044ea6377 in rel2bin_join (sql=0x7f10280145f0, rel=0x7f1028150db
Test added
Reproducible: Always
## Comment 21911
Date: 2016-03-16 09:35:35 +0100
From: @njnes
fixed bug, ie reset variables before trying subquery - update expressions.
## Comment 21912
Date: 2016-03-16 10:05:06 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [37366aa4622f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=37366aa4622f) 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=37366aa4622f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=37366aa4622f)
Changeset description:
fixed crash in Bug #3954, reinitialize properly after an error.
## Comment 21913
Date: 2016-03-16 10:12:09 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [aa5f0e2117f6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=aa5f0e2117f6) 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=aa5f0e2117f6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=aa5f0e2117f6)
Changeset description:
improved fix for Bug #3954
## Comment 21964
Date: 2016-03-25 09:59:23 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
## Comment 21994
Date: 2016-04-01 09:59:45 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [d6a360de69f3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d6a360de69f3) made by Martin Kersten <mk@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d6a360de69f3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d6a360de69f3)
Changeset description:
Add new test for bug #3954
| Consolidate table assertion error | https://api.github.com/repos/MonetDB/MonetDB/issues/3954/comments | 0 | 2020-11-30T13:24:35Z | 2024-06-27T12:11:15Z | https://github.com/MonetDB/MonetDB/issues/3954 | 753,475,972 | 3,954 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-14 18:20:15 +0100
From: @yzchang
To: SQL devs <<bugs-sql>>
Version: 11.21.13 (Jul2015-SP2)
Last updated: 2016-03-25 09:59:27 +0100
## Comment 21902
Date: 2016-03-14 18:20:15 +0100
From: @yzchang
Created attachment 389
CSV data to populate the table
The csv file is attached. Unpack and save it in /tmp directory. Then, with the queries below, the MIN/MAX values returned are wrong in two ways:
1. the values don't exist in the CSV data
2. seemly random, and different values are returned by every SELECT query.
A peculiar condition: 200000 is the minimal number of records to trigger this problem. With less records, the SELECT query returns correct results.
CREATE TABLE test (c UUID);
COPY 200000 RECORDS INTO test FROM '/tmp/data-uuid.csv' DELIMITERS ',';
SELECT MIN(c) AS mn, MAX(c) AS mx FROM test;
SELECT MIN(c) AS mn, MAX(c) AS mx FROM test;
> Attached file: [data-uuid.zip](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3953_data-uuid.zip_389) (application/zip, 107840 bytes)
> Description: CSV data to populate the table
## Comment 21903
Date: 2016-03-14 18:38:19 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [fc1164c392ca](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fc1164c392ca) made by Jennie Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=fc1164c392ca](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=fc1164c392ca)
Changeset description:
Added test for Bug #3953
## Comment 21907
Date: 2016-03-15 10:08:26 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [a6fd9385f8dc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a6fd9385f8dc) 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=a6fd9385f8dc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a6fd9385f8dc)
Changeset description:
All external types are passed as a pointer in a VAR structure.
This fixes bug #3953.
## Comment 21908
Date: 2016-03-15 10:10:01 +0100
From: @sjoerdmullender
When it happens only when a table is a certain minimum size, it's a pretty clear indication the problem lies in the mitosis part of the system.
## Comment 21966
Date: 2016-03-25 09:59:27 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| MIN/MAX of a UUID column produces wrong results | https://api.github.com/repos/MonetDB/MonetDB/issues/3953/comments | 0 | 2020-11-30T13:24:32Z | 2024-06-27T12:11:14Z | https://github.com/MonetDB/MonetDB/issues/3953 | 753,475,949 | 3,953 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-13 09:21:05 +0100
From: @mlkersten
To: SQL devs <<bugs-sql>>
Version: 11.17.13 (Jan2014-SP1)
CC: @njnes
Last updated: 2016-03-25 09:59:50 +0100
## Comment 21880
Date: 2016-03-13 09:21:05 +0100
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:44.0) Gecko/20100101 Firefox/44.0
Build Identifier:
sql>create stream table temp(t timestamp, room integer, payload decimal(8,2));
operation successful (21.739ms)
sql>insert into temp values(timestamp '2016-03-13 08:58:14', 1, 23.4);
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fb7e7760700 (LWP 24216)]
0x00007fb7fa56510e in timestamp_delta (d=0x0, ts=10) at /export/scratch1/mk/iothings//package/sql/storage/bat/bat_storage.c:21
21 while (d->next && d->wtime > ts)
(gdb) where
0 0x00007fb7fa56510e in timestamp_delta (d=0x0, ts=10) at /export/scratch1/mk/iothings//package/sql/storage/bat/bat_storage.c:21
1 0x00007fb7fa5680d4 in append_col (tr=0x638c3d0, c=0x7fb7dc27b6e0, i=0x7fb7dc10cdd0, tpe=24) at /export/scratch1/mk/iothings//package/sql/storage/bat/bat_storage.c:636
2 0x00007fb7fa3f7220 in mvc_append_wrap....
Reproducible: Always
## Comment 21884
Date: 2016-03-13 19:46:24 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [882cc12f4831](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=882cc12f4831) 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=882cc12f4831](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=882cc12f4831)
Changeset description:
add checks to disallow inserts into stream's fixes bug #3952
## Comment 21885
Date: 2016-03-13 19:46:53 +0100
From: @njnes
fixed, ie added checks
## Comment 21977
Date: 2016-03-25 09:59:50 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| Stream table gives segfault | https://api.github.com/repos/MonetDB/MonetDB/issues/3952/comments | 0 | 2020-11-30T13:24:30Z | 2024-06-27T12:11:13Z | https://github.com/MonetDB/MonetDB/issues/3952 | 753,475,918 | 3,952 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-12 02:00:08 +0100
From: Clint Cummins <<ccummins>>
To: SQL devs <<bugs-sql>>
Version: 11.21.13 (Jul2015-SP2)
CC: @njnes
Last updated: 2016-03-25 09:59:28 +0100
## Comment 21877
Date: 2016-03-12 02:00:08 +0100
From: Clint Cummins <<ccummins>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36
Build Identifier:
User added functions like vaults/fits do not work on Windows,
because externs like table_funcs are not visible to a Windows DLL.
(Although they run fine on Linux).
This causes a crash when one of these functions is called,
because the address of table_funcs and table_funcs.function_name is 0 in the DLL which holds the extensions code.
Changing 3 lines in sql/storage/store.c and sql/storage/sql_storage.h fixes
the problem on Windows:
store.c:
table_functions table_funcs; --> __declspec(dllexport) table_functions table_funcs;
and similar for store_funcs and logger_funcs.
sql_storage.h:
extern table_functions table_funcs; --> extern __declspec(dllimport) table_functions table_funcs;
and similar for store_funcs and logger_funcs.
I have only tested this on Windows, not on Linux.
Apparently a macro __declspec(x) is defined near the end of monetdb_config.h which should make the above changes also be fine on Linux, though.
See:
http://stackoverflow.com/questions/19373061/what-happens-to-global-and-static-variables-in-a-shared-library-when-it-is-dynam
Reproducible: Always
### Steps to Reproduce:
1. On Windows, build MonetDB-11.21.13 with an extension like sql/backends/monet5/vaults/fits.c
(my particular extension is based on this one; it accesses a different file format)
2. call the SQL function which runs the extension
3. it crashes at the first call to a function in table_funcs, such as
table_funcs.column_find_row(...)
If you print the address of this function in the DLL, it is 0.
### Actual Results:
Crash.
### Expected Results:
Run the table_funcs and store_funcs functions normally.
None needed, since I included the fix in the Details section.
## Comment 21921
Date: 2016-03-16 16:42:18 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [eee653606690](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=eee653606690) 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=eee653606690](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=eee653606690)
Changeset description:
Export table_funcs, store_funcs, and logger_funcs variables.
This is a stop gap solution to the problem that the data vaults don't
work on Windows.
This should fix bug #3951.
## Comment 21923
Date: 2016-03-16 18:23:05 +0100
From: @njnes
the exports have been added
## Comment 21967
Date: 2016-03-25 09:59:28 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| extern table_funcs not visible from Windows DLL for extensions like vaults (crashes) | https://api.github.com/repos/MonetDB/MonetDB/issues/3951/comments | 0 | 2020-11-30T13:24:27Z | 2024-06-27T12:11:12Z | https://github.com/MonetDB/MonetDB/issues/3951 | 753,475,894 | 3,951 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-11 12:09:26 +0100
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2016-03-13 14:25:52 +0100
## Comment 21875
Date: 2016-03-11 12:09:26 +0100
From: @skinkie
When compiling with --enable-shp --enable-optimisze:
make[11]: Entering directory '/usr/src/MonetDB/sql/backends/monet5/vaults/shp'
/bin/bash ../../../../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../../.. -I. -I../ -I./../ -I../../ -I./../../ -I../../../../include -I./../../../../include -I../../../../common -I./../../../../common -I../../../../storage -I./../../../../storage -I../../../../server -I./../../../../server -I../../../../../monetdb5/modules/atoms -I./../../../../../monetdb5/modules/atoms -I../../../../../monetdb5/modules/kernel -I./../../../../../monetdb5/modules/kernel -I../../../../../monetdb5/mal -I./../../../../../monetdb5/mal -I../../../../../monetdb5/modules/mal -I./../../../../../monetdb5/modules/mal -I../../../../../monetdb5/optimizer -I./../../../../../monetdb5/optimizer -I../../../../../monetdb5/scheduler -I./../../../../../monetdb5/scheduler -I../../../../../clients/mapilib -I./../../../../../clients/mapilib -I../../../../../common/options -I./../../../../../common/options -I../../../../../common/stream -I./../../../../../common/stream -I../../../../../common/utils -I./../../../../../common/utils -I../../../../../gdk -I./../../../../../gdk -I../../../../../geom/lib -I./../../../../../geom/lib -I../../../../../geom/monetdb5 -I./../../../../../geom/monetdb5 -I/usr/include/gdal -DLIBSHP -O3 -pipe -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code -D_FORTIFY_SOURCE=2 -c -o lib_shp_la-shp.lo `test -f 'shp.c' || echo './'`shp.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../../../.. -I. -I../ -I./../ -I../../ -I./../../ -I../../../../include -I./../../../../include -I../../../../common -I./../../../../common -I../../../../storage -I./../../../../storage -I../../../../server -I./../../../../server -I../../../../../monetdb5/modules/atoms -I./../../../../../monetdb5/modules/atoms -I../../../../../monetdb5/modules/kernel -I./../../../../../monetdb5/modules/kernel -I../../../../../monetdb5/mal -I./../../../../../monetdb5/mal -I../../../../../monetdb5/modules/mal -I./../../../../../monetdb5/modules/mal -I../../../../../monetdb5/optimizer -I./../../../../../monetdb5/optimizer -I../../../../../monetdb5/scheduler -I./../../../../../monetdb5/scheduler -I../../../../../clients/mapilib -I./../../../../../clients/mapilib -I../../../../../common/options -I./../../../../../common/options -I../../../../../common/stream -I./../../../../../common/stream -I../../../../../common/utils -I./../../../../../common/utils -I../../../../../gdk -I./../../../../../gdk -I../../../../../geom/lib -I./../../../../../geom/lib -I../../../../../geom/monetdb5 -I./../../../../../geom/monetdb5 -I/usr/include/gdal -DLIBSHP -O3 -pipe -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code -D_FORTIFY_SOURCE=2 -c shp.c -fPIC -DPIC -o .libs/lib_shp_la-shp.o
In file included from /usr/include/gdal/cpl_port.h:80:0,
from /usr/include/gdal/gdal.h:41,
from shp.h:13,
from shp.c:20:
/usr/include/gdal/cpl_config.h:198:0: error: "PACKAGE_BUGREPORT" redefined [-Werror]
define PACKAGE_BUGREPORT ""
^
In file included from shp.c:15:0:
../../../../../monetdb_config.h:618:0: note: this is the location of the previous definition
define PACKAGE_BUGREPORT "info@monetdb.org"
^
In file included from /usr/include/gdal/cpl_port.h:80:0,
from /usr/include/gdal/gdal.h:41,
from shp.h:13,
from shp.c:20:
/usr/include/gdal/cpl_config.h:201:0: error: "PACKAGE_NAME" redefined [-Werror]
define PACKAGE_NAME ""
^
In file included from shp.c:15:0:
../../../../../monetdb_config.h:621:0: note: this is the location of the previous definition
define PACKAGE_NAME "MonetDB"
^
In file included from /usr/include/gdal/cpl_port.h:80:0,
from /usr/include/gdal/gdal.h:41,
from shp.h:13,
from shp.c:20:
/usr/include/gdal/cpl_config.h:204:0: error: "PACKAGE_STRING" redefined [-Werror]
define PACKAGE_STRING ""
^
In file included from shp.c:15:0:
../../../../../monetdb_config.h:624:0: note: this is the location of the previous definition
define PACKAGE_STRING "MonetDB 11.22.0"
## Comment 21878
Date: 2016-03-12 19:54:41 +0100
From: @njnes
i'm unable to repeat this problem. On which platform does this fail?
## Comment 21879
Date: 2016-03-12 20:03:40 +0100
From: @skinkie
This is occuring on Debian Jessie (x86_64 azure).
apt-get install -y cifs-utils python3-zmq python-lxml libzmq3-dev gcc git make python3 python-zmq lsof automake autoconf mercurial libtool pkg-config gettext bison libssl-dev libpcre3-dev libxml2-dev curl xz-utils libreadline-dev unixodbc libcurl4-openssl-dev liblzma-dev libatomic-ops-dev libproj-dev libgeos-dev unixodbc-dev libbz2-dev libgdal-dev
cd /usr/src
hg clone http://dev.monetdb.org/hg/MonetDB/
cd /usr/src/MonetDB
echo y | ./de-bootstrap
hg pull --update
hg checkout default
./bootstrap
./configure --prefix=/opt/monetdb-default --enable-optimize
make
## Comment 21881
Date: 2016-03-13 14:25:52 +0100
From: @njnes
This is a package issue of the debian gdal package. The configure generated config.h should never be used within the header files of the exported api.
| shp option fails to compile | https://api.github.com/repos/MonetDB/MonetDB/issues/3950/comments | 0 | 2020-11-30T13:24:24Z | 2024-06-28T13:13:38Z | https://github.com/MonetDB/MonetDB/issues/3950 | 753,475,851 | 3,950 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-11 11:35:12 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: -- development
CC: ajdamico
Last updated: 2016-05-23 11:07:53 +0200
## Comment 21874
Date: 2016-03-11 11:35:12 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Build Identifier:
> use case: dbWriteTable seems to always single-thread for me, so it'd be nice to write multiple tables in parallel during a big import
We could probably parallelise dbWriteTable, in particular value conversions. Also on the query side. Because every column is essentially independent. Actually thats a great idea, will probably add this at some point.
Reproducible: Always
### Steps to Reproduce:
n/a
## Comment 22161
Date: 2016-05-23 11:07:53 +0200
From: @hannesmuehleisen
Filed at https://github.com/hannesmuehleisen/MonetDBLite/issues/14
| feature request: please parallelize dbWriteTable imports | https://api.github.com/repos/MonetDB/MonetDB/issues/3949/comments | 0 | 2020-11-30T13:24:21Z | 2024-06-28T07:19:56Z | https://github.com/MonetDB/MonetDB/issues/3949 | 753,475,806 | 3,949 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-10 15:43:23 +0100
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <<bugs-sql>>
Version: 11.21.13 (Jul2015-SP2)
CC: @njnes
Last updated: 2016-03-25 09:59:29 +0100
## Comment 21873
Date: 2016-03-10 15:43:23 +0100
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0
Build Identifier:
When using an third qualifier in a table name (such as sys.sys.table_name) this is accepted by the SQL parser. It should return an error as we do not support a 3-level table name qualifier (as in catalog.schema.table).
Reproducible: Always
### Steps to Reproduce:
1. Start mserver5
2. Start mclient
3. Issue SQL commands:
select * from dependency_types;
-- returns table ouput, so ok
select * from sys.dependency_types;
-- returns table ouput, so ok
select * from sys.sys.dependency_types;
-- returns table output! It should return an error such as next query
select * from sys.sys.sys.dependency_types;
-- returns an error
### Actual Results:
bash-4.3$ mclient
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.22.0 (unreleased), 'demo'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>select * from dependency_types;
+--------------------+----------------------+
| dependency_type_id | dependency_type_name |
+====================+======================+
| 1 | SCHEMA |
| 2 | TABLE |
| 3 | COLUMN |
| 4 | KEY |
| 5 | VIEW |
| 6 | USER |
| 7 | FUNCTION |
| 8 | TRIGGER |
| 9 | OWNER |
| 10 | INDEX |
| 11 | FKEY |
| 12 | SEQUENCE |
| 13 | PROCEDURE |
| 14 | BE_DROPPED |
+--------------------+----------------------+
14 tuples (0.905ms)
sql>-- returns table ouput, so ok
sql>select * from sys.dependency_types;
+--------------------+----------------------+
| dependency_type_id | dependency_type_name |
+====================+======================+
| 1 | SCHEMA |
| 2 | TABLE |
| 3 | COLUMN |
| 4 | KEY |
| 5 | VIEW |
| 6 | USER |
| 7 | FUNCTION |
| 8 | TRIGGER |
| 9 | OWNER |
| 10 | INDEX |
| 11 | FKEY |
| 12 | SEQUENCE |
| 13 | PROCEDURE |
| 14 | BE_DROPPED |
+--------------------+----------------------+
14 tuples (0.560ms)
sql>-- returns table ouput, so ok
sql>
sql>select * from sys.sys.dependency_types;
+--------------------+----------------------+
| dependency_type_id | dependency_type_name |
+====================+======================+
| 1 | SCHEMA |
| 2 | TABLE |
| 3 | COLUMN |
| 4 | KEY |
| 5 | VIEW |
| 6 | USER |
| 7 | FUNCTION |
| 8 | TRIGGER |
| 9 | OWNER |
| 10 | INDEX |
| 11 | FKEY |
| 12 | SEQUENCE |
| 13 | PROCEDURE |
| 14 | BE_DROPPED |
+--------------------+----------------------+
14 tuples (0.654ms)
sql>-- returns table output! It should return an error such as next query
sql>select * from sys.sys.sys.dependency_types;
syntax error, unexpected '.', expecting SCOLON in: "select * from sys.sys.sys."
sql>-- returns an error
sql>
### Expected Results:
query:
select * from sys.sys.dependency_types;
should return an error instead.
See also Bug #2526 (for adding support of: schema.table.column name usage in SQL)
## Comment 21882
Date: 2016-03-13 14:27:23 +0100
From: @njnes
Martin could you add the test? The code now returns an error.
## Comment 21925
Date: 2016-03-17 12:14:53 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [c3f2ee09cf31](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c3f2ee09cf31) 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=c3f2ee09cf31](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c3f2ee09cf31)
Changeset description:
Adding tests for Bug #3948
## Comment 21968
Date: 2016-03-25 09:59:29 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| SQL: select * from sys.sys.table_name; is accepted but should return an error | https://api.github.com/repos/MonetDB/MonetDB/issues/3948/comments | 0 | 2020-11-30T13:24:18Z | 2024-06-27T12:11:09Z | https://github.com/MonetDB/MonetDB/issues/3948 | 753,475,777 | 3,948 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-10 15:08:06 +0100
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <<bugs-sql>>
Version: 11.21.13 (Jul2015-SP2)
CC: @njnes
Last updated: 2016-03-21 13:19:33 +0100
## Comment 21872
Date: 2016-03-10 15:08:06 +0100
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0
Build Identifier:
When a column-expression is aliased, the alias name cannot be used in the WHERE-clause.
However you can use the alias name in the GROUP BY and ORDER BY clauses.
The alias name should be usable in the WHERE-clause of a SQL query (and if possible in FROM and HAVING clauses also).
Reproducible: Always
### Steps to Reproduce:
1. Start mserver5 process
2. Start mclient
3. Execute SQL commands:
CREATE TABLE t_alias (a int NOT NULL, b int NOT NULL, c varchar(10) NOT NULL);
INSERT INTO t_alias (a, b, c) VALUES (1, 10, 'tien');
INSERT INTO t_alias (a, b, c) VALUES (11, 2, 'elf');
SELECT * FROM t_alias ORDER BY 1;
SELECT a AS "A", b AS "B", c AS "C" FROM t_alias ORDER BY 1;
-- column aliases can NOT be used in WHERE clause, see Bug #3947
SELECT a AS "A", b AS "B", c AS "C" FROM t_alias WHERE "A" < "B";
-- SELECT: identifier 'A' unknown
SELECT a AS "A", b * b AS "B", c AS "C" FROM t_alias WHERE "B" >99;
-- SELECT: identifier 'B' unknown
SELECT a AS "A", b AS "B", c AS "C" FROM t_alias WHERE "C" LIKE '%en';
-- SELECT: identifier 'C' unknown
SELECT cast(null as char(1)) AS "CAT", a AS "A", c AS "C" FROM t_alias WHERE "CAT" = 'null';
-- SELECT: identifier 'CAT' unknown
SELECT a AS "A", b AS "B", c AS "C" FROM t_alias WHERE "c" LIKE '%en';
-- column aliases can be used in ORDER BY and GROUP BY clauses
SELECT a AS "A", b AS "B", c AS "C" FROM t_alias ORDER BY "C", "A", "B";
SELECT a*b AS "A*B", c AS "C" FROM t_alias GROUP BY "C", "A*B";
SELECT a*b*b AS "A*B", c AS "C" FROM t_alias GROUP BY "C", "A*B" HAVING "A*B" IS NOT NULL ORDER BY -"A*B";
DROP TABLE t_alias;
### Actual Results:
bash-4.3$ mclient
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.22.0 (unreleased), 'demo'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>CREATE TABLE t_alias (a int NOT NULL, b int NOT NULL, c varchar(10) NOT NULL);
operation successful (19.638ms)
sql>INSERT INTO t_alias (a, b, c) VALUES (1, 10, 'tien');
1 affected row (6.669ms)
sql>INSERT INTO t_alias (a, b, c) VALUES (11, 2, 'elf');
1 affected row (7.273ms)
sql>SELECT * FROM t_alias ORDER BY 1;
+------+------+------+
| a | b | c |
+======+======+======+
| 1 | 10 | tien |
| 11 | 2 | elf |
+------+------+------+
2 tuples (3.425ms)
sql>SELECT a AS "A", b AS "B", c AS "C" FROM t_alias ORDER BY 1;
+------+------+------+
| A | B | C |
+======+======+======+
| 1 | 10 | tien |
| 11 | 2 | elf |
+------+------+------+
2 tuples (1.089ms)
sql>
sql>-- column aliases can NOT be used in WHERE clause, see Bug #3947
sql>SELECT a AS "A", b AS "B", c AS "C" FROM t_alias WHERE "A" < "B";
SELECT: identifier 'A' unknown
sql>-- SELECT: identifier 'A' unknown
sql>SELECT a AS "A", b * b AS "B", c AS "C" FROM t_alias WHERE "B" >99;
SELECT: identifier 'B' unknown
sql>-- SELECT: identifier 'B' unknown
sql>SELECT a AS "A", b AS "B", c AS "C" FROM t_alias WHERE "C" LIKE '%en';
SELECT: identifier 'C' unknown
sql>-- SELECT: identifier 'C' unknown
sql>SELECT cast(null as char(1)) AS "CAT", a AS "A", c AS "C" FROM t_alias WHERE "CAT" = 'null';
SELECT: identifier 'CAT' unknown
sql>-- SELECT: identifier 'CAT' unknown
sql>
sql>SELECT a AS "A", b AS "B", c AS "C" FROM t_alias WHERE "c" LIKE '%en';
+------+------+------+
| A | B | C |
+======+======+======+
| 1 | 10 | tien |
+------+------+------+
1 tuple (2.283ms)
sql>
sql>-- column aliases can be used in ORDER BY and GROUP BY clauses
sql>SELECT a AS "A", b AS "B", c AS "C" FROM t_alias ORDER BY "C", "A", "B";
+------+------+------+
| A | B | C |
+======+======+======+
| 11 | 2 | elf |
| 1 | 10 | tien |
+------+------+------+
2 tuples (1.168ms)
sql>SELECT a*b AS "A*B", c AS "C" FROM t_alias GROUP BY "C", "A*B";
+------+------+
| A*B | C |
+======+======+
| 10 | tien |
| 22 | elf |
+------+------+
2 tuples (1.126ms)
sql>SELECT a*b*b AS "A*B", c AS "C" FROM t_alias GROUP BY "C", "A*B" HAVING "A*B" IS NOT NULL ORDER BY -"A*B";
+------+------+
| A*B | C |
+======+======+
| 100 | tien |
| 44 | elf |
+------+------+
2 tuples (2.152ms)
sql>
sql>DROP TABLE t_alias;
operation successful (4.450ms)
sql>
### Expected Results:
No "SELECT: identifier 'x' unknown" errors, when using alias name in WHERE-clause
## Comment 21883
Date: 2016-03-13 14:31:46 +0100
From: @njnes
The alias name isn't defined in the where part of a sql statement.
## Comment 21926
Date: 2016-03-17 12:42:49 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [8600554f2fb0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8600554f2fb0) 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=8600554f2fb0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=8600554f2fb0)
Changeset description:
Added tests for Bug #3947
## Comment 21927
Date: 2016-03-17 14:14:31 +0100
From: Martin van Dinther <<martin.van.dinther>>
The problem is that the column alias name (for a column-expression in the select clause) can not be used in the where-clause predicates. It returns an error, where it should be possible, like with other RDBMS.
The column alias name can be used in GROUP BY and ORDER BY clauses, so it should also be possible to use the column alias in the WHERE clause.
See desired output of the added column_alias_in_where_clause.Bug-3947.sql test.
## Comment 21934
Date: 2016-03-21 13:19:33 +0100
From: @njnes
this is simply not true. In the where part your refering to the input from the 'from' part of a query. You cannot access any alias as that defined over the result of the where part.
| Column alias name cannot be used in WHERE clause. Fails with: SELECT: identifier 'alias name' unknown | https://api.github.com/repos/MonetDB/MonetDB/issues/3947/comments | 0 | 2020-11-30T13:24:15Z | 2024-06-28T13:13:38Z | https://github.com/MonetDB/MonetDB/issues/3947 | 753,475,745 | 3,947 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-08 11:14:08 +0100
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @eyalroz, martin.van.dinther
Last updated: 2019-04-30 12:36:01 +0200
## Comment 21870
Date: 2016-03-08 11:14:08 +0100
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36
Build Identifier:
SQL provides log (natural log) and log10 (base 10) functions:
sql>select name,func from sys.functions where name like 'log%';
+-------+-------+
| name | func |
+=======+=======+
| log | log |
| log10 | log10 |
| log | log |
| log10 | log10 |
+-------+-------+
Their implementation is a straightforward mapping onto the C library implementation:
unopM5(_LOG,log)
unopM5(_LOG10,log10)
It would be nice to expose the same way "log2" (base 2), which is also available in the C standard library.
This is not very urgent, as one can always write log2(x) = log(x) / log(2). But the log2 implementation is probably faster and since log10 is exposed, it seems logical to also expose log2.
Reproducible: Always
## Comment 21871
Date: 2016-03-10 14:46:43 +0100
From: Martin van Dinther <<martin.van.dinther>>
When implementing this request, also implement function LN(), see Bug #3520
## Comment 24620
Date: 2016-10-24 23:45:06 +0200
From: @eyalroz
Isn't this a dupe of bug #3416?
## Comment 26833
Date: 2019-01-22 12:41:13 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [ac79383ea2ce](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ac79383ea2ce) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=ac79383ea2ce](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=ac79383ea2ce)
Changeset description:
Implemented function log2.
This fixes bug #3946.
| Expose C log2 function to SQL | https://api.github.com/repos/MonetDB/MonetDB/issues/3946/comments | 0 | 2020-11-30T13:24:12Z | 2024-06-27T12:11:07Z | https://github.com/MonetDB/MonetDB/issues/3946 | 753,475,703 | 3,946 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-07 23:14:12 +0100
From: Pierre Coustillas <<pcoustillas>>
To: SQL devs <<bugs-sql>>
Version: 11.21.13 (Jul2015-SP2)
CC: @njnes
Last updated: 2016-03-15 00:25:34 +0100
## Comment 21869
Date: 2016-03-07 23:14:12 +0100
From: Pierre Coustillas <<pcoustillas>>
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0
Build Identifier:
Environment : debian 8 / proxmox 4
Reproducible: Always
### Steps to Reproduce:
1. mclient lemonde
2. execute query :
INSERT INTO io__selection_top (id_unique,id_navigateur,top_client_connu,assiduite)
SELECT
seg.id_unique AS id_unique,
(CASE WHEN (nav.id_navigateur IS NULL) THEN 0 ELSE nav.id_navigateur END) AS id_navigateur,
1 AS top_client_connu,
(CASE WHEN (seg.intensite IS NULL) THEN 'Non visiteur' ELSE intensite END) AS assiduite
FROM segmentation__sortie__lm_transcodee AS seg
LEFT JOIN bdm__index_client_cookies_id_navigateur AS nav ON nav.id_unique=seg.id_unique
> 116322309 affected rows (4m 38s)
root@rd:/home/pcoustillas gdb mserver5 23457
GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from mserver5...(no debugging symbols found)...done.
Attaching to program: /usr/bin/mserver5, process 23457
Reading symbols from /usr/lib/libmonetdb5.so.19...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libmonetdb5.so.19
Reading symbols from /usr/lib/libbat.so.12...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libbat.so.12
Reading symbols from /usr/lib/libmapi.so.7...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libmapi.so.7
Reading symbols from /lib/x86_64-linux-gnu/libuuid.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libuuid.so.1
Reading symbols from /lib/x86_64-linux-gnu/libreadline.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libreadline.so.5
Reading symbols from /usr/lib/x86_64-linux-gnu/libxml2.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libxml2.so.2
Reading symbols from /usr/lib/libstream.so.7...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libstream.so.7
Reading symbols from /lib/x86_64-linux-gnu/libm.so.6...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libm-2.19.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libm.so.6
Reading symbols from /lib/x86_64-linux-gnu/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libz.so.1
Reading symbols from /lib/x86_64-linux-gnu/libbz2.so.1.0...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libbz2.so.1.0
Reading symbols from /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4
Reading symbols from /lib/x86_64-linux-gnu/libpcre.so.3...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libpcre.so.3
Reading symbols from /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
Reading symbols from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
Reading symbols from /lib/x86_64-linux-gnu/libdl.so.2...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libdl-2.19.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libdl.so.2
Reading symbols from /lib/x86_64-linux-gnu/libpthread.so.0...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libpthread-2.19.so...done.
done.
[New LWP 24707]
[New LWP 24706]
[New LWP 24705]
[New LWP 24704]
[New LWP 24703]
[New LWP 24702]
[New LWP 24701]
[New LWP 24700]
[New LWP 24699]
[New LWP 24698]
[New LWP 24697]
[New LWP 24696]
[New LWP 24694]
[New LWP 24693]
[New LWP 24692]
[New LWP 24691]
[New LWP 24577]
[New LWP 23459]
[New LWP 23458]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Loaded symbols for /lib/x86_64-linux-gnu/libpthread.so.0
Reading symbols from /lib/x86_64-linux-gnu/libc.so.6...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libc-2.19.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/ld-2.19.so...done.
done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib/x86_64-linux-gnu/libtinfo.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libtinfo.so.5
Reading symbols from /lib/x86_64-linux-gnu/liblzma.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/liblzma.so.5
Reading symbols from /usr/lib/x86_64-linux-gnu/libidn.so.11...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libidn.so.11
Reading symbols from /usr/lib/x86_64-linux-gnu/librtmp.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/librtmp.so.1
Reading symbols from /usr/lib/x86_64-linux-gnu/libssh2.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libssh2.so.1
Reading symbols from /usr/lib/x86_64-linux-gnu/libnettle.so.4...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libnettle.so.4
Reading symbols from /usr/lib/x86_64-linux-gnu/libgnutls-deb0.so.28...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libgnutls-deb0.so.28
Reading symbols from /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
Reading symbols from /usr/lib/x86_64-linux-gnu/libkrb5.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libkrb5.so.3
Reading symbols from /usr/lib/x86_64-linux-gnu/libk5crypto.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libk5crypto.so.3
Reading symbols from /lib/x86_64-linux-gnu/libcom_err.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libcom_err.so.2
Reading symbols from /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2
Reading symbols from /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2
Reading symbols from /usr/lib/x86_64-linux-gnu/libhogweed.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libhogweed.so.2
Reading symbols from /usr/lib/x86_64-linux-gnu/libgmp.so.10...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libgmp.so.10
Reading symbols from /lib/x86_64-linux-gnu/libgcrypt.so.20...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libgcrypt.so.20
Reading symbols from /usr/lib/x86_64-linux-gnu/libp11-kit.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libp11-kit.so.0
Reading symbols from /usr/lib/x86_64-linux-gnu/libtasn1.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libtasn1.so.6
Reading symbols from /usr/lib/x86_64-linux-gnu/libkrb5support.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libkrb5support.so.0
Reading symbols from /lib/x86_64-linux-gnu/libkeyutils.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libkeyutils.so.1
Reading symbols from /lib/x86_64-linux-gnu/libresolv.so.2...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libresolv-2.19.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libresolv.so.2
Reading symbols from /usr/lib/x86_64-linux-gnu/libsasl2.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libsasl2.so.2
Reading symbols from /lib/x86_64-linux-gnu/libgpg-error.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libgpg-error.so.0
Reading symbols from /usr/lib/x86_64-linux-gnu/libffi.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libffi.so.6
Reading symbols from /usr/lib/monetdb5/lib_sql.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/monetdb5/lib_sql.so
Reading symbols from /usr/lib/monetdb5/lib_lsst.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/monetdb5/lib_lsst.so
Reading symbols from /usr/lib/monetdb5/lib_udf.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/monetdb5/lib_udf.so
Reading symbols from /usr/lib/monetdb5/lib_generator.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/monetdb5/lib_generator.so
Reading symbols from /usr/lib/monetdb5/lib_opt_sql_append.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/monetdb5/lib_opt_sql_append.so
0x00007fe016f1fae3 in select () at ../sysdeps/unix/syscall-template.S:81
81 ../sysdeps/unix/syscall-template.S: Aucun fichier ou dossier de ce type.
(gdb) cont
Continuing.
[New Thread 0x7fe011a8f700 (LWP 24782)]
[Thread 0x7fe01148c700 (LWP 24698) exited]
[New Thread 0x7fe01148c700 (LWP 24806)]
[Thread 0x7fe01168d700 (LWP 24697) exited]
[New Thread 0x7fe01168d700 (LWP 24850)]
[Thread 0x7fe010283700 (LWP 24707) exited]
[New Thread 0x7fe003fff700 (LWP 25018)]
[New Thread 0x7fe003dfe700 (LWP 25147)]
[Thread 0x7fe003dfe700 (LWP 25147) exited]
[New Thread 0x7fe003dfe700 (LWP 25170)]
[New Thread 0x7fe003bfd700 (LWP 25171)]
[Thread 0x7fe003dfe700 (LWP 25170) exited]
[Thread 0x7fe003bfd700 (LWP 25171) exited]
[New Thread 0x7fe003dfe700 (LWP 25194)]
[Thread 0x7fe003dfe700 (LWP 25194) exited]
[New Thread 0x7fe003dfe700 (LWP 25195)]
[New Thread 0x7fe003bfd700 (LWP 25196)]
[Thread 0x7fe003dfe700 (LWP 25195) exited]
[New Thread 0x7fe003dfe700 (LWP 25219)]
[Thread 0x7fe003bfd700 (LWP 25196) exited]
[New Thread 0x7fe003bfd700 (LWP 25220)]
[Thread 0x7fe003dfe700 (LWP 25219) exited]
[Thread 0x7fe003bfd700 (LWP 25220) exited]
[New Thread 0x7fe003dfe700 (LWP 25221)]
[New Thread 0x7fe003bfd700 (LWP 25222)]
[Thread 0x7fe003dfe700 (LWP 25221) exited]
[Thread 0x7fe003bfd700 (LWP 25222) exited]
[New Thread 0x7fe003dfe700 (LWP 25223)]
[Thread 0x7fe003fff700 (LWP 25018) exited]
[Thread 0x7fe003dfe700 (LWP 25223) exited]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fe012494700 (LWP 24577)]
0x00007fe012fe5343 in ?? () from /usr/lib/monetdb5/lib_sql.so
(gdb) bt
0 0x00007fe012fe5343 in ?? () from /usr/lib/monetdb5/lib_sql.so
1 0x00007fe012fe578b in ?? () from /usr/lib/monetdb5/lib_sql.so
2 0x00007fe012fd3c0c in store_manager () from /usr/lib/monetdb5/lib_sql.so
3 0x00007fe012f709a5 in mvc_logmanager () from /usr/lib/monetdb5/lib_sql.so
4 0x00007fe0196b4dcf in ?? () from /usr/lib/libbat.so.12
5 0x00007fe0171f10a4 in start_thread (arg=0x7fe012494700) at pthread_create.c:309
6 0x00007fe016f2687d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
(gdb) thr app all bt
Thread 23 (Thread 0x7fe01168d700 (LWP 24850)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007fe019bc8730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007fe0171f10a4 in start_thread (arg=0x7fe01168d700) at pthread_create.c:309
3 0x00007fe016f2687d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 22 (Thread 0x7fe01148c700 (LWP 24806)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007fe019bc8730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007fe0171f10a4 in start_thread (arg=0x7fe01148c700) at pthread_create.c:309
3 0x00007fe016f2687d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 21 (Thread 0x7fe011a8f700 (LWP 24782)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007fe019bc8730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007fe0171f10a4 in start_thread (arg=0x7fe011a8f700) at pthread_create.c:309
3 0x00007fe016f2687d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 20 (Thread 0x7fe013491700 (LWP 23458)):
0 0x00007fe016f1fae3 in select () at ../sysdeps/unix/syscall-template.S:81
1 0x00007fe0196b61e9 in MT_sleep_ms () from /usr/lib/libbat.so.12
2 0x00007fe019bdc51f in ?? () from /usr/lib/libmonetdb5.so.19
3 0x00007fe0171f10a4 in start_thread (arg=0x7fe013491700) at pthread_create.c:309
4 0x00007fe016f2687d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 19 (Thread 0x7fe012695700 (LWP 23459)):
0 0x00007fe016f1fae3 in select () at ../sysdeps/unix/syscall-template.S:81
1 0x00007fe019c85c53 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007fe0196b4dcf in ?? () from /usr/lib/libbat.so.12
3 0x00007fe0171f10a4 in start_thread (arg=0x7fe012695700) at pthread_create.c:309
4 0x00007fe016f2687d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 18 (Thread 0x7fe012494700 (LWP 24577)):
0 0x00007fe012fe5343 in ?? () from /usr/lib/monetdb5/lib_sql.so
1 0x00007fe012fe578b in ?? () from /usr/lib/monetdb5/lib_sql.so
2 0x00007fe012fd3c0c in store_manager () from /usr/lib/monetdb5/lib_sql.so
3 0x00007fe012f709a5 in mvc_logmanager () from /usr/lib/monetdb5/lib_sql.so
4 0x00007fe0196b4dcf in ?? () from /usr/lib/libbat.so.12
5 0x00007fe0171f10a4 in start_thread (arg=0x7fe012494700) at pthread_create.c:309
6 0x00007fe016f2687d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 17 (Thread 0x7fe012293700 (LWP 24691)):
0 0x00007fe016f1fae3 in select () at ../sysdeps/unix/syscall-template.S:81
1 0x00007fe01886fa73 in ?? () from /usr/lib/libstream.so.7
2 0x00007fe018873543 in mnstr_readSht () from /usr/lib/libstream.so.7
3 0x00007fe018873722 in ?? () from /usr/lib/libstream.so.7
4 0x00007fe018874abb in bstream_read () from /usr/lib/libstream.so.7
5 0x00007fe012eeb627 in SQLreader () from /usr/lib/monetdb5/lib_sql.so
6 0x00007fe019be2163 in ?? () from /usr/lib/libmonetdb5.so.19
7 0x00007fe019be2edd in runScenario () from /usr/lib/libmonetdb5.so.19
8 0x00007fe019be3368 in MSserveClient () from /usr/lib/libmonetdb5.so.19
9 0x00007fe019be395f in MSscheduleClient () from /usr/lib/libmonetdb5.so.19
10 0x00007fe019c859d6 in ?? () from /usr/lib/libmonetdb5.so.19
11 0x00007fe0196b4dcf in ?? () from /usr/lib/libbat.so.12
12 0x00007fe0171f10a4 in start_thread (arg=0x7fe012293700) at pthread_create.c:309
13 0x00007fe016f2687d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 16 (Thread 0x7fe012092700 (LWP 24692)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007fe019bc8730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007fe0171f10a4 in start_thread (arg=0x7fe012092700) at pthread_create.c:309
---Type <return> to continue, or q <return> to quit---
3 0x00007fe016f2687d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 15 (Thread 0x7fe011e91700 (LWP 24693)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007fe019bc8730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007fe0171f10a4 in start_thread (arg=0x7fe011e91700) at pthread_create.c:309
3 0x00007fe016f2687d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 14 (Thread 0x7fe011c90700 (LWP 24694)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007fe019bc8730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007fe0171f10a4 in start_thread (arg=0x7fe011c90700) at pthread_create.c:309
3 0x00007fe016f2687d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 13 (Thread 0x7fe01188e700 (LWP 24696)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007fe019bc8730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007fe0171f10a4 in start_thread (arg=0x7fe01188e700) at pthread_create.c:309
3 0x00007fe016f2687d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 10 (Thread 0x7fe01128b700 (LWP 24699)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007fe019bc8730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007fe0171f10a4 in start_thread (arg=0x7fe01128b700) at pthread_create.c:309
3 0x00007fe016f2687d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 9 (Thread 0x7fe01108a700 (LWP 24700)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007fe019bc8730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007fe0171f10a4 in start_thread (arg=0x7fe01108a700) at pthread_create.c:309
3 0x00007fe016f2687d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 8 (Thread 0x7fe010e89700 (LWP 24701)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007fe019bc8730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007fe0171f10a4 in start_thread (arg=0x7fe010e89700) at pthread_create.c:309
3 0x00007fe016f2687d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 7 (Thread 0x7fe010c88700 (LWP 24702)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007fe019bc8730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007fe0171f10a4 in start_thread (arg=0x7fe010c88700) at pthread_create.c:309
3 0x00007fe016f2687d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 6 (Thread 0x7fe010a87700 (LWP 24703)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007fe019bc8730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007fe0171f10a4 in start_thread (arg=0x7fe010a87700) at pthread_create.c:309
3 0x00007fe016f2687d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 5 (Thread 0x7fe010886700 (LWP 24704)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007fe019bc8730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007fe0171f10a4 in start_thread (arg=0x7fe010886700) at pthread_create.c:309
3 0x00007fe016f2687d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 4 (Thread 0x7fe010685700 (LWP 24705)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007fe019bc8730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007fe0171f10a4 in start_thread (arg=0x7fe010685700) at pthread_create.c:309
3 0x00007fe016f2687d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
---Type <return> to continue, or q <return> to quit---
Thread 3 (Thread 0x7fe010484700 (LWP 24706)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007fe019bc8730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007fe0171f10a4 in start_thread (arg=0x7fe010484700) at pthread_create.c:309
3 0x00007fe016f2687d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 1 (Thread 0x7fe01a1d8780 (LWP 23457)):
0 0x00007fe016f1fae3 in select () at ../sysdeps/unix/syscall-template.S:81
1 0x00007fe0196b61e9 in MT_sleep_ms () from /usr/lib/libbat.so.12
2 0x0000000000402992 in main ()
## Comment 21887
Date: 2016-03-13 20:07:38 +0100
From: @njnes
we need more details to solve this problem.
## Comment 21906
Date: 2016-03-15 00:25:34 +0100
From: Pierre Coustillas <<pcoustillas>>
Since I removed the table "a" to the bug disappeared. Referring to bug #3944 (https://www.monetdb.org/bugzilla/show_bug.cgi?id=3944)
Strange
The bug can be closed
| server crashed on INSERT INTO ... SELECT | https://api.github.com/repos/MonetDB/MonetDB/issues/3945/comments | 0 | 2020-11-30T13:24:08Z | 2024-06-27T12:11:06Z | https://github.com/MonetDB/MonetDB/issues/3945 | 753,475,664 | 3,945 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-07 22:51:48 +0100
From: Pierre Coustillas <<pcoustillas>>
To: SQL devs <<bugs-sql>>
Version: 11.21.13 (Jul2015-SP2)
CC: @njnes
Last updated: 2016-03-14 23:28:38 +0100
## Comment 21868
Date: 2016-03-07 22:51:48 +0100
From: Pierre Coustillas <<pcoustillas>>
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0
Build Identifier:
database 'lemonde' (20766) was killed by signal SIGSEGV
Environment : debian 8, proxmox 4
Reproducible: Always
### Steps to Reproduce:
1. mclient lemonde
2. \D
root@rd:/home/pcoustillas gdb mserver5 21010
GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from mserver5...(no debugging symbols found)...done.
Attaching to program: /usr/bin/mserver5, process 21010
Reading symbols from /usr/lib/libmonetdb5.so.19...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libmonetdb5.so.19
Reading symbols from /usr/lib/libbat.so.12...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libbat.so.12
Reading symbols from /usr/lib/libmapi.so.7...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libmapi.so.7
Reading symbols from /lib/x86_64-linux-gnu/libuuid.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libuuid.so.1
Reading symbols from /lib/x86_64-linux-gnu/libreadline.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libreadline.so.5
Reading symbols from /usr/lib/x86_64-linux-gnu/libxml2.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libxml2.so.2
Reading symbols from /usr/lib/libstream.so.7...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libstream.so.7
Reading symbols from /lib/x86_64-linux-gnu/libm.so.6...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libm-2.19.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libm.so.6
Reading symbols from /lib/x86_64-linux-gnu/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libz.so.1
Reading symbols from /lib/x86_64-linux-gnu/libbz2.so.1.0...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libbz2.so.1.0
Reading symbols from /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4
Reading symbols from /lib/x86_64-linux-gnu/libpcre.so.3...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libpcre.so.3
Reading symbols from /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
Reading symbols from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
Reading symbols from /lib/x86_64-linux-gnu/libdl.so.2...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libdl-2.19.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libdl.so.2
Reading symbols from /lib/x86_64-linux-gnu/libpthread.so.0...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libpthread-2.19.so...done.
done.
[New LWP 21030]
[New LWP 21029]
[New LWP 21028]
[New LWP 21027]
[New LWP 21026]
[New LWP 21025]
[New LWP 21024]
[New LWP 21023]
[New LWP 21022]
[New LWP 21021]
[New LWP 21020]
[New LWP 21019]
[New LWP 21018]
[New LWP 21017]
[New LWP 21016]
[New LWP 21014]
[New LWP 21013]
[New LWP 21012]
[New LWP 21011]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Loaded symbols for /lib/x86_64-linux-gnu/libpthread.so.0
Reading symbols from /lib/x86_64-linux-gnu/libc.so.6...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libc-2.19.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/ld-2.19.so...done.
done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib/x86_64-linux-gnu/libtinfo.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libtinfo.so.5
Reading symbols from /lib/x86_64-linux-gnu/liblzma.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/liblzma.so.5
Reading symbols from /usr/lib/x86_64-linux-gnu/libidn.so.11...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libidn.so.11
Reading symbols from /usr/lib/x86_64-linux-gnu/librtmp.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/librtmp.so.1
Reading symbols from /usr/lib/x86_64-linux-gnu/libssh2.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libssh2.so.1
Reading symbols from /usr/lib/x86_64-linux-gnu/libnettle.so.4...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libnettle.so.4
Reading symbols from /usr/lib/x86_64-linux-gnu/libgnutls-deb0.so.28...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libgnutls-deb0.so.28
Reading symbols from /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
Reading symbols from /usr/lib/x86_64-linux-gnu/libkrb5.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libkrb5.so.3
Reading symbols from /usr/lib/x86_64-linux-gnu/libk5crypto.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libk5crypto.so.3
Reading symbols from /lib/x86_64-linux-gnu/libcom_err.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libcom_err.so.2
Reading symbols from /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2
Reading symbols from /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2
Reading symbols from /usr/lib/x86_64-linux-gnu/libhogweed.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libhogweed.so.2
Reading symbols from /usr/lib/x86_64-linux-gnu/libgmp.so.10...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libgmp.so.10
Reading symbols from /lib/x86_64-linux-gnu/libgcrypt.so.20...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libgcrypt.so.20
Reading symbols from /usr/lib/x86_64-linux-gnu/libp11-kit.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libp11-kit.so.0
Reading symbols from /usr/lib/x86_64-linux-gnu/libtasn1.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libtasn1.so.6
Reading symbols from /usr/lib/x86_64-linux-gnu/libkrb5support.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libkrb5support.so.0
Reading symbols from /lib/x86_64-linux-gnu/libkeyutils.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libkeyutils.so.1
Reading symbols from /lib/x86_64-linux-gnu/libresolv.so.2...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libresolv-2.19.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libresolv.so.2
Reading symbols from /usr/lib/x86_64-linux-gnu/libsasl2.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libsasl2.so.2
Reading symbols from /lib/x86_64-linux-gnu/libgpg-error.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libgpg-error.so.0
Reading symbols from /usr/lib/x86_64-linux-gnu/libffi.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libffi.so.6
Reading symbols from /usr/lib/monetdb5/lib_sql.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/monetdb5/lib_sql.so
Reading symbols from /usr/lib/monetdb5/lib_lsst.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/monetdb5/lib_lsst.so
Reading symbols from /usr/lib/monetdb5/lib_udf.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/monetdb5/lib_udf.so
Reading symbols from /usr/lib/monetdb5/lib_generator.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/monetdb5/lib_generator.so
Reading symbols from /usr/lib/monetdb5/lib_opt_sql_append.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/monetdb5/lib_opt_sql_append.so
0x00007f7212511ae3 in select () at ../sysdeps/unix/syscall-template.S:81
81 ../sysdeps/unix/syscall-template.S: Aucun fichier ou dossier de ce type.
(gdb)
(gdb)
(gdb) cont
Continuing.
[New Thread 0x7f720d584700 (LWP 21081)]
[Thread 0x7f720c37b700 (LWP 21024) exited]
[New Thread 0x7f720c37b700 (LWP 21082)]
[Thread 0x7f71ef9fc700 (LWP 21028) exited]
[New Thread 0x7f71ef9fc700 (LWP 21083)]
[Thread 0x7f720c77d700 (LWP 21022) exited]
[New Thread 0x7f720c77d700 (LWP 21084)]
[Thread 0x7f71effff700 (LWP 21025) exited]
[New Thread 0x7f71effff700 (LWP 21085)]
[Thread 0x7f720cd80700 (LWP 21019) exited]
[New Thread 0x7f720cd80700 (LWP 21086)]
[Thread 0x7f720c77d700 (LWP 21084) exited]
[New Thread 0x7f720c77d700 (LWP 21087)]
[Thread 0x7f71efdfe700 (LWP 21026) exited]
[New Thread 0x7f71efdfe700 (LWP 21088)]
[Thread 0x7f720cd80700 (LWP 21086) exited]
[New Thread 0x7f720cd80700 (LWP 21089)]
[Thread 0x7f71efbfd700 (LWP 21027) exited]
[New Thread 0x7f71efbfd700 (LWP 21090)]
[Thread 0x7f720cd80700 (LWP 21089) exited]
[New Thread 0x7f720cd80700 (LWP 21091)]
[Thread 0x7f720d182700 (LWP 21017) exited]
[New Thread 0x7f720d182700 (LWP 21092)]
[Thread 0x7f720c97e700 (LWP 21021) exited]
[New Thread 0x7f720c97e700 (LWP 21093)]
[Thread 0x7f720d584700 (LWP 21081) exited]
[New Thread 0x7f720d584700 (LWP 21094)]
[Thread 0x7f720c77d700 (LWP 21087) exited]
[New Thread 0x7f720c77d700 (LWP 21095)]
[Thread 0x7f720c37b700 (LWP 21082) exited]
[New Thread 0x7f720c37b700 (LWP 21096)]
[Thread 0x7f720c77d700 (LWP 21095) exited]
[New Thread 0x7f720c77d700 (LWP 21097)]
[Thread 0x7f71efdfe700 (LWP 21088) exited]
[New Thread 0x7f71efdfe700 (LWP 21098)]
[Thread 0x7f720d584700 (LWP 21094) exited]
[New Thread 0x7f720d584700 (LWP 21099)]
[Thread 0x7f71efdfe700 (LWP 21098) exited]
[New Thread 0x7f71efdfe700 (LWP 21100)]
[Thread 0x7f720c57c700 (LWP 21023) exited]
[New Thread 0x7f720c57c700 (LWP 21101)]
[Thread 0x7f720d383700 (LWP 21016) exited]
[New Thread 0x7f720d383700 (LWP 21102)]
[Thread 0x7f720c77d700 (LWP 21097) exited]
[New Thread 0x7f720c77d700 (LWP 21103)]
[Thread 0x7f71ef9fc700 (LWP 21083) exited]
[New Thread 0x7f71ef9fc700 (LWP 21104)]
[Thread 0x7f720d584700 (LWP 21099) exited]
[New Thread 0x7f720d584700 (LWP 21105)]
[Thread 0x7f71ef9fc700 (LWP 21104) exited]
[New Thread 0x7f71ef9fc700 (LWP 21106)]
[Thread 0x7f720d182700 (LWP 21092) exited]
[New Thread 0x7f720d182700 (LWP 21107)]
[Thread 0x7f71ef9fc700 (LWP 21106) exited]
[New Thread 0x7f71ef9fc700 (LWP 21108)]
[Thread 0x7f720c97e700 (LWP 21093) exited]
[New Thread 0x7f720c97e700 (LWP 21109)]
[Thread 0x7f720c77d700 (LWP 21103) exited]
[New Thread 0x7f720c77d700 (LWP 21110)]
[Thread 0x7f720c97e700 (LWP 21109) exited]
[New Thread 0x7f720c97e700 (LWP 21111)]
[Thread 0x7f71efdfe700 (LWP 21100) exited]
[New Thread 0x7f71efdfe700 (LWP 21112)]
[Thread 0x7f720c77d700 (LWP 21110) exited]
[New Thread 0x7f720c77d700 (LWP 21113)]
[Thread 0x7f71efbfd700 (LWP 21090) exited]
[New Thread 0x7f71efbfd700 (LWP 21114)]
[Thread 0x7f720c37b700 (LWP 21096) exited]
[New Thread 0x7f720c37b700 (LWP 21115)]
[Thread 0x7f71ef5fa700 (LWP 21030) exited]
[New Thread 0x7f71ef5fa700 (LWP 21116)]
[Thread 0x7f720c37b700 (LWP 21115) exited]
[New Thread 0x7f720c37b700 (LWP 21117)]
[Thread 0x7f720cf81700 (LWP 21018) exited]
[New Thread 0x7f720cf81700 (LWP 21118)]
[Thread 0x7f71effff700 (LWP 21085) exited]
[New Thread 0x7f71effff700 (LWP 21119)]
[Thread 0x7f720d182700 (LWP 21107) exited]
[New Thread 0x7f720d182700 (LWP 21120)]
[Thread 0x7f720d383700 (LWP 21102) exited]
[New Thread 0x7f720d383700 (LWP 21121)]
[Thread 0x7f720cd80700 (LWP 21091) exited]
[New Thread 0x7f720cd80700 (LWP 21122)]
[Thread 0x7f71effff700 (LWP 21119) exited]
[New Thread 0x7f71effff700 (LWP 21123)]
[Thread 0x7f71ef5fa700 (LWP 21116) exited]
[New Thread 0x7f71ef5fa700 (LWP 21124)]
[Thread 0x7f720cf81700 (LWP 21118) exited]
[New Thread 0x7f720cf81700 (LWP 21125)]
[Thread 0x7f71effff700 (LWP 21123) exited]
[New Thread 0x7f71effff700 (LWP 21126)]
[Thread 0x7f720c97e700 (LWP 21111) exited]
[New Thread 0x7f720c97e700 (LWP 21127)]
[Thread 0x7f720c57c700 (LWP 21101) exited]
[New Thread 0x7f720c57c700 (LWP 21128)]
[Thread 0x7f71effff700 (LWP 21126) exited]
[New Thread 0x7f71effff700 (LWP 21129)]
[Thread 0x7f720c57c700 (LWP 21128) exited]
[New Thread 0x7f720c57c700 (LWP 21130)]
[Thread 0x7f720cb7f700 (LWP 21020) exited]
[New Thread 0x7f720cb7f700 (LWP 21131)]
[Thread 0x7f720cd80700 (LWP 21122) exited]
[New Thread 0x7f720cd80700 (LWP 21132)]
[Thread 0x7f720d584700 (LWP 21105) exited]
[New Thread 0x7f720d584700 (LWP 21133)]
[Thread 0x7f720c37b700 (LWP 21117) exited]
[New Thread 0x7f720c37b700 (LWP 21134)]
[Thread 0x7f71efdfe700 (LWP 21112) exited]
[New Thread 0x7f71efdfe700 (LWP 21135)]
[Thread 0x7f71ef9fc700 (LWP 21108) exited]
[New Thread 0x7f71ef9fc700 (LWP 21136)]
[Thread 0x7f720c37b700 (LWP 21134) exited]
[New Thread 0x7f720c37b700 (LWP 21137)]
[Thread 0x7f71ef9fc700 (LWP 21136) exited]
[New Thread 0x7f71ef9fc700 (LWP 21138)]
[Thread 0x7f720cd80700 (LWP 21132) exited]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f720d885700 (LWP 21014)]
0x00007f720e5da0da in ?? () from /usr/lib/monetdb5/lib_sql.so
(gdb) thr app all bt
Thread 78 (Thread 0x7f71ef9fc700 (LWP 21138)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007f72151ba730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007f72127e30a4 in start_thread (arg=0x7f71ef9fc700) at pthread_create.c:309
3 0x00007f721251887d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 77 (Thread 0x7f720c37b700 (LWP 21137)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007f72151ba730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007f72127e30a4 in start_thread (arg=0x7f720c37b700) at pthread_create.c:309
3 0x00007f721251887d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 75 (Thread 0x7f71efdfe700 (LWP 21135)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007f72151ba730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007f72127e30a4 in start_thread (arg=0x7f71efdfe700) at pthread_create.c:309
3 0x00007f721251887d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 73 (Thread 0x7f720d584700 (LWP 21133)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007f72151ba730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007f72127e30a4 in start_thread (arg=0x7f720d584700) at pthread_create.c:309
3 0x00007f721251887d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 71 (Thread 0x7f720cb7f700 (LWP 21131)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007f72151ba730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007f72127e30a4 in start_thread (arg=0x7f720cb7f700) at pthread_create.c:309
3 0x00007f721251887d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 70 (Thread 0x7f720c57c700 (LWP 21130)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007f72151ba730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007f72127e30a4 in start_thread (arg=0x7f720c57c700) at pthread_create.c:309
3 0x00007f721251887d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 69 (Thread 0x7f71effff700 (LWP 21129)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007f72151ba730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007f72127e30a4 in start_thread (arg=0x7f71effff700) at pthread_create.c:309
3 0x00007f721251887d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 67 (Thread 0x7f720c97e700 (LWP 21127)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007f72151ba730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007f72127e30a4 in start_thread (arg=0x7f720c97e700) at pthread_create.c:309
3 0x00007f721251887d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 65 (Thread 0x7f720cf81700 (LWP 21125)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007f72151ba730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007f72127e30a4 in start_thread (arg=0x7f720cf81700) at pthread_create.c:309
3 0x00007f721251887d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 64 (Thread 0x7f71ef5fa700 (LWP 21124)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007f72151ba730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007f72127e30a4 in start_thread (arg=0x7f71ef5fa700) at pthread_create.c:309
3 0x00007f721251887d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 61 (Thread 0x7f720d383700 (LWP 21121)):
---Type <return> to continue, or q <return> to quit---
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007f72151ba730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007f72127e30a4 in start_thread (arg=0x7f720d383700) at pthread_create.c:309
3 0x00007f721251887d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 60 (Thread 0x7f720d182700 (LWP 21120)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007f72151ba730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007f72127e30a4 in start_thread (arg=0x7f720d182700) at pthread_create.c:309
3 0x00007f721251887d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 54 (Thread 0x7f71efbfd700 (LWP 21114)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007f72151ba730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007f72127e30a4 in start_thread (arg=0x7f71efbfd700) at pthread_create.c:309
3 0x00007f721251887d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 53 (Thread 0x7f720c77d700 (LWP 21113)):
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007f72151ba730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007f72127e30a4 in start_thread (arg=0x7f720c77d700) at pthread_create.c:309
3 0x00007f721251887d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 20 (Thread 0x7f720ea83700 (LWP 21011)):
0 0x00007f7212511ae3 in select () at ../sysdeps/unix/syscall-template.S:81
1 0x00007f7214ca81e9 in MT_sleep_ms () from /usr/lib/libbat.so.12
2 0x00007f72151ce51f in ?? () from /usr/lib/libmonetdb5.so.19
3 0x00007f72127e30a4 in start_thread (arg=0x7f720ea83700) at pthread_create.c:309
4 0x00007f721251887d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 19 (Thread 0x7f720dc87700 (LWP 21012)):
0 0x00007f7212511ae3 in select () at ../sysdeps/unix/syscall-template.S:81
1 0x00007f7215277c53 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007f7214ca6dcf in ?? () from /usr/lib/libbat.so.12
3 0x00007f72127e30a4 in start_thread (arg=0x7f720dc87700) at pthread_create.c:309
4 0x00007f721251887d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 18 (Thread 0x7f720da86700 (LWP 21013)):
0 0x00007f7212511ae3 in select () at ../sysdeps/unix/syscall-template.S:81
1 0x00007f7214ca81e9 in MT_sleep_ms () from /usr/lib/libbat.so.12
2 0x00007f720e5c5b0f in store_manager () from /usr/lib/monetdb5/lib_sql.so
3 0x00007f720e5629a5 in mvc_logmanager () from /usr/lib/monetdb5/lib_sql.so
4 0x00007f7214ca6dcf in ?? () from /usr/lib/libbat.so.12
5 0x00007f72127e30a4 in start_thread (arg=0x7f720da86700) at pthread_create.c:309
6 0x00007f721251887d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 17 (Thread 0x7f720d885700 (LWP 21014)):
0 0x00007f720e5da0da in ?? () from /usr/lib/monetdb5/lib_sql.so
1 0x00007f720e500901 in addOptimizers () from /usr/lib/monetdb5/lib_sql.so
2 0x00007f720e500dae in addQueryToCache () from /usr/lib/monetdb5/lib_sql.so
3 0x00007f720e5000a3 in backend_dumpproc () from /usr/lib/monetdb5/lib_sql.so
4 0x00007f720e4de471 in SQLparser () from /usr/lib/monetdb5/lib_sql.so
5 0x00007f72151d4229 in ?? () from /usr/lib/libmonetdb5.so.19
6 0x00007f72151d4edd in runScenario () from /usr/lib/libmonetdb5.so.19
7 0x00007f72151d5368 in MSserveClient () from /usr/lib/libmonetdb5.so.19
8 0x00007f72151d595f in MSscheduleClient () from /usr/lib/libmonetdb5.so.19
9 0x00007f72152779d6 in ?? () from /usr/lib/libmonetdb5.so.19
10 0x00007f7214ca6dcf in ?? () from /usr/lib/libbat.so.12
11 0x00007f72127e30a4 in start_thread (arg=0x7f720d885700) at pthread_create.c:309
12 0x00007f721251887d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 3 (Thread 0x7f71ef7fb700 (LWP 21029)):
---Type <return> to continue, or q <return> to quit---
0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
1 0x00007f72151ba730 in ?? () from /usr/lib/libmonetdb5.so.19
2 0x00007f72127e30a4 in start_thread (arg=0x7f71ef7fb700) at pthread_create.c:309
3 0x00007f721251887d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 1 (Thread 0x7f72157ca780 (LWP 21010)):
0 0x00007f7212511ae3 in select () at ../sysdeps/unix/syscall-template.S:81
1 0x00007f7214ca81e9 in MT_sleep_ms () from /usr/lib/libbat.so.12
2 0x0000000000402992 in main ()
## Comment 21888
Date: 2016-03-13 20:08:19 +0100
From: @njnes
we need more info to be able to fix this problem.
## Comment 21905
Date: 2016-03-14 23:28:38 +0100
From: Pierre Coustillas <<pcoustillas>>
I identified the table that bug when I make a full dump (\D or msqldump lemonde). :
CREATE TABLE "sys"."un" (
"aaa" INTEGER
);
without data
I deleted the table. The bug disappears
Strange
| database crashed : SIGSEGV on simple query \D | https://api.github.com/repos/MonetDB/MonetDB/issues/3944/comments | 0 | 2020-11-30T13:24:05Z | 2024-06-27T12:11:05Z | https://github.com/MonetDB/MonetDB/issues/3944 | 753,475,634 | 3,944 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-03 15:26:25 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.19 (Jul2015-SP4)
CC: ajdamico
Last updated: 2016-05-23 11:21:41 +0200
## Comment 21859
Date: 2016-03-03 15:26:25 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0
Build Identifier:
other database software maintains these types,
if monetdb does not, it probably should warn
> library(RSQLite)
Loading required package: DBI
> db <- dbConnect( SQLite() )
> x <- mtcars
> x[ 1 , 1 ] <- Inf
> dbWriteTable( db , 'x' , x )
[1] TRUE
> head( dbReadTable( db , 'x' ) , 1 )
mpg cyl disp hp drat wt qsec vs am gear carb
Mazda RX4 Inf 6 160 110 3.90 2.620 16.46 0 1 4 4
Reproducible: Always
### Steps to Reproduce:
library(MonetDBLite)
library(MonetDB.R)
db <- dbConnect( MonetDBLite() )
x <- mtcars
x[ 1 , 1 ] <- Inf
dbWriteTable( db , 'x' , x )
### Actual Results:
should warn about [1,1]
| MonetDBLite should warn user when coercing special R types like Inf, -Inf, and NaN to NA | https://api.github.com/repos/MonetDB/MonetDB/issues/3943/comments | 0 | 2020-11-30T13:24:02Z | 2024-06-28T13:13:37Z | https://github.com/MonetDB/MonetDB/issues/3943 | 753,475,600 | 3,943 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-03 15:22:30 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.13 (Jul2015-SP2)
CC: ajdamico
Last updated: 2016-03-03 15:32:39 +0100
## Comment 21858
Date: 2016-03-03 15:22:30 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0
Build Identifier:
> library(MonetDB.R)
Loading required package: DBI
> library(MonetDBLite)
> x <- mtcars
> x[ 1 , 1 ] <- Inf
> x[ 2 , 2 ] <- NaN
> db <- dbConnect( MonetDBLite() )
> dbWriteTable( db , 'x' , x )
[1] TRUE
> dbReadTable( db , 'x' )[ 1:2 , ]
mpg cyl disp hp drat wt qsec vs am gear carb
1 Inf 6 160 110 3.9 2.620 16.46 0 1 4 4
2 21 NaN 160 110 3.9 2.875 17.02 0 1 4 4
Reproducible: Always
### Steps to Reproduce:
library(MonetDB.R)
library(MonetDBLite)
x <- mtcars
x[ 1 , 1 ] <- Inf
x[ 2 , 2 ] <- NaN
db <- dbConnect( MonetDBLite() )
dbWriteTable( db , 'x' , x )
dbReadTable( db , 'x' )[ 1:2 , ]
[9:18:14 AM] Hannes Mühleisen: no probably broke something
[9:18:24 AM] Hannes Mühleisen: there must never be inf in monetdb columns
## Comment 21860
Date: 2016-03-03 15:32:27 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [a81ea146c9ff](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a81ea146c9ff) 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=a81ea146c9ff](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a81ea146c9ff)
Changeset description:
Bug #3942
| MonetDBLite: Inf and NaN are currently being allowed into database somehow | https://api.github.com/repos/MonetDB/MonetDB/issues/3942/comments | 0 | 2020-11-30T13:23:59Z | 2024-06-27T12:11:03Z | https://github.com/MonetDB/MonetDB/issues/3942 | 753,475,568 | 3,942 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-03 10:39:38 +0100
From: @mlkersten
To: SQL devs <<bugs-sql>>
Version: 11.17.13 (Jan2014-SP1)
CC: @njnes, @drstmane
Last updated: 2020-11-13 17:51:43 +0100
## Comment 21855
Date: 2016-03-03 10:39:38 +0100
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:44.0) Gecko/20100101 Firefox/44.0
Build Identifier:
From http://stackoverflow.com/questions/35730919/monetdb-select-query-slow-when-we-dont-add-single-quote-in-where-clause
Both plans should be the same.
sql> create table tmp(i decimal(8));
sql>explain select count(*) from tmp where i = 20160222;
+-------------------------------------------------------------------------------------------------------------+
| mal |
+=============================================================================================================+
| function user.s3_1(A0:lng):void; |
| X_28:void := querylog.define("explain select count(*) from tmp where i = 20160222;","default_pipe",14); |
| X_2 := sql.mvc(); |
| X_6:bat[:int] := sql.bind(X_2,"sys","tmp","i",0); |
| (C_9,r1_9) := sql.bind(X_2,"sys","tmp","i",2); |
| X_12:bat[:int] := sql.bind(X_2,"sys","tmp","i",1); |
| X_14 := sql.delta(X_6,C_9,r1_9,X_12); |
| X_15:bat[:lng] := batcalc.lng(0,X_14,10,0); |
| C_3:bat[:oid] := sql.tid(X_2,"sys","tmp"); |
| C_17 := algebra.subselect(X_15,C_3,A0,A0,true,false,false); |
| X_20 := sql.projectdelta(C_17,X_6,C_9,r1_9,X_12); |
| X_21 := aggr.count(X_20); |
| sql.resultSet("sys.L1","L1","wrd",64,0,7,X_21); |
| end user.s3_1; |
| optimizer.mitosis() |
| optimizer.dataflow() |
+-------------------------------------------------------------------------------------------------------------+
16 tuples (2.182ms)
sql>explain select count(*) from tmp where i = '20160222';
+-------------------------------------------------------------------------------------------------------------------+
| mal |
+===================================================================================================================+
| function user.s4_1(A0:str):void; |
| X_27:void := querylog.define("explain select count(*) from tmp where i = \\'20160222\\';","default_pipe",16); |
| X_2 := sql.mvc(); |
| X_6:bat[:int] := sql.bind(X_2,"sys","tmp","i",0); |
| C_3:bat[:oid] := sql.tid(X_2,"sys","tmp"); |
| X_14 := calc.int(A0,8,0); |
| C_38 := algebra.subselect(X_6,C_3,X_14,X_14,true,false,false); |
| (C_9,r1_9) := sql.bind(X_2,"sys","tmp","i",2); |
| C_39 := algebra.subselect(r1_9,nil:bat[:oid],X_14,X_14,true,false,false); |
| X_12:bat[:int] := sql.bind(X_2,"sys","tmp","i",1); |
| C_41 := algebra.subselect(X_12,C_3,X_14,X_14,true,false,false); |
| C_16 := sql.subdelta(C_38,C_3,C_9,C_39,C_41); |
| X_19 := sql.projectdelta(C_16,X_6,C_9,r1_9,X_12); |
| X_20 := aggr.count(X_19); |
| sql.resultSet("sys.L1","L1","wrd",64,0,7,X_20); |
| end user.s4_1; |
| optimizer.mitosis() |
| optimizer.dataflow() |
+-------------------------------------------------------------------------------------------------------------------+
18 tuples (2.163ms)
Reproducible: Always
## Comment 21863
Date: 2016-03-03 21:23:07 +0100
From: @drstmane
This is IMHO not a coercion priority problem,
but rather triggered by parameterized query plan caching with the "ambition" to use the most generic parameter type, i.e., largest integer type (bigint / lng) for the integer literal, and thus the least plan variations to be cached.
Given that, up-casting the decimal(8) (4 byte) BAT to the bigint/lng (8-byte) literal is IMHO the only viable / correct option; down-casting the literal is IMHO no option.
Alternative, we might want to consider using the most specific/string (integer) parameter type, and, if required, cache more than one variant of the same plan for different integer type(-combination)s. Then, (up-)casting (if necessary at all) the literal would be possible.
Or drop plan-caching for select queries in general, i.e., for all but simple insert queries?
With the string literal, this "problem" does not occur.
## Comment 21916
Date: 2016-03-16 14:40:13 +0100
From: @njnes
With a bit of stricker bits2digits/digits2bits conversion functions this can be properly handled.
## Comment 21972
Date: 2016-03-25 09:59:42 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
## Comment 28268
Date: 2020-11-13 17:51:43 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [1223293c87fe](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1223293c87fe) 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=1223293c87fe](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=1223293c87fe)
Changeset description:
Use profiler traces instead of explain statement at decimal_vs_integer.Bug-3941 test
| Wrong coercion priority | https://api.github.com/repos/MonetDB/MonetDB/issues/3941/comments | 0 | 2020-11-30T13:23:56Z | 2024-06-27T12:11:02Z | https://github.com/MonetDB/MonetDB/issues/3941 | 753,475,528 | 3,941 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-02 23:37:51 +0100
From: @yzchang
To: SQL devs <<bugs-sql>>
Version: 11.21.13 (Jul2015-SP2)
CC: @swingbit, @yzchang
Last updated: 2016-03-25 09:59:15 +0100
## Comment 21852
Date: 2016-03-02 23:37:51 +0100
From: @yzchang
Try the following query set:
CREATE TABLE foo (dat1 DATE, dat2 DATE);
INSERT INTO foo VALUES ('2016-01-01', '2016-01-02');
INSERT INTO foo VALUES ('2016-01-01', '2016-01-01');
INSERT INTO foo VALUES ('2016-01-01', '2016-01-31');
SELECT (dat2-dat1), (dat2-dat1) < 10 FROM foo;
The final SELECT query produces this result:
sql>SELECT (dat2-dat1), (dat2-dat1) < 10 FROM foo;
+------+----------------+
| L1 | <_sql_sub_dat2 |
+======+================+
| 1 | true |
| 0 | true |
| 30 | true |
+------+----------------+
3 tuples (3.446ms)
The comparison result of the last tuple should be false.
## Comment 21853
Date: 2016-03-02 23:42:14 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [c6ea0ebc35d0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c6ea0ebc35d0) made by Jennie Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c6ea0ebc35d0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c6ea0ebc35d0)
Changeset description:
Added test for Bug #3940
## Comment 21856
Date: 2016-03-03 11:36:06 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [2737878355ca](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2737878355ca) 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=2737878355ca](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2737878355ca)
Changeset description:
use int for date difference, fixes bug #3940
## Comment 21857
Date: 2016-03-03 11:51:55 +0100
From: @swingbit
Is this the same as https://www.monetdb.org/bugzilla/show_bug.cgi?id=3917 ?
## Comment 21861
Date: 2016-03-03 18:05:18 +0100
From: @yzchang
Hai Roberto,
You are right, this is caused by the same problem as Bug #3917.
I don't completely understand why things have been implemented that way, but I got the following from Niels explanation earlier today:
- intervals are only stored as one of two types of intervals (don't know which ones), which isn't enough to capture all types of intervals.
- in the SELECT query in this bug, the number 10 is for some reason (I didn't get) regarded as a year interval. Hence, it's converted to 10*12 months, which is indeed larger than 30 months.
- until better alternatives are found, we now return an INT for date difference. At least, this doesn't break any existing tests, while returning the expected results for the date difference comparison here.
With this change, both queries in Bug #3917 now return 365. So probably, that one can be also marked as RESOLVED.
## Comment 21862
Date: 2016-03-03 18:10:16 +0100
From: @yzchang
By the way, as expected, before Niels' fix (Changeset 2737878355ca), the query returns expected results, if one explicitly defines the number 10 as a month interval:
sql>SELECT (dat2-dat1), (dat2-dat1) < interval '10' month FROM foo;
+------+----------------+
| L1 | <_sql_sub_dat2 |
+======+================+
| 1 | true |
| 0 | true |
| 30 | false |
+------+----------------+
3 tuples (1.564ms)
## Comment 21958
Date: 2016-03-25 09:59:15 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| Date calculation and comparison produce wrong result | https://api.github.com/repos/MonetDB/MonetDB/issues/3940/comments | 0 | 2020-11-30T13:23:53Z | 2024-06-27T12:11:01Z | https://github.com/MonetDB/MonetDB/issues/3940 | 753,475,489 | 3,940 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-02 09:14:04 +0100
From: anthonin.bonnefoy
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 11.21.19 (Jul2015-SP4)
CC: @mlkersten
Last updated: 2016-10-13 10:04:07 +0200
## Comment 21849
Date: 2016-03-02 09:14:04 +0100
From: anthonin.bonnefoy
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 Iceweasel/45.0
Build Identifier:
When doing concurrent 2 mclient with one querying sys.queue, mserver segfault with the given (abbreviated) stacktrace
11 0x00007f4257d5a312 in __GI___assert_fail (assertion=0x7f42598838de "(v[i] & 0xC0) == 0x80", file=0x7f4259883710 "gdk_atoms.c", line=1283, function=0x7f4259883af6 <__PRETTY_FUNCTION__.10385> "strPut") at assert.c:101
12 0x00007f425959c941 in strPut (h=0x7f42341f3050, dst=0x7f4250dad290, v=0x7f41d6596b20 '\333' <repeats 160 times>, "\300") at gdk_atoms.c:1283
13 0x00007f425963fef5 in BUNappend (b=0x7f42342cc010, t=0x7f41d6596b20, force=0 '\000') at gdk_bat.c:1318
14 0x00007f4259d93785 in SYSMONqueue (cntxt=0x7f4252f7f330, mb=0x7f4234239880, stk=0x7f42342dee20, pci=0x7f42342fb5c0) at sysmon.c:103
15 0x00007f4259c1418a in runMALsequence (cntxt=0x7f4252f7f330, mb=0x7f4234239880, startpc=1, stoppc=0, stk=0x7f42342dee20, env=0x0, pcicaller=0x0) at mal_interpreter.c:631
16 0x00007f4259c132db in callMAL (cntxt=0x7f4252f7f330, mb=0x7f4234239880, env=0x7f4250dad998, argv=0x7f4250dada40, debug=0 '\000') at mal_interpreter.c:447
From what I could debug, here is what happened:
- QRYqueue[0] and QRYqueue[1] are filled
- QRYqueue[0] is finished and cleaned in runtimeProfileFinish, QRYqueue[1] is moved in QRYqueue[0].
We still have a QRYqueue information in QRYqueue[1], that should not pose problems since qtop is here
- When a query is done on sys.queue, the loop in sysmon.c:89 is done from 0 to QRYqueue[i].tag, so we hit QRYqueue[1].query which has been freed but not setted to NULL.
Exporting qtop and doing the loop until qtop seems to solve the problem.
Reproducible: Always
## Comment 21850
Date: 2016-03-02 09:40:06 +0100
From: anthonin.bonnefoy
By the way, in gdk_atoms.c:1247, the line
memset(h->base + h->free, 0, h->size - h->free);
Looks like an off-by one (h->base[h->size] is set to 0)
## Comment 21909
Date: 2016-03-15 10:30:58 +0100
From: @sjoerdmullender
(In reply to anthonin.bonnefoy from comment 1)
> By the way, in gdk_atoms.c:1247, the line
>
> memset(h->base + h->free, 0, h->size - h->free);
>
> Looks like an off-by one (h->base[h->size] is set to 0)
No. memset sets the memory starting at h->base+h->free for (h->size-h->free) bytes. That is to say, from h->base+h->free up to (but not including(!)) h->base+h->free+(h->size-h->free) == h->base+h->size.
## Comment 22072
Date: 2016-04-21 10:19:41 +0200
From: anthonin.bonnefoy
Yeah, my bad.
Still, the bug on sys.queue is valid. Freed memory is read and garbage can appear in the query column.
Just by doing 2 simultaneous
while mclient db -s "select * from sys.queue;" ; do :; done
This will trigger an "utf8strlenmax: Assertion `n == 0' failed."
## Comment 22254
Date: 2016-07-25 21:04:50 +0200
From: @mlkersten
Running the one liner does not cause problems.
Running two clients causes an assertion in BUNappend
in SYSMONqueue, which is protected by a mal_delaylock (weird)
0 0x00007fd50b4389c8 in raise () from /lib64/libc.so.6
1 0x00007fd50b43a65a in abort () from /lib64/libc.so.6
2 0x00007fd50b431187 in __assert_fail_base () from /lib64/libc.so.6
3 0x00007fd50b431232 in __assert_fail () from /lib64/libc.so.6
4 0x00007fd50e0f44f1 in strPut (h=0x7fd454155c60, dst=0x7fd461f2f288, v=0x7fd45414f1f0 '\333' <repeats 40 times>, "q") at /export/scratch1/mk/default//package/gdk/gdk_atoms.c:1323
5 0x00007fd50e18ef54 in BUNappend (b=0x7fd454155b20, t=0x7fd45414f1f0, force=0 '\000') at /export/scratch1/mk/default//package/gdk/gdk_bat.c:955
6 0x00007fd50e83af7d in SYSMONqueue (cntxt=0x7fd5014bc330, mb=0x7fd454107280, stk=0x7fd45415a320, pci=0x7fd4541371b0) at /export/scratch1/mk/default//package/monetdb5/modules/mal/sysmon.c:77
## Comment 22257
Date: 2016-07-25 21:37:33 +0200
From: @sjoerdmullender
Run the server under valgrind. One of the messages is:
==21299== Invalid read of size 1
==21299== at 0x5566DF1: strCmp (gdk_atoms.c:1084)
==21299== by 0x5601AF9: setcolprops (gdk_bat.c:818)
==21299== by 0x56025CC: BUNappend (gdk_bat.c:952)
==21299== by 0x4F94D5D: SYSMONqueue (sysmon.c:76)
==21299== by 0x4E85B1E: runMALsequence (mal_interpreter.c:629)
==21299== by 0x4E84CE6: callMAL (mal_interpreter.c:434)
==21299== by 0x18C816C1: SQLexecutePrepared (sql_execute.c:525)
==21299== by 0x18C81ADB: SQLengineIntern (sql_execute.c:576)
==21299== by 0x18C7F1E4: SQLengine (sql_scenario.c:1178)
==21299== by 0x4EACB4D: runPhase (mal_scenario.c:531)
==21299== by 0x4EACD2F: runScenarioBody (mal_scenario.c:574)
==21299== by 0x4EACE3F: runScenario (mal_scenario.c:594)
==21299== Address 0x1353c920 is 16 bytes inside a block of size 56 free'd
==21299== at 0x4C2CD5A: free (vg_replace_malloc.c:530)
==21299== by 0x55614DA: GDKfree (gdk_utils.c:1804)
==21299== by 0x4E7AF32: runtimeProfileFinish (mal_runtime.c:113)
==21299== by 0x4E86654: runMALsequence (mal_interpreter.c:760)
==21299== by 0x4E84CE6: callMAL (mal_interpreter.c:434)
==21299== by 0x18C816C1: SQLexecutePrepared (sql_execute.c:525)
==21299== by 0x18C81ADB: SQLengineIntern (sql_execute.c:576)
==21299== by 0x18C7F1E4: SQLengine (sql_scenario.c:1178)
==21299== by 0x4EACB4D: runPhase (mal_scenario.c:531)
==21299== by 0x4EACD2F: runScenarioBody (mal_scenario.c:574)
==21299== by 0x4EACE3F: runScenario (mal_scenario.c:594)
==21299== by 0x4EAE928: MSserveClient (mal_session.c:449)
==21299== Block was alloc'd at
==21299== at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==21299== by 0x55610E0: GDKmalloc_prefixsize (gdk_utils.c:1679)
==21299== by 0x55611F7: GDKmallocmax (gdk_utils.c:1722)
==21299== by 0x55612FF: GDKmalloc (gdk_utils.c:1746)
==21299== by 0x55617B8: GDKstrdup (gdk_utils.c:1881)
==21299== by 0x4E7AA32: runtimeProfileInit (mal_runtime.c:87)
==21299== by 0x4E851E5: runMALsequence (mal_interpreter.c:500)
==21299== by 0x4E84CE6: callMAL (mal_interpreter.c:434)
==21299== by 0x18C816C1: SQLexecutePrepared (sql_execute.c:525)
==21299== by 0x18C81ADB: SQLengineIntern (sql_execute.c:576)
==21299== by 0x18C7F1E4: SQLengine (sql_scenario.c:1178)
==21299== by 0x4EACB4D: runPhase (mal_scenario.c:531)
In other words, the query being added by SYSMONqueue has aleady been freed.
## Comment 22259
Date: 2016-07-25 21:58:24 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [9f67d824a657](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9f67d824a657) 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=9f67d824a657](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9f67d824a657)
Changeset description:
Provide sentinel for SYSMONqueue().
This fixs bug #3939.
## Comment 22260
Date: 2016-07-25 22:00:12 +0200
From: @sjoerdmullender
Should be fixed now.
## Comment 24492
Date: 2016-10-13 10:04:07 +0200
From: @sjoerdmullender
Jun2016-SP2 has been released.
| Assert failure on concurrent queries when querying sys.queue | https://api.github.com/repos/MonetDB/MonetDB/issues/3939/comments | 0 | 2020-11-30T13:23:50Z | 2024-06-27T12:11:00Z | https://github.com/MonetDB/MonetDB/issues/3939 | 753,475,450 | 3,939 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-01 16:36:30 +0100
From: Robin Cijvat <<robin.cijvat>>
To: SQL devs <<bugs-sql>>
Version: 11.21.5 (Jul2015)
CC: @njnes
Last updated: 2016-03-25 09:59:43 +0100
## Comment 21847
Date: 2016-03-01 16:36:30 +0100
From: Robin Cijvat <<robin.cijvat>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.63 Safari/537.36
Build Identifier:
When a table references multiple other tables via mandatory (not null) foreign key constraints, and you try to insert a tuple that misses one of the two, the error message can state the wrong constraint name.
Reproducible: Always
### Steps to Reproduce:
1.Open mclient and execute the following
create table t1 (
a int primary key
);
create table t2 (
b int primary key
);
create table t3 (
a int not null references t1 (a),
b int not null references t2 (b)
);
insert into t1 values (1);
insert into t2 values (1);
insert into t3 (b) values (1);
### Actual Results:
INSERT INTO: FOREIGN KEY constraint 't3.t3_b_fkey' violated
### Expected Results:
INSERT INTO: FOREIGN KEY constraint 't3.t3_a_fkey' violated
## Comment 21917
Date: 2016-03-16 15:56:21 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [c108eba2d5a4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c108eba2d5a4) 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=c108eba2d5a4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c108eba2d5a4)
Changeset description:
fix bug #3938, ie check keys in the proper order
## Comment 21918
Date: 2016-03-16 16:09:47 +0100
From: @njnes
Fixed by checking the keys in the proper order
## Comment 21973
Date: 2016-03-25 09:59:43 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| Wrong error message on violating foreign key constraint | https://api.github.com/repos/MonetDB/MonetDB/issues/3938/comments | 0 | 2020-11-30T13:23:48Z | 2024-06-27T12:10:59Z | https://github.com/MonetDB/MonetDB/issues/3938 | 753,475,427 | 3,938 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-03-01 15:42:38 +0100
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: 11.21.13 (Jul2015-SP2)
Last updated: 2016-03-25 09:59:21 +0100
## Comment 21844
Date: 2016-03-01 15:42:38 +0100
From: @drstmane
Created attachment 386
small C file to create binary (BAT) files with & without NULL value
When a binary file contains "valid" (MonetDB-) NULL values,
binary copy into does not set BAT properties correctly.
To reproduce, download the (to-be) attached scripts and run the following BASH commands sequence (or equivalent according to your preferences):
WARNING:
this one-line magic *kills all mserver5 processes* (because this magic does not seem to work without mserver5's --daemon=yes option --- it used to in the (very) old days ...)
gcc makeBats.c -o makeBats && ./makeBats && { until mclient -s'select 0;' >/dev/null 2>&1 ; do sleep 1 ; done ; sed "s|_PWD_|$PWD|g" noNULLint.sql | mclient -e -i ; sed "s|_PWD_|$PWD|g" NULLint.sql | mclient -e -i ; killall mserver5 ; } >&2 | mserver5 --debug=10 --dbpath=$PWD/MyDB --daemon=yes
Note the property assertions and the incorrect result for NULL-related queries at the end.
builtin opt gdk_debug = 0
builtin opt gdk_vmtrim = no
builtin opt monet_prompt = >
builtin opt monet_daemon = no
builtin opt mapi_port = 50000
builtin opt mapi_open = false
builtin opt mapi_autosense = false
builtin opt sql_optimizer = default_pipe
builtin opt sql_debug = 0
cmdline opt gdk_dbpath = /ufs/manegold/_/HDD/IBA/MyDB
cmdline opt monet_daemon = yes
cmdline opt gdk_debug = 10
MonetDB 5 server v11.21.14
This is an unreleased version
Serving database 'MyDB', using 8 threads
Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs and 128bit integers dynamically linked
Found 15.589 GiB available main-memory.
Copyright (c) 1993-July 2008 CWI.
Copyright (c) August 2008-2015 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:50000/
MonetDB/GIS module loaded
Start processing logs sql/sql_logs version 52200
Start reading the write-ahead log 'sql_logs/sql/log.4'
Finished reading the write-ahead log 'sql_logs/sql/log.4'
Finished processing logs sql/sql_logs
MonetDB/SQL module loaded
drop table "noNULLint";
operation successful (20.696ms)
create table "noNULLint" (x int);
operation successful (16.338ms)
copy binary into "noNULLint" from ('/ufs/manegold/_/HDD/IBA/noNULLintBAT');
3 affected rows (7.888ms)
select * from "noNULLint";
+------+
| x |
+======+
| 1 |
| 2 |
| 3 |
+------+
3 tuples (2.194ms)
select count(*), count(x) from "noNULLint";
+------+------+
| L1 | L2 |
+======+======+
| 3 | 3 |
+------+------+
1 tuple (2.024ms)
select * from "noNULLint" where x is null;
+---+
| x |
+===+
+---+
0 tuples (0.934ms)
select * from "noNULLint" where x is not null;
+------+
| x |
+======+
| 1 |
| 2 |
| 3 |
+------+
3 tuples (0.873ms)
insert into "noNULLint" values (null);
1 affected row (9.805ms)
select * from "noNULLint";
+------+
| x |
+======+
| 1 |
| 2 |
| 3 |
| null |
+------+
4 tuples (0.507ms)
select count(*), count(x) from "noNULLint";
+------+------+
| L1 | L2 |
+======+======+
| 4 | 3 |
+------+------+
1 tuple (0.429ms)
select * from "noNULLint" where x is null;
+------+
| x |
+======+
| null |
+------+
1 tuple (0.422ms)
select * from "noNULLint" where x is not null;
+------+
| x |
+======+
| 1 |
| 2 |
| 3 |
+------+
3 tuples (0.459ms)
drop table "NULLint";
operation successful (7.093ms)
create table "NULLint" (x int);
operation successful (16.508ms)
!WARNING: /ufs/manegold/_/Monet/HG/Jul2015/source/MonetDB/gdk/gdk_bat.c:3025: assertion `!b->H->nonil || cmp != 0' failed
!WARNING: /ufs/manegold/_/Monet/HG/Jul2015/source/MonetDB/gdk/gdk_bat.c:3025: assertion `!b->H->nonil || cmp != 0' failed
copy binary into "NULLint" from ('/ufs/manegold/_/HDD/IBA/NULLintBAT');
3 affected rows (8.221ms)
!WARNING: /ufs/manegold/_/Monet/HG/Jul2015/source/MonetDB/gdk/gdk_bat.c:3025: assertion `!b->H->nonil || cmp != 0' failed
!WARNING: /ufs/manegold/_/Monet/HG/Jul2015/source/MonetDB/gdk/gdk_bat.c:3025: assertion `!b->H->nonil || cmp != 0' failed
!WARNING: /ufs/manegold/_/Monet/HG/Jul2015/source/MonetDB/gdk/gdk_bat.c:3025: assertion `!b->H->nonil || cmp != 0' failed
!WARNING: /ufs/manegold/_/Monet/HG/Jul2015/source/MonetDB/gdk/gdk_bat.c:3025: assertion `!b->H->nonil || cmp != 0' failed
!WARNING: /ufs/manegold/_/Monet/HG/Jul2015/source/MonetDB/gdk/gdk_bat.c:3025: assertion `!b->H->nonil || cmp != 0' failed
select * from "NULLint";
+------+
| x |
+======+
| 1 |
| null |
| 3 |
+------+
3 tuples (0.982ms)
!WARNING: /ufs/manegold/_/Monet/HG/Jul2015/source/MonetDB/gdk/gdk_bat.c:3025: assertion `!b->H->nonil || cmp != 0' failed
!WARNING: /ufs/manegold/_/Monet/HG/Jul2015/source/MonetDB/gdk/gdk_bat.c:3025: assertion `!b->H->nonil || cmp != 0' failed
!WARNING: /ufs/manegold/_/Monet/HG/Jul2015/source/MonetDB/gdk/gdk_bat.c:3025: assertion `!b->H->nonil || cmp != 0' failed
!WARNING: /ufs/manegold/_/Monet/HG/Jul2015/source/MonetDB/gdk/gdk_bat.c:3025: assertion `!b->H->nonil || cmp != 0' failed
!WARNING: /ufs/manegold/_/Monet/HG/Jul2015/source/MonetDB/gdk/gdk_bat.c:3025: assertion `!b->H->nonil || cmp != 0' failed
select count(*), count(x) from "NULLint";
+------+------+
| L1 | L2 |
+======+======+
| 3 | 3 |
+------+------+
1 tuple (0.894ms)
!WARNING: /ufs/manegold/_/Monet/HG/Jul2015/source/MonetDB/gdk/gdk_bat.c:3025: assertion `!b->H->nonil || cmp != 0' failed
!WARNING: /ufs/manegold/_/Monet/HG/Jul2015/source/MonetDB/gdk/gdk_bat.c:3025: assertion `!b->H->nonil || cmp != 0' failed
select * from "NULLint" where x is null;
+---+
| x |
+===+
+---+
0 tuples (1.888ms)
!WARNING: /ufs/manegold/_/Monet/HG/Jul2015/source/MonetDB/gdk/gdk_bat.c:3025: assertion `!b->H->nonil || cmp != 0' failed
!WARNING: /ufs/manegold/_/Monet/HG/Jul2015/source/MonetDB/gdk/gdk_bat.c:3025: assertion `!b->H->nonil || cmp != 0' failed
!WARNING: /ufs/manegold/_/Monet/HG/Jul2015/source/MonetDB/gdk/gdk_bat.c:3025: assertion `!b->H->nonil || cmp != 0' failed
!WARNING: /ufs/manegold/_/Monet/HG/Jul2015/source/MonetDB/gdk/gdk_bat.c:3025: assertion `!b->H->nonil || cmp != 0' failed
select * from "NULLint" where x is not null;
+------+
| x |
+======+
| 1 |
| null |
| 3 |
+------+
3 tuples (1.131ms)
> Attached file: [makeBats.c](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3937_makeBats.c_386) (text/x-csrc, 286 bytes)
> Description: small C file to create binary (BAT) files with & without NULL value
## Comment 21845
Date: 2016-03-01 15:43:33 +0100
From: @drstmane
Created attachment 387
working test for no-NULL case
> Attached file: [noNULLint.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3937_noNULLint.sql_387) (text/plain, 481 bytes)
> Description: working test for no-NULL case
## Comment 21846
Date: 2016-03-01 15:43:54 +0100
From: @drstmane
Created attachment 388
failing test for NULL case
> Attached file: [NULLint.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3937_NULLint.sql_388) (text/plain, 263 bytes)
> Description: failing test for NULL case
## Comment 21848
Date: 2016-03-01 21:30:06 +0100
From: @drstmane
This might fix it:
diff -r [40afde5221b1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=40afde5221b1) gdk/gdk_bat.c
--- a/gdk/gdk_bat.c Tue Mar 01 17:02:58 2016 +0100
+++ b/gdk/gdk_bat.c Tue Mar 01 21:29:09 2016 +0100
@@ -354,6 +354,11 @@ BATattach(int tt, const char *heapfile,
BATkey(bn, TRUE);
BATsetcapacity(bn, cap);
BATsetcount(bn, cap);
+ /*
+ * Unless/until we invest in a scan to check that there indeed
+ * are no NIL values, we cannot safely assume there are none.
+ */
+ bn->T->nonil = 0;
if (cap > 1) {
bn->tsorted = 0;
bn->trevsorted = 0;
testing and check-in pending ...
## Comment 21851
Date: 2016-03-02 11:05:58 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [f38103527022](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f38103527022) 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=f38103527022](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f38103527022)
Changeset description:
fixing bug #3937: unset "nonil" property with copy binary into:
Unless/until we invest in a scan to check that there indeed
are no NIL values, we cannot safely assume there are none.
Test still pending.
## Comment 21854
Date: 2016-03-03 00:16:57 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [9e6293cee17a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9e6293cee17a) 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=9e6293cee17a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9e6293cee17a)
Changeset description:
added test for bug #3937
## Comment 21864
Date: 2016-03-03 21:36:22 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [e37a9003fa0d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e37a9003fa0d) 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=e37a9003fa0d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e37a9003fa0d)
Changeset description:
test for bug #3937: simply use /bin/sh for portability
## Comment 21865
Date: 2016-03-03 21:36:26 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [f5d29e95b1a8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f5d29e95b1a8) 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=f5d29e95b1a8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f5d29e95b1a8)
Changeset description:
test for bug #3937: approve Windows-specific output
## Comment 21962
Date: 2016-03-25 09:59:21 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| bad BAT properties with binary copy into and NULL values | https://api.github.com/repos/MonetDB/MonetDB/issues/3937/comments | 0 | 2020-11-30T13:23:45Z | 2024-06-27T12:10:58Z | https://github.com/MonetDB/MonetDB/issues/3937 | 753,475,395 | 3,937 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-02-28 20:17:49 +0100
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: 11.21.13 (Jul2015-SP2)
CC: @njnes
Last updated: 2016-03-13 20:06:47 +0100
## Comment 21843
Date: 2016-02-28 20:17:49 +0100
From: @skinkie
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36
Build Identifier:
sql>select '1' - '0';
timestamp (1) has incorrect format
What is the reason 'timestamp' is mentioned here. In more complex queries this confuses the user.
Reproducible: Always
MonetDB 5 server v11.22.0 (64-bit, 64-bit oids, 128-bit integers)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 31.4GiB available memory, 8 available cpu cores
Libraries:
libpcre: 8.33 2013-05-28 (compiled with 8.33)
openssl: OpenSSL 1.0.2d 9 Jul 2015 (compiled with OpenSSL 1.0.2d 9 Jul 2015)
libxml2: 2.9.1 (compiled with 2.9.1)
Compiled by: skinkie@bigdata.openebs.nl (x86_64-unknown-linux-gnu)
Compilation: gcc -O3 -pipe -march=native -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code
Linking : /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64
## Comment 21886
Date: 2016-03-13 20:06:47 +0100
From: @njnes
Well this is an interesting case. The string types are allowed to be casted into any type. If this is valid is only known at query execution time. Many substract '-' functions exist, but not for strings. So basically one is chosen. I agree
the error isn't very clear.
| Unexpected warning timestamp where I would expect a varchar error | https://api.github.com/repos/MonetDB/MonetDB/issues/3936/comments | 0 | 2020-11-30T13:23:42Z | 2024-06-28T13:13:36Z | https://github.com/MonetDB/MonetDB/issues/3936 | 753,475,367 | 3,936 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-02-27 22:55:38 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.13 (Jul2015-SP2)
CC: ajdamico
Last updated: 2016-02-28 00:20:49 +0100
## Comment 21838
Date: 2016-02-27 22:55:38 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0
Build Identifier:
the --max-mem-size=35 is obviously critical.. when things hit the ceiling they also hit the fan
Reproducible: Always
### Steps to Reproduce:
launch R with
"C:\Program Files\R\R-3.2.3\bin\x64\Rterm.exe" --max-mem-size=35M
library(MonetDB.R)
library(MonetDBLite)
db <- dbConnect( MonetDBLite() )
for( i in 1:1000 ) dbWriteTable( db , 'x' , mtcars , append = TRUE )
CRASH
### Actual Results:
crash
### Expected Results:
slow disk paging but not crash
## Comment 21839
Date: 2016-02-27 23:03:28 +0100
From: Anthony Damico <<ajdamico>>
no crash in base R, just expected error:
C:\Users\anthonyd> "C:\Program Files\R\R-3.2.3\bin\x64\Rterm.exe" --max-mem-size
=35M
> x <- mtcars
> for( i in 1:10000 ) x <- rbind( x , mtcars )
Error: cannot allocate vector of size 256 Kb
In addition: There were 50 or more warnings (use warnings() to see the first 50)
> i
[1] 874
## Comment 21840
Date: 2016-02-28 00:10:53 +0100
From: Anthony Damico <<ajdamico>>
more related info: adding `gc()` inside the loop prevents the crash -- even when you use 10,000 and not 1,000..
for( i in 1:10000 ) { dbWriteTable( db , 'x' , mtcars , append = TRUE ) ; gc() }
AND
this crashes!
start R with: "C:\Program Files\R\R-3.2.3\bin\x64\Rterm.exe" --max-mem-size=35M
library(RSQLite)
db <- dbConnect( SQLite() )
for( i in 1:1000 ) { dbWriteTable( db , 'x' , mtcars , append = TRUE ) }
CRASH
## Comment 21841
Date: 2016-02-28 00:20:49 +0100
From: Anthony Damico <<ajdamico>>
probably not a monetdblite bug
| MonetDBLite destroys R instead of paging or erroring gracefully when memory overloads | https://api.github.com/repos/MonetDB/MonetDB/issues/3935/comments | 0 | 2020-11-30T13:23:39Z | 2024-06-28T13:13:35Z | https://github.com/MonetDB/MonetDB/issues/3935 | 753,475,324 | 3,935 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-02-26 17:57:29 +0100
From: Marcin K <<marcin>>
To: Merovingian devs <<bugs-merovingian>>
Version: 11.21.19 (Jul2015-SP4)
Last updated: 2016-04-11 11:24:44 +0200
## Comment 21837
Date: 2016-02-26 17:57:29 +0100
From: Marcin K <<marcin>>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.103 Safari/537.36
Build Identifier:
Tables system table contain tables of the same name associated with the same schema_id.
sql>select * from tables where name = 'geo_dealers_map' and schema_id = 6531;
+------+-----------------+-----------+-------+------+--------+---------------+----------+-----------+
| id | name | schema_id | query | type | system | commit_action | readonly | temporary |
+======+=================+===========+=======+======+========+===============+==========+===========+
| 7393 | geo_dealers_map | 6531 | null | 0 | false | 0 | false | 0 |
| 8224 | geo_dealers_map | 6531 | null | 0 | false | 0 | false | 0 |
+------+-----------------+-----------+-------+------+--------+---------------+----------+-----------+
Reproducible: Sometimes
### Steps to Reproduce:
This is not easily reproducible. I perform same table creation operation on several installations and this is not happening.
I use MonetDB as read-only database where tables are dropped and re-created with new data. I think drop/create table operation could have caused MonetDB failing deleting old table record from system tables.
### Actual Results:
sql>select * from tables where name = 'geo_dealers_map' and schema_id = 6531;
+------+-----------------+-----------+-------+------+--------+---------------+----------+-----------+
| id | name | schema_id | query | type | system | commit_action | readonly | temporary |
+======+=================+===========+=======+======+========+===============+==========+===========+
| 7393 | geo_dealers_map | 6531 | null | 0 | false | 0 | false | 0 |
| 8224 | geo_dealers_map | 6531 | null | 0 | false | 0 | false | 0 |
+------+-----------------+-----------+-------+------+--------+---------------+----------+-----------+
### Expected Results:
sql>select * from tables where name = 'geo_dealers_map' and schema_id = 6531;
+------+-----------------+-----------+-------+------+--------+---------------+----------+-----------+
| id | name | schema_id | query | type | system | commit_action | readonly | temporary |
+======+=================+===========+=======+======+========+===============+==========+===========+
| 8224 | geo_dealers_map | 6531 | null | 0 | false | 0 | false | 0 |
+------+-----------------+-----------+-------+------+--------+---------------+----------+-----------+
It seems to me MonetDB did not properly cleaned up system records.
| Tables system table contain tables of the same name associated with the same schema_id | https://api.github.com/repos/MonetDB/MonetDB/issues/3934/comments | 0 | 2020-11-30T13:23:37Z | 2024-06-28T13:13:35Z | https://github.com/MonetDB/MonetDB/issues/3934 | 753,475,285 | 3,934 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-02-25 13:00:05 +0100
From: Pierre Coustillas <<pcoustillas>>
To: clients devs <<bugs-clients>>
Version: 11.21.13 (Jul2015-SP2)
Last updated: 2016-03-25 09:59:22 +0100
## Comment 21823
Date: 2016-02-25 13:00:05 +0100
From: Pierre Coustillas <<pcoustillas>>
"Exit" is bad for the calling script is stopped without notification
Patch :
diff /usr/share/php/monetdb/php_mapi.inc php_mapi.inc
311c311
< exit();
---
> throw new Exception($last_error . '. Check monetdb is started.');
420c420
< exit();
---
> throw new Exception($last_error . '. Monetdb was to stop since the last connection.');
434c434
< exit();
---
> throw new Exception($last_error . '. Monetdb was to stop during the execution of a query.');
443c443
< exit();
---
> throw new Exception($last_error . '. Monetdb was to stop during the execution of a query.');
## Comment 21829
Date: 2016-02-26 15:15:48 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [517d097f1eda](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=517d097f1eda) 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=517d097f1eda](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=517d097f1eda)
Changeset description:
Convert calls to exit to throwing exceptions.
This fixes bug #3933.
## Comment 21830
Date: 2016-02-26 15:16:20 +0100
From: @sjoerdmullender
Exit is gone.
## Comment 21963
Date: 2016-03-25 09:59:22 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| replace "exit" by "throw new Exception" | https://api.github.com/repos/MonetDB/MonetDB/issues/3933/comments | 0 | 2020-11-30T13:23:34Z | 2024-06-27T12:10:54Z | https://github.com/MonetDB/MonetDB/issues/3933 | 753,475,240 | 3,933 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-02-25 09:56:44 +0100
From: Arno Mittelbach <<arno.mittelbach>>
To: SQL devs <<bugs-sql>>
Version: 11.21.13 (Jul2015-SP2)
Last updated: 2016-03-25 09:59:18 +0100
## Comment 21821
Date: 2016-02-25 09:56:44 +0100
From: Arno Mittelbach <<arno.mittelbach>>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36
Build Identifier:
For preparation consider the following simple table with one entry.
Create table a (a varchar(5), b varchar(10));
insert into a values ('12345','1234567890');
Now, the following statement outputs, as expected, 1234567890:
SELECT CASE WHEN 1=2 THEN a ELSE b END from a;
Result: 1234567890
However, when putting in a constant value then MonetDb returns an odd result:
SELECT CASE WHEN 1=2 THEN a ELSE 'lala' END from a;
Result: Px?~
The result is even varying if you run the query multiple times.
Reproducible: Always
### Steps to Reproduce:
1. Create table a (a varchar(5), b varchar(10));
2. insert into a values ('12345','1234567890');
3. SELECT CASE WHEN 1=2 THEN a ELSE 'lala' END from a;
### Actual Results:
Px?~
### Expected Results:
'lala'
As CASE expressions are quite standard and this may lead to wrong results I've set the Severity to critical.
## Comment 21831
Date: 2016-02-26 15:47:19 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [200c19adf549](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=200c19adf549) 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=200c19adf549](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=200c19adf549)
Changeset description:
Use VALptr instead of getArgReference to get correct indirection.
This fixes bug #3932.
Also added test.
## Comment 21832
Date: 2016-02-26 15:47:37 +0100
From: @sjoerdmullender
Fixed.
## Comment 21959
Date: 2016-03-25 09:59:18 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| CASE expressions with constants are not evaluated correctly | https://api.github.com/repos/MonetDB/MonetDB/issues/3932/comments | 0 | 2020-11-30T13:23:31Z | 2024-06-27T12:10:53Z | https://github.com/MonetDB/MonetDB/issues/3932 | 753,475,214 | 3,932 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-02-25 00:30:11 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.13 (Jul2015-SP2)
CC: ajdamico
Last updated: 2016-02-28 00:22:19 +0100
## Comment 21819
Date: 2016-02-25 00:30:11 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0
Build Identifier:
crash occurs somewhere within these three lines: the text from the print('after dbreadtable') does not get displayed at all
https://gist.github.com/ajdamico/4cd5f76aebbdaae5bc88file-ncvs_bughunt-r-L144-L147
i spent a lot of time narrowing this down to as minimal as possible..
https://gist.github.com/ajdamico/4cd5f76aebbdaae5bc88/revisions
..i left the easy-to-download code in there to make it easier for you to pull that table.
in addition to the revisions in the gist, i did try a few other things separately: the bug does *not* occur on an empty table.
Reproducible: Always
### Steps to Reproduce:
code to reproduce on windows:
account creation page
http://www.icpsr.umich.edu/rpxlogin?path=NACJD&request_uri=https%3a%2f%2fwww.icpsr.umich.edu%2ficpsrweb%2fNACJD%2f
your.username <- 'email@address.com'
your.password <- 'some_password'
setwd( "C:/My Directory/NCVS_BUG/" )
options( monetdb.debug.query = TRUE )
library(downloader)
source_url( "https://gist.githubusercontent.com/ajdamico/4cd5f76aebbdaae5bc88/raw/1ae140e84aa82f1c12af297badad6d8c2c50f5a1/ncvs_bughunt.R" , echo = TRUE , prompt = FALSE )
### Actual Results:
R console dies without any message - note that Rterm crashing and returning to the DOS prompt does not show the `print('after dbreadtable')` text
> if ( dbGetQuery( db , paste0( 'select count(*) from ' , tablename ) )[ 1 , 1 ]
< 100000 ){
+
+ print('before dbreadtable')
+ pull the data fil .... [TRUNCATED]
QQ: 'select count(*) from x36044_0001'
[1] "before dbreadtable"
QQ: 'select schemas.name as sn, tables.name as tn from sys.tables join sys.schem
as on tables.schema_id=schemas.id'
QQ: 'SELECT * FROM x36044_0001'
C:\Users\AnthonyD>
### Expected Results:
no crash
## Comment 21820
Date: 2016-02-25 09:31:30 +0100
From: @hannesmuehleisen
yes this also crashes on OSX
## Comment 21822
Date: 2016-02-25 10:27:05 +0100
From: @hannesmuehleisen
Got this to work by calling gc() after read.SAScii.monetdb(). Makes me think this is unrelated to MonetDBLite.
## Comment 21826
Date: 2016-02-25 18:36:19 +0100
From: Anthony Damico <<ajdamico>>
hi, could you verify that this bug also occurs on a monetdblite build with assertions turned off?
## Comment 21827
Date: 2016-02-26 09:32:06 +0100
From: @hannesmuehleisen
The crash was in the R garbage collector. Please stop asking about assertions.
## Comment 21842
Date: 2016-02-28 00:22:19 +0100
From: Anthony Damico <<ajdamico>>
probably not a monetdblite bug
| R console crash on dbReadTable with many columns using MonetDBLite | https://api.github.com/repos/MonetDB/MonetDB/issues/3931/comments | 0 | 2020-11-30T13:23:28Z | 2024-06-28T13:13:34Z | https://github.com/MonetDB/MonetDB/issues/3931 | 753,475,189 | 3,931 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-02-24 17:02:08 +0100
From: Arno Mittelbach <<arno.mittelbach>>
To: SQL devs <<bugs-sql>>
Version: 11.21.13 (Jul2015-SP2)
Last updated: 2016-03-25 09:59:12 +0100
## Comment 21818
Date: 2016-02-24 17:02:08 +0100
From: Arno Mittelbach <<arno.mittelbach>>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36
Build Identifier:
There seems to be a strange problem regarding prepared queries with Umlaute (e.g., ä). It seems that the rule for type casting strings correspond to the length of the string. The problem is
that an Umlaut seems to count for two "normal" characters. Here is an example. Consider the following simple table:
create table A (a varchar(4));
Now if we create a prepared statement (ultimately I want to do this from Java) such as
prepare select * from A where a = ?;
we can execute the statement and supply 4 characters as the argument:
exec 3('1234');
This works fine. However, if I am using an Umlaut within the parameter, then things don't work out. For example
exec 4('ä123');
fails with the following error message
EXEC: wrong type for argument 1 of prepared statement: char, expected varchar
However, if I now shorten the parameter by "1" character, it works again. That is,
exec 5('ä12');
is ok.
Reproducible: Always
### Steps to Reproduce:
1. create table A (a varchar(4));
2. prepare select * from A where a = ?;
3. exec 2('ä123');
### Actual Results:
EXEC: wrong type for argument 1 of prepared statement: char, expected varchar
### Expected Results:
No error
## Comment 21824
Date: 2016-02-25 17:36:57 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [58c81fe1e454](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=58c81fe1e454) 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=58c81fe1e454](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=58c81fe1e454)
Changeset description:
When parsing a string in SQL, record the number of Unicode code points, not bytes.
This fixes bug #3930.
Also added test.
## Comment 21828
Date: 2016-02-26 14:49:06 +0100
From: @sjoerdmullender
Fixed by counting properly.
## Comment 21956
Date: 2016-03-25 09:59:12 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| Wrong typecast on character columns in prepared statements when using Umlaute | https://api.github.com/repos/MonetDB/MonetDB/issues/3930/comments | 0 | 2020-11-30T13:23:26Z | 2024-06-27T12:10:51Z | https://github.com/MonetDB/MonetDB/issues/3930 | 753,475,150 | 3,930 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-02-23 16:13:11 +0100
From: tim.brown
To: SQL devs <<bugs-sql>>
Version: 11.21.13 (Jul2015-SP2)
CC: @njnes, tim.brown
Last updated: 2016-04-11 11:16:12 +0200
## Comment 21816
Date: 2016-02-23 16:13:11 +0100
From: tim.brown
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36
Build Identifier:
Creating an embedded R aggregate with 3 or more parameters succeeds, but the aggregate is then not recognized in SELECT queries. Error message:
Error: SELECT: no such operator 'r_sw'
SQLState: 22000
ErrorCode: 0
In my example, I am trying to create a sliding window sum
Reproducible: Always
### Steps to Reproduce:
1.
CREATE AGGREGATE r_sw(val double, part varchar(255), endtime timestamp, starttime timestamp) RETURNS double LANGUAGE R {
library(data.table)
library(zoo)
DT=data.table(ag=aggr_group,pa=part,va=val,et=endtime,st=starttime)
setorder(DT,pa,et)
DT[, o:=mapply(function(x,y) DT[(et>=x & pa==y),.N], DT$st, DT$pa)]
as.data.frame(DT[,.(s:=rollapply(va,o,sum), by=pa)]$s)
};
2.
SELECT id, mygroup, r_sw(myval,mygroup,myend,mystart) from mytable group by id, mygroup
### Actual Results:
Error: SELECT: no such operator 'r_sw'
SQLState: 22000
ErrorCode: 0
### Expected Results:
Any resultset.
## Comment 21992
Date: 2016-03-30 13:53:39 +0200
From: @njnes
for 3 and more arguments general aggregates weren't handled at all. This is fixed, now an error in the R code or R binding is coming up.
## Comment 22027
Date: 2016-04-11 11:16:12 +0200
From: @sjoerdmullender
Jul2015-SP4 has been released.
| R aggregate not recognized when using 3 or more parameters | https://api.github.com/repos/MonetDB/MonetDB/issues/3929/comments | 0 | 2020-11-30T13:23:23Z | 2024-06-27T12:10:50Z | https://github.com/MonetDB/MonetDB/issues/3929 | 753,475,118 | 3,929 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-02-19 09:35:06 +0100
From: anthonin.bonnefoy
To: GDK devs <<bugs-common>>
Version: 11.21.5 (Jul2015)
Last updated: 2016-03-25 09:59:09 +0100
## Comment 21805
Date: 2016-02-19 09:35:06 +0100
From: anthonin.bonnefoy
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 Iceweasel/45.0
Build Identifier:
As summary says, when a virtual machine is killed, sql_logs/sql/log is empty on reboot.
The file is closed using fclose, that does not ensure the flush of kernel buffers.
In gdk_logger.c, adding the following lines seems to do the trick.
logger_fatal("logger_new: writing log file %s failed",
filename, 0, 0);
}
+ if (fsync(fileno(fp)) < 0) {
+ unlink(filename);
+ logger_fatal("logger_new: Fsync %s failed",
+ filename, 0, 0);
+ }
if (fclose(fp) < 0) {
unlink(filename);
logger_fatal("logger_new: closing log file %s failed",
Reproducible: Always
### Steps to Reproduce:
1. Start a virtual machine (i used qemu)
2. Create and start a dabase on it
3. Kill the virtual machine (just a CTRL-C is enough)
### Actual Results:
On reboot, sql_logs/sql/log is empty
## Comment 21806
Date: 2016-02-19 10:18:46 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [0074383d6391](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0074383d6391) 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=0074383d6391](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0074383d6391)
Changeset description:
Make sure important data is on disk.
This fixes bug #3928.
## Comment 21807
Date: 2016-02-19 10:20:41 +0100
From: @sjoerdmullender
I fixed this by indeed calling fsync (or fdatasync or _commit, depending on availability of system calls), but before doing that, we need to call fflush, or else the fsync still won't do anything.
## Comment 21955
Date: 2016-03-25 09:59:09 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| When killing a virtual machine, sql_logs/sql/log is empty | https://api.github.com/repos/MonetDB/MonetDB/issues/3928/comments | 0 | 2020-11-30T13:23:20Z | 2024-06-27T12:10:49Z | https://github.com/MonetDB/MonetDB/issues/3928 | 753,475,077 | 3,928 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-02-19 02:30:34 +0100
From: Anthony Damico <<ajdamico>>
To: SQL devs <<bugs-sql>>
Version: 11.21.13 (Jul2015-SP2)
CC: ajdamico, @njnes
Last updated: 2016-06-23 10:24:27 +0200
## Comment 21804
Date: 2016-02-19 02:30:34 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0
Build Identifier:
happens in latest monetdblite but not mserver&mclient with Jul2015-SP2
Reproducible: Always
### Steps to Reproduce:
library(MonetDB.R) load the MonetDB.R package (connects r to a monet database)
library(MonetDBLite) load MonetDBLite package (creates database files in R)
db <- dbConnect( MonetDBLite() , tempdir() )
dbSendQuery( db , "create table my_table (my_id clob, my_double double)" )
dbGetQuery( db , "SELECT COUNT( DISTINCT my_id ) AS unique_enrollees , QUANTILE( my_double , 0.25 ) AS some_quantile FROM my_table" )
### Actual Results:
Error in .local(conn, statement, ...) :
Unable to execute statement 'SELECT COUNT( DISTINCT my_id ) AS unique_enrollees , QUANTILE( my_double , 0.25 ) AS some_quantile F...'.
Server says 'SQLException:SQLparser:Errors encountered in query'.
### Expected Results:
Welcome to mclient, the MonetDB/SQL interactive terminal (Jul2015-SP2)
Database: MonetDB v11.21.13 (Jul2015-SP2), 'demo'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>create table my_table (my_id clob, my_double double);
operation successful (144.499ms)
sql>SELECT
more> COUNT( DISTINCT my_id ) AS unique_enrollees ,
more> QUANTILE( my_double , 0.25 ) AS some_quantile
more> FROM my_table;
+------------------+--------------------------+
| unique_enrollees | some_quantile |
+==================+==========================+
| 0 | null |
+------------------+--------------------------+
1 tuple (9.886ms)
sql>
## Comment 21809
Date: 2016-02-23 01:18:28 +0100
From: Anthony Damico <<ajdamico>>
not just monetdblite--
sql>create table my_table (my_id clob, my_double double);
operation successful (9.317ms)
sql>SELECT COUNT( DISTINCT my_id ) AS unique_enrollees , QUANTILE( my_double , 0.25 ) AS some_quantile FROM my_table;
+------------------+--------------------------+
| unique_enrollees | some_quantile |
+==================+==========================+
| 0 | null |
+------------------+--------------------------+
1 tuple (3.639ms)
However, with te latest version of the default branch (changeset c6a29bdbc3d5),
they fail with the following error (no crash, though):
sql>create table my_table (my_id clob, my_double double);
operation successful (1.789ms)
sql>SELECT COUNT( DISTINCT my_id ) AS unique_enrollees , QUANTILE( my_double , 0.25 ) AS some_quantile FROM my_table;
TypeException:user.s3_1[21]:'aggr.quantile' undefined in: aggr.quantile(X_35:bat[:dbl]);
program contains errors
## Comment 21919
Date: 2016-03-16 16:15:55 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [44b66098ae8a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=44b66098ae8a) 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=44b66098ae8a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=44b66098ae8a)
Changeset description:
fixed bug #3927, ie only rewrite distinct in aggregate expressions when
the other aggregates can be split in 2 phases.
## Comment 21920
Date: 2016-03-16 16:16:44 +0100
From: @njnes
Fixed, ie don't rewrite the distinct in the count because quantiles cannot be split into to phases.
| COUNT( distinct my_clob ) , QUANTILE( my_double , number ) fails in dev build | https://api.github.com/repos/MonetDB/MonetDB/issues/3927/comments | 0 | 2020-11-30T13:23:16Z | 2024-06-27T12:10:48Z | https://github.com/MonetDB/MonetDB/issues/3927 | 753,475,037 | 3,927 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-02-17 18:03:27 +0100
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2016-02-18 17:49:41 +0100
## Comment 21797
Date: 2016-02-17 18:03:27 +0100
From: @drstmane
[Triggered by bug #3923:]
In the latest default branch --- I have no idea since when --- we seem to no longer find / have bulk operator implementations for common standard operations for which we had / found bulk operator implementations in teh Jul2015 branch.
Here is an aggregated overview of all reported missing bulk operator implementations with all SQL tests in our "TestWeb":
$ echo ; PREFIX-default/mTests/sql -name \*.test.out | xargs grep -h --color -A1 '^WARNING To speedup ' | perl -pe 's| a bulk operator implementation is needed\n|\ta bulk operator implementation is needed:\t|' | grep -v '^--$' | sed -e 's|X_[0-9]*|X_?|g' -e 's|horigin=[0-9]|horigin=?|g' | sort -u ; echo
WARNING To speedup calc.< a bulk operator implementation is needed: X_?:bat[:bit] := mal.multiplex("calc":str,"<":str,X_?:bat[:dbl],1:dbl);
WARNING To speedup calc.== a bulk operator implementation is needed: X_?:bat[:bit] := mal.multiplex("calc":str,"==":str,X_?:bat[:dbl],X_?:bat[:dbl]);
WARNING To speedup calc.> a bulk operator implementation is needed: X_?:bat[:bit] := mal.multiplex("calc":str,">":str,X_?:bat[:dbl],X_?:bat[:dbl]);
WARNING To speedup calc.== a bulk operator implementation is needed: X_?:bat[:bit] := mal.multiplex("calc":str,"==":str,X_?:bat[:int],X_?:bat[:int]);
WARNING To speedup calc.== a bulk operator implementation is needed: X_?:bat[:bit] := mal.multiplex("calc":str,"==":str,X_?:bat[:lng],X_?:bat[:lng]);
WARNING To speedup calc.<= a bulk operator implementation is needed: X_?:bat[:bit] := mal.multiplex("calc":str,"<=":str,X_?:timestamp,X_?:bat[:timestamp]);
WARNING To speedup calc.>= a bulk operator implementation is needed: X_?:bat[:bit] := mal.multiplex("calc":str,">=":str,X_?:timestamp,X_?:bat[:timestamp]);
WARNING To speedup calc.* a bulk operator implementation is needed: X_?:bat[:dbl] := mal.multiplex("calc":str,"*":str,2:dbl,X_?:bat[:dbl]);
WARNING To speedup calc.- a bulk operator implementation is needed: X_?:bat[:dbl] := mal.multiplex("calc":str,"-":str,Anx:dbl,X_?:bat[:dbl]);
WARNING To speedup calc.- a bulk operator implementation is needed: X_?:bat[:dbl] := mal.multiplex("calc":str,"-":str,Any:dbl,X_?:bat[:dbl]);
WARNING To speedup calc.- a bulk operator implementation is needed: X_?:bat[:dbl] := mal.multiplex("calc":str,"-":str,Anz:dbl,X_?:bat[:dbl]);
WARNING To speedup calc.* a bulk operator implementation is needed: X_?:bat[:dbl] := mal.multiplex("calc":str,"*":str,Ax1:dbl,X_?:bat[:dbl]);
WARNING To speedup calc.* a bulk operator implementation is needed: X_?:bat[:dbl] := mal.multiplex("calc":str,"*":str,Ay1:dbl,X_?:bat[:dbl]);
WARNING To speedup calc.* a bulk operator implementation is needed: X_?:bat[:dbl] := mal.multiplex("calc":str,"*":str,Az1:dbl,X_?:bat[:dbl]);
WARNING To speedup calc./ a bulk operator implementation is needed: X_?:bat[:dbl] := mal.multiplex("calc":str,"/":str,X_?:bat[:dbl],2:dbl);
WARNING To speedup calc.* a bulk operator implementation is needed: X_?:bat[:dbl] := mal.multiplex("calc":str,"*":str,X_?:bat[:dbl],60:dbl);
WARNING To speedup calc.- a bulk operator implementation is needed: X_?:bat[:dbl] := mal.multiplex("calc":str,"-":str,X_?:bat[:dbl],X_?:bat[:dbl]);
WARNING To speedup calc.* a bulk operator implementation is needed: X_?:bat[:dbl] := mal.multiplex("calc":str,"*":str,X_?:bat[:dbl],X_?:bat[:dbl]);
WARNING To speedup calc.+ a bulk operator implementation is needed: X_?:bat[:dbl] := mal.multiplex("calc":str,"+":str,X_?:bat[:dbl],X_?:bat[:dbl]);
WARNING To speedup calc./ a bulk operator implementation is needed: X_?:bat[:dbl] := mal.multiplex("calc":str,"/":str,X_?:bat[:dbl],X_?:dbl);
WARNING To speedup calc.and a bulk operator implementation is needed: X_?:bat[:bit] := mal.multiplex("calc":str,"and":str,X_?:bat[:bit],X_?:bat[:bit]);
WARNING To speedup calc.ifthenelse a bulk operator implementation is needed: X_?:bat[:bit] := mal.multiplex("calc":str,"ifthenelse":str,X_?:bat[:bit],false:bit,X_?:bat[:bit]);
WARNING To speedup calc.ifthenelse a bulk operator implementation is needed: X_?:bat[:dbl] := mal.multiplex("calc":str,"ifthenelse":str,X_?:bat[:bit],X_?:bat[:dbl],0:dbl);
WARNING To speedup calc.isnil a bulk operator implementation is needed: X_?:bat[:bit] := mal.multiplex("calc":str,"isnil":str,X_?:bat[:bit]);
WARNING To speedup calc.second_interval a bulk operator implementation is needed: X_?:bat[:lng] := mal.multiplex("calc":str,"second_interval":str,X_?:bat[:wrd],13:int,0:int);
WARNING To speedup mkey.hash a bulk operator implementation is needed: X_?:bat[:wrd] := mal.multiplex("mkey":str,"hash":str,X_?:bat[:int]);
WARNING To speedup sql.get_value a bulk operator implementation is needed: X_?:bat[:lng] := mal.multiplex("sql":str,"get_value":str,X_?:bat[:str],X_?:bat[:str]);
WARNING To speedup sql.password a bulk operator implementation is needed: X_?:bat[:str] := mal.multiplex("sql":str,"password":str,X_?:bat[:str]);
WARNING To speedup user.bwdecompose a bulk operator implementation is needed: X_?:bat[:str] := mal.multiplex("user":str,"bwdecompose":str,X_?:bat[:date],A1:int);
WARNING To speedup user.columnsize a bulk operator implementation is needed: X_?:bat[:lng] := mal.multiplex("user":str,"columnsize":str,X_?:bat[:str],X_?:bat[:lng],X_?:bat[:lng]);
WARNING To speedup user.f2 a bulk operator implementation is needed: X_?:bat[:str] := mal.multiplex("user":str,"f2":str,X_?:bat[:dbl],A0:int,X_?:bat[:int]);
WARNING To speedup user.get_r a bulk operator implementation is needed: X_?:bat[:lng] := mal.multiplex("user":str,"get_r":str,X_?:bat[:str],A0:str,X_?:timestamp);
WARNING To speedup user.gettype a bulk operator implementation is needed: X_?:bat[:str] := mal.multiplex("user":str,"gettype":str,X_?:bat[:str]);
WARNING To speedup user.hashsize a bulk operator implementation is needed: X_?:bat[:lng] := mal.multiplex("user":str,"hashsize":str,X_?:bat[:bit],X_?:bat[:lng]);
WARNING To speedup user.heapsize a bulk operator implementation is needed: X_?:bat[:lng] := mal.multiplex("user":str,"heapsize":str,X_?:bat[:str],X_?:bat[:lng],X_?:bat[:int]);
WARNING To speedup user.imprintsize a bulk operator implementation is needed: X_?:bat[:lng] := mal.multiplex("user":str,"imprintsize":str,X_?:bat[:lng],X_?:bat[:str]);
WARNING To speedup user.mydateformat a bulk operator implementation is needed: X_?:bat[:str] := mal.multiplex("user":str,"mydateformat":str,X_?:bat[:date]);
As reference, here's the respective list for the Jul2015 branch:
$ echo ; find PREFIX-Jul2015/mTests/sql -name \*.test.out | xargs grep -h --color -A1 '^WARNING To speedup ' | perl -pe 's| a bulk operator implementation is needed\n|\ta bulk operator implementation is needed:\t|' | grep -v '^--$' | sed -e 's|X_[0-9]*|X_?|g' -e 's|horigin=[0-9]|horigin=?|g' | sort -u ; echo
WARNING To speedup calc.second_interval a bulk operator implementation is needed: X_?:bat[:oid,:lng] := mal.multiplex("calc":str,"second_interval":str,X_?:bat[:oid,:wrd],13:int,0:int);
WARNING To speedup sql.get_value a bulk operator implementation is needed: X_?:bat[:oid,:lng]{horigin=?} := mal.multiplex("sql":str,"get_value":str,X_?:bat[:oid,:str],X_?:bat[:oid,:str]);
WARNING To speedup sql.password a bulk operator implementation is needed: X_?:bat[:oid,:str]{horigin=?} := mal.multiplex("sql":str,"password":str,X_?:bat[:oid,:str]);
WARNING To speedup user.bwdecompose a bulk operator implementation is needed: X_?:bat[:oid,:str]{inline} := mal.multiplex("user":str,"bwdecompose":str,X_?:bat[:oid,:date],A1:int);
WARNING To speedup user.columnsize a bulk operator implementation is needed: X_?:bat[:oid,:lng]{horigin=?} := mal.multiplex("user":str,"columnsize":str,X_?:bat[:oid,:str],X_?:bat[:oid,:lng],X_?:bat[:oid,:lng]);
WARNING To speedup user.f2 a bulk operator implementation is needed: X_?:bat[:oid,:str]{inline} := mal.multiplex("user":str,"f2":str,X_?:bat[:oid,:dbl],A0:int,X_?:bat[:oid,:int]);
WARNING To speedup user.gettype a bulk operator implementation is needed: X_?:bat[:oid,:str]{horigin=?} := mal.multiplex("user":str,"gettype":str,X_?:bat[:oid,:str]);
WARNING To speedup user.hashsize a bulk operator implementation is needed: X_?:bat[:oid,:lng]{horigin=?} := mal.multiplex("user":str,"hashsize":str,X_?:bat[:oid,:bit],X_?:bat[:oid,:lng]);
WARNING To speedup user.heapsize a bulk operator implementation is needed: X_?:bat[:oid,:lng]{horigin=?} := mal.multiplex("user":str,"heapsize":str,X_?:bat[:oid,:str],X_?:bat[:oid,:lng],X_?:bat[:oid,:int]);
WARNING To speedup user.imprintsize a bulk operator implementation is needed: X_?:bat[:oid,:lng]{horigin=?} := mal.multiplex("user":str,"imprintsize":str,X_?:bat[:oid,:lng],X_?:bat[:oid,:str]);
WARNING To speedup user.mydateformat a bulk operator implementation is needed: X_?:bat[:oid,:str]{inline} := mal.multiplex("user":str,"mydateformat":str,X_?:bat[:oid,:date]);
## Comment 21798
Date: 2016-02-17 18:12:47 +0100
From: @sjoerdmullender
Changeset [381be77ea401](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=381be77ea401) is the culprit.
## Comment 21801
Date: 2016-02-18 17:42:40 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [8ac7aa0ccb0e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8ac7aa0ccb0e) 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=8ac7aa0ccb0e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=8ac7aa0ccb0e)
Changeset description:
The inline property is only for the mal block of an inline function.
Don't misuse the property on the mal block of to-be-inlined multiplex
instructions, since the mal block is shared with all multiplex
instructions, also ones that don't refer to inlinable functions.
This fixes bug #3926.
This should also have a positive effect on bug #3923 in that it will
stop the flood of messages in the log.
## Comment 21802
Date: 2016-02-18 17:46:23 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [63f4641d3609](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=63f4641d3609) 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=63f4641d3609](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=63f4641d3609)
Changeset description:
Test for bug #3926.
The problem occurred when a function used mal.mutiplex on both an
inline MAL function and a "normal" function that has a bulk
implementation.
## Comment 21803
Date: 2016-02-18 17:49:41 +0100
From: @sjoerdmullender
Closing as fixed. The problematic code was never released.
| "bulk operator implementations" got lost(?) in default branch since/after Jul2015 branch | https://api.github.com/repos/MonetDB/MonetDB/issues/3926/comments | 0 | 2020-11-30T13:23:13Z | 2024-06-27T12:10:47Z | https://github.com/MonetDB/MonetDB/issues/3926 | 753,474,996 | 3,926 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-02-17 12:33:20 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.13 (Jul2015-SP2)
CC: ajdamico
Last updated: 2016-02-24 15:49:00 +0100
## Comment 21794
Date: 2016-02-17 12:33:20 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0
Build Identifier:
NULL not handled properly?
Reproducible: Always
### Steps to Reproduce:
library(MonetDB.R)
library(MonetDBLite)
db <- dbConnect( MonetDBLite() , tempdir() )
dbGetQuery( db , "SELECT NULL AS col1" ) error
dbWriteTable( db , 'mtcars' , mtcars )
dbGetQuery( db , "SELECT NULL AS col1 , mpg AS col2 FROM mtcars" ) error
### Actual Results:
> dbGetQuery( db , "SELECT NULL AS col1 , mpg AS col2 FROM mtcars" )
Warning: stack imbalance in '.Call', 59 then 58
Warning: stack imbalance in '<-', 57 then 56
Warning: stack imbalance in '{', 54 then 53
Warning: stack imbalance in '<-', 48 then 47
Error in .local(conn, statement, ...) :
Unable to execute statement 'SELECT NULL AS col1 , mpg AS col2 FROM mtcars'.
Server says 'Conversion error'.
### Expected Results:
same as mserver
## Comment 21795
Date: 2016-02-17 12:42:11 +0100
From: Anthony Damico <<ajdamico>>
fwiw, this command works as i would have expected.. might just be a problem with standalone NULL used to create a column of missings?
> dbGetQuery( db , "SELECT NULL * 7 AS col1" )
col1
1 NA
## Comment 21796
Date: 2016-02-17 12:55:43 +0100
From: @hannesmuehleisen
https://www.youtube.com/watch?v=yu_RRBh_EKU
## Comment 21817
Date: 2016-02-24 15:32:27 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [210182c89c24](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=210182c89c24) 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=210182c89c24](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=210182c89c24)
Changeset description:
more DBI compliance and void result bat conversion (Bug #3925)
| SELECT NULL AS.. illegal in MonetDBLite but legal otherwise | https://api.github.com/repos/MonetDB/MonetDB/issues/3925/comments | 0 | 2020-11-30T13:23:09Z | 2024-06-27T12:10:46Z | https://github.com/MonetDB/MonetDB/issues/3925 | 753,474,948 | 3,925 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-02-12 10:12:59 +0100
From: @skinkie
To: clients devs <<bugs-clients>>
Version: 11.21.19 (Jul2015-SP4)
CC: @njnes, renalkoclok
Last updated: 2020-06-03 09:07:24 +0200
## Comment 21784
Date: 2016-02-12 10:12:59 +0100
From: @skinkie
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36
Build Identifier:
One of my users is using Tableau to kill MonetDB. He is quite successfull at it, merovingian.log reports:
2016-02-12 09:04:04 ERR htm[17552]: mserver5: sql_result.c:1650: mvc_export_operation: Assertion `m->type == Q_SCHEMA || m->type == Q_TRANS' failed.
2016-02-12 09:08:10 ERR htm[18601]: mserver5: sql_result.c:1650: mvc_export_operation: Assertion `m->type == Q_SCHEMA || m->type == Q_TRANS' failed.
2016-02-12 09:15:21 ERR htm[19039]: mserver5: sql_result.c:1650: mvc_export_operation: Assertion `m->type == Q_SCHEMA || m->type == Q_TRANS' failed.
2016-02-12 09:15:21 ERR htm[19039]: mserver5: sql_result.c:1650: mvc_export_operation: Assertion `m->type == Q_SCHEMA || m->type == Q_TRANS' failed.
2016-02-12 09:16:23 ERR htm[19423]: mserver5: sql_result.c:1650: mvc_export_operation: Assertion `m->type == Q_SCHEMA || m->type == Q_TRANS' failed.
2016-02-12 09:16:28 ERR htm[19508]: mserver5: sql_result.c:1650: mvc_export_operation: Assertion `m->type == Q_SCHEMA || m->type == Q_TRANS' failed.
2016-02-12 09:17:50 ERR htm[19585]: mserver5: sql_result.c:1650: mvc_export_operation: Assertion `m->type == Q_SCHEMA || m->type == Q_TRANS' failed.
2016-02-12 09:17:56 ERR htm[19633]: mserver5: sql_result.c:1650: mvc_export_operation: Assertion `m->type == Q_SCHEMA || m->type == Q_TRANS' failed.
2016-02-12 09:18:06 ERR htm[19690]: mserver5: sql_result.c:1650: mvc_export_operation: Assertion `m->type == Q_SCHEMA || m->type == Q_TRANS' failed.
2016-02-12 09:35:41 ERR htm[19720]: mserver5: sql_result.c:1650: mvc_export_operation: Assertion `m->type == Q_SCHEMA || m->type == Q_TRANS' failed.
2016-02-12 09:39:29 ERR htm[20790]: mserver5: sql_result.c:1650: mvc_export_operation: Assertion `m->type == Q_SCHEMA || m->type == Q_TRANS' failed.
ODBC is used so I might be able to catch the queries. It would be great if the logfile contained a list of queries in the system when the crash is created.
Reproducible: Always
### Steps to Reproduce:
Will investigate shortly the queries used.
MonetDB 5 server v11.22.0 (64-bit, 64-bit oids, 128-bit integers)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 31.4GiB available memory, 8 available cpu cores
Libraries:
libpcre: 8.33 2013-05-28 (compiled with 8.33)
openssl: OpenSSL 1.0.2d 9 Jul 2015 (compiled with OpenSSL 1.0.2d 9 Jul 2015)
libxml2: 2.9.1 (compiled with 2.9.1)
Compiled by: skinkie@bigdata.openebs.nl (x86_64-unknown-linux-gnu)
Compilation: gcc -O3 -pipe -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code
Linking : /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64
## Comment 21785
Date: 2016-02-12 15:28:50 +0100
From: @skinkie
Niels, Sjoerd, is there any tip you can give me for debugging this? The query logging interfaces doesn't seem to log the problem, or the issue can't be reproduced via replaying it in mclient.
## Comment 21790
Date: 2016-02-16 10:04:15 +0100
From: @sjoerdmullender
See e.g. bug #3824 comment 6 on how to create a log from the ODBC driver.
## Comment 21792
Date: 2016-02-16 14:21:07 +0100
From: @skinkie
Created attachment 385
ODBC logfile. Host and password removed.
Thanks Sjoerd for the useful hint. Specifically for Tableau I couldn't run the program from the cmd line, but required some magic in the shortcut instead, some strange copy protection. For reference below;
C:\Windows\System32\cmd.exe /c "SET ODBCDEBUG=C:\test\test.log && START /D ^"C:\Program Files\Tableau\Tableau 9.2\bin^" tableau.exe"
0 0x00007f18e650a535 in raise () from /lib64/libc.so.6
1 0x00007f18e650b9b8 in abort () from /lib64/libc.so.6
2 0x00007f18e65035f2 in ?? () from /lib64/libc.so.6
3 0x00007f18e65036a2 in __assert_fail () from /lib64/libc.so.6
4 0x00007f18e22edd89 in mvc_export_operation (b=0x7f18a861b870,
s=0x7f18a80033b0, w=0x7f18e241ea82 "") at sql_result.c:1650
5 0x00007f18e229a4f6 in mvc_export_operation_wrap (cntxt=0x7f18e3be9c60,
mb=0x7f18a864b6d0, stk=0x7f18a864b7c0, pci=0x7f18a8686d40) at sql.c:3301
6 0x00007f18e9690aa8 in runMALsequence (cntxt=0x7f18e3be9c60,
mb=0x7f18a864b6d0, startpc=1, stoppc=0, stk=0x7f18a864b7c0, env=0x0,
pcicaller=0x0) at mal_interpreter.c:632
7 0x00007f18e968fb7d in callMAL (cntxt=0x7f18e3be9c60, mb=0x7f18a864b6d0,
env=0x7f18cb077a58, argv=0x7f18cb077b00, debug=0 '\000')
at mal_interpreter.c:436
8 0x00007f18e22af038 in SQLexecutePrepared (c=0x7f18e3be9c60,
be=0x7f18a861b870, q=0x7f18a868f3a0) at sql_execute.c:328
9 0x00007f18e22af544 in SQLengineIntern (c=0x7f18e3be9c60, be=0x7f18a861b870)
at sql_execute.c:388
10 0x00007f18e22ad8d7 in SQLengine (c=0x7f18e3be9c60) at sql_scenario.c:1326
11 0x00007f18e96bb1b4 in runPhase (c=0x7f18e3be9c60, phase=4)
at mal_scenario.c:531
12 0x00007f18e96bb3ed in runScenarioBody (c=0x7f18e3be9c60)
at mal_scenario.c:575
---Type <return> to continue, or q <return> to quit---
13 0x00007f18e96bb510 in runScenario (c=0x7f18e3be9c60) at mal_scenario.c:595
14 0x00007f18e96bcecf in MSserveClient (dummy=0x7f18e3be9c60)
at mal_session.c:445
15 0x00007f18e96bc92f in MSscheduleClient (command=0x7f18a80008d0 "",
challenge=0x7f18cb077ef0 "fQfS4VFfW", fin=0x7f18a80041d0,
fout=0x7f18a80033b0) at mal_session.c:330
16 0x00007f18e97755f1 in doChallenge (data=0x7f18d40008d0) at mal_mapi.c:184
17 0x00007f18e6885f3a in start_thread () from /lib64/libpthread.so.0
18 0x00007f18e65bfdad in clone () from /lib64/libc.so.6
(gdb) list
1645 int
1646 mvc_export_operation(backend *b, stream *s, str w)
1647 {
1648 mvc *m = b->mvc;
1649
1650 assert(m->type == Q_SCHEMA || m->type == Q_TRANS);
1651 if (m->type == Q_SCHEMA) {
1652 if (!s || mnstr_write(s, "&3\n", 3, 1) != 1)
1653 return -1;
1654 } else {
(gdb) p *m
$1 = {
errstr = "\000ELECT: identifier 'Classificatie 0_60 (copy)' unknown", '\000' <repeats 8137 times>, sa = 0x7f18a861bbd0, qc = 0x7f18a80045a0, clientid = 4,
scanner = {rs = 0x7f18a80041d0, ws = 0x7f18a80033b0, log = 0x0, yynext = 0,
yylast = 41, yysval = 13, yyval = 382, yycur = 0, yybak = 0 '\000',
as = 0, key = 0, started = 0, mode = LINE_1, schema = 0x0, errstr = 0x0},
params = 0x0, forward = 0x0, vars = 0x7f18a810ec40, topvars = 10,
sizevars = 32, frame = 1, use_views = 0, args = 0x7f18a80030f0, argc = 0,
argmax = 32, sym = 0x7f18a8637520, point_query = 0, user_id = 3,
role_id = 3, last_id = -1, rowcnt = 90, timezone = 3600000, cache = 100,
caching = 100, history = 0, reply_size = 1000, sizeheader = 1, debug = 0,
emode = 1 '\001', emod = 0 '\000', session = 0x7f18a8003210, type = 0,
pushdown = 1, label = 0, cascade_action = 0x0, opt_stats = {0, 0, 0, 0, 0,
0, 0, 0}, result_id = 3, results = 0x0}
> Attached file: [odbc.log.gz](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3924_odbc.log.gz_385) (application/x-gzip, 55577 bytes)
> Description: ODBC logfile. Host and password removed.
| mserver5: sql_result.c:1650: mvc_export_operation: Assertion `m->type == Q_SCHEMA || m->type == Q_TRANS' failed. | https://api.github.com/repos/MonetDB/MonetDB/issues/3924/comments | 0 | 2020-11-30T13:23:06Z | 2024-06-28T13:13:33Z | https://github.com/MonetDB/MonetDB/issues/3924 | 753,474,917 | 3,924 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-02-12 10:03:16 +0100
From: @skinkie
To: MonetDB5 devs <<bugs-monetdb5>>
Version: -- development
CC: @drstmane
Last updated: 2016-02-18 17:42:37 +0100
## Comment 21783
Date: 2016-02-12 10:03:16 +0100
From: @skinkie
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36
Build Identifier:
Currently I have connected some Tableau users to MonetDB. While things from user perspective were better than their SQLserver experience I noticed that MonetDB is flooding the merovingian.log with useful comments such as:
2016-02-12 09:52:01 MSG htm[20952]: WARNING To speedup calc.ifthenelse a bulk operator implementation is needed
2016-02-12 09:52:01 MSG htm[20952]: X_874:bat[:wrd] := mal.multiplex("calc":str,"ifthenelse":str,X_873:bat[:bit],X_839:bat[:wrd],A7:wrd);
2016-02-12 09:52:01 MSG htm[20952]: WARNING To speedup calc.isnil a bulk operator implementation is needed
2016-02-12 09:52:01 MSG htm[20952]: X_881:bat[:bit] := mal.multiplex("calc":str,"isnil":str,X_880:bat[:int]);
2016-02-12 09:52:01 MSG htm[20952]: WARNING To speedup calc.ifthenelse a bulk operator implementation is needed
2016-02-12 09:52:01 MSG htm[20952]: X_887:bat[:int] := mal.multiplex("calc":str,"ifthenelse":str,X_881:bat[:bit],X_886:bat[:int],X_880:bat[:int]);
2016-02-12 09:52:01 MSG htm[20952]: WARNING To speedup calc.- a bulk operator implementation is needed
2016-02-12 09:52:01 MSG htm[20952]: X_958:bat[:lng] := mal.multiplex("calc":str,"-":str,X_955:bat[:lng],X_957:bat[:lng]);
Obviously I could report them all individually as feature requests, but I would like suggest something different. For each operator that hits this an internal statistics is kept. So the number occurrences are known as statistics instead of annotated MAL statements. If an implementator reviews this statistic, specific feature requests can be asked for based on the workload.
Reproducible: Always
MonetDB 5 server v11.22.0 (64-bit, 64-bit oids, 128-bit integers)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 31.4GiB available memory, 8 available cpu cores
Libraries:
libpcre: 8.33 2013-05-28 (compiled with 8.33)
openssl: OpenSSL 1.0.2d 9 Jul 2015 (compiled with OpenSSL 1.0.2d 9 Jul 2015)
libxml2: 2.9.1 (compiled with 2.9.1)
Compiled by: skinkie@bigdata.openebs.nl (x86_64-unknown-linux-gnu)
Compilation: gcc -O3 -pipe -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code
Linking : /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64
## Comment 21786
Date: 2016-02-12 22:07:33 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [9ff44367bf1d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9ff44367bf1d) made by Martin Kersten <mk@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9ff44367bf1d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9ff44367bf1d)
Changeset description:
Use a single warning when a bulk operation is missing
Now only 1 message is left behind in the log per mserver session.
Fixes bug #3923 while retaining a hint.
## Comment 21791
Date: 2016-02-16 10:07:07 +0100
From: @sjoerdmullender
You only get these warnings when running with assertions enabled. Since that is a setting you should use for debugging and not for production code (assertions slow down the code), I consider this issue not a bug.
## Comment 21793
Date: 2016-02-17 10:32:12 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [e69c272f4cfd](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e69c272f4cfd) 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=e69c272f4cfd](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e69c272f4cfd)
Changeset description:
backout of changeset [9ff44367bf1d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9ff44367bf1d) it does not solve bug #3923,
but rather limits a valuable debugging feature.
The symptoms reported in bug #3923 were/are not caused by bug in the code,
but rather by using an assertion-enabled (debug?-) build in a "production setting".
Simply disabling assertions avoid the symtopms reported in the bug report
(see also Sjoerd's comment in the bug report).
Changeset [9ff44367bf1d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9ff44367bf1d) resulted in
(1) priting (one) warning regardless of whether assertions are enabled or not
(2) even with assertions enabled, only a single warning was issues,
whichever happened to arbitrarily come first,
while all subsequent (very likely different!) warnings were "swallowed"
limiting the use of these warning severely if not removing it completely.
As a side not, the "scarry" part of bug #3923 is that the logs suggest
that we do not even have (or find) bulk operations for very common
standard opertions, including substration ("-") of 64-bit interger values
("lng") --- we surely should further investigate this,
and backing out changeset [9ff44367bf1d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9ff44367bf1d) will help with this.
## Comment 21800
Date: 2016-02-18 17:42:37 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [8ac7aa0ccb0e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8ac7aa0ccb0e) 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=8ac7aa0ccb0e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=8ac7aa0ccb0e)
Changeset description:
The inline property is only for the mal block of an inline function.
Don't misuse the property on the mal block of to-be-inlined multiplex
instructions, since the mal block is shared with all multiplex
instructions, also ones that don't refer to inlinable functions.
This fixes bug #3926.
This should also have a positive effect on bug #3923 in that it will
stop the flood of messages in the log.
| Log flooding when suggesting bulk operators | https://api.github.com/repos/MonetDB/MonetDB/issues/3923/comments | 0 | 2020-11-30T13:23:03Z | 2024-06-28T07:19:56Z | https://github.com/MonetDB/MonetDB/issues/3923 | 753,474,881 | 3,923 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-02-12 02:22:35 +0100
From: Anthony Damico <<ajdamico>>
To: GDK devs <<bugs-common>>
Version: 11.21.13 (Jul2015-SP2)
CC: ajdamico, @hannesmuehleisen, @njnes
Last updated: 2016-03-25 09:58:57 +0100
## Comment 21782
Date: 2016-02-12 02:22:35 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0
Build Identifier:
should the second result be NaN or Inf?
the result of MAX( ) appears to work
if the column contains both -Inf and also Inf, then i believe the column *should* return NaN
Reproducible: Always
### Steps to Reproduce:
library(MonetDBLite)
library(MonetDB.R)
con <- dbConnect( MonetDBLite() , tempdir() )
x <- mtcars
x[1,1] <- Inf
dbWriteTable( con , 'x' , x )
dbGetQuery( con , "SELECT MIN( mpg ) , AVG( mpg ) , MAX( mpg ) FROM x" )
### Actual Results:
> dbGetQuery( con , "SELECT MIN( mpg ) , AVG( mpg ) , MAX( mpg ) FROM x" )
L1 L2 L3
1 10.4 NaN Inf
### Expected Results:
L2 = Inf, i think? but not sure if this is my R bias
thanks!
## Comment 21833
Date: 2016-02-26 16:03:14 +0100
From: @sjoerdmullender
This is an instance of a bigger problem: SQL doesn't allow for Inf (+ or -) or NaN. And hence, MonetDB doesn't allow for those values either. The R interface is now a backdoor through which those values can be introduced to the MonetDB internals, which are not prepared to handle them. In other words, garbage in, garbage out.
## Comment 21835
Date: 2016-02-26 17:00:15 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [c3894dbe6e00](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c3894dbe6e00) 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=c3894dbe6e00](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c3894dbe6e00)
Changeset description:
Bug #3922, do not import NaN or Inf
## Comment 21952
Date: 2016-03-25 09:58:57 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| AVG( column ) returns NaN rather than Inf when column contains Inf | https://api.github.com/repos/MonetDB/MonetDB/issues/3922/comments | 0 | 2020-11-30T13:23:00Z | 2024-06-27T12:10:43Z | https://github.com/MonetDB/MonetDB/issues/3922 | 753,474,845 | 3,922 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-02-11 15:27:28 +0100
From: @hannesmuehleisen
To: SQL devs <<bugs-sql>>
Version: 11.19.3 (Oct2014)
CC: ajdamico, @njnes
Last updated: 2016-03-25 09:59:32 +0100
## Comment 21778
Date: 2016-02-11 15:27:28 +0100
From: @hannesmuehleisen
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.103 Safari/537.36
Build Identifier:
Running these queries produces a crash.
create table ep (pde_id clob, bene_id clob, srvc_dt clob, prod_srvc_id clob, plan_cntrct_rec_id clob, plan_pbp_rec_num clob, qty_dspnsd_num double, days_suply_num double, drug_cvrg_stus_cd clob, ctstrphc_cvrg_cd clob, ptnt_pay_amt double, othr_troop_amt double, lics_amt double, plro_amt double, cvrd_d_plan_pd_amt double, ncvrd_plan_pd_amt double, tot_rx_cst_amt double, benefit_phase clob, ccw_pharmacy_id double, ccw_prscrbr_id double, pde_prscrbr_id_frmt_cd clob, formulary_id clob, frmlry_rx_id clob, rptd_gap_dscnt_num double, brnd_gnrc_cd clob, rx_c_cov double, rx_c_lics double, rx_c_tpc double, rx_c_tdc double, rx_c_oop double, rx_c_gdc double, rx_e_cov double, rx_e_lics double, rx_e_tpc double, rx_e_tdc double, rx_e_oop double, rx_e_gdc double, rx_o_cov double, rx_o_lics double, rx_o_tpc double, rx_o_tdc double, rx_o_oop double, rx_o_gdc double, rx_ce_cov double, rx_ce_lics double, rx_ce_tpc double, rx_ce_tdc double, rx_ce_oop double, rx_ce_gdc double, rx_co_cov double, rx_co_lics double, rx_co_tpc double, rx_co_tdc double, rx_co_oop double, rx_co_gdc double, rx_eo_cov double, rx_eo_lics double, rx_eo_tpc double, rx_eo_tdc double, rx_eo_oop double, rx_eo_gdc double, rx_ceo_cov double, rx_ceo_lics double, rx_ceo_tpc double, rx_ceo_tdc double, rx_ceo_oop double, rx_ceo_gdc double);
create table aep13 as select bene_id ,CAST( COUNT( DISTINCT CASE WHEN drug_cvrg_stus_cd IN ('c') THEN ccw_prscrbr_id END ) AS DOUBLE ) as rx_c_pre,CAST( COUNT( DISTINCT CASE WHEN drug_cvrg_stus_cd IN ('c') THEN ccw_pharmacy_id END ) AS DOUBLE ) as rx_c_pha from ep group by bene_id WITH DATA;
Assertion: >Assertion failed: (cname), function exp_column, file rel_exp.c, line 464.
Stack trace:
frame 0: 0x00007fff95b26002 libsystem_kernel.dylib`__pthread_kill + 10
frame 1: 0x00007fff9aed75c5 libsystem_pthread.dylib`pthread_kill + 90
frame 2: 0x00007fff901026e7 libsystem_c.dylib`abort + 129
frame 3: 0x00007fff900c9df8 libsystem_c.dylib`__assert_rtn + 321
frame 4: 0x0000000104d8bc8d lib_sql.so`exp_column(sa=0x0000000104740e20, rname=0x0000000000000000, cname=0x0000000000000000, t=0x0000000102137590, card=3, has_nils=1, intern=0) + 141 at rel_exp.c:464
frame 5: 0x0000000104db9f86 lib_sql.so`rel_groupby_distinct2(changes=0x0000700000809794, sql=0x000000010205e210, rel=0x00000001021360b0) + 1126 at rel_optimizer.c:4583
frame 6: 0x0000000104da7ed1 lib_sql.so`rel_groupby_distinct(changes=0x0000700000809794, sql=0x000000010205e210, rel=0x00000001021360b0) + 481 at rel_optimizer.c:4643
frame 7: 0x0000000104d9a1ee lib_sql.so`rewrite(sql=0x000000010205e210, rel=0x00000001021360b0, rewriter=(lib_sql.so`rel_groupby_distinct at rel_optimizer.c:4620), has_changes=0x00007000008098ac) + 430 at rel_optimizer.c:7678
frame 8: 0x0000000104d9a128 lib_sql.so`rewrite(sql=0x000000010205e210, rel=0x0000000102136250, rewriter=(lib_sql.so`rel_groupby_distinct at rel_optimizer.c:4620), has_changes=0x00007000008098ac) + 232 at rel_optimizer.c:7664
frame 9: 0x0000000104d9a1d4 lib_sql.so`rewrite(sql=0x000000010205e210, rel=0x0000000102139eb0, rewriter=(lib_sql.so`rel_groupby_distinct at rel_optimizer.c:4620), has_changes=0x00007000008098ac) + 404 at rel_optimizer.c:7675
frame 10: 0x0000000104d984c4 lib_sql.so`_rel_optimizer(sql=0x000000010205e210, rel=0x0000000102139eb0, level=0) + 1524 at rel_optimizer.c:7848
frame 11: 0x0000000104d97e9d lib_sql.so`rel_optimizer(sql=0x000000010205e210, rel=0x0000000102139eb0) + 45 at rel_optimizer.c:7909
frame 12: 0x0000000104c56185 lib_sql.so`sql_symbol2relation(c=0x000000010205e210, sym=0x0000000102132c10) + 101 at sql.c:118
frame 13: 0x0000000104c842d5 lib_sql.so`SQLparser(c=0x0000000103006340) + 3477 at sql_scenario.c:1189
frame 14: 0x0000000100069a70 libmonetdb5.19.dylib`runPhase(c=0x0000000103006340, phase=1) + 112 at mal_scenario.c:531
frame 15: 0x00000001000696e5 libmonetdb5.19.dylib`runScenarioBody(c=0x0000000103006340) + 485 at mal_scenario.c:567
frame 16: 0x000000010006947b libmonetdb5.19.dylib`runScenario(c=0x0000000103006340) + 91 at mal_scenario.c:595
frame 17: 0x000000010006b72e libmonetdb5.19.dylib`MSserveClient(dummy=0x0000000103006340) + 494 at mal_session.c:445
Reproducible: Always
## Comment 21779
Date: 2016-02-11 15:33:39 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [c9829154dcbb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c9829154dcbb) 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=c9829154dcbb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c9829154dcbb)
Changeset description:
Test for Bug #3921
## Comment 21781
Date: 2016-02-11 16:18:16 +0100
From: @hannesmuehleisen
This was naturally found by our resident bug-bloodhound A.D.
## Comment 21788
Date: 2016-02-13 13:34:23 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [3f7b5a1465d3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3f7b5a1465d3) 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=3f7b5a1465d3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3f7b5a1465d3)
Changeset description:
fixed bug #3920 and 3921, make sure we name aggregation expressions
properly.
## Comment 21789
Date: 2016-02-13 19:11:48 +0100
From: @njnes
fixed by adding names.
## Comment 21969
Date: 2016-03-25 09:59:32 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| Creating a table from a complex query crashes mserver or triggers assertion | https://api.github.com/repos/MonetDB/MonetDB/issues/3921/comments | 0 | 2020-11-30T13:22:57Z | 2024-06-27T12:10:42Z | https://github.com/MonetDB/MonetDB/issues/3921 | 753,474,824 | 3,921 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-02-11 15:24:49 +0100
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2016-06-23 10:24:36 +0200
## Comment 21777
Date: 2016-02-11 15:24:49 +0100
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0
Build Identifier:
SQL query:
SELECT DISTINCT cast(null as char(1)) AS "PROCEDURE_CAT", "schemas"."name" AS "PROCEDURE_SCHEM", "functions"."name" AS "PROCEDURE_NAME"
, (SELECT COUNT(*) FROM "sys"."args" where "args"."func_id" = "functions"."id" and "args"."number" = 0) AS "PROCEDURE_TYPE"
, CAST(CASE "functions"."language" WHEN 0 THEN "functions"."mod" || '.' || "functions"."func" ELSE "schemas"."name" || '.' || "functions"."name" END AS VARCHAR(1500)) AS "SPECIFIC_NAME"
FROM "sys"."functions", "sys"."schemas" WHERE "functions"."schema_id" = "schemas"."id"
AND "functions"."type" = 2;
results in an assertion failure: dev/sql/backends/monet5/rel_bin.c:2641: rel2bin_groupby: Assertion `0' failed.
Same query but without the DISTINCT keyword does not result in an assertion failure, but returns error: zero_or_one: cardinality violation (45>1)
This is not correct either. It should produce a normal table result.
Same query but without the DISTINCT keyword and without the part "cast(null as char(1)) AS "PROCEDURE_CAT", "
does execute and returns a table result.
So something strange is happening.
More test queries are presented in Steps to Reproduce section.
Reproducible: Always
### Steps to Reproduce:
1. start mserver5 (build from default)
2. start mclient
3. run SQL queries:
SELECT cast(null as char(1)) AS "PROCEDURE_CAT", "schemas"."name" AS "PROCEDURE_SCHEM", "functions"."name" AS "PROCEDURE_NAME"
, (SELECT COUNT(*) FROM "sys"."args" where "args"."func_id" = "functions"."id" and "args"."number" = 0) AS "PROCEDURE_TYPE"
, CAST(CASE "functions"."language" WHEN 0 THEN "functions"."mod" || '.' || "functions"."func" ELSE "schemas"."name" || '.' || "functions"."name" END AS VARCHAR(1500)) AS "SPECIFIC_NAME"
FROM "sys"."functions", "sys"."schemas" WHERE "functions"."schema_id" = "schemas"."id"
AND "functions"."type" = 2
AND "schemas"."name" = 'sys'
ORDER BY "PROCEDURE_SCHEM", "PROCEDURE_NAME", "SPECIFIC_NAME";
SELECT DISTINCT cast(null as char(1)) AS "PROCEDURE_CAT", "schemas"."name" AS "PROCEDURE_SCHEM", "functions"."name" AS "PROCEDURE_NAME"
, (SELECT COUNT(*) FROM "sys"."args" where "args"."func_id" = "functions"."id" and "args"."number" = 0) AS "PROCEDURE_TYPE"
, CAST(CASE "functions"."language" WHEN 0 THEN "functions"."mod" || '.' || "functions"."func" ELSE "schemas"."name" || '.' || "functions"."name" END AS VARCHAR(1500)) AS "SPECIFIC_NAME"
FROM "sys"."functions", "sys"."schemas" WHERE "functions"."schema_id" = "schemas"."id"
AND "functions"."type" = 2
AND "schemas"."name" = 'sys'
ORDER BY "PROCEDURE_SCHEM", "PROCEDURE_NAME", "SPECIFIC_NAME";
### Actual Results:
bash-4.3$ mclient -p 41000
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.22.0 (unreleased), 'demo'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>SELECT "schemas"."name" AS "PROCEDURE_SCHEM", "functions"."name" AS "PROCEDURE_NAME"
more>, CAST((SELECT COUNT(*) FROM "sys"."args" where "args"."func_id" = "functions"."id" and "args"."number" = 0) AS smallint) AS "PROCEDURE_TYPE"
more>, CAST(CASE "functions"."language" WHEN 0 THEN "functions"."mod" || '.' || "functions"."func" ELSE "schemas"."name" || '.' || "functions"."name" END AS VARCHAR(1500)) AS "SPECIFIC_NAME"
more>FROM "sys"."functions", "sys"."schemas" WHERE "functions"."schema_id" = "schemas"."id"
more>AND "functions"."type" = 2
more>AND "schemas"."name" = 'sys'
more>ORDER BY "PROCEDURE_SCHEM", "PROCEDURE_NAME", "SPECIFIC_NAME";
+-----------------+------------------+----------------+----------------------+
| PROCEDURE_SCHEM | PROCEDURE_NAME | PROCEDURE_TYPE | SPECIFIC_NAME |
+=================+==================+================+======================+
| sys | analyze | 1 | sys.analyze |
| sys | analyze | 1 | sys.analyze |
| sys | analyze | 1 | sys.analyze |
| sys | analyze | 1 | sys.analyze |
| sys | clearrejects | 0 | sys.clearrejects |
| sys | evalalgebra | 1 | sys.evalalgebra |
| sys | fitsattach | 1 | sys.fitsattach |
| sys | fitsload | 1 | sys.fitsload |
| sys | flush_log | 0 | sys.flush_log |
| sys | listdir | 1 | sys.listdir |
| sys | listdirpat | 1 | sys.listdirpat |
| sys | netcdf_attach | 1 | sys.netcdf_attach |
| sys | netcdf_importvar | 1 | sys.netcdf_importvar |
| sys | pause | 1 | sys.pause |
| sys | pause | 1 | sys.pause |
| sys | querylog | 1 | sys.querylog |
| sys | querylog_disable | 0 | sys.querylog_disable |
| sys | querylog_empty | 0 | sys.querylog_empty |
| sys | querylog_enable | 0 | sys.querylog_enable |
| sys | querylog_enable | 1 | sys.querylog_enable |
| sys | resume | 1 | sys.resume |
| sys | resume | 1 | sys.resume |
| sys | reuse | 1 | sys.reuse |
| sys | setsession | 1 | sys.setsession |
| sys | settimeout | 1 | sys.settimeout |
| sys | settimeout | 1 | sys.settimeout |
| sys | shrink | 1 | sys.shrink |
| sys | shutdown | 1 | sys.shutdown |
| sys | shutdown | 1 | sys.shutdown |
| sys | stop | 1 | sys.stop |
| sys | stop | 1 | sys.stop |
| sys | storagemodelinit | 0 | sys.storagemodelinit |
| sys | times | 0 | sys.times |
| sys | vacuum | 1 | sys.vacuum |
+-----------------+------------------+----------------+----------------------+
34 tuples (11.236ms)
sql>SELECT cast(NULL as char(1)) AS "PROCEDURE_CAT", "schemas"."name" AS "PROCEDURE_SCHEM", "functions"."name" AS "PROCEDURE_NAME"
more>, CAST((SELECT COUNT(*) FROM "sys"."args" where "args"."func_id" = "functions"."id" and "args"."number" = 0) AS smallint) AS "PROCEDURE_TYPE"
more>, CAST(CASE "functions"."language" WHEN 0 THEN "functions"."mod" || '.' || "functions"."func" ELSE "schemas"."name" || '.' || "functions"."name" END AS VARCHAR(1500)) AS "SPECIFIC_NAME"
more>FROM "sys"."functions", "sys"."schemas" WHERE "functions"."schema_id" = "schemas"."id"
more>AND "functions"."type" = 2
more>AND "schemas"."name" = 'sys'
more>ORDER BY "PROCEDURE_SCHEM", "PROCEDURE_NAME", "SPECIFIC_NAME";
zero_or_one: cardinality violation (34>1)
sql>SELECT cast('' as char(1)) AS "PROCEDURE_CAT", "schemas"."name" AS "PROCEDURE_SCHEM", "functions"."name" AS "PROCEDURE_NAME"
more>, CAST((SELECT COUNT(*) FROM "sys"."args" where "args"."func_id" = "functions"."id" and "args"."number" = 0) AS smallint) AS "PROCEDURE_TYPE"
more>, CAST(CASE "functions"."language" WHEN 0 THEN "functions"."mod" || '.' || "functions"."func" ELSE "schemas"."name" || '.' || "functions"."name" END AS VARCHAR(1500)) AS "SPECIFIC_NAME"
more>FROM "sys"."functions", "sys"."schemas" WHERE "functions"."schema_id" = "schemas"."id"
more>AND "functions"."type" = 2
more>AND "schemas"."name" = 'sys'
more>ORDER BY "PROCEDURE_SCHEM", "PROCEDURE_NAME", "SPECIFIC_NAME";
+---------------+-----------------+------------------+----------------+----------------------+
| PROCEDURE_CAT | PROCEDURE_SCHEM | PROCEDURE_NAME | PROCEDURE_TYPE | SPECIFIC_NAME |
+===============+=================+==================+================+======================+
| | sys | analyze | 1 | sys.analyze |
| | sys | analyze | 1 | sys.analyze |
| | sys | analyze | 1 | sys.analyze |
| | sys | analyze | 1 | sys.analyze |
| | sys | clearrejects | 0 | sys.clearrejects |
| | sys | evalalgebra | 1 | sys.evalalgebra |
| | sys | fitsattach | 1 | sys.fitsattach |
| | sys | fitsload | 1 | sys.fitsload |
| | sys | flush_log | 0 | sys.flush_log |
| | sys | listdir | 1 | sys.listdir |
| | sys | listdirpat | 1 | sys.listdirpat |
| | sys | netcdf_attach | 1 | sys.netcdf_attach |
| | sys | netcdf_importvar | 1 | sys.netcdf_importvar |
| | sys | pause | 1 | sys.pause |
| | sys | pause | 1 | sys.pause |
| | sys | querylog | 1 | sys.querylog |
| | sys | querylog_disable | 0 | sys.querylog_disable |
| | sys | querylog_empty | 0 | sys.querylog_empty |
| | sys | querylog_enable | 0 | sys.querylog_enable |
| | sys | querylog_enable | 1 | sys.querylog_enable |
| | sys | resume | 1 | sys.resume |
| | sys | resume | 1 | sys.resume |
| | sys | reuse | 1 | sys.reuse |
| | sys | setsession | 1 | sys.setsession |
| | sys | settimeout | 1 | sys.settimeout |
| | sys | settimeout | 1 | sys.settimeout |
| | sys | shrink | 1 | sys.shrink |
| | sys | shutdown | 1 | sys.shutdown |
| | sys | shutdown | 1 | sys.shutdown |
| | sys | stop | 1 | sys.stop |
| | sys | stop | 1 | sys.stop |
| | sys | storagemodelinit | 0 | sys.storagemodelinit |
| | sys | times | 0 | sys.times |
| | sys | vacuum | 1 | sys.vacuum |
+---------------+-----------------+------------------+----------------+----------------------+
34 tuples (10.825ms)
sql>SELECT DISTINCT cast('' as char(1)) AS "PROCEDURE_CAT", "schemas"."name" AS "PROCEDURE_SCHEM", "functions"."name" AS "PROCEDURE_NAME"
more>, CAST((SELECT COUNT(*) FROM "sys"."args" where "args"."func_id" = "functions"."id" and "args"."number" = 0) AS smallint) AS "PROCEDURE_TYPE"
more>, CAST(CASE "functions"."language" WHEN 0 THEN "functions"."mod" || '.' || "functions"."func" ELSE "schemas"."name" || '.' || "functions"."name" END AS VARCHAR(1500)) AS "SPECIFIC_NAME"
more>FROM "sys"."functions", "sys"."schemas" WHERE "functions"."schema_id" = "schemas"."id"
more>AND "functions"."type" = 2
more>AND "schemas"."name" = 'sys'
more>ORDER BY "PROCEDURE_SCHEM", "PROCEDURE_NAME", "SPECIFIC_NAME";
+---------------+-----------------+------------------+----------------+----------------------+
| PROCEDURE_CAT | PROCEDURE_SCHEM | PROCEDURE_NAME | PROCEDURE_TYPE | SPECIFIC_NAME |
+===============+=================+==================+================+======================+
| | sys | analyze | 1 | sys.analyze |
| | sys | clearrejects | 0 | sys.clearrejects |
| | sys | evalalgebra | 1 | sys.evalalgebra |
| | sys | fitsattach | 1 | sys.fitsattach |
| | sys | fitsload | 1 | sys.fitsload |
| | sys | flush_log | 0 | sys.flush_log |
| | sys | listdir | 1 | sys.listdir |
| | sys | listdirpat | 1 | sys.listdirpat |
| | sys | netcdf_attach | 1 | sys.netcdf_attach |
| | sys | netcdf_importvar | 1 | sys.netcdf_importvar |
| | sys | pause | 1 | sys.pause |
| | sys | querylog | 1 | sys.querylog |
| | sys | querylog_disable | 0 | sys.querylog_disable |
| | sys | querylog_empty | 0 | sys.querylog_empty |
| | sys | querylog_enable | 0 | sys.querylog_enable |
| | sys | querylog_enable | 1 | sys.querylog_enable |
| | sys | resume | 1 | sys.resume |
| | sys | reuse | 1 | sys.reuse |
| | sys | setsession | 1 | sys.setsession |
| | sys | settimeout | 1 | sys.settimeout |
| | sys | shrink | 1 | sys.shrink |
| | sys | shutdown | 1 | sys.shutdown |
| | sys | stop | 1 | sys.stop |
| | sys | storagemodelinit | 0 | sys.storagemodelinit |
| | sys | times | 0 | sys.times |
| | sys | vacuum | 1 | sys.vacuum |
+---------------+-----------------+------------------+----------------+----------------------+
26 tuples (9.874ms)
sql>SELECT DISTINCT cast(NULL as char(1)) AS "PROCEDURE_CAT", "schemas"."name" AS "PROCEDURE_SCHEM", "functions"."name" AS "PROCEDURE_NAME"
more>, CAST((SELECT COUNT(*) FROM "sys"."args" where "args"."func_id" = "functions"."id" and "args"."number" = 0) AS smallint) AS "PROCEDURE_TYPE"
more>, CAST(CASE "functions"."language" WHEN 0 THEN "functions"."mod" || '.' || "functions"."func" ELSE "schemas"."name" || '.' || "functions"."name" END AS VARCHAR(1500)) AS "SPECIFIC_NAME"
more>FROM "sys"."functions", "sys"."schemas" WHERE "functions"."schema_id" = "schemas"."id"
more>AND "functions"."type" = 2
more>AND "schemas"."name" = 'sys'
more>ORDER BY "PROCEDURE_SCHEM", "PROCEDURE_NAME", "SPECIFIC_NAME";
zero_or_one: cardinality violation (34>1)
sql>SELECT DISTINCT cast(NULL as char(1)) AS "PROCEDURE_CAT", "schemas"."name" AS "PROCEDURE_SCHEM", "functions"."name" AS "PROCEDURE_NAME"
more>, (SELECT COUNT(*) FROM "sys"."args" where "args"."func_id" = "functions"."id" and "args"."number" = 0) AS "PROCEDURE_TYPE"
more>, CAST(CASE "functions"."language" WHEN 0 THEN "functions"."mod" || '.' || "functions"."func" ELSE "schemas"."name" || '.' || "functions"."name" END AS VARCHAR(1500)) AS "SPECIFIC_NAME"
more>FROM "sys"."functions", "sys"."schemas" WHERE "functions"."schema_id" = "schemas"."id"
more>AND "functions"."type" = 2
more>AND "schemas"."name" = 'sys'
more>ORDER BY "PROCEDURE_SCHEM", "PROCEDURE_NAME", "SPECIFIC_NAME";
zero_or_one: cardinality violation (34>1)
sql>
sql>SELECT DISTINCT cast(null as char(1)) AS "PROCEDURE_CAT", "schemas"."name" AS "PROCEDURE_SCHEM", "functions"."name" AS "PROCEDURE_NAME"
more>, (SELECT COUNT(*) FROM "sys"."args" where "args"."func_id" = "functions"."id" and "args"."number" = 0) AS "PROCEDURE_TYPE"
more>, CAST(CASE "functions"."language" WHEN 0 THEN "functions"."mod" || '.' || "functions"."func" ELSE "schemas"."name" || '.' || "functions"."name" END AS VARCHAR(1500)) AS "SPECIFIC_NAME"
more>FROM "sys"."functions", "sys"."schemas" WHERE "functions"."schema_id" = "schemas"."id"
more>AND "functions"."type" = 2
more>AND "schemas"."name" = 'sys'
more>ORDER BY "PROCEDURE_SCHEM", "PROCEDURE_NAME", "SPECIFIC_NAME";
zero_or_one: cardinality violation (34>1)
sql>
sql>SELECT DISTINCT cast(null as char(1)) AS "PROCEDURE_CAT", "schemas"."name" AS "PROCEDURE_SCHEM", "functions"."name" AS "PROCEDURE_NAME"
more>, (SELECT COUNT(*) FROM "sys"."args" where "args"."func_id" = "functions"."id" and "args"."number" = 0) AS "PROCEDURE_TYPE"
more>, CAST(CASE "functions"."language" WHEN 0 THEN "functions"."mod" || '.' || "functions"."func" ELSE "schemas"."name" || '.' || "functions"."name" END AS VARCHAR(1500)) AS "SPECIFIC_NAME"
more>FROM "sys"."functions", "sys"."schemas" WHERE "functions"."schema_id" = "schemas"."id"
more>AND "functions"."type" = 2
more>ORDER BY "PROCEDURE_SCHEM", "PROCEDURE_NAME", "SPECIFIC_NAME";
zero_or_one: cardinality violation (45>1)
sql>
sql>SELECT DISTINCT cast(null as char(1)) AS "PROCEDURE_CAT", "schemas"."name" AS "PROCEDURE_SCHEM", "functions"."name" AS "PROCEDURE_NAME"
more>, (SELECT COUNT(*) FROM "sys"."args" where "args"."func_id" = "functions"."id" and "args"."number" = 0) AS "PROCEDURE_TYPE"
more>, CAST(CASE "functions"."language" WHEN 0 THEN "functions"."mod" || '.' || "functions"."func" ELSE "schemas"."name" || '.' || "functions"."name" END AS VARCHAR(1500)) AS "SPECIFIC_NAME"
more>FROM "sys"."functions", "sys"."schemas" WHERE "functions"."schema_id" = "schemas"."id"
more>AND "functions"."type" = 2;
sql>
bash-4.3$
bash-4.3$ ./start_INSTALL_mserver5.sh
builtin opt gdk_dbpath = /export/scratch2/dinther_scratch1/INSTALL/var/monetdb5/dbfarm/demo
builtin opt gdk_debug = 0
builtin opt gdk_vmtrim = no
builtin opt monet_prompt = >
builtin opt monet_daemon = no
builtin opt mapi_port = 50000
builtin opt mapi_open = false
builtin opt mapi_autosense = false
builtin opt sql_optimizer = default_pipe
builtin opt sql_debug = 0
cmdline opt embedded_r = true
cmdline opt mapi_port = 41000
cmdline opt gdk_debug = 10
MonetDB 5 server v11.22.0
This is an unreleased version
Serving database 'demo', using 8 threads
Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs and 128bit integers dynamically linked
Found 15.589 GiB available main-memory.
Copyright (c) 1993-July 2008 CWI.
Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Listening for connection requests on mapi:monetdb://127.0.0.1:41000/
MonetDB/GIS module loaded
Start processing logs sql/sql_logs version 52200
Finished processing logs sql/sql_logs
MonetDB/SQL module loaded
MonetDB/R module loaded
> SQL catalog created, loading sql scripts once
loading sql script: 09_like.sql
loading sql script: 10_math.sql
loading sql script: 11_times.sql
loading sql script: 12_url.sql
loading sql script: 13_date.sql
loading sql script: 14_inet.sql
loading sql script: 15_querylog.sql
loading sql script: 16_tracelog.sql
loading sql script: 17_temporal.sql
loading sql script: 20_vacuum.sql
loading sql script: 21_dependency_functions.sql
loading sql script: 22_clients.sql
loading sql script: 23_skyserver.sql
loading sql script: 24_zorder.sql
loading sql script: 25_debug.sql
loading sql script: 26_sysmon.sql
loading sql script: 27_rejects.sql
loading sql script: 39_analytics.sql
loading sql script: 39_analytics_hge.sql
loading sql script: 40_geom.sql
loading sql script: 40_json.sql
loading sql script: 40_json_hge.sql
loading sql script: 41_md5sum.sql
loading sql script: 45_uuid.sql
loading sql script: 46_gsl.sql
loading sql script: 46_profiler.sql
loading sql script: 51_sys_schema_extension.sql
loading sql script: 72_fits.sql
loading sql script: 74_netcdf.sql
loading sql script: 75_storagemodel.sql
loading sql script: 80_statistics.sql
loading sql script: 80_udf.sql
loading sql script: 80_udf_hge.sql
loading sql script: 85_bam.sql
loading sql script: 90_generator.sql
loading sql script: 90_generator_hge.sql
loading sql script: 99_system.sql
>could not find L3.L3
L1.PROCEDURE_CAT
L1.PROCEDURE_SCHEM
L1.PROCEDURE_NAME
L3.PROCEDURE_TYPE
L4.SPECIFIC_NAME
L1.PROCEDURE_CAT
L1.PROCEDURE_SCHEM
L1.PROCEDURE_NAME
mserver5: ../../../../dev/sql/backends/monet5/rel_bin.c:2641: rel2bin_groupby: Assertion `0' failed.
./start_INSTALL_mserver5.sh: line 6: 1409 Aborted (core dumped) /export/scratch2/dinther_scratch1/INSTALL/bin/mserver5 -d10 --set embedded_r=true --set mapi_port=41000
bash-4.3$
### Expected Results:
no assertion failure.
no "zero_or_one: cardinality violation (34>1)" or "zero_or_one: cardinality violation (45>1)" errors.
## Comment 21780
Date: 2016-02-11 15:55:46 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [16b334deaca3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=16b334deaca3) 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=16b334deaca3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=16b334deaca3)
Changeset description:
Test script and expected outputs for Bug #3920
## Comment 21787
Date: 2016-02-13 13:34:20 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [3f7b5a1465d3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3f7b5a1465d3) 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=3f7b5a1465d3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3f7b5a1465d3)
Changeset description:
fixed bug #3920 and 3921, make sure we name aggregation expressions
properly.
| query with DISTINCT and correlated scalar subquery in SELECT list causes Assertion failure and crash of mserver5 | https://api.github.com/repos/MonetDB/MonetDB/issues/3920/comments | 0 | 2020-11-30T13:22:54Z | 2024-06-27T12:10:41Z | https://github.com/MonetDB/MonetDB/issues/3920 | 753,474,793 | 3,920 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-02-06 00:18:32 +0100
From: Pierre Coustillas <<pcoustillas>>
To: SQL devs <<bugs-sql>>
Version: 11.21.13 (Jul2015-SP2)
CC: guillaume.savary, @njnes
Last updated: 2016-03-25 09:59:49 +0100
## Comment 21772
Date: 2016-02-06 00:18:32 +0100
From: Pierre Coustillas <<pcoustillas>>
Welcome to mclient, the MonetDB/SQL interactive terminal (Jul2015-SP2)
Database: MonetDB v11.21.13 (Jul2015-SP2), 'mapi:monetdb://rd:50000/lemonde'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>CREATE TABLE foo (bar_zzz int);
operation successful (2.979ms)
sql>CREATE TABLE foo_bar (zzz int);
CREATE TABLE: sys_foo_bar_zzz conflicts
## Comment 21773
Date: 2016-02-08 15:07:48 +0100
From: Guillaume Savary <<guillaume.savary>>
It's not clear in what this bug is different than 3912
## Comment 21774
Date: 2016-02-08 15:41:03 +0100
From: Pierre Coustillas <<pcoustillas>>
The two bugs are alike. In both cases 'underscore' seems bugue
With bug #3912 after a restart, the data is corrupted and no error message.
With no bug #3919 without restart. Error message on create table : CREATE TABLE: sys_foo_bar_zzz conflicts
The bugs are not related to the names of the table, I tried with another name. But in any case it is necessary to use underscore in the name of the tables and fields.
## Comment 21814
Date: 2016-02-23 08:30:01 +0100
From: @njnes
currently we indeed use '_' to seperated schema/table/column names in the mapping to bats (sql storage/logger code). When this leads to problems (see 3912) we now also generate the error, ie to prevent storage corruption.
## Comment 21976
Date: 2016-03-25 09:59:49 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| Table conflict when the table name and fields are identical | https://api.github.com/repos/MonetDB/MonetDB/issues/3919/comments | 0 | 2020-11-30T13:22:51Z | 2024-06-27T12:10:39Z | https://github.com/MonetDB/MonetDB/issues/3919 | 753,474,758 | 3,919 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-02-04 23:18:56 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.13 (Jul2015-SP2)
CC: ajdamico
Last updated: 2016-03-25 09:59:56 +0100
## Comment 21769
Date: 2016-02-04 23:18:56 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0
Build Identifier:
here is what happens in the CMD window
MonetDB 5 server v11.21.13 "Jul2015-SP2"
Serving database 'My', using 8 threads
Compiled for x86_64-pc-winnt/64bit with 64bit OIDs dynamically linked
Found 7.861 GiB available main-memory.
Copyright (c) 1993-July 2008 CWI.
Copyright (c) August 2008-2015 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:50000/
Start processing logs sql/sql_logs version 52200
Start reading the write-ahead log 'sql_logs\sql\log.3'
Finished reading the write-ahead log 'sql_logs\sql\log.3'
Finished processing logs sql/sql_logs
MonetDB/SQL module loaded
C:\Windows\system32\Directory\MonetDB\mydb: MALException:mal.eval:WARNING: coul
d not open file: C:\Windows\system32\Directory\MonetDB\mydb
Reproducible: Always
### Steps to Reproduce:
here is a simple script that works in 1.0.0 and breaks in 1.0.1
library(MonetDB.R)
batfile <-
monetdb.server.setup(
database.directory = "C:/My Directory/MonetDB" ,
monetdb.program.path =
ifelse(
.Platform$OS.type == "windows" ,
"C:/Program Files/MonetDB/MonetDB5" ,
""
) ,
dbname = "mydb" ,
dbport = 50000
)
dbname <- "mydb"
dbport <- 50000
pid <- monetdb.server.start( batfile )
monet.url <- paste0( "monetdb://localhost:" , dbport , "/" , dbname )
db <- dbConnect( MonetDB.R() , monet.url , wait = TRUE )
Server not ready(Authentication error: !request for database 'mydb', but this is database 'My', did you mean to connect to monetdbd instead?), retrying (ESC or CTRL+C to abort)
### Actual Results:
database launch fails, MonetDB.R no longer works standalone
## Comment 21834
Date: 2016-02-26 17:00:06 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [ac836b80c4af](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ac836b80c4af) 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=ac836b80c4af](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ac836b80c4af)
Changeset description:
Fix for Bug #3918
## Comment 21836
Date: 2016-02-26 17:00:57 +0100
From: Anthony Damico <<ajdamico>>
awesome, thank you
## Comment 21980
Date: 2016-03-25 09:59:56 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| MonetDB.R version 1.0.1 incorrectly constructs the batfile script | https://api.github.com/repos/MonetDB/MonetDB/issues/3918/comments | 0 | 2020-11-30T13:22:48Z | 2024-06-27T12:10:38Z | https://github.com/MonetDB/MonetDB/issues/3918 | 753,474,728 | 3,918 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-02-04 15:36:08 +0100
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.19.9 (Oct2014-SP2)
CC: @njnes
Last updated: 2016-03-25 09:59:19 +0100
## Comment 21768
Date: 2016-02-04 15:36:08 +0100
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36
Build Identifier:
Casting the result of a date difference to double:
sql>select cast ( cast('2016-01-01' as date) - cast('2015-01-01' as date) as double);
types month_interval(32,0) and double(53,0) are not equal
1) https://www.monetdb.org/Documentation/SQLreference/Temporal mentions:
"For difference calculations between dates (in numbers of days) we use signed integer."
However it seems that month_interval is used.
2) No matter if you use month or day interval, why is a cast to double not possible? First casting to integer and then to double does work (see below). Is upcasting not working transitively?
sql>select cast ( cast ( cast('2016-01-01' as date) - cast('2015-01-01' as date) as int) as double);
+--------------------------+
| L4 |
+==========================+
| 365 |
+--------------------------+
Reproducible: Always
$ mserver5 --version
MonetDB 5 server v11.21.14 (64-bit, 64-bit oids, 128-bit integers)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2015 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.37 2015-04-28 (compiled with 8.37)
openssl: OpenSSL 1.0.1k 8 Jan 2015 (compiled with OpenSSL 1.0.1k-fips 8 Jan 2015)
libxml2: 2.9.3 (compiled with 2.9.3)
Compiled by: roberto@photon.hq.spinque.com (x86_64-unknown-linux-gnu)
Compilation: gcc -O3 -pipe -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code -D_FORTIFY_SOURCE=2
Linking : /usr/bin/ld -m elf_x86_64
## Comment 21889
Date: 2016-03-13 20:10:59 +0100
From: @njnes
was fixed in the 2015 branch
## Comment 21960
Date: 2016-03-25 09:59:19 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| Date difference returns month_interval instead of day_interval | https://api.github.com/repos/MonetDB/MonetDB/issues/3917/comments | 0 | 2020-11-30T13:22:46Z | 2024-06-27T12:10:37Z | https://github.com/MonetDB/MonetDB/issues/3917 | 753,474,697 | 3,917 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-02-04 12:02:14 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: -- development
CC: ajdamico
Last updated: 2016-05-23 11:15:00 +0200
## Comment 21766
Date: 2016-02-04 12:02:14 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0
Build Identifier:
so whenever a new mserver service pack upgrade comes out, the monetdb team warns users to not skip upgrades-- that mserver needs to upgrade Jul2015 into Jul2015-SP1 and before it upgrades Jul2015-SP2. given MonetDBLite's packaging, i assume that R users will not pay attention to this requirement.
some ideas
should MonetDBLite package all necessary upgrade algorithms for every single previous version?
when trying to connect to a 2+ versions-ago MonetDBLite database, should it break loudly and tell the user to first connect to the database with X.Y.Z version to upgrade?
should there be a separate upgrade_this_db() function that can point to the db folder and download the necessary updates automatically?
Reproducible: Always
### Steps to Reproduce:
anticipated issue, not a bug
## Comment 22121
Date: 2016-05-04 17:14:57 +0200
From: Anthony Damico <<ajdamico>>
related to this, should dbGetInfo() show the mserver version?
red highlight in this screenshot- http://s32.postimg.org/7gouvwuzp/mserver_version.png
## Comment 22142
Date: 2016-05-17 15:49:56 +0200
From: Anthony Damico <<ajdamico>>
for external mservers, it would be as easy as editing
setMethod("dbGetInfo", "MonetDBConnection", def=function(dbObj, ...)
so that
ll$db.version <- ll$monet_release
but for embedded connections, i couldn't figure out if it's cleanest to pull from here or from somewhere else?
https://github.com/hannesmuehleisen/MonetDBLite/blob/master/.hgtags
i think the same info should be used to trigger the error if the user is two or more versions ahead of the database on the disk
## Comment 22167
Date: 2016-05-23 11:15:00 +0200
From: @hannesmuehleisen
MonetDBLite will use same database upgrade code as MonetDB for the foreseeable future.
| consideration for MonetDBLite: manage database updates properly | https://api.github.com/repos/MonetDB/MonetDB/issues/3916/comments | 0 | 2020-11-30T13:22:43Z | 2024-06-28T07:19:55Z | https://github.com/MonetDB/MonetDB/issues/3916 | 753,474,665 | 3,916 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-02-02 07:32:32 +0100
From: @mlkersten
To: SQL devs <<bugs-sql>>
Version: 11.17.13 (Jan2014-SP1)
CC: @njnes
Last updated: 2016-03-13 20:12:12 +0100
## Comment 21763
Date: 2016-02-02 07:32:32 +0100
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:44.0) Gecko/20100101 Firefox/44.0
Build Identifier:
CALLing a SQL function should either produce an error or (preferably) returns the result as a result-set.
Currently it does neither.
Reproducible: Always
### Steps to Reproduce:
CREATE FUNCTION foo() RETURNS INTEGER
BEGIN
RETURN 123;
END;
CALL foo();
## Comment 21890
Date: 2016-03-13 20:12:12 +0100
From: @njnes
SELECT: no such operator 'foo'
| Function calls | https://api.github.com/repos/MonetDB/MonetDB/issues/3915/comments | 0 | 2020-11-30T13:22:40Z | 2024-06-28T07:19:55Z | https://github.com/MonetDB/MonetDB/issues/3915 | 753,474,634 | 3,915 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-02-01 22:42:52 +0100
From: @mlkersten
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2016-04-11 11:45:28 +0200
## Comment 21762
Date: 2016-02-01 22:42:52 +0100
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:44.0) Gecko/20100101 Firefox/44.0
Build Identifier:
SQL variables should be qualified by the schema in which they are declared.
Currently, they are erroneously global for all schemas.
Reproducible: Always
### Steps to Reproduce:
create schema xyz;
declare version='2016';
select xyz.version;
| Schema specific variables | https://api.github.com/repos/MonetDB/MonetDB/issues/3914/comments | 0 | 2020-11-30T13:22:38Z | 2024-06-28T07:19:55Z | https://github.com/MonetDB/MonetDB/issues/3914 | 753,474,597 | 3,914 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-02-01 14:58:03 +0100
From: @mlkersten
To: SQL devs <<bugs-sql>>
Version: 11.17.13 (Jan2014-SP1)
CC: @njnes
Last updated: 2016-03-13 20:16:58 +0100
## Comment 21761
Date: 2016-02-01 14:58:03 +0100
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:44.0) Gecko/20100101 Firefox/44.0
Build Identifier:
A serious of SQL tests fail when the query cache size is set to 0.
Testing by setting cach size in sql_qc.h.
Reproducible: Always
## Comment 21891
Date: 2016-03-13 20:16:58 +0100
From: @njnes
which 0 sized query cache all prepare statements will fail.
| Query cache zero is not safe | https://api.github.com/repos/MonetDB/MonetDB/issues/3913/comments | 0 | 2020-11-30T13:22:35Z | 2024-06-28T07:19:55Z | https://github.com/MonetDB/MonetDB/issues/3913 | 753,474,555 | 3,913 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-01-28 11:05:26 +0100
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
To: SQL devs <<bugs-sql>>
Version: 11.21.13 (Jul2015-SP2)
CC: @njnes, pcoustillas
Last updated: 2016-03-25 09:59:47 +0100
## Comment 21754
Date: 2016-01-28 11:05:26 +0100
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0
Build Identifier:
Conflicting column names between tables might corrupt data.
Say:
TABLE foo, COLUMN bar_baz
TABLE foo_bar, COLUMN baz
The internal name is computed by concatenating the table name and column name.
In the example above, this produces the same internal name: "foo_bar_baz".
MonetDB seems to mix up things in this case.
Reproducible: Always
### Steps to Reproduce:
sql> create table foo_bar (baz int);
sql> create table foo (bar_baz int);
sql> insert into foo values (1);
sql> insert into foo_bar values (2);
sql> select * from foo_bar;
+------+
| baz |
+======+
| 2 |
+------+
1 tuple (0.981ms)
sql>select * from foo;
+---------+
| bar_baz |
+=========+
| 1 |
+---------+
1 tuple (2.071ms)
So far, so good.
However, after restarting the MonetDB server (forcing to flush the journal), when we perform the same queries again, we see corrupted data:
sql>select * from foo;
+---------+
| bar_baz |
+=========+
| 1 |
| 2 |
+---------+
2 tuples (1.111ms)
sql>select * from foo_bar;
+------+
| baz |
+======+
| 1 |
| 2 |
+------+
2 tuples (1.002ms)
It behave as if both columns where somewhat merged internally.
We do notice that reverting the order of the CREATE TABLE gives us the following error:
sql>create table foo (bar_baz int);
operation successful (6.975ms)
sql>create table foo_bar (baz int);
CREATE TABLE: sys_foo_bar_baz conflicts
Maybe this error should be given in the other case.
## Comment 21770
Date: 2016-02-05 18:10:42 +0100
From: Pierre Coustillas <<pcoustillas>>
reproducible bug on version 11.21.13 (Jul2015 SP2), linux debian 8.2
## Comment 21771
Date: 2016-02-05 19:41:40 +0100
From: Pierre Coustillas <<pcoustillas>>
In transaction mode it's different, but bug also :
Welcome to mclient, the MonetDB/SQL interactive terminal (Jul2015-SP2)
Database: MonetDB v11.21.13 (Jul2015-SP2), 'mapi:monetdb://rd:50000/lemonde'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>START TRANSACTION;
auto commit mode: off
sql>create table foo_bar (baz int); create table foo (bar_baz int); insert into foo values (1); insert into foo_bar values (2);
operation successful (1.134ms)
operation successful (1.149ms)
1 affected row (1.153ms)
1 affected row (1.157ms)
sql>SELECT * FROM foo_bar;
+------+
| baz |
+======+
| 2 |
+------+
1 tuple (2.903ms)
sql>commit;
auto commit mode: on
sql>SELECT * FROM foo_bar;
+------+
| baz |
+======+
| 2 |
+------+
1 tuple (3.015ms)
Restart monetdb with : service monetdb5-sql stop ; sleep 5 ; service monetdb5-sql start
Welcome to mclient, the MonetDB/SQL interactive terminal (Jul2015-SP2)
Database: MonetDB v11.21.13 (Jul2015-SP2), 'mapi:monetdb://rd:50000/lemonde'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>SELECT * FROM foo_bar;
+------+
| baz |
+======+
| 1 |
+------+
1 tuple (1.407ms)
???
2 become 1 ?
Pierre
## Comment 21775
Date: 2016-02-11 10:01:05 +0100
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
Changing the version number. Very often my choice reverts to an old version when I enter a bug. I don't know why.
## Comment 21808
Date: 2016-02-21 21:11:17 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [e2aafc304c04](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e2aafc304c04) 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=e2aafc304c04](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e2aafc304c04)
Changeset description:
fixed bug #3912, improved check for name conflicts
## Comment 21810
Date: 2016-02-23 08:21:54 +0100
From: @njnes
improved the test for name conflicts
## Comment 21811
Date: 2016-02-23 08:26:08 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [e8c4edcbfabb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e8c4edcbfabb) 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=e8c4edcbfabb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e8c4edcbfabb)
Changeset description:
added tests for bug #3910 and 3912.
Fixed a problem with copy into with header information
## Comment 21975
Date: 2016-03-25 09:59:47 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| When table/column names conflicts, data ends in multiple tables! | https://api.github.com/repos/MonetDB/MonetDB/issues/3912/comments | 0 | 2020-11-30T13:22:31Z | 2024-06-27T12:10:32Z | https://github.com/MonetDB/MonetDB/issues/3912 | 753,474,523 | 3,912 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-01-25 18:19:39 +0100
From: Alex <<ttyS15>>
To: clients devs <<bugs-clients>>
Version: -- development
CC: ttyS15
Last updated: 2016-06-23 10:24:36 +0200
## Comment 21751
Date: 2016-01-25 18:19:39 +0100
From: Alex <<ttyS15>>
Created attachment 384
Issue fix
Tested on:
- python-monetdb==11.19.3.2
I have got traceback, while trying to connect to server in 'redirect' mode:
Traceback (most recent call last):
File "/data/prd-monet/apps/reports/__init__.py", line 23, in register_reports
r.do_register()
File "/data/prd-monet/apps/morgoth/reports/__init__.py", line 179, in do_register
rm.register(*args)
File "/data/prd-monet/apps/morgoth/reports/__init__.py", line 71, in register
return self.get_report()
File "/data/prd-monet/apps/morgoth/reports/__init__.py", line 75, in get_report
name=self.group_name, defaults={"title": self.group_name})
File "/data/prd-monet/virtualenv/lib/python2.7/site-packages/django/db/models/manager.py", line 154, in get_or_create
return self.get_queryset().get_or_create(**kwargs)
File "/data/prd-monet/virtualenv/lib/python2.7/site-packages/django/db/models/query.py", line 376, in get_or_create
return self.get(**lookup), False
File "/data/prd-monet/virtualenv/lib/python2.7/site-packages/django/db/models/query.py", line 304, in get
num = len(clone)
File "/data/prd-monet/virtualenv/lib/python2.7/site-packages/django/db/models/query.py", line 77, in __len__
self._fetch_all()
File "/data/prd-monet/virtualenv/lib/python2.7/site-packages/django/db/models/query.py", line 857, in _fetch_all
self._result_cache = list(self.iterator())
File "/data/prd-monet/virtualenv/lib/python2.7/site-packages/django/db/models/query.py", line 220, in iterator
for row in compiler.results_iter():
File "/data/prd-monet/virtualenv/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 713, in results_iter
for rows in self.execute_sql(MULTI):
File "/data/prd-monet/virtualenv/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 785, in execute_sql
cursor = self.connection.cursor()
File "/data/prd-monet/virtualenv/lib/python2.7/site-packages/django/db/backends/__init__.py", line 162, in cursor
cursor = util.CursorWrapper(self._cursor(), self)
File "/data/prd-monet/virtualenv/lib/python2.7/site-packages/django/db/backends/__init__.py", line 132, in _cursor
self.ensure_connection()
File "/data/prd-monet/virtualenv/lib/python2.7/site-packages/django/db/backends/__init__.py", line 127, in ensure_connection
self.connect()
File "/data/prd-monet/virtualenv/lib/python2.7/site-packages/django/db/backends/__init__.py", line 115, in connect
self.connection = self.get_new_connection(conn_params)
File "/data/prd-monet/virtualenv/lib/python2.7/site-packages/djonet/base.py", line 99, in get_new_connection
conn = Database.connect(**conn_params)
File "/data/prd-monet/virtualenv/lib/python2.7/site-packages/monetdb/sql/__init__.py", line 28, in connect
return Connection(*args, **kwargs)
File "/data/prd-monet/virtualenv/lib/python2.7/site-packages/monetdb/sql/connections.py", line 60, in __init__
unix_socket=unix_socket)
File "/data/prd-monet/virtualenv/lib/python2.7/site-packages/monetdb/mapi.py", line 125, in connect
self._login()
File "/data/prd-monet/virtualenv/lib/python2.7/site-packages/monetdb/mapi.py", line 170, in _login
self.password, self.database, self.language)
File "/data/prd-monet/virtualenv/lib/python2.7/site-packages/monetdb/mapi.py", line 97, in connect
if not unix_socket and os.path.exists("/tmp/.s.monetdb.%i" % port):
TypeError: %d format: a number is required, not str
Python 2.7.11 (default, Jan 14 2016, 01:19:44)
Patch with fix is proposed.
> Attached file: [invalid_connect.patch](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3911_invalid_connect.patch_384) (text/plain, 981 bytes)
> Description: Issue fix
## Comment 22070
Date: 2016-04-20 11:04:56 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [6674c4ec995f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6674c4ec995f) 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=6674c4ec995f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6674c4ec995f)
Changeset description:
Fix calling the Connection.connect method.
This fixes bug #3911.
## Comment 22071
Date: 2016-04-20 11:06:48 +0200
From: @sjoerdmullender
Should be fixed in the next release.
I've done it slightly differently than your patch. I've ust used named arguments for all of the arguments. That should be more future proof (given that the bug was introduced when the arguments of the connect method were rearranged but this call was not fixed).
| Invalid connect() call in 'redirect' mode | https://api.github.com/repos/MonetDB/MonetDB/issues/3911/comments | 0 | 2020-11-30T13:22:29Z | 2024-06-27T12:10:31Z | https://github.com/MonetDB/MonetDB/issues/3911 | 753,474,485 | 3,911 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.