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: 2014-10-31 08:29:41 +0100 From: Ashish Kumar Singh &lt;<ashishk>&gt; To: GDK devs &lt;<bugs-common>&gt; Version: 11.21.19 (Jul2015-SP4) CC: ashishk Last updated: 2016-04-11 11:22:40 +0200 ## Comment 20323 Date: 2014-10-31 08:29:41 +0100 From: Ashish Kumar Singh &lt;<ashishk>&gt; User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:33.0) Gecko/20100101 Firefox/33.0 Build Identifier: We are hitting an issue with monetdb where exit timeout property is not being honored while shutting down the database. Reproducible: Always ### Steps to Reproduce: 1. Create a DB farm 2. Set Exit time out to 1200 seconds 3. Confirm by get all property that exit time out is persisted 4. Create a database 5. Connect to database using mclient 6. issue monetdb or monetdbd shutdown command. 7. I will expect database to wait for exit timeout time period before killing any active connection but it kills the thread with the error below: 2014-10-30 23:56:45 MSG merovingian[7107]: caught SIGTERM, starting shutdown sequence 2014-10-30 23:56:48 MSG control[7107]: control channel closed 2014-10-30 23:56:48 MSG merovingian[7107]: sending process 7179 (database 'pbsworksdb') the TERM signal 2014-10-30 23:56:48 ERR merovingian[7107]: unknown state: 42014-10-30 23:56:48 ERR pbsworksdb[7179]: GDKexit: killing threa d 2014-10-30 23:56:48 MSG merovingian[7107]: database 'pbsworksdb' (7179) has exited with exit status 0 2014-10-30 23:56:49 MSG merovingian[7107]: database 'pbsworksdb' has shut down 2014-10-30 23:56:49 MSG merovingian[7107]: Merovingian 1.7 stopped ### Actual Results: Database kills active connections immediately. ### Expected Results: it should wait for exit timeout time before killing the connections. Sometimes we saw that this behavior is a hindrance in a clean shutdown of monetdb and based on what thread was doing at that point of time we have seen data loss also or database being crashed after prolonged error of these kinds. Our usage of monetdb is taking a big toll due to this issue.
exittimeout property not being honoured
https://api.github.com/repos/MonetDB/MonetDB/issues/3610/comments
0
2020-11-30T12:56:57Z
2024-06-28T13:16:12Z
https://github.com/MonetDB/MonetDB/issues/3610
753,456,638
3,610
[ "MonetDB", "MonetDB" ]
Date: 2014-10-24 22:37:05 +0200 From: @mlkersten To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.13 (Jan2014-SP1) Last updated: 2015-03-06 12:38:47 +0100 ## Comment 20315 Date: 2014-10-24 22:37:05 +0200 From: @mlkersten User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:33.0) Gecko/20100101 Firefox/33.0 Build Identifier: Generate_series is a table producing function, which causes problems in the query SELECT generate_series(0,10,1) where the optimizer would try to dump a scalar value. Reproducible: Always ### Steps to Reproduce: SELECT generate_series(0,10,1); ## Comment 20408 Date: 2014-10-31 15:52:25 +0100 From: @sjoerdmullender Fixed with changeset [103d748e8ceb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=103d748e8ceb) ## Comment 20467 Date: 2014-11-28 10:03:16 +0100 From: @sjoerdmullender Oct2014-SP1 has been released. ## Comment 20694 Date: 2015-03-06 12:38:47 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [dbe2e264be1f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dbe2e264be1f) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=dbe2e264be1f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=dbe2e264be1f) Changeset description: Filter out comments about builtin and command line options. This makes that test sq/backends/monet5/generator/crash.Bug-3609 doesn't fail if it is run without property checking.
Incorrect use of generate_series
https://api.github.com/repos/MonetDB/MonetDB/issues/3609/comments
0
2020-11-30T12:56:55Z
2024-06-27T12:05:21Z
https://github.com/MonetDB/MonetDB/issues/3609
753,456,619
3,609
[ "MonetDB", "MonetDB" ]
Date: 2014-10-24 15:25:05 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: @njnes Last updated: 2014-10-31 14:13:47 +0100 ## Comment 20308 Date: 2014-10-24 15:25:05 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Firefox/33.0 Build Identifier: monetdb5/modules/mal/clients.c:589: CLTsessions: Assertion `v->vtype == 5' failed. Note the below SQL query is composed in MonetDatabaseMetaData.getTables(). See java/src/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java lines 1586 to 1615. Note that the SQL query contains tab characters just before the WHEN .. parts. Reproducible: Always ### Steps to Reproduce: 1. Start mserver5 (MonetDB 5 server v11.20.0) 2. Start SQuirreL (using JDBC driver: jdbcclient.jar) 3. Run SQL query: SELECT * FROM ( SELECT 'demo' AS "TABLE_CAT", "schemas"."name" AS "TABLE_SCHEM", "tables"."name" AS "TABLE_NAME", CASE WHEN "tables"."system" = true AND "tables"."type" = 0 AND "tables"."temporary" = 0 THEN 'SYSTEM TABLE' WHEN "tables"."system" = true AND "tables"."type" = 1 AND "tables"."temporary" = 0 THEN 'SYSTEM VIEW' WHEN "tables"."system" = false AND "tables"."type" = 0 AND "tables"."temporary" = 0 THEN 'TABLE' WHEN "tables"."system" = false AND "tables"."type" = 1 AND "tables"."temporary" = 0 THEN 'VIEW' WHEN "tables"."system" = true AND "tables"."type" = 0 AND "tables"."temporary" = 1 THEN 'SYSTEM SESSION TABLE' WHEN "tables"."system" = true AND "tables"."type" = 1 AND "tables"."temporary" = 1 THEN 'SYSTEM SESSION VIEW' WHEN "tables"."system" = false AND "tables"."type" = 0 AND "tables"."temporary" = 1 THEN 'SESSION TABLE' WHEN "tables"."system" = false AND "tables"."type" = 1 AND "tables"."temporary" = 1 THEN 'SESSION VIEW' END AS "TABLE_TYPE", "tables"."query" AS "REMARKS", null AS "TYPE_CAT", null AS "TYPE_SCHEM", null AS "TYPE_NAME", 'rowid' AS "SELF_REFERENCING_COL_NAME", 'SYSTEM' AS "REF_GENERATION" FROM "sys"."tables" AS "tables", "sys"."schemas" AS "schemas" WHERE "tables"."schema_id" = "schemas"."id" ) AS "tables" WHERE 1 = 1 AND LOWER("TABLE_SCHEM") LIKE 'sys' AND (LOWER("TABLE_TYPE") LIKE 'system view') ORDER BY "TABLE_TYPE", "TABLE_SCHEM", "TABLE_NAME" ; ### Actual Results: builtin opt gdk_dbpath = /ufs/dinther/INSTALL/var/monetdb5/dbfarm/demo builtin opt gdk_debug = 0 builtin opt gdk_vmtrim = no builtin opt monet_prompt = > builtin opt monet_daemon = no builtin opt mapi_port = 50000 builtin opt mapi_open = false builtin opt mapi_autosense = false builtin opt sql_optimizer = default_pipe builtin opt sql_debug = 0 cmdline opt embedded_r = true cmdline opt gdk_debug = 10 MonetDB 5 server v11.20.0 This is an unreleased version Serving database 'demo', using 8 threads Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs and 128bit integers dynamically linked Found 15.356 GiB available main-memory. Copyright (c) 1993-July 2008 CWI. Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Listening for connection requests on mapi:monetdb://127.0.0.1:50000/ MonetDB/GIS module loaded MonetDB/SQL module loaded MonetDB/R module loaded > SQL catalog created, loading sql scripts once loading sql script: 09_like.sql loading sql script: 10_math.sql loading sql script: 11_times.sql loading sql script: 12_url.sql loading sql script: 13_date.sql loading sql script: 14_inet.sql loading sql script: 15_querylog.sql loading sql script: 16_tracelog.sql loading sql script: 19_cluster.sql loading sql script: 20_vacuum.sql loading sql script: 21_dependency_functions.sql loading sql script: 22_clients.sql loading sql script: 23_skyserver.sql loading sql script: 24_zorder.sql loading sql script: 25_debug.sql loading sql script: 26_sysmon.sql loading sql script: 39_analytics.sql loading sql script: 39_analytics_hge.sql loading sql script: 40_geom.sql loading sql script: 40_json.sql loading sql script: 40_json_hge.sql loading sql script: 41_jsonstore.sql loading sql script: 45_uuid.sql loading sql script: 46_gsl.sql loading sql script: 75_storagemodel.sql loading sql script: 80_statistics.sql loading sql script: 80_udf.sql loading sql script: 80_udf_hge.sql loading sql script: 89_generator_hge.sql loading sql script: 90_generator.sql loading sql script: 99_system.sql > >mserver5: /ufs/dinther/dev/dev/monetdb5/modules/mal/clients.c:589: CLTsessions: Assertion `v->vtype == 5' failed. 18274 Aborted ./INSTALL/bin/mserver5 -d10 --set embedded_r=true bash-4.2$ ### Expected Results: no assertion failure Potentially the tab characters in the SQL string prevent me to execute the SQL query in mclient as it gives me error: syntax error, unexpected IDENT, expecting END in: "select * from ( select 'demo' as "TABLE_CAT", "schemas"."name" as "TABLE_SCHEM"," Hence you need to use a client which accepts tab characters, such as SQuirreL. ## Comment 20309 Date: 2014-10-24 16:02:52 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [7e04c22fa120](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7e04c22fa120) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7e04c22fa120](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7e04c22fa120) Changeset description: Removed unneeded and unwanted tab characters from composed SQL metadata query string in getTables(). It caused assertion failure in mal/clients.c, see bug #3608. ## Comment 20310 Date: 2014-10-24 17:19:31 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; Just tested it with MonetDB 5 server v11.19.1 "Oct2014" and same assertion failure also happens in this Oct2014 rc1 version. ## Comment 20314 Date: 2014-10-24 22:00:35 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [ff3111adf5e9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ff3111adf5e9) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ff3111adf5e9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ff3111adf5e9) Changeset description: Use correct types. This should fix bug #3608. ## Comment 20337 Date: 2014-10-31 14:13:47 +0100 From: @sjoerdmullender Oct2014 has been released.
assertion failure in mal/clients.c after running JDBC metadata query containing tab characters
https://api.github.com/repos/MonetDB/MonetDB/issues/3608/comments
0
2020-11-30T12:56:52Z
2024-06-27T12:05:20Z
https://github.com/MonetDB/MonetDB/issues/3608
753,456,596
3,608
[ "MonetDB", "MonetDB" ]
Date: 2014-10-24 14:34:31 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: @njnes Last updated: 2014-10-31 14:14:37 +0100 ## Comment 20307 Date: 2014-10-24 14:34:31 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Firefox/33.0 Build Identifier: monetdb5/modules/mal/querylog.c:297: QLOGdefine: Assertion `v->vtype == 6' failed. Reproducible: Always ### Steps to Reproduce: 1. start mserver5 (MonetDB 5 server v11.20.0, version compiled on 24 okt) 2. start mclient 3. run SQL commands: select * from sys.querylog_catalog; call querylog_enable(); select * from sys.querylog_catalog; select * from sys.querylog_catalog; select * from sys.querylog_calls; ### Actual Results: builtin opt gdk_dbpath = /ufs/dinther/INSTALL/var/monetdb5/dbfarm/demo builtin opt gdk_debug = 0 builtin opt gdk_vmtrim = no builtin opt monet_prompt = > builtin opt monet_daemon = no builtin opt mapi_port = 50000 builtin opt mapi_open = false builtin opt mapi_autosense = false builtin opt sql_optimizer = default_pipe builtin opt sql_debug = 0 cmdline opt embedded_r = true cmdline opt gdk_debug = 10 MonetDB 5 server v11.20.0 This is an unreleased version Serving database 'demo', using 8 threads Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs and 128bit integers dynamically linked Found 15.356 GiB available main-memory. Copyright (c) 1993-July 2008 CWI. Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Listening for connection requests on mapi:monetdb://127.0.0.1:50000/ MonetDB/GIS module loaded MonetDB/SQL module loaded MonetDB/R module loaded >mserver5: /ufs/dinther/dev/dev/monetdb5/modules/mal/querylog.c:297: QLOGdefine: Assertion `v->vtype == 6' failed. 17489 Aborted ./INSTALL/bin/mserver5 -d10 --set embedded_r=true bash-4.2$ bash-4.2$ mclient Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.20.0 (unreleased), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>select * from sys.querylog_catalog; +----+-------+---------+-------+------+-----+----------+ | id | owner | defined | query | pipe | mal | optimize | +====+=======+=========+=======+======+=====+==========+ +----+-------+---------+-------+------+-----+----------+ 0 tuples (212.421ms) sql>call querylog_enable(); sql>select * from sys.querylog_catalog; +----+-------+---------+-------+------+-----+----------+ | id | owner | defined | query | pipe | mal | optimize | +====+=======+=========+=======+======+=====+==========+ +----+-------+---------+-------+------+-----+----------+ 0 tuples (0.944ms) sql>select * from sys.querylog_catalog; +----+-------+---------+-------+------+-----+----------+ | id | owner | defined | query | pipe | mal | optimize | +====+=======+=========+=======+======+=====+==========+ +----+-------+---------+-------+------+-----+----------+ 0 tuples (0.552ms) sql>select * from sys.querylog_calls; sql> bash-4.2$ ### Expected Results: no assertion failure It does not happen with MonetDB 5 server v11.17.21 "Jan2014-SP3" ## Comment 20311 Date: 2014-10-24 17:52:32 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; Just tested it with MonetDB 5 server v11.19.1 "Oct2014" and same assertion failure also happens in the Oct2014 rc1 version. ## Comment 20312 Date: 2014-10-24 21:50:52 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [08d5fa25c209](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=08d5fa25c209) made by Martin Kersten <mk@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=08d5fa25c209](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=08d5fa25c209) Changeset description: Use proper types internally Fixes bug3607 ## Comment 20313 Date: 2014-10-24 21:53:42 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [091ec7a917ea](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=091ec7a917ea) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=091ec7a917ea](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=091ec7a917ea) Changeset description: Fixed type checks for querylog.call() and querylog.define() functions. This fixes bug #3607. ## Comment 20382 Date: 2014-10-31 14:14:37 +0100 From: @sjoerdmullender Oct2014 has been released.
assertion failure after enableing querylog and doing queries on sys.querylog_catalog and sys.querylog_calls
https://api.github.com/repos/MonetDB/MonetDB/issues/3607/comments
0
2020-11-30T12:56:50Z
2024-06-27T12:05:19Z
https://github.com/MonetDB/MonetDB/issues/3607
753,456,567
3,607
[ "MonetDB", "MonetDB" ]
Date: 2014-10-23 18:55:24 +0200 From: asayed72 To: GDK devs &lt;<bugs-common>&gt; Version: 11.17.21 (Jan2014-SP3) CC: ashishk, @mlkersten Last updated: 2015-01-21 17:18:09 +0100 ## Comment 20300 Date: 2014-10-23 18:55:24 +0200 From: asayed72 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Build Identifier: Hi, I am Failing to populate a table with a 1204850769 file on a 4G Main Mem Machine!! --This is using TPCH as a data-generator, with sf=10. Client: sql>COPY INTO partsupp from '/home/..../tpch-files/tpch_2_17_0/dbgen/sf-10/partsupp.tbl' USING DELIMITERS '|','\n','"' NULL AS ''; GDKerror:!ERROR: HEAPextend: failed to extend to 1342177280 for 35/3505.theap Server: GDKmmap(1342177280) fails, try to free up space [memory in use=12631136,virtual memory in use=1717615712] GDKmmap(1342177280) result [mem=12631136,vm=1717615712] This happens with other tables with other sizes of files. Tried all the fixes out there...nothing worked. Below you will find my system specs. Thanks and BR A/ ///////////////////////////////O/S and machine configuration/////////////////// df . Filesystem 1K-blocks Used Available Use% Mounted on /dev/......................... 230343852 45330896 173312120 21% / uname -a Linux 3.13.0-35-generic 62-Ubuntu SMP Fri Aug 15 02:00:07 UTC 2014 armv7l armv7l armv7l GNU/Linux cat /proc/meminfo MemTotal: 4133288 kB MemFree: 1897520 kB Buffers: 76488 kB Cached: 2065904 kB SwapCached: 0 kB Active: 1015388 kB Inactive: 1166812 kB Active(anon): 20380 kB Inactive(anon): 19668 kB Active(file): 995008 kB Inactive(file): 1147144 kB Unevictable: 0 kB Mlocked: 0 kB HighTotal: 3408896 kB HighFree: 1638796 kB LowTotal: 724392 kB LowFree: 258724 kB SwapTotal: 9924604 kB SwapFree: 9924604 kB Dirty: 0 kB Writeback: 0 kB AnonPages: 39800 kB Mapped: 10760 kB Shmem: 240 kB Slab: 41460 kB SReclaimable: 32056 kB SUnreclaim: 9404 kB KernelStack: 952 kB PageTables: 1020 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 11991248 kB Committed_AS: 124116 kB VmallocTotal: 245760 kB VmallocUsed: 5484 kB VmallocChunk: 229936 kB Reproducible: Always ### Steps to Reproduce: 1.bring up server 2.bring up client 3.COPY into --as mentioned in the details above. ### Actual Results: Failure to populate tables. ### Expected Results: populating success the sql> prompt on the client this also happens with MonetDB v11.15.7 and happens on Ubunut 14.04 Happens with 3.2.0-67-highbank Kernel also. ## Comment 20301 Date: 2014-10-23 21:36:24 +0200 From: @sjoerdmullender Isn't armv7l a 32 bit architecture? Then you're just running into the limits of the architecture. MonetDB memory maps files, so it needs an address space that can accomodate all files (columns) that are used at any one time. It seems you're asking too much. ## Comment 20302 Date: 2014-10-23 22:06:52 +0200 From: @mlkersten The amount of memory can be a problem [see https://www.monetdb.org/Documentation/MemoryClaim]. You might try out the COPY....LOCKED version for better performance and possible bypassing the issue raised. [see https://www.monetdb.org/Documentation/Manuals/SQLreference/CopyInto] ## Comment 20303 Date: 2014-10-24 11:34:20 +0200 From: asayed72 Thanks lot for your replies and links. I tried the LOCKED option and it still fails. I understand that "MonetDB needs to have all columns of the table that is currently being loaded "active", i.e., accessible in the address space." but as you see I am trying to load a much smaller file, right? So why would I run into the system arch. limits? Any thoughts about why this might be happening would be appreciated. Thanks and BR A/ ## Comment 20304 Date: 2014-10-24 11:37:00 +0200 From: asayed72 Also, the following supports my question. from https://www.monetdb.org/Documentation/MemoryClaim "However, during loading, parts of the data are continuously written to the persistent files on disk, i.e., the whole table does not have to fit into main memory. E.g., loading a 100 GB table works fine on a system with 8 GB RAM and 16 GB swap -- provided there is sufficient free disk space." The limits of the ARCH should not be an issue!! thanks and BR A/ ## Comment 20305 Date: 2014-10-24 11:45:19 +0200 From: @sjoerdmullender I am talking about address space (which is 32 bits, i.e. 4 GiB, not all of which is usable by a process), not about memory/swap/disk space. ## Comment 20306 Date: 2014-10-24 11:49:20 +0200 From: asayed72 Hi Sjoerd, Thanks for your prompt reply. Yes, I understand. Still, the file I am loading is much less than the available memory--at start of runtime. Also, I do not notice any swap area being used while loading (COPY INTO), which is contrary to what I expected. Any thoughts? Thanks and BR A/ ## Comment 20430 Date: 2014-11-06 18:28:47 +0100 From: Ashish Kumar Singh &lt;<ashishk>&gt; We might be also facing a similar issue, monetdb should talk more explicitly about this area? ## Comment 20566 Date: 2015-01-21 17:18:09 +0100 From: @sjoerdmullender Failure to load a file that is a significant part (yes, a quarter is very significant) of the available address space (that is address space, not memory -- the amount of memory is largely irrelevant) is not an error. It is inherent in the way MonetDB works. All columns need to be in the address space at the same time. Moreover, they each need to have a consecutive chunk of address space. In addition, when you have string columns (and TPC-H has them), you also need a large consecutive chunk of address space available for the string data (so two sizeable chunks of address space for string columns). The key term in this context is address space fragmentation. Having said this, changeset [40911aac3b02](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=40911aac3b02) should postpone the time when the error occurs, and changeset [8948090c571c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8948090c571c) should make the server deal better with the error when (not if) it occurs.
GDKerror:!ERROR: HEAPextend: failed to extend to
https://api.github.com/repos/MonetDB/MonetDB/issues/3606/comments
0
2020-11-30T12:56:47Z
2024-06-28T13:16:11Z
https://github.com/MonetDB/MonetDB/issues/3606
753,456,530
3,606
[ "MonetDB", "MonetDB" ]
Date: 2014-10-23 16:00:46 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: @njnes Last updated: 2015-01-29 14:07:35 +0100 ## Comment 20299 Date: 2014-10-23 16:00:46 +0200 From: @skinkie It seems that on longer queries (my hunch is 1024 characters) the error reporting falls back to: "relational query without result". A deliberate error: select operatingday, coalesce(gepubliceerd, 0) as gepubliceerd, coalesce(gereden, 0) as gereden, coalesce(geannuleerd, 0) as geannuleerd, coalesce(onbekend, 0) as onbekend, coalesce(extra, 0) as extra, coalesce(tochgezien, 0) as tochgezien from (select operatingday, count(trip_hash) as gepubliceerd from tt where pointorder = 1 group by operatingday) as a full outer join (select z.operatingday, count(*) as geannuleerd from (select trip_hash, operatingday from kv17_canceled except select trip_hash, operatingday from kv6 where kv6.messagetype = 'ARRIVAL') as u group by u.operatingday) as e using (operatingday) full outer join (select o.operatingday, count(trip_hash) as onbekend from (select distinct trip_hash, operatingday from tt) as o join (select distinct trip_hash from tt where (epoch(cast(tt.operatingday as timestamp with time zone)) + cast(split_part(tt.targetarrivaltime, ':', 1) as int) * 3600 + (cast(split_part(tt.targetarrivaltime, ':', 2) as int) + 10) * 60) < epoch(now()) except (select trip_hash from kv6 where messagetype = 'ARRIVAL' union all select trip_hash from kv17_canceled)) as p using (trip_hash) group by operatingday) as f using (operatingday) order by operatingday; ERROR = !relational query without result Removing another line gives: ERROR = !syntax error, unexpected ORDER in: "select operatingday, coalesce(gepubliceerd, 0) as gepubliceerd, coalesce(gereden" ## Comment 20319 Date: 2014-10-28 12:56:57 +0100 From: @njnes we need the ddl statements to look into this problem ## Comment 20320 Date: 2014-10-28 13:31:22 +0100 From: @skinkie CREATE TABLE "sys"."tt_20141016" ( "operatingday" DATE, "trip_id" VARCHAR(16), "pointorder" SMALLINT, "passagesequencenumber" SMALLINT, "userstopcode" VARCHAR(10), "targetarrivaltime" VARCHAR(8), "targetdeparturetime" VARCHAR(8), "trip_hash" BIGINT ); create view tt as select * from tt_20141016; CREATE TABLE "sys"."kv17_canceled" ( "server" TIMESTAMP, "messagetype" VARCHAR(17), "dataownercode" VARCHAR(10), "operatingday" DATE, "lineplanningnumber" VARCHAR(10), "journeynumber" DECIMAL(6), "reinforcementnumber" DECIMAL(2), "reasontype" DECIMAL(3), "subreasontype" VARCHAR(10), "reasoncontent" VARCHAR(255), "subreasoncontent" VARCHAR(255), "userstopcode" VARCHAR(10), "passagesequencenumber" DECIMAL(4), "lagtime" DECIMAL(4), "targetarrivaltime" TIME, "targetdeparturetime" TIME, "journeystoptype" VARCHAR(12), "destinationcode" VARCHAR(10), "destinationname50" VARCHAR(50), "destinationname16" VARCHAR(16), "destinationdetail16" VARCHAR(16), "destinationdisplay16" VARCHAR(16), "trip_hash" BIGINT, "message" TIMESTAMP ); create view kv6 as select * from kv6_20141016; I think this is everything you would need. ## Comment 20498 Date: 2014-12-01 10:01:20 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [ef3d09ed0e0e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ef3d09ed0e0e) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ef3d09ed0e0e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ef3d09ed0e0e) Changeset description: added test for bug #3605 ## Comment 20500 Date: 2014-12-01 10:02:03 +0100 From: @njnes seems fixed by recent changes ## Comment 20602 Date: 2015-01-29 14:07:35 +0100 From: @sjoerdmullender Oct2014-SP2 has been released.
relational query without result
https://api.github.com/repos/MonetDB/MonetDB/issues/3605/comments
0
2020-11-30T12:56:44Z
2024-06-27T12:05:17Z
https://github.com/MonetDB/MonetDB/issues/3605
753,456,496
3,605
[ "MonetDB", "MonetDB" ]
Date: 2014-10-19 11:38:43 +0200 From: @mlkersten To: MonetDB5 devs &lt;<bugs-monetdb5>&gt; Version: 11.17.21 (Jan2014-SP3) Last updated: 2014-11-19 15:14:01 +0100 ## Comment 20297 Date: 2014-10-19 11:38:43 +0200 From: @mlkersten User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0 Build Identifier: Exceptions in the SQL statement caused the queue not to be updated. Test file added Reproducible: Always ### Steps to Reproduce: select * from sys.queue(); drop table xyz; select * from sys.queue(); drop table yz; select * from sys.queue(); ## Comment 20298 Date: 2014-10-20 07:18:49 +0200 From: @mlkersten Fixed by addition of the proper closing call in the MAL interpreter. ## Comment 20356 Date: 2014-10-31 14:14:08 +0100 From: @sjoerdmullender Oct2014 has been released. ## Comment 20446 Date: 2014-11-19 15:14:01 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [6c1781e74652](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6c1781e74652) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6c1781e74652](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6c1781e74652) Changeset description: Properly fix bug #3604: only call runtimeProfileFinish in case of error. See changeset [8455d3abe150](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8455d3abe150)
Sys.queue ignored upon errors
https://api.github.com/repos/MonetDB/MonetDB/issues/3604/comments
0
2020-11-30T12:56:42Z
2024-06-27T12:05:16Z
https://github.com/MonetDB/MonetDB/issues/3604
753,456,464
3,604
[ "MonetDB", "MonetDB" ]
Date: 2014-10-14 17:20:36 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; To: Merovingian devs &lt;<bugs-merovingian>&gt; Version: 11.17.21 (Jan2014-SP3) Last updated: 2014-10-31 14:14:02 +0100 ## Comment 20290 Date: 2014-10-14 17:20:36 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Build is Oct2014 [9d23c00aac8e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9d23c00aac8e) To reproduce, start monetdbd then run: monetdb create -p hunter2 newdb ### Expected results: new database is created with that password ### Actual results: command never completes monetdbd is hung at: Thread 2 (Thread 0x7fa7de8c6700 (LWP 26060)): 0 0x00007fa7e4536434 in __libc_wait (stat_loc=0x0) at ../sysdeps/unix/sysv/linux/wait.c:35 1 0x000000000040f022 in childhandler (sig=<optimized out>, si=0x7fa7de8c18b0, unused=<optimized out>) at handlers.c:172 2 <signal handler called> 3 0x00007fa7e45364c9 in __libc_waitpid (pid=9185, stat_loc=0x0, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:40 4 0x000000000040a87a in ctl_handle_client (origin=0x7fa7de8c5e20 "(local)", msgsock=5, fdin=fdin@entry=0x0, fout=0x0) at controlrunner.c:461 5 0x000000000040c6e9 in controlRunner (d=<optimized out>) at controlrunner.c:980 6 0x00007fa7e452f0a4 in start_thread (arg=0x7fa7de8c6700) at pthread_create.c:309 7 0x00007fa7e4264c2d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 It looks like the waitpid() in ctl_handle_client() is fighting with the wait() in the SIGCHLD handler. waitpid eats the event which means the signal handler hangs forever. Since I can easily imagine that details of this behaviour are kernel-specific, I should mention that I'm running Linux 3.16.3 (Debian Jessie). P.S. This feature was implemented under bug #3204, which probably ought to be closed now. Unless you're going to back out the feature because it doesn't work. P.P.S. The man page for monetdb got updated to mention this new flag but "monetdb help create" didn't. ## Comment 20293 Date: 2014-10-15 10:02:31 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [82bf5eb519ea](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=82bf5eb519ea) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=82bf5eb519ea](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=82bf5eb519ea) Changeset description: Block SIGCHLD signals when forking for create -p. By blocking SIGCHLD signals when forking and subsequently waiting for the forked child when handling the create -p command, and by also ignoring SIGCHLD signals if there is no child ready to be waited for, we hopefully fix bug #3603. ## Comment 20294 Date: 2014-10-15 10:02:34 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [e52fe4e5104f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e52fe4e5104f) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e52fe4e5104f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e52fe4e5104f) Changeset description: Add blurb about -p option in monetdb help create. See bug #3603. ## Comment 20295 Date: 2014-10-15 10:03:34 +0200 From: @sjoerdmullender Richard, can you check whether my fix solves the problem? I haven't been able to reproduce it on my Fedora 20 system. ## Comment 20296 Date: 2014-10-15 12:19:50 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; I think it might be necessary to have at least one database actually started in order to reproduce it. Anyway, it looks like your fix works. Thanks. BTW, just to be pedantic, man sigprocmask says "The use of sigprocmask() is unspecified in a multithreaded process; see pthread_sigmask(3)." ## Comment 20351 Date: 2014-10-31 14:14:02 +0100 From: @sjoerdmullender Oct2014 has been released.
"monetdb create -p" hangs monetdbd
https://api.github.com/repos/MonetDB/MonetDB/issues/3603/comments
0
2020-11-30T12:56:39Z
2024-06-27T12:05:15Z
https://github.com/MonetDB/MonetDB/issues/3603
753,456,438
3,603
[ "MonetDB", "MonetDB" ]
Date: 2014-10-14 14:27:59 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2015-05-07 12:37:54 +0200 ## Comment 20289 Date: 2014-10-14 14:27:59 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Build is Oct2014 [9d23c00aac8e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9d23c00aac8e) sql>select * from generate_series(1,128); overflow in conversion of 128 to bte. I expected that to work. The workaround is simple: sql>select * from generate_series(cast(1 as int),128) limit 1; +-------+ | value | +=======+ | 1 | +-------+ Since the workaround is so easy you could close this bug as invalid, but I'm probably not the only one who's going to be surprised. ## Comment 20708 Date: 2015-03-11 17:07:34 +0100 From: @njnes is fixed by an improvement to the function resolution
Surprising overload resolution of generate_series
https://api.github.com/repos/MonetDB/MonetDB/issues/3602/comments
0
2020-11-30T12:56:37Z
2024-06-27T12:05:14Z
https://github.com/MonetDB/MonetDB/issues/3602
753,456,429
3,602
[ "MonetDB", "MonetDB" ]
Date: 2014-10-13 13:09:04 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; To: Merovingian devs &lt;<bugs-merovingian>&gt; Version: 11.17.21 (Jan2014-SP3) Last updated: 2014-10-31 14:14:15 +0100 ## Comment 20287 Date: 2014-10-13 13:09:04 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; diff -r 076936b3e9fa debian/monetdb5-sql.init.d --- a/debian/monetdb5-sql.init.d Mon Oct 13 10:36:56 2014 +0100 +++ b/debian/monetdb5-sql.init.d Mon Oct 13 12:06:49 2014 +0100 @@ -49,14 +49,14 @@ init() { if [ ! -d ${DBFARM} ]; then mkdir ${DBFARM} - echo "${DBDARM} doesn't exists, creating..." + echo "${DBFARM} doesn't exists, creating..." fi chown -R monetdb.monetdb ${DBFARM} chmod 770 ${DBFARM} if [ ! -f ${DBFARM}/.merovingian_properties ]; then - echo "${DBDARM} not initialized, initializing..." + echo "${DBFARM} not initialized, initializing..." sudo -u monetdb ${DAEMON} create ${DBFARM} || exit 1 fi } ## Comment 20288 Date: 2014-10-13 14:03:40 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [a0eb5cfb9839](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a0eb5cfb9839) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a0eb5cfb9839](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a0eb5cfb9839) Changeset description: Fix typos found by Richard Hughes (thanks!) Fixes bug #3601. ## Comment 20361 Date: 2014-10-31 14:14:15 +0100 From: @sjoerdmullender Oct2014 has been released.
Trivial typo in debian/monetdb5-sql.init.d
https://api.github.com/repos/MonetDB/MonetDB/issues/3601/comments
0
2020-11-30T12:56:35Z
2024-06-27T12:05:13Z
https://github.com/MonetDB/MonetDB/issues/3601
753,456,403
3,601
[ "MonetDB", "MonetDB" ]
Date: 2014-10-10 14:50:18 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: @hannesmuehleisen, judeelliot2, @mlkersten, @njnes Last updated: 2019-02-12 13:53:53 +0100 ## Comment 20278 Date: 2014-10-10 14:50:18 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0 Build Identifier: data inserted into temp table is not stored/remembered. retrieval returns 0 rows updates report 0 rows updated deletes report 0 rows deleted Reproducible: Always ### Steps to Reproduce: 1.start mserver5 (MonetDB 5 server v11.17.21 "Jan2014-SP3") 2.start mclient 3.execute SQL: create temp table foo (f1 string, f2 text, f3 varchar(12345678)); insert into foo values('aa1','bb1','cc1'); select * from foo; insert into foo values('aa2','bb2','cc2'); select * from foo; insert into foo values('aa3','bb3','cc3'); select * from foo; update foo set f1 = 'abc'; select * from foo; delete from foo where f2 = 'bb2'; select * from foo; insert into foo values('aa4','bb4','cc4'); select * from foo; drop table foo; ### Actual Results: builtin opt gdk_dbpath = /ufs/dinther/MonetDB201408/var/monetdb5/dbfarm/demo builtin opt gdk_debug = 0 builtin opt gdk_vmtrim = no builtin opt monet_prompt = > builtin opt monet_daemon = no builtin opt mapi_port = 50000 builtin opt mapi_open = false builtin opt mapi_autosense = false builtin opt sql_optimizer = default_pipe builtin opt sql_debug = 0 cmdline opt mapi_port = 49000 MonetDB 5 server v11.17.21 "Jan2014-SP3" Serving database 'demo', using 8 threads Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked Found 15.356 GiB available main-memory. Copyright (c) 1993-July 2008 CWI. Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Listening for connection requests on mapi:monetdb://127.0.0.1:49000/ MonetDB/GIS module loaded MonetDB/JAQL module loaded MonetDB/SQL module loaded > SQL catalog created, loading sql scripts once loading sql script: 09_like.sql loading sql script: 10_math.sql loading sql script: 11_times.sql loading sql script: 12_url.sql loading sql script: 13_date.sql loading sql script: 14_inet.sql loading sql script: 15_querylog.sql loading sql script: 16_tracelog.sql loading sql script: 17_compress.sql loading sql script: 18_dictionary.sql loading sql script: 19_cluster.sql loading sql script: 20_vacuum.sql loading sql script: 21_dependency_functions.sql loading sql script: 22_clients.sql loading sql script: 23_skyserver.sql loading sql script: 24_zorder.sql loading sql script: 25_debug.sql loading sql script: 26_sysmon.sql loading sql script: 39_analytics.sql loading sql script: 40_geom.sql loading sql script: 46_gsl.sql loading sql script: 75_storagemodel.sql loading sql script: 80_statistics.sql loading sql script: 80_udf.sql loading sql script: 99_system.sql Bulk operator required for str.stringleft Bulk operator required for str.stringleft Bulk operator required for user.columnsize Bulk operator required for user.heapsize Bulk operator required for user.indexsize bash-4.2$ mclient -p 49000 Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.17.21 (Jan2014-SP3), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>create temp table foo (f1 string, f2 text, f3 varchar(12345678)); operation successful (141.071ms) sql>insert into foo values('aa1','bb1','cc1'); 1 affected rows (3.906ms) sql>select * from foo; +----+----+----+ | f1 | f2 | f3 | +====+====+====+ +----+----+----+ 0 tuples (0.937ms) sql>insert into foo values('aa2','bb2','cc2'); 1 affected rows (3.110ms) sql>select * from foo; +----+----+----+ | f1 | f2 | f3 | +====+====+====+ +----+----+----+ 0 tuples (0.664ms) sql>insert into foo values('aa3','bb3','cc3'); 1 affected rows (22.744ms) sql>select * from foo; +----+----+----+ | f1 | f2 | f3 | +====+====+====+ +----+----+----+ 0 tuples (0.711ms) sql>update foo set f1 = 'abc'; 0 affected row (0.647ms) sql>select * from foo; +----+----+----+ | f1 | f2 | f3 | +====+====+====+ +----+----+----+ 0 tuples (0.652ms) sql>delete from foo where f2 = 'bb2'; 0 affected row (0.911ms) sql>select * from foo; +----+----+----+ | f1 | f2 | f3 | +====+====+====+ +----+----+----+ 0 tuples (0.734ms) sql>insert into foo values('aa4','bb4','cc4'); 1 affected rows (3.943ms) sql>select * from foo; +----+----+----+ | f1 | f2 | f3 | +====+====+====+ +----+----+----+ 0 tuples (0.702ms) sql>drop table foo; operation successful (3.419ms) sql>select * from foo; SELECT: no such table 'foo' sql> ### Expected Results: sql>create temp table foo (f1 string, f2 text, f3 varchar(12345678)); operation successful (5.639ms) sql>insert into foo values('aa1','bb1','cc1'); 1 affected rows (3.797ms) sql>select * from foo; +------+------+------+ | f1 | f2 | f3 | +======+======+======+ | aa1 | bb1 | cc1 | +------+------+------+ 1 tuple (3.416ms) sql>insert into foo values('aa2','bb2','cc2'); 1 affected rows (2.338ms) sql>select * from foo; +------+------+------+ | f1 | f2 | f3 | +======+======+======+ | aa1 | bb1 | cc1 | | aa2 | bb2 | cc2 | +------+------+------+ 2 tuples (1.919ms) sql>insert into foo values('aa3','bb3','cc3'); 1 affected rows (2.838ms) sql>select * from foo; +------+------+------+ | f1 | f2 | f3 | +======+======+======+ | aa1 | bb1 | cc1 | | aa2 | bb2 | cc2 | | aa3 | bb3 | cc3 | +------+------+------+ 3 tuples (1.857ms) sql>update foo set f1 = 'abc'; 3 affected row (4.202ms) sql>select * from foo; +------+------+------+ | f1 | f2 | f3 | +======+======+======+ | abc | bb1 | cc1 | | abc | bb2 | cc2 | | abc | bb3 | cc3 | +------+------+------+ 3 tuples (1.555ms) sql>delete from foo where f2 = 'bb2'; 1 affected rows (4.648ms) sql>select * from foo; +------+------+------+ | f1 | f2 | f3 | +======+======+======+ | abc | bb1 | cc1 | | abc | bb3 | cc3 | +------+------+------+ 2 tuples (0.717ms) sql>insert into foo values('aa4','bb4','cc4'); 1 affected rows (2.158ms) sql>select * from foo; +------+------+------+ | f1 | f2 | f3 | +======+======+======+ | abc | bb1 | cc1 | | abc | bb3 | cc3 | | aa4 | bb4 | cc4 | +------+------+------+ 3 tuples (0.652ms) sql>drop table foo; operation successful (2.382ms) sql> ## Comment 20279 Date: 2014-10-10 16:47:22 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [bd175a200014](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bd175a200014) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bd175a200014](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bd175a200014) Changeset description: Adding test for bugzilla bug #3600 ## Comment 20280 Date: 2014-10-11 16:00:50 +0200 From: @njnes We follow the sql standard, not postgres. The following is taken from the postgres manual. The ON COMMIT clause for temporary tables also resembles the SQL standard, but has some differences. If the ON COMMIT clause is omitted, SQL specifies that the default behavior is ON COMMIT DELETE ROWS. However, the default behavior in PostgreSQL is ON COMMIT PRESERVE ROWS. The ON COMMIT DROP option does not exist in SQL. ## Comment 20434 Date: 2014-11-07 16:59:28 +0100 From: @sjoerdmullender *** Bug #3615 has been marked as a duplicate of this bug. *** ## Comment 20961 Date: 2015-07-02 18:31:17 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; *** Bug #3752 has been marked as a duplicate of this bug. ***
data inserted into temp table is not stored/remembered/retrievable
https://api.github.com/repos/MonetDB/MonetDB/issues/3600/comments
0
2020-11-30T12:56:32Z
2024-06-28T13:16:11Z
https://github.com/MonetDB/MonetDB/issues/3600
753,456,363
3,600
[ "MonetDB", "MonetDB" ]
Date: 2014-10-08 13:27:38 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; To: GDK devs &lt;<bugs-common>&gt; Version: 11.17.21 (Jan2014-SP3) Last updated: 2014-10-31 14:14:40 +0100 ## Comment 20263 Date: 2014-10-08 13:27:38 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; I apologise in advance for the poor quality of this bug report. The 'steps to reproduce' are a lot of high-load read/write traffic involving tens of GB of data and several different machines. I've already described our traffic pattern in bug #3577, so refer to that for more background. I can't find any correlation between steps being performed by our clients and the crashes. Sometimes it crashes after 10 minutes, sometimes it goes for hours. Build is Oct2014 [1acfd2fe6767](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1acfd2fe6767) plus a bunch of local patches (most from Niels). Nevertheless, here's what I've got: The final result is usually a SIGSEGV in HEAPdelete (I once managed to get AddressSanitizer to pick up the double-free, but that's unusual): 0 0x00007ffff59e2679 in HEAPdelete (h=0x676e69676174735f, o=0x604000665fa0 "27/73/277342", ext=0x7ffff61c04a0 "timprints") at gdk_heap.c:733 1 0x00007ffff60cf190 in IMPSremove (b=0x61500058a010) at gdk_imprints.c:892 2 0x00007ffff60cf525 in IMPSdestroy (b=0x61500058a010) at gdk_imprints.c:909 3 0x00007ffff5ce3959 in BATdelete (b=0x61500058a010) at gdk_storage.c:828 4 0x00007ffff59cbe49 in BBPdestroy (b=0x61500058a010) at gdk_bbp.c:2527 5 0x00007ffff59c364f in decref (i=98018, logical=1, releaseShare=0, lock=1) at gdk_bbp.c:2260 6 0x00007ffff59c3acc in BBPdecref (i=98018, logical=1) at gdk_bbp.c:2291 7 0x00007ffff660d287 in runMALsequence (cntxt=0x62e0000006f0, mb=0x61100036c1d0, startpc=34, stoppc=35, stk=0x6210000de910, env=0x0, pcicaller=0x0) at mal_interpreter.c:816 8 0x00007ffff6616781 in DFLOWworker (T=0x7ffff6e2e978 <workers+56>) at mal_dataflow.c:362 9 0x00007ffff45fe0a4 in start_thread (arg=0x7fffcec1e700) at pthread_create.c:309 10 0x00007ffff4333c2d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 Notice that the 'h' parameter to HEAPdelete is gibberish (its value (not the pointed-to data) is the ASCII "_staging", which is actually a snippet of the name of one of our tables). Looking in IMPSremove() for where that value came from, the entirety of 'imprints' has been overwritten by unrelated data. At this stage I moved on to printf debugging. Here's the complete history of the imprint 0x6070000a0e00 since mserver5 started: 926:7fffe6584700 bat2 0x615000023810 ((nil)=0x6070000a0e00) 0x7ffff595f32e 0x7ffff596f546 0x7ffff596fd04 1028:7ffda0d08700 viewcreate 0x615000171b90=0x615000023810/0x615000023810 ((nil) 0x6070000a0e00 = (nil) 0x6070000a0e00) 0x7ffff55c2d0a 0x7ffff61276ba 0x7fffeab44a66 1227:7fffe5b76700 viewcreate 0x61500024d190=0x615000023810/0x615000023810 ((nil) 0x6070000a0e00 = (nil) 0x6070000a0e00) 0x7ffff55c2d0a 0x7ffff61276ba 0x7fffeab44a66 1228:7fffe1514700 viewcreate 0x61500027b310=0x61500024d190/0x61500024d190 ((nil) 0x6070000a0e00 = (nil) 0x6070000a0e00) 0x7ffff55c2d0a 0x7ffff61276ba 0x7ffff6913614 3234:7fffe7499700 viewcreate 0x6150003f6e10=0x615000023810/0x615000023810 ((nil) 0x6070000a0e00 = (nil) 0x6070000a0e00) 0x7ffff55c2d0a 0x7ffff61276ba 0x7fffeab44a66 3235:7fffe1f22700 viewcreate 0x6150001f3b90=0x6150003f6e10/0x6150003f6e10 ((nil) 0x6070000a0e00 = (nil) 0x6070000a0e00) 0x7ffff55c2d0a 0x7ffff61276ba 0x7ffff6913614 10648:7fffe475a700 viewcreate 0x61500019d290=0x615000023810/0x615000023810 ((nil) 0x6070000a0e00 = (nil) 0x6070000a0e00) 0x7ffff55c2d0a 0x7ffff61276ba 0x7fffeab44a66 10649:7fffe2930700 viewcreate 0x615000521510=0x61500019d290/0x61500019d290 ((nil) 0x6070000a0e00 = (nil) 0x6070000a0e00) 0x7ffff55c2d0a 0x7ffff61276ba 0x7ffff6913614 17401:7fffe79a0700 viewcreate 0x6150002ce510=0x615000023810/0x615000023810 ((nil) 0x6070000a0e00 = (nil) 0x6070000a0e00) 0x7ffff55c2d0a 0x7ffff61276ba 0x7fffeab44a66 17402:7ffda0d08700 viewcreate 0x615000316090=0x6150002ce510/0x6150002ce510 ((nil) 0x6070000a0e00 = (nil) 0x6070000a0e00) 0x7ffff55c2d0a 0x7ffff61276ba 0x7ffff6913614 23746:7fffe1514700 viewcreate 0x6150004de210=0x615000023810/0x615000023810 ((nil) 0x6070000a0e00 = (nil) 0x6070000a0e00) 0x7ffff55c2d0a 0x7ffff61276ba 0x7fffeab44a66 23747:7ffda0d08700 viewcreate 0x61500028f810=0x6150004de210/0x6150004de210 ((nil) 0x6070000a0e00 = (nil) 0x6070000a0e00) 0x7ffff55c2d0a 0x7ffff61276ba 0x7ffff6913614 31248:7fffe6f92700 viewcreate 0x615000418790=0x615000023810/0x615000023810 ((nil) 0x6070000a0e00 = (nil) 0x6070000a0e00) 0x7ffff55c2d0a 0x7ffff61276ba 0x7fffeab44a66 31249:7fffe83ae700 viewcreate 0x61500023e190=0x615000418790/0x615000418790 ((nil) 0x6070000a0e00 = (nil) 0x6070000a0e00) 0x7ffff55c2d0a 0x7ffff61276ba 0x7ffff6913614 355379:7ffda0d08700 viewcreate 0x615000641490=0x615000023810/0x615000023810 ((nil) 0x6070000a0e00 = (nil) 0x6070000a0e00) 0x7ffff55c2d0a 0x7ffff61276ba 0x7fffeab44a66 355847:7fffdbb3c700 viewcreate 0x615000772210=0x615000023810/0x615000023810 ((nil) 0x6070000a0e00 = (nil) 0x6070000a0e00) 0x7ffff55c2d0a 0x7ffff61276ba 0x7fffeab44a66 355848:7fffdbb3c700 viewcreate 0x615000245990=0x615000772210/0x615000772210 ((nil) 0x6070000a0e00 = (nil) 0x6070000a0e00) 0x7ffff5995965 0x7ffff5999ef7 0x7ffff5d748df 355849:7fffe83ae700 impsremove 0x615000772210 (0x6070000a0e00=NULL) 0x7ffff60cf525 0x7ffff5ce3959 0x7ffff59cbe49 362783:7fffe2930700 viewcreate 0x61500053de90=0x615000023810/0x615000023810 ((nil) 0x6070000a0e00 = (nil) 0x6070000a0e00) 0x7ffff55c2d0a 0x7ffff61276ba 0x7fffeab44a66 362784:7fffe4f67700 viewcreate 0x61500055e190=0x61500053de90/0x61500053de90 ((nil) 0x6070000a0e00 = (nil) 0x6070000a0e00) 0x7ffff55c2d0a 0x7ffff61276ba 0x7ffff6913614 370993:7fffe333e700 viewcreate 0x61500058a010=0x615000023810/0x615000023810 ((nil) 0x6070000a0e00 = (nil) 0x6070000a0e00) 0x7ffff55c2d0a 0x7ffff61276ba 0x7fffeab44a66 370994:7fffe333e700 viewcreate 0x61500044b190=0x61500058a010/0x61500058a010 ((nil) 0x6070000a0e00 = (nil) 0x6070000a0e00) 0x7ffff5995965 0x7ffff5999ef7 0x7ffff5d748df 370995:7fffcec1e700 impsremove 0x61500058a010 (0x6070000a0e00=NULL) 0x7ffff60cf525 0x7ffff5ce3959 0x7ffff59cbe49 The layout is: [line number in log file]:[pthread_self] [event] [BAT owning imprint][more event-specific data] [caller's intruction pointer] [caller's caller] [caller's caller's caller] 'bat2' is BATimprints() at gdk_imprints.c:789 (my line numbers might differ from yours due to the insertion of printfs). The parameters are [BAT] ([oldimprintsvalue]=[newimprintsvalue] 'viewcreate' is VIEWcreate_() at gdk_align.c:350. The parameters are [bn]=[h]/[t] ([bn->H->imprints] [bn->T->imprints] = [h->H->prints] [t->T->imprints]) 'impsremove' is IMPSremove() at gdk_imprints.c:890. The parameters are [b] ([b->T->imprints]=NULL) Notice that IMPSremove() is called for the same imprint pointer value without any intermediate creation event, hence me titling this bug report a double-free. Also notice that the BAT parameter to IMPSremove came from a prior call to VIEWcreate(), which seems suspicious. The stack from calling IMPSremove() (from the last three parameters) is: 1 0x7ffff60cf525 IMPSdestroy() gdk_imprints.c:912 2 0x7ffff5ce3959 BATdelete() gdk_storage.c:830 3 0x7ffff59cbe49 BBPdestroy() gdk_bbp.c:2529 The stack from calling VIEWcreate_() is either: 1 0x7ffff55c2d0a BATslice() gdk_batop.c:816 2 0x7ffff61276ba BATproject() gdk_join.c:2944 3 0x7fffeab44a66 DELTAproject() sql.c:2198 or 1 0x7ffff5995965 VIEWcreate() gdk_align.c:373 2 0x7ffff5999ef7 VIEWreset() gdk_align.c:660 3 0x7ffff5d748df BATsetaccess() gdk_bat.c:2584 That's all the facts I've got. Now I move on to unsubstantiated hypotheses. How's this for a fix? diff -r d106b7648549 gdk/gdk_align.c --- a/gdk/gdk_align.c Tue Oct 07 13:26:20 2014 +0100 +++ b/gdk/gdk_align.c Wed Oct 08 12:23:24 2014 +0100 @@ -566,6 +566,12 @@ b->H->hash = NULL; if (tpb && b->T->hash && b->T->hash == tpb->H->hash) b->T->hash = NULL; + + /* unlink imprints shared with parent */ + if (hpb && b->H->imprints && b->H->imprints == hpb->H->imprints) + b->H->imprints = NULL; + if (tpb && b->T->imprints && b->T->imprints == tpb->H->imprints) + b->T->imprints = NULL; } } ## Comment 20264 Date: 2014-10-08 13:32:54 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Created attachment 301 history of imprint 0x6070000a0e00 Hmm, Bugzilla mangled by line breaks in the data dump above. Here's a copy of the same text as an attachment. > Attached file: [monetdb-bug3599-imprints-6070000a0e00.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3599_monetdb-bug3599-imprints-6070000a0e00.txt_301) (text/plain, 3676 bytes) > Description: history of imprint 0x6070000a0e00 ## Comment 20270 Date: 2014-10-08 18:34:41 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [108f44871d45](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=108f44871d45) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=108f44871d45](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=108f44871d45) Changeset description: Unlink imprints shared with parent. Patch submitted by Richard Hughes. This fixes bug #3599. ## Comment 20271 Date: 2014-10-08 18:35:23 +0200 From: @sjoerdmullender Thanks Richard. Your analysis makes perfect sense. I have applied your patch. ## Comment 20385 Date: 2014-10-31 14:14:40 +0100 From: @sjoerdmullender Oct2014 has been released.
Double-free of imprints
https://api.github.com/repos/MonetDB/MonetDB/issues/3599/comments
0
2020-11-30T12:56:29Z
2024-06-27T12:05:11Z
https://github.com/MonetDB/MonetDB/issues/3599
753,456,330
3,599
[ "MonetDB", "MonetDB" ]
Date: 2014-10-07 20:36:25 +0200 From: @drstmane To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: @njnes Last updated: 2014-10-31 14:14:38 +0100 ## Comment 20259 Date: 2014-10-07 20:36:25 +0200 From: @drstmane While the MonetDB SQL bulk loader ("COPY INTO table FROM file") does (by now; not sure since when; possibly only after Jan2014 release, but possibly still in Jan2014 branch) ignore whitespaces around integer and floating-point numbers (of all supported sizes), it does not (yet) ignore whitespaces around fixed-point (decimal) numbers. ## Comment 20262 Date: 2014-10-08 13:08:31 +0200 From: @njnes whitespace skipping is added in the oct branch ## Comment 20267 Date: 2014-10-08 16:01:10 +0200 From: @njnes Changeset [4237cf8af7d9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4237cf8af7d9) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4237cf8af7d9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4237cf8af7d9) Changeset description: skip whitespace when loading decimals fixes bug #3598 ## Comment 20383 Date: 2014-10-31 14:14:38 +0100 From: @sjoerdmullender Oct2014 has been released.
SQL bulk load should ignore leading/trailing spaces also with type decimal (as with integers & real/double)
https://api.github.com/repos/MonetDB/MonetDB/issues/3598/comments
0
2020-11-30T12:56:26Z
2024-06-27T12:05:10Z
https://github.com/MonetDB/MonetDB/issues/3598
753,456,301
3,598
[ "MonetDB", "MonetDB" ]
Date: 2014-10-04 07:49:07 +0200 From: @mlkersten To: MonetDB5 devs &lt;<bugs-monetdb5>&gt; Version: 11.21.19 (Jul2015-SP4) CC: cszqfeng Last updated: 2016-12-21 13:08:34 +0100 ## Comment 20241 Date: 2014-10-04 07:49:07 +0200 From: @mlkersten User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0 Build Identifier: The EXPLAIN over SQL queries does not always keep the fixed types from the sql.bind(). Example, TPCH query 2, using the sequential_pipe. Reproducible: Always ## Comment 20242 Date: 2014-10-04 09:19:51 +0200 From: @mlkersten Fixed by setting the type in sql.gencode() ## Comment 20333 Date: 2014-10-31 14:13:41 +0100 From: @sjoerdmullender Oct2014 has been released. ## Comment 22015 Date: 2016-04-06 11:26:47 +0200 From: Neo &lt;<cszqfeng>&gt; This bug is not entirely fixed in the newest release. --------------------------------------- CREATE TABLE "sys"."book" ( "id" INTEGER, "title" VARCHAR(100) ); -------------------------------------- EXPLAIN select * from book; function user.s1_1{autoCommit=true}():void; X_48:void := querylog.define("explain select * from book;","default_pipe",31); ... omit X_2 := sql.mvc(); X_3:bat[:oid,:oid] := sql.tid(X_2,"sys","book"); X_6:bat[:oid,:int] := sql.bind(X_2,"sys","book","id",0); (X_9,r1_9) := sql.bind(X_2,"sys","book","id",2); Needs fix X_12:bat[:oid,:int] := sql.bind(X_2,"sys","book","id",1); X_14 := sql.delta(X_6,X_9,r1_9,X_12); X_15 := algebra.leftfetchjoin(X_3,X_14); X_16:bat[:oid,:str] := sql.bind(X_2,"sys","book","title",0); (X_18,r1_18) := sql.bind(X_2,"sys","book","title",2); Needs fix X_20:bat[:oid,:str] := sql.bind(X_2,"sys","book","title",1); X_21 := sql.delta(X_16,X_18,r1_18,X_20); X_22 := algebra.leftfetchjoin(X_3,X_21); sql.resultSet(X_40,X_41,X_42,X_44,X_46,X_15,X_22); end user.s1_1; ------------------------------------- Executing the above MAL instructions yields: ERROR = !TypeException:user.s1_1[22]:'sql.delta' undefined in: X_14:any := sql.delta(X_6:bat[:oid,:int],X_9:bat[:oid,:oid],r1_9:bat[:oid,:any],X_12:bat[:oid,:int]); --------------------------------------------- Problem can be fixed *manually* by adding types to the return values of sql.bind(). From: (X_9,r1_9) := sql.bind(X_2,"sys","book","id",2); To: (X_9:bat[:oid,:oid],r1_9:bat[:oid,:int]) := sql.bind(X_2,"sys","book","id",2); ## Comment 22029 Date: 2016-04-12 05:58:56 +0200 From: Neo &lt;<cszqfeng>&gt; Follow-up: The below hack temporarily solved my problem: --- a/monetdb5/mal/mal_listing.c +++ b/monetdb5/mal/mal_listing.c @@ -301,7 +301,7 @@ instruction2str(MalBlkPtr mb, MalStkPtr stk, InstrPtr p, int flg) *t++ = '('; for (i = 0; i < p->retc; i++) { - arg= renderTerm(mb, stk, p, i, flg); + arg= renderTerm(mb, stk, p, i, flg | LIST_MAL_TYPE); // Force print MAL type in assignment left hand side snprintf(t,(len-(t-base)), "%s", arg); GDKfree(arg); advance(t,base,len); ## Comment 22252 Date: 2016-07-25 20:40:54 +0200 From: @mlkersten Indeed. The return type of all bind operations should be fixed, because it comes from the SQL catalog and may not be changed. The solution is too deep in the code base. A patch at the SQL code generation is needed. The output API changes, so it should go to the next release. ## Comment 22258 Date: 2016-07-25 21:39:55 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [a40f551077dc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a40f551077dc) made by Martin Kersten <mk@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a40f551077dc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a40f551077dc) Changeset description: Make type explicit for bind operation This fixes bug #3597 All sql.bind operations should make the type fixed.
SQL to MAL listing looses types
https://api.github.com/repos/MonetDB/MonetDB/issues/3597/comments
0
2020-11-30T12:56:24Z
2024-06-27T12:05:08Z
https://github.com/MonetDB/MonetDB/issues/3597
753,456,269
3,597
[ "MonetDB", "MonetDB" ]
Date: 2014-10-03 16:21:37 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-10-31 14:15:02 +0100 ## Comment 20237 Date: 2014-10-03 16:21:37 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0 Build Identifier: assertion failure when computing log() of a negative (double) value Reproducible: Always ### Steps to Reproduce: 1. start mserver5 (MonetDB 5 server v11.17.21 "Jan2014-SP3") 2. start mclient 3. execute SQL commands: CREATE TABLE FLOAT8_TBL(f1 double); INSERT INTO FLOAT8_TBL(f1) VALUES (' -34.84'); SELECT '' AS bad, log(f.f1) from FLOAT8_TBL f; ### Actual Results: bash-4.2$ ./start_mserver5.sh builtin opt gdk_dbpath = /ufs/dinther/MonetDB201408/var/monetdb5/dbfarm/demo builtin opt gdk_debug = 0 builtin opt gdk_vmtrim = no builtin opt monet_prompt = > builtin opt monet_daemon = no builtin opt mapi_port = 50000 builtin opt mapi_open = false builtin opt mapi_autosense = false builtin opt sql_optimizer = default_pipe builtin opt sql_debug = 0 cmdline opt mapi_port = 49000 MonetDB 5 server v11.17.21 "Jan2014-SP3" Serving database 'demo', using 8 threads Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked Found 15.356 GiB available main-memory. Copyright (c) 1993-July 2008 CWI. Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Listening for connection requests on mapi:monetdb://127.0.0.1:49000/ MonetDB/GIS module loaded MonetDB/JAQL module loaded MonetDB/SQL module loaded > SQL catalog created, loading sql scripts once loading sql script: 09_like.sql loading sql script: 10_math.sql loading sql script: 11_times.sql loading sql script: 12_url.sql loading sql script: 13_date.sql loading sql script: 14_inet.sql loading sql script: 15_querylog.sql loading sql script: 16_tracelog.sql loading sql script: 17_compress.sql loading sql script: 18_dictionary.sql loading sql script: 19_cluster.sql loading sql script: 20_vacuum.sql loading sql script: 21_dependency_functions.sql loading sql script: 22_clients.sql loading sql script: 23_skyserver.sql loading sql script: 24_zorder.sql loading sql script: 25_debug.sql loading sql script: 26_sysmon.sql loading sql script: 39_analytics.sql loading sql script: 40_geom.sql loading sql script: 46_gsl.sql loading sql script: 75_storagemodel.sql loading sql script: 80_statistics.sql loading sql script: 80_udf.sql loading sql script: 99_system.sql Bulk operator required for str.stringleft Bulk operator required for str.stringleft Bulk operator required for user.columnsize Bulk operator required for user.heapsize Bulk operator required for user.indexsize mserver5: gdk_bat.c:2861: BATassertHeadProps: Assertion `!b->H->nonil || cmp != 0' failed. 23424 Aborted ./MonetDB201408/bin/mserver5 -d10 --set mapi_port=49000 bash-4.2$ mclient -p 49000 Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.17.21 (Jan2014-SP3), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>CREATE TABLE FLOAT8_TBL(f1 double); operation successful (5.439ms) sql>INSERT INTO FLOAT8_TBL(f1) VALUES (' -34.84'); 1 affected rows (2.200ms) sql>select * from float8_tbl; +--------------------------+ | f1 | +==========================+ | -34.840000000000003 | +--------------------------+ 1 tuple (1.021ms) sql>SELECT '' AS bad, log(f.f1) from FLOAT8_TBL f; sql> bash-4.2$ ### Expected Results: no assertion failure Also reproducable in developers default branch (sources of 3 nov 2014): mserver5: /ufs/dinther/dev/dev/gdk/gdk_bat.c:2908: BATassertHeadProps: Assertion `!b->H->nonil || cmp != 0' failed. ## Comment 20240 Date: 2014-10-03 17:24:02 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [23cf48780a55](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=23cf48780a55) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=23cf48780a55](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=23cf48780a55) Changeset description: Improved float8.sql tests. Could not generate the float8.stable.* files due to Mtest.py aborted (see bug #3594 & 3596) ## Comment 20266 Date: 2014-10-08 15:02:39 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [4237cf8af7d9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4237cf8af7d9) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4237cf8af7d9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4237cf8af7d9) Changeset description: skip whitespace when loading decimals fixes bug #3596 ## Comment 20268 Date: 2014-10-08 16:01:36 +0200 From: @njnes should be fixed by the new errors returned from mmath functions ## Comment 20403 Date: 2014-10-31 14:15:02 +0100 From: @sjoerdmullender Oct2014 has been released.
gdk_bat.c:2861: BATassertHeadProps: Assertion `!b->H->nonil || cmp != 0' failed.
https://api.github.com/repos/MonetDB/MonetDB/issues/3596/comments
0
2020-11-30T12:56:21Z
2024-06-27T12:05:07Z
https://github.com/MonetDB/MonetDB/issues/3596
753,456,242
3,596
[ "MonetDB", "MonetDB" ]
Date: 2014-10-03 14:56:15 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; To: GDK devs &lt;<bugs-common>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-10-31 14:14:31 +0100 ## Comment 20235 Date: 2014-10-03 14:56:15 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Created attachment 300 proposed fix Valgrind picked up a write-to-freed-memory when a client disconnected. I tracked it down to the following series of events: Thread 1 Thread 2 -------- -------- in MSserveClient calls join_threads() starts to exit calls MT_exiting_thread sets p->exited=1 notices posthread::exited==1 calls rm_posthread calls free(p) blocks in pthread_join returns to thread_starter sets p->exited=1 That last assignment is to freed memory. Attached a patch to fix this. > Attached file: [thread-exit-heap-corruption.patch](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3595_thread-exit-heap-corruption.patch_300) (application/octet-stream, 677 bytes) > Description: proposed fix ## Comment 20283 Date: 2014-10-11 18:04:57 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [eaadb9ab037d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=eaadb9ab037d) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=eaadb9ab037d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=eaadb9ab037d) Changeset description: free thread data after last use, fixes bug #3595. ## Comment 20284 Date: 2014-10-11 18:05:24 +0200 From: @njnes Thanks for the patch. Indeed fixes the problem ## Comment 20376 Date: 2014-10-31 14:14:31 +0100 From: @sjoerdmullender Oct2014 has been released.
Race/heap corruption on thread exit
https://api.github.com/repos/MonetDB/MonetDB/issues/3595/comments
0
2020-11-30T12:56:18Z
2024-06-27T12:05:06Z
https://github.com/MonetDB/MonetDB/issues/3595
753,456,212
3,595
[ "MonetDB", "MonetDB" ]
Date: 2014-10-03 13:14:38 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) Last updated: 2014-10-31 14:14:32 +0100 ## Comment 20233 Date: 2014-10-03 13:14:38 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0 Build Identifier: Assertion failure in gdk_bat.c Reproducible: Always ### Steps to Reproduce: 1. start mserver5 (MonetDB 5 server v11.17.21 "Jan2014-SP3") 2. start mclient 3. execute SQL commands: CREATE TABLE FLOAT8_TBL(f1 double); INSERT INTO FLOAT8_TBL(f1) VALUES (' -34.84'); select sign(f1) as sign_f1 from float8_tbl f; INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200'); select sign(f1) as sign_f1 from float8_tbl f; ### Actual Results: bash-4.2$ ./start_mserver5.sh builtin opt gdk_dbpath = /ufs/dinther/MonetDB201408/var/monetdb5/dbfarm/demo builtin opt gdk_debug = 0 builtin opt gdk_vmtrim = no builtin opt monet_prompt = > builtin opt monet_daemon = no builtin opt mapi_port = 50000 builtin opt mapi_open = false builtin opt mapi_autosense = false builtin opt sql_optimizer = default_pipe builtin opt sql_debug = 0 cmdline opt mapi_port = 49000 MonetDB 5 server v11.17.21 "Jan2014-SP3" Serving database 'demo', using 8 threads Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked Found 15.356 GiB available main-memory. Copyright (c) 1993-July 2008 CWI. Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Listening for connection requests on mapi:monetdb://127.0.0.1:49000/ MonetDB/GIS module loaded MonetDB/JAQL module loaded MonetDB/SQL module loaded >mserver5: gdk_bat.c:2855: BATassertHeadProps: Assertion `!b->H->revsorted || cmp >= 0' failed. ./start_mserver5.sh: line 4: 9843 Aborted ./MonetDB201408/bin/mserver5 -d10 --set mapi_port=49000 bash-4.2$ bash-4.2$ mclient -p 49000 Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.17.21 (Jan2014-SP3), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>CREATE TABLE FLOAT8_TBL(f1 double); operation successful (59.434ms) sql>INSERT INTO FLOAT8_TBL(f1) VALUES (' -34.84'); 1 affected rows (2.739ms) sql>select sign(f1) as sign_f1 from float8_tbl f; +---------+ | sign_f1 | +=========+ | -1 | +---------+ 1 tuple (1.067ms) sql>INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200'); 1 affected rows (2.325ms) sql>select sign(f1) as sign_f1 from float8_tbl f; sql> bash-4.2$ ### Expected Results: no assertion failure Also reproducable in developers default branch (sources of 3 nov 2014): gdk/gdk_bat.c:2902: BATassertHeadProps: Assertion `!b->H->revsorted || cmp >= 0' failed. ## Comment 20234 Date: 2014-10-03 13:57:18 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [771a0e3efdaa](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=771a0e3efdaa) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=771a0e3efdaa](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=771a0e3efdaa) Changeset description: Typo. This fixes bug #3594. ## Comment 20239 Date: 2014-10-03 17:24:00 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [23cf48780a55](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=23cf48780a55) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=23cf48780a55](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=23cf48780a55) Changeset description: Improved float8.sql tests. Could not generate the float8.stable.* files due to Mtest.py aborted (see bug #3594 & 3596) ## Comment 20377 Date: 2014-10-31 14:14:32 +0100 From: @sjoerdmullender Oct2014 has been released.
gdk/gdk_bat.c:2855: BATassertHeadProps: Assertion `!b->H->revsorted || cmp >= 0' failed.
https://api.github.com/repos/MonetDB/MonetDB/issues/3594/comments
0
2020-11-30T12:56:16Z
2024-06-27T12:05:05Z
https://github.com/MonetDB/MonetDB/issues/3594
753,456,186
3,594
[ "MonetDB", "MonetDB" ]
Date: 2014-10-03 12:35:21 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-10-31 14:14:24 +0100 ## Comment 20232 Date: 2014-10-03 12:35:21 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Created attachment 299 test script Use attached test script to reproduce, starting from a blank database. Build is Oct2014 [307281054d25](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=307281054d25) plus a few patches which Niels has given me. The important bit of that test script is to have a concurrent transaction open when doing the delete-all, thus ensuring that store_nr_active > 1 and we don't go through the fast path. In that case 'count' is updated and correct (=1 in the attached test) but 'ibase' isn't (=0 in the attached test). I have no idea how to go about fixing this. Should ibase have been updated in the new copy at commit time? Should the subsequent insert force a partial WAL flush before doing its thing? Help! > Attached file: [delete-concurrency-test.py](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3593_delete-concurrency-test.py_299) (application/octet-stream, 730 bytes) > Description: test script ## Comment 20281 Date: 2014-10-11 18:01:23 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [9117e7d7bd0f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9117e7d7bd0f) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9117e7d7bd0f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9117e7d7bd0f) Changeset description: fix for bug #3593. When we move the insert bats into the bid slot we should set the ibase. ## Comment 20282 Date: 2014-10-11 18:01:51 +0200 From: @njnes fixed by setting the ibase also when we take over the ibat ## Comment 20368 Date: 2014-10-31 14:14:24 +0100 From: @sjoerdmullender Oct2014 has been released.
delta_append_val: Assertion `!c || ((c)->S->count) == bat->ibase' failed.
https://api.github.com/repos/MonetDB/MonetDB/issues/3593/comments
0
2020-11-30T12:56:14Z
2024-06-27T12:05:04Z
https://github.com/MonetDB/MonetDB/issues/3593
753,456,164
3,593
[ "MonetDB", "MonetDB" ]
Date: 2014-10-02 12:57:30 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; To: MonetDB5 devs &lt;<bugs-monetdb5>&gt; Version: -- development CC: @mlkersten, shawpolakcrax12 Last updated: 2019-06-07 09:22:48 +0200 ## Comment 20226 Date: 2014-10-02 12:57:30 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Build is Oct2014 [307281054d25](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=307281054d25) plus a couple of patches (which I hope aren't relevant here) Traffic pattern is described in bug #3577. mserver5 crashed a few minutes after we started performing read queries. I'm still working on finding out which exact query might have caused this (I'm not the only one using this server) [BTW, I've never found a way of extracting either the current SQL or MAL from a core dump - do you have a good trick for that?]: Program terminated with signal SIGSEGV, Segmentation fault. 0 0x00007f3bd66b66cc in MANIFOLDjob (mut=<synthetic pointer>) at manifold.c:164 164 case 6: Manifoldbody(args[3],args[4],args[5]); break; (gdb) bt 0 0x00007f3bd66b66cc in MANIFOLDjob (mut=<synthetic pointer>) at manifold.c:164 1 MANIFOLDevaluate (cntxt=<optimized out>, mb=<optimized out>, stk=0x7f3b79a11950, pci=0x7f3b797daa60) at manifold.c:319 2 0x00007f3bd65ddbe8 in runMALsequence (cntxt=0x7f3b880968e8, mb=0x7f3b78970660, startpc=2040620112, stoppc=2040620128, stk=0x7f3b79a11950, env=0x3, pcicaller=0x0) at mal_interpreter.c:651 3 0x00007f3bd65dfd65 in DFLOWworker (T=0x7f3b880968e8) at mal_dataflow.c:362 4 0x00007f3bd50060a4 in start_thread (arg=0x7f3bbf9d6700) at pthread_create.c:309 5 0x00007f3bd4d3bc2d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 (gdb) i loc v = 0x7f3b880968e8 i = <optimized out> q = 0x754 <error: Cannot access memory at address 0x754> y = 0x0 msg = 0x0 p = 0x0 args = 0x7f3b880a6ea0 (gdb) disassemble $rip-20,$rip+20 Dump of assembler code from 0x7f3bd66b66b8 to 0x7f3bd66b66e0: 0x00007f3bd66b66b8 <MANIFOLDevaluate+6248>: push %rsp 0x00007f3bd66b66b9 <MANIFOLDevaluate+6249>: and $0x20,%al 0x00007f3bd66b66bb <MANIFOLDevaluate+6251>: xor %eax,%eax 0x00007f3bd66b66bd <MANIFOLDevaluate+6253>: mov 0x28(%r15),%rcx 0x00007f3bd66b66c1 <MANIFOLDevaluate+6257>: mov 0x20(%r15),%rdx 0x00007f3bd66b66c5 <MANIFOLDevaluate+6261>: mov 0x18(%r15),%rsi 0x00007f3bd66b66c9 <MANIFOLDevaluate+6265>: mov %r13,%rdi => 0x00007f3bd66b66cc <MANIFOLDevaluate+6268>: callq *0x10(%r10) 0x00007f3bd66b66d0 <MANIFOLDevaluate+6272>: test %rax,%rax 0x00007f3bd66b66d3 <MANIFOLDevaluate+6275>: jne 0x7f3bd66ba568 <MANIFOLDevaluate+22296> 0x00007f3bd66b66d9 <MANIFOLDevaluate+6281>: mov 0x2c(%rsp),%edi 0x00007f3bd66b66dd <MANIFOLDevaluate+6285>: cmp %edi,0x28(%rsp) End of assembler dump. (gdb) p/x $r10 $1 = 0x7f3b880968d0 (gdb) p *(InstrPtr)$r10 $2 = {token = 0 '\000', barrier = 0 '\000', typechk = 0 '\000', gc = 0 '\000', polymorphic = 0 '\000', varargs = 0 '\000', recycle = 0, jump = -2147483648, fcn = 0x8000000000000000, blk = 0x25b63f0, trace = 0 '\000', calls = 0, ticks = 0, rbytes = 0, wbytes = 0, modname = 0x25b5280 "mal", fcnname = 0x257e240 "manifold", argc = 6, retc = 1, maxarg = 8, argv = 0x7f3b8809692c} (gdb) up 1 MANIFOLDevaluate (cntxt=<optimized out>, mb=<optimized out>, stk=0x7f3b79a11950, pci=0x7f3b797daa60) at manifold.c:319 319 msg = MANIFOLDjob(&mut); (gdb) p *pci $3 = {token = 54 '6', barrier = 0 '\000', typechk = 2 '\002', gc = 3 '\003', polymorphic = 0 '\000', varargs = 0 '\000', recycle = 0, jump = 0, fcn = 0x7f3bd66b4e50 <MANIFOLDevaluate>, blk = 0x25b63f0, trace = 0 '\000', calls = 0, ticks = 0, rbytes = 0, wbytes = 0, modname = 0x25b5280 "mal", fcnname = 0x257e240 "manifold", argc = 6, retc = 1, maxarg = 8, argv = 0x7f3b797daabc} (gdb) p *mat@6 $4 = {{b = 0x7f3b8802ab90, first = 0x7f3b88081830, last = 0x7f3b88081830, size = 0, type = 0, bi = {b = 0x7f3b8802ab90, hvid = 0, tvid = 0}, o = 0, q = 0, s = 0x0}, {b = 0x0, first = 0x0, last = 0x0, size = 0, type = 0, bi = {b = 0x0, hvid = 0, tvid = 0}, o = 0, q = 0, s = 0x0}, {b = 0x0, first = 0x0, last = 0x0, size = 0, type = 0, bi = {b = 0x0, hvid = 0, tvid = 0}, o = 0, q = 0, s = 0x0}, {b = 0x7f3b880501d0, first = 0x0, last = 0x754, size = 0, type = 0, bi = {b = 0x7f3b880501d0, hvid = 0, tvid = 0}, o = 0, q = 1876, s = 0x0}, {b = 0x0, first = 0x7f3b79a16450, last = 0x7f3b79a16450, size = 0, type = 0, bi = {b = 0x0, hvid = 0, tvid = 0}, o = 0, q = 0, s = 0x0}, {b = 0x0, first = 0x7f3b79a16460, last = 0x7f3b79a16460, size = 0, type = 0, bi = {b = 0x0, hvid = 0, tvid = 0}, o = 0, q = 0, s = 0x0}} (gdb) i loc mut = <optimized out> mat = 0x7f3b88009ed0 i = <optimized out> tpe = <optimized out> cnt = 1876 msg = 0x0 fcn = <optimized out> Obviously from the disassembly, the instruction pointer is actually at manifold.c:71. The final cause of the crash is when v has overlapped mut.pci and hence memory has been overwritten. Because of this unconstrained heap overrun, it's difficult to say which variables are correct and which are nonsense. The runaway loop would appear to be because mut->args[mut->fvar].size==0 (as in the printout of mat above) but I can't figure out how that happened. It's not helpful that gcc has managed to optimize out all of mut. This was the second crash on that database, so in theory could have been a consequence of corruption incurred by the previous crash. I'm now going to change my core_pattern not to overwrite the file every time... There was another crash on another database, which was the first one ever on that database (again, shortly after the read queries started): 0 BBPdestroy (b=0x7fb5540505d0) at gdk_bbp.c:2497 1 decref (i=13266, logical=<optimized out>, releaseShare=<optimized out>, lock=1) at gdk_bbp.c:2258 2 0x00007fb5ad49da76 in runMALsequence (cntxt=0x8000000000000000, mb=0x7fb58cb4e280, startpc=0, stoppc=1398, stk=0x7fb58e0a9d70, env=0x0, pcicaller=0x0) at mal_interpreter.c:815 3 0x00007fb5ad49fd65 in DFLOWworker (T=0x8000000000000000) at mal_dataflow.c:362 4 0x00007fb5abec60a4 in start_thread (arg=0x7fb576df6700) at pthread_create.c:309 5 0x00007fb5abbfbc2d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 (gdb) p *b $1 = {batCacheid = 0, H = 0x8000000000000000, T = 0x8000000000000000, S = 0x8000000000000000} (gdb) thread 15 [Switching to thread 15 (Thread 0x7fb5765f2700 (LWP 9296))] 0 0x00007fb5ad57672a in MANIFOLDjob (mut=<synthetic pointer>) at manifold.c:164 164 case 6: Manifoldbody(args[3],args[4],args[5]); break; (gdb) bt 0 0x00007fb5ad57672a in MANIFOLDjob (mut=<synthetic pointer>) at manifold.c:164 1 MANIFOLDevaluate (cntxt=<optimized out>, mb=<optimized out>, stk=0x7fb58e0a9d70, pci=0x7fb58dcede30) at manifold.c:319 2 0x00007fb5ad49dbe8 in runMALsequence (cntxt=0x8000000000000000, mb=0x7fb58cb4e280, startpc=-1388980992, stoppc=-1911890928, stk=0x7fb58e0a9d70, env=0x3, pcicaller=0x0) at mal_interpreter.c:651 3 0x00007fb5ad49fd65 in DFLOWworker (T=0x8000000000000000) at mal_dataflow.c:362 4 0x00007fb5abec60a4 in start_thread (arg=0x7fb5765f2700) at pthread_create.c:309 5 0x00007fb5abbfbc2d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 This would appear to be the same heap overrun, just that it managed to take out a different thread before it overwrote itself. ## Comment 20227 Date: 2014-10-02 13:40:24 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Got it! Here's a repro: create table foo (t timestamp,v decimal(18,9)); insert into foo values (now(),42); insert into foo values (now(),43); select (t-(select timestamp '1970-1-1')),v from foo union all select (t-(select timestamp '1970-1-1')),null from foo; If I rewrite that null as cast(null as decimal(18,9)) then it doesn't crash. ## Comment 20228 Date: 2014-10-02 14:53:53 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; How's this? diff -r 6676c2c07c3d monetdb5/modules/mal/manifold.c --- a/monetdb5/modules/mal/manifold.c Wed Oct 01 12:48:06 2014 +0100 +++ b/monetdb5/modules/mal/manifold.c Thu Oct 02 13:52:57 2014 +0100 @@ -314,10 +314,12 @@ else BATseqbase(mat[0].b, 0); - mut.pci = copyInstruction(pci); - mut.pci->fcn = fcn; - msg = MANIFOLDjob(&mut); - freeInstruction(mut.pci); + if ( mat[mut.fvar].b->ttype != TYPE_void){ + mut.pci = copyInstruction(pci); + mut.pci->fcn = fcn; + msg = MANIFOLDjob(&mut); + freeInstruction(mut.pci); + } // consolidate the properties if (ATOMstorage(mat[0].b->ttype) < TYPE_str) ## Comment 20229 Date: 2014-10-02 14:58:10 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; No, forget that, it gives the wrong answer. Back to the drawing board. Anybody who wants to help me out here, feel free... ## Comment 20230 Date: 2014-10-02 15:16:34 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Better: diff -r 6676c2c07c3d monetdb5/modules/mal/manifold.c --- a/monetdb5/modules/mal/manifold.c Wed Oct 01 12:48:06 2014 +0100 +++ b/monetdb5/modules/mal/manifold.c Thu Oct 02 14:13:30 2014 +0100 @@ -275,7 +275,9 @@ goto wrapup; } mut.lvar = i; - if (ATOMstorage(tpe) == TYPE_str) + if (ATOMstorage(tpe) == TYPE_void) + mat[i].size = 1; + else if (ATOMstorage(tpe) == TYPE_str) mat[i].size = Tsize(mat[i].b); else mat[i].size = BATatoms[ATOMstorage(tpe)].size; ## Comment 20231 Date: 2014-10-03 11:17:22 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Thinking about it, there's a missed optimization opportunity here: as long as the function is classified as immutable, you could call it only once and duplicate the result as needed, rather than calling it once per NULL. I'll leave somebody else to do that - I'm just happy that it doesn't crash any more. ## Comment 20243 Date: 2014-10-04 12:14:37 +0200 From: @mlkersten The short test indeed generates a SEGVAULT in the Oct2014 pre-release. It crashes in sql_round.c line 285 279 nil_2dec(TYPE *res, void *val, int *d, int *sc) 280 { 281 (void) val; 282 (void) d; 283 (void) sc; 284 285 *res = NIL(TYPE); 286 return MAL_SUCCEED; 287 } Probably caused by calling with an unsupported type. ## Comment 20244 Date: 2014-10-04 12:31:55 +0200 From: @mlkersten Probably in nil_2dec_lng inability to deal with void value. 0 0x00007fffef7e31f4 in nil_2dec_lng (res=0x7fffe4024000, val=0x0, d=0x1db74b0, sc=0x1db74d0) at /export/scratch1/mk/mosaic//package/sql/backends/monet5/sql_round_impl.h:285 1 0x00007ffff7b66aa6 in MANIFOLDjob (mut=0x7fffed049880) at /export/scratch1/mk/mosaic//package/monetdb5/modules/mal/manifold.c:171 ## Comment 20245 Date: 2014-10-04 12:37:47 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [f67870d9120b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f67870d9120b) made by Martin Kersten <mk@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f67870d9120b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f67870d9120b) Changeset description: Add test for bug nil_2dec_lng.Bug-3592 ## Comment 20252 Date: 2014-10-05 18:41:27 +0200 From: @mlkersten The result BAT is identified with a TYPE_void tail. This means we have to create a result with TYPE_oid and have to materialize the oids during the loop. For the time being, ignore void-void columns in the manifold type checker. The resulting MAL loop at least provides correct results. The actual code of MANIfold should be redone to run properly over an oid-range instead of the mixture of pointer calculations. ## Comment 20253 Date: 2014-10-05 21:01:53 +0200 From: @mlkersten Upgraded the code base. Close until we find alternative issues. More mini-examples in the test suite would be great. ## Comment 20322 Date: 2014-10-28 23:46:21 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [da9653156935](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=da9653156935) made by Stefan Manegold <Stefan.Manegold@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=da9653156935](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=da9653156935) Changeset description: nil_2dec_lng.Bug-3592: approve single-threaded output ## Comment 20372 Date: 2014-10-31 14:14:27 +0100 From: @sjoerdmullender Oct2014 has been released.
SIGSEGV in MANIFOLDjob
https://api.github.com/repos/MonetDB/MonetDB/issues/3592/comments
0
2020-11-30T12:56:11Z
2024-06-27T12:05:03Z
https://github.com/MonetDB/MonetDB/issues/3592
753,456,130
3,592
[ "MonetDB", "MonetDB" ]
Date: 2014-10-01 11:03:34 +0200 From: openbusinessintelligence To: clients devs &lt;<bugs-clients>&gt; Version: 11.17.21 (Jan2014-SP3) CC: martin.van.dinther Last updated: 2015-09-17 15:56:03 +0200 ## Comment 20225 Date: 2014-10-01 11:03:34 +0200 From: openbusinessintelligence The method DatabaseMetaData.getCatalogs() return a RecordSet with the false column name TABLE_TYPE instead of TABLE_CAT. ## Comment 20236 Date: 2014-10-03 14:59:21 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [5b63646d2f93](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5b63646d2f93) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=5b63646d2f93](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=5b63646d2f93) Changeset description: Fix for bug #3591 ## Comment 21268 Date: 2015-09-17 15:56:03 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; Is fixed is latest JDBC driver. Download latest JDBC driver from https://www.monetdb.org/downloads/Java/Jul2015/
DatabaseMetaData.getCatalogs() return a RecordSet with a false column name
https://api.github.com/repos/MonetDB/MonetDB/issues/3591/comments
0
2020-11-30T12:56:08Z
2024-06-27T12:05:02Z
https://github.com/MonetDB/MonetDB/issues/3591
753,456,102
3,591
[ "MonetDB", "MonetDB" ]
Date: 2014-09-30 23:47:15 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: -- development Last updated: 2016-04-11 11:45:08 +0200 ## Comment 20223 Date: 2014-09-30 23:47:15 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2166.2 Safari/537.36 Build Identifier: For presentation I would like to extract an hour and minute from a timestamp. I noticed that the operation added a lot of overhead to the query, bringing it back to fundamentally: a string concat is extremely expensive. Reproducible: Always ### Steps to Reproduce: 1. a table with roughly 10.000.000 rows 2. select row1||row1 from bigtable limit 1; (~4s) 3. select row1 from bigtable limit 1; (~2ms) Is it possible to get the topn before the creation of the column as if the rendering is merely a presentation aspect (final operation). ## Comment 20224 Date: 2014-09-30 23:50:30 +0200 From: @skinkie I noticed that the problem is very type dependent; select dataownercode||dataownercode from kv6 limit 1; +----------------------+ | concat_dataownercode | +======================+ | HTMHTM | +----------------------+ 1 tuple (623.450ms) sql>select source||source from kv6 limit 1; +----------------+ | concat_source | +================+ | VEHICLEVEHICLE | +----------------+ 1 tuple (773.036ms) sql>select rd_x||rd_x from kv6 limit 1; +-------------+ | concat_rd_x | +=============+ | 7806678066 | +-------------+ 1 tuple (1.7s) select operatingday||operatingday from kv6 limit 1; +----------------------+ | concat_operatingday | +======================+ | 2014-09-142014-09-14 | +----------------------+ 1 tuple (2.8s) select receive||receive from kv6 limit 1; +------------------------------------------------------+ | concat_receive | +======================================================+ | 2014-09-14 19:22:25.1090002014-09-14 19:22:25.109000 | +------------------------------------------------------+ 1 tuple (4.7s)
string concat on a column is expensive
https://api.github.com/repos/MonetDB/MonetDB/issues/3590/comments
0
2020-11-30T12:56:06Z
2024-06-28T13:39:34Z
https://github.com/MonetDB/MonetDB/issues/3590
753,456,072
3,590
[ "MonetDB", "MonetDB" ]
Date: 2014-09-27 12:01:10 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-09-28 14:16:53 +0200 ## Comment 20206 Date: 2014-09-27 12:01:10 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.58 Safari/537.36 Build Identifier: I have the feeling that I reported this "bug-theme" before. But the examples may show better what goes wrong. I have the feeling that the column alias for the duplicate column check does not check the table name. Reproducible: Always ### Steps to Reproduce: CREATE TABLE "sys"."test_dup_1" ( "a" INTEGER, "b" INTEGER ); select canon, count(*) from ( select x.a - y.a as canon, x.a, y.a from (select a, b from test_dup_1) as x join (select a, b from test_dup_1) as y on (x.a = x.b) ) as z group by canon; ### Actual Results: SELECT: Duplicate column name 'z.a' ### Expected Results: select canon, count(*) from ( select x.a - y.a as canon, x.a as "x.a", y.a as "y.a" from (select a, b from test_dup_1) as x join (select a, b from test_dup_1) as y on (x.a = x.b) ) as z group by canon; +-------+----+ | canon | L1 | +=======+====+ +-------+----+ MonetDB 5 server v11.19.0 (64-bit, 64-bit oids) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 31.4GiB available memory, 8 available cpu cores Libraries: libpcre: 8.33 2013-05-28 (compiled with 8.33) openssl: OpenSSL 1.0.1h 5 Jun 2014 (compiled with OpenSSL 1.0.1h 5 Jun 2014) libxml2: 2.9.1 (compiled with 2.9.1) Compiled by: skinkie@bigdata.openebs.nl (x86_64-unknown-linux-gnu) Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code Linking : /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64 ## Comment 20208 Date: 2014-09-28 14:16:53 +0200 From: @njnes Your intermediate relation (with alias table name z) has 2 columns with column name 'a'. This will give 2 columns the resulting same name (z.a).
Duplicate column name
https://api.github.com/repos/MonetDB/MonetDB/issues/3589/comments
0
2020-11-30T12:56:03Z
2024-06-28T13:40:23Z
https://github.com/MonetDB/MonetDB/issues/3589
753,456,040
3,589
[ "MonetDB", "MonetDB" ]
Date: 2014-09-26 17:14:41 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-10-11 19:24:20 +0200 ## Comment 20205 Date: 2014-09-26 17:14:41 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0 Build Identifier: Given the table definition: create table test_default (c1 integer, c2 double, c3 boolean, c4 char(10), c5 text, c6 date, c7 timestamp); the following SQLs are all allowed (no error returned): alter table test_default alter column c1 set default 'abc'; alter table test_default alter column c2 set default 'abc'; alter table test_default alter column c3 set default 'abc'; alter table test_default alter column c3 set default 3; alter table test_default alter column c4 set default 'string of more than 10 chars'; alter table test_default alter column c6 set default 6; alter table test_default alter column c7 set default 7; Idem for: create table test_default2 (c1 integer default 'c1def', c2 double default 'c2def', c3 boolean default 'c3def', c4 char(10) default 'string of more than 10 chars', c6 date default 'c6def', c7 timestamp default 'c7def'); These should be prevented as it will cause runtime errors (or crashes, see bug #3587) during inserts: insert into test_default default values; insert into test_default2 default values; So please add datatype and max str length value checking when Reproducible: Always ### Steps to Reproduce: 1. Start mserver5 () 2. start mclient or SQuirreL 3. execute SQL: create table test_default (c1 integer, c2 double, c3 boolean, c4 char(10), c5 text, c6 date, c7 timestamp); insert into test_default default values; select * from test_default; alter table test_default alter column c1 set default 'abc'; insert into test_default default values; -- Error: conversion of string 'abc' to type int failed. select * from test_default; alter table test_default alter column c1 set default 1.1; alter table test_default alter column c2 set default 'abc'; insert into test_default default values; -- Error: conversion of string 'abc' to type dbl failed. alter table test_default alter column c2 set default 2.2; alter table test_default alter column c3 set default 'abc'; insert into test_default default values; -- Error: conversion of string 'abc' to type bit failed. alter table test_default alter column c3 drop default; alter table test_default alter column c3 set default 3; alter table test_default alter column c6 set default 6; insert into test_default default values; -- Error: types tinyint(8,0) and date(0,0) are not equal select * from test_default; alter table test_default alter column c6 set default current_date; alter table test_default alter column c7 set default 7; insert into test_default default values; -- Error: types tinyint(8,0) and timestamp(7,0) are not equal select * from test_default; alter table test_default alter column c7 set default current_timestamp; alter table test_default alter column c4 set default 'abcdefghijklijk'; insert into test_default default values; -- Error: value too long for type (var)char(10) select * from test_default; select current_user; alter table test_default alter column c4 set default current_user; -- Error: incorrect default value 'current_user' select user; alter table test_default alter column c4 set default user; -- Error: incorrect default value 'current_user' alter table test_default alter column c4 set default 'only static?'; alter table test_default alter column c5 set default 54; insert into test_default default values; -- Error: value too long for type (var)char(10) select * from test_default; alter table test_default alter column c4 drop default; insert into test_default default values; select * from test_default; create table test_default2 (c1 integer default 'c1def', c2 double default 'c2def', c3 boolean default 'c3def', c4 char(10) default 'string of more than 10 chars', c6 date default 'c6def', c7 timestamp default 'c7def'); insert into test_default2 default values; -- Error: conversion of string 'c1def' to type int failed. ### Actual Results: create table test_default (c1 integer, c2 double, c3 boolean, c4 char(10), c5 text, c6 date, c7 timestamp); insert into test_default default values; select * from test_default; alter table test_default alter column c1 set default 'abc'; insert into test_default default values; -- Error: conversion of string 'abc' to type int failed. select * from test_default; alter table test_default alter column c1 set default 1.1; alter table test_default alter column c2 set default 'abc'; insert into test_default default values; -- Error: conversion of string 'abc' to type dbl failed. alter table test_default alter column c2 set default 2.2; alter table test_default alter column c3 set default 'abc'; insert into test_default default values; -- Error: conversion of string 'abc' to type bit failed. alter table test_default alter column c3 drop default; alter table test_default alter column c3 set default 3; alter table test_default alter column c6 set default 6; insert into test_default default values; -- Error: types tinyint(8,0) and date(0,0) are not equal select * from test_default; alter table test_default alter column c6 set default current_date; alter table test_default alter column c7 set default 7; insert into test_default default values; -- Error: types tinyint(8,0) and timestamp(7,0) are not equal select * from test_default; alter table test_default alter column c7 set default current_timestamp; alter table test_default alter column c4 set default 'abcdefghijklijk'; insert into test_default default values; -- Error: value too long for type (var)char(10) select * from test_default; select current_user; alter table test_default alter column c4 set default current_user; -- Error: incorrect default value 'current_user' select user; alter table test_default alter column c4 set default user; -- Error: incorrect default value 'current_user' alter table test_default alter column c4 set default 'only static?'; alter table test_default alter column c5 set default 54; insert into test_default default values; -- Error: value too long for type (var)char(10) select * from test_default; alter table test_default alter column c4 drop default; insert into test_default default values; select * from test_default; create table test_default2 (c1 integer default 'c1def', c2 double default 'c2def', c3 boolean default 'c3def', c4 char(10) default 'string of more than 10 chars', c6 date default 'c6def', c7 timestamp default 'c7def'); insert into test_default2 default values; -- Error: conversion of string 'c1def' to type int failed. ### Expected Results: Error msg at create table and alter table commands to prevent impossible default values ## Comment 20286 Date: 2014-10-11 19:24:20 +0200 From: @njnes as defaults may (for a small part) be functions there is no way to properly test during default creation, the error message (conversion) is done on insert.
Setting default values with values which datatype doesn't match the columns datatype is accepted but should not be allowed as it creates errors when doing inserts
https://api.github.com/repos/MonetDB/MonetDB/issues/3588/comments
0
2020-11-30T12:56:00Z
2024-06-28T13:16:10Z
https://github.com/MonetDB/MonetDB/issues/3588
753,456,003
3,588
[ "MonetDB", "MonetDB" ]
Date: 2014-09-26 16:29:05 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-09-28 13:56:13 +0200 ## Comment 20202 Date: 2014-09-26 16:29:05 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0 Build Identifier: inserting default values on a boolean column which has default value number 3 defined seems to cause a segmentation fault. Reproducible: Always ### Steps to Reproduce: 1. Start mserver5 (MonetDB 5 server v11.17.21 "Jan2014-SP3") 2. start mclient 3. Execute SQL commands: create table test_default (c1 integer, c2 double, c3 boolean, c4 char(10), c5 text); insert into test_default default values; select * from test_default; alter table test_default alter column c3 set default 'abc'; insert into test_default default values; alter table test_default alter column c3 set default 3; insert into test_default default values; ### Actual Results: builtin opt gdk_dbpath = /ufs/dinther/MonetDB201408/var/monetdb5/dbfarm/demo builtin opt gdk_debug = 0 builtin opt gdk_vmtrim = no builtin opt monet_prompt = > builtin opt monet_daemon = no builtin opt mapi_port = 50000 builtin opt mapi_open = false builtin opt mapi_autosense = false builtin opt sql_optimizer = default_pipe builtin opt sql_debug = 0 cmdline opt mapi_port = 49000 MonetDB 5 server v11.17.21 "Jan2014-SP3" Serving database 'demo', using 8 threads Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked Found 15.356 GiB available main-memory. Copyright (c) 1993-July 2008 CWI. Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Listening for connection requests on mapi:monetdb://127.0.0.1:49000/ MonetDB/GIS module loaded MonetDB/JAQL module loaded MonetDB/SQL module loaded > >Bulk operator required for str.stringleft Bulk operator required for str.stringleft ./start_mserver5.sh: line 4: 29163 Segmentation fault ./MonetDB201408/bin/mserver5 -d10 --set mapi_port=49000 bash-4.2$ bash-4.2$ mclient -p 49000 Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.17.21 (Jan2014-SP3), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>create table test_default (c1 integer, c2 double, c3 boolean, c4 char(10), c5 text); operation successful (37.866ms) sql>insert into test_default default values; 1 affected rows (2.312ms) sql>select * from test_default; +------+--------------------------+-------+------------+------+ | c1 | c2 | c3 | c4 | c5 | +======+==========================+=======+============+======+ | null | null | null | null | null | +------+--------------------------+-------+------------+------+ 1 tuple (1.247ms) sql>alter table test_default alter column c3 set default 'abc'; operation successful (2.887ms) sql>insert into test_default default values; conversion of string 'abc' to type bit failed. sql>alter table test_default alter column c3 set default 3; operation successful (46.371ms) sql>insert into test_default default values; sql> bash-4.2$ ### Expected Results: No segmentation fault. The SQL: alter table test_default alter column c3 set default 'abc'; should not be allowed as c3 is a boolean and the default is not a boolean value (but a string). Expected to receive an error message. Idem for SQL: alter table test_default alter column c3 set default 3; ## Comment 20207 Date: 2014-09-28 13:56:13 +0200 From: @njnes cannot reproduce in the current branches.
segmentation fault in mserver5 process
https://api.github.com/repos/MonetDB/MonetDB/issues/3587/comments
0
2020-11-30T12:55:57Z
2024-06-28T13:16:09Z
https://github.com/MonetDB/MonetDB/issues/3587
753,455,979
3,587
[ "MonetDB", "MonetDB" ]
Date: 2014-09-26 16:01:41 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-10-31 14:14:30 +0100 ## Comment 20201 Date: 2014-09-26 16:01:41 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0 Build Identifier: Assertion failure when trying to drop aggregate median for a second time. Reproducible: Always ### Steps to Reproduce: 1. Start mserver5 2. Start mclient 3. executing SQL comands: SELECT median(val) FROM (SELECT 1.0 as val UNION ALL SELECT 2.0) as t; DROP AGGREGATE median(double); SELECT median(val) FROM (SELECT 1.0 as val UNION ALL SELECT 2.0) as t; DROP AGGREGATE median(double); SELECT median(val) FROM (SELECT 1.0 as val UNION ALL SELECT 2.0) as t; ### Actual Results: builtin opt gdk_dbpath = /ufs/dinther/MonetDB201408/var/monetdb5/dbfarm/demo builtin opt gdk_debug = 0 builtin opt gdk_vmtrim = no builtin opt monet_prompt = > builtin opt monet_daemon = no builtin opt mapi_port = 50000 builtin opt mapi_open = false builtin opt mapi_autosense = false builtin opt sql_optimizer = default_pipe builtin opt sql_debug = 0 cmdline opt mapi_port = 49000 MonetDB 5 server v11.17.21 "Jan2014-SP3" Serving database 'demo', using 8 threads Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked Found 15.356 GiB available main-memory. Copyright (c) 1993-July 2008 CWI. Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Listening for connection requests on mapi:monetdb://127.0.0.1:49000/ MonetDB/GIS module loaded MonetDB/JAQL module loaded MonetDB/SQL module loaded >Bulk operator required for str.stringleft Bulk operator required for str.stringleft Bulk operator required for user.columnsize Bulk operator required for user.heapsize Bulk operator required for user.indexsize Bulk operator required for str.stringleft Bulk operator required for str.stringleft mserver5: store.c:3610: sys_drop_func: Assertion `rid_func != oid_nil' failed. ./mserver5.sh: line 4: 11254 Aborted ./MonetDB201408/bin/mserver5 -d10 --set mapi_port=49000 bash-4.2$ bash-4.2$ mclient -p 49000 Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.17.21 (Jan2014-SP3), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>SELECT median(val) FROM (SELECT 1.0 as val UNION ALL SELECT 2.0) as t; +--------------------------+ | L2 | +==========================+ | 1 | +--------------------------+ 1 tuple (0.997ms) sql>DROP AGGREGATE median(double); operation successful (28.850ms) sql>SELECT median(val) FROM (SELECT 1.0 as val UNION ALL SELECT 2.0) as t; +--------------------------+ | L2 | +==========================+ | 1 | +--------------------------+ 1 tuple (0.950ms) sql>DROP AGGREGATE median(double); sql>SELECT median(val) FROM (SELECT 1.0 as val UNION ALL SELECT 2.0) as t; bash-4.2$ ### Expected Results: no assertion failure. Error msg that AGGREGATE median does not exist: DROP AGGREGATE: no such aggregate 'median' (double(53)) ## Comment 20211 Date: 2014-09-28 16:16:21 +0200 From: @njnes we dropped the wrong function (structure), ie (other median). Therefor the structure of this median(double) could be found again, but the id was already removed from the functions table. ## Comment 20375 Date: 2014-10-31 14:14:30 +0100 From: @sjoerdmullender Oct2014 has been released.
mserver5: sql/storage/store.c:3610: sys_drop_func: Assertion `rid_func != oid_nil' failed.
https://api.github.com/repos/MonetDB/MonetDB/issues/3586/comments
0
2020-11-30T12:55:55Z
2024-06-27T12:04:57Z
https://github.com/MonetDB/MonetDB/issues/3586
753,455,948
3,586
[ "MonetDB", "MonetDB" ]
Date: 2014-09-26 14:39:19 +0200 From: @bartscheers To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: martin.van.dinther, @njnes Last updated: 2014-10-31 14:14:52 +0100 ## Comment 20199 Date: 2014-09-26 14:39:19 +0200 From: @bartscheers User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0 Build Identifier: An incorrect sql statement terminates connection, where a normal error message would have been expected. Reproducible: Always ### Steps to Reproduce: 1. create a db (+ schema) 2. run script 3. 3 of 4 queries give crash, whereas all 4 are incorrect ### Actual Results: connection terminated ### Expected Results: error mesasage for all 4 queries, complaining about group by, something like: SELECT: cannot use non GROUP BY column When defined in view this should also be messaged. ## Comment 20200 Date: 2014-09-26 14:40:37 +0200 From: @bartscheers Created attachment 298 creation of table, plus queries > Attached file: [create.tables.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3585_create.tables.sql_298) (application/sql, 336 bytes) > Description: creation of table, plus queries ## Comment 20203 Date: 2014-09-26 16:44:07 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; Execute SQL: create table runcat (id int not null, dp double not null); SELECT * FROM runcat GROUP BY id; SELECT r.* FROM runcat r GROUP BY r.id; mserver5 output: could not find r.dp r.id r.id mserver5: rel_bin.c:2234: rel2bin_project: Assertion `0' failed. ## Comment 20209 Date: 2014-09-28 14:19:48 +0200 From: @njnes r.* is now handled as *, ie lookup the columns (in the group by intermediate). In this case that is only the id column ## Comment 20394 Date: 2014-10-31 14:14:52 +0100 From: @sjoerdmullender Oct2014 has been released.
Incorrect query terminates connection
https://api.github.com/repos/MonetDB/MonetDB/issues/3585/comments
0
2020-11-30T12:55:53Z
2024-06-27T12:04:56Z
https://github.com/MonetDB/MonetDB/issues/3585
753,455,926
3,585
[ "MonetDB", "MonetDB" ]
Date: 2014-09-23 13:36:07 +0200 From: @hannesmuehleisen To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.13 (Jan2014-SP1) Last updated: 2014-10-06 14:33:20 +0200 ## Comment 20195 Date: 2014-09-23 13:36:07 +0200 From: @hannesmuehleisen User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2159.4 Safari/537.36 Build Identifier: create table a(i integer); insert into a values (42); select * from a as a1; select * from (a as a1 join a as a2 using (i)) AS a3; Reproducible: Always ### Actual Results: syntax error, unexpected AS, expecting SCOLON in: "select * from (a as a1 join a as a2 using (i)) as" ### Expected Results: Result set with name a3 ## Comment 20258 Date: 2014-10-06 14:33:20 +0200 From: @hannesmuehleisen Disregard, my mistake.
Can't rename subquery result table
https://api.github.com/repos/MonetDB/MonetDB/issues/3584/comments
0
2020-11-30T12:55:50Z
2024-06-28T13:16:09Z
https://github.com/MonetDB/MonetDB/issues/3584
753,455,897
3,584
[ "MonetDB", "MonetDB" ]
Date: 2014-09-20 19:37:48 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: @njnes Last updated: 2014-10-31 14:14:22 +0100 ## Comment 20175 Date: 2014-09-20 19:37:48 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.68 Safari/537.36 Build Identifier: select vehicle, max(lineplanningnumber) as lineplanningnumber, max(journeynumber) as journeynumber from (select (epoch(vehicle) / 120) * 120 as vehicle, lineplanningnumber, journeynumber, vehiclenumber from "sys"."kv6") as x group by vehicle, vehiclenumber limit 10; Results for me into: +------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+ | vehicle | lineplanningnumber | journe | : : : ynumbe : : : : r : +============+===================================================================================================================================================================================================================================+========+ | 1410715200 | ��������..... some other colums Reproducible: Couldn't Reproduce ### Steps to Reproduce: I have tried to reproduce it on the following small example which does not trigger it. CREATE TABLE "sys"."test" ( "vehicle" TIMESTAMP, "lineplanningnumber" VARCHAR(10), "journeynumber" INTEGER, "vehiclenumber" INTEGER ); INSERT INTO test VALUES ('2014-01-01 00:00:01', '1', 1, 1); INSERT INTO test VALUES ('2014-01-01 00:00:02', '1', 2, 1); INSERT INTO test VALUES ('2014-01-01 00:00:03', '1', 2, 2); INSERT INTO test VALUES ('2014-01-01 00:01:02', '1', 2, 2); INSERT INTO test VALUES ('2014-01-01 00:01:02', null, null, 2); INSERT INTO test VALUES ('2014-01-01 00:01:02', '2', 2, 3); select vehicle, max(lineplanningnumber) as lineplanningnumber, max(journeynumber) as journeynumber from (select (epoch(vehicle) / 120) * 120 as vehicle, lineplanningnumber, journeynumber, vehiclenumber from "sys"."test") as x group by vehicle, vehiclenumber limit 10; Thus I created the entire dataset: create table test2 as select (epoch(vehicle) / 120) * 120 as vehicle, lineplanningnumber, journeynumber, vehiclenumber from "sys"."kv6" with data; and executed: select vehicle, max(lineplanningnumber) as lineplanningnumber, max(journeynumber) as journeynumber from test2 group by vehicle, vehiclenumber limit 10; Which does trigger it. I have exported the table and e-mailed Niels the URI. MonetDB 5 server v11.19.0 (64-bit, 64-bit oids) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 31.4GiB available memory, 8 available cpu cores Libraries: libpcre: 8.33 2013-05-28 (compiled with 8.33) openssl: OpenSSL 1.0.1h 5 Jun 2014 (compiled with OpenSSL 1.0.1h 5 Jun 2014) libxml2: 2.9.1 (compiled with 2.9.1) Compiled by: skinkie@bigdata.openebs.nl (x86_64-unknown-linux-gnu) Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code Linking : /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64 ## Comment 20176 Date: 2014-09-21 16:11:08 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [39ea2e9fe4a8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=39ea2e9fe4a8) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=39ea2e9fe4a8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=39ea2e9fe4a8) Changeset description: make sure we only apply the stringtrick in BATproject when there are no nil's oids (in l). Fixes bug #3583 ## Comment 20367 Date: 2014-10-31 14:14:22 +0100 From: @sjoerdmullender Oct2014 has been released.
Possible buffer overflow in max(varchar)
https://api.github.com/repos/MonetDB/MonetDB/issues/3583/comments
0
2020-11-30T12:55:48Z
2024-06-27T12:04:54Z
https://github.com/MonetDB/MonetDB/issues/3583
753,455,868
3,583
[ "MonetDB", "MonetDB" ]
Date: 2014-09-20 17:56:25 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-10-31 14:14:36 +0100 ## Comment 20174 Date: 2014-09-20 17:56:25 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.68 Safari/537.36 Build Identifier: I was using double quotes, instead of single quotes and ended up with the following. Reproducible: Always ### Steps to Reproduce: CREATE TABLE "sys"."kv6" ( "receive" TIMESTAMP, "message" TIMESTAMP, "vehicle" TIMESTAMP, "messagetype" VARCHAR(10), "operatingday" DATE, "dataownercode" VARCHAR(10), "lineplanningnumber" VARCHAR(10), "journeynumber" INTEGER, "reinforcementnumber" INTEGER, "userstopcode" VARCHAR(10), "passagesequencenumber" INTEGER, "distancesincelastuserstop" INTEGER, "punctuality" INTEGER, "rd_x" INTEGER, "rd_y" INTEGER, "blockcode" INTEGER, "vehiclenumber" INTEGER, "wheelchairaccessible" VARCHAR(5), "source" VARCHAR(10), "numberofcoaches" INTEGER, "trip_hash" BIGINT ); select distinct "sum("||lineplanningnumber||") as l"||lineplanningnumber||", " from "sys"."kv6" order by cast(lineplanningnumber as int); mserver5: sql_mem.c:48: sql_ref_dec: Assertion `r->refcnt > 0' failed. Program received signal SIGABRT, Aborted. [Switching to Thread 0x7ffff17cc700 (LWP 11583)] 0x00007ffff4aac535 in raise () from /lib64/libc.so.6 (gdb) bt 0 0x00007ffff4aac535 in raise () from /lib64/libc.so.6 1 0x00007ffff4aad9b8 in abort () from /lib64/libc.so.6 2 0x00007ffff4aa55f2 in ?? () from /lib64/libc.so.6 3 0x00007ffff4aa56a2 in __assert_fail () from /lib64/libc.so.6 4 0x00007ffff2ee01ba in sql_ref_dec (r=0x7fffe40b8540) at sql_mem.c:48 5 0x00007ffff2e426bd in rel_destroy (rel=0x7fffe40b8540) at rel_select.c:72 6 0x00007ffff2e52411 in _rel_aggr (sql=0x7fffe4005450, rel=0x7ffff17cb658, distinct=0, s=0x7fffe4008290, aname=0x7fffe40b7c80 "concat", args=0x7fffe40b7cf0, f=2) at rel_select.c:3849 7 0x00007ffff2e52fda in rel_aggr (sql=0x7fffe4005450, rel=0x7ffff17cb658, se=0x7fffe40b7d30, f=2) at rel_select.c:3981 8 0x00007ffff2e5181f in rel_binop (sql=0x7fffe4005450, rel=0x7ffff17cb658, se=0x7fffe40b7d30, f=2, ek=...) at rel_select.c:3697 9 0x00007ffff2e55f1e in rel_value_exp2 (sql=0x7fffe4005450, rel=0x7ffff17cb658, se=0x7fffe40b7d30, f=2, ek=..., is_last=0x7ffff17cb41c) at rel_select.c:4710 10 0x00007ffff2e56a32 in rel_value_exp (sql=0x7fffe4005450, rel=0x7ffff17cb658, se=0x7fffe40b7d30, f=2, ek=...) at rel_select.c:4865 11 0x00007ffff2e517b4 in rel_binop (sql=0x7fffe4005450, rel=0x7ffff17cb658, se=0x7fffe40b7ea0, f=2, ek=...) at rel_select.c:3691 12 0x00007ffff2e55f1e in rel_value_exp2 (sql=0x7fffe4005450, rel=0x7ffff17cb658, se=0x7fffe40b7ea0, f=2, ek=..., is_last=0x7ffff17cb5ec) at rel_select.c:4710 13 0x00007ffff2e56a32 in rel_value_exp (sql=0x7fffe4005450, rel=0x7ffff17cb658, se=0x7fffe40b7ea0, f=2, ek=...) at rel_select.c:4865 14 0x00007ffff2e52829 in _rel_aggr (sql=0x7fffe4005450, rel=0x7ffff17cbad0, distinct=0, s=0x7fffe4008290, aname=0x7fffe40b7f50 "concat", args=0x7fffe40b7fc0, f=2) at rel_select.c:3887 15 0x00007ffff2e52fda in rel_aggr (sql=0x7fffe4005450, rel=0x7ffff17cbad0, se=0x7fffe40b8000, f=2) at rel_select.c:3981 16 0x00007ffff2e5181f in rel_binop (sql=0x7fffe4005450, rel=0x7ffff17cbad0, se=0x7fffe40b8000, f=2, ek=...) at rel_select.c:3697 17 0x00007ffff2e55f1e in rel_value_exp2 (sql=0x7fffe4005450, rel=0x7ffff17cbad0, se=0x7fffe40b8000, f=2, ek=..., is_last=0x7ffff17cb9dc) at rel_select.c:4710 18 0x00007ffff2e56a32 in rel_value_exp (sql=0x7fffe4005450, rel=0x7ffff17cbad0, se=0x7fffe40b8000, f=2, ek=...) at rel_select.c:4865 19 0x00007ffff2e56b17 in column_exp (sql=0x7fffe4005450, rel=0x7ffff17cbad0, column_e=0x7fffe40b8080, f=2) at rel_select.c:4878 20 0x00007ffff2e56d7a in rel_column_exp (sql=0x7fffe4005450, rel=0x7ffff17cbad0, column_e=0x7fffe40b8080, f=2) at rel_select.c:4922 21 0x00007ffff2e57919 in rel_select_exp (sql=0x7fffe4005450, rel=0x7fffe40b92b0, sn=0x7fffe40b82e0, ek=...) at rel_select.c:5115 22 0x00007ffff2e5864e in rel_query (sql=0x7fffe4005450, rel=0x0, sq=0x7fffe40b82e0, toplevel=1, ek=..., apply=8) at rel_select.c:5320 23 0x00007ffff2e59fc9 in rel_subquery (sql=0x7fffe4005450, rel=0x0, sq=0x7fffe40b82e0, ek=..., apply=8) at rel_select.c:5699 24 0x00007ffff2e5a0a1 in rel_selects (sql=0x7fffe4005450, s=0x7fffe40b82e0) at rel_select.c:5716 25 0x00007ffff2e42465 in rel_semantic (sql=0x7fffe4005450, s=0x7fffe40b82e0) at rel_semantic.c:264 26 0x00007ffff2d7b088 in sql_symbol2relation (c=0x7fffe4005450, sym=0x7fffe40b82e0) at sql.c:125 27 0x00007ffff2d9dcef in SQLparser (c=0x647330) at sql_scenario.c:2104 28 0x00007ffff78fd7c6 in runPhase (c=0x647330, phase=1) at mal_scenario.c:526 29 0x00007ffff78fd968 in runScenarioBody (c=0x647330) at mal_scenario.c:561 30 0x00007ffff78fdb22 in runScenario (c=0x647330) at mal_scenario.c:590 31 0x00007ffff78ff4c8 in MSserveClient (dummy=0x647330) at mal_session.c:459 32 0x00007ffff739c910 in thread_starter (arg=0x7fffec000a20) at gdk_system.c:506 33 0x00007ffff4e27f3a in start_thread () from /lib64/libpthread.so.0 34 0x00007ffff4b61dad in clone () from /lib64/libc.so.6 4 0x00007ffff2ee01ba in sql_ref_dec (r=0x7fffe40b8540) at sql_mem.c:48 48 assert(r->refcnt > 0); (gdb) list 43 } 44 45 int 46 sql_ref_dec(sql_ref *r) 47 { 48 assert(r->refcnt > 0); 49 return (--r->refcnt); 50 } 51 52 (gdb) up 5 0x00007ffff2e426bd in rel_destroy (rel=0x7fffe40b8540) at rel_select.c:72 72 if (sql_ref_dec(&rel->ref) > 0) (gdb) list 67 void 68 rel_destroy(sql_rel *rel) 69 { 70 if (!rel) 71 return; 72 if (sql_ref_dec(&rel->ref) > 0) 73 return; 74 rel_destroy_(rel); 75 } 76 MonetDB 5 server v11.19.0 (64-bit, 64-bit oids) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 31.4GiB available memory, 8 available cpu cores Libraries: libpcre: 8.33 2013-05-28 (compiled with 8.33) openssl: OpenSSL 1.0.1h 5 Jun 2014 (compiled with OpenSSL 1.0.1h 5 Jun 2014) libxml2: 2.9.1 (compiled with 2.9.1) Compiled by: skinkie@bigdata.openebs.nl (x86_64-unknown-linux-gnu) Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code Linking : /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64 ## Comment 20181 Date: 2014-09-21 17:40:32 +0200 From: @njnes fixed cleanup ## Comment 20182 Date: 2014-09-21 17:41:10 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [229116aeddb0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=229116aeddb0) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=229116aeddb0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=229116aeddb0) Changeset description: fixed bug #3582 ## Comment 20381 Date: 2014-10-31 14:14:36 +0100 From: @sjoerdmullender Oct2014 has been released.
mserver5: sql_mem.c:48: sql_ref_dec: Assertion `r->refcnt > 0' failed.
https://api.github.com/repos/MonetDB/MonetDB/issues/3582/comments
0
2020-11-30T12:55:45Z
2024-06-27T12:04:53Z
https://github.com/MonetDB/MonetDB/issues/3582
753,455,833
3,582
[ "MonetDB", "MonetDB" ]
Date: 2014-09-20 16:34:34 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-10-31 14:13:56 +0100 ## Comment 20173 Date: 2014-09-20 16:34:34 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.68 Safari/537.36 Build Identifier: I have found several problems while trying to explore this problem. I'll first show the base I found, then the variation. Reproducible: Always ### Steps to Reproduce: CREATE TABLE "sys"."kv6" ( "receive" TIMESTAMP, "message" TIMESTAMP, "vehicle" TIMESTAMP, "messagetype" VARCHAR(10), "operatingday" DATE, "dataownercode" VARCHAR(10), "lineplanningnumber" VARCHAR(10), "journeynumber" INTEGER, "reinforcementnumber" INTEGER, "userstopcode" VARCHAR(10), "passagesequencenumber" INTEGER, "distancesincelastuserstop" INTEGER, "punctuality" INTEGER, "rd_x" INTEGER, "rd_y" INTEGER, "blockcode" INTEGER, "vehiclenumber" INTEGER, "wheelchairaccessible" VARCHAR(5), "source" VARCHAR(10), "numberofcoaches" INTEGER, "trip_hash" BIGINT ); select vehicle, sum(cast(htmbuzz as smallint)) as htmbuzz from (select distinct vehicle, vehiclenumber as htmbuzz from kv6) as x group by vehicle; Notice that the "distinct" in combination with the cast(... as smallint) in this query is the part that is the difference between working or not. Leaving either out creates a working solution. This shows: mserver5: rel_bin.c:2504: rel2bin_groupby: Assertion `0' failed. Program received signal SIGABRT, Aborted. [Switching to Thread 0x7ffff17cc700 (LWP 11033)] 0x00007ffff4aac535 in raise () from /lib64/libc.so.6 (gdb) bt 0 0x00007ffff4aac535 in raise () from /lib64/libc.so.6 1 0x00007ffff4aad9b8 in abort () from /lib64/libc.so.6 2 0x00007ffff4aa55f2 in ?? () from /lib64/libc.so.6 3 0x00007ffff4aa56a2 in __assert_fail () from /lib64/libc.so.6 4 0x00007ffff2dabd77 in rel2bin_groupby (sql=0x7fffe4005450, rel=0x7fffe40b92c0, refs=0x7fffe40bb070) at rel_bin.c:2504 5 0x00007ffff2db5472 in subrel_bin (sql=0x7fffe4005450, rel=0x7fffe40b92c0, refs=0x7fffe40bb070) at rel_bin.c:4485 6 0x00007ffff2dabb2f in rel2bin_groupby (sql=0x7fffe4005450, rel=0x7fffe40b9b70, refs=0x7fffe40bb070) at rel_bin.c:2473 7 0x00007ffff2db5472 in subrel_bin (sql=0x7fffe4005450, rel=0x7fffe40b9b70, refs=0x7fffe40bb070) at rel_bin.c:4485 8 0x00007ffff2daaaf1 in rel2bin_project (sql=0x7fffe4005450, rel=0x7fffe40b9d10, refs=0x7fffe40bb070, topn=0x0) at rel_bin.c:2258 9 0x00007ffff2db5416 in subrel_bin (sql=0x7fffe4005450, rel=0x7fffe40b9d10, refs=0x7fffe40bb070) at rel_bin.c:4477 10 0x00007ffff2db5755 in output_rel_bin (sql=0x7fffe4005450, rel=0x7fffe40b9d10) at rel_bin.c:4545 11 0x00007ffff2d7b188 in sql_relation2stmt (c=0x7fffe4005450, r=0x7fffe40b9d10) at sql.c:148 12 0x00007ffff2d9dd06 in SQLparser (c=0x647330) at sql_scenario.c:2105 13 0x00007ffff78fd7c6 in runPhase (c=0x647330, phase=1) at mal_scenario.c:526 14 0x00007ffff78fd968 in runScenarioBody (c=0x647330) at mal_scenario.c:561 15 0x00007ffff78fdb22 in runScenario (c=0x647330) at mal_scenario.c:590 16 0x00007ffff78ff4c8 in MSserveClient (dummy=0x647330) at mal_session.c:459 17 0x00007ffff739c910 in thread_starter (arg=0x7fffec000a20) at gdk_system.c:506 18 0x00007ffff4e27f3a in start_thread () from /lib64/libpthread.so.0 19 0x00007ffff4b61dad in clone () from /lib64/libc.so.6 (gdb) list 2499 for( en = exps->h; en; en = en->next ) { 2500 sql_exp *e = en->data; 2501 stmt *gbcol = exp_bin(sql, e, sub, NULL, NULL, NULL, NULL, NULL); 2502 2503 if (!gbcol) { 2504 assert(0); 2505 return NULL; 2506 } 2507 groupby = stmt_group(sql->sa, gbcol, grp, ext, cnt); 2508 grp = stmt_result(sql->sa, groupby, 0); Alternatively running: select vehicle, sum(cast(htmbuzz as smallint)) as htmbuzz from (select vehicle, vehiclenumber between 0 and 2999 as htmbuzz from kv6) as x group by vehicle; Results in: TypeException:user.s4_1[20]:'aggr.subsum' undefined in: _38:bat[:any,:lng] := aggr.subsum(_36:bat[:oid,:bit], _18:bat[:oid,:oid], r1_18:bat[:oid,:oid], _39:bit, _39:bit) program contains errors Removing the 'between 0 and 2999' also solves this problem. MonetDB 5 server v11.19.0 (64-bit, 64-bit oids) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 31.4GiB available memory, 8 available cpu cores Libraries: libpcre: 8.33 2013-05-28 (compiled with 8.33) openssl: OpenSSL 1.0.1h 5 Jun 2014 (compiled with OpenSSL 1.0.1h 5 Jun 2014) libxml2: 2.9.1 (compiled with 2.9.1) Compiled by: skinkie@bigdata.openebs.nl (x86_64-unknown-linux-gnu) Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code Linking : /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64 ## Comment 20191 Date: 2014-09-21 22:35:45 +0200 From: @njnes solved problem in the rel_distinct_project2groupby ## Comment 20192 Date: 2014-09-22 01:23:25 +0200 From: @skinkie Both problems described (abort, program contains errors) in this bug still exist in my installation. /opt/monetdb-oct2014/bin/monetdbd stop /mnt/storage2/monetdb-oct2014 hg pull hg update make clean ./de-boostrap ./bootstrap ./configure --prefix=/opt/monetdb-oct2014 --enable-optimise make make install /opt/monetdb-oct2014/bin/monetdbd start /mnt/storage2/monetdb-oct2014 ## Comment 20193 Date: 2014-09-22 01:25:31 +0200 From: @skinkie I see that this might be related to the Jan2014 commit instead of Oct2014 commit. ## Comment 20345 Date: 2014-10-31 14:13:56 +0100 From: @sjoerdmullender Oct2014 has been released.
mserver5: rel_bin.c:2504: rel2bin_groupby: Assertion `0' failed.
https://api.github.com/repos/MonetDB/MonetDB/issues/3581/comments
0
2020-11-30T12:55:42Z
2024-06-27T12:04:52Z
https://github.com/MonetDB/MonetDB/issues/3581
753,455,804
3,581
[ "MonetDB", "MonetDB" ]
Date: 2014-09-20 12:38:20 +0200 From: @skinkie To: Merovingian devs &lt;<bugs-merovingian>&gt; Version: 11.17.21 (Jan2014-SP3) Last updated: 2014-11-28 10:03:19 +0100 ## Comment 20172 Date: 2014-09-20 12:38:20 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.68 Safari/537.36 Build Identifier: diff -r [b7209fd14d0c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b7209fd14d0c) tools/merovingian/daemon/argvcmds.c --- a/tools/merovingian/daemon/argvcmds.c Fri Sep 19 11:44:56 2014 +0200 +++ b/tools/merovingian/daemon/argvcmds.c Sat Sep 20 12:36:32 2014 +0200 @@ -55,7 +55,7 @@ } else if (strcmp(argv[1], "start") == 0) { printf("usage: monetdbd start [-n] <dbfarm>\n"); printf(" Starts the monetdbd deamon for the given dbfarm.\n"); - printf(" When -n is given, monetdbd will not fork into the background."); + printf(" When -n is given, monetdbd will not fork into the background.\n"); } else if (strcmp(argv[1], "stop") == 0) { printf("usage: monetdbd stop <dbfarm>\n"); printf(" Stops a running monetdbd deamon for the given dbfarm.\n"); Reproducible: Always ## Comment 20409 Date: 2014-10-31 16:03:35 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [297a07087c52](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=297a07087c52) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=297a07087c52](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=297a07087c52) Changeset description: Add newline to output per Stefan de Konink's patch. Fixes bug #3580. ## Comment 20470 Date: 2014-11-28 10:03:19 +0100 From: @sjoerdmullender Oct2014-SP1 has been released.
cosmetic change (append newline)
https://api.github.com/repos/MonetDB/MonetDB/issues/3580/comments
0
2020-11-30T12:55:39Z
2024-06-27T12:04:51Z
https://github.com/MonetDB/MonetDB/issues/3580
753,455,767
3,580
[ "MonetDB", "MonetDB" ]
Date: 2014-09-19 18:15:58 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-10-31 14:14:46 +0100 ## Comment 20170 Date: 2014-09-19 18:15:58 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0 Build Identifier: >mserver5: 8347 Segmentation fault ./MonetDB201408/bin/mserver5 -d10 --set mapi_port=49000 after running SQL: select oid > 0, * from altstartwith; Reproducible: Always ### Steps to Reproduce: 1. Start mserver5 (MonetDB 5 server v11.17.21 "Jan2014-SP3") 2. Start mclient 3. Run SQL commands: create table altstartwith (oid oid GENERATED ALWAYS AS IDENTITY, col integer); select * from altstartwith; select oid > 0, * from altstartwith; ### Actual Results: bash-4.2$ start_mserver5 builtin opt gdk_dbpath = /ufs/dinther/MonetDB201408/var/monetdb5/dbfarm/demo builtin opt gdk_debug = 0 builtin opt gdk_vmtrim = no builtin opt monet_prompt = > builtin opt monet_daemon = no builtin opt mapi_port = 50000 builtin opt mapi_open = false builtin opt mapi_autosense = false builtin opt sql_optimizer = default_pipe builtin opt sql_debug = 0 cmdline opt mapi_port = 49000 MonetDB 5 server v11.17.21 "Jan2014-SP3" Serving database 'demo', using 8 threads Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked Found 15.356 GiB available main-memory. Copyright (c) 1993-July 2008 CWI. Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Listening for connection requests on mapi:monetdb://127.0.0.1:49000/ MonetDB/GIS module loaded MonetDB/JAQL module loaded MonetDB/SQL module loaded >mserver5: 8347 Segmentation fault ./MonetDB201408/bin/mserver5 -d10 --set mapi_port=49000 bash-4.2$ Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.17.21 (Jan2014-SP3), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>create table altstartwith (oid oid GENERATED ALWAYS AS IDENTITY, col integer); operation successful (273.312ms) sql>select * from altstartwith; +-----+-----+ | oid | col | +=====+=====+ +-----+-----+ 0 tuples (1.870ms) sql>select oid > 0, * from altstartwith; bash-4.2$ ### Expected Results: No segmentation fault in mserver5 process Problem also occurs with version MonetDB 5 server v11.20.0, default branch version compiled on 19 sept 2014. ## Comment 20171 Date: 2014-09-19 18:51:22 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [d287936fddd5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d287936fddd5) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d287936fddd5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d287936fddd5) Changeset description: Saving changes made to alter_table.sql tests Due to a crashing mserver5 (see bug #3579) the final stable.out and stable.err are not available yet. ## Comment 20178 Date: 2014-09-21 16:54:22 +0200 From: @njnes handle empty void bats in calc compare. ## Comment 20179 Date: 2014-09-21 17:28:29 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [3c7675b36829](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3c7675b36829) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3c7675b36829](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3c7675b36829) Changeset description: fixes for bug #3579 and bug #3575 ## Comment 20391 Date: 2014-10-31 14:14:46 +0100 From: @sjoerdmullender Oct2014 has been released.
segmentation fault in mserver5 process
https://api.github.com/repos/MonetDB/MonetDB/issues/3579/comments
0
2020-11-30T12:55:36Z
2024-06-27T12:04:50Z
https://github.com/MonetDB/MonetDB/issues/3579
753,455,741
3,579
[ "MonetDB", "MonetDB" ]
Date: 2014-09-19 16:11:05 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-09-21 21:26:59 +0200 ## Comment 20169 Date: 2014-09-19 16:11:05 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0 Build Identifier: Misleading error message information syntax error, unexpected IDENT, expecting INDEX in: "create rule" when executing SQL: create rule test; Reproducible: Always ### Steps to Reproduce: 1. start mserver5 (MonetDB 5 server v11.17.21 "Jan2014-SP3") 2. start mclient 3. Execute commands: create rule test; ### Actual Results: Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.17.21 (Jan2014-SP3), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>create; syntax error, unexpected SCOLON, expecting INDEX in: "create;" sql>create rule; syntax error, unexpected IDENT, expecting INDEX in: "create rule" sql>create rule test; syntax error, unexpected IDENT, expecting INDEX in: "create rule" sql> ### Expected Results: sql>create; syntax error, unexpected SCOLON, expecting TABLE or VIEW or other database objecttype in: "create;" sql>create rule; syntax error, invalid IDENT "rule", expecting TABLE or VIEW or other database objecttype in: "create rule" sql>create rule test; syntax error, invalid IDENT "rule", expecting TABLE or VIEW or other database objecttype in: "create rule" ## Comment 20186 Date: 2014-09-21 21:26:59 +0200 From: @njnes rule should be role in this case.
Misleading SQL error message: syntax error, unexpected IDENT, expecting INDEX in: "create rule"
https://api.github.com/repos/MonetDB/MonetDB/issues/3578/comments
0
2020-11-30T12:55:34Z
2024-06-28T13:16:08Z
https://github.com/MonetDB/MonetDB/issues/3578
753,455,710
3,578
[ "MonetDB", "MonetDB" ]
Date: 2014-09-19 16:09:53 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; To: GDK devs &lt;<bugs-common>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-10-31 14:13:49 +0100 ## Comment 20168 Date: 2014-09-19 16:09:53 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; [This bug report is somewhat of a continuation of a conversation Niels and I have been having via private e-mail. See that for some more of the history, but I'll try to repeat everything here] We are currently running a build that is Jan2014 head (b8aff254b139) plus a patch Niels sent me on August 17 (which got committed as part of the unrelated 9698a5f83bf6) plus a cherry-pick of [fe0b3b84c297](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fe0b3b84c297) This survives our torture tests considerably better than any previous build, but after 130 minutes of simulating traffic as fast as possible (starting from a new, clean database) things started going downhill. We first got a SEGV: 0 0x00007f0b361f8f0b in BATins_kdiff (bn=0x7f0b363e0ab0 <oid_nil>, bn@entry=0x7f0af84abe30, l=0x7f0930face18, r=0x7f0af82b3aa8, r@entry=0x7f0b201e0598) at gdk_setop.c:794 1 0x00007f0b3622205c in diff_intersect (set=0, diff=1, r=<optimized out>, l=0x7f0af82b3900) at gdk_setop.c:833 2 BATkdiff (l=l@entry=0x7f0af82b3900, r=0x7f0b201e0598) at gdk_setop.c:883 3 0x00007f0b2f929b54 in SQLtid (cntxt=<optimized out>, mb=<optimized out>, stk=<optimized out>, pci=<optimized out>) at sql.c:2244 4 0x00007f0b36753168 in runMALsequence (cntxt=0x7f0b363e0ab0 <oid_nil>, mb=0x7f09cb729130, startpc=-131384664, stoppc=0, stk=0x7f094b7aee60, env=0x7f0b3660e3d0 <BATatoms+1104>, pcicaller=0x0) at mal_interpreter.c:651 5 0x00007f0b367552c5 in DFLOWworker (T=0x7f0b363e0ab0 <oid_nil>) at mal_dataflow.c:358 6 0x00007f0b350e70a4 in start_thread (arg=0x7f0a7c89f700) at pthread_create.c:309 7 0x00007f0b34e1c04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 then exactly 300 seconds after it came back up we got "42S01!CREATE VIEW: name 'uniondata' already in use" [this error came from an event type (4) described below, which makes it especially incomprehensible given that the immediately preceding statement was DROP VIEW.] followed by "GDK reported error. BATproject: does not match always" followed by the whole mserver5 wedging up and refusing to accept any more connections. The load we're using is generated by two processes. One just does SELECTs of the usual sorts of query that this database is expected to handle (e.g. SELECT ... FROM uniondata WHERE ... GROUP BY ... ORDER BY ...) and the other is inserting new data into those tables by replicating it from an external row store. The replication consists of four types of event, all of them in manual-commit mode: 1) Normally rows are inserted with COPY INTO staging FROM STDIN; UPDATE replication_control SET ... [this is a single-row table];COMMIT 2) Very occasionally a row is UPDATEd in the row store, which we replicate to MonetDB using CREATE TEMP TABLE updates AS SELECT * FROM staging WITH NO DATA;COPY INTO updates FROM STDIN;DELETE FROM updates WHERE EXISTS(SELECT * FROM staging x WHERE x.id=updates.id AND x.ver>=updates.ver);DELETE FROM staging WHERE EXISTS(SELECT * FROM updates x WHERE x.id=staging.id AND x.ver>staging.ver);INSERT INTO staging SELECT * from updates;DROP TABLE updates;COMMIT 3) Every 100,000 rows we flush the "staging" table using INSERT INTO data_yyyymm;DELETE FROM staging;COMMIT 4) If that flush contains data from a month we haven't seen before then we'll populate it instead with CREATE TABLE data_yyyymm AS SELECT * FROM staging WITH DATA;DROP VIEW uniondata;CREATE VIEW uniondata AS SELECT * FROM data_201405 UNION ALL SELECT * FROM data_201406 UNION ALL ...;COMMIT. The crash in the backtrace above was immediately after a row update as described in (2), between the DROP TABLE updates and the COMMIT. It was the fourth occurrence of this in our test load, amid tens of millions of normal inserts. I have no consistent reproduction recipe at the moment and the problem is clearly intermittent. I have the core dump if you want any more information from it. I had a quick look at the BATins_kdiff macro to see if I could figure out which line crashed, but quickly got lost. If you're having no luck figuring it out then I can have another go. I suspect (but don't know) that we're looking at two different problems here: the initial crash is just a simple bug which might be easy to find, and all the subsequent problems are caused by some mis-initialization in log replay which could be harder to spot. ## Comment 20194 Date: 2014-09-22 11:55:55 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Grovelling through the disassembly and the preprocessed source, I think the crash is actually on line 487 of gdk_setop.c: HASHloopa4(ri, r->H->hash, s2, h) { specifically, r->H->hash->width fails because r->H->hash is NULL. Here are some local variables you might be interested in: (gdb) p r->H $1 = (COLrec *) 0x0 (gdb) p *r $2 = {batCacheid = 0, H = 0x0, T = 0x0, P = 0x224f06, U = 0x224f06} (gdb) p *l Cannot access memory at address 0x7f0930face18 (gdb) i loc p1 = 1522116 s2 = 139677453176344 li = {b = 0x7f0af82b3900, hvid = 41994288, tvid = 41994288} hash = 2089412968 (gdb) p *li.b->H $3 = {id = 0x7f0b363d947f "h", width = 0, type = 0 '\000', shift = 0 '\000', varsized = 1, key = 0, dense = 0, nonil = 1, nil = 0, sorted = 1, revsorted = 0, align = 150795355, nokey = {0, 0}, nosorted = 0, norevsorted = 0, nodense = 0, seq = 40472172, heap = {free = 0, size = 0, base = 0x0, filename = 0x0, copied = 0, hashash = 0, forcemap = 0, storage = STORE_MEM, newstorage = STORE_MEM, dirty = 0 '\000', parentid = 0}, vheap = 0x0, hash = 0x0, imprints = 0x0, props = 0x0} (gdb) p *li.b->T $4 = {id = 0x7f0b363e8565 "t", width = 0, type = 0 '\000', shift = 0 '\000', varsized = 1, key = 0, dense = 0, nonil = 1, nil = 0, sorted = 1, revsorted = 0, align = 150795356, nokey = {0, 0}, nosorted = 0, norevsorted = 0, nodense = 0, seq = 40472172, heap = {free = 0, size = 0, base = 0x0, filename = 0x0, copied = 0, hashash = 0, forcemap = 0, storage = STORE_MEM, newstorage = STORE_MEM, dirty = 0 '\000', parentid = 0}, vheap = 0x0, hash = 0x0, imprints = 0x0, props = 0x0} I'm fairly sure I'm reading the disassembly right, which would imply that we're looking at a race where one thread is clearing out r while this thread is reading it. I say this because the current values of the variables imply that we should have crashed trying to get r->H->hash, but we got one step further. Nearly all threads are either idle (in select()/sem_wait()) or in BATins_kdiff(). The only one that isn't is: (gdb) bt 0 0x00007f0b34e10d17 in unlink () at ../sysdeps/unix/syscall-template.S:81 1 0x00007f0b362a13ec in GDKunlink (dir=dir@entry=0x7f0b363e8563 "bat", nme=nme@entry=0x7f0ac80c7480 "21/77/217714", ext=ext@entry=0x7f0b363d9724 "tail") at gdk_storage.c:197 2 0x00007f0b36190db6 in HEAPdelete (h=<optimized out>, o=o@entry=0x7f0ac80c7480 "21/77/217714", ext=ext@entry=0x7f0b363d9724 "tail") at gdk_heap.c:743 3 0x00007f0b362a3453 in BATdelete (b=b@entry=0x7f0adc103c70) at gdk_storage.c:802 4 0x00007f0b3618cd1a in BBPdestroy (b=b@entry=0x7f0adc103c70) at gdk_bbp.c:2446 5 0x00007f0b3618bd9a in decref (i=73676, logical=<optimized out>, releaseShare=<optimized out>, lock=1) at gdk_bbp.c:2180 6 0x00007f0b36752ff6 in runMALsequence (cntxt=0x7f0b2eef0920, mb=0x7f0b219e0b10, startpc=4, stoppc=-1, stk=0x7f0a713d5e20, env=0x7f0b350d8460 <_IO_strn_jumps>, pcicaller=0x0) at mal_interpreter.c:815 7 0x00007f0b36754690 in callMAL (cntxt=0x1c81368, mb=0x7f0b363d9724, mb@entry=0x7f0b219e0b10, env=0x7f0b2eef1dc8, argv=0x7f0b2eef1dc0, debug=0 '\000') at mal_interpreter.c:465 8 0x00007f0b2f93906f in SQLexecutePrepared (be=<optimized out>, q=0x7f0b23b57ca0, c=<optimized out>) at sql_scenario.c:2224 9 SQLengineIntern (c=<optimized out>, be=<optimized out>) at sql_scenario.c:2286 10 0x00007f0b3676f4f7 in runPhase (phase=4, c=0x1c81368) at mal_scenario.c:528 11 runScenarioBody (c=c@entry=0x1c81368) at mal_scenario.c:572 12 0x00007f0b3677005d in runScenario (c=c@entry=0x1c81368) at mal_scenario.c:592 13 0x00007f0b36770128 in MSserveClient (dummy=0x1c81368) at mal_session.c:456 14 0x00007f0b362bddeb in thread_starter (arg=0x7f0b28000a20) at gdk_system.c:505 15 0x00007f0b350e70a4 in start_thread (arg=0x7f0b2eef2700) at pthread_create.c:309 16 0x00007f0b34e1c04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 I can't see any relationship between the data being accessed in those two threads, but I don't have a good enough picture of the code to be at all confident. It's also possible (likely, even) that one or more threads ran on a considerable distance before the kernel could catch it in order to perform the code dump. ## Comment 20198 Date: 2014-09-25 19:16:16 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; NB: some of the conclusions in my previous comment were wrong because gdb was lying to me about the values of local variables. The two stacks which are fighting are: 0 0x00007ffff72c3caf in BATins_kdiff (bn=0x7fffc80096f0, l=0x7fffc80030f0, r=0x7fffe0158458) at gdk_setop.c:794 1 0x00007ffff72c91bb in diff_intersect (l=0x7fffc80030f0, r=0x7fffe0158458, diff=1, set=0) at gdk_setop.c:833 2 0x00007ffff72c9730 in BATkdiff (l=0x7fffc80030f0, r=0x7fffe0158458) at gdk_setop.c:883 3 0x00007fffef5f0d2e in SQLtid (cntxt=0x628470, mb=0x7fff944cbc10, stk=0x7fff941995e0, pci=0x7fff94143d00) at sql.c:2244 4 0x00007ffff78a9486 in runMALsequence (cntxt=0x628470, mb=0x7fff944cbc10, startpc=4, stoppc=5, stk=0x7fff941995e0, env=0x0, pcicaller=0x0) at mal_interpreter.c:651 and HASHremove (gdk_search.c:497) ("b->H->hash = NULL;") HASHdestroy (gdk_search.c:508) ("HASHremove(BATmirror(b));") BATextend (gdk_bat.c:493) BATappend (gdk_batop.c:499) delta_delete_bat (bat_storage.c:612) delete_tab (bat_storage.c:688) mvc_delete_wrap (sql.c:1886) runMALsequence (mal_interpreter.c:651) That second stack trace was reverse-engineered from printf debugging, hence the strange format and lack of detail and line numbers that don't sync with any upstream tree. Tomorrow's task is to figure out which mutex is supposed to stop that happening, and thence why it isn't. ## Comment 20204 Date: 2014-09-26 16:55:09 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; My mutex search is not going well. GDKhashLock appears to protect writes to ->hash (although it doesn't seem to be taken in all cases (e.g. HASHremove()). Still trying to figure out if those cases are safe because of the type of write they're doing). [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ffabd521cfbf](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ffabd521cfbf) fixed exactly the problem in this bug when it was triggered by the MAL optimizers scheduling deletes in parallel with reads within the same query. That was done by preventing the optimizers from doing that transform, so doesn't apply in this case. I can't find anything that protects reads in different queries to deletes. Should GDKhashLock be a reader-writer lock instead? Should there be some MVCC trick that makes it work? I'm stuck. ## Comment 20210 Date: 2014-09-28 15:15:14 +0200 From: @njnes There is no mutex protecting deletes and concurrent reads. The trick used is to keep deletes in a seperate delete list (bat). For each transaction these delete lists should be private. ## Comment 20212 Date: 2014-09-28 16:44:15 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Hi Niels, I'd found the delete bat, and I've been assuming the kdiff in the reader thread's stack is for the purpose of removing the list of already-deleted rows from the full table being returned. What I can't figure out is what happens on the second (or subsequent) delete transaction to the same table. Are you saying that there are multiple delete bats on a single table? I can't see where those are resolved on the reader side given that neither SQLtid() nor bind_del() have a suitable-looking loop in them. Or are you saying that a transaction has a private delete bat until commit time, when it is appended to the single global delete bat? If that's the case then there is still going to be an instant when the hash on the global delete bat (which is what I think is being raced on here) is in an unstable state for concurrent readers. ## Comment 20213 Date: 2014-09-28 16:58:14 +0200 From: @njnes Richard Indeed the bat with deletes holds the already deleted rows (ie from previous transactions). Any new transaction should get a new (copy) of this bat. At commit the deletes are moved to the central transaction, but not by inserting. The full deletion list is replaced. ## Comment 20214 Date: 2014-09-28 17:08:29 +0200 From: @njnes the fresh copy is created in the dup_dbat code. ## Comment 20215 Date: 2014-09-28 18:16:21 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Ah, that makes much more sense than some of the wild theories I was trying to come up with. So, things to look in to tomorrow (my test system is offline today): - Is dup_dbat() not being called (e.g. because !(!t->data || !t->base.allocated) in delete_tab())? - Is the duplicate being published to the world prematurely (e.g. directly referencing dbat rather than using timestamp_dbat())? - Are writes being done to the original (or both) when they should be being done to the copy only? ## Comment 20216 Date: 2014-09-29 14:28:38 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Definitely option 2: the reader thread is accessing data which it's not supposed to be able to see yet. At bind_del() time everything seems right, but by the time of the SEGV the data seems to have been switched out from underneath and it's all gone horribly wrong. How's this for a patch? diff -r [8f10a8b13e77](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8f10a8b13e77) sql/storage/bat/bat_storage.c --- a/sql/storage/bat/bat_storage.c Tue Sep 23 08:02:46 2014 +0200 +++ b/sql/storage/bat/bat_storage.c Mon Sep 29 13:24:17 2014 +0100 @@ -520,7 +520,7 @@ bat->wtime = obat->wtime; if (bat->dbid) { if (is_new) { - obat->dbid = temp_copy(bat->dbid, temp); + bat->dbid = temp_copy(bat->dbid, temp); } else { bat->dbid = ebat_copy(bat->dbid, 0, temp); } It survives my test case (which I still haven't been able to reduce successfully) and vaguely seems like it ought to be right. ## Comment 20217 Date: 2014-09-29 16:43:08 +0200 From: @njnes is_new path should not be taken as your table isn't new. The use of obat here looks indeed wrong. ## Comment 20218 Date: 2014-09-29 17:11:32 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Yeah, I was a bit confused about that. Nevertheless, that is definitely the branch being taken (bat->dbid=0, is_new=1, temp=0). I can put some more printf calls in if you tell me where you want them. ## Comment 20219 Date: 2014-09-29 17:15:56 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; I should clarify: I printed those values at the top of the function, not immediately prior to the first if-statement. bat->dbid is non-zero by the time of the first if, of course. ## Comment 20220 Date: 2014-09-29 19:24:04 +0200 From: @njnes we need to figure out why the is_new is set. Starting one level up (ie any call to dub_dbat, and in these functions we need to know the table name. ## Comment 20221 Date: 2014-09-29 19:45:01 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Breakpoint 1, dup_dbat (tr=0x7fffe0007f90, obat=0x7fffe026b450, bat=0x7fffe02a6410, is_new=1, temp=0) at bat_storage.c:523 523 { (gdb) up 1 0x00007fffef4c2f07 in delete_tab (tr=0x7fffe0007f90, t=0x7fffe0bd6e20, ib=0x7fff88004990, tpe=4) at bat_storage.c:659 659 dup_dbat(tr, obat, bat, isNew(ot), isTempTable(t)); (gdb) p *t $1 = {base = {wtime = 0, rtime = 83, allocated = 0, flag = 0, id = 7080, name = 0x7fffe0bd6f50 "data_201407"}, type = 0, system = 0 '\000', persistence = SQL_PERSIST, commit_action = CA_COMMIT, readonly = 0 '\000', query = 0x0, sz = 1024, pkey = 0x0, columns = {sa = 0x7fffe0008020, destroy = 0x7fffef4a5d68 <column_destroy>, set = 0x7fffe0bd7030, dset = 0x0, nelm = 0x0}, idxs = {sa = 0x7fffe0008020, destroy = 0x7fffef4a5c4a <idx_destroy>, set = 0x0, dset = 0x0, nelm = 0x0}, keys = {sa = 0x7fffe0008020, destroy = 0x7fffef4a5abb <key_destroy>, set = 0x0, dset = 0x0, nelm = 0x0}, triggers = {sa = 0x7fffe0008020, destroy = 0x7fffef4a5ce9 <trigger_destroy>, set = 0x0, dset = 0x0, nelm = 0x0}, tables = {sa = 0x0, destroy = 0x0, set = 0x0, dset = 0x0, nelm = 0x0}, drop_action = 0, cleared = 0, data = 0x7fffe02a6410, s = 0x7fffe0008290, p = 0x0} (gdb) p *ot $2 = {base = {wtime = 83, rtime = 82, allocated = 1, flag = 1, id = 7080, name = 0x1c014a0 "data_201407"}, type = 0, system = 0 '\000', persistence = SQL_PERSIST, commit_action = CA_COMMIT, readonly = 0 '\000', query = 0x0, sz = 1024, pkey = 0x0, columns = {sa = 0x188e760, destroy = 0x7fffef4a5d68 <column_destroy>, set = 0x1c01530, dset = 0x0, nelm = 0x0}, idxs = {sa = 0x188e760, destroy = 0x7fffef4a5c4a <idx_destroy>, set = 0x0, dset = 0x0, nelm = 0x0}, keys = {sa = 0x188e760, destroy = 0x7fffef4a5abb <key_destroy>, set = 0x0, dset = 0x0, nelm = 0x0}, triggers = {sa = 0x188e760, destroy = 0x7fffef4a5ce9 <trigger_destroy>, set = 0x0, dset = 0x0, nelm = 0x0}, tables = {sa = 0x0, destroy = 0x0, set = 0x0, dset = 0x0, nelm = 0x0}, drop_action = 0, cleared = 0, data = 0x7fffe026b450, s = 0x19e3600, p = 0x0} (gdb) p *tr $3 = {name = 0x0, stime = 83, wstime = 84, rtime = 83, wtime = 84, schema_number = 33, schema_updates = 0, status = 0, dropped = 0x0, schemas = {sa = 0x7fffe0008020, destroy = 0x7fffef4a5e76 <schema_destroy>, set = 0x7fffe003fb80, dset = 0x0, nelm = 0x0}, sa = 0x7fffe0008020, parent = 0x18d3fd0, stk = 0} (gdb) p *obat $4 = {dname = 0x7fffe026ad70 "D_sys_data_201407", dbid = 946, cnt = 96452, wtime = 31, next = 0x0} (gdb) p *bat $5 = {dname = 0x0, dbid = 0, cnt = 0, wtime = 0, next = 0x0} "data_201407" is indeed one of the tables on which delete statements execute (see comment 1 for more detail). ## Comment 20222 Date: 2014-09-29 19:54:56 +0200 From: @njnes that data_* table exists longer, ie isNew(ot) should be 0 (but is not). I'll have to see why this is the case. ## Comment 20260 Date: 2014-10-08 09:12:20 +0200 From: @njnes fixed by the collective patches on the storage layer ## Comment 20272 Date: 2014-10-08 19:59:57 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Created attachment 302 patch to store.c Did these patches ever get checked in? I'm tracking two patches related to this bug and neither appears to have gone upstream yet. You e-mailed me this diff on 2014-09-29 18:22 UTC > Attached file: [tr-old-tr-new.patch](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3577_tr-old-tr-new.patch_302) (text/plain, 1925 bytes) > Description: patch to store.c ## Comment 20273 Date: 2014-10-08 20:01:08 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Created attachment 303 patch to bat_storage.c ...and this is the patch from comment 9 > Attached file: [dup_dbat-isnew.patch](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3577_dup_dbat-isnew.patch_303) (text/plain, 494 bytes) > Description: patch to bat_storage.c ## Comment 20274 Date: 2014-10-08 21:57:29 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [a2d9f9e5a5af](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a2d9f9e5a5af) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a2d9f9e5a5af](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a2d9f9e5a5af) Changeset description: once tables get persistent they should no longer be flaged as 'new'. Solves problems with deletes. Thanks too Richard Hughes for finding the problem. See also bug #3577. ## Comment 20275 Date: 2014-10-08 21:59:19 +0200 From: @njnes checked the patch (302), which should be enough for this problem. ## Comment 20339 Date: 2014-10-31 14:13:49 +0100 From: @sjoerdmullender Oct2014 has been released.
SIGSEGV in BATins_kdiff
https://api.github.com/repos/MonetDB/MonetDB/issues/3577/comments
0
2020-11-30T12:55:31Z
2024-06-27T12:04:48Z
https://github.com/MonetDB/MonetDB/issues/3577
753,455,675
3,577
[ "MonetDB", "MonetDB" ]
Date: 2014-09-19 15:50:03 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-10-31 14:14:41 +0100 ## Comment 20167 Date: 2014-09-19 15:50:03 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0 Build Identifier: The dropped default value definition seem to return after another columns default definition in the same table is dropped. See steps to reproduce. Reproducible: Always ### Steps to Reproduce: 1. Start mserver5 (MonetDB 5 server v11.17.21 "Jan2014-SP3") 2. Start mclient 3. Run SQL cammnds: create table def_test (c1 integer default 5, c2 text default 'initial_default'); insert into def_test default values; select * from def_test; alter table def_test alter column c1 drop default; insert into def_test default values; select * from def_test; alter table def_test alter column c2 drop default; insert into def_test default values; select * from def_test; alter table def_test alter column c1 drop default; insert into def_test default values; select * from def_test; alter table def_test alter column c2 drop default; insert into def_test default values; select * from def_test; ### Actual Results: bash-4.2$ mclient Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.17.21 (Jan2014-SP3), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>create table def_test ( more>c1integer default 5, more>c2text default 'initial_default' more>); syntax error, unexpected DEFAULT in: "create table def_test ( c1integer default" sql> sql>create table def_test (c1 integer default 5, c2 text default 'initial_default'); operation successful (85.583ms) sql>insert into def_test default values; 1 affected rows (13.651ms) sql>select * from def_test; +------+-----------------+ | c1 | c2 | +======+=================+ | 5 | initial_default | +------+-----------------+ 1 tuple (1.138ms) sql>alter table def_test alter column c1 drop default; operation successful (8.304ms) sql>insert into def_test default values; 1 affected rows (2.722ms) sql>select * from def_test; +------+-----------------+ | c1 | c2 | +======+=================+ | 5 | initial_default | | null | initial_default | +------+-----------------+ 2 tuples (3.419ms) sql> sql>alter table def_test alter column c2 drop default; operation successful (4.511ms) sql>insert into def_test default values; 1 affected rows (2.518ms) sql>select * from def_test; +------+-----------------+ | c1 | c2 | +======+=================+ | 5 | initial_default | | null | initial_default | | 5 | null | +------+-----------------+ 3 tuples (3.396ms) sql>alter table def_test alter column c1 drop default; operation successful (4.528ms) sql>insert into def_test default values; 1 affected rows (3.879ms) sql>select * from def_test; +------+-----------------+ | c1 | c2 | +======+=================+ | 5 | initial_default | | null | initial_default | | 5 | null | | null | initial_default | +------+-----------------+ 4 tuples (1.086ms) sql>alter table def_test alter column c2 drop default; operation successful (3.957ms) sql>insert into def_test default values; 1 affected rows (2.518ms) sql>select * from def_test; +------+-----------------+ | c1 | c2 | +======+=================+ | 5 | initial_default | | null | initial_default | | 5 | null | | null | initial_default | | 5 | null | +------+-----------------+ 5 tuples (1.141ms) sql> ### Expected Results: The default definition of c1 should not reappear after running alter table def_test alter column c2 drop default; and the default definition of c2 should not reappear after running alter table def_test alter column c1 drop default; Running alter table def_test alter column c1 drop default; and alter table def_test alter column c2 drop default; the second time should result in an error. The last 3 inserted records are also wrong. They should have null values. ## Comment 20184 Date: 2014-09-21 18:48:55 +0200 From: @njnes fixed bug in book keeping of the default string ## Comment 20387 Date: 2014-10-31 14:14:41 +0100 From: @sjoerdmullender Oct2014 has been released.
Dropping default value definitions from a table does not work as expected
https://api.github.com/repos/MonetDB/MonetDB/issues/3576/comments
0
2020-11-30T12:55:28Z
2024-06-27T12:04:47Z
https://github.com/MonetDB/MonetDB/issues/3576
753,455,642
3,576
[ "MonetDB", "MonetDB" ]
Date: 2014-09-19 15:26:06 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-10-31 14:14:35 +0100 ## Comment 20166 Date: 2014-09-19 15:26:06 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0 Build Identifier: Folllowing SQL command crashes th mserver5 with a segmentation fault: CREATE SCHEMA AUTHORIZATION monetdb; Reproducible: Always ### Steps to Reproduce: 1. Start mserver5 (MonetDB 5 server v11.17.21 "Jan2014-SP3") 2. Start mclient 3. execute SQL command: CREATE SCHEMA AUTHORIZATION monetdb; ### Actual Results: bash-4.2$ start_mserver5 builtin opt gdk_dbpath = /ufs/dinther/MonetDB201408/var/monetdb5/dbfarm/demo builtin opt gdk_debug = 0 builtin opt gdk_vmtrim = no builtin opt monet_prompt = > builtin opt monet_daemon = no builtin opt mapi_port = 50000 builtin opt mapi_open = false builtin opt mapi_autosense = false builtin opt sql_optimizer = default_pipe builtin opt sql_debug = 0 cmdline opt mapi_port = 49000 MonetDB 5 server v11.17.21 "Jan2014-SP3" Serving database 'demo', using 8 threads Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked Found 15.356 GiB available main-memory. Copyright (c) 1993-July 2008 CWI. Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Listening for connection requests on mapi:monetdb://127.0.0.1:49000/ MonetDB/GIS module loaded MonetDB/JAQL module loaded MonetDB/SQL module loaded > > 5279 Segmentation fault ./MonetDB201408/bin/mserver5 -d10 --set mapi_port=49000 bash-4.2$ bash-4.2$ mclient -p 49000 Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.17.21 (Jan2014-SP3), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>CREATE SCHEMA AUTHORIZATION monetdb; sql> bash-4.2$ ### Expected Results: No segmentation fault or mserver crash. According to https://www.monetdb.org/Documentation/SQLreference/Schema the CREATE SCHEMA command is defined as: schema: CREATE SCHEMA schema_name_clause [ DEFAULT CHARACTER SET ident ] [ PATH schema_name ','... ] [ schema_element ... ] schema_name_clause: ident | [ ident ] AUTHORIZATION This implies it should be possible to do: CREATE SCHEMA AUTHORIZATION; as in schema_name_clause the [ ident ] is optional. I think that is incorrect. Every schema should have a name and when AUTHORIZATION is specified also an authorisation name should be supplied. See example on https://www.monetdb.org/Documentation/UserGuide/Tutorial: CREATE SCHEMA "voc" AUTHORIZATION "voc"; So syntax should probably be: schema: CREATE SCHEMA schema_name [ AUTHORIZATION ident ] [ DEFAULT CHARACTER SET ident ] [ PATH schema_name ','... ] [ schema_element ... ] ## Comment 20177 Date: 2014-09-21 16:44:25 +0200 From: @njnes we now handle the fallback to user_name in case the schema name isn't specified. ## Comment 20180 Date: 2014-09-21 17:28:30 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [3c7675b36829](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3c7675b36829) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3c7675b36829](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3c7675b36829) Changeset description: fixes for bug #3579 and bug #3575 ## Comment 20380 Date: 2014-10-31 14:14:35 +0100 From: @sjoerdmullender Oct2014 has been released.
segmentation fault in mserver5 process
https://api.github.com/repos/MonetDB/MonetDB/issues/3575/comments
0
2020-11-30T12:55:25Z
2024-06-27T12:04:46Z
https://github.com/MonetDB/MonetDB/issues/3575
753,455,604
3,575
[ "MonetDB", "MonetDB" ]
Date: 2014-09-19 14:45:32 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: -- development Last updated: 2018-03-29 15:39:07 +0200 ## Comment 20165 Date: 2014-09-19 14:45:32 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0 Build Identifier: It is not possible to change an existing view using SQL: CREATE OR REPLACE view ... Adding support for this would be very convenient, especially when views are based on views. It can save a lot of manual work and prevent loss of view definitions. Reproducible: Always ### Steps to Reproduce: sql>CREATE TABLE example (id INTEGER primary key, name VARCHAR(50) NOT NULL, created_on DATE NOT NULL); sql>CREATE VIEW example_vw1 AS select cast(id as varchar(10)) as "ID", name as "Name" from example; sql>select * from example_vw1; sql>CREATE VIEW example_vw2 AS select "ID" || ': ' || "Name" as "ID: Name" from example_vw1; sql>select * from example_vw2; sql>CREATE OR REPLACE VIEW example_vw1 AS select cast(id as varchar(10)) as "ID", name as "Name", created_on from example; sql>DROP VIEW example_vw1; sql>DROP VIEW example_vw1 cascade; sql>CREATE VIEW example_vw1 AS select cast(id as varchar(10)) as "ID", name as "Name", created_on from example; sql>select * from example_vw1; sql>select * from example_vw2; ### Actual Results: bash-4.2$ mclient Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.17.21 (Jan2014-SP3), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>CREATE TABLE example (id INTEGER primary key, name VARCHAR(50) NOT NULL, created_on DATE NOT NULL); operation successful (26.431ms) sql>CREATE VIEW example_vw1 AS select cast(id as varchar(10)) as "ID", name as "Name" from example; operation successful (4.496ms) sql>select * from example_vw1; +----+------+ | ID | Name | +====+======+ +----+------+ 0 tuples (1.328ms) sql>CREATE VIEW example_vw2 AS select "ID" || ': ' || "Name" as "ID: Name" from example_vw1; operation successful (5.689ms) sql>select * from example_vw2; +----------+ | ID: Name | +==========+ +----------+ 0 tuples (1.510ms) sql> sql>CREATE OR REPLACE VIEW example_vw1 AS select cast(id as varchar(10)) as "ID", name as "Name", created_on from example; syntax error, unexpected OR, expecting INDEX in: "create or" sql>DROP VIEW example_vw1; DROP VIEW: cannot drop view 'example_vw1', there are database objects which depend on it sql>DROP VIEW example_vw1 cascade; operation successful (2.758ms) sql>CREATE VIEW example_vw1 AS select cast(id as varchar(10)) as "ID", name as "Name", created_on from example; operation successful (7.306ms) sql>select * from example_vw1; +----+------+------------+ | ID | Name | created_on | +====+======+============+ +----+------+------------+ 0 tuples (2.599ms) sql>select * from example_vw2; SELECT: no such table 'example_vw2' sql> ### Expected Results: Should be able to execute CREATE OR REPLACE VIEW example_vw1 AS select cast(id as varchar(10)) as "ID", name as "Name", created_on from example; It reliefs the user to do DROP VIEW example_vw1; or in case of dependencies: DROP VIEW example_vw1 cascade; and prevents the need to recreate all the dependent views again. ## Comment 26180 Date: 2018-02-08 18:43:04 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; CREATE VIEW functionality (and more) added in changeset [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=2838cc1c63b5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=2838cc1c63b5) ## Comment 26182 Date: 2018-02-08 18:49:43 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; I meant: CREATE OR REPLACE VIEW functionality (and more) added in changeset [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=2838cc1c63b5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=2838cc1c63b5) ## Comment 26302 Date: 2018-03-29 15:39:07 +0200 From: @sjoerdmullender The Mar2018 version has been released.
Add support for: create OR REPLACE view ...
https://api.github.com/repos/MonetDB/MonetDB/issues/3574/comments
0
2020-11-30T12:55:22Z
2024-06-27T12:04:45Z
https://github.com/MonetDB/MonetDB/issues/3574
753,455,579
3,574
[ "MonetDB", "MonetDB" ]
Date: 2014-09-19 11:57:22 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: @njnes Last updated: 2014-10-31 14:14:14 +0100 ## Comment 20164 Date: 2014-09-19 11:57:22 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0 Build Identifier: alter table alter_not_null_test alter test set not null; is accepted when test contains null. In previous version (MonetDB 5 server v11.17.21 "Jan2014-SP3") this was restricted correctly, but in the default version this is now accepted incorrectly. Reproducible: Always ### Steps to Reproduce: 1. Start MonetDB 5 server v11.20.0 (compiled from default on 19 sept) 2. run the below SQL statements. 3. run the below SQL statements: create table alter_not_null_test (test int not null); select * from sys.columns where name = 'test' and table_id in (select id from sys.tables where name = 'alter_not_null_test'); -- null is marked as false insert into alter_not_null_test values (null); -- should report: Error: INSERT INTO: NOT NULL constraint violated for column alter_not_null_test.test SQLState: M0M29 ErrorCode: 0 alter table alter_not_null_test alter test set null; select * from sys.columns where name = 'test' and table_id in (select id from sys.tables where name = 'alter_not_null_test'); -- null is now marked as true insert into alter_not_null_test values (null); insert into alter_not_null_test values (null); select * from alter_not_null_test; -- should list 2 rows, both null alter table alter_not_null_test alter test set not null; -- this should fail as there are rows that have null for column: test select * from sys.columns where name = 'test' and table_id in (select id from sys.tables where name = 'alter_not_null_test'); -- null is now marked as false insert into alter_not_null_test values (null); -- should report: Error: INSERT INTO: NOT NULL constraint violated for column alter_not_null_test.test SQLState: M0M29 ErrorCode: 0 select * from alter_not_null_test; -- should list 2 rows, both null drop table alter_not_null_test; ### Actual Results: bash-4.2$ mclient Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.20.0 (unreleased), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>create table alter_not_null_test (test int not null); operation successful (120.038ms) sql>select * from sys.columns where name = 'test' and table_id in (select id from sys.tables where name = 'alter_not_null_test'); +------+------+------+-------+-------+-------+-------+-------+--------+--------+ | id | name | type | type_ | type_ | table | defau | null | number | storag | : : : : digit : scale : _id : lt : : : e : : : : : s : : : : : : : +======+======+======+=======+=======+=======+=======+=======+========+========+ | 7348 | test | int | 32 | 0 | 7349 | null | false | 0 | null | +------+------+------+-------+-------+-------+-------+-------+--------+--------+ 1 tuple (5.721ms) sql>insert into alter_not_null_test values (null); INSERT INTO: NOT NULL constraint violated for column alter_not_null_test.test sql>alter table alter_not_null_test alter test set null; operation successful (9.936ms) sql>select * from sys.columns where name = 'test' and table_id in (select id from sys.tables where name = 'alter_not_null_test'); +------+------+------+-------+-------+-------+-------+-------+--------+--------+ | id | name | type | type_ | type_ | table | defau | null | number | storag | : : : : digit : scale : _id : lt : : : e : : : : : s : : : : : : : +======+======+======+=======+=======+=======+=======+=======+========+========+ | 7348 | test | int | 32 | 0 | 7349 | null | true | 0 | null | +------+------+------+-------+-------+-------+-------+-------+--------+--------+ 1 tuple (7.098ms) sql>insert into alter_not_null_test values (null); 1 affected rows (2.631ms) sql>insert into alter_not_null_test values (null); 1 affected rows (5.385ms) sql>select * from alter_not_null_test; +------+ | test | +======+ | null | | null | +------+ 2 tuples (2.481ms) sql>alter table alter_not_null_test alter test set not null; operation successful (4.444ms) sql>select * from sys.columns where name = 'test' and table_id in (select id from sys.tables where name = 'alter_not_null_test'); +------+------+------+-------+-------+-------+-------+-------+--------+--------+ | id | name | type | type_ | type_ | table | defau | null | number | storag | : : : : digit : scale : _id : lt : : : e : : : : : s : : : : : : : +======+======+======+=======+=======+=======+=======+=======+========+========+ | 7348 | test | int | 32 | 0 | 7349 | null | false | 0 | null | +------+------+------+-------+-------+-------+-------+-------+--------+--------+ 1 tuple (11.232ms) sql>insert into alter_not_null_test values (null); INSERT INTO: NOT NULL constraint violated for column alter_not_null_test.test sql>select * from alter_not_null_test;+------+ | test | +======+ | null | | null | +------+ 2 tuples (1.954ms) sql>drop table alter_not_null_test; operation successful (33.528ms) sql> ### Expected Results: sql>alter table alter_not_null_test alter test set not null; Error: ALTER TABLE: NOT NULL constraint violated for column alter_not_null_test.test The statement: alter table alter_not_null_test alter test set not null; -- this should fail as there are rows that have null for column: test should fail, like it does in: MonetDB 5 server v11.17.21 "Jan2014-SP3". So something is changed in the default branch which breaks this behavior. The new behavior is incorrect and should be fixed. ## Comment 20185 Date: 2014-09-21 20:12:10 +0200 From: @njnes fixed a bug in the check for null values ## Comment 20360 Date: 2014-10-31 14:14:14 +0100 From: @sjoerdmullender Oct2014 has been released.
alter table alter_not_null_test alter test set NOT NULL; is accepted when test contains null. This used to be restricted but isn't anymore
https://api.github.com/repos/MonetDB/MonetDB/issues/3573/comments
0
2020-11-30T12:55:19Z
2024-06-27T12:04:44Z
https://github.com/MonetDB/MonetDB/issues/3573
753,455,544
3,573
[ "MonetDB", "MonetDB" ]
Date: 2014-09-16 15:27:49 +0200 From: @hannesmuehleisen To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.13 (Jan2014-SP1) CC: @njnes Last updated: 2014-10-31 14:13:51 +0100 ## Comment 20161 Date: 2014-09-16 15:27:49 +0200 From: @hannesmuehleisen User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2150.5 Safari/537.36 Build Identifier: SQL99 allows double quotes in SQL identifiers, encoded as "". for example, the identifier a"b would be escaped as "a""b". However, MonetDB does not support this. Reproducible: Always ### Steps to Reproduce: 1. CREATE TABLE "a""b"; ### Actual Results: Invalid identifier 'a\"b' ### Expected Results: Table being created. ## Comment 20183 Date: 2014-09-21 18:02:08 +0200 From: @njnes properly check for \" in valid_ident ("" conversion is already done in the step before) ## Comment 20341 Date: 2014-10-31 14:13:51 +0100 From: @sjoerdmullender Oct2014 has been released.
Table names with escaped double quotes are rejected
https://api.github.com/repos/MonetDB/MonetDB/issues/3572/comments
0
2020-11-30T12:55:16Z
2024-06-27T12:04:43Z
https://github.com/MonetDB/MonetDB/issues/3572
753,455,514
3,572
[ "MonetDB", "MonetDB" ]
Date: 2014-09-15 11:01:51 +0200 From: @mlkersten To: Documentation maintainers &lt;<bugs-docs>&gt; Version: unspecified CC: martin.van.dinther Last updated: 2019-12-05 16:56:57 +0100 ## Comment 20157 Date: 2014-09-15 11:01:51 +0200 From: @mlkersten User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Firefox/31.0 Build Identifier: Check the SQL scripts and make sure they are properly reflected in the website. For example, 80_statistics.sql. and try 'analyze' in the search box Reproducible: Always ## Comment 27449 Date: 2019-12-05 16:56:57 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; Documentation on statistics is available, see: https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/statistics Documentation of system table sys.statistics structure is available, see: https://www.monetdb.org/Documentation/SQLcatalog/TablesColumns Documentation on the analyze command is available, see: https://www.monetdb.org/Documentation/Manuals/SQLreference/SQLSyntaxOverviewANALYZE Help in mclient for analyze is implemented: sql>\help analyze command : ANALYZE synopsis : Collect column/table/schema data statistics for analysis and optimizer usage syntax : ANALYZE ident [ . ident [ column_list ] ] [SAMPLE size] [MINMAX] ident : An identifier. Use double quote's around the identifier name to include mixed/upper case letters and/or special characters column_list : '(' ident [',' ...] ')' See also https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/statistics
Statistics analyze documentation
https://api.github.com/repos/MonetDB/MonetDB/issues/3571/comments
0
2020-11-30T12:55:13Z
2024-06-27T12:04:42Z
https://github.com/MonetDB/MonetDB/issues/3571
753,455,459
3,571
[ "MonetDB", "MonetDB" ]
Date: 2014-09-14 17:09:02 +0200 From: asayed72 To: Merovingian devs &lt;<bugs-merovingian>&gt; Version: 11.21.19 (Jul2015-SP4) Last updated: 2016-04-11 11:24:41 +0200 ## Comment 20155 Date: 2014-09-14 17:09:02 +0200 From: asayed72 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130109 Firefox/10.0.12 Build Identifier: After creating my-dbfarm and cding into it. --I am doing all as sudo The server dies whenever I do monetdb status or start my-first-db (after creating it). This is on Ubuntu 12.04. Linux ..... 3.8.0-44-generic 66~precise1-Ubuntu SMP Tue Jul 15 04:04:20 UTC 2014 armv7l armv7l armv7l GNU/Linux --to reproduce, just do the first few lines of the tutorial. --I built from sources, openssl from sources. Other libs installed-- ./configure --> clean make --> clean sudo make install --> clean It is a segmentation fault, but cannot pin it down!! /////////////I got this with strace//////////////////// [pid 14320] read(22, "", 4096) = 0 [pid 14320] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_ACCERR, si_addr=0xb63cb000} --- [pid 14320] rt_sigaction(SIGSEGV, {SIG_IGN, [], 0x4000000 /* SA_??? */}, NULL, 8) = 0 [pid 14320] write(5, "\nSEGMENTATION FAULT OCCURRED\n\na "..., 361) = 361 [pid 14320] sync() = 0 [pid 14320] rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0 [pid 14320] tgkill(1, -1, SIGABRT) = -1 EINVAL (Invalid argument) [pid 14320] rt_sigaction(SIGABRT, {SIG_DFL, ~[], 0x4000000 /* SA_??? */}, NULL, 8) = 0 [pid 14320] tgkill(1, -1, SIGABRT) = -1 EINVAL (Invalid argument) [pid 14320] exit_group(127) = ? [pid 14321] +++ exited with 127 +++ [pid 14320] +++ exited with 127 +++ [pid 14319] +++ exited with 127 +++ +++ exited with 127 +++ /////////////////////////////////////////////////////////// thanks and BR A/ Reproducible: Always ### Steps to Reproduce: 1.cd my-dbfarm/ 2.sudo monetdbd start my-dbfarm 3.sudo monetdb status --> server dies or after creating my-first-db 3'.sudo monetdb start my-first-db --> server dies ### Actual Results: --> server dies ### Expected Results: listed the status of the databses or gave an sql prompt used this tar ball monetdb_11.9.7-20120607.tar.gz ## Comment 20156 Date: 2014-09-14 18:29:04 +0200 From: asayed72 One more piece of info, mserver5 and mclient work perfectly well for at least the tutorial posted. I mean; the build I built is not rubbish!! thanks and BR A/
Server dies on status or start my-first-db
https://api.github.com/repos/MonetDB/MonetDB/issues/3570/comments
0
2020-11-30T12:55:11Z
2024-06-28T13:16:07Z
https://github.com/MonetDB/MonetDB/issues/3570
753,455,436
3,570
[ "MonetDB", "MonetDB" ]
Date: 2014-09-12 18:50:27 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: besyhab, qehy Last updated: 2020-05-25 09:17:02 +0200 ## Comment 20154 Date: 2014-09-12 18:50:27 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0 Build Identifier: SQL syntax ALTER TABLE [schema1.]tablename ADD CONSTRAINT [tbl_constr_name] CHECK (logical_expression) is currently not supported. The creation of a CHECK constraint is supported as part of a CREATE TABLE. It should also be possible to add CHECK constraints after a table is created. When the ADD CONSTRAINT .. CHECK () is implemented, please also consider to implement ALTER TABLE .. DROP CONSTRAINT CHECK_constraint_name. Reproducible: Always ### Steps to Reproduce: 1. Start MonetDB v11.17.21 (Jan2014-SP3) 2. Start mclient 3. Execute SQLs: CREATE TABLE testcheck (nr1 int not null PRIMARY KEY, nr2 int not null); ALTER TABLE testcheck ADD CONSTRAINT chk1 CHECK (nr1 > 10); ALTER TABLE testcheck ADD CONSTRAINT chk2 CHECK (nr2 > nr1); DROP TABLE testcheck; CREATE TABLE testcheck (nr1 int not null PRIMARY KEY CHECK (nr1 > 10), nr2 int not null CONSTRAINT chk2 CHECK (nr2 > nr1) ); INSERT INTO testcheck VALUES (1, 2); INSERT INTO testcheck VALUES (1, 2); SELECT * FROM testcheck; DROP TABLE testcheck; ### Actual Results: Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.17.21 (Jan2014-SP3), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>CREATE TABLE testcheck (nr1 int not null PRIMARY KEY, nr2 int not null); operation successful (7.806ms) sql>ALTER TABLE testcheck ADD CONSTRAINT chk1 CHECK (nr1 > 10); syntax error, unexpected CHECK, expecting FOREIGN or PRIMARY or UNIQUE in: "alter table testcheck add constraint chk1 check" sql>ALTER TABLE testcheck ADD CONSTRAINT chk2 CHECK (nr2 > nr1); syntax error, unexpected CHECK, expecting FOREIGN or PRIMARY or UNIQUE in: "alter table testcheck add constraint chk2 check" sql>DROP TABLE testcheck; operation successful (2.359ms) sql>CREATE TABLE testcheck (nr1 int not null PRIMARY KEY CHECK (nr1 > 10), nr2 int not null CONSTRAINT chk2 CHECK (nr2 > nr1) ); operation successful (16.522ms) sql>INSERT INTO testcheck VALUES (1, 2); 1 affected rows (4.138ms) sql>INSERT INTO testcheck VALUES (1, 2); INSERT INTO: PRIMARY KEY constraint 'testcheck.testcheck_nr1_pkey' violated sql>SELECT * FROM testcheck; +------+------+ | nr1 | nr2 | +======+======+ | 1 | 2 | +------+------+ 1 tuple (1.073ms) sql>DROP TABLE testcheck; operation successful (15.496ms) sql> ### Expected Results: The ALTER TABLE commands should be accepted and supported. The INSERT command should not be accepted as it violates the CHECK constraints in the second CREATE TABLE commands (see also bug #3568)
Add support for: ALTER TABLE [schema1.]tablename ADD CONSTRAINT [tbl_constr_name] CHECK (logical_expression)
https://api.github.com/repos/MonetDB/MonetDB/issues/3569/comments
0
2020-11-30T12:55:09Z
2024-06-28T13:40:23Z
https://github.com/MonetDB/MonetDB/issues/3569
753,455,405
3,569
[ "MonetDB", "MonetDB" ]
Date: 2014-09-12 18:24:37 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: akkaran046, @njnes, @PedroTadim Last updated: 2019-11-29 16:56:12 +0100 ## Comment 20153 Date: 2014-09-12 18:24:37 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0 Build Identifier: A table can be created with a CHECK constraints such as: CREATE TABLE TBLCHECK(nr int CHECK (nr > 10)); It is accepted without any error or warning. However when inserting (in this case 0 or negative integer) values the CHECK constraint is not enforced. All integer values are accepted without error or warning. That should not be possible. Reproducible: Always ### Steps to Reproduce: 1. Start MonetDB 5 server v11.17.21 "Jan2014-SP3" 2. Start mclient 3. Execute SQLs: CREATE TABLE TBLCHECK(nr int CHECK (nr > 10)); INSERT INTO TBLCHECK VALUES (11); INSERT INTO TBLCHECK VALUES (10); INSERT INTO TBLCHECK VALUES (09); INSERT INTO TBLCHECK VALUES (01); INSERT INTO TBLCHECK VALUES (00); INSERT INTO TBLCHECK VALUES (-01); INSERT INTO TBLCHECK VALUES (-+02); INSERT INTO TBLCHECK VALUES (+-+03); INSERT INTO TBLCHECK VALUES (-+-04); INSERT INTO TBLCHECK VALUES (+-+-05); SELECT * FROM TBLCHECK; UPDATE TBLCHECK SET nr = nr -10; SELECT * FROM TBLCHECK; ### Actual Results: sql>CREATE TABLE TBLCHECK(nr int CHECK (nr > 10)); operation successful (3.579ms) sql>INSERT INTO TBLCHECK VALUES (11); 1 affected rows (71.511ms) sql>INSERT INTO TBLCHECK VALUES (10); 1 affected rows (1.853ms) sql>INSERT INTO TBLCHECK VALUES (09); 1 affected rows (15.824ms) sql>INSERT INTO TBLCHECK VALUES (01); 1 affected rows (2.319ms) sql>INSERT INTO TBLCHECK VALUES (00); 1 affected rows (1.702ms) sql>INSERT INTO TBLCHECK VALUES (-01); 1 affected rows (2.556ms) sql>INSERT INTO TBLCHECK VALUES (-+02); 1 affected rows (30.416ms) sql>INSERT INTO TBLCHECK VALUES (+-+03); 1 affected rows (51.113ms) sql>INSERT INTO TBLCHECK VALUES (-+-04); 1 affected rows (3.132ms) sql>INSERT INTO TBLCHECK VALUES (+-+-05); 1 affected rows (2.108ms) sql>SELECT * FROM TBLCHECK; +------+ | nr | +======+ | 11 | | 10 | | 9 | | 1 | | 0 | | -1 | | -2 | | -3 | | 4 | | 5 | +------+ 10 tuples (1.047ms) sql> sql>UPDATE TBLCHECK SET nr = nr -10; 10 affected row (29.627ms) sql>SELECT * FROM TBLCHECK; +------+ | nr | +======+ | 1 | | 0 | | -1 | | -9 | | -10 | | -11 | | -12 | | -13 | | -6 | | -5 | +------+ 10 tuples (1.744ms) ### Expected Results: Return an error when CHECK constraint is violated and no record should be inserted into the table. ## Comment 20158 Date: 2014-09-15 12:28:38 +0200 From: @njnes this is on the feature extension list. ## Comment 22076 Date: 2016-04-21 12:31:48 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; *** Bug #3969 has been marked as a duplicate of this bug. *** ## Comment 27432 Date: 2019-11-29 16:56:12 +0100 From: @PedroTadim I disabled the compilation of CHECK constraints, so this no longer occurs.
CHECK constraint is not enforced during insert or update
https://api.github.com/repos/MonetDB/MonetDB/issues/3568/comments
0
2020-11-30T12:55:06Z
2024-06-27T12:04:39Z
https://github.com/MonetDB/MonetDB/issues/3568
753,455,381
3,568
[ "MonetDB", "MonetDB" ]
Date: 2014-09-12 14:20:56 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: ajdamico, akkaran046, @hannesmuehleisen, jonathan, @PedroTadim, publiwebmaxter, webhostinguk Last updated: 2019-04-30 12:36:00 +0200 ## Comment 20149 Date: 2014-09-12 14:20:56 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0 Build Identifier: SQL syntax ALTER TABLE oldtablename RENAME TO newtablename is currently not supported. It is very useful in practise as the workaround (CREATE TABLE newtablename AS SELECT * FROM oldtablename WITH DATA; add all the constraints, add all the indexes; add all the privileges; etc. DROP TABLE oldtablename CASCADE; etc.) is a lot of (manual) work, a lot of statements, error prone and not efficient/fast. Reproducible: Always ### Steps to Reproduce: CREATE TABLE tmp (col1 int); ALTER TABLE tmp RENAME TO tmp_new; DROP TABLE tmp_new CASCADE; DROP TABLE tmp CASCADE; ### Actual Results: Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.20.0 (unreleased), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>CREATE TABLE tmp (col1 int); operation successful (13.574ms) sql>ALTER TABLE tmp RENAME TO tmp_new; syntax error, unexpected RENAME, expecting DROP or SET or ALTER or ADD in: "alter table tmp rename" sql>DROP TABLE tmp_new CASCADE; DROP TABLE: no such table 'tmp_new' sql>DROP TABLE tmp CASCADE; operation successful (3.722ms) sql> ### Expected Results: sql>CREATE TABLE tmp (col1 int); operation successful (13.574ms) sql>ALTER TABLE tmp RENAME TO tmp_new; operation successful (3.574ms) sql>DROP TABLE tmp_new CASCADE; operation successful (3.722ms) sql>DROP TABLE tmp CASCADE; DROP TABLE: no such table 'tmp' sql> Alternative SQL syntax is: RENAME TABLE oldtablename newtablename ## Comment 21651 Date: 2015-12-09 14:01:49 +0100 From: @hannesmuehleisen +1, SQLite uses ALTER TABLE oldname RENAME TO newname; ## Comment 21652 Date: 2015-12-09 14:05:01 +0100 From: Anthony Damico &lt;<ajdamico>&gt; hi, this functionality would be really useful for MonetDBLite seamlessly working with RSQLite code. i'd appreciate it if this might be added at some point in the future.. thanks!! ## Comment 25259 Date: 2017-04-21 17:54:29 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; *** Bug #3888 has been marked as a duplicate of this bug. *** ## Comment 26497 Date: 2018-06-20 19:09:23 +0200 From: jonathan +1 ## Comment 26669 Date: 2018-11-07 10:57:52 +0100 From: @PedroTadim A new SQL statement will be available in the next feature release of MonetDB for renaming tables: ALTER TABLE [IF EXISTS] [schema.]oldname RENAME TO newname; However it's still not possible to alter the table's schema. We came with a possible solution for this issue and we will come back to it later. ## Comment 26962 Date: 2019-04-18 18:06:12 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; Pedro added possibility to also change the schema of a table but with the syntax: ALTER TABLE [ IF EXISTS ] qname SET SCHEMA ident; For example: CREATE TABLE sys.test1 (col1 int); SELECT * FROM sys.test1; ALTER TABLE IF EXISTS sys.test1 SET SCHEMA profiler; SELECT * FROM profiler.test1; ALTER TABLE IF EXISTS profiler.test1 SET SCHEMA json; SELECT * FROM json.test1; ALTER TABLE IF EXISTS json.test1 SET SCHEMA sys; SELECT * FROM sys.test1; DROP TABLE sys.test1;
Add support for: ALTER TABLE [schema1.]oldtablename RENAME [TO] [schema2.]newtablename
https://api.github.com/repos/MonetDB/MonetDB/issues/3567/comments
0
2020-11-30T12:55:04Z
2024-06-27T12:04:38Z
https://github.com/MonetDB/MonetDB/issues/3567
753,455,351
3,567
[ "MonetDB", "MonetDB" ]
Date: 2014-09-08 23:44:54 +0200 From: @yzchang To: MonetDB5 devs &lt;<bugs-monetdb5>&gt; Version: 11.17.17 (Jan2014-SP2) CC: @yzchang Last updated: 2014-09-09 22:24:21 +0200 ## Comment 20144 Date: 2014-09-08 23:44:54 +0200 From: @yzchang In a tomograph figure, the bars representing the number of READs are not visible. Instead of being stacked above the bars representing the number of WRITEs, they are probably hidden behind the WRITEs bars. ## Comment 20145 Date: 2014-09-09 22:24:21 +0200 From: @yzchang READS seemed invisible because there was no READ activities. Tests with cold and larger data set reveals that READS do get displayed correctly
Tomograph: "reads" bars not visible
https://api.github.com/repos/MonetDB/MonetDB/issues/3566/comments
0
2020-11-30T12:55:01Z
2024-06-28T13:16:07Z
https://github.com/MonetDB/MonetDB/issues/3566
753,455,316
3,566
[ "MonetDB", "MonetDB" ]
Date: 2014-09-05 18:55:21 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-10-31 14:14:04 +0100 ## Comment 20142 Date: 2014-09-05 18:55:21 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Build Identifier: ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references PKTABLE(ptest1); returns error msg: ALTER TABLE: no such table 'fktable' while the table with that name exists. A better error msg would be: ALTER TABLE ADD FOREIGN KEY: not allowed for TEMP tables if FKs are not supported on TEMP tables, else it should accept it and no error msg given. Reproducible: Always ### Steps to Reproduce: 1. Start MonetDB 5 server v11.17.21 "Jan2014-SP3" 2. Start mclient 3. run SQL: CREATE TABLE PKTABLE (ptest1 int PRIMARY KEY); CREATE TEMP TABLE FKTABLE (ftest1 int); ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references PKTABLE(ptest1); ### Actual Results: Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.17.21 (Jan2014-SP3), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>CREATE TABLE PKTABLE (ptest1 int PRIMARY KEY); operation successful (27.444ms) sql>CREATE TEMP TABLE FKTABLE (ftest1 int); operation successful (3.029ms) sql>ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references PKTABLE(ptest1); ALTER TABLE: no such table 'fktable' sql>SELECT * FROM FKTABLE; +--------+ | ftest1 | +========+ +--------+ 0 tuples (0.936ms) sql> sql>DROP TABLE FKTABLE; operation successful (1.883ms) sql>CREATE TABLE FKTABLE (ftest1 int); operation successful (2.852ms) sql>ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references PKTABLE(ptest1); operation successful (8.129ms) sql> ### Expected Results: if FKs are NOT supported on TEMP tables a better error msg should be given. When both tables are TEMP tables, should Fks be allowed? CREATE TEMP TABLE PKTABLE (ptest1 int PRIMARY KEY); CREATE TEMP TABLE FKTABLE (ftest1 int); ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references PKTABLE(ptest1); Currently it reports the same error: ALTER TABLE: no such table 'fktable' ## Comment 20187 Date: 2014-09-21 21:29:30 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [b8bc6d228e06](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b8bc6d228e06) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b8bc6d228e06](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b8bc6d228e06) Changeset description: fix for bug #3565 ## Comment 20188 Date: 2014-09-21 21:30:20 +0200 From: @njnes fixed alters on temp tables are not supported ## Comment 20353 Date: 2014-10-31 14:14:04 +0100 From: @sjoerdmullender Oct2014 has been released.
Wrong/confusing error message when trying to add a FK to a TEMP TABLE
https://api.github.com/repos/MonetDB/MonetDB/issues/3565/comments
0
2020-11-30T12:54:59Z
2024-06-27T12:04:36Z
https://github.com/MonetDB/MonetDB/issues/3565
753,455,293
3,565
[ "MonetDB", "MonetDB" ]
Date: 2014-09-05 15:50:24 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @hannesmuehleisen Last updated: 2015-08-28 13:42:13 +0200 ## Comment 20139 Date: 2014-09-05 15:50:24 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Build Identifier: Although it is technically possible to rewrite some usages of split_part() using substring() and locate() functions it is not easy and will be less efficient than a native implementation. Reproducible: Always ### Steps to Reproduce: select split_part('joeuser@mydatabase','@',0) AS "an error"; select split_part('joeuser@mydatabase','@',1) AS "joeuser"; select split_part('joeuser@mydatabase','@',2) AS "mydatabase"; select split_part('joeuser@mydatabase','@',3) AS "empty string"; select split_part('@joeuser@mydatabase@','@',2) AS "joeuser"; ### Actual Results: Error: SELECT: no such operator 'split_part' SQLState: 22000 An alternative would be to create a user defined function similar to http://www.sqlines.com/postgresql-to-oracle/split_part but that would still not be as fast as a native c implementation. ## Comment 20140 Date: 2014-09-05 15:53:15 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; select split_part('joeuser@mydatabase','@',1) AS "joeuser"; -- MonetDB does not support split_part() but in some cases it can be replaced by using substring() and locate(), such as: select substring('joeuser@mydatabase', 0, locate('@','joeuser@mydatabase', 0) -1) AS "joeuser"; select split_part('joeuser@mydatabase','@',2) AS "mydatabase"; -- MonetDB does not support split_part() but in some cases it can be replaced by using substring() and locate(), such as: select substring('joeuser@mydatabase', locate('@','joeuser@mydatabase', 0) +1) AS "mydatabase"; select split_part('joeuser@mydatabase','@',3) AS "empty string"; -- MonetDB does not support split_part() but in some cases it can be replaced by using substring() and locate(), such as: select substring('joeuser@mydatabase', locate('@','joeuser@mydatabase', 1) +1, locate('@','joeuser@mydatabase', 2) -1) AS "empty string"; select split_part('@joeuser@mydatabase@','@',2) AS "joeuser"; -- MonetDB does not support split_part() but in some cases it can be replaced by using substring() and locate(), such as: select substring('@joeuser@mydatabase@', locate('@','@joeuser@mydatabase@', 0) +1, locate('@','@joeuser@mydatabase@', 1) -1) AS "joeuser"; ## Comment 20141 Date: 2014-09-05 15:58:13 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [6a59cf45bf42](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6a59cf45bf42) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6a59cf45bf42](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6a59cf45bf42) Changeset description: Added MonetDB equivalent queries for replacing usage of split_part() See also bug #3564 ## Comment 20196 Date: 2014-09-24 02:46:32 +0200 From: @skinkie Created attachment 297 Implementation for split_part for MonetDB5/SQL While searching for the same problem this evening, and almost posting to the MonetDB5 user mailinglist, I noticed that in December 17 2013 someone attempted to implement a varchar split. I was fooling around with: select substring('HTM:1:1000', 0, POSITION(':' IN 'HTM:1:100') - 1), left(substring('HTM:1:1000', POSITION(':' IN 'HTM:1:100') + 1), POSITION(':' IN substring('HTM:1:1000', POSITION(':' IN 'HTM:1:100') + 1))-1), substring(substring('HTM:1:1000', POSITION(':' IN 'HTM:1:100') + 1), POSITION(':' IN substring('HTM:1:1000', POSITION(':' IN 'HTM:1:100') + 1))+1); Better stop this unreadible madness and implement the most common used function for this problem: split_part. > Attached file: [splitpart-monetdb.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3564_splitpart-monetdb.sql_297) (text/plain, 5024 bytes) > Description: Implementation for split_part for MonetDB5/SQL ## Comment 20197 Date: 2014-09-24 02:48:49 +0200 From: @skinkie The output of Martin's queries: sql>select split_part('joeuser@mydatabase','@',1) AS "joeuser"; +--------------------+ | joeuser | +====================+ | joeuser | +--------------------+ 1 tuple (0.549ms) sql>select split_part('joeuser@mydatabase','@',2) AS "mydatabase"; +--------------------+ | mydatabase | +====================+ | mydatabase | +--------------------+ 1 tuple (0.519ms) sql>select split_part('joeuser@mydatabase','@',3) AS "empty string"; +--------------------+ | empty string | +====================+ | null | +--------------------+ 1 tuple (0.590ms) sql> sql>select split_part('@joeuser@mydatabase@','@',2) AS "joeuser"; +--------------------+ | joeuser | +====================+ | joeuser | +--------------------+ 1 tuple (0.241ms) ## Comment 20316 Date: 2014-10-25 18:24:48 +0200 From: @skinkie Created attachment 304 Implementation for split_part for MonetDB5/SQL v2 Now including "PostgreSQL empty string compatibility" and syncs up with Oct2014. select split_part('joeuser@mydatabase','@',0) AS "an error"; field position must be greater than zero select split_part('joeuser@mydatabase','@',1) AS "joeuser"; +--------------------+ | joeuser | +====================+ | joeuser | +--------------------+ 1 tuple (1.618ms) select split_part('joeuser@mydatabase','@',2) AS "mydatabase"; +--------------------+ | mydatabase | +====================+ | mydatabase | +--------------------+ 1 tuple (1.171ms) sql>select split_part('joeuser@mydatabase','@',3) AS "empty string"; +--------------------+ | empty string | +====================+ | | +--------------------+ 1 tuple (1.327ms) > Attached file: [patch](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3564_patch_304) (text/plain, 5443 bytes) > Description: Implementation for split_part for MonetDB5/SQL v2 ## Comment 20894 Date: 2015-05-27 11:07:50 +0200 From: @skinkie Created attachment 334 Implementation for split_part for MonetDB5/SQL v2 Update to apply cleanly. > Attached file: [split_part.diff](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3564_split_part.diff_334) (text/plain, 5517 bytes) > Description: Implementation for split_part for MonetDB5/SQL v2 ## Comment 20906 Date: 2015-06-05 15:00:09 +0200 From: @skinkie Created attachment 336 Patch for the MonetDB default branch > Attached file: [latest-default.diff](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3564_latest-default.diff_336) (application/octet-stream, 5520 bytes) > Description: Patch for the MonetDB default branch ## Comment 20910 Date: 2015-06-08 15:19:41 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [92e8a2746ce6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=92e8a2746ce6) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=92e8a2746ce6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=92e8a2746ce6) Changeset description: string_split('a|b','|',1), Bug #3564, Patch from Stefan de Konink, Test case added ## Comment 20920 Date: 2015-06-11 16:22:33 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [a25f3dc6cc69](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a25f3dc6cc69) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a25f3dc6cc69](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a25f3dc6cc69) Changeset description: scalar function split_part() has been implemented, see request bug #3564. Removed no longer needed MonetDB alternatives from strings.sql Approve changed test outputs for strings.sql ## Comment 21207 Date: 2015-08-28 13:42:13 +0200 From: @sjoerdmullender Jul2015 has been released.
Request: add support for postgresql specific scalar function: split_part(string text, delimiter text, field int)
https://api.github.com/repos/MonetDB/MonetDB/issues/3564/comments
0
2020-11-30T12:54:56Z
2024-06-27T12:04:35Z
https://github.com/MonetDB/MonetDB/issues/3564
753,455,273
3,564
[ "MonetDB", "MonetDB" ]
Date: 2014-09-05 15:19:04 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) Last updated: 2014-10-31 14:14:43 +0100 ## Comment 20138 Date: 2014-09-05 15:19:04 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Build Identifier: the third parameter of the locate(n_str, search_str, occurrence) function is not working correctly Reproducible: Always ### Steps to Reproduce: 1. start MonetDB 5 server v11.17.21 "Jan2014-SP3" 2. start mclient 3. enter SQL queries: select locate('@','joeuser@mydatabase@test', 1) as string_position; select locate('@','joeuser@mydatabase@test', 2) as string_position; select locate('@','joeuser@mydatabase@test', 3) as string_position; select locate('@','joeuser@mydatabase@test', 4) as string_position; select locate('@','joeuser@mydatabase@test', 8) as string_position; select locate('@','joeuser@mydatabase@test', 9) as string_position; select locate('@','joeuser@mydatabase@test', -1) as string_position; select locate('@','joeuser@mydatabase@test', -2) as string_position; select locate('@','joeuser@mydatabase@test', -3) as string_position; select locate('@','joeuser@mydatabase@test', -4) as string_position; ### Actual Results: Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.17.21 (Jan2014-SP3), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>select locate('@','joeuser@mydatabase@test', 1) as string_position; +-----------------+ | string_position | +=================+ | 1 | +-----------------+ 1 tuple (0.814ms) sql>select locate('@','joeuser@mydatabase@test', 2) as string_position; +-----------------+ | string_position | +=================+ | 1 | +-----------------+ 1 tuple (0.438ms) sql>select locate('@','joeuser@mydatabase@test', 3) as string_position; +-----------------+ | string_position | +=================+ | 1 | +-----------------+ 1 tuple (0.394ms) sql>select locate('@','joeuser@mydatabase@test', 4) as string_position; +-----------------+ | string_position | +=================+ | 1 | +-----------------+ 1 tuple (0.400ms) sql>select locate('@','joeuser@mydatabase@test', 8) as string_position; +-----------------+ | string_position | +=================+ | 1 | +-----------------+ 1 tuple (0.389ms) sql>select locate('@','joeuser@mydatabase@test', 9) as string_position; +-----------------+ | string_position | +=================+ | 1 | +-----------------+ 1 tuple (0.335ms) sql>select locate('@','joeuser@mydatabase@test', -1) as string_position; +-----------------+ | string_position | +=================+ | 8 | +-----------------+ 1 tuple (0.677ms) sql>select locate('@','joeuser@mydatabase@test', -2) as string_position; +-----------------+ | string_position | +=================+ | 8 | +-----------------+ 1 tuple (0.227ms) sql>select locate('@','joeuser@mydatabase@test', -3) as string_position; +-----------------+ | string_position | +=================+ | 8 | +-----------------+ 1 tuple (0.409ms) sql>select locate('@','joeuser@mydatabase@test', -4) as string_position; +-----------------+ | string_position | +=================+ | 8 | +-----------------+ 1 tuple (0.410ms) sql> ### Expected Results: sql>select locate('@','joeuser@mydatabase@test', 1) as string_position; +-----------------+ | string_position | +=================+ | 8| +-----------------+ 1 tuple (0.814ms) sql>select locate('@','joeuser@mydatabase@test', 2) as string_position; +-----------------+ | string_position | +=================+ | 19 | +-----------------+ 1 tuple (0.438ms) sql>select locate('@','joeuser@mydatabase@test', 3) as string_position; +-----------------+ | string_position | +=================+ | null | +-----------------+ 1 tuple (0.394ms) sql>select locate('@','joeuser@mydatabase@test', 4) as string_position; +-----------------+ | string_position | +=================+ | null | +-----------------+ 1 tuple (0.400ms) sql>select locate('@','joeuser@mydatabase@test', -1) as string_position; +-----------------+ | string_position | +=================+ | 19 | +-----------------+ 1 tuple (0.677ms) sql>select locate('@','joeuser@mydatabase@test', -2) as string_position; +-----------------+ | string_position | +=================+ | 8 | +-----------------+ 1 tuple (0.227ms) sql>select locate('@','joeuser@mydatabase@test', -3) as string_position; +-----------------+ | string_position | +=================+ | null | +-----------------+ 1 tuple (0.409ms) sql>select locate('@','joeuser@mydatabase@test', -4) as string_position; +-----------------+ | string_position | +=================+ | null | +-----------------+ 1 tuple (0.410ms) sql> locate (a, b) seems to be equivalent to locate (a, b, 0) sql>select locate('@','joeuser@mydatabase@test', 0) as string_position; +-----------------+ | string_position | +=================+ | 8 | +-----------------+ 1 tuple (0.396ms) sql>select locate('@','joeuser@mydatabase@test') as string_position; +-----------------+ | string_position | +=================+ | 8 | +-----------------+ 1 tuple (0.722ms) ## Comment 20146 Date: 2014-09-11 16:55:43 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [65a27b2b9306](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=65a27b2b9306) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=65a27b2b9306](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=65a27b2b9306) Changeset description: Fix for bug #3563: don't confuse needle and haystack. ## Comment 20147 Date: 2014-09-11 16:56:07 +0200 From: @sjoerdmullender I agree that something is wrong with the locate implementation when a third argument is provided. I do not agree with your expected output. First of all, there is no clear definition of the locate function that I could find, but all seem to agree that the third argument is an 1-based offset into the "haystack" string (searching for a needle in the haystack). It is never (that I saw) the count of the match you're looking for (what you seem to imply). What the different implementations do not agree about is what happens with a negative offset. I have chosen to follow Microsoft (since the locate function seems to come from ODBC). A negative or zero offset means to start searching from the start of the string. To get the second location of the substring, you would have to do something like: select locate('@','joeuser@mydatabase@test',locate('@','joeuser@mydatabase@test')+1); ## Comment 20152 Date: 2014-09-12 17:26:13 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; Thanks for the fix. You are right that the third parameter should be the start to search from, not the occurrence. An extension for this function could be to use a negative start_from_position value to search backwards in the sourcestring starting at the position length(sourcestring) - start_from_position. It makes the function more functional is is more efficient than reversing the str to search in. This behavior is for instance supported in Oracle's INSTR() and DB2's LOCATE_IN_STRING() for their third start parameter. See: http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions068.htm and http://www-01.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.luw.sql.ref.doc/doc/r0054098.html?cp=SSEPGG_9.7.0%2F2-10-3-2-80 Both these functions also support the occurrence as a optional fourth parameter. ## Comment 20388 Date: 2014-10-31 14:14:43 +0100 From: @sjoerdmullender Oct2014 has been released.
incorrect results for scalar function locate(in_str, search_str, occurrence)
https://api.github.com/repos/MonetDB/MonetDB/issues/3563/comments
0
2020-11-30T12:54:54Z
2024-06-27T12:04:34Z
https://github.com/MonetDB/MonetDB/issues/3563
753,455,239
3,563
[ "MonetDB", "MonetDB" ]
Date: 2014-09-05 13:12:15 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) Last updated: 2014-10-31 14:13:54 +0100 ## Comment 20137 Date: 2014-09-05 13:12:15 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Build Identifier: Assertion failure in gdk_bat.c Reproducible: Always ### Steps to Reproduce: 1.compile MonetDB sources with --enable-assert 2. start mserver5 3. start mclient and enter following SQL: sql>CREATE TABLE FLOAT8_TBL(f1 double); operation successful (77.854ms) sql>INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200'); 1 affected rows (2.131ms) sql>INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200'); 1 affected rows (2.014ms) sql>SELECT * FROM FLOAT8_TBL f; +--------------------------+ | f1 | +==========================+ | 1.2345678901234e+200 | | 1.2345678901234e-200 | +--------------------------+ 2 tuples (0.992ms) sql>SELECT f.f1, round(f.f1, 0) AS round_f1 FROM FLOAT8_TBL f; +--------------------------+--------------------------+ | f1 | round_f1 | +==========================+==========================+ | 1.2345678901234e+200 | 1.2345678901234e+200 | | 1.2345678901234e-200 | 0 | +--------------------------+--------------------------+ 2 tuples (1.222ms) sql>INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200'); 1 affected rows (2.354ms) sql>SELECT f.f1, round(f.f1, 0) AS round_f1 FROM FLOAT8_TBL f; now the server stopped due to assertion failure ### Actual Results: builtin opt gdk_dbpath = /ufs/dinther/MonetDB201408/var/monetdb5/dbfarm/demo builtin opt gdk_debug = 0 builtin opt gdk_vmtrim = no builtin opt monet_prompt = > builtin opt monet_daemon = no builtin opt mapi_port = 50000 builtin opt mapi_open = false builtin opt mapi_autosense = false builtin opt sql_optimizer = default_pipe builtin opt sql_debug = 0 MonetDB 5 server v11.17.21 "Jan2014-SP3" Serving database 'demo', using 8 threads Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked Found 15.356 GiB available main-memory. Copyright (c) 1993-July 2008 CWI. Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Listening for connection requests on mapi:monetdb://127.0.0.1:50000/ MonetDB/GIS module loaded MonetDB/JAQL module loaded MonetDB/SQL module loaded >Bulk operator required for str.stringleft Bulk operator required for str.stringleft mserver5: gdk_bat.c:2855: BATassertHeadProps: Assertion `!b->H->revsorted || cmp >= 0' failed. ./start_mserver5.sh: line 4: 27262 Aborted ./MonetDB201408/bin/mserver5 -d10 bash-4.2$ Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.17.21 (Jan2014-SP3), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>CREATE TABLE FLOAT8_TBL(f1 double); operation successful (77.854ms) sql>INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200'); 1 affected rows (2.131ms) sql>INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200'); 1 affected rows (2.014ms) sql>SELECT * FROM FLOAT8_TBL f; +--------------------------+ | f1 | +==========================+ | 1.2345678901234e+200 | | 1.2345678901234e-200 | +--------------------------+ 2 tuples (0.992ms) sql>SELECT f.f1, round(f.f1, 0) AS round_f1 FROM FLOAT8_TBL f; +--------------------------+--------------------------+ | f1 | round_f1 | +==========================+==========================+ | 1.2345678901234e+200 | 1.2345678901234e+200 | | 1.2345678901234e-200 | 0 | +--------------------------+--------------------------+ 2 tuples (1.222ms) sql>INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200'); 1 affected rows (2.354ms) sql>SELECT f.f1, round(f.f1, 0) AS round_f1 FROM FLOAT8_TBL f; sql> bash-4.2$ ### Expected Results: no assertion failure Also happens with mserver5 compiled from default branch sources. Gives: mserver5: /ufs/dinther/dev/dev/gdk/gdk_bat.c:2912: BATassertHeadProps: Assertion `!b->H->revsorted || cmp >= 0' failed. See also bug #3542 ## Comment 20143 Date: 2014-09-08 17:10:29 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [546a6cc20772](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=546a6cc20772) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=546a6cc20772](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=546a6cc20772) Changeset description: Fix bug #3562 + added test. You also need to set the revsorted property! ## Comment 20344 Date: 2014-10-31 14:13:54 +0100 From: @sjoerdmullender Oct2014 has been released.
mserver5: gdk_bat.c:2855: BATassertHeadProps: Assertion `!b->H->revsorted || cmp >= 0' failed.
https://api.github.com/repos/MonetDB/MonetDB/issues/3562/comments
0
2020-11-30T12:54:48Z
2024-06-27T12:04:33Z
https://github.com/MonetDB/MonetDB/issues/3562
753,455,183
3,562
[ "MonetDB", "MonetDB" ]
Date: 2014-09-04 16:32:54 +0200 From: Radovan Bičiště &lt;<radovan.biciste>&gt; To: clients devs &lt;<bugs-clients>&gt; Version: 11.21.19 (Jul2015-SP4) CC: martin.van.dinther Last updated: 2017-04-06 16:10:39 +0200 ## Comment 20131 Date: 2014-09-04 16:32:54 +0200 From: Radovan Bičiště &lt;<radovan.biciste>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Build Identifier: Driver rounds decimal numbers even when it is not necessary. Column data type does not require it. Reproducible: Always ### Steps to Reproduce: 1. create table with column with data type decimal(14,4). 2. create java test that does insert as a prepared statement. 3. bind number 112.125 and execute. ### Actual Results: It inserts number 110. ### Expected Results: It inserts 112.125 . ## Comment 20132 Date: 2014-09-04 16:36:35 +0200 From: Radovan Bičiště &lt;<radovan.biciste>&gt; I traced the problem down to the method MonetPreparedStatement.setBigDecimal . It mixes up number digits in data type definition and java BigDecimal definition. Result is the wrong round operation. ## Comment 20134 Date: 2014-09-04 17:47:28 +0200 From: @sjoerdmullender Since you've already traced down where the error occurs, can you suggest a fix? ## Comment 20135 Date: 2014-09-05 08:03:14 +0200 From: Radovan Bičiště &lt;<radovan.biciste>&gt; (In reply to comment 2) > Since you've already traced down where the error occurs, can you suggest a > fix? I was looking into it and could not come up with an easy one. From my point of view I would remove the rounding all together. It seems confusing when the driver does something behind the scene. I would leave the database raise an exception when the number does not fit the column. ## Comment 20136 Date: 2014-09-05 10:39:29 +0200 From: Radovan Bičiště &lt;<radovan.biciste>&gt; Currently in our environment I use following version of the MonetPreparedStatement.setBigDecimal method: /** * Sets the designated parameter to the given java.math.BigDecimal value. * The driver converts this to an SQL NUMERIC value when it sends it to the * database. * * @param idx the first parameter is 1, the second is 2, ... * @param x the parameter value * @throws SQLException if a database access error occurs */ public void setBigDecimal(int idx, BigDecimal x) throws SQLException { // get array position int i = getParamIdx(idx); // We need to shave off enough digits to bring ourselves to an // acceptable precision if we currently have too many digits. int digitsToShave = Math.max(0, x.precision() - digits[i]); int targetScale = Math.min(scale[i], x.scale() - digitsToShave); // However, if we need to shave off more digits than we have available // to the right of the decimal point, then this is impossible. if (targetScale < 0) throw new SQLDataException("DECIMAL value exceeds allowed digits/scale: " + x.toPlainString() + " (" + digits[i] + "/" + scale[i] + ")", "22003"); // Reduction is possible via rounding; do it and we're good to go. //x = x.round(new MathContext(targetScale, RoundingMode.HALF_UP)); // MonetDB doesn't like leading 0's, since it counts them as part of // the precision, so let's strip them off. (But be careful not to do // this to the exact number "0".) Also strip off trailing // numbers that are inherent to the double representation. String xStr = x.toPlainString(); int dot = xStr.indexOf("."); if (dot >= 0) xStr = xStr.substring(0, Math.min(xStr.length(), dot + 1 + scale[i])); while (xStr.startsWith("0") && xStr.length() > 1) xStr = xStr.substring(1); setValue(idx, xStr); } Please note the commented out line with rounding. ## Comment 21711 Date: 2016-01-05 17:42:03 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [b07eb1f757e3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b07eb1f757e3) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b07eb1f757e3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b07eb1f757e3) Changeset description: Added test for bug #3561. ## Comment 25200 Date: 2017-04-06 16:10:39 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; The implementation of MonetPreparedStatement.setBigDecimal() has been changed some time ago. It now uses: x = x.setScale(scale[i], RoundingMode.HALF_UP); We create a test program (see tests/BugDecimalRound_Bug_3561.java) and it appears that this rounding issue does not occur anymore with latest MonetDB JDBC driver (monetdb-jdbc-2.25.jar). See also http://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=8b13d0941c61 I have set this issue now to resolved. If you still experience BigDecimal rounding issues, please let us know.
Preparedstatement binding rounds decimal numbers when it is not necessary
https://api.github.com/repos/MonetDB/MonetDB/issues/3561/comments
0
2020-11-30T12:54:46Z
2024-06-27T12:04:32Z
https://github.com/MonetDB/MonetDB/issues/3561
753,455,147
3,561
[ "MonetDB", "MonetDB" ]
Date: 2014-09-04 11:26:30 +0200 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: -- development Last updated: 2014-10-31 14:13:37 +0100 ## Comment 20123 Date: 2014-09-04 11:26:30 +0200 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Build Identifier: Running the query below, it fails with the error: ERROR = !GDK reported error. !BATproject: does not match always But maybe once every ~20 attempts it succeeds! Tested with the latest tip of Mercurial. It fails with all the optimizers and with either nthreads=1 or nthreads>1. Reproducible: Sometimes ### Steps to Reproduce: sql>\d test CREATE TABLE "sys"."test" ( "zs" INTEGER, "zd" INTEGER, "ns" BIGINT, "bs" BIGINT ); sql>select count(*) from test; +---------+ | L1 | +=========+ | 1399341 | +---------+ 1 tuple (0.790ms) Run the following query: SELECT zs, zd, sum(bs) as bs, sum(ns) AS ns FROM ( SELECT sum(bs) AS bs, sum(ns) AS ns, zd, zs FROM test GROUP BY zd, zs ) AS query GROUP BY zd, zs HAVING sum(ns) <> 0 ORDER BY bs, zd, zs DESC LIMIT 30; Actually, I tried to bisect to find the minimal length of the table that cause this bug, and it's around 300k rows (close to 297k, but I suspect it's highly dependant of my configuration). Under this size, the query runs fine. Above, it fails most of the time. ## Comment 20124 Date: 2014-09-04 11:29:26 +0200 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; To clarify, because I think the reported version can't be set to Oct2014, this bug DOESN'T occur with Jan2014-SP3. ## Comment 20125 Date: 2014-09-04 11:54:19 +0200 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; The EXPLAIN for the query: function user.s2_2{autoCommit=true}(A0:lng):void; X_3 := sql.mvc(); X_4:bat[:oid,:oid] := sql.tid(X_3,"sys","test"); X_7 := sql.bind(X_3,"sys","test","ns",0); (X_10,r1_10) := sql.bind(X_3,"sys","test","ns",2); X_13 := sql.bind(X_3,"sys","test","ns",1); X_15 := sql.delta(X_7,X_10,r1_10,X_13); X_16 := algebra.leftfetchjoin(X_4,X_15); X_17 := sql.bind(X_3,"sys","test","zs",0); (X_19,r1_19) := sql.bind(X_3,"sys","test","zs",2); X_21 := sql.bind(X_3,"sys","test","zs",1); X_22 := sql.delta(X_17,X_19,r1_19,X_21); X_23 := algebra.leftfetchjoin(X_4,X_22); X_24 := sql.bind(X_3,"sys","test","zd",0); (X_26,r1_26) := sql.bind(X_3,"sys","test","zd",2); X_28 := sql.bind(X_3,"sys","test","zd",1); X_29 := sql.delta(X_24,X_26,r1_26,X_28); X_30 := algebra.leftfetchjoin(X_4,X_29); (X_31,r1_31,r2_31) := group.subgroup(X_30); (X_34,r1_34,r2_34) := group.subgroupdone(X_23,X_31); X_37:bat[:oid,:lng] := aggr.subsum(X_16,X_34,r1_34,true,true); X_39 := algebra.leftfetchjoin(r1_34,X_23); X_40 := algebra.leftfetchjoin(r1_34,X_30); X_51 := sql.bind(X_3,"sys","test","bs",0); (X_56,r1_59) := sql.bind(X_3,"sys","test","bs",2); X_59 := sql.bind(X_3,"sys","test","bs",1); X_61 := sql.delta(X_51,X_56,r1_59,X_59); X_62 := algebra.leftfetchjoin(X_4,X_61); X_63:bat[:oid,:lng] := aggr.subsum(X_62,X_34,r1_34,true,true); (X_41,r1_41,r2_41) := group.subgroup(X_40); (X_44,r1_44,r2_44) := group.subgroupdone(X_39,X_41); X_47:bat[:oid,:lng] := aggr.subsum(X_37,X_44,r1_44,true,true); X_48 := algebra.subselect(X_47,A0,A0,true,true,true); X_132 := algebra.leftfetchjoin(X_48,r1_44); X_64:bat[:oid,:lng] := aggr.subsum(X_63,X_44,r1_44,true,true); X_49:bat[:oid,:int] := algebra.leftfetchjoin(X_132,X_39); X_50:bat[:oid,:int] := algebra.leftfetchjoin(X_132,X_40); X_65 := algebra.leftfetchjoin(X_48,X_64); (X_67,r1_74) := algebra.firstn(X_65,30:wrd,true,false); (X_71,r1_80) := algebra.firstn(X_50,X_67,r1_74,30:wrd,true,false); X_73 := algebra.firstn(X_49,X_71,r1_80,30:wrd,false,false); X_74 := algebra.leftfetchjoin(X_73,X_49); X_75 := algebra.leftfetchjoin(X_73,X_50); X_76 := algebra.leftfetchjoin(X_73,X_65); (X_77,r1_88,r2_88) := algebra.subsort(X_76,false,false); (X_80,r1_91,r2_91) := algebra.subsort(X_75,r1_88,r2_88,false,false); (X_83,r1_94,r2_94) := algebra.subsort(X_74,r1_91,r2_91,true,false); X_86 := algebra.leftfetchjoin(r1_94,X_74); X_88 := algebra.subslice(X_86,0:wrd,29:wrd); X_89 := algebra.leftfetchjoin(X_88,X_86); X_133 := algebra.leftfetchjoin(X_88,r1_94); X_92:bat[:oid,:lng] := algebra.leftfetchjoinPath(X_133,X_73,X_48,X_47); X_91:bat[:oid,:lng] := algebra.leftfetchjoin(X_133,X_76); X_90:bat[:oid,:int] := algebra.leftfetchjoin(X_133,X_75); X_93 := sql.resultSet(4,1,X_89); sql.rsColumn(X_93,"sys.query","zs","int",32,0,X_89); sql.rsColumn(X_93,"sys.query","zd","int",32,0,X_90); sql.rsColumn(X_93,"sys.L3","bs","bigint",64,0,X_91); sql.rsColumn(X_93,"sys.L4","ns","bigint",64,0,X_92); X_111 := io.stdout(); sql.exportResult(X_111,X_93); end s2_2; ## Comment 20126 Date: 2014-09-04 13:32:33 +0200 From: @sjoerdmullender Given that the bug only occurs for larger number of rows, it may be it only triggers when mitosis/mergetable is in effect. You can try to reproduce the problem with a smaller number of rows but running the server with the --forcemito flag to force mitosis even for small sizes. ## Comment 20127 Date: 2014-09-04 14:18:15 +0200 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; (In reply to comment 3) > Given that the bug only occurs for larger number of rows, it may be it only > triggers when mitosis/mergetable is in effect. You can try to reproduce the > problem with a smaller number of rows but running the server with the > --forcemito flag to force mitosis even for small sizes. I'm a little confused. Indeed, after trying with --forcemito, I noticed that up to ~2240 rows, the query succeed, and fails above that (so it is worse now.) But when I remove the option, it still fail at this limit (while it failed at around 300k as I reported earlier.) I'm assuming that some metadata have changed when trying this option. Each time, I tests all the pipes (default, no_mitosis, minimal, sequential) and they either all passes or all fails. Note: I never launch mserver5 directly. I don't know how to add extra options when started from monetdbd, so I renamed bin/mserver5 to bin/mserver5.bin and added a script as bin/server5 which run mserver5.bin with the extra --forcemito option. ## Comment 20128 Date: 2014-09-04 14:20:44 +0200 From: @sjoerdmullender I'm now looking into the bug. I can reproduce it, so that is good. I don't think it actually has to do anything with mitosis, but with the new algebra.firstn implementation (see your trace, it occurs three times). ## Comment 20129 Date: 2014-09-04 15:48:37 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [c4e0e31888f9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c4e0e31888f9) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c4e0e31888f9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c4e0e31888f9) Changeset description: Fix for bug #3560: last value in grouped first-N isn't necessarily highest. ## Comment 20130 Date: 2014-09-04 15:49:45 +0200 From: @sjoerdmullender Frédéric, can you try with the latest change? I think that should solve it. ## Comment 20133 Date: 2014-09-04 16:57:20 +0200 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; (In reply to comment 7) > Frédéric, can you try with the latest change? I think that should solve it. I confirm. It works perfectly now, with the same data. Thanks for the very quick fix! ## Comment 20330 Date: 2014-10-31 14:13:37 +0100 From: @sjoerdmullender Oct2014 has been released.
Error "BATproject: does not match always" with subselect/groupby/having
https://api.github.com/repos/MonetDB/MonetDB/issues/3560/comments
0
2020-11-30T12:54:43Z
2024-06-27T12:04:31Z
https://github.com/MonetDB/MonetDB/issues/3560
753,455,109
3,560
[ "MonetDB", "MonetDB" ]
Date: 2014-09-02 23:30:00 +0200 From: Shouvik Sayef &lt;<shouvik.sayef>&gt; To: clients devs &lt;<bugs-clients>&gt; Version: 11.23.7 (Jun2016-SP1) CC: christian, faquwas, fqi39g5x, fvhxi0yv, jotyris, nuxyj, sofil Last updated: 2020-11-24 09:07:26 +0100 ## Comment 20122 Date: 2014-09-02 23:30:00 +0200 From: Shouvik Sayef &lt;<shouvik.sayef>&gt; User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0 Build Identifier: We are running a multistream application developed using MonetDB's mapi library, the applications threads 16 data streams and uses 16 different mapi clients to upload data. Each client inserts to its own table, and all the tables belong to the same database, in total the clients handle about 40 million records over the course of 8 hours per day. The database is being run off of a 512GB RAID array. At the start of the day disk usage is typically around 20%, (i.e. about 100/512GB) however running the application quickly fills up the disk space over the course of about two housr (Using >400GB), and eventually monetdb gets a GDK error for a full disk and forces the clients to exit. We have a script to detect this, and the script automatically restarts monetdbd and waits for the write ahead log to be read before restarting the clients. If the restart is successful, all of the data inserted prior is present, but monetdb seems to have run some kind of garbage collection and disk usage is only about 5-10GB more than the start of the day (as expected), the other ~390GB is cleared up. The clients then continue inserting data until the harddrive fills up again and this repeats ad infinitum. I have gone through the process making small changes for a few weeks without any luck. In some cases monetdb completely fills up the harddrive to the brim and is unable to restart as it cannot write to the merovingian.pid file as there is no space for it. This requires manually clearing some space and restarting monetdbd. My understanding is that maybe our MAPI client may be responsible for a large number of intermediate bat files and perhaps there is a more defensive way of inserting the data. I am providing some pseudocode showing how we used the mapi client to do bulk inserts from a live data stream, however I have not been able to find any documentation on doing bulk insertions from a mapi client or a live stream, perhaps someone recommend the most efficient way to send insertion queries via the mapi client. Or perhaps one of the other mapi library commands can trigger the garbage collection? Our mapi client uses the connect, query and update methods similar to the example on the website. Note my example sends 500 messages per commit. I have tried configuring the program to store all 500 insert into statements and send them with a single update command, but this always returns a mapi error. Note each row of data is about 800kb umcompressed, I am not sure if that would be useful in determining an optimal commit size, and finally each individual client is expected to receive between 1.5-3 million records over the course of a day (8 hours). mapi_connect() StringStream ss; int counter=0; dataLoop{ if (counter ==0){ ss << "START TRANSACTION;" } ss << "INSERT INTO table (column names here) VALUES(" ss << comma seperated data from stream ss << ");" if (counter == 500){ ss << "COMMIT;" counter =0; } strcpy(query_pointer, ""); strcat(query_pointer, ss.c_str()); update(query_pointer); } Reproducible: Always ### Steps to Reproduce: 1.Run insertions from mapi client 2.Monitor disk usage 3.Restart monetdb and check disk usage ### Actual Results: I have tried several variations of the mapi client without any luck, it fills the harddrive in about 2 hours, we need to run the stream for 8 hours straight. ### Expected Results: We would like the client to be able to run all day and insert all 40 million rows without needing to restart monetdb as we lose some data when the database goes down. Preferably I would like to know if there is a way to execute the garbage collection using the mapi library. I can provide logs if necessary, however I do not think they may be relevant to this issue. ## Comment 20148 Date: 2014-09-11 17:24:06 +0200 From: @sjoerdmullender My hypothesis is that the disk fills up because of how MonetDB does transaction management. When you make changes to the database, the changes are collected in a write-ahead logfile (WAL). When the changes are committed, a record is added to the WAL to indicate this. In addition, data may or may not be written to disk in the BATs involved (this depends on whether they were memory-mapped or not). When the server is quiescent, the WAL is incorporated into the BATs and then removed. But until that time the WAL grows. From your description it sounds like the server never is quiescent, so never has time to incorporate the WAL into the BATs. You can check whether this is the case by monitoring the WAL during processing. Check the size of the sql_logs directory inside the database directory (.../dbfarm/<databasename>/sql_logs). If this keeps growing, this is the problem. Other than stopping the database for a while to let it incorporate the WAL, you can also restart the database. The WAL is also incorporated on startup. Note that this may take quite long when the WAL is large (having a running database do it is faster). ## Comment 20159 Date: 2014-09-16 00:36:05 +0200 From: Shouvik Sayef &lt;<shouvik.sayef>&gt; Sjoerd, I can confirm that it is in fact the WAL. For the time being I have written some scripts to automate the restarting of monetdb and flush the WAL, and simply output SQL statements to a file while the database is restarting, however I would be interested to see if there is a way to optimize insertions in order to reduce the need for this. I have found increasing the commit size to about 10,000 helps quite a bit, however it adds a lengthy delay in accessing current data for clients that use the database (some of the streams are much more active than the others), in other words we are sacrificing real-time access for stability and we would ideally have both. I would like to know if there is a way to determine the optimal settings for large volume insertions our system. We are running a 32-core system with 96GB of RAM and several new SSD's configured in RAID 10 with very high throughput, and data is sent via a direct 10G connection. With all of this I feel as though we are not taking full advantage of the hardware if it is still necessary to write to the WAL.
Harddrive fills and crashes database during live data insertion via mapi library client.
https://api.github.com/repos/MonetDB/MonetDB/issues/3559/comments
0
2020-11-30T12:54:40Z
2024-06-28T13:16:06Z
https://github.com/MonetDB/MonetDB/issues/3559
753,455,076
3,559
[ "MonetDB", "MonetDB" ]
Date: 2014-08-29 18:15:05 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: @njnes Last updated: 2014-10-31 14:13:52 +0100 ## Comment 20109 Date: 2014-08-29 18:15:05 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Build Identifier: numeric values (as strings) are incorrectly parsed/converted and invalid strings (which do not represent a valid number) are accepted without error but produce strange numbers internally Reproducible: Always ### Steps to Reproduce: 1. start mserver5 from development (default branch of friday morning 29 aug 2014) 2. start mclient 3. enter following SQL statements: CREATE TABLE num_test (i int, s varchar(50), n numeric); INSERT INTO num_test(i,s,n) VALUES (1, ' 123', ' 123'); INSERT INTO num_test(i,s,n) VALUES (2, ' 3245874 ', ' 3245874 '); INSERT INTO num_test(i,s,n) VALUES (3, ' -93853', ' -93853'); INSERT INTO num_test(i,s,n) VALUES (4, '555.50', '555.50'); INSERT INTO num_test(i,s,n) VALUES (5, '-555.50', '-555.50'); SELECT num_test.*, cast(n as VARCHAR(50)) as n2s FROM num_test INSERT INTO num_test(i,s,n) VALUES (6, 'NaN ', 'NaN '); INSERT INTO num_test(i,s,n) VALUES (7, ' nan', ' nan'); INSERT INTO num_test(i,s,n) VALUES (8, ' ', ' '); INSERT INTO num_test(i,s,n) VALUES (9, ' 1234 %', ' 1234 %'); INSERT INTO num_test(i,s,n) VALUES (10,'xyz', 'xyz'); INSERT INTO num_test(i,s,n) VALUES (11,'- 1234', '- 1234'); INSERT INTO num_test(i,s,n) VALUES (12,'5 . 0', '5 . 0'); INSERT INTO num_test(i,s,n) VALUES (13,'5. 0 ', '5. 0 '); INSERT INTO num_test(i,s,n) VALUES (14,'', ''); INSERT INTO num_test(i,s,n) VALUES (15,' N aN ', ' N aN '); SELECT num_test.*, cast(n as VARCHAR(50)) as n2s FROM num_test ### Actual Results: start mserver5 output: builtin opt gdk_dbpath = /ufs/dinther/INSTALL/var/monetdb5/dbfarm/demo builtin opt gdk_debug = 0 builtin opt gdk_vmtrim = no builtin opt monet_prompt = > builtin opt monet_daemon = no builtin opt mapi_port = 50000 builtin opt mapi_open = false builtin opt mapi_autosense = false builtin opt sql_optimizer = default_pipe builtin opt sql_debug = 0 cmdline opt gdk_debug = 10 MonetDB 5 server v11.20.0 This is an unreleased version Serving database 'demo', using 8 threads Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs and 128bit integers dynamically linked Found 15.356 GiB available main-memory. Copyright (c) 1993-July 2008 CWI. Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Listening for connection requests on mapi:monetdb://127.0.0.1:50000/ MonetDB/GIS module loaded MonetDB/SQL module loaded > bash-4.2$ mclient Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.20.0 (unreleased), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>CREATE TABLE num_test (i int, s varchar(50), n numeric); operation successful (97.022ms) sql>INSERT INTO num_test(i,s,n) VALUES (1, ' 123', ' 123'); 1 affected rows (2.480ms) sql>INSERT INTO num_test(i,s,n) VALUES (2, ' 3245874 ', ' 3245874 '); 1 affected rows (2.117ms) sql>INSERT INTO num_test(i,s,n) VALUES (3, ' -93853', ' -93853'); 1 affected rows (2.181ms) sql>INSERT INTO num_test(i,s,n) VALUES (4, '555.50', '555.50'); 1 affected rows (1.865ms) sql>INSERT INTO num_test(i,s,n) VALUES (5, '-555.50', '-555.50'); 1 affected rows (1.869ms) sql>SELECT num_test.*, cast(n as VARCHAR(50)) as n2s FROM num_test; +------+----------------+----------------------+-----------------+ | i | s | n | n2s | +======+================+======================+=================+ | 1 | 123 | 123.000 | 123.000 | | 2 | 3245874 | 32458722224.000 | 32458722224.000 | | 3 | -93853 | -93853.000 | -93853.000 | | 4 | 555.50 | 555.500 | 555.500 | | 5 | -555.50 | -555.500 | -555.500 | +------+----------------+----------------------+-----------------+ 5 tuples (4.181ms) sql>INSERT INTO num_test(i,s,n) VALUES (6, 'NaN ', 'NaN '); 1 affected rows (1.727ms) sql>INSERT INTO num_test(i,s,n) VALUES (7, ' nan', ' nan'); 1 affected rows (12.787ms) sql>INSERT INTO num_test(i,s,n) VALUES (8, ' ', ' '); 1 affected rows (1.448ms) sql>INSERT INTO num_test(i,s,n) VALUES (9, ' 1234 %', ' 1234 %'); 1 affected rows (1.903ms) sql>INSERT INTO num_test(i,s,n) VALUES (10,'xyz', 'xyz'); 1 affected rows (1.826ms) sql>INSERT INTO num_test(i,s,n) VALUES (11,'- 1234', '- 1234'); 1 affected rows (6.500ms) sql>INSERT INTO num_test(i,s,n) VALUES (12,'5 . 0', '5 . 0'); 1 affected rows (1.743ms) sql>INSERT INTO num_test(i,s,n) VALUES (13,'5. 0 ', '5. 0 '); 1 affected rows (2.047ms) sql>INSERT INTO num_test(i,s,n) VALUES (14,'', ''); 1 affected rows (2.044ms) sql>INSERT INTO num_test(i,s,n) VALUES (15,' N aN ', ' N aN '); 1 affected rows (1.720ms) sql>SELECT num_test.*, cast(n as VARCHAR(50)) as n2s FROM num_test; +------+----------------+----------------------+-----------------+ | i | s | n | n2s | +======+================+======================+=================+ | 1 | 123 | 123.000 | 123.000 | | 2 | 3245874 | 32458722224.000 | 32458722224.000 | | 3 | -93853 | -93853.000 | -93853.000 | | 4 | 555.50 | 555.500 | 555.500 | | 5 | -555.50 | -555.500 | -555.500 | | 6 | NaN | 35184.000 | 35184.000 | | 7 | nan | 6752.000 | 6752.000 | | 8 | | 0.000 | 0.000 | | 9 | 1234 % | 12322229.000 | 12322229.000 | | 10 | xyz | 8004.000 | 8004.000 | | 11 | - 1234 | 158766.000 | 158766.000 | | 12 | 5 . 0 | 32.400 | 32.400 | | 13 | 5. 0 | 3.382 | 3.382 | | 14 | | 0.000 | 0.000 | | 15 | N aN | 289184.000 | 289184.000 | +------+----------------+----------------------+-----------------+ 15 tuples (2.769ms) sql> ### Expected Results: The last 10 inserts should fail. The conversion and numeric value 3245874 of insert 2 is wrong (becomes: 32458722224.000) ## Comment 20189 Date: 2014-09-21 22:19:28 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [a14d4678c148](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a14d4678c148) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a14d4678c148](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a14d4678c148) Changeset description: more string 2 decimal fixes. fixes bug #3558 ## Comment 20190 Date: 2014-09-21 22:19:54 +0200 From: @njnes more testing for invalid data is added ## Comment 20238 Date: 2014-10-03 17:17:21 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; It works now for columns of datatype numeric but not when a precision and scale are specified such as numeric(38,20) or decimal(38,20) use CREATE TABLE num_test (i int, s varchar(50), n numeric(38,20)); instead of CREATE TABLE num_test (i int, s varchar(50), n numeric); and try to repeat the inserts. They will give errors: Error: decimal ( 123) doesn't have format (38.20) Error: decimal ( 3245874 ) doesn't have format (38.20) etc. Idem when using CREATE TABLE num_test (i int, s varchar(50), n decimal(38,20)); instead of CREATE TABLE num_test (i int, s varchar(50), n numeric); ## Comment 20261 Date: 2014-10-08 09:48:24 +0200 From: @njnes added missing scale for [18 digits] ## Comment 20342 Date: 2014-10-31 14:13:52 +0100 From: @sjoerdmullender Oct2014 has been released.
numeric values (as strings) are incorrectly parsed/converted and invalid strings are accepted without error
https://api.github.com/repos/MonetDB/MonetDB/issues/3558/comments
0
2020-11-30T12:54:37Z
2024-06-27T12:04:29Z
https://github.com/MonetDB/MonetDB/issues/3558
753,455,033
3,558
[ "MonetDB", "MonetDB" ]
Date: 2014-08-29 14:06:15 +0200 From: @bartscheers To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-09-03 09:04:34 +0200 ## Comment 20108 Date: 2014-08-29 14:06:15 +0200 From: @bartscheers User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Build Identifier: Column defined as unique can contain more than one NULL values Reproducible: Always ### Steps to Reproduce: 1.create table t1 (id int, i int, unique(i)); 2.insert into t1 values (1,null),(2,null); 3. ### Actual Results: 2 affected rows (19.453ms) ### Expected Results: INSERT INTO: UNIQUE constraint 't1.t1_i_unique' violated
Unique key violation not respected for NULLs
https://api.github.com/repos/MonetDB/MonetDB/issues/3557/comments
0
2020-11-30T12:54:34Z
2024-06-28T13:16:05Z
https://github.com/MonetDB/MonetDB/issues/3557
753,454,998
3,557
[ "MonetDB", "MonetDB" ]
Date: 2014-08-29 11:26:21 +0200 From: @swingbit To: MonetDB5 devs &lt;<bugs-monetdb5>&gt; Version: 11.15.19 (Feb2013-SP6) CC: @mlkersten Last updated: 2015-08-28 13:41:52 +0200 ## Comment 20106 Date: 2014-08-29 11:26:21 +0200 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36 Build Identifier: This happens on Feb2013. I am under the impression that in more recent versions where manifold was introduced, the cause of the problem is still there, although the effects are less serious. Also, I have the feeling this can be related to bug #3361 (https://www.monetdb.org/bugzilla/show_bug.cgi?id=3361) Consider this explain: explain select replace(a1,a2,a3), id from ( select name as a1, 'a' as a2, 'A' as a3, id as id from sys.functions ) as x; +---------------------------------------------------------------+ | mal | +===============================================================+ | function user.s3_1{autoCommit=true}(A0:str,A1:str):void; | | X_18:bat[:oid,:str] := nil:bat[:oid,:str]; | | X_25 := nil:bat[:oid,:int]; | | barrier X_48 := language.dataflow(); | | X_4 := sql.mvc(); | | X_5:bat[:oid,:oid] := sql.tid(X_4,"sys","functions"); | | X_8 := sql.bind(X_4,"sys","functions","name",0); | | (X_11,r1_11) := sql.bind(X_4,"sys","functions","name",2); | | X_14 := sql.bind(X_4,"sys","functions","name",1); | | X_16 := sql.delta(X_8,X_11,r1_11,X_14); | | X_17 := algebra.leftfetchjoin(X_5,X_16); | | X_18:bat[:oid,:str] := batstr.replace(X_17,A0,A1); | | X_19 := sql.bind(X_4,"sys","functions","id",0); | | (X_21,r1_25) := sql.bind(X_4,"sys","functions","id",2); | | X_23 := sql.bind(X_4,"sys","functions","id",1); | | X_24 := sql.delta(X_19,X_21,r1_25,X_23); | | X_25 := algebra.leftfetchjoin(X_5,X_24); | | language.pass(X_5); | | exit X_48; | | X_26 := sql.resultSet(2,1,X_18); | | sql.rsColumn(X_26,"sys.L1","L1","varchar",0,0,X_18); | | sql.rsColumn(X_26,"sys.x","id","int",32,0,X_25); | | X_35 := io.stdout(); | | sql.exportResult(X_35,X_26); | | end s3_1; | +---------------------------------------------------------------+ Now the same query, where the only difference is "id" -> "id + 1" in the subquery: explain select replace(a1,a2,a3), id from ( select name as a1, 'a' as a2, 'A' as a3, id + 1 as id from sys.functions ) as x; +-----------------------------------------------------------------+ | mal | +=================================================================+ | function user.s4_1{autoCommit=true}(A0:str,A1:str,A2:lng):void; | | X_18:bat[:oid,:str] := nil:bat[:oid,:str]; | | X_25 := nil:bat[:oid,:int]; | | X_26:bat[:oid,:str] := nil:bat[:oid,:str]; | | X_27:bat[:oid,:str] := nil:bat[:oid,:str]; | | barrier X_56 := language.dataflow(); | | X_5 := sql.mvc(); | | X_6:bat[:oid,:oid] := sql.tid(X_5,"sys","functions"); | | X_9 := sql.bind(X_5,"sys","functions","name",0); | | (X_12,r1_12) := sql.bind(X_5,"sys","functions","name",2); | | X_15 := sql.bind(X_5,"sys","functions","name",1); | | X_17 := sql.delta(X_9,X_12,r1_12,X_15); | | X_18:bat[:oid,:str] := algebra.leftfetchjoin(X_6,X_17); | | X_19 := sql.bind(X_5,"sys","functions","id",0); | | (X_21,r1_21) := sql.bind(X_5,"sys","functions","id",2); | | X_23 := sql.bind(X_5,"sys","functions","id",1); | | X_24 := sql.delta(X_19,X_21,r1_21,X_23); | | X_25 := algebra.leftfetchjoin(X_6,X_24); | | X_26:bat[:oid,:str] := algebra.project(X_25,A0); | | X_27:bat[:oid,:str] := algebra.project(X_25,A1); | | language.pass(X_6); | | exit X_56; | | X_69:bat[:str,:oid] := bat.reverse(X_18); | | X_71 := bat.new(nil:oid,nil:str); | | barrier (X_75,X_76) := iterator.new(X_18); | | X_78 := algebra.fetch(X_26,X_75); | | X_80 := algebra.fetch(X_27,X_75); | | X_82 := str.replace(X_76,X_78,X_80); | | X_83 := algebra.fetch(X_69,X_75); | | bat.insert(X_71,X_83,X_82); | | redo (X_75,X_76) := iterator.next(X_18); | | exit (X_75,X_76); | | X_18:bat[:oid,:str] := nil:bat[:oid,:str]; | | X_26:bat[:oid,:str] := nil:bat[:oid,:str]; | | X_27:bat[:oid,:str] := nil:bat[:oid,:str]; | | X_69:bat[:str,:oid] := nil:bat[:str,:oid]; | | X_28:bat[:oid,:str] := X_71; | | X_31 := batcalc.lng(X_25); | | X_32:bat[:oid,:lng] := batcalc.+(X_31,A2); | | X_33 := sql.resultSet(2,1,X_28); | | sql.rsColumn(X_33,"sys.L1","L1","varchar",0,0,X_28); | | sql.rsColumn(X_33,"sys.x","id","bigint",64,0,X_32); | | X_43 := io.stdout(); | | sql.exportResult(X_43,X_33); | | end s4_1; | +-----------------------------------------------------------------+ The main difference is: batstr.replace has become a loop over str.replace. What I do not understand, is how the "+ 1" is related to this change. I have the feeling it comes from the additional constant A2 passed to the function as a parameter, but I can't figure out the exact reason. Why is this bad? 1. Obviously, because the loop can in principle be much slower than the bat version 2. Potentially more serious, because the loop, which involves bat.new and bat.insert will not be recognised as reusable by the commonTerms optimizer, if the query becomes bigger and repeats the same pattern. I could verify this, with generated query which have such repeated patterns at the very beginning and become very slow. Notice that eliminating redundant computations can be crucial. When the non-recognised pattern happens at the beginning of long subqueries, potentially very long portions that could be reused will be in fact recomputed. Reproducible: Always ## Comment 20112 Date: 2014-09-01 15:29:55 +0200 From: @swingbit Update: the choice of expanding mal.multiplex("str","replace", .., ..) into either batstr.replace() or into the loop is done by the inline optimizer. I've used the embedded debugger on both queries. On the version without "+ 1", opt_inline turns mal.multiplex("str","replace", .., ..) into batstr.replace. On the version with "+ 1", opt_inline turns mal.multiplex("str","replace", .., ..) into a loop. I still can't see for what reason though. ## Comment 20113 Date: 2014-09-01 15:52:40 +0200 From: @swingbit Sorry, previous comment is wrong. I wrote about the inline optimizer, but I meant the REMAP optimizer. In the first query, it turns the multiplex into a batstr call. In the second one, it leaves it as multiplex (which then is turned into a loop by the multiplex optimizer). The question remains: why does the remap optimizer fail to create the batstr call? ## Comment 20114 Date: 2014-09-01 16:38:10 +0200 From: @swingbit UPDATE: Te problem has nothing to do with constants. The following is also generating a loop on str.replace, just because of the addition of abs() on the subquery. sql>explain more>select replace(a1,a2,a3), id more>from ( more> select name as a1, 'a' as a2, 'A' as a3, abs(id) as id more> from sys.functions more>) as x; +---------------------------------------------------------------+ | mal | +===============================================================+ | function user.s2_1{autoCommit=true}(A0:str,A1:str):void; | | X_17:bat[:oid,:str] := nil:bat[:oid,:str]; | | X_24 := nil:bat[:oid,:int]; | | X_25:bat[:oid,:str] := nil:bat[:oid,:str]; | | X_26:bat[:oid,:str] := nil:bat[:oid,:str]; | | barrier X_54 := language.dataflow(); | | X_4 := sql.mvc(); | | X_5:bat[:oid,:oid] := sql.tid(X_4,"sys","functions"); | | X_8 := sql.bind(X_4,"sys","functions","name",0); | | (X_11,r1_11) := sql.bind(X_4,"sys","functions","name",2); | | X_14 := sql.bind(X_4,"sys","functions","name",1); | | X_16 := sql.delta(X_8,X_11,r1_11,X_14); | | X_17:bat[:oid,:str] := algebra.leftfetchjoin(X_5,X_16); | | X_18 := sql.bind(X_4,"sys","functions","id",0); | | (X_20,r1_20) := sql.bind(X_4,"sys","functions","id",2); | | X_22 := sql.bind(X_4,"sys","functions","id",1); | | X_23 := sql.delta(X_18,X_20,r1_20,X_22); | | X_24 := algebra.leftfetchjoin(X_5,X_23); | | X_25:bat[:oid,:str] := algebra.project(X_24,A0); | | X_26:bat[:oid,:str] := algebra.project(X_24,A1); | | language.pass(X_5); | | exit X_54; | | X_67:bat[:str,:oid] := bat.reverse(X_17); | | X_69 := bat.new(nil:oid,nil:str); | | barrier (X_73,X_74) := iterator.new(X_17); | | X_76 := algebra.fetch(X_25,X_73); | | X_78 := algebra.fetch(X_26,X_73); | | X_80 := str.replace(X_74,X_76,X_78); | | X_81 := algebra.fetch(X_67,X_73); | | bat.insert(X_69,X_81,X_80); | | redo (X_73,X_74) := iterator.next(X_17); | | exit (X_73,X_74); | | X_17:bat[:oid,:str] := nil:bat[:oid,:str]; | | X_25:bat[:oid,:str] := nil:bat[:oid,:str]; | | X_26:bat[:oid,:str] := nil:bat[:oid,:str]; | | X_67:bat[:str,:oid] := nil:bat[:str,:oid]; | | X_27:bat[:oid,:str] := X_69; | | X_30:bat[:oid,:int] := batcalc.abs(X_24); | | X_31 := sql.resultSet(2,1,X_27); | | sql.rsColumn(X_31,"sys.L1","L1","varchar",0,0,X_27); | | sql.rsColumn(X_31,"sys.x","id","int",32,0,X_30); | | X_41 := io.stdout(); | | sql.exportResult(X_41,X_31); | | end s2_1; | +---------------------------------------------------------------+ 44 tuples (3.339ms) sql> It seems that when two candidates for conversion to bat operations are present, only the second gets mapped right (batcalc.abs() in this case), while the first doesn't (batstr.replace() in this case). ## Comment 20246 Date: 2014-10-04 14:17:34 +0200 From: @mlkersten Bug has been added to test suite. The code appears to be properly generated for all three cases in OCT2014 branch. ## Comment 20247 Date: 2014-10-04 14:19:16 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [506bb6a962f7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=506bb6a962f7) made by Martin Kersten <mk@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=506bb6a962f7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=506bb6a962f7) Changeset description: Manifold code generation test The code seems properly generated for Bug #3556 ## Comment 20254 Date: 2014-10-06 10:07:06 +0200 From: @swingbit Martin, I don't quite agree that the problem is solved in Oct2014. The loop is no longer generated because manifold takes care of it internally. But the point is that the specialised bat version of the function should have been called (batreplace), not the manifold call. Am I wrong? ## Comment 20255 Date: 2014-10-06 10:21:44 +0200 From: @swingbit Compare these two: In the first case: explain select replace(a1,a2,a3), id from ( select name as a1, 'a' as a2, 'A' as a3, id as id from sys.functions ) as x; we get batstr.replace(X_17,A0,A1) <- (bat,constant,constant) Then, just by adding an abs() to id: select replace(a1,a2,a3), id from ( select name as a1, 'a' as a2, 'A' as a3, abs(id) as id from sys.functions ) as x; we get a (bat,bat,bat) call <- hence the manifold call, because no batreplace(bat,bat,bat) is available. Why is that? How is the abs() on the id column triggering this? ## Comment 20256 Date: 2014-10-06 11:02:19 +0200 From: @mlkersten Roberto, Look at the latest (shortened) test output. It illustrates that two algebra.project() calls precede it. Indeed, the ABS() over a scalar value (or argument) would not require it. ## Comment 20257 Date: 2014-10-06 11:12:39 +0200 From: @swingbit Indeed, I see what is happening. So initially I had thought this issue was related to the remap optimizer, but it comes instead from how the constants are expanded into bat constants. Now that the real cause is clear, the title of this bug report is no longer accurate. Personally, I would think those unnecessary constant expansion should be removed, but I leave it up to you what to do with this bug report. Feel free to change the title as appropriate, or close it if you don't think it should be fixed. Roberto ## Comment 20988 Date: 2015-07-09 22:20:44 +0200 From: @mlkersten The constant propagation optimizer has been re-enabled and the commonTerms optimizer now performs a much better job in removing duplicate sub-expressions. Bug closed for the time being. Patches will appear in future release. ## Comment 21191 Date: 2015-08-28 13:41:52 +0200 From: @sjoerdmullender Jul2015 has been released.
when 2 multiplexed functions in MAL plan, only one is mapped correctly to bat<mod>.function primitive
https://api.github.com/repos/MonetDB/MonetDB/issues/3556/comments
0
2020-11-30T12:54:30Z
2024-06-27T12:04:27Z
https://github.com/MonetDB/MonetDB/issues/3556
753,454,959
3,556
[ "MonetDB", "MonetDB" ]
Date: 2014-08-25 19:01:28 +0200 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-10-31 14:14:33 +0100 ## Comment 20090 Date: 2014-08-25 19:01:28 +0200 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Build Identifier: While a test is made to prevent a division by 0, the computation is performed nonetheless before the test causing the query to fail. Reproducible: Always ### Steps to Reproduce: CREATE FUNCTION my_avg(total INT, cnt INT) RETURNS INT BEGIN RETURN CASE WHEN cnt <> 0 THEN total / cnt ELSE -1 END; END; ### Actual Results: >SELECT my_avg(0, 0); division by zero. >EXPLAIN SELECT my_avg(0, 0); .. | X_25 := calc.!=(A1,0:int); | | X_26 := calc.isnil(X_25); | | X_28 := calc.ifthenelse(X_26,false,X_25); | | X_29 := calc./(A0,A1); | | X_30 := calc.ifthenelse(X_28,X_29,-1:int); | .. ### Expected Results: -1 was expected because the condition should have prevented the division by 0. I'm not sure if the SQL standard cover this detail. ## Comment 20100 Date: 2014-08-27 21:38:22 +0200 From: @njnes Fixed by handling the expressions from the persistent stored modules also in the rel_case_fixup optimizer. ## Comment 20101 Date: 2014-08-27 21:40:30 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [f900af1e70a0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f900af1e70a0) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f900af1e70a0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f900af1e70a0) Changeset description: handle psm expressions in exp_print and exp_case_fixup (solving the div_by_zero bug #3555) ## Comment 20378 Date: 2014-10-31 14:14:33 +0100 From: @sjoerdmullender Oct2014 has been released.
Order of evaluation inside CASE WHEN
https://api.github.com/repos/MonetDB/MonetDB/issues/3555/comments
0
2020-11-30T12:54:27Z
2024-06-27T12:04:26Z
https://github.com/MonetDB/MonetDB/issues/3555
753,454,925
3,555
[ "MonetDB", "MonetDB" ]
Date: 2014-08-25 18:31:18 +0200 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-10-31 14:14:09 +0100 ## Comment 20088 Date: 2014-08-25 18:31:18 +0200 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Build Identifier: MonetDB crash (or ignore the query) when using a sub SELECT with an outer ORDER BY clause, in both 11.17.21 and dev (11.20.0) Reproducible: Always ### Steps to Reproduce: Here is the minimal query able to reproduce the problem: select a+b from (select 1 as a,1 as b) as q order by a limit 1; Note the three condition to trigger the bug: a computation on several fields, an sub select and on order by. ### Actual Results: No answer from mclient. With 11.17.21, I think it's related to bugs we already filled in the past weeks. We see nothing in the serveur log. However, in the development branch (whose tip is at 52799:d7d082274cc2), we have the following log: 2014-08-25 16:14:12 ERR nova[20887]: mserver5: rel_bin.c:2359: rel2bin_project: Assertion `0' failed. 2014-08-25 16:14:12 MSG nova[20887]: could not find q.a 2014-08-25 16:14:12 MSG nova[20887]: (null!).single_value 2014-08-25 16:14:12 MSG nova[20887]: (null!).single_value 2014-08-25 16:14:12 MSG nova[20887]: L1.L1 2014-08-25 16:14:12 MSG merovingian[3771]: database 'test' (20887) was killed by signal SIGABRT Moreover when altering the query to use an UNION in the sub select with the following query: select a+b from (select 1 as a,1 as b union select 1, 1) as q order by a limit 1; we get a more surprising log message: 2014-08-25 16:06:58 ERR nova[19417]: mserver5: rel_bin.c:2275: rel2bin_project: Assertion `0' failed. 2014-08-25 16:06:58 MSG nova[19417]: could not find q.b 2014-08-25 16:06:58 MSG nova[19417]: 0ê h.L3 2014-08-25 16:06:58 MSG nova[19417]: q.a 2014-08-25 16:06:58 MSG merovingian[3771]: database 'test' (19417) was killed by signal SIGABRT (There are really random bytes on the third line.) Trying to perform the same request a second time in mclient cause it to quit and nothing is logged: sql>select a+b from (select 1 as a,1 as b union select 1,1) as q order by a limit 1; sql>select a+b from (select 1 as a,1 as b union select 1,1) as q order by a limit 1; write error on stream ## Comment 20089 Date: 2014-08-25 18:59:11 +0200 From: @sjoerdmullender When trying the query select a+b from (select 1 as a,1 as b) as q order by a limit 1; on the Jan2014 branch, I get: mserver5: /home/sjoerd/src/MonetDB/stable/sql/backends/monet5/sql_gencode.c:965: _dumpstmt: Assertion `s->nrcols' failed. Aborted - core dumped On the Oct2014 branch, I get: could not find q.a (null!).single_value (null!).single_value L1.L1 mserver5: /home/sjoerd/src/MonetDB/candidate/sql/backends/monet5/rel_bin.c:2359: rel2bin_project: Assertion `0' failed. Aborted - core dumped ## Comment 20092 Date: 2014-08-26 08:28:53 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [6c4080d30b3e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6c4080d30b3e) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6c4080d30b3e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6c4080d30b3e) Changeset description: fixed reuse fixed bug #3554, ie make sure single value order by /limit work ## Comment 20093 Date: 2014-08-26 08:30:51 +0200 From: @njnes solved in oct2014 branch. Add value to column conversion for the single result orderby/limit. ## Comment 20096 Date: 2014-08-26 11:35:16 +0200 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; Thanks for the quick fix. The reactivity is much appreciated :) However, the other part still fail (when using an UNION), when querying the following: select a+b from (select 1 as a,1 as b union select 1,1) as q order by a limit 1; Output in log is: (with the tip of Oct2014 at this date, 52822:972d327c8d5f) 2014-08-26 09:26:29 ERR nova[29878]: mserver5: rel_bin.c:2275: rel2bin_project: Assertion `0' failed. 2014-08-26 09:26:29 MSG nova[29878]: could not find q.b 2014-08-26 09:26:29 MSG nova[29878]: .L3 2014-08-26 09:26:29 MSG nova[29878]: q.a The session: Welcome to mclient, the MonetDB/SQL interactive terminal (Jan2014-SP3) Database: MonetDB v11.19.0 (unreleased), 'mapi:monetdb://fjolliton:50000/nova' Type \q to quit, \? for a list of available commands auto commit mode: on sql>select a+b from (select 1 as a,1 as b union select 1, 1) as q order by a limit 1; Connection terminated ## Comment 20097 Date: 2014-08-27 11:59:24 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [a07ae318c930](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a07ae318c930) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a07ae318c930](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a07ae318c930) Changeset description: fixed second part of bug #3554, ie handle topn push down properly ## Comment 20098 Date: 2014-08-27 11:59:55 +0200 From: @njnes also fixed the topn problem with this query ## Comment 20099 Date: 2014-08-27 12:40:40 +0200 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; Works great. Thanks! ## Comment 20358 Date: 2014-10-31 14:14:09 +0100 From: @sjoerdmullender Oct2014 has been released.
Issue with subselect and ORDER BY
https://api.github.com/repos/MonetDB/MonetDB/issues/3554/comments
0
2020-11-30T12:54:24Z
2024-06-27T12:04:25Z
https://github.com/MonetDB/MonetDB/issues/3554
753,454,885
3,554
[ "MonetDB", "MonetDB" ]
Date: 2014-08-25 12:39:24 +0200 From: @bartscheers To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: @PedroTadim Last updated: 2020-10-19 11:06:22 +0200 ## Comment 20087 Date: 2014-08-25 12:39:24 +0200 From: @bartscheers User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Build Identifier: E.g., in astronomical applications, the degrees, radians, and somewhat more specialized alpha functions are basic and used quite a lot. When working in other than 'sys' schemas, these functions have to be called by sys.degrees() etc., which is annoying and makes the SQL non-standard. It would be so much more user-friendly if these functions can be called like the trigonometric or statistical functions. Reproducible: Always
All schema access to ubiquitous functions
https://api.github.com/repos/MonetDB/MonetDB/issues/3553/comments
0
2020-11-30T12:54:22Z
2024-06-27T12:04:24Z
https://github.com/MonetDB/MonetDB/issues/3553
753,454,843
3,553
[ "MonetDB", "MonetDB" ]
Date: 2014-08-22 18:13:44 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) Last updated: 2014-10-31 14:14:57 +0100 ## Comment 20083 Date: 2014-08-22 18:13:44 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Build Identifier: The <> comparison operator does not work correctly anymore, see SQL example. Reproducible: Always ### Steps to Reproduce: 1. start meserv5 (MonetDB v11.17.21 (Jan2014-SP3)) 2. start mclient 3. CREATE TABLE tst (int_col integer); INSERT INTO tst VALUES (1); INSERT INTO tst VALUES (0); SELECT * FROM tst; SELECT count(*) FROM tst; SELECT count(*) FROM tst WHERE int_col = 0; SELECT count(*) FROM tst WHERE int_col <> 0; This last query should return 1 but instead it returns 0, which is wrong. Also DELETE FROM tst WHERE int_col <> 0; deletes 0 rows. ### Actual Results: Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.17.21 (Jan2014-SP3), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>CREATE TABLE tst (int_col integer); operation successful (415.338ms) sql>INSERT INTO tst VALUES (1); 1 affected rows (2.357ms) sql>INSERT INTO tst VALUES (0); 1 affected rows (1.979ms) sql>SELECT * FROM tst; +---------+ | int_col | +=========+ | 1 | | 0 | +---------+ 2 tuples (1.007ms) sql>SELECT count(*) FROM tst; +------+ | L1 | +======+ | 2 | +------+ 1 tuple (0.894ms) sql>SELECT count(*) FROM tst WHERE int_col = 0; +------+ | L1 | +======+ | 1 | +------+ 1 tuple (0.844ms) sql>SELECT count(*) FROM tst WHERE int_col <> 0; +------+ | L1 | +======+ | 0 | +------+ 1 tuple (1.297ms) sql>SELECT count(*) FROM tst WHERE int_col = 1; +------+ | L1 | +======+ | 1 | +------+ 1 tuple (0.420ms) sql>DELETE FROM tst WHERE int_col <> 0; 0 affected row (1.161ms) sql> ### Expected Results: sql>SELECT count(*) FROM tst WHERE int_col <> 0; +------+ | L1 | +======+ | 1 | +------+ sql>DELETE FROM tst WHERE int_col <> 0; 1 affected row (1.161ms) ## Comment 20084 Date: 2014-08-22 21:34:04 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [529ee7d9899d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=529ee7d9899d) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=529ee7d9899d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=529ee7d9899d) Changeset description: Fixed bug #3552 and added test. An anti subselect on a reverse ordered bat returned incorrect values since the code didn't properly take the location of NIL values in a reverse sorted bat into account (they come at the end). ## Comment 20085 Date: 2014-08-22 21:43:43 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [0f8e7197777d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0f8e7197777d) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0f8e7197777d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0f8e7197777d) Changeset description: Fixed bug #3552 and added test. An anti subselect on a reverse ordered bat returned incorrect values since the code didn't properly take the location of NIL values in a reverse sorted bat into account (they come at the end). (grafted from 529ee7d9899dabac483cb033790e5ed168735e70) ## Comment 20086 Date: 2014-08-23 21:12:25 +0200 From: @sjoerdmullender Bug is fixed. ## Comment 20107 Date: 2014-08-29 11:34:34 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [752f02a41db4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=752f02a41db4) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=752f02a41db4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=752f02a41db4) Changeset description: After fix of bug #3552 the output of vacuum.sql is now changed. ## Comment 20398 Date: 2014-10-31 14:14:57 +0100 From: @sjoerdmullender Oct2014 has been released.
incorrect data results for "WHERE int_col <> 0"
https://api.github.com/repos/MonetDB/MonetDB/issues/3552/comments
0
2020-11-30T12:54:19Z
2024-06-27T12:04:23Z
https://github.com/MonetDB/MonetDB/issues/3552
753,454,812
3,552
[ "MonetDB", "MonetDB" ]
Date: 2014-08-22 16:11:14 +0200 From: @swingbit To: MonetDB5 devs &lt;<bugs-monetdb5>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @mlkersten, @njnes Last updated: 2014-10-31 14:15:00 +0100 ## Comment 20082 Date: 2014-08-22 16:11:14 +0200 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36 Build Identifier: This happens on a checkout of the (not yet released) Oct2014 branch. I have a 1-column table of 3M strings: sql>\d s CREATE TABLE "sys"."s" ( "value" CHARACTER LARGE OBJECT ); sql>select count(*) from s; +---------+ | L1 | +=========+ | 3077225 | +---------+ 1 tuple (3.096ms) In the following query, the ticks reported for X_16 (13412564) are clearly too many. Notice that the total ticks (1959352) are correct (the query does take 1.9s). sql>trace select * from s where lcase(value) = 'roberto'; +-------+ | value | +=======+ +-------+ 0 tuples (1.9s) +----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ticks | stmt | +==========+===================================================================================================================================================================+ | 8 | X_3 := sql.mvc(); | | 75 | X_7=<tmp_1100>[3077225] := sql.bind(X_3=0,"sys","s","value",0); | | 46 | (X_10=<tmp_22>[0],r1_10=<tmp_36>[0]) := sql.bind(X_3=0,"sys","s","value",2); | | 19 | X_13=<tmp_36>[0] := sql.bind(X_3=0,"sys","s","value",1); | | 12 | X_15=<tmp_1100>[3077225] := sql.delta(X_7=<tmp_1100>[3077225],X_10=<tmp_22>[0],r1_10=<tmp_36>[0],X_13=<tmp_36>[0]); | | 8 | X_16=<tmp_1100>[3077225] := X_15=<tmp_1100>[3077225]; | | 13412564 | X_17:bat[:oid,:str] =<tmp_613>[3077225] := batstr.toLower(X_16=<tmp_1100>[3077225]); | | 88 | X_4:bat[:oid,:oid] =<tmp_1071>[3077225] := sql.tid(X_3=0,"sys","s"); | | 316194 | X_18=<tmp_1061>[0] := algebra.subselect(X_17=<tmp_613>:bat[:oid,:str][3077225],X_4=<tmp_1071>:bat[:oid,:oid][3077225],A0="roberto",A0="roberto",true,true,false); | | 133 | X_20=<tmp_1071>[0] := sql.projectdelta(X_18=<tmp_1061>[0],X_7=<tmp_1100>[3077225],X_10=<tmp_22>[0],r1_10=<tmp_36>[0],X_13=<tmp_36>[0]); | | 28 | X_21 := sql.resultSet(1,1,X_20=<tmp_1071>[0]); | | 27 | sql.rsColumn(X_21=13,"sys.s","value","clob",0,0,X_20=<tmp_1071>[0]); | | 2 | X_25 := io.stdout(); | | 105 | sql.exportResult(X_25=="104d2":streams,X_21=13); | | 2 | end s4_1; | | 13856253 | function user.s4_1(A0="roberto"); | | 1959352 | X_5:void := user.s4_1("roberto"); | +----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 17 tuples (1.9s) Reproducible: Always $ mserver5 --version MonetDB 5 server v11.19.0 (64-bit, 64-bit oids) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 15.6GiB available memory, 8 available cpu cores Libraries: libpcre: 8.33 2013-05-28 (compiled with 8.33) openssl: OpenSSL 1.0.1e 11 Feb 2013 (compiled with OpenSSL 1.0.1e-fips 11 Feb 2013) libxml2: 2.9.1 (compiled with 2.9.1) Compiled by: roberto@photon.spinque.com (x86_64-unknown-linux-gnu) Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code Linking : /usr/bin/ld -m elf_x86_64 ## Comment 20091 Date: 2014-08-25 19:29:36 +0200 From: @njnes this is handled on a lower level than sql... ## Comment 20248 Date: 2014-10-04 23:19:06 +0200 From: @mlkersten Fixed in mal_runtime.c The pci->ticks were double accounted for. ## Comment 20401 Date: 2014-10-31 14:15:00 +0100 From: @sjoerdmullender Oct2014 has been released.
Wrong ticks in TRACE
https://api.github.com/repos/MonetDB/MonetDB/issues/3551/comments
0
2020-11-30T12:54:16Z
2024-06-27T12:04:22Z
https://github.com/MonetDB/MonetDB/issues/3551
753,454,773
3,551
[ "MonetDB", "MonetDB" ]
Date: 2014-08-21 16:34:26 +0200 From: @swingbit To: GDK devs &lt;<bugs-common>&gt; Version: 11.21.19 (Jul2015-SP4) CC: renalkoclok Last updated: 2020-06-03 09:10:58 +0200 ## Comment 20077 Date: 2014-08-21 16:34:26 +0200 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36 Build Identifier: With the rewriting of the grouping code (from Feb2013) - the quality of which I don't object, one the best results of the 10+ years of close collaboration between DB and IR researchers in the group is.. gone! More than 10 years ago Arjen de Vries pointed out that the standard grouping is tuned for few, large groups, while in scenarios like IR, the typical situation is the opposite: many, small groups. That's why the MIL primitives were extended to provide a custom hash mask, and tune the expected number of groups to the specific application. When MonetDB/SQL became the major frontend, this manual tweaking was no longer possible. During the past years I have spent a considerable amount of time to analyze the situation together with Niels and Stefan, who in turn have put quite an effort into making the group size adaptable. Eventually it worked reasonably well in all cases. And now it's all wiped out, and of course the performance on non-uniform distributions is completely unacceptable. I'm not filing this as an "improvement request". The improvement was already there and it costed 10 years of experience from a few people. To me this is a bug that should be fixed as soon as possible. Reproducible: Always ## Comment 20105 Date: 2014-08-29 10:59:16 +0200 From: @swingbit I'd like to add some clarifications to my original report. I realise that unfortunately I let some of the frustration I felt at that moment slip through the keyboard. Sorry about that. I wanted and still want to stress that I found the issue serious, but I should have tried to convey this in a more constructive way, as I always tried to. An update to the issue itself. Thanks for the quick reactions I got from Martin and Niels. The status of things, as I understand it now is: - Feb2013 introduced the new subgroup code, indeed temporarily leaving out the adaptive hashmask. This performed (in my scenarios) much worse than the previous release. - The current code (the not-yet-released Oct2014), however, performs already much better than Feb2013. I understood that the code I was referring to has been at least partially reintroduced. I hope this will be fully available in the release. - In general (looking at complex queries), I noticed Oct2014 is quite faster than Feb2013. ## Comment 27766 Date: 2020-06-03 09:10:58 +0200 From: @sjoerdmullender The content of attachment 667 has been deleted for the following reason: spam
Distribution-adaptive grouping is gone
https://api.github.com/repos/MonetDB/MonetDB/issues/3550/comments
0
2020-11-30T12:54:14Z
2024-06-28T13:16:04Z
https://github.com/MonetDB/MonetDB/issues/3550
753,454,741
3,550
[ "MonetDB", "MonetDB" ]
Date: 2014-08-20 17:59:59 +0200 From: @swingbit To: GDK devs &lt;<bugs-common>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @mlkersten, richard.monetdb Last updated: 2016-03-25 09:59:02 +0100 ## Comment 20070 Date: 2014-08-20 17:59:59 +0200 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36 Build Identifier: Given the following column: +---------+------------+--------+------+----------+---------+-----------+------------+----------+---------+--------+ | schema | table | column | type | location | count | typewidth | columnsize | heapsize | indices | sorted | +=========+============+========+======+==========+=========+===========+============+==========+=========+========+ | spinque | obj_string | value | clob | 15/1561 | 3077225 | 14 | 12308900 | 48234496 | 0 | false | +---------+------------+--------+------+----------+---------+-----------+------------+----------+---------+--------+ Then the following seems too slow to me. It takes 1.7 seconds to perform batstr.toLower on 3M strings (heap is 46MB). I'm not on the latest release, but I suspect this has not changed significantly in the meantime. sql>trace select * from spinque.obj_string where lcase(value) = 'roberto'; +---------+-----------+-------+------+ | subject | attribute | value | prob | +=========+===========+=======+======+ +---------+-----------+-------+------+ 0 tuples (1.7s) +---------+----------------------------------------------------------------------------------------------------------------------------+ | ticks | stmt | +=========+============================================================================================================================+ | 2 | X_3 := sql.mvc(); | | 17 | X_4=<tmp_1561>[3077225] := sql.bind(X_3=0,"spinque","obj_string","value",0); | | 1719116 | X_9:bat[:oid,:str] =<tmp_3671>[3077225] := batstr.toLower(X_4=<tmp_1561>[3077225]); | | 43264 | X_10=<tmp_3670>[0] := algebra.subselect(X_9=<tmp_3671>:bat[:oid,:str][3077225],A0="roberto",A0="roberto",true,true,false); | | 16 | X_12=<tmp_1570>[3077225] := sql.bind(X_3=0,"spinque","obj_string","subject",0); | | 13 | X_14=<tmp_3671>[0] := algebra.leftfetchjoin(X_10=<tmp_3670>[0],X_12=<tmp_1570>[3077225]); | | 5 | X_19=<tmp_1562>[3077225] := sql.bind(X_3=0,"spinque","obj_string","prob",0); | | 7 | X_21=<tmp_3656>[0] := algebra.leftfetchjoin(X_10=<tmp_3670>[0],X_19=<tmp_1562>[3077225]); | | 8 | X_18=<tmp_3660>[0] := algebra.leftfetchjoin(X_10=<tmp_3670>[0],X_4=<tmp_1561>[3077225]); | | 5 | X_15=<tmp_1566>[3077225] := sql.bind(X_3=0,"spinque","obj_string","attribute",0); | | 5 | X_17=<tmp_3655>[0] := algebra.leftfetchjoin(X_10=<tmp_3670>[0],X_15=<tmp_1566>[3077225]); | | 9 | X_22 := sql.resultSet(4,1,X_14=<tmp_3671>[0]); | | 5 | sql.rsColumn(X_22=3,"spinque.obj_string","subject","int",32,0,X_14=<tmp_3671>[0]); | | 3 | sql.rsColumn(X_22=3,"spinque.obj_string","attribute","int",32,0,X_17=<tmp_3655>[0]); | | 3 | sql.rsColumn(X_22=3,"spinque.obj_string","value","clob",0,0,X_18=<tmp_3660>[0]); | | 2 | sql.rsColumn(X_22=3,"spinque.obj_string","prob","double",53,0,X_21=<tmp_3656>[0]); | | 2 | X_35 := io.stdout(); | | 23 | sql.exportResult(X_35=="104d2":streams,X_22=3); | | 1 | end s3_1; | | 1778250 | X_5:void := user.s3_1("roberto"); | +---------+----------------------------------------------------------------------------------------------------------------------------+ 20 tuples (1.7s) Reproducible: Always $ mserver5 --version MonetDB 5 server v11.15.20 (64-bit, 64-bit oids) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 15.6GiB available memory, 8 available cpu cores Libraries: libpcre: 8.33 2013-05-28 (compiled with 8.33) openssl: OpenSSL 1.0.1e 11 Feb 2013 (compiled with OpenSSL 1.0.1e-fips 11 Feb 2013) libxml2: 2.9.1 (compiled with 2.9.1) Compiled by: roberto@photon.spinque.com (x86_64-unknown-linux-gnu) Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code Linking : /usr/bin/ld -m elf_x86_64 ## Comment 20071 Date: 2014-08-20 21:41:29 +0200 From: @mlkersten The code looks optimal, no evident ways to improve it, except when you want ALL strings in the heap to be converted (not part of your case and without transaction support). The costs are in the subselect and the table is too small to trigger the mitosis to kick in and parallelize (or you had it disabled) ## Comment 20072 Date: 2014-08-20 21:45:35 +0200 From: @swingbit Actually the cost is all in the toLower, not in the subselect. The where clause is evaluated after the conversion. ## Comment 20073 Date: 2014-08-21 09:51:23 +0200 From: @swingbit Following up on a short conversation with Martin, I post here some more info. I am aware that this is not considered top priority, but perhaps it comes back useful when someone has a bit of spare time to spend on this. Initially I thought the str.toLower function could be the one to blame. However, repeating the experiment with another string function that changes the string (e.g. replace) gives the same result. So it seems the time is not spent in the toLower function itself, but rather in the heap management. For comparison, I did the same with a naive Java loop (see below), on the same machine, with the exact same strings. The loop reads from an in-memory list of strings and places the results into another in-memory list of strings. Conceptually, pretty much what MonetDB does. The Java loop completes in 390ms, against the 1.7s of MonetDB. Here the code: public static void main(String[] args) throws FileNotFoundException { List<String> l = new ArrayList<String>(); Scanner sc = new Scanner(new File("/opt/spinque/MonetDBServer/strings.lst")); while (sc.hasNext()){ l.add(sc.next()); n++; } sc.close(); long t = System.currentTimeMillis(); List<String> l1 = new ArrayList<String>(n); for(String s: l) { l1.add(s.toLowerCase()); } System.out.println(System.currentTimeMillis() - t); } ## Comment 20074 Date: 2014-08-21 10:04:56 +0200 From: @sjoerdmullender String heap management is not cheap. You could try the following to see whether it makes a difference: In gdk/gdk_atoms.c, in the function strHeap, change the assignment to d->hashash to 0 instead of 1 (and recompile). The value takes effect on new string heaps, so you should notice a difference when you rerun the experiment, even without recreating the database. ## Comment 20075 Date: 2014-08-21 10:30:48 +0200 From: @swingbit Thanks Sjoerd. Unfortunately it help only very marginally. From 1.71s to 1.68s. Something I'm not been very precise about: We said that this takes about 1.7s: select * from spinque.obj_string where lcase(value) = 'roberto'; The following, which I had said takes the same time, takes "only" 1.2s (still too much): select * from spinque.obj_string where replace(value,'s','S') = 'roberto'; Again, all the cost goes into the batstr.replace function. Also here, the change you suggested makes only a small difference: from 1.23s to 1.18s. ## Comment 20076 Date: 2014-08-21 11:08:19 +0200 From: @swingbit Also, as Martin already pointed out, mitosis didn't kick in. However, if I change the query marginally, then it does kick in and brings the time down to 0.5s. For example, from: select * from spinque.obj_string where lcase(value) = 'roberto'; To: select * from spinque.obj_string where length(value)=7 AND lcase(value) = 'roberto'; or select * from spinque.obj_string, q where lcase(value) = q.s; -- with q containing only 'roberto' Notice that the time improvement does not come from smaller intermediate results. The toLower function is still evaluated on all 3M tuples, but in parallel chunks on 384k tuples. I'm not sure why mitosis wouldn't kick in in the original query. Anyway, parallelization helps but is still orthogonal to the original problem about slow operations on string heaps. ## Comment 20078 Date: 2014-08-21 17:31:52 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; It's not as general, but note that your original query can be rewritten as select * from spinque.obj_string where value ilike 'roberto'; This has the dual advantage that it doesn't need to create any temporaries in order to do its thing (because there's only one operator, not a function call and an operator) and that mitosis works. A random bit of testing on one of my large tables has this query being 30 times faster than the alternative formulation. Trickery is needed with parameter generation if your string might need to contain % or _ of course. ## Comment 20079 Date: 2014-08-21 17:37:30 +0200 From: @swingbit Thanks Richard. However all the examples I gave are purely meant to pinpoint the problems I wanted to illustrate. My point was not how to make those queries fast via alternative formulations, but rather point out that those queries as they are should be faster than they are. ## Comment 20080 Date: 2014-08-21 18:01:37 +0200 From: @swingbit Richard, good suggestion though, I appreciate. I admit I never thought of using ilike for this purpose. You're right about the special characters though.. ## Comment 21502 Date: 2015-11-11 09:12:24 +0100 From: @mlkersten Roberto, Does this observation still holds? Can it be closed or turned into a feature request for faster string handling? Since first reporting the manifold() operation has been added and also the many changes to the gdk primitives. ## Comment 21507 Date: 2015-11-11 09:38:16 +0100 From: @swingbit Yes, it seems still the same to me. It's fine to move it to a feature request. ## Comment 21866 Date: 2016-03-07 15:12:22 +0100 From: @swingbit I guess this should now be marked as fixed in next release (http://dev.monetdb.org/hg/MonetDB/rev/43fb721ed302) ## Comment 21867 Date: 2016-03-07 15:21:50 +0100 From: @sjoerdmullender Fixed with changeset [43fb721ed302](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=43fb721ed302) ## Comment 21953 Date: 2016-03-25 09:59:02 +0100 From: @sjoerdmullender Jul2015-SP3 has been released.
bulk string operations very slow
https://api.github.com/repos/MonetDB/MonetDB/issues/3549/comments
0
2020-11-30T12:54:11Z
2024-06-27T12:04:19Z
https://github.com/MonetDB/MonetDB/issues/3549
753,454,705
3,549
[ "MonetDB", "MonetDB" ]
Date: 2014-08-19 17:10:01 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; To: MonetDB5 devs &lt;<bugs-monetdb5>&gt; Version: 11.21.19 (Jul2015-SP4) CC: guillaume.savary, @mlkersten, renalkoclok Last updated: 2020-06-03 09:19:50 +0200 ## Comment 20060 Date: 2014-08-19 17:10:01 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; We subdivide our data set into different tables for each month (i.e. data_201406, data_201407, data_201408, etc.) and then create a union view over the top of those (create view uniondata as select * from data_201406 union all select * from data_201407 union all ...). This is to allow us to delete old data easily and without needing twice as much disk space. Most queries are things like "select g,count(*) from uniondata where event_time>=timestamp '2014-8-15' group by g;" Within that pattern, most real-world queries are for recent data (i.e. the past few days). I tracked down a performance problem to the fact that the mitosis optimizer is only capable of splitting one table in a query, and will choose the table with the largest number of rows as the one that gets split. This interacts badly with our usage because the current month's table is rarely the largest (because the month hasn't finished yet) but it is usually the one that has the most rows needing to be scanned (because previous months' tables are quickly excluded by an index compare on event_time). I think our usage is a fairly typical scenario and hence generally worth optimizing for. Did I explain that well? If not, please tell me and I'll have a go at phrasing it better. I can think of two avenues to explore which could be used to improve performance for us: 1) Enhance mitosis so that it can split more than one table (presumably iff they are being combined with a union; I can imagine it would go badly wrong to split a join). 2) Somehow include index checks as part of mitosis so that it can find the one table that is actually going to have the most rows scanned, rather than a table that is going to be trivially ignored following a later index check. ## Comment 20061 Date: 2014-08-19 18:44:07 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Created attachment 296 Apply mitosis to multiple tables Here's an implementation of (1). It's really bad, but does significantly improve performance for us. There are obvious problems with overload, in this patch makes no attempt to limit the total number of pieces created; we can enforce that kind of thing externally in our system. Although I do not propose that anything like this is applied to MonetDB, I'd really appreciate it if somebody could review this to check that I'm not about to corrupt our database (e.g. by generating a totally wrong answer to select statements). > Attached file: [mitosis-all-tables-bug3548.patch](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3548_mitosis-all-tables-bug3548.patch_296) (text/plain, 2016 bytes) > Description: Apply mitosis to multiple tables ## Comment 20251 Date: 2014-10-04 23:38:05 +0200 From: @mlkersten Thanks for the suggestion and patch. Indeed, a more aggressive mitosis might well be worth the trouble. The patched will be looked into for stability. Likely, it won't make it into the Oct2014 release. ## Comment 20317 Date: 2014-10-27 16:34:57 +0100 From: Guillaume Savary &lt;<guillaume.savary>&gt; We (Securactive) are testing mdb and we have queries with lots of "UNION ALL". So we tested this patch. We saw a huge loss of performance in any cases. In general our queries take twice longer to execute than the default optimizer pipeline without this patch. Surprisingly we also lose performance on the 'no_mitosis' pipeline! * configured with 4 threads (on a 8 cores CPU) * 4 to 10 UNION subqueries of about 4e6 entries each * FS brtfs with lZO compression (which has a low inpact on performances) * branch Oct2014 - one result example with 4 subqueries : no_mitosis: from 1.5s to 3.2s default: from 1.6s to 3.3s - one result example with 10 subqueries no_mitosis: from 4s to 8.5s default: from 3.8s to 8.7s We recompiled monetdb twice, and replayed all our queries to be sure, it is reproductable each time. ## Comment 20318 Date: 2014-10-28 00:27:06 +0100 From: Richard Hughes &lt;<richard.monetdb>&gt; Interesting. I'm still using the patch I posted, on the Oct2014 branch. You could try putting a breakpoint on OPTmitosisImplementation when using the no_mitosis_pipe to see if it's being called at all. Remember to wipe the plan cache before each run. Also look at the EXPLAIN of the two plans to see if mitosis is working (it should be fairly obvious just from the size of the explain). Just guessing from the performance difference, the first thing I'd look at is whether you switched from release build to debug build or something similar. Also look at whether you're enabling the no_mitosis_pipe correctly (there is a '_pipe' on the end of the name: executing "set optimizer='no_mitosis_pipe';" will error out if you use an unknown pipe name). I did mention in comment 1 that there's no overload protection, so it's possible that the slowdown could be caused by running out of RAM due to the plethora of intermediate results and the kernel spilling to disk. That doesn't explain the no_mitosis_pipe results, though. I did notice with larger queries that the patch generates some really huge plans (on the order of 10,000 statements on our big box) which can add several milliseconds to the time taken to compile the query. That time won't affect subsequent runs of the same query, because of the plan cache. I also find it interesting that you're getting very little speed-up (either with or without the patch) from mitosis. One possible explanation is that your query involves functions that don't have bulk implementations - last time I looked in to it, such functions acquired a mutex around their execution and hence, although multiple threads were working on different pieces, mostly only one could run at a time. Also, you may be interested to know that I tried btrfs originally before abandoning it for ext4 because the fallocate calls in MonetDB appeared to interact badly with free space management in btrfs, leading to an apparent steady decrease in free disk space without any corresponding increase in file size. That was on a 3.14 kernel and I didn't feel like doing a load of kernel debugging to figure it out, so I just gave up. Your mileage may vary. ## Comment 20327 Date: 2014-10-31 12:34:33 +0100 From: Richard Hughes &lt;<richard.monetdb>&gt; Created attachment 305 Apply mitosis to multiple tables Here's v2 of my patch, which fixes some of the overload problems with the original. Specifically, it's much smarter about balancing partitioning between both sides of a join operator so that plain "a join b" doesn't result in N^2 partitions (where N=number of CPUs). The earlier naive implementation did produce the correct result for joins, but the pieces were so small and so numerous that MonetDB spent most of its time dispatching instructions and very little actually getting work done, especially in my original scenario where large swathes of the input space were quickly discarded by index checks. This patch instead tries to balance the partitioning between the two tables as follows: big join small: big=N pieces, small=1 piece biga join bigb: biga=N pieces, bigb=1 piece (the one split is the larger, as originally) biga join bigb where bigb.col=42: biga=1 piece, bigb=N pieces (evaluation of the WHERE clause is considered more expensive, so it's worth executing that in parallel and then joining on to bigb) biga join mediumb where mediumb.col=42: biga=N/3 pieces, mediumb=3 pieces (the previous rule prefers to split mediumb but it's only got enough rows for 3 pieces, so we allocate the remaining parallelism to biga) biga join bigb where biga.col=42 and bigb.col=42: biga:sqrt(N) pieces, bigb=sqrt(N) pieces (attempt to balance the evaluation of the WHERE clauses evenly, using the rather dodgy heuristic of 'depth of statements in dependency chain' as a measure of the complexity of each WHERE clause) This code is supposed to work for more-than-2-way joins but we don't use them so I haven't tested that scenario as carefully. We also don't use outer joins and I haven't tested that at all. This update is unlikely to help the author of comment 3 (even if he is using joins) because 4^2 is not really big enough to count as a plan explosion. > Attached file: [multi-mitosis.patch](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3548_multi-mitosis.patch_305) (text/plain, 8595 bytes) > Description: Apply mitosis to multiple tables ## Comment 21266 Date: 2015-09-14 15:22:58 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Created attachment 353 Apply mitosis to multiple tables Just to keep this bug up-to-date, here's the latest (v3) patch I'm using. Changes are: - Rebased to Jul2015 - Memoized markJoinInputs() implementation to fix a case where a query with many tables and many conditions in its WHERE clause was taking minutes to plan. > Attached file: [multi-mitosis.patch](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3548_multi-mitosis.patch_353) (text/plain, 8934 bytes) > Description: Apply mitosis to multiple tables ## Comment 24642 Date: 2016-10-28 17:29:08 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Created attachment 491 Apply mitosis to multiple tables Rebased patch to Jun2016. No functional changes. > Attached file: [multi-mitosis-bug3548.patch](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3548_multi-mitosis-bug3548.patch_491) (text/plain, 9112 bytes) > Description: Apply mitosis to multiple tables ## Comment 27776 Date: 2020-06-03 09:19:50 +0200 From: @sjoerdmullender The content of attachment 677 has been deleted for the following reason: spam
mitosis splits an unhelpful table when applied to unions
https://api.github.com/repos/MonetDB/MonetDB/issues/3548/comments
0
2020-11-30T12:54:08Z
2024-06-28T13:16:04Z
https://github.com/MonetDB/MonetDB/issues/3548
753,454,681
3,548
[ "MonetDB", "MonetDB" ]
Date: 2014-08-19 15:34:41 +0200 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-10-31 14:14:53 +0100 ## Comment 20059 Date: 2014-08-19 15:34:41 +0200 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Build Identifier: When selecting a field from a view, made of several UNION ALL, that doesn't appear in the ORDER clause, the query produce nothing at all. Even TRACE and EXPLAIN show nothing. (The default optimizer "default_pipe" is used.) Queries that show the issues are of the form: SELECT field_A FROM some_view ORDER BY field_B LIMIT 1; The bug *disappear* if using simple UNION instead of UNION ALL. Reproducible: Always ### Steps to Reproduce: Create some set of data: create table foo_1 (id int, value text); insert into foo_1 values (1, 'A'); create table foo_2 (id int, value text); insert into foo_2 values (2, 'B'); create view foo as select * from foo_1 union all select * from foo_2; (Note that replacing UNION ALL with UNION cause the following queries to work.) ### Actual Results: Nothing is produced when selecting a field that is not the one used to sort the result: sql>select id from foo order by value limit 1; <NOTHING> sql>select value from foo order by id limit 1; <NOTHING> sql>explain select id from foo order by value limit 1; <NOTHING> sql>trace select id from foo order by value limit 1; <NOTHING> ### Expected Results: Expected something reassuring regarding MonetDB ability to perform simple SQL queries :/ We're evaluating MonetDB to replace PostgreSQL, and we wonder how such large bugs can pass through the numerous unit tests actually in MonetDB. Performances are wonderful, but we've hard time figuring if the product is robust enough for production environment. Few weeks ago, we also found a bug related to another simple query with UNION ALL (which we filled here, as 3518), so maybe it's kind of related. We don't know. ## Comment 20064 Date: 2014-08-20 12:18:32 +0200 From: @njnes When we push down the limit (topn) all columns should be kept (also the order by column). ## Comment 20066 Date: 2014-08-20 12:22:31 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [36a9402c22b5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=36a9402c22b5) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=36a9402c22b5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=36a9402c22b5) Changeset description: fixed push topn down, also include the order by columns, solves bug #3547. ## Comment 20395 Date: 2014-10-31 14:14:53 +0100 From: @sjoerdmullender Oct2014 has been released.
Empty query when selecting a field from a view made of UNION ALL
https://api.github.com/repos/MonetDB/MonetDB/issues/3547/comments
0
2020-11-30T12:54:05Z
2024-06-27T12:04:17Z
https://github.com/MonetDB/MonetDB/issues/3547
753,454,645
3,547
[ "MonetDB", "MonetDB" ]
Date: 2014-08-19 15:30:19 +0200 From: @hannesmuehleisen To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.13 (Jan2014-SP1) CC: @njnes Last updated: 2014-10-31 14:14:59 +0100 ## Comment 20056 Date: 2014-08-19 15:30:19 +0200 From: @hannesmuehleisen User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.0 Safari/537.36 Build Identifier: Run the following statements create table t(r integer,a integer); insert into t values (1,2),(2,0),(3,null); select case when not (a is null) and a > 0.0 then r/a else -1 end as s from t; Reproducible: Always ### Actual Results: Error message 'division by zero.' ### Expected Results: Result should be returned. Also happens in the Oct2014 branch. Weirdly, select case when not (a is null) and a > 0.0 then r/a else -1 end as s from t; works fine. ## Comment 20057 Date: 2014-08-19 15:32:01 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [2a4c32b79774](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2a4c32b79774) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2a4c32b79774](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2a4c32b79774) Changeset description: Test for Bug #3546 and mc R connector ## Comment 20058 Date: 2014-08-19 15:33:07 +0200 From: @hannesmuehleisen Correction, the breaking query is select case when not (a is null) and a > 0.0 then 1.0*r/a else -1 end as r from t; ## Comment 20062 Date: 2014-08-20 10:57:11 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [9698a5f83bf6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9698a5f83bf6) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9698a5f83bf6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9698a5f83bf6) Changeset description: generalized div detection/rewrites which fixes bug #3546 ## Comment 20102 Date: 2014-08-28 23:33:45 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [440f4e5a5586](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=440f4e5a5586) made by Stefan Manegold <Stefan.Manegold@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=440f4e5a5586](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=440f4e5a5586) Changeset description: ifthenelse.Bug-3546 & round.Bug-3542: approved int128 output ## Comment 20400 Date: 2014-10-31 14:14:59 +0100 From: @sjoerdmullender Oct2014 has been released.
Division by zero in CASE statement that should avoid it
https://api.github.com/repos/MonetDB/MonetDB/issues/3546/comments
0
2020-11-30T12:54:03Z
2024-06-27T12:04:16Z
https://github.com/MonetDB/MonetDB/issues/3546
753,454,614
3,546
[ "MonetDB", "MonetDB" ]
Date: 2014-08-18 16:03:32 +0200 From: @bartscheers To: Merovingian devs &lt;<bugs-merovingian>&gt; Version: 11.21.19 (Jul2015-SP4) CC: anand.chirag, dennis, @kutsurak, @swingbit Last updated: 2017-07-17 16:07:36 +0200 ## Comment 20051 Date: 2014-08-18 16:03:32 +0200 From: @bartscheers User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0 Build Identifier: The monetdb status/create/start etc commands do not work when the -h -p -P options are provided. This is the case either locally and remotely; and for SP2 and SP3. Reproducible: Always ### Steps to Reproduce: 1. Run db on server 2. "monetdb status" issued from server works, "monetdb -hlocalhost -Pmypassphrase -p50000 status" does not work 3. "monetdb -hmydbserver.com -Pmypassphrase -p50000 status" issued from client does not work. ### Actual Results: status: =OK ### Expected Results: In the case of status option the list of available dbs. ## Comment 20052 Date: 2014-08-18 16:06:31 +0200 From: @bartscheers Correction: This works for SP2 and client, but not for SP2 server and SP3 client and not for SP3 server and client. ## Comment 20053 Date: 2014-08-18 16:12:59 +0200 From: @bartscheers This was introduced in the latest version ## Comment 20880 Date: 2015-05-21 15:13:25 +0200 From: Dennis Pallett &lt;<dennis>&gt; I can confirm this bug. I get the exact same results with the Oct2014-SP3 version. For example: ---- monetdb@test:/$ monetdb status name state health remarks onderwijs_dwh R 5m 100% 11m mapi:monetdb://test:50000/onderwijs_dwh fred R 5m 100% 13m mapi:monetdb://test:50000/fred finance_poc R 5m 100% 13m mapi:monetdb://test:50000/finance_poc monetdb@test:/$ monetdb -h localhost -P test status status: =OK --- At present this makes remote management of MonetDB impossible. ## Comment 22158 Date: 2016-05-23 10:29:42 +0200 From: @bartscheers It does not work for all Jul2015 releases. It used to work in the past. Really annoying no remote management can be done. ## Comment 22206 Date: 2016-06-14 07:00:03 +0200 From: Chirag Anand &lt;<anand.chirag>&gt; I am also facing this issue. On the same machine, it works using sudo but not when hostname and passphrase are provided. $ sudo monetdb status demodb R 17h 100% 8m mapi:monetdb://xxxx:50000/demodb $ monetdb -h localhost -P monetdb status status: =OK I have compiled the latest branch: MonetDB-6c4407fe078d. ## Comment 25141 Date: 2017-03-09 10:56:48 +0100 From: @swingbit +1 The issue is still there on Dec2016. ## Comment 25359 Date: 2017-05-31 13:55:12 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [e00fb765660d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e00fb765660d) made by Panagiotis Koutsourakis <kutsurak@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e00fb765660d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e00fb765660d) Changeset description: Daemon was sending wrong answer for authorization request When the password was correct, the server would send one extra new line that confused the client. This commit fixes bug #3545 ## Comment 25368 Date: 2017-06-01 10:46:56 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [b6c67fa1be4d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b6c67fa1be4d) made by Panagiotis Koutsourakis <kutsurak@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b6c67fa1be4d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b6c67fa1be4d) Changeset description: A better fix for bug #3545 Instead of changing the response of the server, change what the client accepts. This way new clients can talk to old servers.
monetdb commands don't work with -h -P -p options (locally and remotely)
https://api.github.com/repos/MonetDB/MonetDB/issues/3545/comments
0
2020-11-30T12:54:00Z
2024-06-27T12:04:15Z
https://github.com/MonetDB/MonetDB/issues/3545
753,454,585
3,545
[ "MonetDB", "MonetDB" ]
Date: 2014-08-18 15:27:16 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-10-31 14:14:56 +0100 ## Comment 20050 Date: 2014-08-18 15:27:16 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; I know that vacuum/reuse/shrink are not officially supported, but I'm hoping that either a quick fix or an alternate way of accomplishing what we want is possible. We're not using foreign keys at all. A rationale for why I'm using unsupported functions is at the bottom of this bug report. Test script: START TRANSACTION; CREATE TABLE "sys"."test_201306" ( "id" BIGINT, "s1" VARCHAR(127), "s2" VARCHAR(127), "s3" VARCHAR(127), "i1" BIGINT, "s4" VARCHAR(127), "s5" VARCHAR(127) ); COPY 5 RECORDS INTO "sys"."test_201306" FROM stdin USING DELIMITERS '\t','\n','"'; 4906 "1-4520.10.1.4.82" "Et8oB.Kf0vmo40-8yTpHAdf" "10.1.4.82" 78911881069979992 "" "" 4907 "1-4564.10.1.4.82" "vn5nB.Kf0vmo40-8yTpHAdf" "10.1.4.82" 78911881069979991 "" "" 4908 "1-4576.10.1.4.82" "sp3pB.Kf0vmo40-8yTpHAdf" "10.1.4.82" 78911881069979993 "" "" 4909 "1-2560.10.1.4.82" "p5dsV5B_3vmo40-8yTpHAdf" "10.1.4.82" 78911885093920348 "" "" 4910 "1-1596.10.1.4.82" "8Q1Z7RnE4vmo40-8yTpHAdf" "10.1.4.82" 78911885778309629 "" "" COMMIT; create table x as select * from test_201306 with data; select id from x; call sys.reuse('sys','x'); select id from x; call sys.reuse('sys','x'); select * from x; ### Expected results: +------+ | id | +======+ | 4906 | | 4907 | | 4908 | | 4909 | | 4910 | +------+ 5 tuples +------+ | id | +======+ | 4906 | | 4907 | | 4908 | | 4909 | | 4910 | +------+ 5 tuples +------+--------------+---------------+-----------+-------------------+------+ | id | s1 | s2 | s3 | i1 | s4 |> +======+==============+===============+===========+===================+======+ | 4906 | 1-4520.10.1. | Et8oB.Kf0vmo4 | 10.1.4.82 | 78911881069979992 | | : : 4.82 : 0-8yTpHAdf : : : : | 4907 | 1-4564.10.1. | vn5nB.Kf0vmo4 | 10.1.4.82 | 78911881069979991 | | : : 4.82 : 0-8yTpHAdf : : : : | 4908 | 1-4576.10.1. | sp3pB.Kf0vmo4 | 10.1.4.82 | 78911881069979993 | | : : 4.82 : 0-8yTpHAdf : : : : | 4909 | 1-2560.10.1. | p5dsV5B_3vmo4 | 10.1.4.82 | 78911885093920348 | | : : 4.82 : 0-8yTpHAdf : : : : | 4910 | 1-1596.10.1. | 8Q1Z7RnE4vmo4 | 10.1.4.82 | 78911885778309629 | | : : 4.82 : 0-8yTpHAdf : : : : +------+--------------+---------------+-----------+-------------------+------+ 5 tuples !1 column dropped! ### Actual results: +------+ | id | +======+ | 4906 | | 4907 | | 4908 | | 4909 | | 4910 | +------+ 5 tuples +----------------------+ | id | +======================+ | 4910 | | 4907 | | 4908 | | 4909 | | -2604246222170760229 | +----------------------+ 5 tuples +----------------------+------------------+----------------------+-----------+ | id | s1 | s2 | s3 |> +======================+==================+======================+===========+ | 4910 | 1-1596.10.1.4.82 | 8Q1Z7RnE4vmo40-8yTpH | 10.1.4.82 | : : : Adf : : | 4907 | 1-4564.10.1.4.82 | vn5nB.Kf0vmo40-8yTpH | 10.1.4.82 | : : : Adf : : | 4908 | 1-4576.10.1.4.82 | sp3pB.Kf0vmo40-8yTpH | 10.1.4.82 | : : : Adf : : | 4909 | 1-2560.10.1.4.82 | p5dsV5B_3vmo40-8yTpH | 10.1.4.82 | : : : Adf : : | -2604246222170760229 | | | | +----------------------+------------------+----------------------+-----------+ 5 tuples !3 columns dropped! The conditions under which it goes wrong are extremely random. If you can't reproduce it then try adding or removing some columns or calling reuse() some more times. It always seems to be the last row of the table that is corrupted. Happens with both Jan2014SP3 release and current Jan2014 HEAD. Our rationale for using reuse() is twofold: we are replicating from a standard row-store into MonetDB for the obvious analytics performance reasons. Our database is mostly-insert but very occasionally a bunch of rows will need to be updated. We used to handle this with UPDATE statements but they were taking on the order of 100ms per row and were causing our replication to get embarrassingly far behind reality; the fix for this was to switch to DELETE+INSERT. Having made that switch we noticed that performance would dive for queries on any table which had ever had a DELETE on it; the performance dive seemed to be associated with an inability to keep an index on that table. Unrelated to the deletions, we also observed that some of our columns were taking up far more disk space than we expected. Notably, varchar columns which have a large number of distinct values (but not all-distinct) appear to switch into a mode whereby they would treat all values as distinct, and thereby consume the full amount of disk space required for that scenario. A call to sys.reuse() would rehash the values of these columns and hence reclaim several hundred GB of disk space. Before jumping for the undocumented features we tried using "create table bar as select * from foo with data" to repack the table but, in addition to being considerably slower than reuse(), this did nothing to rehash varchar columns. I sincerely apologize for my evilness, but hope that you can forgive me enough to look in to the problem in any case. ## Comment 20054 Date: 2014-08-18 17:39:06 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; I just crashed mserver5 (Jan2014 HEAD). I'm not sure whether it's related to this or not. (gdb) bt 0 DELTAproject (result=0x7fe3933d6190, sub=<optimized out>, col=<optimized out>, uid=<optimized out>, uval=0x7fe3933d6170, ins=<optimized out>) at sql.c:2175 1 0x00007fe87c8a247b in runMALsequence (cntxt=0x9cc0, mb=0x7fe392f43b40, startpc=0, stoppc=0, stk=0x7fe3933d48c0, env=0x7fe3d4096630, pcicaller=0x0) at mal_interpreter.c:654 2 0x00007fe87c8a42c5 in DFLOWworker (T=0x9cc0) at mal_dataflow.c:358 3 0x00007fe87b2360a4 in start_thread (arg=0x7fe3d309f700) at pthread_create.c:309 4 0x00007fe87af6b04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 (gdb) p res $1 = (BAT *) 0x0 I was getting "BATproject: does not match always" from queries for a few minutes before this finally happened. The interesting thing was that I was getting that from queries on one table where sys.reuse() had been called recently and from queries on one table where sys.reuse() had never been called. ## Comment 20055 Date: 2014-08-19 14:47:44 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Created attachment 295 Proposed fix How's this for a fix? > Attached file: [reuse-bug3544.patch](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3544_reuse-bug3544.patch_295) (text/plain, 954 bytes) > Description: Proposed fix ## Comment 20094 Date: 2014-08-26 08:31:46 +0200 From: @njnes patch checked into oct2014 which solves this bug. ## Comment 20397 Date: 2014-10-31 14:14:56 +0100 From: @sjoerdmullender Oct2014 has been released.
sys.reuse() corrupts data
https://api.github.com/repos/MonetDB/MonetDB/issues/3544/comments
0
2020-11-30T12:53:56Z
2024-06-27T12:04:14Z
https://github.com/MonetDB/MonetDB/issues/3544
753,454,547
3,544
[ "MonetDB", "MonetDB" ]
Date: 2014-08-15 17:44:20 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-10-31 14:13:46 +0100 ## Comment 20049 Date: 2014-08-15 17:44:20 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0 Build Identifier: for a table such as CREATE TABLE fract_only (id int, val numeric(4,4)); Note that the precision is equal to the scale, so the allowed number of significant digits before the decimal dot should not exceed 0 (4 - 4 = 0). the following SQL are NOT accepted but should be accepted: INSERT INTO fract_only VALUES (1, '-0.9999'); INSERT INTO fract_only VALUES (2, '+0.9999'); the following SQL are accepted but incorrect data is stored: INSERT INTO fract_only VALUES (3, '+.9999'); SELECT * FROM fract_only; -- returns value 2.5535 !! the following SQL are accepted but should error: INSERT INTO fract_only VALUES (4, '0.99995'); -- should fail but is invalidly accepted INSERT INTO fract_only VALUES (5, '0.99999'); -- should fail but is invalidly accepted SELECT * FROM fract_only; -- both show 1.0000 which out of the allowed value range of numeric(4,4) INSERT INTO fract_only VALUES (6, '+0.99995'); -- correctly fails INSERT INTO fract_only VALUES (6, '+.99995'); -- should fail but is invalidly accepted SELECT * FROM fract_only; -- returns value 2.5536 for id 6 !! INSERT INTO fract_only VALUES (7, '-0.99995'); -- correctly fails INSERT INTO fract_only VALUES (7, '-.999998'); -- should fail but is invalidly accepted SELECT * FROM fract_only; -- returns value -0.9999 for id 7 !! Reproducible: Always ### Steps to Reproduce: 1. start mserver (Jan2014-SP3) 2. start mclient in sql mode 3. Run following SQL statements: CREATE TABLE fract_only (id int, val numeric(4,4)); -- not accepted but should accept it: INSERT INTO fract_only VALUES (1, '-0.9999'); INSERT INTO fract_only VALUES (2, '+0.9999'); -- accepted but incorrect data is stored INSERT INTO fract_only VALUES (3, '+.9999'); SELECT * FROM fract_only; -- returns value 2.5535 !! -- accepted but should error INSERT INTO fract_only VALUES (4, '0.99995'); -- should fail but is invalidly accepted INSERT INTO fract_only VALUES (5, '0.99999'); -- should fail but is invalidly accepted SELECT * FROM fract_only; -- both show 1.0000 which out of the allowed value range of numeric(4,4) INSERT INTO fract_only VALUES (6, '+0.99995'); -- correctly fails INSERT INTO fract_only VALUES (6, '+.99995'); -- should fail but is invalidly accepted SELECT * FROM fract_only; -- returns value 2.5536 for id 6 !! INSERT INTO fract_only VALUES (7, '-0.99995'); -- correctly fails INSERT INTO fract_only VALUES (7, '-.999998'); -- should fail but is invalidly accepted SELECT * FROM fract_only; -- returns value -0.9999 for id 7 !! ### Actual Results: Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.17.21 (Jan2014-SP3), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>CREATE TABLE fract_only (id int, val numeric(4,4)); operation successful (9.620ms) sql>INSERT INTO fract_only VALUES (1, '-0.9999'); decimal (-0.9999) doesn't have format (4.4) sql>INSERT INTO fract_only VALUES (2, '+0.9999'); decimal (+0.9999) doesn't have format (4.4) sql>INSERT INTO fract_only VALUES (3, '+.9999'); 1 affected rows (3.821ms) sql>SELECT * FROM fract_only; +------+--------+ | id | val | +======+========+ | 3 | 2.5535 | +------+--------+ 1 tuple (3.390ms) sql>INSERT INTO fract_only VALUES (4, '0.99995'); -- should fail but is invalidly accepted 1 affected rows (2.093ms) sql>INSERT INTO fract_only VALUES (5, '0.99999'); -- should fail but is invalidly accepted 1 affected rows (6.997ms) sql>SELECT * FROM fract_only; +------+--------+ | id | val | +======+========+ | 3 | 2.5535 | | 4 | 1.0000 | | 5 | 1.0000 | +------+--------+ 3 tuples (0.570ms) sql>INSERT INTO fract_only VALUES (6, '+0.99995'); -- correctly fails decimal (+0.99995) doesn't have format (4.4) sql>INSERT INTO fract_only VALUES (6, '+.99995'); -- should fail but is invalidly accepted 1 affected rows (2.074ms) sql>SELECT * FROM fract_only; +------+--------+ | id | val | +======+========+ | 3 | 2.5535 | | 4 | 1.0000 | | 5 | 1.0000 | | 6 | 2.5536 | +------+--------+ 4 tuples (0.900ms) sql>INSERT INTO fract_only VALUES (7, '-0.99995'); -- correctly fails decimal (-0.99995) doesn't have format (4.4) sql>INSERT INTO fract_only VALUES (7, '-.999998'); -- should fail but is invalidly accepted 1 affected rows (2.495ms) sql>SELECT * FROM fract_only; +------+--------+ | id | val | +======+========+ | 3 | 2.5535 | | 4 | 1.0000 | | 5 | 1.0000 | | 6 | 2.5536 | | 7 | -0.9...| +------+--------+ 5 tuples (1.747ms) !1 field truncated! note: to disable dropping columns and/or truncating fields use \w-1 sql> ### Expected Results: see comments in the steps ## Comment 20067 Date: 2014-08-20 14:10:12 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [09da452b2f51](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=09da452b2f51) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=09da452b2f51](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=09da452b2f51) Changeset description: added test for bug #3543 ## Comment 20068 Date: 2014-08-20 14:10:15 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [7dbda0968c84](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7dbda0968c84) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7dbda0968c84](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7dbda0968c84) Changeset description: fixed bug #3543 - properly handle + before decimals - handle rounding properly (ie if round up, check if we still fit inot the digits format) - handle negative rounding properly ## Comment 20069 Date: 2014-08-20 14:11:21 +0200 From: @njnes fixed we didn't check rounded values properly and + wasn't skipped. ## Comment 20336 Date: 2014-10-31 14:13:46 +0100 From: @sjoerdmullender Oct2014 has been released.
invalid behavior and incorrect data results for SQL data type: numeric(4,4)
https://api.github.com/repos/MonetDB/MonetDB/issues/3543/comments
0
2020-11-30T12:53:54Z
2024-06-27T12:04:13Z
https://github.com/MonetDB/MonetDB/issues/3543
753,454,516
3,543
[ "MonetDB", "MonetDB" ]
Date: 2014-08-15 16:29:12 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.17 (Jan2014-SP2) CC: @njnes Last updated: 2014-10-31 14:13:59 +0100 ## Comment 20048 Date: 2014-08-15 16:29:12 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0 Build Identifier: Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.20.0 (unreleased), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>CREATE TABLE test_num_data (id integer, val numeric(18,10)); operation successful (74.403ms) sql>INSERT INTO test_num_data VALUES (1, '-0.0'); 1 affected rows (2.112ms) sql>INSERT INTO test_num_data VALUES (2, '-34338492.215397047'); 1 affected rows (2.752ms) sql>SELECT * FROM test_num_data; +------+----------------------+ | id | val | +======+======================+ | 1 | 0.0000000000 | | 2 | -34338492.2153970470 | +------+----------------------+ 2 tuples (2.587ms) sql>SELECT t1.id, t2.id, t1.val * t2.val FROM test_num_data t1, test_num_data t2; +------+------+----------------------------------------+ | id | id | sql_mul_val | +======+======+========================================+ | 1 | 1 | [000000000000000000000](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=000000000000000000000) | | 1 | 2 | [000000000000000000000](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=000000000000000000000) | | 2 | 1 | [000000000000000000000](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=000000000000000000000) | | 2 | 2 | 1179132047626883.59686213585632020900 | +------+------+----------------------------------------+ 4 tuples (3.749ms) sql>SELECT t1.id, t2.id, round(t1.val * t2.val, 30) FROM test_num_data t1, test_num_data t2; sql> with the last query you will get: mserver5: /ufs/dinther/dev/dev/gdk/gdk_bat.c:2904: BATassertHeadProps: Assertion `!b->H->revsorted || cmp >= 0' failed. Reproducible: Always ### Steps to Reproduce: 1. compile software from default branch and do make install 2. start INSTALL/bin/mserver5 3. start mclient enter following SQL CREATE TABLE test_num_data (id integer, val numeric(18,10)); INSERT INTO test_num_data VALUES (1, '-0.0'); INSERT INTO test_num_data VALUES (2, '-34338492.215397047'); SELECT * FROM test_num_data; SELECT t1.id, t2.id, t1.val * t2.val FROM test_num_data t1, test_num_data t2; SELECT t1.id, t2.id, round(t1.val * t2.val, 30) FROM test_num_data t1, test_num_data t2; ### Actual Results: bash-4.2$ ./start_INSTALL_mserver5.sh builtin opt gdk_dbpath = /ufs/dinther/INSTALL/var/monetdb5/dbfarm/demo builtin opt gdk_debug = 0 builtin opt gdk_vmtrim = no builtin opt monet_prompt = > builtin opt monet_daemon = no builtin opt mapi_port = 50000 builtin opt mapi_open = false builtin opt mapi_autosense = false builtin opt sql_optimizer = default_pipe builtin opt sql_debug = 0 cmdline opt gdk_debug = 10 MonetDB 5 server v11.20.0 This is an unreleased version Serving database 'demo', using 8 threads Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs and 128bit integers dynamically linked Found 15.356 GiB available main-memory. Copyright (c) 1993-July 2008 CWI. Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Listening for connection requests on mapi:monetdb://127.0.0.1:50000/ MonetDB/GIS module loaded MonetDB/SQL module loaded > SQL catalog created, loading sql scripts once loading sql script: 09_like.sql loading sql script: 10_math.sql loading sql script: 11_times.sql loading sql script: 12_url.sql loading sql script: 13_date.sql loading sql script: 14_inet.sql loading sql script: 15_querylog.sql loading sql script: 16_tracelog.sql loading sql script: 19_cluster.sql loading sql script: 20_vacuum.sql loading sql script: 21_dependency_functions.sql loading sql script: 22_clients.sql loading sql script: 23_skyserver.sql loading sql script: 24_zorder.sql loading sql script: 25_debug.sql loading sql script: 26_sysmon.sql loading sql script: 39_analytics.sql loading sql script: 39_analytics_hge.sql loading sql script: 40_geom.sql loading sql script: 40_json.sql loading sql script: 40_json_hge.sql loading sql script: 41_jsonstore.sql loading sql script: 45_uuid.sql loading sql script: 46_gsl.sql loading sql script: 75_storagemodel.sql loading sql script: 80_statistics.sql loading sql script: 80_udf.sql loading sql script: 80_udf_hge.sql loading sql script: 90_generator.sql loading sql script: 99_system.sql WARNING To speedup user.columnsize a bulk operator implementation is needed WARNING To speedup user.heapsize a bulk operator implementation is needed WARNING To speedup user.hashsize a bulk operator implementation is needed WARNING To speedup user.imprintsize a bulk operator implementation is needed mserver5: /ufs/dinther/dev/dev/gdk/gdk_bat.c:2904: BATassertHeadProps: Assertion `!b->H->revsorted || cmp >= 0' failed. ./start_INSTALL_mserver5.sh: line 4: 13529 Aborted ./INSTALL/bin/mserver5 -d10 bash-4.2$ Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.20.0 (unreleased), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>CREATE TABLE test_num_data (id integer, val numeric(18,10)); operation successful (74.403ms) sql>INSERT INTO test_num_data VALUES (1, '-0.0'); 1 affected rows (2.112ms) sql>INSERT INTO test_num_data VALUES (2, '-34338492.215397047'); 1 affected rows (2.752ms) sql>SELECT * FROM test_num_data; +------+----------------------+ | id | val | +======+======================+ | 1 | 0.0000000000 | | 2 | -34338492.2153970470 | +------+----------------------+ 2 tuples (2.587ms) sql>SELECT t1.id, t2.id, t1.val * t2.val FROM test_num_data t1, test_num_data t2; +------+------+----------------------------------------+ | id | id | sql_mul_val | +======+======+========================================+ | 1 | 1 | [000000000000000000000](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=000000000000000000000) | | 1 | 2 | [000000000000000000000](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=000000000000000000000) | | 2 | 1 | [000000000000000000000](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=000000000000000000000) | | 2 | 2 | 1179132047626883.59686213585632020900 | +------+------+----------------------------------------+ 4 tuples (3.749ms) sql>SELECT t1.id, t2.id, round(t1.val * t2.val, 30) FROM test_num_data t1, test_num_data t2; sql> ### Expected Results: no assertion failure ## Comment 20063 Date: 2014-08-20 11:04:55 +0200 From: @njnes we get overflow with these computations on Oct2014 ## Comment 20065 Date: 2014-08-20 12:22:27 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [b3e90980dc9b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b3e90980dc9b) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b3e90980dc9b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b3e90980dc9b) Changeset description: added test for bug #3542 ## Comment 20103 Date: 2014-08-28 23:33:47 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [440f4e5a5586](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=440f4e5a5586) made by Stefan Manegold <Stefan.Manegold@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=440f4e5a5586](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=440f4e5a5586) Changeset description: ifthenelse.Bug-3546 & round.Bug-3542: approved int128 output ## Comment 20349 Date: 2014-10-31 14:13:59 +0100 From: @sjoerdmullender Oct2014 has been released.
gdk/gdk_bat.c:2904: BATassertHeadProps: Assertion `!b->H->revsorted || cmp >= 0' failed.
https://api.github.com/repos/MonetDB/MonetDB/issues/3542/comments
0
2020-11-30T12:53:51Z
2024-06-27T12:04:12Z
https://github.com/MonetDB/MonetDB/issues/3542
753,454,484
3,542
[ "MonetDB", "MonetDB" ]
Date: 2014-08-12 20:17:54 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) Last updated: 2014-08-12 20:44:01 +0200 ## Comment 20038 Date: 2014-08-12 20:17:54 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.58 Safari/537.36 Build Identifier: Competing products to MonetDB support the following SQL syntax to create new tables based on a previous selection. It could be observed as creating a single materialised view, and it follows the syntax semantics of: create view alpha as select 1; by create table alpha as select 1; Column names and types are inferred. Reproducible: Always ## Comment 20039 Date: 2014-08-12 20:23:05 +0200 From: @sjoerdmullender What's wrong with: create table x as select ... with data; ? There is also with no data if you just want the table with inferred types but not the contents. ## Comment 20040 Date: 2014-08-12 20:44:01 +0200 From: @skinkie Consider this feature request fullfilled :) I stumbled on: syntax error, unexpected SCOLON, expecting WITH in: "create table alpha as select 1;" It wasn't clear to me the "with data" suffix was required.
Support CREATE TABLE ... AS SELECT * syntax
https://api.github.com/repos/MonetDB/MonetDB/issues/3541/comments
0
2020-11-30T12:53:49Z
2024-06-27T12:04:11Z
https://github.com/MonetDB/MonetDB/issues/3541
753,454,458
3,541
[ "MonetDB", "MonetDB" ]
Date: 2014-08-12 20:11:08 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-08-12 20:52:10 +0200 ## Comment 20037 Date: 2014-08-12 20:11:08 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.58 Safari/537.36 Build Identifier: At this moment it is not possible to change the column type, or to rename the column. To support preprocessing of column content it would be conveyable to firstly import a column which loosely checked for example as 'text', then update the column for example to replace ',' to '.' and the alter the type to numeric(5,2). Reproducible: Always ## Comment 20041 Date: 2014-08-12 20:52:10 +0200 From: @njnes loading into a temporary table is already possible, there seems no real need for the type change
alter table alter column type
https://api.github.com/repos/MonetDB/MonetDB/issues/3540/comments
0
2020-11-30T12:53:46Z
2024-06-28T13:40:22Z
https://github.com/MonetDB/MonetDB/issues/3540
753,454,420
3,540
[ "MonetDB", "MonetDB" ]
Date: 2014-08-12 20:03:37 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: -- development Last updated: 2016-04-11 11:44:49 +0200 ## Comment 20036 Date: 2014-08-12 20:03:37 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.58 Safari/537.36 Build Identifier: Currently MonetDB supports a variety of ways to use COPY INTO. Since it is the only efficient way, with respect to CSV loading. I wonder if it could be extended to be more adaptive way or give a direction how a general purpose API could make bulk loading into MonetDB better from foreign fileformats. Primary the problems are related to parsing. While dates and timestamps are a good example MonetDB is already graceful about the separator 'T' or ' '. But a general format parameter might be low hanging fruit to allow to import a specific document. Another example are comma's, MonetDB doesn't eat them as points for decimal places, but a way to either handle it gracefully, inside the current locale or adaptive to the choice of the user might make. Hence what would I do if I want to parse column in the format: dd-MM-YYYY or a numeric value with: 1,1 instead of 1.1 without changing a gazillion line source document? It does not seem to be as simple as changing LC_ALL. I understand streaming from STDIN might be an option, what does the core team find feasible? Reproducible: Always
Configurable parsing for ETL and bulk loading
https://api.github.com/repos/MonetDB/MonetDB/issues/3539/comments
0
2020-11-30T12:53:43Z
2024-06-28T13:40:21Z
https://github.com/MonetDB/MonetDB/issues/3539
753,454,398
3,539
[ "MonetDB", "MonetDB" ]
Date: 2014-08-12 09:05:32 +0200 From: @drstmane To: SQL devs &lt;<bugs-sql>&gt; Version: -- development Last updated: 2014-08-13 09:11:41 +0200 ## Comment 20031 Date: 2014-08-12 09:05:32 +0200 From: @drstmane cf., http://monetdb.cwi.nl/testweb/web/showtestoutput.php?serial=52526:6796c6166255&target=GNU-Gentoo-powerpc-assert-dbfarm&module=sql&test=sql%2Ftest%2Fjson%2Fbulkjson&which=out http://monetdb.cwi.nl/testweb/web/showtestoutput.php?serial=52526:6796c6166255&target=GNU-Solaris-sparc-dbfarm&module=sql&test=sql%2Ftest%2Fjson%2Fbulkjson&which=out http://monetdb.cwi.nl/testweb/web/showtestoutput.php?serial=52526:6796c6166255&target=GNU-Solaris-sparcv9-oid32-dbfarm&module=sql&test=sql%2Ftest%2Fjson%2Fbulkjson&which=out http://monetdb.cwi.nl/testweb/web/showtestoutput.php?serial=52526:6796c6166255&target=GNU-Solaris-sparcv9-dbfarm&module=sql&test=sql%2Ftest%2Fjson%2Fbulkjson&which=out ## Comment 20042 Date: 2014-08-13 03:13:52 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [9fa383fb0c33](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9fa383fb0c33) made by Stefan Manegold <Stefan.Manegold@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9fa383fb0c33](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9fa383fb0c33) Changeset description: json.filter() / JSONfilterArray(): fixed bug #3538: type-polymorphic MAL functions need proper type handling in their C implementation! ## Comment 20043 Date: 2014-08-13 09:11:41 +0200 From: @drstmane testing (on default branch with fixe propagated from Oct2014 branch) confirms fix. closing.
[Oct2014]: test sql/test/json/Tests/bulkjson.sql fails on big-endian machines (powerpc & sparc)
https://api.github.com/repos/MonetDB/MonetDB/issues/3538/comments
0
2020-11-30T12:53:41Z
2024-06-27T12:04:08Z
https://github.com/MonetDB/MonetDB/issues/3538
753,454,369
3,538
[ "MonetDB", "MonetDB" ]
Date: 2014-08-11 22:24:09 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-08-13 09:23:25 +0200 ## Comment 20029 Date: 2014-08-11 22:24:09 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.58 Safari/537.36 Build Identifier: CREATE TABLE "sys"."test_a" ( "a" INTEGER ); CREATE TABLE "sys"."test_b" ( "a" INTEGER, "b" INTEGER, "c" INTEGER ); select * from test_a join (select a, b from test_b join test_b as x using (a, c)) as y using (a, b) limit 10; SELECT: identifier 'b' ambiguous To make it unambious I have prefixed test_b. select * from test_a join (select a, test_b.b from test_b join test_b as x using (a, c)) as y using (a, b) limit 10; JOIN: tables 'test_a' and 'y' do not have a matching column 'b' Even casting it with AS: select * from test_a join (select a, test_b.b as b from test_b join test_b as x using (a, c)) as y using (a, b) limit 10; JOIN: tables 'test_a' and 'y' do not have a matching column 'b' Reproducible: Always MonetDB 5 server v11.17.22 (64-bit, 64-bit oids) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 31.4GiB available memory, 8 available cpu cores Libraries: libpcre: 8.33 2013-05-28 (compiled with 8.33) openssl: OpenSSL 1.0.1h 5 Jun 2014 (compiled with OpenSSL 1.0.1h 5 Jun 2014) libxml2: 2.9.1 (compiled with 2.9.1) Compiled by: skinkie@bigdata.openebs.nl (x86_64-unknown-linux-gnu) Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code Linking : /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64 ## Comment 20034 Date: 2014-08-12 12:49:54 +0200 From: @njnes You should rename (alias) the to be joined table test_b, ie the inner query should be select a,A.b from test_b as A join test_b as B using (a,c) ## Comment 20035 Date: 2014-08-12 12:56:42 +0200 From: @skinkie select * from test_a join (select a, z.b from test_b as z join test_b as x using (a, c)) as y using (a, b) limit 10; JOIN: tables 'test_a' and 'y' do not have a matching column 'b' Am I missing something? ## Comment 20044 Date: 2014-08-13 09:23:25 +0200 From: @njnes The error message is completely right, ie test_a doesn't have a column b.
join using fails with ambiguous column
https://api.github.com/repos/MonetDB/MonetDB/issues/3537/comments
0
2020-11-30T12:53:38Z
2024-06-28T13:16:03Z
https://github.com/MonetDB/MonetDB/issues/3537
753,454,329
3,537
[ "MonetDB", "MonetDB" ]
Date: 2014-08-11 21:29:53 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-10-31 14:14:29 +0100 ## Comment 20028 Date: 2014-08-11 21:29:53 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.58 Safari/537.36 Build Identifier: create table test_a (a integer); create table test_b (a smallint); select * from test_a join test_b using (a); TypeException:user.s9_1[28]:'calc.ifthenelse' undefined in: _68:any := calc.ifthenelse(_62:bit, _64:sht, _66:int) program contains errors "ON" works: sql>select * from test_b join test_a on (test_a.a = test_b.a); +---+---+ | a | a | +===+===+ +---+---+ 0 tuples (2.390ms) Reproducible: Always MonetDB 5 server v11.17.22 (64-bit, 64-bit oids) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 31.4GiB available memory, 8 available cpu cores Libraries: libpcre: 8.33 2013-05-28 (compiled with 8.33) openssl: OpenSSL 1.0.1h 5 Jun 2014 (compiled with OpenSSL 1.0.1h 5 Jun 2014) libxml2: 2.9.1 (compiled with 2.9.1) Compiled by: skinkie@bigdata.openebs.nl (x86_64-unknown-linux-gnu) Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code Linking : /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64 ## Comment 20032 Date: 2014-08-12 11:48:04 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [b567ef55eac7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b567ef55eac7) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b567ef55eac7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b567ef55eac7) Changeset description: fixed bug #3536, ie handle different types in using and outer joins ## Comment 20033 Date: 2014-08-12 11:49:00 +0200 From: @njnes fixed 1) the natural join doesn't need the ifthen at all 2) in case of outer joins we need to convert types first ## Comment 20373 Date: 2014-10-31 14:14:29 +0100 From: @sjoerdmullender Oct2014 has been released.
program contains error with join using integer and smallint
https://api.github.com/repos/MonetDB/MonetDB/issues/3536/comments
0
2020-11-30T12:53:35Z
2024-06-27T12:04:06Z
https://github.com/MonetDB/MonetDB/issues/3536
753,454,299
3,536
[ "MonetDB", "MonetDB" ]
Date: 2014-08-10 22:34:57 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: martin.van.dinther Last updated: 2017-03-09 12:29:11 +0100 ## Comment 20020 Date: 2014-08-10 22:34:57 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.58 Safari/537.36 Build Identifier: While making a typo in my ORDER BY part I noticed the following; CREATE TABLE "sys"."test_a" ( "a" INTEGER, "b" INTEGER ); sql>select a from test_a group by a order by c; SELECT: cannot use non GROUP BY column 'c' in query results without an aggregate function Shouldn't the non GROUP BY column error be used in the case that the column actually exists? Hence wouldn't the following be a more appropriate error? sql>select * from test_a order by c; SELECT: identifier 'c' unknown rel_select.c:1778 is actually triggered (unknown column) after which the query arrives at rel_select.c:1776, which seems to be the part of the program flow at rel_order_by, where rel_order_by_column_exp overwrites it. I'm under the impression that in rel_column_ref such distinction is already made, but the error follows the same code path as "SELECT a from test_a group by a order by b". Reproducible: Always MonetDB 5 server v11.17.22 (64-bit, 64-bit oids) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 31.4GiB available memory, 8 available cpu cores Libraries: libpcre: 8.33 2013-05-28 (compiled with 8.33) openssl: OpenSSL 1.0.1h 5 Jun 2014 (compiled with OpenSSL 1.0.1h 5 Jun 2014) libxml2: 2.9.1 (compiled with 2.9.1) Compiled by: skinkie@bigdata.openebs.nl (x86_64-unknown-linux-gnu) Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code Linking : /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64 ## Comment 25142 Date: 2017-03-09 12:25:14 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [5c3f30b84d63](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5c3f30b84d63) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=5c3f30b84d63](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=5c3f30b84d63) Changeset description: Add test for old bug #3535. ## Comment 25143 Date: 2017-03-09 12:29:11 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; The error msg has been improved (in current release Dec2016) by previous code improvements. See also the test output. This issue is resolved.
error message unknown column in order by with group by
https://api.github.com/repos/MonetDB/MonetDB/issues/3535/comments
0
2020-11-30T12:53:32Z
2024-06-27T12:04:05Z
https://github.com/MonetDB/MonetDB/issues/3535
753,454,272
3,535
[ "MonetDB", "MonetDB" ]
Date: 2014-08-10 21:31:59 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-10-31 14:14:38 +0100 ## Comment 20018 Date: 2014-08-10 21:31:59 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.58 Safari/537.36 Build Identifier: I noticed when making a typo; CREATE TABLE "sys"."test_a" ( "a" INTEGER, "b" INTEGER ); CREATE TABLE "sys"."test_b" ( "a" INTEGER, "b" INTEGER ); SELECT * FROM test_a JOIN test_b USING (c); JOIN: tables '' and '' do not have a matching column 'c' Thus I started fixing that based on the rel_dump.c code (patch attached). sql>SELECT * FROM test_a JOIN test_b USING (c); JOIN: tables 'test_a' and 'test_b' do not have a matching column 'c' But something strange started hapening: sql>\d test_a CREATE TABLE "sys"."test_a" ( "a" INTEGER, "b" INTEGER ); MAPI = (monetdb) /tmp/.s.monetdb.50000 QUERY = SELECT i.name, k.name, kc.nr, c.name FROM sys.idxs AS i LEFT JOIN sys.keys AS k ON i.name = k.name, sys.objects AS kc, sys._columns AS c, sys.schemas s, sys._tables AS t WHERE i.table_id = t.id AND i.id = kc.id AND t.id = c.table_id AND kc.name = c.name AND (k.type IS NULL OR k.type = 1) AND t.schema_id = s.id AND s.name = 'sys' AND t.name = 'test_a' ORDER BY i.name, kc.nr ERROR = !SELECT: no such column 'i.table_id' Since the only change I made, outputing a string that would in the "original" case be casted to a NULL (r = NULL) I am quite confused. Removing the "AS" in the JOIN gives me: sql>SELECT idxs.name, keys.name, kc.nr, c.name FROM sys.idxs LEFT JOIN sys.keys ON idxs.name = keys.name, sys.objects AS kc, sys._columns AS c, sys.schemas s, sys._tables AS t WHERE idxs.table_id = t.id AND idxs.id = kc.id AND t.id = c.table_id AND kc.name = c.name AND (keys.type IS NULL OR keys.type = 1) AND t.schema_id = s.id AND s.name = 'sys' AND t.name = 'test_a' ORDER BY idxs.name, kc.nr; +------+------+----+------+ | name | name | nr | name | +======+======+====+======+ +------+------+----+------+ 0 tuples (7.481ms) places where rel_get_name is used: exps = rel_projections(sql, t1, rel_get_name(t1), 1, 1) In the "patched" case the rel_projections query looks: Breakpoint 6, rel_projections (sql=0x7fd1901bd450, rel=0x7fd190129050, tname=0x7fd19000d3e0 "idxs", settname=1, intern=1) at rel_select.c:342 Breakpoint 6, rel_projections (sql=0x7fd1901bd450, rel=0x7fd1901293c0, tname=0x7fd19000cde0 "keys", settname=1, intern=1) at rel_select.c:342 Breakpoint 6, rel_projections (sql=0x7fd1901bd450, rel=0x7fd190129850, tname=0x0, settname=1, intern=1) at rel_select.c:342 Breakpoint 6, rel_projections (sql=0x7fd1901bd450, rel=0x7fd190129050, tname=0x0, settname=1, intern=1) at rel_select.c:342 Breakpoint 6, rel_projections (sql=0x7fd1901bd450, rel=0x7fd1901293c0, tname=0x0, settname=1, intern=1) at rel_select.c:342 Breakpoint 6, rel_projections (sql=0x7fd1901bd450, rel=0x7fd19012ee40, tname=0x0, settname=1, intern=1) at rel_select.c:342 The original case looks like: Breakpoint 1, rel_projections (sql=0x7fa230005450, rel=0x7fa2300c4250, tname=0x0, settname=1, intern=1) at rel_select.c:342 Breakpoint 1, rel_projections (sql=0x7fa230005450, rel=0x7fa2300c45c0, tname=0x0, settname=1, intern=1) at rel_select.c:342 Breakpoint 1, rel_projections (sql=0x7fa230005450, rel=0x7fa2300c4a50, tname=0x0, settname=1, intern=1) at rel_select.c:342 Breakpoint 1, rel_projections (sql=0x7fa230005450, rel=0x7fa2300c4250, tname=0x0, settname=1, intern=1) at rel_select.c:342 Breakpoint 1, rel_projections (sql=0x7fa230005450, rel=0x7fa2300c45c0, tname=0x0, settname=1, intern=1) at rel_select.c:342 Is the patch correct, which uncovers a bug? Or is the patch incorrect and NULL is correct? Reproducible: Always MonetDB 5 server v11.17.22 (64-bit, 64-bit oids) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 31.4GiB available memory, 8 available cpu cores Libraries: libpcre: 8.33 2013-05-28 (compiled with 8.33) openssl: OpenSSL 1.0.1h 5 Jun 2014 (compiled with OpenSSL 1.0.1h 5 Jun 2014) libxml2: 2.9.1 (compiled with 2.9.1) Compiled by: skinkie@bigdata.openebs.nl (x86_64-unknown-linux-gnu) Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code Linking : /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64 ## Comment 20019 Date: 2014-08-10 21:34:32 +0200 From: @skinkie Created attachment 294 Patch which fixes the error message. Errors can be triggered using: \d test_a > Attached file: [invalid-using-3534.diff](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3534_invalid-using-3534.diff_294) (text/plain, 451 bytes) > Description: Patch which fixes the error message. ## Comment 20022 Date: 2014-08-11 15:41:14 +0200 From: @njnes fixed by using rel_name for the error message, the semantics for rel_get_name are needed for the projections ## Comment 20023 Date: 2014-08-11 15:42:35 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [fecd6435c289](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fecd6435c289) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=fecd6435c289](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=fecd6435c289) Changeset description: fixed bug #3534, ie give a proper error message ## Comment 20024 Date: 2014-08-11 15:46:47 +0200 From: @skinkie (In reply to comment 2) > fixed by using rel_name for the error message, the semantics for > rel_get_name are needed for the projections what does rel->r mean in the context of op_basetable? ## Comment 20026 Date: 2014-08-11 17:21:39 +0200 From: @skinkie [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=099546ee941f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=099546ee941f) Suggests nothing :) Question answered. ## Comment 20384 Date: 2014-10-31 14:14:38 +0100 From: @sjoerdmullender Oct2014 has been released.
missing table name with invalid column in join using (and problems after resolving it)
https://api.github.com/repos/MonetDB/MonetDB/issues/3534/comments
0
2020-11-30T12:53:30Z
2024-06-27T12:04:04Z
https://github.com/MonetDB/MonetDB/issues/3534
753,454,246
3,534
[ "MonetDB", "MonetDB" ]
Date: 2014-08-08 16:04:05 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: @njnes, @PedroTadim Last updated: 2019-11-28 10:00:06 +0100 ## Comment 20017 Date: 2014-08-08 16:04:05 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0 Build Identifier: sql>SELECT sum(f1) FROM INTERVAL_TBL; overflow in conversion of 1000 to bte. sql>SELECT avg(f1) FROM INTERVAL_TBL; types sec_interval(13,0) and double(53,0) are not equal for column 'f1' sql>SELECT median(f1) FROM INTERVAL_TBL; overflow in conversion of 1000 to bte. Reproducible: Always ### Steps to Reproduce: 1. start mserver5 (Database: MonetDB v11.17.21 (Jan2014-SP3), 'demo') 2. start mclient 3. enter SQL: CREATE TABLE INTERVAL_TBL (f1 interval second); 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 * FROM INTERVAL_TBL; SELECT count(f1) FROM INTERVAL_TBL; -- next queries fail SELECT sum(f1) FROM INTERVAL_TBL; SELECT avg(f1) FROM INTERVAL_TBL; SELECT median(f1) FROM INTERVAL_TBL; ### Actual Results: sql>select * from interval_tbl; +------------------------------------------------------------------------------+ | f1 | +==============================================================================+ | 1.000 | | 2.000 | | 3.000 | | 4.000 | +------------------------------------------------------------------------------+ 4 tuples (0.574ms) sql>SELECT count(f1) FROM INTERVAL_TBL; +------+ | L1 | +======+ | 4 | +------+ 1 tuple (1.292ms) sql>SELECT sum(f1) FROM INTERVAL_TBL; overflow in conversion of 1000 to bte. sql>SELECT avg(f1) FROM INTERVAL_TBL; types sec_interval(13,0) and double(53,0) are not equal for column 'f1' sql>SELECT median(f1) FROM INTERVAL_TBL; overflow in conversion of 1000 to bte. ### Expected Results: sql>SELECT sum(f1) FROM INTERVAL_TBL; 10 sql>SELECT avg(f1) FROM INTERVAL_TBL; 2.5 sql>SELECT median(f1) FROM INTERVAL_TBL; 2.5 SQL queries: SELECT min(f1) FROM INTERVAL_TBL; and SELECT max(f1) FROM INTERVAL_TBL; work okay ## Comment 20025 Date: 2014-08-11 16:30:18 +0200 From: @njnes I'll move this into a feature request, ie one monetdb sql allows for this easy insert of interval values, but no avg,sum or median is defined over it. Instead of the current auto coercion, an proper implementation of the aggegation of these intervals is needed. ## Comment 27409 Date: 2019-11-13 22:01:36 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; In the Nov2019 release (on 13 nov 2019) the sum() and avg() now work on interval type for the test case. The median() still gives an error: sql>SELECT sum(f1) FROM INTERVAL_TBL; +--------+ | L2 | +========+ | 10.000 | +--------+ 1 tuple sql>SELECT avg(f1) FROM INTERVAL_TBL; +--------------------------+ | L2 | +==========================+ | 2.5 | +--------------------------+ 1 tuple sql>SELECT median(f1) FROM INTERVAL_TBL; overflow in conversion of 1000 to bte. Would be nice if the change made for avg() also is implemented for median(). Is that possible? ## Comment 27412 Date: 2019-11-15 16:55:23 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [9648e02041f6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9648e02041f6) 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=9648e02041f6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=9648e02041f6) Changeset description: Added missing definitions for analytical aggregates on interval types. This fixes bug #3533.
SQL aggregate functions avg(), sum() and median() return an error when used on a column with datatype interval second
https://api.github.com/repos/MonetDB/MonetDB/issues/3533/comments
0
2020-11-30T12:53:27Z
2024-06-27T12:04:03Z
https://github.com/MonetDB/MonetDB/issues/3533
753,454,217
3,533
[ "MonetDB", "MonetDB" ]
Date: 2014-08-07 19:45:21 +0200 From: @drstmane To: MonetDB5 devs &lt;<bugs-monetdb5>&gt; Version: -- development CC: @njnes Last updated: 2014-10-31 14:14:29 +0100 ## Comment 20013 Date: 2014-08-07 19:45:21 +0200 From: @drstmane Several geom tests crash, cf,. http://monetdb.cwi.nl/testweb/web/testgrid.php?serial=52380:7112dfe7e934&order=platform,arch,compiler&targets=Cla-Fedora-x86_64-oid32,Cla-Fedora-x86_64,GNU-Darwin-i386-propcheck,GNU-Darwin-x86_64-oid32,GNU-Darwin-x86_64,GNU-Fedora-x86_64-assert-propcheck,GNU-Fedora-x86_64-dbfarm,GNU-Fedora-x86_64-oid32-assert-propcheck,GNU-Fedora-x86_64-oid32-dbfarm,GNU-Fedora-x86_64-thrs=1-assert,GNU-Fedora-x86_64-thrs=1-propcheck-dist,GNU-Fedora-x86_64-thrs=32-propcheck-rpm,GNU-Fedora-x86_64-thrs=53-assert,GNU-FreeBSD-x86_64,GNU-Gentoo-powerpc-assert-dbfarm,GNU-OpenIndiana-x86_64,GNU-Solaris-sparc-dbfarm,GNU-Solaris-sparcv9-dbfarm,GNU-Solaris-sparcv9-oid32-dbfarm,GNU-Ubuntu-i386-assert-propcheck-dbfarm,Int-Fedora-x86_64-assert,Int-Fedora-x86_64-oid32-assert,Int-Fedora-x86_64-oid32-propcheck,Int-Fedora-x86_64-propcheck,Int-Windows7-x86_64-assert,Int-Windows7-x86_64-oid32-assert,Int-WindowsXP-i386-assert&module=geom after changeset(s) [123fa0b0a7b0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=123fa0b0a7b0) (& dd2ab2bc72e9) ## Comment 20014 Date: 2014-08-07 19:46:04 +0200 From: @drstmane fixed version/branch and platform info ## Comment 20016 Date: 2014-08-07 20:35:34 +0200 From: @njnes Fixed, properly initialize result argument ## Comment 20374 Date: 2014-10-31 14:14:29 +0100 From: @sjoerdmullender Oct2014 has been released.
several geom tests crash after manifold changes
https://api.github.com/repos/MonetDB/MonetDB/issues/3532/comments
0
2020-11-30T12:53:24Z
2024-06-27T12:04:02Z
https://github.com/MonetDB/MonetDB/issues/3532
753,454,177
3,532
[ "MonetDB", "MonetDB" ]
Date: 2014-08-07 12:18:38 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @mlkersten Last updated: 2014-08-07 19:35:55 +0200 ## Comment 20000 Date: 2014-08-07 12:18:38 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.58 Safari/537.36 Build Identifier: I was evaluating the performance of arg IN ('1','2','3') versus (arg = '1' OR arg = '2' OR arg = '3'). When I wanted to do a quick comparison with a hot dataset, I tried only arg = '1'. I noticed that arg IN ('1') was four times faster than arg = '1'. Where arg IN ('1', '2') and (arg = '1' OR arg = '2') had similar performance. The colomn I am using this operation on is highly similar, it has only 7 distinct values. Questions: why is arg IN ('1') not converted to arg = '1'. I would have expected that equality would be faster as general optimisation. trace select count(*) from (select messagetype from kv6_import where messagetype = 'ARRIVAL') as x; [ 3, "X_3 := sql.mvc();" ] [ 16, "X_7=<tmp_1054>[2690528] := sql.bind(X_3=0,\"sys\",\"kv6_import\",\"messagetype\",0);" ] [ 13, "X_4:bat[:oid,:oid] =<tmp_1200>[2690528] := sql.tid(X_3=0,\"sys\",\"kv6_import\");" ] [ 64679, "X_40=<tmp_517>[257129] := algebra.subselect(X_7=<tmp_1054>[2690528],X_4=<tmp_1200>:bat[:oid,:oid][2690528],A0=\"ARRIVAL\",A0=\"ARRIVAL\",true,true,false);" ] [ 10, "(X_10=<tmp_1512>[0],r1_10=<tmp_1526>[0]) := sql.bind(X_3=0,\"sys\",\"kv6_import\",\"messagetype\",2);" ] [ 9, "X_41=<tmp_1707>[0] := algebra.subselect(r1_10=<tmp_1526>[0],A0=\"ARRIVAL\",A0=\"ARRIVAL\",true,true,false);" ] [ 5, "X_13=<tmp_1526>[0] := sql.bind(X_3=0,\"sys\",\"kv6_import\",\"messagetype\",1);" ] [ 7, "X_42=<tmp_1765>[0] := algebra.subselect(X_13=<tmp_1526>[0],X_4=<tmp_1200>:bat[:oid,:oid][2690528],A0=\"ARRIVAL\",A0=\"ARRIVAL\",true,true,false);" ] [ 3, "X_15=<tmp_517>[257129] := sql.subdelta(X_40=<tmp_517>[257129],X_4=<tmp_1200>:bat[:oid,:oid][2690528],X_10=<tmp_1512>[0],X_41=<tmp_1707>[0],X_42=<tmp_1765>[0]);" ] [ 49039, "X_17=<tmp_1765>[257129] := sql.projectdelta(X_15=<tmp_517>[257129],X_7=<tmp_1054>[2690528],X_10=<tmp_1512>[0],r1_10=<tmp_1526>[0],X_13=<tmp_1526>[0]);" ] [ 4, "X_18 := aggr.count(X_17=<tmp_1765>[257129]);" ] [ 9, "sql.exportValue(1,\"sys.L1\",\"L1\",\"wrd\",64,0,6,X_18=257129:wrd,\"\");" ] [ 1, "end s20_1;" ] [ 115045, "function user.s20_1(A0=\"ARRIVAL\");" ] [ 115086, "X_5:void := user.s20_1(\"ARRIVAL\");" ] opposed to: trace select count(*) from (select messagetype from kv6_import where messagetype IN ('ARRIVAL')) as x; [ 7, "X_3 := sql.mvc();" ] [ 28, "X_51:bat[:oid,:str] =<tmp_2002>[336316] := sql.bind(X_3=0,\"sys\",\"kv6_import\",\"messagetype\",0,0,8);" ] [ 21, "X_48:bat[:oid,:oid] =<tmp_2050>[336316] := sql.tid(X_3=0,\"sys\",\"kv6_import\",6,8);" ] [ 90, "(X_70:bat[:oid,:oid] =<tmp_1512>[0],X_71:bat[:oid,:str] =<tmp_1526>[0]) := sql.bind(X_3=0,\"sys\",\"kv6_import\",\"messagetype\",2,5,8);" ] [ 32, "X_50:bat[:oid,:oid] =<tmp_1445>[336316] := sql.tid(X_3=0,\"sys\",\"kv6_import\",7,8);" ] [ 14, "X_56:bat[:oid,:str] =<tmp_1775>[336316] := sql.bind(X_3=0,\"sys\",\"kv6_import\",\"messagetype\",0,5,8);" ] [ 48, "(X_67:bat[:oid,:oid] =<tmp_1512>[0],X_68:bat[:oid,:str] =<tmp_1526>[0]) := sql.bind(X_3=0,\"sys\",\"kv6_import\",\"messagetype\",2,4,8);" ] [ 9, "X_100=<tmp_1177>[0] := algebra.subselect(X_68=<tmp_1526>:bat[:oid,:str][0],A0=\"ARRIVAL\",A0=\"ARRIVAL\",true,true,false);" ] [ 8, "X_44:bat[:oid,:oid] =<tmp_1240>[336316] := sql.tid(X_3=0,\"sys\",\"kv6_import\",4,8);" ] [ 13, "X_55:bat[:oid,:str] =<tmp_2046>[336316] := sql.bind(X_3=0,\"sys\",\"kv6_import\",\"messagetype\",0,4,8);" ] [ 23, "X_9=<tmp_1526>[0] := sql.bind(X_3=0,\"sys\",\"kv6_import\",\"messagetype\",1);" ] [ 88, "(X_74:bat[:oid,:oid] =<tmp_1512>[0],X_75:bat[:oid,:str] =<tmp_1526>[0]) := sql.bind(X_3=0,\"sys\",\"kv6_import\",\"messagetype\",2,7,8);" ] [ 36, "X_58:bat[:oid,:str] =<tmp_2047>[336316] := sql.bind(X_3=0,\"sys\",\"kv6_import\",\"messagetype\",0,7,8);" ] [ 19, "X_33=<tmp_2005>[0] := algebra.subselect(X_9=<tmp_1526>[0],X_50=<tmp_1445>:bat[:oid,:oid][336316],A0=\"ARRIVAL\",A0=\"ARRIVAL\",true,true,false);" ] [ 14, "X_102=<tmp_1072>[0] := algebra.subselect(X_71=<tmp_1526>:bat[:oid,:str][0],A0=\"ARRIVAL\",A0=\"ARRIVAL\",true,true,false);" ] [ 54, "(X_65:bat[:oid,:oid] =<tmp_1512>[0],X_66:bat[:oid,:str] =<tmp_1526>[0]) := sql.bind(X_3=0,\"sys\",\"kv6_import\",\"messagetype\",2,3,8);" ] [ 9, "X_98=<tmp_2040>[0] := algebra.subselect(X_66=<tmp_1526>:bat[:oid,:str][0],A0=\"ARRIVAL\",A0=\"ARRIVAL\",true,true,false);" ] [ 11, "X_54:bat[:oid,:str] =<tmp_2014>[336316] := sql.bind(X_3=0,\"sys\",\"kv6_import\",\"messagetype\",0,3,8);" ] [ 34, "(X_63:bat[:oid,:oid] =<tmp_1512>[0],X_64:bat[:oid,:str] =<tmp_1526>[0]) := sql.bind(X_3=0,\"sys\",\"kv6_import\",\"messagetype\",2,2,8);" ] [ 7, "X_96=<tmp_1761>[0] := algebra.subselect(X_64=<tmp_1526>:bat[:oid,:str][0],A0=\"ARRIVAL\",A0=\"ARRIVAL\",true,true,false);" ] [ 7, "X_40:bat[:oid,:oid] =<tmp_1121>[336316] := sql.tid(X_3=0,\"sys\",\"kv6_import\",2,8);" ] [ 11, "X_53:bat[:oid,:str] =<tmp_2006>[336316] := sql.bind(X_3=0,\"sys\",\"kv6_import\",\"messagetype\",0,2,8);" ] [ 10, "X_46:bat[:oid,:oid] =<tmp_2033>[336316] := sql.tid(X_3=0,\"sys\",\"kv6_import\",5,8);" ] [ 16, "X_42:bat[:oid,:oid] =<tmp_461>[336316] := sql.tid(X_3=0,\"sys\",\"kv6_import\",3,8);" ] [ 70, "(X_72:bat[:oid,:oid] =<tmp_1512>[0],X_73:bat[:oid,:str] =<tmp_1526>[0]) := sql.bind(X_3=0,\"sys\",\"kv6_import\",\"messagetype\",2,6,8);" ] [ 17, "X_104=<tmp_1323>[0] := algebra.subselect(X_73=<tmp_1526>:bat[:oid,:str][0],A0=\"ARRIVAL\",A0=\"ARRIVAL\",true,true,false);" ] [ 48, "(X_61:bat[:oid,:oid] =<tmp_1512>[0],X_62:bat[:oid,:str] =<tmp_1526>[0]) := sql.bind(X_3=0,\"sys\",\"kv6_import\",\"messagetype\",2,1,8);" ] [ 12, "X_94=<tmp_2004>[0] := algebra.subselect(X_62=<tmp_1526>:bat[:oid,:str][0],A0=\"ARRIVAL\",A0=\"ARRIVAL\",true,true,false);" ] [ 15, "X_38:bat[:oid,:oid] =<tmp_1053>[336316] := sql.tid(X_3=0,\"sys\",\"kv6_import\",1,8);" ] [ 15, "X_52:bat[:oid,:str] =<tmp_520>[336316] := sql.bind(X_3=0,\"sys\",\"kv6_import\",\"messagetype\",0,1,8);" ] [ 19, "X_57:bat[:oid,:str] =<tmp_2041>[336316] := sql.bind(X_3=0,\"sys\",\"kv6_import\",\"messagetype\",0,6,8);" ] [ 11, "X_106=<tmp_2043>[0] := algebra.subselect(X_75=<tmp_1526>:bat[:oid,:str][0],A0=\"ARRIVAL\",A0=\"ARRIVAL\",true,true,false);" ] [ 60, "(X_59:bat[:oid,:oid] =<tmp_1512>[0],X_60:bat[:oid,:str] =<tmp_1526>[0]) := sql.bind(X_3=0,\"sys\",\"kv6_import\",\"messagetype\",2,0,8);" ] [ 9, "X_92=<tmp_2053>[0] := algebra.subselect(X_60=<tmp_1526>:bat[:oid,:str][0],A0=\"ARRIVAL\",A0=\"ARRIVAL\",true,true,false);" ] [ 10, "X_36:bat[:oid,:oid] =<tmp_1777>[336316] := sql.tid(X_3=0,\"sys\",\"kv6_import\",0,8);" ] [ 11448, "X_85=<tmp_1346>[29606] := algebra.subselect(X_53=<tmp_2006>:bat[:oid,:str][336316],X_40=<tmp_1121>:bat[:oid,:oid][336316],A0=\"ARRIVAL\",A0=\"ARRIVAL\",true,true,false);" ] [ 7, "X_109=<tmp_1346>[29606] := sql.subdelta(X_85=<tmp_1346>[29606],X_40=<tmp_1121>:bat[:oid,:oid][336316],X_63=<tmp_1512>:bat[:oid,:oid][0],X_96=<tmp_1761>[0]);" ] [ 14015, "X_87=<tmp_2042>[30391] := algebra.subselect(X_55=<tmp_2046>:bat[:oid,:str][336316],X_44=<tmp_1240>:bat[:oid,:oid][336316],A0=\"ARRIVAL\",A0=\"ARRIVAL\",true,true,false);" ] [ 5, "X_111=<tmp_2042>[30391] := sql.subdelta(X_87=<tmp_2042>[30391],X_44=<tmp_1240>:bat[:oid,:oid][336316],X_67=<tmp_1512>:bat[:oid,:oid][0],X_100=<tmp_1177>[0]);" ] [ 14434, "X_90=<tmp_2044>[32997] := algebra.subselect(X_58=<tmp_2047>:bat[:oid,:str][336316],X_50=<tmp_1445>:bat[:oid,:oid][336316],A0=\"ARRIVAL\",A0=\"ARRIVAL\",true,true,false);" ] [ 5, "X_114=<tmp_2044>[32997] := sql.subdelta(X_90=<tmp_2044>[32997],X_50=<tmp_1445>:bat[:oid,:oid][336316],X_74=<tmp_1512>:bat[:oid,:oid][0],X_106=<tmp_2043>[0],X_33=<tmp_2005>[0]);" ] [ 13997, "X_88=<tmp_1705>[29049] := algebra.subselect(X_56=<tmp_1775>:bat[:oid,:str][336316],X_46=<tmp_2033>:bat[:oid,:oid][336316],A0=\"ARRIVAL\",A0=\"ARRIVAL\",true,true,false);" ] [ 5, "X_112=<tmp_1705>[29049] := sql.subdelta(X_88=<tmp_1705>[29049],X_46=<tmp_2033>:bat[:oid,:oid][336316],X_70=<tmp_1512>:bat[:oid,:oid][0],X_102=<tmp_1072>[0]);" ] [ 14428, "X_86=<tmp_2021>[33523] := algebra.subselect(X_54=<tmp_2014>:bat[:oid,:str][336316],X_42=<tmp_461>:bat[:oid,:oid][336316],A0=\"ARRIVAL\",A0=\"ARRIVAL\",true,true,false);" ] [ 5, "X_110=<tmp_2021>[33523] := sql.subdelta(X_86=<tmp_2021>[33523],X_42=<tmp_461>:bat[:oid,:oid][336316],X_65=<tmp_1512>:bat[:oid,:oid][0],X_98=<tmp_2040>[0]);" ] [ 13682, "X_84=<tmp_623>[33655] := algebra.subselect(X_52=<tmp_520>:bat[:oid,:str][336316],X_38=<tmp_1053>:bat[:oid,:oid][336316],A0=\"ARRIVAL\",A0=\"ARRIVAL\",true,true,false);" ] [ 5, "X_108=<tmp_623>[33655] := sql.subdelta(X_84=<tmp_623>[33655],X_38=<tmp_1053>:bat[:oid,:oid][336316],X_61=<tmp_1512>:bat[:oid,:oid][0],X_94=<tmp_2004>[0]);" ] [ 14151, "X_89=<tmp_1763>[35069] := algebra.subselect(X_57=<tmp_2041>:bat[:oid,:str][336316],X_48=<tmp_2050>:bat[:oid,:oid][336316],A0=\"ARRIVAL\",A0=\"ARRIVAL\",true,true,false);" ] [ 4, "X_113=<tmp_1763>[35069] := sql.subdelta(X_89=<tmp_1763>[35069],X_48=<tmp_2050>:bat[:oid,:oid][336316],X_72=<tmp_1512>:bat[:oid,:oid][0],X_104=<tmp_1323>[0]);" ] [ 14122, "X_83=<tmp_1304>[32839] := algebra.subselect(X_51=<tmp_2002>:bat[:oid,:str][336316],X_36=<tmp_1777>:bat[:oid,:oid][336316],A0=\"ARRIVAL\",A0=\"ARRIVAL\",true,true,false);" ] [ 5, "X_107=<tmp_1304>[32839] := sql.subdelta(X_83=<tmp_1304>[32839],X_36=<tmp_1777>:bat[:oid,:oid][336316],X_59=<tmp_1512>:bat[:oid,:oid][0],X_92=<tmp_2053>[0]);" ] [ 9903, "X_117=<tmp_1761>[29606] := sql.projectdelta(X_109=<tmp_1346>[29606],X_53=<tmp_2006>:bat[:oid,:str][336316],X_63=<tmp_1512>:bat[:oid,:oid][0],X_64=<tmp_1526>:bat[:oid,:str][0]);" ] [ 4, "language.pass(X_64=<tmp_1526>:bat[:oid,:str][0]);" ] [ 3, "language.pass(X_40=<tmp_1121>:bat[:oid,:oid][336316]);" ] [ 2, "language.pass(X_53=<tmp_2006>:bat[:oid,:str][336316]);" ] [ 3, "language.pass(X_63=<tmp_1512>:bat[:oid,:oid][0]);" ] [ 3, "language.pass(X_44=<tmp_1240>:bat[:oid,:oid][336316]);" ] [ 2, "language.pass(X_50=<tmp_1445>:bat[:oid,:oid][336316]);" ] [ 3, "language.pass(X_46=<tmp_2033>:bat[:oid,:oid][336316]);" ] [ 3, "language.pass(X_42=<tmp_461>:bat[:oid,:oid][336316]);" ] [ 2, "language.pass(X_38=<tmp_1053>:bat[:oid,:oid][336316]);" ] [ 2, "language.pass(X_48=<tmp_2050>:bat[:oid,:oid][336316]);" ] [ 10175, "X_119=<tmp_1177>[30391] := sql.projectdelta(X_111=<tmp_2042>[30391],X_55=<tmp_2046>:bat[:oid,:str][336316],X_67=<tmp_1512>:bat[:oid,:oid][0],X_68=<tmp_1526>:bat[:oid,:str][0]);" ] [ 4, "language.pass(X_55=<tmp_2046>:bat[:oid,:str][336316]);" ] [ 6, "X_128 := aggr.count(X_119=<tmp_1177>[30391]);" ] [ 4, "language.pass(X_68=<tmp_1526>:bat[:oid,:str][0]);" ] [ 3, "language.pass(X_67=<tmp_1512>:bat[:oid,:oid][0]);" ] [ 4, "X_126 := aggr.count(X_117=<tmp_1761>[29606]);" ] [ 3, "language.pass(X_36=<tmp_1777>:bat[:oid,:oid][336316]);" ] [ 10593, "X_122=<tmp_2005>[32997] := sql.projectdelta(X_114=<tmp_2044>[32997],X_58=<tmp_2047>:bat[:oid,:str][336316],X_74=<tmp_1512>:bat[:oid,:oid][0],X_75=<tmp_1526>:bat[:oid,:str][0],X_9=<tmp_1526>[0]);" ] [ 3, "language.pass(X_58=<tmp_2047>:bat[:oid,:str][336316]);" ] [ 6, "language.pass(X_9=<tmp_1526>[0]);" ] [ 6, "language.pass(X_75=<tmp_1526>:bat[:oid,:str][0]);" ] [ 10085, "X_120=<tmp_1072>[29049] := sql.projectdelta(X_112=<tmp_1705>[29049],X_56=<tmp_1775>:bat[:oid,:str][336316],X_70=<tmp_1512>:bat[:oid,:oid][0],X_71=<tmp_1526>:bat[:oid,:str][0]);" ] [ 6, "X_131 := aggr.count(X_122=<tmp_2005>[32997]);" ] [ 5, "language.pass(X_74=<tmp_1512>:bat[:oid,:oid][0]);" ] [ 4, "language.pass(X_56=<tmp_1775>:bat[:oid,:str][336316]);" ] [ 6, "X_129 := aggr.count(X_120=<tmp_1072>[29049]);" ] [ 7, "language.pass(X_71=<tmp_1526>:bat[:oid,:str][0]);" ] [ 10983, "X_118=<tmp_2040>[33523] := sql.projectdelta(X_110=<tmp_2021>[33523],X_54=<tmp_2014>:bat[:oid,:str][336316],X_65=<tmp_1512>:bat[:oid,:oid][0],X_66=<tmp_1526>:bat[:oid,:str][0]);" ] [ 4, "language.pass(X_54=<tmp_2014>:bat[:oid,:str][336316]);" ] [ 6, "X_127 := aggr.count(X_118=<tmp_2040>[33523]);" ] [ 8516, "X_115=<tmp_2053>[32839] := sql.projectdelta(X_107=<tmp_1304>[32839],X_51=<tmp_2002>:bat[:oid,:str][336316],X_59=<tmp_1512>:bat[:oid,:oid][0],X_60=<tmp_1526>:bat[:oid,:str][0]);" ] [ 4, "language.pass(X_51=<tmp_2002>:bat[:oid,:str][336316]);" ] [ 4, "language.pass(X_60=<tmp_1526>:bat[:oid,:str][0]);" ] [ 5, "language.pass(X_70=<tmp_1512>:bat[:oid,:oid][0]);" ] [ 11564, "X_116=<tmp_2004>[33655] := sql.projectdelta(X_108=<tmp_623>[33655],X_52=<tmp_520>:bat[:oid,:str][336316],X_61=<tmp_1512>:bat[:oid,:oid][0],X_62=<tmp_1526>:bat[:oid,:str][0]);" ] [ 7, "language.pass(X_65=<tmp_1512>:bat[:oid,:oid][0]);" ] [ 3, "language.pass(X_52=<tmp_520>:bat[:oid,:str][336316]);" ] [ 4, "language.pass(X_61=<tmp_1512>:bat[:oid,:oid][0]);" ] [ 8, "X_124 := aggr.count(X_115=<tmp_2053>[32839]);" ] [ 11590, "X_121=<tmp_1323>[35069] := sql.projectdelta(X_113=<tmp_1763>[35069],X_57=<tmp_2041>:bat[:oid,:str][336316],X_72=<tmp_1512>:bat[:oid,:oid][0],X_73=<tmp_1526>:bat[:oid,:str][0]);" ] [ 4, "X_125 := aggr.count(X_116=<tmp_2004>[33655]);" ] [ 3, "language.pass(X_57=<tmp_2041>:bat[:oid,:str][336316]);" ] [ 10, "X_130 := aggr.count(X_121=<tmp_1323>[35069]);" ] [ 5, "language.pass(X_72=<tmp_1512>:bat[:oid,:oid][0]);" ] [ 12, "X_123=<tmp_1323>[8] := mat.pack(X_124=32839:wrd,X_125=33655:wrd,X_126=29606:wrd,X_127=33523:wrd,X_128=30391:wrd,X_129=29049:wrd,X_130=35069:wrd,X_131=32997:wrd);" ] [ 4, "X_132=<tmp_1323>[8] := algebra.selectNotNil(X_123=<tmp_1323>[8]);" ] [ 19, "X_12 := aggr.sum(X_132=<tmp_1323>[8]);" ] [ 4, "language.pass(X_59=<tmp_1512>:bat[:oid,:oid][0]);" ] [ 6, "language.pass(X_66=<tmp_1526>:bat[:oid,:str][0]);" ] [ 5, "language.pass(X_62=<tmp_1526>:bat[:oid,:str][0]);" ] [ 11, "language.pass(X_73=<tmp_1526>:bat[:oid,:str][0]);" ] [ 33198, "barrier X_166 := language.dataflow();" ] [ 11, "sql.exportValue(1,\"sys.L1\",\"L1\",\"wrd\",64,0,6,X_12=257129:wrd,\"\");" ] [ 2, "end s19_1;" ] [ 33358, "function user.s19_1(A0=\"ARRIVAL\");" ] [ 33415, "X_5:void := user.s19_1(\"ARRIVAL\");" ] Reproducible: Always MonetDB 5 server v11.17.22 (64-bit, 64-bit oids) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 31.4GiB available memory, 8 available cpu cores Libraries: libpcre: 8.33 2013-05-28 (compiled with 8.33) openssl: OpenSSL 1.0.1h 5 Jun 2014 (compiled with OpenSSL 1.0.1h 5 Jun 2014) libxml2: 2.9.1 (compiled with 2.9.1) Compiled by: skinkie@bigdata.openebs.nl (x86_64-unknown-linux-gnu) Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code Linking : /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64 ## Comment 20001 Date: 2014-08-07 13:32:09 +0200 From: @mlkersten In general this optimization does not hold. A point query can be fast if there is a hash already available, i.e. a hot table. This is not known at compile /optimize time. For intermediates, it would be even more complicated. A complete performance analysis would be needed to pin the need for a software change and possibly complicate the SQL compiler. Moreover, for a limited number of values, the imprints should already take care of most of the performance. regards, Martin ## Comment 20002 Date: 2014-08-07 13:40:06 +0200 From: @skinkie (In reply to comment 1) > A complete performance analysis would be needed to pin the need > for a software change and possibly complicate the SQL compiler. > Moreover, for a limited number of values, the imprints should already take > care of most of the performance. In the context of databases, what does "imprints" mean? ## Comment 20004 Date: 2014-08-07 14:04:16 +0200 From: @skinkie What in the current optisation causes the rewrite of the x = 1 OR x = 2 to an more efficient plan in this specific use case? Is the general statistic of selectivity per column unavailable as meta data? select count(*) from (select messagetype from kv6_import where messagetype = 'ARRIVAL' OR messagetype = 'DEPARTURE') as x; The above is roughly 3 times as fast as the single messagetype = 'ARRIVAL' so something triggers an more advanced method to be used. Probably it is the query. The most interesting this is that even with a completely different column which has all the same values (hence column to is a constant) the performance is 3 times faster than using IN. select count(*) from (select messagetype from kv6_import where messagetype = 'ARRIVAL' OR dataownercode = 'HTM' ) as x; +---------+ | L1 | +=========+ | 2690528 | +---------+ 1 tuple (17.128ms) select count(*) from (select messagetype from kv6_import where messagetype = 'ARRIVAL' OR TRUE ) as x; +---------+ | L1 | +=========+ | 2690528 | +---------+ 1 tuple (22.590ms) select count(*) from (select messagetype from kv6_import where messagetype IN ('ARRIVAL')) as x; +--------+ | L1 | +========+ | 257129 | +--------+ 1 tuple (28.649ms) sql>select count(*) from (select messagetype from kv6_import where messagetype = 'ARRIVAL') as x; +--------+ | L1 | +========+ | 257129 | +--------+ 1 tuple (114.578ms) So about the data: sql>select count(distinct messagetype) from "sys"."kv6_import" ; +------+ | L1 | +======+ | 7 | +------+ 1 tuple (89.171ms) sql>select count(distinct dataownercode) from "sys"."kv6_import" ; +------+ | L1 | +======+ | 1 | +------+ 1 tuple (12.863ms) To reproduce this is the table definition: CREATE TABLE "sys"."kv6_import" ( "receive" TIMESTAMP NOT NULL, "message" TIMESTAMP NOT NULL, "vehicle" TIMESTAMP NOT NULL, "messagetype" VARCHAR(10) NOT NULL, "operatingday" DATE NOT NULL, "dataownercode" VARCHAR(10) NOT NULL, "lineplanningnumber" VARCHAR(10), "journeynumber" INTEGER NOT NULL, "reinforcementnumber" INTEGER NOT NULL, "userstopcode" VARCHAR(10), "passagesequencenumber" INTEGER, "distancesincelastuserstop" INTEGER, "punctuality" INTEGER, "rd_x" VARCHAR(11), "rd_y" VARCHAR(11), "blockcode" INTEGER, "vehiclenumber" INTEGER, "wheelchairaccessible" VARCHAR(5), "source" VARCHAR(10) NOT NULL, "numberofcoaches" INTEGER ); Given the above output, I even believe this is not a feature request but a bug. ## Comment 20005 Date: 2014-08-07 14:29:30 +0200 From: @mlkersten "In the current optisation causes the rewrite of the x = 1 OR x = 2 to an more efficient plan in this specific use case? Is the general statistic of selectivity per column unavailable as meta data?" The query optimizer does not rely on cost statistics. It is all rule based. Rules are added with greate care, because their interference may counter the objectives. "The most interesting this is that even with a completely different column which has all the same values (hence column to is a constant) the performance is 3 times faster than using IN." No surprise at all. A constant column is recognized as being sorted and this leads to fast select. Imprints are the novel indexing scheme to speedup scans. This leads to effectively a bitmask to find elements quickly. They are enabled by default in the current releases. Hope to have shed some light on this issue. Further improvement in this area I consider more a feature request then a bug. ## Comment 20006 Date: 2014-08-07 14:40:20 +0200 From: @skinkie Thanks for this enlightenment. I noticed that I should have not used OR when trying it on multiple columns instead of values but should have used AND. As reference: sql>select count(*) from (select messagetype from kv6_import where messagetype = 'ARRIVAL' AND dataownercode = 'HTM' ) as x; +--------+ | L1 | +========+ | 257129 | +--------+ 1 tuple (111.306ms) sql>select count(*) from (select messagetype from kv6_import where messagetype = 'ARRIVAL' AND TRUE ) as x; +--------+ | L1 | +========+ | 257129 | +--------+ 1 tuple (123.400ms) sql>select count(*) from (select messagetype from kv6_import where messagetype = 'ARRIVAL') as x; +--------+ | L1 | +========+ | 257129 | +--------+ 1 tuple (129.162ms) The only thing that may be noticed that the constant is slower than the column evaluation, yet faster than the the select without and. I'll try to keep a list of these findings, and update them over time. ## Comment 20012 Date: 2014-08-07 19:35:55 +0200 From: @skinkie On a table with 121325030 rows: ql>select count(*) from (select messagetype from kv6_import where messagetype = 'ARRIVAL' AND dataownercode = 'HTM' ) as x; +----------+ | L1 | +==========+ | 12173238 | +----------+ 1 tuple (3.1s) sql>select count(*) from (select messagetype from kv6_import where messagetype = 'ARRIVAL' AND TRUE ) as x; +----------+ | L1 | +==========+ | 12173238 | +----------+ 1 tuple (3.5s) sql>select count(*) from (select messagetype from kv6_import where messagetype = 'ARRIVAL') as x; +----------+ | L1 | +==========+ | 12173238 | +----------+ 1 tuple (3.0s) This again shows a different performance depending on the number of rows. Distinctiveness is the same.
Performance IN versus equal =
https://api.github.com/repos/MonetDB/MonetDB/issues/3531/comments
0
2020-11-30T12:53:20Z
2024-06-28T13:40:21Z
https://github.com/MonetDB/MonetDB/issues/3531
753,454,136
3,531
[ "MonetDB", "MonetDB" ]
Date: 2014-08-06 15:52:37 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: @njnes Last updated: 2019-04-30 12:36:00 +0200 ## Comment 19968 Date: 2014-08-06 15:52:37 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.58 Safari/537.36 Build Identifier: Would it be possible to handle rel_select.c:4473 more gracefully? Reproducible: Always ### Steps to Reproduce: CREATE TABLE "sys"."kv6_import" ( "receive" TIMESTAMP NOT NULL, "message" TIMESTAMP NOT NULL, "vehicle" TIMESTAMP NOT NULL, "messagetype" VARCHAR(10) NOT NULL, "operatingday" DATE NOT NULL, "dataownercode" VARCHAR(10) NOT NULL, "lineplanningnumber" VARCHAR(10), "journeynumber" INTEGER NOT NULL, "reinforcementnumber" INTEGER NOT NULL, "userstopcode" VARCHAR(10), "passagesequencenumber" INTEGER, "distancesincelastuserstop" INTEGER, "punctuality" INTEGER, "rd_x" VARCHAR(11), "rd_y" VARCHAR(11), "blockcode" INTEGER, "vehiclenumber" INTEGER, "wheelchairaccessible" VARCHAR(5), "source" VARCHAR(10) NOT NULL, "numberofcoaches" INTEGER ); select *, min(vehicle) over (partition by dataownercode, lineplanningnumber, journeynumber) from kv6_import where messagetype = 'ONROUTE' limit 10; ### Actual Results: Connection terminated ### Expected Results: I was if this query should give an equivalent result: select * from kv6_import join (select min(vehicle) as vehicle, dataownercode, lineplanningnumber, journeynumber from "sys"."kv6_import" where messagetype = 'ONROUTE' group by dataownercode, lineplanningnumber, journeynumber) as groupby using (vehicle, dataownercode, lineplanningnumber, journeynumber) limit 10; MonetDB 5 server v11.17.22 (64-bit, 64-bit oids) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 31.4GiB available memory, 8 available cpu cores Libraries: libpcre: 8.33 2013-05-28 (compiled with 8.33) openssl: OpenSSL 1.0.1h 5 Jun 2014 (compiled with OpenSSL 1.0.1h 5 Jun 2014) libxml2: 2.9.1 (compiled with 2.9.1) Compiled by: skinkie@bigdata.openebs.nl (x86_64-unknown-linux-gnu) Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code Linking : /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64 ## Comment 19978 Date: 2014-08-06 18:43:44 +0200 From: @njnes the implementations for windowed aggreation functions is misisng. The crash is coming from a assert(0), which is just there to inform us of this missing feature. ## Comment 26831 Date: 2019-01-22 10:22:47 +0100 From: @sjoerdmullender The window functions will be available in the next feature release.
sigabort on window aggr function
https://api.github.com/repos/MonetDB/MonetDB/issues/3530/comments
0
2020-11-30T12:53:17Z
2024-06-27T12:04:01Z
https://github.com/MonetDB/MonetDB/issues/3530
753,454,095
3,530
[ "MonetDB", "MonetDB" ]
Date: 2014-08-06 15:38:36 +0200 From: @skinkie To: Stefan de Konink &lt;<stefan>&gt; Version: 11.17.21 (Jan2014-SP3) Last updated: 2014-08-06 18:50:47 +0200 ## Comment 19967 Date: 2014-08-06 15:38:36 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.58 Safari/537.36 Build Identifier: As user I would like to start mserver in the same way inside gdb. Using regular computer programs I can lookup by ps aux what this program is started with an start this program with gdb --args program --and argument Using the presented commandline of monetdb this isn't the case. An example: ERROR: wrong format monet_vault_key ERROR: wrong format gdk_nr_threads ERROR: wrong format max_clients ERROR: wrong format sql_optimizer I do understand I could attach gdb by pid. Reproducible: Always ### Steps to Reproduce: /opt/monetdb/bin/mserver5 --dbpath=/mnt/storage2/monetdb/bigdata --set monet_vault_key /mnt/storage2/monetdb/bigdata/.vaultkey --set gdk_nr_threads 8 --set max_clients 64 --set sql_optimizer default_pipe ### Expected Results: I would expect that this commandline would represent what is actually used to start mserver. MonetDB 5 server v11.17.22 (64-bit, 64-bit oids) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 31.4GiB available memory, 8 available cpu cores Libraries: libpcre: 8.33 2013-05-28 (compiled with 8.33) openssl: OpenSSL 1.0.1h 5 Jun 2014 (compiled with OpenSSL 1.0.1h 5 Jun 2014) libxml2: 2.9.1 (compiled with 2.9.1) Compiled by: skinkie@bigdata.openebs.nl (x86_64-unknown-linux-gnu) Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code Linking : /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64 ## Comment 19970 Date: 2014-08-06 17:11:25 +0200 From: @sjoerdmullender In general, you cannot use ps to find out the arguments a command was started with. A program is free to change the arguments any way it wants. Therefore this bug is invalid. What you *can* do in the case of monetdb is to look in the merovingian.log file to see the exact command line that the server was started with. My guess is that the difference is a couple of = signs that are missing. ## Comment 19971 Date: 2014-08-06 17:31:01 +0200 From: @skinkie Is the cause related to the commandline parsing / strtok? ## Comment 19976 Date: 2014-08-06 18:15:03 +0200 From: @skinkie Created attachment 292 Revert optarg after parsing / strchr > Attached file: [fix-3529.diff](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3529_fix-3529.diff_292) (text/plain, 388 bytes) > Description: Revert optarg after parsing / strchr ## Comment 19979 Date: 2014-08-06 18:50:47 +0200 From: @sjoerdmullender Sorry, as I said you cannot rely on ps giving you the information on how a command was started. This is not a bug. It will not be fixed.
commandline from a monetdb started mserver cannot be used from a shell
https://api.github.com/repos/MonetDB/MonetDB/issues/3529/comments
0
2020-11-30T12:53:13Z
2024-06-28T13:16:02Z
https://github.com/MonetDB/MonetDB/issues/3529
753,454,054
3,529
[ "MonetDB", "MonetDB" ]
Date: 2014-08-06 15:27:17 +0200 From: @skinkie To: MonetDB5 devs &lt;<bugs-monetdb5>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @mlkersten Last updated: 2014-10-31 14:14:25 +0100 ## Comment 19966 Date: 2014-08-06 15:27:17 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.58 Safari/537.36 Build Identifier: I am trying to run MonetDB from monetdbd inside gdb. I copied over the commandline from ps aux and removed some arguments. I find it typical that this does not work at all, as if there is a completely different syntax used. I'll file a separate bug. !IOException:mal_mapi.listen:operation failed: bind to stream socket port 50000 failed: Address already in use !SyntaxException:parseError:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX !SyntaxException:parseError: ^';' expected Program received signal SIGSEGV, Segmentation fault. 0x00007ffff78d801d in MALreader (c=0x645680) at mal_session.c:521 521 if (r < 0 && c->fdin->eof == 0) !IOException:mal_mapi.listen:operation failed: bind to stream socket port 50000 failed: Address already in use !SyntaxException:parseError:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX !SyntaxException:parseError: ^';' expected Program received signal SIGSEGV, Segmentation fault. 0x00007ffff78d801d in MALreader (c=0x645680) at mal_session.c:521 521 if (r < 0 && c->fdin->eof == 0) Reproducible: Always MonetDB 5 server v11.17.22 (64-bit, 64-bit oids) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 31.4GiB available memory, 8 available cpu cores Libraries: libpcre: 8.33 2013-05-28 (compiled with 8.33) openssl: OpenSSL 1.0.1h 5 Jun 2014 (compiled with OpenSSL 1.0.1h 5 Jun 2014) libxml2: 2.9.1 (compiled with 2.9.1) Compiled by: skinkie@bigdata.openebs.nl (x86_64-unknown-linux-gnu) Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code Linking : /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64 ## Comment 19981 Date: 2014-08-06 19:05:07 +0200 From: @mlkersten It looks like you forgot to add --dbinit="sql.start();" as an argument to the list you extract from merovingian.log ## Comment 19991 Date: 2014-08-06 21:16:09 +0200 From: @skinkie Created attachment 293 Guard reading c->fdin when it has not been allocated (In reply to comment 1) > It looks like you forgot to add --dbinit="sql.start();" as an argument to > the list you extract from merovingian.log Is forgetting - or not - an excuse to bail out with a segfault? > Attached file: [guard_c_fdin_null-3528.diff](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3528_guard_c_fdin_null-3528.diff_293) (text/plain, 354 bytes) > Description: Guard reading c->fdin when it has not been allocated ## Comment 19992 Date: 2014-08-06 21:22:23 +0200 From: @mlkersten Indeed, for the expert user a few more defense lines could be added to the core. thx, Martin ## Comment 20370 Date: 2014-10-31 14:14:25 +0100 From: @sjoerdmullender Oct2014 has been released.
segfault at mal_session.c:521
https://api.github.com/repos/MonetDB/MonetDB/issues/3528/comments
0
2020-11-30T12:53:10Z
2024-06-27T12:03:58Z
https://github.com/MonetDB/MonetDB/issues/3528
753,454,025
3,528
[ "MonetDB", "MonetDB" ]
Date: 2014-08-06 14:31:20 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-10-31 14:14:41 +0100 ## Comment 19962 Date: 2014-08-06 14:31:20 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.58 Safari/537.36 Build Identifier: I was unable to make a small example, thus I have exported the column that was causing this. A table with a lot of distinct entries results in one single result (after ordering) while many are expected. Reproducible: Always ### Steps to Reproduce: Load the table, will be attached. Execute: select distinct userstopcode from "sys"."test_userstopcode" order by userstopcode asc limit 2; select distinct userstopcode from "sys"."test_userstopcode" order by userstopcode desc limit 2; ### Actual Results: sql>select distinct userstopcode from "sys"."test_userstopcode" order by userstopcode asc limit 2; +--------------+ | userstopcode | +==============+ | null | +--------------+ 1 tuple (49.017ms) sql>select distinct userstopcode from "sys"."test_userstopcode" order by userstopcode desc limit 2; +--------------+ | userstopcode | +==============+ | TZRR | +--------------+ 1 tuple (35.821ms) ### Expected Results: sql>select userstopcode from "sys"."test_userstopcode" group by userstopcode limit 2; +--------------+ | userstopcode | +==============+ | null | | TZRR | +--------------+ 2 tuples (74.285ms) MonetDB 5 server v11.17.22 (64-bit, 64-bit oids) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 31.4GiB available memory, 8 available cpu cores Libraries: libpcre: 8.33 2013-05-28 (compiled with 8.33) openssl: OpenSSL 1.0.1h 5 Jun 2014 (compiled with OpenSSL 1.0.1h 5 Jun 2014) libxml2: 2.9.1 (compiled with 2.9.1) Compiled by: skinkie@bigdata.openebs.nl (x86_64-unknown-linux-gnu) Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code Linking : /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64 ## Comment 19977 Date: 2014-08-06 18:41:13 +0200 From: @njnes which version did you test on. I just run a simple test like this on both stable and default and those run just fine. ## Comment 19990 Date: 2014-08-06 20:07:17 +0200 From: @skinkie My simple tests do not fail either. Thats why I e-mailed the table dump. Currently at Jan2014. ## Comment 19997 Date: 2014-08-07 09:58:43 +0200 From: @njnes the current implementation(s) of firstn and pqueue topn seems to handle multi column topn/firstn okay, but distinct needs a small adjustment. The one but last multicolumn topn/firstn returns 'atleast' n values (ie maybe larger than the requested number because the next column will determine which are realy needed). This is not enough for the distinct case, were we need 'N' distinct values. Doing a distinct before defeats the purpose of the limit, ie will not help performance anymore. ## Comment 19998 Date: 2014-08-07 10:45:47 +0200 From: @skinkie I wondered while making the example for this bug. Why isn't it reproducable with a table with 3 rows? ## Comment 20045 Date: 2014-08-13 11:18:21 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [d380de461d7a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d380de461d7a) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d380de461d7a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d380de461d7a) Changeset description: Test for bug #3527. It needs to run without --forcemito for the full effect. ## Comment 20046 Date: 2014-08-13 11:25:25 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [b373303ee299](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b373303ee299) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b373303ee299](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b373303ee299) Changeset description: Fix SELECT DISTINCT with ORDER BY and LIMIT. This fixes bug #3527, but only for the next feature release. Niels, there is still an issue in sql_gencode.c. See the TODO comment. ## Comment 20047 Date: 2014-08-13 19:54:44 +0200 From: @njnes fix is in Oct2014 branch ## Comment 20386 Date: 2014-10-31 14:14:41 +0100 From: @sjoerdmullender Oct2014 has been released.
select distinct - order by - limit 2 results in one single result
https://api.github.com/repos/MonetDB/MonetDB/issues/3527/comments
0
2020-11-30T12:53:07Z
2024-06-27T12:03:57Z
https://github.com/MonetDB/MonetDB/issues/3527
753,453,986
3,527
[ "MonetDB", "MonetDB" ]
Date: 2014-08-05 15:00:39 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Duplicates: #3518 Last updated: 2014-08-06 18:12:04 +0200 ## Comment 19956 Date: 2014-08-05 15:00:39 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; sql>create table a (k varchar(64),v boolean); operation successful (5.314ms) sql>insert into a values ('one',true),('two',false),('one',false); 3 affected rows (298.582ms) sql>create table b (k varchar(64)); operation successful (3.199ms) sql>insert into b values ('two'),('two'),('two'); 3 affected rows (2.483ms) sql>select k,count(*),count(v) from (select k,v from a union all select k,null from b) as t(k,v) group by k order by count(*) desc; +------+------+------+ | k | L2 | L3 | +======+======+======+ | one | 2 | 2 | | two | 4 | 1 | +------+------+------+ 2 tuples (3.175ms) Expected result: +------+------+------+ | k | L2 | L3 | +======+======+======+ | two | 4 | 1 | | one | 2 | 2 | +------+------+------+ From playing with larger examples, I think the problem might be that the count(*) is not counting the null from the second half of the union, i.e. it's reinterpreting count(*) as count(v) (but only in the order by clause; the select clause, as you can see above, is behaving correctly). sql>explain select k,count(*),count(v) from (select k,v from a union all select k,null from b) as t(k,v) group by k order by count(*) desc; +-----------------------------------------------------------------------------+ | mal | +=============================================================================+ | function user.s6_1{autoCommit=true}(A0:void):void; | | barrier X_123 := language.dataflow(); | | X_4:bat[:oid,:str] := bat.new(nil:oid,nil:str); | | X_3 := sql.mvc(); | | X_7:bat[:oid,:oid] := sql.tid(X_3,"sys","a"); | | X_10 := sql.bind(X_3,"sys","a","k",0); | | (X_13,r1_13) := sql.bind(X_3,"sys","a","k",2); | | X_16 := sql.bind(X_3,"sys","a","k",1); | | X_18 := sql.delta(X_10,X_13,r1_13,X_16); | | X_19 := algebra.leftfetchjoin(X_7,X_18); | | (X_20,r1_20,r2_20) := group.subgroupdone(X_19); | | X_23 := algebra.leftfetchjoin(r1_20,X_19); | | X_45:bat[:oid,:wrd] := aggr.subcount(X_20,X_20,r1_20,false); | | X_61 := sql.bind(X_3,"sys","a","v",0); | | (X_66,r1_67) := sql.bind(X_3,"sys","a","v",2); | | X_69 := sql.bind(X_3,"sys","a","v",1); | | X_71 := sql.delta(X_61,X_66,r1_67,X_69); | | X_72 := algebra.leftfetchjoin(X_7,X_71); | | X_73:bat[:oid,:wrd] := aggr.subcount(X_72,X_20,r1_20,true); | | X_24 := bat.append(X_4,X_23,true); | | X_25:bat[:oid,:oid] := sql.tid(X_3,"sys","b"); | | X_27 := sql.bind(X_3,"sys","b","k",0); | | (X_28,r1_28) := sql.bind(X_3,"sys","b","k",2); | | X_30 := sql.bind(X_3,"sys","b","k",1); | | X_31 := sql.delta(X_27,X_28,r1_28,X_30); | | X_32 := algebra.leftfetchjoin(X_25,X_31); | | (X_33,r1_33,r2_33) := group.subgroupdone(X_32); | | X_36 := algebra.leftfetchjoin(r1_33,X_32); | | X_48:bat[:oid,:wrd] := aggr.subcount(X_33,X_33,r1_33,false); | | X_76 := calc.bit(A0); | | X_77 := algebra.project(X_32,X_76); | | X_78:bat[:oid,:wrd] := aggr.subcount(X_77,X_33,r1_33,true); | | X_37 := bat.append(X_24,X_36,true); | | (X_39,r1_39,r2_39) := group.subgroupdone(X_37); | | X_42:bat[:oid,:wrd] := bat.new(nil:oid,nil:wrd); | | X_47 := bat.append(X_42,X_45,true); | | X_49 := bat.append(X_47,X_48,true); | | X_50 := algebra.leftfetchjoin(r1_39,X_49); | | (X_51,r1_51,r2_51) := algebra.subsort(X_50,true,false); | | X_54:bat[:oid,:str] := algebra.leftfetchjoinPath(r1_51,r1_39,X_37); | | X_55:bat[:oid,:wrd] := bat.new(nil:oid,nil:wrd); | | X_56 := bat.append(X_55,X_45,true); | | X_57 := bat.append(X_56,X_48,true); | | X_58:bat[:oid,:wrd] := aggr.subsum(X_57,X_39,r1_39,true,true); | | X_60:bat[:oid,:wrd] := bat.new(nil:oid,nil:wrd); | | X_75 := bat.append(X_60,X_73,true); | | X_79 := bat.append(X_75,X_78,true); | | X_80:bat[:oid,:wrd] := aggr.subsum(X_79,X_39,r1_39,true,true); | | X_81 := algebra.leftfetchjoin(r1_51,X_80); | | X_59 := algebra.leftfetchjoin(r1_51,X_58); | | language.pass(X_19); | | language.pass(X_7); | | language.pass(X_20); | | language.pass(r1_20); | | language.pass(X_32); | | language.pass(X_33); | | language.pass(r1_33); | | language.pass(X_37); | | language.pass(X_45); | | language.pass(X_48); | | language.pass(X_39); | | language.pass(r1_39); | | language.pass(r1_51); | | exit X_123; | | X_82 := sql.resultSet(3,1,X_54); | | sql.rsColumn(X_82,".t","k","varchar",64,0,X_54); | | sql.rsColumn(X_82,".L2","L2","wrd",64,0,X_59); | | sql.rsColumn(X_82,".L3","L3","wrd",64,0,X_81); | | X_96 := io.stdout(); | | sql.exportResult(X_96,X_82); | | end s6_1; | | querylog.define("select k,count(*),count(v) from (select k,v from a union | : all select k,null from b) as t(k,v) group by k order by count(*) desc;","d : : efault_pipe") : +-----------------------------------------------------------------------------+ ## Comment 19957 Date: 2014-08-05 17:21:14 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Here's another example using sum() instead of count(), which therefore disproves my earlier random guessing about what the cause might be. sql>create table a (k varchar(64),v int); operation successful (2.823ms) sql>create table b (k varchar(64),v int); operation successful (3.329ms) sql>insert into a values ('one',1),('one',1),('two',4),('three',0); 4 affected rows (3.528ms) sql>insert into b values ('one',1),('three',1); 2 affected rows (2.449ms) sql>select k,sum(v) from (select * from a union all select * from b) A group by k order by sum(v) desc; +-------+------+ | k | L1 | +=======+======+ | two | 4 | | one | 3 | | three | 1 | +-------+------+ 3 tuples (5.033ms) sql>select k,sum(v) from (select * from b union all select * from a) A group by k order by sum(v) desc; +-------+------+ | k | L1 | +=======+======+ | two | 4 | | three | 1 | | one | 3 | +-------+------+ 3 tuples (2.865ms) The only difference between the two SELECTs is the order of the UNION in the sub-select: the first is A,B the second is B,A. Obviously the results should be identical. sql>explain select k,sum(v) from (select * from a union all select * from b) A g roup by k order by sum(v) desc; +-----------------------------------------------------------------------------+ | mal | +=============================================================================+ | function user.s6_1{autoCommit=true}():void; | | barrier X_121 := language.dataflow(); | | X_3:bat[:oid,:str] := bat.new(nil:oid,nil:str); | | X_2 := sql.mvc(); | | X_6:bat[:oid,:oid] := sql.tid(X_2,"sys","a"); | | X_9 := sql.bind(X_2,"sys","a","k",0); | | (X_12,r1_12) := sql.bind(X_2,"sys","a","k",2); | | X_15 := sql.bind(X_2,"sys","a","k",1); | | X_17 := sql.delta(X_9,X_12,r1_12,X_15); | | X_18 := algebra.leftfetchjoin(X_6,X_17); | | (X_19,r1_19,r2_19) := group.subgroupdone(X_18); | | X_22 := algebra.leftfetchjoin(r1_19,X_18); | | X_44 := sql.bind(X_2,"sys","a","v",0); | | (X_49,r1_49) := sql.bind(X_2,"sys","a","v",2); | | X_52 := sql.bind(X_2,"sys","a","v",1); | | X_54 := sql.delta(X_44,X_49,r1_49,X_52); | | X_55 := algebra.leftfetchjoin(X_6,X_54); | | X_56:bat[:oid,:lng] := aggr.subsum(X_55,X_19,r1_19,true,true); | | X_23 := bat.append(X_3,X_22,true); | | X_24:bat[:oid,:oid] := sql.tid(X_2,"sys","b"); | | X_26 := sql.bind(X_2,"sys","b","k",0); | | (X_27,r1_27) := sql.bind(X_2,"sys","b","k",2); | | X_29 := sql.bind(X_2,"sys","b","k",1); | | X_30 := sql.delta(X_26,X_27,r1_27,X_29); | | X_31 := algebra.leftfetchjoin(X_24,X_30); | | (X_32,r1_32,r2_32) := group.subgroupdone(X_31); | | X_35 := algebra.leftfetchjoin(r1_32,X_31); | | X_58 := sql.bind(X_2,"sys","b","v",0); | | (X_60,r1_60) := sql.bind(X_2,"sys","b","v",2); | | X_62 := sql.bind(X_2,"sys","b","v",1); | | X_63 := sql.delta(X_58,X_60,r1_60,X_62); | | X_64 := algebra.leftfetchjoin(X_24,X_63); | | X_65:bat[:oid,:lng] := aggr.subsum(X_64,X_32,r1_32,true,true); | | X_36 := bat.append(X_23,X_35,true); | | (X_38,r1_38,r2_38) := group.subgroupdone(X_36); | | X_41:bat[:oid,:lng] := bat.new(nil:oid,nil:lng); | | X_57 := bat.append(X_41,X_56,true); | | X_66 := bat.append(X_57,X_65,true); | | X_67 := algebra.leftfetchjoin(r1_38,X_66); | | (X_68,r1_68,r2_68) := algebra.subsort(X_67,true,false); | | X_73:bat[:oid,:str] := algebra.leftfetchjoinPath(r1_68,r1_38,X_36); | | X_74:bat[:oid,:lng] := bat.new(nil:oid,nil:lng); | | X_77 := bat.append(X_74,X_56,true); | | X_78 := bat.append(X_77,X_65,true); | | X_79:bat[:oid,:lng] := aggr.subsum(X_78,X_38,r1_38,true,true); | | X_80 := algebra.leftfetchjoin(r1_68,X_79); | | language.pass(X_18); | | language.pass(X_6); | | language.pass(r1_19); | | language.pass(X_31); | | language.pass(X_24); | | language.pass(r1_32); | | language.pass(X_36); | | language.pass(X_56); | | language.pass(X_65); | | language.pass(r1_38); | | language.pass(r1_68); | | exit X_121; | | X_81 := sql.resultSet(2,1,X_73); | | sql.rsColumn(X_81,".a","k","varchar",64,0,X_73); | | sql.rsColumn(X_81,".L1","L1","bigint",32,0,X_80); | | X_93 := io.stdout(); | | sql.exportResult(X_93,X_81); | | end s6_1; | | querylog.define("select k,sum(v) from (select * from a union all select * | : from b) a group by k order by sum(v) desc;","default_pipe") : +-----------------------------------------------------------------------------+ sql>explain select k,sum(v) from (select * from b union all select * from a) A g roup by k order by sum(v) desc; +-----------------------------------------------------------------------------+ | mal | +=============================================================================+ | function user.s7_1{autoCommit=true}():void; | | barrier X_121 := language.dataflow(); | | X_3:bat[:oid,:str] := bat.new(nil:oid,nil:str); | | X_2 := sql.mvc(); | | X_6:bat[:oid,:oid] := sql.tid(X_2,"sys","b"); | | X_9 := sql.bind(X_2,"sys","b","k",0); | | (X_12,r1_12) := sql.bind(X_2,"sys","b","k",2); | | X_15 := sql.bind(X_2,"sys","b","k",1); | | X_17 := sql.delta(X_9,X_12,r1_12,X_15); | | X_18 := algebra.leftfetchjoin(X_6,X_17); | | (X_19,r1_19,r2_19) := group.subgroupdone(X_18); | | X_22 := algebra.leftfetchjoin(r1_19,X_18); | | X_44 := sql.bind(X_2,"sys","b","v",0); | | (X_49,r1_49) := sql.bind(X_2,"sys","b","v",2); | | X_52 := sql.bind(X_2,"sys","b","v",1); | | X_54 := sql.delta(X_44,X_49,r1_49,X_52); | | X_55 := algebra.leftfetchjoin(X_6,X_54); | | X_56:bat[:oid,:lng] := aggr.subsum(X_55,X_19,r1_19,true,true); | | X_23 := bat.append(X_3,X_22,true); | | X_24:bat[:oid,:oid] := sql.tid(X_2,"sys","a"); | | X_26 := sql.bind(X_2,"sys","a","k",0); | | (X_27,r1_27) := sql.bind(X_2,"sys","a","k",2); | | X_29 := sql.bind(X_2,"sys","a","k",1); | | X_30 := sql.delta(X_26,X_27,r1_27,X_29); | | X_31 := algebra.leftfetchjoin(X_24,X_30); | | (X_32,r1_32,r2_32) := group.subgroupdone(X_31); | | X_35 := algebra.leftfetchjoin(r1_32,X_31); | | X_58 := sql.bind(X_2,"sys","a","v",0); | | (X_60,r1_60) := sql.bind(X_2,"sys","a","v",2); | | X_62 := sql.bind(X_2,"sys","a","v",1); | | X_63 := sql.delta(X_58,X_60,r1_60,X_62); | | X_64 := algebra.leftfetchjoin(X_24,X_63); | | X_65:bat[:oid,:lng] := aggr.subsum(X_64,X_32,r1_32,true,true); | | X_36 := bat.append(X_23,X_35,true); | | (X_38,r1_38,r2_38) := group.subgroupdone(X_36); | | X_41:bat[:oid,:lng] := bat.new(nil:oid,nil:lng); | | X_57 := bat.append(X_41,X_56,true); | | X_66 := bat.append(X_57,X_65,true); | | X_67 := algebra.leftfetchjoin(r1_38,X_66); | | (X_68,r1_68,r2_68) := algebra.subsort(X_67,true,false); | | X_73:bat[:oid,:str] := algebra.leftfetchjoinPath(r1_68,r1_38,X_36); | | X_74:bat[:oid,:lng] := bat.new(nil:oid,nil:lng); | | X_77 := bat.append(X_74,X_56,true); | | X_78 := bat.append(X_77,X_65,true); | | X_79:bat[:oid,:lng] := aggr.subsum(X_78,X_38,r1_38,true,true); | | X_80 := algebra.leftfetchjoin(r1_68,X_79); | | language.pass(X_18); | | language.pass(X_6); | | language.pass(r1_19); | | language.pass(X_31); | | language.pass(X_24); | | language.pass(r1_32); | | language.pass(X_36); | | language.pass(X_56); | | language.pass(X_65); | | language.pass(r1_38); | | language.pass(r1_68); | | exit X_121; | | X_81 := sql.resultSet(2,1,X_73); | | sql.rsColumn(X_81,".a","k","varchar",64,0,X_73); | | sql.rsColumn(X_81,".L1","L1","bigint",32,0,X_80); | | X_93 := io.stdout(); | | sql.exportResult(X_93,X_81); | | end s7_1; | | querylog.define("select k,sum(v) from (select * from b union all select * | : from a) a group by k order by sum(v) desc;","default_pipe") : +-----------------------------------------------------------------------------+ ## Comment 19973 Date: 2014-08-06 18:08:54 +0200 From: @njnes fixed by reduction project push down union. ## Comment 19974 Date: 2014-08-06 18:12:04 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Duplicate, my apologies. I built the current Jan2014 branch from hg and the problem went away. *** This bug has been marked as a duplicate of bug #3518 ***
order by count(*) over union sorts incorrectly
https://api.github.com/repos/MonetDB/MonetDB/issues/3526/comments
0
2020-11-30T12:53:03Z
2024-06-28T13:16:02Z
https://github.com/MonetDB/MonetDB/issues/3526
753,453,933
3,526
[ "MonetDB", "MonetDB" ]
Date: 2014-08-05 01:06:22 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-08-05 09:05:23 +0200 ## Comment 19949 Date: 2014-08-05 01:06:22 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.55 Safari/537.36 Build Identifier: create table test_a (a integer, b integer); create table test_b (a integer, b integer); select test_a.a from test_a join test_b using (a); SELECT: no such column 'test_a.a' select a from test_a join test_b using (a); +---+ | a | +===+ +---+ 0 tuples (1.080ms) select test_a.b from test_a join test_b using (a); +---+ | b | +===+ +---+ 0 tuples (1.193ms) select test_b.b from test_a join test_b using (a); +---+ | b | +===+ +---+ 0 tuples (2.435ms) select test_a.a from test_a join test_b on (test_a.a = test_b.a); +---+ | a | +===+ +---+ 0 tuples (3.106ms) select test_b.a from test_a join test_b on (test_a.a = test_b.a); +---+ | a | +===+ +---+ 0 tuples (1.061ms) Reproducible: Always MonetDB 5 server v11.17.22 (64-bit, 64-bit oids) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 31.4GiB available memory, 8 available cpu cores Libraries: libpcre: 8.33 2013-05-28 (compiled with 8.33) openssl: OpenSSL 1.0.1h 5 Jun 2014 (compiled with OpenSSL 1.0.1h 5 Jun 2014) libxml2: 2.9.1 (compiled with 2.9.1) Compiled by: skinkie@bigdata.openebs.nl (x86_64-unknown-linux-gnu) Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code Linking : /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64 ## Comment 19950 Date: 2014-08-05 08:18:28 +0200 From: @njnes a join using a means the column is shared, ie after the join only one a column exsists, ie 'tast_a.a' really doesn't make sense. ## Comment 19951 Date: 2014-08-05 08:29:14 +0200 From: @skinkie (In reply to comment 1) > a join using a means the column is shared, ie after the join only one a > column exsists, ie 'tast_a.a' really doesn't make sense. Why wouldn't that hold for the last example where ON is used? Is USING executed in a different way? Other databases such as PostgreSQL do not take this standpoint. postgres= create table test_a (a integer, b integer); CREATE TABLE postgres= create table test_b (a integer, b integer); CREATE TABLE postgres= select test_a.a from test_a join test_b using (a); a --- (0 rows) Secondary using * syntax, the column a is hidden. sql>select test_a.* from test_a join test_b using (a); +---+ | b | +===+ +---+ ## Comment 19952 Date: 2014-08-05 08:43:27 +0200 From: @njnes using and on are indeed differently defined. Using only returns a single column of the matched columns, For on all columns are returned. As you can see from your postgres example the test_a.* doesn't include the a. That they somehow worked around this when you ask for test_a.a explicitly doesn't (in their case) changes this. We simply do not add this hack. ## Comment 19954 Date: 2014-08-05 08:49:24 +0200 From: @skinkie In MonetDB context it is hidden. In PostgreSQL test_a.* is also visible. postgres= select test_a.* from test_a join test_b using (a); a | b ---+--- (0 rows) ## Comment 19955 Date: 2014-08-05 09:05:23 +0200 From: @njnes postgres= create table test_a (a integer, b integer); CREATE TABLE postgres= create table test_b (a integer, b integer); CREATE TABLE postgres= select * from test_a join test_b using (a); a | b | b ---+---+--- (0 rows) ie also postgres has only on a result column
tablename cannot be used with column after join with using
https://api.github.com/repos/MonetDB/MonetDB/issues/3525/comments
0
2020-11-30T12:52:59Z
2024-06-28T13:16:56Z
https://github.com/MonetDB/MonetDB/issues/3525
753,453,890
3,525
[ "MonetDB", "MonetDB" ]
Date: 2014-08-05 00:41:47 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-10-31 14:14:09 +0100 ## Comment 19948 Date: 2014-08-05 00:41:47 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.55 Safari/537.36 Build Identifier: create table agg_error (a bool, b bool); select max(a), b from agg_error group by a; SELECT: identifier 'b' unknown Shouldn't that be: SELECT: cannot use non GROUP BY column 'b' in query results without an aggregate function Reproducible: Always MonetDB 5 server v11.17.22 (64-bit, 64-bit oids) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 31.4GiB available memory, 8 available cpu cores Libraries: libpcre: 8.33 2013-05-28 (compiled with 8.33) openssl: OpenSSL 1.0.1h 5 Jun 2014 (compiled with OpenSSL 1.0.1h 5 Jun 2014) libxml2: 2.9.1 (compiled with 2.9.1) Compiled by: skinkie@bigdata.openebs.nl (x86_64-unknown-linux-gnu) Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code Linking : /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64 ## Comment 19959 Date: 2014-08-06 10:42:20 +0200 From: @njnes improved error message ## Comment 19961 Date: 2014-08-06 12:57:32 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [8e2e4bcad4bb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8e2e4bcad4bb) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=8e2e4bcad4bb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=8e2e4bcad4bb) Changeset description: fixed bug #3524, ie improved error message for using non group by columns in group by result ## Comment 20357 Date: 2014-10-31 14:14:09 +0100 From: @sjoerdmullender Oct2014 has been released.
wrong error on missing aggregation column
https://api.github.com/repos/MonetDB/MonetDB/issues/3524/comments
0
2020-11-30T12:52:56Z
2024-06-27T12:03:54Z
https://github.com/MonetDB/MonetDB/issues/3524
753,453,861
3,524
[ "MonetDB", "MonetDB" ]
Date: 2014-08-04 19:00:43 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @njnes Last updated: 2014-10-31 14:14:50 +0100 ## Comment 19945 Date: 2014-08-04 19:00:43 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; sql>create table foo (id int); operation successful (10.821ms) sql>insert into foo values (42); 1 affected row (2.482ms) sql>select id-row_number() over (order by id) from (select id from foo union all select id from foo) as z; Expected result: 41 40 Actual result: <nothing, not even column headers> Even more interestingly, EXPLAINing that last query gives no result too. As far as I can determine, this is a minimal repro, i.e. removing any element from the SELECT will make it work. FYI, the original query from which this repro was reduced was: select min(id),max(id) from (select id,id-row_number() over (order by id) from [...view which is a union all of many monthly partition tables...] where id>=?) a(id,rn) group by rn; The intent of this query is to find all the ID ranges which exist in the database, and is part of a replication system which needs to determine whether to INSERT or UPDATE an existing row. ## Comment 19969 Date: 2014-08-06 17:06:23 +0200 From: @njnes the relational optimizer incorrectly pushed down the unsafe (window function) into the union. ## Comment 19972 Date: 2014-08-06 18:03:51 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [39b41810dc43](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=39b41810dc43) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=39b41810dc43](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=39b41810dc43) Changeset description: fixed bug #3523 (which also fixed 3526). Make sure we only push down a project without window functions ## Comment 20392 Date: 2014-10-31 14:14:50 +0100 From: @sjoerdmullender Oct2014 has been released.
Window function over union gives no result
https://api.github.com/repos/MonetDB/MonetDB/issues/3523/comments
0
2020-11-30T12:52:53Z
2024-06-27T12:03:53Z
https://github.com/MonetDB/MonetDB/issues/3523
753,453,835
3,523
[ "MonetDB", "MonetDB" ]
Date: 2014-07-25 13:07:23 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.17 (Jan2014-SP2) CC: @njnes Last updated: 2014-10-31 14:13:53 +0100 ## Comment 19930 Date: 2014-07-25 13:07:23 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0 Build Identifier: sys.tables is defined as view: SELECT * FROM (SELECT p.*, 0 AS "temporary" FROM "sys"."_tables" AS p UNION ALL SELECT t.*, 1 AS "temporary" FROM "tmp"."_tables" AS t) AS tables where tables.type <> 2; sys.columns is defined as view: SELECT * FROM (SELECT p.* FROM "sys"."_columns" AS p UNION ALL SELECT t.* FROM "tmp"."_columns" AS t) AS columns; The view definition of sys.columns needs to be corrected to exclude rows where table_id does NOT exist in sys.tables. Reproducible: Always ### Steps to Reproduce: 1. start mserver5 ( MonetDB 5 server v11.17.17 "Jan2014-SP2", database demo) 2. start mclient 3. Enter SQL query: SELECT id, name, schema_id, type from sys._tables WHERE id IN (SELECT table_id FROM sys.columns WHERE table_id NOT IN (SELECT id from sys.tables)); ### Actual Results: sql>SELECT id, name, schema_id, type from sys._tables WHERE id IN (SELECT table_id FROM sys.columns WHERE table_id NOT IN (SELECT id from sys.tables)); +------+--------------------------------------+-----------+------+ | id | name | schema_id | type | +======+======================================+===========+======+ | 5098 | env | 2000 | 2 | | 5103 | var | 2000 | 2 | | 5111 | db_users | 2000 | 2 | | 5270 | querylog_catalog | 2000 | 2 | | 5281 | querylog_calls | 2000 | 2 | | 5343 | tracelog | 2000 | 2 | | 5419 | dependencies_schemas_on_users | 2000 | 2 | | 5426 | dependencies_owners_on_schemas | 2000 | 2 | | 5433 | dependencies_tables_on_views | 2000 | 2 | | 5440 | dependencies_tables_on_indexes | 2000 | 2 | | 5447 | dependencies_tables_on_triggers | 2000 | 2 | | 5454 | dependencies_tables_on_foreignkeys | 2000 | 2 | | 5461 | dependencies_tables_on_functions | 2000 | 2 | | 5468 | dependencies_columns_on_views | 2000 | 2 | | 5475 | dependencies_columns_on_keys | 2000 | 2 | | 5482 | dependencies_columns_on_indexes | 2000 | 2 | | 5489 | dependencies_columns_on_functions | 2000 | 2 | | 5496 | dependencies_columns_on_triggers | 2000 | 2 | | 5503 | dependencies_views_on_functions | 2000 | 2 | | 5510 | dependencies_views_on_triggers | 2000 | 2 | | 5517 | dependencies_functions_on_functions | 2000 | 2 | | 5524 | dependencies_functions_os_triggers | 2000 | 2 | | 5531 | dependencies_keys_on_foreignkeys | 2000 | 2 | | 5542 | sessions | 2000 | 2 | | 5619 | optimizer_stats | 2000 | 2 | | 5625 | querycache | 2000 | 2 | | 5634 | optimizers | 2000 | 2 | | 5646 | environment | 2000 | 2 | | 5656 | bbp | 2000 | 2 | | 5676 | queue | 2000 | 2 | | 6215 | storage | 2000 | 2 | | 6274 | storagemodel | 2000 | 2 | +------+--------------------------------------+-----------+------+ 32 tuples (4.136ms) ### Expected Results: Expected 0 tuples returned. sys.columns should contain only columns of tables existing in sys.tables else we have a referential data integrity problem. ## Comment 19943 Date: 2014-08-03 14:12:17 +0200 From: @njnes the table returning types used to be stored in the _tables table. This is changed in the default branch, ie will be fixed in the next feature release. ## Comment 20343 Date: 2014-10-31 14:13:53 +0100 From: @sjoerdmullender Oct2014 has been released.
SQL catalog table sys.columns lists columns for table ids which do not exist in sys.tables
https://api.github.com/repos/MonetDB/MonetDB/issues/3522/comments
0
2020-11-30T12:52:51Z
2024-06-27T12:03:52Z
https://github.com/MonetDB/MonetDB/issues/3522
753,453,802
3,522
[ "MonetDB", "MonetDB" ]
Date: 2014-07-25 12:34:30 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.17 (Jan2014-SP2) CC: @njnes Last updated: 2014-10-31 14:14:21 +0100 ## Comment 19928 Date: 2014-07-25 12:34:30 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0 Build Identifier: Calling exp(number) function for large numbers (>= 89) returns inf instead of the value as a double. Reproducible: Always ### Steps to Reproduce: 1. start mserver5 2. start mclient 3. Enter: select exp(89), log(exp(89)); +-----------------+----------------------+ | L1 | log_exp_single_value | +=================+======================+ | inf | inf | +-----------------+----------------------+ ### Actual Results: sql>select exp(88), log(exp(88)); +-----------------+----------------------+ | L1 | log_exp_single_value | +=================+======================+ | 1.65163627e+38 | 88 | +-----------------+----------------------+ 1 tuple (0.894ms) sql>select exp(89), log(exp(89)); +-----------------+----------------------+ | L1 | log_exp_single_value | +=================+======================+ | inf | inf | +-----------------+----------------------+ 1 tuple (0.944ms) sql>select exp(89.0), log(exp(89.0)); +-----------------+----------------------+ | L1 | log_exp_single_value | +=================+======================+ | inf | inf | +-----------------+----------------------+ 1 tuple (0.642ms) ### Expected Results: When the result of the exp() is too large to be defined as float (which seems to be the default return type), it should return the value as a double. Possibly exp() should always have return type double instead of float to avoid confusion. There is a workaround for the problem by using cast( as double) to explicitly comvert the input arguments data type to a double. sql>select exp(cast(89 as double)), log(exp(cast(89 as double))); +--------------------------+--------------------------+ | L1 | log_exp_single_value | +==========================+==========================+ | 4.4896128191743455e+38 | 89 | +--------------------------+--------------------------+ ## Comment 19946 Date: 2014-08-04 19:29:52 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [8f619c2ff336](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8f619c2ff336) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=8f619c2ff336](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=8f619c2ff336) Changeset description: fixed bug #3521, ie use exp(double) (and other related math functions) when the input type isn't a real (ie single precision floating point). ## Comment 19947 Date: 2014-08-04 19:30:30 +0200 From: @njnes close we now (again) use exp(double) when the type is unknown (ie not equal to a real) ## Comment 20366 Date: 2014-10-31 14:14:21 +0100 From: @sjoerdmullender Oct2014 has been released.
large results of function exp() are not automatically returned as double
https://api.github.com/repos/MonetDB/MonetDB/issues/3521/comments
0
2020-11-30T12:52:48Z
2024-06-27T12:03:51Z
https://github.com/MonetDB/MonetDB/issues/3521
753,453,770
3,521
[ "MonetDB", "MonetDB" ]
Date: 2014-07-25 12:00:13 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: -- development Last updated: 2019-04-30 12:36:02 +0200 ## Comment 19927 Date: 2014-07-25 12:00:13 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0 Build Identifier: For compatibility with other SQL DBMSes it would be nice to have support for function LN(num). The LN function returns the natural logarithm of a number, which is the power to which you would need to raise the mathematical constant e (approximately 2.718281) in order to get the number in question as the result. SQL2003 Syntax: LN( expression ) Reproducible: Always ### Steps to Reproduce: 1. start mserver5 2. start mclient 3. enter: select ln(20); ### Actual Results: sql>select ln(20); SELECT: no such unary operator 'ln(tinyint)' ### Expected Results: sql>select ln(20); +------------------+ | log_single_value | +==================+ | 2.99573231 | +------------------+ Currently MonetDB supports log(num) which returns the natural logarithm of a number. However in PostgreSQL log(num) is implemented to return base 10 logarithm. See http://www.postgresql.org/docs/9.3/static/functions-math.htmlFUNCTIONS-MATH-FUNC-TABLE This will cause migration (PostgreSQL -> MonetDB) issues. By adding support for LN(num) at least that scalar function will not have to be converted to MonetDB log() function. ## Comment 26849 Date: 2019-01-24 16:25:57 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [9cb052c21919](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9cb052c21919) 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=9cb052c21919](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=9cb052c21919) Changeset description: Implemented function ln as alias for function log. Fixes bug #3520.
Add support for scalar function LN(num)
https://api.github.com/repos/MonetDB/MonetDB/issues/3520/comments
0
2020-11-30T12:52:46Z
2024-06-27T12:03:51Z
https://github.com/MonetDB/MonetDB/issues/3520
753,453,743
3,520
[ "MonetDB", "MonetDB" ]
Date: 2014-07-24 13:12:08 +0200 From: @hannesmuehleisen To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.13 (Jan2014-SP1) Last updated: 2014-07-31 09:50:18 +0200 ## Comment 19919 Date: 2014-07-24 13:12:08 +0200 From: @hannesmuehleisen User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.20 Safari/537.36 Build Identifier: content pending bug number Reproducible: Always ### Actual Results: error ### Expected Results: values are inserted ## Comment 19920 Date: 2014-07-24 13:13:08 +0200 From: @hannesmuehleisen start transaction; create table bug3519(a boolean); -- works insert into bug3519 values (true),(false),(TRUE),(FALSE); insert into bug3519 values ('true'),('false'); insert into bug3519 values (1),(0),(NULL),('1'),('0'); COPY 5 RECORDS INTO bug3519 FROM stdin NULL as ''; true false 1 0 select * from bug3519; -- does not work insert into bug3519 values ('TRUE'),('FALSE'); COPY 2 RECORDS INTO bug3519 FROM stdin; TRUE FALSE select * from bug3519; rollback; ## Comment 19921 Date: 2014-07-24 13:14:46 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [55b5c9a2dfe4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=55b5c9a2dfe4) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=55b5c9a2dfe4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=55b5c9a2dfe4) Changeset description: Test for Bug #3519 ## Comment 19922 Date: 2014-07-24 14:00:26 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [34a277989ae9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=34a277989ae9) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=34a277989ae9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=34a277989ae9) Changeset description: Fix for Bug #3519 ## Comment 19923 Date: 2014-07-24 14:00:29 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [7065c40a3e2a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7065c40a3e2a) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7065c40a3e2a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7065c40a3e2a) Changeset description: Approved test output for Bug #3519 ## Comment 19924 Date: 2014-07-24 14:05:10 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [91ffd30c2a4f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=91ffd30c2a4f) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=91ffd30c2a4f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=91ffd30c2a4f) Changeset description: Approved test output for Bug #3519 ## Comment 19925 Date: 2014-07-24 14:05:13 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [9e1cedea1b4b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9e1cedea1b4b) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9e1cedea1b4b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9e1cedea1b4b) Changeset description: Fix for Bug #3519 ## Comment 19926 Date: 2014-07-24 14:05:16 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [04636df9c241](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=04636df9c241) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=04636df9c241](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=04636df9c241) Changeset description: Test for Bug #3519 ## Comment 19935 Date: 2014-07-30 11:41:39 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [7b8cebd11132](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7b8cebd11132) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7b8cebd11132](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7b8cebd11132) Changeset description: Encore on Bug #3519 ## Comment 19936 Date: 2014-07-30 11:43:04 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [579886367c16](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=579886367c16) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=579886367c16](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=579886367c16) Changeset description: Encore on Bug #3519
Uppercase TRUE/FALSE strings cannot be converted to boolean values
https://api.github.com/repos/MonetDB/MonetDB/issues/3519/comments
0
2020-11-30T12:52:43Z
2024-06-27T12:03:50Z
https://github.com/MonetDB/MonetDB/issues/3519
753,453,724
3,519
[ "MonetDB", "MonetDB" ]
Date: 2014-07-23 14:45:03 +0200 From: Guillaume Savary &lt;<guillaume.savary>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.17 (Jan2014-SP2) CC: @njnes, richard.monetdb Last updated: 2014-10-31 14:13:57 +0100 ## Comment 19918 Date: 2014-07-23 14:45:03 +0200 From: Guillaume Savary &lt;<guillaume.savary>&gt; User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0 Build Identifier: As i was querying with some UNIONs of subqueries, I had an incoherent result. Then i tried to simplify the query as much as possible and finaly we can resume it like this: SELECT sum(a), sum(a) FROM (( SELECT 1 AS A ) UNION ALL (SELECT 3 AS A)) AS query; +------+------+ | L1 | L2 | +======+======+ | 4 | 1 | +------+------+ Note that you can reproduce it with real tables. Their are some funny things like a "1*" in the previous colomn seems to fix the issue: SELECT sum(1*a), sum(a) FROM (( SELECT 1 AS A ) UNION ALL (SELECT 3 AS A)) AS query; +------+------+ | L1 | L2 | +======+======+ | 4 | 4 | +------+------+ but not outside the sum(): SELECT 1*sum(a), sum(a) FROM (( SELECT 1 AS A ) UNION ALL (SELECT 3 AS A)) AS query; +------+------+ | L2 | L3 | +======+======+ | 4 | 1 | +------+------+ And you can crash it with: SELECT sum(a), 2*sum(a) FROM (( SELECT 1 AS A ) UNION ALL (SELECT 3 AS A)) AS query; TypeException:user.s54_1[24]:'bat.insert' undefined in: _65:any := bat.insert(_55:bat[:oid,:sht], _63:oid, _62:lng) program contains errors Reproducible: Always ### Steps to Reproduce: just copy/paste the queries i descripbed ### Expected Results: trivial ## Comment 19931 Date: 2014-07-28 18:49:17 +0200 From: @njnes Bug in the push group by through union code. Fixed in the stable branch. ## Comment 19932 Date: 2014-07-28 18:53:24 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [a36f972299ec](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a36f972299ec) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a36f972299ec](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a36f972299ec) Changeset description: fixed bug #3518. The rel_push_aggr_down didn't handle aliases to other aggregates correctly. ## Comment 19975 Date: 2014-08-06 18:12:04 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; *** Bug #3526 has been marked as a duplicate of this bug. *** ## Comment 20346 Date: 2014-10-31 14:13:57 +0100 From: @sjoerdmullender Oct2014 has been released.
UNION with subqueries
https://api.github.com/repos/MonetDB/MonetDB/issues/3518/comments
0
2020-11-30T12:52:40Z
2024-06-27T12:03:49Z
https://github.com/MonetDB/MonetDB/issues/3518
753,453,700
3,518
[ "MonetDB", "MonetDB" ]
Date: 2014-07-18 18:57:00 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: -- development Last updated: 2016-04-11 11:45:17 +0200 ## Comment 19917 Date: 2014-07-18 18:57:00 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0 Build Identifier: For compatibility with other SQL DBMSes it would be nice to have support for round(num), so a scalar round function with 1 argument instead of two. It should behave the same as round(num, 0). Reproducible: Always
scalar function round(num) is not supported
https://api.github.com/repos/MonetDB/MonetDB/issues/3517/comments
0
2020-11-30T12:52:37Z
2024-06-28T13:40:20Z
https://github.com/MonetDB/MonetDB/issues/3517
753,453,674
3,517
[ "MonetDB", "MonetDB" ]
Date: 2014-07-18 18:34:41 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.17 (Jan2014-SP2) CC: @njnes Last updated: 2014-10-31 14:14:01 +0100 ## Comment 19916 Date: 2014-07-18 18:34:41 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0 Build Identifier: CREATE TABLE num_data (id integer, val numeric(18,10)); INSERT INTO num_data VALUES (0, '0'); Reproducible: Always ### Steps to Reproduce: 1. Start mserver5 2. Start mclient Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.17.17 (Jan2014-SP2), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>CREATE TABLE num_data (id integer, val numeric(18,10)); operation successful (3.116ms) sql>INSERT INTO num_data VALUES (0, '0'); "" is no decimal value (doesn't contain a '.') sql>INSERT INTO num_data VALUES (1, '0.0'); 1 affected rows (2.551ms) sql>INSERT INTO num_data VALUES (2, 0); 1 affected rows (1.947ms) sql>INSERT INTO num_data VALUES (3, 0.0); 1 affected rows (1.975ms) sql>SELECT * FROM num_data; +------+----------------------+ | id | val | +======+======================+ | 1 | 0.0000000000 | | 2 | 0.0000000000 | | 3 | 0.0000000000 | +------+----------------------+ 3 tuples (1.043ms) sql> ### Actual Results: Error: "" is no decimal value (doesn't contain a '.') ### Expected Results: It should not give an error when the numeric string value did not included a decimal dot character. It should accept it. following insert statements are accepted: INSERT INTO num_data VALUES (1, '0.'); INSERT INTO num_data VALUES (1, '0.0'); INSERT INTO num_data VALUES (2, 0); INSERT INTO num_data VALUES (3, 0.0); ## Comment 19944 Date: 2014-08-04 18:29:11 +0200 From: @njnes we now allow for decimals without '.'. ## Comment 20081 Date: 2014-08-22 16:00:02 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; Problem still occurs for huge decimals such as numeric(38,10). CREATE TABLE num38_data (val numeric(38,10)); INSERT INTO num38_data VALUES ('0'); INSERT INTO num38_data VALUES ('1234567890'); It appears to be corrected in sql/backends/monet5/sql_round_impl.h str_2dec() but not yet in sql/backends/monet5/sql_round.c str_2dec_hge() See above additional test case. ## Comment 20350 Date: 2014-10-31 14:14:01 +0100 From: @sjoerdmullender Oct2014 has been released.
inserting '0' into a column of datatype numeric fails
https://api.github.com/repos/MonetDB/MonetDB/issues/3516/comments
0
2020-11-30T12:52:35Z
2024-06-27T12:03:47Z
https://github.com/MonetDB/MonetDB/issues/3516
753,453,649
3,516
[ "MonetDB", "MonetDB" ]
Date: 2014-07-18 15:52:10 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.17 (Jan2014-SP2) Last updated: 2014-07-31 09:50:19 +0200 ## Comment 19913 Date: 2014-07-18 15:52:10 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0 Build Identifier: mserver5: gdk_bat.c:2852: BATassertHeadProps: Assertion `!b->H->revsorted || cmp >= 0' failed. Reproducible: Always ### Steps to Reproduce: 1.compile monetdb with --enable-assert 2.start mserver5 3.make connection e.g. via mclient and issue follwing SQL statements: CREATE TABLE ceil_floor_round (a numeric); INSERT INTO ceil_floor_round VALUES ('-5.499999'); INSERT INTO ceil_floor_round VALUES ('0.0'); SELECT a, round(a, 0) FROM ceil_floor_round; bash-4.2$ mclient Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.17.17 (Jan2014-SP2), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>CREATE TABLE ceil_floor_round (a numeric); operation successful (49.181ms) sql>INSERT INTO ceil_floor_round VALUES ('-5.499999'); 1 affected rows (3.253ms) sql>SELECT a, round(a, 0) FROM ceil_floor_round; +------+---------+ | a | round_a | +======+=========+ | -4 | -4 | +------+---------+ 1 tuple (1.231ms) sql>INSERT INTO ceil_floor_round VALUES ('0.0'); 1 affected rows (1.433ms) sql>SELECT a, round(a, 0) FROM ceil_floor_round; sql> bash-4.2$ ### Actual Results: builtin opt gdk_dbpath = /ufs/dinther/MonetDB201407/var/monetdb5/dbfarm/demo builtin opt gdk_debug = 0 builtin opt gdk_vmtrim = no builtin opt monet_prompt = > builtin opt monet_daemon = no builtin opt mapi_port = 50000 builtin opt mapi_open = false builtin opt mapi_autosense = false builtin opt sql_optimizer = default_pipe builtin opt sql_debug = 0 MonetDB 5 server v11.17.17 "Jan2014-SP2" Serving database 'demo', using 8 threads Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked Found 15.356 GiB available main-memory. Copyright (c) 1993-July 2008 CWI. Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Listening for connection requests on mapi:monetdb://127.0.0.1:50000/ MonetDB/GIS module loaded MonetDB/JAQL module loaded MonetDB/SQL module loaded >Bulk operator required for str.stringleft Bulk operator required for str.stringleft mserver5: gdk_bat.c:2852: BATassertHeadProps: Assertion `!b->H->revsorted || cmp >= 0' failed. ./start_mserver5.sh: line 3: 11239 Aborted ./MonetDB201407/bin/mserver5 -d10 ### Expected Results: no crash ## Comment 19914 Date: 2014-07-18 16:25:28 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [e5dff2bf969c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e5dff2bf969c) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e5dff2bf969c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e5dff2bf969c) Changeset description: We must set revsorted property as well when rounding a bat. This fixes bug #3515. ## Comment 19915 Date: 2014-07-18 16:25:32 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [7ea2745f8204](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7ea2745f8204) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7ea2745f8204](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7ea2745f8204) Changeset description: Added test for bug #3515.
mserver5 crash due (assertion failure in gdk_bat.c)
https://api.github.com/repos/MonetDB/MonetDB/issues/3515/comments
0
2020-11-30T12:52:33Z
2024-06-27T12:03:46Z
https://github.com/MonetDB/MonetDB/issues/3515
753,453,625
3,515
[ "MonetDB", "MonetDB" ]
Date: 2014-07-18 11:45:12 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.17 (Jan2014-SP2) Last updated: 2014-07-31 09:50:15 +0200 ## Comment 19910 Date: 2014-07-18 11:45:12 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0 Build Identifier: mserver5: gdk_select.c:622: BAT_scanselect: Assertion `b->T->type != 6 || equi || b->T->nonil' failed. Reproducible: Always ### Steps to Reproduce: 1.compile monetdb with --enable-assert 2.start mserver5 3.make connection e.g. via mclient 4.Issue follwing SQL statements: CREATE TABLE OID_TBL(f1 oid); INSERT INTO OID_TBL(f1) VALUES ('1234'); INSERT INTO OID_TBL(f1) VALUES ('1235'); SELECT * FROM OID_TBL WHERE f1 = 1234; SELECT * FROM OID_TBL WHERE f1 <> 1234; SELECT * FROM OID_TBL WHERE f1 = '1234'; INSERT INTO OID_TBL(f1) VALUES (' '); SELECT * FROM OID_TBL WHERE f1 = 1234; SELECT * FROM OID_TBL WHERE f1 <> 1234; SELECT * FROM OID_TBL WHERE f1 = '1234'; ### Actual Results: builtin opt gdk_dbpath = /ufs/dinther/MonetDB201407/var/monetdb5/dbfarm/demo builtin opt gdk_debug = 0 builtin opt gdk_vmtrim = no builtin opt monet_prompt = > builtin opt monet_daemon = no builtin opt mapi_port = 50000 builtin opt mapi_open = false builtin opt mapi_autosense = false builtin opt sql_optimizer = default_pipe builtin opt sql_debug = 0 MonetDB 5 server v11.17.17 "Jan2014-SP2" Serving database 'demo', using 8 threads Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked Found 15.356 GiB available main-memory. Copyright (c) 1993-July 2008 CWI. Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Listening for connection requests on mapi:monetdb://127.0.0.1:50000/ MonetDB/GIS module loaded MonetDB/JAQL module loaded MonetDB/SQL module loaded >Bulk operator required for str.stringleft Bulk operator required for str.stringleft mserver5: gdk_select.c:622: BAT_scanselect: Assertion `b->T->type != 6 || equi || b->T->nonil' failed. ./start_mserver5.sh: line 3: 4197 Aborted ./MonetDB201407/bin/mserver5 -d10 ### Expected Results: no crash The "INSERT INTO OID_TBL(f1) VALUES (' ');" creates a nil value. The nil is causing the crash during the queries. ## Comment 19911 Date: 2014-07-18 12:18:21 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [16629eb81fbc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=16629eb81fbc) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=16629eb81fbc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=16629eb81fbc) Changeset description: Fixed assertion. This fixes bug #3514. ## Comment 19912 Date: 2014-07-18 12:21:23 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [688c75ff08c2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=688c75ff08c2) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=688c75ff08c2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=688c75ff08c2) Changeset description: Added test for bug #3514.
mserver5 crash due (assertion failure in gdk_select.c)
https://api.github.com/repos/MonetDB/MonetDB/issues/3514/comments
0
2020-11-30T12:52:30Z
2024-06-27T12:03:45Z
https://github.com/MonetDB/MonetDB/issues/3514
753,453,592
3,514
[ "MonetDB", "MonetDB" ]
Date: 2014-07-15 09:49:41 +0200 From: Clint Cummins &lt;<ccummins>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.21 (Jan2014-SP3) CC: @hannesmuehleisen, @njnes Last updated: 2014-10-31 14:14:06 +0100 ## Comment 19904 Date: 2014-07-15 09:49:41 +0200 From: Clint Cummins &lt;<ccummins>&gt; User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E) Build Identifier: I am testing tables with 800 million rows. When I try COPY BINARY INTO with a BIGINT or DOUBLE column, this is a 6.25gb file (6,250,000 kb). I get the error message: "failed to attach file". It works fine with an INT column (3.125gb file), or with 4 TINYINT columns (from 4 files). Reproducible: Always ### Steps to Reproduce: 1. Create a 6,250,000 kb file named foo.r8 with 800,000,000 DOUBLE values. 2. create table b800m ( foo double ); 3. copy binary into b800m from ( 'c:\users\ccummins\appdata\foo.r8' ); ### Actual Results: Error message: "failed to attach file" ### Expected Results: 800000000 rows affected mserver5 --version: libpcre: 8.13 2011-08-16 openssl: OpenSSL 1.0.1b 26 Apr 2012 libxml2: 2.7.8 Server startup: "Found 127.973 GiB available main-memory." ## Comment 19908 Date: 2014-07-18 03:13:05 +0200 From: Clint Cummins &lt;<ccummins>&gt; Created attachment 291 screenshot - crash for COPY BINARY INTO table FROM 4gb file I4gb.i8 is a 4gb file; COPY BINARY INTO i4gb FROM ( 'i4gb.i8' ); -- crashes mserver5.exe I4ga.i8 is 8 bytes smaller, and COPY BINARY INTO works fine with it. So 4gb is apparently the dividing line between files which work and those which do not. My prior examples were 3.125gb and 6.25 gb. > Attached file: [copy_binary_into_4gb_filesize_bug.gif](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3513_copy_binary_into_4gb_filesize_bug.gif_291) (image/gif, 27207 bytes) > Description: screenshot - crash for COPY BINARY INTO table FROM 4gb file ## Comment 19909 Date: 2014-07-18 03:15:55 +0200 From: Clint Cummins &lt;<ccummins>&gt; I refined the bug description: COPY BINARY INTO table FROM ( 'file' ); crashes on a 4gb file, but works fine on a file which is 8 bytes shorter. COPY BINARY INTO is a nice fast way to import data into MonetDB, and I want to use it on large files like this frequently. ## Comment 19953 Date: 2014-08-05 08:45:55 +0200 From: @njnes seems to run just fine on linux, ie a windows related of build related bug. Just to exclude the later, you are running a 64bit version of MonetDB? ## Comment 19958 Date: 2014-08-06 00:34:54 +0200 From: Clint Cummins &lt;<ccummins>&gt; (In reply to comment 3) > seems to run just fine on linux, ie a windows related of build related bug. > Just to exclude the later, you are running a 64bit version of MonetDB? Yes, the attachment I added on 2014-07-18 shows the mserver5.exe version: " Compiled for x86_64-pc-winnt/64bit with 64bit OIDs dynamically linked" The mclient.exe --version doesn't mention 64bit. Both .exe files are dated as the 2014-05-14 10:11 AM build. Thank you for testing this on linux. Given that it fails at the 4GB point on Windows 64, I suppose we might suspect there is a 32-bit integer somewhere in the Windows i/o interface which should be 64-bit? ## Comment 19960 Date: 2014-08-06 10:43:52 +0200 From: @njnes indeed we suspect the windows io interface. ## Comment 19999 Date: 2014-08-07 11:31:45 +0200 From: @hannesmuehleisen Confirmed for Jan2014-SP3 on Windows7 64 bits sql>create table foo(i integer); operation successful (45.181ms) sql>copy binary into foo from ('c:\Users\hannes\2bnints'); 786432000 affected row (2m 24s) sql>create table foo2(i integer); operation successful (110.954ms) sql>copy binary into foo2 from ('c:\Users\hannes\1bnints'); failed to attach file c:\Users\hannes\1bnints The last error message appeared immediately. File sizes: 1bnints 5242880000 (> 4 GB) 2bnints 3145728000 (< 4 GB) ## Comment 20003 Date: 2014-08-07 14:03:54 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [1ae0470d6038](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1ae0470d6038) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1ae0470d6038](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1ae0470d6038) Changeset description: Possible fix for Bug #3513 ## Comment 20027 Date: 2014-08-11 17:33:55 +0200 From: @hannesmuehleisen Confirmed fixed in Jan2014 branch. You may try the *test only* build at http://monetdb.cwi.nl/testweb/web/52388:64939b9031c6/MonetDB5-SQL-Installer-x86_64-64939b9031c6.msi to confirm. sql>copy binary into foo from ('c:\Users\hannes\1bnints'); 1310720000 affected row (1m 15s) ## Comment 20030 Date: 2014-08-12 01:15:19 +0200 From: Clint Cummins &lt;<ccummins>&gt; (In reply to comment 8) > Confirmed fixed in Jan2014 branch. You may try the *test only* build at > http://monetdb.cwi.nl/testweb/web/52388:64939b9031c6/MonetDB5-SQL-Installer- > x86_64-64939b9031c6.msi to confirm. Thanks - I confirmed that this fixes the problem. It was very resourceful to think of trying the O_BINARY flag for this. ## Comment 20354 Date: 2014-10-31 14:14:06 +0100 From: @sjoerdmullender Oct2014 has been released.
COPY BINARY INTO fails on 6gb file; works fine on 3gb
https://api.github.com/repos/MonetDB/MonetDB/issues/3513/comments
0
2020-11-30T12:52:27Z
2024-06-27T12:03:44Z
https://github.com/MonetDB/MonetDB/issues/3513
753,453,555
3,513
[ "MonetDB", "MonetDB" ]
Date: 2014-07-14 17:33:41 +0200 From: Anthony Damico &lt;<ajdamico>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.17 (Jan2014-SP2) CC: ajdamico, @hannesmuehleisen, @njnes Last updated: 2014-10-31 14:15:04 +0100 ## Comment 19901 Date: 2014-07-14 17:33:41 +0200 From: Anthony Damico &lt;<ajdamico>&gt; User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 Build Identifier: this CASTing worked on previous versions of MonetDB, it does not work on SP-2 windows. Hannes tested on SP-1 and said it did not fail there. it is now preventing the PISA script from working https://github.com/ajdamico/usgsd/tree/master/Program%20for%20International%20Student%20Assessment Reproducible: Always ### Steps to Reproduce: create table test (a varchar(100) ) ; INSERT INTO test (a) VALUES ('0.10'); INSERT INTO test (a) VALUES ('9999.00') ; UPDATE test SET a = NULL WHERE a IN ( 9999 ) ; ### Actual Results: Welcome to mclient, the MonetDB/SQL interactive terminal (Jan2014-SP2) Database: MonetDB v11.17.17 (Jan2014-SP2), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql> sql>create table test (a varchar(100) ) ; operation successful (222.637ms) sql>INSERT INTO test (a) VALUES ('0.10'); 1 affected row (35.888ms) sql>INSERT INTO test (a) VALUES ('9999.00') ; 1 affected row (14.665ms) sql>UPDATE test SET a = NULL WHERE a IN ( 9999 ) ; conversion of string '0.10' to type sht failed. sql> sql> ### Expected Results: the second row '9999.00' should turn to NULL ## Comment 19902 Date: 2014-07-14 17:40:55 +0200 From: @hannesmuehleisen It did work with SP1, even if it probably should not have. Regardless, something that did not complain before now does. Breaks things... ## Comment 19903 Date: 2014-07-14 17:43:14 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [659ff3ba93e7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=659ff3ba93e7) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=659ff3ba93e7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=659ff3ba93e7) Changeset description: Test for Bug #3512 ## Comment 19938 Date: 2014-07-31 10:16:19 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [d5baebc17f07](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d5baebc17f07) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d5baebc17f07](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d5baebc17f07) Changeset description: Test for Bug #3512 (grafted from 659ff3ba93e7204761cba67a4222932ad168c0f9) ## Comment 19939 Date: 2014-07-31 10:59:01 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [f342e140e65a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f342e140e65a) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f342e140e65a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f342e140e65a) Changeset description: Update for test case for Bug #3512, there is more to this ## Comment 19993 Date: 2014-08-06 22:11:26 +0200 From: @njnes the string 9999.00 != 9999, ie what is the expected result. I agree the error message is incorrect. ## Comment 19994 Date: 2014-08-07 09:21:09 +0200 From: @hannesmuehleisen Niels, see sql/test/BugTracker-2014/Tests/stringfloatshtcompare.Bug-3512.sql for more details on what is going wrong... ## Comment 19995 Date: 2014-08-07 09:29:33 +0200 From: @njnes other db's also have problems with this string in ( integer list ) expression. ## Comment 20276 Date: 2014-10-09 20:54:51 +0200 From: @njnes fixed compare operator to be more type critical ## Comment 20277 Date: 2014-10-09 20:55:09 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [7d21147d3306](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7d21147d3306) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7d21147d3306](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7d21147d3306) Changeset description: fixed stringfloatshtcompare Bug #3512 ## Comment 20404 Date: 2014-10-31 14:15:04 +0100 From: @sjoerdmullender Oct2014 has been released.
auto-conversion of string to `sht` type no longer works
https://api.github.com/repos/MonetDB/MonetDB/issues/3512/comments
0
2020-11-30T12:52:24Z
2024-06-27T12:03:43Z
https://github.com/MonetDB/MonetDB/issues/3512
753,453,520
3,512
[ "MonetDB", "MonetDB" ]
Date: 2014-07-14 16:04:29 +0200 From: @alvanaki To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.17 (Jan2014-SP2) CC: @njnes Last updated: 2015-05-08 10:29:01 +0200 ## Comment 19900 Date: 2014-07-14 16:04:29 +0200 From: @alvanaki User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0 Build Identifier: I try to evaluate two functions contains(smallc, bigc) and contains(bigc, smallc). When the functions are evaluated in the same query i.e. SELECT contains(smallc, bigc), contains(bigc, smallc) the results are correct. However, if I use aliases for the results, i.e. SELECT contains(smallc, bigc) AS smallcontainsbig, contains(bigc, smallc) AS bigcontainssmall, the result for both functions is the same; that of the first function. Reproducible: Always ### Steps to Reproduce: 1. SELECT contains(smallc, bigc) AS smallcontainsbig, contains(bigc, smallc) AS bigcontainssmall FROM (SELECT Buffer(GeomFromText('POINT(1 2)', 0), 10) As smallc, Buffer(GeomFromText('POINT(1 2)', 0), 20) As bigc) As foo; ### Actual Results: false false ### Expected Results: false true mserver5 --version gave the following result MonetDB 5 server v11.17.18 (64-bit, 64-bit oids) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 15.4GiB available memory, 8 available cpu cores Libraries: libpcre: 8.33 2013-05-28 (compiled with 8.33) openssl: OpenSSL 1.0.1e 11 Feb 2013 (compiled with OpenSSL 1.0.1e-fips 11 Feb 2013) libxml2: 2.9.1 (compiled with 2.9.1) Compiled by: alvanaki@sibuyan.da.cwi.nl (x86_64-unknown-linux-gnu) Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code Linking : /usr/bin/ld -m elf_x86_64 ## Comment 19980 Date: 2014-08-06 19:02:59 +0200 From: @njnes fixed bug in rel_select_cse/rel_project_cse. ## Comment 19988 Date: 2014-08-06 19:12:38 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [516d270cbe32](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=516d270cbe32) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=516d270cbe32](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=516d270cbe32) Changeset description: fixed bugs 3505 and 3511 ## Comment 20095 Date: 2014-08-26 11:16:44 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [cefa75ee2806](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cefa75ee2806) made by Stefan Manegold <Stefan.Manegold@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=cefa75ee2806](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=cefa75ee2806) Changeset description: test bug_in_cse.Bug-3511 requires GEOM ## Comment 20390 Date: 2014-10-31 14:14:46 +0100 From: @sjoerdmullender Oct2014 has been released. ## Comment 20856 Date: 2015-05-08 10:29:01 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [182bb4a55f21](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=182bb4a55f21) made by Foteini Alvanaki <foteini.alvanaki@monetdbsolutions.com> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=182bb4a55f21](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=182bb4a55f21) Changeset description: bug_in_cse.Bug-3511 updated
When having multiple selections combined with aliases not all of them seem to be evalauted.
https://api.github.com/repos/MonetDB/MonetDB/issues/3511/comments
0
2020-11-30T12:52:21Z
2024-06-27T12:03:42Z
https://github.com/MonetDB/MonetDB/issues/3511
753,453,492
3,511