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" ]
**Describe the bug** The test web should be checked for 'bulk operator' warnings. They should be added. **To Reproduce** The error was reported while running the tests in sql/test/BugDay_2005-10-06_2.9.3
sql.describe_type a bulk operator implementation is needed
https://api.github.com/repos/MonetDB/MonetDB/issues/7114/comments
1
2021-05-01T19:18:38Z
2021-05-21T12:10:19Z
https://github.com/MonetDB/MonetDB/issues/7114
873,748,635
7,114
[ "MonetDB", "MonetDB" ]
**Describe the bug / Reproduction instructions** If, in an mclient session, you: 1. Create a table named `foo`. 2. Create a table named `foo_bar`. 3. Type `SELECT COUNT(*) FROM foo_` (without pressing Enter) 4. Press Tab the underscore gets deleted, and you're back with `foo`. **Expected behavior** The completion should produce `foo_bar`. **Software versions** - MonetDB 11.39.11 - OS and version: Devuan GNU/Linux Beowulf - Built from source
Table name completion mishandles underscores
https://api.github.com/repos/MonetDB/MonetDB/issues/7113/comments
1
2021-04-26T21:02:41Z
2024-07-13T13:39:43Z
https://github.com/MonetDB/MonetDB/issues/7113
868,200,619
7,113
[ "MonetDB", "MonetDB" ]
Currently, if you want to interrupt the execution of a long-running query you've input in an mclient session, you can press Ctrl+C - but this won't get you back to the prompt; rather, it will terminate both query execution and the connection. Thus, if you have uncommitted changes, or temporary tables - they'll be lost. It would be nice if Ctrl+C could just go back to the command prompt (and a Ctrl+C without a query running would break the connection). But any shortcut key combination would be some improvement. **Software versions** - MonetDB 11.39.11 - OS and version: Devuan GNU/Linux Beowulf - Built from source
Need keyboard shortcut to interrupt query execution rather than session
https://api.github.com/repos/MonetDB/MonetDB/issues/7112/comments
2
2021-04-23T20:21:15Z
2021-05-09T20:11:37Z
https://github.com/MonetDB/MonetDB/issues/7112
866,407,033
7,112
[ "MonetDB", "MonetDB" ]
If I enter the following commands: ``` CREATE TEMPORARY TABLE table1 AS (SELECT 1 AS col1, 'foo' AS col2) ON COMMIT PRESERVE ROWS; INSERT INTO table1 VALUES (1, 'bar'), (2, 'baz'); SELECT (SELECT col2 FROM table1 ORDER BY col1 LIMIT 1); ``` I should get `1`, but I get a syntax error: ``` syntax error, unexpected ORDER, expecting UNION or EXCEPT or INTERSECT or ')' in: "select (select col2 from table1 order" ``` as MonetDB does not accept ORDER BY ... LIMIT in inner queries. I'm not expert on the standard, but I do believe this needs to be supported; if not, it definitely should be IMHO. **Software versions** - MonetDB 11.39.11 - OS and version: Devuan GNU/Linux Beowulf - Built from source
ORDER BY ... LIMIT support in inner queries
https://api.github.com/repos/MonetDB/MonetDB/issues/7111/comments
3
2021-04-23T16:56:08Z
2023-09-13T17:18:56Z
https://github.com/MonetDB/MonetDB/issues/7111
866,280,989
7,111
[ "MonetDB", "MonetDB" ]
**Describe the bug** The check method for the identifier used in the GROUPBY clause is inconsistent between the Remote Table and the Local Table. **To Reproduce** 1. Environment and Version 1) beestore Server : MonetDB 5 server 11.39.15 (Oct2020-SP4) 2) beestore1 Server : MonetDB 5 server 11.39.15 (Oct2020-SP4) 2. Data Creation 1) DDL in beestore1 Server sql> -- Create a Local Table CREATE TABLE keyword_test ( toc_no String null, name String null ); sql> -- Insert Sample Data insert into keyword_test values('A000000009', 'AAAA'); insert into keyword_test values('A000000010', 'BBBB'); insert into keyword_test values('A000000011', 'CCCC'); insert into keyword_test values('A000000012', 'DDDD'); insert into keyword_test values('A000000013', 'EEEE'); insert into keyword_test values('A000000014', 'AAAA'); insert into keyword_test values('A000000015', 'DDDD'); insert into keyword_test values('A000000016', 'AAAA'); -- Checking the inserted data sql> select * from keyword_test order by name; +------------+------+ | toc_no | name | +============+======+ | A000000009 | AAAA | | A000000014 | AAAA | | A000000016 | AAAA | | A000000010 | BBBB | | A000000011 | CCCC | | A000000012 | DDDD | | A000000015 | DDDD | | A000000013 | EEEE | +------------+------+ - Check the GROUPBY result sql>select '*' as category, count(*) as cnt from keyword_test group by category; +----------+------+ | category | cnt | +==========+======+ | * | 8 | +----------+------+ 2) DDL in beestore Server sql> -- Create a Remote Table CREATE REMOTE TABLE keyword_test ( toc_no String null, name String null ) on 'mapi:monetdb://beestore1:50000/bcsdb'; -- Check Remote Table sql>select * from keyword_test order by name; +------------+------+ | toc_no | name | +============+======+ | A000000009 | AAAA | | A000000014 | AAAA | | A000000016 | AAAA | | A000000010 | BBBB | | A000000011 | CCCC | | A000000012 | DDDD | | A000000015 | DDDD | | A000000013 | EEEE | +------------+------+ 3. Data Query Task (beestore Server) -- In a normal situation, the same result as the beestore 1 execution result should be displayed -- When I run the same query as the beestore1 server, I get the following error. sql>select '*' as category, count(*) as cnt from keyword_test group by category; (mapi:monetdb://monetdb@beestore1/bcsdb) Identifier category doesn't exist **Expected behavior** -- In a normal situation, the same result as the beestore 1 execution result should be displayed (From Remote Table) sql>select '*' as category, count(*) as cnt from keyword_test group by category; +----------+------+ | category | cnt | +==========+======+ | * | 8 | +----------+------+ **Screenshots** If applicable, add screenshots to help explain your problem. **Software versions** - MonetDB version number [a milestone label] : MonetDB 5 server 11.39.15 (Oct2020-SP4) - OS and version: [e.g. Ubuntu 18.04] CentOS 7.4 - Installed from release package or self-installed and compiled : Installed from release package **Issue labeling ** Make liberal use of the labels to characterise the issue topics. e.g. identify severity, version, etc.. **Additional context** Add any other context about the problem here.
Monetdb Query parsing consistency issues in the latest release (Remote Table)
https://api.github.com/repos/MonetDB/MonetDB/issues/7110/comments
1
2021-04-22T07:34:00Z
2024-06-27T13:15:39Z
https://github.com/MonetDB/MonetDB/issues/7110
864,638,781
7,110
[ "MonetDB", "MonetDB" ]
**Describe the bug** There is a bug in MERGE statement, incorrectly reporting "Multiple rows in the input relation 'ce' match the same row in the target relation 'attr", which is not the case. **To Reproduce** ```drop table if exists ce; drop table if exists attr; create table ce (id bigint); insert into ce values (1), (2); create table attr (id bigint, value text); insert into attr values (1,'a'),(1,'b'),(2,'a'),(2,'a'),(3,'a'),(3,'b'); merge into attr using ce on ce.id = attr.id when matched then delete; ``` **Expected behavior** Only rows with id `3` are left in `attr` table. **Software versions** - MonetDB version number: MonetDB v11.39.13 - OS and version: Ubuntu 20.04 - Installed from release package into Docker
MERGE Statement incorrectly reports that input relation matches multiple rows
https://api.github.com/repos/MonetDB/MonetDB/issues/7109/comments
1
2021-04-21T16:28:34Z
2024-06-27T13:15:38Z
https://github.com/MonetDB/MonetDB/issues/7109
864,065,881
7,109
[ "MonetDB", "MonetDB" ]
Hello. I am using monetdb version Oct2020-SP4 Bugfix Release (11.39.15) on Windows 10. I can get monetdb to crash when executing a query. I attached both the query and the SQL dump of the table. The query is quite large, and non sensical as it is automatically generated by our testing tool, still I hope this can be helpful to spot the bug, as it is able to make monetdb crash every time it is executed. ** Problem description ** Monetdb crashes every time this this specific query is executed **To reproduce** - Create the table lineitem_denormalized_first1k_sanitised (attached) - Execute the query (attached) [Query.txt](https://github.com/MonetDB/MonetDB/files/6345176/Query.txt) [lineitem_denormalized_first1k_sanitised.txt](https://github.com/MonetDB/MonetDB/files/6345178/lineitem_denormalized_first1k_sanitised.txt)
Monetdb crashes on query execution
https://api.github.com/repos/MonetDB/MonetDB/issues/7108/comments
2
2021-04-20T16:38:00Z
2024-06-27T13:15:37Z
https://github.com/MonetDB/MonetDB/issues/7108
863,005,697
7,108
[ "MonetDB", "MonetDB" ]
**Describe the bug** There is a difference in parsing constants using COPY FROM and INSERT INTO VALUES **To Reproduce** start transaction; create table dummy(d decimal(18,3)); insert into dummy values(1.1); insert into dummy values(1.12); insert into dummy values(1.123); insert into dummy values(1.1234); insert into dummy values(1.12345); select 'Should not reach this point'; copy into dummy from stdin; 1.1 1.2 1.12 1.123 1.1234 1.12345 rollback; **Wrong behavior** 1 affected row 1 affected row 1 affected row 1 affected row 1 affected row Failed to import table 'dummy', line 5 field d 'decimal(18,3)' expected in '1.1234' The COPY properly rejects the failing (row) and aborts the process. The same should be done for the straightforward insert where after 1.1234 a transaction failure should be raised. **Software versions** - MonetDB version number [Default]
Inconsistent constant parsing
https://api.github.com/repos/MonetDB/MonetDB/issues/7107/comments
1
2021-04-19T10:04:44Z
2024-06-27T13:15:36Z
https://github.com/MonetDB/MonetDB/issues/7107
861,138,375
7,107
[ "MonetDB", "MonetDB" ]
Hi Pedro, It has been a long time since I did not write to you. I hope you are doing well and that your family is safe in this difficult context of Covid19. Some times ago you did a fix for me which was provided as a SNAPSHOT release. I am still using this SNAPSHOT release and it works perfectly. The fix was about the possibility to alter a table and adding multiple columns in a single query: Example: alter table MY_TABLE add column ( COL1 STRING, COL2 STRING, COL3 STRING, ...) I have tested the latest versions monetdb-java-lite-2.39.jar and monetdb-jdbc-new-2.37.jar for MonetDB Java Lite but I was not able to alter a table and add multiple columns in a single execution. The solution is to alter the table multiple times (according to the number of columns I want to add) but this creates major performance issues compared to a single execution. Do you think that it could be possible to add this feature in the standard package ? Thanks & regards, Guillaume de GENTILE
ALTER multiple columns at once
https://api.github.com/repos/MonetDB/MonetDB/issues/7106/comments
3
2021-04-16T19:19:33Z
2024-06-28T10:07:42Z
https://github.com/MonetDB/MonetDB/issues/7106
860,101,269
7,106
[ "MonetDB", "MonetDB" ]
CMake version = 3.20 but my centos is not installed python3 cmake -DCMAKE_INSTALL_PREFIX:PATH=/path/to/monetdb . and make [ 70%] Generating 81_tracer.sql.c /bin/sh: Python3_EXECUTABLE-NOTFOUND: command not found make[2]: *** [sql/backends/monet5/81_tracer.sql.c] Error 127 make[1]: *** [sql/backends/monet5/CMakeFiles/sql.dir/all] Error 2 make: *** [all] Error 2 how to install no use python3 ?? why use python3?
Source compile install
https://api.github.com/repos/MonetDB/MonetDB/issues/7105/comments
1
2021-04-16T06:44:06Z
2021-04-29T08:41:29Z
https://github.com/MonetDB/MonetDB/issues/7105
859,512,729
7,105
[ "MonetDB", "MonetDB" ]
**Describe the bug** When I use the NTILE function, the number of buckets required in the output is passed as a parameter to the function, and My expectation is that the output would contain the number of buckets requested, with each bucket containing as close to an evenly split number of records as possible, however when this function is run I have the following problems. More buckets are created than requested The extra buckets are not numbered in order, seem to be random. the number of records in each bucket does not seem evenly split. **To Reproduce** run the code below: at line 170 the path to the db URL is set using the following line of code. This will need to be amended to reflect your db location char url[100]="/solar"; ``` #include <iostream> #include "monetdbe.h" #include <string> #ifndef error #define error(msg) {fprintf(stderr, "Failure: %s\n", msg); return -1;} #endif bool createStringTable(monetdbe_database& db){ char createSQL[100]="CREATE TABLE stringpower(block INTEGER, stringbox INTEGER, stringnum INTEGER, kw INTEGER);"; auto err = monetdbe_query(db, createSQL, NULL, NULL); if(err!=NULL){ printf("%s\r\n", err); return false; }else{ return true; } } bool createSchema(monetdbe_database& db){ char createSchema[100]="CREATE SCHEMA solar"; auto err = monetdbe_query(db, createSchema, NULL, NULL); if(err!=NULL){ printf("%s\r\n", err); return false; }else{ return true; } } bool setSchema(monetdbe_database& db){ char setSchema[100]="SET SCHEMA solar"; auto err = monetdbe_query(db, setSchema, NULL, NULL); if(err!=NULL){ printf("%s\r\n", err); return false; }else{ return true; } } bool insertStringData(monetdbe_database& db){ int32_t blocks[160] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}; monetdbe_column col0 = { .type = monetdbe_int32_t, .data = &blocks, .count = 160}; int32_t stringBoxes[160] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4}; monetdbe_column col1 = { .type = monetdbe_int32_t, .data = &stringBoxes, .count = 160 }; int32_t strings[160] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}; monetdbe_column col2 = { .type = monetdbe_int32_t, .data = &strings, .count = 160}; int32_t kw[160] = {25,12,23,34,23,24,34,23,21,45,23,232,4,32,324,321,23,234,46,34,34,32,53,423,34,53,23,12,35,45,78,68,85,56,78,58,8,5,934,48,65,445,656,63,34,65,32,32,44,55,34,67,8,64,544,3,8,987,344,5,73,78,789,9,8,7,779,977,25,78,35,5,8,9,67,9,7,78,54,435,30,14,27,40,27,28,40,27,25,54,27,278,4,38,388,385,27,280,55,40,40,38,63,507,40,63,27,14,42,54,93,81,102,67,93,69,9,6,1120,57,78,534,787,75,40,78,38,38,52,66,40,80,9,76,652,3,9,1184,412,6,87,93,946,10,9,8,934,1172,30,93,42,6,9,10,80,10,8,93,64,522}; monetdbe_column col3 = { .type = monetdbe_int32_t, .data = &kw, .count = 160}; monetdbe_column* dcol[4] = { &col0, &col1,&col2, &col3}; char currschema[6]="solar"; char table[12]="stringpower"; auto err =monetdbe_append(db, currschema, table, (monetdbe_column**) &dcol, 4); if (err != NULL) { printf("%s\r\n", err); return false; } return true; } bool runQuery(monetdbe_database& db){ monetdbe_result *result; monetdbe_column *cols[4]; char ntileSQL[110]= "select block,stringbox,stringnum,kw, NTILE(2) OVER(ORDER BY kw) as tile from stringpower;"; auto err = monetdbe_query(db, ntileSQL, &result, NULL); if(err!=NULL){ printf("%s\r\n", err); return false; } // print the names of the result for (size_t i = 0; i < result->ncols; i++) { monetdbe_result_fetch(result, &cols[i], i); printf("%s ", cols[i]->name); std::cout<<"colType: "<<cols[i]->type<<std::endl; } printf("\r\n"); // print the data of the result for (size_t row_idx = 0; row_idx < result->nrows; row_idx++) { for (size_t col_idx = 0; col_idx < result->ncols; col_idx++) { switch(cols[col_idx]->type){ case monetdbe_bool: { monetdbe_column_bool * col = (monetdbe_column_bool*)cols[col_idx]; bool val =col->data[row_idx]; if (val == col->null_value) printf("NULL "); else printf("%d ", val); } break; case monetdbe_int8_t: { monetdbe_column_int8_t *col = (monetdbe_column_int8_t *)cols[col_idx]; int val = col->data[row_idx]; if (val == col->null_value) printf("NULL "); else printf("%d ", val); } break; case monetdbe_int16_t: { monetdbe_column_int16_t *col = (monetdbe_column_int16_t *)cols[col_idx]; int val = col->data[row_idx]; if (val == col->null_value) printf("NULL "); else printf("%d ", val); } break; case monetdbe_int32_t: { monetdbe_column_int32_t *col = (monetdbe_column_int32_t *)cols[col_idx]; int val = col->data[row_idx]; if (val == col->null_value) printf("NULL "); else printf("%d ", val); } break; case monetdbe_int64_t: break; case monetdbe_size_t: break; case monetdbe_float: break; case monetdbe_double: break; case monetdbe_str: break; case monetdbe_blob: break; case monetdbe_date: break; case monetdbe_time: break; case monetdbe_timestamp: break; case monetdbe_type_unknown: break; } } printf("\n"); } if ((err = monetdbe_cleanup_result(db, result)) != NULL) error(err) return true; } int main(){ bool status; monetdbe_database db = NULL; char url[100]="/solar"; //open db if (monetdbe_open(&db, url /* inmemory database */, NULL /* no options */)) { fprintf(stderr, "Failed to open database\n"); return -1; } status=createSchema(db); status=setSchema(db); status=createStringTable(db); status=insertStringData(db); status=runQuery(db); monetdbe_close(db); } ``` **Expected behavior** I would expect that the column labeled "tile" would be ordered with two numbers, representing the number of buckets parameter passed to the NTILE function. I would also expect that the two buckets would be evenly split. However the output has a third bucket which is numbered 50. The number of elements each bucket has is not evenly split. ![NTILEError](https://user-images.githubusercontent.com/8644412/114903986-45579d80-9e0f-11eb-9817-266716d62ba1.png) **Screenshots** If applicable, add screenshots to help explain your problem. **Software versions** - MonetDB-Oct2020_SP3_release - Ubuntu 20.04 - self-installed and compiled **Issue labeling ** BUG **Additional context** Add any other context about the problem here.
Monetdbe NTILE function does not produce correct ordering
https://api.github.com/repos/MonetDB/MonetDB/issues/7104/comments
2
2021-04-15T16:24:50Z
2024-06-27T13:15:35Z
https://github.com/MonetDB/MonetDB/issues/7104
859,045,677
7,104
[ "MonetDB", "MonetDB" ]
**Describe the bug** compile error as following : In file included from sql_scan.c:30: sql_parser.h:192:12: error: conflicting types for 'sqlparse' 192 | extern int sqlparse(void *); | ^~~~~~~~ In file included from sql_scan.c:27: y.tab.h:644:5: note: previous declaration of 'sqlparse' was here **To Reproduce** # ./configure # make -j1 **Expected behavior** build OK **Software versions** - MonetDB 11.5.9 - OS and version: CentOS Linux 7 - Installed from release package or self-installed and compiled
compile error : conflicting types for 'sqlparse'
https://api.github.com/repos/MonetDB/MonetDB/issues/7103/comments
0
2021-04-14T02:38:08Z
2021-04-14T05:49:46Z
https://github.com/MonetDB/MonetDB/issues/7103
857,464,916
7,103
[ "MonetDB", "MonetDB" ]
**Describe the bug** I deleted a (3-column composite) primary key from my database table. When I tried to add it again, I got the error "Can not create object". **To Reproduce** I was not able to reproduce the error in a smaller scale. When I try to add a primary key that has repeated values for the specified primary key columns in a smaller table, I get the "Violated Constraint" error, so I do not think this is not the problem. **Expected behavior** The primary key is added successfully. **Software versions** - MonetDB version: MonetDB Database Server Toolkit v11.33.11 (Apr2019-SP1) - OS and version: Debian GNU/Linux 10 (buster) - I do not know whether it was installed from release package or self-installed and compiled, probably the first option. **Additional context** The table has around 140 million rows and 200 columns, so the bug can be be related to the amount of data. The table was created around 4 years ago. I have already searched for this error on the web, but found only one problem similar to mine [here](https://stackoverflow.com/questions/22142170/batproject-error-when-querying-monetdb-database), where there also was a huge amount of data. I also found that "Can not create object" is the value of the INTERNAL_OBJ_CREATE macro, but I do not exactly know in which case it is returned.
"Can not create object" error when adding primary key.
https://api.github.com/repos/MonetDB/MonetDB/issues/7102/comments
9
2021-04-13T14:18:31Z
2022-07-14T09:06:36Z
https://github.com/MonetDB/MonetDB/issues/7102
857,009,795
7,102
[ "MonetDB", "MonetDB" ]
**Is your feature request related to a problem? Please describe.** Given a floating point value range (say, between min(C) and max(C) value of a column C), the IMHO easiest(?) way to divide that range into N ranges/partitions/clusters of equal width (e.g., to calculate an equi-width histogram with N bins) and easily determine the range/partition/cluster P(V) each value V belongs to, requires using C(99?) math library function nextafter[f]() (or C++(11?) std::nextafter()) to get a tight exclusive upper bound as follows: calculate width of each range/partition/cluster as W=(nextafter(max(C))-min(C))/N , then determine range/partition/cluster of value V as P(V) = floor((V-min(C))/W). Doing so in SQL requires C/C++ function nextafter() to be made available in SQL. **Describe the solution you'd like** Please expose C/C++ function nextafter() (for floating point types) in SQL. **Describe alternatives you've considered** None. **Additional context** For convenience of (canonical) use, one could consider also adding nextafter() for integer and decimal types: for integer, it would boil down to a simple +1 (or -1); for decimal type decimal(x,y) it would be a + (or -) 10^(-y). Thanks! Best, Stefan
Feature request: nextafter() in SQL
https://api.github.com/repos/MonetDB/MonetDB/issues/7101/comments
2
2021-04-08T11:51:56Z
2024-07-13T14:00:01Z
https://github.com/MonetDB/MonetDB/issues/7101
853,391,822
7,101
[ "MonetDB", "MonetDB" ]
[This page](https://www.monetdb.org/blog/pystethoscope) describes the new pystethoscope tool. It gives an example of how to use it: If you issue: ``` pystethoscope -i pc,usec,state,stmt -t statement -e version sf10 ``` then supposedly you would get useful progress info. However: * It doesn't say _what_ information will be printed. * It doesn't say what switches are being used * It doesn't explicitly say what database is being connected to * It doesn't say what resolution of information we would get * The sample output is a raster image, which on a decent display, looks like ant trails, not any sort of text. * ... and if that's not problematic enough, the syntax is wrong. You specify the DB name with `-d` with the current version of pysthethoscope :-( When I fix the syntax, it's accepted, but what I get is: ``` pystethoscope -d ontime5 -i pc,usec,state,stmt -t statement -e version Connected to the database: ontime5 Key pc,usec,state,stmt not found in the JSON object {} Key pc,usec,state,stmt not found in the JSON object {} Key pc,usec,state,stmt not found in the JSON object {} Key pc,usec,state,stmt not found in the JSON object {} Key pc,usec,state,stmt not found in the JSON object {} Key pc,usec,state,stmt not found in the JSON object {} ``` (and a few more of those lines.)
pystethoscope example lacks explanation + doesn't properly work
https://api.github.com/repos/MonetDB/MonetDB/issues/7100/comments
3
2021-04-07T22:32:23Z
2021-04-15T10:40:52Z
https://github.com/MonetDB/MonetDB/issues/7100
852,878,569
7,100
[ "MonetDB", "MonetDB" ]
When one types the prefix of a no-schema (= sys schema) table, name completion kicks in (assuming a valid name can be completed). However, schema names will not be completed, nor will table names within non-sys schemata, e.g. `myschema.my`, then Tab, will not be completed into `myschema.mytable`. **Software versions** - MonetDB 11.39.11 - OS: Devuan GNU/Linux Beowulf. - Self-built
Name completion limited to sys schema tables
https://api.github.com/repos/MonetDB/MonetDB/issues/7099/comments
0
2021-04-05T14:34:56Z
2024-06-27T13:15:32Z
https://github.com/MonetDB/MonetDB/issues/7099
850,410,523
7,099
[ "MonetDB", "MonetDB" ]
The [mode](https://en.wikipedia.org/wiki/Mode_(statistics)) of a finite multiset of values (or of a distribution) is the value occurring the maximum number of times. It is quite useful in statistical work, along with the mean and the median statistics. MonetDB [offers](https://www.monetdb.org/Documentation/SQLReference/FunctionsAndOperators/AggregateFunctions) means (= averages) and medians via aggregate functions; so - why not modes as well? Currently, one needs to perform a subquery/separate query to count the number of occurrences of each value, and take the maximum occurrence value from there.
Add a 'MODE' aggregate function
https://api.github.com/repos/MonetDB/MonetDB/issues/7098/comments
0
2021-04-05T09:36:21Z
2024-06-27T13:15:32Z
https://github.com/MonetDB/MonetDB/issues/7098
850,238,407
7,098
[ "MonetDB", "MonetDB" ]
When grouping by certain columns in a table, we can only select other columns via an aggregate function. However, at times, one merely wants _some_ value in that column of records in the group - arbitrarily. See also this StackOverflow question: [GROUP BY one column; pick arbitrary value for another](https://stackoverflow.com/q/15314892/1593077) Some DBMSes have an aggregate function named `ANY` or `ARBITRARY` which does exactly this (although some only have it internally, see [here](https://www.sql.kiwi/2011/07/undocumented-query-plans-the-any-aggregate.html)). Now, it is possible to simulate this using a window function (row number over order by null, and taking the first element) - but it is _much_ more convenient to have this available in MonetDB directly: ``` SELECT user.id, ANY(file.path), ANY(file.size) FROM user, file WHERE files.user_id = user.id GROUP BY user.id; ``` Note that the choice of record for the different uses of `ANY` needs to be the same (otherwise it is only useful for a single rather than multiple columns).
Add an 'ANY' or 'ARBITRARY' aggregate function
https://api.github.com/repos/MonetDB/MonetDB/issues/7097/comments
1
2021-04-05T09:28:49Z
2024-07-13T13:35:15Z
https://github.com/MonetDB/MonetDB/issues/7097
850,233,552
7,097
[ "MonetDB", "MonetDB" ]
**Describe the bug** SQL debugging history not reset. **To Reproduce** create table empty(i int, s string); debug select * from empty; l[0] This will show a proper plan with emptybinds. Now, execute: insert into empty values(1,'hello'); debug select * from empty; l[0] The MAL listing is the one from the previous call. It contains emptybinds, which it shouldn't **Software versions** - MonetDB version number Default
DEBUG SQL statement broken
https://api.github.com/repos/MonetDB/MonetDB/issues/7096/comments
1
2021-04-03T21:15:02Z
2024-06-27T13:15:30Z
https://github.com/MonetDB/MonetDB/issues/7096
849,741,046
7,096
[ "MonetDB", "MonetDB" ]
Monet SP3 Oct 2020 11.39.13 version Bug Issue: With latest MonetDB version and ODBC version SP3 in this case (11.39.13) throws error for SELECT SUM sql in ODBC layer. Description: SQL is not returning the column name properly. Error is as below SQLDescribeCol: typeODBC: Unknown ODBC type! (16384) mDataType: HG_NULL_VALUE(hgColumnType) precision: 39 scale: 0 nullable: true Column name: %5. Setting this column to hgBinary_column type. Executing the below SQL query in monetdb and ODBC version (11.39.13): SELECT SUM("TM_DIM_ABC_39880".YR_AGO_KEY) FROM "TM_DIM_ABC_39880" WHERE (("TM_DIM_ABC_39880".HIER_FLG IN (25)) AND ("TM_DIM_ABC_39880".ROLLING IN (31078)) AND ("TM_DIM_ABC_39880".TM_UNIFORM_KEY = 150181958)); +----------+ | %5 | +==========+ | 88006940 | +----------+ Executing the below SQL query in monetdb and ODBC version (11.29.13): SELECT SUM("TM_DIM_ABC_39880".YR_AGO_KEY) FROM "TM_DIM_ABC_39880" WHERE (("TM_DIM_ABC_39880".HIER_FLG IN (25)) AND ("TM_DIM_ABC_39880".ROLLING IN (31078)) AND ("TM_DIM_ABC_39880".TM_UNIFORM_KEY = 150181958)); +----------+ | L3 | +==========+ | 88006940 | +----------+
SQL is not returning the column name properly - Monet SP3 Oct 2020 11.39.13 version Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/7095/comments
4
2021-04-02T13:45:25Z
2024-06-27T13:15:29Z
https://github.com/MonetDB/MonetDB/issues/7095
849,227,603
7,095
[ "MonetDB", "MonetDB" ]
We encounter a bug with remote tables as part of transactions: sql>CREATE REMOTE TABLE rmt_tbl (id int, name varchar(20)) ON ‘mapi:monetdb://remote.host.url:50000/dbname/scm1/l_tbl’; operation successful sql>BEGIN TRANSACTION; auto commit mode: off sql>DROP TABLE rmt_tbl; operation successful sql>ROLLBACK; auto commit mode: on sql>DROP TABLE if exists rmt_tbl; no such table: ‘sys.rmt_tbl’ sql> It seems that after rollback the table exists in the catalogue but it does not actually exists so that drop table fails even if we have ‘if exists’ This happens only with remote tables. (October2020-SP3)
Drop remote tables in transactions and rollback
https://api.github.com/repos/MonetDB/MonetDB/issues/7094/comments
5
2021-03-30T19:27:10Z
2024-06-27T13:15:28Z
https://github.com/MonetDB/MonetDB/issues/7094
845,116,532
7,094
[ "MonetDB", "MonetDB" ]
While looking for available global variables, I noticed `current_schema` is not in `sys.keywords` (Oct2020 5e7ef9c3f0bd): ``` sql>select distinct * from sys.keywords where keyword ilike '%current%'; +-------------------+ | keyword | +===================+ | CURRENT | | CURRENT_DATE | | CURRENT_ROLE | | CURRENT_TIME | | CURRENT_TIMESTAMP | | CURRENT_USER | +-------------------+ ``` Why is `current_schema` not a reserved keyword? While it seems to behave like one: ``` sql>create table t (current_schema string); #2021-03-30 14:44:16: client1: createExceptionInternal: !ERROR: ParseException:SQLparser:42000!syntax error, unexpected CURRENT_SCHEMA, expecting FOREIGN or PRIMARY or UNIQUE in: "create table t (current_schema" syntax error, unexpected CURRENT_SCHEMA, expecting FOREIGN or PRIMARY or UNIQUE in: "create table t (current_schema" sql>create table t ("current_schema" string); operation successful ```
`current_schema` not in sys.keywords
https://api.github.com/repos/MonetDB/MonetDB/issues/7093/comments
0
2021-03-30T12:45:13Z
2024-06-27T13:15:28Z
https://github.com/MonetDB/MonetDB/issues/7093
844,488,899
7,093
[ "MonetDB", "MonetDB" ]
**Describe the bug** Just to document a low priority problem. The attached query contains >86K ANDs and ORs. Run the file with `mclient`, you'll get: ``` ParseException:SQLparser:42000!Query too complex: running out of stack space ``` Don't know what the current limit is, but maybe we can improve the parser in the future to handle a larger number of WHERE conditions **Software versions** - MonetDB version number [Oct2020, hg id: 5e7ef9c3f0bd] [query-too-complex.sql.gz](https://github.com/MonetDB/MonetDB/files/6228661/query-too-complex.sql.gz)
ParseException:SQLparser:42000!Query too complex: running out of stack space
https://api.github.com/repos/MonetDB/MonetDB/issues/7092/comments
7
2021-03-30T11:34:49Z
2024-06-28T10:08:03Z
https://github.com/MonetDB/MonetDB/issues/7092
844,409,295
7,092
[ "MonetDB", "MonetDB" ]
**Describe the bug** I am trying to integrate Monetdbe into a C++ application. When a SELECT statement is run after running the monetdbe_append function, the Select query returns the following error: `MALException:algebra.projection:GDK reported error.` If I do not use monetdbe_append, but insert into the table using the following code, the SELECT statement works fine. ``` if (monetdbe_query(db, "INSERT INTO integers VALUES (3, 4), (5, 6), (7, NULL);", NULL, &rows_affected) != NULL) { fprintf(stderr, "Failed to query database\n"); } ``` **To Reproduce** created a C++ application using CMAKE. In the CMakeLists.txt file set the following in target_link_libraries include MonetDB-master/build/tools/monetdbe/libmonetdbe.so In target_include_directories point to the following files: monetdbe.h monetdb_config.h in the main.cpp file copy the following code(this is adapted form the copy_into.c examples file): ``` int main(){ monetdbe_database db = NULL; monetdbe_result *result; monetdbe_column *cols[2]; monetdbe_cnt rows_affected = 0; char* err; char createSQL[100]="CREATE TABLE integers(i INTEGER, j INTEGER);"; char insertIntoSQL[100]="INSERT INTO integers VALUES (3, 4), (5, 6), (7, 8);"; char selectSQL[100]="SELECT * FROM integers"; if (monetdbe_open(&db, NULL /* inmemory database */, NULL /* no options */)) { fprintf(stderr, "Failed to open database\n"); return -1; } if (monetdbe_query(db, createSQL, NULL, NULL) != NULL) { fprintf(stderr, "Failed to query database\n"); } int32_t intsI[3] = { 3, 5, 7}; monetdbe_column col0 = { .type = monetdbe_int32_t, .data = &intsI, .count = 2 }; int32_t intsJ[3] = { 4, 6,8}; monetdbe_column col1 = { .type = monetdbe_int32_t, .data = &intsJ, .count = 2 }; monetdbe_column* dcol[2] = { &col0, &col1}; monetdbe_append(db, "sys", "integers", (monetdbe_column**) &dcol, 2); //if (monetdbe_query(db, insertIntoSQL, NULL, &rows_affected) != NULL) { // fprintf(stderr, "Failed to query database\n"); //} err = monetdbe_query(db, selectSQL, &result, NULL); if (err != NULL) { printf("%s\r\n", err); } // print the names of the result for (size_t i = 0; i < result->ncols; i++) { monetdbe_result_fetch(result, &cols[i], i); printf("%s ", cols[i]->name); } printf("\r\n"); // print the data of the result for (size_t row_idx = 0; row_idx < result->nrows; row_idx++) { for (size_t col_idx = 0; col_idx < result->ncols; col_idx++) { assert(cols[col_idx]->type == monetdbe_int32_t); monetdbe_column_int32_t *col = (monetdbe_column_int32_t *)cols[col_idx]; int val = col->data[row_idx]; if (val == col->null_value) printf("NULL "); else printf("%d ", val); } printf("\n"); } return 0; } ``` **Expected behavior** I would expect the line err = monetdbe_query(db, selectSQL, &result, NULL); to run successfully **Screenshots** If applicable, add screenshots to help explain your problem. **Software versions** - I downloaded the Monetdb source Code after Oct2020 - Ubuntu 20.04 - I followed the following instructions to install monetDB locally git clone https://github.com/MonetDB/MonetDB MonetDB cd MonetDB mkdir build && cd build cmake -DCMAKE_BUILD_TYPE=Release .. cmake --build . **Issue labeling ** Bug **Additional context**
MALException when running select query after monetdbe_append in MonetDBe
https://api.github.com/repos/MonetDB/MonetDB/issues/7091/comments
8
2021-03-29T13:24:30Z
2024-06-27T13:15:26Z
https://github.com/MonetDB/MonetDB/issues/7091
843,367,736
7,091
[ "MonetDB", "MonetDB" ]
**Describe the bug** I am facing very slow performance using a sum() window function. **To Reproduce** The first table (t1 has 1.270.000 rows and around 600MB of data, t2 has 40.000.000 rows and around 10.3 GB). Here’s the SQL-Query I am using (column and table names changed due to confidentiality): SELECT t1.pk2, SUM(t2.amount) over ( partition by t1.someColumn1 ORDER BY t1.pk3 ) AS Sum_Amount FROM table1 t1 LEFT JOIN table2 t2 on (t1.pk1 = t2.pk1 AND t1.pk2 = t2.pk2 AND t1.pk3 = t2.pk3); You can find the performed actions in the text file in the attachments. **Expected behavior** A clear and concise description of what you expected to happen. **Software versions** The problem occurred on a Windows 10 machine using the release package of MonetDB 10.5. **Issue labeling ** Make liberal use of the labels to characterise the issue topics. e.g. identify severity, version, etc.. **Additional context** I had to kill this query after 5 hours of runtime in MonetDB. I also tried to run the query on a smaller subset of the data and it worked. The same query with the same test data runs on MariaDB in under 8 Minutes, therefore I don’t think it is an issue with the query or the data. Is there anything I can do to speed up this window function or is this a problem MonetDB faces with window functions on big tables? [explain_windowFunction.txt](https://github.com/MonetDB/MonetDB/files/6220031/explain_windowFunction.txt)
Performance issues using a window function
https://api.github.com/repos/MonetDB/MonetDB/issues/7090/comments
4
2021-03-29T07:34:39Z
2024-06-27T13:15:25Z
https://github.com/MonetDB/MonetDB/issues/7090
843,069,915
7,090
[ "MonetDB", "MonetDB" ]
0. Overview As a result of installing and testing version 11.39.13 of Monetdb as follows, there is a bug in which data is inconsistent when query conditions are applied to numeric columns in Remote Table. The following problem occurs in both conditional columns of type int and double type. The same happens with Merge tables that contain remote tables. We present an example of a problem that occurred on two servers, beestore and beestore1. And both the server installed in the binary method and in the compile method show the same symptoms. Below is a list of versions showing the same symptoms. -MonetDB 11.39.13 (binary & Compiled) -MonetDB 11.39.7 (binary) -MonetDB 11.39.5 (binary) 1. Server environment and version 1) beestore server (server accessing remote table) MonetDB 5 server 11.39.13 (64-bit, 128-bit integers) This is an unreleased version Copyright (c) 1993 - July 2008 CWI Copyright (c) August 2008 - 2021 MonetDB B.V., all rights reserved Visit https://www.monetdb.org/ for further information Found 31.2GiB available memory, 16 available cpu cores Libraries: libpcre: 8.32 2012-11-30 openssl: OpenSSL 1.0.2k-fips 26 Jan 2017 libxml2: 2.9.1 Compiled by: root@beestore (x86_64-pc-linux-gnu) Compilation: /usr/bin/cc -DNDEBUG=1 Linking : /usr/bin/ld 2) beestore1 server (server serving remote table) MonetDB 5 server 11.39.13 (64-bit, 128-bit integers) This is an unreleased version Copyright (c) 1993 - July 2008 CWI Copyright (c) August 2008 - 2021 MonetDB B.V., all rights reserved Visit https://www.monetdb.org/ for further information Found 15.5GiB available memory, 8 available cpu cores Libraries: libpcre: 8.32 2012-11-30 openssl: OpenSSL 1.0.2k-fips 26 Jan 2017 libxml2: 2.9.1 Compiled by: root@beestore1 (x86_64-pc-linux-gnu) Compilation: /usr/bin/cc -DNDEBUG=1 Linking : /usr/bin/ld 2. Data Creation 1) DDL in beestore1 server sql> -- Create local table CREATE TABLE AMI_test ( toc_no String null, mesure_de int null ); sql> -- insert sample data insert into AMI_test values('A000000009', 20201006); insert into AMI_test values('A000000010', 20201007); insert into AMI_test values('A000000011', 20201008); insert into AMI_test values('A000000012', 20201009); insert into AMI_test values('A000000013', 20201010); insert into AMI_test values('A000000014', 20201011); insert into AMI_test values('A000000015', 20201012); insert into AMI_test values('A000000016', 20201013); -- Checking the inserted data sql> select * from AMI_test order by mesure_de; +------------+-----------+ | toc_no | mesure_de | +============+===========+ | A000000009 | 20201006 | | A000000010 | 20201007 | | A000000011 | 20201008 | | A000000012 | 20201009 | | A000000013 | 20201010 | | A000000014 | 20201011 | | A000000015 | 20201012 | | A000000016 | 20201013 | +------------+-----------+ 2) DDL in beestore server sql> -- create remote table CREATE REMOTE TABLE AMI_test ( toc_no String null, mesure_de int null ) on 'mapi:monetdb://beestore1:50000/bcsdb'; -- Checking the inserted data from remote table (same as above) sql>select * from AMI_test order by mesure_de; +------------+-----------+ | toc_no | mesure_de | +============+===========+ | A000000009 | 20201006 | | A000000010 | 20201007 | | A000000011 | 20201008 | | A000000012 | 20201009 | | A000000013 | 20201010 | | A000000014 | 20201011 | | A000000015 | 20201012 | | A000000016 | 20201013 | +------------+-----------+ 3. Query on numeric column (beestore server) -- Rows with mesure_de value less than 20201011 should be extracted, but it is not. (mesure_de==20201011) select * from AMI_test where mesure_de >= 20201001 and mesure_de < 20201011 order by mesure_de desc; +------------+-----------+ | toc_no | mesure_de | +============+===========+ | A000000014 | 20201011 | | A000000013 | 20201010 | | A000000012 | 20201009 | | A000000011 | 20201008 | | A000000010 | 20201007 | | A000000009 | 20201006 | +------------+-----------+ -- Create local table based on AMI_test table data sql>create table AMI_test_normal as select * from AMI_test; operation successful -- Execute the same query on the created local table (Normal data with mesure_de < 20201011) select * from AMI_test_normal where mesure_de >= 20201001 and mesure_de < 20201011 order by mesure_de desc; +------------+-----------+ | toc_no | mesure_de | +============+===========+ | A000000013 | 20201010 | | A000000012 | 20201009 | | A000000011 | 20201008 | | A000000010 | 20201007 | | A000000009 | 20201006 | +------------+-----------+ **Expected Output** -- Query from Remote Table select * from AMI_test where mesure_de >= 20201001 and mesure_de < 20201011 order by mesure_de desc; +------------+-----------+ | toc_no | mesure_de | +============+===========+ | A000000013 | 20201010 | | A000000012 | 20201009 | | A000000011 | 20201008 | | A000000010 | 20201007 | | A000000009 | 20201006 | +------------+-----------+ **Additional context** The above problem does not occur in MonetDB-11.31.13 **Software versions** - MonetDB version number : MonetDB 11.39.13 (binary & Compiled) MonetDB 11.39.7 (binary) MonetDB 11.39.5 (binary) - OS and version: CentOS Linux release 7.4.1708 - Installed from release package or self-installed and compiled : both ** Additional Tests** We tested as follows from the recently released version. The problem seems to have occurred from version 11.37.7 MonetDB-SQL-server5-11.39.13 MonetDB-client-11.39.13 -> fail MonetDB-SQL-server5-11.39.11 MonetDB-client-11.39.11 -> fail MonetDB-SQL-server5-11.39.7 MonetDB-client-11.39.7 - > fail MonetDB-SQL-server5-11.39.5 MonetDB-client-11.39.5 -> fail MonetDB-SQL-server5-11.37.11 MonetDB-client-11.37.11 -> fail MonetDB-SQL-server5-11.37.7 MonetDB-client-11.37.7 -> fail MonetDB-SQL-server5-11.35.19 MonetDB-client-11.35.19 -> OK
Data consistency problem of query results in the latest release of Monetdb (Remote Table)
https://api.github.com/repos/MonetDB/MonetDB/issues/7089/comments
1
2021-03-26T03:49:38Z
2024-06-27T13:15:24Z
https://github.com/MonetDB/MonetDB/issues/7089
841,563,835
7,089
[ "MonetDB", "MonetDB" ]
**Describe the bug** Given the following (wrong, as of Oct2020) function: ``` CREATE OR REPLACE FUNCTION diff_days(d1 date, d2 date) RETURNS integer BEGIN RETURN d1 - d2; END; ``` This ``` with dates as (select * from (values (curdate()), (curdate())) as tmp_1(value)) select diff_days(value,curdate()) from dates; ``` returns, as expected: ``` types day_interval(4,0) and int(32,0) are not equal ``` However, when the same is used as a subquery and the result of the function used in a top-level condition (see **To Reproduce**, below), the error is not caught. Instead, it seems to me that the top-level query is attempted to be evaluated, which causes a SIGSEGV: ``` Thread 13 "mserver5" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7f29924d1700 (LWP 561)] 0x00007f29ac3aaccc in rel2bin_select (be=be@entry=0x7f298c001280, rel=rel@entry=0x7f298c061030, refs=refs@entry=0x7f298c061e10) at /opt/monetdb/SpinqueMonetDB-11.39.202103232036/sql/backends/monet5/rel_bin.c:3307 3307 sub = subrel_bin(be, rel->l, refs); (gdb) bt #0 0x00007f29ac3aaccc in rel2bin_select (be=be@entry=0x7f298c001280, rel=rel@entry=0x7f298c061030, refs=refs@entry=0x7f298c061e10) at /opt/monetdb/SpinqueMonetDB-11.39.202103232036/sql/backends/monet5/rel_bin.c:3307 #1 0x00007f29ac39e99f in subrel_bin (be=0x7f298c001280, rel=0x7f298c061030, refs=0x7f298c061e10) at /opt/monetdb/SpinqueMonetDB-11.39.202103232036/sql/backends/monet5/rel_bin.c:5933 #2 0x00007f29ac3aa46f in rel2bin_project (be=0x7f298c001280, rel=0x7f298c061220, refs=0x7f298c061e10, topn=<optimized out>) at /opt/monetdb/SpinqueMonetDB-11.39.202103232036/sql/backends/monet5/rel_bin.c:3164 #3 0x00007f29ac39e978 in subrel_bin (be=0x7f298c001280, rel=0x7f298c061220, refs=0x7f298c061e10) at /opt/monetdb/SpinqueMonetDB-11.39.202103232036/sql/backends/monet5/rel_bin.c:5929 #4 0x00007f29ac3ab596 in output_rel_bin (be=0x7f298c001280, rel=0x7f298c061220) at /opt/monetdb/SpinqueMonetDB-11.39.202103232036/sql/backends/monet5/rel_bin.c:6005 #5 0x00007f29ac3bda1b in sql_relation2stmt (r=0x7f298c061220, be=0x7f298c001280) at /opt/monetdb/SpinqueMonetDB-11.39.202103232036/sql/backends/monet5/sql_gencode.c:719 #6 backend_dumpstmt (be=0x7f298c001280, mb=0x7f298c003c40, r=0x7f298c061220, top=1, add_end=0, query=<optimized out>) at /opt/monetdb/SpinqueMonetDB-11.39.202103232036/sql/backends/monet5/sql_gencode.c:772 #7 0x00007f29ac39150d in SQLparser (c=0x151dc80) at /opt/monetdb/SpinqueMonetDB-11.39.202103232036/sql/backends/monet5/sql_scenario.c:1102 #8 0x00007f29baa667fe in runPhase (phase=1, c=0x151dc80) at /opt/monetdb/SpinqueMonetDB-11.39.202103232036/monetdb5/mal/mal_scenario.c:449 #9 runPhase (phase=1, c=0x151dc80) at /opt/monetdb/SpinqueMonetDB-11.39.202103232036/monetdb5/mal/mal_scenario.c:444 #10 runScenarioBody (once=<optimized out>, c=<optimized out>) at /opt/monetdb/SpinqueMonetDB-11.39.202103232036/monetdb5/mal/mal_scenario.c:469 #11 runScenario (c=0x151dc80, once=0) at /opt/monetdb/SpinqueMonetDB-11.39.202103232036/monetdb5/mal/mal_scenario.c:507 #12 0x00007f29baa66d82 in MSserveClient (c=0x151dc80) at /opt/monetdb/SpinqueMonetDB-11.39.202103232036/monetdb5/mal/mal_session.c:485 #13 0x00007f29baa673ad in MSscheduleClient (command=<optimized out>, challenge=0x7f29924d0e13 "zQVuDQ7F", fin=0x7f29a4000b60, fout=0x7f29a4003de0, protocol=PROTOCOL_9, blocksize=8190) at /opt/monetdb/SpinqueMonetDB-11.39.202103232036/monetdb5/mal/mal_session.c:372 #14 0x00007f29baac8a86 in doChallenge (data=0x7f29924d0e13) at /opt/monetdb/SpinqueMonetDB-11.39.202103232036/monetdb5/modules/mal/mal_mapi.c:269 #15 0x00007f29ba488bea in THRstarter (a=0x7f29a4006860) at /opt/monetdb/SpinqueMonetDB-11.39.202103232036/gdk/gdk_utils.c:1490 #16 0x00007f29ba4bb539 in thread_starter (arg=0x2e48b50) at /opt/monetdb/SpinqueMonetDB-11.39.202103232036/gdk/gdk_system.c:776 #17 0x00007f29ba018432 in start_thread () from /lib64/libpthread.so.0 #18 0x00007f29b9f46913 in clone () from /lib64/libc.so.6 ``` **To Reproduce** ``` CREATE OR REPLACE FUNCTION diff_days(d1 date, d2 date) RETURNS integer BEGIN RETURN d1 - d2; END; with dates as (select * from (values (curdate()), (curdate())) as tmp_1(value)), t as (select diff_days(value,curdate()) as x from dates) select x from t where x = 0; ``` Note: - directly using `value - curdate()` instead of `diff_days(value, curdate())` behaves as expected - not using `x` in the top-level query behaves as expected **Expected behavior** ``` types day_interval(4,0) and int(32,0) are not equal ``` **Software versions** - MonetDB 5 server 11.39.14 (64-bit, 128-bit integers) - Fedora 32 - compiled from sources
SIGSEGV caused by error in subquery's function being ignored by top-level query
https://api.github.com/repos/MonetDB/MonetDB/issues/7087/comments
8
2021-03-24T15:09:35Z
2024-06-27T13:15:23Z
https://github.com/MonetDB/MonetDB/issues/7087
839,826,374
7,087
[ "MonetDB", "MonetDB" ]
Similar to #7085, but this is about table-returning UDFs. This function is safe to be executed in parallel, but I can't let MonetDB know about that. Like it happened in #7085 , it chops up the input bats, then immediately re-packs them and executes the UDF on the re-packed bats. So the result is worse performance than plain single-thread execution. ``` sql>explain select * from tokenize( (select subject,value,'SP',1,prob from tr_0_obj_string) ); +---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | mal | +=====================================================================================================================================================================+ | function user.main():void; | | X_1:void := querylog.define("explain select * from tokenize( (select subject,value,\\'SP\\',1,prob from tr_0_obj_string) );":str, "default_pipe":str, 21:int); | | barrier X_223:bit := language.dataflow(); | | X_29:bat[:str] := bat.pack(".%3":str, ".%3":str, ".%3":str); | | X_30:bat[:str] := bat.pack("id":str, "token":str, "prob":str); | | X_31:bat[:str] := bat.pack("int":str, "clob":str, "double":str); | | X_32:bat[:int] := bat.pack(32:int, 0:int, 53:int); | | X_33:bat[:int] := bat.pack(0:int, 0:int, 0:int); | | X_4:int := sql.mvc(); | | C_83:bat[:oid] := sql.tid(X_4:int, "spinque":str, "tr_0_obj_string":str, 0:int, 8:int); | | X_98:bat[:int] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "subject":str, 0:int, 0:int, 8:int); | | X_132:bat[:int] := algebra.projection(C_83:bat[:oid], X_98:bat[:int]); | | C_85:bat[:oid] := sql.tid(X_4:int, "spinque":str, "tr_0_obj_string":str, 1:int, 8:int); | | X_99:bat[:int] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "subject":str, 0:int, 1:int, 8:int); | | X_133:bat[:int] := algebra.projection(C_85:bat[:oid], X_99:bat[:int]); | | C_87:bat[:oid] := sql.tid(X_4:int, "spinque":str, "tr_0_obj_string":str, 2:int, 8:int); | | X_100:bat[:int] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "subject":str, 0:int, 2:int, 8:int); | | X_134:bat[:int] := algebra.projection(C_87:bat[:oid], X_100:bat[:int]); | | C_89:bat[:oid] := sql.tid(X_4:int, "spinque":str, "tr_0_obj_string":str, 3:int, 8:int); | | X_101:bat[:int] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "subject":str, 0:int, 3:int, 8:int); | | X_135:bat[:int] := algebra.projection(C_89:bat[:oid], X_101:bat[:int]); | | C_91:bat[:oid] := sql.tid(X_4:int, "spinque":str, "tr_0_obj_string":str, 4:int, 8:int); | | X_102:bat[:int] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "subject":str, 0:int, 4:int, 8:int); | | X_136:bat[:int] := algebra.projection(C_91:bat[:oid], X_102:bat[:int]); | | C_93:bat[:oid] := sql.tid(X_4:int, "spinque":str, "tr_0_obj_string":str, 5:int, 8:int); | | X_103:bat[:int] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "subject":str, 0:int, 5:int, 8:int); | | X_137:bat[:int] := algebra.projection(C_93:bat[:oid], X_103:bat[:int]); | | C_95:bat[:oid] := sql.tid(X_4:int, "spinque":str, "tr_0_obj_string":str, 6:int, 8:int); | | X_104:bat[:int] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "subject":str, 0:int, 6:int, 8:int); | | X_138:bat[:int] := algebra.projection(C_95:bat[:oid], X_104:bat[:int]); | | C_97:bat[:oid] := sql.tid(X_4:int, "spinque":str, "tr_0_obj_string":str, 7:int, 8:int); | | X_105:bat[:int] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "subject":str, 0:int, 7:int, 8:int); | | X_139:bat[:int] := algebra.projection(C_97:bat[:oid], X_105:bat[:int]); | | X_180:bat[:int] := mat.packIncrement(X_132:bat[:int], 8:int); | | X_182:bat[:int] := mat.packIncrement(X_180:bat[:int], X_133:bat[:int]); | | X_183:bat[:int] := mat.packIncrement(X_182:bat[:int], X_134:bat[:int]); | | X_184:bat[:int] := mat.packIncrement(X_183:bat[:int], X_135:bat[:int]); | | X_185:bat[:int] := mat.packIncrement(X_184:bat[:int], X_136:bat[:int]); | | X_186:bat[:int] := mat.packIncrement(X_185:bat[:int], X_137:bat[:int]); | | X_187:bat[:int] := mat.packIncrement(X_186:bat[:int], X_138:bat[:int]); | | X_15:bat[:int] := mat.packIncrement(X_187:bat[:int], X_139:bat[:int]); | | X_106:bat[:str] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "value":str, 0:int, 0:int, 8:int); | | X_140:bat[:str] := algebra.projection(C_83:bat[:oid], X_106:bat[:str]); | | X_107:bat[:str] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "value":str, 0:int, 1:int, 8:int); | | X_141:bat[:str] := algebra.projection(C_85:bat[:oid], X_107:bat[:str]); | | X_108:bat[:str] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "value":str, 0:int, 2:int, 8:int); | | X_142:bat[:str] := algebra.projection(C_87:bat[:oid], X_108:bat[:str]); | | X_109:bat[:str] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "value":str, 0:int, 3:int, 8:int); | | X_143:bat[:str] := algebra.projection(C_89:bat[:oid], X_109:bat[:str]); | | X_110:bat[:str] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "value":str, 0:int, 4:int, 8:int); | | X_144:bat[:str] := algebra.projection(C_91:bat[:oid], X_110:bat[:str]); | | X_111:bat[:str] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "value":str, 0:int, 5:int, 8:int); | | X_145:bat[:str] := algebra.projection(C_93:bat[:oid], X_111:bat[:str]); | | X_112:bat[:str] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "value":str, 0:int, 6:int, 8:int); | | X_146:bat[:str] := algebra.projection(C_95:bat[:oid], X_112:bat[:str]); | | X_113:bat[:str] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "value":str, 0:int, 7:int, 8:int); | | X_147:bat[:str] := algebra.projection(C_97:bat[:oid], X_113:bat[:str]); | | X_189:bat[:str] := mat.packIncrement(X_140:bat[:str], 8:int); | | X_190:bat[:str] := mat.packIncrement(X_189:bat[:str], X_141:bat[:str]); | | X_191:bat[:str] := mat.packIncrement(X_190:bat[:str], X_142:bat[:str]); | | X_192:bat[:str] := mat.packIncrement(X_191:bat[:str], X_143:bat[:str]); | | X_193:bat[:str] := mat.packIncrement(X_192:bat[:str], X_144:bat[:str]); | | X_194:bat[:str] := mat.packIncrement(X_193:bat[:str], X_145:bat[:str]); | | X_195:bat[:str] := mat.packIncrement(X_194:bat[:str], X_146:bat[:str]); | | X_16:bat[:str] := mat.packIncrement(X_195:bat[:str], X_147:bat[:str]); | | X_156:bat[:str] := algebra.project(X_132:bat[:int], "SP":str); | | X_157:bat[:str] := algebra.project(X_133:bat[:int], "SP":str); | | X_158:bat[:str] := algebra.project(X_134:bat[:int], "SP":str); | | X_159:bat[:str] := algebra.project(X_135:bat[:int], "SP":str); | | X_160:bat[:str] := algebra.project(X_136:bat[:int], "SP":str); | | X_161:bat[:str] := algebra.project(X_137:bat[:int], "SP":str); | | X_162:bat[:str] := algebra.project(X_138:bat[:int], "SP":str); | | X_163:bat[:str] := algebra.project(X_139:bat[:int], "SP":str); | | X_197:bat[:str] := mat.packIncrement(X_156:bat[:str], 8:int); | | X_198:bat[:str] := mat.packIncrement(X_197:bat[:str], X_157:bat[:str]); | | X_199:bat[:str] := mat.packIncrement(X_198:bat[:str], X_158:bat[:str]); | | X_200:bat[:str] := mat.packIncrement(X_199:bat[:str], X_159:bat[:str]); | | X_201:bat[:str] := mat.packIncrement(X_200:bat[:str], X_160:bat[:str]); | | X_202:bat[:str] := mat.packIncrement(X_201:bat[:str], X_161:bat[:str]); | | X_203:bat[:str] := mat.packIncrement(X_202:bat[:str], X_162:bat[:str]); | | X_20:bat[:str] := mat.packIncrement(X_203:bat[:str], X_163:bat[:str]); | | X_164:bat[:bte] := algebra.project(X_132:bat[:int], 1:bte); | | X_165:bat[:bte] := algebra.project(X_133:bat[:int], 1:bte); | | X_166:bat[:bte] := algebra.project(X_134:bat[:int], 1:bte); | | X_167:bat[:bte] := algebra.project(X_135:bat[:int], 1:bte); | | X_168:bat[:bte] := algebra.project(X_136:bat[:int], 1:bte); | | X_169:bat[:bte] := algebra.project(X_137:bat[:int], 1:bte); | | X_170:bat[:bte] := algebra.project(X_138:bat[:int], 1:bte); | | X_171:bat[:bte] := algebra.project(X_139:bat[:int], 1:bte); | | X_205:bat[:bte] := mat.packIncrement(X_164:bat[:bte], 8:int); | | X_206:bat[:bte] := mat.packIncrement(X_205:bat[:bte], X_165:bat[:bte]); | | X_207:bat[:bte] := mat.packIncrement(X_206:bat[:bte], X_166:bat[:bte]); | | X_208:bat[:bte] := mat.packIncrement(X_207:bat[:bte], X_167:bat[:bte]); | | X_209:bat[:bte] := mat.packIncrement(X_208:bat[:bte], X_168:bat[:bte]); | | X_210:bat[:bte] := mat.packIncrement(X_209:bat[:bte], X_169:bat[:bte]); | | X_211:bat[:bte] := mat.packIncrement(X_210:bat[:bte], X_170:bat[:bte]); | | X_23:bat[:bte] := mat.packIncrement(X_211:bat[:bte], X_171:bat[:bte]); | | X_116:bat[:dbl] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "prob":str, 0:int, 0:int, 8:int); | | X_148:bat[:dbl] := algebra.projection(C_83:bat[:oid], X_116:bat[:dbl]); | | X_118:bat[:dbl] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "prob":str, 0:int, 1:int, 8:int); | | X_149:bat[:dbl] := algebra.projection(C_85:bat[:oid], X_118:bat[:dbl]); | | X_120:bat[:dbl] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "prob":str, 0:int, 2:int, 8:int); | | X_150:bat[:dbl] := algebra.projection(C_87:bat[:oid], X_120:bat[:dbl]); | | X_122:bat[:dbl] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "prob":str, 0:int, 3:int, 8:int); | | X_151:bat[:dbl] := algebra.projection(C_89:bat[:oid], X_122:bat[:dbl]); | | X_124:bat[:dbl] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "prob":str, 0:int, 4:int, 8:int); | | X_152:bat[:dbl] := algebra.projection(C_91:bat[:oid], X_124:bat[:dbl]); | | X_126:bat[:dbl] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "prob":str, 0:int, 5:int, 8:int); | | X_153:bat[:dbl] := algebra.projection(C_93:bat[:oid], X_126:bat[:dbl]); | | X_128:bat[:dbl] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "prob":str, 0:int, 6:int, 8:int); | | X_154:bat[:dbl] := algebra.projection(C_95:bat[:oid], X_128:bat[:dbl]); | | X_130:bat[:dbl] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "prob":str, 0:int, 7:int, 8:int); | | X_155:bat[:dbl] := algebra.projection(C_97:bat[:oid], X_130:bat[:dbl]); | | X_213:bat[:dbl] := mat.packIncrement(X_148:bat[:dbl], 8:int); | | X_215:bat[:dbl] := mat.packIncrement(X_213:bat[:dbl], X_149:bat[:dbl]); | | X_216:bat[:dbl] := mat.packIncrement(X_215:bat[:dbl], X_150:bat[:dbl]); | | X_217:bat[:dbl] := mat.packIncrement(X_216:bat[:dbl], X_151:bat[:dbl]); | | X_218:bat[:dbl] := mat.packIncrement(X_217:bat[:dbl], X_152:bat[:dbl]); | | X_219:bat[:dbl] := mat.packIncrement(X_218:bat[:dbl], X_153:bat[:dbl]); | | X_220:bat[:dbl] := mat.packIncrement(X_219:bat[:dbl], X_154:bat[:dbl]); | | X_17:bat[:dbl] := mat.packIncrement(X_220:bat[:dbl], X_155:bat[:dbl]); | | (X_24:bat[:int], X_26:bat[:str], X_27:bat[:dbl]) := batspinque.UTF8tokenize_v0(X_15:bat[:int], X_16:bat[:str], X_20:bat[:str], X_23:bat[:bte], X_17:bat[:dbl]); | | language.pass(X_132:bat[:int]); | | language.pass(X_133:bat[:int]); | | language.pass(X_134:bat[:int]); | | language.pass(X_135:bat[:int]); | | language.pass(X_136:bat[:int]); | | language.pass(X_137:bat[:int]); | | language.pass(X_138:bat[:int]); | | language.pass(X_139:bat[:int]); | | language.pass(C_83:bat[:oid]); | | language.pass(C_85:bat[:oid]); | | language.pass(C_87:bat[:oid]); | | language.pass(C_89:bat[:oid]); | | language.pass(C_91:bat[:oid]); | | language.pass(C_93:bat[:oid]); | | language.pass(C_95:bat[:oid]); | | language.pass(C_97:bat[:oid]); | | exit X_223:bit; | | sql.resultSet(X_29:bat[:str], X_30:bat[:str], X_31:bat[:str], X_32:bat[:int], X_33:bat[:int], X_24:bat[:int], X_26:bat[:str], X_27:bat[:dbl]); | | end user.main; | ```
Mitosis and table-returning UDFs
https://api.github.com/repos/MonetDB/MonetDB/issues/7086/comments
2
2021-03-24T11:22:08Z
2024-06-27T13:15:22Z
https://github.com/MonetDB/MonetDB/issues/7086
839,621,586
7,086
[ "MonetDB", "MonetDB" ]
(Oct2020) Custom filter functions, which are in fact custom join implementations, are "ignored" by mitosis. Is this just not implemented, or is there a good reason for not allowing it? I couldn't find any. I say "ignored" in quotes above because in fact the large left bat does get chopped up, except it is immediately reassembled before the filter function is called once on the reassembled bat. Can it be something I missed in my implementation to make it work correctly? Here's the explain: ``` sql>explain select t1.subject, t2.subject from tr_0_obj_string t1, bm_0_obj_string t2 where [t1.value] maxlevenshtein [t2.value, 2]; +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | mal | +======================================================================================================================================================================================================+ | function user.main():void; | | X_1:void := querylog.define("explain select t1.subject, t2.subject from tr_0_obj_string t1, bm_0_obj_string t2 where [t1.value] maxlevenshtein [t2.value, 2];":str, "default_pipe":str, 26:int); | | barrier X_162:bit := language.dataflow(); | | X_36:bat[:str] := bat.pack("spinque.t1":str, "spinque.t2":str); | | X_37:bat[:str] := bat.pack("subject":str, "subject":str); | | X_38:bat[:str] := bat.pack("int":str, "int":str); | | X_39:bat[:int] := bat.pack(32:int, 32:int); | | X_40:bat[:int] := bat.pack(0:int, 0:int); | | X_4:int := sql.mvc(); | | C_88:bat[:oid] := sql.tid(X_4:int, "spinque":str, "tr_0_obj_string":str, 0:int, 8:int); | | X_111:bat[:str] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "value":str, 0:int, 0:int, 8:int); | | X_128:bat[:str] := algebra.projection(C_88:bat[:oid], X_111:bat[:str]); | | C_90:bat[:oid] := sql.tid(X_4:int, "spinque":str, "tr_0_obj_string":str, 1:int, 8:int); | | X_112:bat[:str] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "value":str, 0:int, 1:int, 8:int); | | X_129:bat[:str] := algebra.projection(C_90:bat[:oid], X_112:bat[:str]); | | C_92:bat[:oid] := sql.tid(X_4:int, "spinque":str, "tr_0_obj_string":str, 2:int, 8:int); | | X_113:bat[:str] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "value":str, 0:int, 2:int, 8:int); | | X_130:bat[:str] := algebra.projection(C_92:bat[:oid], X_113:bat[:str]); | | C_94:bat[:oid] := sql.tid(X_4:int, "spinque":str, "tr_0_obj_string":str, 3:int, 8:int); | | X_114:bat[:str] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "value":str, 0:int, 3:int, 8:int); | | X_131:bat[:str] := algebra.projection(C_94:bat[:oid], X_114:bat[:str]); | | C_96:bat[:oid] := sql.tid(X_4:int, "spinque":str, "tr_0_obj_string":str, 4:int, 8:int); | | X_115:bat[:str] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "value":str, 0:int, 4:int, 8:int); | | X_132:bat[:str] := algebra.projection(C_96:bat[:oid], X_115:bat[:str]); | | C_98:bat[:oid] := sql.tid(X_4:int, "spinque":str, "tr_0_obj_string":str, 5:int, 8:int); | | X_116:bat[:str] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "value":str, 0:int, 5:int, 8:int); | | X_133:bat[:str] := algebra.projection(C_98:bat[:oid], X_116:bat[:str]); | | C_100:bat[:oid] := sql.tid(X_4:int, "spinque":str, "tr_0_obj_string":str, 6:int, 8:int); | | X_117:bat[:str] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "value":str, 0:int, 6:int, 8:int); | | X_134:bat[:str] := algebra.projection(C_100:bat[:oid], X_117:bat[:str]); | | C_102:bat[:oid] := sql.tid(X_4:int, "spinque":str, "tr_0_obj_string":str, 7:int, 8:int); | | X_118:bat[:str] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "value":str, 0:int, 7:int, 8:int); | | X_135:bat[:str] := algebra.projection(C_102:bat[:oid], X_118:bat[:str]); | | X_144:bat[:str] := mat.packIncrement(X_128:bat[:str], 8:int); | | X_146:bat[:str] := mat.packIncrement(X_144:bat[:str], X_129:bat[:str]); | | X_147:bat[:str] := mat.packIncrement(X_146:bat[:str], X_130:bat[:str]); | | X_148:bat[:str] := mat.packIncrement(X_147:bat[:str], X_131:bat[:str]); | | X_149:bat[:str] := mat.packIncrement(X_148:bat[:str], X_132:bat[:str]); | | X_150:bat[:str] := mat.packIncrement(X_149:bat[:str], X_133:bat[:str]); | | X_151:bat[:str] := mat.packIncrement(X_150:bat[:str], X_134:bat[:str]); | | X_18:bat[:str] := mat.packIncrement(X_151:bat[:str], X_135:bat[:str]); | | C_13:bat[:oid] := sql.tid(X_4:int, "spinque":str, "bm_0_obj_string":str); | | X_16:bat[:str] := sql.bind(X_4:int, "spinque":str, "bm_0_obj_string":str, "value":str, 0:int); | | X_20:bat[:str] := algebra.projection(C_13:bat[:oid], X_16:bat[:str]); | | X_23:bat[:bte] := bat.single(2:bte); | | (X_24:bat[:oid], X_25:bat[:oid]) := spinque.maxlevenshteinjoin(X_18:bat[:str], X_20:bat[:str], X_23:bat[:bte], nil:BAT, nil:BAT, true:bit, nil:lng, false:bit); | | X_103:bat[:int] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "subject":str, 0:int, 0:int, 8:int); | | X_120:bat[:int] := algebra.projection(C_88:bat[:oid], X_103:bat[:int]); | | X_104:bat[:int] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "subject":str, 0:int, 1:int, 8:int); | | X_121:bat[:int] := algebra.projection(C_90:bat[:oid], X_104:bat[:int]); | | X_105:bat[:int] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "subject":str, 0:int, 2:int, 8:int); | | X_122:bat[:int] := algebra.projection(C_92:bat[:oid], X_105:bat[:int]); | | X_106:bat[:int] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "subject":str, 0:int, 3:int, 8:int); | | X_123:bat[:int] := algebra.projection(C_94:bat[:oid], X_106:bat[:int]); | | X_107:bat[:int] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "subject":str, 0:int, 4:int, 8:int); | | X_124:bat[:int] := algebra.projection(C_96:bat[:oid], X_107:bat[:int]); | | X_108:bat[:int] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "subject":str, 0:int, 5:int, 8:int); | | X_125:bat[:int] := algebra.projection(C_98:bat[:oid], X_108:bat[:int]); | | X_109:bat[:int] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "subject":str, 0:int, 6:int, 8:int); | | X_126:bat[:int] := algebra.projection(C_100:bat[:oid], X_109:bat[:int]); | | X_110:bat[:int] := sql.bind(X_4:int, "spinque":str, "tr_0_obj_string":str, "subject":str, 0:int, 7:int, 8:int); | | X_127:bat[:int] := algebra.projection(C_102:bat[:oid], X_110:bat[:int]); | | X_153:bat[:int] := mat.packIncrement(X_120:bat[:int], 8:int); | | X_154:bat[:int] := mat.packIncrement(X_153:bat[:int], X_121:bat[:int]); | | X_155:bat[:int] := mat.packIncrement(X_154:bat[:int], X_122:bat[:int]); | | X_156:bat[:int] := mat.packIncrement(X_155:bat[:int], X_123:bat[:int]); | | X_157:bat[:int] := mat.packIncrement(X_156:bat[:int], X_124:bat[:int]); | | X_158:bat[:int] := mat.packIncrement(X_157:bat[:int], X_125:bat[:int]); | | X_159:bat[:int] := mat.packIncrement(X_158:bat[:int], X_126:bat[:int]); | | X_17:bat[:int] := mat.packIncrement(X_159:bat[:int], X_127:bat[:int]); | | X_31:bat[:int] := algebra.projection(X_24:bat[:oid], X_17:bat[:int]); | | X_15:bat[:int] := sql.bind(X_4:int, "spinque":str, "bm_0_obj_string":str, "subject":str, 0:int); | | X_33:bat[:int] := algebra.projectionpath(X_25:bat[:oid], C_13:bat[:oid], X_15:bat[:int]); | | language.pass(C_88:bat[:oid]); | | language.pass(C_90:bat[:oid]); | | language.pass(C_92:bat[:oid]); | | language.pass(C_94:bat[:oid]); | | language.pass(C_96:bat[:oid]); | | language.pass(C_98:bat[:oid]); | | language.pass(C_100:bat[:oid]); | | language.pass(C_102:bat[:oid]); | | language.pass(C_13:bat[:oid]); | | exit X_162:bit; | | sql.resultSet(X_36:bat[:str], X_37:bat[:str], X_38:bat[:str], X_39:bat[:int], X_40:bat[:int], X_31:bat[:int], X_33:bat[:int]); | | end user.main; | ```
Mitosis and filter functions
https://api.github.com/repos/MonetDB/MonetDB/issues/7085/comments
5
2021-03-23T14:58:32Z
2024-06-27T13:15:21Z
https://github.com/MonetDB/MonetDB/issues/7085
838,817,996
7,085
[ "MonetDB", "MonetDB" ]
The approach taken to implement a better identifier resolution scheme seems to have ended with semantic inconsistency and deviance from the past. At the global SQL scope, the DECLARE statement is gone sql>declare i int; Variables cannot be declared on the global scope sql>declare sys.i int; Variables cannot be declared on the global scope sql>declare tmp.i int; Variables cannot be declared on the global scope This also means that top-level statements such as SET optimizer =‘minimal_pipe’ can only refer to built-in variables, which seems inconsistent. Conceptually, the outer scope can be seen as a procedure scope, which would allow for the aforementioned variable definitions and re-installing the full power of variable initialization using expressions. The declaration of system variables should follow the same route as what a user could type in the SQL command The workaround is to encapsulate the code in a PROCEDURE or FUNCTION, which is not nice and a deviation from other systems
Declare variables at global scope
https://api.github.com/repos/MonetDB/MonetDB/issues/7084/comments
2
2021-03-23T08:05:27Z
2024-06-27T13:15:20Z
https://github.com/MonetDB/MonetDB/issues/7084
838,461,113
7,084
[ "MonetDB", "MonetDB" ]
**Describe the bug** I am trying to integrate Monetdbe into a C++ application. When I include the <String> header then i get the following compiling errors: ``` /usr/include/c++/9/bits/ptr_traits.h:120:71: error: macro "static_assert" passed 3 arguments, but takes just 2 [build] 120 | "pointer type defines element_type or is like SomePointer<T, Args>"); ``` However, if I remove the following macro from the monetdb_config.h file then the error goes away. I this case Monetdbe seems to work fine. #ifndef static_assert /* static_assert is a C11 feature, defined in assert.h which also exists * in many other compilers we ignore it if the compiler doesn't support it */ #define static_assert(expr, mesg) ((void) 0) #endif Is it ok to remove this macro if compiling monetdbe in a C++ environment. **To Reproduce** Create a C++ application with CMAKE, I'm using compiler GCC 9.3.0 paste the code below code into the main.cpp file and try to compile the application ``` #include "monetdbe.h" #include <string> int main(){ std::string mystr="hello world"; } ``` **Expected behavior** I would expect the code to compile successfully **Screenshots** If applicable, add screenshots to help explain your problem. **Software versions** - I downloaded monetdb after October 2020 from the github page - Ubuntu 20.04 - i followed the following instructions to install monetDB locally git clone https://github.com/MonetDB/MonetDB MonetDB cd MonetDB mkdir build && cd build cmake -DCMAKE_BUILD_TYPE=Release .. cmake --build . **Issue labeling ** bug **Additional context** Add any other context about the problem here.
MonetDBe C++ Compiling Error
https://api.github.com/repos/MonetDB/MonetDB/issues/7083/comments
1
2021-03-22T09:53:42Z
2024-06-27T13:15:19Z
https://github.com/MonetDB/MonetDB/issues/7083
837,540,105
7,083
[ "MonetDB", "MonetDB" ]
When inserting, deleting or updating tables with mclient, on successful completing of the command we get a message with the number of rows affected. However, if we `CREATE TABLE AS( etc etc)` (or `CREATE TEMPORARY TABLE AS` - we only get a message saying `operation successful`. It would be useful if the creation of a non-empty table would also inform the user of the number of rows now existing in the new table.
Report number of records in created table
https://api.github.com/repos/MonetDB/MonetDB/issues/7082/comments
2
2021-03-19T16:49:17Z
2024-06-27T13:15:18Z
https://github.com/MonetDB/MonetDB/issues/7082
836,189,965
7,082
[ "MonetDB", "MonetDB" ]
Consider the following query: ``` UPDATE table_3 AS t3 SET c1 = t2.c1 FROM table_1 AS t1, table_2 AS t2 WHERE false; ``` in the case that: * Table 1 is small (3 records). * Table 2 is large (~60 Million records). * Table 3 is small (less than 1000 records). * c1 is a column of type `CHAR(3)` On my system, this gets me: ``` GDK reported error: GDKmmap: requested too much virtual memory; memory requested: 2307734896640, memory in use: 387076736, virtual memory in use: 2308246491776 HEAPalloc: Insufficient space for HEAP of 2307734835200 bytes. ``` Clearly, too much memory is being allocated (even if we ignore the fact that the condition is never met). **Software versions** - MonetDB 11.39.11 - Built from source - Devuan GNU/Linux 3 Beowulf
Attempt to allocate too much space in UPDATE query
https://api.github.com/repos/MonetDB/MonetDB/issues/7081/comments
3
2021-03-19T10:31:35Z
2024-06-27T13:15:18Z
https://github.com/MonetDB/MonetDB/issues/7081
835,813,105
7,081
[ "MonetDB", "MonetDB" ]
A recent syntax addition to MonetDB is the WITH clause for updates and deletions, as described [here](https://www.monetdb.org/Documentation/SQLReference/DataManipulation/TableUpdates). The WITH clause allows for an arbitrary SELECT query to be specified and given an alias. But - what about the simpler case, of just wanting to use an existing table? At the moment, we have to write statements such as: ``` WITH my_alias AS (SELECT * FROM my_table) UPDATE another_table SET foo='bar'; ``` which is redundant. It should not be problematic for MonetDB to accept: ``` WITH my_table UPDATE another_table SET foo='bar'; ``` and make sure that `my_table` actually exists. In case it matters - I'm using version 11.39.11
Allow "WITH my_table UPDATE" and "WITH my_table DELETE"
https://api.github.com/repos/MonetDB/MonetDB/issues/7080/comments
2
2021-03-16T15:02:03Z
2024-06-27T13:15:16Z
https://github.com/MonetDB/MonetDB/issues/7080
832,895,731
7,080
[ "MonetDB", "MonetDB" ]
The newly-introduced `WITH` clause for UPDATE queries should be subject to the WHERE clause constraints - but isn't, resulting in many overwriting updates. **To Reproduce** For setup, run these queries: ``` CREATE TEMPORARY TABLE t1 AS SELECT 123 AS c1 ON COMMIT PRESERVE ROWS; INSERT INTO t1 VALUES (45); CREATE TEMPORARY TABLE t2 AS SELECT 'AB' AS c3, 10 AS c4 ON COMMIT PRESERVE ROWS; INSERT INTO t2 VALUES ('CD', 20); ``` Now let's make an update: ``` > WITH t1_ AS (SELECT * FROM t1) UPDATE t2 SET c4 = t1_.c1 WHERE t1_.c1 = 123; 4 affected rows ``` It should be _2_ rows affected. And now: ``` >SELECT * FROM t2; +------+------+ | c3 | c4 | +======+======+ | AB | 45 | | CD | 45 | +------+------+ 2 tuples ``` when we should be seeing 123's. **Software versions** - MonetDB 11.39.11 - Devuan GNU/Linux 3 (Beowulf) - Built MonetDB from source
WITH table AS... UPDATE ignores the WHERE conditions on table
https://api.github.com/repos/MonetDB/MonetDB/issues/7079/comments
8
2021-03-16T14:00:35Z
2024-06-27T13:15:16Z
https://github.com/MonetDB/MonetDB/issues/7079
832,831,257
7,079
[ "MonetDB", "MonetDB" ]
If I open a link to an old bugzilla ticket, it gets redirected to github. However, the link is incorrect. For example: `https://www.monetdb.org/bugzilla/show_bug.cgi?id=6981` redirects to: `https://github.com/MonetDB/MonetDB/issues?id=6981` but it should be: `https://github.com/MonetDB/MonetDB/issues/6981`
Wrong links in redirect from bugzilla to Github
https://api.github.com/repos/MonetDB/MonetDB/issues/7078/comments
1
2021-03-16T10:49:58Z
2024-06-27T13:15:15Z
https://github.com/MonetDB/MonetDB/issues/7078
832,665,477
7,078
[ "MonetDB", "MonetDB" ]
Before Oct2020, non-monetdb users appeared to have more privileges by default. For example, this used to work (as a user): ``` sql>select * from sys.storage(); SELECT: no such table returning function 'storage' ``` If this now requires an explicit grant (which indeed makes it work), that's fine. However: - I don't see any mention on the release notes (it should be considered a breaking change) - the error doesn't mention it is about privileges, it suggests that the function doesn't exist. I would have expected an error like "insufficient privileges". - even more so, because the user can actually see the function: ``` sql>select id,name from sys.functions where name='storage'; +-------+---------+ | id | name | +=======+=========+ | 20767 | storage | | 20825 | storage | | 20845 | storage | | 20866 | storage | +-------+---------+ 4 tuples ```
Oct2020: new default privileges not effectively communicated
https://api.github.com/repos/MonetDB/MonetDB/issues/7077/comments
4
2021-03-15T15:05:54Z
2024-06-27T13:15:14Z
https://github.com/MonetDB/MonetDB/issues/7077
831,904,874
7,077
[ "MonetDB", "MonetDB" ]
**Describe the bug** Issue found while fighting #7073 (which was eventually invalid). Cgroups v1 has 1 soft and 1 hard limits for memory: - soft: `memory.soft_limit_in_bytes` - hard: `memory.limit_in_bytes` Cgroups v2 has [2 soft and 1 hard limits](https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git/tree/Documentation/admin-guide/cgroup-v2.rst#n1128) for memory: - soft: `memory.low` - soft: `memory.high` (harder than `memory.low`) - hard: `memory.max` Docker has [a soft and a hard limit](https://docs.docker.com/config/containers/resource_constraints/#limit-a-containers-access-to-memory): - soft: `memory-reservation` maps to - (v1) `memory.soft_limit_in_bytes` - (v2) `memory.low` - hard: `memory` maps to - (v1) `memory.limit_in_bytes` - (v2) `memory.max` The issue is that, for v2, MonetDB uses `memory.high || memory.max` as its soft limit. That is, it ignores `memory.low`, which is in fact the true soft limit. This is a bit of a problem, because when setting a soft limit in Docker, it will work with cgroups v1, but won't work with cgroups v2. It should probably consider: `memory.low || memory.high || memory.max`
mserver5 ignores memory.low from cgroups v2
https://api.github.com/repos/MonetDB/MonetDB/issues/7076/comments
3
2021-03-12T13:53:30Z
2024-06-27T13:15:13Z
https://github.com/MonetDB/MonetDB/issues/7076
830,140,364
7,076
[ "MonetDB", "MonetDB" ]
Hello MonetDB Team. We have a MonetDB query that makes use of three CTE steps within the query. The first two steps generate results over a million records each. The correct expected result should also yield millions of records. However, the use of the first CTE results in the third CTE expression yields an incomplete result. Alternatively. when we save the interim result of the first two steps into stand-alone tables, the application of the third step (using these new table references) yields the proper result (millions of records). Is it a know issue that CTE constructs can drop records during a query? We have provided a specific example below. The attached zip file contains three csv files that can be used to generate three tables (dummy_src_table, dummy_calendar_table & dummy_calendar_image) to perform the test queries below. Note that the csv file for the dummy_calendar_image table was generated from the intermediate result of QUERY #2's CTE (calendar_image). Is this behavior with large CTE expression a known issue in MonetDB? DETAILS FOLLOW... ------------------- START: QUERY #1 ------------------- -- THIS WORKS PROPERLY YIELDS 1,476,736 RECORDS ... WITH x AS ( SELECT dummy_calendar_image."FX", dummy_calendar_image."Dates", dummy_calendar_image."Dates_no", dummy_src_table."Values_" FROM dummy_calendar_image LEFT JOIN dummy_src_table ON dummy_calendar_image."FX" = dummy_src_table."FX" AND dummy_calendar_image."Dates" = dummy_src_table."Dates" ) SELECT COUNT(*) FROM x; -------------------- END: QUERY #1 -------------------- ------------------- START: QUERY #2 ------------------- -- THIS DOES NOT WORK PROPERLY...YIELDS 156,383 RECORDS WITH range_table as ( SELECT dummy_src_table."FX", dummy_src_table."Dates", dummy_calendar_table."freq_idx" AS "min_Dates_no", dummy_calendar_table."freq_idx"+5 AS "max_Dates_no" FROM dummy_src_table JOIN dummy_calendar_table ON dummy_calendar_table."Dates" = dummy_src_table."Dates" WHERE dummy_calendar_table."freq" = 'WEEKDAY' ) , calendar_image as ( SELECT DISTINCT range_table."FX", dummy_calendar_table."Dates" AS "Dates", dummy_calendar_table."freq_idx" as "Dates_no" FROM range_table JOIN dummy_calendar_table ON dummy_calendar_table."freq_idx" >= range_table."min_Dates_no" AND dummy_calendar_table."freq_idx" <= range_table."max_Dates_no" WHERE dummy_calendar_table."freq" = 'WEEKDAY' AND dummy_calendar_table."Dates" <= '2021-03-10' ) , x2 AS ( SELECT calendar_image."FX", calendar_image."Dates", calendar_image."Dates_no", dummy_src_table."Values_" FROM calendar_image LEFT JOIN dummy_src_table dummy_src_table ON calendar_image."FX" = dummy_src_table."FX" AND calendar_image."Dates" = dummy_src_table."Dates" ) SELECT COUNT(*) FROM x2; -------------------- END: QUERY #2 -------------------- [dummy_csv_files.zip](https://github.com/MonetDB/MonetDB/files/6126594/dummy_csv_files.zip)
Inconsistent Results using CTEs in Large Queries
https://api.github.com/repos/MonetDB/MonetDB/issues/7075/comments
17
2021-03-12T00:06:00Z
2024-06-27T13:15:12Z
https://github.com/MonetDB/MonetDB/issues/7075
829,631,157
7,075
[ "MonetDB", "MonetDB" ]
**Describe the bug** A database created with and running on 11.35.20 was stopped and started with 11.39.14 (latest from hg). The procedure makes mserver5 crash: ``` 2021-03-11 17:47:58 MSG default01[145]: external name "sql"."str_group_concat"; 2021-03-11 17:47:58 MSG default01[145]: GRANT EXECUTE ON WINDOW sys.group_concat(STRING) TO PUBLIC; 2021-03-11 17:47:58 MSG default01[145]: create window sys.group_concat(str STRING, sep STRING) returns STRING 2021-03-11 17:47:58 MSG default01[145]: external name "sql"."str_group_concat"; 2021-03-11 17:47:58 MSG default01[145]: GRANT EXECUTE ON WINDOW sys.group_concat(STRING, STRING) TO PUBLIC; 2021-03-11 17:47:58 MSG default01[145]: update sys.functions set system = true where system <> true and name in ('stddev_samp', 'stddev_pop', 'var_samp', 'var_pop', 'covar_samp', 'covar_pop', 'corr', 'group_concat') and schema_id = (select id from sys.schemas where name = 'sys') and type in (6, 3); 2021-03-11 17:47:58 MSG default01[145]: DROP AGGREGATE stddev_samp(date); 2021-03-11 17:47:58 MSG default01[145]: DROP AGGREGATE stddev_samp(time); 2021-03-11 17:47:58 MSG default01[145]: DROP AGGREGATE stddev_samp(timestamp); 2021-03-11 17:47:58 MSG default01[145]: DROP AGGREGATE stddev_pop(date); 2021-03-11 17:47:58 MSG default01[145]: DROP AGGREGATE stddev_pop(time); 2021-03-11 17:47:58 MSG default01[145]: DROP AGGREGATE stddev_pop(timestamp); 2021-03-11 17:47:58 MSG default01[145]: DROP AGGREGATE var_samp(date); 2021-03-11 17:47:58 MSG default01[145]: DROP AGGREGATE var_samp(time); 2021-03-11 17:47:58 MSG default01[145]: DROP AGGREGATE var_samp(timestamp); 2021-03-11 17:47:58 MSG default01[145]: DROP AGGREGATE var_pop(date); 2021-03-11 17:47:58 MSG default01[145]: DROP AGGREGATE var_pop(time); 2021-03-11 17:47:58 MSG default01[145]: DROP AGGREGATE var_pop(timestamp); 2021-03-11 17:47:58 MSG default01[145]: ALTER TABLE sys.keywords SET READ WRITE; 2021-03-11 17:47:58 MSG default01[145]: DELETE FROM sys.keywords where keyword IN ('NOCYCLE','NOMAXVALUE','NOMINVALUE'); 2021-03-11 17:47:58 MSG default01[145]: insert into sys.keywords values ('A 2021-03-11 17:47:58 MSG default01[145]: NALYZE'),('AT'),('AUTHORIZATION'),('CACHE'),('CENTURY'),('COLUMN'),('CLIENT'),('CUBE'),('CYCLE'),('DATA'),('DATE'),('DEBUG'),('DECADE'),('DEALLOCATE'),('DIAGNOSTICS'),('DISTINCT'),('DOW'),('DOY'),('EXEC'),('EXECUTE'),('EXPLAIN'),('FIRST'),('FWF'),('GROUPING'),('GROUPS'),('INCREMENT'),('INTE 2021-03-11 17:48:01 MSG merovingian[8]: database 'default01' (-1) has crashed with signal SIGSEGV (dumped core) 2021-03-11 17:48:01 ERR control[8]: !monetdbd: an internal error has occurred 'database 'default01' has crashed after starting, manual intervention needed, check monetdbd's logfile (merovingian.log) for details' 2021-03-11 17:48:06 ERR merovingian[8]: client error: database 'default01' has crashed after starting, manual intervention needed, check monetdbd's logfile (merovingian.log) for details ```
SIGSEGV when upgrading a database from 11.35 to 11.39
https://api.github.com/repos/MonetDB/MonetDB/issues/7074/comments
2
2021-03-11T17:02:29Z
2024-06-27T13:15:11Z
https://github.com/MonetDB/MonetDB/issues/7074
829,341,894
7,074
[ "MonetDB", "MonetDB" ]
This comes after a discussion in https://www.monetdb.org/pipermail/users-list/2021-March/010850.html (thanks Sjoerd for the feedback), triggered by MonetDB being unexpectedly killed. GDK's `GDK_mem_maxsize` is a **soft** limit for committed memory, in practice for `malloc()`-like allocations. How it is exactly used in MonetDB is not very important here, what is important is that it can be regarded as a soft limit: MonetDB uses it to calibrate its memory management, but can in practice allocate more memory. Its value is set this way: - By default, `GDK_mem_maxsize = 0.815 * <system memory>`. - If a limit is set via cgroups, then `GDK_mem_maxsize = 0.815 * <cgroups limit>` - If it is set via cmdline, then `GDK_mem_maxsize = <cmdline value>` The issue is in the setting via cgroups. I'll use cgroups v1 here, but the same holds for v2. The current logic is `GDK_mem_maxsize = 0.815 * (memory.limit_in_bytes || memory.soft_limit_in_bytes)`, meaning that if `memory.limit_in_bytes` is defined, then it has precedence over `memory.soft_limit_in_bytes`. I don't think this is correct, because it is (preferably) assigning a hard limit to a soft limit. This can cause problems. Imagine a container (or any other way of settings cgroups limits) setting both a soft and a hard limit. The soft limit will be ignored, MonetDB will use the hard limit as a soft one, and will have a high chance of hitting it, causing an OOM. This is in fact what is happening in my case. I think the right logic should be: `GDK_mem_maxsize = 0.815 * (memory.soft_limit_in_bytes || memory.limit_in_bytes)`, i.e. the soft limit should have priority. Even better, I think: `GDK_mem_maxsize = memory.soft_limit_in_bytes || 0.815 * memory.limit_in_bytes`. This would be more in line with the setting via cmdline, and would be more logical. It makes sense to say `soft = 80% hard`. It doesn't make sense to say `soft = 80% soft`. If a soft limit is given, it should be trusted. I am not entirely sure whether the same holds for `GDK_vm_maxsize`, because that one can be more regarded as a hard limit from within MonetDB. My intuition though is that it still should be associated with the soft limit coming from cgroups, because cgroups' hard limits should be the last safety guard from the kernel point of view, not settings for applications.
cgroups' hard/soft memory limits are considered in the wrong order
https://api.github.com/repos/MonetDB/MonetDB/issues/7073/comments
6
2021-03-10T13:34:06Z
2024-06-27T13:15:10Z
https://github.com/MonetDB/MonetDB/issues/7073
827,747,844
7,073
[ "MonetDB", "MonetDB" ]
**Describe the bug** On www.monetdb.org, the integrated search produces results whose links have `localhost:8080` as domain. **To Reproduce** Try e.g. https://www.monetdb.org/search/node?keys=stethoscope and check any result link. BTW, mind the typo here: ``` Create a setting with minimal input for an external user to demonstrate him the buggy behavior. This includes the relevant part of the database schema description. Performance trace of the roque query (using the TRACE command) ^^^^^ ```
Website's search results have wrong domain
https://api.github.com/repos/MonetDB/MonetDB/issues/7072/comments
6
2021-03-09T14:57:55Z
2024-06-27T13:15:09Z
https://github.com/MonetDB/MonetDB/issues/7072
826,060,320
7,072
[ "MonetDB", "MonetDB" ]
Hello, Since the first version of monetdblite (monetdbe now), passing/fetching the date and time columns (in monetdbe or capi code for instance) is done using intermediary structures, instead of native types (int, __int64). typedef struct { unsigned char day; unsigned char month; short year; } monetdbe_data_date; typedef struct { unsigned int ms; unsigned char seconds; unsigned char minutes; unsigned char hours; } monetdbe_data_time; typedef struct { monetdbe_data_date date; monetdbe_data_time time; } monetdbe_data_timestamp; typedef struct { unsigned char day; unsigned char month; int year; } cudf_data_date; typedef struct { unsigned int ms; unsigned char seconds; unsigned char minutes; unsigned char hours; } cudf_data_time; typedef struct { cudf_data_date date; cudf_data_time time; } cudf_data_timestamp; I am wondering if this conversion is truly necessary, considering that this effort is usually doubled by either converting back to native format (for append operations, for instance) or extra conversion in other flavours of date/time structures some other C code might need. The very few macros required for time information extraction from the native types (is_nil, extract) can be done on the client side when needed. Related to this, a low level function "monetdbe_result_scan" alternative to "monetdbe_result_fetch" would avoid extra memory allocation in case no storage is required or if a different storage for the result (user list, compressed, straight on disk, ...) is considered by a developer. For integers, doubles, float, date, daytime, timestamp types passing the data address Tloc(b, 0) in the same way GENERATE_BAT_INPUT is doing it, looks good enough, assuming the developer knows to use that memory address for reading purposes. For the rest of the types (str, blob, others), invoking a pointer to a provided user function (void *data, size_t data_size, size_t j) inside the BATloop would suffice. This "monetdbe_result_scan" part can be adjusted by a custom development, sure, but passing date-time types columns in native format (which can come from a remote connection as well) should be uniform. Having a version ID for the monetdbe_result structure would also help in case a remote connection can be instructed to provide results in different ways.
monetdbe, fetching date, daytime, timestamp in their MonetDB native memory storage format
https://api.github.com/repos/MonetDB/MonetDB/issues/7071/comments
1
2021-03-03T16:23:59Z
2024-06-27T13:15:09Z
https://github.com/MonetDB/MonetDB/issues/7071
821,267,030
7,071
[ "MonetDB", "MonetDB" ]
**Describe the bug** When I run the "getstarted" example code from https://github.com/MonetDBSolutions/monetdbe-examples on C++. I get the following error when the function monetdbe_close(&db) runs. `free(): double free detected in tcache 2` **To Reproduce** To get the code to run on a C++ compiler I had to make a slight change to the SQL strings passed to the functions, i.e. I created char arrays as shown below that were passed to the functions. `char createTableSQL[46]="CREATE TABLE integers(i INTEGER, j INTEGER);"; ` `char insertSQLChar[58]= "INSERT INTO integers VALUES (3, 4), (5, 6), (7, NULL);"; ` `char selectSQL[23]="SELECT * FROM integers";` ---------------------------THE FULL CODE IS BELOW-------------------------------------------------------- #include "monetdbe.h" #include <stdlib.h> #include <stdio.h> #include <inttypes.h> #include <string.h> #define error(msg) {fprintf(stderr, "Failure: %s\n", msg); return -1;} int main(){ monetdbe_database db = NULL; monetdbe_result *result; monetdbe_column *cols[2]; long int rows_affected = 0; char createTableSQL[46]="CREATE TABLE integers(i INTEGER, j INTEGER);"; char insertSQLChar[58]= "INSERT INTO integers VALUES (3, 4), (5, 6), (7, NULL);"; char selectSQL[23]="SELECT * FROM integers"; if (monetdbe_open(&db, NULL /* inmemory database */, NULL /* no options */)) { fprintf(stderr, "Failed to open database\n"); return -1; } if (monetdbe_query(db, createTableSQL, NULL, NULL) != NULL) { fprintf(stderr, "Failed to query database\n"); goto cleanup; } if (monetdbe_query(db, insertSQLChar, NULL, &rows_affected) != NULL) { fprintf(stderr, "Failed to query database\n"); goto cleanup; } printf("inserted %d rows\n", (int)rows_affected); if (monetdbe_query(db, selectSQL, &result, NULL) != NULL) { fprintf(stderr, "Failed to query database\n"); goto cleanup; } // print the names of the result for (size_t i = 0; i < result->ncols; i++) { monetdbe_result_fetch(result, &cols[i], i); printf("%s ", cols[i]->name); } printf("\n"); // print the data of the result for (size_t row_idx = 0; row_idx < result->nrows; row_idx++) { for (size_t col_idx = 0; col_idx < result->ncols; col_idx++) { assert(cols[col_idx]->type == monetdbe_int32_t); monetdbe_column_int32_t *col = (monetdbe_column_int32_t *)cols[col_idx]; int val = col->data[row_idx]; if (val == col->null_value) printf("NULL "); else printf("%d ", val); } printf("\n"); } cleanup: monetdbe_cleanup_result(db, result); monetdbe_close(&db); } ---------------------------END OF FULL CODE SECTION-------------------------------------------------------- **Expected behavior** I was expecting the monetdbe_close function to execute with no errors **Software versions** - MonetDB-master from Github on 26th February 2021 - Ubuntu 20.04 - I downloaded the code from this link https://github.com/MonetDB/MonetDB.git and then ran cmake -DCMAKE_BUILD_TYPE=Release .. cmake --build . I then added the following path to my target_link_libraries in my CMakeLists.txt file MonetDB-master/build/tools/monetdbe/libmonetdbe.so and added a path to the following two header files in target_include_directories in my CMakeLists.txt file monetdbe.h monetdb_config.h **Issue labeling ** bug **Additional context**
double free error when running MonetDBe Example
https://api.github.com/repos/MonetDB/MonetDB/issues/7070/comments
2
2021-02-28T08:36:15Z
2024-06-27T13:15:08Z
https://github.com/MonetDB/MonetDB/issues/7070
818,154,436
7,070
[ "MonetDB", "MonetDB" ]
**Describe the bug** Due to a large amount of data, the idea was to locate the database on an external drive (ssd on usb3) on a RPi4B+ with 64 bit Ubuntu 20.04 LTS. The database is created fine via the usual monetdbd command. However, when starting the database via mclient, an error occur. The error is: `#main thread: createExceptionInternal: !ERROR: IOException:mal_mapi.listen:operation failed: binding to UNIX socket file /datadrive/algedbfarm/nmpc/.mapi.sock failed: Operation not permitted` This is also described in an old post from 2016 (https://www.monetdb.org/pipermail/users-list/2016-January/008775.html ), where the suggested actions is to either start mclient with -h hostid, or change the SOCKDIR. Using the -h option has no effect on the error. The **monetdbd get all** shows: ``` property value hostname ubuntuRPi dbfarm /datadrive/algedbfarm status monetdbd[439306] (unknown version) is serving this dbfarm mserver unknown (failed to connect to monetdbd) logfile /datadrive/algedbfarm/merovingian.log pidfile /datadrive/algedbfarm/merovingian.pid sockdir /tmp listenaddr 0.0.0.0 port 50000 exittimeout 60 forward proxy discovery yes discoveryttl 600 control no passphrase <unknown> snapshotdir <unknown> snapshotcompression .tar mapisock /tmp/.s.monetdb.50000 controlsock /tmp/.s.merovingian.50000 ``` I tried to change the SOCKDIR by (which should unnecessary since SOCKDIR already points to /tmp): ` sudo monetdbd set sockdir=/datadrive/tmp /datadrive/algedbfarm` but it had no effect on the error. The logfile always shows the same (UNIX socket file /datadrive/algedbfarm/nmpc/.mapi.sock failed: Operation not permitted): ``` 2021-02-25 11:35:36 MSG merovingian[438966]: starting database 'nmpc', up min/avg/max: 0s/0s/1s, crash average: 0.00 0.00 0.00 (36-36=0) 2021-02-25 11:35:37 MSG nmpc[439041]: arguments: /usr/local/bin/mserver5 --dbpath=/datadrive/algedbfarm/nmpc --set merovingian_uri=mapi:monetdb://ubuntuRPi:50000/nmpc --set mapi_listenaddr=none --set mapi_usock=/datadrive/algedbfarm/nmpc/.mapi.sock --set monet_vault_key=/datadrive/algedbfarm/nmpc/.vaultkey --set gdk_nr_threads=4 --set max_clients=64 --set sql_optimizer=default_pipe 2021-02-25 11:35:37 MSG nmpc[439041]: # MonetDB 5 server v11.39.13 2021-02-25 11:35:37 MSG nmpc[439041]: # This is an unreleased version 2021-02-25 11:35:37 MSG nmpc[439041]: # Serving database 'nmpc', using 4 threads 2021-02-25 11:35:37 MSG nmpc[439041]: # Compiled for aarch64-pc-linux-gnu/64bit with 128bit integers 2021-02-25 11:35:37 MSG nmpc[439041]: # Found 7.628 GiB available main-memory of which we use 6.217 GiB 2021-02-25 11:35:37 MSG nmpc[439041]: # Copyright (c) 1993 - July 2008 CWI. 2021-02-25 11:35:37 MSG nmpc[439041]: # Copyright (c) August 2008 - 2021 MonetDB B.V., all rights reserved 2021-02-25 11:35:37 MSG nmpc[439041]: # Visit https://www.monetdb.org/ for further information 2021-02-25 11:35:37 ERR nmpc[439041]: #main thread: createExceptionInternal: !ERROR: IOException:mal_mapi.listen:operation failed: binding to UNIX socket file /datadrive/algedbfarm/nmpc/.mapi.sock failed: Operation not permitted 2021-02-25 11:35:37 ERR nmpc[439041]: #main thread: mal_init: !ERROR: IOException:mal_mapi.listen:operation failed: binding to UNIX socket file /datadrive/algedbfarm/nmpc/.mapi.sock failed: Operation not permitted 2021-02-25 11:35:41 MSG merovingian[438966]: database 'nmpc' (-1) has exited with exit status 1 2021-02-25 11:35:41 ERR control[438966]: !monetdbd: an internal error has occurred 'database 'nmpc' appears to shut itself down after starting, check monetdbd's logfile (merovingian.log) for possible hints' ``` It should be added to the story that having the database on the local flash drive works fine, and that it seems to be related to that something happens with the socket creation when the database is located on an external drive (even though the /tmp is on the local flash drive). Comparing folder and drive access between the local dbfarm and the dbfarm on the external drive shows no differences that should result in "Operation not permitted". Are there some access rules in Ubuntu which prevent monetdb to open/create sockets on an external usb3 drive, or is it a bug in monetdb? **To Reproduce** Create a setting with minimal input for an external user to demonstrate him the buggy behavior. This includes the relevant part of the database schema description. Performance trace of the roque query (using the TRACE command) **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Software versions** - MonetDB version number [Oct2020-SP3] - OS and version: [Ubuntu 20.04 LTS] - Installed from release package or self-installed and compiled :Self compiled and installed - RPi4B+, 8GB ram **Issue labeling ** Make liberal use of the labels to characterise the issue topics. e.g. identify severity, version, etc.. **Additional context** Add any other context about the problem here.
Unable to change SOCKDIR
https://api.github.com/repos/MonetDB/MonetDB/issues/7069/comments
3
2021-02-25T13:38:37Z
2022-10-26T14:42:42Z
https://github.com/MonetDB/MonetDB/issues/7069
816,445,353
7,069
[ "MonetDB", "MonetDB" ]
**Describe the bug** When performing a large data import from MySQL to MonetDB using Pentaho PDI (aka Kettle), all available memory will very often be completely consumed, causing MonetDB to error and the import to fail. The import job parallelizes its workload, so data for multiple tables will be ingested into MonetDB at the same time. The following command can be used to view free and available memory slowly diminishing: ```bash $ watch 'cat /proc/meminfo | grep Mem' ``` It is interesting to note that after several attempts at performing the import, without making any changes, memory usage will finally become more stable, and will be allocated and released in a continual cycle, thereby allowing the import to succeed. This was, however, on a previous version of MonetDB. The machine used to host MonetDB in this scenario has 64 GB of physical memory and is not used for any other workloads. **To Reproduce** Perform a sizable data import into MonetDB using the Pentaho PDI framework, preferably for multiple tables in parallel, and monitor memory usage. The job should fail and messages such as the following should appear in the `merovingian.log` file: * `MT_mmap: !ERROR: mmap(/var/monetdb5/dbfarm/olap/bat/37/75/377511.tail,393216) failed: Cannot allocate memory` * `GDKmmap: !ERROR: requesting virtual memory failed; memory requested: 393216, memory in use: 41398916512, virtual memory in use: 98137560480` * `HEAPalloc: !ERROR: Insufficient space for HEAP of 393216 bytes.` **Expected behavior** The MonetDB memory footprint during such imports should remain stable, with memory freed up as data is written to disk. **Software versions** - MonetDB version number: Oct2020-SP3 - OS and version: Amazon Linux 2 - Installed using Docker
Out of memory issue when performing large parallel data imports
https://api.github.com/repos/MonetDB/MonetDB/issues/7068/comments
4
2021-02-25T02:02:14Z
2024-07-18T18:30:59Z
https://github.com/MonetDB/MonetDB/issues/7068
815,997,413
7,068
[ "MonetDB", "MonetDB" ]
[**Describe](url) the bug** A clear and concise description of what the bug is. **To Reproduce** Create a setting with minimal input for an external user to demonstrate him the buggy behavior. This includes the relevant part of the database schema description. Performance trace of the roque query (using the TRACE command) **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Software versions** - MonetDB version number [a milestone label] - OS and version: [e.g. Ubuntu 18.04] - Installed from release package or self-installed and compiled **Issue labeling ** Make liberal use of the labels to characterise the issue topics. e.g. identify severity, version, etc.. **Additional context** Add any other context about the problem here. [log.txt](https://github.com/MonetDB/MonetDB/files/6029638/log.txt)
MonetDB crash after (Oct2020-SP3)
https://api.github.com/repos/MonetDB/MonetDB/issues/7067/comments
2
2021-02-23T14:52:16Z
2022-07-21T08:45:44Z
https://github.com/MonetDB/MonetDB/issues/7067
814,537,942
7,067
[ "MonetDB", "MonetDB" ]
**Describe the bug** The percent_rank window function computes the percentages based on the total number of rows instead of the partitions' when that's the case. **To Reproduce** SELECT PERCENT_RANK() OVER ( PARTITION BY col1 ORDER BY col2 ) FROM tbl; **Expected behavior** The percentages should be computed based on the partition count. **Software versions** - MonetDB Oct2020 - OS and version: Fedora 35 - ISself-installed and compiled
percent_rank function with wrong results
https://api.github.com/repos/MonetDB/MonetDB/issues/7066/comments
1
2021-02-23T08:16:39Z
2024-06-27T13:15:06Z
https://github.com/MonetDB/MonetDB/issues/7066
814,228,104
7,066
[ "MonetDB", "MonetDB" ]
Setup Monetdb latest - MonetDB-11.39.13 (on CentOS) using RPMs. Created a new database and then started it. Database fails to start. Error from log as follows: 2021-02-20 22:01:39 MSG newdb[2166]: # MonetDB 5 server v11.39.5 (Oct2020-SP3) 2021-02-20 22:01:39 MSG newdb[2166]: # Serving database 'newdb', using 3 threads 2021-02-20 22:01:39 MSG newdb[2166]: # Compiled for x86_64-pc-linux-gnu/64bit with 128bit integers 2021-02-20 22:01:39 MSG newdb[2166]: # Found 5.863 GiB available main-memory of which we use 4.779 GiB 2021-02-20 22:01:39 MSG newdb[2166]: # Copyright (c) 1993 - July 2008 CWI. 2021-02-20 22:01:39 MSG newdb[2166]: # Copyright (c) August 2008 - 2021 MonetDB B.V., all rights reserved 2021-02-20 22:01:39 MSG newdb[2166]: # Visit https://www.monetdb.org/ for further information 2021-02-20 22:01:39 ERR newdb[2166]: #main thread: createExceptionInternal: !ERROR: LoaderException:loadLibrary:Loading error failed to open library generator (from within file '/usr/lib64/monetdb5/lib_generator.so'): /usr/lib64/libmonetdbsql.so.11: undefined symbol: log_save_id 2021-02-20 22:01:39 ERR newdb[2166]: #main thread: mal_init: !ERROR: LoaderException:loadLibrary:Loading error failed to open library generator (from within file '/usr/lib64/monetdb5/lib_generator.so'): /usr/lib64/libmonetdbsql.so.11: undefined symbol: log_save_id 2021-02-20 22:01:42 MSG merovingian[889]: database 'newdb' (-1) has exited with exit status 1 2021-02-20 22:01:42 ERR control[889]: (local): failed to fork mserver: database 'newdb' appears to shut itself down after starting, check monetdbd's logfile (/var/log/monetdb/merovingian.log) for possible hints
Starting database fails on MonetDB 5 server v11.39.5 (Oct2020-SP3)
https://api.github.com/repos/MonetDB/MonetDB/issues/7065/comments
1
2021-02-20T17:05:51Z
2024-06-27T13:15:05Z
https://github.com/MonetDB/MonetDB/issues/7065
812,662,961
7,065
[ "MonetDB", "MonetDB" ]
Recently we moved our MonetDB files to NFS and we observed huge NFS network IO and big drop in MonetDB performance. After some profiling, we figured that the temporary hashes created in hash and unique logic caused the issue. Without NFS, these hashes are backed by mmap files and Linux page cache. With NFS, the files are immediately persisted to NFS server and then read from NFS again which causes the very high NFS network IO. I fixed the issue by configuring the hashes to use transient data farm first (we configure a transient data farm on local drive). It would be great if you can integrate the fix to the MonetDB official repo. Thanks. [monetdb_patch.txt](https://github.com/MonetDB/MonetDB/files/6014157/monetdb_patch.txt)
Temporary hashes created in hash and unique logic should try to use transient data farm first
https://api.github.com/repos/MonetDB/MonetDB/issues/7064/comments
0
2021-02-20T05:07:55Z
2024-06-27T13:15:04Z
https://github.com/MonetDB/MonetDB/issues/7064
812,517,703
7,064
[ "MonetDB", "MonetDB" ]
**Describe the bug** The query: ``` DELETE FROM dupes AS d1 WHERE ( SELECT COUNT(*) FROM dupes AS d2 WHERE -- Join d1 and d2 on a variant of the ontime key d2.flightdate = d1.flightdate AND d2.uniquecarrier = d1.uniquecarrier AND d2.flightnum = d1.flightnum AND d2.origin = d1.origin ) = 1; ``` Does not get executed, and MonetDB tells me: ``` Error in optimizer garbageCollector ``` **To Reproduce** I don't really have reproduction instructions. In fact, this query has worked on the same DB, earlier. I think a few deletions may have triggered this... I wonder if some kind of of "canonicalization" of the BATs makes the difference. Anyway, the `dupes` table has the same structure as the USDT On-time performance table created by [this repository](https://github.com/eyalroz/usdt-ontime-tools): ``` CREATE TABLE "sys"."dupes" ( "year_" SMALLINT, "quarter" TINYINT, "month_" TINYINT, "dayofmonth" TINYINT, "dayofweek" TINYINT, "flightdate" DATE, "uniquecarrier" VARCHAR(6), "airlineid" INTEGER, "carrier" CHAR(2), "tailnum" VARCHAR(6), "flightnum" SMALLINT, "originairportid" INTEGER, "originairportseqid" INTEGER, "origincitymarketid" INTEGER, "origin" CHAR(3), "origincityname" VARCHAR(40), "originstate" CHAR(2), "originstatefips" CHAR(2), "originstatename" VARCHAR(48), "originwac" SMALLINT, "destairportid" INTEGER, "destairportseqid" INTEGER, "destcitymarketid" INTEGER, "dest" CHAR(3), "destcityname" VARCHAR(40), "deststate" CHAR(2), "deststatefips" CHAR(2), "deststatename" VARCHAR(48), "destwac" SMALLINT, "crsdeptime" SMALLINT, "deptime" SMALLINT, "depdelay" SMALLINT, "depdelayminutes" SMALLINT, "depdel15" BOOLEAN, "departuredelaygroups" TINYINT, "deptimeblk" CHAR(9), "taxiout" SMALLINT, "wheelsoff" CHAR(4), "wheelson" CHAR(4), "taxiin" SMALLINT, "crsarrtime" SMALLINT, "arrtime" SMALLINT, "arrdelay" INTEGER, "arrdelayminutes" INTEGER, "arrdel15" BOOLEAN, "arrivaldelaygroups" INTEGER, "arrtimeblk" CHAR(9), "cancelled" BOOLEAN, "cancellationcode" CHAR(1), "diverted" BOOLEAN, "crselapsedtime" SMALLINT, "actualelapsedtime" SMALLINT, "airtime" SMALLINT, "flights" INTEGER, "distance" INTEGER, "distancegroup" TINYINT, "carrierdelay" INTEGER, "weatherdelay" INTEGER, "nasdelay" INTEGER, "securitydelay" INTEGER, "lateaircraftdelay" INTEGER, "firstdeptime" SMALLINT, "totaladdgtime" SMALLINT, "longestaddgtime" SMALLINT, "divairportlandings" CHAR(1), "divreacheddest" CHAR(4), "divactualelapsedtime" SMALLINT, "divarrdelay" SMALLINT, "divdistance" SMALLINT, "div1airport" CHAR(3), "div1airportid" INTEGER, "div1airportseqid" INTEGER, "div1wheelson" CHAR(4), "div1totalgtime" SMALLINT, "div1longestgtime" SMALLINT, "div1wheelsoff" CHAR(4), "div1tailnum" VARCHAR(6), "div2airport" CHAR(3), "div2airportid" INTEGER, "div2airportseqid" INTEGER, "div2wheelson" CHAR(4), "div2totalgtime" SMALLINT, "div2longestgtime" SMALLINT, "div2wheelsoff" CHAR(4), "div2tailnum" VARCHAR(6), "div3airport" CHAR(3), "div3airportid" INTEGER, "div3airportseqid" INTEGER, "div3wheelson" CHAR(4), "div3totalgtime" SMALLINT, "div3longestgtime" SMALLINT, "div3wheelsoff" CHAR(4), "div3tailnum" VARCHAR(6), "div4airport" CHAR(3), "div4airportid" INTEGER, "div4airportseqid" INTEGER, "div4wheelson" CHAR(4), "div4totalgtime" SMALLINT, "div4longestgtime" SMALLINT, "div4wheelsoff" CHAR(4), "div4tailnum" VARCHAR(6), "div5airport" CHAR(3), "div5airportid" INTEGER, "div5airportseqid" INTEGER, "div5wheelson" CHAR(4), "div5totalgtime" SMALLINT, "div5longestgtime" SMALLINT, "div5wheelsoff" CHAR(4), "div5tailnum" VARCHAR(6) ); ``` **Expected behavior** The records should be deleted. **Software versions** - MonetDB 11.33.3 (April 2019) - Devuan GNU/Linux Beowulf (~= Debian Buster without systemd) - Built from source, with default options IIRC. **Issue labeling** Make liberal use of the labels to characterise the issue topics. e.g. identify severity, version, etc.. **Additional context** If we replace the first line with a SELECT COUNT, like so: ``` SELECT COUNT(*) FROM dupes AS d1 WHERE ( SELECT COUNT(*) FROM dupes AS d2 WHERE -- Join d1 and d2 on a variant of the ontime key d2.flightdate = d1.flightdate AND d2.uniquecarrier = d1.uniquecarrier AND d2.flightnum = d1.flightnum AND d2.origin = d1.origin ) = 1; ``` the query works. The dupes table in my DB has ~9300 records, and 50 of them match these conditions, i.e. 50 records should be deleted by the `DELETE FROM` query.
Getting "Error in optimizer garbageCollector"
https://api.github.com/repos/MonetDB/MonetDB/issues/7063/comments
5
2021-02-18T14:22:30Z
2024-06-27T13:15:03Z
https://github.com/MonetDB/MonetDB/issues/7063
811,144,868
7,063
[ "MonetDB", "MonetDB" ]
**Describe the bug** ANALYZE on merge table throws 'MERGE TABLE is not persistent' **To Reproduce** ``` create table table t(v int); insert into t values(1),(2),(3); create merge table mt(v int); alter table mt add table t; analyze sys.mt; ``` **Expected behavior** - merge table should exist in sys.storage table - ANALYZE should fill out sys.statistics for merge table **Software versions** - monetdb v11.39.5 - centos 7 - built from source
ANALYZE MERGE TABLE is not persistent
https://api.github.com/repos/MonetDB/MonetDB/issues/7062/comments
4
2021-02-18T13:42:10Z
2021-02-18T15:02:07Z
https://github.com/MonetDB/MonetDB/issues/7062
811,110,418
7,062
[ "MonetDB", "MonetDB" ]
I'm using `monetdbe` on Ubuntu 18.04, but I assume the server version handles this similarly. Sometimes I work with files that are concatenations of multiple runs of the `gzip` command. This functionality is documented in `man gzip`, i.e. `command1 | gzip > foo.gz; command2 | gzip >> foo.gz` leaves us with a file that can be read normally by tools like `zcat` or `gunzip`. Not sure if this is what every reader of gz data expects or not. I was loading many tables from Postgres into Monet, and compressing them before upload. I found that parallelizing the compression with GNU Parallel sped up the pipeline significantly. However, I later found that this change was silently giving me partial loads. Here is a Bash script to reproduce: ``` rm -f foo.gz foo.multiple.gz # 1M long foos, gzipped yes "fooooooooooooooooooooo" | head -n 1000000 | gzip > foo.gz # 1M long foos, gzipped in parallel, with resulting chunks concatted # "parallel" is GNU parallel yes "fooooooooooooooooooooo" | head -n 1000000 | parallel --jobs 5 --keep-order --pipe --block 1M gzip >> foo.multiple.gz # Show they are the same content when uncompressed zcat foo.gz | sha1sum zcat foo.multiple.gz | sha1sum PLAIN_PATH=$PWD/foo.gz MULTI_PATH=$PWD/foo.multiple.gz python <<EOF import monetdbe conn = monetdbe.connect('foo.db') cursor = conn.cursor() cursor.execute("CREATE TABLE foo (bar TEXT)") cursor.execute("CREATE TABLE foo_multiple (bar TEXT)") cursor.execute("COPY 1000000 RECORDS INTO foo FROM '$PLAIN_PATH'") cursor.execute("COPY 1000000 RECORDS INTO foo_multiple FROM '$MULTI_PATH'") cursor.execute("SELECT count(1) FROM foo") print(cursor.fetchall()) cursor.execute("SELECT count(1) FROM foo_multiple") print(cursor.fetchall()) EOF ``` This prints: ``` b72c6df2ee74c49fa6dbc2cd51f1382defd6578d - b72c6df2ee74c49fa6dbc2cd51f1382defd6578d - [(1000000,)] [(45590,)] ``` So, the copy stops after ~4.5% of the file, with no warning. Since my 1MB chunks were 4.5% of the 22MB uncompressed size, it must be stopping after one chunk. This isn't a blocker for me at the moment, but it caused some confusion for a while, and could inconvenience some people who are given certain kinds of gz files. I spent about an hour checking for oddities in my CSV data/delimiters/escapes, and wondering if maybe the parser combined half of a file into one record. PS: I've been using Monet for a few days and am very impressed so far!
Have bulk load support combined gzip files
https://api.github.com/repos/MonetDB/MonetDB/issues/7061/comments
4
2021-02-10T03:06:01Z
2024-06-27T13:15:02Z
https://github.com/MonetDB/MonetDB/issues/7061
805,121,268
7,061
[ "MonetDB", "MonetDB" ]
**Describe the bug** MonetDBe can segfault while performing certain operations. A user reported that MonetDBe might not be threadsafe. **To Reproduce** See [issue](https://github.com/MonetDBSolutions/monetdbe-examples/issues/11). **Expected behavior** Throw an error instead of segfaulting. **Software versions** - MonetDB 11.40.0 - Ubuntu 18.04 - built from source.
MonetDBe: segfaults while performing certain operations
https://api.github.com/repos/MonetDB/MonetDB/issues/7060/comments
0
2021-02-09T13:12:01Z
2024-06-27T13:15:01Z
https://github.com/MonetDB/MonetDB/issues/7060
804,538,521
7,060
[ "MonetDB", "MonetDB" ]
**Describe the bug** 'reverse' C UDF crashes when queried from within MonetDBe **To Reproduce** // MonetDBe C API, getstarted.c example with the query monetdbe_query(db, "SELECT reverse('abc');", NULL, NULL); **Expected behavior** It should produce the same result as MonetDB for "SELECT reverse('abc');" query. **Software versions** - monetdb v11.39.5 - centos 7 - built from source
MonetDBe: 'reverse' C UDF crashes
https://api.github.com/repos/MonetDB/MonetDB/issues/7059/comments
2
2021-02-08T21:05:14Z
2024-06-27T13:15:00Z
https://github.com/MonetDB/MonetDB/issues/7059
803,962,683
7,059
[ "MonetDB", "MonetDB" ]
**Describe the bug** Within MonetDBe, `COPY SELECT * FROM foo INTO '/file/path.csv'"` does not fill the output csv file. **To Reproduce** Within MonetDBe (Python & C) `COPY SELECT * FROM foo INTO '/file/path.csv'"`. See newly created [Test](https://github.com/MonetDBSolutions/monetdbe-examples/blob/CI/C/copy_into.c) **Expected behavior** Resulting file contains query result. **Software versions** - MonetDB V 11.40.0 - Ubuntu 18.04 - Built from source
MonetDBe: COPY INTO csv file does not produce any output
https://api.github.com/repos/MonetDB/MonetDB/issues/7058/comments
1
2021-02-08T15:38:00Z
2024-06-27T13:15:00Z
https://github.com/MonetDB/MonetDB/issues/7058
803,676,509
7,058
[ "MonetDB", "MonetDB" ]
When trying to connect to a MonetDB server using the ODBC driver, the driver manager comes back with an error: [IM003] Specified driver could not be loaded due to system error 126: The specified module could not be found. (MonetDB ODBC Driver, C:\\Program Files\\MonetDB\\MonetDB ODBC Driver\\lib\\MonetODBC.dll). (160) (SQLDriverConnect) **Software versions** - MonetDB 11.39.11 (Oct2020-SP2) - OS and version: Windows - Installed from release package
ODBC driver installer on Windows is missing some DLLs
https://api.github.com/repos/MonetDB/MonetDB/issues/7057/comments
0
2021-02-08T14:48:01Z
2024-06-27T13:14:59Z
https://github.com/MonetDB/MonetDB/issues/7057
803,632,612
7,057
[ "MonetDB", "MonetDB" ]
**Describe the bug** While running DROP - CREATE - DELETE - INSERT - COMMIT on a table, All data in the table getting lost. **To Reproduce** Where seven jobs executed parallel at a time and seven tables are created and data is inserted to table out of seven jobs five jobs are completed successfully and two of the jobs are failed and tables are empty in new verison ( MonetDB interactive terminal, version 11.39.11 (Oct2020-SP2)) When same seven set of jobs are executed in old version it is running fine and getting the expected results( MonetDB 5 server v11.27.13 "Jul2017-SP4") **Expected behavior** Table data should exists in all seven tables in New verison ( MonetDB interactive terminal, version 11.39.11 (Oct2020-SP2)) **Software versions** Versions: MonetDB/SQL interactive terminal (Oct2020-SP2) Database: MonetDB v11.39.11 (Oct2020-SP2), [monetadmin@lnx1538 ~]$ mclient -v mclient, the MonetDB interactive terminal, version 11.39.11 (Oct2020-SP2) support for command-line editing compiled-in yum install https://dev.monetdb.org/downloads/epel/MonetDB-release-epel.noarch.rpm yum install MonetDB-SQL-server5 MonetDB-client -rwxrwxr-x 1 monetadmin monetadmin 1.6M Feb 2 2021 MonetDB-11.39.11-20210118.el7.x86_64.rpm -rwxrwxr-x 1 monetadmin monetadmin 1.5M Feb 2 2021 MonetDB5-server-11.39.11-20210118.el7.x86_64.rpm -rwxrwxr-x 1 monetadmin monetadmin 145K Feb 2 2021 MonetDB-client-11.39.11-20210118.el7.x86_64.rpm -rwxrwxr-x 1 monetadmin monetadmin 145K Feb 2 2021 MonetDB-SQL-server5-11.39.11-20210118.el7.x86_64.rpm let me know if you need any details
We are performing DROP - CREATE - DELETE - INSERT - COMMIT on a table, All data in the table is lost
https://api.github.com/repos/MonetDB/MonetDB/issues/7056/comments
9
2021-02-03T19:25:42Z
2022-07-21T08:53:09Z
https://github.com/MonetDB/MonetDB/issues/7056
800,628,967
7,056
[ "MonetDB", "MonetDB" ]
``` START TRANSACTION; CREATE TABLE foo (i INT); CREATE FUNCTION cnt() RETURNS INT BEGIN RETURN SELECT COUNT(*) FROM foo; END; CREATE FUNCTION func () RETURNS TABLE(i int) BEGIN TRUNCATE foo; INSERT INTO foo VALUES (1); INSERT INTO foo VALUES ((SELECT COUNT(*) FROM foo)+1); INSERT INTO foo SELECT cnt()+1; RETURN foo; END; SELECT * FROM func(); ROLLBACK; ``` running this with mclient gives the following resuts: ``` operation successful operation successful operation successful +------+ | i | +======+ | 1 | | 2 | | 2 | +------+ 3 tuples ``` I expect the last values to be '3'. It is as if the `INSERT INTO FOO ... cnt()...` statement was not aware of the previous `INSERT`.
Table count returning function used inside other function gives wrong results.
https://api.github.com/repos/MonetDB/MonetDB/issues/7055/comments
3
2021-02-03T13:56:59Z
2024-06-27T13:14:58Z
https://github.com/MonetDB/MonetDB/issues/7055
800,353,616
7,055
[ "MonetDB", "MonetDB" ]
**Describe the bug** If I log in as the `monetdb` user and run `set role sysadmin;`, I get `... createExceptionInternal: !ERROR: SQLException:sql.update_var:42000!Role (sysadmin) missing'. Is this expected? **Software versions** - MonetDB version number [Oct2020, 0a258a97c2c0] - OS and version: Fedora 32 - Mercurial source
monetdb "set role sysadmin": Role (sysadmin) missing
https://api.github.com/repos/MonetDB/MonetDB/issues/7054/comments
2
2021-02-02T16:06:11Z
2024-06-27T13:14:57Z
https://github.com/MonetDB/MonetDB/issues/7054
799,417,920
7,054
[ "MonetDB", "MonetDB" ]
**Is your feature request related to a problem? Please describe.** I would like to be able to keep a monetdb database accessible for read only operations while I perform a storage-level snapshot, such as with the zfs snapshot command. **Describe the solution you'd like** Most database systems provide the capability of freezing a database so that writes can not be performed, but connections are not closed, and then thawing, in order to resume normal operation. **Describe alternatives you've considered** I am currently stopping monetdb, performing the snapshot, and then starting it again, which means that existing client sessions are closed.
Ability to quiesce a database
https://api.github.com/repos/MonetDB/MonetDB/issues/7053/comments
10
2021-02-01T04:38:49Z
2021-05-02T12:39:49Z
https://github.com/MonetDB/MonetDB/issues/7053
797,942,803
7,053
[ "MonetDB", "MonetDB" ]
MonetDB does not seem to have a function for creating a day from its constituent parts (year, month, day in month). While this can be done via strings, it would be useful and convenient to be able to say: ``` SELECT DATEFROMPARTS(2018, 10, 31) AS DateFromParts; ``` Microsoft SQL Server [has](https://www.w3schools.com/sqL/func_sqlserver_datefromparts.asp) this function. If there is an equivalent or nearly-equivalent function already in MonetDB, I can't find it in the [Date/Time Functions section](https://www.monetdb.org/Documentation/SQLReference/FunctionsAndOperators/DateTimeFunctionsOperators) of the documentation on the website.
Implement a datefromparts() function
https://api.github.com/repos/MonetDB/MonetDB/issues/7052/comments
6
2021-01-30T22:55:49Z
2024-06-27T13:14:56Z
https://github.com/MonetDB/MonetDB/issues/7052
797,558,239
7,052
[ "MonetDB", "MonetDB" ]
MonetDB supports some kind of use of the PCRE regular expression library: https://www.monetdb.org/Documentation/Manuals/MonetDB/Modules/PCRE However, that documentation page doesn't say how you can use regular expressions - even if you have compiled with PCRE enabled. The [string functions page](https://www.monetdb.org/Documentation/SQLReference/FunctionsAndOperators/StringFunctionsOperators) does not mention regular expression, not even as an optional feature or via a link. Also, the PCRE page says: > support has to be explicitly enabled; it is not the default. and it is not clear whether this means regular expression support, or UTF-8 encoding support. Both of them seem a bit weird: If you compile with PCRE, why would support for regular expressions be disabled? And why would UTF-8 support depend on PCRE?
Missing/incorrect documentation on how to use regular expressions
https://api.github.com/repos/MonetDB/MonetDB/issues/7051/comments
3
2021-01-30T17:54:42Z
2024-06-27T13:14:55Z
https://github.com/MonetDB/MonetDB/issues/7051
797,487,936
7,051
[ "MonetDB", "MonetDB" ]
**Describe the bug** When `forward=redirect`,a file descriptor leaks every time a connection is opened and then closed. **To Reproduce** ./monetdbd create ./farm ./monetdbd set forward=redirect ./farm ./monetdbd set listenaddr=127.0.0.1 ./farm ./monetdbd start ./farm ./monetdb create test ./monetdb release test lsof -p $(pidof monetdbd) | wc -l 40 ./mclient -d test -s "select 1" lsof -p $(pidof monetdbd) | wc -l 41 ./mclient -d test -s "select 1" lsof -p $(pidof monetdbd) | wc -l 42 ./mclient -d test -s "select 1" lsof -p $(pidof monetdbd) | wc -l 43 **Software versions** - 11.39.11 and 11.39.7 - Ubuntu 20.04 - self-installed
file descriptor leak when forward=redirect
https://api.github.com/repos/MonetDB/MonetDB/issues/7050/comments
1
2021-01-29T11:56:53Z
2024-06-27T13:14:54Z
https://github.com/MonetDB/MonetDB/issues/7050
796,823,178
7,050
[ "MonetDB", "MonetDB" ]
In MySQL, you can write: ``` SELECT GROUP_CONCAT(DISTINCT(c1)) AS c1_values FROM t1; ``` but MonetDB does not seem to allow the `DISTINCT` keyword within a GROUP_CONCAT. It would be useful to have this feature.
Implement DISTINCT for GROUP_CONCAT
https://api.github.com/repos/MonetDB/MonetDB/issues/7049/comments
2
2021-01-27T15:15:01Z
2024-06-27T13:14:54Z
https://github.com/MonetDB/MonetDB/issues/7049
795,189,198
7,049
[ "MonetDB", "MonetDB" ]
Many DBMSes, including MySQL (and even Excel and LibreOffice Calc...) have a [function named IF()](https://www.w3schools.com/SQl/func_mysql_if.asp): ``` IF(condition, value_on_true, value_on_false) ``` This is a very useful function to have. It is basically syntactic sugar, since one can use: ``` CASE WHEN condition THEN value_on_true ELSE value_on_false END ``` except that the latter is more cumbersome to write and to read than the former, and doubly so when you want to nest these. **Software versions** - MonetDB 11.39.11
Implement an IF() builtin function
https://api.github.com/repos/MonetDB/MonetDB/issues/7048/comments
2
2021-01-27T11:37:51Z
2024-06-28T10:08:17Z
https://github.com/MonetDB/MonetDB/issues/7048
795,025,137
7,048
[ "MonetDB", "MonetDB" ]
This is a requested feature. In many parsers/compilers e.g. in C compilers, when a syntax error is found, its location indicated. Example: If you compile ``` int main()) { return 0; } ``` with the GNU C Compiler, you get something like: ``` <source>:1:11: error: expected function body after function declarator int main()) { ^ ``` Now, in MonetDB we: * Don't get the character index at which the error was encountered. * Don't get a context with a caret indicating the location of therror (the last two lines in the example output. I would think that information is available when MonetDB parses a command - and certainly it could be kept available. This would make life easier when typing in SQL commands manually. **Software versions** - MonetDB 11.39.11 and earlier of course - OS and version: Devuan Beowulf - Built from source **Issue labeling ** Something between a mis-feature and a feature request.
Syntax error indications should indicate where on the line the error occurred
https://api.github.com/repos/MonetDB/MonetDB/issues/7047/comments
1
2021-01-25T22:49:13Z
2021-01-26T11:02:34Z
https://github.com/MonetDB/MonetDB/issues/7047
793,783,340
7,047
[ "MonetDB", "MonetDB" ]
Would it be possible to create a current docker image? The most current one seems to be https://hub.docker.com/layers/monetdb/monetdb/Jun2020-SP1/images/sha256-6599ebcdc4277ee0cc9755254c2c98c82f6520d67653b9acd51a4eb93e2f3cc5?context=explore Thanks a lot.
Current DockerImage
https://api.github.com/repos/MonetDB/MonetDB/issues/7046/comments
1
2021-01-25T13:18:37Z
2024-06-27T13:14:51Z
https://github.com/MonetDB/MonetDB/issues/7046
793,374,795
7,046
[ "MonetDB", "MonetDB" ]
**Describe the bug** A value filtered in a subquery finds its way to a later filter in the outer query. **To Reproduce** 1. (Create and) connect to a MonetDB database 2. Issue the following queries: ``` CREATE TEMPORARY TABLE delme AS SELECT '0-71' AS wheelsoff ON COMMIT PRESERVE ROWS; INSERT INTO delme VALUES ('1550'); SELECT count(*) FROM (SELECT wheelsoff FROM delme WHERE wheelsoff NOT LIKE '%-%') AS t WHERE cast(wheelsoff AS int) = 0; CREATE TEMPORARY TABLE delme2 AS (SELECT wheelsoff FROM delme WHERE wheelsoff NOT LIKE '%-%') ON COMMIT PRESERVE ROWS; SELECT count(*) FROM delme2 WHERE cast(wheelsoff AS int) = 1550; ``` The first SELECT query fails with: ``` conversion of string '0-71' to type int failed. ``` even though the table `t` does not have such a value. And indeed, when we "split the work", using the last two commands, we do get the correct result in the last query. **Expected behavior** All queries should succeed. The last query should return 1. **Software versions** - MonetDB 11.33.3 - OS and version: Devuan Beowulf (~= Debian Buster without systemd) - Self-built with: `--enable-optimize --enable-rintegration` and extra compiler flags `-O3 -march=native`.
A value filtered in a subquery finds its way to a later filter in the outer query
https://api.github.com/repos/MonetDB/MonetDB/issues/7045/comments
4
2021-01-25T12:01:40Z
2024-07-18T18:29:41Z
https://github.com/MonetDB/MonetDB/issues/7045
793,322,291
7,045
[ "MonetDB", "MonetDB" ]
When a query (seems to) contain a 3-level SQL name, i.e. `foo.bar.baz`, it is rejected, with a message saying: > TODO: column names of level >= 3 the line of code is in `sql/server/rel_select.c`: ``` return sql_error(sql, 02, SQLSTATE(42000) "TODO: column names of level >= 3"); ``` this bug is not about the missing feature, but about an error message. It should be clearer - as the query author may not realize what exactly they did wrong: They may not recognize the term "name level", or even not intended to have typed in one of the periods etc. Please change it to something like: > Use of 3-level SQL names (database_name.table_name.column_name) is not supported yet. You may only refer to tables within the database to which you have connected.
Improve error message regarding 3-level SQL names
https://api.github.com/repos/MonetDB/MonetDB/issues/7044/comments
1
2021-01-22T23:13:11Z
2024-06-27T13:14:49Z
https://github.com/MonetDB/MonetDB/issues/7044
792,363,621
7,044
[ "MonetDB", "MonetDB" ]
I'm trying to enable embedded R for monetdb on MacOS 10.15.7 via homebrew. However the instructions on the official website seem to be outdated now that monetdb uses CMAKE. Therefore, I first made sure that I could successfully build from source with the default options from within homebrew after installing all dependencies, then I edited the brew formula to switch `RINTEGRATION` to `ON` but now the compilations fails at 72% with this error: ``` ld: can't map file, errno=22 file '/Library/Frameworks/R.framework' for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [monetdb5/extras/rapi/lib_rapi.so] Error 1 make[1]: *** [monetdb5/extras/rapi/CMakeFiles/rapi.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... ``` Perhaps my approach is not the most appropriate and there is another documented way to enable R integration that I missed? By the way I have a working installation of R (v 4.0.2) on the directories that `FindLibR.cmake` seems to seek and the output of `R.home()` is `/Library/Frameworks/R.framework/Resources`. **To Reproduce** To edit the formula: `brew edit monetdb` Then change `DRINTEGRATION=OFF` to `DRINTEGRATION=ON`. Build (or rebuild) from source: `brew [re]build -s monetdb` **Expected behavior** Successful compilation of monetdb with R integration enabled. **Software versions** - MonetDB version number: Oct2020-SP1/MonetDB-11.39.7 - OS and version: MacOS Catalina 10.15.7 - Self-installed and compiled - R 4.0.2 from official package
Cannot build from source with R integration switched on trough brew for MacOS
https://api.github.com/repos/MonetDB/MonetDB/issues/7043/comments
2
2021-01-11T15:00:00Z
2024-06-27T13:14:48Z
https://github.com/MonetDB/MonetDB/issues/7043
783,440,999
7,043
[ "MonetDB", "MonetDB" ]
**Describe the bug** When sanitiser is enabled, starting `mserver5` with a `dbpath` beginning with a `~` triggers an error: ``` $ mserver5 --dbpath=~/test AddressSanitizer:DEADLYSIGNAL ================================================================= ==1927925==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fda39aa96a7 bp 0x7ffd9a3aa840 sp 0x7ffd9a3a9fb8 T0) ==1927925==The signal is caused by a READ memory access. ==1927925==Hint: address points to the zero page. #0 0x7fda39aa96a6 (/lib/x86_64-linux-gnu/libc.so.6+0x18b6a6) #1 0x7fda3b9e08fb (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x678fb) #2 0x7fda3ad734a0 in GDKtracer_log /home/vagrant/shared/monetdb/mdb-src/Oct2020/gdk/gdk_tracer.c:494 #3 0x7fda3a8e0098 in BBPaddfarm /home/vagrant/shared/monetdb/mdb-src/Oct2020/gdk/gdk_bbp.c:1146 #4 0x556600cc7b12 in main /home/vagrant/shared/monetdb/mdb-src/Oct2020/tools/mserver/mserver5.c:554 #5 0x7fda399450b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2) #6 0x556600cc4bcd in _start (/home/vagrant/shared/monetdb/mdb-nst/Oct2020/bin/mserver5+0x6bcd) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/lib/x86_64-linux-gnu/libc.so.6+0x18b6a6) ==1927925==ABORTING ``` Without the sanitizer, I get ``` $ mserver5 --dbpath=~/test #unknown thread: BBPaddfarm: !ERROR: /home/vagrant/shared/monetdb/mdb-src/~/test: cannot create directory: No such file or directory !ERROR: cannot add farm ``` **Expected behavior** Start the database or a proper error. **Screenshots** If applicable, add screenshots to help explain your problem. **Software versions** - MonetDB version number [Oct2020 (hg id 0dbe3839e358)] - OS and version: [e.g. Ubuntu 20.04] - Mercurial source
AddressSanitizer:DEADLYSIGNAL in Oct2020/gdk/gdk_tracer.c:494
https://api.github.com/repos/MonetDB/MonetDB/issues/7042/comments
1
2021-01-08T15:19:15Z
2024-06-27T13:14:47Z
https://github.com/MonetDB/MonetDB/issues/7042
782,191,286
7,042
[ "MonetDB", "MonetDB" ]
Now that variables approach was changed existing declarations do not work. How can I create session/global variable in latest versions? Would be nice to have web documentation updated with different examples **To Reproduce** DECLARE testvar integer; SQL Error [42000]: Variables cannot be declared on the global scope **Software versions** - MonetDB version number 11.39.7 (Oct2020-SP1) - OS and version: Fedora - Installed from release package **Issue labeling ** Make liberal use of the labels to characterise the issue topics. e.g. identify severity, version, etc.. **Additional context** Add any other context about the problem here.
Variables changes
https://api.github.com/repos/MonetDB/MonetDB/issues/7041/comments
1
2020-12-29T20:51:02Z
2024-06-27T13:14:46Z
https://github.com/MonetDB/MonetDB/issues/7041
776,081,042
7,041
[ "MonetDB", "MonetDB" ]
Hello ! I use 1. MonetDB version: 11.39.7, installed from repository https://www.monetdb.org/downloads/deb/ 2. OS: Debian GNU/Linux bullseye/sid Source code #include <mapi.h> int main () { Mapi db = mapi_connect("localhost", 50000, "test", "test", "sql", "test"); if (db) { mapi_disconnect(db); mapi_destroy(db); } return 0; } 4. Build it gcc -o test `pkg-config --cflags monetdb-mapi` test.c `pkg-config --libs monetdb-mapi` 5. Check for valgrind valgrind --leak-check=full --show-reachable=yes --track-origins=yes ./test 6. Result Memcheck, a memory error detector ==4901== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==4901== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info ==4901== Command: ./test ==4901== ==4901== ==4901== HEAP SUMMARY: ==4901== in use at exit: 1,024 bytes in 1 blocks ==4901== total heap usage: 1,390 allocs, 1,389 frees, 184,318 bytes allocated ==4901== ==4901== 1,024 bytes in 1 blocks are still reachable in loss record 1 of 1 ==4901== at 0x483877F: malloc (vg_replace_malloc.c:307) ==4901== by 0x4A4F8F9: ??? (in /usr/lib/x86_64-linux-gnu/libstream.so.14.0.2) ==4901== by 0x4A4FEC6: ??? (in /usr/lib/x86_64-linux-gnu/libstream.so.14.0.2) ==4901== by 0x4A503FB: ??? (in /usr/lib/x86_64-linux-gnu/libstream.so.14.0.2) ==4901== by 0x4A54B91: ??? (in /usr/lib/x86_64-linux-gnu/libstream.so.14.0.2) ==4901== by 0x4A551B8: socket_wstream (in /usr/lib/x86_64-linux-gnu/libstream.so.14.0.2) ==4901== by 0x487AE00: mapi_reconnect (in /usr/lib/x86_64-linux-gnu/libmapi.so.12.0.5) ==4901== by 0x487C467: mapi_connect (in /usr/lib/x86_64-linux-gnu/libmapi.so.12.0.5) ==4901== by 0x109189: main (in /home/shura/proj/libdbcli/test/test) ==4901== ==4901== LEAK SUMMARY: ==4901== definitely lost: 0 bytes in 0 blocks ==4901== indirectly lost: 0 bytes in 0 blocks ==4901== possibly lost: 0 bytes in 0 blocks ==4901== still reachable: 1,024 bytes in 1 blocks ==4901== suppressed: 0 bytes in 0 blocks ==4901== ==4901== For lists of detected and suppressed errors, rerun with: -s ==4901== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Memory leak detected for MAPI interface
https://api.github.com/repos/MonetDB/MonetDB/issues/7040/comments
3
2020-12-29T11:59:45Z
2024-06-27T13:14:45Z
https://github.com/MonetDB/MonetDB/issues/7040
775,856,301
7,040
[ "MonetDB", "MonetDB" ]
**Is your feature request related to a problem? Please describe.** It should be possible to execute shell commands from within mclient. **Describe the solution you'd like** When supplied with a `\!`, for example, mclient should execute the rest of the line as a shell command **Describe alternatives you've considered** N/A **Additional context** This is a common feature of other SQL client tools.
Allow shell commands to be executed from within mclient
https://api.github.com/repos/MonetDB/MonetDB/issues/7039/comments
1
2020-12-27T10:06:21Z
2024-07-13T14:55:00Z
https://github.com/MonetDB/MonetDB/issues/7039
775,010,447
7,039
[ "MonetDB", "MonetDB" ]
**Is your feature request related to a problem? Please describe.** `mclient` should allow you to customize the prompt, with placeholder values for server, database, current user, etc. **Describe the solution you'd like** The prompt should be configurable from the command line as well as from within an mclient session. **Describe alternatives you've considered** N/A **Additional context** This feature is common in other SQL client tools.
Allow prompt to be customized in mclient
https://api.github.com/repos/MonetDB/MonetDB/issues/7038/comments
0
2020-12-27T08:35:31Z
2024-06-27T13:14:44Z
https://github.com/MonetDB/MonetDB/issues/7038
774,999,394
7,038
[ "MonetDB", "MonetDB" ]
**Is your feature request related to a problem? Please describe.** When an ordinary user "u1" tries to rename another user "u2", this error message is given "ALTER USER: no such user 'u2'": ``` -- login as monetdb create user u1 with password 'u1' name 'u1' schema sys; create user u2 with password 'u2' name 'u2' schema sys; -- login as u1 sql>alter user u2 rename to u3; ALTER USER: no such user 'u2' ``` **Describe the solution you'd like** It would be clearer to give an error message such as "ALTER USER: insufficient privileges for user 'u1'".
Clearer err msg for ALTER USER with insufficient privileges
https://api.github.com/repos/MonetDB/MonetDB/issues/7037/comments
0
2020-12-21T11:20:37Z
2024-06-27T13:14:43Z
https://github.com/MonetDB/MonetDB/issues/7037
772,085,833
7,037
[ "MonetDB", "MonetDB" ]
**Is your feature request related to a problem? Please describe.** Consider the following statements: ``` sql> create table table_3a as select count(*) from sys.tables; CREATE TABLE: generated labels not allowed in column names, use an alias instead sql> create table table_3a as select count(*) as x from sys.tables; operation successful ``` **Describe the solution you'd like** I would expect that proper columns names are automatically generated. e.g. col_1, col_2,... such that the resulting table can be easily re-used. It is a programming convenience. Especially if you can easily retrieve the number of columns in table_3a. (which we can from the catalogue)
Generate column names instead of labels
https://api.github.com/repos/MonetDB/MonetDB/issues/7036/comments
10
2020-12-20T22:47:55Z
2024-06-27T13:14:42Z
https://github.com/MonetDB/MonetDB/issues/7036
771,732,144
7,036
[ "MonetDB", "MonetDB" ]
**Describe the bug** Not sure if this is a bug, but the error is a bit unexpected: ---- `usr` can SELECT column `a` and UPDATE column `b`: ``` create table t (a int, b int); create user usr with password 'usr' name 'usr' schema sys; grant select(a) on t to usr; grant update (b) on t to usr; ``` ---- log in as `usr` ``` select a from t; -- this works update t set b = 23; -- this works update t set b = 32 where a = 6; -- UPDATE: insufficient privileges for user 'usr' to update table 't' ``` **Expected behavior** Since `usr` has SELECT right on `t(a)`, I'd expect the second UPDATE query to succeed. **Software versions** - MonetDB version number [v11.39.8 (hg id: 20d5ae056058)] - OS and version: [e.g. Ubuntu 20.04] - Mercuria source
UPDATE and SELECT column privileges
https://api.github.com/repos/MonetDB/MonetDB/issues/7035/comments
3
2020-12-18T14:20:33Z
2024-06-27T13:14:41Z
https://github.com/MonetDB/MonetDB/issues/7035
770,921,685
7,035
[ "MonetDB", "MonetDB" ]
**Describe the bug** Not sure if this is a bug or I did something wrong, but after a user has been granted and assumed the `sysadmin` role, this user still cannot create another user. This question comes from the test `sql/test/Users/Tests/grantMonetdb.SQL.py`, in which the description says the user should then be able to create another user while the corresponding test is expected to fail. The [documentation](https://www.monetdb.org/Documentation/SQLReference/DataDefinition/Privileges/GrantAndRevoke) says GRANT takes either `[WITH ADMIN OPTION]` or `[WITH ADMIN grantor]`, but if I try `WITH ADMIN monetdb`, I just get an error. **To Reproduce** ---- log in as `monetdb` ``` create user alice with password 'alice' name 'alice' schema sys; grant sysadmin to alice with admin option; -- using a granter fails with 'syntax error, unexpected IDENT, expecting OPTION in: "grant sysadmin to alice with admin monetdb" ' grant sysadmin to alice with admin monetdb; ``` ---- log in as alice ``` sql>create user bob with password 'bo' name 'bob' schema sys; CREATE USER: access denied for user 'alice' ``` **Expected behavior** The `create user bob...` query should succeed. **Software versions** - MonetDB version number [default] - OS and version: [e.g. Ubuntu 20.04]
User with sysadmin role cannot create another user
https://api.github.com/repos/MonetDB/MonetDB/issues/7034/comments
6
2020-12-18T12:07:46Z
2024-06-27T13:14:40Z
https://github.com/MonetDB/MonetDB/issues/7034
770,836,156
7,034
[ "MonetDB", "MonetDB" ]
**Describe the bug** If a transaction with a `create user <usr>...` is aborted, it still adds a row to `sys.users`. I'm aware that this is explained in `sql/test/Users/Tests/createUserRollback.SQL.py` that it is because "The MAL authorization is not transaction aware". But this doesn't conform to the ACID properties. Do we ever want to do something on this? **To Reproduce** ``` sql>select * from users; +-----------+---------------+----------------+-------------+ | name | fullname | default_schema | schema_path | +===========+===============+================+=============+ | monetdb | MonetDB Admin | 2000 | "sys" | | .snapshot | Snapshot User | 2000 | "sys" | +-----------+---------------+----------------+-------------+ 2 tuples sql>START TRANSACTION; auto commit mode: off sql>CREATE USER "1" WITH PASSWORD '1' NAME '1' SCHEMA "sys"; operation successful sql>ROLLBACK; auto commit mode: on sql>select * from users; +-----------+---------------+----------------+-------------+ | name | fullname | default_schema | schema_path | +===========+===============+================+=============+ | monetdb | MonetDB Admin | 2000 | "sys" | | .snapshot | Snapshot User | 2000 | "sys" | | 1 | null | null | null | +-----------+---------------+----------------+-------------+ 3 tuples **Expected behavior** An aborted transaction should leave no traces behind. **Software versions** - MonetDB version number [Oct2020] - OS and version: [e.g. Ubuntu 20.04]
Aborted CREATE USER transaction leaves garbage behind
https://api.github.com/repos/MonetDB/MonetDB/issues/7033/comments
1
2020-12-17T21:13:00Z
2024-06-27T13:14:39Z
https://github.com/MonetDB/MonetDB/issues/7033
770,371,394
7,033
[ "MonetDB", "MonetDB" ]
**Describe the bug** When creating a view with multiple computed columns, it gives the error `CREATE VIEW: duplicate column name v`. **To Reproduce** ``` create table t (i int); -- one computed column gets the name 'v' create view v1 as select i+1 from t; select * from v1; -- a second computed column triggers: CREATE VIEW: duplicate column name v create view v2 as select i+1, i*10 from t; -- while SELECT automatically creates unique names for the computed columns select i+1, i*10 from t; **Expected behavior** Not sure if this is a bug or a feature. Would be nice if `create view` also automatically generates unique names for the computed columns? **Software versions** - MonetDB version number [v11.39.8 (hg id: 5a846c0ffc58)] - OS and version: [e.g. Ubuntu 20.04] - Mercurial source
CREATE VIEW: duplicate column name v
https://api.github.com/repos/MonetDB/MonetDB/issues/7032/comments
13
2020-12-17T17:03:50Z
2024-06-27T13:14:38Z
https://github.com/MonetDB/MonetDB/issues/7032
770,216,785
7,032
[ "MonetDB", "MonetDB" ]
**Describe the bug** Use the M5Server.bat start MonetDb. Return error message. ![image](https://user-images.githubusercontent.com/76139677/102437011-bd29dd00-4054-11eb-8d56-1fd08cb4b152.png) **To Reproduce** If the installation path contains Chinese, the bug is reproduce. **Expected behavior** The MonetDb can started. **Software versions** - MonetDB version number:11.37.7 - OS and version: Windows 10
I cannot start MoentDb, because the installation path has Chinese.
https://api.github.com/repos/MonetDB/MonetDB/issues/7031/comments
2
2020-12-17T02:55:32Z
2024-06-27T13:14:37Z
https://github.com/MonetDB/MonetDB/issues/7031
769,448,174
7,031
[ "MonetDB", "MonetDB" ]
**Describe the bug** When a table with an `auto_increment` column is dropped, the corresponding `sequence` created for this column is not dropped. This results in at least one left-over dependency of this `sequence` on the schema to which the table belonged. So the schema can't be dropped. Also, this implicit sequence can't be dropped with `drop sequence seq_nnnn`, so there seems to be no way to clean up this. **To Reproduce** ``` create schema s1; create table s1.t (i int not null auto_increment); drop table s1.t; drop schema s1; -- DROP SCHEMA: unable to drop schema 's1' (there are database objects which depend on it) select sq.id as sequence_id, sq.name as sequence_name, sc.id as schema_id, sc.name as schema_name from sequences sq, schemas sc where sq.schema_id = sc.id; -- shows the left-over dependency ``` **Expected behavior** The `auto_increment` sequence should have been removed as part of the `drop table`, and `drop schema s1` should succeed. **Software versions** - MonetDB version number [v11.39.8 (hg id: e6eb722152e3)] - OS and version: [e.g. Ubuntu 20.04] - Mercurial source
DROP TABLE with AUTO_INCREMENT doesn't drop sequence causing left-over dependency
https://api.github.com/repos/MonetDB/MonetDB/issues/7030/comments
2
2020-12-16T10:40:51Z
2024-06-27T13:14:36Z
https://github.com/MonetDB/MonetDB/issues/7030
768,700,966
7,030
[ "MonetDB", "MonetDB" ]
**Describe the bug** Is this a bug or expected behaviour? I can drop a ROLE while it has been GRANTed to a USER, doesn't matter if the USER is currently logged in and has assumed the ROLE or not. **To Reproduce** --- role not assumed by a user Log in as `monetdb`: ``` CREATE USER alice with password 'alice' name 'alice' schema sys; CREATE ROLE role1; GRANT role1 to alice; DROP ROLE role1; -- operation successful ``` --- role assumed by a user Log in as `monetdb`: ``` CREATE USER alice with password 'alice' name 'alice' schema sys; CREATE ROLE role1; GRANT role1 to alice; ``` Log in as `alice` and stay logged-in: ``` SET ROLE role1; ``` Back to `monetdb` ``` DROP ROLE role1; -- operation successful ``` **Expected behavior** Shouldn't the `DROP ROLE` be rejected? **Software versions** - MonetDB version number [default] - OS and version: [e.g. Ubuntu 20.04] - Mercurial source
Role dropped while being used by a user
https://api.github.com/repos/MonetDB/MonetDB/issues/7029/comments
2
2020-12-15T20:45:30Z
2024-06-27T13:14:35Z
https://github.com/MonetDB/MonetDB/issues/7029
768,181,490
7,029
[ "MonetDB", "MonetDB" ]
**Describe the bug** Not sure if this is a bug, but the result of this `copy ... into stdout` is a bit unexpected: ``` sql>create table t ( i int); operation successful sql>insert into t values (42); 1 affected row sql>copy select * from t into stdout; +------+ | i | +======+ +------+ 1 tuple 1 affected row ``` **Expected behavior** I'd expect to see the value from the table, e.g.: ``` sql>copy select * from t into stdout; +------+ | i | +======+ | 42 | +------+ 1 tuple 1 affected row ``` **Software versions** - MonetDB version number [default] - OS and version: [e.g. Ubuntu 20.04] - Mercurial source
unexpected result COPY <table> INTO STDOUT
https://api.github.com/repos/MonetDB/MonetDB/issues/7028/comments
1
2020-12-15T16:41:54Z
2024-06-27T13:14:34Z
https://github.com/MonetDB/MonetDB/issues/7028
767,795,125
7,028
[ "MonetDB", "MonetDB" ]
May I add my 2 cents to this? I am not really interested in the ROLE issue itself, but more in what is a bug or not. As @njnes clarified, this is not a _programming_ bug, i.e. the feature does not behave differently from how it was designed. There are however more levels of "bug". This could be a _design_ bug, if one decides that waiting for the change to be active in the next session is not acceptable. If this design choice is the one accepted, the fact remains that from a user point of view this behaviour is confusing. I would certainly expect the same that @yzchang expected. At the very least, this may be considered a _documentation_ bug. If the REVOKE command clearly said "your change will be effective in the next session" then it would be fine. But without this information the user is bound to expect an immediate effect which is not there. _Originally posted by @swingbit in https://github.com/MonetDB/MonetDB/issues/7026#issuecomment-743246044_
levels of bugs?
https://api.github.com/repos/MonetDB/MonetDB/issues/7027/comments
4
2020-12-11T15:45:07Z
2024-06-27T13:14:33Z
https://github.com/MonetDB/MonetDB/issues/7027
762,502,458
7,027
[ "MonetDB", "MonetDB" ]
**Describe the bug** After `monetdb` has revoked a role from a user who is already logged in and has assumed the revoked role, the user can still use the rights associated with the revoked role. **To Reproduce** In connection1, log in as `monetdb` and run the following queries: ``` CREATE SCHEMA s1; CREATE USER bruce WITH PASSWORD 'bruce' name 'willis' schema s1; CREATE TABLE s1.test(d int); CREATE ROLE role1; GRANT ALL ON s1.test to role1; GRANT role1 TO bruce; ``` In connection2, log in as `bruce` and stay logged in. Check that `bruce` can assume the role `role1` and use all its rights: ``` SET role role1; SELECT * FROM test; INSERT INTO test VALUES (24), (42); UPDATE test SET d = 42 WHERE d <> 42; DELETE FROM test WHERE d = 42; ``` Back in connection1: ``` REVOKE role1 FROM bruce;` ``` Back in connection2, `bruce` still has all privileges on `test`, even though it no longer has `role1`: ``` SELECT * FROM test; INSERT INTO test VALUES (24), (42); UPDATE test SET d = 42 WHERE d <> 42; DELETE FROM test WHERE d = 42; SET role role1; --> Role (role1) missing ``` **Expected behavior** `bruce` should not be able to access `test` after its `role1` has been revoked. **Software versions** - MonetDB version number [v11.39.8 (hg id: 66645aea30c4)] - OS and version: [e.g. Ubuntu 20.04] - Mercurial source
Revoking a role from a logged-in user is not immediately effective
https://api.github.com/repos/MonetDB/MonetDB/issues/7026/comments
4
2020-12-11T13:19:04Z
2024-06-27T13:14:32Z
https://github.com/MonetDB/MonetDB/issues/7026
762,336,164
7,026
[ "MonetDB", "MonetDB" ]
When doing a DELETE FROM or TRUNCATE on a freshly created table all further INSERTs in the same transaction are lost. Example: ``` mclient db Welcome to mclient, the MonetDB/SQL interactive terminal (Oct2020-SP1) Database: MonetDB v11.39.7 (Oct2020-SP1), 'mapi:monetdb://28be88be3df8:50000/oohreporting' FOLLOW US on https://twitter.com/MonetDB or https://github.com/MonetDB/MonetDB Type \q to quit, \? for a list of available commands auto commit mode: on sql>START TRANSACTION; auto commit mode: off sql>CREATE TABLE b (c integer); operation successful sql>DELETE FROM b; 0 affected rows sql>INSERT INTO b VALUES (1); 1 affected row sql>COMMIT; auto commit mode: on sql>SELECT * FROM b; +---+ | c | +===+ +---+ 0 tuples ``
DELETE FROM or TRUNCATE on freshly created table leads to loosing all further inserts in same transaction
https://api.github.com/repos/MonetDB/MonetDB/issues/7024/comments
3
2020-12-11T09:36:44Z
2024-06-27T13:11:17Z
https://github.com/MonetDB/MonetDB/issues/7024
762,147,521
7,024
[ "MonetDB", "MonetDB" ]
**Describe the bug** CREATE VIEW doesn't seem to recognise that a generated column does have an aggregate function: ``` create table tst (k integer not null, name char(20) not null); -- this works select min(k) from tst group by name; -- but putting it in a VIEW doesn't create view v1 as select max(k) from tst group by name; select * from v1; -- returns SELECT: cannot use non GROUP BY column '%1' in query results without an aggregate function ``` **Expected behavior** No error but 0 tuple. **Software versions** - MonetDB version number [v11.39.8 (hg id: d1c774305959)] - OS and version: [e.g. Ubuntu 20.04] - Mercurial source
CREATE VIEW: SELECT: cannot use non GROUP BY column '%1' in query results without an aggregate function
https://api.github.com/repos/MonetDB/MonetDB/issues/7023/comments
5
2020-12-09T14:19:23Z
2024-06-27T13:11:16Z
https://github.com/MonetDB/MonetDB/issues/7023
760,370,341
7,023
[ "MonetDB", "MonetDB" ]
**Describe the bug** When committing a transaction with an unreleased `savepoint`, not all information about this transaction is properly persisted. The following problems happen: 1. after the transaction has successfully committed, the test table created in this transaction shows up in the catalogue but can't be found by a `select`. 2. a 2nd transaction which creates a table with the same name succeeds. 3. after the 2nd transaction, both test tables appear in the catalogue. A `select` returns the data of the 2nd test table and a `drop table` only drops the second test table. These problems do not appear if the savepoint was released. **To Reproduce** --- this works, due to the `release savepoint` --- ``` start transaction; create table savepointtest (id int, primary key(id)); savepoint name1; insert into savepointtest values(24); release savepoint name1; commit; select * from tables where name = 'savepointtest'; select * from savepointtest; create table savepointtest (id int, primary key(id)); insert into savepointtest values(42); select * from tables where name = 'savepointtest'; select * from savepointtest; drop table savepointtest; select * from tables where name = 'savepointtest'; ``` --- this shows errors --- ``` start transaction; create table savepointtest (id int, primary key(id)); savepoint name1; insert into savepointtest values(24); commit; select * from tables where name = 'savepointtest'; select * from savepointtest; create table savepointtest (id int, primary key(id)); insert into savepointtest values(42); select * from tables where name = 'savepointtest'; -- the 2nd 'savepointtest` is used by SELECT and DROP select * from savepointtest; drop table savepointtest; select * from tables where name = 'savepointtest'; ``` **Expected behavior** The first transaction should be handled correctly. Subsequent creation of a table with the same name should be rejected. **Software versions** - MonetDB version number [v11.39.8 (hg id: 0a97056b6c89)] - OS and version: [e.g. Ubuntu 20.04.1] - Mercurial source
transaction with an unreleased savepoint not properly persisted
https://api.github.com/repos/MonetDB/MonetDB/issues/7022/comments
2
2020-12-09T13:13:04Z
2024-06-27T13:11:15Z
https://github.com/MonetDB/MonetDB/issues/7022
760,317,946
7,022
[ "MonetDB", "MonetDB" ]
**Describe the bug** Running two transactions with a `release savepoint` in each of them crashes `mserver5` at: ``` 0x00007ffff62d6ff5 in idx_destroy (i=0xdbdbdbdbdbdbdbdb) at /home/vagrant/shared/monetdb/mdb-src/Oct2020/sql/storage/store.c:185 185 if (--(i->base.refcnt) > 0) ``` **To Reproduce** Run the following queries to get the crash: ``` start transaction; create table savepointtest (id int, primary key(id)); savepoint name1; insert into savepointtest values(1), (2), (3); savepoint name2; insert into savepointtest values(4), (5), (6); insert into savepointtest values(7), (8), (9); savepoint name3; release savepoint name3; select * from savepointtest; commit; start transaction; create table savepointtest (id int, primary key(id)); savepoint name1; insert into savepointtest values(1), (2), (3); savepoint name2; insert into savepointtest values(4), (5), (6); insert into savepointtest values(7), (8), (9); savepoint name3; release savepoint name1; select * from savepointtest; commit; ``` Note that, if we release savepoint "name2" instead of "name3" in the first transaction, `mserver5` doesn't crash. **Expected behavior** No crash. The second transaction should abort since the table `savepointtest` already exists. **Software versions** - MonetDB version number [v11.39.8 (hg id: 0a97056b6c89), also happens with Oct2020-SP1 but the behavior is different] - OS and version: [e.g. Ubuntu 20.04.1] - Mercurial source code
savepoints crash mserver5
https://api.github.com/repos/MonetDB/MonetDB/issues/7021/comments
4
2020-12-09T08:25:07Z
2024-06-27T13:11:14Z
https://github.com/MonetDB/MonetDB/issues/7021
760,117,746
7,021
[ "MonetDB", "MonetDB" ]
**Describe the bug** In the following queries, the `release savepoint name1` causes the subsequent `select` to fail with `GDK reported error: BATproject2: does not match always`. This problem only happens when we release `name1`. ``` start transaction; create table savepointtest (id int, primary key(id)); savepoint name1; insert into savepointtest values(1), (2), (3); savepoint name2; insert into savepointtest values(4), (5), (6); insert into savepointtest values(7), (8), (9); savepoint name3; release savepoint name1; select * from savepointtest; commit; ``` **Expected behaviour** The error shouldn't happen and the data in `savepointtest` should be returned. **Software versions** - MonetDB version number [Oct2020-SP1] - OS and version: [e.g. Ubuntu 20.04.1 and (hg id: 0a97056b6c89) ] - Ubuntu package and Mercurial source
release an older savepoint causes "BATproject2: does not match always"
https://api.github.com/repos/MonetDB/MonetDB/issues/7020/comments
2
2020-12-09T08:00:17Z
2024-06-27T13:11:13Z
https://github.com/MonetDB/MonetDB/issues/7020
760,099,065
7,020
[ "MonetDB", "MonetDB" ]
The SQLreference documentation describes the `STREAM TABLE` syntax [here](https://www.monetdb.org/index.php/Documentation/SQLreference/SQLSyntaxOverview#CREATE_STREAM_TABLE) and possible at other pages as well. Since stream tables are not supported, it should be removed.
STREAM TABLE not supported but has online documentation
https://api.github.com/repos/MonetDB/MonetDB/issues/7019/comments
6
2020-12-08T11:31:37Z
2024-06-27T13:11:12Z
https://github.com/MonetDB/MonetDB/issues/7019
759,369,991
7,019
[ "MonetDB", "MonetDB" ]
**Describe the bug** A typo moved the predicate "B.visible" after the ORDER BY, which led to an unexpected behavior. Either the expression should raise the flag, but certainly not consider rows where B.visible is false. **To Reproduce* create schema shelf; create table if not exists shelf.books ( name string primary key, visible boolean ); create table if not exists shelf.chapters ( book string references shelf.books(name) on delete cascade, name string, page integer, primary key (book,name) ); insert into shelf.books(name,visible) values ('book1', true), ('book2', false); insert into shelf.chapters(name,book, page) values('chp1','book1', 1), ('chp2', 'book2', 2); select distinct B.name, P.name from shelf.books as B, shelf.chapters as P where P.book = B.name and B.visible order by P.page; +-------+------+ | name | name | +=======+======+ | book1 | chp1 | +-------+------+ select distinct B.name, P.name from shelf.books as B, shelf.chapters as P where P.book = B.name order by P.page and B.visible; +-------+------+ | name | name | +=======+======+ | book2 | chp2 | | book1 | chp1 | +-------+------+
Unexpected result from ORDER BY with expression
https://api.github.com/repos/MonetDB/MonetDB/issues/7018/comments
1
2020-12-07T15:35:25Z
2024-06-27T13:11:11Z
https://github.com/MonetDB/MonetDB/issues/7018
758,616,225
7,018
[ "MonetDB", "MonetDB" ]
**Describe the bug** Take test ST_MakePoint (geom/sql/functions) the last function call (with 4 arguments) gives an error, but because of that there is no garbage collection **To Reproduce** When calling a mal function with bat arguments. The bats get a higher logical ref count, which in case of errors isn't decremented at the end of the function. **Expected behavior** Bats should not get an additional ref count after calling a mal function. **Screenshots** If applicable, add screenshots to help explain your problem. **Software versions** - MonetDB version: Oct2020 and up - OS and version: all
mal seems to leak in functions
https://api.github.com/repos/MonetDB/MonetDB/issues/7017/comments
1
2020-12-07T13:13:50Z
2024-06-27T13:11:10Z
https://github.com/MonetDB/MonetDB/issues/7017
758,497,141
7,017
[ "MonetDB", "MonetDB" ]
**Describe the bug** In we use the built-in similarity function in query sql and the nubmer of rows in table exceed 200K, the database crashes. **To Reproduce** -- Create a table named t_199999 and populated with 199999 rows; CREATE TABLE t_199999 (s1 string, s2 string); -- Create a table named t_200000 and populated with 200000 rows; CREATE TABLE t_200000 (s1 string, s2 string); execute the sql query: -- this works well select count(1) from t_199999 where similarity(s1, s2)> 0.5; -- this crashes the database select count(1) from t_200000 where similarity(s1, s2)> 0.5; **Expected behavior** the database should work well if we use similarity function even if the table row numbers exceed 200000. **Software versions** - MonetDB version number [x86_64-20201013] - OS and version: [both Window 7 and Centos 7] - Installed from release package
Database crashes when use similarity function on a table with more than 200k records
https://api.github.com/repos/MonetDB/MonetDB/issues/7016/comments
6
2020-12-05T06:14:42Z
2024-06-27T13:11:09Z
https://github.com/MonetDB/MonetDB/issues/7016
757,552,437
7,016
[ "MonetDB", "MonetDB" ]
**Is your feature request related to a problem? Please describe.** The current setup allows a user to change the database optimizers-pipeline in a session-wide fashion using SQL statements. **Describe the solution you'd like** In MonetDB-Console we would like to introduce an option so that we make it possible for the user to set the optimizers pipeline for the database as a whole (a global setting).
Optimizers-pipeline as a global setting for a certain database
https://api.github.com/repos/MonetDB/MonetDB/issues/7015/comments
7
2020-12-03T13:30:59Z
2024-06-28T10:08:33Z
https://github.com/MonetDB/MonetDB/issues/7015
756,196,894
7,015
[ "MonetDB", "MonetDB" ]
Is there a good reason for using an explicit string in interval syntax, like: ``` INTERVAL '3' DAY ``` My first question would be "why a string and not an integer / decimal" ? My second question would be why not an expression? Sometimes it would be useful to be able to write things like: ``` INTERVAL (3*24) HOUR ``` Or use it in a function: ``` CREATE FUNCTION f(d DATE, i integer) RETURN date BEGIN RETURN d + INTERVAL i SECOND; END; ``` One could argue that if you can write `INTERVAL (3*24) HOUR` then you can as well write `INTERVAL '3' DAY`, but I don't think this would be a fair assumption. Queries are often generated and amounts may come from procedures unable to make such conversions. PS: Do I win something for the first issue reported on GitHub? :)
More flexible syntax for time intervals
https://api.github.com/repos/MonetDB/MonetDB/issues/7014/comments
3
2020-12-01T12:32:34Z
2024-06-28T10:08:47Z
https://github.com/MonetDB/MonetDB/issues/7014
754,356,612
7,014
[ "MonetDB", "MonetDB" ]
Date: 2020-11-21 14:50:42 +0100 From: @swingbit To: SQL devs &lt;<bugs-sql>&gt; Version: 11.39.5 (Oct2020) CC: @PedroTadim Last updated: 2020-11-21 23:09:50 +0100 ## Comment 28280 Date: 2020-11-21 14:50:42 +0100 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36 Build Identifier: CREATE VIEW v AS SELECT a1, a2 FROM (VALUES (1,2)) as (a1,a2) GROUP BY a1, a2; SELECT a1 from v; SELECT a2 from v; SELECT a1, a2 from v; SELECT * from v; -- this is equivalent to the previous one, but fails. Reproducible: Always $ mserver5 --version MonetDB 5 server 11.39.8 (64-bit, 128-bit integers) This is an unreleased version Copyright (c) 1993 - July 2008 CWI Copyright (c) August 2008 - 2020 MonetDB B.V., all rights reserved Visit https://www.monetdb.org/ for further information Found 12.0GiB available memory, 8 available cpu cores Libraries: libpcre: 8.44 2020-02-12 openssl: OpenSSL 1.1.1g FIPS 21 Apr 2020 libxml2: 2.9.10 Compiled by: @ee4e38e5556f (x86_64-pc-linux-gnu) Compilation: /usr/bin/cc -DNDEBUG=1 Linking : /usr/bin/ld ## Comment 28281 Date: 2020-11-21 23:07:05 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [97cb2149ff53](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=97cb2149ff53) 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=97cb2149ff53](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=97cb2149ff53) Changeset description: Added test and fix for bug #7013, ie we can't innocently believe the dnode row list will match the actual number of rows of the values list
Select * on grouped view: wrong error "cannot use non GROUP BY column 'a1' in query results without an aggregate function"
https://api.github.com/repos/MonetDB/MonetDB/issues/7013/comments
0
2020-11-30T17:07:16Z
2024-06-27T13:11:06Z
https://github.com/MonetDB/MonetDB/issues/7013
753,650,235
7,013