issue_owner_repo
listlengths
2
2
issue_body
stringlengths
0
261k
issue_title
stringlengths
1
925
issue_comments_url
stringlengths
56
81
issue_comments_count
int64
0
2.5k
issue_created_at
stringlengths
20
20
issue_updated_at
stringlengths
20
20
issue_html_url
stringlengths
37
62
issue_github_id
int64
387k
2.46B
issue_number
int64
1
127k
[ "MonetDB", "MonetDB" ]
Date: 2020-01-28 16:35:36 +0100 From: @gijzelaerr To: Merovingian devs &lt;<bugs-merovingian>&gt; Version: 11.35.9 (Nov2019-SP1) CC: @PedroTadim Last updated: 2020-02-12 15:12:00 +0100 ## Comment 27522 Date: 2020-01-28 16:35:36 +0100 From: @gijzelaerr User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36 Build Identifier: when trying out python UDF i run into issues: $ bin/mclient demo user(gijs):monetdb password: Welcome to mclient, the MonetDB/SQL interactive terminal (Nov2019-SP1) Database: MonetDB v11.35.9 (Nov2019-SP1), 'mapi:monetdb://gijs-artica:50000/demo' FOLLOW US on https://twitter.com/MonetDB or https://github.com/MonetDB/MonetDB Type \q to quit, \? for a list of available commands auto commit mode: on sql>CREATE FUNCTION test_python_udf(i INTEGER) RETURNS INTEGER LANGUAGE PYTHON { return i * 2; };more>more>more>more> operation successful sql>SELECT test_python_udf(1); TypeException:user.s6_0[5]:'pyapi.eval' library error in: Embedded Python 2 has not been enabled. Start server with --set embedded_py=2 when trying to set the embedded_py flag with monetdbd i run into issues: bin/monetdbd set embedded_py=2 var/monetdb5/dbfarm set: no such property: embedded_py monetdbd get all doesn't show any python options. How do I enable python support using monetdbd? Reproducible: Always ## Comment 27523 Date: 2020-01-28 16:40:11 +0100 From: @gijzelaerr o and yes, I have enabled py2 and py3 integration: * Enabled/disabled components: gdk is enabled monetdb5 is enabled sql is enabled geom is enabled console is enabled py2integration is enabled py3integration is enabled ## Comment 27524 Date: 2020-01-28 16:40:59 +0100 From: @gijzelaerr embedpy and embedpy3 also don't seem to have any effect. ## Comment 27525 Date: 2020-01-28 16:48:03 +0100 From: @PedroTadim Hello Gijs, The property to enable Python2 UDFs at monetdbd is "embedpy": bin/monetdbd set embedpy=yes var/monetdb5/dbfarm For Python3 UDFs is "embedpy3". Then monetdbd sets the respective embedded_py flag while forking mserver5. We indeed need to improve our documentation, and that is on the work schedule. ## Comment 27526 Date: 2020-01-28 16:58:54 +0100 From: @gijzelaerr Hi Pedro, Thank you for your reply. Also embedpy and embedpy3 don't have any effect. cheers, -Gijs ## Comment 27527 Date: 2020-01-28 17:02:16 +0100 From: @PedroTadim Sorry I meant to use the monetdbd client, ie "monetdb", not "monetdbd": bin/monetdb set embedpy=yes var/monetdb5/dbfarm ## Comment 27528 Date: 2020-01-28 17:06:25 +0100 From: @PedroTadim On the created database, not the farm directory. bin/monetdb create <dbname> bin/monetdb set embedpy=yes <dbname> ## Comment 27529 Date: 2020-01-28 17:17:34 +0100 From: @gijzelaerr ah yes! sorry, I completely forgot you can set options using monetdb.
Running into issues when trying to enable embedded python integration
https://api.github.com/repos/MonetDB/MonetDB/issues/6812/comments
0
2020-11-30T16:53:19Z
2024-06-28T13:09:17Z
https://github.com/MonetDB/MonetDB/issues/6812
753,639,904
6,812
[ "MonetDB", "MonetDB" ]
Date: 2020-01-28 09:49:05 +0100 From: @gijzelaerr To: buildtools devs &lt;<bugs-buildtools>&gt; Version: 11.35.9 (Nov2019-SP1) Last updated: 2020-01-28 09:49:05 +0100 ## Comment 27521 Date: 2020-01-28 09:49:05 +0100 From: @gijzelaerr User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36 Build Identifier: This is a violation of Debian packaging guidelines https://lintian.debian.org/tags/non-standard-dir-in-var.html there are more warnings: W: monetdb5-sql: syntax-error-in-debian-changelog line 676 "found trailer where expected start of change data" W: monetdb5-sql: syntax-error-in-debian-changelog line 826 "found trailer where expected start of change data" W: monetdb5-sql: syntax-error-in-debian-changelog line 5808 "found eof where expected more change data or trailer" W: monetdb5-sql: priority-extra-is-replaced-by-priority-optional E: monetdb5-sql: non-standard-dir-in-var var/monetdb5/ W: monetdb5-sql: file-in-unusual-dir var/monetdb5/dbfarm/.merovingian_properties E: monetdb5-sql: init.d-script-does-not-implement-required-option etc/init.d/monetdb5-sql force-reload E: monetdb5-sql: systemd-tmpfiles.d-outside-usr-lib etc/tmpfiles.d/monetdbd.conf W: monetdb5-sql: init.d-script-does-not-source-init-functions etc/init.d/monetdb5-sql E: monetdb5-sql: omitted-systemd-service-for-init.d-script monetdb5-sql Reproducible: Always
systemd starts database in /var/monetdb5/dbfarm while init.d start db in /var/lib/monetdb
https://api.github.com/repos/MonetDB/MonetDB/issues/6811/comments
0
2020-11-30T16:53:16Z
2024-06-28T13:09:16Z
https://github.com/MonetDB/MonetDB/issues/6811
753,639,862
6,811
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T16:49:47Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/6810/comments
0
2020-11-30T16:53:14Z
2020-11-30T16:53:16Z
https://github.com/MonetDB/MonetDB/issues/6810
753,639,831
6,810
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T16:49:47Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/6809/comments
0
2020-11-30T16:53:11Z
2020-11-30T16:53:13Z
https://github.com/MonetDB/MonetDB/issues/6809
753,639,785
6,809
[ "MonetDB", "MonetDB" ]
Date: 2020-01-22 10:24:09 +0100 From: @yzchang To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: @PedroTadim Last updated: 2020-06-03 16:58:52 +0200 ## Comment 27515 Date: 2020-01-22 10:24:09 +0100 From: @yzchang User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.4 Safari/605.1.15 Build Identifier: It would be nice to have a sleep procedure in SQL (e.g. for testing). Maybe we can add the following definition in the default supported SQL procedures: create procedure sys.sleep(secs int) external name alarm.sleep; Reproducible: Always ## Comment 27516 Date: 2020-01-23 11:42:00 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [09bf17ab6c98](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=09bf17ab6c98) 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=09bf17ab6c98](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=09bf17ab6c98) Changeset description: Added sleep as a procedure and function at the SQL layer. The ALARMsleep functions sleeps for milliseconds instead of seconds for greater precision. This fixes bug #6808
reveal the alarm.sleep procedure in SQL
https://api.github.com/repos/MonetDB/MonetDB/issues/6808/comments
0
2020-11-30T16:53:09Z
2024-06-27T13:07:50Z
https://github.com/MonetDB/MonetDB/issues/6808
753,639,744
6,808
[ "MonetDB", "MonetDB" ]
Date: 2020-01-10 09:07:03 +0100 From: @PedroTadim To: SQL devs &lt;<bugs-sql>&gt; Version: 11.35.9 (Nov2019-SP1) Last updated: 2020-02-21 12:36:58 +0100 ## Comment 27508 Date: 2020-01-10 09:07:03 +0100 From: @PedroTadim User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36 Build Identifier: If median_avg or the quantile_avg of a group is going to be computed as the average of two values, if one of them is NULL, then the value is ignored, while it shouldn't. Reproducible: Always ### Steps to Reproduce: 1. SELECT median_avg(c1) FROM (VALUES (1), (NULL)) t1(c1); ### Actual Results: -128 ### Expected Results: NULL ## Comment 27509 Date: 2020-01-10 09:50:00 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [14395b0ea40e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=14395b0ea40e) 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=14395b0ea40e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=14395b0ea40e) Changeset description: Added test and fix for bug #6807, ie look for NULL values while computing quantile_avg ## Comment 27510 Date: 2020-01-10 11:33:12 +0100 From: @sjoerdmullender Is this the correct thing to do? Shouldn't NULL be ignored when calculating the median/quantile? This would mean that the result is only NULL if all values are NULL, not if any is NULL.
Median_avg and quantile_avg ignore NULL values
https://api.github.com/repos/MonetDB/MonetDB/issues/6807/comments
0
2020-11-30T16:53:06Z
2024-06-27T13:07:49Z
https://github.com/MonetDB/MonetDB/issues/6807
753,639,710
6,807
[ "MonetDB", "MonetDB" ]
Date: 2019-12-25 12:47:53 +0100 From: @mlkersten To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: @PedroTadim Last updated: 2020-01-21 10:50:17 +0100 ## Comment 27500 Date: 2019-12-25 12:47:53 +0100 From: @mlkersten User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:71.0) Gecko/20100101 Firefox/71.0 Build Identifier: In script 61_wlr.master is defined as accepting a string argument. Calling it with a non-string argument does not generate an exception. Reproducible: Always ### Steps to Reproduce: sql>call wlr.master('demo'); sql>call wlr.master(1); -- WRONG sql>call wlr.master(-1); -- WRONG sql>call wlr.master(true); -- WRONG sql>call wlr.master((select 'hello')); ### Expected Results: Proper error messages when types are involved. ## Comment 27501 Date: 2019-12-25 15:00:59 +0100 From: @sjoerdmullender Not a bug: automatic cast to string. See the EXPLAIN output.
Type checking a called procedure
https://api.github.com/repos/MonetDB/MonetDB/issues/6806/comments
0
2020-11-30T16:53:02Z
2024-06-28T13:09:15Z
https://github.com/MonetDB/MonetDB/issues/6806
753,639,658
6,806
[ "MonetDB", "MonetDB" ]
Date: 2019-12-19 14:39:03 +0100 From: Frank Groot &lt;<fgroot>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.35.3 (Nov2019) CC: @PedroTadim Last updated: 2020-02-21 12:36:58 +0100 ## Comment 27496 Date: 2019-12-19 14:39:03 +0100 From: Frank Groot &lt;<fgroot>&gt; User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.79 Safari/537.36 Build Identifier: When we try to drop a table which has a view depending on it, monetdb quits the shell. It specifically happens when you run a DROP TABLE <tablename> CASCADE; where the view is in a separate schema from the table itself. When the view is in the same schema it works perfectly. Reproducible: Always ### Steps to Reproduce: 1. sql>create schema configuration; operation successful 2. sql>create table configuration.testcascade (testkolom varchar(50), testkolom2 varchar(50)); operation successful 3. sql>create table configuration.testcascade2 (testkolom varchar(50)); operation successful 4. sql>insert into configuration.testcascade (testkolom, testkolom2) values('derect','jip'),('hans','job'),('gruber','jet'); 3 affected rows 5. sql>create view sys.testcascade_view as select testcascade.testkolom from configuration.testcascade; operation successful 6. sql>drop table configuration.testcascade; DROP TABLE: unable to drop table testcascade (-> Message: there are database objects which depend on it) 7. sql>drop table configuration.testcascade cascade; (-> Action: exit out of MonetDb shell) ### Actual Results: Table and view remain after: drop table <tablename> cascade; ### Expected Results: Both table and view should have been removed despite the fact that they were in separate schemas. ## Comment 27498 Date: 2019-12-19 20:57:39 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [b745c54e099a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b745c54e099a) 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=b745c54e099a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=b745c54e099a) Changeset description: Added test and fix for bug #6805, ie the dependencies of an object can be on a different schema, so search on all schemas of the current transaction for the dependent ids.
Using the cascade operator in a drop table statement ends in an exit from the Monetdb shell.
https://api.github.com/repos/MonetDB/MonetDB/issues/6805/comments
0
2020-11-30T16:52:59Z
2024-06-27T13:07:47Z
https://github.com/MonetDB/MonetDB/issues/6805
753,639,616
6,805
[ "MonetDB", "MonetDB" ]
Date: 2019-12-18 10:55:31 +0100 From: @kutsurak To: Merovingian devs &lt;<bugs-merovingian>&gt; Version: 11.35.3 (Nov2019) Last updated: 2019-12-20 15:36:32 +0100 ## Comment 27489 Date: 2019-12-18 10:55:31 +0100 From: @kutsurak On Ubuntu Bionic and Disco, setting the listenaddr property of a database farm to 0.0.0.0 prevents the daemon from starting. ## Comment 27490 Date: 2019-12-18 11:00:48 +0100 From: @kutsurak This has been fixed in https://dev.monetdb.org/hg/MonetDB/rev/d574c807b421
DNS resolution of 0.0.0.0 fails on recent Ubuntus
https://api.github.com/repos/MonetDB/MonetDB/issues/6804/comments
0
2020-11-30T16:52:56Z
2024-06-27T13:07:46Z
https://github.com/MonetDB/MonetDB/issues/6804
753,639,572
6,804
[ "MonetDB", "MonetDB" ]
Date: 2019-12-17 16:03:39 +0100 From: @swingbit To: SQL devs &lt;<bugs-sql>&gt; Version: 11.35.9 (Nov2019-SP1) CC: @njnes Last updated: 2020-03-29 13:23:20 +0200 ## Comment 27487 Date: 2019-12-17 16:03:39 +0100 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36 Build Identifier: Let's have 2 connections to a database: A and B. Let's assume the database has a table T (large enough that its size can be noticeable on disk). Simply opening and closing a transaction on B prevents the server to release the files for T after it has been dropped. 1) A: sql> 2) B: sql> START TRANSACTION; 3) A: sql> DROP TABLE T; 4) B: sql> ROLLBACK; 5) A: sql> select * FROM T; -- this fails, T is gone successfully. 6) <close B> 7) <close A> Check on disk. Files for T are not released until the database shuts down. If the same is done without opening a transaction in B (2), the disk space is released after a few seconds, without shutting down the database. Reproducible: Always $ mserver5 --version MonetDB 5 server 11.33.12 (hg id: de38a0d96e6c+) (64-bit, 128-bit integers) This is an unreleased version Copyright (c) 1993 - July 2008 CWI Copyright (c) August 2008 - 2019 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.43 2019-02-23 openssl: OpenSSL 1.1.1d FIPS 10 Sep 2019 libxml2: 2.9.9 Compiled by: roberto@photon.hq.spinque.com (x86_64-pc-linux-gnu) Compilation: gcc -O3 -fomit-frame-pointer -pipe -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wundef -Wformat=2 -Wformat-overflow=1 -Wno-format-truncation -Wno-format-nonliteral -Wno-cast-function-type -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wno-missing-field-initializers -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wduplicated-cond -Wduplicated-branches -Wrestrict -Wnested-externs -Wno-char-subscripts -Wunreachable-code Linking : /usr/bin/ld -m elf_x86_64 -Wl,-Bsymbolic-functions ## Comment 27511 Date: 2020-01-13 16:08:13 +0100 From: @swingbit Can this be reproduced? Please let me know if something isn't clear or if I should provide more details. ## Comment 27625 Date: 2020-03-26 11:17:02 +0100 From: @swingbit Our only workaround at the moment is a cronjob to periodically restart MonetDB. We would really like to get rid of that, it's not suited for production. Of course I gave an over-simplified example here, but what happens in practice is that without the forced restart tens of GBs go wasted daily and very soon the disks are full. Any thought on this would be appreciated. Is it more likely a regular bug or a design issue? Will it be hard to fix? Is there anything that we can tweak in order to force a periodic cleanup without restarting the db? ## Comment 27626 Date: 2020-03-26 14:26:26 +0100 From: @sjoerdmullender Hmm, easily reproduceable, and somewhat worrying, at least to me. This is related to bug #6401. The gtrans structure keeps a reference to the deleted table and doesn't seem to get cleaned up. ## Comment 27633 Date: 2020-03-27 11:06:28 +0100 From: @njnes added fix for this in the jun2020 branch
Disk space not released when table dropped after a transaction is started on another session (and rolled back)
https://api.github.com/repos/MonetDB/MonetDB/issues/6803/comments
0
2020-11-30T16:52:51Z
2024-06-27T13:07:45Z
https://github.com/MonetDB/MonetDB/issues/6803
753,639,498
6,803
[ "MonetDB", "MonetDB" ]
Date: 2019-12-17 15:17:07 +0100 From: Frank Groot &lt;<fgroot>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.35.3 (Nov2019) CC: fgroot, @njnes, @yzchang Last updated: 2020-09-10 11:29:32 +0200 ## Comment 27486 Date: 2019-12-17 15:17:07 +0100 From: Frank Groot &lt;<fgroot>&gt; User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.79 Safari/537.36 Build Identifier: We loaded multiple tables simultaneously (up to 16 tables at a time), using COPY INTO with CSV files containing 1.000.000 rows each. After loading was finished, a restart was issued using: "systemctl restart monetdb.services" Diskspace before restart: 3513G 91% Sat Dec 14 07:25:33 CET 2019 Diskspace after restart: 1012G 26% Sat Dec 14 07:29:33 CET 2019 Restarting MonetDb service frees up 2.5TB of data after loading data worth of 1TB of MonetDb table data. Reproducible: Always ### Steps to Reproduce: 1. Load more than 1 MonetDb table at a time with CSV data 2. Each csv contains 1.000.000 rows in their respective table format 3. Some tables are larger than 2 billion rows, but we think it also happens with smaller sized tables. 4. Assess the disk usage using "df -h" and store it in file1 5. Restart the monetdb service using: "systemctl restart monetdb.services" 6. Assess the disk usage using "df -h" and store it in file2 7. Open file1 and file2 and assess the difference in both disk usage outputs. ### Actual Results: Disk usage right after table load was over three times higher than expected. ### Expected Results: We expected no or minimal changes in disk usage directly after table load and after subsequent restart of monetdb service. ## Comment 27493 Date: 2019-12-18 20:26:15 +0100 From: @yzchang Afaik, this is a fairly normal behaviour. If you have measured the disk usage shortly after the COPY INTO, then the database probably still holds both intermediates (in your case, files that temporarily store the binary values of the 1TB data) and the WAL log (which contains all information of your transaction) for the COPY INTO. Both of them can be big. During the restart, mserver5 always cleans up the intermediates, and processes and removes the WAL log. That's why after the restart, it frees up a lot of disk spaces. A server restart is not strictly needed to free up these disk spaces. Mserver5 automatically cleans up those data regularly (e.g. ~30 sec?) under some conditions (e.g. if there are enough changes to clean up). I'll double check with my colleagues if the ratio of 2.5 is within the normal range. ## Comment 27494 Date: 2019-12-19 11:07:54 +0100 From: @yzchang I checked with my colleagues. They agree with me that the ratio of 2.5 is not unusual. Please monitor MonetDB's behaviour, because if mserver5 doesn't clean up the temporary data without restarting, then you *might* have a real bug. Please close this bug if we have given you sufficient information. ## Comment 27497 Date: 2019-12-19 14:57:48 +0100 From: Frank Groot &lt;<fgroot>&gt; Created attachment 640 Describes the behaviour of diskspace during loadprocess Our test load process takes about 20 hours to complete. During the entire period of 20hrs, not once did we observe an automated cleanup of the intermediate data by Monetdb itself. Therefore, we have created a process that monitors disk usage during data loads. It does so every 5 or 6 minutes or so. The script will run a "df -h" command and write a portion of the output to a log file. You will find this log file attached. If disk usage rises above 90% the process will pause running load-processes and restart Monetdb automatically. After that, loads are resumed. That's what you see happening in the file above. If you have more questions, please feel free to contact us. Kind regards, Frank Groot > Attached file: [dfmonout20191213204504.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6802_dfmonout20191213204504.txt_640) (text/plain, 11162 bytes) > Description: Describes the behaviour of diskspace during loadprocess ## Comment 27503 Date: 2020-01-02 17:44:06 +0100 From: @sjoerdmullender COPY INTO creates a thread per column up to the maximum number of threads allowed (usually the number of threads of the CPUs on the system, see the first few lines of the mserver5 output when it starts, try "mserver5 --version"). If you run multiple COPY INTO queries in parallel, they each do this. Also, COPY INTO, by its very nature, has all columns of the table in memory (well, in its address space--the kernel determines what part is actually in memory). These two statements show that running multiple COPY INTO queries in parallel may severly challenge the resources of the system (both memory and CPU). In addition to this, when executing COPY INTO while another transaction is active (e.g. another COPY INTO), mserver5 writes to the write-ahead log at (auto-)commit time. You can see this by monitoring the space used by the sql_logs subdirectory. So by having multiple COPY INTO queries in parallel you also use extra disk space. It is this disk space that is cleaned up when restarting mserver5. I suggest you try the COPY INTO queries sequentially without any other queries running at the same time. By the way, you don't need to use "systemctl restart monetdb.services" to restart mserver5. Using "monetdb stop $DATABASE; monetdb start $DATABASE" also works. And in fact, you don't have to explicitly start the database since that happens automatically when you try to connect a client. ## Comment 27504 Date: 2020-01-02 17:45:11 +0100 From: @sjoerdmullender This has nothing to do with monetdbd. ## Comment 28056 Date: 2020-09-09 16:15:28 +0200 From: @njnes whats the status of this problem on the soon to be released oct2020 version? ## Comment 28061 Date: 2020-09-10 11:29:32 +0200 From: Frank Groot &lt;<fgroot>&gt; Since the last update (Jun2020-SP1), our most recent load was completed without restarts for the first time. This result should be representative for future loads, so this bug can be closed. Thanks! Frank
Loading tables with CSV data using COPY INTO takes up more than 3 times the expected disk space
https://api.github.com/repos/MonetDB/MonetDB/issues/6802/comments
0
2020-11-30T16:52:47Z
2024-06-27T13:07:44Z
https://github.com/MonetDB/MonetDB/issues/6802
753,639,445
6,802
[ "MonetDB", "MonetDB" ]
Date: 2019-12-16 11:10:40 +0100 From: Olaf Flaschel &lt;<olaf.flaschel>&gt; To: IM-NEKEL404 &lt;<nekelgans>&gt; Version: 11.35.3 (Nov2019) CC: nekelgans, @yzchang Last updated: 2020-05-19 08:30:10 +0200 ## Comment 27485 Date: 2019-12-16 11:10:40 +0100 From: Olaf Flaschel &lt;<olaf.flaschel>&gt; User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:71.0) Gecko/20100101 Firefox/71.0 Build Identifier: While doing a dump of a large database (> 500G of data) with msqldump mserver5 crashes reproducibly. The root cause of this problem was fixed in bug #6777 but mserver5 should not have crashed and a possible segmentation fault is still there. There is already a bug ticket describing the same problem: bug #3681. But this ticket is very old and was maybe caused by a different problem. The segmentation fault occurs in libbat.so: [17637.928622] mserver5[3778]: segfault at 7ee89af1c680 ip 00007f4e7a339780 sp 00007f4e28be48b8 error 4 in libbat.so.19.0.1[7f4e79f2b000+5bb000] I installed the monetdb-dbg package and got following line: addr2line -e /usr/lib/x86_64-linux-gnu/libbat.so.19.0.1 -fCi 0x40e780 lngCmp ./gdk/gdk_atoms.c:64 Reproducible: Always ### Steps to Reproduce: 1. dump a large database (> 500G) with msqldump without fix for bug #6777 ### Actual Results: mserver5 crashes ### Expected Results: No crash of mserver5 MonetDB 5 server 11.35.3 (Nov2019) (64-bit, 128-bit integers) Copyright (c) 1993 - July 2008 CWI Copyright (c) August 2008 - 2019 MonetDB B.V., all rights reserved Visit https://www.monetdb.org/ for further information Found 125.8GiB available memory, 48 available cpu cores Libraries: libpcre: 8.39 2016-06-14 openssl: OpenSSL 1.1.1 11 Sep 2018 (compiled with OpenSSL 1.1.0g 2 Nov 2017) libxml2: 2.9.4 Compiled by: root@dev.monetdb.org (x86_64-pc-linux-gnu) Compilation: gcc -O3 -fomit-frame-pointer -pipe -g -fdebug-prefix-map=/var/cache/pbuilder/bionic/amd64/tmp/MonetDB-11.35.3=. -fstack-protector-strong -Wformat -Werror=format-security -g3 Linking : /usr/bin/x86_64-linux-gnu-ld -m elf_x86_64 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions ## Comment 27491 Date: 2019-12-18 11:03:03 +0100 From: @yzchang Can you give us a stack trace at the time of segfault? And the merovingian.log if you have it. Does the segfault also happen with a smaller data set? Which can make reproduction easier. Can you please share the schema of your database and an excerpt of the data (all anonymised)? This can also help us reproducing the crash. Thanks
mserver5 crashes with a segmentation fault dumping a large database (> 500G)
https://api.github.com/repos/MonetDB/MonetDB/issues/6801/comments
0
2020-11-30T16:52:43Z
2024-06-28T13:09:15Z
https://github.com/MonetDB/MonetDB/issues/6801
753,639,393
6,801
[ "MonetDB", "MonetDB" ]
Date: 2019-12-11 21:04:03 +0100 From: Simon AUBERT &lt;<simon.aubert>&gt; To: Martin van Dinther &lt;<martin.van.dinther>&gt; Version: 11.35.3 (Nov2019) CC: martin.van.dinther Last updated: 2020-01-14 21:46:48 +0100 ## Comment 27481 Date: 2019-12-11 21:04:03 +0100 From: Simon AUBERT &lt;<simon.aubert>&gt; Hello, According to wikipedia : "In relational databases, the information schema (information_schema) is an ANSI-standard set of read-only views which provide information about all of the tables, views, columns, and procedures in a database" I think such a feature would help the support of monetdb by more tools (such as Alteryx.. ) and it's never a bad thing when you follow the SQL norm. Best regards, Simon ## Comment 27495 Date: 2019-12-19 13:56:40 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; Hello Simon, Thanks for reporting this request. This feature is on our ToDo-list, so we will let you know once it is available. Question: I guess Alteryx connects to MonetDB via the ODBC interface. ODBC (and JDBC) support standardised programming interfaces to retrieve schema information (such as SQLTables(), SQLColumns()). Usually database tools use those APIs to get the database metadata. Does Alteryx not use those APIs to retrieve schema information? ## Comment 27499 Date: 2019-12-19 20:58:08 +0100 From: Simon AUBERT &lt;<simon.aubert>&gt; Hello Martin, First of all, I'm very happy this feature is on your todo. Thanks :) To answer your question, from what I have understood to Alteryx in this point, it throws a set of query to guess what database it is. Something like : Mar 01 11:37:21.318 INFO 5264 HardyDataEngine::Prepare: Incoming SQL: select USER(), APPLICATION_ID() from system.iota Mar 01 11:37:22.863 INFO 5264 HardyDataEngine::Prepare: Incoming SQL: select USER as USER_NAME from SYSIBM.SYSDUMMY1 Mar 01 11:37:23.454 INFO 5264 HardyDataEngine::Prepare: Incoming SQL: select * from rdb$relations Mar 01 11:37:23.546 INFO 5264 HardyDataEngine::Prepare: Incoming SQL: select first 1 dbinfo('version', 'full') from systables etc, etc, etc... Then, there is also the Visual Query Builder that's supposed to show a treemap of databases/schemas/tables/columns. As of today, this Visual Query Builder doesn't retrieve the columns in MonetDB. Logically, if information_schema is implemented, as it's in the norm, it should work without having the guys @ Alteryx hard coding the sys schema. I don't know about SQLColumns(), I guess it isn't used. For my information, do you plan to add tables in the information_schema or just views such as SQL Server? Best regards, Simon ## Comment 27513 Date: 2020-01-14 18:13:04 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; Hello Simon, The information_schema will contain system views. Can you provide us some SQL queries which actually query the information_schema as generated by Alteryx? Does Visual Query Builder show you currently the database? And in it the schemas? And in those the available tables? So only the columns (of a table or view) are not shown? FYI: SQLTables() and SQLColums() are C functions standardised in the ODBC API, not SQL tables or functions. So you do not call them using SQL but from compiled C code. If the schemas and tables and shown Visual Query Builder, but the columns not, it may be a problem in the MonetDB ODBC driver SQLColumns() implementation. Can you confirm that Alteryx is using MonetDB ODBC driver to connect to MonetDB server? If so, could you make a log file of the ODBC calls made. This log file can be created by turning logging on in the ODBC Driver Manager. ## Comment 27514 Date: 2020-01-14 21:46:48 +0100 From: Simon AUBERT &lt;<simon.aubert>&gt; Hello Martin, Thanks for the answer. 1/Yes, Alteryx uses the ODBC driver. It's some kind of what they call "generic odbc connection". Some databases (PSQL, MSQL, Vertica, Oracle..) have a dedicated entry in the menu. 2/Indeed, I can see the schemas and the tables, not the columns. 3/I will get back to you as soo as I can on the queries/log you ask Best regards, Simon
Please add information_schema (ANSI SQL norm)
https://api.github.com/repos/MonetDB/MonetDB/issues/6800/comments
4
2020-11-30T16:52:40Z
2024-06-27T13:07:42Z
https://github.com/MonetDB/MonetDB/issues/6800
753,639,351
6,800
[ "MonetDB", "MonetDB" ]
Date: 2019-12-11 18:57:22 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.35.3 (Nov2019) CC: @njnes, @PedroTadim Last updated: 2020-09-21 20:25:59 +0200 ## Comment 27478 Date: 2019-12-11 18:57:22 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0 Build Identifier: You can use expressions in the order by, but when referencing an alias instead of a column name, it fails with identifier 'alias1' unknown. It should be allowed to use the alias names in expressions in ORDER BY. Reproducible: Always ### Steps to Reproduce: CREATE TABLE obale (nm VARCHAR(99) ); INSERT INTO obale VALUES ('a'), ('b'), ('b'), (NULL); SELECT nm FROM obale ORDER BY 1 desc; SELECT nm FROM obale ORDER BY upper(nm); SELECT nm FROM obale ORDER BY nm || nm; SELECT nm as alias1 FROM obale ORDER BY alias1, nm; -- no problemo SELECT nm as alias1 FROM obale ORDER BY upper(alias1); -- retuns error: SELECT: identifier 'alias1' unknown SELECT nm as alias1 FROM obale ORDER BY nm || alias1; -- retuns error: SELECT: identifier 'alias1' unknown SELECT nm, upper(nm) as alias1 FROM obale ORDER BY alias1; -- no problemo SELECT nm, nm||nm as alias1 FROM obale ORDER BY alias1; -- no problemo SELECT nm, COUNT(nm) countnm, COUNT(DISTINCT nm) countdnm FROM obale GROUP BY nm ORDER BY countnm desc, countdnm; -- no problemo SELECT nm, COUNT(nm) countnm, COUNT(DISTINCT nm) countdnm FROM obale GROUP BY nm ORDER BY countdnm - countnm; -- retuns error: SELECT: identifier 'countdnm' unknown DROP TABLE obale; ### Actual Results: sql>CREATE TABLE obale (nm VARCHAR(99) ); operation successful sql>INSERT INTO obale VALUES ('a'), ('b'), ('b'), (NULL); 4 affected rows sql>SELECT nm FROM obale ORDER BY 1 desc; +------+ | nm | +======+ | b | | b | | a | | null | +------+ 4 tuples sql>SELECT nm FROM obale ORDER BY upper(nm); +------+ | nm | +======+ | null | | a | | b | | b | +------+ 4 tuples sql>SELECT nm FROM obale ORDER BY nm || nm; +------+ | nm | +======+ | null | | a | | b | | b | +------+ 4 tuples sql>SELECT nm as alias1 FROM obale ORDER BY alias1, nm; -- no problemo +--------+ | alias1 | +========+ | null | | a | | b | | b | +--------+ 4 tuples sql>SELECT nm as alias1 FROM obale ORDER BY upper(alias1); -- retuns error: SELECT: identifier 'alias1' unknown SELECT: identifier 'alias1' unknown sql>SELECT nm as alias1 FROM obale ORDER BY nm || alias1; -- retuns error: SELECT: identifier 'alias1' unknown SELECT: identifier 'alias1' unknown sql>SELECT nm, upper(nm) as alias1 FROM obale ORDER BY alias1; -- no problemo +------+--------+ | nm | alias1 | +======+========+ | null | null | | a | A | | b | B | | b | B | +------+--------+ 4 tuples sql>SELECT nm, nm||nm as alias1 FROM obale ORDER BY alias1; -- no problemo +------+--------+ | nm | alias1 | +======+========+ | null | null | | a | aa | | b | bb | | b | bb | +------+--------+ 4 tuples sql>SELECT nm, COUNT(nm) countnm, COUNT(DISTINCT nm) countdnm FROM obale GROUP BY nm ORDER BY countnm desc, countdnm; -- no problemo +------+---------+----------+ | nm | countnm | countdnm | +======+=========+==========+ | b | 2 | 1 | | a | 1 | 1 | | null | 0 | 0 | +------+---------+----------+ 3 tuples sql>SELECT nm, COUNT(nm) countnm, COUNT(DISTINCT nm) countdnm FROM obale GROUP BY nm ORDER BY countdnm - countnm; -- retuns error: SELECT: identifier 'countdnm' unknown SELECT: identifier 'countdnm' unknown sql>DROP TABLE obale; operation successful ### Expected Results: sql>CREATE TABLE obale (nm VARCHAR(99) ); operation successful sql>INSERT INTO obale VALUES ('a'), ('b'), ('b'), (NULL); 4 affected rows sql>SELECT nm FROM obale ORDER BY 1 desc; +------+ | nm | +======+ | b | | b | | a | | null | +------+ 4 tuples sql>SELECT nm FROM obale ORDER BY upper(nm); +------+ | nm | +======+ | null | | a | | b | | b | +------+ 4 tuples sql>SELECT nm FROM obale ORDER BY nm || nm; +------+ | nm | +======+ | null | | a | | b | | b | +------+ 4 tuples sql>SELECT nm as alias1 FROM obale ORDER BY alias1, nm; -- no problemo +--------+ | alias1 | +========+ | null | | a | | b | | b | +--------+ 4 tuples sql>SELECT nm as alias1 FROM obale ORDER BY upper(alias1); -- retuns error: SELECT: identifier 'alias1' unknown +--------+ | alias1 | +========+ | null | | a | | b | | b | +--------+ 4 tuples sql>SELECT nm as alias1 FROM obale ORDER BY nm || alias1; -- retuns error: SELECT: identifier 'alias1' unknown +--------+ | alias1 | +========+ | null | | a | | b | | b | +--------+ 4 tuples sql>SELECT nm, upper(nm) as alias1 FROM obale ORDER BY alias1; -- no problemo +------+--------+ | nm | alias1 | +======+========+ | null | null | | a | A | | b | B | | b | B | +------+--------+ 4 tuples sql>SELECT nm, nm||nm as alias1 FROM obale ORDER BY alias1; -- no problemo +------+--------+ | nm | alias1 | +======+========+ | null | null | | a | aa | | b | bb | | b | bb | +------+--------+ 4 tuples sql>SELECT nm, COUNT(nm) countnm, COUNT(DISTINCT nm) countdnm FROM obale GROUP BY nm ORDER BY countnm desc, countdnm; -- no problemo +------+---------+----------+ | nm | countnm | countdnm | +======+=========+==========+ | b | 2 | 1 | | a | 1 | 1 | | null | 0 | 0 | +------+---------+----------+ 3 tuples sql>SELECT nm, COUNT(nm) countnm, COUNT(DISTINCT nm) countdnm FROM obale GROUP BY nm ORDER BY countdnm - countnm; -- retuns error: SELECT: identifier 'countdnm' unknown +------+---------+----------+ | nm | countnm | countdnm | +======+=========+==========+ | null | 0 | 0 | | a | 1 | 1 | | b | 2 | 1 | +------+---------+----------+ 3 tuples sql>DROP TABLE obale; operation successful ## Comment 27482 Date: 2019-12-12 10:06:36 +0100 From: @PedroTadim This is a non-standard extension that some databases implement. I'm not sure if we should do it as well. ## Comment 27483 Date: 2019-12-12 14:50:31 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [aaa89146c3da](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=aaa89146c3da) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=aaa89146c3da](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=aaa89146c3da) Changeset description: Add test for bug #6799 ## Comment 28099 Date: 2020-09-21 20:25:59 +0200 From: @njnes we only allow direct alias us in the order by, ie not within some new expression.
allow using alias names in expressions in ORDER BY clause
https://api.github.com/repos/MonetDB/MonetDB/issues/6799/comments
0
2020-11-30T16:52:37Z
2024-06-28T13:09:14Z
https://github.com/MonetDB/MonetDB/issues/6799
753,639,303
6,799
[ "MonetDB", "MonetDB" ]
Date: 2019-12-10 17:30:52 +0100 From: @kutsurak To: SQL devs &lt;<bugs-sql>&gt; Version: 11.35.3 (Nov2019) Last updated: 2019-12-20 15:36:33 +0100 ## Comment 27474 Date: 2019-12-10 17:30:52 +0100 From: @kutsurak json.text removes the last character of the last element of the input if the separator is the empty string: sql>select json.text('"abc"', ''); +------+ | %1 | +======+ | ab | +------+ 1 tuple sql>select json.text('["abc", "def"]', ''); +-------+ | %1 | +=======+ | abcde | +-------+ 1 tuple sql>select json.text('{"a":"abc", "b":"def"}', ''); +-------+ | L2 | +=======+ | abcde | +-------+ 1 tuple ## Comment 27475 Date: 2019-12-10 17:38:49 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [bcfd744a61b8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bcfd744a61b8) made by Panagiotis Koutsourakis <kutsurak@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=bcfd744a61b8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=bcfd744a61b8) Changeset description: Add test for Bug #6798 ## Comment 27476 Date: 2019-12-10 17:38:53 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [01a51ecc108e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=01a51ecc108e) made by Panagiotis Koutsourakis <kutsurak@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=01a51ecc108e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=01a51ecc108e) Changeset description: json.text should not delete the last separator if it is empty This fixes Bug #6798
json.text off by one error
https://api.github.com/repos/MonetDB/MonetDB/issues/6798/comments
0
2020-11-30T16:52:34Z
2024-06-27T13:07:40Z
https://github.com/MonetDB/MonetDB/issues/6798
753,639,264
6,798
[ "MonetDB", "MonetDB" ]
Date: 2019-12-06 15:26:59 +0100 From: @swingbit To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.11 (Apr2019-SP1) CC: @PedroTadim Last updated: 2019-12-09 15:43:29 +0100 ## Comment 27459 Date: 2019-12-06 15:26:59 +0100 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36 Build Identifier: Python2 UDFs used to install imported modules on demand. Python3 UDFs no longer do that. CREATE OR REPLACE FUNCTION f1(i INTEGER) RETURNS INTEGER LANGUAGE PYTHON { import cPickle return i }; sql>select f1(1); Python exception 1. def pyfun(i,_columns,_column_types,_conn): > 2. import cPickle 3. return i 4. No module named 'cPickle' MonetDB 11.13.12 compiled with --enable-py3integration. Database with embedpy3=yes Reproducible: Always MonetDB 5 server 11.33.12 (hg id: de38a0d96e6c+) (64-bit, 128-bit integers) This is an unreleased version Copyright (c) 1993 - July 2008 CWI Copyright (c) August 2008 - 2019 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.43 2019-02-23 openssl: OpenSSL 1.1.1d FIPS 10 Sep 2019 libxml2: 2.9.9 Compiled by: roberto@photon.hq.spinque.com (x86_64-pc-linux-gnu) Compilation: gcc -O3 -fomit-frame-pointer -pipe -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wundef -Wformat=2 -Wformat-overflow=1 -Wno-format-truncation -Wno-format-nonliteral -Wno-cast-function-type -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wno-missing-field-initializers -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wduplicated-cond -Wduplicated-branches -Wrestrict -Wnested-externs -Wno-char-subscripts -Wunreachable-code Linking : /usr/bin/ld -m elf_x86_64 -Wl,-Bsymbolic-functions ## Comment 27461 Date: 2019-12-06 15:44:30 +0100 From: @swingbit Module cPickle was really the wrong example, as it no longer exists in python 3. Take pickle then. Am I remembering wrong, that modules used to be installed on demand? ## Comment 27462 Date: 2019-12-09 11:37:15 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [7164a5a219b7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7164a5a219b7) 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=7164a5a219b7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=7164a5a219b7) Changeset description: Added test for bug #6797 ## Comment 27463 Date: 2019-12-09 11:41:21 +0100 From: @PedroTadim Hello Roberto, I tried your example with the 'pickle' module and works for me on Apr2019. The 'pickle' module comes pre-installed with python, so it should be always available. As far as I know, python modules were never installed on demand. ## Comment 27464 Date: 2019-12-09 12:18:03 +0100 From: @swingbit Hi Pedro. Indeed, pickle was again the wrong example, as it comes preinstalled and cannot even be uninstalled. However, you are right, I was remembering wrong. Embedded Python never installed modules on demand. My memory comes from embedded R: https://www.monetdb.org/content/embedded-r-monetdb "As a final note on usage, you can use any R package from CRAN within your function without explicitly installing it. We overloaded the library function in R to automatically install missing packages." So this bug as it is can be marked as invalid, sorry about the confusion. (Hint: what had been done for embedded R is really useful! It's a massive help for ensuring portability of UDFs)
Python UDF - Import no longer installs modules on demand
https://api.github.com/repos/MonetDB/MonetDB/issues/6797/comments
0
2020-11-30T16:52:31Z
2024-06-28T13:09:13Z
https://github.com/MonetDB/MonetDB/issues/6797
753,639,238
6,797
[ "MonetDB", "MonetDB" ]
Date: 2019-12-05 21:30:20 +0100 From: Olaf Flaschel &lt;<olaf.flaschel>&gt; To: Merovingian devs &lt;<bugs-merovingian>&gt; Version: 11.35.3 (Nov2019) Last updated: 2019-12-20 15:36:32 +0100 ## Comment 27454 Date: 2019-12-05 21:30:20 +0100 From: Olaf Flaschel &lt;<olaf.flaschel>&gt; User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0 Build Identifier: While investigating a crash of mserver5 I remarked that the monetdb tool reports an incorrect crash time. It seems to report the time when the database was started and not the time when the database (mserver5 instance) crashed. Reproducible: Always ### Steps to Reproduce: 1. Create a new database: sudo monetdb create test 2. Release the database: sudo monetdb release test 3. Start the database: sudo monetdb start test 4. Wait 5 minutes 5. Find out pid of mserver5 instance: ps -ef | grep mserver5 6. Kill mserver5 instance and print current time: sudo kill -9 <pid of mserver5 instance>;date 7. Check status of database: sudo monetdb monetdb status 8. Compare time shown in 6. and time reported by monetdb ### Actual Results: The monetdb tool reports time when database was started. ### Expected Results: The monetdb tool should report the time when the database crashed. monetdb --version MonetDB Database Server Toolkit v11.35.3 (Nov2019) ## Comment 27456 Date: 2019-12-06 14:31:31 +0100 From: @sjoerdmullender The report is indeed confusing. Currently we don't know at what time the server crashed, we only know when it was started and that it crashed. Of course, mserver5 can't tell monetdbd that it is about to crash (especially not if you kill it with kill -9), so we need to figure it out in some other way. What we should probably do is catch the SIGCHILD signal, but that'll take some effort to implement (catching isn't hard, avoiding the resulting race conditions is). ## Comment 27469 Date: 2019-12-10 09:36:36 +0100 From: Olaf Flaschel &lt;<olaf.flaschel>&gt; (In reply to Sjoerd Mullender from comment 1) > The report is indeed confusing. > Currently we don't know at what time the server crashed, we only know when > it was started and that it crashed. > Of course, mserver5 can't tell monetdbd that it is about to crash > (especially not if you kill it with kill -9), so we need to figure it out in > some other way. What we should probably do is catch the SIGCHILD signal, > but that'll take some effort to implement (catching isn't hard, avoiding the > resulting race conditions is). Maybe just changing the message would be enough: "crashed (started on 2019-12-05 21:06:43)" or "crashed" instead of "crashed on 2019-12-05 21:06:43" ## Comment 27472 Date: 2019-12-10 16:45:57 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [2ea938bafd98](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2ea938bafd98) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=2ea938bafd98](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=2ea938bafd98) Changeset description: Fixed wording of status information after crash. This fixes bug #6796. ## Comment 27473 Date: 2019-12-10 16:49:32 +0100 From: @sjoerdmullender I've implemented your suggestion.
Incorrect crash time reported by monetdb tool after crash of mserver5
https://api.github.com/repos/MonetDB/MonetDB/issues/6796/comments
0
2020-11-30T16:52:28Z
2024-06-27T13:07:37Z
https://github.com/MonetDB/MonetDB/issues/6796
753,639,194
6,796
[ "MonetDB", "MonetDB" ]
Date: 2019-12-05 17:27:21 +0100 From: wei.yao To: SQL devs &lt;<bugs-sql>&gt; Version: 11.35.3 (Nov2019) CC: @njnes Last updated: 2020-08-25 14:13:05 +0200 ## Comment 27450 Date: 2019-12-05 17:27:21 +0100 From: wei.yao User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0 Build Identifier: Within a MonetDB docker container, it works if we do a short query (e.g., select * from metadata), but when the 'select' query is complicated, we get no results but error 'could not allocate space'. If we export all the data in csv, delete all table content and restore the data from the csv, the query will work again. When a new complicated query doesn't work, later it won't work anymore. Reproducible: Didn't try ### Steps to Reproduce: 1.build a Monetdb docker image using the Dockerfile 2.create a Monetdb container 3.in the container, ingest the sample csv files 4.in the container, do the 'select' query: Select ' ' as selected, i.image_id, * from metadata m join image i on m.metadata_id=i.metadata_id join eoproduct eo on eo.image_id=i.image_id join ingestion ing on ing.ingestion_id=eo.ingestion_id where m.mission = 'S2A' ### Actual Results: logs in the merovingian.log file : DFLOWworker38:!ERROR: BATproject: does not match always DFLOWworker38:!ERROR:MALException:sql.projectdelta:HY001!Could not allocate space ### Expected Results: to get query result This Docker container is deployed on a Kubernetes managed platform. There is no specific resource limits for the docker. ## Comment 27451 Date: 2019-12-05 17:35:15 +0100 From: wei.yao Created attachment 639 monetdb Docker with sample data > Attached file: [monetdb_docker_sample.zip](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6795_monetdb_docker_sample.zip_639) (application/x-zip-compressed, 10597 bytes) > Description: monetdb Docker with sample data ## Comment 27452 Date: 2019-12-05 17:37:31 +0100 From: wei.yao This problem appears at two versions: April, 2019 and November, 2019 ## Comment 27455 Date: 2019-12-06 10:16:16 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [1cd809f47444](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1cd809f47444) 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=1cd809f47444](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=1cd809f47444) Changeset description: Added test and output for bug #6795 ## Comment 27484 Date: 2019-12-13 15:02:48 +0100 From: @sjoerdmullender (In reply to wei.yao from comment 0) > User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) > Gecko/20100101 Firefox/60.0 > Build Identifier: > Actual Results: > logs in the merovingian.log file : > DFLOWworker38:!ERROR: BATproject: does not match always > DFLOWworker38:!ERROR:MALException:sql.projectdelta:HY001!Could not allocate > space The second error is a red herring. The first error is the real one. The second one gets incorrectly generated because of the earlier error. The code assumes there that because BATproject failed it must be an allocation failure, but that was not why BATproject failed. ## Comment 28012 Date: 2020-08-25 14:13:05 +0200 From: @njnes please validate again with a recent version (jun or oct 2020)
could not allocate space during a complicated query, within a docker container
https://api.github.com/repos/MonetDB/MonetDB/issues/6795/comments
0
2020-11-30T16:52:25Z
2024-06-27T13:07:36Z
https://github.com/MonetDB/MonetDB/issues/6795
753,639,155
6,795
[ "MonetDB", "MonetDB" ]
Date: 2019-12-02 08:30:47 +0100 From: wangkk To: buildtools devs &lt;<bugs-buildtools>&gt; Version: 11.35.3 (Nov2019) CC: arnold.kuzniar, @PedroTadim, @yzchang Last updated: 2020-02-16 22:42:03 +0100 ## Comment 27435 Date: 2019-12-02 08:30:47 +0100 From: wangkk User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36 Build Identifier: After I run shell> monetdbd create /path/to/mydbfarm shell> monetdbd start /path/to/mydbfarm shell> monetdb create voc shell> monetdb release voc shell> mclient -u monetdb -d voc It outputs the following: monetdbd: internal error while starting mserver 'database 'voc' has crashed after starting, manual intervention needed, check monetdbd's logfile (merovingian.log) for details' Reproducible: Always ### Steps to Reproduce: shell> monetdbd create /path/to/mydbfarm shell> monetdbd start /path/to/mydbfarm shell> monetdb create voc shell> monetdb release voc shell> mclient -u monetdb -d voc ### Actual Results: In logs: external name fits.listdir not bound (sys.listdir) Fatal error during initialization: ## Comment 27436 Date: 2019-12-02 08:31:14 +0100 From: wangkk Created attachment 638 logs > Attached file: [log.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6794_log.txt_638) (text/plain, 6692 bytes) > Description: logs ## Comment 27437 Date: 2019-12-02 09:09:48 +0100 From: @PedroTadim Hello Wang, On Nov2019 release, whenever a SQL function defined in MAL is called, the server tests if the MAL definition exists. At your setting, the server attempted to call the SQL procedure listdir from the FITS module, but the MAL definition was not found. Please confirm if the fits.mal script is at lib/monetdb5 directory, as well as the lib_fits.so native library. The latter must be set also on the linker path if not installed at a regular path: LD_LIBRARY_PATH ## Comment 27439 Date: 2019-12-02 11:47:09 +0100 From: @yzchang I can confirm this error. At least, our Debian installer is broken. I installed MonetDB on a Ubuntu Bionis following the instructions here: https://www.monetdb.org/downloads/deb/ Then when I try to start a fresh database, I got: $ mserver5 --dbpath=/tmp/test --set mapi_port=60000 MonetDB 5 server v11.35.3 (Nov2019) ... loading sql script: 72_fits.sql main thread:!ERROR:ParseException:SQLparser:3F000!CREATE PROCEDURE: external name fits.listdir not bound (sys.listdir) ParseException:SQLparser:3F000!CREATE PROCEDURE: external name fits.listdir not bound (sys.listdir)Fatal error during initialization: ParseException:SQLparser:3F000!CREATE PROCEDURE: external name fits.listdir not bound (sys.listdir) Then, when I try to install the fits lib, I got another error: $ sudo apt install libmonetdb5-server-cfitsio ... Unpacking libmonetdb5-server-cfitsio (11.35.3) ... dpkg: error processing archive /var/cache/apt/archives/libmonetdb5-server-cfitsio_11.35.3_amd64.deb (--unpack): trying to overwrite '/usr/lib/x86_64-linux-gnu/monetdb5/createdb/72_fits.sql', which is also in package monetdb5-sql 11.35.3 E: Sub-process /usr/bin/dpkg returned an error code (1) I can workaround this by deleting the file: $ sudo rm /usr/lib/x86_64-linux-gnu/monetdb5/createdb/72_fits.sql Now I can start a database ## Comment 27440 Date: 2019-12-03 09:58:19 +0100 From: @sjoerdmullender It seems the file /usr/lib/x86_64-linux-gnu/monetdb5/fits.mal has accidentally been included in the monetdb5-server package. Remove the file from you installation and things should work again. Note, the file does need to be present if you als install the package libmonetdb5-server-cfitsio. ## Comment 27441 Date: 2019-12-03 10:04:48 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [302e85949ac8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=302e85949ac8) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=302e85949ac8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=302e85949ac8) Changeset description: Don't include fits.mal in monetdb5-server package. This should fix bug #6794. ## Comment 27468 Date: 2019-12-09 22:42:58 +0100 From: @sjoerdmullender In addition to the file mentioned in comment 4, the file /usr/lib/x86_64-linux-gnu/monetdb5/createdb/72_fits.sql needs to be removed as well. On Fedora systems, the file /usr/lib64/monetdb/createdb/72_fits.sql should be removed. As in comment 4, don't remove these files if you've actually also installed the MonetDB cfitsio package (libmonetdb5-server-cfitsio on Debian/Ubuntu, MonetDB-cfitsio on Fedora). ## Comment 27556 Date: 2020-02-16 22:42:03 +0100 From: @sjoerdmullender *** Bug #6820 has been marked as a duplicate of this bug. ***
external name fits.listdir not bound (sys.listdir) Fatal error during initialization:
https://api.github.com/repos/MonetDB/MonetDB/issues/6794/comments
0
2020-11-30T16:52:21Z
2024-06-27T13:07:35Z
https://github.com/MonetDB/MonetDB/issues/6794
753,639,107
6,794
[ "MonetDB", "MonetDB" ]
Date: 2019-11-28 19:57:28 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.35.3 (Nov2019) Last updated: 2019-12-20 15:36:32 +0100 ## Comment 27429 Date: 2019-11-28 19:57:28 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0 Build Identifier: casting an interval second value to an int/bigint/smallint type or decimal type is wrong (by a factor of 1000). casting an interval month value to a decimal or floating point (real, float, double) type fails, it issues an error, while casting to int type succeeds. Reproducible: Always ### Steps to Reproduce: CREATE TABLE INTERVAL_TBL (f1 interval second); INSERT INTO INTERVAL_TBL (f1) VALUES (1.123); INSERT INTO INTERVAL_TBL (f1) VALUES (2.123); INSERT INTO INTERVAL_TBL (f1) VALUES (3.123); INSERT INTO INTERVAL_TBL (f1) VALUES (4.123); SELECT f1, cast(f1 as int), cast(f1 as dec(8,3)), cast(f1 as real) FROM INTERVAL_TBL; SELECT count(f1), sum(f1), cast(sum(f1) as int), cast(sum(f1) as dec(8,3)), cast(sum(f1) as real) FROM INTERVAL_TBL; DROP TABLE INTERVAL_TBL; CREATE TABLE INTERVAL_TBL (f1 interval month); INSERT INTO INTERVAL_TBL (f1) VALUES (1); INSERT INTO INTERVAL_TBL (f1) VALUES (2); INSERT INTO INTERVAL_TBL (f1) VALUES (3); INSERT INTO INTERVAL_TBL (f1) VALUES (4); SELECT f1, cast(f1 as int) FROM INTERVAL_TBL; SELECT f1, cast(f1 as dec(3,0)) FROM INTERVAL_TBL; -- returns error: types month_interval(3,0) and decimal(3,0) are not equal for column 'f1' SELECT f1, cast(f1 as real) FROM INTERVAL_TBL; -- returns error: types month_interval(3,0) and real(24,0) are not equal for column 'f1' SELECT count(f1), sum(f1), cast(sum(f1) as int), cast(sum(f1) as dec(8,3)), cast(sum(f1) as real) FROM INTERVAL_TBL; DROP TABLE INTERVAL_TBL; ### Actual Results: sql>CREATE TABLE INTERVAL_TBL (f1 interval second); operation successful sql>INSERT INTO INTERVAL_TBL (f1) VALUES (1.123); 1 affected row sql>INSERT INTO INTERVAL_TBL (f1) VALUES (2.123); 1 affected row sql>INSERT INTO INTERVAL_TBL (f1) VALUES (3.123); 1 affected row sql>INSERT INTO INTERVAL_TBL (f1) VALUES (4.123); 1 affected row sql>SELECT f1, cast(f1 as int), cast(f1 as dec(8,3)), cast(f1 as real) FROM INTERVAL_TBL; +-------+------+------------+-----------------+ | f1 | L1 | L2 | L3 | +=======+======+============+=================+ | 1.123 | 1123 | 1123.000 | 1.123 | | 2.123 | 2123 | 2123.000 | 2.123 | | 3.123 | 3123 | 3123.000 | 3.123 | | 4.123 | 4123 | 4123.000 | 4.123 | +-------+------+------------+-----------------+ 4 tuples sql>SELECT count(f1), sum(f1), cast(sum(f1) as int), cast(sum(f1) as dec(8,3)), cast(sum(f1) as real) FROM INTERVAL_TBL; +------+--------+-------+------------+-----------------+ | L2 | L3 | L5 | L7 | L11 | +======+========+=======+============+=================+ | 4 | 10.492 | 10492 | 10492.000 | 10.492 | +------+--------+-------+------------+-----------------+ 1 tuple sql>DROP TABLE INTERVAL_TBL; operation successful sql> sql>CREATE TABLE INTERVAL_TBL (f1 interval month); operation successful sql>INSERT INTO INTERVAL_TBL (f1) VALUES (1); 1 affected row sql>INSERT INTO INTERVAL_TBL (f1) VALUES (2); 1 affected row sql>INSERT INTO INTERVAL_TBL (f1) VALUES (3); 1 affected row sql>INSERT INTO INTERVAL_TBL (f1) VALUES (4); 1 affected row sql>SELECT f1, cast(f1 as int) FROM INTERVAL_TBL; +------+------+ | f1 | L1 | +======+======+ | 1 | 1 | | 2 | 2 | | 3 | 3 | | 4 | 4 | +------+------+ 4 tuples sql>SELECT f1, cast(f1 as dec(3,0)) FROM INTERVAL_TBL; -- returns error: types month_interval(3,0) and decimal(3,0) are not equal for column 'f1' sql>SELECT f1, cast(f1 as real) FROM INTERVAL_TBL; -- returns error: types month_interval(3,0) and real(24,0) are not equal for column 'f1' sql>SELECT count(f1), sum(f1), cast(sum(f1) as int), cast(sum(f1) as dec(8,3)), cast(sum(f1) as real) FROM INTERVAL_TBL; -- returns error: types month_interval(32,0) and decimal(8,3) are not equal for column 'L6' sql>DROP TABLE INTERVAL_TBL; operation successful sql> ### Expected Results: sql>CREATE TABLE INTERVAL_TBL (f1 interval SECOND); operation successful sql>INSERT INTO INTERVAL_TBL (f1) VALUES (1.123); 1 affected row sql>INSERT INTO INTERVAL_TBL (f1) VALUES (2.123); 1 affected row sql>INSERT INTO INTERVAL_TBL (f1) VALUES (3.123); 1 affected row sql>INSERT INTO INTERVAL_TBL (f1) VALUES (4.123); 1 affected row sql>SELECT f1, cast(f1 as int), cast(f1 as dec(8,3)), cast(f1 as real) FROM INTERVAL_TBL; +-------+----+---------+-----------------+ | f1 | L1 | L2 | L3 | +=======+====+=========+=================+ | 1.123 | 1 | 1.123 | 1.123 | | 2.123 | 2 | 2.123 | 2.123 | | 3.123 | 3 | 3.123 | 3.123 | | 4.123 | 4 | 4.123 | 4.123 | +-------+----+---------+-----------------+ 4 tuples sql>SELECT count(f1), sum(f1), cast(sum(f1) as int), cast(sum(f1) as dec(8,3)), cast(sum(f1) as real) FROM INTERVAL_TBL; +------+--------+-------+------------+-----------------+ | L2 | L3 | L5 | L7 | L11 | +======+========+=======+============+=================+ | 4 | 10.492 | 10 | 10.492 | 10.492 | +------+--------+-------+------------+-----------------+ 1 tuple sql>DROP TABLE INTERVAL_TBL; operation successful sql> sql>CREATE TABLE INTERVAL_TBL (f1 interval MONTH); operation successful sql>INSERT INTO INTERVAL_TBL (f1) VALUES (1); 1 affected row sql>INSERT INTO INTERVAL_TBL (f1) VALUES (2); 1 affected row sql>INSERT INTO INTERVAL_TBL (f1) VALUES (3); 1 affected row sql>INSERT INTO INTERVAL_TBL (f1) VALUES (4); 1 affected row sql>SELECT f1, cast(f1 as int) FROM INTERVAL_TBL; +------+------+ | f1 | L1 | +======+======+ | 1 | 1 | | 2 | 2 | | 3 | 3 | | 4 | 4 | +------+------+ 4 tuples sql>SELECT f1, cast(f1 as dec(3,0)) FROM INTERVAL_TBL; +------+------+ | f1 | L1 | +======+======+ | 1 | 1 | | 2 | 2 | | 3 | 3 | | 4 | 4 | +------+------+ 4 tuples sql>SELECT f1, cast(f1 as real) FROM INTERVAL_TBL; +------+------+ | f1 | L1 | +======+======+ | 1 | 1 | | 2 | 2 | | 3 | 3 | | 4 | 4 | +------+------+ 4 tuples sql>SELECT count(f1), sum(f1), cast(sum(f1) as int), cast(sum(f1) as dec(8,3)), cast(sum(f1) as real) FROM INTERVAL_TBL; +------+------+------+------------+-----------------+ | L2 | L3 | L5 | L10 | L13 | +======+======+======+============+=================+ | 4 | 10 | 10 | 10.000 | 10 | +------+------+------+------------+-----------------+ 1 tuple sql>DROP TABLE INTERVAL_TBL; operation successful sql> Tests inspired by tests of bug #3533 ## Comment 27430 Date: 2019-11-28 20:01:24 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [ddff28ebf5f3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ddff28ebf5f3) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=ddff28ebf5f3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=ddff28ebf5f3) Changeset description: Corrected the desired output. instead of 10000 it should have returned 10. The issue is reported separately in bug #6793. ## Comment 27442 Date: 2019-12-05 13:41:14 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [e7d28370aee7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e7d28370aee7) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=e7d28370aee7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=e7d28370aee7) Changeset description: Add test for Bug #6793 ## Comment 27466 Date: 2019-12-09 15:38:54 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [356d665aeb10](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=356d665aeb10) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=356d665aeb10](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=356d665aeb10) Changeset description: When converting second interval to any numeric type take decimals into account. This fixes part of bug #6793. ## Comment 27467 Date: 2019-12-09 16:41:10 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [7ff84bea66d4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7ff84bea66d4) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=7ff84bea66d4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=7ff84bea66d4) Changeset description: Allow conversion from month interval to decimal and float. This fixes the second part of bug #6793.
cast(interval second value to int or decimal) is wrong (by a factor of 1000), cast(interval month value to decimal or floating point) fails
https://api.github.com/repos/MonetDB/MonetDB/issues/6793/comments
0
2020-11-30T16:52:17Z
2024-06-27T13:07:34Z
https://github.com/MonetDB/MonetDB/issues/6793
753,639,061
6,793
[ "MonetDB", "MonetDB" ]
Date: 2019-11-28 16:59:25 +0100 From: @kutsurak To: SQL devs &lt;<bugs-sql>&gt; Version: 11.35.3 (Nov2019) Last updated: 2019-12-20 15:36:34 +0100 ## Comment 27424 Date: 2019-11-28 16:59:25 +0100 From: @kutsurak Using the following definitions CREATE TABLE jstest ( j json ); INSERT INTO jstest VALUES ('{"track":{"segments":[{"location":[ 47.763,13.4034 ],"start time":"2018-10-14 10:05:14","HR":73},{"location":[ 47.706,13.2635 ],"start time":"2018-10-14 10:39:21","HR":135}]}}'); The JSON path compiler accepts the path: '$.track.segments[*][*' and produces results. It should throw an error about incomplete input instead. ## Comment 27425 Date: 2019-11-28 17:21:32 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [9e35cff499bc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9e35cff499bc) made by Panagiotis Koutsourakis <kutsurak@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=9e35cff499bc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=9e35cff499bc) Changeset description: Add test for bug #6792 ## Comment 27426 Date: 2019-11-28 17:21:36 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [2066af063159](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2066af063159) made by Panagiotis Koutsourakis <kutsurak@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=2066af063159](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=2066af063159) Changeset description: Add fix for bug #6792
JSON path compiler accepts invalid input
https://api.github.com/repos/MonetDB/MonetDB/issues/6792/comments
0
2020-11-30T16:52:14Z
2024-06-27T13:07:33Z
https://github.com/MonetDB/MonetDB/issues/6792
753,639,018
6,792
[ "MonetDB", "MonetDB" ]
Date: 2019-11-28 16:37:32 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.35.3 (Nov2019) CC: @PedroTadim Last updated: 2019-12-20 15:36:33 +0100 ## Comment 27423 Date: 2019-11-28 16:37:32 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0 Build Identifier: The query: SELECT str_to_date('23-09-1987', '%d-%m-%Y') AS "date", str_to_time('11:40', '%H:%M') AS "time", str_to_timestamp('23-09-1987 11:40', '%d-%m-%Y %H:%M') AS "timestamp"; as documented on https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/DateTimeFunctionality returns wrong output for the "time": +------------+----------+----------------------------+ | date | time | timestamp | +============+==========+============================+ | 1987-09-23 | 12:37:12 | 1987-09-23 11:40:00.000000 | +------------+----------+----------------------------+ Expected value 11:40:00 for the "time" column. Reproducible: Always ### Steps to Reproduce: SELECT str_to_date('23-09-1987', '%d-%m-%Y') AS "date", str_to_time('11:40', '%H:%M') AS "time", str_to_timestamp('23-09-1987 11:40', '%d-%m-%Y %H:%M') AS "timestamp"; ### Actual Results: sql>SELECT str_to_date('23-09-1987', '%d-%m-%Y') AS "date", more> str_to_time('11:40', '%H:%M') AS "time", more> str_to_timestamp('23-09-1987 11:40', '%d-%m-%Y %H:%M') AS "timestamp"; +------------+----------+----------------------------+ | date | time | timestamp | +============+==========+============================+ | 1987-09-23 | 12:37:12 | 1987-09-23 11:40:00.000000 | +------------+----------+----------------------------+ 1 tuple sql> ### Expected Results: sql>SELECT str_to_date('23-09-1987', '%d-%m-%Y') AS "date", more> str_to_time('11:40', '%H:%M') AS "time", more> str_to_timestamp('23-09-1987 11:40', '%d-%m-%Y %H:%M') AS "timestamp"; +------------+----------+----------------------------+ | date | time | timestamp | +============+==========+============================+ | 1987-09-23 | 11:40:00 | 1987-09-23 11:40:00.000000 | +------------+----------+----------------------------+ 1 tuple sql> ## Comment 27427 Date: 2019-11-28 17:38:46 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [9e62a1c60d33](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9e62a1c60d33) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=9e62a1c60d33](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=9e62a1c60d33) Changeset description: Add test for bug #6791 ## Comment 27428 Date: 2019-11-28 18:00:48 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [1aab946302bb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1aab946302bb) 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=1aab946302bb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=1aab946302bb) Changeset description: The server crashes on the explain of bug #6791 :( ## Comment 27431 Date: 2019-11-29 10:18:59 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [b7a6fa14bb1e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b7a6fa14bb1e) 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=b7a6fa14bb1e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=b7a6fa14bb1e) Changeset description: Fix for bug #6791, ie make sure struct tm is initialized before using it
str_to_time('11:40', '%H:%M') creates wrong time value
https://api.github.com/repos/MonetDB/MonetDB/issues/6791/comments
0
2020-11-30T16:52:12Z
2024-06-27T13:07:32Z
https://github.com/MonetDB/MonetDB/issues/6791
753,638,986
6,791
[ "MonetDB", "MonetDB" ]
Date: 2019-11-27 10:17:23 +0100 From: @PedroTadim To: SQL devs &lt;<bugs-sql>&gt; Version: -- development Last updated: 2019-12-20 15:36:33 +0100 ## Comment 27420 Date: 2019-11-27 10:17:23 +0100 From: @PedroTadim User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0 Build Identifier: See the reproducible example bellow. I'm going to commit the test in a few minutes. Reproducible: Always ### Steps to Reproduce: 1.CREATE TABLE tab0(col0 INTEGER, col1 INTEGER, col2 INTEGER); 2.INSERT INTO tab0 VALUES (97,1,99), (15,81,47),(87,21,10); 3.SELECT COUNT ( DISTINCT + 45 ) AS col2 FROM tab0; ### Actual Results: 3 ### Expected Results: 1 ## Comment 27421 Date: 2019-11-27 10:42:30 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [6ad525e8e28a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6ad525e8e28a) 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=6ad525e8e28a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=6ad525e8e28a) Changeset description: Added test for bug #6790 ## Comment 27422 Date: 2019-11-27 11:14:24 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [f389a425dd85](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f389a425dd85) 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=f389a425dd85](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=f389a425dd85) Changeset description: Fix for bug #6790. At rel_distinct_aggregate_on_unique_values optimizer, ignore constants because on a column projection they won't be distinct anymore
Count distinct giving wrong results
https://api.github.com/repos/MonetDB/MonetDB/issues/6790/comments
0
2020-11-30T16:52:08Z
2024-06-27T13:07:31Z
https://github.com/MonetDB/MonetDB/issues/6790
753,638,946
6,790
[ "MonetDB", "MonetDB" ]
Date: 2019-11-26 10:33:31 +0100 From: Guillaume de GENTILE &lt;<gentile_g>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.11 (Apr2019-SP1) CC: martin.van.dinther, @PedroTadim Last updated: 2019-12-11 19:22:52 +0100 ## Comment 27417 Date: 2019-11-26 10:33:31 +0100 From: Guillaume de GENTILE &lt;<gentile_g>&gt; User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36 Build Identifier: Hi, I use cast() and str_to_date() functions to convert String to Numeric or Date format. The problem is that the data are loaded from CSV files and the columns I expect to convert do not always contain values (it can be empty/null). Example: COL1 COL2 COL3 ----- ------ ----- AA 12 11/11/2019 BB 14 (empty) CC (empty) 11/11/2019 select COL1, cast(COL2 as DOUBLE) as COL2, str_to_date(COL3, '%d/%m/%Y') as COL3 from ... In this case I get below exceptions: 1) Exception related to the date: java.sql.SQLException: MALException:mtime.str_to_date:format '%m/%d/%Y %H:%M', doesn't match date '' 1) Exception related to the numeric column: java.sql.SQLException: MALException:batcalc.dbl:operation failed It would be very convenient if the functions could return null values instead of throwing exceptions. Regards, Guillaume Reproducible: Always ### Steps to Reproduce: 1. try to cast to DOUBLE a column which contains empty values 2. MonetDB will throw exception: java.sql.SQLException: MALException:batcalc.dbl:operation failed 3. ### Actual Results: MonetDB will throw exception: java.sql.SQLException: MALException:batcalc.dbl:operation failed ### Expected Results: I would expect the result to be null in case of empty values. a possible solution is to assign a default value is content is empty: Example: select COL1, cast((case when COL2='' then '0' else COL2 end) as DOUBLE) as COL2, ... ## Comment 27418 Date: 2019-11-26 15:24:53 +0100 From: @PedroTadim Hello Guillaume, We cannot convert an empty string to a null value, because they are not equivalent, so the exceptions have to be thrown. For your case you can either use the case statement as you said, or in the csv import you can define how null values are represented on the csv file, so you get the expected null values earlier. You can look at it at the documentation of csv import here: https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/CSV_bulk_loads ## Comment 27479 Date: 2019-12-11 19:22:52 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; What you also can do is correct the invalid data, after having imported it from a csv file using: UPDATE tbl SET col2 = NULL WHERE col2 = ''; UPDATE tbl SET col3 = NULL WHERE col3 = ''; Example: CREATE TABLE t6789 (col1 char(2), col2 char(2), col3 char(10)); INSERT INTO t6789 VALUES ('AA', '12', '11/11/2019'), ('BB', '14', ''), ('CC', '', '11/11/2019'); select COL1, cast(COL2 as DOUBLE) as COL2, str_to_date(COL3, '%d/%m/%Y') as COL3 FROM t6789; -- raises error: format '%d/%m/%Y', doesn't match date '' SELECT * FROM t6789 WHERE trim(col1)='' OR trim(col2)='' OR trim(col3)=''; -- 2 rows UPDATE t6789 SET col2 = NULL WHERE col2 IS NOT NULL AND trim(col2) = ''; SELECT * FROM t6789 WHERE trim(col1)='' OR trim(col2)='' OR trim(col3)=''; -- 1 row UPDATE t6789 SET col3 = NULL WHERE col3 IS NOT NULL AND trim(col3) = ''; SELECT * FROM t6789 WHERE trim(col1)='' OR trim(col2)='' OR trim(col3)=''; -- no rows -- now retry your query with cast() and str_to_date() select COL1, cast(COL2 as DOUBLE) as COL2, str_to_date(COL3, '%d/%m/%Y') as COL3 FROM t6789; -- data is shown as desired DROP TABLE t6789;
CAST() or str_to_date() functions do not support empty values
https://api.github.com/repos/MonetDB/MonetDB/issues/6789/comments
0
2020-11-30T16:52:05Z
2024-06-28T10:11:19Z
https://github.com/MonetDB/MonetDB/issues/6789
753,638,910
6,789
[ "MonetDB", "MonetDB" ]
Date: 2019-11-13 16:47:30 +0100 From: Sreejith Sharma &lt;<sreejith.sharma>&gt; To: MonetDB5 devs &lt;<bugs-monetdb5>&gt; Version: 11.33.11 (Apr2019-SP1) CC: @mlkersten Last updated: 2019-11-13 17:08:39 +0100 ## Comment 27407 Date: 2019-11-13 16:47:30 +0100 From: Sreejith Sharma &lt;<sreejith.sharma>&gt; User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36 Build Identifier: When we load data, the database size grows unexpectedly , even for a DML operation or loading data , it grows very high resulting the database to be hung . It resolves only when restart the database .Upon restarting the DB takes a lot of times to restore . Reproducible: Always ### Steps to Reproduce: 1.Bulk Load 2.77045100 records insertion ### Actual Results: DB should run fine during the operation ### Expected Results: The DB went to hung mode . When we load data, the database size grows unexpectedly , even for a DML operation or loading data , it grows very high resulting the database to be hung . It resolves only when restart the database .Upon restarting the DB takes a lot of times to restore . ## Comment 27408 Date: 2019-11-13 17:08:39 +0100 From: @mlkersten Hi, This information is insufficient to claim a bug. It lacks the basic ingredients to be included, as described in https://www.monetdb.org/Developers/ReportingABug You are loading at least 77M records of unknown size (!) using a COPY INTO? If a fatal error occurs, then upon restart the transaction log has to be re-applied and that takes time proportional to the size of the WAL log.
Database Size grows unexpectedly
https://api.github.com/repos/MonetDB/MonetDB/issues/6788/comments
0
2020-11-30T16:52:02Z
2024-06-27T13:07:29Z
https://github.com/MonetDB/MonetDB/issues/6788
753,638,866
6,788
[ "MonetDB", "MonetDB" ]
Date: 2019-11-07 12:37:22 +0100 From: Fabio &lt;<palmaresk8>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.11 (Apr2019-SP1) CC: martin.van.dinther Last updated: 2019-12-11 19:28:59 +0100 ## Comment 27400 Date: 2019-11-07 12:37:22 +0100 From: Fabio &lt;<palmaresk8>&gt; User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36 Build Identifier: The COPY ... ON CLIENT feature of the Apr2019 MonetDB release (11.33.3) is not working on Windows. Given the error message, it seens that the feature is not implemented. (Well, I'm guessing it's a Windows problem since I haven't tried it on Linux). The feature is not working even when the server is started at localhost. Reproducible: Always ### Steps to Reproduce: 1. Start MonetDB server (could be localhost or remote computer, it doesn't matter because the same apply to both situations). 2. Create some dummy table CREATE TABLE xyz (name VARCHAR(255), age INTEGER); 3. Create some dummy file (myfile.txt) name|age Fabio|32 Pedro|14 Silva|80 4. Try to import data from file using COPY ... ON CLIENT COPY 3 RECORDS OFFSET 2 INTO xyz FROM 'C:/Users/Public/Downloads/myfile.txt' ON CLIENT USING DELIMITERS '|', '\n', '"' NULL AS ''; ### Actual Results: client1:!ERROR:MALException:sql.copy_from:cannot transfer files from client ### Expected Results: Table with values. ## Comment 27401 Date: 2019-11-07 12:55:06 +0100 From: @sjoerdmullender Which client are you using? That is kind of important, since the feature requires support from both server and client program. ## Comment 27402 Date: 2019-11-07 15:01:51 +0100 From: Fabio &lt;<palmaresk8>&gt; Ok, this is a good question since I tried to replicate the issue using both DBeaver (using the JDBC Driver) and R (using the MonetDB.R driver) but not mclient. Surprisingly, when I tested the use of COPY ... ON CLIENT in mclient it worked fine both for localhost and for a remote server. Is this feature supposed to work only through mclient? In DBeaver, when I'm at localhost and change the query from ON CLIENT to ON SERVER, the data is loaded into the table. In R I tested this commands: conn = dbConnect( drv = MonetDB.R::MonetDB.R(), host = "localhost", dbname = "ipea", port = 50000L, user = "monetdb", password = "monetdb", timeout = 86400L ) dbSendQuery(conn, "CREATE TABLE xyz (name VARCHAR(255), age INTEGER);") dbSendQuery(conn, "COPY 3 RECORDS OFFSET 2 INTO xyz FROM \'C:/Users/Public/Downloads/myfile.txt\' ON CLIENT USING DELIMITERS \'|\', \'\n\', \'\"\' NULL AS \'\';") The same apply: if I change ON CLIENT to ON SERVER, the data is loaded into the table. ## Comment 27403 Date: 2019-11-07 15:08:52 +0100 From: @sjoerdmullender The feature has only been implemented in mclient. It is possible to implement in other clients, but that hasn't happened as yet. ## Comment 27404 Date: 2019-11-07 18:38:44 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; FYI: I have updated the documentation for COPY INTO commands on: https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/CSV_bulk_loads and https://www.monetdb.org/Documentation/Manuals/SQLreference/SQLSyntaxOverviewCOPY_INTO_FROM It now includes information that the ON CLIENT option is currently only supported by mclient program and not supported in other programs or APIs (ODBC, JDBC, python DBI, etc.). ## Comment 27480 Date: 2019-12-11 19:28:59 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; It is not a bug. Changed it to an enhancement request.
COPY INTO ... ON CLIENT not working on Windows
https://api.github.com/repos/MonetDB/MonetDB/issues/6787/comments
0
2020-11-30T16:51:59Z
2024-06-28T10:11:23Z
https://github.com/MonetDB/MonetDB/issues/6787
753,638,832
6,787
[ "MonetDB", "MonetDB" ]
Date: 2019-11-06 20:36:03 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) Last updated: 2019-11-06 20:36:03 +0100 ## Comment 27399 Date: 2019-11-06 20:36:03 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0 Build Identifier: file sql/scripts/40_json.sql contains: ``` create function json.isvalid(js json) returns bool external name json.isvalid; ``` This function is not useful as a non null JSON object value argument will always return true. It could be replaced with: json_col IS NOT NULL to get the same output as json.isvalid(json_col). The function json.isvalid(js json) could be removed. Reproducible: Always ### Steps to Reproduce: ```sql create table t6786 (v varchar(99), j json); insert into t6786 (v) values (null), (''), ('null'), ('false'), ('true'), ('123'), ('123.45'), ('\"abc123\"'), ('[]'),('{}'), ('[{}]'), ('[{]}'); -- 12 rows inserted select * from t6786 order by v; select * from t6786 where json.isvalid(v) order by v; update t6786 set j = cast(v as json) where json.isvalid(v); select * from t6786 order by v; select * from t6786 where json.isvalid(j) order by v; select v, json.isvalid(v) v_isvalidjson, j, json.isvalid(j) j_isvalidjson, j IS NOT NULL as j_isnotnull from t6786 order by v; drop table t6786; select f.name, f.func, f.mod, f.language, f.type, /* f.side_effect, f.varres, f.vararg, f.schema_id, */ f.system, a.name, a.type, a.type_digits, a.type_scale, a.inout, a.number from sys.functions f join sys.args a on f.id = a.func_id where f.name = 'isvalid'; ``` ### Actual Results: ``` sql>create table t6786 (v varchar(99), j json); operation successful sql>insert into t6786 (v) values (null), (''), ('null'), ('false'), ('true'), more>('123'), ('123.45'), ('\"abc123\"'), ('[]'),('{}'), ('[{}]'), ('[{]}'); 12 affected rows sql>-- 12 rows inserted sql>select * from t6786 order by v; +----------+------+ | v | j | +==========+======+ | null | null | | | null | | "abc123" | null | | 123 | null | | 123.45 | null | | [] | null | | [{]} | null | | [{}] | null | | false | null | | null | null | | true | null | | {} | null | +----------+------+ 12 tuples sql>select * from t6786 where json.isvalid(v) order by v; +------+------+ | v | j | +======+======+ | [] | null | | [{}] | null | | {} | null | +------+------+ 3 tuples sql>update t6786 set j = cast(v as json) where json.isvalid(v); 3 affected rows sql>select * from t6786 order by v; +----------+------+ | v | j | +==========+======+ | null | null | | | null | | "abc123" | null | | 123 | null | | 123.45 | null | | [] | [] | | [{]} | null | | [{}] | [{}] | | false | null | | null | null | | true | null | | {} | {} | +----------+------+ 12 tuples sql>select * from t6786 where json.isvalid(j) order by v; +------+------+ | v | j | +======+======+ | [] | [] | | [{}] | [{}] | | {} | {} | +------+------+ 3 tuples sql>select v, json.isvalid(v) v_isvalidjson, j, json.isvalid(j) j_isvalidjson, j IS NOT NULL as j_isnotnull from t6786 order by v; +----------+---------------+------+---------------+-------------+ | v | v_isvalidjson | j | j_isvalidjson | j_isnotnull | +==========+===============+======+===============+=============+ | null | false | null | false | false | | | false | null | false | false | | "abc123" | false | null | false | false | | 123 | false | null | false | false | | 123.45 | false | null | false | false | | [] | true | [] | true | true | | [{]} | false | null | false | false | | [{}] | true | [{}] | true | true | | false | false | null | false | false | | null | false | null | false | false | | true | false | null | false | false | | {} | true | {} | true | true | +----------+---------------+------+---------------+-------------+ 12 tuples sql>drop table t6786; operation successful sql> sql>select f.name, f.func, f.mod, f.language, f.type, /* f.side_effect, f.varres, f.vararg, f.schema_id, */ more>f.system, a.name, a.type, a.type_digits, a.type_scale, a.inout, a.number more>from sys.functions f join sys.args a on f.id = a.func_id where f.name = 'isvalid'; +---------+--------------------------------------------------------+------+------+------+-------+--------+---------+------+------+------+------+ | name | func | mod | lang | type | syste | name | type | type | type | inou | numb | : : : : uage : : m : : : _dig : _sca : t : er : : : : : : : : : : its : le : : : +=========+========================================================+======+======+======+=======+========+=========+======+======+======+======+ | isvalid | create function json.isvalid(js string) | json | 1 | 1 | true | js | clob | 0 | 0 | 1 | 1 | : : returns bool external name json.isvalid; : : : : : : : : : : : | isvalid | create function json.isvalid(js string) | json | 1 | 1 | true | result | boolean | 1 | 0 | 0 | 0 | : : returns bool external name json.isvalid; : : : : : : : : : : : | isvalid | create function json.isvalid(js json) | json | 1 | 1 | true | js | json | 0 | 0 | 1 | 1 | : : returns bool external name json.isvalid; : : : : : : : : : : : | isvalid | create function json.isvalid(js json) | json | 1 | 1 | true | result | boolean | 1 | 0 | 0 | 0 | : : returns bool external name json.isvalid; : : : : : : : : : : : +---------+--------------------------------------------------------+------+------+------+-------+--------+---------+------+------+------+------+ 4 tuples sql> ``` The file sql/scripts/40_json.sql also contains: ``` create function json.isvalid(js string) returns bool external name json.isvalid; ``` which is useful to test character strings before converting them to a json type.
function json.isvalid(js json) is not useful, could be removed
https://api.github.com/repos/MonetDB/MonetDB/issues/6786/comments
0
2020-11-30T16:51:57Z
2024-06-27T13:07:27Z
https://github.com/MonetDB/MonetDB/issues/6786
753,638,792
6,786
[ "MonetDB", "MonetDB" ]
Date: 2019-11-06 19:34:54 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) Last updated: 2020-06-03 16:58:54 +0200 ## Comment 27398 Date: 2019-11-06 19:34:54 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0 Build Identifier: In file sql/scripts/12_url.sql function isurl() is declared as: CREATE function isaURL(theUrl url) RETURNS BOOL EXTERNAL NAME url."isaURL"; This probably should have been: CREATE function isaURL(theUrl string) RETURNS BOOL EXTERNAL NAME url."isaURL"; so a string argument type instead of a url argument type, as it makes no sense to test a url value whether it is a url value (it is always true by definition). It does make sense to test a string value on whether it is a valid url value. Reproducible: Always ### Steps to Reproduce: create table t6785 (v varchar(99), u url); insert into t6785 (v) values (null), ('http'), ('http:'), ('https:'), ('ftp:'), ('ftp:/'), ('www.a.com'), ('monetdb:org'), ('www.monetdb.org'), ('http://www.example.com/index.html'), ('mailto:someone@example.com'), ('jdbc:monetdb;//localhost'); select * from t6785 order by v; select * from t6785 where sys.isaurl(v) order by v; update t6785 set u = cast(v as url) where sys.isaurl(v); select * from t6785 order by v; select * from t6785 where sys.isaurl(u) order by v; drop table t6785; select f.name, f.func, f.mod, f.language, f.type, /* f.side_effect, f.varres, f.vararg, f.schema_id, */ f.system, a.name, a.type, a.type_digits, a.type_scale, a.inout, a.number from sys.functions f join sys.args a on f.id = a.func_id where f.name = 'isaurl'; ### Actual Results: sql>create table t6785 (v varchar(99), u url); operation successful sql>insert into t6785 (v) values (null), ('http'), ('http:'), ('https:'), ('ftp:'), ('ftp:/'), more>('www.a.com'), ('monetdb:org'), ('www.monetdb.org'), ('http://www.example.com/index.html'), more>('mailto:someone@example.com'), ('jdbc:monetdb;//localhost'); 12 affected rows sql>select * from t6785 order by v; +-----------------------------------+---------------------------------------------------------------------------------------+ | v | u | +===================================+=======================================================================================+ | null | null | | ftp: | null | | ftp:/ | null | | http | null | | http: | null | | http://www.example.com/index.html | null | | https: | null | | jdbc:monetdb;//localhost | null | | mailto:someone@example.com | null | | monetdb:org | null | | www.a.com | null | | www.monetdb.org | null | +-----------------------------------+---------------------------------------------------------------------------------------+ 12 tuples sql>select * from t6785 where sys.isaurl(v) order by v; +-----------------------------------+---------------------------------------------------------------------------------------+ | v | u | +===================================+=======================================================================================+ | ftp: | null | | ftp:/ | null | | http: | null | | http://www.example.com/index.html | null | | https: | null | | jdbc:monetdb;//localhost | null | | mailto:someone@example.com | null | | monetdb:org | null | +-----------------------------------+---------------------------------------------------------------------------------------+ 8 tuples sql>update t6785 set u = cast(v as url) where sys.isaurl(v); 8 affected rows sql>select * from t6785 order by v; +-----------------------------------+-----------------------------------+ | v | u | +===================================+===================================+ | null | null | | ftp: | ftp: | | ftp:/ | ftp:/ | | http | null | | http: | http: | | http://www.example.com/index.html | http://www.example.com/index.html | | https: | https: | | jdbc:monetdb;//localhost | jdbc:monetdb;//localhost | | mailto:someone@example.com | mailto:someone@example.com | | monetdb:org | monetdb:org | | www.a.com | null | | www.monetdb.org | null | +-----------------------------------+-----------------------------------+ 12 tuples sql>select * from t6785 where sys.isaurl(u) order by v; +-----------------------------------+-----------------------------------+ | v | u | +===================================+===================================+ | ftp: | ftp: | | ftp:/ | ftp:/ | | http: | http: | | http://www.example.com/index.html | http://www.example.com/index.html | | https: | https: | | jdbc:monetdb;//localhost | jdbc:monetdb;//localhost | | mailto:someone@example.com | mailto:someone@example.com | | monetdb:org | monetdb:org | +-----------------------------------+-----------------------------------+ 8 tuples sql>drop table t6785; operation successful sql> sql>select f.name, f.func, f.mod, f.language, f.type, /* f.side_effect, f.varres, f.vararg, f.schema_id, */ more>f.system, a.name, a.type, a.type_digits, a.type_scale, a.inout, a.number more>from sys.functions f join sys.args a on f.id = a.func_id where f.name = 'isaurl'; +--------+---------------------------------------------------------+------+------+------+-------+--------+---------+------+------+------+------+ | name | func | mod | lang | type | syste | name | type | type | type | inou | numb | : : : : uage : : m : : : _dig : _sca : t : er : : : : : : : : : : its : le : : : +========+=========================================================+======+======+======+=======+========+=========+======+======+======+======+ | isaurl | create function isaurl(theurl url) returns bool | url | 1 | 1 | true | result | boolean | 1 | 0 | 0 | 0 | : : external name url."isaURL"; : : : : : : : : : : : | isaurl | create function isaurl(theurl url) returns bool | url | 1 | 1 | true | theurl | url | 0 | 0 | 1 | 1 | : : external name url."isaURL"; : : : : : : : : : : : +--------+---------------------------------------------------------+------+------+------+-------+--------+---------+------+------+------+------+ 2 tuples sql> ### Expected Results: sql>select f.name, f.func, f.mod, f.language, f.type, /* f.side_effect, f.varres, f.vararg, f.schema_id, */ more>f.system, a.name, a.type, a.type_digits, a.type_scale, a.inout, a.number more>from sys.functions f join sys.args a on f.id = a.func_id where f.name = 'isaurl'; +--------+---------------------------------------------------------+------+------+------+-------+--------+---------+------+------+------+------+ | name | func | mod | lang | type | syste | name | type | type | type | inou | numb | : : : : uage : : m : : : _dig : _sca : t : er : : : : : : : : : : its : le : : : +========+=========================================================+======+======+======+=======+========+=========+======+======+======+======+ | isaurl | create function isaurl(theurl string) returns bool | url | 1 | 1 | true | result | boolean | 1 | 0 | 0 | 0 | : : external name url."isaURL"; : : : : : : : : : : : | isaurl | create function isaurl(theurl string) returns bool | url | 1 | 1 | true | theurl | clob | 0 | 0 | 1 | 1 | : : external name url."isaURL"; : : : : : : : : : : : +--------+---------------------------------------------------------+------+------+------+-------+--------+---------+------+------+------+------+ 2 tuples sql> ## Comment 27506 Date: 2020-01-03 14:22:44 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [f90d24a8ac52](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f90d24a8ac52) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=f90d24a8ac52](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=f90d24a8ac52) Changeset description: Change function sys.isaurl to accept string instead of url. This fixes bug #6785.
function sys.isaURL(url) should have been declared as sys.isaURL(string)
https://api.github.com/repos/MonetDB/MonetDB/issues/6785/comments
0
2020-11-30T16:51:54Z
2024-06-27T13:07:26Z
https://github.com/MonetDB/MonetDB/issues/6785
753,638,757
6,785
[ "MonetDB", "MonetDB" ]
Date: 2019-11-06 16:48:41 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) CC: @kutsurak Last updated: 2019-11-28 10:00:05 +0100 ## Comment 27397 Date: 2019-11-06 16:48:41 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0 Build Identifier: function sys.isauuid(str) return boolean can be used to test whether the string argument represents a valid UUID string. However it reports a GDK error if the str argument is not a valid UUID string! Expected to return false instead of an error as it is a test function, similar to sys.isaurl(str). Reproducible: Always ### Steps to Reproduce: -- examples which return errors, but should have returned false select isauuid('this is not a uuid'); -- returns: GDK reported error: Syntax error in UUID. expected false select isauuid(''); -- returns: GDK reported error: Syntax error in UUID. expected false select isauuid(4); -- returns: GDK reported error: Syntax error in UUID. expected false select isauuid('XYZaee1a538-aca1-381b-d9f4-8c29ef3f5'); -- returns: GDK reported error: Syntax error in UUID. expected false -- some tests which return correct output select isauuid(uuid()); -- returns true select isauuid('aee1a538-aca1-381b-d9f4-8c29ef3f5f34'); -- returns true select isauuid('AEE1A538-ACA1-381B-D9F4-8C29EF3F5F34'); -- returns true select isauuid(null); -- returns false select cast('aee1a538-aca1-381b-d9f4-8c29ef3f5f34' as uuid); select cast('AEE1A538-ACA1-381B-D9F4-8C29EF3F5F34' as uuid); -- test which correctly returns an error select cast('XYZaee1a538-aca1-381b-d9f4-8c29ef3f5' as uuid); -- returns: Not a UUID ### Actual Results: sql>-- examples which return errors, but should have returned false sql>select isauuid('this is not a uuid'); GDK reported error: Syntax error in UUID. sql>-- returns: GDK reported error: Syntax error in UUID. expected false sql>select isauuid(''); GDK reported error: Syntax error in UUID. sql>-- returns: GDK reported error: Syntax error in UUID. expected false sql>select isauuid(4); GDK reported error: Syntax error in UUID. sql>-- returns: GDK reported error: Syntax error in UUID. expected false sql>select isauuid('XYZaee1a538-aca1-381b-d9f4-8c29ef3f5'); GDK reported error: Syntax error in UUID. sql>-- returns: GDK reported error: Syntax error in UUID. expected false sql> sql>-- some tests which return correct output sql>select isauuid(uuid()); +-------+ | L2 | +=======+ | true | +-------+ 1 tuple sql>-- returns true sql>select isauuid('aee1a538-aca1-381b-d9f4-8c29ef3f5f34'); +-------+ | L2 | +=======+ | true | +-------+ 1 tuple sql>-- returns true sql>select isauuid('AEE1A538-ACA1-381B-D9F4-8C29EF3F5F34'); +-------+ | L2 | +=======+ | true | +-------+ 1 tuple sql>-- returns true sql>select isauuid(null); +-------+ | L2 | +=======+ | false | +-------+ 1 tuple sql>-- returns false sql>select cast('aee1a538-aca1-381b-d9f4-8c29ef3f5f34' as uuid); +--------------------------------------+ | L2 | +======================================+ | aee1a538-aca1-381b-d9f4-8c29ef3f5f34 | +--------------------------------------+ 1 tuple sql>select cast('AEE1A538-ACA1-381B-D9F4-8C29EF3F5F34' as uuid); +--------------------------------------+ | L2 | +======================================+ | aee1a538-aca1-381b-d9f4-8c29ef3f5f34 | +--------------------------------------+ 1 tuple sql> sql>-- test which correctly returns an error sql>select cast('XYZaee1a538-aca1-381b-d9f4-8c29ef3f5' as uuid); Not a UUID sql>-- returns: Not a UUID sql> ### Expected Results: first 4 queries should have returned "false" instead of "GDK reported error: Syntax error in UUID." ## Comment 27405 Date: 2019-11-12 13:20:15 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [ed5e115fce8c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ed5e115fce8c) made by Panagiotis Koutsourakis <kutsurak@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=ed5e115fce8c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=ed5e115fce8c) Changeset description: Add test for bug #6784 ## Comment 27406 Date: 2019-11-12 13:20:19 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [0f82f07884db](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0f82f07884db) made by Panagiotis Koutsourakis <kutsurak@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=0f82f07884db](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=0f82f07884db) Changeset description: UUIDfromString should not produce a GDKError This fixes bug #6784
function sys.isauuid(string) should return false if string value cannot be converted to a UUID
https://api.github.com/repos/MonetDB/MonetDB/issues/6784/comments
0
2020-11-30T16:51:50Z
2024-06-27T13:07:25Z
https://github.com/MonetDB/MonetDB/issues/6784
753,638,714
6,784
[ "MonetDB", "MonetDB" ]
Date: 2019-11-05 17:25:12 +0100 From: @yzchang To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.11 (Apr2019-SP1) CC: @PedroTadim Last updated: 2019-11-28 10:00:03 +0100 ## Comment 27393 Date: 2019-11-05 17:25:12 +0100 From: @yzchang User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.1 Safari/605.1.15 Build Identifier: With the following queries, the first SELECT (i.e. without AVG) returns 175.000, while the second SELECT (i.e. with AVG) returns 175000. AVG has silently changed the scale of its return value here. It should return 175 (i.e. 1.75e2), not 175000 (i.e. 1.75e5). sql>CREATE TABLE ts (t TIMESTAMP); operation successful sql>INSERT INTO ts values ('1970-01-01 00:02:55.000000'); 1 affected row sql>select t - SYS.STR_TO_TIMESTAMP('0', '%s') from ts; +---------+ | L1 | +=========+ | 175.000 | +---------+ 1 tuple sql>select avg(t - SYS.STR_TO_TIMESTAMP('0', '%s')) from ts; +--------------------------+ | L2 | +==========================+ | 1.75e+05 | +--------------------------+ 1 tuple This silent change of scale doesn't happen with all data types, e.g.: sql>create table t (i decimal(8,3)); operation successful sql>insert into t values (175); 1 affected row sql>select * from t; +------------+ | i | +============+ | 175.000 | +------------+ 1 tuple sql>select avg(i) from t; +--------------------------+ | L3 | +==========================+ | 175 | +--------------------------+ 1 tuple Reproducible: Always ## Comment 27394 Date: 2019-11-05 17:32:12 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [cbb14cfab751](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cbb14cfab751) made by Ying Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=cbb14cfab751](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=cbb14cfab751) Changeset description: Added test for Bug #6783 ## Comment 27395 Date: 2019-11-06 09:56:25 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [f445d2949471](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f445d2949471) 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=f445d2949471](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=f445d2949471) Changeset description: Several changes: -Removed 'avg' window function aggregate with sec_interval as input, derived from the respective aggregate being removed. -Added SYS.STR_TO_TIMESTAMP('0', '%s') call back in bug #6783 test, because it's failing on Windows. -Approved tests from recent changes. ## Comment 27396 Date: 2019-11-06 15:30:37 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [fbdb41cd5249](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fbdb41cd5249) 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=fbdb41cd5249](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=fbdb41cd5249) Changeset description: Fix for bug #6783 on Windows. Added missing '%s' case at Windows port of strptime function
AVG changes scale of its results
https://api.github.com/repos/MonetDB/MonetDB/issues/6783/comments
0
2020-11-30T16:51:47Z
2024-06-27T13:07:24Z
https://github.com/MonetDB/MonetDB/issues/6783
753,638,677
6,783
[ "MonetDB", "MonetDB" ]
Date: 2019-11-04 20:17:41 +0100 From: WARREN MASTER &lt;<warren.master>&gt; To: clients devs &lt;<bugs-clients>&gt; Version: 11.33.11 (Apr2019-SP1) CC: @PedroTadim Last updated: 2019-11-07 15:34:44 +0100 ## Comment 27389 Date: 2019-11-04 20:17:41 +0100 From: WARREN MASTER &lt;<warren.master>&gt; User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/18.17763 Build Identifier: we use IsValid(3) to test for valid connections on our pool as we don't want to wait indefinitely for a down conneciton. IsValid(3) sets the timeout when it executes select 1 and resets the timeout on the statement object , but becuase there is no execute the timeout on the query remains at 3 in this example Reproducible: Always ## Comment 27390 Date: 2019-11-05 14:50:25 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset 48ee2ca98975, made by Pedro Ferreira <pedro.ferreira@monetdbsolutions.com> in the monetdb-java repo, refers to this bug. For complete details, see https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=48ee2ca98975 Changeset description: Added test and fix for bug #6782, ie set the connection's query timeout explicitly at the end of isValid method. The previous value must be set whenever the an exception is thrown or not during the method. ## Comment 27391 Date: 2019-11-05 14:53:32 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [852f8b1c25ca](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=852f8b1c25ca) 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=852f8b1c25ca](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=852f8b1c25ca) Changeset description: Added test and output for bug #6782
JDBC IsValid(int) does not reset lastquerytimeout on server
https://api.github.com/repos/MonetDB/MonetDB/issues/6782/comments
0
2020-11-30T16:51:44Z
2024-06-27T13:07:22Z
https://github.com/MonetDB/MonetDB/issues/6782
753,638,650
6,782
[ "MonetDB", "MonetDB" ]
Date: 2019-11-04 09:25:16 +0100 From: @PedroTadim To: SQL devs &lt;<bugs-sql>&gt; Version: -- development Last updated: 2020-01-02 18:04:04 +0100 ## Comment 27387 Date: 2019-11-04 09:25:16 +0100 From: @PedroTadim User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87 Safari/537.36 Build Identifier: This bug comes from a user into users-list, create a table, then two indexes on column, then an insert, causes the server to crash. Reproducible: Always ### Steps to Reproduce: 1. Create table a(a int, b int, id bigserial); 2. Create ordered index a_pk on a(id); 3. Create index a_idx1 on a(a); 4. Insert into a(a) values(1); ### Actual Results: SIGSEV ### Expected Results: Successful insert. ## Comment 27388 Date: 2019-11-04 09:28:40 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [6fc5137b678d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6fc5137b678d) 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=6fc5137b678d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=6fc5137b678d) Changeset description: Added test for bug #6781 ## Comment 27392 Date: 2019-11-05 17:00:01 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [cd153742f6d4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cd153742f6d4) 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=cd153742f6d4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=cd153742f6d4) Changeset description: Added fix for bug #6781, ie, don't attempt to insert/update on indexes without delta structures ## Comment 27505 Date: 2020-01-02 18:04:04 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [5a1607486f7c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5a1607486f7c) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=5a1607486f7c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=5a1607486f7c) Changeset description: Extend index-insert-crash.Bug-6781 test also with imprints index, which also has no delta structure.
Insert after index creation crash
https://api.github.com/repos/MonetDB/MonetDB/issues/6781/comments
0
2020-11-30T16:51:41Z
2024-06-27T13:07:21Z
https://github.com/MonetDB/MonetDB/issues/6781
753,638,618
6,781
[ "MonetDB", "MonetDB" ]
Date: 2019-10-24 12:28:31 +0200 From: Manuel &lt;<manuel>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.11 (Apr2019-SP1) CC: @PedroTadim Last updated: 2019-11-28 10:00:03 +0100 ## Comment 27381 Date: 2019-10-24 12:28:31 +0200 From: Manuel &lt;<manuel>&gt; User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36 Build Identifier: I have attach the SQL to create the table referenced in the queries. The query select *, rank() over (partition by "c2_h_field_2" order by "count_1" desc) as "RANK" from ( select count(*) as "count_1", ((floor(((floor(extract(month from "Field 2")) - 1) / 6.0)) * 6.0) + 1) as "c2_h_field_2", "Ticker" from "BondPricesWithNulls" where "Ticker" is not null group by "c2_h_field_2", "Ticker" ) as "t0" where "c2_h_field_2" is null order by "count_1" desc returns count_1 c2_h_field_2 Ticker RANK ------------------------------------------------- 8 <null> HBOS 1 5 <null> EIB 1 5 <null> KFW 1 5 <null> RBS 1 4 <null> HSBC 1 3 <null> PRUFIN 1 ... ... ... The value yield by rank is wrong, and in this particular query it should reflect the value of "count". By replacing the expression used in the "group by" clause with a field: select *, rank() over (partition by "c2_h_field_2" order by "count_1" desc) as "RANK" from ( select count(*) as "count_1", --((floor(((floor(extract(month from "Field 2")) - 1) / 6.0)) * 6.0) + 1) as "c2_h_field_2", "Field 2" as "c2_h_field_2", "Ticker" from "BondPricesWithNulls" where "Ticker" is not null group by "c2_h_field_2", "Ticker" ) as "t0" where "c2_h_field_2" is null order by "count_1" desc I get count_1 c2_h_field_2 Ticker RANK --------------------------------------------------- 8 <null> HBOS 1 5 <null> EIB 2 5 <null> KFW 2 5 <null> RBS 2 4 <null> HSBC 5 3 <null> PRUFIN 6 ... ... ... which is what I expected (and what the behaviour was in older versions of monetdb: last tested on 11.29.7). Reproducible: Always ### Steps to Reproduce: 1. Import table attached 2. Run queries in the description ### Actual Results: count_1 c2_h_field_2 Ticker RANK ------------------------------------------------- 8 <null> HBOS 1 5 <null> EIB 1 5 <null> KFW 1 5 <null> RBS 1 4 <null> HSBC 1 3 <null> PRUFIN 1 ... ### Expected Results: count_1 c2_h_field_2 Ticker RANK --------------------------------------------------- 8 <null> HBOS 1 5 <null> EIB 2 5 <null> KFW 2 5 <null> RBS 2 4 <null> HSBC 5 3 <null> PRUFIN 6 .... ## Comment 27382 Date: 2019-10-24 12:29:06 +0200 From: Manuel &lt;<manuel>&gt; Created attachment 637 Sql to create tables used in the queries. > Attached file: [bpwn.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6780_bpwn.sql_637) (application/octet-stream, 434082 bytes) > Description: Sql to create tables used in the queries. ## Comment 27383 Date: 2019-10-24 18:14:50 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [982ddeda4aa1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=982ddeda4aa1) 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=982ddeda4aa1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=982ddeda4aa1) Changeset description: Test and fixes for bug #6780. We use NaN for null floating-point values, so be carefull with floating-point comparisons ## Comment 27410 Date: 2019-11-14 13:58:31 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [2ad260d4df96](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2ad260d4df96) 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=2ad260d4df96](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=2ad260d4df96) Changeset description: Use csv import at bug #6780 test
Wrong value of the rank function
https://api.github.com/repos/MonetDB/MonetDB/issues/6780/comments
0
2020-11-30T16:51:39Z
2024-06-27T13:07:20Z
https://github.com/MonetDB/MonetDB/issues/6780
753,638,594
6,780
[ "MonetDB", "MonetDB" ]
Date: 2019-10-23 08:20:27 +0200 From: daniel.zvinca To: GDK devs &lt;<bugs-common>&gt; Version: 11.33.3 (Apr2019) Last updated: 2019-11-28 10:00:03 +0100 ## Comment 27378 Date: 2019-10-23 08:20:27 +0200 From: daniel.zvinca User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36 Build Identifier: During a complex join between two tables that involve an OR operation, I received the following error message: !OS: The printer is out of paper. This corresponds to error number 28 in Windows OS, yet in errno.h, 28 is for ENOSPC, which is the expected one. Reproducible: Always ### Steps to Reproduce: My quick fix was to return the error code unchanged in winerror function (mutils.c). But I can't be sure that this doesn't mess up with some other cases. ## Comment 27385 Date: 2019-10-31 13:29:40 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [b3190f961601](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b3190f961601) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=b3190f961601](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=b3190f961601) Changeset description: Try not to confuse Windows and Unix error numbers. Use GDKsyserror exclusively for errno-based errors, and introduce GDKwinerror for errors obtained with GetLastError(). This should fix bug #6779. ## Comment 27386 Date: 2019-10-31 13:31:14 +0100 From: @sjoerdmullender Should be fixed now for the upcoming release. If not, please reopen.
Using Windows Messages translation for errno error codes.
https://api.github.com/repos/MonetDB/MonetDB/issues/6779/comments
0
2020-11-30T16:51:36Z
2024-06-27T13:07:19Z
https://github.com/MonetDB/MonetDB/issues/6779
753,638,561
6,779
[ "MonetDB", "MonetDB" ]
Date: 2019-10-22 00:07:17 +0200 From: Olaf Flaschel &lt;<olaf.flaschel>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) CC: @PedroTadim Last updated: 2019-10-22 12:55:22 +0200 ## Comment 27373 Date: 2019-10-22 00:07:17 +0200 From: Olaf Flaschel &lt;<olaf.flaschel>&gt; User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0 Build Identifier: NOT IN gives wrong result when a null value is in result set of NOT IN SELECT clause. Here an example using mclient: sql>create temp table tmp_test as select 1 as c1 union select 2 as c1 union select 3 as c1 on commit preserve rows; operation successful sql>select * from tmp_test where c1 not in (select 1 union select 2 union select null); +----+ | c1 | +====+ +----+ Reproducible: Always ### Steps to Reproduce: 1. sql>create temp table tmp_test as select 1 as c1 union select 2 as c1 union select 3 as c1 on commit preserve rows; 2. sql>select * from tmp_test where c1 not in (select 1 union select 2 union select null); ### Actual Results: +----+ | c1 | +====+ +----+ 0 tuples ### Expected Results: +------+ | c1 | +======+ | 3 | +------+ 1 tuple MonetDB 5 server 11.33.3 (Apr2019) (64-bit, 128-bit integers) Copyright (c) 1993 - July 2008 CWI Copyright (c) August 2008 - 2019 MonetDB B.V., all rights reserved Visit https://www.monetdb.org/ for further information Found 125.8GiB available memory, 48 available cpu cores Libraries: libpcre: 8.39 2016-06-14 openssl: OpenSSL 1.1.1 11 Sep 2018 (compiled with OpenSSL 1.1.0g 2 Nov 2017) libxml2: 2.9.4 Compiled by: pbuilder@dev.monetdb.org (x86_64-pc-linux-gnu) Compilation: gcc -O3 -fomit-frame-pointer -pipe -fdebug-prefix-map=/build/monetdb-11.33.3=. -fstack-protector-strong -Wformat -Werror=format-security -g -D_FORTIFY_SOURCE=2 Linking : /usr/bin/x86_64-linux-gnu-ld -m elf_x86_64 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions ## Comment 27374 Date: 2019-10-22 09:14:52 +0200 From: @PedroTadim Hello Olaf, I looked at your example and I think you are wrong. The tmp_test table has 3 rows with values: 1,2,3. Now we check for their presence in the set: 1,2,NULL. Both 1 and 2 exist, so the "not in" doesn't give a match, and for 3, the result is NULL, because there is a NULL value in the testing set. Then for the result of the where clause, because there's no "true" value, no rows match. ## Comment 27376 Date: 2019-10-22 10:34:03 +0200 From: Olaf Flaschel &lt;<olaf.flaschel>&gt; (In reply to Pedro Ferreira from comment 1) > Hello Olaf, I looked at your example and I think you are wrong. The tmp_test > table has 3 rows with values: 1,2,3. Now we check for their presence in the > set: 1,2,NULL. Both 1 and 2 exist, so the "not in" doesn't give a match, and > for 3, the result is NULL, because there is a NULL value in the testing set. > Then for the result of the where clause, because there's no "true" value, no > rows match. Hello Pedro, you are right. I think it was a misunderstanding from my side regarding the meaning of NULL. I should have done some more research before filing a bug. Feel free to close this issue.
NOT IN gives wrong result when null is in result set
https://api.github.com/repos/MonetDB/MonetDB/issues/6778/comments
0
2020-11-30T16:51:33Z
2024-06-28T13:09:12Z
https://github.com/MonetDB/MonetDB/issues/6778
753,638,528
6,778
[ "MonetDB", "MonetDB" ]
Date: 2019-10-21 23:47:51 +0200 From: Olaf Flaschel &lt;<olaf.flaschel>&gt; To: clients devs &lt;<bugs-clients>&gt; Version: 11.33.3 (Apr2019) CC: @PedroTadim Last updated: 2020-11-13 15:23:30 +0100 ## Comment 27372 Date: 2019-10-21 23:47:51 +0200 From: Olaf Flaschel &lt;<olaf.flaschel>&gt; User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0 Build Identifier: We use the msqldump client routinely to create backups of our databases. When the databases attain a certain size (500G in our case) the msqldump tool only creates incomplete SQL dumps. This can be checked by looking for the string 'COMMIT;' at the end of the file. If it is missing the backup is incomplete. We use following command line to create our backups: msqldump -d testdb | gzip > testdb_backup_msqldump.gz After realizing that the mclient client has the same functionality I tried the same with mclient: mclient -d testdb --dump | gzip > testdb_backup_mclient.gz This time the backup was complete. After this I compared the source code of msqldump and mclient and found a difference. msqldump calls the function mapi_cache_limit with -1 as second parameter whereas msqldump calls the function with 10000 as second parameter. I patched my version of msqldump replacing 10000 by -1 and tested it with the same database and was able to create a complete SQL dump. This issue is rather ugly because no error message is printed and no error code is returned by msqldump. As a workaround mclient can be used to create a SQL dump. Reproducible: Always ### Steps to Reproduce: 1. Create database with more than 500G. 2. Create SQL dump with msqldump (msqldump -d testdb | gzip > testdb_backup.gz) 3. Check for line 'COMMIT;' at end of file (zcat testdb_backup.gz | tail) ### Actual Results: Incomplete SQL dump without 'COMMIT;' line at the end. ### Expected Results: Complete SQL dump with 'COMMIT;' line at the end. MonetDB 5 server 11.33.3 (Apr2019) (64-bit, 128-bit integers) Copyright (c) 1993 - July 2008 CWI Copyright (c) August 2008 - 2019 MonetDB B.V., all rights reserved Visit https://www.monetdb.org/ for further information Found 125.8GiB available memory, 48 available cpu cores Libraries: libpcre: 8.39 2016-06-14 openssl: OpenSSL 1.1.1 11 Sep 2018 (compiled with OpenSSL 1.1.0g 2 Nov 2017) libxml2: 2.9.4 Compiled by: pbuilder@dev.monetdb.org (x86_64-pc-linux-gnu) Compilation: gcc -O3 -fomit-frame-pointer -pipe -fdebug-prefix-map=/build/monetdb-11.33.3=. -fstack-protector-strong -Wformat -Werror=format-security -g -D_FORTIFY_SOURCE=2 Linking : /usr/bin/x86_64-linux-gnu-ld -m elf_x86_64 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions ## Comment 27377 Date: 2019-10-22 12:05:16 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [16e83e28bd2b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=16e83e28bd2b) 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=16e83e28bd2b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=16e83e28bd2b) Changeset description: Partial fixes for bug #6777, ie, be carefull if many mapi_fetch_row calls are made, the previously fetched values might get invalidated by the cache, so look for nested mapi_fetch_row calls ## Comment 27379 Date: 2019-10-23 11:21:22 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [c0c6d5923fa1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c0c6d5923fa1) 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=c0c6d5923fa1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=c0c6d5923fa1) Changeset description: Tests approval and increasd timeout for bug #6777's test to 3 minutes ## Comment 27438 Date: 2019-12-02 11:37:36 +0100 From: Olaf Flaschel &lt;<olaf.flaschel>&gt; I had some time to further investigate this issue. I found some messages with dmesg reporting segmentation faults for mserver5: [Thu Sep 26 03:21:46 2019] mserver5[9488]: segfault at 7f185e62c680 ip 00007f7952588790 sp 00007f7874203878 error 4 in libbat.so.18.0.1[7f795219b000+56f000] [Sat Sep 28 08:32:01 2019] mserver5[26252]: segfault at 7ef755d2c680 ip 00007f27361e6790 sp 00007f26565f1878 error 4 in libbat.so.18.0.1[7f2735df9000+56f000] [Mon Sep 30 22:12:49 2019] mserver5[6215]: segfault at 7f00a1fcc680 ip 00007f3785a3f790 sp 00007f3720be4878 error 4 in libbat.so.18.0.1[7f3785652000+56f000] [Thu Oct 3 04:56:44 2019] mserver5[48118]: segfault at 7fa4b161c680 ip 00007fe0c617f790 sp 00007fe0bb078878 error 4 in libbat.so.18.0.1[7fe0c5d92000+56f000] All of these segmentation faults occured when we tried to make a backup with msqldump and the resulting backup was incomplete. I tried to find out where in libbat.so it breaks: addr2line -e /usr/lib/x86_64-linux-gnu/libbat.so.18.0.1 -fCi 0x3ed790 GDKmmap ??:? So the issue doesn't seem to be directly related to the mapi cache although doing the backups with mclient still works. I will try the new November Release to check if the problem persists with newer versions of the MonetDB software. ## Comment 27457 Date: 2019-12-06 15:04:03 +0100 From: @sjoerdmullender There seem to be two issues here. 1. msqldump should not use a cache limit of 10000 but -1. The limit is for the case when there are multiple concurrent queries on the same connection, but that is not the case here. 2. The server can run out of resources when a limit is set since it needs to hold on to the result sets until the client tells the server it is done with them. Of course, the server shouldn't crash but report an error if it runs out of resources. ## Comment 27458 Date: 2019-12-06 15:04:27 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [838d7af08408](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=838d7af08408) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=838d7af08408](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=838d7af08408) Changeset description: Set cache limit for dump to infinite (aka -1). The limit should be less than infinite if there are multiple concurrent queries on the connection, but that is not the case in msqldump. This should fix bug #6777. ## Comment 27470 Date: 2019-12-10 09:42:31 +0100 From: Olaf Flaschel &lt;<olaf.flaschel>&gt; (In reply to Sjoerd Mullender from comment 4) > There seem to be two issues here. > 1. msqldump should not use a cache limit of 10000 but -1. The limit is for > the case when there are multiple concurrent queries on the same connection, > but that is not the case here. Just for interest is there a performance penalty not using the cache limit of 10000? > 2. The server can run out of resources when a limit is set since it needs to > hold on to the result sets until the client tells the server it is done with > them. > > Of course, the server shouldn't crash but report an error if it runs out of > resources. Should I file a separate bug for the segmentation fault? ## Comment 27471 Date: 2019-12-10 11:24:46 +0100 From: @sjoerdmullender (In reply to Olaf Flaschel from comment 6) > (In reply to Sjoerd Mullender from comment 4) > > There seem to be two issues here. > > 1. msqldump should not use a cache limit of 10000 but -1. The limit is for > > the case when there are multiple concurrent queries on the same connection, > > but that is not the case here. > > Just for interest is there a performance penalty not using the cache limit > of 10000? I would think the opposite: there is a penalty for using any cache limit > 0. The penalty is perhaps mostly in the client (it retains more data, so uses more memory). The server needs to keep the restult set around until the client is done with it, but since the client will do nothing other than reading this result set, there are no extra resources involved in the server. > > 2. The server can run out of resources when a limit is set since it needs to > > hold on to the result sets until the client tells the server it is done with > > them. > > > > Of course, the server shouldn't crash but report an error if it runs out of > > resources. > > Should I file a separate bug for the segmentation fault? Yes please. The more debug information you can produce, the better. If you haven't done that already, perhaps you can also install the debug packages. ## Comment 28267 Date: 2020-11-13 15:23:30 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [ad85b487b149](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ad85b487b149) 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=ad85b487b149](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=ad85b487b149) Changeset description: Silenced BugTracker-2019 Python tests except msqldump-mapi-cache.Bug-6777
msqldump creates incomplete SQL dumps for big databases
https://api.github.com/repos/MonetDB/MonetDB/issues/6777/comments
0
2020-11-30T16:51:29Z
2024-06-27T13:07:17Z
https://github.com/MonetDB/MonetDB/issues/6777
753,638,483
6,777
[ "MonetDB", "MonetDB" ]
Date: 2019-10-21 15:42:28 +0200 From: @PedroTadim To: SQL devs &lt;<bugs-sql>&gt; Version: -- development Last updated: 2019-11-28 10:00:06 +0100 ## Comment 27370 Date: 2019-10-21 15:42:28 +0200 From: @PedroTadim User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36 Build Identifier: Do the steps bellow. Reproducible: Always ### Steps to Reproduce: create table dummy4("key" varchar(32), val int); insert into dummy4 values('AAAAAAAA',1),('BBBBBBBBB',2); create table dummy5("key" varchar(32), val int); insert into dummy5 values('CCCCCCCC',3),('DDDDDDDD',4); create table dummy6 as select "key", dummy4.val as "val4", dummy5.val as "val5" from dummy4 full outer join dummy5 using ("key"); select t.name as "table_name", c.name as "column_name", c.type, c.type_digits from sys.tables t join sys.columns c on c.table_id = t.id where t.name = 'dummy6'; ### Actual Results: Column "key" has 0 digits. ### Expected Results: Column "key" has 32 digits. I already fixed this. Going to push in a few minutes. ## Comment 27371 Date: 2019-10-21 15:45:47 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [22d7b71a8c6b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=22d7b71a8c6b) 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=22d7b71a8c6b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=22d7b71a8c6b) Changeset description: Added test and fixes for bug #6776, ie consider outer join like relations while compiling an USING token ## Comment 27375 Date: 2019-10-22 09:40:41 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [2cbfdbb1e382](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2cbfdbb1e382) 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=2cbfdbb1e382](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=2cbfdbb1e382) Changeset description: Reverted changes from [0e5d3a5b40c6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0e5d3a5b40c6) and use alternative way for bug #6776. I found out there's an ugly hack to set the type of 'ifthenelse' expression.
Creating a table with a full outer join query gives type with wrong digits on the joined key.
https://api.github.com/repos/MonetDB/MonetDB/issues/6776/comments
0
2020-11-30T16:51:25Z
2024-06-27T13:07:16Z
https://github.com/MonetDB/MonetDB/issues/6776
753,638,444
6,776
[ "MonetDB", "MonetDB" ]
Date: 2019-10-19 21:06:40 +0200 From: @yzchang To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: @PedroTadim, @yzchang Last updated: 2019-11-28 10:00:04 +0100 ## Comment 27367 Date: 2019-10-19 21:06:40 +0200 From: @yzchang In the Nov2019 branch, the combination of NOT IN with an AND clause which contains at least one OR clause gives wrong results (as shown in the results of the SELECT query below). This is because the NOT IN is translated in the logical plan into an IN (as shown in the results of the PLAN below). CREATE TABLE t (i INT, s VARCHAR(32)); INSERT INTO t VALUES (-450, 'foo'), (29, 'bar'), (-250, 'foobar'); sql>SELECT i FROM t WHERE t.i NOT IN (-450 , 29) AND (t."s" <> 'xyz' OR t."s" IS NULL ); +------+ | i | +======+ | -450 | | 29 | +------+ sql>PLAN SELECT i FROM t WHERE t.i NOT IN (-450 , 29) AND (t."s" <> 'xyz' OR t."s" IS NULL ); +-------------------------------------------------------------------------------------------+ | rel | +===========================================================================================+ | project ( | | | select ( | | | | table(sys.t) [ "t"."i", "t"."s" ] COUNT | | | ) [ ("t"."s" != varchar(32) "xyz") or (sys.isnull("t"."s") = boolean "true"), "t"."i" i | : n (int[sys.sql_neg(smallint "450")], int "29") ] : | ) [ "t"."i" ] | +-------------------------------------------------------------------------------------------+ ## Comment 27368 Date: 2019-10-19 21:27:54 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [8e63d332f667](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8e63d332f667) made by Ying Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=8e63d332f667](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=8e63d332f667) Changeset description: Added test for Bug #6775 ## Comment 27369 Date: 2019-10-19 23:23:55 +0200 From: @PedroTadim The problem happens in the rel_select_cse optimizer.
NOT IN with an AND containing an OR gives wrong result
https://api.github.com/repos/MonetDB/MonetDB/issues/6775/comments
0
2020-11-30T16:51:22Z
2024-06-27T13:07:15Z
https://github.com/MonetDB/MonetDB/issues/6775
753,638,410
6,775
[ "MonetDB", "MonetDB" ]
Date: 2019-10-11 13:00:04 +0200 From: @swingbit To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.11 (Apr2019-SP1) CC: @PedroTadim Last updated: 2019-11-28 10:00:05 +0100 ## Comment 27356 Date: 2019-10-11 13:00:04 +0200 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36 Build Identifier: START TRANSACTION; CREATE TABLE "t1" ( "a1" INTEGER, "prob" DECIMAL(7,4) ); INSERT INTO t1 VALUES (5, 0.2000); CREATE TABLE "t2" ( "a1" INTEGER, "prob" DECIMAL(7,4) ); INSERT INTO t2 VALUES (5, 0.5000); CREATE TABLE "t3" ( "a1" INTEGER, "prob" TINYINT ); INSERT INTO t3 VALUES (5, 1); SELECT tmp.a1, prod(tmp.prob) AS prob FROM (SELECT a1, prob FROM (SELECT t1.a1 AS a1, t3.a1 AS a2, t1.prob * t3.prob AS prob FROM t1,t3 WHERE t1.a1 = t3.a1) AS t__x30 UNION ALL SELECT a1, prob FROM (SELECT t2.a1 AS a1, t3.a1 AS a2, t2.prob * t3.prob AS prob FROM t2,t3 WHERE t2.a1 = t3.a1) AS t__x32) as tmp GROUP BY tmp.a1; +------+------------------------------------------+ | a1 | prob | +======+==========================================+ | 5 | 1000.0000 | +------+------------------------------------------+ 1 tuple The result should be (5, 0.1). Replacing TINYINT with DOUBLE in the CREATE statement of t3 gives the correct result. Reproducible: Always ## Comment 27357 Date: 2019-10-11 13:04:19 +0200 From: @swingbit Also, replacing prod with sum works as expected (gives 0.7) ## Comment 27358 Date: 2019-10-11 13:16:48 +0200 From: @PedroTadim Simplifying to this query: select prod(col1) from (values(0.2), (0.5)) as t1(col1); Should output 0.1, but it outputs 1.0 ## Comment 27359 Date: 2019-10-11 13:57:10 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [f93d5290abe4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f93d5290abe4) 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=f93d5290abe4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=f93d5290abe4) Changeset description: Added test and fix for bug #6774. Disable prod aggregate on decimals, because applying successive multiplications implies changing scales. Instead convert them to floating points ## Comment 27363 Date: 2019-10-15 11:43:14 +0200 From: @swingbit The fix works well on new databases, but databases created before the fix still give the wrong result. How can I fix them?
PROD aggregation gives wrong result
https://api.github.com/repos/MonetDB/MonetDB/issues/6774/comments
0
2020-11-30T16:51:19Z
2024-06-27T13:07:14Z
https://github.com/MonetDB/MonetDB/issues/6774
753,638,369
6,774
[ "MonetDB", "MonetDB" ]
Date: 2019-10-11 12:01:59 +0200 From: jpastuszek To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.11 (Apr2019-SP1) CC: @kutsurak Last updated: 2019-11-28 10:00:03 +0100 ## Comment 27354 Date: 2019-10-11 12:01:59 +0200 From: jpastuszek User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 Build Identifier: This queries return string witch is incorrectly encoded: select json.filter('{"foo": null}', '$.foo') select json.filter('[null]', '$[0]') Reproducible: Always ### Steps to Reproduce: 1. Run query that select "null" from JSON object 2. Observe bad string returned ### Actual Results: [�] ### Expected Results: Probably "[null]" should be returned. ## Comment 27355 Date: 2019-10-11 12:45:03 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [7d92d6226c11](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7d92d6226c11) made by Panagiotis Koutsourakis <kutsurak@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=7d92d6226c11](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=7d92d6226c11) Changeset description: Add test for bug #6773 ## Comment 27360 Date: 2019-10-11 15:22:28 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [848f40d8511a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=848f40d8511a) made by Panagiotis Koutsourakis <kutsurak@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=848f40d8511a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=848f40d8511a) Changeset description: Do not return str_nil but the sequence `null` for null in JSON This fixes the bug #6773.
json.filter returns corrupted string when selecting JSON null value
https://api.github.com/repos/MonetDB/MonetDB/issues/6773/comments
0
2020-11-30T16:51:15Z
2024-06-27T13:07:13Z
https://github.com/MonetDB/MonetDB/issues/6773
753,638,329
6,773
[ "MonetDB", "MonetDB" ]
Date: 2019-10-09 22:40:52 +0200 From: @swingbit To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.11 (Apr2019-SP1) CC: @mlkersten, @PedroTadim Last updated: 2019-11-28 10:00:06 +0100 ## Comment 27352 Date: 2019-10-09 22:40:52 +0200 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36 Build Identifier: When using TRACE <query> a user expects to see the trace for that specific query. Instead, the output includes traces all active sessions at that moment. That is highly confusing and has possible privacy/security issues. Reproducible: Always ### Steps to Reproduce: (shell 1)$ yes "SELECT 'I am from session 1';" | mclient -f trash -d demo (shell 2)$ yes "SELECT 'I am from session 2';" | mclient -f trash -d demo (shell 3)$ echo "TRACE SELECT 'I am from session 3';" | mclient -d demo Repeat command from shell 3. Every time it gives a different output, with content from the other sessions. ## Comment 27353 Date: 2019-10-10 16:30:56 +0200 From: @mlkersten Returning global TRACE information as part of the result set is likely to be abandoned soon. The purpose of it was to get a complete picture on what is going on in the server. Because, the performance of a single query may be affected by concurrent queries. Indeed, an overview of all activities may disclose more information then required. ## Comment 27364 Date: 2019-10-15 15:19:59 +0200 From: @PedroTadim With the latest changes on default branch, this should no longer be an issue. ## Comment 27365 Date: 2019-10-15 15:39:10 +0200 From: @mlkersten The Default branch contains better code to separate the profiler events
TRACE includes information from all active sessions
https://api.github.com/repos/MonetDB/MonetDB/issues/6772/comments
0
2020-11-30T16:51:12Z
2024-06-27T13:07:12Z
https://github.com/MonetDB/MonetDB/issues/6772
753,638,292
6,772
[ "MonetDB", "MonetDB" ]
Date: 2019-10-09 18:07:00 +0200 From: @arjenpdevries To: buildtools devs &lt;<bugs-buildtools>&gt; Version: 11.33.11 (Apr2019-SP1) CC: @PedroTadim Last updated: 2019-11-28 10:00:04 +0100 ## Comment 27349 Date: 2019-10-09 18:07:00 +0200 From: @arjenpdevries User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0 Build Identifier: On a FC30 system, using: ./configure --disable-debug --disable-developer --disable-assert --enable-optimize the bootstrap / configure steps did not complain about R-devel missing, but then issuing make failed on not finding the Rembedded.h include. Maybe the configure script needs a patch! Reproducible: Didn't try ### Steps to Reproduce: I installed R-devel and then the problem was resolved. ## Comment 27350 Date: 2019-10-09 18:47:05 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [016c2497bd62](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=016c2497bd62) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=016c2497bd62](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=016c2497bd62) Changeset description: Check whether Rembedded.h include file is present. This fixes bug #6771.
R-devel
https://api.github.com/repos/MonetDB/MonetDB/issues/6771/comments
0
2020-11-30T16:51:09Z
2024-06-27T13:07:11Z
https://github.com/MonetDB/MonetDB/issues/6771
753,638,247
6,771
[ "MonetDB", "MonetDB" ]
Date: 2019-10-07 14:00:19 +0200 From: @swingbit To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.11 (Apr2019-SP1) CC: @PedroTadim Last updated: 2019-10-09 20:41:09 +0200 ## Comment 27340 Date: 2019-10-07 14:00:19 +0200 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36 Build Identifier: START TRANSACTION; CREATE OR REPLACE FUNCTION mycontains(s STRING, p STRING) RETURNS BOOLEAN BEGIN RETURN SELECT s like '%'||p||'%'; END; CREATE TABLE t(s STRING); INSERT INTO t VALUES ('apple'),('pear'),('banana'),('orange'); sql>SELECT * FROM t WHERE s like '%an%'; +--------+ | s | +========+ | banana | | orange | +--------+ 2 tuples sql>SELECT * FROM t WHERE mycontains(s,'an'); +---+ | s | +===+ +---+ 0 tuples The explain shows indeed an empty loop over the bat: sql>explain SELECT * FROM t WHERE mycontains(s,'an'); +----------------------------------------------------------------------------------------------------------------------+ | mal | +======================================================================================================================+ | function user.s62_1():void; | | X_2:void := querylog.define("select * from t where mycontains(s,\\'an\\');":str, "sequential_pipe":str, 23:int); | | X_23:bat[:str] := bat.new(nil:str); | | X_30:bat[:str] := bat.append(X_23:bat[:str], "spinque.t":str); | | X_25:bat[:str] := bat.new(nil:str); | | X_32:bat[:str] := bat.append(X_25:bat[:str], "s":str); | | X_26:bat[:str] := bat.new(nil:str); | | X_33:bat[:str] := bat.append(X_26:bat[:str], "clob":str); | | X_27:bat[:int] := bat.new(nil:int); | | X_35:bat[:int] := bat.append(X_27:bat[:int], 0:int); | | X_29:bat[:int] := bat.new(nil:int); | | X_36:bat[:int] := bat.append(X_29:bat[:int], 0:int); | | X_5:int := sql.mvc(); | | C_6:bat[:oid] := sql.tid(X_5:int, "spinque":str, "t":str); | | X_9:bat[:str] := sql.bind(X_5:int, "spinque":str, "t":str, "s":str, 0:int); | | X_12:bat[:str] := algebra.projection(C_6:bat[:oid], X_9:bat[:str]); | | X_83:bat[:bit] := bat.new(nil:bit); | | barrier (X_86:oid, X_87:str) := iterator.new(X_12:bat[:str]); | | redo (X_86:oid, X_87:str) := iterator.next(X_12:bat[:str]); | | exit (X_86:oid, X_87:str); | | X_14:bat[:bit] := X_83:bat[:bit]; | | C_19:bat[:oid] := algebra.thetaselect(X_14:bat[:bit], true:bit, "==":str); | | X_21:bat[:str] := algebra.projection(C_19:bat[:oid], X_12:bat[:str]); | | sql.resultSet(X_30:bat[:str], X_32:bat[:str], X_33:bat[:str], X_35:bat[:int], X_36:bat[:int], X_21:bat[:str]); | | end user.s62_1; | Reproducible: Always ## Comment 27341 Date: 2019-10-07 14:49:24 +0200 From: @sjoerdmullender I cannot reproduce the error: sql>SELECT * FROM t WHERE mycontains(s,'an'); +--------+ | s | +========+ | banana | | orange | +--------+ 2 tuples Both in the Apr2019-SP1 release and on the branch head. ## Comment 27342 Date: 2019-10-07 14:57:08 +0200 From: @PedroTadim By forcing mitosis on Apr2019 branch it triggers the error: GDK reported error: BATproject: does not match always ## Comment 27343 Date: 2019-10-07 15:02:44 +0200 From: @PedroTadim However on Nov2019 branch it always runs fine. ## Comment 27344 Date: 2019-10-07 15:34:15 +0200 From: @swingbit My bad. It works fine if I disable all our own changes. ## Comment 27345 Date: 2019-10-07 15:38:48 +0200 From: @sjoerdmullender Then we can close this. ## Comment 27346 Date: 2019-10-07 16:07:16 +0200 From: @swingbit For completeness, the issue was due indeed from one of my own changes. However, it is triggered in this specific case because a not fully consistent translation to MAL. This is the loop with optimizer set to minimal_pipe(): | barrier (X_52:oid, X_53:str) := iterator.new(X_12:bat[:str]); | X_55:bit := user.mycontains(X_53:str, X_13:str); | bat.append(X_49:bat[:bit], X_55:bit); | redo (X_52:oid, X_53:str) := iterator.next(X_12:bat[:str]); | exit (X_52:oid, X_53:str); The body later disappears in my case because my change makes bat.append() a side-effect-free operation. Thus, not being assigned to any variable, it gets removed by a later optimizer. Not assigning the result of bat.append() to a variable isn't good practice, I believe. It does define one, and ignoring it because of the side-effect assumption isn't clean. Indeed, it is always assigned to a variable in the rest of the MAL plan. This part is not translated consistently with the rest. ## Comment 27347 Date: 2019-10-07 16:46:54 +0200 From: @swingbit May I suggest something like this? diff -r c83498edd5c4 monetdb5/optimizer/opt_multiplex.c --- a/monetdb5/optimizer/opt_multiplex.c Fri Oct 04 14:01:38 2019 +0200 +++ b/monetdb5/optimizer/opt_multiplex.c Mon Oct 07 16:45:44 2019 +0200 @@ -157,7 +157,8 @@ for (i = 0; i < pci->retc; i++) { InstrPtr a = newFcnCall(mb, batRef, appendRef); a = pushArgument(mb, a, resB[i]); - (void) pushArgument(mb, a, getArg(q,i)); + a = pushArgument(mb, a, getArg(q,i)); + getArg(a,0) = resB[i]; } /* redo (h,r):= iterator.next(refBat); */ ## Comment 27348 Date: 2019-10-07 16:51:16 +0200 From: @swingbit With that patch, the output looks fine: | X_49:bat[:bit] := bat.new(nil:bit); | barrier (X_52:oid, X_53:str) := iterator.new(X_12:bat[:str]); | X_55:bit := user.mycontains(X_53:str, X_13:str); | X_49:bat[:bit] := bat.append(X_49:bat[:bit], X_55:bit); | redo (X_52:oid, X_53:str) := iterator.next(X_12:bat[:str]); | exit (X_52:oid, X_53:str); | X_14:bat[:bit] := X_49:bat[:bit]; ## Comment 27351 Date: 2019-10-09 20:41:09 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [a757e8d68362](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a757e8d68362) made by Martin Kersten <mk@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=a757e8d68362](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=a757e8d68362) Changeset description: Applying the patch from bug #6770, reported by Cornacchio
SQL function not translated correctly
https://api.github.com/repos/MonetDB/MonetDB/issues/6770/comments
0
2020-11-30T16:51:04Z
2024-06-28T13:09:12Z
https://github.com/MonetDB/MonetDB/issues/6770
753,638,187
6,770
[ "MonetDB", "MonetDB" ]
Date: 2019-10-06 09:49:08 +0200 From: @mlkersten To: MonetDB5 devs &lt;<bugs-monetdb5>&gt; Version: 11.33.11 (Apr2019-SP1) Last updated: 2019-11-28 10:00:03 +0100 ## Comment 27338 Date: 2019-10-06 09:49:08 +0200 From: @mlkersten User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:69.0) Gecko/20100101 Firefox/69.0 Build Identifier: The idea behind the stethoscope is to hook it up at any time to inspect what is going on in the server. For this we keep the instructions being executed in the client record. When the stethoscope starts, it inspects all client records and issues START events of those already in progress, However, the underlying data structure clients->inprogress is not protected against updates. This may lead to invalid pointers while preparing the profiler event string. Reproducible: Always ## Comment 27339 Date: 2019-10-06 14:23:07 +0200 From: @mlkersten Added explicit locks around the global variable to fix it at the cost of few calls.
ProfilerStart is not threadsafe
https://api.github.com/repos/MonetDB/MonetDB/issues/6769/comments
0
2020-11-30T16:51:00Z
2024-06-27T13:07:09Z
https://github.com/MonetDB/MonetDB/issues/6769
753,638,127
6,769
[ "MonetDB", "MonetDB" ]
Date: 2019-10-05 06:11:07 +0200 From: @mlkersten To: MonetDB5 devs &lt;<bugs-monetdb5>&gt; Version: 11.33.11 (Apr2019-SP1) Last updated: 2019-10-05 06:11:07 +0200 ## Comment 27337 Date: 2019-10-05 06:11:07 +0200 From: @mlkersten User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:69.0) Gecko/20100101 Firefox/69.0 Build Identifier: Since we ditched the console of mserver5 entry 0 in the clients structure index not necessarily represents the system dba. Instead, we should check for the MAL_ADMIN uid. Amongst others this affects sys.queue et.al. Reproducible: Always
Admin handling out of date
https://api.github.com/repos/MonetDB/MonetDB/issues/6768/comments
0
2020-11-30T16:50:58Z
2024-06-28T13:09:11Z
https://github.com/MonetDB/MonetDB/issues/6768
753,638,090
6,768
[ "MonetDB", "MonetDB" ]
Date: 2019-10-03 15:22:07 +0200 From: Fabio &lt;<palmaresk8>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.11 (Apr2019-SP1) Last updated: 2019-10-03 17:16:48 +0200 ## Comment 27334 Date: 2019-10-03 15:22:07 +0200 From: Fabio &lt;<palmaresk8>&gt; User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36 Build Identifier: It would be really useful if MonetDB could have the ability to export a CSV file with column headers in the first line, as this kind of export/import operations is one of the most basic type of operations in data analysis. Reproducible: Always ### Steps to Reproduce: COPY mytable INTO '/home/myfile.csv' USING DELIMITERS '|', '\n', '"' NULL AS '' HEADER; ### Actual Results: None, as HEADER is not implemented ### Expected Results: A delimited file with column headers that could be imported in some statistical application for data analysis ## Comment 27335 Date: 2019-10-03 17:15:48 +0200 From: @sjoerdmullender There is something like this if you use mclient to export the data. mclient -fcsv+, -d$database -s'select * from mytable' > myfile.csv See the mclient manual [1]. [1] https://www.monetdb.org/Documentation/mclient-man-page ## Comment 27336 Date: 2019-10-03 17:16:48 +0200 From: @sjoerdmullender I forgot to mention, you can use --null= to get the equivalent of NULL AS ''.
Add a 'HEADER' option to export data using COPY with column names
https://api.github.com/repos/MonetDB/MonetDB/issues/6767/comments
1
2020-11-30T16:50:55Z
2024-06-27T13:07:07Z
https://github.com/MonetDB/MonetDB/issues/6767
753,638,054
6,767
[ "MonetDB", "MonetDB" ]
Date: 2019-09-27 12:04:24 +0200 From: @PedroTadim To: MonetDB5 devs &lt;<bugs-monetdb5>&gt; Version: 11.33.11 (Apr2019-SP1) Last updated: 2019-11-28 10:00:05 +0100 ## Comment 27329 Date: 2019-09-27 12:04:24 +0200 From: @PedroTadim User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36 Build Identifier: Running any of the queries will trigger the warnings from the multiplex optimizer. select s.name, seq.name, next_value_for(s.name, seq.name), seq."minvalue", seq."maxvalue", seq."increment", seq."cycle" from sys.sequences seq, sys.schemas s where s.id = seq.schema_id order by s.name, seq.name; select s.name, seq.name, get_value_for(s.name, seq.name), seq."minvalue", seq."maxvalue", seq."increment", seq."cycle" from sys.sequences seq, sys.schemas s where s.id = seq.schema_id order by s.name, seq.name; Reproducible: Always ## Comment 27332 Date: 2019-09-30 10:00:51 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [05cf863829ba](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=05cf863829ba) 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=05cf863829ba](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=05cf863829ba) Changeset description: Added test for Bug #6766 ## Comment 27366 Date: 2019-10-18 16:30:04 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [f83992ad7063](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f83992ad7063) 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=f83992ad7063](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=f83992ad7063) Changeset description: Added final missing bulk get_value and next_value mal calls, thus fixing bug #6766
Missing bulk implementation for get_value and next_value calls
https://api.github.com/repos/MonetDB/MonetDB/issues/6766/comments
0
2020-11-30T16:50:52Z
2024-06-27T13:07:06Z
https://github.com/MonetDB/MonetDB/issues/6766
753,638,023
6,766
[ "MonetDB", "MonetDB" ]
Date: 2019-09-26 15:19:03 +0200 From: Frank Groot &lt;<fgroot>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.35.9 (Nov2019-SP1) CC: @njnes Last updated: 2020-02-24 13:21:58 +0100 ## Comment 27324 Date: 2019-09-26 15:19:03 +0200 From: Frank Groot &lt;<fgroot>&gt; User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36 Build Identifier: After creating a table with 2 columns and granting a user SELECT privileges on one of the columns, the user cannot perform SELECT queries on any of the table columns. Reproducible: Always ### Steps to Reproduce: 1. Use a session with user monetdb; CREATE schema myschema; 2. Create a table with two columns and add some data DROP TABLE IF EXISTS "myschema"."test"; CREATE TABLE "myschema"."test" ( id integer, name varchar(20) ); INSERT INTO "myschema"."test" (id,name) VALUES (1,'Tom'),(2,'Karen'); 3. CREATE an arbitrary user drop user myuser; CREATE USER myuser WITH UNENCRYPTED PASSWORD 'Test123' NAME 'Hulk' SCHEMA myschema; 4. Test GRANT permissions on the entire table --Under session with user monetdb GRANT SELECT ON myschema.test TO myuser ; --This under a session with user myuser ************ WORKS!!! *************** SELECT id, name FROM myschema.test; --Under session with user monetdb REVOKE SELECT ON myschema.test FROM myuser 5. Test GRANT permissions on one column of the table (column "name") --Under session with user monetdb GRANT SELECT (name) ON myschema.test TO myuser --This under a session with user myuser ************ DOESN'T WORK!!! ************ SELECT name FROM myschema.test; ERROR: ExampleExceptionFormatter: exception message was: SELECT: access denied for myuser to table 'myschema.test' --Under session with user monetdb REVOKE SELECT (name) ON myschema.test FROM myuser ### Actual Results: I received an error with user on selecting just the table columns that were specifically granted in the grant script before. ### Expected Results: I expected to be able to select a subset of table columns that were granted to the user account I was using to run the query. The functionality is mentioned in bug: 6525 in a comment by Martin van Dinther (https://www.monetdb.org/bugzilla/show_bug.cgi?id=6525) Without this fix it's almost impossible to implement a hierarchical security strategy using VIEWs that are allowed to select subsets of tables. ## Comment 27333 Date: 2019-09-30 12:08:26 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [ed05003bf33e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ed05003bf33e) 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=ed05003bf33e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=ed05003bf33e) Changeset description: Added test for bug #6765 ## Comment 27419 Date: 2019-11-26 22:36:15 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [bd8ab7d18f70](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bd8ab7d18f70) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=bd8ab7d18f70](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=bd8ab7d18f70) Changeset description: fixed bug #6765, make sure we allow access to columns which the users has SELECT priviliges on. ## Comment 27517 Date: 2020-01-24 16:28:38 +0100 From: Frank Groot &lt;<fgroot>&gt; We are now testing MonetDb v11.35.9. Running the testscript results in unexpected message after performing step 5. Granting the individual column 'name' and subsequent selection of the field results in 'access denied' error: SELECT: access denied for myuser to table 'myschema.test' Can you verify this issue? Kind regards, Frank ## Comment 27578 Date: 2020-02-24 13:21:58 +0100 From: Frank Groot &lt;<fgroot>&gt; We hadn't updated all of the rpm's. Sorry for any inconvenience! Kind regards, Frank
GRANT SELECT privilege on a subset of table columns results in access denied error when selecting the same columns from the table
https://api.github.com/repos/MonetDB/MonetDB/issues/6765/comments
0
2020-11-30T16:50:48Z
2024-06-27T13:07:05Z
https://github.com/MonetDB/MonetDB/issues/6765
753,637,975
6,765
[ "MonetDB", "MonetDB" ]
Date: 2019-09-20 17:34:07 +0200 From: @drstmane To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.11 (Apr2019-SP1) Last updated: 2019-11-28 10:00:06 +0100 ## Comment 27308 Date: 2019-09-20 17:34:07 +0200 From: @drstmane mserver5 crashes with one of the following errors: corrupted double-linked list corrupted size vs. prev_size double free or corruption (out) double free or corruption (!prev) free(): invalid size munmap_chunk(): invalid pointer script to reproduce will follow. ## Comment 27309 Date: 2019-09-20 17:37:17 +0200 From: @drstmane Please find a script to reproduce the bug at http://homepages.cwi.nl/~manegold/Bug-6764.tar ## Comment 27312 Date: 2019-09-21 21:22:00 +0200 From: @drstmane when running a debug build of mserver5, some crashes still occur: corrupted double-linked list corrupted size vs. prev_size free(): invalid size while instead(?) of the other crashes (see initial comment), these assertions are triggered: MonetDB/gdk/gdk_bat.c:1587: BATsetcount: Assertion `b->batCapacity >= cnt' failed. MonetDB/gdk/gdk_utils.c:1789: GDKfree: Assertion `(asize & 2) == 0' failed. MonetDB/gdk/gdk_utils.c:1794: GDKfree: Assertion `((char *) s)[i] == '\xBD'' failed. ## Comment 27313 Date: 2019-09-23 11:44:54 +0200 From: @drstmane Created attachment 635 table schema > Attached file: [Bug-6764-schema.ddl](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6764_Bug-6764-schema.ddl_635) (text/plain, 20721 bytes) > Description: table schema ## Comment 27314 Date: 2019-09-23 11:45:24 +0200 From: @drstmane Created attachment 636 query that triggers assertion / crash > Attached file: [Bug-6764-query.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6764_Bug-6764-query.sql_636) (application/sql, 83 bytes) > Description: query that triggers assertion / crash ## Comment 27315 Date: 2019-09-23 11:47:07 +0200 From: @drstmane For what it's worth, a simpler way to reproduce the assertion / crash is by loading the data from http://homepages.cwi.nl/~manegold/Bug-6764-data.csv.bz2 into the table defined by attached Bug-6764-schema.ddl and then run attached Bug-6764-query.sql ## Comment 27316 Date: 2019-09-23 12:34:53 +0200 From: @drstmane ps: the copy into statement should look as follows: COPY OFFSET 3 INTO "data-x" FROM '.../Bug-6764-data.csv.bz2' DELIMITERS ',','\n','' NULL AS ''; ## Comment 27317 Date: 2019-09-23 14:24:38 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [cc708f0d0b28](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cc708f0d0b28) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=cc708f0d0b28](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=cc708f0d0b28) Changeset description: Make sure enough space is allocated for extents and histogram BATs. This fixes bug #6764. ## Comment 27319 Date: 2019-09-24 09:21:08 +0200 From: @drstmane Changeset [cc708f0d0b28](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cc708f0d0b28) indeed appears to fix also the other incarnations of the bug (crash/assertion) reported here. Thank you very much!
mserver5 crashes with corruption, double free, invalid size or invalid pointer
https://api.github.com/repos/MonetDB/MonetDB/issues/6764/comments
0
2020-11-30T16:50:45Z
2024-06-27T13:07:04Z
https://github.com/MonetDB/MonetDB/issues/6764
753,637,932
6,764
[ "MonetDB", "MonetDB" ]
Date: 2019-09-20 13:03:27 +0200 From: xavier &lt;<wysunxavier>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: @njnes Last updated: 2020-08-25 14:17:06 +0200 ## Comment 27307 Date: 2019-09-20 13:03:27 +0200 From: xavier &lt;<wysunxavier>&gt; User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36 Build Identifier: COPY INTO table concurrently,but the tasks of second group take a particularly long time or is blocked sometimes. the table: create table tb1( linenum1 bigint, linenum2 bigint, linenum3 bigint, linenum4 bigint, linename1 varchar(128) null, time1 timestamp, time2 timestamp, linenum5 bigint, linename2 varchar(256), linename3 varchar(256), linename4 varchar(256), linename5 varchar(24) null, linenum6 bigint, linenum7 bigint, linenum8 bigint, linename6 varchar(256), linename7 varchar(256), linename8 varchar(256), linename9 varchar(64) null, linename10 varchar(64) null, linename11 varchar(64) null, linename12 varchar(64) null, linename13 varchar(64) null, linename14 varchar(64) null, linename15 text, linename16 varchar(64) null, linename17 varchar(64) null, mulrouflag boolean, intflag boolean, linenum9 bigint, linenum10 bigint, linenum11 bigint, linename18 varchar(256), linename19 varchar(256), linename20 varchar(256), linename21 varchar(4) null, linenum12 bigint, linenum13 bigint, linenum14 bigint, linename22 varchar(32) null, linename23 varchar(32) null, time3 timestamp, linenum15 bigint, linename24 char(2), linename25 char(2), linename26 varchar(256) null, linenum16 bigint not null ); environment: DELL R730:Intel E5-2630 V4@2.2GHz * 2,memory 64G. Data files: The amount of data per CSV file is about 10 million, 8.6G in size. Single tasks: Import 10 CSV files into one database table one by one, and perform 10 tasks and import them into 10 tables concurrently. The script reads as follows: [xavier@server1 bin]$ cat 1.sh !/bin/bash tablename=$1 dataname=$2 for k in {1..10} do time ./mclient -d testdb -s "copy 10000000 records into $tablename from '/data/$dataname' using delimiters ',';" done [xavier@server1 bin]$ cat 2.sh !/bin/bash for i in {1..10} do ./1.sh gre$i data_$i & done Reproducible: Always ### Steps to Reproduce: 1.execute script 2.sh ### Actual Results: I use the HDD. It takes 20 minutes to 30 minutes to import the first CSV file concurrently. When 10 concurrent tasks start importing the second CSV file, a single CSV file task takes more than 700 minutes.Sometime,it got blocked. At this point, a large number of read operations were found on the disk where the database was located, and the imported data disk did not have any read or write operations. The CPU is now in a wait state. But when I used the SSD, there was no problem with the same tasks: 10 concurrent persistent import tasks. The first CSV file data import time is from 20mins to 30mins, after which the import time is basically stable from 30mins to 40mins. System resource monitoring: The memory utilization rate is 90%, and no abnormality is found in the CPU and disk. But when I use the SSD, I do the same thing: concurrently importing 10 tasks, this is normal. The first CSV file data import time is from 20mins to 30mins, after which the import time is basically stable from 30mins to 40mins. System resource monitoring: The memory utilization rate is 90%, and no abnormality is found in the CPU and disk. ## Comment 27320 Date: 2019-09-24 15:03:00 +0200 From: @sjoerdmullender For various reasons it's not a very good idea to do multiple COPY INTO queries concurrently. Each COPY INTO query uses multiple threads (up to the number of cores in the system) and they do not take into account as to what might be running in parallel. Each COPY INTO necessarily works on all columns of the table in parallel (that's how the data is provided), so the complete table is basically in memory. If there are multiple large table being worked on in parallel it puts a lot of presure on the memory subsystem. In addition to this, if you COPY INTO the same table sequentially, the columns likely have to be resized. A resize operation can be expensive in that it may result in having to copy the data (and then you temporarily have two copies in memory). My advise: do it sequentially and for the first COPY INTO provide a count of the total number of rows (not just the number of rows in the first file) so that the columns can be preallocated. If you make sure that all COPY INTO queries are the only queries running, you can also use the LOCKED keyword which may result in less copying of the data. ## Comment 27323 Date: 2019-09-26 11:38:01 +0200 From: xavier &lt;<wysunxavier>&gt; The number of rows of data in each file is the same.I just divided a large file into 10 copies.The 10 data is imported into a table in order.I performed the operation of importing to ten tables at the same time. When I use the HDD, all the 10 import tasks that are concurrently go to the second file import time is particularly long.However, when I switched to using SSD, there was no such problem. Could it be said that resizing columns consumes a lot of time? ## Comment 28013 Date: 2020-08-25 14:17:06 +0200 From: @njnes concurrent use of hdd's (sata) isn't al that fast. Overhead on ssds should be much lower, but still the resize of the tables could be considerable.
COPY INTO table concurrently,but the tasks of second group take a particularly long time or is blocked sometimes.
https://api.github.com/repos/MonetDB/MonetDB/issues/6763/comments
0
2020-11-30T16:50:41Z
2024-06-27T13:07:03Z
https://github.com/MonetDB/MonetDB/issues/6763
753,637,868
6,763
[ "MonetDB", "MonetDB" ]
Date: 2019-09-19 11:39:22 +0200 From: @drstmane To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.11 (Apr2019-SP1) CC: @PedroTadim Last updated: 2019-11-28 10:00:04 +0100 ## Comment 27310 Date: 2019-09-20 17:38:22 +0200 From: @drstmane See Bug #6764 for the crashes that preced the "fatal" crash reported here. ## Comment 27321 Date: 2019-09-24 15:32:23 +0200 From: @PedroTadim Any update for this bug report? Otherwise we can close it.
mserver5 crashes on (re-)start
https://api.github.com/repos/MonetDB/MonetDB/issues/6762/comments
0
2020-11-30T16:50:37Z
2024-06-27T13:07:02Z
https://github.com/MonetDB/MonetDB/issues/6762
753,637,835
6,762
[ "MonetDB", "MonetDB" ]
Date: 2019-09-17 17:19:10 +0200 From: WARREN MASTER &lt;<warren.master>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.11 (Apr2019-SP1) CC: @njnes, @PedroTadim, warren.master, @yzchang Last updated: 2019-11-28 10:00:02 +0100 ## Comment 27296 Date: 2019-09-17 17:19:10 +0200 From: WARREN MASTER &lt;<warren.master>&gt; User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36 Build Identifier: the following SQL produces error Error: Program contains errors.:(NONE).multiplex select fundid,sum(fxcurdlttot) as fxcurdlttotfx from actual_positionmart_pfx_all_vw where asofdate='2019-09-11' and fundid = 10 and currencyexposed <> 'TOTAL' group by fundid Removing and currencyexposed <> 'TOTAL' and/or changing <> to = or NOT LIKE does not trigger the error Reproducible: Always ## Comment 27297 Date: 2019-09-17 17:38:57 +0200 From: @yzchang Can you please give us the schema of "actual_positionmart_pfx_all_vw" and probably also some sample data? Because I can't reproduce your error with an empty table: sql>create table actual_positionmart_pfx_all_vw (fundid int, asofdate date, currencyexposed string, fxcurdlttot int); operation successful sql>select fundid,sum(fxcurdlttot) as fxcurdlttotfx from actual_positionmart_pfx_all_vw where asofdate='2019-09-11' and fundid = 10 and currencyexposed <> 'TOTAL' group by fundid; +--------+---------------+ | fundid | fxcurdlttotfx | +========+===============+ +--------+---------------+ 0 tuples ## Comment 27298 Date: 2019-09-17 19:20:41 +0200 From: WARREN MASTER &lt;<warren.master>&gt; Created attachment 634 here is the sql to create the table with the problem > Attached file: [trg.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6761_trg.sql_634) (text/plain, 257960 bytes) > Description: here is the sql to create the table with the problem ## Comment 27299 Date: 2019-09-17 21:06:47 +0200 From: @sjoerdmullender The problem is the mismatch between the type of currencyexposed and the string it is compared to. currencyexposed is declared as CHAR(3) and it is compared to the string 'TOTAL' which would be a CHAR(5). If you change the query to contain, say, 'TOT' instead of 'TOTAL', it works. This is not saying this is not a bug. This is just saying how you can work around it. ## Comment 27300 Date: 2019-09-17 21:33:17 +0200 From: WARREN MASTER &lt;<warren.master>&gt; thank you, that worked, turns out this table doesn't even have TOTAL as a value. ## Comment 27301 Date: 2019-09-18 09:34:14 +0200 From: @sjoerdmullender (In reply to WARREN MASTER from comment 4) > thank you, that worked, turns out this table doesn't even have TOTAL as a > value. No, it couldn't. The value doesn't fit. ## Comment 27302 Date: 2019-09-18 10:49:57 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [ded46c47fe32](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ded46c47fe32) 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=ded46c47fe32](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=ded46c47fe32) Changeset description: Added test for bug #6761 ## Comment 27306 Date: 2019-09-20 12:01:59 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [e56aa53454b1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e56aa53454b1) 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=e56aa53454b1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=e56aa53454b1) Changeset description: Fix for bug #6761 (.i.e. at MAL code generation, we don't need to convert between string types) ## Comment 27318 Date: 2019-09-23 17:55:23 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [e5f30dd8f561](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e5f30dd8f561) 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=e5f30dd8f561](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=e5f30dd8f561) Changeset description: Rolling back changes for bug #6761 fix, it breaks many tests. I give up finding a solution for it ## Comment 27322 Date: 2019-09-25 12:25:24 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [1257b1403bce](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1257b1403bce) 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=1257b1403bce](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=1257b1403bce) Changeset description: Updated fix for bug #6761 by setting the number of digits for the output statement out of the skipped conversion ## Comment 27330 Date: 2019-09-27 14:54:08 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [b1af71eb6247](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b1af71eb6247) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=b1af71eb6247](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=b1af71eb6247) Changeset description: fix bug #6761, ie don't push the selection bat for convert operators
Error: Program contains errors.:(NONE).multiplex
https://api.github.com/repos/MonetDB/MonetDB/issues/6761/comments
0
2020-11-30T16:50:34Z
2024-06-27T13:07:01Z
https://github.com/MonetDB/MonetDB/issues/6761
753,637,794
6,761
[ "MonetDB", "MonetDB" ]
Date: 2019-09-17 12:47:07 +0200 From: Arshad &lt;<arshad.super>&gt; To: clients devs &lt;<bugs-clients>&gt; Version: 11.33.3 (Apr2019) CC: martin.van.dinther Last updated: 2019-09-19 18:18:59 +0200 ## Comment 27295 Date: 2019-09-17 12:47:07 +0200 From: Arshad &lt;<arshad.super>&gt; User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0 Build Identifier: Hi, This is not necessary a bug nor a functionally lost. I am detailing report for a request for enhancement or recommendation and best practices and settings when running mclient or custom build client that needs to pull huge amount of data via ODBC. Given, that The tuples returned is upwards of 228078844 (228 Million approx) - and standard execution takes roughly 2 hours. Inspection shows that *print* function call could be serializing the output and slowing it down. I am exploring avenues where the improvements could be done. Any pointers and help in direction would be helpful. Details given below. The sql executions takes a very small amount of time, however the time taken for fetch() and render is taking upwards of 2 hours. This was figured out by running mclient with "--format=trash". I concluded here that any time upwards of 5 mins is what is spend on rendering. $ time mclient --format=trash -h hostname -p 5011 -u USER -d DB < ./atest.sql password: real 5m39.670s user 4m29.059s sys 0m2.335s Second, I looked into unixodbc client isql just to compare the results. Monet odbc client (mclient) was clearly faster. $ time /data/local/arshad/unixodbc/install237/bin/isql DSN05 USER Password -b < atest.sql > /dev/null real 74m56.418s user 26m35.183s sys 22m12.731s Noticed that *print* function call could be serializing the output and slowing down. (gdb) bt 0 0x00007fbeba3472de in strchrnul () from /lib64/libc.so.6 1 0x00007fbeba2fe5e2 in vfprintf () from /lib64/libc.so.6 2 0x00007fbeba32b589 in vsnprintf () from /lib64/libc.so.6 3 0x00007fbebb7d1350 in mnstr_printf (s=0xe59f50, format=0x41834a "%*s") at stream.c:5230 4 0x000000000040551a in SQLrow (len=0xe5e180, numeric=0xe5e1e0, rest=0xe5e1c0, fields=1, trim=2, wm=0 '\000') at mclient.c:733 5 0x00000000004081fa in SQLrenderer (hdl=0xe5bde0) at mclient.c:1688 6 0x0000000000408f00 in format_result (mid=0xe5c110, hdl=0xe5bde0, singleinstr=false) at mclient.c:2007 7 0x0000000000409740 in doFileBulk (mid=0xe5c110, fp=0xe5bea0) at mclient.c:2190 8 0x0000000000409f77 in doFile (mid=0xe5c110, fp=0xe5bea0, useinserts=false, interactive=false, save_history=0) at mclient.c:2363 9 0x000000000040dcb0 in main (argc=9, argv=0x7ffc5a7b5b28) at mclient.c:3759 (gdb) bt full 0 0x00007fbeba3472de in strchrnul () from /lib64/libc.so.6 No symbol table info available. 1 0x00007fbeba2fe5e2 in vfprintf () from /lib64/libc.so.6 No symbol table info available. 2 0x00007fbeba32b589 in vsnprintf () from /lib64/libc.so.6 No symbol table info available. 3 0x00007fbebb7d1350 in mnstr_printf (s=0xe59f50, format=0x41834a "%*s") at stream.c:5230 buf = "\000\000\000\066\062\060\061\065\062 \000\000\000\000\000\000\n\000\000\273\276\177\000\000\376\024@\000\000\000\000\000\060t|\273\276\177\000\000\211\223\277\273\276\177\000\000\000\000\000\000\001\000\000\000\310e\235\273\276\177\000\000\001\000\000\000\000\000\000\000\004\276|\273\276\177\000\000\001\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000<T{Z\374\177\000\000P\271\345\000\000\000\000\000\376\037\000\000\000\000\000\000\001\000\000\000\000\000\000\000g\316\346\000\000\000\000\000P\271\345\000\000\000\000\000\200\001\000\000\000\000\000\000\060\000\000\000\000\000\000\000\260\001\000\000\213\000\000\000\240S{Z\374\177\000\000\006", '\000' <repeats 15 times>, "!\254\204\245\003\200\377\377"... bf = 0x7ffc5a7b52a0 "" i = 0 bfsz = 512 ap = {{gp_offset = 16, fp_offset = 48, overflow_arg_area = 0x7ffc5a7b5580, reg_save_area = 0x7ffc5a7b54c0}} 4 0x000000000040551a in SQLrow (len=0xe5e180, numeric=0xe5e1e0, rest=0xe5e1c0, fields=1, trim=2, wm=0 '\000') at mclient.c:733 i = 0 more = false first = true t = 0x0 rows = 0 ulen = 8 cutafter = 0xe6a880 5 0x00000000004081fa in SQLrenderer (hdl=0xe5bde0) at mclient.c:1688 i = 1 total = 9 lentotal = 16 vartotal = 9 minvartotal = 9 fields = 1 rfields = 1 ---Type <return> to continue, or q <return> to quit--- printfields = 1 max = 1 graphwaste = 4 len = 0xe5e180 hdr = 0xe5e1a0 numeric = 0xe5e1e0 rest = 0xe5e1c0 buf = "\260\065@\000\000\000\000\000\020o\235\273\276\177\000\000\000\000\000\000\000\000\000\000pW{Z\374\177\000\000\260\065@\000\000\000\000\000`R\300\273\276\177\000\000\260V" ps = 0 silent = false rows = 277698994 6 0x0000000000408f00 in format_result (mid=0xe5c110, hdl=0xe5bde0, singleinstr=false) at mclient.c:2007 rc = -1 aff = 0 lid = 15056352 reply = 0xe5c030 "" sqloptimizer = 0 maloptimizer = 0 querytime = 0 rows = 0 saveFD = 0x0 7 0x0000000000409740 in doFileBulk (mid=0xe5c110, fp=0xe5bea0) at mclient.c:2190 buf = 0xe677d0 "..." length = 209 hdl = 0xe5bde0 rc = 0 bufsize = 10240 8 0x0000000000409f77 in doFile (mid=0xe5c110, fp=0xe5bea0, useinserts=false, interactive=false, save_history=0) at mclient.c:2363 line = 0x0 buf = 0x0 length = 4303443 ---Type <return> to continue, or q <return> to quit--- bufsiz = 0 hdl = 0x0 rc = 0 lineno = 1 prompt = 0x0 prepno = 0 rl = {s = 0x7ffc5a7b5860, prompt = 0x4035b0 <_start> "1\355I\211\321^H\211\342H\203\344\360PTI\307\300`\202A", buf = 0x7fbeba672640 <_IO_2_1_stdin_> "\230 \255", <incomplete sequence \373>, read = 140721826519328, len = 4208048} fd = 0 9 0x000000000040dcb0 in main (argc=9, argv=0x7ffc5a7b5b28) at mclient.c:3759 s = 0xe5bea0 port = 50119 user = 0x0 passwd = 0x0 host = 0x7ffc5a7b749f "lnx1040.ch3.prod.i.com" command = 0x0 dbname = 0x0 output = 0x0 fp = 0x0 trace = false dump = false useinserts = false c = 0 mid = 0xe5c110 save_history = 0 interactive = false has_fileargs = false option_index = 0 settz = true autocommit = true user_set_as_flag = true passwd_set_as_flag = false long_options = {{name = 0x41ae70 "autocommit", has_arg = 0, flag = 0x0, val = 97}, {name = 0x41ae7b "database", has_arg = 1, ---Type <return> to continue, or q <return> to quit--- flag = 0x0, val = 100}, {name = 0x41ae84 "dump", has_arg = 0, flag = 0x0, val = 68}, {name = 0x41ae89 "inserts", has_arg = 0, flag = 0x0, val = 78}, {name = 0x41ae91 "echo", has_arg = 0, flag = 0x0, val = 101}, {name = 0x41ae96 "encoding", has_arg = 1, flag = 0x0, val = 69}, {name = 0x41ae9f "format", has_arg = 1, flag = 0x0, val = 102}, {name = 0x41aea6 "help", has_arg = 0, flag = 0x0, val = 63}, {name = 0x41aeab "history", has_arg = 0, flag = 0x0, val = 72}, {name = 0x41aeb3 "host", has_arg = 1, flag = 0x0, val = 104}, {name = 0x41aeb8 "interactive", has_arg = 0, flag = 0x0, val = 105}, {name = 0x41aec4 "timer", has_arg = 1, flag = 0x0, val = 116}, {name = 0x41aeca "language", has_arg = 1, flag = 0x0, val = 108}, {name = 0x41aed3 "log", has_arg = 1, flag = 0x0, val = 76}, {name = 0x41aed7 "null", has_arg = 1, flag = 0x0, val = 110}, {name = 0x418b90 "pager", has_arg = 1, flag = 0x0, val = 124}, {name = 0x41aedc "port", has_arg = 1, flag = 0x0, val = 112}, {name = 0x41aee1 "rows", has_arg = 1, flag = 0x0, val = 114}, {name = 0x41aee6 "statement", has_arg = 1, flag = 0x0, val = 115}, {name = 0x41a8f9 "user", has_arg = 1, flag = 0x0, val = 117}, {name = 0x41aef0 "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x41aef8 "width", has_arg = 1, flag = 0x0, val = 119}, {name = 0x41aefe "Xdebug", has_arg = 0, flag = 0x0, val = 88}, {name = 0x41887a "timezone", has_arg = 0, flag = 0x0, val = 122}, {name = 0x41af05 "allow-remote", has_arg = 0, flag = 0x0, val = 82}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}} priv = {f = 0x0, buf = 0x0} (gdb) (gdb) bt 0 0x00007fbebb9e0dd4 in read_line (mid=0xe5c110) at mapi.c:3494 1 0x00007fbebb9e3792 in read_into_cache (hdl=0xe5bde0, lookahead=1) at mapi.c:4152 2 0x00007fbebb9e4e4b in mapi_fetch_line_internal (hdl=0xe5bde0) at mapi.c:4577 3 0x00007fbebb9e4f8f in mapi_fetch_line (hdl=0xe5bde0) at mapi.c:4604 4 0x0000000000403d5b in fetch_line (hdl=0xe5bde0) at mclient.c:334 5 0x0000000000403df5 in fetch_row (hdl=0xe5bde0) at mclient.c:351 6 0x000000000040820f in SQLrenderer (hdl=0xe5bde0) at mclient.c:1643 7 0x0000000000408f00 in format_result (mid=0xe5c110, hdl=0xe5bde0, singleinstr=false) at mclient.c:2007 8 0x0000000000409740 in doFileBulk (mid=0xe5c110, fp=0xe5bea0) at mclient.c:2190 9 0x0000000000409f77 in doFile (mid=0xe5c110, fp=0xe5bea0, useinserts=false, interactive=false, save_history=0) at mclient.c:2363 10 0x000000000040dcb0 in main (argc=9, argv=0x7ffc5a7b5b28) at mclient.c:3759 Breakpoint 1, mnstr_printf (s=0xe59f50, format=0x418347 "%c") at stream.c:5221 5221 char buf[512], *bf = buf; (gdb) bt full 0 mnstr_printf (s=0xe59f50, format=0x418347 "%c") at stream.c:5221 buf = "|\n\000\067\063\066\063\065\071 \000\000\000\000\000\000\n\000\000\273\276\177\000\000\376\024@\000\000\000\000\000\060t|\273\276\177\000\000\211\223\277\273\276\177\000\000\000\000\000\000\001\000\000\000\310e\235\273\276\177\000\000\001\000\000\000\000\000\000\000\004\276|\273\276\177\000\000\001\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000<T{Z\374\177\000\000P\271\345\000\000\000\000\000\376\037\000\000\000\000\000\000\001\000\000\000\000\000\000\000g\316\346\000\000\000\000\000P\271\345\000\000\000\000\000\200\001\000\000\000\000\000\000\060\000\000\000\000\000\000\000\260\001\000\000\213\000\000\000\240S{Z\374\177\000\000\006", '\000' <repeats 15 times>, "!\254\204\245\003\200\377\377"... bf = 0x7fbeba33687c <malloc+76> "H\205\333H\211\302uTH\205\333t\034\203=d\a4" i = 0 bfsz = 3819052484010180608 ap = {{gp_offset = 32, fp_offset = 48, overflow_arg_area = 0x7ffc5a7b5580, reg_save_area = 0x7ffc5a7b54c0}} 1 0x00000000004054c0 in SQLrow (len=0xe5e180, numeric=0xe5e1e0, rest=0xe5e1c0, fields=1, trim=2, wm=0 '\000') at mclient.c:730 i = 0 more = false first = true t = 0x0 rows = 0 ulen = 8 cutafter = 0xe6acc0 2 0x00000000004081fa in SQLrenderer (hdl=0xe5bde0) at mclient.c:1688 i = 1 total = 9 lentotal = 16 vartotal = 9 minvartotal = 9 fields = 1 rfields = 1 printfields = 1 max = 1 graphwaste = 4 len = 0xe5e180 hdr = 0xe5e1a0 numeric = 0xe5e1e0 ---Type <return> to continue, or q <return> to quit--- rest = 0xe5e1c0 buf = "\260\065@\000\000\000\000\000\020o\235\273\276\177\000\000\000\000\000\000\000\000\000\000pW{Z\374\177\000\000\260\065@\000\000\000\000\000`R\300\273\276\177\000\000\260V" ps = 0 silent = false rows = 280815201 3 0x0000000000408f00 in format_result (mid=0xe5c110, hdl=0xe5bde0, singleinstr=false) at mclient.c:2007 rc = -1 aff = 0 lid = 15056352 reply = 0xe5c030 "" sqloptimizer = 0 maloptimizer = 0 querytime = 0 rows = 0 saveFD = 0x0 4 0x0000000000409740 in doFileBulk (mid=0xe5c110, fp=0xe5bea0) at mclient.c:2190 buf = 0xe677d0 "..." length = 209 hdl = 0xe5bde0 rc = 0 bufsize = 10240 5 0x0000000000409f77 in doFile (mid=0xe5c110, fp=0xe5bea0, useinserts=false, interactive=false, save_history=0) at mclient.c:2363 line = 0x0 buf = 0x0 length = 4303443 bufsiz = 0 hdl = 0x0 rc = 0 lineno = 1 prompt = 0x0 prepno = 0 ---Type <return> to continue, or q <return> to quit--- rl = {s = 0x7ffc5a7b5860, prompt = 0x4035b0 <_start> "1\355I\211\321^H\211\342H\203\344\360PTI\307\300`\202A", buf = 0x7fbeba672640 <_IO_2_1_stdin_> "\230 \255", <incomplete sequence \373>, read = 140721826519328, len = 4208048} fd = 0 6 0x000000000040dcb0 in main (argc=9, argv=0x7ffc5a7b5b28) at mclient.c:3759 s = 0xe5bea0 port = 50119 user = 0x0 passwd = 0x0 host = 0x7ffc5a7b749f "lnx1040.ch3.prod.i.com" command = 0x0 dbname = 0x0 output = 0x0 fp = 0x0 trace = false dump = false useinserts = false c = 0 mid = 0xe5c110 save_history = 0 interactive = false has_fileargs = false option_index = 0 settz = true autocommit = true user_set_as_flag = true passwd_set_as_flag = false long_options = {{name = 0x41ae70 "autocommit", has_arg = 0, flag = 0x0, val = 97}, {name = 0x41ae7b "database", has_arg = 1, flag = 0x0, val = 100}, {name = 0x41ae84 "dump", has_arg = 0, flag = 0x0, val = 68}, {name = 0x41ae89 "inserts", has_arg = 0, flag = 0x0, val = 78}, {name = 0x41ae91 "echo", has_arg = 0, flag = 0x0, val = 101}, {name = 0x41ae96 "encoding", has_arg = 1, flag = 0x0, val = 69}, {name = 0x41ae9f "format", has_arg = 1, flag = 0x0, val = 102}, {name = 0x41aea6 "help", has_arg = 0, flag = 0x0, val = 63}, {name = 0x41aeab "history", has_arg = 0, flag = 0x0, val = 72}, {name = 0x41aeb3 "host", has_arg = 1, flag = 0x0, val = 104}, {name = 0x41aeb8 "interactive", has_arg = 0, flag = 0x0, val = 105}, {name = 0x41aec4 "timer", has_arg = 1, flag = 0x0, val = 116}, {name = 0x41aeca "language", has_arg = 1, flag = 0x0, val = 108}, {name = 0x41aed3 "log", ---Type <return> to continue, or q <return> to quit--- has_arg = 1, flag = 0x0, val = 76}, {name = 0x41aed7 "null", has_arg = 1, flag = 0x0, val = 110}, {name = 0x418b90 "pager", has_arg = 1, flag = 0x0, val = 124}, {name = 0x41aedc "port", has_arg = 1, flag = 0x0, val = 112}, {name = 0x41aee1 "rows", has_arg = 1, flag = 0x0, val = 114}, {name = 0x41aee6 "statement", has_arg = 1, flag = 0x0, val = 115}, {name = 0x41a8f9 "user", has_arg = 1, flag = 0x0, val = 117}, {name = 0x41aef0 "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x41aef8 "width", has_arg = 1, flag = 0x0, val = 119}, {name = 0x41aefe "Xdebug", has_arg = 0, flag = 0x0, val = 88}, {name = 0x41887a "timezone", has_arg = 0, flag = 0x0, val = 122}, {name = 0x41af05 "allow-remote", has_arg = 0, flag = 0x0, val = 82}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}} priv = {f = 0x0, buf = 0x0} (gdb) (gdb) Maybe mnstr_printf()is called for every tuple rendered ? (gdb) info break Num Type Disp Enb Address What 1 breakpoint keep y 0x00007fbebb7d12ba in mnstr_printf at stream.c:5221 breakpoint already hit 1549255 times continue (gdb) System Information ================== $ mserver5 --version MonetDB 5 server 11.33.3 (Apr2019) (64-bit, 128-bit integers) Copyright (c) 1993 - July 2008 CWI Copyright (c) August 2008 - 2019 MonetDB B.V., all rights reserved Visit https://www.monetdb.org/ for further information Found 2015.5GiB available memory, 128 available cpu cores Libraries: libpcre: 8.32 2012-11-30 openssl: OpenSSL 1.0.1e-fips 11 Feb 2013 libxml2: 2.9.1 Compiled by: arshad (x86_64-pc-linux-gnu) Compilation: gcc -std=gnu99 -g3 Linking : /usr/bin/ld -m elf_x86_64 -Wl,-Bsymbolic-functions $ uname -a Linux hostname 3.10.0-693.el7.x86_64 1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux You have mail in /var/spool/mail/monetadmin s $ ]$ cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core) Reproducible: Always ### Steps to Reproduce: 1. mclient -h hostname -p 5011 -u USER -d DB < ./atest.sql (SQL pulling upto 288 - 300 million tuples) ### Expected Results: Should show improved performance. ## Comment 27305 Date: 2019-09-19 18:18:59 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; Hi Arshad, The performance is limited by the way the data is serialized and transferred across the network. Our current implementation is using mapi (protocol version 9) which serializes all data (also numeric/date/binary data) to strings and combines field values into a formatted row string. This is far from optimal for large amount of data set, as in your case. We are aware of this limitation. Some research and development of a new protocol (internally called PROTOCOL_10) has been done, but its not completed, nor planned. As a workaround you could do: - use mclient on the server to pull the data from the server (without going over the network) into a (optionally compressed) file and ftp the file. See also: https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/ExportingBulkData You can also do this if you want to load large amounts of data into the database. See: https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/LoadingBulkData Sometimes people transfer large amounts of data as they want to do some client side data processing on it and then store the results back into the database. If that is the case, you should consider to use a User Defined Function (or Procedure or Aggregate), which can do the processing in the database server. We support UDFs written in PL/SQL, C, C++, Python and R. See: https://www.monetdb.org/Documentation/Manuals/SQLreference/Functions FYI: mclient is not using ODBC, but mapi (MonetDB client/server communication API). The MonetDB ODBC driver is also using mapi.
Pulling huge data via ODBC is very slow (with standard rendering of output)
https://api.github.com/repos/MonetDB/MonetDB/issues/6760/comments
0
2020-11-30T16:50:31Z
2024-06-28T10:11:48Z
https://github.com/MonetDB/MonetDB/issues/6760
753,637,749
6,760
[ "MonetDB", "MonetDB" ]
Date: 2019-09-13 16:35:53 +0200 From: @yzchang To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.11 (Apr2019-SP1) CC: @PedroTadim, @yzchang Last updated: 2019-11-28 10:00:05 +0100 ## Comment 27285 Date: 2019-09-13 16:35:53 +0200 From: @yzchang The json_loader() function (from: https://www.monetdb.org/blog/monetdbpython-loader-functions) does not create correct column type for STRINGs. STRINGs are declared as "CHAR" columns. Such tables cannot be dump-restored using 'msqldump', because the dumpt table has incorrect schema. To reproduce: $ cat test.json {"col1": ["apple", "peer"], "col2":["orange", "banana nananana"]} $ mserver5 --set embedded_py=3 $ cat test.sql DROP TABLE if exists tbl; DROP LOADER if exists json_loader; CREATE LOADER json_loader(filename STRING) LANGUAGE PYTHON { import json f = open(filename) _emit.emit(json.load(f)) f.close() }; CREATE TABLE tbl FROM LOADER json_loader('/Users/jennie/tmp/test.json'); SELECT * FROM tbl; $ mclient < test.sql $ msqldump -t tbl > tbl.sql $ cat tbl.sql -- msqldump version 11.33.8 (hg id: 16667eb75b08) dump table tbl -- server: MonetDB v11.33.8 (hg id: 16667eb75b08), 'demo' -- Fri Sep 13 16:33:58 2019 CREATE TABLE "sys"."tbl" ( "col1" CHAR, "col2" CHAR ); COPY 2 RECORDS INTO "sys"."tbl" FROM stdin USING DELIMITERS E'\t',E'\n','"'; "apple" "orange" "peer" "banana nananana" $ mclient -s 'drop table tbl;' operation successful $ mclient < tbl.sql operation successful Failed to import table 'tbl', line 1 field col1 'char(1)' expected in 'apple' ## Comment 27286 Date: 2019-09-13 16:36:56 +0200 From: @yzchang Created attachment 631 test.json sample JSON data > Attached file: [test.json](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6759_test.json_631) (text/plain, 66 bytes) > Description: test.json ## Comment 27287 Date: 2019-09-13 16:37:34 +0200 From: @yzchang Created attachment 632 test.sql The query > Attached file: [test.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6759_test.sql_632) (text/plain, 302 bytes) > Description: test.sql ## Comment 27288 Date: 2019-09-16 10:57:57 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [1dd5b7a992e7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1dd5b7a992e7) 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=1dd5b7a992e7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=1dd5b7a992e7) Changeset description: Added test and fix for bug #6759, (i.e. when creating a string column from the loader, use clob type instead of char)
Python JSON loader creates invalid data type for strings
https://api.github.com/repos/MonetDB/MonetDB/issues/6759/comments
0
2020-11-30T16:50:27Z
2024-06-27T13:06:59Z
https://github.com/MonetDB/MonetDB/issues/6759
753,637,716
6,759
[ "MonetDB", "MonetDB" ]
Date: 2019-09-13 09:48:48 +0200 From: @swingbit To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.11 (Apr2019-SP1) Last updated: 2019-11-28 10:00:04 +0100 ## Comment 27282 Date: 2019-09-13 09:48:48 +0200 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36 Build Identifier: For now I can't make it reproducible in a test. Please see gdb session in attachment. Reproducible: Always MonetDB 5 server 11.33.12 (hg id: ffa5b09707ff) (64-bit, 128-bit integers) This is an unreleased version Copyright (c) 1993 - July 2008 CWI Copyright (c) August 2008 - 2019 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.43 2019-02-23 openssl: OpenSSL 1.1.1c FIPS 28 May 2019 libxml2: 2.9.9 Compiled by: roberto@photon.hq.spinque.com (x86_64-pc-linux-gnu) Compilation: gcc -g3 -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wundef -Wformat=2 -Wformat-overflow=1 -Wno-format-truncation -Wno-format-nonliteral -Wno-cast-function-type -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wno-missing-field-initializers -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wduplicated-cond -Wduplicated-branches -Wrestrict -Wnested-externs -Wno-char-subscripts -Wunreachable-code Linking : /usr/bin/ld -m elf_x86_64 -Wl,-Bsymbolic-functions ## Comment 27283 Date: 2019-09-13 09:49:44 +0200 From: @swingbit Created attachment 630 gdb session > Attached file: [bug6758_gdb.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6758_bug6758_gdb.txt_630) (text/plain, 7234 bytes) > Description: gdb session ## Comment 27292 Date: 2019-09-16 18:59:28 +0200 From: @swingbit Changeset [b87bd0e2f8f8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b87bd0e2f8f8) meant for bug #6757, seems to also fix this crash. ## Comment 27293 Date: 2019-09-16 19:19:52 +0200 From: @sjoerdmullender (In reply to Roberto Cornacchia from comment 2) > Changeset [b87bd0e2f8f8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b87bd0e2f8f8) meant for bug #6757, seems to also fix this crash. Great. Looking again at the stack trace, I'm not surprised.
SIGSEGV in __strcmp_sse2_unaligned()
https://api.github.com/repos/MonetDB/MonetDB/issues/6758/comments
0
2020-11-30T16:50:23Z
2024-06-27T13:06:58Z
https://github.com/MonetDB/MonetDB/issues/6758
753,637,666
6,758
[ "MonetDB", "MonetDB" ]
Date: 2019-09-12 12:34:09 +0200 From: @swingbit To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.11 (Apr2019-SP1) CC: @PedroTadim Last updated: 2019-11-28 10:00:04 +0100 ## Comment 27275 Date: 2019-09-12 12:34:09 +0200 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36 Build Identifier: Thread 1 (Thread 0x7f189e1e6700 (LWP 329)): 0 0x00007f189f8a4e75 in raise () from /lib64/libc.so.6 1 0x00007f189f88f895 in abort () from /lib64/libc.so.6 2 0x00007f189f8e7d4f in __libc_message () from /lib64/libc.so.6 3 0x00007f189f8ee5fc in malloc_printerr () from /lib64/libc.so.6 4 0x00007f189f8effe8 in _int_free () from /lib64/libc.so.6 5 0x00007f189f8f23f6 in _int_realloc () from /lib64/libc.so.6 6 0x00007f189f8f35ab in realloc () from /lib64/libc.so.6 7 0x00007f18a057779a in GDKrealloc () from /opt/monetdb/lib/libbat.so.18 8 0x00007f189e873c6c in stack_push_frame () from /opt/monetdb/lib/monetdb5/lib_sql.so 9 0x00007f189e880d0b in rel_selects () from /opt/monetdb/lib/monetdb5/lib_sql.so 10 0x00007f189e890163 in schema_selects () from /opt/monetdb/lib/monetdb5/lib_sql.so 11 0x00007f189e89de6f in rel_schemas () from /opt/monetdb/lib/monetdb5/lib_sql.so 12 0x00007f189e87d628 in rel_with_query () from /opt/monetdb/lib/monetdb5/lib_sql.so 13 0x00007f189e880b7d in rel_selects () from /opt/monetdb/lib/monetdb5/lib_sql.so 14 0x00007f189e890163 in schema_selects () from /opt/monetdb/lib/monetdb5/lib_sql.so 15 0x00007f189e89de6f in rel_schemas () from /opt/monetdb/lib/monetdb5/lib_sql.so 16 0x00007f189e7c863d in sql_symbol2relation () from /opt/monetdb/lib/monetdb5/lib_sql.so 17 0x00007f189e7df3e8 in SQLparser () from /opt/monetdb/lib/monetdb5/lib_sql.so 18 0x00007f18a075a34c in runScenarioBody () from /opt/monetdb/lib/libmonetdb5.so.27 19 0x00007f18a075b17e in runScenario () from /opt/monetdb/lib/libmonetdb5.so.27 20 0x00007f18a075b6e2 in MSserveClient () from /opt/monetdb/lib/libmonetdb5.so.27 21 0x00007f18a075bd8d in MSscheduleClient () from /opt/monetdb/lib/libmonetdb5.so.27 --Type <RET> for more, q to quit, c to continue without paging-- 22 0x00007f18a07e77e6 in doChallenge () from /opt/monetdb/lib/libmonetdb5.so.27 23 0x00007f18a057765d in THRstarter () from /opt/monetdb/lib/libbat.so.18 24 0x00007f18a05f0679 in thread_starter () from /opt/monetdb/lib/libbat.so.18 25 0x00007f189fa3b5a2 in start_thread () from /lib64/libpthread.so.0 26 0x00007f189f968303 in clone () from /lib64/libc.so.6 Reproducible: Always ## Comment 27276 Date: 2019-09-12 12:36:42 +0200 From: @swingbit (By mistake I saved this ticket before completing it) The previous comment shows the backtrace taken from a core dump of a production server. Because it is a production server, there is no debug info. But hopefully the trace should help identifying the culprit. ## Comment 27278 Date: 2019-09-12 14:09:55 +0200 From: @swingbit With a bit of difficulty, I reproduced the issue with a debug compilation. Here the trace again: 0 0x00007f3536c8fa6e in GDKrealloc (s=0x7f352c35aad0, size=9216) at gdk_utils.c:1844 1 0x00007f3534dad9bb in stack_set (sql=0x7f352c3cbc60, var=32, name=0x7f3534ee51b8 "SELECT", type=0x0, rel=0x0, t=0x0, wdef=0x0, exp=0x0, view=0, frame=1) at sql_mvc.c:1548 2 0x00007f3534dae886 in stack_push_frame (sql=0x7f352c3cbc60, name=0x7f3534ee51b8 "SELECT") at sql_mvc.c:1728 3 0x00007f3534dd73da in rel_selects (sql=0x7f352c3cbc60, s=0x7f352c5afe50) at rel_select.c:6481 4 0x00007f3534dd75b4 in schema_selects (sql=0x7f352c3cbc60, schema=0x7f352c18dd10, s=0x7f352c5afe50) at rel_select.c:6522 5 0x00007f3534de97bb in rel_create_view (sql=0x7f352c3cbc60, ss=0x0, qname=0x7f352c5afef0, column_spec=0x0, query=0x7f352c5afe50, check=0, persistent=0, replace=0) at rel_schema.c:1197 6 0x00007f3534df0477 in rel_schemas (sql=0x7f352c3cbc60, s=0x7f352c5afff0) at rel_schema.c:2718 7 0x00007f3534db5f8a in rel_semantic (sql=0x7f352c3cbc60, s=0x7f352c5afff0) at rel_semantic.c:164 8 0x00007f3534db79a3 in rel_with_query (sql=0x7f352c3cbc60, q=0x7f352c610f00) at rel_select.c:320 9 0x00007f3534dd739c in rel_selects (sql=0x7f352c3cbc60, s=0x7f352c610f00) at rel_select.c:6474 10 0x00007f3534dd75b4 in schema_selects (sql=0x7f352c3cbc60, schema=0x7f352c18dd10, s=0x7f352c610f00) at rel_select.c:6522 11 0x00007f3534de97bb in rel_create_view (sql=0x7f352c3cbc60, ss=0x0, qname=0x7f352c599b00, column_spec=0x0, query=0x7f352c610f00, check=0, persistent=1, replace=0) at rel_schema.c:1197 12 0x00007f3534df0477 in rel_schemas (sql=0x7f352c3cbc60, s=0x7f352c611000) at rel_schema.c:2718 13 0x00007f3534db5f8a in rel_semantic (sql=0x7f352c3cbc60, s=0x7f352c611000) at rel_semantic.c:164 14 0x00007f3534cdcdb4 in sql_symbol2relation (c=0x7f352c3cbc60, sym=0x7f352c611000) at sql.c:119 15 0x00007f3534cffe21 in SQLparser (c=0x7f35358fe380) at sql_scenario.c:1255 16 0x00007f3536f4927c in runPhase (c=0x7f35358fe380, phase=1) at mal_scenario.c:517 17 0x00007f3536f49381 in runScenarioBody (c=0x7f35358fe380, once=0) at mal_scenario.c:541 18 0x00007f3536f49649 in runScenario (c=0x7f35358fe380, once=0) at mal_scenario.c:580 19 0x00007f3536f4b3c6 in MSserveClient (c=0x7f35358fe380) at mal_session.c:525 20 0x00007f3536f4ae8e in MSscheduleClient (command=0x7f352c107310 '\333' <repeats 127 times>, "۽\275\275\275\275\275\275\275!", challenge=0x7f353469be2b "hX56kdyN30", fin=0x7f352c3581a0, fout=0x7f35300050e0, protocol=PROTOCOL_9, blocksize=8190) at mal_session.c:403 21 0x00007f3536ff8b09 in doChallenge (data=0x7f3530004e90) at mal_mapi.c:271 22 0x00007f3536c8da0e in THRstarter (a=0x7f35300092b0) at gdk_utils.c:1419 23 0x00007f3536d07824 in thread_starter (arg=0x40dce10) at gdk_system.c:650 24 0x00007f3535fd95a2 in start_thread () from /lib64/libpthread.so.0 25 0x00007f3535f06303 in clone () from /lib64/libc.so.6 The failing realloc happens in stack_set(). The arguments of the realloc are: (gdb) p *(struct sql_var *)s $12 = {name = 0x7f352c587690 "\333\333\333\333\333\333\333\333\001\023", a = {isnull = 0, tpe = {type = 0x38ee980, digits = 32, scale = 0}, data = {val = {ival = 0, oval = 893353197568, shval = 0, btval = 0 '\000', fval = 0, pval = 0xd000000000, bval = 0, sval = 0xd000000000 <error: Cannot access memory at address 0xd000000000>, dval = 4.4137512452077664e-312, lval = 893353197568, hval = 368934882367544229888}, len = 4, vtype = 5}, d = 0, varid = 0}, t = 0x0, rel = 0x0, wdef = 0x0, exp = 0x0, view = 0 '\000', frame = 0 '\000', visited = 0 '\000'} (gdb) p size $13 = 9216 ## Comment 27279 Date: 2019-09-12 15:10:30 +0200 From: @sjoerdmullender Any chance you can share the way how to reproduce this? Also, what are the values of the variables in stack frame 1? Perhaps do "bt full". ## Comment 27280 Date: 2019-09-12 17:24:08 +0200 From: @swingbit In short, for both questions: not soon. It is very hard to reproduce in an isolated example, for now. I could make it but it will require some digging. Also, because it was on a production server, I had to rollback to Aug2018, so I can't inspect it anymore. To reproduce the error I will have to reproduce the same deployment with the same data in a sandbox. I hope to have time in the coming days. ## Comment 27284 Date: 2019-09-13 10:42:02 +0200 From: @swingbit Sjoerd, I reproduced the error, here is a "bt full", I don't know why it is slightly different. The original one failed with SIGABRT (also in debug mode), this one fails with SIGSEGV on memset (exact same code, just compiled on a different machine). Still, it is clearly the same bug: Thread 39 "mserver5" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fe10e142700 (LWP 32382)] 0x00007fe13b73a987 in __memset_erms () from /lib64/libc.so.6 (gdb) bt full 0 0x00007fe13b73a987 in __memset_erms () from /lib64/libc.so.6 No symbol table info available. 1 0x00007fe13c60dde2 in GDKrealloc (s=0x7fe104152590, size=9216) at /home/roberto/MonetDBServer/MonetDB.Spinque_Apr2019/src/gdk/gdk_utils.c:1848 nsize = 9216 asize = 140604411479728 osize = 140604411479728 os = 0x7fe1051ed7f0 __PRETTY_FUNCTION__ = "GDKrealloc" 2 0x00007fe12d2bf120 in stack_set (sql=0x7fe10517b700, var=32, name=0x7fe12d3f86f0 "SELECT", type=0x0, rel=0x0, t=0x0, wdef=0x0, exp=0x0, view=0, frame=1) at /home/roberto/MonetDBServer/MonetDB.Spinque_Apr2019/src/sql/server/sql_mvc.c:1548 _ptr = 0x7fe104152590 _size = 9216 _res = 0x7fe10508d0f0 v = 0x7fe10508e040 nvars = 0x7fe0f007f790 nextsize = 64 __func__ = "stack_set" 3 0x00007fe12d2bffeb in stack_push_frame (sql=0x7fe10517b700, name=0x7fe12d3f86f0 "SELECT") at /home/roberto/MonetDBServer/MonetDB.Spinque_Apr2019/src/sql/server/sql_mvc.c:1728 res = 0x7fe10508d0f0 4 0x00007fe12d2e8bd7 in rel_selects (sql=0x7fe10517b700, s=0x7fe10508f260) at /home/roberto/MonetDBServer/MonetDB.Spinque_Apr2019/src/sql/server/rel_select.c:6481 ek = {type = 0 '\000', card = 4 '\004', reduce = 1 '\001'} sn = 0x7fe10508f260 ret = 0x0 5 0x00007fe12d2e8db1 in schema_selects (sql=0x7fe10517b700, schema=0x7fe0f007f180, s=0x7fe10508f260) at /home/roberto/MonetDBServer/MonetDB.Spinque_Apr2019/src/sql/server/rel_select.c:6522 res = 0x7fe104fa1040 os = 0x7fe0f007f180 6 0x00007fe12d2fb015 in rel_create_view (sql=0x7fe10517b700, ss=0x0, qname=0x7fe10508f300, column_spec=0x0, query=0x7fe10508f260, check=0, persistent=0, replace=0) at /home/roberto/MonetDBServer/MonetDB.Spinque_Apr2019/src/sql/server/rel_schema.c:1197 sq = 0x0 q = 0x7fe104005be0 "-- -1\n-- \ncreate view s0_ifthenelse_1_result_result as with q0_x0 as (select 0 as a1, a2, prob from (select paramname as a1, value as a2, prob from params_str where paramname = 's0_keyword') as t__x7)"... name = 0x7fe10508e340 '\333' <repeats 199 times>, <incomplete sequence \333>... sname = 0x0 s = 0x7fe0f007f180 t = 0x0 instantiate = 1 deps = 0 create = 0 base = 0x7fe12d3fa7d9 "CREATE" __func__ = "rel_create_view" 7 0x00007fe12d301cd1 in rel_schemas (sql=0x7fe10517b700, s=0x7fe10508f400) at /home/roberto/MonetDBServer/MonetDB.Spinque_Apr2019/src/sql/server/rel_schema.c:2718 l = 0x7fe10508f2e0 ret = 0x0 __PRETTY_FUNCTION__ = "rel_schemas" 8 0x00007fe12d2c76ef in rel_semantic (sql=0x7fe10517b700, s=0x7fe10508f400) at /home/roberto/MonetDBServer/MonetDB.Spinque_Apr2019/src/sql/server/rel_semantic.c:164 No locals. 9 0x00007fe12d2c91a0 in rel_with_query (sql=0x7fe10517b700, q=0x7fe1051c4e30) at /home/roberto/MonetDBServer/MonetDB.Spinque_Apr2019/src/sql/server/rel_select.c:320 sym = 0x7fe10508f400 dn = 0x7fe10508f340 name = 0x7fe10508e340 '\333' <repeats 199 times>, <incomplete sequence \333>... nrel = 0x7fe1051ed8b0 d = 0x7fe10508f420 next = 0x7fe1051c4d50 rel = 0x7fe13c8042a8 <GDKthreads+168> __PRETTY_FUNCTION__ = "rel_with_query" --Type <RET> for more, q to quit, c to continue without paging-- 10 0x00007fe12d2e8b99 in rel_selects (sql=0x7fe10517b700, s=0x7fe1051c4e30) at /home/roberto/MonetDBServer/MonetDB.Spinque_Apr2019/src/sql/server/rel_select.c:6474 ret = 0x0 11 0x00007fe12d2e8db1 in schema_selects (sql=0x7fe10517b700, schema=0x7fe0f007f180, s=0x7fe1051c4e30) at /home/roberto/MonetDBServer/MonetDB.Spinque_Apr2019/src/sql/server/rel_select.c:6522 res = 0x0 os = 0x7fe0f007f180 12 0x00007fe12d2fb015 in rel_create_view (sql=0x7fe10517b700, ss=0x0, qname=0x7fe105078f10, column_spec=0x0, query=0x7fe1051c4e30, check=0, persistent=1, replace=0) at /home/roberto/MonetDBServer/MonetDB.Spinque_Apr2019/src/sql/server/rel_schema.c:1197 sq = 0x0 q = 0x7fe104005be0 "-- -1\n-- \ncreate view s0_ifthenelse_1_result_result as with q0_x0 as (select 0 as a1, a2, prob from (select paramname as a1, value as a2, prob from params_str where paramname = 's0_keyword') as t__x7)"... name = 0x7fe105078ef0 '\333' <repeats 199 times>, <incomplete sequence \333>... sname = 0x0 s = 0x7fe0f007f180 t = 0x0 instantiate = 0 deps = 0 create = 1 base = 0x7fe12d3fa7d9 "CREATE" __func__ = "rel_create_view" 13 0x00007fe12d301cd1 in rel_schemas (sql=0x7fe10517b700, s=0x7fe1051c4f30) at /home/roberto/MonetDBServer/MonetDB.Spinque_Apr2019/src/sql/server/rel_schema.c:2718 l = 0x7fe1051c4e50 ret = 0x0 __PRETTY_FUNCTION__ = "rel_schemas" 14 0x00007fe12d2c76ef in rel_semantic (sql=0x7fe10517b700, s=0x7fe1051c4f30) at /home/roberto/MonetDBServer/MonetDB.Spinque_Apr2019/src/sql/server/rel_semantic.c:164 No locals. 15 0x00007fe12d1ede38 in sql_symbol2relation (c=0x7fe10517b700, sym=0x7fe1051c4f30) at /home/roberto/MonetDBServer/MonetDB.Spinque_Apr2019/src/sql/backends/monet5/sql.c:119 r = 0x0 16 0x00007fe12d210f4f in SQLparser (c=0x7fe12dbff380) at /home/roberto/MonetDBServer/MonetDB.Spinque_Apr2019/src/sql/backends/monet5/sql_scenario.c:1255 r = 0x7fe10e1419c0 in = 0x7fe1044881e0 out = 0x7fe108002b90 msg = 0x0 be = 0x7fe104485420 m = 0x7fe10517b700 oldvtop = 1 oldstop = 1 pstatus = 0 err = 0 opt = 0 q = 0x7fe1050a8f80 '\333' <repeats 199 times>, <incomplete sequence \333>... __func__ = "SQLparser" __PRETTY_FUNCTION__ = "SQLparser" (gdb) p *sql $7 = {errstr = '\333' <repeats 8191 times>..., sa = 0xdbdbdbdbdbdbdbdb, qc = 0xdbdbdbdbdbdbdbdb, clientid = -606348325, scanner = {rs = 0xdbdbdbdbdbdbdbdb, ws = 0xdbdbdbdbdbdbdbdb, log = 0xdbdbdbdbdbdbdbdb, yynext = -606348325, yylast = -606348325, yysval = -606348325, yyval = -606348325, yycur = -606348325, yybak = -37 '\333', as = -606348325, key = -606348325, started = -606348325, mode = (LINE_N | unknown: 3688618970), schema = 0xdbdbdbdbdbdbdbdb <error: Cannot access memory at address 0xdbdbdbdbdbdbdbdb>, errstr = 0xdbdbdbdbdbdbdbdb <error: Cannot access memory at address 0xdbdbdbdbdbdbdbdb>}, sqs = 0xdbdbdbdbdbdbdbdb, params = 0xdbdbdbdbdbdbdbdb, forward = 0xdbdbdbdbdbdbdbdb, vars = 0xdbdbdbdbdbdbdbdb, topvars = -606348325, sizevars = -606348325, frame = -606348325, use_views = -606348325, args = 0xdbdbdbdbdbdbdbdb, argc = -606348325, argmax = -606348325, sym = 0xdbdbdbdbdbdbdbdb, no_mitosis = -606348325, user_id = -606348325, role_id = -606348325, last_id = -2604246222170760229, rowcnt = -2604246222170760229, timezone = -606348325, cache = -606348325, caching = -606348325, reply_size = -606348325, sizeheader = 219, debug = -606348325, Topt = -2604246222170760229, emode = -37 '\333', emod = -37 '\333', session = 0xdbdbdbdbdbdbdbdb, type = -606348325, pushdown = -606348325, label = -606348325, remote = -606348325, cascade_action = 0xdbdbdbdbdbdbdbdb, opt_stats = {-606348325, -606348325, -606348325, -606348325, -606348325, -606348325, -606348325, -606348325}, result_id = -606348325, results = 0xdbdbdbdbdbdbdbdb} ## Comment 27289 Date: 2019-09-16 17:34:04 +0200 From: @swingbit Created attachment 633 SQL script to reproduce the bug > Attached file: [bug6757.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6757_bug6757.sql_633) (application/sql, 37476 bytes) > Description: SQL script to reproduce the bug ## Comment 27290 Date: 2019-09-16 17:35:51 +0200 From: @swingbit Added script to reproduce the crash. No data needed, just the schema. ## Comment 27291 Date: 2019-09-16 18:47:25 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [b87bd0e2f8f8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b87bd0e2f8f8) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=b87bd0e2f8f8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=b87bd0e2f8f8) Changeset description: Don't overwrite m->vars and m->sizevars with stale values. This fixes bug #6757. ## Comment 27294 Date: 2019-09-16 19:59:42 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [302e9c2c813d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=302e9c2c813d) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=302e9c2c813d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=302e9c2c813d) Changeset description: Test for bug #6757.
Double free or corruption (out)
https://api.github.com/repos/MonetDB/MonetDB/issues/6757/comments
0
2020-11-30T16:50:19Z
2024-06-27T13:06:56Z
https://github.com/MonetDB/MonetDB/issues/6757
753,637,617
6,757
[ "MonetDB", "MonetDB" ]
Date: 2019-09-09 12:18:57 +0200 From: jpastuszek To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.11 (Apr2019-SP1) CC: @PedroTadim Last updated: 2019-11-28 10:00:02 +0100 ## Comment 27270 Date: 2019-09-09 12:18:57 +0200 From: jpastuszek User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:70.0) Gecko/20100101 Firefox/70.0 Build Identifier: With two tables merged and selecting more than 4 columns with LIMIT expression I get "Error in optimizer garbageCollector". Note that this is a regression in SP1 as this query was working fine in Apr2019. Reproducible: Always ### Steps to Reproduce: 1. Create tables like this: CREATE SCHEMA logs; CREATE MERGE TABLE logs.test_message ( logentry_no BIGINT, logentry_id STRING, processed_timestamp TIMESTAMP, timestamp TIMESTAMP, logsource STRING, logsource_environment STRING, logsource_service STRING, logsource_location STRING, logsource_subsystem STRING, program STRING, program_type STRING, program_name STRING, program_log STRING, program_source STRING, program_thread STRING, log_level STRING, tags JSON, syslog_severity STRING, syslog_facility STRING, syslog_tag STRING, message STRING, structured_data JSON ) CREATE TABLE logs.test_message_20190909 ( logentry_no BIGINT GENERATED ALWAYS AS IDENTITY ( START WITH 2019090900000000000 INCREMENT BY 1 MINVALUE 2019090900000000000 MAXVALUE 2019090999999999999 CACHE 50 CYCLE ), logentry_id STRING, processed_timestamp TIMESTAMP, timestamp TIMESTAMP, logsource STRING, logsource_environment STRING, logsource_service STRING, logsource_location STRING, logsource_subsystem STRING, program STRING, program_type STRING, program_name STRING, program_log STRING, program_source STRING, program_thread STRING, log_level STRING, tags JSON, syslog_severity STRING, syslog_facility STRING, syslog_tag STRING, message STRING, structured_data JSON ) CREATE TABLE logs.test_message_20190910 ( logentry_no BIGINT GENERATED ALWAYS AS IDENTITY ( START WITH 2019090900000000000 INCREMENT BY 1 MINVALUE 2019090900000000000 MAXVALUE 2019090999999999999 CACHE 50 CYCLE ), logentry_id STRING, processed_timestamp TIMESTAMP, timestamp TIMESTAMP, logsource STRING, logsource_environment STRING, logsource_service STRING, logsource_location STRING, logsource_subsystem STRING, program STRING, program_type STRING, program_name STRING, program_log STRING, program_source STRING, program_thread STRING, log_level STRING, tags JSON, syslog_severity STRING, syslog_facility STRING, syslog_tag STRING, message STRING, structured_data JSON ) ALTER TABLE logs.test_message ADD TABLE logs.test_message_20190909; ALTER TABLE logs.test_message ADD TABLE logs.test_message_20190910; 2. Run this query SELECT timestamp AS timestamp , logentry_no AS logentry_no, logsource AS logsource, program AS program FROM logs.test_message WHERE processed_timestamp >= '2019-09-09 01:23:58.949' AND processed_timestamp <= '2019-09-09 17:38:58.949' ORDER BY timestamp LIMIT 2000 3. Run this query SELECT timestamp AS timestamp , logentry_no AS logentry_no, logsource AS logsource --, program AS program FROM logs.test_message WHERE processed_timestamp >= '2019-09-09 01:23:58.949' AND processed_timestamp <= '2019-09-09 17:38:58.949' ORDER BY timestamp LIMIT 2000 ### Actual Results: First query fails with "SQL Error [42000]: Error in optimizer garbageCollector". ### Expected Results: Both queries to give empty result set. I have two systems running Apr2019-SP1 and both fail this query. Similar query to this but with 'AND NOT' WHERE condition works. Adding 'AND NOT program_type = 'foo'' also makes the issue to go away. ## Comment 27271 Date: 2019-09-09 15:44:48 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [6c30e2e3c8e5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6c30e2e3c8e5) 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=6c30e2e3c8e5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=6c30e2e3c8e5) Changeset description: Added test for Bug #6756 ## Comment 27272 Date: 2019-09-09 17:20:48 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [0c293f27828b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0c293f27828b) 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=0c293f27828b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=0c293f27828b) Changeset description: Fix for bug #6756, i.e. test for existence of an ordering column in the projection list, adding only if it does not exist yet ## Comment 27273 Date: 2019-09-10 11:53:19 +0200 From: jpastuszek I have patched my MonetDB servers and looks like the issue is resolved. Thank you for your prompt response!
Error in optimizer garbageCollector on merge tables select
https://api.github.com/repos/MonetDB/MonetDB/issues/6756/comments
0
2020-11-30T16:50:15Z
2024-06-27T13:06:55Z
https://github.com/MonetDB/MonetDB/issues/6756
753,637,566
6,756
[ "MonetDB", "MonetDB" ]
Date: 2019-09-06 11:54:48 +0200 From: @joerivanruth To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.11 (Apr2019-SP1) CC: @njnes Last updated: 2019-11-28 10:00:05 +0100 ## Comment 27265 Date: 2019-09-06 11:54:48 +0200 From: @joerivanruth User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0 Build Identifier: Running the attached script crashes mserver5. This happens on default, on Apr2019-SP1 and on Apr2019. I bisected the problem, it starts occurring at commit changeset: 68198:2c50b80d80c7 branch: Apr2019 user: Niels Nes <niels@cwi.nl> date: Wed Jan 30 12:31:21 2019 +0100 summary: used patch from feature request Bug #6326, added cleanup of the Reproducible: Always ### Steps to Reproduce: Run the attached demo.sh. Be careful, it kills all mserver5 processes and rm -rf's $PWD/foo! ### Actual Results: mserver5: /home/jvr/monets/Apr2019_SP1/src/sql/backends/monet5/rel_bin.c:673: exp_bin: Assertion `s' failed. ## Comment 27266 Date: 2019-09-06 11:56:18 +0200 From: @joerivanruth Created attachment 628 reproducer script > Attached file: [demo.sh](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6755_demo.sh_628) (application/x-shellscript, 231 bytes) > Description: reproducer script ## Comment 27267 Date: 2019-09-06 11:56:45 +0200 From: @joerivanruth Created attachment 629 second part of reproducer script > Attached file: [demo.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6755_demo.sql_629) (application/sql, 1153 bytes) > Description: second part of reproducer script ## Comment 27268 Date: 2019-09-06 15:04:35 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [c110701164ef](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c110701164ef) 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=c110701164ef](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=c110701164ef) Changeset description: Added test for bug #6755 ## Comment 27269 Date: 2019-09-07 14:59:57 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [48c24a608176](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=48c24a608176) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=48c24a608176](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=48c24a608176) Changeset description: make sure we keep the rank/project expression in all intermediate relational operators (projections), solves bug #6755.
Assertion failure in rel_bin.c
https://api.github.com/repos/MonetDB/MonetDB/issues/6755/comments
0
2020-11-30T16:50:10Z
2024-06-27T13:06:54Z
https://github.com/MonetDB/MonetDB/issues/6755
753,637,510
6,755
[ "MonetDB", "MonetDB" ]
Date: 2019-09-05 18:58:28 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: clients devs &lt;<bugs-clients>&gt; Version: 11.33.11 (Apr2019-SP1) CC: @PedroTadim Last updated: 2020-01-02 16:51:45 +0100 ## Comment 27263 Date: 2019-09-05 18:58:28 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0 Build Identifier: In mclient a message "auto commit mode: on" is reported when issueing a "set schema sys;" command on the command line. As setting/changing the current working schema is not changing the transaction state, I do not understand why it is reported to the user! I would expected a normal message "operation successful" to be reported as is done when issueing other set commands. Reproducible: Always ### Steps to Reproduce: 1. start mserver5 2. start mclient 3. enter commands: set schema sys; set schema json; set role monetdb; declare a int; set a = 4; set schema sys; ### Actual Results: sql>set schema sys; auto commit mode: on sql>set schema json; auto commit mode: on sql>set role monetdb; operation successful sql>declare a int; operation successful sql>set a = 4; operation successful sql>set schema sys; auto commit mode: on sql> ### Expected Results: sql>set schema sys; operation successful sql>set schema json; operation successful sql>set role monetdb; operation successful sql>declare a int; operation successful sql>set a = 4; operation successful sql>set schema sys; auto commit mode: on sql> Analysing mclient.c lines 1932..1937 where the message is printed, it appears the server has classified the "set schema sys;" command as Q_TRANS (mapi_get_querytype(hdl) == Q_TRANS). That is probably incorrectly set by the server. In jdbcclient the message "Connection warning: Server enabled auto commit mode while local state already was auto commit." is reported. ## Comment 27264 Date: 2019-09-05 19:17:12 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [7a0d8d038d0f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7a0d8d038d0f) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=7a0d8d038d0f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=7a0d8d038d0f) Changeset description: Change message printed by mclient. This fixes bug #6754. ## Comment 27502 Date: 2020-01-02 16:51:45 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [e1b1297f0222](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e1b1297f0222) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=e1b1297f0222](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=e1b1297f0222) Changeset description: Add test for bug #6754
in mclient a strang msg is reported after issueing command: set schema sys;
https://api.github.com/repos/MonetDB/MonetDB/issues/6754/comments
0
2020-11-30T16:50:07Z
2024-06-27T13:06:53Z
https://github.com/MonetDB/MonetDB/issues/6754
753,637,469
6,754
[ "MonetDB", "MonetDB" ]
Date: 2019-08-20 13:56:17 +0200 From: @drstmane To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) Last updated: 2019-08-20 16:13:51 +0200 ## Comment 27249 Date: 2019-08-20 13:56:17 +0200 From: @drstmane trying to bulk-load from a compressed (bz2,xz,gz) CSV file using COPY OFFSET 3 INTO "data" FROM '$PWD/data.csv.bz2' DELIMITERS ',','\r\n','' NULL AS ''; fails with "Failed to import table 'data', incomplete record at end of file" The problem occurs with Apr2019_release (Apr2019_3), Apr2019_SP1_release (APR2019_7) and the latest head of the Apr2019 branch (changeset ad472c9f29d3). ## Comment 27250 Date: 2019-08-20 14:03:03 +0200 From: @drstmane Please find a test at http://homepages.cwi.nl/~manegold/Bug-6753.tar ## Comment 27251 Date: 2019-08-20 14:15:33 +0200 From: @sjoerdmullender Try delimiter '\n' instead of '\r\n'. ## Comment 27252 Date: 2019-08-20 16:13:51 +0200 From: @drstmane Thanks! Indeed, all MonetDB decompression code seems to silently replace '\r\n' (CRLF) by '\n' (LF) during decompression (at least on non-Windows systems, i.e., on systems where '\n' (LF) is the standard end-of-line marker, rather than '\r\n' (CRLF)). The plain (non-compressed) CSV reader, however, seems to not do such replacement. Consequently, when loading from CSV files that do contain '\r\n' (CRLF) line-endings, MonetDB's copy into need to specify delimiter '\r\n' when loading from a plain (uncompressed) CSV file, and delimiter '\n' when loading from a compressed CSV file. Otherwise, when using '\r\n' with compressed files, the error reported here occurs, and when using '\n' on plain (uncompressed) CSV files, '\r' occurs in the loaded data (provided the last column is a clob/string/varchar/char(-like; i.e., non-numerical) column). Please take this as an implicit documentation of this current "inconsistency" in the MonetDB code base.
SQL COPY INTO FROM compressed (bz2,xz,gz) file fails
https://api.github.com/repos/MonetDB/MonetDB/issues/6753/comments
0
2020-11-30T16:50:04Z
2024-06-28T13:09:10Z
https://github.com/MonetDB/MonetDB/issues/6753
753,637,430
6,753
[ "MonetDB", "MonetDB" ]
Date: 2019-08-19 23:59:10 +0200 From: @mlkersten To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) Last updated: 2019-08-19 23:59:10 +0200 ## Comment 27246 Date: 2019-08-19 23:59:10 +0200 From: @mlkersten User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Firefox/68.0 Build Identifier: It would be handy if the textual description of a table is kept up-do-date and around in the sys._tables. The same holds for sequences,... Reproducible: Always
Keep the original textual description in the _tables
https://api.github.com/repos/MonetDB/MonetDB/issues/6752/comments
0
2020-11-30T16:50:00Z
2024-06-28T10:11:53Z
https://github.com/MonetDB/MonetDB/issues/6752
753,637,377
6,752
[ "MonetDB", "MonetDB" ]
Date: 2019-08-19 18:07:46 +0200 From: Arshad &lt;<arshad.super>&gt; To: clients devs &lt;<bugs-clients>&gt; Version: 11.33.3 (Apr2019) Last updated: 2019-09-02 16:05:28 +0200 ## Comment 27241 Date: 2019-08-19 18:07:46 +0200 From: Arshad &lt;<arshad.super>&gt; User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0 Build Identifier: Hi, We encountered seg fault (sometimes double free or invalid pointer) with the latest ODBC driver. This is seen when the SQL is ran from 'isql' and SQL contains "fn ucase". This seems to be a regression as this is only failing under Monet11.13 and Monet11.33 odbc driver. I captured two cases which is put below. First Case. =========== SQL> select count(*) from "test5" where name = (({fn UCASE("name")} = {fn UCASE('tests')}) or ({fn UCASE("name")} = {fn UCASE('test')})); *** Error in `isql': free(): invalid pointer: 0x0000000001c6f910 *** ======= Backtrace: ========= /lib64/libc.so.6(+0x7c619)[0x7f2484664619] /root/monet11_33_3/lib/libMonetODBC.so(+0x1ddaf)[0x7f247d839daf] /root/monet11_33_3/lib/libMonetODBC.so(+0x40a10)[0x7f247d85ca10] /root/monet11_33_3/lib/libMonetODBC.so(SQLPrepare+0x160)[0x7f247d85d847] /lib64/libodbc.so.2(SQLPrepare+0x211)[0x7f248523b811] isql[0x403eed] isql[0x401e35] /lib64/libc.so.6(__libc_start_main+0xf5)[0x7f2484609c05] isql[0x402c39] ======= Memory map: ======== Core was generated by `isql -v voc'. Program terminated with signal 6, Aborted. 0 0x00007f248461d1f7 in raise () from /lib64/libc.so.6 (gdb) bt 0 0x00007f248461d1f7 in raise () from /lib64/libc.so.6 1 0x00007f248461e8e8 in abort () from /lib64/libc.so.6 2 0x00007f248465cf47 in __libc_message () from /lib64/libc.so.6 3 0x00007f2484664619 in _int_free () from /lib64/libc.so.6 4 0x00007f247d839daf in ODBCTranslateSQL (dbc=0x1c3f220, query=0x1c1cfe0 "select count(*) from \"test5\" where name = (({fn UCASE(\"name\")} = {fn UCASE('tests')}) or ({fn UCASE(\"name\")} = {fn UCASE('test')}));", length=132, noscan=0) at ODBCUtil.c:831 5 0x00007f247d85ca10 in MNDBPrepare (stmt=0x1c5b070, StatementText=0x1c1cfe0 "select count(*) from \"test5\" where name = (({fn UCASE(\"name\")} = {fn UCASE('tests')}) or ({fn UCASE(\"name\")} = {fn UCASE('test')}));", TextLength=132) at SQLPrepare.c:81 6 0x00007f247d85d847 in SQLPrepare (StatementHandle=0x1c5b070, StatementText=0x1c1cfe0 "select count(*) from \"test5\" where name = (({fn UCASE(\"name\")} = {fn UCASE('tests')}) or ({fn UCASE(\"name\")} = {fn UCASE('test')}));", TextLength=132) at SQLPrepare.c:335 7 0x00007f248523b811 in SQLPrepare () from /lib64/libodbc.so.2 8 0x0000000000403eed in ExecuteSQL () 9 0x0000000000401e35 in main () (gdb) frame 4 4 0x00007f247d839daf in ODBCTranslateSQL (dbc=0x1c3f220, query=0x1c1cfe0 "select count(*) from \"test5\" where name = (({fn UCASE(\"name\")} = {fn UCASE('tests')}) or ({fn UCASE(\"name\")} = {fn UCASE('test')}));", length=132, noscan=0) at ODBCUtil.c:831 831 free(nquery); (gdb) info locals r = 0x7f247d86bd4b "" scalarfunc = 0x1c6f940 "UCASE(\"name\")} = sys.\"ucase\"('tests')) or (sys.\"ucase\"(\"name\") = sys.\"ucase\"('test')));" scalarfunclen = 5 nargs = 1 func = 0x7f247da7dbe0 <scalars+1728> nloop = 73 args = {{argstart = 0x1c6f946 "\"name\")} = sys.\"ucase\"('tests')) or (sys.\"ucase\"(\"name\") = sys.\"ucase\"('test')));", arglen = 6}, { argstart = 0x7f24845f8d78 "", arglen = 140720825824480}, {argstart = 0x7f247d602588 "`\301|\353\021\017ގ5\274\060\300H\220", <incomplete sequence \335>, arglen = 139794699008040}, {argstart = 0x7ffc1ed5f5f0 "(8`}$\177", arglen = 140720825824736}} nquery = 0x1c6f910 "select count(*) from \"test5\" where name = (({fn UCASE(\"name\")} = sys.\"ucase\"('tests')) or (sys.\"ucase\"(\"name\") = sys.\"ucase\"('test')));" p = 0x1c6f94e " = sys.\"ucase\"('tests')) or (sys.\"ucase\"(\"name\") = sys.\"ucase\"('test')));" q = 0x1c6f880 "select count(*) from \"test5\" where name = ((sys.\"ucase\"(\"name\") = sys.\"ucase\"('tests')) or (sys.\"ucase\"(\"name\") = sys.\"ucase\"('test')));" buf = "\220\071`}$\177\000\000\270ǁ}$\177\000\000\000\000\000\000\001\000\000\000\304\000\000\000\001\000\000\000 \000\000\000\000\000\000\000\250\366\325\036\374\177\000\000\200\366\325\036\374\177\000\000\001", '\000' <repeats 15 times>, "\020e\303\001\000\000\000\000\260a\303\001\000\000\000\000\337\317H\205$\177", '\000' <repeats 18 times>, "\001\000\000\000$\177\000\000\000\000\000\000\000\000\000\000\001\000\000\000$\177\000\000\260a\303\001\000\000\000\000\300\366\325\036\374\177\000\000`\241\333\036\374\177\000\000\000\000\000\000\000\000\000\000\001", '\000' <repeats 15 times>, "\be\303\001\000\000\000\000`\266\303\001\000\000\000\000\340"... yr = 32548 mt = 2105662816 dy = 0 hr = 29583248 mn = 0 sc = 0 fr = 0 n = 44 ---Type <return> to continue, or q <return> to quit--- pr = 63 iterCount = 4 (gdb) Second Case =========== SQL> select count(*) from "test5" where name = (({fn UCASE("name")} = {fn UCASE('BOWLllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllgggggggggggggggggggggggggggggg')}) or ({fn UCASE("name")} = {fn UCASE('BOWLllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')})); *** Error in `isql': double free or corruption (!prev): 0x0000000001d941e0 *** Core was generated by `isql -v voc'. Program terminated with signal 11, Segmentation fault. 0 0x00007f2560499418 in _int_free () from /lib64/libc.so.6 Missing separate debuginfos, use: debuginfo-install unixODBC-2.3.1-11.el7.x86_64 (gdb) bt 0 0x00007f2560499418 in _int_free () from /lib64/libc.so.6 1 0x00007f255966edaf in ODBCTranslateSQL (dbc=0x14c1220, query=0x149efe0 "select count(*) from \"test5\" where name = (({fn UCASE(\"name\")} = {fn UCASE('BOWL", 'l' <repeats 64 times>, 'g' <repeats 30 times>, "')}) or ({fn UCASE(\"name\")"..., length=358, noscan=0) at ODBCUtil.c:831 2 0x00007f2559691a10 in MNDBPrepare (stmt=0x14c24d0, StatementText=0x149efe0 "select count(*) from \"test5\" where name = (({fn UCASE(\"name\")} = {fn UCASE('BOWL", 'l' <repeats 64 times>, 'g' <repeats 30 times>, "')}) or ({fn UCASE(\"name\")"..., TextLength=358) at SQLPrepare.c:81 3 0x00007f2559692847 in SQLPrepare (StatementHandle=0x14c24d0, StatementText=0x149efe0 "select count(*) from \"test5\" where name = (({fn UCASE(\"name\")} = {fn UCASE('BOWL", 'l' <repeats 64 times>, 'g' <repeats 30 times>, "')}) or ({fn UCASE(\"name\")"..., TextLength=358) at SQLPrepare.c:335 4 0x00007f2561070811 in SQLPrepare () from /lib64/libodbc.so.2 5 0x0000000000403eed in ExecuteSQL () 6 0x0000000000401e35 in main () (gdb) frame 1 1 0x00007f255966edaf in ODBCTranslateSQL (dbc=0x14c1220, query=0x149efe0 "select count(*) from \"test5\" where name = (({fn UCASE(\"name\")} = {fn UCASE('BOWL", 'l' <repeats 64 times>, 'g' <repeats 30 times>, "')}) or ({fn UCASE(\"name\")"..., length=358, noscan=0) at ODBCUtil.c:831 831 free(nquery); (gdb) info locals r = 0x7f25596a0d4b "" scalarfunc = 0x14f329b "UCASE(\"name\")} = sys.\"ucase\"('BOWL", 'l' <repeats 96 times>, 'a' <repeats 37 times>, "')));" scalarfunclen = 5 nargs = 1 func = 0x7f25598b2be0 <scalars+1728> nloop = 73 args = {{argstart = 0x14f32a1 "\"name\")} = sys.\"ucase\"('BOWL", 'l' <repeats 96 times>, 'a' <repeats 37 times>, "')));", arglen = 6}, { argstart = 0x1d15fd24f <Address 0x1d15fd24f out of bounds>, arglen = 139798520796612}, {argstart = 0x0, arglen = 139798509391616}, { argstart = 0x5 <Address 0x5 out of bounds>, arglen = 9}} nquery = 0x14f31e0 "select count(*) from \"test5\" where name = (({fn UCASE(\"name\")} = {fn UCASE('BOWL", 'l' <repeats 64 times>, 'g' <repeats 30 times>, "')}) or ({fn UCASE(\"name\")"... p = 0x14f32a9 " = sys.\"ucase\"('BOWL", 'l' <repeats 96 times>, 'a' <repeats 37 times>, "')));" q = 0x14f3350 "select count(*) from \"test5\" where name = (({fn UCASE(\"name\")} = {fn UCASE('BOWL", 'l' <repeats 64 times>, 'g' <repeats 30 times>, "')}) or (sys.\"ucase\"(\"name"... buf = "\260\211\362$\374\177\000\000\240\211\362$\374\177\000\000(\000\000\000%\177\000\000\230\207CY%\177\000\000\000\000\000\000\000\000\000\000\350\214La%\177\000\000\230\231La%\177\000\000\243'\005a%\177\000\000P.~`%\177\000\000\210\t\005a%\177\000\000\000\000\000\000\001\000\000\000f\000\000\000\001\000\000\000\220\211CY%\177\000\000h\212\362$\374\177\000\000@\212\362$\374\177\000\000\001\000\000\000\000\000\000\000\350\214La%\177\000\000\260\211Ma%\177\000\000X\206Ma%\177\000\000\337\037,a%\177\000\000\000\000\000\000\000\000\000\000\350\214La%\177\000\000\001", '\000' <repeats 15 times>, "\001\000\000\000\000\000\000\000"... yr = 32549 mt = 1618876560 dy = 32549 hr = 1618873184 mn = 32764 sc = 619874464 fr = 0 n = 183 ---Type <return> to continue, or q <return> to quit--- pr = 202 iterCount = 2 (gdb) System Details =============== isql --version unixODBC 2.3.1 /root/monet11_33_3/bin/monetdb --version MonetDB Database Server Toolkit v11.33.3 (Apr2019) /root/monet11_33_3/bin/monetdbd --version MonetDB Database Server v11.33.3 (Apr2019) /root/monet11_33_3/bin/mserver5 --version MonetDB 5 server 11.33.3 (Apr2019) (64-bit, 128-bit integers) Copyright (c) 1993 - July 2008 CWI Copyright (c) August 2008 - 2019 MonetDB B.V., all rights reserved Visit https://www.monetdb.org/ for further information Found 1.8GiB available memory, 1 available cpu core Libraries: libpcre: 8.32 2012-11-30 openssl: OpenSSL 1.0.2k-fips 26 Jan 2017 libxml2: 2.9.1 Compiled by: root@localhost.localdomain (x86_64-pc-linux-gnu) Compilation: gcc -std=gnu99 -g3 Linking : /usr/bin/ld -m elf_x86_64 -Wl,-Bsymbolic-functions uname -a Linux localhost.localdomain 3.10.0-693.el7.x86_64 1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Reproducible: Always ### Steps to Reproduce: 1. create table TEST5 (id int, name varchar(50)); 2. INSERT into TEST5 values(5, 'five'); 3. select count(*) from "test5" where name = (({fn UCASE("name")} = {fn UCASE('tests')}) or ({fn UCASE("name")} = {fn UCASE('test')})); ### Actual Results: Seg Fault. (Details are in description) ### Expected Results: Success. (Or if tables are not found proper error message) however no seg fault. ## Comment 27244 Date: 2019-08-19 21:26:50 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [f11717ef2858](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f11717ef2858) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=f11717ef2858](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=f11717ef2858) Changeset description: Update length after realloc. This fixes bug #6751. ## Comment 27245 Date: 2019-08-19 21:27:52 +0200 From: @sjoerdmullender Turned out to be an off-by-one error causing writing outside of an allocated buffer. Fixed now. ## Comment 27247 Date: 2019-08-20 08:47:28 +0200 From: Arshad &lt;<arshad.super>&gt; Thanks Sjoerd. This fix passed our basic sanity test.
ODBC driver(11.33.3) Seg Faults when "fn ucase" is used in SQL
https://api.github.com/repos/MonetDB/MonetDB/issues/6751/comments
0
2020-11-30T16:49:56Z
2024-06-27T13:06:50Z
https://github.com/MonetDB/MonetDB/issues/6751
753,637,342
6,751
[ "MonetDB", "MonetDB" ]
Date: 2019-08-19 17:03:50 +0200 From: @PedroTadim To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) Last updated: 2020-06-03 16:58:53 +0200 ## Comment 27237 Date: 2019-08-19 17:03:50 +0200 From: @PedroTadim User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36 Build Identifier: Do the reproducible steps. Reproducible: Always ### Steps to Reproduce: 1. create table tab1 (col1 clob); 2. create remote table tab1 (col1 clob, col2 int) on 'mapi:monetdb://<remote server>'; --on another server 3. select col2 from tab1; --this crashes the remote server. ### Actual Results: SIGSEV on exps_mark_used ### Expected Results: An error should be thrown saying the column doesn't exist. Thread 24 "mserver5" received signal SIGSEGV, Segmentation fault. exps_mark_used (sa=0x7fffc4001800, rel=0x7fffc40f4230, subrel=0x7fffc40f3f00) at ../../../src/sql/server/rel_optimizer.c:6079 6079 exps[0]->used = 1; Missing separate debuginfos, use: dnf debuginfo-install libpq-11.5-1.fc30.x86_64 (gdb) bt 0 exps_mark_used (sa=0x7fffc4001800, rel=0x7fffc40f4230, subrel=0x7fffc40f3f00) at ../../../src/sql/server/rel_optimizer.c:6079 1 0x00007fffe87b382d in rel_mark_used (sql=0x7fffc40111f0, rel=0x7fffc40f4230, proj=1) at ../../../src/sql/server/rel_optimizer.c:6187 2 0x00007fffe87b49f5 in rel_dce_sub (sql=0x7fffc40111f0, rel=0x7fffc40f4230) at ../../../src/sql/server/rel_optimizer.c:6677 3 0x00007fffe87b4e06 in rel_dce (sql=0x7fffc40111f0, rel=0x7fffc40f4230) at ../../../src/sql/server/rel_optimizer.c:6771 4 0x00007fffe87c1b57 in optimize_rel (sql=0x7fffc40111f0, rel=0x7fffc40f4230, g_changes=0x7fffd4893120, level=0, value_based_opt=0) at ../../../src/sql/server/rel_optimizer.c:9703 5 0x00007fffe87c1e01 in optimize (sql=0x7fffc40111f0, rel=0x7fffc40f4230, value_based_opt=0) at ../../../src/sql/server/rel_optimizer.c:9779 6 0x00007fffe87c1f10 in rel_optimizer (sql=0x7fffc40111f0, rel=0x7fffc40f4230, value_based_opt=0) at ../../../src/sql/server/rel_optimizer.c:9795 7 0x00007fffe869b018 in RAstatement2 (cntxt=0x7fffe91086e0, mb=0x7fffc4005d30, stk=0x7fffc400a850, pci=0x7fffc40ee710) at ../../../../src/sql/backends/monet5/sql_execute.c:1004 8 0x00007ffff7dc30e8 in runMALsequence (cntxt=0x7fffe91086e0, mb=0x7fffc4005d30, startpc=1, stoppc=0, stk=0x7fffc400a850, env=0x7fffc400a850, pcicaller=0x0) at ../../../src/monetdb5/mal/mal_interpreter.c:647 9 0x00007ffff7dc1774 in runMAL (cntxt=0x7fffe91086e0, mb=0x7fffc4005d30, mbcaller=0x0, env=0x7fffc400a850) at ../../../src/monetdb5/mal/mal_interpreter.c:336 10 0x00007ffff7df2d1c in MALengine (c=0x7fffe91086e0) at ../../../src/monetdb5/mal/mal_session.c:752 11 0x00007ffff7def9db in runPhase (c=0x7fffe91086e0, phase=4) at ../../../src/monetdb5/mal/mal_scenario.c:517 12 0x00007ffff7defb77 in runScenarioBody (c=0x7fffe91086e0, once=0) at ../../../src/monetdb5/mal/mal_scenario.c:547 13 0x00007ffff7defda8 in runScenario (c=0x7fffe91086e0, once=0) at ../../../src/monetdb5/mal/mal_scenario.c:580 14 0x00007ffff7df1ba9 in MSserveClient (c=0x7fffe91086e0) at ../../../src/monetdb5/mal/mal_session.c:525 15 0x00007ffff7df1671 in MSscheduleClient (command=0x7fffc4003610 '\275' <repeats 200 times>..., challenge=0x7fffd4895cbb "e8JertRm", fin=0x7fffc4007580, fout=0x7fffd0007180, protocol=PROTOCOL_9, blocksize=8190) at ../../../src/monetdb5/mal/mal_session.c:403 16 0x00007ffff7e9f511 in doChallenge (data=0x7fffd0004f10) at ../../../../src/monetdb5/modules/mal/mal_mapi.c:271 17 0x00007ffff7b33cc8 in THRstarter (a=0x7fffd0009270) at ../../src/gdk/gdk_utils.c:1415 18 0x00007ffff7badda2 in thread_starter (arg=0x7fffbc0039e0) at ../../src/gdk/gdk_system.c:650 19 0x00007ffff6d685a2 in start_thread (arg=<optimized out>) at pthread_create.c:486 20 0x00007ffff6c95303 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 ## Comment 27238 Date: 2019-08-19 17:10:59 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [1d9ee75506c2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1d9ee75506c2) 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=1d9ee75506c2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=1d9ee75506c2) Changeset description: Added test for bug #6750. ## Comment 27253 Date: 2019-08-23 11:04:49 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [83441f76c441](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=83441f76c441) 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=83441f76c441](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=83441f76c441) Changeset description: Updated bug #6750 test with another issue: remote tables referencing merge tables in a loop ## Comment 27579 Date: 2020-02-24 15:55:25 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [39e8f7c93323](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=39e8f7c93323) 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=39e8f7c93323](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=39e8f7c93323) Changeset description: Progress for bug #6750 resolution, ie whenever an error is found at rel_read, set it and throw it ## Comment 27580 Date: 2020-02-25 10:55:06 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [b0dc972ef4c0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b0dc972ef4c0) 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=b0dc972ef4c0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=b0dc972ef4c0) Changeset description: Final fix for bug #6750, ie send an extra string with the expected output types for the sending relation and verify it at the other side
Executing a query on a non-existing column on a remote table crashes the remote server
https://api.github.com/repos/MonetDB/MonetDB/issues/6750/comments
0
2020-11-30T16:36:49Z
2024-06-27T13:06:49Z
https://github.com/MonetDB/MonetDB/issues/6750
753,627,712
6,750
[ "MonetDB", "MonetDB" ]
Date: 2019-08-18 14:50:39 +0200 From: @drstmane To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) CC: @PedroTadim Last updated: 2019-09-02 16:05:26 +0200 ## Comment 27230 Date: 2019-08-18 14:50:39 +0200 From: @drstmane when trying to restart the MonetDB server (mserver5) after having dropped with "cascade" a column that holds a (unique) constraint, the restart fails with a segfault (non-debug build), respectively aborts with mserver5: .../MonetDB/sql/storage/store.c:276: load_keycolumn: Assertion `kc->c' failed. (debug build) ## Comment 27231 Date: 2019-08-18 14:56:23 +0200 From: @drstmane This bug appears with Apr2019_release (Apr2019_3), Apr2019_SP1_release (Apr2019_7) and current head of Apr2019 branch (changeset 6eda988176b3). ## Comment 27232 Date: 2019-08-18 15:01:22 +0200 From: @drstmane Created attachment 625 test script > Attached file: [Bug-6749.sh](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6749_Bug-6749.sh_625) (application/x-shellscript, 1680 bytes) > Description: test script ## Comment 27234 Date: 2019-08-19 10:05:02 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [965b25376303](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=965b25376303) 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=965b25376303](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=965b25376303) Changeset description: Added test for bug #6749 ## Comment 27235 Date: 2019-08-19 13:47:37 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [925022b81bac](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=925022b81bac) 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=925022b81bac](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=925022b81bac) Changeset description: Fix for bug #6749 (i.e. when copying the key definition to the transaction's table, create a dependency for unique keys as well) ## Comment 27239 Date: 2019-08-19 17:13:36 +0200 From: @drstmane Hi Pedro, thanks for your fix! While this indeed seems to work for the provided test case, in my larger case (on propriatory data), mserver5 5 now segfaults during the "drop columns .. cascade" ... I still need to understand what extra code (or different data?) in my larger test case triggers this segfault ... ## Comment 27240 Date: 2019-08-19 17:41:23 +0200 From: @drstmane segfault when drop is in same transaction as create: $ cat Bug-6749.sql start transaction; create table t (a int, b int, c int); alter table t add unique (b); \d t select * from t; alter table t drop column b cascade; \d t select * from t; commit; select * from t; \d t drop table t; \d t select * from t; $ mclient -p50505 -dMyDB -i -e < Bug-6749.sql start transaction; auto commit mode: off create table t (a int, b int, c int); operation successful alter table t add unique (b); operation successful CREATE TABLE "sys"."t" ( "a" INTEGER, "b" INTEGER, "c" INTEGER, CONSTRAINT "t_b_unique" UNIQUE ("b") ); select * from t; +---+---+---+ | a | b | c | +===+===+===+ +---+---+---+ 0 tuples Thread 61 "mserver5" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffd2199700 (LWP 7206)] sys_drop_key (tr=0x25d4640, k=0x26da830, drop_action=1) at /export/scratch1/home/manegold/_/Monet/release/source/MonetDB/sql/storage/store.c:4366 4366 for (n = k->columns->h; n; n = n->next) { Missing separate debuginfos, use: dnf debuginfo-install R-core-3.5.0-4.fc28.x86_64 SuperLU-5.2.0-7.fc28.x86_64 armadillo-8.600.0-1.fc28.x86_64 arpack-3.5.0-6.fc28.x86_64 atlas-3.10.3-5.fc28.x86_64 blas-3.8.0-9.fc28.x86_64 boost-atomic-1.66.0-8.fc28.x86_64 boost-chrono-1.66.0-8.fc28.x86_64 boost-date-time-1.66.0-8.fc28.x86_64 boost-filesystem-1.66.0-8.fc28.x86_64 boost-iostreams-1.66.0-8.fc28.x86_64 boost-program-options-1.66.0-8.fc28.x86_64 boost-regex-1.66.0-8.fc28.x86_64 boost-system-1.66.0-8.fc28.x86_64 boost-thread-1.66.0-8.fc28.x86_64 bzip2-libs-1.0.6-26.fc28.x86_64 cfitsio-3.430-1.fc28.x86_64 cyrus-sasl-lib-2.1.27-0.2rc7.fc28.x86_64 expat-2.2.5-3.fc28.x86_64 fontconfig-2.13.0-4.fc28.x86_64 freetype-2.8-10.fc28.x86_64 freexl-1.0.5-1.fc28.x86_64 gdal-libs-2.2.4-2.fc28.x86_64 geos-3.6.1-8.fc28.x86_64 giflib-5.1.4-1.fc28.x86_64 hdf5-1.8.20-3.fc28.x86_64 jasper-libs-2.0.14-5.fc28.x86_64 jbigkit-libs-2.1-12.fc28.x86_64 json-c-0.13.1-2.fc28.x86_64 keyutils-libs-1.5.10-6.fc28.x86_64 krb5-libs-1.16.1-13.fc28.x86_64 lapack-3.8.0-9.fc28.x86_64 laszip-2.2.0-10.fc28.x86_64 lcms2-2.9-2.fc28.x86_64 libaec-1.0.2-3.fc28.x86_64 libatomic_ops-7.6.2-3.fc28.x86_64 libcom_err-1.44.2-0.fc28.x86_64 libcurl-7.59.0-5.fc28.x86_64 libdap-3.18.3-4.fc27.x86_64 libgcc-8.1.1-5.fc28.x86_64 libgeotiff-1.4.0-12.fc28.x86_64 libgfortran-8.1.1-5.fc28.x86_64 libgomp-8.1.1-5.fc28.x86_64 libgta-1.0.7-7.fc28.x86_64 libicu-60.2-2.fc28.x86_64 libidn2-2.0.5-1.fc28.x86_64 libjpeg-turbo-1.5.3-6.fc28.x86_64 libkml-1.3.0-10.fc28.x86_64 liblas-1.8.0-21.fc28.x86_64 libnghttp2-1.32.0-1.fc28.x86_64 libpng-1.6.34-6.fc28.x86_64 libpsl-0.20.2-2.fc28.x86_64 libquadmath-8.1.1-5.fc28.x86_64 libselinux-2.8-1.fc28.x86_64 libspatialite-4.3.0a-8.fc28.x86_64 libssh-0.7.5-7.fc28.x86_64 libstdc++-8.1.1-5.fc28.x86_64 libtiff-4.0.9-10.fc28.x86_64 libtirpc-1.0.3-3.rc2.fc28.x86_64 libtool-ltdl-2.4.6-24.fc28.x86_64 libunistring-0.9.10-1.fc28.x86_64 libuuid-2.32.1-1.fc28.x86_64 libwebp-1.0.0-1.fc28.x86_64 libxcrypt-4.1.1-4.fc28.x86_64 libxml2-2.9.8-4.fc28.x86_64 lz4-libs-1.8.1.2-4.fc28.x86_64 mariadb-connector-c-3.0.5-1.fc28.x86_64 minizip-1.2.11-8.fc28.x86_64 ncurses-libs-6.1-5.20180224.fc28.x86_64 netcdf-4.4.1.1-9.fc28.x86_64 nspr-4.19.0-1.fc28.x86_64 nss-3.38.0-1.0.fc28.x86_64 nss-util-3.38.0-1.0.fc28.x86_64 ogdi-3.2.1-1.fc28.x86_64 openblas-Rblas-0.3.2-1.fc28.x86_64 openblas-openmp-0.3.2-1.fc28.x86_64 openblas-threads-0.3.2-1.fc28.x86_64 openjpeg2-2.3.0-6.fc28.x86_64 openldap-2.4.46-2.fc28.x86_64 openssl-libs-1.1.0h-3.fc28.x86_64 pcre-8.42-2.fc28.x86_64 pcre2-10.31-8.fc28.x86_64 poppler-0.62.0-4.fc28.x86_64 postgresql-libs-10.4-1.fc28.x86_64 proj-4.9.3-6.fc28.x86_64 readline-7.0-11.fc28.x86_64 snappy-1.1.7-5.fc28.x86_64 sqlite-libs-3.22.0-4.fc28.x86_64 tre-0.8.0-22.20140228gitc2f5d13.fc28.x86_64 unixODBC-2.3.5-3.fc28.x86_64 uriparser-0.8.5-1.fc28.x86_64 xerces-c-3.2.1-1.fc28.x86_64 xz-libs-5.2.4-2.fc28.x86_64 zlib-1.2.11-8.fc28.x86_64 (gdb) bt 0 sys_drop_key (tr=0x25d4640, k=0x26da830, drop_action=1) at /export/scratch1/home/manegold/_/Monet/release/source/MonetDB/sql/storage/store.c:4366 1 0x00007fffeebd7320 in sql_trans_drop_key (tr=0x25d4640, s=0x2650860, id=8978, drop_action=1) at /export/scratch1/home/manegold/_/Monet/release/source/MonetDB/sql/storage/store.c:6191 2 0x00007fffeebccf32 in sql_trans_drop_all_dependencies (tr=0x25d4640, s=0x2650860, id=8975, type=3) at /export/scratch1/home/manegold/_/Monet/release/source/MonetDB/sql/storage/store.c:4270 3 0x00007fffeebce0d6 in sys_drop_column (tr=0x25d4640, col=0x26da480, drop_action=2) at /export/scratch1/home/manegold/_/Monet/release/source/MonetDB/sql/storage/store.c:4505 4 0x00007fffeebd4da3 in sql_trans_drop_column (tr=0x25d4640, t=0x26da180, id=8975, drop_action=2) at /export/scratch1/home/manegold/_/Monet/release/source/MonetDB/sql/storage/store.c:5731 5 0x00007fffeeaf05b8 in mvc_drop_column (m=0x7fff4000b750, t=0x26da180, col=0x26da480, drop_action=1) at /export/scratch1/home/manegold/_/Monet/release/source/MonetDB/sql/server/sql_mvc.c:1394 6 0x00007fffeea6e777 in alter_table (cntxt=0x7fffefe4d380, sql=0x7fff4000b750, sname=0x7fff40136ae0 "sys", t=0x7fff40229b70) at /export/scratch1/home/manegold/_/Monet/release/source/MonetDB/sql/backends/monet5/sql_cat.c:847 7 0x00007fffeea70878 in SQLalter_table (cntxt=0x7fffefe4d380, mb=0x7fff401e1a00, stk=0x7fff40134ab0, pci=0x7fff40135980) at /export/scratch1/home/manegold/_/Monet/release/source/MonetDB/sql/backends/monet5/sql_cat.c:1140 8 0x00007ffff79ccd57 in runMALsequence (cntxt=0x7fffefe4d380, mb=0x7fff401e1a00, startpc=1, stoppc=0, stk=0x7fff40134ab0, env=0x0, pcicaller=0x0) at /export/scratch1/home/manegold/_/Monet/release/source/MonetDB/monetdb5/mal/mal_interpreter.c:647 9 0x00007ffff79cb3e1 in runMAL (cntxt=0x7fffefe4d380, mb=0x7fff401e1a00, mbcaller=0x0, env=0x0) at /export/scratch1/home/manegold/_/Monet/release/source/MonetDB/monetdb5/mal/mal_interpreter.c:336 10 0x00007fffeea451b2 in SQLrun (c=0x7fffefe4d380, be=0x7fff40004500, m=0x7fff4000b750) at /export/scratch1/home/manegold/_/Monet/release/source/MonetDB/sql/backends/monet5/sql_execute.c:384 11 0x00007fffeea46ce0 in SQLengineIntern (c=0x7fffefe4d380, be=0x7fff40004500) at /export/scratch1/home/manegold/_/Monet/release/source/MonetDB/sql/backends/monet5/sql_execute.c:809 12 0x00007fffeea433fc in SQLengine (c=0x7fffefe4d380) at /export/scratch1/home/manegold/_/Monet/release/source/MonetDB/sql/backends/monet5/sql_scenario.c:1381 13 0x00007ffff79f9601 in runPhase (c=0x7fffefe4d380, phase=4) at /export/scratch1/home/manegold/_/Monet/release/source/MonetDB/monetdb5/mal/mal_scenario.c:517 14 0x00007ffff79f979d in runScenarioBody (c=0x7fffefe4d380, once=0) at /export/scratch1/home/manegold/_/Monet/release/source/MonetDB/monetdb5/mal/mal_scenario.c:547 15 0x00007ffff79f99ce in runScenario (c=0x7fffefe4d380, once=0) at /export/scratch1/home/manegold/_/Monet/release/source/MonetDB/monetdb5/mal/mal_scenario.c:580 16 0x00007ffff79fb7e1 in MSserveClient (c=0x7fffefe4d380) at /export/scratch1/home/manegold/_/Monet/release/source/MonetDB/monetdb5/mal/mal_session.c:525 17 0x00007ffff79fb2a6 in MSscheduleClient (command=0x7fff40000b30 "0B", challenge=0x7fffd2198cbb "T1fEySDwZ", fin=0x7fff40002b90, fout=0x7fffcc002da0, protocol=PROTOCOL_9, blocksize=8190) at /export/scratch1/home/manegold/_/Monet/release/source/MonetDB/monetdb5/mal/mal_session.c:403 18 0x00007ffff7aa8909 in doChallenge (data=0x7fffcc000b30) at /export/scratch1/home/manegold/_/Monet/release/source/MonetDB/monetdb5/modules/mal/mal_mapi.c:271 19 0x00007ffff753dcfb in THRstarter (a=0x7fffcc004e90) at /export/scratch1/home/manegold/_/Monet/release/source/MonetDB/gdk/gdk_utils.c:1415 20 0x00007ffff75b7d61 in thread_starter (arg=0x2212e00) at /export/scratch1/home/manegold/_/Monet/release/source/MonetDB/gdk/gdk_system.c:650 21 0x00007ffff4611594 in start_thread () from /lib64/libpthread.so.0 22 0x00007ffff43450df in clone () from /lib64/libc.so.6 (gdb) l 4361 4362 if (is_oid_nil(rid)) 4363 return ; 4364 table_funcs.table_delete(tr, syskey, rid); 4365 4366 for (n = k->columns->h; n; n = n->next) { 4367 sql_kc *kc = n->data; 4368 sys_drop_kc(tr, k, kc); 4369 } 4370 /* remove key from schema */ (gdb) p rid $1 = 24 (gdb) p k $2 = (sql_key *) 0x26da830 (gdb) p *k $3 = {base = {wtime = 0, rtime = 0, stime = 0, allocated = 0, flags = 1, refcnt = 1, id = 8978, name = 0x26da890 "t_b_unique"}, type = ukey, idx = 0x26da620, columns = 0x0, t = 0x26da180, drop_action = 0} (gdb) p k->columns $4 = (struct list *) 0x0 (gdb) ## Comment 27242 Date: 2019-08-19 20:01:04 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [ccf704516cc6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ccf704516cc6) 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=ccf704516cc6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=ccf704516cc6) Changeset description: More fixes for bug #6749 (i.e. when dropping a key, clean the key from the table's keyset only after removing the underlying storage information (dependant action)) ## Comment 27243 Date: 2019-08-19 20:03:51 +0200 From: @PedroTadim Thank you Dr. Stefan for your reports. I just committed a fix for your latest issue.
mserver5 restart aborts/segfaults after dropping column with constraint
https://api.github.com/repos/MonetDB/MonetDB/issues/6749/comments
0
2020-11-30T16:36:44Z
2024-06-27T13:06:48Z
https://github.com/MonetDB/MonetDB/issues/6749
753,627,641
6,749
[ "MonetDB", "MonetDB" ]
Date: 2019-08-14 10:18:57 +0200 From: @drstmane To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) CC: @njnes Last updated: 2019-09-02 16:05:26 +0200 ## Comment 27215 Date: 2019-08-14 10:18:57 +0200 From: @drstmane I have a situation where after bulk-loading CSV data (8k rows in a 696 column table) and then adding/removing columns, the removed columns are only usable while the server is still running, but "disappear" after a server restart. Also, before the restart, the added columns seem to be missing in the SQL catalogue (sys.columns) and (hence?) in the ANALYZE-generates sys.statistics . For now, I only have a showcase with non-public data that I cannot share in this bug report. I'll try to find time to reproduce it with public/synthetic data. Till then, maybe this already rings a bell with someone? I happens with both Apr2019 feature release and Apr2019-SP1 bugfix release candidate/preview. ## Comment 27217 Date: 2019-08-14 11:41:44 +0200 From: @drstmane Created attachment 624 test for bug > Attached file: [Bug-6748.tar](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6748_Bug-6748.tar_624) (application/x-tar, 665600 bytes) > Description: test for bug ## Comment 27218 Date: 2019-08-14 11:47:13 +0200 From: @drstmane Test added as attachment to this bug report. if the added column is also declared as foreign key, restarting the server fails with 2019-08-14 11:45:06 ERR DBname[8848]: mserver5: /export/scratch1/home/manegold/_/Monet/release/source/MonetDB/sql/storage/store.c:406: load_idxcolumn: Assertion `kc->c' failed. (or segfault in case not debug build) ## Comment 27219 Date: 2019-08-14 12:23:10 +0200 From: @njnes The server failed to create the needed binary tables. Fix is coming soon. ## Comment 27220 Date: 2019-08-14 12:28:49 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [164eee74d3cf](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=164eee74d3cf) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=164eee74d3cf](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=164eee74d3cf) Changeset description: fixes for bug #6748 - incase of new tables the delta's bid isn't used yet, so also alters should not use it - added error messages when delta structure creation fails ## Comment 27229 Date: 2019-08-18 14:44:10 +0200 From: @drstmane Many thanks for the instant fix! Appears to work perfectly, now.
MonetDB "forgets" columns after ALTER TABLE statements
https://api.github.com/repos/MonetDB/MonetDB/issues/6748/comments
0
2020-11-30T16:36:41Z
2024-06-27T13:06:47Z
https://github.com/MonetDB/MonetDB/issues/6748
753,627,597
6,748
[ "MonetDB", "MonetDB" ]
Date: 2019-08-14 09:42:01 +0200 From: @drstmane To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) Last updated: 2019-08-14 09:42:59 +0200 ## Comment 27214 Date: 2019-08-14 09:42:01 +0200 From: @drstmane Since changing the MonetDB bulkloader's default behaviour accordingly is most probably no option, I'd love to have a, say, "LITERAL" option for the COPY INTO FROM statement that prevents MonetDB's bulkloader from (trying to) interpret(ing) any backslashes ('\') or any other quoting, other than handling given string delimiters appropriately. Thanks! Stefan
Add "LITERAL" option to COPY INTO FROM that prevents MonetDB's bulk loader from (trying to) be(ing) "smart"
https://api.github.com/repos/MonetDB/MonetDB/issues/6747/comments
0
2020-11-30T16:36:38Z
2024-06-28T10:11:57Z
https://github.com/MonetDB/MonetDB/issues/6747
753,627,550
6,747
[ "MonetDB", "MonetDB" ]
Date: 2019-08-13 20:42:12 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) Last updated: 2019-08-13 20:42:12 +0200 ## Comment 27213 Date: 2019-08-13 20:42:12 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:68.0) Gecko/20100101 Firefox/68.0 Build Identifier: Request to extend the system table sys.sequences with a column 'currentvalue' to also show the currentvalue for each sequence. When implementing this request combine it with adding the column 'datatype' as described in bug #6745 Reproducible: Always ### Steps to Reproduce: select * from sys.sequences; \d sequences ### Actual Results: sql>select * from sys.sequences; +-------+-------+-----------+-------+-------+-------+--------+--------+-------+ | id | schem | name | start | minva | maxva | increm | cachei | cycle | : : a_id : : : lue : lue : ent : nc : : +=======+=======+===========+=======+=======+=======+========+========+=======+ | 22293 | 2000 | seq_22285 | 1 | 0 | 0 | 1 | 1 | false | +-------+-------+-----------+-------+-------+-------+--------+--------+-------+ 1 tuple sql> sql>\d sequences CREATE TABLE "sys"."sequences" ( "id" INTEGER, "schema_id" INTEGER, "name" VARCHAR(256), "start" BIGINT, "minvalue" BIGINT, "maxvalue" BIGINT, "increment" BIGINT, "cacheinc" BIGINT, "cycle" BOOLEAN ); sql> ### Expected Results: sql>select * from sys.sequences; +-------+-----------+-----------+-------+----------+----------+--------------+-----------+----------+-------+ | id | schema_id | name | start | minvalue | maxvalue | currentvalue | increment | cacheinc | cycle | +=======+===========+===========+=======+==========+==========+==============+===========+==========+=======+ | 22293 | 2000 | seq_22285 | 1 | 0 | 0 | 11 | 1 | 1 | false | +-------+-----------+-----------+-------+----------+----------+--------------+-----------+----------+-------+ 1 tuple sql>\d sequences CREATE TABLE "sys"."sequences" ( "id" INTEGER, "schema_id" INTEGER, "name" VARCHAR(256), "datatype" VARCHAR(256), "start" BIGINT, "minvalue" BIGINT, "maxvalue" BIGINT, "currentvalue" BIGINT, "increment" BIGINT, "cacheinc" BIGINT, "cycle" BOOLEAN ); sql> Alternatively we could add a system view to derive the currentvalue column: CREATE OR REPLACE VIEW "sys"."sequences_vw" AS select q.id, schema_id, s.name as schema, q.name, start, minvalue, maxvalue, get_value_for(s.name, q.name) as currentvalue, increment, cacheinc, cycle from "sys"."sequences" q join "sys"."schemas" s on s.id = q.schema_id order by schema, name;
Extend sys.sequences with columns showing the currentvalue and datatype
https://api.github.com/repos/MonetDB/MonetDB/issues/6746/comments
0
2020-11-30T16:36:34Z
2024-06-28T13:39:51Z
https://github.com/MonetDB/MonetDB/issues/6746
753,627,511
6,746
[ "MonetDB", "MonetDB" ]
Date: 2019-08-13 19:35:51 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) CC: @PedroTadim Last updated: 2019-09-12 13:07:13 +0200 ## Comment 27212 Date: 2019-08-13 19:35:51 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:68.0) Gecko/20100101 Firefox/68.0 Build Identifier: Creating sequence with non-integer datatype should not be allowed. Currently they are accepted. It appears the datatype is not used/honered, they default back to an integer (I guess), see steps to reproduce below. Also there is no way to query the sequences datatype after creation. This information should be added to the table sys.sequences (if it is anything other than bigint). Reproducible: Always ### Steps to Reproduce: CREATE SEQUENCE seqBool AS boolean; CREATE SEQUENCE seqChar AS char; CREATE SEQUENCE seqClob AS CLOB; CREATE SEQUENCE seqBlob AS BLOB; CREATE SEQUENCE seqDate AS date; CREATE SEQUENCE seqTime AS time; CREATE SEQUENCE seqInet AS inet; CREATE SEQUENCE seqUuid AS uuid; select schema_id, name, start, minvalue, maxvalue, increment, cacheinc, cycle from sequences; select get_value_for('sys','seqbool'); select get_value_for('sys','seqchar'); select get_value_for('sys','seqclob'); select get_value_for('sys','seqblob'); select get_value_for('sys','seqdate'); select get_value_for('sys','seqtime'); select get_value_for('sys','seqinet'); select get_value_for('sys','sequuid'); select next_value_for('sys','seqbool'); select next_value_for('sys','seqchar'); select next_value_for('sys','seqclob'); select next_value_for('sys','seqblob'); select next_value_for('sys','seqdate'); select next_value_for('sys','seqtime'); select next_value_for('sys','seqinet'); select next_value_for('sys','sequuid'); select NEXT VALUE FOR sys.seqBool; select NEXT VALUE FOR sys.seqChar; select NEXT VALUE FOR sys.seqClob; select NEXT VALUE FOR sys.seqBlob; select NEXT VALUE FOR sys.seqDate; select NEXT VALUE FOR sys.seqTime; select NEXT VALUE FOR sys.seqInet; select NEXT VALUE FOR sys.seqUuid; DROP SEQUENCE seqBool; DROP SEQUENCE seqChar; DROP SEQUENCE seqClob; DROP SEQUENCE seqBlob; DROP SEQUENCE seqDate; DROP SEQUENCE seqTime; DROP SEQUENCE seqInet; DROP SEQUENCE seqUuid; ### Actual Results: sql>CREATE SEQUENCE seqBool AS boolean; operation successful sql>CREATE SEQUENCE seqChar AS char; operation successful sql>CREATE SEQUENCE seqClob AS CLOB; operation successful sql>CREATE SEQUENCE seqBlob AS BLOB; operation successful sql>CREATE SEQUENCE seqDate AS date; operation successful sql>CREATE SEQUENCE seqTime AS time; operation successful sql>CREATE SEQUENCE seqInet AS inet; operation successful sql>CREATE SEQUENCE seqUuid AS uuid; operation successful sql> sql>select schema_id, name, start, minvalue, maxvalue, increment, cacheinc, cycle from sequences; +---------+-----------+-------+---------+---------+---------+---------+-------+ | schema_ | name | start | minvalu | maxvalu | increme | cachein | cycle | : id : : : e : e : nt : c : : +=========+===========+=======+=========+=========+=========+=========+=======+ | 2000 | seqbool | 1 | 0 | 0 | 1 | 1 | false | | 2000 | seqchar | 1 | 0 | 0 | 1 | 1 | false | | 2000 | seqclob | 1 | 0 | 0 | 1 | 1 | false | | 2000 | seqblob | 1 | 0 | 0 | 1 | 1 | false | | 2000 | seqdate | 1 | 0 | 0 | 1 | 1 | false | | 2000 | seqtime | 1 | 0 | 0 | 1 | 1 | false | | 2000 | seqinet | 1 | 0 | 0 | 1 | 1 | false | | 2000 | sequuid | 1 | 0 | 0 | 1 | 1 | false | +---------+-----------+-------+---------+---------+---------+---------+-------+ 8 tuples sql> sql>select get_value_for('sys','seqbool'); +------+ | L2 | +======+ | 1 | +------+ 1 tuple sql>select get_value_for('sys','seqchar'); +------+ | L2 | +======+ | 1 | +------+ 1 tuple sql>select get_value_for('sys','seqclob'); +------+ | L2 | +======+ | 1 | +------+ 1 tuple sql>select get_value_for('sys','seqblob'); +------+ | L2 | +======+ | 1 | +------+ 1 tuple sql>select get_value_for('sys','seqdate'); +------+ | L2 | +======+ | 1 | +------+ 1 tuple sql>select get_value_for('sys','seqtime'); +------+ | L2 | +======+ | 1 | +------+ 1 tuple sql>select get_value_for('sys','seqinet'); +------+ | L2 | +======+ | 1 | +------+ 1 tuple sql>select get_value_for('sys','sequuid'); +------+ | L2 | +======+ | 1 | +------+ 1 tuple sql> sql>select next_value_for('sys','seqbool'); +------+ | L2 | +======+ | 1 | +------+ 1 tuple sql>select next_value_for('sys','seqchar'); +------+ | L2 | +======+ | 1 | +------+ 1 tuple sql>select next_value_for('sys','seqclob'); +------+ | L2 | +======+ | 1 | +------+ 1 tuple sql>select next_value_for('sys','seqblob'); +------+ | L2 | +======+ | 1 | +------+ 1 tuple sql>select next_value_for('sys','seqdate'); +------+ | L2 | +======+ | 1 | +------+ 1 tuple sql>select next_value_for('sys','seqtime'); +------+ | L2 | +======+ | 1 | +------+ 1 tuple sql>select next_value_for('sys','seqinet'); +------+ | L2 | +======+ | 1 | +------+ 1 tuple sql>select next_value_for('sys','sequuid'); +------+ | L2 | +======+ | 1 | +------+ 1 tuple sql> sql>select NEXT VALUE FOR sys.seqBool; +------+ | L2 | +======+ | 2 | +------+ 1 tuple sql>select NEXT VALUE FOR sys.seqChar; +------+ | L2 | +======+ | 2 | +------+ 1 tuple sql>select NEXT VALUE FOR sys.seqClob; +------+ | L2 | +======+ | 2 | +------+ 1 tuple sql>select NEXT VALUE FOR sys.seqBlob; +------+ | L2 | +======+ | 2 | +------+ 1 tuple sql>select NEXT VALUE FOR sys.seqDate; +------+ | L2 | +======+ | 2 | +------+ 1 tuple sql>select NEXT VALUE FOR sys.seqTime; +------+ | L2 | +======+ | 2 | +------+ 1 tuple sql>select NEXT VALUE FOR sys.seqInet; +------+ | L2 | +======+ | 2 | +------+ 1 tuple sql>select NEXT VALUE FOR sys.seqUuid; +------+ | L2 | +======+ | 2 | +------+ 1 tuple sql> sql>DROP SEQUENCE seqBool; operation successful sql>DROP SEQUENCE seqChar; operation successful sql>DROP SEQUENCE seqClob; operation successful sql>DROP SEQUENCE seqBlob; operation successful sql>DROP SEQUENCE seqDate; operation successful sql>DROP SEQUENCE seqTime; operation successful sql>DROP SEQUENCE seqInet; operation successful sql>DROP SEQUENCE seqUuid; operation successful sql> ### Expected Results: Disallow creation of sequences on non-integer datatypes. Extend sys.sequences with "datatype" column, showing the datatype. ## Comment 27221 Date: 2019-08-14 13:31:52 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [d3433f5b5acb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d3433f5b5acb) 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=d3433f5b5acb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=d3433f5b5acb) Changeset description: Added test and fix for bug #6745. ## Comment 27222 Date: 2019-08-14 13:37:37 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [29b761a34680](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=29b761a34680) 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=29b761a34680](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=29b761a34680) Changeset description: Another check for bug #6745 test. ## Comment 27223 Date: 2019-08-14 13:51:30 +0200 From: @PedroTadim Internally MonetDB stores sequences as big integers, so storing the "type" of the sequence is not effective as of now. We should do if we are willing to store other data types as well.
CREATE SEQUENCE seqbool AS boolean (or char or CLOB or BLOB or inet or uuid or other non-integer datatype) should NOT be allowed
https://api.github.com/repos/MonetDB/MonetDB/issues/6745/comments
0
2020-11-30T16:36:31Z
2024-06-27T13:06:44Z
https://github.com/MonetDB/MonetDB/issues/6745
753,627,466
6,745
[ "MonetDB", "MonetDB" ]
Date: 2019-08-13 17:52:41 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) CC: @PedroTadim Last updated: 2019-09-02 16:05:26 +0200 ## Comment 27211 Date: 2019-08-13 17:52:41 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:68.0) Gecko/20100101 Firefox/68.0 Build Identifier: According to the SQL documentation it should be possible to run command: CREATE SEQUENCE seq; However it fails with: Error: syntax error, unexpected SCOLON in: "create sequence seq;" SQLState: 42000 Other RDBMS allow this command without an error. They use default data type bigint, start with 1 and increment by 1. Reproducible: Always ### Steps to Reproduce: create sequence seq; -- this fails create sequence seq1 AS int; create sequence seq2 START WITH 2; create sequence seq3 INCREMENT BY 3; create sequence seq4 MINVALUE 4; create sequence seq5 NO MINVALUE; create sequence seq6 MAXVALUE 6; create sequence seq7 NO MAXVALUE; create sequence seq8 CACHE 8; create sequence seq9 NO CYCLE; create sequence seq0 CYCLE; select schema_id, name, start, minvalue, maxvalue, increment, cacheinc, cycle from sequences; drop sequence seq; drop sequence seq1; drop sequence seq2; drop sequence seq3; drop sequence seq4; drop sequence seq5; drop sequence seq6; drop sequence seq7; drop sequence seq8; drop sequence seq9; drop sequence seq0; ### Actual Results: sql>create sequence seq; syntax error, unexpected SCOLON in: "create sequence seq;" sql>-- this fails sql> sql>create sequence seq1 AS int; operation successful sql>create sequence seq2 START WITH 2; operation successful sql>create sequence seq3 INCREMENT BY 3; operation successful sql>create sequence seq4 MINVALUE 4; operation successful sql>create sequence seq5 NO MINVALUE; operation successful sql>create sequence seq6 MAXVALUE 6; operation successful sql>create sequence seq7 NO MAXVALUE; operation successful sql>create sequence seq8 CACHE 8; operation successful sql>create sequence seq9 NO CYCLE; operation successful sql>create sequence seq0 CYCLE; operation successful sql> sql>select schema_id, name, start, minvalue, maxvalue, increment, cacheinc, cycle from sequences; +---------+-----------+-------+---------+---------+---------+---------+-------+ | schema_ | name | start | minvalu | maxvalu | increme | cachein | cycle | : id : : : e : e : nt : c : : +=========+===========+=======+=========+=========+=========+=========+=======+ | 2000 | seq_22285 | 1 | 0 | 0 | 1 | 1 | false | | 2000 | seq1 | 1 | 0 | 0 | 1 | 1 | false | | 2000 | seq2 | 2 | 0 | 0 | 1 | 1 | false | | 2000 | seq3 | 1 | 0 | 0 | 3 | 1 | false | | 2000 | seq4 | 1 | 4 | 0 | 1 | 1 | false | | 2000 | seq5 | 1 | 0 | 0 | 1 | 1 | false | | 2000 | seq6 | 1 | 0 | 6 | 1 | 1 | false | | 2000 | seq7 | 1 | 0 | 0 | 1 | 1 | false | | 2000 | seq8 | 1 | 0 | 0 | 1 | 8 | false | | 2000 | seq9 | 1 | 0 | 0 | 1 | 1 | false | | 2000 | seq0 | 1 | 0 | 0 | 1 | 1 | false | +---------+-----------+-------+---------+---------+---------+---------+-------+ 11 tuples sql> sql>drop sequence seq; DROP SEQUENCE: no such sequence 'seq' sql>drop sequence seq1; operation successful sql>drop sequence seq2; operation successful sql>drop sequence seq3; operation successful sql>drop sequence seq4; operation successful sql>drop sequence seq5; operation successful sql>drop sequence seq6; operation successful sql>drop sequence seq7; operation successful sql>drop sequence seq8; operation successful sql>drop sequence seq9; operation successful sql>drop sequence seq0; operation successful sql> ### Expected Results: create sequence seq; should succeed without an error Also note that for seq0 the cycle value is false but should have been true. https://www.monetdb.org/Documentation/Manuals/SQLreference/SerialTypes https://www.monetdb.org/Documentation/Manuals/SQLreference/SQLSyntaxOverviewCREATE_SEQUENCE ## Comment 27216 Date: 2019-08-14 11:34:31 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [369967e06405](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=369967e06405) 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=369967e06405](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=369967e06405) Changeset description: Added test and fix for bug #6744.
CREATE SEQUENCE seq; fails
https://api.github.com/repos/MonetDB/MonetDB/issues/6744/comments
0
2020-11-30T16:36:28Z
2024-06-27T13:06:43Z
https://github.com/MonetDB/MonetDB/issues/6744
753,627,419
6,744
[ "MonetDB", "MonetDB" ]
Date: 2019-08-13 17:14:01 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) CC: @njnes Last updated: 2019-09-12 13:08:56 +0200 ## Comment 27210 Date: 2019-08-13 17:14:01 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:68.0) Gecko/20100101 Firefox/68.0 Build Identifier: I expected that NEXT VALUE FOR and next_value_for() return the incremented value instead of the current value of the sequence. Reproducible: Always ### Steps to Reproduce: create sequence seq as int; -- select * from sys.sequences select get_value_for('sys','seq'); -- returns 1 select get_value_for('sys','seq'); -- returns 1 select next_value_for('sys','seq'); -- returns 1, expected 2 select next_value_for('sys','seq'); -- returns 2, expected 3 select get_value_for('sys','seq'); -- returns 3 select get_value_for('sys','seq'); -- returns 3 select next_value_for('sys','seq'); -- returns 3, expected 4 select get_value_for('sys','seq'); -- returns 3 SELECT NEXT VALUE FOR sys.seq; -- returns 4, expected 5 select get_value_for('sys','seq'); -- returns 5 drop sequence seq; ### Actual Results: sql>create sequence seq as int; operation successful sql>-- select * from sys.sequences sql>select get_value_for('sys','seq'); +------+ | L2 | +======+ | 1 | +------+ 1 tuple sql>-- returns 1 sql>select get_value_for('sys','seq'); +------+ | L2 | +======+ | 1 | +------+ 1 tuple sql>-- returns 1 sql>select next_value_for('sys','seq'); +------+ | L2 | +======+ | 1 | +------+ 1 tuple sql>-- returns 1, expected 2 sql>select next_value_for('sys','seq'); +------+ | L2 | +======+ | 2 | +------+ 1 tuple sql>-- returns 2, expected 3 sql>select get_value_for('sys','seq'); +------+ | L2 | +======+ | 3 | +------+ 1 tuple sql>-- returns 3 sql>select get_value_for('sys','seq'); +------+ | L2 | +======+ | 3 | +------+ 1 tuple sql>-- returns 3 sql>select next_value_for('sys','seq'); +------+ | L2 | +======+ | 3 | +------+ 1 tuple sql>-- returns 3, expected 4 sql>select get_value_for('sys','seq'); +------+ | L2 | +======+ | 4 | +------+ 1 tuple sql>-- returns 3 sql>SELECT NEXT VALUE FOR sys.seq; +------+ | L2 | +======+ | 4 | +------+ 1 tuple sql>-- returns 4, expected 5 sql>select get_value_for('sys','seq'); +------+ | L2 | +======+ | 5 | +------+ 1 tuple sql>-- returns 5 sql>drop sequence seq; operation successful sql> ### Expected Results: I expected that NEXT VALUE FOR and next_value_for() return the incremented value instead of the current value of the sequence. ## Comment 27224 Date: 2019-08-14 13:59:27 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [c6ed9d7db2fa](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c6ed9d7db2fa) 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=c6ed9d7db2fa](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=c6ed9d7db2fa) Changeset description: Added test for bug #6743. ## Comment 27225 Date: 2019-08-14 14:39:42 +0200 From: @njnes the semantics are that the get_value returns the to be given out sequence number, without incrementing the sequence number. the next_value gives out the next (free) sequence number. At the start the first value (start value) isn't used jet. ## Comment 27277 Date: 2019-09-12 13:08:56 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [cfc1ba660c53](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cfc1ba660c53) 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=cfc1ba660c53](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=cfc1ba660c53) Changeset description: Approved output for bug #6743
NEXT VALUE FOR and next_value_for() return the current sequence value, same as get_value_for(). Expected to get the next incremented value returned.
https://api.github.com/repos/MonetDB/MonetDB/issues/6743/comments
0
2020-11-30T16:36:24Z
2024-06-28T13:09:09Z
https://github.com/MonetDB/MonetDB/issues/6743
753,627,377
6,743
[ "MonetDB", "MonetDB" ]
Date: 2019-08-06 18:53:06 +0200 From: jpastuszek To: GDK devs &lt;<bugs-common>&gt; Version: 11.33.3 (Apr2019) CC: renalkoclok, sunil.bhat, @yzchang Last updated: 2020-06-03 09:12:37 +0200 ## Comment 27203 Date: 2019-08-06 18:53:06 +0200 From: jpastuszek User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0 Build Identifier: I am logging data to MonetDB via SQL INSERT (prepared) statements batched in SQL transactions. Normally I insert around 30-40 records per seconds witch results in around 6MB/s disk write in batches of up to 1k records. I have around 2.5 months of data in the DB at this stage (around 250GB compressed (BTRFS)). I have started observing very bad insert performance and very high disk write rate of over 100MB/s and quickly consumed disk space for the same volume of insert (30-40 per second). After restarting the DB all comes back to normal and disk space is freed up but the issue would come back at some later stage. After some debugging I can see that MonetDB will normally keep 100-4000 memory mapped files (high number due to selects on data) open at any time (according /proc/*/map_files). When I observe bad insert performance, high writes and high free disk space consumption I can also observe that amount of mapped files keeps going up until I restart the DB or disk space fills up and DB crashes in which case the disk space is reclaimed during startup. I have seen more than 30k mapped files and disk space usage of over 190GB more than normal until I run out of disk space. Restarting MonetDB firstly flushes down the mapped files (waiting for MonetDB to exit) and with this flush I will get my disk space back again. After restart is complete my disk space is back to normal and it keeps ~120 memory mapped files and ~6MB/s write with my 30-40 inserts per seconds going. I have also collected some logs with `--io` flag set on `mserver5` process and compared it with other system where on my busy system I started a table restore (using same SQL INSERT mechanism but at full rate (reaching 1.2k inserts per second when healthy and around 600 when mapped files problem surfaces) with same debug setup on another system where I have no data and only restore is performed and I see no issues there. First observation is that healthy system will crate new BAT files starting with relatively small size (327680 bytes) and then follow up with GDKextend: load tmp_2231 DESCload 22/2231 GDKload: name=22/2231, ext=tail, mode 0 GDKload: name=/var/lib/monetdb/data/default/logs/bat/31/3177.theap, ext=, mode 1 GDKextend /var/lib/monetdb/data/default/logs/bat/31/3177.theap 0 -> 327680 0ms mmap(NULL, 0, maxsize 327680, mod 19458, path /var/lib/monetdb/data/default/logs/bat/31/3177.theap, 0) = 0x7f989382d000 GDKload: name=/var/lib/monetdb/data/default/logs/bat/06/663.theap, ext=, mode 1 GDKextend /var/lib/monetdb/data/default/logs/bat/06/663.theap 0 -> 327680 0ms mmap(NULL, 0, maxsize 327680, mod 19458, path /var/lib/monetdb/data/default/logs/bat/06/663.theap, 0) = 0x7f98937dd000 GDKload: name=/var/lib/monetdb/data/default/logs/bat/32/3206.theap, ext=, mode 1 GDKextend /var/lib/monetdb/data/default/logs/bat/32/3206.theap 0 -> 327680 0ms mmap(NULL, 0, maxsize 327680, mod 19458, path /var/lib/monetdb/data/default/logs/bat/32/3206.theap, 0) = 0x7f989378d000 GDKextend /var/lib/monetdb/data/default/logs/bat/31/3177.theap 327680 -> 655360 0ms GDKload: name=/var/lib/monetdb/data/default/logs/bat/23/2300.theap, ext=, mode 1 GDKextend /var/lib/monetdb/data/default/logs/bat/23/2300.theap 0 -> 327680 0ms mmap(NULL, 0, maxsize 327680, mod 19458, path /var/lib/monetdb/data/default/logs/bat/23/2300.theap, 0) = 0x7f989382d000 GDKload: name=/var/lib/monetdb/data/default/logs/bat/32/3210.theap, ext=, mode 1 GDKextend /var/lib/monetdb/data/default/logs/bat/32/3210.theap 0 -> 327680 0ms mmap(NULL, 0, maxsize 327680, mod 19458, path /var/lib/monetdb/data/default/logs/bat/32/3210.theap, 0) = 0x7f989369d000 GDKextend /var/lib/monetdb/data/default/logs/bat/06/663.theap 327680 -> 655360 0ms GDKextend /var/lib/monetdb/data/default/logs/bat/32/3206.theap 327680 -> 655360 0ms GDKextend /var/lib/monetdb/data/default/logs/bat/31/3177.theap 655360 -> 1310720 0ms GDKextend /var/lib/monetdb/data/default/logs/bat/23/2300.theap 327680 -> 655360 0ms GDKextend /var/lib/monetdb/data/default/logs/bat/32/3210.theap 327680 -> 655360 0ms GDKextend /var/lib/monetdb/data/default/logs/bat/32/3206.theap 655360 -> 1310720 1ms GDKextend /var/lib/monetdb/data/default/logs/bat/06/663.theap 655360 -> 1310720 0ms GDKextend /var/lib/monetdb/data/default/logs/bat/31/3177.theap 1310720 -> 2621440 0ms GDKextend /var/lib/monetdb/data/default/logs/bat/23/2300.theap 655360 -> 1310720 1ms GDKextend /var/lib/monetdb/data/default/logs/bat/32/3210.theap 655360 -> 1310720 0ms GDKextend /var/lib/monetdb/data/default/logs/bat/32/3206.theap 1310720 -> 2621440 0ms GDKextend /var/lib/monetdb/data/default/logs/bat/06/663.theap 1310720 -> 2621440 0ms While unhealthy system will create large initial extends of varying sizes reaching even 85MB and rarely follow up with extend: load tmp_6207 DESCload 62/6207 GDKload: name=62/6207, ext=tail, mode 0 GDKload: name=/var/lib/monetdb/data/default/logs/bat/01/21/12151.theap, ext=, mode 1 GDKextend /var/lib/monetdb/data/default/logs/bat/01/21/12151.theap 0 -> 1310720 1ms mmap(NULL, 0, maxsize 1310720, mod 19458, path /var/lib/monetdb/data/default/logs/bat/01/21/12151.theap, 0) = 0x7fb625df0000 GDKload: name=/var/lib/monetdb/data/default/logs/bat/22/07/220726.theap, ext=, mode 1 GDKextend /var/lib/monetdb/data/default/logs/bat/22/07/220726.theap 0 -> 327680 1ms mmap(NULL, 0, maxsize 327680, mod 19458, path /var/lib/monetdb/data/default/logs/bat/22/07/220726.theap, 0) = 0x7fb625da0000 GDKload: name=/var/lib/monetdb/data/default/logs/bat/02/17/21767.theap, ext=, mode 1 GDKextend /var/lib/monetdb/data/default/logs/bat/02/17/21767.theap 0 -> 655360 0ms mmap(NULL, 0, maxsize 655360, mod 19458, path /var/lib/monetdb/data/default/logs/bat/02/17/21767.theap, 0) = 0x7fb625d00000 GDKload: name=/var/lib/monetdb/data/default/logs/bat/11/03/110365.theap, ext=, mode 1 GDKextend /var/lib/monetdb/data/default/logs/bat/11/03/110365.theap 0 -> 655360 1ms mmap(NULL, 0, maxsize 655360, mod 19458, path /var/lib/monetdb/data/default/logs/bat/11/03/110365.theap, 0) = 0x7fb625c60000 GDKload: name=/var/lib/monetdb/data/default/logs/bat/05/13/51323.theap, ext=, mode 1 GDKextend /var/lib/monetdb/data/default/logs/bat/05/13/51323.theap 0 -> 9437184 0ms mmap(NULL, 0, maxsize 9437184, mod 19458, path /var/lib/monetdb/data/default/logs/bat/05/13/51323.theap, 0) = 0x7fb625360000 GDKload: name=/var/lib/monetdb/data/default/logs/bat/05/14/51445.theap, ext=, mode 1 GDKextend /var/lib/monetdb/data/default/logs/bat/05/14/51445.theap 0 -> 9437184 0ms mmap(NULL, 0, maxsize 9437184, mod 19458, path /var/lib/monetdb/data/default/logs/bat/05/14/51445.theap, 0) = 0x7fb624a60000 GDKload: name=/var/lib/monetdb/data/default/logs/bat/21/12/211244.theap, ext=, mode 1 GDKextend /var/lib/monetdb/data/default/logs/bat/21/12/211244.theap 0 -> 13631488 0ms mmap(NULL, 0, maxsize 13631488, mod 19458, path /var/lib/monetdb/data/default/logs/bat/21/12/211244.theap, 0) = 0x7fb623d60000 GDKload: name=/var/lib/monetdb/data/default/logs/bat/11/36/113671.theap, ext=, mode 1 GDKextend /var/lib/monetdb/data/default/logs/bat/11/36/113671.theap 0 -> 327680 1ms mmap(NULL, 0, maxsize 327680, mod 19458, path /var/lib/monetdb/data/default/logs/bat/11/36/113671.theap, 0) = 0x7fb623d10000 GDKload: name=/var/lib/monetdb/data/default/logs/bat/21/46/214632.theap, ext=, mode 1 GDKextend /var/lib/monetdb/data/default/logs/bat/21/46/214632.theap 0 -> 655360 1ms mmap(NULL, 0, maxsize 655360, mod 19458, path /var/lib/monetdb/data/default/logs/bat/21/46/214632.theap, 0) = 0x7fb623c70000 GDKload: name=/var/lib/monetdb/data/default/logs/bat/05/46/54621.theap, ext=, mode 1 GDKextend /var/lib/monetdb/data/default/logs/bat/05/46/54621.theap 0 -> 13631488 1ms mmap(NULL, 0, maxsize 13631488, mod 19458, path /var/lib/monetdb/data/default/logs/bat/05/46/54621.theap, 0) = 0x7fb622f70000 GDKload: name=/var/lib/monetdb/data/default/logs/bat/05/13/51366.theap, ext=, mode 1 GDKextend /var/lib/monetdb/data/default/logs/bat/05/13/51366.theap 0 -> 5242880 0ms mmap(NULL, 0, maxsize 5242880, mod 19458, path /var/lib/monetdb/data/default/logs/bat/05/13/51366.theap, 0) = 0x7fb622a70000 Also I think that the unhealthy system performs way less (if any) BBPSync while in healthy one they are regular. In the healthy system I see relatively constant number of memory mapped files (~120) while the unhealthy one is getting more and more in accelerating rate (starts slow but after a while I get tens per second new BAT files). I have written a script to keep restarting runaway MonetDB but this is not sustainable solution. I could not figure out if there is a way to trigger BBPSync (sync()?) manually to see if that would help. I have also observed that the issue sometimes can solve itself and number of open BATs drop down dramatically without having to restart MonetDB but this is rare. I don't know if this is thanks to BBPSync or not. Also note that after I stop restore process on unhealthy system the issue persists and the trickle of 30-40 inserts per second will continue to cause churn of +100MB/s on disk and hugely out of proportion disk space consumption. Please let me know if there is anything I could try, like forcing BBPSync from SQL or MAL console or any additional debugging that could help to understand the root cause of the issue. Reproducible: Sometimes ### Steps to Reproduce: 1. Collect large volume of data 2. Continuously insert data at slow pace 3. Optionally start another process that inserts rows to another table (partition) at full speed ### Actual Results: Accelerating increasing number of memory mapped BAT files. Very high disk IO churn . Big and accelerating disk space consumption. ### Expected Results: Stable amount of memory mapped files. Low disk IO churn proportional to inserted volumes of data. Steady disk consumption rate proportional to inserted data volumes. I use the following script to observe number of mapped files: date mv /tmp/now /tmp/was ls -l /proc/`pgrep mserver5`/map_files | grep data/ | sed 's/.*-> //' | sort > /tmp/now diff /tmp/was /tmp/now wc -l /tmp/now I could only find this bug to have similar symptoms reported: https://www.monetdb.org/bugzilla/show_bug.cgi?id=3559 ## Comment 27209 Date: 2019-08-12 21:26:12 +0200 From: Sunil Bhat &lt;<sunil.bhat>&gt; We see this same issue as well. At present we restart the Monet DB on regular basis. But that is not an acceptable solution. ## Comment 27255 Date: 2019-09-02 16:52:04 +0200 From: jpastuszek Actually there are two distinct issues: 1. In my case after SQL transaction log file grows to around over 8 million changes (as returned by `logger_funcs.changes()`) I start to observe described above performance issues. Keeping the log file below that amount of changes keeps system stable and performant. So there is some bad scalability issue here. 2. There is an issue with flushing SQL log file automatically. I don't know what the performance degradation issue with the log file is but I did some debugging around the flushing issue. As far as I understand how it works there is a thread running `store.c store_manager()` function that is responsible for flushing the SQL transaction log file. There are two conditions that can lead to attempt to flush: 1. `CALL flush_log()` was called - it sets `need_flush` global atomic to `1` (checked every 50 milliseconds), 2. if `need_flush` is not set `store_manager()` will check if SQL transaction log has more than 1 million changes (checked every 50 seconds). In both cases it continues to do the flushing. Before the log file can be flushed it will execute the following loop: while (ATOMIC_GET(&store_nr_active)) { /* find a moment to flush */ MT_lock_unset(&bs_lock); if (GDKexiting()) return; MT_sleep_ms(sleeptime); MT_lock_set(&bs_lock); } This loop will cycle every 50 milliseconds until it finds to be holding `bs_lock` and `store_nr_active` is observed `0`. The `store_nr_active` is a global atomic that is incremented when SQL transaction is started (`SQLtransaction_begin -> mvc_trans -> sql_trans_begin -> ATOMIC_INC(&store_nr_active) `) and decremented when it is committed or aborted (`SQLtransaction_commit -> mvc_commit -> sql_trans_end -> ATOMIC_DEC(&store_nr_active)`) - in other words it represents how many active transactions there are at any given moment. So from this design it looks like for MonetDB to be able to flush its SQL transaction log it needs a moment where there are not active transactions. In my use case (logging in real-time to MonetDB) this may not happen that often as the logger will commit and open transaction immediately - still enough to get flush going. If I add another process like it (e.g. table restore process) or I will leave open transaction in an IDE (e.g. DBeaver will open transaction by default on connect) the flushing will not happen as `store_nr_active` will always be grater than `0`. Another observation that I made is that 50 second interval to check if there are more than 1 million changes is too long as my program can make around 5 million changes in that time (83 column wide table and 1200 inserts per second). This is already close to 8 million "limit" after which the systems starts to dump tons of data to storage volume possibly leading to even less probability that the flush will go on. I don't see any good workaround to this problem but the best that can be done is to: * avoid opening long idle transactions (e.g. via IDE), * use `CALL flush_log()` every 1 million changes (number or rows inserted * number of columns) in between COMMIT and next START TRANSACTION and sleep for a second, * run only single process that continuously inserts data to the DB. For the actual fix I can see 3 different attempts: 1. Lock `sql_trans_begin` when `need_flush` is set (assuming it is set when the `store_manager()` is waiting to flush). This will unfortunately lead to total system lockout if there is an idle transaction open as all new transactions will wait on the lock and no progress will be made. 2. Lock `sql_trans_begin` and abort all active transactions. This would work but if there is any long running SQL (e.g. reporting) it will get aborted and this may not be acceptable. 3. Lock `sql_trans_begin` and roll forward all unfinished transactions from current log file to next log file and flush what got finished. This will require the most changes but should solve the issue. Also `sql_trans_begin` could be unlocked as soon as new log file is created and unfinished transaction entries moved to it. Here is a GDB script that I used to debug flushing with Apr2019: gdb -q -p `pgrep mser` \ -ex 'dprintf store.c:2114, "logged changes: %u\n", logger_funcs.changes()' \ -ex 'dprintf store.c:2118, "waiting to flush; logged changes: %u\n", logger_funcs.changes()' \ -ex 'dprintf store.c:2127, "flushing; logged changes: %u\n", logger_funcs.changes()' \ -ex 'dprintf store.c:2147, "flushing done\n"' \ -ex 'dprintf store.c:6518, "TX start; active: %u\n", store_nr_active' \ -ex 'dprintf store.c:6536, "TX end; active: %u\n", store_nr_active' \ -ex 'set pagination off' \ -ex 'continue' If you see "TX end; active" not dropping to "0" the flushing will not be able to start. ## Comment 27256 Date: 2019-09-02 17:37:45 +0200 From: jpastuszek I think that best way to go about this is to do this flushing attempts at the end of transaction COMMIT/ABORT and not in the separate thread. This way there is no need for a thread running "find a moment to flush" loop in background. A thread finishing transaction would check if SQL log has too many entries or `need_flush` is set via SQL. It could decide to continue without flushing in hope that there can be no transactions running at some stage or do a hard flush by forwarding the other threads transaction entries to a new log file and committing finished transaction data. This way the system would flush normally when there are no transactions running and it reached a soft limit of log entries and will force flush after hard limit was reached. ## Comment 27257 Date: 2019-09-03 14:48:01 +0200 From: @yzchang Hai, we recently did more study about the growth of mmapped files, especially under concurrent transactions similar to your use case. This check-in contains a major fix: https://dev.monetdb.org/hg/MonetDB/rev/a584364affea Would you please update your MonetDB installation to see if it works for you? It's probably not included in the most recent Apr2019-SP1 bugfix release, so you need to use the MonetDB source code. Regards, Jennie ## Comment 27258 Date: 2019-09-03 17:35:37 +0200 From: jpastuszek Created attachment 626 Growth of number of mmap files open > Attached file: [Screenshot 2019-09-03 at 16.34.33.png](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6742_Screenshot_2019-09-03_at_16.34.33.png_626) (image/png, 150071 bytes) > Description: Growth of number of mmap files open ## Comment 27259 Date: 2019-09-03 17:36:22 +0200 From: jpastuszek Created attachment 627 Growth of SQL log size and disk space used overall from base value > Attached file: [Screenshot 2019-09-03 at 16.34.25.png](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6742_Screenshot_2019-09-03_at_16.34.25.png_627) (image/png, 223863 bytes) > Description: Growth of SQL log size and disk space used overall from base value ## Comment 27260 Date: 2019-09-03 17:46:18 +0200 From: jpastuszek I have tried the patch but this did not help. The test I run was on Apr2019-SP1 + patch: * keep inserting ~1k records (83 column tables in my case) per transaction in a loop, * in another terminal connect and issue: START TRANSACTION - this will prevent SQL log from being flushed. Observe: dstat --disk --full 4 Disk writes will stay normal for a while (actually less writes since log is not flushed). After a short while disk writes would hit maximum throughput. In my case 400MB/s write. If I keep the SQL log flushing every 10 seconds or about ~1M entries disk write is around 35MB/s. Observe number of mmap_files files by running this script: echo "timestamp,mmap_files,log_size,disk_used" while :; do MPID=`pgrep mserver5` TS=`date +%s` MMAP_FILES=`ls -l /proc/$MPID/map_files | grep data/ | sed 's/.*-> //' | wc -l` LOG_SIZE=`du -cb /var/lib/monetdb/data/default/logs/sql_logs/sql | tail -n1 | cut -f1` DISK_USED=`df -B1 --output=used /var/lib/monetdb/data | tail -n 1` echo "$TS,$MMAP_FILES,$LOG_SIZE,$DISK_USED" sleep 1 done This produces a CSV data. The number of mmap files grows non-linearly initially and then linearly (probably due to max disk throughput reached). Log file size grows less and less as the actual rows insert speed decreases. Disk usage reaches 21GiB of extra data at the end of the test. After I execute COMMIT on the transaction the log file flushes relatively quickly and all numbers go back to normal including disk usage. See the attached image files with graphs from the script produced data. ## Comment 27768 Date: 2020-06-03 09:12:37 +0200 From: @sjoerdmullender The content of attachment 669 has been deleted for the following reason: spam
High count of memory mapped BAT files and high disk space usage on inserting data via SQL INSERT.
https://api.github.com/repos/MonetDB/MonetDB/issues/6742/comments
0
2020-11-30T16:36:19Z
2024-06-28T13:09:08Z
https://github.com/MonetDB/MonetDB/issues/6742
753,627,330
6,742
[ "MonetDB", "MonetDB" ]
Date: 2019-08-05 11:49:03 +0200 From: xavier &lt;<wysunxavier>&gt; To: clients devs &lt;<bugs-clients>&gt; Version: -- development CC: @PedroTadim, @yzchang Last updated: 2019-09-02 16:05:26 +0200 ## Comment 27199 Date: 2019-08-05 11:49:03 +0200 From: xavier &lt;<wysunxavier>&gt; User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36 Build Identifier: When I use mapi to execute the statement "alter table tb1 rename to tb2", I got message:no such table.But i can see the new tablename when use "\d". It is ok to use mclient directly. Finally I can only restart the database "monetdb stop dbname1; monetdb start dbname1;"when using mapi. Reproducible: Always ### Steps to Reproduce: 1.mapi_query("alter table tb1 rename to tb2") 2.mclient, \d. Tablename has changed. 3.execute "select * from tb2", ereport"no such table." ### Actual Results: no such table tb2. ## Comment 27201 Date: 2019-08-05 13:50:08 +0200 From: @PedroTadim Hello Xavier, I can't reproduce your error. Can you try to reproduce it on the Apr2019 branch? If not, can you tell which revision are you testing in? The development branch is often under modification and it is not advisable for regular usage. Best regards, Pedro ## Comment 27202 Date: 2019-08-06 15:19:29 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [240face86605](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=240face86605) 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=240face86605](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=240face86605) Changeset description: Added test for table rename with concurrent clients, similar to bug #6741. ## Comment 27204 Date: 2019-08-07 09:47:45 +0200 From: xavier &lt;<wysunxavier>&gt; This bug is similar to the following: I use mclient to connect MonetDB and enter this sql:"alter table t1 rename to t2",then I keep this mclient alive and I use anthor mclient to connect the same MonetDB database, but when I enter this sql :"select *from t2 ",MonetDB reports an error : "no such table "t2"". It seems that only one connection could take effect.So how can I make all connection take effect? This is Linux OS, actually it is Centos 7.5. MonetDB's version is 2019,April. In mclient A ,I enter this sql: alter table t1 rename to t2; then I keep mclient A alive, I use another mclient B to connect the same database, the I enter this sql: select * from t2; then I got an error: no such table t2. Restart this database could solve this problem. I expect the output is the data of t2,but the actual output is ERROR,no such table t2 ## Comment 27205 Date: 2019-08-07 12:23:37 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [319ffe87a9a8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=319ffe87a9a8) 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=319ffe87a9a8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=319ffe87a9a8) Changeset description: When a transaction starts, the reset code gets called. Make sure to apply possible name changes on schemas, tables or columns. This hopefully fixes bug #6741. ## Comment 27206 Date: 2019-08-07 12:55:15 +0200 From: @yzchang It works for me. Jennie ## Comment 27226 Date: 2019-08-15 08:22:10 +0200 From: xavier &lt;<wysunxavier>&gt; It is similar to table rename error.I execute 'alter table tb1 rename id1 to id2' on one mclient,i get message "0 tuples! 1 column dropped!" when execute 'select id2 from tb1'on another mclient.It doesn't work. ## Comment 27227 Date: 2019-08-15 13:39:27 +0200 From: @yzchang Hai exact changeset are you using? I just checked out the current tip of Apr2019 (hg id: 382d15e2f110), and it works for me. Please double check that you have the most recent code. Also, the message "0 tuples! 1 column dropped!" is a bit weird. Rename column doesn't say this: sql>alter table t1 rename i to j; operation successful ## Comment 27228 Date: 2019-08-16 04:20:07 +0200 From: xavier &lt;<wysunxavier>&gt; This may be my fault. I got the error message using the current tip of Apr2019 (git id: 7bc14c32). When i update to the most recent code, it is correct.
report no such table when execute “alter table tb1 rename to tb2” according to using mapi
https://api.github.com/repos/MonetDB/MonetDB/issues/6741/comments
0
2020-11-30T16:36:16Z
2024-06-27T13:06:39Z
https://github.com/MonetDB/MonetDB/issues/6741
753,627,293
6,741
[ "MonetDB", "MonetDB" ]
Date: 2019-07-30 08:38:26 +0200 From: bharath &lt;<bharath.thamanna>&gt; To: Merovingian devs &lt;<bugs-merovingian>&gt; Version: 11.33.3 (Apr2019) CC: @PedroTadim Last updated: 2019-11-28 10:00:03 +0100 ## Comment 27192 Date: 2019-07-30 08:38:26 +0200 From: bharath &lt;<bharath.thamanna>&gt; User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko Build Identifier: While upgrading the database from verison (MonetDB-11.27.13) to (MonetDB-11.33.3) we are unable to bring up the database Error details: 2019-07-29 23:33:11 MSG DB_GRM_P_B[450467]: Running database upgrade commands: 2019-07-29 23:33:11 MSG DB_GRM_P_B[450467]: set schema "sys"; 2019-07-29 23:33:11 MSG DB_GRM_P_B[450467]: drop function sys.dependencies_functions_os_triggers(); 2019-07-29 23:33:11 MSG DB_GRM_P_B[450467]: CREATE FUNCTION dependencies_functions_on_triggers() 2019-07-29 23:33:11 MSG DB_GRM_P_B[450467]: RETURNS TABLE (sch varchar(100), usr varchar(100), dep_type varchar(32)) 2019-07-29 23:33:11 MSG DB_GRM_P_B[450467]: RETURN TABLE (SELECT f.name, tri.name, 'DEP_TRIGGER' from functions as f, triggers as tri, dependencies as dep where dep.id = f.id AND dep.depend_id =tri.id AND dep.depend_type = 8); 2019-07-29 23:33:11 MSG DB_GRM_P_B[450467]: updat 2019-07-29 23:33:15 MSG merovingian[450405]: database 'DB_GRM_P_B' (450467) has crashed (dumped core) 2019-07-29 23:33:15 ERR control[450405]: (local): failed to fork mserver: database 'DB_GRM_P_B' has crashed after starting, manual intervention needed, check monetdbd's logfile (merovingian.log) for details could you help us how to migrate our databases to newer version and also we have 100+ database to migrate. Thanks Bharath Reproducible: Always ### Steps to Reproduce: 1.Bring up any DB running on (MonetDB-11.27.13) to (MonetDB-11.33.3) 2. 3. ### Actual Results: Thrown below error: 2019-07-29 23:33:11 MSG DB_GRM_P_B[450467]: Running database upgrade commands: 2019-07-29 23:33:11 MSG DB_GRM_P_B[450467]: set schema "sys"; 2019-07-29 23:33:11 MSG DB_GRM_P_B[450467]: drop function sys.dependencies_functions_os_triggers(); 2019-07-29 23:33:11 MSG DB_GRM_P_B[450467]: CREATE FUNCTION dependencies_functions_on_triggers() 2019-07-29 23:33:11 MSG DB_GRM_P_B[450467]: RETURNS TABLE (sch varchar(100), usr varchar(100), dep_type varchar(32)) 2019-07-29 23:33:11 MSG DB_GRM_P_B[450467]: RETURN TABLE (SELECT f.name, tri.name, 'DEP_TRIGGER' from functions as f, triggers as tri, dependencies as dep where dep.id = f.id AND dep.depend_id =tri.id AND dep.depend_type = 8); 2019-07-29 23:33:11 MSG DB_GRM_P_B[450467]: updat 2019-07-29 23:33:15 MSG merovingian[450405]: database 'DB_GRM_P_B' (450467) has crashed (dumped core) 2019-07-29 23:33:15 ERR control[450405]: (local): failed to fork mserver: database 'DB_GRM_P_B' has crashed after starting, manual intervention needed, check monetdbd's logfile (merovingian.log) for details ### Expected Results: DB to be come to the latest version (MonetDB-11.33.3) ## Comment 27193 Date: 2019-07-30 10:33:28 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [07dbcfe06f1e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=07dbcfe06f1e) 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=07dbcfe06f1e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=07dbcfe06f1e) Changeset description: The history environment variable doesn't exist anymore. This should fix part of bug #6740. ## Comment 27194 Date: 2019-07-30 10:40:47 +0200 From: @sjoerdmullender If this is indeed the problem, upgrading in smaller steps should work. That's a good idea anyway. We only tests upgrades from one release to the next. We do not test (and therefore not "guarantee" (we don't really guarantee anything)) upgrades that skip releases. You shouldn't have to do all point releases (the SPs), but go through all major releases between 11.27.13 and 11.33.3. ## Comment 27195 Date: 2019-07-30 11:43:00 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [15b4657ff7d3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=15b4657ff7d3) 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=15b4657ff7d3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=15b4657ff7d3) Changeset description: SQL upgrade code runs inside a transaction now, so there is no need to call commit inside each upgrade. This fixes upgrade from Jul2017 to Apr2019 in bug #6740. ## Comment 27196 Date: 2019-08-01 09:56:45 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [90eb914c2b2a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=90eb914c2b2a) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=90eb914c2b2a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=90eb914c2b2a) Changeset description: Backport changeset [93bd9c6b2342](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=93bd9c6b2342) This fixes bug #6740.
while upgrading the database from verison (MonetDB-11.27.13) to (MonetDB-11.33.3) we are unable to bring up the database
https://api.github.com/repos/MonetDB/MonetDB/issues/6740/comments
0
2020-11-30T16:36:13Z
2024-06-27T13:06:38Z
https://github.com/MonetDB/MonetDB/issues/6740
753,627,251
6,740
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T16:22:43Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/6739/comments
0
2020-11-30T16:36:10Z
2020-11-30T16:36:12Z
https://github.com/MonetDB/MonetDB/issues/6739
753,627,210
6,739
[ "MonetDB", "MonetDB" ]
Date: 2019-07-25 16:24:42 +0200 From: Dragoslav Mitrinovic &lt;<dmitrinovic>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) CC: @PedroTadim Last updated: 2019-09-02 16:05:25 +0200 ## Comment 27170 Date: 2019-07-25 16:24:42 +0200 From: Dragoslav Mitrinovic &lt;<dmitrinovic>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36 Build Identifier: Unexpected results are obtained with expressions involving window functions such as SUM( some_int_expr ) OVER (...). It appears that the issue is that window function returns HUGEINT, and that automatic type coercion does not work correctly. Reproducible: Always ### Steps to Reproduce: Run the following query: select foo, SUM(foo) over () as s1, 1.0 * SUM(foo) over () as s2, 1.0 * CAST(SUM(foo) over () as FLOAT) as s3 from (select 7 as foo union all select 3 as foo) as t ### Actual Results: | foo | s1 | s2 | s3 | | --- | -- | -- | -- | | 7 | 10 | 10 | 10 | | 3 | 10 | 0 | 10 | ^ | note 0 here---+ ### Expected Results: | foo | s1 | s2 | s3 | | --- | -- | -- | -- | | 7 | 10 | 10 | 10 | | 3 | 10 | 10 | 10 | Here's a variation on the same theme. Running: select foo, SUM(foo) over () / 2 from (select 7 as foo union all select 3 as foo) as t Results in error message: "[22000] type combination (div(hge,bte)->lng) not supported." This error message is what makes me think that SUM() OVER () results in HUGEINT. Here's the mserver5 info: $ mserver5 --version MonetDB 5 server 11.33.3 (Apr2019) (64-bit, 128-bit integers) Copyright (c) 1993 - July 2008 CWI Copyright (c) August 2008 - 2019 MonetDB B.V., all rights reserved Visit https://www.monetdb.org/ for further information Found 31.4GiB available memory, 8 available cpu cores Libraries: libpcre: 8.21 2011-12-12 (compiled with 7.8 2008-09-05) openssl: OpenSSL 1.0.1e-fips 11 Feb 2013 libxml2: 2.7.6 Compiled by: mockbuild@dev.monetdb.org (x86_64-redhat-linux-gnu) Compilation: gcc -std=gnu99 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wno-format-truncation Linking : /usr/bin/ld -m elf_x86_64 -Wl,-Bsymbolic-functions ## Comment 27171 Date: 2019-07-25 16:53:41 +0200 From: Dragoslav Mitrinovic &lt;<dmitrinovic>&gt; Here's another example: select foo, SUM(foo) OVER (ORDER BY foo) as cumsum1, 1.0 * SUM(foo) OVER (ORDER BY foo) as cumsum2 from (values (1),(2),(3),(4),(5),(6)) as t(foo) Returns: | foo | cumsum1 | cumsum2 | | --- | ------- | ------- | | 1 | 1 | 1 | | 2 | 3 | 0 | | 3 | 6 | 3 | | 4 | 10 | 0 | | 5 | 15 | 6 | | 6 | 21 | 0 | ## Comment 27172 Date: 2019-07-25 17:18:46 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [b80df006cee5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b80df006cee5) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=b80df006cee5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=b80df006cee5) Changeset description: Test for bug #6738. ## Comment 27173 Date: 2019-07-25 17:19:56 +0200 From: @sjoerdmullender This bug seems to be already fixed in the current Apr2019 branch and so will be fixed in the next release. ## Comment 27174 Date: 2019-07-25 17:39:06 +0200 From: @PedroTadim The query: select foo, SUM(foo) OVER (ORDER BY foo) as cumsum1, 1.0 * SUM(foo) OVER (ORDER BY foo) as cumsum2 from (values (1),(2),(3),(4),(5),(6)) as t(foo) Doesn't work on default. ## Comment 27175 Date: 2019-07-25 18:15:00 +0200 From: @sjoerdmullender (In reply to Pedro Ferreira from comment 4) > The query: > > select foo, > SUM(foo) OVER (ORDER BY foo) as cumsum1, > 1.0 * SUM(foo) OVER (ORDER BY foo) as cumsum2 > from (values (1),(2),(3),(4),(5),(6)) as t(foo) > > Doesn't work on default. Then we need to fix that before the default branch gets released, but that doesn't affect this bug report. We'll see that from the test that will fail on the default branch after we've merged. ## Comment 27189 Date: 2019-07-29 09:33:47 +0200 From: @PedroTadim (In reply to Sjoerd Mullender from comment 5) > (In reply to Pedro Ferreira from comment 4) > > The query: > > > > select foo, > > SUM(foo) OVER (ORDER BY foo) as cumsum1, > > 1.0 * SUM(foo) OVER (ORDER BY foo) as cumsum2 > > from (values (1),(2),(3),(4),(5),(6)) as t(foo) > > > > Doesn't work on default. > > Then we need to fix that before the default branch gets released, but that > doesn't affect this bug report. > We'll see that from the test that will fail on the default branch after > we've merged. This is now fixed on default branch.
issue with window functions and hugeint type coercion
https://api.github.com/repos/MonetDB/MonetDB/issues/6738/comments
0
2020-11-30T16:36:07Z
2024-06-27T13:06:37Z
https://github.com/MonetDB/MonetDB/issues/6738
753,627,164
6,738
[ "MonetDB", "MonetDB" ]
Date: 2019-07-24 14:49:34 +0200 From: Ilya &lt;<kujit1>&gt; To: GDK devs &lt;<bugs-common>&gt; Version: 11.33.3 (Apr2019) CC: kujit1, @PedroTadim, renalkoclok Last updated: 2020-06-15 17:22:19 +0200 ## Comment 27162 Date: 2019-07-24 14:49:34 +0200 From: Ilya &lt;<kujit1>&gt; User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36 Build Identifier: When I try to create a join of two tables under the null-safe equal, like (t1 = t2 or (t1 is null and t2 is null)), the query crashes with the message that there was a failed attempt to allocate some giant memory count Reproducible: Always ### Steps to Reproduce: 1. create table monet1_test ("Id" bigserial, key int, value varchar(2000)); create table monet2_test ("Id" bigserial, key int, value varchar(2000)); 2. insert into monet1_test select value "Id", value "key", value "value" from generate_series(1,60000); insert into monet2_test select value "Id", value "key", value "value" from generate_series(1,200000); 3. select count(1) from monet2_test t1 inner join monet1_test t2 on ((t1.key = t2.key) or ((t1.key is null) and (t2.key is null))); ### Actual Results: GDK reported error: MT_mmap: CreateFileMapping(0000000000001200, &sa, 4, 22, 1508704256, NULL) failed OS: The printer is out of paper. HEAPalloc: Insufficient space for HEAP of 95997921280 bytes. MT_mmap: CreateFileMapping(00000000000011B4, &sa, 4, 22, 1508704256, NULL) failed OS: The printer is out of paper. HEAPalloc: Insufficient space for HEAP of 95997921280 bytes. ### Expected Results: to obtain the query result mserver5 version: --------------- MonetDB 5 server 11.33.3 (Apr2019) (64-bit) Copyright (c) 1993 - July 2008 CWI Copyright (c) August 2008 - 2019 MonetDB B.V., all rights reserved Visit https://www.monetdb.org/ for further information Found 7.9GiB available memory, 8 available cpu cores Libraries: libpcre: 8.41 2017-07-05 openssl: OpenSSL 1.1.0g 2 Nov 2017 libxml2: 2.9.8 Compiled by: monet@LAB03 (x86_64-pc-winnt) Compilation: cl -GF -W3 -WX -MD -nologo -Ox -Zi -Oi Linking : cl -GF -W3 -WX -MD -nologo -Ox -Zi -Oi --------------- ## Comment 27163 Date: 2019-07-24 14:55:31 +0200 From: Ilya &lt;<kujit1>&gt; Created attachment 622 test case > Attached file: [test_case.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6737_test_case.txt_622) (text/plain, 1208 bytes) > Description: test case ## Comment 27164 Date: 2019-07-24 15:03:20 +0200 From: Ilya &lt;<kujit1>&gt; The problem was detected when trying to write an upsert function: MERGE INTO monet2_test USING monet1_test AS t_1 ON ("monet2_test"."key" = t_1."key" OR ("monet2_test"."key" IS NULL AND t_1."key" IS NULL)) WHEN MATCHED THEN UPDATE SET "key" = t_1."key", "value" = t_1."value" WHEN NOT MATCHED THEN INSERT ("Id", "key", "value") VALUES (t_1."Id", t_1."key", t_1."value"); When trying to overwrite upsert without using merge, it was found that null-safe eqals also does not work for joins. Changing null-safe eqauls to other expressions did not help. I tried: stored functions, case-when and if expressions, exists (select t1.key intersect select t2.key) ## Comment 27165 Date: 2019-07-24 15:10:23 +0200 From: Ilya &lt;<kujit1>&gt; select count(1) from monet2_test t1 inner join monet1_test t2 on ((t1.key = t2.key) or ((t1.key is null) and (t2.key is null))); also not working ## Comment 27197 Date: 2019-08-02 10:18:23 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [27336f65e008](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=27336f65e008) 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=27336f65e008](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=27336f65e008) Changeset description: Added test for bug #6737. ## Comment 27200 Date: 2019-08-05 12:34:23 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [a65fcf67b6c0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a65fcf67b6c0) 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=a65fcf67b6c0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=a65fcf67b6c0) Changeset description: Replaced merge statement's inner join with a left join between the input relation and the target table. With this approach, it is not needed to generate an upper anti-join for "when not matched" clauses while "when matched" clauses are also present. Also reduced the generated table sizes for bug #6737. ## Comment 27767 Date: 2020-06-03 09:11:37 +0200 From: @sjoerdmullender The content of attachment 668 has been deleted for the following reason: spam
join by NULL-safe comparison tries allocate a lot of memory and didnt work
https://api.github.com/repos/MonetDB/MonetDB/issues/6737/comments
0
2020-11-30T16:36:02Z
2024-06-27T13:06:36Z
https://github.com/MonetDB/MonetDB/issues/6737
753,627,087
6,737
[ "MonetDB", "MonetDB" ]
Date: 2019-07-22 10:43:40 +0200 From: Enrico Maria Carmona &lt;<e.carmona>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) Last updated: 2019-09-02 16:05:26 +0200 ## Comment 27150 Date: 2019-07-22 10:43:40 +0200 From: Enrico Maria Carmona &lt;<e.carmona>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/75.0.3770.90 Chrome/75.0.3770.90 Safari/537.36 Build Identifier: I recently update to April 2019 version (with yum) the monetdb container created from monetdb/monetdb-r-docker:aug2018 image. Now the query auto generated from Mondrian MDX failed to retrive all records from star schema and only one of the child table of the merged is considered. The fact table is merged from year-child tables, non partitioned (like previous monetdb aug2018 version). Looking at query plan only one of the child table is referenced. The failing query also contain two alias of a single view, joined via bridge table, which seems causing the odd behavior: changing the alias (one or both) from the view to the underlying table resolve the issue. Reproducible: Always ### Steps to Reproduce: query: select "dim_periodi"."year4" as "c0", "gruppi"."codice" as "c1", count(*) as "m0" from "dw_hospital"."dim_periodi" as "dim_periodi", "dw_hospital"."facts_costi" as "facts_costi", "dw_hospital"."v_dim_classi_movimenti" as "gruppi", "dw_hospital"."bri_classi_gruppi_movimenti" as "bri_classi_gruppi_movimenti", "dw_hospital"."v_dim_classi_movimenti" as "classi" where "facts_costi"."periodo_id" = "dim_periodi"."id" and "facts_costi"."classe_movimento_id" = "classi"."id" and "classi"."id" = "bri_classi_gruppi_movimenti"."classe_movimento_id" and "bri_classi_gruppi_movimenti"."gruppo_classe_movimento_id" = "gruppi"."id" and "gruppi"."codice" = '1103' group by "dim_periodi"."year4","gruppi"."codice" ; steps to reproduce with attached dump.sql: monetdb_version=aug2018 docker pull monetdb/monetdb-r-docker:$monetdb_version docker run -d \ --name monetdb-test \ monetdb/monetdb-r-docker:$monetdb_version docker exec -it monetdb-test sh -c $'echo "user=monetdb\npassword=monetdb" > /home/monetdb/.monetdb' docker cp dump.sql monetdb-test:. docker exec -it -u monetdb monetdb-test mclient db \</dump.sql Run query with aug2018 version results as expected (3 tuples). update: docker exec -it monetdb-test yum update -y docker exec -it monetdb-test yum upgrade -y docker restart monetdb-test docker exec -it -u monetdb monetdb-test mclient db Run query with Apr2019 version results 1 tuple. query without views (Apr2019 version) results as expected (3 tuples). select "dim_periodi"."year4" as "c0", "gruppi"."codice" as "c1", count(*) as "m0" from "dw_hospital"."dim_periodi" as "dim_periodi", "dw_hospital"."facts_costi" as "facts_costi", "dw_hospital"."dim_classi_movimenti" as "gruppi", "dw_hospital"."bri_classi_gruppi_movimenti" as "bri_classi_gruppi_movimenti", "dw_hospital"."dim_classi_movimenti" as "classi" where "facts_costi"."periodo_id" = "dim_periodi"."id" and "facts_costi"."classe_movimento_id" = "classi"."id" and "classi"."id" = "bri_classi_gruppi_movimenti"."classe_movimento_id" and "bri_classi_gruppi_movimenti"."gruppo_classe_movimento_id" = "gruppi"."id" and "gruppi"."codice" = '1103' group by "dim_periodi"."year4","gruppi"."codice" ; +------+------+------+ | c0 | c1 | m0 | +======+======+======+ | 2017 | 1103 | 5 | | 2018 | 1103 | 5 | | 2019 | 1103 | 5 | +------+------+------+ 3 tuples ### Actual Results: +------+------+------+ | c0 | c1 | m0 | +======+======+======+ | 2019 | 1103 | 5 | +------+------+------+ 1 tuple ### Expected Results: +------+------+------+ | c0 | c1 | m0 | +======+======+======+ | 2017 | 1103 | 5 | | 2018 | 1103 | 5 | | 2019 | 1103 | 5 | +------+------+------+ 3 tuples docker image: REPOSITORY TAG IMAGE ID monetdb/monetdb-r-docker aug2018 384ef9dcbf5a [root@monetdb /] mserver5 --version MonetDB 5 server 11.33.3 (Apr2019) (64-bit, 128-bit integers) Copyright (c) 1993 - July 2008 CWI Copyright (c) August 2008 - 2019 MonetDB B.V., all rights reserved Visit https://www.monetdb.org/ for further information Found 13.7GiB 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: mockbuild@ (x86_64-redhat-linux-gnu) Compilation: gcc -std=gnu99 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -Wno-format-truncation Linking : /usr/bin/ld -m elf_x86_64 -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-Bsymbolic-functions [root@monetdb /] ## Comment 27151 Date: 2019-07-22 10:45:50 +0200 From: Enrico Maria Carmona &lt;<e.carmona>&gt; Created attachment 620 db script > Attached file: [dump.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6736_dump.sql_620) (application/sql, 30358 bytes) > Description: db script ## Comment 27152 Date: 2019-07-22 10:48:31 +0200 From: Enrico Maria Carmona &lt;<e.carmona>&gt; Created attachment 621 reproduce steps with select, plan, explain > Attached file: [reproduce_steps_w_select_plan_explain](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6736_reproduce_steps_w_select_plan_explain_621) (text/plain, 137447 bytes) > Description: reproduce steps with select, plan, explain ## Comment 27154 Date: 2019-07-22 11:50:46 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [6097d2479520](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6097d2479520) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=6097d2479520](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=6097d2479520) Changeset description: test for bug #6736. ## Comment 27156 Date: 2019-07-22 16:35:56 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [bad13ed7da91](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bad13ed7da91) 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=bad13ed7da91](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=bad13ed7da91) Changeset description: Fix for bug #6736, by backporting missing check from Aug2018 branch.
Unexpected query result with merge tables and view after upgrade
https://api.github.com/repos/MonetDB/MonetDB/issues/6736/comments
0
2020-11-30T16:35:59Z
2024-06-27T13:06:35Z
https://github.com/MonetDB/MonetDB/issues/6736
753,627,035
6,736
[ "MonetDB", "MonetDB" ]
Date: 2019-07-22 08:26:44 +0200 From: daniel.zvinca To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) Last updated: 2019-07-22 11:14:29 +0200 ## Comment 27149 Date: 2019-07-22 08:26:44 +0200 From: daniel.zvinca User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36 Build Identifier: I've been using instructions from https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/storage-model for checking storage sizes. Surprisingly even string fields with only 22 distinct (and small values, if that is relevant, max length 8 bytes) seem to use 2 bytes for the column size. I do expect to be one. For large datasets, (50 mil+) this is important. Data was uploaded in large batches using "insert into T select * from custom_capi_table(some params)", if this matters at all. Reproducible: Sometimes ### Expected Results: Is it any way we can instruct MonetDB to adjust its default behavior on dictionary encoding for string fields? Can we interfere in building a dictionary for string columns and reference somehow like a foreign key? This approach would provide a huge performance boost in GROUPING and SORTING operations when this columns are involved. If the same dictionary would be referenced by other columns, JOIN operations between columns that share that would also benefit from that. Memory would be massively saved using only integers and slow sequential parsing of tdense columns would not be required. Replacing string fields with index-in-dictionary fields and use those fields for GROUP, ORDER and JOIN operations can be done without changing MonetDB, sure, but not only those transformations take lots of time for large sets, but also all the statements involving those fields would require carefully crafted adjustments. ## Comment 27153 Date: 2019-07-22 11:14:29 +0200 From: @sjoerdmullender Assuming you're referring to the value columnsize divided by count for your string column, 2 bytes is perfectly reasonable. The value in the column is an offset into the string heap, i.e. into the file where the actual strings are stored. Strings are stored with some overhead. First of all, there is padding to a multiple of 8, and then in front of each string is an extra 8 byte value. So, if your strings were all 7 bytes long, then you would actually need 8 (7 plus final NULL byte) padded to a multiple of 8 equals 8 bytes, plus an extra 8 bytes, giving 16 bytes used storage per string. 22 of them use up 352 bytes. An offset to the last string does not fit in a single byte (max 255), so we need (and use) 2. Strings of length 8 (without counting the terminating NULL) would use up even more space. I'm marking this as invalid since it's not a bug. If this is not what you were referring to, please reopen and elaborate.
unusual large storage
https://api.github.com/repos/MonetDB/MonetDB/issues/6735/comments
0
2020-11-30T16:35:55Z
2024-06-28T13:39:50Z
https://github.com/MonetDB/MonetDB/issues/6735
753,626,997
6,735
[ "MonetDB", "MonetDB" ]
Date: 2019-07-20 08:38:35 +0200 From: daniel.zvinca To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) CC: @PedroTadim Last updated: 2019-07-29 09:12:47 +0200 ## Comment 27148 Date: 2019-07-20 08:38:35 +0200 From: daniel.zvinca User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36 Build Identifier: Accessing functions registered in 'sys' schema should not require 'sys.' prefix when invoked from another schema. Right now the behavior is non-uniform, 'sum' or 'avg' are recognized without prefix from any schema, but not 'median'. Reproducible: Always ### Steps to Reproduce: 1.create schema if not exits working; 2.set schema working; 4.create table t(d double); 5.insert into t values (12), (15), (25), (19); 6.select sum(d) from t; -- fine 7.select median(d) from t; -- error 8.select sys.median(d) from t; -- fine ### Actual Results: sql>create table t(d double); operation successful sql>insert into t values (12), (15), (25), (19); 4 affected rows sql>select sum(d) from t; +--------------------------+ | L3 | +==========================+ | 71 | +--------------------------+ 1 tuple sql>select median(d) from t; MEDIAN: no such operator 'median(double)' sql>select sys.median(d) from t; +--------------------------+ | L3 | +==========================+ | 15 | +--------------------------+ 1 tuple ### Expected Results: I expect to exist a uniform behavior that allows simple invocation of sys.func from another schema than sys. If "sum" or "avg" can be invoked without 'sys.' prefix (it also works with prefix) why not to apply that to built in "median" as well? Functions that are registered in sys schema space should be able to be invoked without 'sys.' prefix. This way even a user function can be made "publicly" available to all other schemas. Functions declared in other schemas and invoked from different schemas should keep current prefix requirement. ## Comment 27157 Date: 2019-07-22 16:56:11 +0200 From: @PedroTadim Hello Daniel, I was looking at the source of this bug, and this is expected behaviour. The SQL standard aggregates "sum", "count", "avg", "min" and "max" are not affiliated to a schema, so they can be called independent from the session's schema. The "median" aggregate however is not standard and MonetDB provides it under the "sys" schema. This behaviour is reproducible in other databases systems as well. Best regards, Pedro ## Comment 27158 Date: 2019-07-22 17:35:46 +0200 From: daniel.zvinca Hello Pedro, I wasn't aware of this internal distinction. They look built in for me both, standard or not, it was less relevant. I really thought I messed up with the code somewhere along the way. It wasn't the case. However, if we accept that a schema has a similar role of a namespace in C++, a statement like below might save some headaches. using schema sys; Just a thought. In the meanwhile, I will probably continue to mess up myself with the code. :) Thank you, Dan
accessing sys.functions from another schema
https://api.github.com/repos/MonetDB/MonetDB/issues/6734/comments
0
2020-11-30T16:35:52Z
2024-06-27T13:06:33Z
https://github.com/MonetDB/MonetDB/issues/6734
753,626,965
6,734
[ "MonetDB", "MonetDB" ]
Date: 2019-07-17 15:55:27 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) Last updated: 2019-08-13 16:45:00 +0200 ## Comment 27145 Date: 2019-07-17 15:55:27 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0 Build Identifier: ​​​​​Currently it is not allowed to replace (or drop and re-create) a db-object (such as a table, column, view, function, procedure, aggregate, loader, trigger) when the db-object is referenced by another db-object (such as a view, function, procedure, aggregate, loader, index or trigger). You first have to manually remove all the referencing db-objects (depth-first) before you can continue. In a DROP statement you can use the CASCADE option, which removes all referencing db-objects cascading completely, but this can lead to an undesired removal of many db-objects without control, which is not what you want if you only want to replace for instance the definition of a view or function or procedure or column. Also it is cumbersome and very time consuming to find out which objects are going to be dropped when CASCADE is used and recreate all those dependent db-objects in a specific order again, provided you still have the original and up-to-date create_db_objects.sql script(s). Some RDBMS (e.g. Oracle) allow you to replace a db-object even if there are references to it from other db-objects. It just marks the dependent db-objects (which are defined as SQL script code such as a view, function, procedure, aggregate, loader, index or trigger) into an invalid state. Whenever you query or call those invalidated db-objects, the SQL processor detects the invalid state and it automatically tries to re-parse the script code of the db-object(s) such that it becomes valid again, potentially recursively (depth-first). If it succeeds it continues the processing of the original query or call. If it fails it returns an error (compiling object xyz failed) about the incorrect db-object. Whenever a table or column or view or function or procedure or aggregate or loader or trigger is dropped or replaced: the is_valid column of the referencing objects (view, function, procedure, aggregate, loader, index or trigger) is set to false, cascading through for all objects referencing the object which is marked as invalid. For this we need to extend system tables: sys.functions, sys._tables and sys.trigger with new column: is_valid boolean not null default true. This enhancement would allow a user to replace an object without the need to drop all referencing objects first and next recreate all dropped objects again, saving a lot of time. It is also very useful for the db-upgrade program as much less drop ... and create ... statements are needed. Reproducible: Always ### Steps to Reproduce: Example 1: change data type of an existing column while there is a view (or function or procedure) defined which references the column. create table t1 (id int primary key, name char(20)); create view v1 as select * from t1 order by name, id; insert into t1 values (100, 'me, myself and I'); select * from v1; alter table t1 drop column name; -- this currently fails due to dependency from v1, but should be possible in the future -- this command will implicitly set view v1 as invalid alter table t1 add column name varchar(99) not null; select * from v1; -- this last query will automatically revalidate the view definition and mark it as valid again. Example 2: change a table while there is a view (or function or procedure) defined which references the table. create table t2 (id int primary key, name char(20)); create view v2 as select * from t2 order by name, id; insert into t2 values (100, 'me, myself and I'); select * from v2; drop table t2; -- this command will implicitly set view v2 as invalid create table t2 (id serial, cat varchar(5), name varchar(99) not null); insert into t2 (cat, name) values ('A', 'me, myself and I'); select * from v2; -- this last query will automatically revalidate the view definition and mark it as valid again. Example 3: change a view while there is a view (or function or procedure) defined which references the view. create view v3a ... create view v3b as select * from v3a where state = 'ok'; create view v3c as select count(*) as count, c3 from v3b group by c3 order by c3; select * from v3b; select * from v3c; create or replace view v3a ... -- this command will implicitly set view v3b and v3c as invalid select * from v3c; -- this last query will automatically revalidate the view definitions and mark them as valid again. The implementation would require: - extending system tables sys.functions, sys._tables and sys.trigger with column: is_valid boolean not null default true sys.functions for: user defined functions, procedures, aggregates, filter and loader functions sys._tables for: user defined views sys.trigger for: user defined triggers - an internal C function which can set a specifc db-object and all its referencing db-objects to invalid state (is_valid = false) cascading. - an internal C function which can re-validate a db-object which is marked as invalid state (is_valid = false) cascading depth-first and update its dependencies. - a utility system function: sys.revalidate(str objtype, str schema, str objname) to (re-)validate the specific script object(s), or all objects in that schema if objname is null. - the SQL parser would need to add checks on is_valid column state of a needed db-object and invoke the internal C function to re-validate the db-object script(s) when required.
Add support for replacing db-objects when there are references to them, without removing the references first
https://api.github.com/repos/MonetDB/MonetDB/issues/6733/comments
0
2020-11-30T16:35:49Z
2024-06-28T13:39:50Z
https://github.com/MonetDB/MonetDB/issues/6733
753,626,933
6,733
[ "MonetDB", "MonetDB" ]
Date: 2019-07-17 14:06:59 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) CC: @mlkersten, @PedroTadim Last updated: 2020-06-03 16:58:54 +0200 ## Comment 27144 Date: 2019-07-17 14:06:59 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0 Build Identifier: There is currently no way to close a specific prepared statement. To free resources on the server, it would be good if the user/application could close a prepared statement after it is no longer needed. PostgreSQL supports: DEALLOCATE [ PREPARE ] { name | ALL } See https://www.postgresql.org/docs/current/sql-deallocate.html MySQL supports: {DEALLOCATE | DROP} PREPARE stmt_name See https://dev.mysql.com/doc/refman/8.0/en/deallocate-prepare.html Reproducible: Always See https://www.postgresql.org/docs/current/sql-deallocate.html and https://dev.mysql.com/doc/refman/8.0/en/deallocate-prepare.html This request is related to https://www.monetdb.org/bugzilla/show_bug.cgi?id=6731 ## Comment 27207 Date: 2019-08-12 09:47:29 +0200 From: @mlkersten In this context it is also good to review the use of <integer>() as the name for the prepared statement. I would prefer an identifier, possibly controlled by the user, e.g. sql>prepare <identifier> <query> A possibly cleaner approach is to consider them as short-hand function/procedure definitions which end up in the function table. Then releasing them aligns with dropping functions/procedures. sql>prepare select 1; statement turned into a CREATE FUNCTION p5(...) sql> select p5(); sql> drop function p5(); Unfortunately, the PREPARE can also be prepended to a create table, which is not a function call. ## Comment 27208 Date: 2019-08-12 10:06:08 +0200 From: @mlkersten sql> prepare myquery select ?, count(*) from tables sql> call myquery('total')
Add SQL command to close a specific prepared statement
https://api.github.com/repos/MonetDB/MonetDB/issues/6732/comments
0
2020-11-30T16:35:46Z
2024-06-27T13:06:31Z
https://github.com/MonetDB/MonetDB/issues/6732
753,626,894
6,732
[ "MonetDB", "MonetDB" ]
Date: 2019-07-17 13:42:17 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) CC: @PedroTadim Last updated: 2020-06-03 16:58:54 +0200 ## Comment 27143 Date: 2019-07-17 13:42:17 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0 Build Identifier: There is currently no way to query which prepared statements exist within a session in MonetDB. We need an SQL system view to allow users/applications to query the available prepared statements, possibly including their of parameters and parameter types. Reproducible: Always See for inspiration: https://www.postgresql.org/docs/current/view-pg-prepared-statements.html
Add system view to allow querying of available prepared statements and their parameters
https://api.github.com/repos/MonetDB/MonetDB/issues/6731/comments
0
2020-11-30T16:35:43Z
2024-06-27T13:06:30Z
https://github.com/MonetDB/MonetDB/issues/6731
753,626,862
6,731
[ "MonetDB", "MonetDB" ]
Date: 2019-07-12 21:20:33 +0200 From: @yzchang To: GDK devs &lt;<bugs-common>&gt; Version: 11.33.3 (Apr2019) CC: @yzchang Last updated: 2019-09-02 16:05:27 +0200 ## Comment 27134 Date: 2019-07-12 21:20:33 +0200 From: @yzchang User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15 Build Identifier: If I stop a long running INSERT INTO query with sys.stop, or sys.pause and then sys.stop, the query is eventually stopped, but subsequent queries on this table returns "BATproject: does not match always". Don't know if sys.stop is the only culprit, or sys.pause as well. This problem is a bit nasty, because simple queries such as "select count(*) from t" and "select * from t limit 1" work correctly. You only notice the problem, if you actually touch more/all data of the table, e.g. with "select * from t where id = NNN". Reproducible: Always ### Steps to Reproduce: 1. In mclient 1: create a dummy test table "t" in an empty database: create table t as select * from _tables; insert into t select * from t; 2. Repeat the INSERT INTO query until its exec. time is long enough 3. In another mclient connection, execute select * from sys.queue; to find the qtag of the INSERT query 4. Execute call sys.stop(<qtag>); 5. In mclient 1, execute: select * from t where id = 2001; then you'll get the error: client1:!ERROR: BATproject: does not match always client1:!ERROR:MALException:algebra.projection:GDK reported error: BATproject: does not match always GDK reported error: BATproject: does not match always ## Comment 27135 Date: 2019-07-13 10:07:52 +0200 From: @sjoerdmullender I was able to reproduce this. The first werid thing is that the interrupted query did not produce any kind of error message. I would expect it to fail with an error saying that the query was brutally stopped. Also, since I was running the server under gdb with some breakpoints that would trigger on any kind of error, I saw that no error was generated in the long running query by the call to sys.stop. This may very well be the problem: no error means no error handling. ## Comment 27136 Date: 2019-07-13 10:33:57 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [1d6e8def4946](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1d6e8def4946) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=1d6e8def4946](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=1d6e8def4946) Changeset description: Turn stopping a query into an error. This fixes bug #6730. ## Comment 27140 Date: 2019-07-15 17:21:59 +0200 From: @yzchang Adding tests is difficult, but I tested it by hand and stopping an INSERT INTO query no longer break my table. Also tested on stopping an UPDATE query.
sys.stop or sys.pause a INSERT query triggers "BATproject: does not match always"
https://api.github.com/repos/MonetDB/MonetDB/issues/6730/comments
0
2020-11-30T16:35:40Z
2024-06-27T13:06:29Z
https://github.com/MonetDB/MonetDB/issues/6730
753,626,835
6,730
[ "MonetDB", "MonetDB" ]
Date: 2019-07-11 17:37:22 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) CC: @PedroTadim Last updated: 2019-09-02 16:05:26 +0200 ## Comment 27130 Date: 2019-07-11 17:37:22 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0 Build Identifier: By using CREATE TABLE products_new (id serial, LIKE products); it is possible to create a table which has multiple columns with the same name. This should not be allowed. It also results in low level GDK errors when querying the table after data has been inserted. Reproducible: Always ### Steps to Reproduce: CREATE TABLE products (id int not null primary key, name varchar(99) not null, price decimal(7,2) not null); INSERT INTO products (id, name, price) VALUES (6, 'beer', 1.55); INSERT INTO products (id, name, price) VALUES (8, 'wine', 5.67); SELECT * FROM products; CREATE TABLE products_new (id serial, like products); -- the table is created with 2 columns named id !! \d products_new SELECT id from products_new; SELECT * from products_new; SELECT id, id, name, price from products_new; SELECT id, name, price from products_new; SELECT name, price from products_new; SELECT name from products_new; INSERT INTO products_new (id, name, price) VALUES (6, 'beer', 1.55); INSERT INTO products_new (id, name, price) VALUES (8, 'wine', 5.67); SELECT id from products_new; -- 4 rows instead of 2 inserted! SELECT * from products_new; -- fails with Error: GDK reported error: BATproject: does not match always SELECT id, id, name, price from products_new; -- fails with Error: GDK reported error: BATproject: does not match always SELECT id, name, price from products_new; -- fails with Error: GDK reported error: BATproject: does not match always SELECT name, price from products_new; -- fails with Error: GDK reported error: BATproject: does not match always SELECT name from products_new; -- fails with Error: GDK reported error: BATproject: does not match always CREATE TABLE products_new2 (id serial, like products, name2 varchar(299) not null, like products); \d products_new2 SELECT id from products_new2; SELECT * from products_new2; SELECT name from products_new2; SELECT name2 from products_new2; SELECT price from products_new2; INSERT INTO products_new2 (id, name2, price) VALUES (6, 'beer', 1.55); INSERT INTO products_new2 (id, name2, price) VALUES (8, 'wine', 5.67); SELECT id from products_new2; SELECT * from products_new2; SELECT name from products_new2; SELECT name2 from products_new2; SELECT price from products_new2; DROP TABLE IF EXISTS products; DROP TABLE IF EXISTS products_new; DROP TABLE IF EXISTS products_new2; ### Actual Results: Tables products_new and products_new2 are created without error! They contain columns which have the exact same name, which should not be possible. After inserting data into products_new, querying the table produces Error: GDK reported error: BATproject: does not match always After inserting data into products_new2, querying the table shows no data! ### Expected Results: Commands CREATE TABLE products_new (id serial, like products); and CREATE TABLE products_new2 (id serial, like products, name2 varchar(299) not null, like products); should produce eror: CREATE TABLE: a column named 'id' already exists ## Comment 27131 Date: 2019-07-11 17:57:34 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [028329c47ed9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=028329c47ed9) 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=028329c47ed9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=028329c47ed9) Changeset description: Added test and fix for bug #6729.
Creating a table with duplicate column name should not be possible
https://api.github.com/repos/MonetDB/MonetDB/issues/6729/comments
0
2020-11-30T16:35:36Z
2024-06-27T13:06:28Z
https://github.com/MonetDB/MonetDB/issues/6729
753,626,799
6,729
[ "MonetDB", "MonetDB" ]
Date: 2019-07-11 15:07:53 +0200 From: @swingbit To: SQL devs &lt;<bugs-sql>&gt; Version: 11.31.13 (Aug2018-SP2) CC: @njnes, @PedroTadim Last updated: 2019-09-02 16:05:26 +0200 ## Comment 27127 Date: 2019-07-11 15:07:53 +0200 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36 Build Identifier: start transaction; create table r(a1 string, a2 string); insert into r values ('a','b'), ('a','b'), ('b','a'); The following query removes duplicate correctly: SELECT DISTINCT a1,a2 FROM r; +------+------+ | a1 | a2 | +======+======+ | a | b | | b | a | +------+------+ 2 tuples The following query doesn't: SELECT DISTINCT CASE WHEN a1 > a2 THEN a2 ELSE a1 END as c1, CASE WHEN a1 < a2 THEN a2 ELSE a1 END as c2 FROM r; +------+------+ | c1 | c2 | +======+======+ | a | b | | a | b | +------+------+ 2 tuples It's not really important what the CASE statements do. The DISTINCT should remove duplicate rows from the final relation, but they are still there. Reproducible: Always ## Comment 27128 Date: 2019-07-11 15:11:31 +0200 From: @swingbit Also notice that replacing DISTINCT with the corresponding GROUP BY clause gives the correct result: SELECT CASE WHEN a1 > a2 THEN a2 ELSE a1 END as c1, CASE WHEN a1 < a2 THEN a2 ELSE a1 END as c2 FROM r GROUP BY c1,c2; +------+------+ | c1 | c2 | +======+======+ | a | b | +------+------+ 1 tuple ## Comment 27129 Date: 2019-07-11 15:59:03 +0200 From: @PedroTadim This bug is reproducible on Apr2019 branch, but not on default. ## Comment 27132 Date: 2019-07-11 18:22:57 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [4448a5aee0a4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4448a5aee0a4) 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=4448a5aee0a4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=4448a5aee0a4) Changeset description: Added test bug #6728. ## Comment 27178 Date: 2019-07-27 22:47:07 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [397669aa4038](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=397669aa4038) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=397669aa4038](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=397669aa4038) Changeset description: make sure we do not loose the distinct when rewriting (splitting) the project expressions. This fixes bug #6728 ## Comment 27179 Date: 2019-07-27 22:47:34 +0200 From: @njnes fixed optimizer
SELECT DISTINCT not removing duplicates
https://api.github.com/repos/MonetDB/MonetDB/issues/6728/comments
0
2020-11-30T16:35:33Z
2024-06-27T13:06:27Z
https://github.com/MonetDB/MonetDB/issues/6728
753,626,760
6,728
[ "MonetDB", "MonetDB" ]
Date: 2019-07-09 19:02:33 +0200 From: alexandre To: clients devs &lt;<bugs-clients>&gt; Version: 11.33.3 (Apr2019) CC: @PedroTadim Last updated: 2019-07-10 16:15:49 +0200 ## Comment 27117 Date: 2019-07-09 19:02:33 +0200 From: alexandre User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36 Build Identifier: There is a internal error when I try to connect and execute a simple SELECT statement (select 1). This occurs only on Apache module. Reproducible: Always ### Steps to Reproduce: 1. Download this file: "https://drive.google.com/open?id=1ETIpmILd81beLtSIV6nzSqAQXRLX_AG7" and extract on "C:\". Have to stay this way: "C:\Apache"; 2. Execute this file: "C:\Apache\bin\httpd.exe"; 3. In the browser, execute this link: "http://localhost:86/monetdbtest/datasnap/rest/tservermethods1/echostring/monetdb"; ### Actual Results: This error: "https://drive.google.com/open?id=1i2AyiMFRmzCLKfesrT1iaryNDNcVXCTW"; And this error: "https://drive.google.com/open?id=1WzZQ5N0z8QNgtA4tCZeGi9yGvgRE09Bg"; ### Expected Results: The success execution of REST service request (with this return: "monetdb+1"). Here is the sample project made in Delphi 10.3.1: "https://drive.google.com/open?id=1upsAY0UUqy1SFXczxoj_SjMLZyOrWhzi". The main piece of code: function TServerMethods1.EchoString(Value: string): string; var zFDConnection: TFDConnection; begin Result := Value; zFDConnection := TFDConnection.Create(nil); try zFDConnection.Params.Add('DriverID=ODBC'); zFDConnection.Params.Add('DataSource=MonetDB'); Result := Result + '+' + zFDConnection.ExecSQLScalar('select 1'); finally zFDConnection.Free; end; end; ## Comment 27118 Date: 2019-07-10 09:40:33 +0200 From: @PedroTadim Hello Alexandre, It seems to be a problem with your zlib installation on Windows. MonetDB cannot start because the symbol gzfwrite is missing. The symbol is present on newer versions of zlib (>= 1.2.9), which MonetDB gets compiled with. However in your installation there must an older version of zlib1.dll installed which is present on the PATH and doesn't provide this symbol. Please check if you have an older version of zlib1.dll installed conflicting. ## Comment 27119 Date: 2019-07-10 10:45:11 +0200 From: @sjoerdmullender To elaborate on Pedro's answer: the version of the zlib DLL that the MonetDB driver is compiled with is (or should be) in the same folder as the ODBC driver itself. You can check the version of that driver by checking its file properties. Somehow you need to convince your application to use that version of the zlib DLL when it loads the MonetDB ODBC driver. ## Comment 27122 Date: 2019-07-10 16:15:49 +0200 From: alexandre Hello Pedro Ferreira, Hello Sjoerd Mullender, Thank you for your assistance! That was it!
Internal error when using the ODBC driver on Apache module (developed with Delphi 10.3.1)
https://api.github.com/repos/MonetDB/MonetDB/issues/6727/comments
0
2020-11-30T16:35:31Z
2024-06-27T13:06:26Z
https://github.com/MonetDB/MonetDB/issues/6727
753,626,732
6,727
[ "MonetDB", "MonetDB" ]
Date: 2019-07-05 16:20:24 +0200 From: @swingbit To: SQL devs &lt;<bugs-sql>&gt; Version: 11.31.13 (Aug2018-SP2) CC: martin.van.dinther, @PedroTadim Last updated: 2019-12-20 15:36:33 +0100 ## Comment 27113 Date: 2019-07-05 16:20:24 +0200 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36 Build Identifier: start transaction; CREATE AGGREGATE pycount(val STRING) RETURNS INTEGER LANGUAGE PYTHON { unique = numpy.unique(aggr_group) x = numpy.zeros(shape=(unique.size)) for i in range(0, unique.size): x[i] = val[aggr_group==unique[i]].size return(x) }; sql>select count(term) from (values (1,'apple'), (2,'pear')) as x(id, term); +------+ | L5 | +======+ | 2 | +------+ 1 tuple sql>select pycount(term) from (values (1,'apple'), (2,'pear')) as x(id, term); Python exception 1. def pyfun(val,_columns,_column_types,_conn): > 2. unique = numpy.unique(aggr_group) 3. x = numpy.zeros(shape=(unique.size)) 4. for i in range(0, unique.size): global name 'aggr_group' is not defined One could say that this is correct, as there are no groups for this aggregation. In that case, probably the python aggregation should check whether aggr_group exists, and aggregate over all rows in case it doesn't. Is that the correct interpretation? If so, maybe this should be better explained somewhere. The original post (https://www.monetdb.org/blog/embedded-pythonnumpy-monetdb) does not mention this case. Also, to simplify things, maybe aggr_group should also be passed, but with a null value. That would be a cleaner test to perform in the python code. The other interpretation could be that there is 1 group, which includes all rows. In that case, the absence of aggr_group is a bug. Reproducible: Always ## Comment 27124 Date: 2019-07-11 10:52:33 +0200 From: @sjoerdmullender I suppose the documentation could be better, but your function could also catch the problem: CREATE AGGREGATE pycount(val STRING) RETURNS INTEGER LANGUAGE PYTHON { try: unique = numpy.unique(aggr_group) except NameError: unique = numpy.unique([0]) x = numpy.zeros(shape=(unique.size)) for i in range(0, unique.size): x[i] = val[aggr_group==unique[i]].size return(x) }; ## Comment 27125 Date: 2019-07-11 10:54:09 +0200 From: @swingbit Indeed, I just was not sure whether this is how it was intended to be. ## Comment 27146 Date: 2019-07-17 17:14:47 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; FYI: https://www.monetdb.org/blog/embedded-pythonnumpy-monetdb has been updated with info that parameter aggr_group is only created when GROUP BY is used. So instead of: select pycount(term) from (values (1,'apple'), (2,'pear')) as x(id, term); use: select pycount(term) from (values (1,'apple'), (2,'pear')) as x(id, term) group by id; ## Comment 27147 Date: 2019-07-17 17:43:55 +0200 From: @swingbit Thanks for adding to the documentation. To make it clear: I do agree that the problem was not in the code, but in the documentation. However, the solution is not to use the GROUP BY. That would yield a different result (the original query was an aggregation with no grouping). The correct solution is to check for the existence of aggr_group in the python function: try: aggr_group except NameError: aggr_group doesn't exist no groups, aggregate on all data else: aggr_group exists aggregate on groups Note that this should be done on every python aggregate function defined, no exception. If you want to make the docs even clearer, perhaps you could include something like that. ## Comment 27443 Date: 2019-12-05 15:07:14 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; I have updated the documentation. It now uses: try: unique = numpy.unique(aggr_group) x = numpy.zeros(shape=(unique.size)) for i in range(0, unique.size): x[i] = numpy.sum(val[aggr_group==unique[i]]) except NameError: aggr_group doesn't exist. no groups, aggregate on all data x = numpy.sum(val) return(x) This way it behaves similar to SQL aggregate functions. I tested it with SQL queries: SELECT groupnr, python_aggregate(value) FROM grouped_ints GROUP BY groupnr; SELECT value, python_aggregate(groupnr) FROM grouped_ints GROUP BY value; SELECT python_aggregate(groupnr) FROM grouped_ints; SELECT python_aggregate(value) FROM grouped_ints; and for the extended table (I called it grouped_ints2): SELECT groupnr, groupnr2, python_aggregate(value) FROM grouped_ints2 GROUP BY groupnr, groupnr2; SELECT python_aggregate(groupnr) FROM grouped_ints2; SELECT python_aggregate(groupnr2) FROM grouped_ints2; SELECT python_aggregate(value) FROM grouped_ints2; These queries all work now and with the correct output. ## Comment 27446 Date: 2019-12-05 16:16:07 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [ab919d359405](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ab919d359405) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=ab919d359405](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=ab919d359405) Changeset description: Add test for bug #6726 Note that query: SELECT value, python_aggregate(groupnr) FROM grouped_ints GROUP BY value; does not give the correct answer. It only returned two rows instead of 5. ## Comment 27447 Date: 2019-12-05 16:20:54 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; Reopened as test reveals a new problem in one case where the grouping is done on a column with unique values. See query: SELECT value, python_aggregate(groupnr) FROM grouped_ints GROUP BY value; ## Comment 27460 Date: 2019-12-06 15:32:19 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [2d8848e66425](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2d8848e66425) 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=2d8848e66425](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=2d8848e66425) Changeset description: Fix for bug #6726 failing test. Look for TYPE_void bats in pyapi and generate dense sequences from them. (I have to check for 32-bit architectures yet)
Python aggregation does not create aggr_group when aggregating over all rows
https://api.github.com/repos/MonetDB/MonetDB/issues/6726/comments
0
2020-11-30T16:35:28Z
2024-06-27T13:06:25Z
https://github.com/MonetDB/MonetDB/issues/6726
753,626,702
6,726
[ "MonetDB", "MonetDB" ]
Date: 2019-07-04 17:41:24 +0200 From: @swingbit To: SQL devs &lt;<bugs-sql>&gt; Version: 11.31.13 (Aug2018-SP2) Last updated: 2019-09-02 16:05:27 +0200 ## Comment 27108 Date: 2019-07-04 17:41:24 +0200 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36 Build Identifier: sql>prepare select idontexist(?); (crash) Reproducible: Always ## Comment 27110 Date: 2019-07-05 10:05:19 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [2c5eade5b972](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2c5eade5b972) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=2c5eade5b972](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=2c5eade5b972) Changeset description: Fix and test for bug #6725.
Prepare statement on non-existing function crashes
https://api.github.com/repos/MonetDB/MonetDB/issues/6725/comments
0
2020-11-30T16:35:24Z
2024-06-27T13:06:24Z
https://github.com/MonetDB/MonetDB/issues/6725
753,626,652
6,725
[ "MonetDB", "MonetDB" ]
Date: 2019-07-04 17:37:14 +0200 From: @swingbit To: SQL devs &lt;<bugs-sql>&gt; Version: 11.31.13 (Aug2018-SP2) CC: daniel.zvinca, @PedroTadim Last updated: 2019-12-20 15:36:33 +0100 ## Comment 27107 Date: 2019-07-04 17:37:14 +0200 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36 Build Identifier: start transaction; create function mylength1(s string) returns int begin return length(s); end; create function mylength2(s string, i int) returns int begin return length(s) + i; end; * This is correct: sql>prepare select mylength1(?); execute prepared statement using: EXEC 9(...) +------+--------+-------+--------+-------+--------+ | type | digits | scale | schema | table | column | +======+========+=======+========+=======+========+ | int | 32 | 0 | | L2 | L2 | | clob | 0 | 0 | null | null | null | +------+--------+-------+--------+-------+--------+ 2 tuples * This is wrong (the string argument becomes hugeint): sql>prepare select mylength2(?, 2); execute prepared statement using: EXEC 11(...) +---------+--------+-------+--------+-------+--------+ | type | digits | scale | schema | table | column | +=========+========+=======+========+=======+========+ | int | 32 | 0 | | L2 | L2 | | hugeint | 128 | 0 | null | null | null | +---------+--------+-------+--------+-------+--------+ 2 tuples Reproducible: Always ## Comment 27109 Date: 2019-07-05 08:04:24 +0200 From: daniel.zvinca Obviously it is an issue here. But the fix should consider also the tricky case of overloaded functions (same name, different parameter types, return type included). The followings are valid: create function my_func(s string, i int) returns int begin return length(s) + i; end; create function my_func(s bigint, i int) returns int begin return i; end; create function my_func(s string, i int) returns string begin return coalesce(s, ''); end; How the prepare/compiler would know what function to map to for “prepare select my_func(?, 2);”? I can only guess that the following can work to some extents: “prepare select cast(my_func(cast(? as string), 2) as int);” But, it might be also an idea to allow the type indication “? as type” or “?:type” or "function{ret_type, param1_type, param2_type}. Something like. "prepare select my_func(? as string, 2) as int;" "prepare select my_func{string, string, i}(?, 2);" Anyway for the given example of non-overloaded functions I expect the param type to be known and for overloaded functions throwing an error would be the safest way (in case the overloaded functions have incompatible types for the variable parameter or always ?). ## Comment 27111 Date: 2019-07-05 11:57:00 +0200 From: @swingbit Daniel, The overloaded signatures are indeed yet another problem. At the moment we solve that issue in most cases using an explicit cast, as in prepare select my_func(cast(? as string), 2); Explicit syntax could also be nice. Perhaps this would be the right occasion to extend the syntax with allowing named prepared statement. This is something that most SQL vendors have and would be a very nice addition. For example, PostgreSQL's syntax solves both issues: prepare my_prep(string, int) as select my_func(?,2); exec my_prep('hello'); I would find this an elegant solution (the current syntax could even be kept for backward compatibility) ## Comment 27112 Date: 2019-07-05 13:37:37 +0200 From: daniel.zvinca PostgreSQL approach is elegant, indeed. I don't mind much the unique number returned by MonetDB, I can certainly live with that, but types should be possible to be mentioned somehow for the parameters. Cast is not exactly an indication for the expected type, but it seems the accepted solution for overloaded functions like built-in coalesce. ("Bonus", the server just crashed. It can be reproduced on Win64/Apr2019. See further below). sql> prepare select coalesce(?, 23); result type missing sql> prepare select coalesce(cast(? as int), 23); execute prepared statement using: EXEC 5(...) +------+--------+-------+--------+-------+--------+ | type | digits | scale | schema | table | column | +======+========+=======+========+=======+========+ | int | 32 | 0 | | L3 | L3 | | int | 32 | 0 | null | null | null | +------+--------+-------+--------+-------+--------+ However, this is also how I was able to crash the server. sql> exec 5(); (server crashed) Connection terminated during read line Press any key to continue . . . The server seems to crash for any case where provided number of parameters is different than compiled one. Eventually, the following that also uses an overloaded function, provides a guess I am not happy with (cast seems to be the only way to avoid the issue): sql>prepare select abs(?); execute prepared statement using: EXEC 7(...) +--------------+--------+-------+--------+-------+--------+ | type | digits | scale | schema | table | column | +==============+========+=======+========+=======+========+ | sec_interval | 13 | 0 | | L2 | L2 | | sec_interval | 13 | 0 | null | null | null | +--------------+--------+-------+--------+-------+--------+ 2 tuples sql>exec 7(12.5); wrong type for argument 1 of function call: decimal, expected sec_interval ## Comment 27114 Date: 2019-07-08 11:16:29 +0200 From: @PedroTadim Hello Daniel, Recently I also found the problem of calling exec with the wrong number of arguments. This issue should be already fixed. ## Comment 27115 Date: 2019-07-08 12:03:05 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [cbd28b7ab3cb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cbd28b7ab3cb) 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=cbd28b7ab3cb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=cbd28b7ab3cb) Changeset description: Added test for bug #6724. ## Comment 27434 Date: 2019-11-30 10:28:27 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [c331fce0695b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c331fce0695b) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=c331fce0695b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=c331fce0695b) Changeset description: add fix for prepare-types bug #6724
Prepare confuses types when more than one argument is used
https://api.github.com/repos/MonetDB/MonetDB/issues/6724/comments
0
2020-11-30T16:35:21Z
2024-06-27T13:06:23Z
https://github.com/MonetDB/MonetDB/issues/6724
753,626,606
6,724
[ "MonetDB", "MonetDB" ]
Date: 2019-07-02 17:08:10 +0200 From: daniel.zvinca To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) CC: martin.van.dinther, @njnes Last updated: 2020-06-03 16:58:52 +0200 ## Comment 27102 Date: 2019-07-02 17:08:10 +0200 From: daniel.zvinca User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36 Build Identifier: because duplicate names are allowed in queries (also in subqueries), any select on a subquery that has duplicates will fail. Reproducible: Always ### Steps to Reproduce: 1.select 1 as T, 2 as T; result: +------+------+ | t | t | +======+======+ | 1 | 2 | +------+------+ 2. select a.* from (select 1 as T, 2 as T) a; fails with error: Duplicate column name 'a.t' The following also fails select a.* from (select 1,2,3 as "L2") a; fails with error: Duplicate column name 'a.L2' ### Expected Results: I would expect a similar behavior with other SQL engines: automatic aliasing for columns with identical name. ## Comment 27104 Date: 2019-07-03 13:58:54 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [38951eeadde0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=38951eeadde0) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=38951eeadde0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=38951eeadde0) Changeset description: Add test for bug #6723 ## Comment 27415 Date: 2019-11-20 10:38:29 +0100 From: @njnes fix for labels has been added to the sq2default branch. Soon into default. More fixes for the duplicate names are coming, allowing (useless) duplicate names at the result level. With in queries this will still need to fail. ## Comment 27416 Date: 2019-11-20 10:39:46 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [3e4b46fe6ec7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3e4b46fe6ec7) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=3e4b46fe6ec7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=3e4b46fe6ec7) Changeset description: add handling of duplicate column names at the result level, ie internaly rename (label) expressions. Only use the alias on the result (when possible). Solves bug #6723 ## Comment 27507 Date: 2020-01-08 17:56:41 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; The fix was done in sq2default branch (which is merged into the default branch) and not in Nov2019-SP1 branch. Hence the fix will be included in the next feature release.
columns aliases duplicates should not be allowed. automatic aliasing required.
https://api.github.com/repos/MonetDB/MonetDB/issues/6723/comments
0
2020-11-30T16:35:17Z
2024-06-27T13:06:22Z
https://github.com/MonetDB/MonetDB/issues/6723
753,626,566
6,723
[ "MonetDB", "MonetDB" ]
Date: 2019-07-02 16:45:46 +0200 From: daniel.zvinca To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) CC: @PedroTadim Last updated: 2019-11-28 10:00:04 +0100 ## Comment 27101 Date: 2019-07-02 16:45:46 +0200 From: daniel.zvinca User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36 Build Identifier: * in combination with window functions returns unexpected doubled columns (unnamed) depending on * position. Easy to reproduce. Reproducible: Always ### Steps to Reproduce: 1. create table test_x (part string, qty double); 2. insert into test_x values ('a', 18), ('a', 13),('a', 16),('b', 15),('b', 16),('c', 17),('c', 18),('c', 12),('d', 12),('d', 12); 3. select dense_rank() over (order by part, qty) as rank_id, row_number() over (order by part, qty) as row_id, * from test_x order by part, qty ### Actual Results: +---------+--------+------+--------------------------+------+------+ | rank_id | row_id | part | qty | L3 | L10 | +=========+========+======+==========================+======+======+ | 1 | 1 | a | 13 | 1 | 1 | | 2 | 2 | a | 16 | 2 | 2 | | 3 | 3 | a | 18 | 3 | 3 | | 4 | 4 | b | 15 | 4 | 4 | | 5 | 5 | b | 16 | 5 | 5 | | 6 | 6 | c | 12 | 6 | 6 | | 7 | 7 | c | 17 | 7 | 7 | | 8 | 8 | c | 18 | 8 | 8 | | 9 | 9 | d | 12 | 9 | 9 | | 9 | 10 | d | 12 | 9 | 10 | +---------+--------+------+--------------------------+------+------+ ### Expected Results: +---------+--------+------+--------------------------+ | rank_id | row_id | part | qty | +=========+========+======+==========================+ | 1 | 1 | a | 13 | | 2 | 2 | a | 16 | | 3 | 3 | a | 18 | | 4 | 4 | b | 15 | | 5 | 5 | b | 16 | | 6 | 6 | c | 12 | | 7 | 7 | c | 17 | | 8 | 8 | c | 18 | | 9 | 9 | d | 12 | | 9 | 10 | d | 12 | +---------+--------+------+--------------------------+ The followings return different results: select *, (dense_rank() over (order by part, qty)) as rank_id, (row_number() over (order by part, qty)) as row_id from test_x; select (dense_rank() over (order by part, qty)) as rank_id, *, (row_number() over (order by part, qty)) as row_id from test_x; select (dense_rank() over (order by part, qty)) as rank_id, (row_number() over (order by part, qty)) as row_id, * from test_x; ## Comment 27103 Date: 2019-07-03 13:12:59 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [fc59db5e875d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fc59db5e875d) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=fc59db5e875d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=fc59db5e875d) Changeset description: Add test for bug #6722 ## Comment 27161 Date: 2019-07-23 09:17:33 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [474fab6a03d8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=474fab6a03d8) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=474fab6a03d8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=474fab6a03d8) Changeset description: initial steps to fix the * output bug #6722
window functions issues
https://api.github.com/repos/MonetDB/MonetDB/issues/6722/comments
0
2020-11-30T16:35:14Z
2024-06-27T13:06:21Z
https://github.com/MonetDB/MonetDB/issues/6722
753,626,527
6,722
[ "MonetDB", "MonetDB" ]
Date: 2019-07-01 16:24:39 +0200 From: @swingbit To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) Last updated: 2019-09-02 16:05:26 +0200 ## Comment 27095 Date: 2019-07-01 16:24:39 +0200 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36 Build Identifier: I stumbled upon a couple of calls of pcre_exec that, according to the manual, should be fixed. The manual says, about the size of the output vector (ovector): "The first two-thirds of the vector is used to pass back captured substrings, each substring using a pair of integers. The remaining third of the vector is used as workspace by pcre_exec() while matching capturing subpatterns, and is not available for passing back information. The number passed in ovecsize should always be a multiple of three. If it is not, it is rounded down." Then I suppose the following call will always be rounded down to 9. Better use 9 then. define BODY (pcre_exec(re, pe, v, (int) strlen(v), 0, 0, ovector, 10) >= 0) The following one seems more dangerous. The third element ("used as workspace by pcre_exec") is not allocated. Also, ovectsize is 2, which becomes 0 when rounded down: PCREindex(int *res, const pcre *pattern, const str *s) { ifdef HAVE_LIBPCRE int v[2]; v[0] = v[1] = *res = 0; if (pcre_exec(pattern, NULL, *s, (int) strlen(*s), 0, 0, v, 2) >= 0) { *res = v[1]; } The function PCREindex doesn't seem to work correctly indeed: sql>select pcre_index('1','abc1def'); +------+ | L2 | +======+ | 4 | +------+ sql>select pcre_index('\\d','abc1def'); +------+ | L2 | +======+ | 0 | +------+ Reproducible: Always ## Comment 27096 Date: 2019-07-01 19:44:53 +0200 From: @sjoerdmullender You're right about the multiple of 3. I'll fix that. How do you use PCREindex and what do you expect that it does? There is no SQL function pcre_index in the code we distribute, so how did you define that? ## Comment 27097 Date: 2019-07-02 11:12:27 +0200 From: @swingbit True, I had forgotten that I had defined that myself (it is actually an alias for SQL function "patindex"): CREATE FUNCTION pcre_index(pat string, s string) RETURNS integer EXTERNAL NAME pcre."patindex"; I would expect this to return 4 in both my previous calls. It does when the pattern is a literal '1', but not when it is a '\\d' or a '[0-9]' (even after fixing the size of the output vector). I'm not actually using this function, I just found this by chance. Speaking of this, I wonder why the most useful pcre functions are available in mal but not mapped in SQL. These are the extra functions I define: CREATE OR REPLACE FUNCTION pcre_match(s string, pattern string) RETURNS boolean EXTERNAL NAME pcre."match"; CREATE OR REPLACE FUNCTION pcre_imatch(s string, pattern string) RETURNS boolean EXTERNAL NAME pcre."imatch"; CREATE OR REPLACE FUNCTION pcre_index(pat string, s string) RETURNS integer EXTERNAL NAME pcre."patindex"; CREATE OR REPLACE FUNCTION pcre_replace(s string, pattern string, repl string, flags string) RETURNS string EXTERNAL NAME pcre."replace"; CREATE OR REPLACE FUNCTION pcre_replacefirst(s string, pattern string, repl string, flags string) RETURNS string EXTERNAL NAME pcre."replace_first"; ## Comment 27098 Date: 2019-07-02 11:48:10 +0200 From: @sjoerdmullender The problem with pcre.patindex is that it quotes all special characters in the pattern, so it is basically just an expensive way to do an ordinary substring search. This should probably be changed. But it means that the result with pattern \d or [0-9] is totally expected: those strings don't occur in the to-be-matched string, and the "nomatch" return value is 0. ## Comment 27099 Date: 2019-07-02 11:53:00 +0200 From: @swingbit Ah, I see now. It maps to PCREpatindex, which is meant to accept SQL-like patterns, not pcre patterns. ## Comment 27105 Date: 2019-07-03 16:14:17 +0200 From: @sjoerdmullender I fixed the bug with the multiple-of-three. The rest of the report is, I think, I misunderstandment of what the pcre_patindex function does. So I'm closing this.
Possibly incorrect call to pcre_exec
https://api.github.com/repos/MonetDB/MonetDB/issues/6721/comments
0
2020-11-30T16:35:11Z
2024-06-27T13:06:20Z
https://github.com/MonetDB/MonetDB/issues/6721
753,626,482
6,721
[ "MonetDB", "MonetDB" ]
Date: 2019-06-26 10:10:35 +0200 From: @swingbit To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) CC: @PedroTadim Last updated: 2019-09-02 16:05:27 +0200 ## Comment 27086 Date: 2019-06-26 10:10:35 +0200 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36 Build Identifier: Compiling Apr2019 tip on FC30, gcc (GCC) 9.1.1 20190503 configure : --disable-debug --disable-developer --disable-assert --enable-optimize In file included from /usr/include/string.h:494, from src/monetdb5/mal/../../gdk/gdk.h:316, from src/monetdb5/mal/mal.h:17, from src/monetdb5/mal/mal_type.h:11, from src/monetdb5/mal/mal_instruction.h:12, from src/monetdb5/mal/mal_exception.h:11, from src/monetdb5/mal/mal_import.h:12, from src/monetdb5/mal/mal_import.c:28: In function ‘strncpy’, inlined from ‘mal_cmdline’ at src/monetdb5/mal/mal_import.c:305:3, inlined from ‘compileString’ at src/monetdb5/mal/mal_import.c:326:6: /usr/include/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/monetdb5/mal/mal_import.c: In function ‘compileString’: src/monetdb5/mal/mal_import.c:318:18: note: length computed here 318 | int len = (int) strlen(s); | ^~~~~~~~~ In file included from /usr/include/string.h:494, from src/monetdb5/mal/../../gdk/gdk.h:316, from src/monetdb5/mal/mal.h:17, from src/monetdb5/mal/mal_type.h:11, from src/monetdb5/mal/mal_instruction.h:12, from src/monetdb5/mal/mal_exception.h:11, from src/monetdb5/mal/mal_import.h:12, from src/monetdb5/mal/mal_import.c:28: In function ‘strncpy’, inlined from ‘mal_cmdline’ at src/monetdb5/mal/mal_import.c:305:3, inlined from ‘callString’ at src/monetdb5/mal/mal_import.c:400:6: /usr/include/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/monetdb5/mal/mal_import.c: In function ‘callString’: src/monetdb5/mal/mal_import.c:394:21: note: length computed here 394 | int i, len = (int) strlen(s); | ^~~~~~~~~ cc1: all warnings being treated as errors make[6]: *** [Makefile:795: libmal_la-mal_import.lo] Error 1 make[6]: *** Waiting for unfinished jobs.... make[5]: *** [Makefile:493: all] Error 2 make[4]: *** [Makefile:532: all-recursive] Error 1 make[3]: *** [Makefile:486: all] Error 2 make[2]: *** [Makefile:594: all-recursive] Error 1 make[1]: *** [Makefile:524: all] Error 2 make: *** [Makefile:175: compile] Error 2 Reproducible: Always ## Comment 27088 Date: 2019-06-26 15:03:02 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [c15ea2e68434](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c15ea2e68434) 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=c15ea2e68434](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=c15ea2e68434) Changeset description: Compilation fixes for bug #6720. ## Comment 27091 Date: 2019-06-26 17:09:38 +0200 From: @swingbit Pedro, There is one more strncpy (which triggers the same compilation issue) at monetdb5/modules/mal/mdb.c:703 Fixing this on top of your previous commit makes it compile correctly. ## Comment 27093 Date: 2019-06-26 18:10:54 +0200 From: @PedroTadim I didn't get that error. However if I fix it in mdb.c:703, the error will be thrown elsewhere, because we use strncpy in many places. ## Comment 27094 Date: 2019-06-26 18:40:41 +0200 From: @swingbit Mh, strange. I got only an error on that one and after fixing it I got no more errors. Are you using gcc 9? In any case, isn't it a good idea to change all occurrences of strncp into memcpy? strncpy will keep giving compilation errors. As far as I know, the only advantage of strncpy is that it pads the destination with 0s if the string is shorter than n. But in most cases that's not needed. ## Comment 27137 Date: 2019-07-15 10:44:45 +0200 From: @sjoerdmullender Changing all strncpy calls to memcpy is not a priority. What is a priority is making sure the system compiles cleanly on as many environments as is reasonable (which includes the latest gcc). I myself use the latest Fedora release on my laptop (which has gcc 9.1.1), but don't always compile an optimized version there (which was needed to trigger the message).
Compilation issues on gcc 9.1.1 [-Werror=stringop-truncation]
https://api.github.com/repos/MonetDB/MonetDB/issues/6720/comments
0
2020-11-30T16:35:07Z
2024-06-27T13:06:19Z
https://github.com/MonetDB/MonetDB/issues/6720
753,626,438
6,720
[ "MonetDB", "MonetDB" ]
Date: 2019-06-25 17:21:52 +0200 From: @swingbit To: SQL devs &lt;<bugs-sql>&gt; Version: 11.31.13 (Aug2018-SP2) Last updated: 2019-06-26 09:16:09 +0200 ## Comment 27082 Date: 2019-06-25 17:21:52 +0200 From: @swingbit After upgrading to Fedora Core 30, gcc (GCC) 9.1.1 20190503 Compiling with --disable-debug --disable-developer --disable-assert --enable-optimize Gives this: In file included from /usr/include/stdio.h:867, from ../../monetdb_config.h:757, from src/clients/mapiclient/dotmonetdb.c:9: In function ‘fprintf’, inlined from ‘parse_dotmonetdb’ at src/clients/mapiclient/dotmonetdb.c:43:3: /usr/include/bits/stdio2.h:100:10: error: ‘%s’ directive argument is null [-Werror=format-overflow=] 100 | return __fprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 101 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors ## Comment 27085 Date: 2019-06-26 09:16:09 +0200 From: @swingbit The bug is quite obvious: cfile = NULL; fprintf(stderr, "failed to open file '%s': %s\n", cfile, strerror(errno)); But I see that it has been fixed in Apr2019, and I suppose Aug2018 won't be patched, so I'll close this bug report.
Compilation issue with FC30
https://api.github.com/repos/MonetDB/MonetDB/issues/6719/comments
0
2020-11-30T16:35:03Z
2024-06-28T13:09:08Z
https://github.com/MonetDB/MonetDB/issues/6719
753,626,374
6,719
[ "MonetDB", "MonetDB" ]
Date: 2019-06-25 14:17:48 +0200 From: Henrique &lt;<hvehrenfried>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) CC: @kutsurak Last updated: 2019-09-02 16:05:28 +0200 ## Comment 27081 Date: 2019-06-25 14:17:48 +0200 From: Henrique &lt;<hvehrenfried>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36 OPR/60.0.3255.170 Build Identifier: Hello, we use MonetDB in C3SL in some projects and now we are facing the following error: Whenever we use the INSERT INTO table (...) SELECT table2 ... and table has constraints ( primary key / foreign key ) we get the error: 'mkey.bulk_rotate_xor_hash' undefined in: X_44:bat[:lng] := mkey.bulk_rotate_xor_hash(X_38:bat[:lng], X_43:bat[:int], X_37:bat[:int]); What bugs us at C3SL, is that the previous version did not have this bug, so to test it we developed a simple set of commands that reproduce this error: CREATE TABLE test2 ( order_number SERIAL, order_id INTEGER NOT NULL, qnt INTEGER NOT NULL ); COPY 5 RECORDS INTO test2 FROM stdin USING DELIMITERS '|','\n'; 1|32|57 2|15|105 3|33|0 4|57|20 5|67|134 ; CREATE TABLE test1 ( id INTEGER NOT NULL, qnt INTEGER, order_number INTEGER NOT NULL, CONSTRAINT pk_test1_id PRIMARY KEY ("id", "qnt"), CONSTRAINT pk_order_number FOREIGN KEY ("order_number") REFERENCES test2("order_number") ); INSERT INTO test1 (id, qnt, order_number) SELECT test2.order_id, test2.qnt, test2.order_number from test2; Reproducible: Always ### Steps to Reproduce: 1. Create a Table: CREATE TABLE test2 ( order_number SERIAL, order_id INTEGER NOT NULL, qnt INTEGER NOT NULL ); 2. Insert data into this table: COPY 5 RECORDS INTO test2 FROM stdin USING DELIMITERS '|','\n'; 1|32|57 2|15|105 3|33|0 4|57|20 5|67|134 ; 3. Create another table: CREATE TABLE test1 ( id INTEGER NOT NULL, qnt INTEGER, order_number INTEGER NOT NULL, CONSTRAINT pk_test1_id PRIMARY KEY ("id", "qnt"), CONSTRAINT pk_order_number FOREIGN KEY ("order_number") REFERENCES test2("order_number") ); 4. Copy data from the first table into the second table. INSERT INTO test1 (id, qnt, order_number) SELECT test2.order_id, test2.qnt, test2.order_number from test2; ### Actual Results: The error message that we receive is: 'mkey.bulk_rotate_xor_hash' undefined in: X_44:bat[:lng] := mkey.bulk_rotate_xor_hash(X_38:bat[:lng], X_43:bat[:int], X_37:bat[:int]); ### Expected Results: We expected that the table is copied into another table: "5 affected rows" $ mserver5 --version MonetDB 5 server 11.33.3 (Apr2019) (64-bit, 128-bit integers) Copyright (c) 1993 - July 2008 CWI Copyright (c) August 2008 - 2019 MonetDB B.V., all rights reserved Visit https://www.monetdb.org/ for further information Found 15.3GiB available memory, 8 available cpu cores Libraries: libpcre: 8.39 2016-06-14 openssl: OpenSSL 1.1.1 11 Sep 2018 (compiled with OpenSSL 1.1.0g 2 Nov 2017) libxml2: 2.9.4 Compiled by: pbuilder@dev.monetdb.org (x86_64-pc-linux-gnu) Compilation: gcc -O3 -fomit-frame-pointer -pipe -fdebug-prefix-map=/build/monetdb-11.33.3=. -fstack-protector-strong -Wformat -Werror=format-security -g -D_FORTIFY_SOURCE=2 Linking : /usr/bin/x86_64-linux-gnu-ld -m elf_x86_64 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions $ monetdb --version MonetDB Database Server Toolkit v11.33.3 (Apr2019) $ monetdbd --version MonetDB Database Server v11.33.3 (Apr2019) $ mclient --version mclient, the MonetDB interactive terminal, version 11.33.3 (Apr2019) support for command-line editing compiled-in character encoding: UTF-8 ## Comment 27087 Date: 2019-06-26 12:41:13 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [fe7e23e93f37](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fe7e23e93f37) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=fe7e23e93f37](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=fe7e23e93f37) Changeset description: Add test for bug #6718 ## Comment 27100 Date: 2019-07-02 16:12:34 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [dcc4eda85efa](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dcc4eda85efa) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=dcc4eda85efa](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=dcc4eda85efa) Changeset description: fixed bug #6718, ie don't split constant expression out of parameter list.
Can't copy table into another table with constraints (mkey.bulk_rotate_xor_hash)
https://api.github.com/repos/MonetDB/MonetDB/issues/6718/comments
0
2020-11-30T16:34:59Z
2024-06-27T13:06:17Z
https://github.com/MonetDB/MonetDB/issues/6718
753,626,320
6,718
[ "MonetDB", "MonetDB" ]
Date: 2019-06-21 20:14:15 +0200 From: @eyalroz To: GDK devs &lt;<bugs-common>&gt; Version: 11.33.3 (Apr2019) CC: siquwaco Last updated: 2020-11-28 06:36:42 +0100 ## Comment 27077 Date: 2019-06-21 20:14:15 +0200 From: @eyalroz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 Build Identifier: At some point over the past year, BATrec's were removed from gdk.h . A big step along the way to, well, no BATs and just columns. However, The _comment_ for BATrec, listing all the fields, is still there. At another point during that time, many (all?) uses of the ptr type were replaced with a plain void *. But - this didn't happen for the comments. Example: * @tab ATOMfromstr (int id, str s, size_t* len, ptr* v_dst); (that's in line 1633 in version 11.33.3) Reproducible: Always Noticed this while updating my BBP reader library. ## Comment 27078 Date: 2019-06-21 20:23:01 +0200 From: @eyalroz To clarify: The comment says the structure name is BAT; but the field listing is not what BAT has right now, nor is the comment right above where BAT is defined. ## Comment 28296 Date: 2020-11-28 06:36:42 +0100 From: PhilipLabriola &lt;<siquwaco>&gt; A maxilla and all browser is serving all goals for the public. The nature of the equipment and https://topessaybrands.com/review/grademiners-com-review/ is saved for the goals. The true site is served for the held report for the challenges for the funds for all idealists for humans.
Significant changes to GDK structures and conventions not reflected in comments
https://api.github.com/repos/MonetDB/MonetDB/issues/6717/comments
0
2020-11-30T16:34:57Z
2024-06-28T13:10:13Z
https://github.com/MonetDB/MonetDB/issues/6717
753,626,286
6,717
[ "MonetDB", "MonetDB" ]
Date: 2019-06-17 21:00:57 +0200 From: @arjenpdevries To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) CC: @arjenpdevries, @kutsurak Last updated: 2019-09-02 16:05:28 +0200 ## Comment 27072 Date: 2019-06-17 21:00:57 +0200 From: @arjenpdevries Created attachment 619 Extract from the dictionary file with the problem cases, where quotes have been escaped already. Bug Report Problem: Trying to load the dictionary extracted from the TREC Washington Post collection, as indexed by Anserini (Lucene), does not load into MonetDB. Test files I attached an extract that should load correctly, but does not. With help from Spinque, we found that this dictionary extract does load correctly in their modified version of an older MonetDB, but not in the most recent one that I used (as distributed in the Fedora packages). Radboud & Spinque tried: MonetDB v11.33.3 (Apr2019) - problem occurs. Spinque: MonetDB v11.31.14 (unreleased) - problem does not occur. Single quote escaping The dictionary was processed to escape single quotes (right & left) as follows: echo "s/$(echo -e "\0342\0200\0230")/\\\\047/g" > p.txt echo "s/$(echo -e "\0342\0200\0231")/\\\\047/g" >> p.txt sed -i -f p.txt /tmp/dict Debugging info MonetDB complains about a misread character with a message like: Failed to import table 'dict', Leftover data 'povetkin|4 In many problem cases, the error is caused by a line close before the data quoted in the error message; but not always. While debugging, I relied on a very useful [UTF-8 Tool](http://www.ltg.ed.ac.uk/~richard/utf-8.cgi?input=%CF%84&mode=char), and the following analyses: grep "^51981|24hours" /tmp/dict | hexdump Problematic cases Import still fails on many different characters that should be processed correctly (?). Examples: echo "s/$(echo -e "\0342\0200\0214")//g" >> p.txt echo "s/$(echo -e "\0342\0200\0216")/-/g" >> p.txt echo "s/$(echo -e "\0342\0200\0217")//g" >> p.txt echo "s/$(echo -e "\0342\0200\0252")//g" >> p.txt echo "s/$(echo -e "\0342\0200\0254")//g" >> p.txt echo "s/$(echo -e "\0357\0254\0201")/fi/g" >> p.txt echo "s/$(echo -e "\0357\0254\0200")/ff/g" >> p.txt echo "s/$(echo -e "\0357\0276\0222")/me/g" >> p.txt sed -i -f p.txt /tmp/dict Still no correct CSV import after all these modifications. Additional cases Even pretty standard characters if you consider Greek and Cyrillic are problematic: echo "s/$(echo -e "\0311\0226")/d/g" >> p.txt echo "s/$(echo -e "\0311\0231")/e/g" >> p.txt echo "s/$(echo -e "\0314\0200")/e/g" >> p.txt echo "s/$(echo -e "\0317\0200")/p/g" >> p.txt echo "s/$(echo -e "\0307\0200")/\\|/g" >> p.txt sed -i -f p.txt /tmp/dict Even now, the import still fails - I tried finding a block of characters to replace, but did not find the right pattern yet. I can workaround the situation using `iconv` -- but that is not what I like to use eventually. iconv -f utf8 -t ascii//TRANSLIT /tmp/dict > /tmp/dict2 > Attached file: [dict-extract-nsq](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6716_dict-extract-nsq_619) (text/plain, 132 bytes) > Description: Extract from the dictionary file with the problem cases, where quotes have been escaped already. ## Comment 27073 Date: 2019-06-19 17:53:37 +0200 From: @arjenpdevries Can you reproduce the bug? ## Comment 27074 Date: 2019-06-21 13:19:41 +0200 From: @kutsurak After a brief investigation this is what I found: ** There is indeed a problem: $ cat /tmp/bug-report 1689|00i\047m|2 1690|00i\047v|2 41561|2015‎|1 45804|21π|1 51981|24hours‬|1 171067|ardèch|2 182773|afi|1 607808|poverty‪|1 $ mclient -d bugdb Welcome to mclient, the MonetDB/SQL interactive terminal (Apr2019) Database: MonetDB v11.33.3 (Apr2019), 'bugdb' Type \q to quit, \? for a list of available commands auto commit mode: on sql>create table bgtbl (i bigint, t text, f int); operation successful sql>copy into bgtbl from '/tmp/bug-report'; Failed to import table 'bgtbl', incomplete record at end of file sql>select * from rejects; +-------+-------+--------------------------------------------+----------------------+ | rowid | fldid | message | input | +=======+=======+============================================+======================+ | null | null | incomplete record at end of file | | | 2 | 3 | Leftover data '21π|1' | 41561|2015‎|1 | : : : : 45804 : | 3 | 3 | line 3 field f 'int' expected in '1 | 41561|2015‎|1 | : : : 45804' : 45804 : +-------+-------+--------------------------------------------+----------------------+ 3 tuples ** The problem is probably in the COPY INTO code Inserting each of the lines individually works fine. sql>create table bgtbl (i bigint, t text, f int); operation successful sql>INSERT INTO bgtbl VALUES (1689, '00i\047m', 2); 1 affected row sql>INSERT INTO bgtbl VALUES (1690, '00i\047v', 2); 1 affected row sql>INSERT INTO bgtbl VALUES (41561, '2015‎', 1); 1 affected row sql>INSERT INTO bgtbl VALUES (45804, '21π', 1); 1 affected row sql>INSERT INTO bgtbl VALUES (51981, '24hours‬', 1); 1 affected row sql>INSERT INTO bgtbl VALUES (171067, 'ardèch', 2); 1 affected row sql>INSERT INTO bgtbl VALUES (182773, 'afi', 1); 1 affected row sql>INSERT INTO bgtbl VALUES (607808, 'poverty‪', 1); 1 affected row ** The problem is actually on the fourth line: $ cat /tmp/single_line.csv 45804|21π|1 $ mclient -d bugdb Welcome to mclient, the MonetDB/SQL interactive terminal (Apr2019) Database: MonetDB v11.33.3 (Apr2019), 'bugdb' Type \q to quit, \? for a list of available commands auto commit mode: on sql>copy into bgtbl from '/tmp/single_line.csv'; Failed to import table 'bgtbl', incomplete record at end of file sql>select * from rejects; +-------+-------+----------------------------------+-------+ | rowid | fldid | message | input | +=======+=======+==================================+=======+ | null | null | incomplete record at end of file | | +-------+-------+----------------------------------+-------+ 1 tuple sql> $ mclient -d bugdb Welcome to mclient, the MonetDB/SQL interactive terminal (Apr2019) Database: MonetDB v11.33.3 (Apr2019), 'bugdb' Type \q to quit, \? for a list of available commands auto commit mode: on sql>copy into bgtbl from '/tmp/single_line.csv'; Failed to import table 'bgtbl', incomplete record at end of file sql>select * from rejects; +-------+-------+----------------------------------+-------+ | rowid | fldid | message | input | +=======+=======+==================================+=======+ | null | null | incomplete record at end of file | | +-------+-------+----------------------------------+-------+ 1 tuple Incidentally I discovered that formatting in mclient is broken for Unicode strings but the strings themselves are correct. sql>select * from bgtbl; +--------+----------+------+ | i | t | f | +========+==========+======+ | 1689 | 00i'm | 2 | | 1690 | 00i'v | 2 | | 41561 | 2015‎ | 1 | | 45804 | 21π | 1 | | 51981 | 24hours‬ | 1 | | 171067 | ardèch | 2 | | 182773 | afi | 1 | | 607808 | poverty‪ | 1 | +--------+----------+------+ 8 tuples sql>select '>' || t || '<' from bgtbl; +------------+ | L2 | +============+ | >00i'm< | | >00i'v< | | >2015‎< | | >21π< | | >24hours‬< | | >ardèch< | | >afi< | | >poverty‪< | +------------+ 8 tuples As a first conclusion, I would say that the bug is probably in the CSV parser. It seems that the kernel handles the unicode strings in the attachment correctly if they are inserted from mclient. I will take a more extensive look next week probably. ## Comment 27075 Date: 2019-06-21 13:51:32 +0200 From: @kutsurak One more comment/question: I noticed that the third line contains three bytes after the string "2015": e2 80 8e, which according to the tool you mentioned are interpreted as LEFT-TO-RIGTH MARK in UTF8 (http://www.ltg.ed.ac.uk/~richard/utf-8.cgi?input=E2+80+8E&mode=bytes). $ hexdump -C /tmp/bug-report 00000000 31 36 38 39 7c 30 30 69 5c 30 34 37 6d 7c 32 0a |1689|00i\047m|2.| 00000010 31 36 39 30 7c 30 30 69 5c 30 34 37 76 7c 32 0a |1690|00i\047v|2.| 00000020 34 31 35 36 31 7c 32 30 31 35 e2 80 8e 7c 31 0a |41561|2015...|1.| 00000030 34 35 38 30 34 7c 32 31 cf 80 7c 31 0a 35 31 39 |45804|21..|1.519| 00000040 38 31 7c 32 34 68 6f 75 72 73 e2 80 ac 7c 31 0a |81|24hours...|1.| 00000050 31 37 31 30 36 37 7c 61 72 64 65 cc 80 63 68 7c |171067|arde..ch|| 00000060 32 0a 31 38 32 37 37 33 7c 61 ef ac 81 7c 31 0a |2.182773|a...|1.| 00000070 36 30 37 38 30 38 7c 70 6f 76 65 72 74 79 e2 80 |607808|poverty..| 00000080 aa 7c 31 0a |.|1.| 00000084 These bytes are preserved in the INSERT INTO statements: $ hexdump -C /tmp/bgtst [...] 00000060 49 4e 53 45 52 54 20 49 4e 54 4f 20 62 67 74 62 |INSERT INTO bgtb| 00000070 6c 20 56 41 4c 55 45 53 20 28 34 31 35 36 31 2c |l VALUES (41561,| 00000080 20 27 32 30 31 35 e2 80 8e 27 2c 20 31 29 3b 0a | '2015...', 1);.| [...] and in the database: $ mclient -d bugdb -s "select * from bgtbl where i=41561" | hexdump -C [...] 00000040 3d 3d 2b 3d 3d 3d 3d 3d 3d 2b 0a 7c 20 34 31 35 |==+======+.| 415| 00000050 36 31 20 7c 20 32 30 31 35 e2 80 8e 20 7c 20 20 |61 | 2015... | | 00000060 20 20 31 20 7c 0a 7c 20 34 31 35 36 31 20 7c 20 | 1 |.| 41561 | | [...] but they seem to produce a problem in the CSV parsing: $ hexdump -C /tmp/single_line.csv 30s 00000000 34 31 35 36 31 7c 32 30 31 35 e2 80 8e 7c 31 0a |41561|2015...|1.| 00000010 sql>copy into bgtbl from '/tmp/single_line.csv'; Failed to import table 'bgtbl', incomplete record at end of file sql>select * from rejects; +-------+-------+----------------------------------+-------+ | rowid | fldid | message | input | +=======+=======+==================================+=======+ | null | null | incomplete record at end of file | | +-------+-------+----------------------------------+-------+ 1 tuple I was wondering if this mark is intended to be there or not. ## Comment 27076 Date: 2019-06-21 14:08:41 +0200 From: @arjenpdevries Well, in the real application, we would drop that specific entry, but the source data does contain that symbol. ## Comment 27079 Date: 2019-06-24 09:24:13 +0200 From: @arjenpdevries Thanks to input from another user, I found the following difference when specifying a string_quote (or not): sql>select * from dict; +--------+------+----+ | termid | term | df | +========+======+====+ +--------+------+----+ 0 tuples sql>copy into dict from '/tmp/dict-extract-nsq'; Failed to import table 'dict', incomplete record at end of file sql>copy into dict from '/tmp/dict-extract-nsq' using delimiters '|', '\n', ''; 8 affected rows sql> sql>select * from dict; +--------+----------+------+ | termid | term | df | +========+==========+======+ | 1689 | 00i'm | 2 | | 1690 | 00i'v | 2 | | 41561 | 2015 | 1 | | 45804 | 21π | 1 | | 51981 | 24hours | 1 | | 171067 | ardèch | 2 | | 182773 | afi | 1 | | 607808 | poverty | 1 | +--------+----------+------+ 8 tuples So that helps, but why? I still think it is a bug, but the workaround is easy now! Thanks to the input, Arjen ## Comment 27080 Date: 2019-06-24 15:10:04 +0200 From: @kutsurak If I am not mistaken the default delimiters are '|', '\n' and '"'. I agree that this is most probably a bug. I need to look in the code to understand what are the semantics for a quote specified as '', but this provides another hint to help with debugging. ## Comment 27083 Date: 2019-06-25 21:45:11 +0200 From: @kutsurak Actually https://www.monetdb.org/bugzilla/show_bug.cgi?id=6716c6 is not correct. If the user does not specify a quote char, then the CSV parser should NOT use a default one. The problem is a decoherence in how we signify that fact internally. The CSV parser expects the quote character to be NULL if the user has not specified while the physical plan contains the value 0x80 in hex. As far as I can tell this value works if we assume that the files we are going to process only contain ASCII characters, since 0x80 is larger than any ASCII value. On the other hand, in UTF-8 the byte 0x80 comes up in some characters: for instance the LEFT-TO-RIGHT MARK in UTF-8 is encoded as 0xE2 0x80 0x8E. When the CSV parser encounters the byte 0x80 it starts a quoted string that lasts until the next 0x80 byte. The workaround you posted in your latest message works because it sets the quote value to something that does not appear in the file. I count 5 bytes having the value 0x80 in the attached file and this is why the parser fails: When it encounters EOF it is inside a "quoted" string. Even if the number of bytes with this value were even, it would still fail in most cases, except if by change the number of "quoted" field delimiters happened to be a multiple of the delimiters per line (i.e. 2 in the above CSV). In this case (ignoring any problems that might arise due to the schema of the table) it would insert fewer lines, with garbage in the text field. ## Comment 27084 Date: 2019-06-25 22:35:34 +0200 From: @arjenpdevries Clear! 0x80 is larger than any ASCII value - indeed a pre-utf8 solution. Nice to understand the cause, and good to have a workaround. Greetings! ## Comment 27089 Date: 2019-06-26 15:05:06 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [b2b0c0606d53](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b2b0c0606d53) made by Panagiotis Koutsourakis <kutsurak@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=b2b0c0606d53](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=b2b0c0606d53) Changeset description: Add test for bug #6716 ## Comment 27090 Date: 2019-06-26 15:05:09 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [22733760e10a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=22733760e10a) made by Panagiotis Koutsourakis <kutsurak@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=22733760e10a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=22733760e10a) Changeset description: Fix bug #6716 ## Comment 27092 Date: 2019-06-26 17:41:01 +0200 From: @arjenpdevries Great, thank you folks!
COPY INTO does not load UTF8 encoded text
https://api.github.com/repos/MonetDB/MonetDB/issues/6716/comments
0
2020-11-30T16:34:53Z
2024-06-27T13:06:15Z
https://github.com/MonetDB/MonetDB/issues/6716
753,626,239
6,716
[ "MonetDB", "MonetDB" ]
Date: 2019-06-12 20:33:40 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) CC: @PedroTadim Last updated: 2019-09-02 16:05:27 +0200 ## Comment 27061 Date: 2019-06-12 20:33:40 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0 Build Identifier: MERGE INTO command triggers an assertion failure in sql/backends/monet5/rel_bin.c:673: exp_bin: Assertion `s' failed. Reproducible: Always ### Steps to Reproduce: 1. start mserver5 (MonetDB 5 server v11.33.4) 2. start mclient 3. issue SQL commands: CREATE TABLE ProductTarget (ProductID SERIAL, Name VARCHAR(100) NOT NULL, ProductNumber BIGINT, Color VARCHAR(30) NOT NULL); CREATE TABLE ProductSource (ProductID SERIAL, Name VARCHAR(100) NOT NULL, ProductNumber BIGINT, Color VARCHAR(30) NOT NULL); MERGE INTO ProductTarget T USING ProductSource S ON S.ProductID = T.ProductID WHEN MATCHED THEN UPDATE SET Name = S.Name; ### Actual Results: builtin opt gdk_dbpath = /export/scratch1/dinther/INSTALL/var/monetdb5/dbfarm/demo builtin opt monet_prompt = > builtin opt monet_daemon = no builtin opt mapi_port = 50000 builtin opt mapi_open = false builtin opt mapi_autosense = false builtin opt sql_optimizer = default_pipe builtin opt sql_debug = 0 cmdline opt embedded_r = true cmdline opt embedded_py = 3 cmdline opt embedded_c = true MonetDB 5 server v11.33.4 (hg id: 226c4bc37d83) This is an unreleased version Serving database 'demo', using 4 threads Compiled for x86_64-unknown-linux-gnu/64bit with 128bit integers Found 31.305 GiB available main-memory. Copyright (c) 1993 - July 2008 CWI. Copyright (c) August 2008 - 2019 MonetDB B.V., all rights reserved Visit https://www.monetdb.org/ for further information Listening for connection requests on mapi:monetdb://127.0.0.1:41000/ MonetDB/GIS module loaded MonetDB/SQL module loaded MonetDB/Python3 module loaded MonetDB/R module loaded could not find producttarget.productid t.productid t.name t.productnumber t.color s.productid s.name s.productnumber s.color t.%TID% t.%TID% mserver5: sql/backends/monet5/rel_bin.c:673: exp_bin: Assertion `s' failed. ### Expected Results: No assertion failure Mserver5 compiled from latest source (Apr2019 branch) on 12 june 2019. ## Comment 27063 Date: 2019-06-13 10:53:07 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [68ee548d3a9c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=68ee548d3a9c) 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=68ee548d3a9c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=68ee548d3a9c) Changeset description: Added test and fix for Bug #6715, ie when generating an update relation, take in account that the base table might have an alias on it. Also fixed possible bugs in insert/update indexes statements generation with aliases.
Assertion failure in rel_bin.c for MERGE INTO command
https://api.github.com/repos/MonetDB/MonetDB/issues/6715/comments
0
2020-11-30T16:34:48Z
2024-06-27T13:06:14Z
https://github.com/MonetDB/MonetDB/issues/6715
753,626,198
6,715
[ "MonetDB", "MonetDB" ]
Date: 2019-06-12 18:02:50 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) CC: @njnes Last updated: 2019-09-02 16:05:27 +0200 ## Comment 27060 Date: 2019-06-12 18:02:50 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0 Build Identifier: Correlated subquery (select name from functions f where f.id = func_id) as name on an aggregation query select func_id, max(number), count(*) from args group by func_id having count(*) > 8 order by func_id limit 12; triggers an internal assertion in sql/server/rel_select.c:3790: rel_intermediates_add_exp: Assertion `pp->op == op_project' failed. Reproducible: Always ### Steps to Reproduce: 1. start mserver5 (MonetDB 5 server v11.33.4) 2. start mclient 3. issue SQL query: select func_id, (select name from functions f where f.id = func_id) as name, max(number), count(*) from args group by func_id having count(*) > 8 order by func_id limit 12; ### Actual Results: mserver5: dev/sql/server/rel_select.c:3599: rel_intermediates_add_exp: Assertion `pp->op == op_project' failed. ### Expected Results: +---------+----------------+------+------+ | func_id | fname | L6 | L10 | +=========+================+======+======+ | 1495 | copyfrom | 12 | 13 | | 6743 | querylog_calls | 8 | 9 | | 6802 | tracelog | 12 | 13 | | 7234 | bbp | 10 | 11 | | 8531 | storage | 16 | 17 | | 8589 | storage | 17 | 18 | | 8609 | storage | 18 | 19 | | 8630 | storage | 19 | 20 | +---------+----------------+------+------+ 8 tuples Mserver5 compiled from latest source (Apr2019 branch) on 12 june 2019. It also fails on default branch with: sql/server/rel_select.c:3790: rel_intermediates_add_exp: Assertion `pp->op == op_project' failed. ## Comment 27064 Date: 2019-06-13 10:59:57 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [6058b1a40460](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6058b1a40460) 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=6058b1a40460](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=6058b1a40460) Changeset description: Added test for bug #6714. ## Comment 27067 Date: 2019-06-13 15:47:50 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [0acf417b8e03](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0acf417b8e03) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=0acf417b8e03](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=0acf417b8e03) Changeset description: fix crash (incorrect assert) in rel_intermediates (fixes bug #6714) ## Comment 27070 Date: 2019-06-17 10:52:23 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [4c999d6e4f8a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4c999d6e4f8a) 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=4c999d6e4f8a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=4c999d6e4f8a) Changeset description: Re-worked bug #6714 test. Don't use system tables in tests, as their contents change overtime. These changes require to re-approve tests again.
Assertion failure in rel_select.c for correlated subquery in aggregation query (with group by and having and order by and limit)
https://api.github.com/repos/MonetDB/MonetDB/issues/6714/comments
0
2020-11-30T16:34:45Z
2024-06-27T13:06:13Z
https://github.com/MonetDB/MonetDB/issues/6714
753,626,153
6,714
[ "MonetDB", "MonetDB" ]
Date: 2019-06-11 15:29:40 +0200 From: @joerivanruth To: SQL devs &lt;<bugs-sql>&gt; Version: 11.33.3 (Apr2019) Last updated: 2019-09-02 16:05:28 +0200 ## Comment 27049 Date: 2019-06-11 15:29:40 +0200 From: @joerivanruth There is no error message but it simply doesn't load any rows. Attached a script to reproduce. ## Comment 27050 Date: 2019-06-11 15:33:26 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [8d2869a2203b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8d2869a2203b) made by Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=8d2869a2203b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=8d2869a2203b) Changeset description: Fix Bug #6713 COPY INTO FROM 'file.xz' does not work This happened when reading in ascii mode, for example a csv file. The problem was that after checking for a Byte Order Marker it tried to rewind the stream but failed to reset one field of the xz_stream struct. ## Comment 27051 Date: 2019-06-11 15:35:08 +0200 From: @joerivanruth Created attachment 618 scripts to reproduce File script.sql contains a hardcoded absolute path. Update it before running. > Attached file: [6713.tar.gz](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_6713_6713.tar.gz_618) (application/x-gzip, 2220 bytes) > Description: scripts to reproduce ## Comment 27052 Date: 2019-06-11 15:35:47 +0200 From: @joerivanruth Fixed in commit [8d2869a2203b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8d2869a2203b)
COPY INTO FROM 'file.xz' does not work
https://api.github.com/repos/MonetDB/MonetDB/issues/6713/comments
0
2020-11-30T16:34:43Z
2024-06-27T13:06:12Z
https://github.com/MonetDB/MonetDB/issues/6713
753,626,119
6,713