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: 2010-10-28 15:21:36 +0200
From: @grobian
To: clients devs <<bugs-clients>>
Version: -- development
Last updated: 2011-03-28 17:31:31 +0200
## Comment 15153
Date: 2010-10-28 15:21:36 +0200
From: @grobian
It would be nice if we could list/describe objects other than tables and views. E.g. schemas and sequences. Maybe there are more. We can extend \d to recognise a following character to identify what we want to list, and then allow \d <obj> to describe the object using the dump code.
## Comment 15251
Date: 2010-12-03 09:47:17 +0100
From: @grobian
large part of this has been implemented, we only can't distinguish between views and tables.
## Comment 15308
Date: 2010-12-10 12:56:20 +0100
From: @grobian
this is now fully implemented for the next feature release
## Comment 15628
Date: 2011-03-28 17:31:31 +0200
From: @sjoerdmullender
The Mar2011 version has been released.
| implement \d{t,v,s,S,...} to describe other (or only) objects in the database | https://api.github.com/repos/MonetDB/MonetDB/issues/2710/comments | 0 | 2020-11-30T11:11:26Z | 2024-06-27T11:50:13Z | https://github.com/MonetDB/MonetDB/issues/2710 | 753,385,035 | 2,710 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-27 17:16:23 +0200
From: @skinkie
To: MonetDB5 devs <<bugs-monetdb5>>
Version: -- development
CC: @drstmane
Last updated: 2010-12-17 17:24:44 +0100
## Comment 15129
Date: 2010-10-27 17:16:23 +0200
From: @skinkie
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.36 Safari/534.7
Build Identifier:
Debugged my webserver connector code:
resHdl = mapi_query(dbh, query->buf);
works (non NULL and MOK)
But when I arrive a few milliseconds later in another function that reuses the
result, and explicitly check it again I get a server error (hence: -4)
Breakpoint 1, dbs_monetdb_query (hdl=0x76b030, query=0x659120) at
handler_dbslayer_monetdb.c:34
34 dbs_monetdb_query(cherokee_handler_dbslayer_t *hdl, cherokee_buffer_t
*query) {
(gdb) n
35 Mapi dbh = (Mapi) hdl->conn;
(gdb)
38 if (dbh == NULL || mapi_error(dbh)) {
(gdb) print dbh
$1 = (Mapi) 0x76b4d0
(gdb) print mapi_error(dbh)
$2 = 0
(gdb) c
Continuing.
Breakpoint 2, dbs_monetdb_step (hdl=0x76b030, buffer=0x76a300) at
handler_dbslayer_monetdb.c:56
56 {
(gdb) n
57 Mapi dbh = (Mapi) hdl->conn;
(gdb)
58 MapiHdl resHdl = (MapiHdl) hdl->result;
(gdb)
60 if (dbh == NULL || mapi_error(dbh) != MOK) {
(gdb) print dbh
$3 = (Mapi) 0x76b4d0
(gdb) print mapi_error(dbh)
$4 = -4
Because all previous problems I know how to debug MAPI and I ended up in:
:0[0]:W
sSELECT kvk.kvk, kvk.bedrijfsnaam, kvk.adres, kvk.postcode, kvk.plaats,
kvk.type, not(anbikvk.anbi is null), status, kvk.kvks, kvk.sub, kvk.website
FROM kvk LEFT JOIN anbikvk ON kvk.kvks = anbikvk.kvks LEFT JOIN faillissementen
ON kvk.kvks = faillissementen.kvks WHERE kvk.kvks = 51144476 LIMIT 200 OFFSET
0;;
:11[0]:R
!MALException:opt.remap:Not yet implemented
:11[0]:R
:12[0]:W
Connection closed
(this only happens with my webserver connection, while mclient 'just works', might be query related...)
Reproducible: Always
MonetDB server v5.22.0 (64-bit), based on kernel v1.41.0 (64-bit oids)
Not released
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
Visit http://monetdb.cwi.nl/ for further information
Found 3.9GiB available memory, 2 available cpu cores
Configured for prefix: /opt/monetdb-testing
Libraries:
libpcre: 8.02 2010-03-19 (compiled with 8.02)
openssl: OpenSSL 1.0.0a 1 Jun 2010 (compiled with OpenSSL 1.0.0a 1 Jun 2010)
libxml2: 2.7.7 (compiled with 2.7.7)
Compiled by: skinkie@openkvk (x86_64-unknown-linux-gnu)
Compilation: gcc -Wall -Wextra -fno-strict-aliasing -g -Werror-implicit-function-declaration -Werror -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/x86_64-pc-linux-gnu/bin/ld -IPA -m elf_x86_64
## Comment 15190
Date: 2010-11-11 23:27:21 +0100
From: @skinkie
I observe that installing using a prefix with an existing installation seems to fail for some reason sometimes. Like 'old' libraries are used instead of new ones etc. Trying to install in a 'clean' prefix did solve the issues.
## Comment 15191
Date: 2010-11-12 07:54:16 +0100
From: @drstmane
If you have your own MonetDB build (from either HG sources or source tarball(s)) and plan to upgrade from one released version to a newer one or upgrade within the default development branch, it is always strongly recommended to at least clean your prefix by running `make uninstall` for each package (in reverse order of dependency), and (then) possibly also your build tress by running `make clean`, *before* upgrading your sources --- or even completely delete your prefix and build directory trees --- to be sure that no old versions of removed or renamed installed files stay around.
Usually, this is only required in case there are indeed files removed from or renamed in the source, but in case of doubt, better safe than sorry ...
## Comment 15375
Date: 2010-12-17 17:24:44 +0100
From: @grobian
we don't really support in place/overwrite upgrades of MonetDB
| Installing/Upgrading MonetDB within existing prefix fails in runtime | https://api.github.com/repos/MonetDB/MonetDB/issues/2709/comments | 0 | 2020-11-30T11:11:22Z | 2024-06-28T13:19:54Z | https://github.com/MonetDB/MonetDB/issues/2709 | 753,385,003 | 2,709 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-26 21:02:23 +0200
From: @romulogoncalves
To: SQL devs <<bugs-sql>>
Version: 2.40.1 (Oct2010) [obsolete]
CC: @njnes
Last updated: 2011-03-28 17:31:22 +0200
## Comment 15113
Date: 2010-10-26 21:02:23 +0200
From: @romulogoncalves
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.12) Gecko/20100907 Fedora/3.5.12-1.fc12 Firefox/3.5.12
Build Identifier:
the following sql code crashes mserver:
create function f2(pra double, pdec double)
returns Table (objID bigint, distance double)
begin
return TABLE(select 50,60.0);
end;
SELECT distance FROM f2(161.68835,-0.3138) n;
SELECT distance FROM f2(293.07867,-4) n;
DROP ALL FUNCTION f2;
Reproducible: Always
### Steps to Reproduce:
1.see the "details"
2.
3.
### Actual Results:
crash
### Expected Results:
% .n table_name
% distance name
% double type
% 22 length
[ 60 ]
% .n table_name
% distance name
% double type
% 22 length
[ 60 ]
mserver5: /ufs/goncalve/MonetDB/current/sql/src/server/sql_atom.c:675: atom_cast: Assertion `(lng) ((sht) (-32767 - 1)) <= (lng) a->data.val.shval * mul && (lng) a->data.val.shval * mul <= (lng) ((sht) 32767)' failed.
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffdf793710 (LWP 20268)]
0x000000399e8326c5 in raise () from /lib64/libc.so.6
(gdb) bt
0 0x000000399e8326c5 in raise () from /lib64/libc.so.6
1 0x000000399e833ea5 in abort () from /lib64/libc.so.6
2 0x000000399e82b7b5 in __assert_fail () from /lib64/libc.so.6
3 0x00007fffdfe22e1f in atom_cast (a=0x7fffd0414568, tp=0x7fffd0008060)
at /ufs/goncalve/MonetDB/current/sql/src/server/sql_atom.c:675
4 0x00007fffdfe0aeea in SQLexecutePrepared (c=0x605b78, be=0x7fffd04067d8, q=0x7fffd04220d8)
at /ufs/goncalve/MonetDB/current/sql/src/backends/monet5/sql_scenario.mx:1449
5 0x00007fffdfe0b275 in SQLengineIntern (c=0x605b78, be=0x7fffd04067d8)
at /ufs/goncalve/MonetDB/current/sql/src/backends/monet5/sql_scenario.mx:1517
6 0x00007fffdfe0b7b0 in SQLengine (c=0x605b78)
at /ufs/goncalve/MonetDB/current/sql/src/backends/monet5/sql_scenario.mx:1627
7 0x00007ffff7d2337e in runPhase (c=0x605b78, phase=4)
at /ufs/goncalve/MonetDB/current/MonetDB5/src/mal/mal_scenario.mx:604
8 0x00007ffff7d23555 in runScenarioBody (c=0x605b78)
at /ufs/goncalve/MonetDB/current/MonetDB5/src/mal/mal_scenario.mx:655
9 0x00007ffff7d2373d in runScenario (c=0x605b78)
at /ufs/goncalve/MonetDB/current/MonetDB5/src/mal/mal_scenario.mx:682
10 0x00007ffff7cd0167 in MSserveClient (dummy=0x605b78)
at /ufs/goncalve/MonetDB/current/MonetDB5/src/mal/mal_session.mx:480
11 0x000000399f406a3a in start_thread () from /lib64/libpthread.so.0
12 0x000000399e8de77d in clone () from /lib64/libc.so.6
13 0x0000000000000000 in ?? ()
(gdb)
## Comment 15240
Date: 2010-12-01 23:16:57 +0100
From: @njnes
doesn't crash anymore. Could you add the test?
## Comment 15613
Date: 2011-03-28 17:31:22 +0200
From: @sjoerdmullender
The Mar2011 version has been released.
| function with different value for arguments crashes mserver | https://api.github.com/repos/MonetDB/MonetDB/issues/2708/comments | 0 | 2020-11-30T11:11:19Z | 2024-06-27T11:50:11Z | https://github.com/MonetDB/MonetDB/issues/2708 | 753,384,966 | 2,708 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-26 14:36:32 +0200
From: @grobian
To: SQL devs <<bugs-sql>>
Version: 2.40.1 (Oct2010) [obsolete]
Duplicates: #2698
Last updated: 2010-10-28 14:32:12 +0200
## Comment 15111
Date: 2010-10-26 14:36:32 +0200
From: @grobian
The test
src/test/bugs/except-union-intersect-bug-sf-1146079
produces on all platforms wrong output.
Three issues can be distinguished:
a) sorting (ORDER BY) is performed incorrectly in some cases
b) garbage values (that cannot possibly come from the original tables) are returned
c) the test segfaults the server on Fedora10 I.64.32.d.1
## Comment 15151
Date: 2010-10-28 14:32:12 +0200
From: @grobian
*** This bug has been marked as a duplicate of bug #2698 ***
| src/test/bugs/except-union-intersect-bug-sf-1146079: order failure, random garbage | https://api.github.com/repos/MonetDB/MonetDB/issues/2707/comments | 0 | 2020-11-30T11:11:15Z | 2024-06-28T13:19:53Z | https://github.com/MonetDB/MonetDB/issues/2707 | 753,384,931 | 2,707 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-26 10:19:29 +0200
From: @grobian
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 11.11.7 (Jul2012-SP1)
CC: charnik, @lsidir
Last updated: 2012-11-07 19:50:36 +0100
## Comment 15103
Date: 2010-10-26 10:19:29 +0200
From: @grobian
per $SUBJECT, we need to first check using pkgconfig, then fall-back to raptor-config (if we want to support old generations of raptor)
## Comment 15104
Date: 2010-10-26 10:20:40 +0200
From: @grobian
actually, old versions come with raptor.pc, new versions with raptor2.pc
## Comment 15109
Date: 2010-10-26 11:24:18 +0200
From: @grobian
After fixing configure to detect raptor 1.9.0 and beyond (raptor2), rdf doesn't compile, because the raptor interface and abi changed significantly (the reason for v1 and v2).
## Comment 16026
Date: 2011-07-29 10:59:39 +0200
From: @sjoerdmullender
Apr2011-SP2 has been released.
## Comment 16265
Date: 2011-09-16 15:09:14 +0200
From: @sjoerdmullender
The Aug2011 version has been released.
## Comment 17661
Date: 2012-08-24 14:54:27 +0200
From: @sjoerdmullender
Jul2012-SP1 has been released.
## Comment 17913
Date: 2012-11-07 19:50:36 +0100
From: @grobian
this is fixed in the rdf branch since [4b250af20b10](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4b250af20b10)
| rdf fails to compile with raptor2 | https://api.github.com/repos/MonetDB/MonetDB/issues/2706/comments | 0 | 2020-11-30T11:11:11Z | 2024-06-27T11:50:09Z | https://github.com/MonetDB/MonetDB/issues/2706 | 753,384,892 | 2,706 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-25 12:49:25 +0200
From: @mlkersten
To: clients devs <<bugs-clients>>
Version: -- development
Last updated: 2011-03-28 17:31:32 +0200
## Comment 15095
Date: 2010-10-25 12:49:25 +0200
From: @mlkersten
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100907 Fedora/3.5.12-1.fc12 Firefox/3.5.12
Build Identifier:
mclient -te
sql>select * from tables;
....
26 tuples (1.0s)
Timer 1111.000 msec 26 rows
sql>-- help;
Timer 0.000 msec 26 rows
Aside from the double output on performance, the Timer for comment lines ideally should not be shown, or at least with the proper number of rows.
Reproducible: Always
### Steps to Reproduce:
1.
select * from tables;
-- useless comment
2.
3.
### Actual Results:
mclient -te
...
sql>select * from tables;
....
26 tuples (1.0s)
Timer 1111.000 msec 26 rows
sql>-- help;
Timer 0.000 msec 26 rows
### Expected Results:
mclient -te
...
sql>select * from tables;
....
Timer 1111.000 msec 26 rows
sql>-- help;
sql>
## Comment 15096
Date: 2010-10-25 12:52:17 +0200
From: @grobian
The timer option should be removed for non-XQuery languages, since it's tailored towards that scenario, and nothing more.
## Comment 15098
Date: 2010-10-25 14:10:54 +0200
From: @sjoerdmullender
Mclient doesn't know anything about comments, so an SQL comment is just another SQL statement as far as mclient is concerned, and it is therefore handled exactly the same.
The Timer line is wall-clock time as measured in the client. It is the time it takes to send the SQL comment to the server and receive a reply.
As Fabian notes, the -t option in mclient works best with XQuery, since only in that case we ask the server to provide (extra) timer information.
## Comment 15150
Date: 2010-10-28 14:31:27 +0200
From: @grobian
moving this bug to development, since any change here will end up there anyway.
## Comment 15404
Date: 2011-01-24 13:57:07 +0100
From: @grobian
Changeset [4f1fe13efae8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4f1fe13efae8) made by Fabian Groffen <fabian@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4f1fe13efae8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4f1fe13efae8)
Changeset description:
mclient: disable timer for non-XQuery, bug #2705
The timer is incorrect for non-XQuery languages, since it was designed
and made for XQuery only. The built-in timer for SQL is more correct,
and is always available in SQL rendering mode.
## Comment 15405
Date: 2011-01-24 13:57:56 +0100
From: @grobian
timer option removed for non-XQuery languages.
## Comment 15631
Date: 2011-03-28 17:31:32 +0200
From: @sjoerdmullender
The Mar2011 version has been released.
| Timer information problems | https://api.github.com/repos/MonetDB/MonetDB/issues/2705/comments | 0 | 2020-11-30T11:11:08Z | 2024-06-27T11:50:08Z | https://github.com/MonetDB/MonetDB/issues/2705 | 753,384,857 | 2,705 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-25 12:00:00 +0200
From: @romulogoncalves
To: SQL devs <<bugs-sql>>
Version: 2.40.1 (Oct2010) [obsolete]
CC: @njnes
Last updated: 2011-03-28 17:31:41 +0200
## Comment 15094
Date: 2010-10-25 12:00:00 +0200
From: @romulogoncalves
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.12) Gecko/20100907 Fedora/3.5.12-1.fc12 Firefox/3.5.12
Build Identifier:
If we start mserver and then we create the following function:
CREATE FUNCTION funcTest(nme varchar(40))
RETURNS STRING
BEGIN
RETURN ( SELECT name
FROM _tables
WHERE name = UPPER(nme)
);
END;
Stop mserver and start it in readonly mode and run the following query:
SELECT s.id
from _tables s, _tables l
where
s.name = funcTest('QSO');
At the mclient side I get the following:
[goncalve@alviss queries]$ mclient current debug sql < test
MAPI = monetdb@localhost:55000
QUERY = SELECT s.id
from _tables s, _tables l
where
s.name = funcTest('QSO');
ERROR = !TypeException:user.s0_1[4]:'user.functest' undefined in: _10:any := user.functest(_9:str)
!TypeException:user.s0_1[5]:'algebra.uselect' undefined in: _11:any := algebra.uselect(_4:bat[:oid,:str], _10:any)
!TypeException:user.s0_1[7]:'algebra.markT' undefined in: _14:any := algebra.markT(_11:any, _12:oid)
!TypeException:user.s0_1[8]:'bat.reverse' undefined in: _15:any := bat.reverse(_14:any)
!TypeException:user.s0_1[10]:'algebra.leftjoin' undefined in: _18:any := algebra.leftjoin(_15:any, _16:bat[:oid,:int])
!TypeException:user.s0_1[17]:'algebra.project' undefined in: _25:any := algebra.project(_18:any, _22:int)
!TypeException:user.s0_1[18]:'algebra.join' undefined in: _26:any := algebra.join(_25:any, _24:bat[:int,:oid])
!TypeException:user.s0_1[20]:'algebra.markT' undefined in: _28:any := algebra.markT(_26:any, _27:oid)
!TypeException:user.s0_1[21]:'bat.reverse' undefined in: _29:any := bat.reverse(_28:any)
!TypeException:user.s0_1[22]:'algebra.leftjoin' undefined in: _30:any := algebra.leftjoin(_29:any, _18:any)
Timer 2.000 msec
At the mserver I get a crash:
schema statements cannot be executed on a readonly database.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffdf391710 (LWP 8425)]
0x000000399e87f2e2 in __strlen_sse2 () from /lib64/libc.so.6
(gdb) bt
0 0x000000399e87f2e2 in __strlen_sse2 () from /lib64/libc.so.6
1 0x00007fffdfe0a9a5 in SQLparser (c=0x605b78)
at /ufs/goncalve/MonetDB/current/sql/src/backends/monet5/sql_scenario.mx:1326
2 0x00007ffff7d2337e in runPhase (c=0x605b78, phase=1)
at /ufs/goncalve/MonetDB/current/MonetDB5/src/mal/mal_scenario.mx:604
3 0x00007ffff7d234b6 in runScenarioBody (c=0x605b78)
at /ufs/goncalve/MonetDB/current/MonetDB5/src/mal/mal_scenario.mx:646
4 0x00007ffff7d2373d in runScenario (c=0x605b78)
at /ufs/goncalve/MonetDB/current/MonetDB5/src/mal/mal_scenario.mx:682
5 0x00007ffff7cd0167 in MSserveClient (dummy=0x605b78)
at /ufs/goncalve/MonetDB/current/MonetDB5/src/mal/mal_session.mx:480
6 0x000000399f406a3a in start_thread () from /lib64/libpthread.so.0
7 0x000000399e8de77d in clone () from /lib64/libc.so.6
8 0x0000000000000000 in ?? ()
NOTE: The mserver complains about "schema statements cannot be executed on a readonly database." But there is not any DDL query, except the temp table that is created inside the function.
When the mserver is not on readonly mode everything works fine.
Reproducible: Always
### Steps to Reproduce:
1. Described in "details".
2.
3.
### Actual Results:
crash in the mserver
### Expected Results:
SELECT s.id
from _tables s, _tables l
where
s.name = funcTest('QSO');
% sys.s table_name
% id name
% int type
% 1 length
## Comment 15241
Date: 2010-12-01 23:19:25 +0100
From: @njnes
also doesn't crash anymore. Could you add the test.
## Comment 15651
Date: 2011-03-28 17:31:41 +0200
From: @sjoerdmullender
The Mar2011 version has been released.
| temporary tables on readonly mode | https://api.github.com/repos/MonetDB/MonetDB/issues/2704/comments | 0 | 2020-11-30T11:11:05Z | 2024-06-27T11:50:06Z | https://github.com/MonetDB/MonetDB/issues/2704 | 753,384,828 | 2,704 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-22 13:02:59 +0200
From: ANGOR <<angorgrup>>
To: clients devs <<bugs-clients>>
Version: 1.38.5 (Jun2010-SP2) [obsolete]
CC: angorgrup
Last updated: 2010-11-15 09:39:04 +0100
## Comment 15088
Date: 2010-10-22 13:02:59 +0200
From: ANGOR <<angorgrup>>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.41 Safari/534.7
Build Identifier:
We use an application to generate XML Cube based on information stored in a MonetDB DataBase. The application is developed in Java. It is Schema WorkBenh (http://mondrian.pentaho.com/documentation/workbench.php). We created a JDBC Connection using JDBC Driver for MonetDb. In the JDBC explorer of this application you can see the graphical DataBase Structure. To Do that the application needs to connect on The DataBase and Give information. If we use MySQL driver on MYSQL DataBase all run well but if we use MonetDB the problem is that we can see just the first table in the graphical structure and nothing else, the program crash with a JDBC exception generatated by MonetDB Driver and the problem is that ResultSet is Closed.
Reproducible: Always
### Steps to Reproduce:
1. Load JDBC Driver for monetDb in the SchemaWorkBench application
2. Set the field to connect to a database with monet in the Option-->Connection Menu
3. Go to File-->New-->JDBC Explorer
### Actual Results:
Here you can see that the only table visible is the first and in the java console you can see that the program crashed with a JDBC Exception generated by a ResultSet Closed.
### Expected Results:
The expected Result is that the application shows all table of DataBase.
Problem Solved editing the source of jdbc driver.
## Comment 15089
Date: 2010-10-22 13:07:04 +0200
From: ANGOR <<angorgrup>>
Bug Resolved
## Comment 15090
Date: 2010-10-22 13:09:00 +0200
From: ANGOR <<angorgrup>>
Resolved
## Comment 15091
Date: 2010-10-22 13:10:07 +0200
From: @grobian
Can you tell us what exactly you edited?
What query is causing the resultset close? Can you set KEEP_CURRENT_RESULT or
something similar?
## Comment 15092
Date: 2010-10-22 14:55:09 +0200
From: @grobian
Changeset [8c4900034b84](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8c4900034b84) made by Fabian Groffen <fabian@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=8c4900034b84](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=8c4900034b84)
Changeset description:
Fix bug #2703, don't try to be clever, just use a new Statement for each query such that multiple metadata ResultSets can be open at the same time
## Comment 15093
Date: 2010-10-22 14:58:40 +0200
From: @grobian
You're using a very old release of MonetDB, this fix will be in the upcoming Oct2010 release.
| ResultSet is closed if I use JDBC to give information about a Database on a Swing Java Application(Schema Workbench Pentaho) | https://api.github.com/repos/MonetDB/MonetDB/issues/2703/comments | 0 | 2020-11-30T11:11:02Z | 2024-06-27T11:50:05Z | https://github.com/MonetDB/MonetDB/issues/2703 | 753,384,793 | 2,703 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-22 11:06:34 +0200
From: @grobian
To: clients devs <<bugs-clients>>
Version: 1.40.1 (Oct2010) [obsolete]
CC: @drstmane
Last updated: 2010-10-28 14:29:03 +0200
## Comment 15085
Date: 2010-10-22 11:06:34 +0200
From: @grobian
% $INSTALL_DIR/bin/mclient -dsensor -fcsv -s "select * from sensor_readings where emit_time between '2010-10-01' and '2010-10-04';" | wc -l
2021992
% $INSTALL_DIR/bin/mclient -dtest3000 -fcsv -s "select * from sensor_readings where emit_time between '2010-10-01' and '2010-10-04';" | wc -l
0
% $INSTALL_DIR/bin/mclient -dsensor -fcsv -s "select * from sensor_readings where emit_time between '2010-10-01' and '2010-10-04';" | $INSTALL_DIR/bin/mclient -dtest3000 -s "copy into sensor_readings from stdin using delimiters ',','\n';"
% $INSTALL_DIR/bin/mclient -dtest3000 -fcsv -s "select * from sensor_readings where emit_time between '2010-10-01' and '2010-10-04';" | wc -l
0
In fact the entire table in test3000 is empty, also the variant of giving the number of records doesn't work. It seems I really HAVE to feed it all through a pipe, which does work:
$ { echo "copy into sensor_readings from stdin using delimiters ',','\n';"; $INSTALL_DIR/bin/mclient -dsensor -fcsv -s "select * from sensor_readings where emit_time between '2010-10-01' and '2010-10-04';"; } | $INSTALL_DIR/bin/mclient -dtest3000
2021992 affected rows
% $INSTALL_DIR/bin/mclient -dtest3000 -fcsv -s "select * from sensor_readings where emit_time between '2010-10-01' and '2010-10-04';" | wc -l
2021992
The problem here seems to be that there is no response whatsoever, while it seems the data is being shipped to the server.
## Comment 15086
Date: 2010-10-22 11:38:24 +0200
From: @sjoerdmullender
(In reply to comment 0)
> % $INSTALL_DIR/bin/mclient -dsensor -fcsv -s "select * from sensor_readings
> where emit_time between '2010-10-01' and '2010-10-04';" |
> $INSTALL_DIR/bin/mclient -dtest3000 -s "copy into sensor_readings from stdin
> using delimiters ',','\n';"
Does this one work if you leave out the semicolon at the end of the "copy into" query? (mclient adds a semicolon to SQL statements.)
## Comment 15087
Date: 2010-10-22 12:36:02 +0200
From: @grobian
No, the behaviour is mandated by current mclient logic. If you use -s, further processing will only be done when interactive (-i) or additional files are given to mclient.
Hence writing "cat something | mclient -s 'bla;' /dev/stdin" works too.
I don't dare to change this behaviour in the upcoming release. I think we can remove the restriction not to process stdin pipe when using -s, as it continues reading from files too.
Maybe we can give a warning if stdin is not "interactive" (tty) that stdin is ignored, to at least clarify current behaviour.
## Comment 15100
Date: 2010-10-26 10:03:55 +0200
From: @sjoerdmullender
Looking at the report again, now in more detail, I have to disagree that this is a bug.
When you use a command-line query, be it using -s or using a file, and in the absence of a -i option, mclient will not read from stdin. Period.
The situation where you have both a -s query *and* files on the command line is different. You specify (additional) queries with the file argument. This can be likened to adding a -i option to get more queries from stdin.
What you're doing is equivalent to doing a copy into from an empty file. You shouldn't get a warning about that either.
I'd say, this bug is INVALID.
## Comment 15101
Date: 2010-10-26 10:07:15 +0200
From: @grobian
Asking for interactive means line by line reading, and processing of \X commands to me. So I don't see why that would mean not reading from stdin, when this happens not to be a tty/console.
## Comment 15102
Date: 2010-10-26 10:08:19 +0200
From: @grobian
put differently, piping something into mclient isn't interactive at all, so why would one have to give -i for that?
## Comment 15105
Date: 2010-10-26 10:38:38 +0200
From: @sjoerdmullender
I maintain, this is not a bug.
If anything, this is a request for enhancement, and then the summary is not very good.
Perhaps we should do something similar to what the shell does. The shell also doesn't read commands from stdin when commands are passed on the command line through (in the case of the shell) the -c option or by specifying a file. However, you can specify the -s option to read commands from stdin (although then the command line arguments are then not read by the shell but available to the commands that are read from stdin), and the -i option to tell the shell to be interactive (i.e. print the prompt and such--the equivalent to our processing \X commands).
In other words, have an option in mclient to read from stdin, and one to be interactive (process line-by-line and process \X), which would probably imply the read-from-stdin option (our current -i option).
However, the new option would be equivalent to appending /dev/stdin to the command line, and doing that is more flexible (you can also put /dev/stdin somewhere else than at the end). The only problem with this is systems that don't have /dev/stdin.
## Comment 15106
Date: 2010-10-26 10:42:47 +0200
From: @grobian
I still feel that ignoring a pipe, while a given file is not ignored is weird, especially if you consider mclient's behaviour when you don't give -s.
echo "select 1;" | mclient -lsql
will work as fast as
echo "select 1;" > /var/tmp/tmpfile
mclient -lsql /var/tmp/tmpfile
with the -s option the former suddenly no longer works, while the latter does, for apparently no good reason.
## Comment 15107
Date: 2010-10-26 10:55:47 +0200
From: @sjoerdmullender
(In reply to comment 7)
> I still feel that ignoring a pipe, while a given file is not ignored is weird,
> especially if you consider mclient's behaviour when you don't give -s.
>
> echo "select 1;" | mclient -lsql
>
> will work as fast as
>
> echo "select 1;" > /var/tmp/tmpfile
>
> mclient -lsql /var/tmp/tmpfile
>
> with the -s option the former suddenly no longer works, while the latter does,
> for apparently no good reason.
It doesn't work (as you well know) *because* you add a -s option. That changes things completely. It shouldn't surprise you that adding an option changes the behavior of a program. That is what options are for.
## Comment 15108
Date: 2010-10-26 11:06:22 +0200
From: @grobian
It did surprise me, otherwise I wouldn't have filed a bug.
If you can read files after a command, you can read as easily from a pipe as well.
## Comment 15110
Date: 2010-10-26 11:53:34 +0200
From: @drstmane
a)
What about --- as a "compromize" --- treating filename "-" as alternative for /dev/stdin, and thus provide support for explicit pipe as file treatment also on systems that do not have /dev/stdin ?
b)
Is there any standard command line program that automatically adapts its behavior as follows:
- if stdin is a pipe (i.e., not an interactive terminal) then read from it
- if stdin is an interactive terminal, then do not read from it but terminate normally
?
(That's what Fabian wants/expects from `mclient -s`, right?)
## Comment 15149
Date: 2010-10-28 14:29:03 +0200
From: @grobian
(In reply to comment 10)
> a)
> What about --- as a "compromize" --- treating filename "-" as alternative for
> /dev/stdin, and thus provide support for explicit pipe as file treatment also
> on systems that do not have /dev/stdin ?
Sjoerd implemented this yesterday
> b)
> Is there any standard command line program that automatically adapts its
> behavior as follows:
> - if stdin is a pipe (i.e., not an interactive terminal) then read from it
> - if stdin is an interactive terminal, then do not read from it but terminate
> normally
> ?
> (That's what Fabian wants/expects from `mclient -s`, right?)
MySQL's documentation seems to suggest that mysql -e (execute) quits after processing the given statement, so that would make it do like mclient does now.
The same holds for psql -c (command), which exits after executing "command".
So I guess the behaviour as is, is desired, hence closing as invalid.
| mclient ignores piped input when -s is given | https://api.github.com/repos/MonetDB/MonetDB/issues/2702/comments | 0 | 2020-11-30T11:10:58Z | 2024-06-28T13:20:44Z | https://github.com/MonetDB/MonetDB/issues/2702 | 753,384,754 | 2,702 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-21 09:57:11 +0200
From: Guillaume Yziquel <<guillaume.yziquel>>
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 11.3.7 (Apr2011-SP2) [obsolete]
CC: @mlkersten, @drstmane
Last updated: 2011-09-16 15:04:40 +0200
## Comment 15080
Date: 2010-10-21 09:57:11 +0200
From: Guillaume Yziquel <<guillaume.yziquel>>
User-Agent: Midori/0.2 (X11; Linux; U; fr-ch) WebKit/531.2+
Build Identifier:
Hello.
Using MonetDB on a 64 bit arch, using Debian and Debian packages. I'm currently working as time allows on my OCaml binding embedding MonetDB, and experienced a divide by 0 in OPTmitosis.
http://yziquel.homelinux.org/ocaml-monetdb5 (when online...)
Here are, hopefully helpful, details of the crash:
yziquel@seldon:~$ ocaml
Objective Caml version 3.12.0
use "topfind";;
- : unit = ()
Findlib has been successfully loaded. Additional directives:
require "package";; to load a package
list;; to list the available packages
camlp4o;; to load camlp4 (standard syntax)
camlp4r;; to load camlp4 (revised syntax)
predicates "p,q,...";; to set these predicates
Topfind.reset();; to force that packages will be reloaded
thread;; to enable threads
- : unit = ()
require "monetdb5";;
/usr/lib/ocaml/monetdb5: added to search path
/usr/lib/ocaml/monetdb5/monetDB5.cma: loaded
open MonetDB5;;
module DB = struct
include DB.SQL
let farm = "/path/to/my/monetdb/farm"
let name = "my_db"
end;;
module DB :
sig
val embedded : bool
val backend : MonetDB5.language
val farm : string
val name : string
end
include Embedded (DB);;
val mapi : MonetDB5.Mapi.mapi = <abstr>
val ask : int list -> string -> string option list list = <fun>
ask [0] "select name from tables;";;
Exception en point flottant
yziquel@seldon:~$
Which translates as "floating point exception".
yziquel@seldon:~/git/ocaml-monetdb5$ make debug
gdb --quiet --args ocamlrun ocaml -init ocamlinit
Reading symbols from /usr/bin/ocamlrun...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/ocamlrun ocaml -init ocamlinit
[Thread debugging using libthread_db enabled]
Objective Caml version 3.12.0
Findlib has been successfully loaded. Additional directives:
require "package";; to load a package
list;; to list the available packages
camlp4o;; to load camlp4 (standard syntax)
camlp4r;; to load camlp4 (revised syntax)
predicates "p,q,...";; to set these predicates
Topfind.reset();; to force that packages will be reloaded
thread;; to enable threads
[New Thread 0x2aaab0238710 (LWP 31881)]
[New Thread 0x2aaac2f6a710 (LWP 31884)]
[Thread 0x2aaab0238710 (LWP 31881) exited]
Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 0x2aaac2f6a710 (LWP 31884)]
0x00002aaabd8f65d9 in OPTmitosis () from /usr/lib/MonetDB5/lib/lib_optimizer.so.5
(gdb) bt
0 0x00002aaabd8f65d9 in OPTmitosis () from /usr/lib/MonetDB5/lib/lib_optimizer.so.5
1 0x00002aaabd8bcee6 in optimizeMALBlock () from /usr/lib/MonetDB5/lib/lib_optimizer.so.5
2 0x00002aaac2a60ac9 in addQueryToCache () from /usr/lib/MonetDB5/lib/lib_sql.so
3 0x00002aaac2a5fecc in backend_dumpproc () from /usr/lib/MonetDB5/lib/lib_sql.so
4 0x00002aaac2a58a7c in SQLparser () from /usr/lib/MonetDB5/lib/lib_sql.so
5 0x00002aaaaca6f057 in ?? () from /usr/lib/libmonetdb5.so.5
6 0x00002aaaaca6f2a7 in runScenario () from /usr/lib/libmonetdb5.so.5
7 0x00002aaaaca37e6e in MSserveClient () from /usr/lib/libmonetdb5.so.5
8 0x00002aaaab39e8ba in start_thread () from /lib/libpthread.so.0
9 0x00002aaaab68302d in clone () from /lib/libc.so.6
10 0x0000000000000000 in ?? ()
(gdb) info registers
rax 0x1f 31
rbx 0x2 2
rcx 0x2 2
rdx 0x0 0
rsi 0xb9a528 12166440
rdi 0x2aaaaded8fa0 46912550834080
rbp 0xaf5118 0xaf5118
rsp 0x2aaac2f69660 0x2aaac2f69660
r8 0x29 41
r9 0xb4b808 11843592
r10 0x2aaabdb04750 46912815253328
r11 0x2aaaacca3688 46912531740296
r12 0x0 0
r13 0xaf5118 11489560
r14 0xaaaaaaaaaaaaaaab -6148914691236517205
r15 0x1053758 17119064
rip 0x2aaabd8f65d9 0x2aaabd8f65d9 <OPTmitosis+1081>
eflags 0x10256 [ PF AF ZF IF RF ]
cs 0x33 51
ss 0x2b 43
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x0 0
(gdb) disassemble
Dump of assembler code for function OPTmitosis:
0x00002aaabd8f61a0 <+0>: push %r15
0x00002aaabd8f61a2 <+2>: mov %rsi,%r15
0x00002aaabd8f61a5 <+5>: push %r14
0x00002aaabd8f61a7 <+7>: push %r13
0x00002aaabd8f61a9 <+9>: push %r12
0x00002aaabd8f61ab <+11>: push %rbp
0x00002aaabd8f61ac <+12>: push %rbx
0x00002aaabd8f61ad <+13>: sub $0x538,%rsp
0x00002aaabd8f61b4 <+20>: mov %rdi,0x60(%rsp)
0x00002aaabd8f61b9 <+25>: mov %rdx,0x58(%rsp)
0x00002aaabd8f61be <+30>: mov %rcx,0x50(%rsp)
0x00002aaabd8f61c3 <+35>: callq 0x2aaabd8b8e70 <GDKusec@plt>
0x00002aaabd8f61c8 <+40>: mov %rax,0x68(%rsp)
0x00002aaabd8f61cd <+45>: callq 0x2aaabd8b9290 <optimizerInit@plt>
0x00002aaabd8f61d2 <+50>: cmpq $0x0,0x50(%rsp)
...
0x00002aaabd8f65a8 <+1032>: div %rbx
0x00002aaabd8f65ab <+1035>: mov %rax,0xa8(%rsp)
0x00002aaabd8f65b3 <+1043>: mov 0xa8(%rsp),%r12
0x00002aaabd8f65bb <+1051>: mov $0x1,%eax
0x00002aaabd8f65c0 <+1056>: cmp %r12,0x80(%rsp)
0x00002aaabd8f65c8 <+1064>: jle 0x2aaabd8f65e4 <OPTmitosis+1092>
0x00002aaabd8f65ca <+1066>: mov 0x80(%rsp),%rdx
0x00002aaabd8f65d2 <+1074>: mov %rdx,%rax
0x00002aaabd8f65d5 <+1077>: sar $0x3f,%rdx
=> 0x00002aaabd8f65d9 <+1081>: idivq 0xa8(%rsp)
The floating point exception occurs here. With the following values:
(gdb) p/x $rsp
$1 = 0x2aaac2f69660
(gdb) x/g (0x2aaac2f69660 + 0xa8)
0x2aaac2f69708: 0x0000000000000000
This issue has nothing to do with my binding, and is purely MonetDB5-related. I suspect you would have the same result doing the following things: Start an embedded_sql() session, with monet_embedded and gdk_embedded to 'yes', nothing in the whole database, and doing a 'select name from tables' SQL instruction.
Guillaume Yziquel.
Reproducible: Always
### Steps to Reproduce:
1. Start en embedded_sql() session, with monetdb_embedded and gdk_embedded to 'yes'.
2. Empty database.
3. Issue 'select name from tables;' SQL statement.
### Actual Results:
Crashes on an idivq instruction in OPTmitosis, with a floating point exception.
### Expected Results:
Well, 'select name in tables'...
No merovingian, nothing. Just embedded_sql() in the OCaml binding.
## Comment 15097
Date: 2010-10-25 12:59:10 +0200
From: @sjoerdmullender
Changeset [74f08442f0a7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=74f08442f0a7) 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=74f08442f0a7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=74f08442f0a7)
Changeset description:
Make sure monet_memory is initialized.
In case of an embedded server, monet_hello() isn't called, but
monet_hello() normally initializes monet_memory. So we make sure the
value is initialized in mal_init() which is always called.
monet_memory is used by the MAL interpreter, so it is appropriate to
do this here.
This fixes bug #2701.
## Comment 15099
Date: 2010-10-25 15:19:09 +0200
From: @sjoerdmullender
Changeset [6b4c13dcae6d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6b4c13dcae6d) 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=6b4c13dcae6d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6b4c13dcae6d)
Changeset description:
Test for bug #2701.
## Comment 15164
Date: 2010-10-30 11:29:13 +0200
From: @drstmane
The output for this test appears to differ between Unix-like systems
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/GNU.64.64.d.1-Fedora10/src_test_BugTracker-2010/Mbedded-crash.Bug-2701.out.00.html
and Windows
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Int.32.32.d.1-Windows5.1/src_test_BugTracker-2010/Mbedded-crash.Bug-2701.out.00.html
In case this is a (desired/accepted) feature, we need to approve both outputs;
otherwise, there seems to be some bug that needs to be fixed.
## Comment 15207
Date: 2010-11-17 15:12:20 +0100
From: @sjoerdmullender
(In reply to comment 3)
> In case this is a (desired/accepted) feature, we need to approve both outputs;
> otherwise, there seems to be some bug that needs to be fixed.
I expect the output to be the same, and in fact, when I run on my Fedora system, the test does give the correct output.
## Comment 15230
Date: 2010-11-26 21:36:37 +0100
From: @mlkersten
Added more protection in the kernel, because the variable GDKnr_threads may be set at runtime.
## Comment 15231
Date: 2010-11-28 11:46:55 +0100
From: @drstmane
FYI:
As far as I can see, global variable GDKnr_threads is only initialize / set in GDKinit() (MonetDB/src/gdk/gdk_utils.mx).
I assume that any start of a MonetDB server calls GDKinit() first.
Since GDKinit() seems to ensure that GDKnr_threads is not set to 0,
IMHO, the bug is not related to / triggered by GDKnr_threads being 0,
and the protective measures are not really required, here.
Rather, if GDKnr_threads was 0 this would IMHO be a logical bug in the code.
## Comment 15232
Date: 2010-11-28 12:09:08 +0100
From: @mlkersten
The variable GDKnr_threads is a global variable that may (accidently) be set during execution, which warrants some protection. Indeed, the embedded code should provide a proper initial value by setting it as part of the startup phase.
This can be either hardwired, or the responsibility of the embedded application writer.
## Comment 15233
Date: 2010-11-28 12:24:10 +0100
From: @drstmane
Changeset [1161f24990d1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1161f24990d1) 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=1161f24990d1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1161f24990d1)
Changeset description:
more protection against potential division by zero
in case GDKnr_threads is not properly initialized by GDKinit(),
e.g., in case of embedded servers (?);
see also bug #2701 at
http://bugs.monetdb.org/show_bug.cgi?id=2701
## Comment 15672
Date: 2011-03-28 17:35:56 +0200
From: @sjoerdmullender
The Mar2011 version has been released.
## Comment 16031
Date: 2011-07-29 10:59:41 +0200
From: @sjoerdmullender
Apr2011-SP2 has been released.
## Comment 16121
Date: 2011-08-21 19:01:24 +0200
From: @mlkersten
Made one more pass through the code for possible
mis-use of GDKnr_threads.
Closing until we reach a new generation of machines
## Comment 16255
Date: 2011-09-16 15:04:40 +0200
From: @sjoerdmullender
The Aug2011 version has been released.
| Divide by zero in OPTmitosis with select name from tables | https://api.github.com/repos/MonetDB/MonetDB/issues/2701/comments | 0 | 2020-11-30T11:10:55Z | 2024-06-27T11:50:03Z | https://github.com/MonetDB/MonetDB/issues/2701 | 753,384,704 | 2,701 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-20 00:45:56 +0200
From: @skinkie
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 5.22.1 (Oct2010) [obsolete]
Blocker for: #2665
Last updated: 2011-01-24 14:00:02 +0100
## Comment 15072
Date: 2010-10-20 00:45:56 +0200
From: @skinkie
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.36 Safari/534.7
Build Identifier:
All clients connected to MonetDB hang at the same time. A new mclient cannot connect to the server and hangs as well. From ps aux we can observe that the cpu usage is virtually idle. Also the server console is fully functional:
skinkie 28425 1.9 68.5 69517436 2776932 pts/10 Sl+ Oct19 6:38 /opt/monetdb-testing/bin/mserver5 --dbinit=include sphinx; --dbname=kvk-new --dbfarm=/mnt/data/mone
MonetDB server v5.22.0, based on kernel v1.41.0
Not released
Serving database 'kvk-new', using 2 threads
Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked
Found 3.865 GiB available main-memory.
Copyright (c) 1993-July 2008 CWI.
Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
Visit http://monetdb.cwi.nl/ for further information
warning: please don't forget to set your vault key!
(see /opt/monetdb-testing/etc/monetdb5.conf)
Listening for connection requests on mapi:monetdb://127.0.0.1:60005/
MonetDB/SQL module v2.40.0 loaded
>?
? - show this message
! - show the history
<file - read input from file
>file - save response in file
> - response to terminal
cd - change directory
\q - terminate session
>!
1 ?
Connecting mclient via GDB:
skinkie@openkvk ~ $ gdb --args /opt/monetdb-testing/bin/mclient -p 60005
GNU gdb (Gentoo 7.2 p1) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /opt/monetdb-testing/bin/mclient...done.
(gdb) r
Starting program: /opt/monetdb-testing/bin/mclient -p 60005
^C
Program received signal SIGINT, Interrupt.
0x00007ffff68bec90 in read () from /lib/libc.so.6
(gdb) bt
0 0x00007ffff68bec90 in read () from /lib/libc.so.6
1 0x00007ffff777d6bb in socket_read (s=0x61b990, buf=0x7fffffffb66e, elmsize=2, cnt=1) at ../../../src/common/stream.mx:1608
2 0x00007ffff777ff00 in mnstr_readSht (s=0x61b990, val=0x7fffffffb66e) at ../../../src/common/stream.mx:2914
3 0x00007ffff777f510 in bs_read (ss=0x61e720, buf=0x619700, elmsize=1, cnt=8190) at ../../../src/common/stream.mx:2638
4 0x00007ffff777bcaa in mnstr_read (s=0x61e720, buf=0x619700, elmsize=1, cnt=8190) at ../../../src/common/stream.mx:447
5 0x00007ffff7bd2d2f in read_line (mid=0x619460) at ../../../src/mapilib/Mapi.mx:3547
6 0x00007ffff7bd4c1f in read_into_cache (hdl=0x6208a0, lookahead=0) at ../../../src/mapilib/Mapi.mx:4025
7 0x00007ffff7bcfcfe in mapi_start_talking (mid=0x619460) at ../../../src/mapilib/Mapi.mx:2815
8 0x00007ffff7bd059b in mapi_reconnect (mid=0x619460) at ../../../src/mapilib/Mapi.mx:2987
9 0x00007ffff7bd060c in mapi_connect (host=0x0, port=60005, username=0x619400 "monetdb", password=0x619420 "monetdb", lang=0x619440 "sql", dbname=0x0)
at ../../../src/mapilib/Mapi.mx:3000
10 0x000000000040a5a7 in main (argc=3, argv=0x7fffffffe458) at ../../../src/mapiclient/mclient.c:2624
If we look at a typical client that actually 'hangs':
Thread 9 (Thread 0x7f52c1b6d710 (LWP 20293)):
0 0x00007f52c7d6c53d in read () from /lib/libpthread.so.0
1 0x00007f52c37696ec in socket_read (s=0x1714700, buf=0x7f52c1b6a52e, elmsize=2, cnt=1) at ../../../src/common/stream.mx:1606
2 0x00007f52c376becb in stream_readSht (s=0x1714700, val=0x7f52c1b6a52e) at ../../../src/common/stream.mx:2918
3 0x00007f52c376b535 in bs_read (ss=0x16f11f0, buf=0x171eaa0, elmsize=1, cnt=8190) at ../../../src/common/stream.mx:2642
4 0x00007f52c3767cb5 in stream_read (s=0x16f11f0, buf=0x171eaa0, elmsize=1, cnt=8190) at ../../../src/common/stream.mx:451
5 0x00007f52c397c75c in read_line (mid=0x16ff770) at ../../../src/mapilib/Mapi.mx:3498
6 0x00007f52c397e559 in read_into_cache (hdl=0x16f1300, lookahead=0) at ../../../src/mapilib/Mapi.mx:3968
7 0x00007f52c397989a in mapi_start_talking (mid=0x16ff770) at ../../../src/mapilib/Mapi.mx:2766
8 0x00007f52c397a121 in mapi_reconnect (mid=0x16ff770) at ../../../src/mapilib/Mapi.mx:2938
9 0x00007f52c397a191 in mapi_connect (host=0x15fe080 "127.0.0.1", port=60005, username=0x1646450 "dbslayer", password=0x1646420 "dbslayer12345",
lang=0x7f52c3b8a8c6 "sql", dbname=0x0) at ../../../src/mapilib/Mapi.mx:2951
10 0x00007f52c3b8a5ad in dbs_monetdb_connect (hdl=0x17141e0) at handler_dbslayer_monetdb.c:14
11 0x00007f52c3b89f65 in cherokee_handler_dbslayer_init (hdl=0x17141e0) at handler_dbslayer.c:190
12 0x00007f52c819b988 in process_active_connections (thd=0x15d4750) at thread.c:1073
13 0x00007f52c819c423 in cherokee_thread_step_MULTI_THREAD (thd=0x15d4750, dont_block=false) at thread.c:1973
14 0x00007f52c819cb2a in thread_routine (data=<value optimized out>) at thread.c:98
15 0x00007f52c7d64c0a in start_thread () from /lib/libpthread.so.0
16 0x00007f52c752fa9d in clone () from /lib/libc.so.6
Full backtrace of mserver5:
Thread 8 (Thread 0x7f1b6e0dc710 (LWP 28426)):
0 0x00007f1b743f61d3 in select () from /lib/libc.so.6
1 0x00007f1b76b8242d in MT_sleep_ms (ms=5000) at ../../../src/gdk/gdk_posix.mx:2248
2 0x00007f1b767797f0 in GDKvmtrim (limit=0x7f1b76ed0ef0) at ../../../src/gdk/gdk_utils.mx:1506
3 0x00007f1b752f4c0a in start_thread () from /lib/libpthread.so.0
4 0x00007f1b743fca9d in clone () from /lib/libc.so.6
Thread 7 (Thread 0x7f1b62ab0710 (LWP 28427)):
0 0x00007f1b743f61d3 in select () from /lib/libc.so.6
1 0x00007f1b66915f26 in SERVERlistenThread (Sock=0x12cecb8) at ../../../../src/modules/mal/mal_mapi.mx:495
2 0x00007f1b752f4c0a in start_thread () from /lib/libpthread.so.0
3 0x00007f1b743fca9d in clone () from /lib/libc.so.6
Thread 6 (Thread 0x7f1b628af710 (LWP 28428)):
0 0x00007f1b743f61d3 in select () from /lib/libc.so.6
1 0x00007f1b76b8242d in MT_sleep_ms (ms=30000) at ../../../src/gdk/gdk_posix.mx:2248
2 0x00007f1b632fcfac in store_manager () at ../../../src/storage/store.mx:1527
3 0x00007f1b632adc96 in mvc_logmanager () at ../../../src/server/sql_mvc.mx:368
4 0x00007f1b752f4c0a in start_thread () from /lib/libpthread.so.0
5 0x00007f1b743fca9d in clone () from /lib/libc.so.6
Thread 5 (Thread 0x7f1b616a2710 (LWP 28466)):
0 0x00007f1b752fb7b0 in sem_wait () from /lib/libpthread.so.0
1 0x00007f1b776276f6 in q_dequeue (q=0x11a66a8) at ../../../src/mal/mal_interpreter.mx:930
2 0x00007f1b77631c6a in runDFLOWworker (t=0x11a5018) at ../../../src/mal/mal_interpreter.mx:1124
3 0x00007f1b752f4c0a in start_thread () from /lib/libpthread.so.0
4 0x00007f1b743fca9d in clone () from /lib/libc.so.6
Thread 4 (Thread 0x7f1b614a1710 (LWP 28467)):
0 0x00007f1b752fb7b0 in sem_wait () from /lib/libpthread.so.0
1 0x00007f1b776276f6 in q_dequeue (q=0x11a66a8) at ../../../src/mal/mal_interpreter.mx:930
2 0x00007f1b77631c6a in runDFLOWworker (t=0x11a5038) at ../../../src/mal/mal_interpreter.mx:1124
3 0x00007f1b752f4c0a in start_thread () from /lib/libpthread.so.0
4 0x00007f1b743fca9d in clone () from /lib/libc.so.6
Thread 3 (Thread 0x7f1af9448710 (LWP 29161)):
0 0x00007f1b752fb7b0 in sem_wait () from /lib/libpthread.so.0
1 0x00007f1b776276f6 in q_dequeue (q=0x2ee4298) at ../../../src/mal/mal_interpreter.mx:930
2 0x00007f1b77631c6a in runDFLOWworker (t=0x2f89c98) at ../../../src/mal/mal_interpreter.mx:1124
3 0x00007f1b752f4c0a in start_thread () from /lib/libpthread.so.0
4 0x00007f1b743fca9d in clone () from /lib/libc.so.6
Thread 2 (Thread 0x7f1af9247710 (LWP 29162)):
0 0x00007f1b752fb7b0 in sem_wait () from /lib/libpthread.so.0
1 0x00007f1b776276f6 in q_dequeue (q=0x2ee4298) at ../../../src/mal/mal_interpreter.mx:930
2 0x00007f1b77631c6a in runDFLOWworker (t=0x2f89cb8) at ../../../src/mal/mal_interpreter.mx:1124
3 0x00007f1b752f4c0a in start_thread () from /lib/libpthread.so.0
4 0x00007f1b743fca9d in clone () from /lib/libc.so.6
Thread 1 (Thread 0x7f1b77b3b700 (LWP 28425)):
0 0x00007f1b752fc53d in read () from /lib/libpthread.so.0
1 0x00007f1b7714a6ae in rl_getc () from /lib/libreadline.so.6
2 0x00007f1b7714ab80 in rl_read_key () from /lib/libreadline.so.6
3 0x00007f1b771389d6 in readline_internal_char () from /lib/libreadline.so.6
4 0x00007f1b77138eaa in readline () from /lib/libreadline.so.6
5 0x00007f1b7766501d in getConsoleInput (c=0x605580, prompt=0x9ae678 ">", linemode=0, exit_on_error=1) at ../../../src/mal/mal_readline.mx:343
6 0x00007f1b776656e9 in readConsole (cntxt=0x605580) at ../../../src/mal/mal_readline.mx:502
7 0x00007f1b7760566a in MALreader (c=0x605580) at ../../../src/mal/mal_session.mx:545
8 0x00007f1b776586ea in runPhase (c=0x605580, phase=0) at ../../../src/mal/mal_scenario.mx:604
9 0x00007f1b776587cf in runScenarioBody (c=0x605580) at ../../../src/mal/mal_scenario.mx:641
10 0x00007f1b77658aa9 in runScenario (c=0x605580) at ../../../src/mal/mal_scenario.mx:682
11 0x00007f1b7760549b in MSserveClient (dummy=0x605580) at ../../../src/mal/mal_session.mx:480
12 0x000000000040357d in main (argc=6, av=0x7fffafa55f18) at ../../../src/tools/mserver5.mx:665
Reproducible: Always
### Steps to Reproduce:
1. run monetdb in production
2. wait for bad mojo
### Actual Results:
Restart of MonetDB makes everything working again.
/opt/monetdb-testing/bin/mserver5 --version
MonetDB server v5.22.0 (64-bit), based on kernel v1.41.0 (64-bit oids)
Not released
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
Visit http://monetdb.cwi.nl/ for further information
Found 3.9GiB available memory, 2 available cpu cores
Configured for prefix: /opt/monetdb-testing
Libraries:
libpcre: 8.02 2010-03-19 (compiled with 8.02)
openssl: OpenSSL 1.0.0a 1 Jun 2010 (compiled with OpenSSL 1.0.0a 1 Jun 2010)
libxml2: 2.7.7 (compiled with 2.7.7)
Compiled by: skinkie@openkvk (x86_64-unknown-linux-gnu)
Compilation: gcc -Wall -Wextra -fno-strict-aliasing -g -Werror-implicit-function-declaration -Werror -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/x86_64-pc-linux-gnu/bin/ld -IPA -m elf_x86_64
## Comment 15073
Date: 2010-10-20 08:38:48 +0200
From: @grobian
All you client traces seem to hang during the initial login ritual. This hence seems like the same bug as one previous reported, but I can't seem to find it.
To me it seems worker threads disappear (or become unavailable). We can't reproduce this, so we need you to help. If it happens often enough for you, I can create some patch that may tell us more about what's (not) happening.
## Comment 15074
Date: 2010-10-20 08:49:43 +0200
From: @skinkie
Yes it happens often, I have just restarted MonetDB again. From my per perspective I have ~8 clients connected at the same time. During the evening all where readers. The queries that occur seem to be all in the same form, happening rapid after each other:
SELECT kvk,bedrijfsnaam,kvks,sub,adres,postcode,plaats,type,website FROM kvk WHERE bedrijfsnaam='Fietsplus an Hoogstraten Tegelen' LIMIT 10;
(All fields from the table are selected)
Is it possible that some caching was introduced, that basically makes the query processing itself hang, and after that simply goes on until the remaining threads that handle the client pool are full? Or is MonetDB 'forking' for each incoming connection?
If you want it, I can give you access to the platform, or a way to duplicate it.
## Comment 15077
Date: 2010-10-20 15:53:01 +0200
From: @grobian
Created attachment 45
client-hang-printf.patch
can you try this patch, and report what the console tells you when a client connection hangs?
> Attached file: [client-hang-printf.patch](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2700_client-hang-printf.patch_45) (text/plain, 2421 bytes)
> Description: client-hang-printf.patch
## Comment 15078
Date: 2010-10-21 00:48:30 +0200
From: @skinkie
(In reply to comment 3)
> Created attachment 45 [details]
> client-hang-printf.patch
>
> can you try this patch, and report what the console tells you when a client
> connection hangs?
Console doesn't report anything Fabian. Clients are still hanging very sure patch is applied and server was restarted.
## Comment 15079
Date: 2010-10-21 09:01:00 +0200
From: @grobian
wow.
can you strace a client that attempts to make a connection?
## Comment 15081
Date: 2010-10-21 13:09:42 +0200
From: @skinkie
http://bugs.monetdb.org/attachment.cgi?id=41
Can you use that one?
## Comment 15083
Date: 2010-10-21 13:34:19 +0200
From: @grobian
ok, thanks. I'll try to reproduce here by doing some stress-testing with concurrency. Is 8 concurrent connections ok? Do the connections have to stay alive, or are they constantly reconnected?
## Comment 15084
Date: 2010-10-21 14:48:54 +0200
From: @skinkie
(In reply to comment 7)
> ok, thanks. I'll try to reproduce here by doing some stress-testing with
> concurrency. Is 8 concurrent connections ok? Do the connections have to stay
> alive, or are they constantly reconnected?
One query then it disconnects. I'm pretty sure 8 is enough (running at 8 threads webserver).
## Comment 15114
Date: 2010-10-26 23:06:50 +0200
From: @skinkie
Fabian, got any updates on the issue?
## Comment 15115
Date: 2010-10-27 09:31:03 +0200
From: @grobian
I didn't get to doing it yet, unfortunately
## Comment 15116
Date: 2010-10-27 11:32:53 +0200
From: @grobian
Changeset [95f8ca997129](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=95f8ca997129) made by Fabian Groffen <fabian@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=95f8ca997129](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=95f8ca997129)
Changeset description:
Add script to simulate bug #2700.
On my machine this brings down an mserver5 in 30 seconds, using 8
concurrent runners. The left-over mserver only has one thread and its
backtrace according to gdb is an invalid address, so it's seriously
messed up.
## Comment 15117
Date: 2010-10-27 11:36:25 +0200
From: @grobian
my run actually gave me this as soon as I terminated the mserver:
mclient 7 terminated in query 4052
Connection terminated
Connection terminated
mclient 8 terminated in query 4075
Connection terminated
Connection terminated
mclient 3 terminated in query 4055
mclient 5 terminated in query 4080
Connection terminated
mclient 4 terminated in query 4052
Connection terminated
mclient 1 terminated in query 4068
Connection terminated
mclient 6 terminated in query 4058
mclient 2 terminated in query 4060
so that's about how far they get before breaking down.
## Comment 15118
Date: 2010-10-27 11:43:10 +0200
From: @grobian
using minimal_pipe actually yields in the same behaviour
## Comment 15119
Date: 2010-10-27 11:46:36 +0200
From: @grobian
reducing the number of threads in the server to 1 doesn't help either
## Comment 15120
Date: 2010-10-27 14:09:38 +0200
From: @grobian
running in gdb shows that at some point, no thread exists any more, and also no new threads are made for new clients:
response parsed, database: test3000
checking credentials for monetdb
credentials fine
finding a client
initing client
initclientprg
fork new thread to serve client
[Thread 0x7fefbe774710 (LWP 3640) exited]
[New Thread 0x7fefbe573710 (LWP 3642)]
thread running
response parsed, database: test3000
checking credentials for monetdb
credentials fine
finding a client
initing client
initclientprg
fork new thread to serve client
[Thread 0x7fefbe573710 (LWP 3642) exited]
[New Thread 0x7fefbe372710 (LWP 3644)]
thread running
then suddenly
response parsed, database: test3000
checking credentials for monetdb
credentials fine
finding a client
initing client
initclientprg
fork new thread to serve client
thread running
response parsed, database: test3000
checking credentials for monetdb
credentials fine
finding a client
initing client
initclientprg
fork new thread to serve client
thread running
## Comment 15121
Date: 2010-10-27 14:38:56 +0200
From: @grobian
Changeset [6318fb637f17](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6318fb637f17) made by Fabian Groffen <fabian@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6318fb637f17](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6318fb637f17)
Changeset description:
MT_create_thread calls pthread_create, which returns 0 on success and
non-zero on failure. This needs not to be negative. This catches for
example the failure to spawn a thread for bug #2700.
## Comment 15122
Date: 2010-10-27 14:40:50 +0200
From: @grobian
With my latest commit, the "hang" is resolved now, as it now returns an error/disconnect. The real bug now is why creating a new thread fails.
(It's questionable we fork a new thread for each and every connection all the time, reuse would do us good in terms of performance, I guess)
## Comment 15123
Date: 2010-10-27 16:04:28 +0200
From: @grobian
Changeset [2d584db1ff21](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2d584db1ff21) made by Fabian Groffen <fabian@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2d584db1ff21](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2d584db1ff21)
Changeset description:
Introduce a detach argument for MT_create_thread.
It is necessary to distinguish between detached and joinable threads.
The former cannot be joined, whereas the latter actually have to be
joined in order to free resources.
By default, threads created by pthread are joinable. In most places,
however, we do not join created threads, simply because we can't, or
never need to, until the end of the program.
Not joining joinable threads leaves behind a considerable amount of
memory, and registration in the threads pool. As a result, thread
creation gets slower, and the mserver grows in memory. Eventually, no
more threads can be created, as is the case in bug #2700.
We now specify per MT_create_thread if we want the thread to be joinable
or not, which in most cases is not, such that we don't leak, and can
continue handling queries, for which in our setup threads need to be
created.
## Comment 15124
Date: 2010-10-27 16:07:06 +0200
From: @grobian
I can make a tremendous amount of connections after each other without problems after my last commit, now. I consider this issue fixed.
## Comment 15126
Date: 2010-10-27 16:39:44 +0200
From: @skinkie
Debugged my webserver connector code:
resHdl = mapi_query(dbh, query->buf);
works (non NULL and MOK)
But when I arrive a few milliseconds later in another function that reuses the result, and explicitly check it again I get a server error (hence: -4)
Breakpoint 1, dbs_monetdb_query (hdl=0x76b030, query=0x659120) at handler_dbslayer_monetdb.c:34
34 dbs_monetdb_query(cherokee_handler_dbslayer_t *hdl, cherokee_buffer_t *query) {
(gdb) n
35 Mapi dbh = (Mapi) hdl->conn;
(gdb)
38 if (dbh == NULL || mapi_error(dbh)) {
(gdb) print dbh
$1 = (Mapi) 0x76b4d0
(gdb) print mapi_error(dbh)
$2 = 0
(gdb) c
Continuing.
Breakpoint 2, dbs_monetdb_step (hdl=0x76b030, buffer=0x76a300) at handler_dbslayer_monetdb.c:56
56 {
(gdb) n
57 Mapi dbh = (Mapi) hdl->conn;
(gdb)
58 MapiHdl resHdl = (MapiHdl) hdl->result;
(gdb)
60 if (dbh == NULL || mapi_error(dbh) != MOK) {
(gdb) print dbh
$3 = (Mapi) 0x76b4d0
(gdb) print mapi_error(dbh)
$4 = -4
Because all previous problems I know how to debug MAPI and I ended up in:
:0[0]:W
sSELECT kvk.kvk, kvk.bedrijfsnaam, kvk.adres, kvk.postcode, kvk.plaats, kvk.type, not(anbikvk.anbi is null), status, kvk.kvks, kvk.sub, kvk.website FROM kvk LEFT JOIN anbikvk ON kvk.kvks = anbikvk.kvks LEFT JOIN faillissementen ON kvk.kvks = faillissementen.kvks WHERE kvk.kvks = 51144476 LIMIT 200 OFFSET 0;;
:11[0]:R
!MALException:opt.remap:Not yet implemented
:11[0]:R
:12[0]:W
Connection closed
(this only happens with my webserver connection, while mclient 'just works')
## Comment 15127
Date: 2010-10-27 16:43:56 +0200
From: @skinkie
Disabled remap in the default_pipe, works again now...
Should I open a new bug for this issue?
## Comment 15128
Date: 2010-10-27 17:09:20 +0200
From: @grobian
It's a totally different issue, file a new bug for that!
## Comment 15177
Date: 2010-11-06 04:37:16 +0100
From: @skinkie
Have to reopen the issue. Since the last bug entry I haven't restarted MonetDB so far. Until today the exact same issue arrived, clients hung etc. Now I doubt that lets say a month ago I restarted my database more often, and the same number of requests (from statistics) hit the database.
Could anyone please do follow up?
## Comment 15406
Date: 2011-01-24 14:00:02 +0100
From: @grobian
we need to know where it hangs, if it hangs.
| All clients randomly hang | https://api.github.com/repos/MonetDB/MonetDB/issues/2700/comments | 0 | 2020-11-30T11:10:50Z | 2024-06-27T11:50:02Z | https://github.com/MonetDB/MonetDB/issues/2700 | 753,384,647 | 2,700 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-19 08:41:56 +0200
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: 2.40.1 (Oct2010) [obsolete]
Last updated: 2010-11-15 09:38:57 +0100
## Comment 15065
Date: 2010-10-19 08:41:56 +0200
From: @drstmane
On Windows, several (currently 10 of 43) SQL tests that use pyhton timeout (i.e., potentially hang) on Windows, only; cf.,
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Int.32.32.d.1-Windows5.1/src_test_BugTracker-2009/create_on_ro_db_crash.SF-2830238.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Int.32.32.d.1-Windows5.1/src_test_BugTracker-2009/lost_update.SF-2790020.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Int.32.32.d.1-Windows5.1/src_test_BugTracker/connect_crash.SF-1436626.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Int.32.32.d.1-Windows5.1/src_test_BugTracker/mdb_starts_with_sql_debug_64.SF-1999354.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Int.32.32.d.1-Windows5.1/src_test_BugTracker/set_a_new_user_password.SF-1844050.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Int.32.32.d.1-Windows5.1/src_test_BugTracker/set_sql_debug_64__breaking_the_DB.SF-1906287.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Int.32.32.d.1-Windows5.1/src_test_Connections/connections.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Int.32.32.d.1-Windows5.1/src_test_mserver5-sql-readonly/mserver5-sql-readonly-table.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Int.32.32.d.1-Windows5.1/src_test_mserver5-sql-readonly/mserver5-sql-readonly-view.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Int.32.32.d.1-Windows5.1/src_test_VOC/VOC.err.00.html
## Comment 15112
Date: 2010-10-26 17:36:14 +0200
From: @sjoerdmullender
Changeset [073b68dc838b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=073b68dc838b) 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=073b68dc838b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=073b68dc838b)
Changeset description:
Avoid deadlock.
This should fix bug #2699.
The deadlock happens especially on Windows where pipe buffers are
really small. The server was hanging on writing to stderr and hence
not reading from stdin where we sent a command that was supposed to
produce output on stdout, which we were attempting to read.
| several SQL python tests timeout (hang?) on Windows | https://api.github.com/repos/MonetDB/MonetDB/issues/2699/comments | 0 | 2020-11-30T11:10:47Z | 2024-06-27T11:50:01Z | https://github.com/MonetDB/MonetDB/issues/2699 | 753,384,620 | 2,699 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-18 18:39:28 +0200
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: 2.40.1 (Oct2010) [obsolete]
CC: @njnes
Last updated: 2011-03-28 17:31:29 +0200
## Comment 15057
Date: 2010-10-18 18:39:28 +0200
From: @drstmane
cf.,
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/GNU.64.64.d.1-Fedora10/src_test_bugs/except-union-intersect-bug-sf-1146079.out.00.html
## Comment 15148
Date: 2010-10-28 14:16:40 +0200
From: @grobian
the output is scary.
- sorting doesn't always work correctly (probably a mitosis issue)
- returned values sometimes are garbage, depending on word-size and endianness
## Comment 15152
Date: 2010-10-28 14:32:12 +0200
From: @grobian
*** Bug #2707 has been marked as a duplicate of this bug. ***
## Comment 15285
Date: 2010-12-05 13:40:43 +0100
From: @njnes
fixed in current
## Comment 15286
Date: 2010-12-05 13:42:08 +0100
From: @grobian
current = next feature release
## Comment 15626
Date: 2011-03-28 17:31:29 +0200
From: @sjoerdmullender
The Mar2011 version has been released.
| test sql/src/test/bugs/Tests/except-union-intersect-bug-sf-1146079.SQL.sh produces wrong result with multi-threaded execution | https://api.github.com/repos/MonetDB/MonetDB/issues/2698/comments | 0 | 2020-11-30T11:10:44Z | 2024-06-27T11:50:00Z | https://github.com/MonetDB/MonetDB/issues/2698 | 753,384,595 | 2,698 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-18 18:34:33 +0200
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: 2.40.1 (Oct2010) [obsolete]
Blocker for: #2665
Last updated: 2010-11-15 09:39:09 +0100
## Comment 15056
Date: 2010-10-18 18:34:33 +0200
From: @drstmane
With multi-threaded execution, test sql/src/test/Tests/rank.sql fails with
ERROR = !SQLException:sql.rank:bat not sorted
cf.,
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/GNU.64.64.d.1-Fedora10/src_test/rank.err.00.html
## Comment 15147
Date: 2010-10-28 14:11:58 +0200
From: @grobian
Sjoerd says this is a regression compared to Jun2010-SP2, adding as blocker for Oct2010 release.
## Comment 15157
Date: 2010-10-28 16:33:32 +0200
From: @sjoerdmullender
Niels fixed the issue by disabling mitosis/mergetable when certain operations are required. See changesets:
[http//devmonetdborg/hg/MonetDB?cmd=changeset;node=dbdebdc215b5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=dbdebdc215b5)
[http//devmonetdborg/hg/MonetDB?cmd=changeset;node=83ea278666e4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=83ea278666e4)
| test sql/src/test/Tests/rank.sql: "SQLException:sql.rank:bat not sorted" with multi-threaded execution | https://api.github.com/repos/MonetDB/MonetDB/issues/2697/comments | 0 | 2020-11-30T11:10:41Z | 2024-06-27T11:49:59Z | https://github.com/MonetDB/MonetDB/issues/2697 | 753,384,561 | 2,697 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-18 16:07:26 +0200
From: Wouter Alink <<alink>>
To: SQL devs <<bugs-sql>>
Version: 2.38.5 (Jun2010-SP2) [obsolete]
CC: @sjoerdmullender
Last updated: 2010-10-19 09:58:21 +0200
## Comment 15053
Date: 2010-10-18 16:07:26 +0200
From: Wouter Alink <<alink>>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.12) Gecko/20100907 Fedora/3.5.12-1.fc12 Firefox/3.5.12
Build Identifier:
Run SQL Query:
select YEAR(CAST('2010-01-01' AS DATE));
Reproducible: Always
### Actual Results:
sql>select YEAR(CAST('2010-01-01' AS DATE));
syntax error, unexpected YEAR in: "select year"
### Expected Results:
sql>select YEAR(CAST('2010-01-01' AS DATE));
2010
## Comment 15054
Date: 2010-10-18 16:48:59 +0200
From: @sjoerdmullender
This works:
select "year"(CAST('2010-01-01' AS DATE));
The problem is, year is a SQL keyword and therefore not recognized as a function name.
## Comment 15055
Date: 2010-10-18 16:54:24 +0200
From: @grobian
what's wrong with this anyway?
sql>select extract(year from now());
+-------------------+
| current_timestamp |
+===================+
| 2010 |
+-------------------+
1 tuple (7.240ms)
## Comment 15070
Date: 2010-10-19 09:58:21 +0200
From: Wouter Alink <<alink>>
Thanks Sjoerd, that helps.
@Fabian: we are compiling from a different language into SQL, and the "extract(year from ...)" is a little bit more tricky to generate.
| function year() not working? | https://api.github.com/repos/MonetDB/MonetDB/issues/2696/comments | 0 | 2020-11-30T11:10:38Z | 2024-06-28T13:20:43Z | https://github.com/MonetDB/MonetDB/issues/2696 | 753,384,522 | 2,696 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-18 09:08:36 +0200
From: @romulogoncalves
To: SQL devs <<bugs-sql>>
Version: 2.38.5 (Jun2010-SP2) [obsolete]
Last updated: 2010-11-15 09:39:02 +0100
## Comment 15046
Date: 2010-10-18 09:08:36 +0200
From: @romulogoncalves
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.7) Gecko/20100713 Firefox/3.6.7 ( .NET CLR 3.5.30729)
Build Identifier:
The mserver when is started with the option --readonly and the dbfarm was never created, the creation of the system tables fails and the mserver crashes.
Reproducible: Always
### Steps to Reproduce:
1.mserver --readonly
2.
3.
### Actual Results:
it crashes
### Expected Results:
ERROR message or creation of the system's tables
## Comment 15047
Date: 2010-10-18 10:53:20 +0200
From: @grobian
can you use Oct2010, I presume it has the same problem?
## Comment 15049
Date: 2010-10-18 11:33:36 +0200
From: @sjoerdmullender
Changeset [d1c83b93db1f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d1c83b93db1f) 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=d1c83b93db1f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d1c83b93db1f)
Changeset description:
Bail out early when asked to create database in read-only mode.
This fixes bug #2695.
## Comment 15050
Date: 2010-10-18 12:54:51 +0200
From: @sjoerdmullender
Changeset [fe606ab538f6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fe606ab538f6) 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=fe606ab538f6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=fe606ab538f6)
Changeset description:
Added test for bug #2695.
## Comment 15051
Date: 2010-10-18 12:57:05 +0200
From: @sjoerdmullender
Changeset [86db2f64ec91](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=86db2f64ec91) 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=86db2f64ec91](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=86db2f64ec91)
Changeset description:
Added changelog message for bug #2695.
| mserver crashes when started in readonly mode without dbfarm. | https://api.github.com/repos/MonetDB/MonetDB/issues/2695/comments | 0 | 2020-11-30T11:10:35Z | 2024-06-27T11:49:57Z | https://github.com/MonetDB/MonetDB/issues/2695 | 753,384,503 | 2,695 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-14 20:54:37 +0200
From: Alexandr Kulik <<alexandr.kulik1988>>
To: SQL devs <<bugs-sql>>
Version: 2.40.1 (Oct2010) [obsolete]
CC: @njnes, @drstmane
Last updated: 2010-11-15 09:39:06 +0100
## Comment 15040
Date: 2010-10-14 20:54:37 +0200
From: Alexandr Kulik <<alexandr.kulik1988>>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3
Build Identifier:
Join statement at select kill database, but left join works fine.
Reproducible: Always
### Steps to Reproduce:
1. Create and fill database, use attached sql
2. Execute query :
select t1.opr_date, t1.opr_hr, t1.svalue, t1.yyyymmddhh - t2.avg_yyyymmddhh
from time t1
join (select extract(year from opr_date) as y, extract(month from opr_date) as m, svalue, avg(yyyymmddhh) as avg_yyyymmddhh
from time
group by y, m, svalue) as t2
on extract(year from t1.opr_date) = t2.y
and extract(month from t1.opr_date) = t2.m
and t1.svalue = t2.svalue
3. Validate error at merovingian log:
2010-10-14 21:41:24 MSG merovingian[13347]: target connection is on local UNIX domain socket, passing on filedescriptor instead of proxying
2010-10-14 21:41:42 ERR demo[50196]: Assertion failed: (re), function rel_push_join_down, file rel_optimizer.mx, line 2411.
2010-10-14 21:41:43 MSG merovingian[13347]: database 'demo' (50196) was killed by signal SIGABRT
4. But if i will use left join instead of join query execute fine.
## Comment 15041
Date: 2010-10-14 20:55:40 +0200
From: Alexandr Kulik <<alexandr.kulik1988>>
Created attachment 44
Create db and insert some data sql.
> Attached file: [join_problem.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2694_join_problem.sql_44) (application/octet-stream, 3270 bytes)
> Description: Create db and insert some data sql.
## Comment 15042
Date: 2010-10-14 22:42:24 +0200
From: @njnes
the query seems to run on the current release candidate. Which version are you working on?
## Comment 15043
Date: 2010-10-14 22:47:05 +0200
From: Alexandr Kulik <<alexandr.kulik1988>>
Works with latest sources from OCT2010.
(In reply to comment 2)
> the query seems to run on the current release candidate. Which version are you
> working on?
## Comment 15146
Date: 2010-10-28 14:10:35 +0200
From: @grobian
confirmed fix for Oct2010, closing.
## Comment 15159
Date: 2010-10-30 10:56:24 +0200
From: @drstmane
Changeset [09ab06b80eca](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=09ab06b80eca) 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=09ab06b80eca](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=09ab06b80eca)
Changeset description:
test for bug #2694: works w/ assertions disabled, assertion fails otherwise
Added the provided test for bug #2694 "Join statement at select kill database".
With assertions disabled, the test appears to work fine.
With assertions enabled, the "left join" variant still works fine,
but the "join" variant triggers an assertion failure:
"
sql/src/server/rel_optimizer.mx:2410: rel_push_join_down: Assertion `re' failed.
"
Cetero censeo
a test should be added (when ever possible)
before closing a bug report.
## Comment 15161
Date: 2010-10-30 11:08:20 +0200
From: @drstmane
Re-opened, as the "join" variant triggers an assertion failure when assertions are enabled.
## Comment 15173
Date: 2010-11-04 21:57:05 +0100
From: @njnes
Changeset [a95602ba94dc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a95602ba94dc) 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=a95602ba94dc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a95602ba94dc)
Changeset description:
In rel_push_join_down we now correctly check if the expression can
be pushed down. This solves the crash of bug #2694
## Comment 15174
Date: 2010-11-05 09:54:03 +0100
From: @drstmane
Niels' latest check fixes the crash / abort with assertions enabled.
Thanks!
Closing.
| Join statement at select kill database | https://api.github.com/repos/MonetDB/MonetDB/issues/2694/comments | 0 | 2020-11-30T11:10:32Z | 2024-06-27T11:49:56Z | https://github.com/MonetDB/MonetDB/issues/2694 | 753,384,484 | 2,694 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-13 15:21:42 +0200
From: @skinkie
To: clients devs <<bugs-clients>>
Version: -- development
CC: @mlkersten, @drstmane
Last updated: 2012-11-12 21:43:30 +0100
## Comment 15035
Date: 2010-10-13 15:21:42 +0200
From: @skinkie
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.36 Safari/534.7
Build Identifier:
syntax error, unexpected FROM in: "select bedrijfsnaam,1, from"
mclient: ../../../src/mapilib/Mapi.mx:4352: mapi_query_prep: Controletest 'mid->active == ((void *)0)' faalt.
Afgebroken
Reproducible: Always
## Comment 15036
Date: 2010-10-13 15:23:42 +0200
From: @skinkie
Maybe it is different then I thought.
I'm running mclient with -i /tmp/badqueries basically after each error something else fails for example:
SELECT: no such unary operator 'load_data(char)'
mclient: ../../../src/mapiclient/mclient.c:1638: doFile: Controletest 'hdl != ((void *)0)' faalt.
## Comment 15037
Date: 2010-10-13 23:24:27 +0200
From: @drstmane
The reported syntax error is obviously correct and to be expected.
## Comment 15038
Date: 2010-10-14 00:02:01 +0200
From: @skinkie
(In reply to comment 2)
> The reported syntax error is obviously correct and to be expected.
Including the assertion when loading such statement using -i ?
## Comment 15039
Date: 2010-10-14 00:24:14 +0200
From: @drstmane
ah --- I was apparently mis-lead by the summary saying
'syntax error, unexpected FROM in: "select bedrijfsnaam,1, from'
and the remainder of the bug report also not being too clear ...
## Comment 15407
Date: 2011-01-24 14:02:26 +0100
From: @grobian
I cannot reproduce this with current, but I had to guess how to reproduce.
Please provide a clear description how to trigger this problem, if it still occurs.
## Comment 17936
Date: 2012-11-12 21:43:30 +0100
From: @mlkersten
The reported mclient respons can not be reproduced.
It properly recovers after the syntax error.
Also if fed through a file.
| mclient asserts after syntax error with -i | https://api.github.com/repos/MonetDB/MonetDB/issues/2693/comments | 0 | 2020-11-30T11:10:29Z | 2024-06-28T13:20:43Z | https://github.com/MonetDB/MonetDB/issues/2693 | 753,384,449 | 2,693 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-13 14:44:34 +0200
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2010-10-15 10:41:51 +0200
## Comment 15034
Date: 2010-10-13 14:44:34 +0200
From: @skinkie
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.36 Safari/534.7
Build Identifier:
>could not find L2.L2
kvk.kvk
kvk.bedrijfsnaam
kvk.kvks
kvk.%TID%
L3.L3
kvk.bedrijfsnaam
mserver5: ../../../src/server/rel_bin.mx:1576: rel2bin_project: Assertion `0' failed.
Afgebroken
Not much more information... I do remember there was a bug like this before, now trying to find out what query could have caused it.
Reproducible: Didn't try
## Comment 15044
Date: 2010-10-15 07:57:00 +0200
From: @njnes
stefan there is no information in the bug report to reproduce the crash, ie no way I can fix this bug. Please add the schema and offending query.
## Comment 15045
Date: 2010-10-15 10:41:51 +0200
From: @skinkie
As in another bug http://bugs.monetdb.org/show_bug.cgi?id=2601 is already requested, please log the full query in the assert when such thing happens. Since I ran all queries in sequence from the hours that I have logged, and none of them triggered the bug again (did trigger the mapi errors http://bugs.monetdb.org/show_bug.cgi?id=2693), I basically have no way of pointing out what query was the source of this.
| rel_bin.mx:1576: rel2bin_project: Assertion `0' failed. | https://api.github.com/repos/MonetDB/MonetDB/issues/2692/comments | 0 | 2020-11-30T11:10:25Z | 2024-06-27T11:49:54Z | https://github.com/MonetDB/MonetDB/issues/2692 | 753,384,387 | 2,692 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-13 09:45:03 +0200
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: 2.40.1 (Oct2010) [obsolete]
Last updated: 2010-11-15 09:39:01 +0100
## Comment 15033
Date: 2010-10-13 09:45:03 +0200
From: @drstmane
cf., test sql/src/test/orderby_limit.sql;
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/GNU.64.64.d.1-Fedora12/src_test/orderby_limit.out.00.html
Combining 'select distinct' with 'order by (asc)' and 'limit' yields reversely ordered result, while all other combination appear to work fine:
data:
sql>select * from lim_prob;
+---------+---------+
| dir | test |
+=========+=========+
| mydir1/ | mytest1 |
| mydir2/ | mytest3 |
| mydir1/ | mytest2 |
| mydir1/ | mytest4 |
| mydir2/ | mytest1 |
| mydir2/ | mytest2 |
| mydir1/ | mytest3 |
+---------+---------+
7 tuples (32.150ms)
correct:
sql>select concat("dir", "test") as a from lim_prob order by a limit 10;
+----------------+
| a |
+================+
| mydir1/mytest1 |
| mydir1/mytest2 |
| mydir1/mytest3 |
| mydir1/mytest4 |
| mydir2/mytest1 |
| mydir2/mytest2 |
| mydir2/mytest3 |
+----------------+
7 tuples (318.683ms)
sql>select distinct concat("dir", "test") as a from lim_prob order by a;
+----------------+
| a |
+================+
| mydir1/mytest1 |
| mydir1/mytest2 |
| mydir1/mytest3 |
| mydir1/mytest4 |
| mydir2/mytest1 |
| mydir2/mytest2 |
| mydir2/mytest3 |
+----------------+
7 tuples (336.073ms)
sql>select concat("dir", "test") as a from lim_prob order by a desc limit 10;
+----------------+
| a |
+================+
| mydir2/mytest3 |
| mydir2/mytest2 |
| mydir2/mytest1 |
| mydir1/mytest4 |
| mydir1/mytest3 |
| mydir1/mytest2 |
| mydir1/mytest1 |
+----------------+
7 tuples (5.160ms)
sql>select distinct concat("dir", "test") as a from lim_prob order by a desc;
+----------------+
| a |
+================+
| mydir2/mytest3 |
| mydir2/mytest2 |
| mydir2/mytest1 |
| mydir1/mytest4 |
| mydir1/mytest3 |
| mydir1/mytest2 |
| mydir1/mytest1 |
+----------------+
7 tuples (6.247ms)
sql>select distinct concat("dir", "test") as a from lim_prob order by a desc limit 10;
+----------------+
| a |
+================+
| mydir2/mytest3 |
| mydir2/mytest2 |
| mydir2/mytest1 |
| mydir1/mytest4 |
| mydir1/mytest3 |
| mydir1/mytest2 |
| mydir1/mytest1 |
+----------------+
7 tuples (6.371ms)
wrong:
sql>select distinct concat("dir", "test") as a from lim_prob order by a limit 10;
+----------------+
| a |
+================+
| mydir2/mytest3 |
| mydir2/mytest2 |
| mydir2/mytest1 |
| mydir1/mytest4 |
| mydir1/mytest3 |
| mydir1/mytest2 |
| mydir1/mytest1 |
+----------------+
7 tuples (4.350ms)
sql>explain select distinct concat("dir", "test") as a from lim_prob order by a limit 10;
% .explain table_name
% mal name
% clob type
% 0 length
function user.s2_1{autoCommit=true}():void;
_2 := sql.mvc();
barrier _66 := language.dataflow();
_3:bat[:oid,:str] := sql.bind(_2,"sys","lim_prob","dir",0);
_8:bat[:oid,:str] := sql.bind(_2,"sys","lim_prob","dir",2);
_10 := algebra.kdifference(_3,_8);
_11 := algebra.kunion(_10,_8);
_12:bat[:oid,:str] := sql.bind(_2,"sys","lim_prob","dir",1);
_14 := algebra.kunion(_11,_12);
_15:bat[:oid,:oid] := sql.bind_dbat(_2,"sys","lim_prob",1);
_16 := bat.reverse(_15);
_17 := algebra.kdifference(_14,_16);
_18:bat[:oid,:str] := sql.bind(_2,"sys","lim_prob","test",0);
_20:bat[:oid,:str] := sql.bind(_2,"sys","lim_prob","test",2);
_21 := algebra.kdifference(_18,_20);
_22 := algebra.kunion(_21,_20);
_23:bat[:oid,:str] := sql.bind(_2,"sys","lim_prob","test",1);
_24 := algebra.kunion(_22,_23);
_25 := algebra.kdifference(_24,_16);
_26:bat[:oid,:str] := batcalc.+(_17,_25);
_27 := pqueue.utopn_max(_26,10:wrd);
_28 := bat.mirror(_27);
_29 := algebra.leftjoin(_28,_26);
(ext41,grp39) := group.done(_29);
_32 := bat.mirror(ext41);
_33 := algebra.leftjoin(_32,_29);
_34 := algebra.sortTail(_33);
_35 := algebra.markT(_34,0@0:oid);
_36 := bat.reverse(_35);
_37 := algebra.leftjoin(_36,_33);
_38 := pqueue.utopn_min(_37,10:wrd);
^^^<-------------<-???
_39 := bat.mirror(_38);
_40 := algebra.leftjoin(_39,_37);
exit _66;
_41 := sql.resultSet(1,1,_40);
sql.rsColumn(_41,"sys.","a","varchar",60,0,_40);
_49 := io.stdout();
sql.exportResult(_49,_41);
end s2_1;
As the above explain reveals, pqueue.utopn_min() is used instead of the expected pqueue.utopn_max().
This seems to be due to the fact that "min" (descending) order is hard-wired in function rel2bin_topn() in sql/src/server/rel_bin.mx .
The following patch makes the above query work by changing the hard-wired "min" into a hard-wired "max" --- but obviously then corrupts the descanding variant:
diff -r [89ac02f129f2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=89ac02f129f2) sql/src/server/rel_bin.mx
--- a/sql/src/server/rel_bin.mx Tue Oct 12 19:20:08 2010 +0200
+++ b/sql/src/server/rel_bin.mx Wed Oct 13 09:42:01 2010 +0200
@@ -1969,7 +1969,7 @@
char *tname = table_name(sc);
sc = column(sc);
- limit = stmt_limit(stmt_alias(sc, tname, cname), o, l, LIMIT_DIRECTION(0,0,including));
+ limit = stmt_limit(stmt_alias(sc, tname, cname), o, l, LIMIT_DIRECTION(1,0,including));
}
limit = stmt_mirror(limit);
Unfortunately, I could not yet find out how to set the order in rel2bin_topn() appropriately, i.e., in a context sensitive way: "min" for descending and "max" for ascending.
I guess, Niels knows better and can help ...
## Comment 15144
Date: 2010-10-28 14:08:59 +0200
From: @grobian
Changeset [7b9102a5de12](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7b9102a5de12) made by Fabian Groffen <fabian@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7b9102a5de12](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7b9102a5de12)
Changeset description:
add script for bug #2691
## Comment 15145
Date: 2010-10-28 14:09:35 +0200
From: @grobian
Added test shows correct result AFAICT, so closing.
| select distinct + order by (asc) + limit yields reversely ordered result | https://api.github.com/repos/MonetDB/MonetDB/issues/2691/comments | 0 | 2020-11-30T11:10:22Z | 2024-06-27T11:49:53Z | https://github.com/MonetDB/MonetDB/issues/2691 | 753,384,357 | 2,691 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-11 19:18:15 +0200
From: @grobian
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2010-11-02 11:37:52 +0100
## Comment 15019
Date: 2010-10-11 19:18:15 +0200
From: @grobian
In a somewhat weird setup, I found this as side-effect:
-Wl,-soname -Wl,libembeddedsql5.so.2 -o .libs/libembeddedsql5.so.2.34.2
/export/scratch0/fabian/prefix64/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -l_logger
/export/scratch0/fabian/prefix64/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -l_bat5
/export/scratch0/fabian/prefix64/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -l_tablet
/export/scratch0/fabian/prefix64/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -l_cluster
/export/scratch0/fabian/prefix64/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -l_bpm
collect2: ld returned 1 exit status
I think components should not link against private libraries. If they are necessary, they should be properly exported/stashed into some public library.
## Comment 15143
Date: 2010-10-28 13:59:55 +0200
From: @grobian
Solving this requires some build-env changes that are best not applied to the current candidate at the current time.
## Comment 15166
Date: 2010-11-02 11:37:52 +0100
From: @grobian
this is fixed in the default branch now.
| libembeddedsql5 links against private libs of MonetDB5 | https://api.github.com/repos/MonetDB/MonetDB/issues/2690/comments | 0 | 2020-11-30T11:10:20Z | 2024-06-27T11:49:52Z | https://github.com/MonetDB/MonetDB/issues/2690 | 753,384,337 | 2,690 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-11 15:17:46 +0200
From: @grobian
To: GDK devs <<bugs-common>>
Version: -- development
Last updated: 2012-11-07 19:49:33 +0100
## Comment 15018
Date: 2010-10-11 15:17:46 +0200
From: @grobian
Some components only need the memory management functionality from gdk, and not the rest. For those components (e.g. merovingian) it would pay off to only include the memory management functionality from gdk, instead of full libbat.
## Comment 17912
Date: 2012-11-07 19:49:33 +0100
From: @grobian
too tangled up into the rest
| create a libgdkmalloc library | https://api.github.com/repos/MonetDB/MonetDB/issues/2689/comments | 0 | 2020-11-30T11:10:17Z | 2024-06-28T13:40:42Z | https://github.com/MonetDB/MonetDB/issues/2689 | 753,384,308 | 2,689 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-11 09:07:14 +0200
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2010-10-11 10:34:12 +0200
## Comment 15016
Date: 2010-10-11 09:07:14 +0200
From: @skinkie
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.36 Safari/534.7
Build Identifier:
TypeException:user.s1_1[15]:'sphinx.sphinx_searchIndex' undefined in: _26:any := sphinx.sphinx_searchIndex(_20:str, _24:str)
TypeException:user.s1_1[17]:'sql.columnBind' undefined in: _29:bat[:oid,:lng] := sql.columnBind(_26:any, _27:str)
SQLException:SQLengine:Program contains errors
Reproducible: Always
## Comment 15017
Date: 2010-10-11 10:34:12 +0200
From: @skinkie
Problem was solved by properly including sphinx again. So far for 'useful' error messages. (Actual issue: --dbinit="includesphinx;" resulted in no error.)
| sphinx module: program contains errors | https://api.github.com/repos/MonetDB/MonetDB/issues/2688/comments | 0 | 2020-11-30T11:10:15Z | 2024-06-28T13:20:42Z | https://github.com/MonetDB/MonetDB/issues/2688 | 753,384,272 | 2,688 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-07 10:51:46 +0200
From: Jan Rittinger <<jan.rittinger>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes, @drstmane
Last updated: 2010-10-11 22:46:42 +0200
## Comment 15006
Date: 2010-10-07 10:51:46 +0200
From: Jan Rittinger <<jan.rittinger>>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-us) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5
Build Identifier:
WITH
cte (col1) AS
((SELECT 1 as col1)
UNION ALL
(SELECT col1 + 1
FROM cte
WHERE col1 < 4))
SELECT col1
FROM cte;
-- fails with: Subquery result missing
WITH
cte (col1) AS
((SELECT 1 as col1)
UNION ALL
(SELECT col1 + 1
FROM cte))
SELECT col1
FROM cte;
-- fails with: Cannot have a parameter (?) on both sides of an expression
Reproducible: Always
### Steps to Reproduce:
1. Run above queries
### Actual Results:
Errors
### Expected Results:
First Query: 1-4
Second Query: the stream of positive natural numbers
## Comment 15013
Date: 2010-10-08 23:40:29 +0200
From: @drstmane
I can reproduce the reported errors only with the Jun2010-SP2 release.
With up-to-date (today, Fri Oct 8 2010) versions of both the Oct2010 release candidate branch and the default development version, I get
"
SELECT: no such table 'cte'
"
for both queries.
## Comment 15031
Date: 2010-10-11 22:46:42 +0200
From: @njnes
recursive queries aren't supported at the moment.
| A recursive common table expression results in strange error messages. | https://api.github.com/repos/MonetDB/MonetDB/issues/2687/comments | 0 | 2020-11-30T11:10:11Z | 2024-06-28T13:20:41Z | https://github.com/MonetDB/MonetDB/issues/2687 | 753,384,237 | 2,687 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-06 20:55:11 +0200
From: Mike <<mschill>>
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 11.3.7 (Apr2011-SP2) [obsolete]
CC: mschill
Last updated: 2011-08-05 15:18:42 +0200
## Comment 15002
Date: 2010-10-06 20:55:11 +0200
From: Mike <<mschill>>
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; 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.2; Tablet PC 2.0; OfficeLiveConnector.1.5; OfficeLivePatch.1.3; .NET4.0C)
Build Identifier:
Consistent error when processing tables that are quite large (>800 Million). Any help on this would be appreciated, I have already reviewed http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/86e7aa0f-dd35-491f-8d56-420ed3a7e354/ and did not help:
Restarting the server will remove the error, but it then will crash again doing basic processing (adding columns, setting value to field, etc).
MonetDB server v5.20.5, based on kernel v1.38.5
Release Jun2010-SP2
Serving database 'demo', using 1 thread
Compiled for i686-pc-win32/64bit with 32bit OIDs dynamically linked
Found 9.999 GiB available main-memory.
Copyright (c) 1993-July 2008 CWI.
Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
Visit http://monetdb.cwi.nl/ for further information
warning: please don't forget to set your vault key!
(see C:\Program Files\MonetDB\MonetDB5\etc\monetdb5.conf)
Listening for connection requests on mapi:monetdb://127.0.0.1:50000/
MonetDB/SQL module v2.38.5 loaded
>
runtime error R6031
- Attempt to initialize the CRT more than once.
This indicates a bug in your application.
Press any key to continue . . .
Reproducible: Always
### Steps to Reproduce:
1.Have large data set, (>800 Million)
2.Do simple process, like Alter table tblCost Add Price Decimal(12,2)
3.Get error after about 2-3 minutes of processing
### Actual Results:
sql>alter table safcharge add charge decimal(12,2);
MAPI = monetdb@localhost:50000
ACTION= read_line
QUERY = alter table safcharge add charge decimal(12,2);
ERROR = !Connection terminated
Press any key to continue . . .
### Expected Results:
Process normal, add column, not get error, etc.
My only change from standard operating procedure is to move the dbfarm to a different drive (D:\MonetDB\) to handle the large amounts of data. I accomplished this by modifying the M5server.bat script
I need to get around this error to process our data or else we will not be able to move forward.
Machine is Windows XP Pro x64 SP2 v2003 Dual Core AMD Opteron 2.4GHz, 10.0 GB Ram
## Comment 15003
Date: 2010-10-06 22:23:30 +0200
From: @sjoerdmullender
From reading a bunch of stuff that I found with Google, it could be that there is a memory corruption that causes a CRT-internal variable to be overwritten (___native_startup_state which should be 0x00000002) after which the CRT initialization code could get called again during shutdown of the application.
In order to verify whether this is indeed the problem, some debugging needs to be done.
Since I have never seen this error, it might be hard for me to reproduce the problem and debug it, so how good are you with debugging applications on Windows?
For reference, one of the more useful links I found is http://www.eggheadcafe.com/software/aspnet/32551750/error-r6031.aspx
## Comment 15670
Date: 2011-03-28 17:35:55 +0200
From: @sjoerdmullender
The Mar2011 version has been released.
## Comment 15939
Date: 2011-07-13 16:51:08 +0200
From: @sjoerdmullender
I still have never actually seen this happening, but I googled a bit more and found http://support.microsoft.com/kb/913395. Especially the Cause section is interesting and may well be relevant here. The Workaround section might also apply here.
In short, the cause (in the case of the MS article) is that the started application inherits an environment setting from Explorer which causes the runtime to be initialized twice. The workaround is to edit the registry and remove the entry for Explorer.exe from HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
## Comment 15979
Date: 2011-07-20 23:26:03 +0200
From: Mike <<mschill>>
With the most recent update from MonetDB I no longer get this particular error. However, we do still lots of crashing on our Windows environmet:
MonetDB 5 server v11.3.1 "Apr2011"
Serving database 'demo', using 4 threads
Compiled for x86_64-pc-winnt/64bit with 32bit OIDs dynamically linked
Found 23.999 GiB available main-memory.
We are trying to run medians/avgs/etc against a table that has almost a billion records against it that is 10-12 columns wide depending on the situation. If I try to load all the records into one table, it crashes after around 600 million loaded. If I add a column against the table and update said column I also get crashes. My workaround has been two tables with a unionall view but this slows the computation process down greatly.
Does anyone have advice about running this type of batch? Is a Linux machine the answer? And if so, what version of Linux. Any help would be appreciated. Thanks
## Comment 16027
Date: 2011-07-29 10:59:39 +0200
From: @sjoerdmullender
Apr2011-SP2 has been released.
## Comment 16076
Date: 2011-08-05 14:52:31 +0200
From: @sjoerdmullender
(In reply to comment 4)
> With the most recent update from MonetDB I no longer get this particular error.
I guess this means we can close this bug?
> However, we do still lots of crashing on our Windows environmet:
> MonetDB 5 server v11.3.1 "Apr2011"
> Serving database 'demo', using 4 threads
> Compiled for x86_64-pc-winnt/64bit with 32bit OIDs dynamically linked
> Found 23.999 GiB available main-memory.
>
> We are trying to run medians/avgs/etc against a table that has almost a billion
> records against it that is 10-12 columns wide depending on the situation. If I
> try to load all the records into one table, it crashes after around 600 million
> loaded. If I add a column against the table and update said column I also get
> crashes. My workaround has been two tables with a unionall view but this slows
> the computation process down greatly.
>
> Does anyone have advice about running this type of batch? Is a Linux machine
> the answer? And if so, what version of Linux. Any help would be appreciated.
> Thanks
This is a different issue. Please keep it to one issue per report.
It could be that you're hitting the limits of 32-bit OIDs. The next release (hopefully Aug 2011) will have 64-bit OIDs on Windows by default with automatic update of the database from 32 to 64 bit OIDs.
In the mean time you could try Linux since that does have 64 bit OIDs.
This should not be discussed further in this bug report.
## Comment 16078
Date: 2011-08-05 15:18:42 +0200
From: Mike <<mschill>>
No longer recieve this particular error on crashing with April 2011 release
| Getting runtime error R6031-Attempt to initialize the CRT more than once. | https://api.github.com/repos/MonetDB/MonetDB/issues/2686/comments | 0 | 2020-11-30T11:10:08Z | 2024-06-27T11:49:48Z | https://github.com/MonetDB/MonetDB/issues/2686 | 753,384,207 | 2,686 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-06 15:18:13 +0200
From: @grobian
To: Merovingian devs <<bugs-merovingian>>
Version: 1.40.1 (Oct2010) [obsolete]
Last updated: 2010-10-21 13:22:46 +0200
## Comment 15000
Date: 2010-10-06 15:18:13 +0200
From: @grobian
A database which is under maintenance (locked), will be reported to a connecting client as having no connections (when not started).
The message is misleading, because the client should be told that the requested database is under maintenance. I believe this is a regression, even.
## Comment 15082
Date: 2010-10-21 13:21:41 +0200
From: @grobian
Changeset [bfcc527ca5dc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bfcc527ca5dc) made by Fabian Groffen <fabian@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bfcc527ca5dc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bfcc527ca5dc)
Changeset description:
Report a stopped and locked database as under maintenance, instead of without connections, bug #2685
| databases under maintenance are reported as having no connections | https://api.github.com/repos/MonetDB/MonetDB/issues/2685/comments | 0 | 2020-11-30T11:10:06Z | 2024-06-27T11:49:48Z | https://github.com/MonetDB/MonetDB/issues/2685 | 753,384,182 | 2,685 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-06 13:25:00 +0200
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: 2.40.1 (Oct2010) [obsolete]
Last updated: 2010-12-10 15:29:03 +0100
## Comment 14996
Date: 2010-10-06 13:25:00 +0200
From: @skinkie
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.24 Safari/534.7
Build Identifier:
Even for the query select * from tables where name like 'tables'; pcre.like_uselect is used. I wonder if it is better to solve modifier 'free' cases in SQL or directly in the PCRE module. Hence: column like 'argument' should become column = 'argument'.
Reproducible: Always
## Comment 14999
Date: 2010-10-06 15:11:07 +0200
From: @grobian
this is a regression, because this used to fallback to uselect when no modifiers were in use
## Comment 15154
Date: 2010-10-28 15:40:29 +0200
From: @grobian
The implementation of pcre.like_uselect calls a normal uselect if no patterns are used. You can't see this in the explain (MAL) code, because this is a runtime optimisation on the C level.
Conclusion, we already avoid calling pcre matching functions for simple like queries.
## Comment 15156
Date: 2010-10-28 15:45:34 +0200
From: @skinkie
Not so fast.
In your reasoning it should have the same performance and not being 300x slower.
sql>select kvk,bedrijfsnaam from kvk where bedrijfsnaam like 'MonetDB B.V.';
+--------------+--------------+
| kvk | bedrijfsnaam |
+==============+==============+
| 321351760000 | MonetDB B.V. |
| 321351760000 | MonetDB B.V. |
+--------------+--------------+
2 tuples (676.854ms)
Timer 676.915 msec 2 rows
sql>select kvk,bedrijfsnaam from kvk where bedrijfsnaam = 'MonetDB B.V.';
+--------------+--------------+
| kvk | bedrijfsnaam |
+==============+==============+
| 321351760000 | MonetDB B.V. |
| 321351760000 | MonetDB B.V. |
+--------------+--------------+
2 tuples (2.718ms)
## Comment 15311
Date: 2010-12-10 14:33:07 +0100
From: @grobian
sql>select count(*) from sensor_readings;
+----------+
| L7 |
+==========+
| 71323546 |
+----------+
1 tuple (59.000ms)
sql>select count(*) from sensor_readings where location like '192.16.196.148';
+------+
| L10 |
+======+
| 0 |
+------+
1 tuple (1.5s)
sql>select count(*) from sensor_readings where location = '192.16.196.148';
+------+
| L11 |
+======+
| 0 |
+------+
1 tuple (2.2s)
Are you sure you aren't looking at cold/warm database effects?
## Comment 15312
Date: 2010-12-10 14:37:26 +0100
From: @grobian
additional demonstration that the performance differs per run, but somehow 'like' seems to faster in general than '=':
sql>select count(*) from sensor_readings where location like 'L318';
+----------+
| L4 |
+==========+
| 13383466 |
+----------+
1 tuple (2.3s)
sql>select count(*) from sensor_readings where location = 'L318';
+----------+
| L5 |
+==========+
| 13383474 |
+----------+
1 tuple (1.8s)
sql>select count(*) from sensor_readings where location like 'L318';
+----------+
| L4 |
+==========+
| 13383484 |
+----------+
1 tuple (830.000ms)
sql>select count(*) from sensor_readings where location = 'L318';
+----------+
| L5 |
+==========+
| 13383492 |
+----------+
1 tuple (1.8s)
sql>select count(*) from sensor_readings where location like 'L318';
+----------+
| L4 |
+==========+
| 13383496 |
+----------+
1 tuple (0.9s)
sql>
(yes the results differ, since the database is continuously updated with new sensor readings, also from this room I'm querying for)
## Comment 15313
Date: 2010-12-10 14:39:08 +0100
From: @skinkie
I see something totally different.
## Comment 15314
Date: 2010-12-10 14:39:34 +0100
From: @skinkie
Created attachment 47
My output
> Attached file: [naarfabian.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2684_naarfabian.txt_47) (text/plain, 4321 bytes)
> Description: My output
## Comment 15315
Date: 2010-12-10 14:44:33 +0100
From: @grobian
Can you run explain please? like is being ran with multiple cores, while the = is not.
## Comment 15317
Date: 2010-12-10 14:50:20 +0100
From: @grobian
This is not so much a bug.
If you don't want mitosis to kick in (exploit parallelism) because you know it never is going to make anything for you faster, you best just disable it by removing it from the optimiser pipeline you have in use for your databases.
## Comment 15320
Date: 2010-12-10 15:14:20 +0100
From: @skinkie
(In reply to comment 8)
> Can you run explain please? like is being ran with multiple cores, while the =
> is not.
sql>explain select kvk,bedrijfsnaam from kvk where bedrijfsnaam like 'MonetDB B.V.';
% .explain table_name
% mal name
% clob type
% 0 length
function user.s2_1{autoCommit=true}():void;
_2 := sql.mvc();
barrier _93 := language.dataflow();
_46:bat[:oid,:str] := sql.bind(_2,"sys","kvk","bedrijfsnaam",0,0@0:oid,1310385@0);
_7:bat[:oid,:str] := sql.bind(_2,"sys","kvk","bedrijfsnaam",2);
_51 := algebra.kdifference(_46,_7);
_53 := algebra.semijoin(_7,_46);
_55 := algebra.kunion(_51,_53);
_11:bat[:oid,:oid] := sql.bind_dbat(_2,"sys","kvk",1);
_12 := bat.reverse(_11);
_57 := algebra.kdifference(_55,_12);
_58 := batcalc.str(_57);
_61 := pcre.like_uselect(_58,"MonetDB B.V.":str,"":str);
_64 := algebra.markT(_61,3,0);
_76 := bat.reverse(_64);
_49:bat[:oid,:lng] := sql.bind(_2,"sys","kvk","kvk",0,0@0:oid,1310385@0);
_13:bat[:oid,:lng] := sql.bind(_2,"sys","kvk","kvk",2);
_81 := algebra.kdifference(_49,_13);
_83 := algebra.semijoin(_13,_49);
_85 := algebra.kunion(_81,_83);
_87 := algebra.leftjoin(_76,_85);
_48:bat[:oid,:str] := sql.bind(_2,"sys","kvk","bedrijfsnaam",0,1310385@0,nil:oid);
_52 := algebra.kdifference(_48,_7);
_54 := algebra.semijoin(_7,_48);
_56 := algebra.kunion(_52,_54);
_59 := batcalc.str(_56);
_62 := pcre.like_uselect(_59,"MonetDB B.V.":str,"":str);
_68 := algebra.markT(_62,3,1);
_79 := bat.reverse(_68);
_50:bat[:oid,:lng] := sql.bind(_2,"sys","kvk","kvk",0,1310385@0,nil:oid);
_82 := algebra.kdifference(_50,_13);
_84 := algebra.semijoin(_13,_50);
_86 := algebra.kunion(_82,_84);
_88 := algebra.leftjoin(_79,_86);
_9:bat[:oid,:str] := sql.bind(_2,"sys","kvk","bedrijfsnaam",1);
_60 := batcalc.str(_9);
_63 := pcre.like_uselect(_60,"MonetDB B.V.":str,"":str);
_71 := algebra.markT(_63,3,2);
_80 := bat.reverse(_71);
_14:bat[:oid,:lng] := sql.bind(_2,"sys","kvk","kvk",1);
_89 := algebra.leftjoin(_80,_14);
_15 := mat.pack(_87,_88,_89);
_92 := algebra.leftjoin(_80,_9);
_91 := algebra.leftjoin(_79,_56);
_90 := algebra.leftjoin(_76,_55);
exit _93;
_17 := sql.resultSet(2,1,_15);
sql.rsColumn(_17,"sys.kvk","kvk","bigint",64,0,_15);
_16 := mat.pack(_90,_91,_92);
sql.rsColumn(_17,"sys.kvk","bedrijfsnaam","varchar",256,0,_16);
_28 := io.stdout();
sql.exportResult(_28,_17);
end s2_1;
sql>explain select kvk,bedrijfsnaam from kvk where bedrijfsnaam = 'MonetDB B.V.';
% .explain table_name
% mal name
% clob type
% 0 length
function user.s3_1{autoCommit=true}():void;
_2 := sql.mvc();
_3:bat[:oid,:str] := sql.bind(_2,"sys","kvk","bedrijfsnaam",0);
_8 := algebra.uselect(_3,"MonetDB B.V.":str);
_9:bat[:oid,:str] := sql.bind(_2,"sys","kvk","bedrijfsnaam",2);
_11 := algebra.kdifference(_8,_9);
_12 := algebra.uselect(_9,"MonetDB B.V.":str);
_13 := algebra.kunion(_11,_12);
_14:bat[:oid,:str] := sql.bind(_2,"sys","kvk","bedrijfsnaam",1);
_16 := algebra.uselect(_14,"MonetDB B.V.":str);
_17 := algebra.kunion(_13,_16);
_18:bat[:oid,:oid] := sql.bind_dbat(_2,"sys","kvk",1);
_19 := bat.reverse(_18);
_20 := algebra.kdifference(_17,_19);
_21 := algebra.markT(_20,0@0:oid);
_22 := bat.reverse(_21);
_23:bat[:oid,:lng] := sql.bind(_2,"sys","kvk","kvk",0);
_24:bat[:oid,:lng] := sql.bind(_2,"sys","kvk","kvk",2);
_25 := algebra.kdifference(_23,_24);
_26 := algebra.kunion(_25,_24);
_27:bat[:oid,:lng] := sql.bind(_2,"sys","kvk","kvk",1);
_28 := algebra.kunion(_26,_27);
_29 := algebra.leftjoin(_22,_28);
_30 := algebra.kdifference(_3,_9);
_31 := algebra.kunion(_30,_9);
_32 := algebra.kunion(_31,_14);
_33 := algebra.leftjoin(_22,_32);
_34 := sql.resultSet(2,1,_29);
sql.rsColumn(_34,"sys.kvk","kvk","bigint",64,0,_29);
sql.rsColumn(_34,"sys.kvk","bedrijfsnaam","varchar",256,0,_33);
_45 := io.stdout();
sql.exportResult(_45,_34);
end s3_1;
Mitosis off:
sql>explain select kvk,bedrijfsnaam from kvk where bedrijfsnaam like 'MonetDB B.V.';
% .explain table_name
% mal name
% clob type
% 0 length
function user.s1_1{autoCommit=true}():void;
_2 := sql.mvc();
barrier _59 := language.dataflow();
_3:bat[:oid,:str] := sql.bind(_2,"sys","kvk","bedrijfsnaam",0);
_8:bat[:oid,:str] := sql.bind(_2,"sys","kvk","bedrijfsnaam",2);
_10 := algebra.kdifference(_3,_8);
_11 := algebra.kunion(_10,_8);
_12:bat[:oid,:str] := sql.bind(_2,"sys","kvk","bedrijfsnaam",1);
_14 := algebra.kunion(_11,_12);
_15:bat[:oid,:oid] := sql.bind_dbat(_2,"sys","kvk",1);
_16 := bat.reverse(_15);
_17 := algebra.kdifference(_14,_16);
_18 := batcalc.str(_17);
_19 := pcre.like_uselect(_18,"MonetDB B.V.":str,"":str);
_20 := algebra.markT(_19,0@0:oid);
_21 := bat.reverse(_20);
_22:bat[:oid,:lng] := sql.bind(_2,"sys","kvk","kvk",0);
_23:bat[:oid,:lng] := sql.bind(_2,"sys","kvk","kvk",2);
_24 := algebra.kdifference(_22,_23);
_25 := algebra.kunion(_24,_23);
_26:bat[:oid,:lng] := sql.bind(_2,"sys","kvk","kvk",1);
_27 := algebra.kunion(_25,_26);
_28 := algebra.leftjoin(_21,_27);
_29 := algebra.leftjoin(_21,_14);
exit _59;
_30 := sql.resultSet(2,1,_28);
sql.rsColumn(_30,"sys.kvk","kvk","bigint",64,0,_28);
sql.rsColumn(_30,"sys.kvk","bedrijfsnaam","varchar",256,0,_29);
_41 := io.stdout();
sql.exportResult(_41,_30);
end s1_1;
sql>select kvk,bedrijfsnaam from kvk where bedrijfsnaam like 'MonetDB B.V.';
+--------------+--------------+
| kvk | bedrijfsnaam |
+==============+==============+
| 321351760000 | MonetDB B.V. |
| 321351760000 | MonetDB B.V. |
+--------------+--------------+
2 tuples (1.8s)
sql>select kvk,bedrijfsnaam from kvk where bedrijfsnaam like 'MonetDB B.V.';
+--------------+--------------+
| kvk | bedrijfsnaam |
+==============+==============+
| 321351760000 | MonetDB B.V. |
| 321351760000 | MonetDB B.V. |
+--------------+--------------+
2 tuples (681.097ms)
sql>select kvk,bedrijfsnaam from kvk where bedrijfsnaam like 'MonetDB B.V.';
+--------------+--------------+
| kvk | bedrijfsnaam |
+==============+==============+
| 321351760000 | MonetDB B.V. |
| 321351760000 | MonetDB B.V. |
+--------------+--------------+
2 tuples (676.295ms)
sql>select kvk,bedrijfsnaam from kvk where bedrijfsnaam like 'MonetDB B.V.';
+--------------+--------------+
| kvk | bedrijfsnaam |
+==============+==============+
| 321351760000 | MonetDB B.V. |
| 321351760000 | MonetDB B.V. |
+--------------+--------------+
2 tuples (675.428ms)
sql>select kvk,bedrijfsnaam from kvk where bedrijfsnaam = 'MonetDB B.V.';
+--------------+--------------+
| kvk | bedrijfsnaam |
+==============+==============+
| 321351760000 | MonetDB B.V. |
| 321351760000 | MonetDB B.V. |
+--------------+--------------+
2 tuples (2.437ms)
sql>select kvk,bedrijfsnaam from kvk where bedrijfsnaam = 'MonetDB B.V.';
+--------------+--------------+
| kvk | bedrijfsnaam |
+==============+==============+
| 321351760000 | MonetDB B.V. |
| 321351760000 | MonetDB B.V. |
+--------------+--------------+
2 tuples (0.754ms)
sql>select kvk,bedrijfsnaam from kvk where bedrijfsnaam = 'MonetDB B.V.';
+--------------+--------------+
| kvk | bedrijfsnaam |
+==============+==============+
| 321351760000 | MonetDB B.V. |
| 321351760000 | MonetDB B.V. |
+--------------+--------------+
2 tuples (0.724ms)
sql>select kvk,bedrijfsnaam from kvk where bedrijfsnaam = 'MonetDB B.V.';
+--------------+--------------+
| kvk | bedrijfsnaam |
+==============+==============+
| 321351760000 | MonetDB B.V. |
| 321351760000 | MonetDB B.V. |
+--------------+--------------+
2 tuples (0.764ms)
Clearly Fabian this is not the cause, Mitosis of performs even worse. And we are talking about big factors. Again: we should rewrite like without modifiers, but given the performance drain, there might be more issues anyway.
## Comment 15321
Date: 2010-12-10 15:29:03 +0100
From: @grobian
File a new performance request. like is not using pcre when no modifier are present. The batcalc.str() is looking weird to me though, and probably causes lots of time to be spent. Please file a new bug, attaching the plan and trace outputs.
| avoid pcre.like_uselect when no modifiers are present | https://api.github.com/repos/MonetDB/MonetDB/issues/2684/comments | 0 | 2020-11-30T11:10:01Z | 2024-06-28T13:40:41Z | https://github.com/MonetDB/MonetDB/issues/2684 | 753,384,125 | 2,684 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-06 10:43:00 +0200
From: @grobian
To: SQL devs <<bugs-sql>>
Version: 2.40.1 (Oct2010) [obsolete]
CC: @njnes
Last updated: 2010-10-11 21:52:02 +0200
## Comment 14990
Date: 2010-10-06 10:43:00 +0200
From: @grobian
sql>select substring('123456789', 1, 3);
% . table_name
% substring_single_value name
% char type
% 0 length
[ "123" ]
sql>
obviously, the width of this column is known due to the substring
## Comment 15020
Date: 2010-10-11 21:48:00 +0200
From: @njnes
added test substring_display_width.Bug-2683.sql
## Comment 15021
Date: 2010-10-11 21:49:59 +0200
From: @njnes
Changeset [1614b13934e1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1614b13934e1) 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=1614b13934e1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1614b13934e1)
Changeset description:
added test for Bug #2683
## Comment 15022
Date: 2010-10-11 21:52:02 +0200
From: @njnes
fixed, the function substring now uses the input types for the result type
| substring column doesn't have a display width | https://api.github.com/repos/MonetDB/MonetDB/issues/2683/comments | 0 | 2020-11-30T11:09:57Z | 2024-06-27T11:49:46Z | https://github.com/MonetDB/MonetDB/issues/2683 | 753,384,082 | 2,683 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-06 10:41:07 +0200
From: @grobian
To: SQL devs <<bugs-sql>>
Version: 2.40.1 (Oct2010) [obsolete]
CC: @njnes
Last updated: 2010-11-15 09:39:01 +0100
## Comment 14989
Date: 2010-10-06 10:41:07 +0200
From: @grobian
MAPI = (monetdb) /ufs/fabian/scratch/monetdb/Oct2010/program-x86_64/var/MonetDB5/dbfarm/mapi_socket
ACTION= read_line
QUERY = select
location,
cast(substring(emit_time, 0, 16) as varchar(16)) as "time",
max(cast(value as numeric(5,2))) as maxtemp,
min(cast(value as numeric(5,2))) as mintemp
from sensor_readings
where type like 'temperature'
and emit_time between '2010-10-01' and '2010-10-04'
group by location, "time"
having max(cast(value as numeric(5,2))) - min(cast(value as numeric(5,2))) > 5;
ERROR = !Connection terminated
the following query (which doesn't have the cast to varchar - to work around a cosmetic bug) does work fine:
select
location,
substring(emit_time, 0, 16) as "time",
max(cast(value as numeric(5,2))) as maxtemp,
min(cast(value as numeric(5,2))) as mintemp
from sensor_readings
where type like 'temperature'
and emit_time between '2010-10-01' and '2010-10-04'
group by location, "time"
having max(cast(value as numeric(5,2))) - min(cast(value as numeric(5,2))) > 5;
## Comment 15023
Date: 2010-10-11 21:56:37 +0200
From: @njnes
we need the schema (create table statement) to fix this bug.
## Comment 15024
Date: 2010-10-11 21:58:48 +0200
From: @grobian
CREATE TABLE "sys"."sensor_readings" (
"src_ip" VARCHAR(15),
"recv_time" TIMESTAMP,
"emit_time" TIMESTAMP,
"location" VARCHAR(30),
"type" VARCHAR(30),
"value" VARCHAR(30)
);
## Comment 15025
Date: 2010-10-11 21:59:46 +0200
From: @grobian
maybe the 31 million of rows are necessary too
## Comment 15029
Date: 2010-10-11 22:38:17 +0200
From: @njnes
doesn't creash without data. But I guess only a couple of rows should be fine.
## Comment 15032
Date: 2010-10-12 08:38:31 +0200
From: @grobian
is this usable for you?
Welcome to mclient, the MonetDB/SQL interactive terminal (Oct2010-hg)
Database: MonetDB v5.22.0, 'sensor'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>\fcsv
sql>select * from sensor_readings limit 20;
127.0.0.1,2010-08-25 14:56:12.000000,2010-07-15 13:56:10.000000,L318,temperature,27.56
127.0.0.1,2010-08-25 14:56:12.000000,2010-07-15 13:56:12.000000,L318,temperature,27.5
127.0.0.1,2010-08-25 14:56:12.000000,2010-07-15 13:56:13.000000,L318,temperature,27.56
127.0.0.1,2010-08-25 14:56:12.000000,2010-07-15 13:56:14.000000,L318,temperature,27.56
127.0.0.1,2010-08-25 14:56:12.000000,2010-07-15 13:56:15.000000,L318,temperature,27.5
127.0.0.1,2010-08-25 14:56:12.000000,2010-07-15 13:56:17.000000,L318,temperature,27.5
127.0.0.1,2010-08-25 14:56:12.000000,2010-07-15 13:56:18.000000,L318,temperature,27.5
127.0.0.1,2010-08-25 14:56:12.000000,2010-07-15 13:56:19.000000,L318,temperature,27.5
127.0.0.1,2010-08-25 14:56:12.000000,2010-07-15 13:56:20.000000,L318,temperature,27.5
127.0.0.1,2010-08-25 14:56:12.000000,2010-07-15 13:56:22.000000,L318,temperature,27.5
127.0.0.1,2010-08-25 14:56:12.000000,2010-07-15 13:56:23.000000,L318,temperature,27.5
127.0.0.1,2010-08-25 14:56:12.000000,2010-07-15 13:56:24.000000,L318,temperature,27.5
127.0.0.1,2010-08-25 14:56:12.000000,2010-07-15 13:56:25.000000,L318,temperature,27.5
127.0.0.1,2010-08-25 14:56:12.000000,2010-07-15 13:56:26.000000,L318,temperature,27.5
127.0.0.1,2010-08-25 14:56:12.000000,2010-07-15 13:56:28.000000,L318,temperature,27.5
127.0.0.1,2010-08-25 14:56:12.000000,2010-07-15 13:56:29.000000,L318,temperature,27.5
127.0.0.1,2010-08-25 14:56:12.000000,2010-07-15 13:56:30.000000,L318,temperature,27.5
127.0.0.1,2010-08-25 14:56:12.000000,2010-07-15 13:56:31.000000,L318,temperature,27.5
127.0.0.1,2010-08-25 14:56:12.000000,2010-07-15 13:56:33.000000,L318,temperature,27.5
127.0.0.1,2010-08-25 14:56:12.000000,2010-07-15 13:56:34.000000,L318,temperature,27.5
## Comment 15052
Date: 2010-10-18 15:04:44 +0200
From: @sjoerdmullender
Changeset [fedc7397b0a4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fedc7397b0a4) 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=fedc7397b0a4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=fedc7397b0a4)
Changeset description:
Added test for bug #2682.
I changed the query from the report slightly (changing some numbers)
so that it returns a result with the provided data.
## Comment 15142
Date: 2010-10-28 13:54:15 +0200
From: @grobian
On my 43 million rows table it now successfully finishes too. Maybe related to the fix for the cosmetics. Closing.
| crash due to cast to varchar | https://api.github.com/repos/MonetDB/MonetDB/issues/2682/comments | 0 | 2020-11-30T11:09:55Z | 2024-06-27T11:49:44Z | https://github.com/MonetDB/MonetDB/issues/2682 | 753,384,043 | 2,682 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-04 10:33:27 +0200
From: @skinkie
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 11.11.7 (Jul2012-SP1)
CC: charnik, risc, @drstmane
Last updated: 2012-11-07 19:56:50 +0100
## Comment 14966
Date: 2010-10-04 10:33:27 +0200
From: @skinkie
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4
Build Identifier:
I observered several transactions to fail. The cause of this fails where errors in the SQL statements (typo's etc.). I have attempted to kill the process which didn't work, the total number of memory used was already far beyond the memory present and it was swapping which resulted in a load of 30. A reboot of the machine did the job.
What puzzles me is that the KILL signal didn't work on the process (might be a system call in the way).
I think the failed transactions ~ 5. After each failure a full table query was done in the form of select * from table;
Reproducible: Didn't try
MonetDB server v5.23.0 (64-bit), based on kernel v1.41.0 (64-bit oids)
Not released
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
Visit http://monetdb.cwi.nl/ for further information
Found 3.9GiB available memory, 2 available cpu cores
Configured for prefix: /opt/monetdb-testing
Libraries:
libpcre: 8.02 2010-03-19 (compiled with 8.02)
openssl: OpenSSL 1.0.0a 1 Jun 2010 (compiled with OpenSSL 1.0.0a 1 Jun 2010)
libxml2: 2.7.7 (compiled with 2.7.7)
Compiled by: skinkie@openkvk (x86_64-unknown-linux-gnu)
Compilation: gcc -Wall -Wextra -fno-strict-aliasing -g -Werror-implicit-function-declaration -Werror -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/x86_64-pc-linux-gnu/bin/ld -IPA -m elf_x86_64
## Comment 15012
Date: 2010-10-08 23:30:13 +0200
From: @drstmane
Just to clearify:
Did you send a SIGTERM (15) or SIGKILL (9) to kill the mserver5 process?
In case of t SIGTERM, it might take quite some time (minutes) until a huge and swapping process does indeed finish and disappear ...
SIGKILL should stop the process (almost) "instantly", though, ...
## Comment 15015
Date: 2010-10-09 00:13:43 +0200
From: @skinkie
(In reply to comment 1)
> Just to clearify:
> Did you send a SIGTERM (15) or SIGKILL (9) to kill the mserver5 process?
All of the above, even a SIGINT and SIGABRT. Now I wonder if it was trying to dump its core. (Might be.)
> In case of t SIGTERM, it might take quite some time (minutes) until a huge and
> swapping process does indeed finish and disappear ...
>
> SIGKILL should stop the process (almost) "instantly", though, ...
I started with the kill -s KILL processid.
From what I am thinking is that a lot (read maybe 100+) connections per second where created to the database, and those all stalled. Those stalled connections also deadlocked my webserver later because mapi blocks described it (http://bugs.monetdb.org/show_bug.cgi?id=2670). All queries where in the same form (the postcode equals, adres like as mentioned on the mailinglist) and gave a performance on a hot table with an impressive 6ms. So it wasn't a direct fail, from server logs I see that totally 160.000 queries where just served, while observing completes halts that intermitted them.
For me it is not really realistic to see these 'tiny' failures as separate incidents, because I am updating a table that is 'in use'. Nov I guess that the idea of MonetDB is not to go 'out of memory bounds', and I know it is quite useless that I don't have a backtrace of this error. But maybe an assert should be placed on for example 5x the summed memory usage in gdk_malloc?
## Comment 16030
Date: 2011-07-29 10:59:41 +0200
From: @sjoerdmullender
Apr2011-SP2 has been released.
## Comment 16267
Date: 2011-09-16 15:09:14 +0200
From: @sjoerdmullender
The Aug2011 version has been released.
## Comment 17663
Date: 2012-08-24 14:54:29 +0200
From: @sjoerdmullender
Jul2012-SP1 has been released.
## Comment 17914
Date: 2012-11-07 19:56:50 +0100
From: @grobian
I'm optimistic on this one, we did some cleaning up with clients since the release from the original bug report
| monetdb consumens endless memory after several broken off transactions | https://api.github.com/repos/MonetDB/MonetDB/issues/2681/comments | 0 | 2020-11-30T11:09:51Z | 2024-06-27T11:49:43Z | https://github.com/MonetDB/MonetDB/issues/2681 | 753,384,013 | 2,681 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-10-02 00:31:57 +0200
From: Alexandr Kulik <<alexandr.kulik1988>>
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 5.22.1 (Oct2010) [obsolete]
CC: @drstmane
Last updated: 2011-03-28 17:31:27 +0200
## Comment 14954
Date: 2010-10-02 00:31:57 +0200
From: Alexandr Kulik <<alexandr.kulik1988>>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3
Build Identifier:
Compilation problem with Jun2010 version of MonetDB sources. For Nov2010 this error never happens.
Reproducible: Always
### Steps to Reproduce:
Pull Jun2010 sources from mercurial.
Try to build them.
See an error on MonetDB5 module.
### Actual Results:
Please se an attachments. I put there bootstrap, configure and make execution output.
Have the same error on MacOS Snow Leopard 10.6.4 and CentOS5.5
## Comment 14955
Date: 2010-10-02 00:32:43 +0200
From: Alexandr Kulik <<alexandr.kulik1988>>
Created attachment 38
bootstrap output
> Attached file: [bootstrap.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2680_bootstrap.txt_38) (text/plain, 1796 bytes)
> Description: bootstrap output
## Comment 14956
Date: 2010-10-02 00:33:08 +0200
From: Alexandr Kulik <<alexandr.kulik1988>>
Created attachment 39
configure output
> Attached file: [configure.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2680_configure.txt_39) (text/plain, 14764 bytes)
> Description: configure output
## Comment 14957
Date: 2010-10-02 00:33:29 +0200
From: Alexandr Kulik <<alexandr.kulik1988>>
Created attachment 40
Make output
> Attached file: [make.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2680_make.txt_40) (text/plain, 158551 bytes)
> Description: Make output
## Comment 14958
Date: 2010-10-02 07:39:22 +0200
From: @drstmane
May I assume that you call configure directly in the checked-out source tree?
Could you please try to call configure in a separately created build directory (one per package that you compile) as our documentation recommends?
The latter appears to work fine for us (we admittedly never test the former) ...
## Comment 14959
Date: 2010-10-03 18:23:24 +0200
From: Alexandr Kulik <<alexandr.kulik1988>>
Got the same problem when execute (configure) from other directory.
(In reply to comment 4)
> May I assume that you call configure directly in the checked-out source tree?
> Could you please try to call configure in a separately created build directory
> (one per package that you compile) as our documentation recommends?
> The latter appears to work fine for us (we admittedly never test the former)
> ...
## Comment 14960
Date: 2010-10-03 19:47:08 +0200
From: @grobian
Can you please try the Oct2010 branch instead? Jun2010 is no longer maintained.
I don't expect it to solve the issue, but just to be sure.
/Developer/monetsrc/workspace/MonetDB-Jun2010/out/bin/Mx -x c mal_io.mx
mal_io.mx: ./mal_io.c - created
/Developer/monetsrc/workspace/MonetDB-Jun2010/out/bin/Mx -l -x h mal_io.mx
mal_io.mx: ./mal_io.h - created
make[6]: *** No rule to make target `30_xml.mal', needed by `all'. Stop.
make[5]: *** [all-recursive] Error 1
make[4]: *** [all] Error 2
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
kulya's:MonetDB5 kulya$
## Comment 14961
Date: 2010-10-03 19:58:09 +0200
From: Alexandr Kulik <<alexandr.kulik1988>>
Oct2010 works fine for me. But i need to use Jun2010 because of issue 2670 (http://bugs.monetdb.org/show_bug.cgi?id=2670).
(In reply to comment 6)
> Can you please try the Oct2010 branch instead? Jun2010 is no longer
> maintained.
> I don't expect it to solve the issue, but just to be sure.
>
> /Developer/monetsrc/workspace/MonetDB-Jun2010/out/bin/Mx -x c mal_io.mx
> mal_io.mx: ./mal_io.c - created
> /Developer/monetsrc/workspace/MonetDB-Jun2010/out/bin/Mx -l -x h mal_io.mx
> mal_io.mx: ./mal_io.h - created
> make[6]: *** No rule to make target `30_xml.mal', needed by `all'. Stop.
> make[5]: *** [all-recursive] Error 1
> make[4]: *** [all] Error 2
> make[3]: *** [all-recursive] Error 1
> make[2]: *** [all] Error 2
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
> kulya's:MonetDB5 kulya$
## Comment 14963
Date: 2010-10-03 20:08:19 +0200
From: @grobian
Jun2010 branch is in a broken, and won't get any releases any more. I marked the other bug as a blocker.
## Comment 14968
Date: 2010-10-04 11:43:04 +0200
From: @sjoerdmullender
The file 30_xml.mal was added to the repository in the Jun2010 branch on June 23 which was before we created the Jun2010 release.
My guess is, you did a "make clean" in your MonetDB5 directory. It seems that is a bit too eager and removes this file. Check the output of "hg status" and you'll probably see that it complains about that file.
## Comment 14976
Date: 2010-10-05 16:28:13 +0200
From: @sjoerdmullender
I'm changing the summary to what I think is the real problem.
Also, I think I fixed the problem. The next comment will mention the changeset which I am about to commit.
## Comment 14977
Date: 2010-10-05 16:29:22 +0200
From: @sjoerdmullender
Changeset [e932da9a114b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e932da9a114b) 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=e932da9a114b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e932da9a114b)
Changeset description:
If a header is conditionally used, don't unconditionally remove it in make clean.
This should fix bug #2680, except that bug involves a file that is no
longer present in this branch.
## Comment 15220
Date: 2010-11-24 10:21:03 +0100
From: @sjoerdmullender
Changeset [00170285ca64](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=00170285ca64) 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=00170285ca64](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=00170285ca64)
Changeset description:
Cleaned up cleaning up.
`make clean' should clean up to a state that everything that you would
normally want rebuilt using `make' gets removed, and in such a way
that there is no need to run configure again.
`make distclean' should clean up everything that is not part of the
sources, so that you do have to run configure again.
This is complicated by the fact that we need to distinguish between
sources from Mercurial or sources from a tar ball distribution.
In a Makefile.am file you can set variables MOSTLYCLEANFILES to add
files to the `make clean' scenario that automake doesn't know about.
Before, all files in BUILT_SOURCES were added. BUILT_SOURCES
basically contains generated source files. But in the tar ball
scenario, many of those generated source files were part of the tar
ball and hence should not be removed by `make clean'.
So now we add files explicitly: In am.py there is a variable
am['CLEAN'] that contains the files that have to always be removed
using `make clean' (i.e. files that are not part of the tar ball), and
a variable am['MXCLEAN'] that contains files that should be removed
only when building from Mercurial sources (i.e. generated source
files).
Most of the rest of the changes is just fine-tuning what gets removed
and making sure that configure itself doesn't leave behind junk.
Hopefully this fixes bug #2680. Unfortunately, I did not receive
confirmation that my analysis of the bug was correct, so I can't be
sure.
## Comment 15409
Date: 2011-01-24 14:08:08 +0100
From: @grobian
I hope Sjoerd's fixes were sufficient. Please reopen, if not.
## Comment 15621
Date: 2011-03-28 17:31:27 +0200
From: @sjoerdmullender
The Mar2011 version has been released.
| make clean too eager | https://api.github.com/repos/MonetDB/MonetDB/issues/2680/comments | 0 | 2020-11-30T11:09:49Z | 2024-06-27T11:49:42Z | https://github.com/MonetDB/MonetDB/issues/2680 | 753,383,986 | 2,680 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-09-28 15:26:04 +0200
From: @grobian
To: SQL devs <<bugs-sql>>
Version: 2.40.1 (Oct2010) [obsolete]
CC: @njnes, @drstmane
Last updated: 2011-03-28 17:31:33 +0200
## Comment 14947
Date: 2010-09-28 15:26:04 +0200
From: @grobian
sql>select max(emit_time) from sensor_readings;
+----------------------------+
| L14 |
+============================+
| 2010-09-28 13:16:25.000000 |
+----------------------------+
1 tuple (78.778ms)
sql>select now() - interval '30' second;
+----------------------------------+
| current_timestamp |
+==================================+
| 2010-09-28 13:16:09.000000+00:00 |
+----------------------------------+
1 tuple (0.236ms)
sql>select count(*) from sensor_readings where emit_time >= '2010-09-28 13:16:09.000000+00:00';
+------+
| L15 |
+======+
| 323 |
+------+
1 tuple (54.039ms)
sql>select count(*) from sensor_readings where emit_time >= now() - interval '30' second;
+------+
| L12 |
+======+
| 0 |
+------+
1 tuple (49.3s)
(notice the 50 seconds, clearly a full scan is done)
I cannot reproduce this on an almost empty database, so it must be size related:
sql>select count(*) from sensor_readings;
+----------+
| L4 |
+==========+
| 22514029 |
+----------+
1 tuple (2.067ms)
sql>plan select count(*) from sensor_readings where emit_time >= now() - interval '30' second;
+------------------------------------------------------------------------------+
| rel |
+==============================================================================+
| project ( |
| | group by ( |
| | | select ( |
| | | | table(sys.sensor_readings) [ sensor_readings.src_ip, sensor_readings.e |
: mit_time, sensor_readings.%TID% NOT NULL ] :
| | | ) [ convert(sensor_readings.emit_time) >= sql_sub(current_timestamp, 30) |
: ] :
| | ) [ ] [ count NOT NULL as L5 ] |
| ) [ L5 NOT NULL ] |
+------------------------------------------------------------------------------+
7 tuples (0.488ms)
sql>
## Comment 14948
Date: 2010-09-28 15:32:57 +0200
From: @grobian
after some thinking: query does a full scan which takes 50 seconds, so the 30 seconds limit never matches anything.
## Comment 14949
Date: 2010-09-28 15:35:50 +0200
From: @grobian
workaround :)
sql>declare ts timestamp;
sql>set ts = now() - interval '30' second; select count(*) from sensor_readings where emit_time >= ts;
+------+
| L4 |
+======+
| 229 |
+------+
1 tuple (53.620ms)
sql>set ts = now() - interval '30' second; select count(*) from sensor_readings where emit_time >= ts;
+------+
| L5 |
+======+
| 234 |
+------+
1 tuple (51.480ms)
## Comment 15014
Date: 2010-10-08 23:45:28 +0200
From: @drstmane
Did/could you profile (TRACE) the query with now() in the predicate to analyze where the time is spent?
## Comment 15141
Date: 2010-10-28 13:49:49 +0200
From: @grobian
tracing the query acutally never ends (or takes more time than my patience allows)
## Comment 15242
Date: 2010-12-01 23:23:45 +0100
From: @njnes
the table definition is missing. To debug this query (using explain/plan etc) needs all ddl statements.
## Comment 15248
Date: 2010-12-02 18:29:39 +0100
From: @grobian
here you go:
CREATE TABLE "sensor_readings" (
"src_ip" VARCHAR(15),
"recv_time" TIMESTAMP,
"emit_time" TIMESTAMP,
"location" VARCHAR(30),
"type" VARCHAR(30),
"value" VARCHAR(30)
);
## Comment 15256
Date: 2010-12-03 21:12:26 +0100
From: @njnes
time is spend in a bat-iterator loop which is converting the timestamp column
to a timestamp with time zone. This seems like a waste of time.
## Comment 15257
Date: 2010-12-03 21:27:41 +0100
From: @njnes
the conversion can be skipped, which solves the slow down.
## Comment 15260
Date: 2010-12-03 21:33:12 +0100
From: @njnes
Changeset [455912904d45](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=455912904d45) 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=455912904d45](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=455912904d45)
Changeset description:
avoid useless conversions (fixes Bug #2679).
## Comment 15270
Date: 2010-12-04 09:54:00 +0100
From: @grobian
This is a bug on oct2010, but it was fixed on default/current.
Is it possible to be backported?
## Comment 15274
Date: 2010-12-04 11:59:58 +0100
From: @njnes
Changeset [38195aa0606a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=38195aa0606a) 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=38195aa0606a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=38195aa0606a)
Changeset description:
avoid useless conversions (fixes Bug #2679).
(transplanted from 455912904d45399b6514a0f9f9521054bbefcea7)
## Comment 15275
Date: 2010-12-04 12:00:22 +0100
From: @grobian
manually backported this fix
## Comment 15632
Date: 2011-03-28 17:31:33 +0200
From: @sjoerdmullender
The Mar2011 version has been released.
| timestamp selection based on now() takes too long | https://api.github.com/repos/MonetDB/MonetDB/issues/2679/comments | 0 | 2020-11-30T11:09:45Z | 2024-06-27T11:49:41Z | https://github.com/MonetDB/MonetDB/issues/2679 | 753,383,953 | 2,679 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-09-28 14:48:40 +0200
From: @grobian
To: SQL devs <<bugs-sql>>
Version: 11.5.3 (Aug2011-SP1) [obsolete]
CC: @njnes
Last updated: 2011-09-30 12:32:58 +0200
## Comment 14945
Date: 2010-09-28 14:48:40 +0200
From: @grobian
CREATE TABLE "sys"."sensor_readings" (
"src_ip" VARCHAR(15),
"recv_time" TIMESTAMP,
"emit_time" TIMESTAMP,
"location" VARCHAR(30),
"type" VARCHAR(30),
"value" VARCHAR(30)
);
select cast(emit_time as date) as "date", cast(avg(cast(value as numeric(5,2))) as numeric(5,2)) as avgtemperature from sensor_readings where "type" like 'temperature' and location like 'L318' group by "date" order by "date";
2010-09-28 14:41:48 MSG sensor[3212]: could not find sensor_readings.date
2010-09-28 14:41:48 MSG sensor[3212]: (null).date
2010-09-28 14:41:48 MSG sensor[3212]: (null).L35
2010-09-28 14:41:48 MSG sensor[3212]: (null).L36
2010-09-28 14:41:48 ERR sensor[3212]: mserver5: /ufs/fabian/scratch/monetdb/Oct2
010/sql/src/server/rel_bin.mx:1576: rel2bin_project: Assertion `0' failed.
2010-09-28 14:41:48 MSG merovingian[3188]: database 'sensor' (3212) was killed b
y signal SIGABRT
## Comment 14946
Date: 2010-09-28 14:50:36 +0200
From: @grobian
as "mdate" also crashes
## Comment 15268
Date: 2010-12-04 00:28:53 +0100
From: @njnes
rel_push_aggr introduced expressions with both relname and expression names.
The relname shouldn't be used if non is given by the expression (ie basetable
column) or by the query.
Needs test!
## Comment 16360
Date: 2011-09-30 11:29:45 +0200
From: @sjoerdmullender
Needs test.
## Comment 16362
Date: 2011-09-30 12:32:19 +0200
From: @grobian
Changeset [b040322d6fc8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b040322d6fc8) made by Fabian Groffen <fabian@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b040322d6fc8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b040322d6fc8)
Changeset description:
Add test for bug #2678
## Comment 16363
Date: 2011-09-30 12:32:58 +0200
From: @grobian
test added, works fine, so fix made back then was ok.
| crash on casts and renames to "date" | https://api.github.com/repos/MonetDB/MonetDB/issues/2678/comments | 0 | 2020-11-30T11:09:42Z | 2024-06-27T11:49:39Z | https://github.com/MonetDB/MonetDB/issues/2678 | 753,383,927 | 2,678 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-09-27 18:28:27 +0200
From: @skinkie
To: clients devs <<bugs-clients>>
Version: 11.1.1 (Mar2011) [obsolete]
Last updated: 2011-03-28 17:31:39 +0200
## Comment 14940
Date: 2010-09-27 18:28:27 +0200
From: @skinkie
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.8 Safari/534.7
Build Identifier:
Following up http://bugs.monetdb.org/show_bug.cgi?id=2660
I investigated what call should provide the client interface with the maximum bytes of the column. The right [1] return values are:
1) The maximum storage size ever possible (MSSQL)
2) The maximum storage size used (MySQL)
MonetDB seems to return the same values for:
SQL_DESC_DISPLAY_SIZE (also used in SQLBindCol)
SQL_DESC_LENGTH (not tested)
SQL_DESC_OCTET_LENGTH (equal to Display Size)
As Sjoerd pointed out in [2] the return value here should be the display size times 6. Or (preferably) the maximum storage size for the greatest field.
[1] http://www.tech-archive.net/Archive/Data/microsoft.public.data.odbc/2004-06/0011.html
[2] http://bugs.monetdb.org/show_bug.cgi?id=2660
Reproducible: Always
## Comment 15410
Date: 2011-01-24 14:13:29 +0100
From: @grobian
So, this bug is just about returning 6x SQL_DESC_DISPLAY_SIZE as SQL_DESC_OCTET_LENGTH?
If so, care to cook a patch?
## Comment 15447
Date: 2011-02-05 16:01:26 +0100
From: @skinkie
Created attachment 52
Attempt to times 6 the octet length.
The attached patch is an attempt to only do it for 'from' MonetDB.
> Attached file: [octet_length_times_six.diff](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2677_octet_length_times_six.diff_52) (text/plain, 2696 bytes)
> Description: Attempt to times 6 the octet length.
## Comment 15454
Date: 2011-02-14 14:56:59 +0100
From: @sjoerdmullender
Changeset [0be9028dca99](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0be9028dca99) 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=0be9028dca99](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0be9028dca99)
Changeset description:
SQL_DESC_OCTET_LENGTH should give the size in bytes required to copy the data.
This fixes bug #2677.
## Comment 15455
Date: 2011-02-14 14:58:54 +0100
From: @sjoerdmullender
Thanks for the patch. I have adapted it slightly and checked it in.
The adaptation is mainly for the closing NULL byte which should also be taken into account.
I'm assuming I can now close the bug.
## Comment 15647
Date: 2011-03-28 17:31:39 +0200
From: @sjoerdmullender
The Mar2011 version has been released.
| SQLColAttribute using SQL_DESC_OCTET_LENGTH doesn't return the maximum length | https://api.github.com/repos/MonetDB/MonetDB/issues/2677/comments | 0 | 2020-11-30T11:09:39Z | 2024-06-27T11:49:38Z | https://github.com/MonetDB/MonetDB/issues/2677 | 753,383,894 | 2,677 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-09-23 03:48:37 +0200
From: hsaddington <<hs.addington>>
To: SQL devs <<bugs-sql>>
Version: 2.38.5 (Jun2010-SP2) [obsolete]
CC: @njnes
Last updated: 2010-10-11 22:36:27 +0200
## Comment 14932
Date: 2010-09-23 03:48:37 +0200
From: hsaddington <<hs.addington>>
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.5; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)
Build Identifier:
A simple select distinct SQL statement with LIMIT returns incorrect result. It looks like LIMIT is applied before getting the distinct values. So, if there are 10 distinct values in a column, Monetdb only looks at the first 5 records and returns whatever distinct values it finds, if you specify limit 5. It should look at the entire column and return up to 5 distinct values.
Reproducible: Always
I think we are running the 2009-Nov release in another server. That release returns correct result. Thank you.
## Comment 14979
Date: 2010-10-05 17:27:11 +0200
From: @sjoerdmullender
Changeset [a1701bd161b4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a1701bd161b4) 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=a1701bd161b4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a1701bd161b4)
Changeset description:
Add test for bug #2676.
## Comment 15028
Date: 2010-10-11 22:36:27 +0200
From: @njnes
fixed, the optimizer now correctly sets the 'including' flag. This is needed when a topn is pushed under an project with distinct.
## Comment 15030
Date: 2010-10-11 22:43:51 +0200
From: @njnes
Changeset [aa532c1e0d17](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=aa532c1e0d17) 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=aa532c1e0d17](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=aa532c1e0d17)
Changeset description:
fixed bug in push topn down project with distinct
(fixes bug #2676)
## Comment 15069
Date: 2010-10-19 09:13:37 +0200
From: @njnes
Changeset [333e14ad51c7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=333e14ad51c7) 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=333e14ad51c7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=333e14ad51c7)
Changeset description:
fixes bugs in limit (don't push topn under project, is handled in rel_bin
allready) Bug #2622 and Bug #2676
fix crash in Bug #2672 , ie complex between is now handled correctly
fix bug #2586, test for return types when using functions.
(and check for empty results on procedure calls)
| "select distinct x from y limit z" SQL statement returns incorrect result | https://api.github.com/repos/MonetDB/MonetDB/issues/2676/comments | 0 | 2020-11-30T11:09:36Z | 2024-06-27T11:49:37Z | https://github.com/MonetDB/MonetDB/issues/2676 | 753,383,859 | 2,676 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-09-22 15:18:28 +0200
From: Alexandr Kulik <<alexandr.kulik1988>>
To: SQL devs <<bugs-sql>>
Version: 2.40.1 (Oct2010) [obsolete]
Last updated: 2010-11-15 09:39:00 +0100
## Comment 14927
Date: 2010-09-22 15:18:28 +0200
From: Alexandr Kulik <<alexandr.kulik1988>>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.62 Safari/534.3
Build Identifier:
Can't build sql module of MonetDB from sources at CentOS 5.4. Some of tools was additionaly installed from sources : python-2.6.6; autoconf-2.63; libtool-2.2.10;swig-2.0.0; automake-1.11.1 .
Reproducible: Always
### Steps to Reproduce:
1.Check out from mercurial
2. Install autoconf > 2.60 from sources
3. Compile sources using http://monetdb.cwi.nl/SQL/Documentation/Linux-Installation.html manual
### Actual Results:
Got failure at make step :
make[9]: Entering directory `/root/monet_exp/src/sql/src/backends/monet5/merovingian'
/bin/sh ../../../../libtool --tag=CC --mode=link gcc -Wall -Wextra -g -Werror-implicit-function-declaration -Werror -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wp,-D_FORTIFY_SOURCE=2 -export-dynamic -o merovingian merovingian.o libmeroutil.la -L/root/monet_exp/out/lib -lmonetdb5 -L/root/monet_exp/out/lib -lbat -lstream -lpthread
libtool: link: gcc -Wall -Wextra -g -Werror-implicit-function-declaration -Werror -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wp,-D_FORTIFY_SOURCE=2 -o merovingian merovingian.o -Wl,--export-dynamic ./.libs/libmeroutil.a -L/root/monet_exp/out/lib /root/monet_exp/out/lib/libmonetdb5.so -lm -lreadline -ltermcap -lcrypt /root/monet_exp/out/lib/libbat.so -ldl /root/monet_exp/out/lib/libstream.so /root/monet_exp/out/lib/libmutils.so -lz -lbz2 -lssl -lcrypto -lpthread -Wl,-rpath -Wl,/root/monet_exp/out/lib -Wl,-rpath -Wl,/root/monet_exp/out/lib
./.libs/libmeroutil.a(libmeroutil_la-utils.o): In function `generateUUID':
/root/monet_exp/src/sql/src/backends/monet5/merovingian/utils.c:356: undefined reference to `uuid_generate'
/root/monet_exp/src/sql/src/backends/monet5/merovingian/utils.c:357: undefined reference to `uuid_unparse'
collect2: ld returned 1 exit status
make[9]: *** [merovingian] Error 1
make[9]: Leaving directory `/root/monet_exp/src/sql/src/backends/monet5/merovingian'
sql] ./bootstrap
automake 1.11.1 is 1.7 or newer. Good.
autoconf 2.63 is 2.60 or newer. Good.
libtool 2.2.10 is 1.4 or newer. Good.
Python 2.6.6 is 2.0.0 or newer. Good.
/root/monet_exp/src/sql/conf
/root/monet_exp/src/sql/src
/root/monet_exp/src/sql/src/include
/root/monet_exp/src/sql/src/common
/root/monet_exp/src/sql/src/storage
/root/monet_exp/src/sql/src/storage/bat
/root/monet_exp/src/sql/src/storage/restrict
/root/monet_exp/src/sql/src/storage/m4
/root/monet_exp/src/sql/src/storage/bpm
/root/monet_exp/src/sql/src/server
/root/monet_exp/src/sql/src/backends
/root/monet_exp/src/sql/src/backends/monet5
/root/monet_exp/src/sql/src/backends/monet5/merovingian
/root/monet_exp/src/sql/src/backends/monet5/vaults
/root/monet_exp/src/sql/src/sql
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `conf'.
libtoolize: copying file `conf/ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.in and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
patching file aclocal.m4
Hunk 1 succeeded at 464 (offset -5922 lines).
## Comment 14928
Date: 2010-09-22 15:20:57 +0200
From: @grobian
can I have your configure output? in particular the part around checking uuid
## Comment 14929
Date: 2010-09-22 16:21:49 +0200
From: Alexandr Kulik <<alexandr.kulik1988>>
Created attachment 35
Configure output
> Attached file: [configure.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2675_configure.txt_35) (text/plain, 13997 bytes)
> Description: Configure output
## Comment 14930
Date: 2010-09-22 17:34:16 +0200
From: @grobian
Changeset [f3041de32fb6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f3041de32fb6) made by Fabian Groffen <fabian@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f3041de32fb6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f3041de32fb6)
Changeset description:
require both uuid headers and a successful link before we assume uuid is available, fixes bug #2675
## Comment 14931
Date: 2010-09-22 17:37:02 +0200
From: @grobian
Thanks, apparently your system has uuid headers, but no uuid library (or libc-based implementation). We didn't check both were actually true.
Committed on Oct2010 branch, which happens to be the code base for our very next release.
| Can't compile sql module under CentOS 5.4 | https://api.github.com/repos/MonetDB/MonetDB/issues/2675/comments | 0 | 2020-11-30T11:09:33Z | 2024-06-27T11:49:36Z | https://github.com/MonetDB/MonetDB/issues/2675 | 753,383,820 | 2,675 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-09-21 15:25:51 +0200
From: @romulogoncalves
To: SQL devs <<bugs-sql>>
Version: 2.40.1 (Oct2010) [obsolete]
CC: @romulogoncalves, @drstmane
Last updated: 2010-11-15 09:39:00 +0100
## Comment 14922
Date: 2010-09-21 15:25:51 +0200
From: @romulogoncalves
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.12) Gecko/20100907 Fedora/3.5.12-1.fc12 Firefox/3.5.12
Build Identifier:
The following sql statements report TypeException from MAL when an function was not created. It should have returned
ERROR = !SELECT: no such binary operator 'fdistancearcmineq(double,double,double,double)'
CREATE TABLE t1 (ra float NOT NULL, "dec" float NOT NULL);
select
fDistanceArcMinEq(213.7849600 , -0.4932472, ra,"dec") as distance_arcmin
from
t1,
fGetNearbyObjAllEq(213.7849600 , -0.4932472 , 20.8897421 ) as N
;
DROP TABLE t1;
Reproducible: Always
### Actual Results:
In the first run:
ERROR = !TypeException:user.fdistancearcmineq[71]:'calc.<<' undefined in: _73:any := calc.<<(_70:dbl, _72:int)
!TypeException:user.fdistancearcmineq[77]:'calc.<<' undefined in: _79:any := calc.<<(_76:dbl, _78:int)
!TypeException:user.fdistancearcmineq[84]:'calc.<<' undefined in: _86:any := calc.<<(_83:dbl, _85:int)
!TypeException:user.s0_1[41]:'user.fdistancearcmineq' undefined in: _91:dbl := user.fdistancearcmineq(_8:dbl, _10:dbl, _87:dbl, _89:dbl)
!SQLException:SQLengine:Program contains errors
Second run:
ERROR = !TypeException:user.s0_1[41]:'user.fdistancearcmineq' undefined in: _91:dbl := user.fdistancearcmineq(_8:dbl, _10:dbl, _87:dbl, _89:dbl)
!SQLException:SQLengine:Program contains errors
### Expected Results:
ERROR = !SELECT: no such binary operator 'fdistancearcmineq(double,double,double,double)'
## Comment 14923
Date: 2010-09-22 11:12:28 +0200
From: @romulogoncalves
Simplified version for debugging:
CREATE FUNCTION f1()
RETURNS float
BEGIN
DECLARE nx1 float;
SET nx1 = 1.0;
RETURN (left_shift(nx1 - 1.0,2));
END;
select f1();
DROP FUNCTION f1;
ERROR = !TypeException:user.f1[16]:'calc.<<' undefined in: _19:any := calc.<<(_15:dbl, _18:int)
!TypeException:user.s0_1[2]:'user.f1' undefined in: _3:dbl := user.f1()
!SQLException:SQLengine:Program contains errors
## Comment 14969
Date: 2010-10-04 13:35:59 +0200
From: @sjoerdmullender
This seems to work now. Can you confirm?
I think this was fixed in changeset [1a8d83cae2c4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1a8d83cae2c4)
## Comment 15140
Date: 2010-10-28 13:38:40 +0200
From: @grobian
assuming it was fixed sufficiently.
## Comment 15158
Date: 2010-10-30 10:27:25 +0200
From: @drstmane
What about a test?
## Comment 15160
Date: 2010-10-30 11:07:01 +0200
From: @drstmane
Changeset [9177895f6260](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9177895f6260) 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=9177895f6260](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9177895f6260)
Changeset description:
test for bug #2674; works fine (with both assertions en- & disabled)
## Comment 15162
Date: 2010-10-30 11:14:44 +0200
From: @grobian
(In reply to comment 4)
> What about a test?
sorry, you're right
| TypeException when a function does not exist. | https://api.github.com/repos/MonetDB/MonetDB/issues/2674/comments | 0 | 2020-11-30T11:09:29Z | 2024-06-27T11:49:35Z | https://github.com/MonetDB/MonetDB/issues/2674 | 753,383,781 | 2,674 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-09-21 14:49:54 +0200
From: @romulogoncalves
To: SQL devs <<bugs-sql>>
Version: 2.40.1 (Oct2010) [obsolete]
CC: @njnes
Last updated: 2011-03-28 17:31:25 +0200
## Comment 14921
Date: 2010-09-21 14:49:54 +0200
From: @romulogoncalves
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.12) Gecko/20100907 Fedora/3.5.12-1.fc12 Firefox/3.5.12
Build Identifier:
The following sql statements crash mserver:
CREATE TABLE t1 (name varchar(128) NOT NULL, field varchar(128) NOT NULL,
CONSTRAINT pk_t1_field_name PRIMARY KEY
(
field ,
name
)
);
CREATE VIEW v1 AS SELECT name FROM t1 WHERE field='SpecLineNames';
SELECT
v1.name
FROM
v1
WHERE
v1.name <> 'UNKNOWN'
and v1.name = 'Hb_4863'
;
DROP VIEW v1;
DROP TABLE t1;
Note: The crash only happens if the primary key is created and if both statements in where clause are used.
Reproducible: Always
### Actual Results:
mserver crashes
### Expected Results:
empty selection result
>[New Thread 0x7fffdf9c2710 (LWP 1035)]
mserver5: /ufs/goncalve/MonetDB/stable/sql/src/server/rel_bin.mx:1698: rel2bin_hash_lookup: Assertion `e->type == e_cmp && e->flag == cmp_equal' failed.
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffdf9c2710 (LWP 1035)]
0x000000399e8326c5 in raise () from /lib64/libc.so.6
(gdb) up
1 0x000000399e833ea5 in abort () from /lib64/libc.so.6
(gdb)
2 0x000000399e82b7b5 in __assert_fail () from /lib64/libc.so.6
(gdb)
3 0x00007fffe00b9b8c in rel2bin_hash_lookup (sql=0x7fffd0005468,
rel=0x7fffd049f118, sub=0x7fffd049fd88, i=0x7fffd03ecf28,
en=0x7fffd04a1378)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_bin.mx:1698
1698 assert(e->type == e_cmp && e->flag == cmp_equal);
(gdb)
4 0x00007fffe00b9eca in rel2bin_select (sql=0x7fffd0005468,
rel=0x7fffd049f118, refs=0x7fffd049f7c8)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_bin.mx:1760
1760 sel = rel2bin_hash_lookup(sql, rel, sub, i, en);
(gdb) bt
0 0x000000399e8326c5 in raise () from /lib64/libc.so.6
1 0x000000399e833ea5 in abort () from /lib64/libc.so.6
2 0x000000399e82b7b5 in __assert_fail () from /lib64/libc.so.6
3 0x00007fffe00b9b8c in rel2bin_hash_lookup (sql=0x7fffd0005468,
rel=0x7fffd049f118, sub=0x7fffd049fd88, i=0x7fffd03ecf28,
en=0x7fffd04a1378)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_bin.mx:1698
4 0x00007fffe00b9eca in rel2bin_select (sql=0x7fffd0005468,
rel=0x7fffd049f118, refs=0x7fffd049f7c8)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_bin.mx:1760
5 0x00007fffe00c1f1d in subrel_bin (sql=0x7fffd0005468, rel=0x7fffd049f118,
refs=0x7fffd049f7c8)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_bin.mx:3835
6 0x00007fffe00b92d7 in rel2bin_project (sql=0x7fffd0005468,
rel=0x7fffd044bb18, refs=0x7fffd049f7c8, topn=0x0)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_bin.mx:1556
7 0x00007fffe00c1eef in subrel_bin (sql=0x7fffd0005468, rel=0x7fffd044bb18,
refs=0x7fffd049f7c8)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_bin.mx:3831
8 0x00007fffe00c21be in output_rel_bin (sql=0x7fffd0005468,
rel=0x7fffd044bb18)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_bin.mx:3896
9 0x00007fffdffebd5f in sql_symbol2stmt (c=0x7fffd0005468,
---Type <return> to continue, or q <return> to quit---
sym=0x7fffd0007fb8)
at /ufs/goncalve/MonetDB/stable/sql/src/backends/monet5/sql.mx:1394
10 0x00007fffe00393fb in SQLparser (c=0x605b38)
at /ufs/goncalve/MonetDB/stable/sql/src/backends/monet5/sql_scenario.mx:1285
11 0x00007ffff7d23a62 in runPhase (c=0x605b38, phase=1)
at /ufs/goncalve/MonetDB/stable/MonetDB5/src/mal/mal_scenario.mx:604
12 0x00007ffff7d23b9a in runScenarioBody (c=0x605b38)
at /ufs/goncalve/MonetDB/stable/MonetDB5/src/mal/mal_scenario.mx:646
13 0x00007ffff7d23e21 in runScenario (c=0x605b38)
at /ufs/goncalve/MonetDB/stable/MonetDB5/src/mal/mal_scenario.mx:682
14 0x00007ffff7cd7017 in MSserveClient (dummy=0x605b38)
at /ufs/goncalve/MonetDB/stable/MonetDB5/src/mal/mal_session.mx:473
15 0x000000399f406a3a in start_thread () from /lib64/libpthread.so.0
16 0x000000399e8de77d in clone () from /lib64/libc.so.6
17 0x0000000000000000 in ?? ()
(gdb)
## Comment 14980
Date: 2010-10-05 17:27:12 +0200
From: @sjoerdmullender
Changeset [35cf18ead3b5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=35cf18ead3b5) 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=35cf18ead3b5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=35cf18ead3b5)
Changeset description:
Add test for bug #2673.
## Comment 15617
Date: 2011-03-28 17:31:25 +0200
From: @sjoerdmullender
The Mar2011 version has been released.
| select a string column from a view over a table with primary key crashes | https://api.github.com/repos/MonetDB/MonetDB/issues/2673/comments | 0 | 2020-11-30T11:09:26Z | 2024-06-27T11:49:34Z | https://github.com/MonetDB/MonetDB/issues/2673 | 753,383,737 | 2,673 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-09-21 14:31:01 +0200
From: @romulogoncalves
To: SQL devs <<bugs-sql>>
Version: 2.40.1 (Oct2010) [obsolete]
Last updated: 2010-11-15 09:39:08 +0100
## Comment 14920
Date: 2010-09-21 14:31:01 +0200
From: @romulogoncalves
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.12) Gecko/20100907 Fedora/3.5.12-1.fc12 Firefox/3.5.12
Build Identifier:
The following sql code crashes mserver:
create table t1 (id int);
create table t2 (age int);
SELECT
id
FROM
t1,
t2
WHERE
id between 4800
and age = 4863;
drop table t1;
drop table t2;
Reproducible: Always
### Actual Results:
mserver crashes
### Expected Results:
empty selection result
>[New Thread 0x7fffdf9c2710 (LWP 409)]
mserver5: /ufs/goncalve/MonetDB/stable/sql/src/server/rel_bin.mx:537: exp_bin: Assertion `0' failed.
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffdf9c2710 (LWP 409)]
0x000000399e8326c5 in raise () from /lib64/libc.so.6
(gdb) up
1 0x000000399e833ea5 in abort () from /lib64/libc.so.6
(gdb)
2 0x000000399e82b7b5 in __assert_fail () from /lib64/libc.so.6
(gdb)
3 0x00007fffe00b54c1 in exp_bin (sql=0x7fffd0005468, e=0x7fffd03e3c58,
left=0x7fffd03eb448, right=0x0, grp=0x0, sel=0x0)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_bin.mx:537
537 assert(0);
(gdb) l
532 is_select = 1;
533 }
534 if (re2)
535 r2 = exp_bin(sql, e->f, left, right, grp, sel);
536 if (!l || !r || (re2 && !r2)) {
537 assert(0);
538 if (l) stmt_destroy(l);
539 if (r) stmt_destroy(r);
540 if (r2) stmt_destroy(r2);
541 return NULL;
(gdb) bt
0 0x000000399e8326c5 in raise () from /lib64/libc.so.6
1 0x000000399e833ea5 in abort () from /lib64/libc.so.6
2 0x000000399e82b7b5 in __assert_fail () from /lib64/libc.so.6
3 0x00007fffe00b54c1 in exp_bin (sql=0x7fffd0005468, e=0x7fffd03e3c58,
left=0x7fffd03eb448, right=0x0, grp=0x0, sel=0x0)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_bin.mx:537
4 0x00007fffe00b9f21 in rel2bin_select (sql=0x7fffd0005468,
rel=0x7fffd03e3d78, refs=0x7fffd03ead98)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_bin.mx:1766
5 0x00007fffe00c1f1d in subrel_bin (sql=0x7fffd0005468, rel=0x7fffd03e3d78,
refs=0x7fffd03ead98)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_bin.mx:3835
6 0x00007fffe00b690d in rel2bin_join (sql=0x7fffd0005468,
rel=0x7fffd03d6e78, refs=0x7fffd03ead98)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_bin.mx:857
7 0x00007fffe00c1e04 in subrel_bin (sql=0x7fffd0005468, rel=0x7fffd03d6e78,
refs=0x7fffd03ead98)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_bin.mx:3810
8 0x00007fffe00b92d7 in rel2bin_project (sql=0x7fffd0005468,
rel=0x7fffd03e3e78, refs=0x7fffd03ead98, topn=0x0)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_bin.mx:1556
9 0x00007fffe00c1eef in subrel_bin (sql=0x7fffd0005468, rel=0x7fffd03e3e78,
refs=0x7fffd03ead98)
---Type <return> to continue, or q <return> to quit---
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_bin.mx:3831
10 0x00007fffe00c21be in output_rel_bin (sql=0x7fffd0005468,
rel=0x7fffd03e3e78)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_bin.mx:3896
11 0x00007fffdffebd5f in sql_symbol2stmt (c=0x7fffd0005468,
sym=0x7fffd00081a8)
at /ufs/goncalve/MonetDB/stable/sql/src/backends/monet5/sql.mx:1394
12 0x00007fffe00393fb in SQLparser (c=0x605b38)
at /ufs/goncalve/MonetDB/stable/sql/src/backends/monet5/sql_scenario.mx:1285
13 0x00007ffff7d23a62 in runPhase (c=0x605b38, phase=1)
at /ufs/goncalve/MonetDB/stable/MonetDB5/src/mal/mal_scenario.mx:604
14 0x00007ffff7d23b9a in runScenarioBody (c=0x605b38)
at /ufs/goncalve/MonetDB/stable/MonetDB5/src/mal/mal_scenario.mx:646
15 0x00007ffff7d23e21 in runScenario (c=0x605b38)
at /ufs/goncalve/MonetDB/stable/MonetDB5/src/mal/mal_scenario.mx:682
16 0x00007ffff7cd7017 in MSserveClient (dummy=0x605b38)
at /ufs/goncalve/MonetDB/stable/MonetDB5/src/mal/mal_session.mx:473
17 0x000000399f406a3a in start_thread () from /lib64/libpthread.so.0
18 0x000000399e8de77d in clone () from /lib64/libc.so.6
19 0x0000000000000000 in ?? ()
(gdb)
## Comment 14978
Date: 2010-10-05 17:11:50 +0200
From: @sjoerdmullender
Changeset [aeb4f682d269](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=aeb4f682d269) 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=aeb4f682d269](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=aeb4f682d269)
Changeset description:
Added test for bug #2672.
## Comment 15068
Date: 2010-10-19 09:13:37 +0200
From: @njnes
Changeset [333e14ad51c7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=333e14ad51c7) 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=333e14ad51c7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=333e14ad51c7)
Changeset description:
fixes bugs in limit (don't push topn under project, is handled in rel_bin
allready) Bug #2622 and Bug #2676
fix crash in Bug #2672 , ie complex between is now handled correctly
fix bug #2586, test for return types when using functions.
(and check for empty results on procedure calls)
## Comment 15076
Date: 2010-10-20 11:03:48 +0200
From: @njnes
Changeset [a0924b3f92b9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a0924b3f92b9) 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=a0924b3f92b9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a0924b3f92b9)
Changeset description:
last step in fixing Bug #2672. The complex join expression was incorrectly
handled as select. Now we correctly use a join2 expression.
## Comment 15139
Date: 2010-10-28 13:36:08 +0200
From: @grobian
Niels fixed this bug.
| mserver crashes with a boolean inside a between clause | https://api.github.com/repos/MonetDB/MonetDB/issues/2672/comments | 0 | 2020-11-30T11:09:23Z | 2024-06-27T11:49:33Z | https://github.com/MonetDB/MonetDB/issues/2672 | 753,383,692 | 2,672 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-09-14 12:28:08 +0200
From: @sjoerdmullender
To: SQL devs <<bugs-sql>>
Version: 2.40.1 (Oct2010) [obsolete]
Last updated: 2010-10-01 16:20:58 +0200
## Comment 14907
Date: 2010-09-14 12:28:08 +0200
From: @sjoerdmullender
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100907 Fedora/3.5.12-1.fc12 Firefox/3.5.12
Build Identifier:
Query [1] takes an inordinate amount of time, whereas query [2] where one of the conjunctions was moved to the end is fast. This on an empty database.
[1]
SELECT "f"."id", "f"."name", "f"."mod", "f"."func", "a"."name", "a"."type", "a"."type_digits", "a"."type_scale", "a"."number" FROM "sys"."args" "a", "sys"."functions" "f" WHERE "f"."id" NOT IN (SELECT "function_id" FROM "sys"."systemfunctions") AND "f"."sql" = FALSE AND "a"."func_id" = "f"."id" ORDER BY "f"."id", "a"."number";
[2]
SELECT "f"."id", "f"."name", "f"."mod", "f"."func", "a"."name", "a"."type", "a"."type_digits", "a"."type_scale", "a"."number" FROM "sys"."args" "a", "sys"."functions" "f" WHERE "f"."sql" = FALSE AND "a"."func_id" = "f"."id" AND "f"."id" NOT IN (SELECT "function_id" FROM "sys"."systemfunctions") ORDER BY "f"."id", "a"."number";
Reproducible: Always
### Steps to Reproduce:
1.Start mserver5 (with SQL) on an empty database
2.Run the query
3.Wait
### Actual Results:
11 seconds
### Expected Results:
0 seconds
## Comment 14908
Date: 2010-09-14 12:49:35 +0200
From: @sjoerdmullender
Changeset [59bc6b919f75](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=59bc6b919f75) 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=59bc6b919f75](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=59bc6b919f75)
Changeset description:
Add test for bug #2671.
Give this test a short timeout since the bug has to do with the time it takes to execute the query.
## Comment 14951
Date: 2010-10-01 16:20:58 +0200
From: @sjoerdmullender
First of all, since the test can only work in the Oct2010 or later branch, I changed the version.
Closing since this query works properly now.
| slow query due to bad ordering of conjunctions | https://api.github.com/repos/MonetDB/MonetDB/issues/2671/comments | 0 | 2020-11-30T11:09:19Z | 2024-06-27T11:49:32Z | https://github.com/MonetDB/MonetDB/issues/2671 | 753,383,658 | 2,671 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-09-14 01:24:18 +0200
From: @skinkie
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 5.22.1 (Oct2010) [obsolete]
CC: alexandr.kulik1988
Blocker for: #2665
Last updated: 2010-11-15 09:38:59 +0100
## Comment 14903
Date: 2010-09-14 01:24:18 +0200
From: @skinkie
sql>CREATE TABLE "sys"."kvk_tmp" (
more> "kvk" BIGINT,
more> "bedrijfsnaam" VARCHAR(256),
more> "kvks" INTEGER,
more> "sub" INTEGER,
more> "adres" VARCHAR(256),
more> "postcode" VARCHAR(10),
more> "plaats" VARCHAR(32),
more> "type" VARCHAR(14),
more>"website" VARCHAR(128)
more>);
operation successful
sql>
sql>insert into kvk_tmp select *, null from kvk_pf where kvk not in (select kvk from kvk_suggest);
2520626 affected rows (18.1s)
sql>insert into kvk_tmp select kvk_pf.kvk, kvk_suggest.bedrijfsnaam, kvk_pf.kvks, kvk_pf.sub, kvk_pf.adres, kvk_pf.postcode, kvk_pf.plaats, kvk_pf.type, kvk_suggest.website from kvk_pf, kvk_suggest where kvk_suggest.status = null and kvk_pf.kvk = kvk_suggest.kvk;
syntax error, unexpected sqlNULL in: "insert into kvk_tmp select kvk_pf.kvk, kvk_suggest.bedrijfsnaam, kvk_pf.kvks, kvk_pf.sub, kvk_pf.adres, kvk_pf.postcode, kvk_pf.plaats, kvk_pf.type, kvk_suggest.website from kvk_pf, kvk_suggest where kvk_suggest.status = null"
sql>insert into kvk_tmp select kvk_pf.kvk, kvk_suggest.bedrijfsnaam, kvk_pf.kvks, kvk_pf.sub, kvk_pf.adres, kvk_pf.postcode, kvk_pf.plaats, kvk_pf.type, kvk_suggest.website from kvk_pf, kvk_suggest where kvk_suggest.status is null and kvk_pf.kvk = kvk_suggest.kvk;
44835 affected rows (1.2s)
sql>insert into kvk_tmp select kvk, bedrijfsnaam, kvks, sub, straat||' '||nummer, postcode, plaats, type, website from kvk_suggest where kvk not in (select kvk from kvk_pf) and status is null and toevoeging is null;
mserver5: ../../../../src/storage/bat/bat_storage.mx:1389: tr_update_delta: Assertion `cur->T->heap.storage != 2' failed.
Second run the data was just inserted.
MonetDB server v5.23.0 (64-bit), based on kernel v1.41.0 (64-bit oids)
Not released
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
Visit http://monetdb.cwi.nl/ for further information
Found 3.9GiB available memory, 2 available cpu cores
Configured for prefix: /opt/monetdb-testing
Libraries:
libpcre: 8.02 2010-03-19 (compiled with 8.02)
openssl: OpenSSL 1.0.0a 1 Jun 2010 (compiled with OpenSSL 1.0.0a 1 Jun 2010)
libxml2: 2.7.7 (compiled with 2.7.7)
Compiled by: skinkie@openkvk (x86_64-unknown-linux-gnu)
Compilation: gcc -Wall -Wextra -fno-strict-aliasing -g -Werror-implicit-function-declaration -Werror -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/x86_64-pc-linux-gnu/bin/ld -IPA -m elf_x86_64
## Comment 14904
Date: 2010-09-14 01:55:35 +0200
From: @skinkie
From my observations I see that the actual data seems to be inserted in the table. While command fails afterwards;
sql>insert into kvk_suggest select kvk_extra.* from kvk_extra, kvk_pf where kvk_pf.kvk = kvk_extra.kvk and kvk_pf.postcode = kvk_extra.postcode and website is not null and kvk_pf.kvk not in (select kvk from kvk_suggest);
MAPI = monetdb@localhost:60005
ACTION= read_line
QUERY = insert into kvk_suggest select kvk_extra.* from kvk_extra, kvk_pf where kvk_pf.kvk = kvk_extra.kvk and kvk_pf.postcode = kvk_extra.postcode and website is not null and kvk_pf.kvk not in (select kvk from kvk_suggest);
ERROR = !Connection terminated
skinkie@openkvk ~ $ /opt/monetdb-testing/bin/mclient -p 60005
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v5.23.0, 'kvk-new'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>insert into kvk_suggest select kvk_extra.* from kvk_extra, kvk_pf where kvk_pf.kvk = kvk_extra.kvk and kvk_pf.postcode = kvk_extra.postcode and website is not null and kvk_pf.kvk not in (select kvk from kvk_suggest);
0 affected rows (1.1s)
## Comment 14916
Date: 2010-09-20 11:09:44 +0200
From: @skinkie
This bug prevents me from automatic updating my database. Because I plainly don't know when the asserts hits and why.
## Comment 14942
Date: 2010-09-27 21:13:14 +0200
From: Alexandr Kulik <<alexandr.kulik1988>>
Created attachment 37
Got same problem
Have almost same problem. On huge file load via copy into.
> Attached file: [log.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2670_log.txt_37) (text/plain, 8830 bytes)
> Description: Got same problem
## Comment 14943
Date: 2010-09-27 22:13:49 +0200
From: @skinkie
(In reply to comment 3)
> Created attachment 37 [details]
> Got same problem
>
> Have almost same problem. On huge file load via copy into.
For me it is definitely not related to huge. I forwarded Niels my backtrace, but for example today I didn't have it at all. While last week I had it about 2 times a day. The key seems to be some column that is bugging, but I have to reproduce it in a non-production environment to search deeper once the assert triggers.
## Comment 14962
Date: 2010-10-03 20:07:21 +0200
From: @grobian
bug #2680 mentions this is in Oct2010 too, which makes this thing a blocker for an Oct2010 release.
## Comment 14965
Date: 2010-10-04 09:29:40 +0200
From: @sjoerdmullender
I wonder if my checkin on the Oct2010 branch last Friday in changeset [c9fbf6050938](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c9fbf6050938) (merged into default in changeset a8cfb61a0d46) fixed this problem. It seems to me, it directly addressed this issue.
Can you check?
## Comment 14967
Date: 2010-10-04 10:34:50 +0200
From: @skinkie
I'll upgrade and test.
## Comment 14974
Date: 2010-10-05 15:31:04 +0200
From: @skinkie
(In reply to comment 6)
> I wonder if my checkin on the Oct2010 branch last Friday in changeset
> [c9fbf6050938](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c9fbf6050938) (merged into default in changeset a8cfb61a0d46) fixed this
> problem. It seems to me, it directly addressed this issue.
> Can you check?
I did not get the specific assert anymore. But it did get worse: client could connect but never get a prompt. I don't know if this is a related issue or not. (I'm updating again...)
## Comment 14981
Date: 2010-10-05 17:54:44 +0200
From: @skinkie
Sjoerd please tell me if this is a new bug, or a result of your fix. Clients hang.
(gdb) bt
0 0x00007fb07d44653d in read () from /lib/libpthread.so.0
1 0x00007fb07fef16ae in rl_getc () from /lib/libreadline.so.6
2 0x00007fb07fef1b80 in rl_read_key () from /lib/libreadline.so.6
3 0x00007fb07fedf9d6 in readline_internal_char () from /lib/libreadline.so.6
4 0x00007fb07fedfeaa in readline () from /lib/libreadline.so.6
5 0x00007fb08040bd5d in getConsoleInput (c=0x605560, prompt=0xa67858 ">", linemode=0, exit_on_error=1) at ../../../src/mal/mal_readline.mx:343
6 0x00007fb08040c429 in readConsole (cntxt=0x605560) at ../../../src/mal/mal_readline.mx:502
7 0x00007fb0803ac616 in MALreader (c=0x605560) at ../../../src/mal/mal_session.mx:538
8 0x00007fb0803ff42a in runPhase (c=0x605560, phase=0) at ../../../src/mal/mal_scenario.mx:604
9 0x00007fb0803ff50f in runScenarioBody (c=0x605560) at ../../../src/mal/mal_scenario.mx:641
10 0x00007fb0803ff7e9 in runScenario (c=0x605560) at ../../../src/mal/mal_scenario.mx:682
11 0x00007fb0803ac447 in MSserveClient (dummy=0x605560) at ../../../src/mal/mal_session.mx:473
12 0x0000000000403508 in main (argc=6, av=0x7fffcdbec428) at ../../../src/tools/mserver5.mx:656
(gdb) thread apply all bt
Thread 8 (Thread 0x7fb076e83710 (LWP 8434)):
0 0x00007fb07d19d1d3 in select () from /lib/libc.so.6
1 0x00007fb07f92944d in MT_sleep_ms (ms=500) at ../../../src/gdk/gdk_posix.mx:2235
2 0x00007fb07f5207f8 in GDKvmtrim (limit=0x7fb07fc77ef0) at ../../../src/gdk/gdk_utils.mx:1499
3 0x00007fb07d43ec0a in start_thread () from /lib/libpthread.so.0
4 0x00007fb07d1a3a9d in clone () from /lib/libc.so.6
Thread 7 (Thread 0x7fb06bf12710 (LWP 8435)):
0 0x00007fb07d19d1d3 in select () from /lib/libc.so.6
1 0x00007fb06fb1ff26 in SERVERlistenThread (Sock=0x1454c38) at ../../../../src/modules/mal/mal_mapi.mx:495
2 0x00007fb07d43ec0a in start_thread () from /lib/libpthread.so.0
3 0x00007fb07d1a3a9d in clone () from /lib/libc.so.6
Thread 6 (Thread 0x7fb06bd11710 (LWP 8436)):
0 0x00007fb07d19d1d3 in select () from /lib/libc.so.6
1 0x00007fb07f92944d in MT_sleep_ms (ms=30000) at ../../../src/gdk/gdk_posix.mx:2235
2 0x00007fb06c75eed4 in store_manager () at ../../../src/storage/store.c:1519
3 0x00007fb06c6fb1e6 in mvc_exit () at ../../../src/server/sql_mvc.c:122
4 0x00007fb07d43ec0a in start_thread () from /lib/libpthread.so.0
5 0x00007fb07d1a3a9d in clone () from /lib/libc.so.6
Thread 5 (Thread 0x7fb06b504710 (LWP 8439)):
0 0x00007fb07d4457b0 in sem_wait () from /lib/libpthread.so.0
1 0x00007fb0803ce6a0 in q_dequeue (q=0x1270818) at ../../../src/mal/mal_interpreter.mx:929
2 0x00007fb0803d8c14 in runDFLOWworker (t=0xaeaaf8) at ../../../src/mal/mal_interpreter.mx:1123
3 0x00007fb07d43ec0a in start_thread () from /lib/libpthread.so.0
4 0x00007fb07d1a3a9d in clone () from /lib/libc.so.6
Thread 4 (Thread 0x7fb06b303710 (LWP 8440)):
0 0x00007fb07d4457b0 in sem_wait () from /lib/libpthread.so.0
1 0x00007fb0803ce6a0 in q_dequeue (q=0x1270818) at ../../../src/mal/mal_interpreter.mx:929
2 0x00007fb0803d8c14 in runDFLOWworker (t=0xaeab18) at ../../../src/mal/mal_interpreter.mx:1123
3 0x00007fb07d43ec0a in start_thread () from /lib/libpthread.so.0
4 0x00007fb07d1a3a9d in clone () from /lib/libc.so.6
Thread 3 (Thread 0x7faac2c88710 (LWP 23391)):
0 0x00007fb07d4457b0 in sem_wait () from /lib/libpthread.so.0
1 0x00007fb0803ce6a0 in q_dequeue (q=0x1a19a88) at ../../../src/mal/mal_interpreter.mx:929
2 0x00007fb0803d8c14 in runDFLOWworker (t=0x19d9578) at ../../../src/mal/mal_interpreter.mx:1123
3 0x00007fb07d43ec0a in start_thread () from /lib/libpthread.so.0
4 0x00007fb07d1a3a9d in clone () from /lib/libc.so.6
Thread 2 (Thread 0x7faac2a87710 (LWP 23392)):
0 0x00007fb07d4457b0 in sem_wait () from /lib/libpthread.so.0
1 0x00007fb0803ce6a0 in q_dequeue (q=0x1a19a88) at ../../../src/mal/mal_interpreter.mx:929
2 0x00007fb0803d8c14 in runDFLOWworker (t=0x19d9598) at ../../../src/mal/mal_interpreter.mx:1123
3 0x00007fb07d43ec0a in start_thread () from /lib/libpthread.so.0
4 0x00007fb07d1a3a9d in clone () from /lib/libc.so.6
Thread 1 (Thread 0x7fb0808e2700 (LWP 8433)):
0 0x00007fb07d44653d in read () from /lib/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
1 0x00007fb07fef16ae in rl_getc () from /lib/libreadline.so.6
2 0x00007fb07fef1b80 in rl_read_key () from /lib/libreadline.so.6
3 0x00007fb07fedf9d6 in readline_internal_char () from /lib/libreadline.so.6
4 0x00007fb07fedfeaa in readline () from /lib/libreadline.so.6
5 0x00007fb08040bd5d in getConsoleInput (c=0x605560, prompt=0xa67858 ">", linemode=0, exit_on_error=1) at ../../../src/mal/mal_readline.mx:343
6 0x00007fb08040c429 in readConsole (cntxt=0x605560) at ../../../src/mal/mal_readline.mx:502
7 0x00007fb0803ac616 in MALreader (c=0x605560) at ../../../src/mal/mal_session.mx:538
8 0x00007fb0803ff42a in runPhase (c=0x605560, phase=0) at ../../../src/mal/mal_scenario.mx:604
9 0x00007fb0803ff50f in runScenarioBody (c=0x605560) at ../../../src/mal/mal_scenario.mx:641
10 0x00007fb0803ff7e9 in runScenario (c=0x605560) at ../../../src/mal/mal_scenario.mx:682
11 0x00007fb0803ac447 in MSserveClient (dummy=0x605560) at ../../../src/mal/mal_session.mx:473
12 0x0000000000403508 in main (argc=6, av=0x7fffcdbec428) at ../../../src/tools/mserver5.mx:656
(gdb) q
A debugging session is active.
## Comment 14984
Date: 2010-10-05 20:22:00 +0200
From: @sjoerdmullender
(In reply to comment 9)
> Sjoerd please tell me if this is a new bug, or a result of your fix. Clients
> hang.
There is nothing going on:
Thread 1 is waiting for input on the console;
Threads 2, 3, 4 and 5 are worker threads waiting for work;
Thread 6 is the log manager thread which occasionally wakes up to incorporate the write-ahead logs;
Thread 7 is waiting for a connection from a client;
Thread 8 is the virtual memory trim thread which occasionally wakes up to free up virtual memory (by releasing BATs).
If the client hangs, it looks like the problem is on the client's side.
## Comment 14985
Date: 2010-10-05 21:12:33 +0200
From: @skinkie
(In reply to comment 10)
> (In reply to comment 9)
> > Sjoerd please tell me if this is a new bug, or a result of your fix. Clients
> > hang.
>
> There is nothing going on:
...
> If the client hangs, it looks like the problem is on the client's side.
Any client connected to the server hangs, including a newly started mclient. It will never get a prompt.
## Comment 14986
Date: 2010-10-06 09:34:47 +0200
From: @skinkie
It gets by far more annoying. It seems to be totally unrelated to updates. MonetDB just stops with processing connections *at all*. If I can do anything next to the backtrace I have already provided let me know.
## Comment 14987
Date: 2010-10-06 09:47:24 +0200
From: @sjoerdmullender
(In reply to comment 12)
> It gets by far more annoying. It seems to be totally unrelated to updates.
> MonetDB just stops with processing connections *at all*. If I can do anything
> next to the backtrace I have already provided let me know.
Perhaps you can run
strace -o output mclient -lsql ...
and attach the output.
## Comment 14988
Date: 2010-10-06 10:36:36 +0200
From: @skinkie
Created attachment 41
strace output of mclient
For what is worth, the read seems to fail on the authentication. That might be, but... persistent connections are also completely death.
This starts to be a completely independent issue. But pretty vague such thing suddenly arrives.
> Attached file: [nothing.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2670_nothing.txt_41) (text/plain, 14683 bytes)
> Description: strace output of mclient
## Comment 14991
Date: 2010-10-06 10:48:28 +0200
From: @grobian
server sends challenge
client sends response
client never gets prompt from server
## Comment 14992
Date: 2010-10-06 10:56:10 +0200
From: @grobian
I think this is because MSscheduleClient is not called, which means doChallenge doesn't ever get to calling it.
Odd enough, this sort of reduces the possible point of failure to be either the server waiting for data (not seeing the response), or the failure is in MSscheduleClient when it calls AUTHcheckCredentials, an out of memory condition happens, which causes MSscheduleClient to return without disconnecting the client...
## Comment 14993
Date: 2010-10-06 11:12:39 +0200
From: @grobian
on a second look (people are loud around me here), I think the problem is in one of MCfindClient, MCinitClient, MSinitClientPrg. If it hangs, there's nothing what we can do, I'll try to at least disconnect the client in case of failure.
## Comment 14995
Date: 2010-10-06 12:57:32 +0200
From: @skinkie
Fabian, if your merge did arrive in development. Then it doesn't work, client still hangs with restarted server.
## Comment 14997
Date: 2010-10-06 13:29:18 +0200
From: @grobian
I only committed in candidate, didn't merge to default
## Comment 14998
Date: 2010-10-06 14:29:37 +0200
From: @sjoerdmullender
It's been merged and pushed now.
## Comment 15138
Date: 2010-10-28 13:34:51 +0200
From: @grobian
Stefan reported the original issue seems to be fixed. Closing.
The second issue seems to be bug #2700.
| insert into resulted in tr_update_delta: Assertion `cur->T->heap.storage != 2' failed. | https://api.github.com/repos/MonetDB/MonetDB/issues/2670/comments | 0 | 2020-11-30T11:09:16Z | 2024-06-27T11:49:31Z | https://github.com/MonetDB/MonetDB/issues/2670 | 753,383,615 | 2,670 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-09-10 21:54:59 +0200
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2011-01-26 18:43:01 +0100
## Comment 14902
Date: 2010-09-10 21:54:59 +0200
From: @skinkie
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4
Build Identifier:
I'm currently observing severe data corruption in the latest MonetDB revisions. I have traced the disk corruption back to 3 september. I observe:
1) LEFT JOINS that fail, resulting in data that 'seems' te be handled as equijoin
2) Column misalignment(?) my first column and last too column should combine as one. I observe that this isn't the case anymore.
To update my tables, I am using copy into and bulk operations to insert. Please advise.
Reproducible: Always
MonetDB server v5.23.0 (64-bit), based on kernel v1.41.0 (64-bit oids)
Not released
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
Visit http://monetdb.cwi.nl/ for further information
Found 3.9GiB available memory, 2 available cpu cores
Configured for prefix: /opt/monetdb-testing
Libraries:
libpcre: 8.02 2010-03-19 (compiled with 8.02)
openssl: OpenSSL 1.0.0a 1 Jun 2010 (compiled with OpenSSL 1.0.0a 1 Jun 2010)
libxml2: 2.7.7 (compiled with 2.7.7)
Compiled by: skinkie@openkvk (x86_64-unknown-linux-gnu)
Compilation: gcc -Wall -Wextra -fno-strict-aliasing -g -Werror-implicit-function-declaration -Werror -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/x86_64-pc-linux-gnu/bin/ld -IPA -m elf_x86_64
## Comment 15026
Date: 2010-10-11 22:00:23 +0200
From: @njnes
Stefan if you have a corrupt database we need to find out what sequence of statements (and creahes) caused it. You can verify that indeed the columns
of a single table aren't equal by executing a select statement with 2 non aligned
columns, in the mal debugger, and print the counts of both bats.
## Comment 15027
Date: 2010-10-11 22:21:11 +0200
From: @skinkie
(In reply to comment 1)
> Stefan if you have a corrupt database we need to find out what sequence of
> statements (and creahes) caused it. You can verify that indeed the columns
> of a single table aren't equal by executing a select statement with 2 non
> aligned
> columns, in the mal debugger, and print the counts of both bats.
I still have the (untouched) database. If you want to investigate the contents I'm happy to make a tarball of it. But recovery of destructive sequence seems to be a 'bit' more difficult if this isn't stored for 'debug' purposes somewhere.
## Comment 15412
Date: 2011-01-24 14:17:12 +0100
From: @grobian
we need something before we can do anything here.
## Comment 15444
Date: 2011-01-26 18:43:01 +0100
From: @skinkie
(In reply to comment 3)
> we need something before we can do anything here.
Do you want the corrupt dbfarm directory?
| Significant data corruption since at least 3 september | https://api.github.com/repos/MonetDB/MonetDB/issues/2669/comments | 0 | 2020-11-30T11:09:12Z | 2024-06-27T11:49:30Z | https://github.com/MonetDB/MonetDB/issues/2669 | 753,383,588 | 2,669 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-09-09 11:49:49 +0200
From: @grobian
To: SQL devs <<bugs-sql>>
Version: 2.40.1 (Oct2010) [obsolete]
Last updated: 2010-11-15 09:39:05 +0100
## Comment 14892
Date: 2010-09-09 11:49:49 +0200
From: @grobian
2010-09-09 11:19:00 MSG merovingian[7625]: starting database 'hibernate', up min/avg/max: 21h/21h/21h, crash average: 0.00 0.20 0.07 (3-1=2)
2010-09-09 11:19:01 MSG hibernate[8183]: arguments: /ufs/fabian/scratch/monetdb/Oct2010/program-x86_64/bin/mserver5 --config=/ufs/fabian/scratch/monetdb/Oct2010/program-x86_64/etc/monetdb5.conf --dbname=hibernate --set merovingian_uri=mapi:monetdb://volund.ins.cwi.nl:60000/hibernate --set mapi_open=false --set mapi_port=0 --set mapi_usock=/ufs/fabian/scratch/monetdb/Oct2010/program-x86_64/var/MonetDB5/dbfarm/hibernate/.mapi.sock --set monet_vault_key=/ufs/fabian/scratch/monetdb/Oct2010/program-x86_64/var/MonetDB5/dbfarm/hibernate/.vaultkey --set sql_optimizer=default_pipe --set monet_daemon=yes
2010-09-09 11:19:01 MSG hibernate[8183]: MonetDB server v5.22.0, based on kernel v1.40.0
2010-09-09 11:19:01 MSG hibernate[8183]: Release Oct2010-hg
2010-09-09 11:19:01 MSG hibernate[8183]: Serving database 'hibernate', using 4 threads
2010-09-09 11:19:01 MSG hibernate[8183]: Compiled for x86_64-pc-linux-gnu/64bit with 64bit OIDs dynamically linked
2010-09-09 11:19:01 MSG hibernate[8183]: Found 7.751 GiB available main-memory.
2010-09-09 11:19:01 MSG hibernate[8183]: Copyright (c) 1993-July 2008 CWI.
2010-09-09 11:19:01 MSG hibernate[8183]: Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
2010-09-09 11:19:01 MSG hibernate[8183]: Visit http://monetdb.cwi.nl/ for further information
2010-09-09 11:19:01 MSG hibernate[8183]: Listening for UNIX domain connection requests on mapi:monetdb:///ufs/fabian/scratch/monetdb/Oct2010/program-x86_64/var/MonetDB5/dbfarm/hibernate/.mapi.sock
2010-09-09 11:19:01 MSG hibernate[8183]: MonetDB/SQL module v2.40.0 loaded
2010-09-09 11:19:01 MSG hibernate[8183]: upgrading catalog from Feb2010
2010-09-09 11:19:01 ERR hibernate[8183]: mserver5: /ufs/fabian/scratch/monetdb/Oct2010/common/src/gdk/gdk_logger.mx:1853: logger_add_bat: Assertion `b->P->restricted > 0 || (b == lg->snapshots || b == lg->catalog || b == lg->seqs)' failed.
2010-09-09 11:19:01 MSG merovingian[7625]: database 'hibernate' (8183) was killed by signal SIGABRT
2010-09-09 11:19:10 ERR control[7625]: (local): failed to fork mserver: database 'hibernate' has crashed after starting, manual intervention needed, check merovingian's logfile for details
Upgrading the same database with Jun2010 succeeds, reading that converted database with Oct2010 afterwards works fine too.
The failing assertion was added to Oct2010 in this commit
http://dev.monetdb.org/hg/MonetDB/rev/42775467d209
This assert is not present in Jun2010, which appears to be the reason why Jun2010 can successfully convert the Feb2010 database.
## Comment 14970
Date: 2010-10-04 15:17:26 +0200
From: @sjoerdmullender
Changeset [e98b21703259](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e98b21703259) 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=e98b21703259](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e98b21703259)
Changeset description:
Make bats read-only before giving to logger.
This fixes bug #2668.
## Comment 14971
Date: 2010-10-04 15:23:26 +0200
From: @sjoerdmullender
We still don't have a way to test upgrades.
| Upgrading database from Feb2010 to Oct2010 fails with an assertion | https://api.github.com/repos/MonetDB/MonetDB/issues/2668/comments | 0 | 2020-11-30T11:09:09Z | 2024-06-27T11:49:29Z | https://github.com/MonetDB/MonetDB/issues/2668 | 753,383,537 | 2,668 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-09-08 16:01:54 +0200
From: @grobian
To: SQL devs <<bugs-sql>>
Version: 2.38.5 (Jun2010-SP2) [obsolete]
Last updated: 2010-11-15 09:39:08 +0100
## Comment 14889
Date: 2010-09-08 16:01:54 +0200
From: @grobian
obviously, this is not desired:
sql>create table mulpk (id int);
operation successful
sql>\d mulpk
CREATE TABLE "sys"."mulpk" (
"id" int
);
sql>alter table mulpk add constraint pk1 primary key (id);
\operation successful
sql>\d mulpk
\CREATE TABLE "sys"."mulpk" (
"id" int NOT NULL,
CONSTRAINT "pk1" PRIMARY KEY ("id")
);
sql>alter table mulpk add constraint pk2 primary key (id);
operation successful
sql>\d mulpk
CREATE TABLE "sys"."mulpk" (
"id" int NOT NULL,
CONSTRAINT "pk1" PRIMARY KEY ("id", "id")
);
sql>alter table mulpk add constraint pk3 primary key (id);
operation successful
sql>\d mulpk
CREATE TABLE "sys"."mulpk" (
"id" int NOT NULL,
CONSTRAINT "pk1" PRIMARY KEY ("id", "id", "id")
);
sql>
## Comment 14909
Date: 2010-09-14 12:49:36 +0200
From: @sjoerdmullender
Changeset [5efba77d0c67](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5efba77d0c67) 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=5efba77d0c67](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=5efba77d0c67)
Changeset description:
Add test for bug #2667.
## Comment 14972
Date: 2010-10-04 15:44:19 +0200
From: @sjoerdmullender
This bug seems to have been fixed by changeset [3d34c0219ae0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3d34c0219ae0)
| adding identical (primary key) constraints with different name allowed | https://api.github.com/repos/MonetDB/MonetDB/issues/2667/comments | 0 | 2020-11-30T11:09:06Z | 2024-06-27T11:49:28Z | https://github.com/MonetDB/MonetDB/issues/2667 | 753,383,507 | 2,667 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-09-08 11:27:32 +0200
From: @grobian
To: SQL devs <<bugs-sql>>
Version: 2.40.1 (Oct2010) [obsolete]
Blocker for: #2665
Last updated: 2010-11-15 09:39:07 +0100
## Comment 14885
Date: 2010-09-08 11:27:32 +0200
From: @grobian
A newly created database contains UDF functions by default. These are dumped by msqldump, which in turn then conflict with the already existing same named functions upon a restore.
UDF functions that are created by initialisation scripts should somehow make them part of the system catalog, such that they remain invisible.
## Comment 14890
Date: 2010-09-09 09:38:02 +0200
From: @sjoerdmullender
I'm planning to add a new Boolean column called system to the functions table. The default value will be false, but it will be set true to all functions that exist in the table when the column is added at the end of the createdb script.
## Comment 14891
Date: 2010-09-09 11:45:46 +0200
From: @sjoerdmullender
I'm hitting a snag: when the server restarts with an existing database, the system tables are recreated, but the code doing that doesn't know anything about the added column.
Perhaps we need to go to plan B: add an extra (system) table that contains the names of all system functions.
## Comment 14893
Date: 2010-09-09 14:14:54 +0200
From: @sjoerdmullender
Changeset [ecd7ad5a7094](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ecd7ad5a7094) 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=ecd7ad5a7094](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ecd7ad5a7094)
Changeset description:
Don't dump system-created User-defined Functions.
This fixes bug #2666.
The fix is to create a new table, called systemfunctions, which
contains the IDs of all system functions. Dump will first check
whether the table exists (if it doesn't, it will use the old way of
dumping), and then not dump any functions that are mentioned in the
table.
The table is created and filled at the end of the createdb.sql script.
## Comment 14895
Date: 2010-09-09 16:00:35 +0200
From: @sjoerdmullender
The UDF functions that exist in a newly created database are no longer dumped.
There is a test that tests dump on an empty database.
I.e., I consider this bug fixed.
| fresh database contains UDF functions | https://api.github.com/repos/MonetDB/MonetDB/issues/2666/comments | 0 | 2020-11-30T11:09:03Z | 2024-06-27T11:49:27Z | https://github.com/MonetDB/MonetDB/issues/2666 | 753,383,460 | 2,666 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-09-08 11:24:16 +0200
From: @grobian
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 5.22.1 (Oct2010) [obsolete]
Depends on: #2620, #2666, #2670, #2697, #2700
Last updated: 2011-01-24 14:03:17 +0100
## Comment 14884
Date: 2010-09-08 11:24:16 +0200
From: @grobian
Please do not comment directly on this bug.
Make all bugs that the Oct2010 depends on block this bug.
## Comment 15408
Date: 2011-01-24 14:03:17 +0100
From: @grobian
Oct2010 release has been out for a while.
| [TRACKER] bugs blocking the Oct2010 release | https://api.github.com/repos/MonetDB/MonetDB/issues/2665/comments | 0 | 2020-11-30T11:08:59Z | 2024-06-27T11:49:26Z | https://github.com/MonetDB/MonetDB/issues/2665 | 753,383,427 | 2,665 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-09-06 20:39:24 +0200
From: Jan Rittinger <<jan.rittinger>>
To: SQL devs <<bugs-sql>>
Version: 2.38.5 (Jun2010-SP2) [obsolete]
CC: mayrm
Last updated: 2010-11-15 09:39:02 +0100
## Comment 14875
Date: 2010-09-06 20:39:24 +0200
From: Jan Rittinger <<jan.rittinger>>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-us) AppleWebKit/533.17.8 (KHTML, like Gecko) Version/5.0.1 Safari/533.17.8
Build Identifier:
Running the following queries leads to segfaults in various places
SQLparser() at sql/src/backends/monet5/sql_scenario.mx:1155
exps_mark_used() at sql/src/server/rel_optimizer.mx:2973
rel_remove_unused() at sql/src/server/rel_optimizer.mx:3154
All queries have in common that the references a common table expression in an IN clause and somewhere else afterwards.
Reproducible: Always
### Steps to Reproduce:
1. Run one of the following queries via mclient:
with t(id) as (select id from tables)
select id from tables
where id in (select id from t)
and id in (select id from t);
with t(id) as (select id from tables),
x(id) as (select id from tables where id in (select id from t))
select * from t;
### Actual Results:
mserver5 crashes.
### Expected Results:
mclient should return a table.
## Comment 14877
Date: 2010-09-07 17:43:40 +0200
From: @sjoerdmullender
Changeset [9aa1bc5bdeb7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9aa1bc5bdeb7) 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=9aa1bc5bdeb7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9aa1bc5bdeb7)
Changeset description:
Test for bug #2664. Output still to be approved.
## Comment 14975
Date: 2010-10-05 16:05:30 +0200
From: @sjoerdmullender
The test works in the Oct2010 branch, so I'm assuming the bug got fixed somewhere along the line. Probably changeset [3d34c0219ae0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3d34c0219ae0)
| Multiple uses of common table expression in subquery crashes Mserver. | https://api.github.com/repos/MonetDB/MonetDB/issues/2664/comments | 0 | 2020-11-30T11:08:56Z | 2024-06-27T11:49:26Z | https://github.com/MonetDB/MonetDB/issues/2664 | 753,383,396 | 2,664 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-31 11:12:59 +0200
From: Jan Rittinger <<jan.rittinger>>
To: SQL devs <<bugs-sql>>
Version: 2.38.5 (Jun2010-SP2) [obsolete]
Last updated: 2010-11-15 09:38:57 +0100
## Comment 14867
Date: 2010-08-31 11:12:59 +0200
From: Jan Rittinger <<jan.rittinger>>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-us) AppleWebKit/533.17.8 (KHTML, like Gecko) Version/5.0.1 Safari/533.17.8
Build Identifier:
The first query incorrectly returns 'false':
SELECT COUNT (*) > 0 as res
FROM (SELECT id, COUNT (*) AS cnt
FROM tables
GROUP BY id) as i
WHERE NOT (1 < i.cnt);
All the other queries are slight modifications that return the expected result 'true':
-- 1 < i.cnt => i.cnt > 1
SELECT COUNT (*) > 0 as res
FROM (SELECT id, COUNT (*) AS cnt
FROM tables
GROUP BY id) as i
WHERE NOT (i.cnt > 1);
-- COUNT (*) => 1
SELECT COUNT (*) > 0 as res
FROM (SELECT id, 1 AS cnt
FROM tables
GROUP BY id) as i
WHERE NOT (1 < i.cnt);
-- NOT (1 < i.cnt) => 1 >= i.cnt
SELECT COUNT (*) > 0 as res
FROM (SELECT id, COUNT (*) AS cnt
FROM tables
GROUP BY id) as i
WHERE 1 >= i.cnt;
-- NOT (1 < i.cnt) => i.cnt <= 1
SELECT COUNT (*) > 0 as res
FROM (SELECT id, COUNT (*) AS cnt
FROM tables
GROUP BY id) as i
WHERE i.cnt <= 1;
-- inverted result
SELECT COUNT (*) = 0 as res
FROM (SELECT id, COUNT (*) AS cnt
FROM tables
GROUP BY id) as i
WHERE 1 < i.cnt;
Reproducible: Always
### Steps to Reproduce:
Run:
SELECT COUNT (*) > 0 as res
FROM (SELECT id, COUNT (*) AS cnt
FROM tables
GROUP BY id) as i
WHERE NOT (1 < i.cnt);
### Actual Results:
+-------+
| res |
+=======+
| false |
+-------+
1 tuple
### Expected Results:
+-------+
| res |
+=======+
| true |
+-------+
1 tuple
## Comment 14876
Date: 2010-09-07 17:43:39 +0200
From: @sjoerdmullender
Changeset [3a01aaaa513d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3a01aaaa513d) 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=3a01aaaa513d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3a01aaaa513d)
Changeset description:
Test for bug #2663.
## Comment 14973
Date: 2010-10-05 15:28:00 +0200
From: @sjoerdmullender
This seems to have been fixed, at least the test works in the Oct2010 branch.
| Combination of COUNT and NOT leads to incorrect results | https://api.github.com/repos/MonetDB/MonetDB/issues/2663/comments | 0 | 2020-11-30T11:08:53Z | 2024-06-27T11:49:25Z | https://github.com/MonetDB/MonetDB/issues/2663 | 753,383,368 | 2,663 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-30 14:43:48 +0200
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: 2.38.5 (Jun2010-SP2) [obsolete]
Duplicates: #2575
Last updated: 2010-08-30 14:45:51 +0200
## Comment 14859
Date: 2010-08-30 14:43:48 +0200
From: @skinkie
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.41 Safari/534.3
Build Identifier:
utf8 fragment
Any utf8 fragment would actually do.
CREATE TABLE "sys"."fulltext" (
"documentid" BIGINT NOT NULL,
"seq" SMALLINT NOT NULL,
"trigram" CHAR(3) NOT NULL
);
copy 2 records into fulltext from '/tmp/utf8-truncation' using delimiters '\t',
'\n', '';
SQLException:importTable:value 'failed to import table
(notice unbalanced quote)
Reproducible: Always
## Comment 14860
Date: 2010-08-30 14:45:20 +0200
From: @skinkie
I was waaaaay to slow....
Changeset [50ff7afd4fe4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=50ff7afd4fe4) 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=50ff7afd4fe4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=50ff7afd4fe4)
Changeset description:
Fix for bug #2575, comment 6.
If snprintf fails (e.g. because of a bad UTF-8 sequence),
report the error message without the value.
*** This bug has been marked as a duplicate of bug #2575 ***
## Comment 14862
Date: 2010-08-30 14:45:51 +0200
From: @skinkie
Created attachment 33
utf8-truncation
> Attached file: [utf8-truncation](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2662_utf8-truncation_33) (text/plain, 37 bytes)
> Description: utf8-truncation
| UTF8 fragment breaks snprintf output on error | https://api.github.com/repos/MonetDB/MonetDB/issues/2662/comments | 0 | 2020-11-30T11:08:50Z | 2024-06-28T13:20:40Z | https://github.com/MonetDB/MonetDB/issues/2662 | 753,383,341 | 2,662 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-24 15:46:56 +0200
From: @grobian
To: buildtools devs <<bugs-buildtools>>
Version: -- development
Last updated: 2011-01-24 14:18:37 +0100
## Comment 14758
Date: 2010-08-24 15:46:56 +0200
From: @grobian
Our monetdb*-config scripts are too generic, and provide incomplete data to actually build against one of our libraries successfully.
The problem here is that --libs only returns the -L library paths, not the necessary -l libs, and (important!) the dependant libs. This is something what pkg-config files do, which allows to easily link against a library without having to know anything about the state in which it was built. For mapilib this for instance would include -lMapi -lz -lbz2.
If we use pkg-config files for all of our libraries (mapilib, streams, libgdk, ...) we can actually use "generic" pkg-config checks in our configure scripts and have the right libs retrieved right from the pkg-config output.
## Comment 14924
Date: 2010-09-22 11:40:26 +0200
From: @grobian
note: we shouldn't include -R/--rpath entries, linking should be done with libtool, which supposedly includes --rpath entries itself for libs that aren't in the runtime search path.
## Comment 14925
Date: 2010-09-22 15:06:01 +0200
From: @grobian
Changeset [d4523804b237](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d4523804b237) made by Fabian Groffen <fabian@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d4523804b237](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d4523804b237)
Changeset description:
Install pkg-config files for our libraries, bug #2661.
Not all of these may be of any use. It is a first shot. The files are
named after their includes, in all lowercase.
## Comment 14926
Date: 2010-09-22 15:13:25 +0200
From: @grobian
Oct2010 release will install the *.pc files, following release can use them internally in favour of monetdb-*-config scripts.
## Comment 15413
Date: 2011-01-24 14:18:37 +0100
From: @grobian
The entire build system of monetdb has been reworked, making this largerly obsolete. We have pkg-config files now for libs that are of remote interest (e.g. libmapi).
| Provide pkg-config files for libs | https://api.github.com/repos/MonetDB/MonetDB/issues/2661/comments | 0 | 2020-11-30T11:08:47Z | 2024-06-27T11:49:23Z | https://github.com/MonetDB/MonetDB/issues/2661 | 753,383,314 | 2,661 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-24 13:26:04 +0200
From: @skinkie
To: clients devs <<bugs-clients>>
Version: 1.40.1 (Oct2010) [obsolete]
CC: @sjoerdmullender, @drstmane
Last updated: 2010-09-27 18:29:13 +0200
## Comment 14754
Date: 2010-08-24 13:26:04 +0200
From: @skinkie
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.36 Safari/534.3
Build Identifier:
Rather bizarre situation. I'm trying to index my new database. And before I was having the assumpption that the indexer was actually broken. Today I noticed that it was actually segfaulting inside the MonetDB driver.
Situation that works:
elect id, ljn, gepubliceerd, instantie, datum, publicatie, zaaknummers, uitspraak, conclusie, zittingsplaats, rechtsgebied, sector, soort, indicatie, kop from uitspraken limit 100000;
Situation that doesn't work:
elect id, ljn, gepubliceerd, instantie, datum, publicatie, zaaknummers, uitspraak, conclusie, zittingsplaats, rechtsgebied, sector, soort, indicatie, kop from uitspraken;
(Count is about 175k)
The backtrace I get from the indexer:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5fc604a in ODBCFetch (stmt=0x78c6b0, col=1, type=1, ptr=0x79fd50, buflen=11, lenp=0x79f978, nullp=0xf978, precision=0, scale=0,
datetime_interval_precision=0, offset=0, row=0) at ../../../../src/odbc/driver/ODBCConvert.c:1037
1037 *nullp = SQL_NULL_DATA;
(gdb) bt
0 0x00007ffff5fc604a in ODBCFetch (stmt=0x78c6b0, col=1, type=1, ptr=0x79fd50, buflen=11, lenp=0x79f978, nullp=0xf978, precision=0, scale=0,
datetime_interval_precision=0, offset=0, row=0) at ../../../../src/odbc/driver/ODBCConvert.c:1037
1 0x00007ffff5fdc9cf in SQLFetch_ (stmt=0x78c6b0) at ../../../../src/odbc/driver/SQLFetch.c:134
2 0x00007ffff5fdcc03 in SQLFetch (hStmt=0x78c6b0) at ../../../../src/odbc/driver/SQLFetch.c:194
3 0x00007ffff7b936bb in SQLFetch () from /usr/lib/libodbc.so.1
4 0x0000000000414710 in CSphSource_ODBC::SqlFetchRow (this=0x76b920) at sphinx.cpp:22267
5 0x0000000000441c70 in CSphSource_SQL::NextDocument (this=0x76b920, sError=...) at sphinx.cpp:19435
6 0x00000000004364e2 in CSphSource_Document::IterateHitsNext (this=0x78bda0, sError=...) at sphinx.cpp:18522
7 0x0000000000463b8e in CSphIndex_VLN::Build (this=0x76cd90, dSources=<value optimized out>, iMemoryLimit=<value optimized out>,
iWriteBuffer=<value optimized out>) at sphinx.cpp:9559
8 0x000000000040ba73 in DoIndex (hIndex=<value optimized out>, sIndexName=<value optimized out>, hSources=<value optimized out>,
bVerbose=<value optimized out>, fpDumpRows=<value optimized out>) at indexer.cpp:1138
9 0x000000000040cd8d in main (argc=<value optimized out>, argv=<value optimized out>) at indexer.cpp:1609
Serveral things come into me mind.
1) Is it possible that the size is bigger than the 'client' cache, also observed when coding libmapi and attempting random access.
2) Reviewing the code (and analysing the backtrace shows the nullp is 0xf978, that doesn't really sound like a valid adres (and even stack wise looks way to familiar to the lenp. Reviewing the code one level higher in SQLFetch.c:100 does indicate the suspicion that something mapi_* related is going on, since that fills the desc.
Maybe some interesting poking:
print *stmt
$3 = {Type = 5461, Error = 0x0, RetrievedErrors = 0, Dbc = 0x78a780, next = 0x0, State = FETCHED, hdl = 0x78c770, rowcount = 175504, currentRow = 115,
startRow = 114, rowSetSize = 1, currentCol = 0, retrieved = 0, queryid = -1, nparams = 0, querytype = 1, cursorType = 0, cursorScrollable = 0,
retrieveData = 1, noScan = 0, ApplRowDescr = 0x78c7f0, ApplParamDescr = 0x78c860, ImplRowDescr = 0x78c8d0, ImplParamDescr = 0x78c940,
AutoApplRowDescr = 0x78c7f0, AutoApplParamDescr = 0x78c860}
print i
$4 = 1
print *rec
{sql_desc_auto_unique_value = 0, sql_desc_base_column_name = 0x0, sql_desc_base_table_name = 0x0, sql_desc_case_sensitive = 0,
sql_desc_catalog_name = 0x0, sql_desc_concise_type = 1, sql_desc_data_ptr = 0x79fd50, sql_desc_datetime_interval_code = 0,
sql_desc_datetime_interval_precision = 0, sql_desc_display_size = 0, sql_desc_fixed_prec_scale = 0, sql_desc_indicator_ptr = 0xf978,
sql_desc_label = 0x0, sql_desc_length = 1, sql_desc_literal_prefix = 0x0, sql_desc_literal_suffix = 0x0, sql_desc_local_type_name = 0x0,
sql_desc_name = 0x0, sql_desc_nullable = 0, sql_desc_num_prec_radix = 0, sql_desc_octet_length = 11, sql_desc_octet_length_ptr = 0x79f978,
sql_desc_parameter_type = 0, sql_desc_precision = 0, sql_desc_rowver = 0, sql_desc_scale = 0, sql_desc_schema_name = 0x0, sql_desc_searchable = 0,
sql_desc_table_name = 0x0, sql_desc_type = 1, sql_desc_type_name = 0x0, sql_desc_unnamed = 0, sql_desc_unsigned = 0, sql_desc_updatable = 0}
Reproducible: Always
MonetDB server v5.21.0 (64-bit), based on kernel v1.39.0 (64-bit oids)
Not released
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
Visit http://monetdb.cwi.nl/ for further information
Found 3.9GiB available memory, 2 available cpu cores
Configured for prefix: /opt/monetdb-testing
Libraries:
libpcre: 8.02 2010-03-19 (compiled with 8.02)
openssl: OpenSSL 1.0.0a 1 Jun 2010 (compiled with OpenSSL 1.0.0a 1 Jun 2010)
libxml2: 2.7.7 (compiled with 2.7.7)
Compiled by: skinkie@openkvk (x86_64-unknown-linux-gnu)
Compilation: gcc -Wall -Wextra -fno-strict-aliasing -g -Werror-implicit-function-declaration -Werror -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/x86_64-pc-linux-gnu/bin/ld -IPA -m elf_x86_64
## Comment 14755
Date: 2010-08-24 14:26:22 +0200
From: @sjoerdmullender
The line your program crashed at is
*nullp = SQL_NULL_DATA;
So the crash is probably due to nullp having a bad value. As luck would have it, nullp is a parameter to the function, so we can see its value is 0xf978. This is indeed a somewhat strange value for a pointer.
The parameter comes from the call inside SQLFetch_ which passed the value of rec->sql_desc_indicator_ptr, which you also show (same value).
This value is initialized in SQLBindCol from the pnLengthOrIndicator parameter (the last parameter).
So the question is, how did you call SQLBindCol for this particular column? What are the values of the parameters to that call?
Also, note that the value comes from your application and is not generated within the driver.
By the way, you can set the environment variable ODBCDEBUG and assign it the full path name of a file which will then be used to log information about the ODBC calls that are going on. This file might have useful information. The environment variable has to be set for the application using the ODBC driver.
## Comment 14756
Date: 2010-08-24 14:35:50 +0200
From: @skinkie
(In reply to comment 1)
> So the question is, how did you call SQLBindCol for this particular column?
> What are the values of the parameters to that call?
I still have an open debug, session. But the only place where I can find SQLBindCol within the upstream code base is:
http://code.google.com/p/sphinxsearch/source/browse/trunk/src/sphinx.cpp22193
> By the way, you can set the environment variable ODBCDEBUG and assign it the
> full path name of a file which will then be used to log information about the
> ODBC calls that are going on. This file might have useful information. The
> environment variable has to be set for the application using the ODBC driver.
Going to generate it, will attach when done.
## Comment 14757
Date: 2010-08-24 14:43:05 +0200
From: @skinkie
Created attachment 31
ODBC Trace of sphinx indexer
Do you agree it is quite strange that when a limit was applied, lets say 100k, that it actually doesn't matter where the column is bound to?
> Attached file: [odbctrace.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2660_odbctrace.txt_31) (text/plain, 14321 bytes)
> Description: ODBC Trace of sphinx indexer
## Comment 14759
Date: 2010-08-24 16:26:24 +0200
From: @sjoerdmullender
Looking at the value of rec->sql_desc_indicator_ptr again, I notice that its lower 4 bytes are quite possibly correct, but the upper 4 bytes of the pointer are 0 and should have been 0x79 (i.e. the value should have been 0x79f978 instead of 0xf978).
The question is, how did those upper bytes get squashed?
Since you compiled this yourself, are you *absolutely* sure that everything was recompiled after the last update?
Some types were changed to support 64 bit architectures better (i.e. according to the latest Microsoft documentation), so it is important that everything uses the same definitions.
In particular, the definition of SQLBindCol changed from
SQLINTEGER nTargetValueMax,
SQLINTEGER *pnLengthOrIndicator)
to
SQLLEN nTargetValueMax,
SQLLEN *pnLengthOrIndicator)
(last two parameters, the last of which is used to initialize the value mentioned above).
So the question is also, what does the ODBC driver manager (unixODBC in your case?) do with this function?
Perhaps you can set a breakpoint on SQLBindCol (the MonetDB ODBC driver version, not the ODBC driver manager version) and look at the values of the parameters. Especially interesting is when nCol==1. Perhaps you can set a watch point on the sql_desc_indicator_ptr value.
## Comment 14760
Date: 2010-08-24 16:55:05 +0200
From: @skinkie
(In reply to comment 4)
> Since you compiled this yourself, are you *absolutely* sure that everything was
> recompiled after the last update?
For every directory I run rm -rf Linux, and then bootstrap again.
> In particular, the definition of SQLBindCol changed from
> SQLINTEGER nTargetValueMax,
> SQLINTEGER *pnLengthOrIndicator)
> to
> SQLLEN nTargetValueMax,
> SQLLEN *pnLengthOrIndicator)
> (last two parameters, the last of which is used to initialize the value
> mentioned above).
Yes, actually changed that myself, before that was committed already. But 175k is way below the actual SQLLEN limit anyway.
> So the question is also, what does the ODBC driver manager (unixODBC in your
> case?) do with this function?
Yes, unixODBC-2.3.0.
> Perhaps you can set a breakpoint on SQLBindCol (the MonetDB ODBC driver
> version, not the ODBC driver manager version) and look at the values of the
> parameters. Especially interesting is when nCol==1. Perhaps you can set a
> watch point on the sql_desc_indicator_ptr value.
Breakpoint 1, SQLBindCol (hStmt=0x78c6b0, nCol=1, nTargetType=1, pTargetValue=0x79fd50, nTargetValueMax=11, pnLengthOrIndicator=0x79f978)
at ../../../../src/odbc/driver/SQLBindCol.c:51
51 ODBCStmt *stmt = (ODBCStmt *) hStmt;
print *stmt
$2 = {Type = 5461, Error = 0x0, RetrievedErrors = 0, Dbc = 0x78a780, next = 0x0, State = EXECUTED1, hdl = 0x78c770, rowcount = 175504, currentRow = 0, startRow = 0,
rowSetSize = 0, currentCol = 0, retrieved = 0, queryid = -1, nparams = 0, querytype = 1, cursorType = 0, cursorScrollable = 0, retrieveData = 1, noScan = 0,
ApplRowDescr = 0x78c7f0, ApplParamDescr = 0x78c860, ImplRowDescr = 0x78c8d0, ImplParamDescr = 0x78c940, AutoApplRowDescr = 0x78c7f0, AutoApplParamDescr = 0x78c860}
Reading the code:
rec->sql_desc_indicator_ptr = pnLengthOrIndicator;
That should then become?
(gdb) print desc->descRec[1]
$5 = {sql_desc_auto_unique_value = 0, sql_desc_base_column_name = 0x0, sql_desc_base_table_name = 0x0, sql_desc_case_sensitive = 0, sql_desc_catalog_name = 0x0,
sql_desc_concise_type = 1, sql_desc_data_ptr = 0x79fd50, sql_desc_datetime_interval_code = 0, sql_desc_datetime_interval_precision = 0, sql_desc_display_size = 0,
sql_desc_fixed_prec_scale = 0, sql_desc_indicator_ptr = 0x79f978, sql_desc_label = 0x0, sql_desc_length = 1, sql_desc_literal_prefix = 0x0,
sql_desc_literal_suffix = 0x0, sql_desc_local_type_name = 0x0, sql_desc_name = 0x0, sql_desc_nullable = 0, sql_desc_num_prec_radix = 0, sql_desc_octet_length = 11,
sql_desc_octet_length_ptr = 0x79f978, sql_desc_parameter_type = 0, sql_desc_precision = 0, sql_desc_rowver = 0, sql_desc_scale = 0, sql_desc_schema_name = 0x0,
sql_desc_searchable = 0, sql_desc_table_name = 0x0, sql_desc_type = 1, sql_desc_type_name = 0x0, sql_desc_unnamed = 0, sql_desc_unsigned = 0, sql_desc_updatable = 0}
(gdb) print desc->descRec[0]
$6 = {sql_desc_auto_unique_value = 0, sql_desc_base_column_name = 0x0, sql_desc_base_table_name = 0x0, sql_desc_case_sensitive = 0, sql_desc_catalog_name = 0x0,
sql_desc_concise_type = 0, sql_desc_data_ptr = 0x0, sql_desc_datetime_interval_code = 0, sql_desc_datetime_interval_precision = 0, sql_desc_display_size = 0,
sql_desc_fixed_prec_scale = 0, sql_desc_indicator_ptr = 0x0, sql_desc_label = 0x0, sql_desc_length = 0, sql_desc_literal_prefix = 0x0, sql_desc_literal_suffix = 0x0,
sql_desc_local_type_name = 0x0, sql_desc_name = 0x0, sql_desc_nullable = 0, sql_desc_num_prec_radix = 0, sql_desc_octet_length = 0, sql_desc_octet_length_ptr = 0x0,
sql_desc_parameter_type = 0, sql_desc_precision = 0, sql_desc_rowver = 0, sql_desc_scale = 0, sql_desc_schema_name = 0x0, sql_desc_searchable = 0,
sql_desc_table_name = 0x0, sql_desc_type = 0, sql_desc_type_name = 0x0, sql_desc_unnamed = 0, sql_desc_unsigned = 0, sql_desc_updatable = 0}
## Comment 14761
Date: 2010-08-24 17:28:38 +0200
From: @sjoerdmullender
Do this, filling in the value from the first command into the second:
print rec
watch ((ODBCDescRec*)0x...)->sql_desc_indicator_ptr
continue
It looks like the value is passed correctly to SQLBindCol, but then somehow corrupted. You should be able to find where if you get the watch statement right.
## Comment 14762
Date: 2010-08-24 17:38:59 +0200
From: @skinkie
(In reply to comment 6)
> Do this, filling in the value from the first command into the second:
>
> print rec
> watch ((ODBCDescRec*)0x...)->sql_desc_indicator_ptr
> continue
>
> It looks like the value is passed correctly to SQLBindCol, but then somehow
> corrupted. You should be able to find where if you get the watch statement
> right.
Old value = (SQLLEN *) 0x0
New value = (SQLLEN *) 0x79f978
SQLBindCol (hStmt=0x78c6b0, nCol=1, nTargetType=1, pTargetValue=0x79fd50, nTargetValueMax=11, pnLengthOrIndicator=0x79f978) at ../../../../src/odbc/driver/SQLBindCol.c:163
163 rec->sql_desc_octet_length_ptr = pnLengthOrIndicator;
...
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5fc604a in ODBCFetch (stmt=0x78c6b0, col=1, type=1, ptr=0x79fd50, buflen=11, lenp=0x79f978, nullp=0xf978, precision=0, scale=0, datetime_interval_precision=0,
offset=0, row=0) at ../../../../src/odbc/driver/ODBCConvert.c:1037
1037 *nullp = SQL_NULL_DATA;
So not any bit of information more...
## Comment 14763
Date: 2010-08-24 18:57:25 +0200
From: @skinkie
After the segfault the hardware value is still correct:
print ((ODBCDescRec *) 0x79feb0)->sql_desc_indicator_ptr
## Comment 14764
Date: 2010-08-24 18:57:46 +0200
From: @skinkie
$32 = (SQLLEN *) 0x79f978
## Comment 14765
Date: 2010-08-24 19:21:50 +0200
From: @skinkie
I'm deeply puzzled.
(gdb) print ((ODBCDescRec *) 0x79feb0)->sql_desc_indicator_ptr
$33 = (SQLLEN *) 0x79f978
(gdb) up
1 0x00007ffff5fdc9cf in SQLFetch_ (stmt=0x78c6b0) at ../../../../src/odbc/driver/SQLFetch.c:134
134 if (ODBCFetch(stmt, i,
(gdb) print rec->sql_desc_indicator_ptr
$35 = (SQLLEN *) 0xf978
## Comment 14766
Date: 2010-08-24 20:05:34 +0200
From: @drstmane
Well, what does `print rec` say?
In other words is rec == 0x79feb0 ?
## Comment 14767
Date: 2010-08-24 20:24:18 +0200
From: @skinkie
(In reply to comment 11)
> Well, what does `print rec` say?
> In other words is rec == 0x79feb0 ?
Negative. If I 'up'.
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5fc604a in ODBCFetch (stmt=0x78c6b0, col=1, type=1, ptr=0x79fd50,
buflen=11, lenp=0x79f978, nullp=0xf978, precision=0, scale=0,
datetime_interval_precision=0, offset=0, row=0)
at ../../../../src/odbc/driver/ODBCConvert.c:1037
1037 *nullp = SQL_NULL_DATA;
(gdb) print rec
$5 = 0
(gdb) print ((ODBCDescRec *) 0x79feb0)->sql_desc_indicator_ptr
$6 = (SQLLEN *) 0x79f978
(gdb) up
1 0x00007ffff5fdc9cf in SQLFetch_ (stmt=0x78c6b0)
at ../../../../src/odbc/driver/SQLFetch.c:134
134 if (ODBCFetch(stmt, i,
(gdb) print rec
$7 = (ODBCDescRec *) 0x7a61f0
## Comment 14768
Date: 2010-08-24 20:46:28 +0200
From: @skinkie
If I watch this new value I see:
Breakpoint 1, SQLBindCol (hStmt=0x78c6b0, nCol=14, nTargetType=1,
pTargetValue=0x7a20f0, nTargetValueMax=7881, pnLengthOrIndicator=0x79fcb8)
at ../../../../src/odbc/driver/SQLBindCol.c:51
51 ODBCStmt *stmt = (ODBCStmt *) hStmt;
(gdb)
Continuing.
Hardware watchpoint 3: ((ODBCDescRec *) 0x7a61f0)->sql_desc_indicator_ptr
Old value = (SQLLEN *) 0x0
New value = (SQLLEN *) 0x79f978
0x00007ffff688fb9b in memcpy () from /lib/libc.so.6
(gdb) bt
0 0x00007ffff688fb9b in memcpy () from /lib/libc.so.6
1 0x00007ffff688790b in ?? () from /lib/libc.so.6
2 0x00007ffff6887c80 in realloc () from /lib/libc.so.6
3 0x00007ffff5fcfe08 in setODBCDescRecCount (desc=0x78c7f0, count=14)
at ../../../../src/odbc/driver/ODBCDesc.c:180
4 0x00007ffff5fd28f2 in SQLBindCol (hStmt=0x78c6b0, nCol=14, nTargetType=1,
pTargetValue=0x7a20f0, nTargetValueMax=7881, pnLengthOrIndicator=0x79fcb8)
at ../../../../src/odbc/driver/SQLBindCol.c:155
5 0x00007ffff7b85c1e in SQLBindCol () from /usr/lib/libodbc.so.1
6 0x000000000041e727 in CSphSource_ODBC::SqlQuery (this=0x76b920,
sQuery=<value optimized out>) at sphinx.cpp:22193
7 0x0000000000442432 in CSphSource_SQL::IterateHitsStart (this=0x76b920,
sError=<value optimized out>) at sphinx.cpp:19208
8 0x0000000000461c2a in CSphIndex_VLN::Build (this=0x76cd90,
dSources=<value optimized out>, iMemoryLimit=<value optimized out>,
iWriteBuffer=<value optimized out>) at sphinx.cpp:9306
9 0x000000000040ba73 in DoIndex (hIndex=<value optimized out>,
sIndexName=<value optimized out>, hSources=<value optimized out>,
bVerbose=<value optimized out>, fpDumpRows=<value optimized out>)
at indexer.cpp:1138
10 0x000000000040cd8d in main (argc=<value optimized out>,
argv=<value optimized out>) at indexer.cpp:1609
---
Hardware watchpoint 3: ((ODBCDescRec *) 0x7a61f0)->sql_desc_indicator_ptr
Old value = (SQLLEN *) 0x79f978
New value = (SQLLEN *) 0xf978
CSphSource_ODBC::SqlFetchRow (this=0x76b920) at sphinx.cpp:22274
22274 ARRAY_FOREACH ( i, m_dColumns )
(gdb) bt
0 CSphSource_ODBC::SqlFetchRow (this=0x76b920) at sphinx.cpp:22274
1 0x0000000000441c70 in CSphSource_SQL::NextDocument (this=0x76b920,
sError=...) at sphinx.cpp:19435
2 0x00000000004364e2 in CSphSource_Document::IterateHitsNext (this=0x200,
sError=...) at sphinx.cpp:18522
3 0x0000000000463b8e in CSphIndex_VLN::Build (this=0x76cd90,
dSources=<value optimized out>, iMemoryLimit=<value optimized out>,
iWriteBuffer=<value optimized out>) at sphinx.cpp:9559
4 0x000000000040ba73 in DoIndex (hIndex=<value optimized out>,
sIndexName=<value optimized out>, hSources=<value optimized out>,
bVerbose=<value optimized out>, fpDumpRows=<value optimized out>)
at indexer.cpp:1138
5 0x000000000040cd8d in main (argc=<value optimized out>,
argv=<value optimized out>) at indexer.cpp:1609
The ARRAY_FOREACH is defined:
define ARRAY_FOREACH(_index,_array) \
for ( int _index=0; _index<_array.GetLength(); _index++ )
## Comment 14769
Date: 2010-08-24 20:52:12 +0200
From: @drstmane
...
and at that very point, what does
list 22274
say, i.e., what does the complete code around line 22274 in sphinx.cpp look like?
...
## Comment 14770
Date: 2010-08-24 21:11:22 +0200
From: @skinkie
(In reply to comment 14)
> and at that very point, what does
>
> list 22274
>
> say, i.e., what does the complete code around line 22274 in sphinx.cpp look
> like?
http://code.google.com/p/sphinxsearch/source/browse/trunk/src/sphinx.cpp22274
ARRAY_FOREACH ( i, m_dColumns )
{
QueryColumn_t & tCol = m_dColumns[i];
switch ( tCol.m_iInd )
{
case SQL_NO_DATA:
case SQL_NULL_DATA:
tCol.m_dContents[0] = '\0';
tCol.m_dContents[0] = '\0';
break;
default:
if USE_WINDOWS // FIXME! support UCS-2 columns on Unix too
if ( tCol.m_bUnicode )
{
int iConv = WideCharToMultiByte ( CP_UTF8, 0, LPCWSTR ( &tCol.m_dRaw[0] ), tCol.m_iInd/sizeof(WCHAR),
LPSTR ( &tCol.m_dContents[0] ), tCol.m_iBufferSize-1, NULL, NULL );
if ( iConv==0 )
if ( GetLastError()==ERROR_INSUFFICIENT_BUFFER )
iConv = tCol.m_iBufferSize-1;
tCol.m_dContents[iConv] = '\0';
} else
endif
{
tCol.m_dContents[tCol.m_iInd] = '\0';
}
break;
}
}
## Comment 14771
Date: 2010-08-24 21:16:43 +0200
From: @sjoerdmullender
What is the m_iInd field in the QueryColumn_t struct/class defined as?
From the name, I fear INT when it should be SQLLEN.
I'm assuming you're running this on a 64 bit architecture. Is that correct?
## Comment 14772
Date: 2010-08-24 21:22:41 +0200
From: @skinkie
(In reply to comment 16)
> What is the m_iInd field in the QueryColumn_t struct/class defined as?
> From the name, I fear INT when it should be SQLLEN.
SQLLEN m_iInd;
So that is correct, (you do know that SQLLEN itself is defined as SQLINTEGER, and therefore int?)
> I'm assuming you're running this on a 64 bit architecture. Is that correct?
Yes x86_64, Intel E2220.
## Comment 14773
Date: 2010-08-25 10:17:03 +0200
From: @sjoerdmullender
The line of the second time the watch point hit (which is the interesting one) does not seem to match the code. The ARRAY_FOREACH line doesn't make any significant changes.
Is your compilation up-to-date? (I have to ask--it may also be that the compiler was confused.)
Also, when did you last update your sphinxsearch code? The line numbers on the page you refer to don't match with your line numbers.
I suspect that somewhere in the sphinx code the value is overwritten, but it is hard to pinpoint if the line numbers don't match.
## Comment 14774
Date: 2010-08-25 12:41:20 +0200
From: @skinkie
(In reply to comment 18)
> The line of the second time the watch point hit (which is the interesting one)
> does not seem to match the code. The ARRAY_FOREACH line doesn't make any
> significant changes.
> Is your compilation up-to-date? (I have to ask--it may also be that the
> compiler was confused.)
I compiled Sphinx yesterday again from SVN before I started to test if the indexer was fixed already. From that point on I noticed that their 'automatic backtrace' showed the MonetDB ODBC driver on the top of the list.
> Also, when did you last update your sphinxsearch code? The line numbers on the
> page you refer to don't match with your line numbers.
The Google URL page is actually updated, but I can do a SVN update again (now at r2464).
> I suspect that somewhere in the sphinx code the value is overwritten, but it is
> hard to pinpoint if the line numbers don't match.
Which value should I watch? The original rec, or the one at nCol==14?
## Comment 14775
Date: 2010-08-25 13:33:10 +0200
From: @skinkie
Recompiled MonetDB and Sphinx;
Hardware watchpoint 1: ((ODBCDescRec *) 0x7a61f0)->sql_desc_indicator_ptr
Old value = (SQLLEN *) 0x0
New value = (SQLLEN *) 0x79f978
0x00007ffff688fb9b in memcpy () from /lib/libc.so.6
(gdb) bt
0 0x00007ffff688fb9b in memcpy () from /lib/libc.so.6
1 0x00007ffff688790b in ?? () from /lib/libc.so.6
2 0x00007ffff6887c80 in realloc () from /lib/libc.so.6
3 0x00007ffff5fcfe08 in setODBCDescRecCount (desc=0x78c7f0, count=14)
at ../../../../src/odbc/driver/ODBCDesc.c:180
4 0x00007ffff5fd28f2 in SQLBindCol (hStmt=0x78c6b0, nCol=14, nTargetType=1,
pTargetValue=0x7a20f0, nTargetValueMax=7881, pnLengthOrIndicator=0x79fcb8)
at ../../../../src/odbc/driver/SQLBindCol.c:155
5 0x00007ffff7b85c1e in SQLBindCol () from /usr/lib/libodbc.so.1
6 0x000000000041e887 in CSphSource_ODBC::SqlQuery (this=0x76b920,
sQuery=<value optimized out>) at sphinx.cpp:22196
7 0x0000000000441d42 in CSphSource_SQL::IterateHitsStart (this=0x76b920,
sError=<value optimized out>) at sphinx.cpp:19211
8 0x0000000000461c58 in CSphIndex_VLN::Build (this=0x76cd90,
dSources=<value optimized out>, iMemoryLimit=<value optimized out>,
iWriteBuffer=<value optimized out>) at sphinx.cpp:9306
9 0x000000000040ba73 in DoIndex (hIndex=<value optimized out>,
sIndexName=<value optimized out>, hSources=<value optimized out>,
bVerbose=<value optimized out>, fpDumpRows=<value optimized out>)
at indexer.cpp:1138
10 0x000000000040cd8d in main (argc=<value optimized out>,
argv=<value optimized out>) at indexer.cpp:1609
(gdb) c
Continuing.
Hardware watchpoint 1: ((ODBCDescRec *) 0x7a61f0)->sql_desc_indicator_ptr
Old value = (SQLLEN *) 0x79f978
New value = (SQLLEN *) 0xf978
CSphSource_ODBC::SqlFetchRow (this=0x76b920) at sphinx.cpp:22277
22277 ARRAY_FOREACH ( i, m_dColumns )
(gdb) bt
0 CSphSource_ODBC::SqlFetchRow (this=0x76b920) at sphinx.cpp:22277
1 0x0000000000435810 in CSphSource_SQL::NextDocument (this=0x76b920,
sError=...) at sphinx.cpp:19438
2 0x0000000000434032 in CSphSource_Document::IterateHitsNext (this=0x200,
sError=...) at sphinx.cpp:18525
3 0x0000000000463bde in CSphIndex_VLN::Build (this=0x76cd90,
dSources=<value optimized out>, iMemoryLimit=<value optimized out>,
iWriteBuffer=<value optimized out>) at sphinx.cpp:9559
4 0x000000000040ba73 in DoIndex (hIndex=<value optimized out>,
sIndexName=<value optimized out>, hSources=<value optimized out>,
bVerbose=<value optimized out>, fpDumpRows=<value optimized out>)
at indexer.cpp:1138
5 0x000000000040cd8d in main (argc=<value optimized out>,
argv=<value optimized out>) at indexer.cpp:1609
## Comment 14776
Date: 2010-08-25 13:49:05 +0200
From: @sjoerdmullender
Your crash happened on the statement
*nullp = SQL_NULL_DATA;
As we had established, this was because the value of nullp was corrupt.
nullp is initialized from the value of rec->sql_desc_indicator_ptr in
SQLFetch_, and we've seen that that value is indeed also corrupt. We've seen
that this field is originally assigned the correct value, so what we need to
find out is, where did the value get corrupted. That's what we need to "watch"
in gdb.
From the stack trace of the crash, we can see that the crash happens for column
1 (col=1 parameter to ODBCFetch). So the interesting value to watch is
stmt->ApplRowDescr->descRec[1].sql_desc_indicator_ptr
where stmt is the value passed to SQLFetch by the ODBC driver manager (which
might be the value passed by sphinxsearch to SQLFetch in the
CSphSource_ODBC::SqlFetchRow method, but equally, it might not--I don't know
what unixODBC does with the pointer).
Note that both stmt->ApplRowDescr and stmt->ApplRowDescr->descRec are pointers
to allocated memory, and hence can change value (and
stmt->ApplRowDescr->descRec does for sure, witness the call to realloc in one
of your traces).
I don't know how many watch points you can have simultaneously (I seem to be
able to only have one), but what you could do is first determine the value of
stmt in any of the calls to the MonetDB ODBC driver and note that value down.
For instance, you could set a breakpoint in SQLBindCol as you did before.
Then check whether stmt->ApplRowDescr is NULL. If it is, set a watchpoint on
it and continue until it gets assinged a value. If it isn't NULL, or when it
gets assigned a value, delete this watchpoint and set a watchpoint on
stmt->ApplRowDescr->descRec, and if it is not NULL, also on
stmt->ApplRowDescr->descRec[1].sql_desc_indicator_ptr. If it is NULL, continue
and set the latter watchpoint once the value is not NULL.
When stmt->ApplRowDescr->descRec gets realloced, the watchpoint on stmt->ApplRowDescr->descRec[1].sql_desc_indicator_ptr may have to be reset.
In the above, you may have to replace stmt with ((ODBCStmt *) 0x...) where you
fill in the value of stmt you had found.
What I really want to know is in which piece of code does the value of
sql_desc_indicator_ptr (the value you're watching) change from 0x79f978 to
0xf978 (or whatever other value it gets in the new run).
## Comment 14777
Date: 2010-08-25 14:27:43 +0200
From: @skinkie
This happens at a specific document; the 114th document in the system. And I'm currently trying to find a way to get the output trace from 113->114.
## Comment 14778
Date: 2010-08-25 15:02:18 +0200
From: @skinkie
My current hunch;
tCol.m_dContents[0] = '\0';
The m_dContents here is set (also notice the two lines with [0]), it is basically the only place where a variable is set inside the loop. If a char is applied on that memory location. It could inhibbit the behavior that only the first byte are set, instead of all 4 bytes for SQLLEN, generating a 'not null' value.
Trying to figure that out.
## Comment 14938
Date: 2010-09-26 16:48:24 +0200
From: @skinkie
A nice day of debugging showed;
Sphinx was limiting the buffer size of a full document to 1MB. I have a string in my table that exceeds that value (in bytes), which made the buffer size go back to the default 1024bytes, instead of giving an error for example. After I had fixed this bug another issue came up. I'll try to elaborate...
SQLDescribeCol.c:88
/* also see SQLDescribeParam */
if (pnColSize)
*pnColSize = ODBCDisplaySize(rec);
This value is in 'characters on the screen'. Corresponding with LENGTH [1].
The last parameter of SQLBindCol returns the actual StrLen or Ind [2].
Now the million dollar question: if a column description is fetched by DescribeCol, why isn't it possible to get the maximum size in bytes, as would occur in SQLBindCol/SQLFetch? [I consider: "It's not in the standard" not an acceptable reply for an UTF-8 database.] It is obvious that programs that allocate a buffer to store the column, based on the maximum (display) size of the Column Description will fail if the actual size is bigger due to encoding in UTF-8 for example.
With respect to legacy software no program will fail if the maximum size in bytes is used. Opposed to the only 'true' solution in this case: multiplication of the output buffer by 4 because the database administrator knows MonetDB talks UTF-8. I would find it interesting if the ODBC driver could be compiled using --with-columnsize=bytes vs --with-columnsize=displaychars.
[1] <http://msdn.microsoft.com/en-us/library/ms711786(v=VS.85).aspx>
[2] <http://msdn.microsoft.com/en-us/library/ms711010(VS.85).aspx>
## Comment 14939
Date: 2010-09-27 15:56:27 +0200
From: @sjoerdmullender
I understand from your comment that the bug that triggered this report was actually in Sphinx and not in MonetDB, so this report can be closed.
Furthermore, the bug tracker is not the place to ask question, and if you want to suggest a change to MonetDB, then please submit a new bug and mark it as "enhancement".
Having said that, it is not likely that any change will be made that is incompatible with the relevant standard (ODBC in this case). Apart from that, the driver does not have the information you want. The server sends the precision of the type (i.e. 10 when the type is VARCHAR(10)), and that size is a "logical" size, i.e. the number of Unicode code points that can be stored in the value.
If you know or suspect that a value contains non-ASCII characters, you can always multiply the size that you get from SQLDescribeCol with 6 (the maximum number of bytes needed for representing a Unicode code point using the UTF-8 encoding), or you can do two calls to first a call to SQLFetch to get the needed size, then a call to SQLBindCol with an bigger buffer, and finally another call to SQLFetch to get the complete data.
## Comment 14941
Date: 2010-09-27 18:29:13 +0200
From: @skinkie
Thanks for your reply Sjoerd. I've filed a new issue that is close to a PostgreSQL bug reported in the last months.
http://bugs.monetdb.org/show_bug.cgi?id=2677
| ODBC driver fails to return all documents, but is able to provide partial results | https://api.github.com/repos/MonetDB/MonetDB/issues/2660/comments | 0 | 2020-11-30T11:08:42Z | 2024-06-28T13:20:39Z | https://github.com/MonetDB/MonetDB/issues/2660 | 753,383,261 | 2,660 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-21 23:39:15 +0200
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: 11.3.3 (Apr2011-SP1) [obsolete]
CC: @njnes, @elpetrak
Last updated: 2013-01-22 09:29:07 +0100
## Comment 14749
Date: 2010-08-21 23:39:15 +0200
From: @skinkie
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.36 Safari/534.3
Build Identifier:
I'm running:
select * from kvk_extra_nieuw_tmp INTERSECT select * from kvk_extra_nieuw;
That query returns: 677
Afterwards I'm running:
select count(*) from (select * from kvk_extra_nieuw_tmp INTERSECT select * from kvk_extra_nieuw) as x;
+------+
| L5 |
+======+
| 890 |
+------+
1 tuple (151.951ms)
Anyone care to elaborate where the difference might come from?
Reproducible: Always
MonetDB server v5.21.0 (64-bit), based on kernel v1.39.0 (64-bit oids)
Not released
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
Visit http://monetdb.cwi.nl/ for further information
Found 3.9GiB available memory, 2 available cpu cores
Configured for prefix: /opt/monetdb-testing
Libraries:
libpcre: 8.02 2010-03-19 (compiled with 8.02)
openssl: OpenSSL 1.0.0a 1 Jun 2010 (compiled with OpenSSL 1.0.0a 1 Jun 2010)
libxml2: 2.7.7 (compiled with 2.7.7)
Compiled by: skinkie@openkvk (x86_64-unknown-linux-gnu)
Compilation: gcc -Wall -Wextra -fno-strict-aliasing -g -Werror-implicit-function-declaration -Werror -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/x86_64-pc-linux-gnu/bin/ld -IPA -m elf_x86_64
## Comment 14750
Date: 2010-08-21 23:39:36 +0200
From: @skinkie
Created attachment 29
MAL trace of queries
> Attached file: [mal.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2659_mal.txt_29) (text/plain, 44030 bytes)
> Description: MAL trace of queries
## Comment 14751
Date: 2010-08-22 10:27:43 +0200
From: @drstmane
Could you please run both queries single threaded --- i.e., either start mserver5 with "--set gdk_nr_threads=1" or in your client session before running the queries execute "set optimizer='sequential_pipe';" --- and report the results?
If they are the same as reported before (or differently unexpected), could you please attach the traces (TRACE not EXPLAIN) for both queries run single-threaded?
In case the single threaded case works fine and as expected, could you please attach the traces (TRACE not EXPLAIN) for both queries run multi-threaded?
Thanks!
## Comment 14752
Date: 2010-08-22 17:29:45 +0200
From: @skinkie
Created attachment 30
EXPLAIN trace
(In reply to comment 2)
> Could you please run both queries single threaded --- i.e., either start
> mserver5 with "--set gdk_nr_threads=1" or in your client session before running
> the queries execute "set optimizer='sequential_pipe';" --- and report the
> results?
Traced now with gdk_nr_threads=1 and readonly. Same results. Please that although the queries are the same the content is different.
I do wonder if this has anything to do with the distinct operation occuring in the right hand side of the intersect.
> Attached file: [trace2.txt.gz](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2659_trace2.txt.gz_30) (application/x-gzip, 286709 bytes)
> Description: EXPLAIN trace
## Comment 15137
Date: 2010-10-28 13:31:51 +0200
From: @grobian
intersect all doesn't change a single thing here, does it?
## Comment 15287
Date: 2010-12-05 14:10:03 +0100
From: @njnes
could you supply the data and dml statements?
## Comment 15682
Date: 2011-03-28 17:36:30 +0200
From: @sjoerdmullender
The Mar2011 version has been released.
## Comment 16361
Date: 2011-09-30 11:30:35 +0200
From: @sjoerdmullender
See comment 5.
## Comment 18120
Date: 2012-11-27 15:29:31 +0100
From: @skinkie
I can't find back the original database, and neither with a simple example or real data I can make it break using Oct2012.
But with a very elaborative example I am able to break this.
select postcode, plaats from kvk intersect select postcode, gemeentenaam from adres;
397259 vs 231241
I'll contact Niels for uploading the data.
## Comment 18129
Date: 2012-11-27 15:46:05 +0100
From: @elpetrak
I added a test for this case. It works fine for me. (the data is included in the test)
## Comment 18163
Date: 2012-11-27 19:13:14 +0100
From: @njnes
optimizer reduced the intersect in case of the count to only work on postcodes. This will give the wrong count.
Fixed by dce optimizer fixes. Test can be changed in to 'plan' output.
## Comment 18205
Date: 2012-11-28 13:45:47 +0100
From: @elpetrak
Changeset [c2bd663db4ba](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c2bd663db4ba) made by Eleni Petraki <petraki@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c2bd663db4ba](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c2bd663db4ba)
Changeset description:
Bug #2659: tuples INTERSECT vs count (... INTERSECT ...) differs.
## Comment 18363
Date: 2013-01-22 09:29:07 +0100
From: @sjoerdmullender
Oct2012-SP3 has been released.
| tuples INTERSECT vs count (... INTERSECT ...) differs | https://api.github.com/repos/MonetDB/MonetDB/issues/2659/comments | 0 | 2020-11-30T11:08:39Z | 2024-06-27T11:49:21Z | https://github.com/MonetDB/MonetDB/issues/2659 | 753,383,219 | 2,659 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-18 14:57:18 +0200
From: @swingbit
To: GDK devs <<bugs-common>>
Version: 1.38.3 (Jun2010-SP1) [obsolete]
Last updated: 2010-08-30 09:17:58 +0200
## Comment 14723
Date: 2010-08-18 14:57:18 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.11) Gecko/20100723 Fedora/3.5.11-1.fc12 Firefox/3.5.11 GTB7.1
Build Identifier:
I found this problem using XQuery. However, it is my belief it was caused by some changes in gdk, as I didn't find any related change in pathfinder code since Feb2010 (which does NOT show this problem).
The problem is:
Have an XQuery server running, read a simple document (in attachment), kill the server. It will then hang for about a minute before actually returning to the prompt.
gdb shows that it is busy in BBPExit(), and it's using full cpu.
Remarks:
- It was not the case in Feb2010
- Closing Mserver with a Ctrl-D from its prompt does NOT show this problem
Reproducible: Always
### Steps to Reproduce:
1. store the attachment as: /tmp/NYT_doclist.xml
2. (shell 1): $ Mserver --dbinit="module(pathfinder);"
3. (shell 2): $ echo 'count(doc("/tmp/NYT_doclist.xml")//doc)' | mclient -lxq
4. (shell 2): $ killall Mserver (or kill the one aboe if you have more running)
### Actual Results:
Mserver won't shut down for about 1 minute
### Expected Results:
Mserver should return to prompt in no time
MonetDB server v4.38.4 (64-bit), based on kernel v1.38.4 (64-bit oids)
Not released
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
Visit http://monetdb.cwi.nl/ for further information
Configured for prefix: /ufs/roberto/lhm_code/IndexCenter/MonetDB/MonetDB.Spinque_Jun2010/MonetDB
Libraries:
libpcre: 7.8 2008-09-05 (compiled with 7.8)
openssl: OpenSSL 1.0.0a 1 Jun 2010 (compiled with OpenSSL 1.0.0a-fips 1 Jun 2010)
Compiled by: roberto@skadi.ins.cwi.nl
Compilation: gcc -Wall -Wextra -fno-strict-aliasing -g -Werror-implicit-function-declaration -Werror -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/bin/ld -IPA -m elf_x86_64
## Comment 14724
Date: 2010-08-18 15:03:08 +0200
From: @swingbit
UPDATE:
the xml file used in that query is too large to be uploaded as an attachment to this bug.
It is available at the following location:
/net/skadi/export/scratch0/roberto/NYT_doclist.xml
## Comment 14728
Date: 2010-08-19 13:16:18 +0200
From: @sjoerdmullender
I was able to catch the problem in the debugger once. The problem was a sharecnt which was 1 and wasn't getting reduced since there were in fact no BATs that were a view on this BAT (one of the conditions for BBPexit to finish). The BAT that had this missing view had a name: 1000000000_rid_size, so that might give some hint as to where this problem could lie (pre_size view on the BAT?)
The real problem of course is that Mserver (and mserver5 for that matter) just cannot cope well with exiting while in the middle of a query. In order to fix that we'd have to complete overhaul the system.
## Comment 14729
Date: 2010-08-19 13:22:35 +0200
From: @swingbit
I wasn't very clear about this: I am not killing the server while the query is running, but well after the result has been returned.
A side question: is it expected that Mserver calls BBPexit only upon a SIGTERM and NOT upon a normal exit from the prompt? mserver5 calls BBPexit in both cases.
## Comment 14730
Date: 2010-08-19 14:45:07 +0200
From: @sjoerdmullender
Changeset [f5c1caf71d65](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f5c1caf71d65) 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=f5c1caf71d65](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f5c1caf71d65)
Changeset description:
Fix for bug #2658.
When a logical view is destroyed, it should also lower its parent's share count.
## Comment 14731
Date: 2010-08-19 16:27:33 +0200
From: @swingbit
Fix works, closing the bug report.
## Comment 14732
Date: 2010-08-19 16:33:16 +0200
From: @sjoerdmullender
The fix still has to be released...
## Comment 14787
Date: 2010-08-30 09:17:58 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
| Mserver busy in BBPExit() for more than 1 minute upon Mserver kill | https://api.github.com/repos/MonetDB/MonetDB/issues/2658/comments | 0 | 2020-11-30T11:08:36Z | 2024-06-27T11:49:20Z | https://github.com/MonetDB/MonetDB/issues/2658 | 753,383,184 | 2,658 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-16 13:19:29 +0200
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: 2.38.3 (Jun2010-SP1) [obsolete]
Last updated: 2010-08-30 09:18:28 +0200
## Comment 14698
Date: 2010-08-16 13:19:29 +0200
From: @drstmane
Since
http://dev.monetdb.org/hg/MonetDB/rev/957466674744
test sql/src/test/Skyserver/Tests/Skyserver_v6.SQL.py
fails with
mserver5: /export/scratch1/monet/monet.GNU.64.64.d.1.12748/sql/src/common/sql_mem.mx:53: sql_ref_dec: Assertion `r->refcnt > 0' failed.
cf.
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/GNU.64.64.d.1-Fedora12/src_test_Skyserver/Skyserver_v6.err.00.html
## Comment 14702
Date: 2010-08-16 23:38:43 +0200
From: @njnes
Changeset [3ebc90fc1bb9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3ebc90fc1bb9) 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=3ebc90fc1bb9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3ebc90fc1bb9)
Changeset description:
fix initialization
fix problem with joins of single value subqueries (fixes Bug #2657)
## Comment 14705
Date: 2010-08-17 08:58:27 +0200
From: @drstmane
Changeset [05a2c577959c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=05a2c577959c) 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=05a2c577959c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=05a2c577959c)
Changeset description:
added changelog message for Niels' fix of bug #2657
## Comment 14706
Date: 2010-08-17 08:59:26 +0200
From: @drstmane
Testing confirms fix.
## Comment 14817
Date: 2010-08-30 09:18:28 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
| test sql/src/test/Skyserver/Tests/Skyserver_v6.SQL.py: sql/src/common/sql_mem.mx:53: sql_ref_dec: Assertion `r->refcnt > 0' failed. | https://api.github.com/repos/MonetDB/MonetDB/issues/2657/comments | 0 | 2020-11-30T11:08:33Z | 2024-06-27T11:49:19Z | https://github.com/MonetDB/MonetDB/issues/2657 | 753,383,161 | 2,657 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-15 18:44:36 +0200
From: Mitja Kleider <<mitja>>
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 5.22.1 (Oct2010) [obsolete]
CC: @mlkersten, @drstmane, @skinkie
Last updated: 2010-10-28 13:30:21 +0200
## Comment 14684
Date: 2010-08-15 18:44:36 +0200
From: Mitja Kleider <<mitja>>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8
Build Identifier:
mserver5 --readonly responds much faster than mserver5 (writing a lot of data while executing the query)
The TRACE is attached to this report.
Reproducible: Always
### Steps to Reproduce:
XML data: http://ftp5.gwdg.de/pub/misc/openstreetmap/download.geofabrik.de/europe.osm.bz2
Parser: http://gitorious.org/osm-poi-tools/monetdb/blobs/raw/master/osmparser/src/osmparser.c
bzcat europe.osm.bz2 | osmparser > import.sql
mclient -d europe < import.sql
One example query is in the TRACE file (attached).
### Actual Results:
Without readonly response takes 25 minutes.
### Expected Results:
With readonly response takes 25 seconds.
hg identify
[45c1f030e31d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=45c1f030e31d) tip
## Comment 14685
Date: 2010-08-15 18:46:16 +0200
From: Mitja Kleider <<mitja>>
Created attachment 24
TRACE of example query
> Attached file: [TRACE](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2656_TRACE_24) (text/plain, 54940 bytes)
> Description: TRACE of example query
## Comment 14687
Date: 2010-08-15 19:09:49 +0200
From: @drstmane
Just as "sanity check":
1)
Do both cases (read-write & read-only) return the same result for this query?
2)
After importing the data and before running the read-write query, did you also try to wait sufficient time (possibly some minutes) to let MonetDB/SQL flush the update logs, or even restart mserver5 to force that flush?
If not could you now please start mserver5 in (default) read-write mode on the loaded database (with the logs flushed during the read-only restart) and report whether the query now runs "slow" or "fast" in read-write mode?
Your traces seem to indicate that most of the time difference between read-write & read-only go into merging in the data from the write-ahead logs ("delta-bats"), that are non-empty after import (most probably) because your import does not only use plan COPY INFO but also update statements (INSERT, UPDATE, DELETE).
In simple words, MonetDB first collects the effects of updates in write-ahead logs for correct & efficient transaction management, and post-pones the merging til there is "idle time" after the transaction commit. A server restart (as e.g., to switch to read-only) forces this merge.
## Comment 14688
Date: 2010-08-15 19:21:56 +0200
From: Mitja Kleider <<mitja>>
1) Yes, the results are the same.
2) In my case INSERT, UPDATE, DELETE happened after the COPY INTO, but mserver5 was restarted several times afterwards. Before running the TRACE no data was changed.
## Comment 14689
Date: 2010-08-15 19:47:33 +0200
From: @mlkersten
Was the system equally loaded? For example, even a running browser (with some
flassh app running) consumes precious memory and CPU resources.
## Comment 14690
Date: 2010-08-15 19:53:28 +0200
From: Mitja Kleider <<mitja>>
There are only three active processes: mserver5, iotop, cherokee-worker.
mserver5 is the only process consuming more than 1% resources (100%-400% CPU, 30% memory).
## Comment 14691
Date: 2010-08-16 10:24:24 +0200
From: @drstmane
I read from the logs that the extra time goes into (a) applying DELETEs (not INSERTs or UPDATEs) from the WAL (delta BATs) and (b) (IMHO consequently) more expensive (IMHO no longer positional) projection join.
Hence, the question is still, why MonetDB has not yet merged these deletes into the base BATs in the read-write case, while it has in the read-only case --- well, has it?
In the read-only case the base BATs seem to be as large as the base BATs in the read-write case *before* the deletes are applied... !??
I also read from your traces, I read that the read-write case returns a result of 139 tuples, while the read-only case returns a result of only 131. How can these be identical?
Are you sure the traces are indeed from query runs that indeed return the identical results for both read-write & read-only?
We need to make sure that we are indeed chasing the correct problem ...
Another question is whether the problem also occurs with the (supposedly) stable Jun2010-SP1 release, or only with the cutting edge no-warranties development version ...
## Comment 14692
Date: 2010-08-16 10:27:14 +0200
From: @drstmane
I cannot reproduce the problem with the lasted development code base
(
$ mserver5 --version
MonetDB server v5.21.0 (64-bit), based on kernel v1.39.0 (64-bit oids)
Not released
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
Visit http://monetdb.cwi.nl/ for further information
Found 63.0GiB available memory, 8 available cpu cores
Configured for prefix: /ufs/manegold/_/scratch0/Monet/HG/default/prefix.--enable-strict_--disable-debug_--enable-optimize_--disable-assert
Libraries:
libpcre: 7.8 2008-09-05 (compiled with 7.8)
openssl: OpenSSL 1.0.0a 1 Jun 2010 (compiled with OpenSSL 1.0.0a-fips 1 Jun 2010)
libxml2: 2.7.6 (compiled with 2.7.6)
Compiled by: manegold@rig.ins.cwi.nl (x86_64-unknown-linux-gnu)
Compilation: gcc -O2 -Wall -Wextra -fno-strict-aliasing -O6 -fomit-frame-pointer -finline-functions -falign-loops=4 -falign-jumps=4 -falign-functions=4 -fexpensive-optimizations -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -ftree-vectorize -Werror-implicit-function-declaration -Werror -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/bin/ld -IPA -m elf_x86_64
)
as the server crashes (segfault) during import.sql when executing
ALTER SEQUENCE s_nodes RESTART WITH (SELECT MAX(id) FROM nodes);
No time to investigate this further right now.
## Comment 14693
Date: 2010-08-16 10:37:47 +0200
From: @drstmane
I cannot reproduce the problem with the latest Jun2010 code base
(
$ mserver5 --version
MonetDB server v5.20.4 (64-bit), based on kernel v1.38.4 (64-bit oids)
Not released
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
Visit http://monetdb.cwi.nl/ for further information
Found 63.0GiB available memory, 8 available cpu cores
Configured for prefix: /ufs/manegold/_/scratch0/Monet/HG/Jun2010/prefix.--enable-strict_--disable-debug_--enable-optimize_--disable-assert
Libraries:
libpcre: 7.8 2008-09-05 (compiled with 7.8)
openssl: OpenSSL 1.0.0a 1 Jun 2010 (compiled with OpenSSL 1.0.0a-fips 1 Jun 2010)
libxml2: 2.7.6 (compiled with 2.7.6)
Compiled by: manegold@rig.ins.cwi.nl (x86_64-unknown-linux-gnu)
Compilation: gcc -O2 -Wall -Wextra -fno-strict-aliasing -O6 -fomit-frame-pointer -finline-functions -falign-loops=4 -falign-jumps=4 -falign-functions=4 -fexpensive-optimizations -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -ftree-vectorize -Werror-implicit-function-declaration -Werror -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/bin/ld -IPA -m elf_x86_64
)
either.
First, the last transaction of import.sql to add constraints fails as the data obviously does not fulfill the requested UNIQUE constraints:
QUERY = ALTER TABLE node_tags ADD CONSTRAINT pk_node_tags UNIQUE (node, k, v);
ERROR = !SQLException:assert:UPDATE: UNIQUE constraint 'node_tags.pk_node_tags' violated
sql>select freq, count(*) from ( select count(*) as freq from node_tags group by node, k, v ) as t group by freq;
+------+----------+
| freq | L7 |
+======+==========+
| 1 | 62520662 |
| 2 | 2101 |
| 3 | 80 |
| 4 | 20 |
| 7 | 3 |
| 6 | 12 |
| 5 | 3 |
| 31 | 1 |
| 16 | 1 |
+------+----------+
9 tuples
QUERY = ALTER TABLE way_tags ADD CONSTRAINT pk_way_tags UNIQUE (way, k, v);
ERROR = !SQLException:assert:UPDATE: UNIQUE constraint 'way_tags.pk_way_tags' violated
sql>select freq, count(*) from ( select count(*) as freq from way_tags group by way, k, v ) as t group by freq;
+------+----------+
| freq | L11 |
+======+==========+
| 1 | 68082146 |
| 2 | 4680 |
| 6 | 24 |
| 11 | 7 |
| 8 | 10 |
| 4 | 33 |
| 3 | 121 |
| 5 | 17 |
| 7 | 7 |
+------+----------+
9 tuples
QUERY = ALTER TABLE relation_tags ADD CONSTRAINT pk_relation_tags UNIQUE (relation, k, v);
ERROR = !SQLException:assert:UPDATE: UNIQUE constraint 'relation_tags.pk_relation_tags' violated
sql>select freq, count(*) from ( select count(*) as freq from relation_tags group by relation, k, v ) as t group by freq;
+------+---------+
| freq | L13 |
+======+=========+
| 1 | 2319827 |
| 2 | 22 |
| 3 | 1 |
+------+---------+
3 tuples
Without the primary and foreign keys, the query, i.e.,
SELECT way, long, lat FROM way_nds, nodes WHERE nodes.id=to_node AND way IN (30186501,36769789,36858352,36858355,36901113,36901264,36901267,36973290,36985364,36985382,36985385,37079290,37116122,37376353,39814633,42461324,42465367,48597118,50223575) ORDER BY idx ASC;
takes about 60 seconds to run in the still running server right after the load (import.sql) --- no delta BATs need to be merged in during query processing (i.e., all delta BATs are empty).
After restarting the server again in read-write mode, the query still takes 60 seconds.
After restarting the server in read-only mode, the query also takes 60 seconds.
I then added the primary and foreign keys by hand (i.e., skipping the failing UNIQUE constraints).
The query (obviously still with empty delta BATs) takes a mere 9 seconds, both in read-write and read-only mode.
In all cases the query returned the same result consisting of 131 tuples (as in your read-only case).
## Comment 14694
Date: 2010-08-16 10:41:19 +0200
From: @drstmane
For the records:
Jun2010:
$ hg ident
ffa569258bad+ (Jun2010)
default:
$ hg ident
[bdf37a61ba3a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bdf37a61ba3a) tip
## Comment 14696
Date: 2010-08-16 11:45:53 +0200
From: Mitja Kleider <<mitja>>
I'm sorry, I forgot to mention that the original data must be filtered to fulfil the UNIQUE constraints.
for i in *.csv; do
sort -u $i > $i-sorted
mv $i-sorted $i
done
Regarding the different number of tuples: the actual data has the same number of tuples (did not copy that part), the different number is just the line-count of TRACE results.
I wonder why the DELETE etc is happening, as far as I understood the explanations, it should not happen for a freshly started mserver.
The second trace was executed directly after the first one, why are there delta bats at all?
I will check Jun2010.
## Comment 14697
Date: 2010-08-16 12:03:35 +0200
From: @drstmane
I do not refer to the tuple counts that list the number of rows in your trace output; I refer to the actul number of tuples in the BATs in your traces:
read-write:
| 54 | _138<tmp_1600>[139] := algebra.leftjoin(_219=<tmp_1607>[139],_137=nil);
^^^
| 92 | _129<tmp_1575>[139] := algebra.leftjoin(_219=nil,_128=nil);
^^^
| 37431264 | _114<tmp_1647>[340527209] := algebra.kdifference(_111=nil,_113=nil);
| 38240918 | _115<tmp_1576>[139] := algebra.leftjoinPath(_99=<tmpr_1652>[139],_52=nil,_114=nil);
| 64 | _116<tmpr_1442>[139] := algebra.sortTail(_115=nil);
| 738606 | _117<tmp_1647>[139] := algebra.leftjoin(_99=nil,_68=nil);
^^^
| 76412349 | barrier _223 := language.dataflow();
| 15 | _139 := sql.resultSet(3,1,_116=nil);
| 9 | sql.rsColumn(_139=3,"sys.way_nds","way","int",32,0,_117=nil);
| 6 | sql.rsColumn(_139=3,"sys.nodes","long","decimal",10,7,_129=nil);
| 4 | sql.rsColumn(_139=3,"sys.nodes","lat","decimal",10,7,_138=nil);
read-only:
| 9142 | _86<tmp_1532>[131] := algebra.leftjoin(_134=<tmp_1523>[131],_84=nil:bat[:oid,:lng]);
^^^
| 9685 | _76<tmp_1525>[131] := algebra.leftjoin(_68=nil,_37=nil);
^^^
| 9738 | _83<tmp_1534>[131] := algebra.leftjoin(_134=nil,_80=nil:bat[:oid,:lng]);
^^^
| 4602213 | barrier _138 := language.dataflow();
| 12 | _87 := sql.resultSet(3,1,_75=nil);
| 9 | sql.rsColumn(_87=5,"sys.way_nds","way","int",32,0,_76=nil);
| 4 | sql.rsColumn(_87=5,"sys.nodes","long","decimal",10,7,_83=nil);
| 3 | sql.rsColumn(_87=5,"sys.nodes","lat","decimal",10,7,_86=nil);
## Comment 14726
Date: 2010-08-18 20:01:33 +0200
From: Mitja Kleider <<mitja>>
Created attachment 28
TRACE of example query for Jun2010-SP1
I can not reproduce the 139 tuples, just 131.
Attaching a TRACE for Jun2010 in readwrite mode, response time in both readonly and readwrite are about 10 seconds as in comment 8.
Seems like it only occurred in the mercurial version I was using. I will try to reproduce it in the latest head.
> Attached file: [TRACE-Jun2010](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2656_TRACE-Jun2010_28) (text/plain, 157247 bytes)
> Description: TRACE of example query for Jun2010-SP1
## Comment 15136
Date: 2010-10-28 13:30:21 +0200
From: @grobian
any news on whether it is reproducable with the latest sources?
| readonly needs two orders of magnitude less ticks | https://api.github.com/repos/MonetDB/MonetDB/issues/2656/comments | 0 | 2020-11-30T11:08:29Z | 2024-06-27T11:49:18Z | https://github.com/MonetDB/MonetDB/issues/2656 | 753,383,114 | 2,656 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-15 14:46:01 +0200
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: 2.40.1 (Oct2010) [obsolete]
CC: @romulogoncalves
Last updated: 2012-11-27 16:31:11 +0100
## Comment 14683
Date: 2010-08-15 14:46:01 +0200
From: @skinkie
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.55 Safari/533.4
Build Identifier:
mserver5: ../../../src/server/rel_select.mx:712: rel_project_add_exp: Assertion `(rel->op == op_project || rel->op == op_groupby || (rel->op == op_union || rel-
>op == op_inter || rel->op == op_except))' failed.
After:
update kvk set website = (select distinct website from kvk_extra_nieuw WHERE kvk.kvk = kvk_extra_nieuw.kvk and kvk_extra_nieuw.website is not null);
CREATE TABLE "sys"."kvk" (
"id" INTEGER NOT NULL DEFAULT next value for "sys"."seq_5700",
"kvk" BIGINT,
"bedrijfsnaam" VARCHAR(256),
"adres" VARCHAR(256),
"postcode" VARCHAR(10),
"plaats" VARCHAR(32),
"type" VARCHAR(14),
"kvks" INTEGER,
"sub" INTEGER,
"bedrijfsnaam_size" SMALLINT,
"adres_size" SMALLINT,
"website" VARCHAR(255),
CONSTRAINT "kvk_id_pkey" PRIMARY KEY ("id")
);
CREATE TABLE "sys"."kvk_extra_nieuw" (
"kvk" BIGINT,
"bedrijfsnaam" VARCHAR(256),
"straat" VARCHAR(256),
"nummer" INTEGER,
"toevoeging" VARCHAR(16),
"postcode" VARCHAR(10),
"plaats" VARCHAR(32),
"website" VARCHAR(128),
"type" VARCHAR(14),
"status" VARCHAR(64),
"kvks" INTEGER,
"sub" INTEGER
);
Reproducible: Always
MonetDB server v5.21.0 (64-bit), based on kernel v1.39.0 (64-bit oids)
Not released
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
Visit http://monetdb.cwi.nl/ for further information
Found 3.9GiB available memory, 2 available cpu cores
Configured for prefix: /opt/monetdb-testing
Libraries:
libpcre: 8.02 2010-03-19 (compiled with 8.02)
openssl: OpenSSL 0.9.8o 01 Jun 2010 (compiled with OpenSSL 0.9.8o 01 Jun 2010)
libxml2: 2.7.7 (compiled with 2.7.7)
Compiled by: skinkie@openkvk (x86_64-unknown-linux-gnu)
Compilation: gcc -Wall -Wextra -fno-strict-aliasing -g -Werror-implicit-function-declaration -Werror -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/x86_64-pc-linux-gnu/bin/ld -IPA -m elf_x86_64
Including: http://bugs.monetdb.org/show_bug.cgi?id=2604c7
## Comment 15135
Date: 2010-10-28 13:27:55 +0200
From: @grobian
does this still happen with Oct2010?
## Comment 18149
Date: 2012-11-27 16:31:11 +0100
From: @romulogoncalves
Test add in the sql module under the directory BugTracker_2012 with the name:
update_crash.Bug-2655
The stable out and err were also added.
The crash does not happen anymore and the test was extended to test the update statement. The output is correct, therefore, the bug will be closed.
| mserver5: ../../../src/server/rel_select.mx:712: rel_project_add_exp: Assertion `(rel->op == op_project || rel->op == op_groupby || (rel->op == op_union || rel->op == op_inter || rel->op == op_except))' failed. | https://api.github.com/repos/MonetDB/MonetDB/issues/2655/comments | 0 | 2020-11-30T11:08:26Z | 2024-06-27T11:49:17Z | https://github.com/MonetDB/MonetDB/issues/2655 | 753,383,074 | 2,655 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-13 14:11:17 +0200
From: @sjoerdmullender
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 5.20.3 (Jun2010-SP1) [obsolete]
CC: @drstmane
Last updated: 2010-08-30 09:18:27 +0200
## Comment 14678
Date: 2010-08-13 14:11:17 +0200
From: @sjoerdmullender
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100723 Fedora/3.5.11-1.fc12 Firefox/3.5.11
Build Identifier:
The following query (one of the queries msqldump does) takes an inordinate amount of time. The explain output shows why: lots and lots (and lots) of joins and extremely large mat.packs.
The environment is my Fedora 12 desktop with a mserver compiled for 32 bits.
The query is:
WITH "tf_xYzzY" AS (SELECT "s"."name" AS "sname", "f"."name" AS "name", "f"."id" AS "id", "f"."func" AS "func" FROM "sys"."schemas" "s", "sys"."functions" "f" WHERE "f"."sql" = TRUE AND "s"."id" = "f"."schema_id" UNION SELECT "s"."name" AS "sname", "t"."name" AS "name", "t"."id" AS "id", CAST(NULL AS VARCHAR(8196)) AS "func" FROM "sys"."schemas" "s", "sys"."_tables" "t" WHERE "t"."type" BETWEEN 0 AND 1 AND "t"."system" = FALSE AND "s"."id" = "t"."schema_id" UNION SELECT "s"."name" AS "sname", "tr"."name" AS "name", "tr"."id" AS "id", "tr"."statement" AS "func" FROM "sys"."triggers" "tr", "sys"."schemas" "s", "sys"."_tables" "t" WHERE "s"."id" = "t"."schema_id" AND "t"."id" = "tr"."table_id") SELECT * FROM "tf_xYzzY" ORDER BY "tf_xYzzY"."id";
The explain output is 5956 lines, which seems excessive.
Reproducible: Always
### Steps to Reproduce:
1.Start mserver5 with empty database
2.Feed it the above-mentioned query (with mclient timer in effect)
3.wait
### Actual Results:
Timer 10041.625 msec 0 rows
### Expected Results:
Timer 24.716 msec 0 rows
When run against a 64 bit server, the explain output is only 530 lines and the query runs fast.
## Comment 14679
Date: 2010-08-13 14:24:18 +0200
From: @drstmane
This is possibly ((most) probably related to bug #2644
"multi-threaded execution instable on 32-bit systems & 64-bit systems with 32-bit OIDs"
## Comment 14681
Date: 2010-08-13 15:42:35 +0200
From: @sjoerdmullender
In fact, the problem is very likely a discrepancy between various parts of the code, some of which use type oid and others type lng for the same Var (i.e. val.lval vs. val.oval).
We located the code already.
Niels is working on fixing it.
valgrind is your friend, but it helps running it on both 64 and 32 bit architectures. ;-)
## Comment 14682
Date: 2010-08-15 11:32:35 +0200
From: @drstmane
Sjoerd, Niels,
thank you very much for investigating this one!
May I assume that after "rowsProp" it is now (related to) "[ht][lu]bProp"?
If so, instead of "just" consistently using oid (==BUN) (oval) (or wrd (wval) as with rowsProp), we could also consider adding a "BUN Bval" or "BUN buval" member to the ValRecord.val union ...
Stefan
## Comment 14686
Date: 2010-08-15 18:47:11 +0200
From: @drstmane
A
sed -i -e 's|lval|oval|g' -e 's|(lng)oid_nil|oid_nil|g' MonetDB5/src/optimizer/opt_mergetable.mx
to make opt_mergetable treat "[ht][lu]bProp" as oid (oval) --- as in all other places in the MonetDB code base --- indeed seems to solve the problems reported here and (most probably) also those reported in bug #2644.
For now, I refrain from checking this in to avoid conflicts with Niels, who is / might be busy with fixing the same problem(s).
## Comment 14695
Date: 2010-08-16 11:21:46 +0200
From: @drstmane
Most probably fixed by
http://dev.monetdb.org/hg/MonetDB/rev/b17308d04b57
Verification & test pending.
## Comment 14721
Date: 2010-08-18 10:09:48 +0200
From: @sjoerdmullender
(In reply to comment 5)
> Verification & test pending.
Given that 300+ tests (all on 32-bit systems or with 32 bit OIDs) improved after this fix, I'm not so sure we need a separate test.
## Comment 14722
Date: 2010-08-18 10:14:30 +0200
From: @drstmane
I agree.
Manual testing has verified the correlation of this problem with the already existing tests.
Closing.
## Comment 14814
Date: 2010-08-30 09:18:27 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
| extremely slow query | https://api.github.com/repos/MonetDB/MonetDB/issues/2654/comments | 0 | 2020-11-30T11:08:22Z | 2024-06-27T11:49:16Z | https://github.com/MonetDB/MonetDB/issues/2654 | 753,383,026 | 2,654 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-13 00:38:53 +0200
From: Mitja Kleider <<mitja>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes, @skinkie
Last updated: 2010-08-30 09:18:04 +0200
## Comment 14660
Date: 2010-08-13 00:38:53 +0200
From: Mitja Kleider <<mitja>>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8
Build Identifier:
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /opt/monetdb/bin/mserver5...done.
(gdb) run --dbname=europe
Starting program: /opt/monetdb/bin/mserver5 --dbname=europe
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffee59f910 (LWP 13318)]
MonetDB server v5.21.0, based on kernel v1.39.0
Not released
Serving database 'europe', using 4 threads
Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked
Found 24.924 GiB available main-memory.
Copyright (c) 1993-July 2008 CWI.
Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
Visit http://monetdb.cwi.nl/ for further information
warning: your vault key is too short (2), enlarge your vault key!
[New Thread 0x7fffe2aa5910 (LWP 13319)]
Listening for connection requests on mapi:monetdb://127.0.0.1:50000/
MonetDB/SQL module v2.39.0 loaded
[New Thread 0x7fffe28a4910 (LWP 13320)]
MonetDB/GIS module v0.19.0 loaded
>[New Thread 0x7fffe26a3910 (LWP 13322)]
[New Thread 0x7fffe24a2910 (LWP 13323)]
[New Thread 0x7fffe22a1910 (LWP 13324)]
[New Thread 0x7fffe20a0910 (LWP 13325)]
[New Thread 0x7fffe1e9f910 (LWP 13326)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe26a3910 (LWP 13322)]
0x00007fffe3f5f978 in mvc_bind_table (m=0x0, s=0xefec68, tname=0xb38a18 "_tables") at ../../../src/server/sql_mvc.mx:847
847 sql_column *l = m->last;
(gdb) bt
0 0x00007fffe3f5f978 in mvc_bind_table (m=0x0, s=0xefec68, tname=0xb38a18 "_tables") at ../../../src/server/sql_mvc.mx:847
1 0x00007fffe3f26e0d in SQLgetStatistics (cntxt=0x605878, m=0x139c758, mb=0xfd5e38) at ../../../../src/backends/monet5/sql_optimizer.mx:375
2 0x00007fffe3f2810d in addQueryToCache (c=0x605878) at ../../../../src/backends/monet5/sql_optimizer.mx:685
3 0x00007fffe3f258be in backend_dumpproc (be=0xee4448, c=0x605878, cq=0x98f9a8, s=0xdd6098) at ../../../../src/backends/monet5/sql_gencode.mx:2181
4 0x00007fffe3f1af7b in SQLparser (c=0x605878) at ../../../../src/backends/monet5/sql_scenario.mx:1310
5 0x00007ffff7b089f6 in runPhase (c=0x605878, phase=1) at ../../../src/mal/mal_scenario.mx:604
6 0x00007ffff7b08b2e in runScenarioBody (c=0x605878) at ../../../src/mal/mal_scenario.mx:646
7 0x00007ffff7b08db5 in runScenario (c=0x605878) at ../../../src/mal/mal_scenario.mx:682
8 0x00007ffff7abc3ac in MSserveClient (dummy=0x605878) at ../../../src/mal/mal_session.mx:473
9 0x00007ffff5799644 in start_thread () from /lib/libpthread.so.0
10 0x00007ffff48bfbfd in clone () from /lib/libc.so.6
11 0x0000000000000000 in ?? ()
(gdb)
Reproducible: Always
### Steps to Reproduce:
\d in mclient on empty database
## Comment 14665
Date: 2010-08-13 00:43:53 +0200
From: @skinkie
I was reading sql_optimizer.mx:335
sql_schema *s = mvc_bind_schema(m, sname);
mvc *m = NULL;
ifndef NDEBUG
str msg = getContext(cntxt,mb, &m, NULL);
endif
BAT *b;
m was already declared as function argument, so m here becomes local. Is the idea here in fact to introduce a new mvc? Its pretty obvious that m=NULL m->last fails.
## Comment 14667
Date: 2010-08-13 01:00:04 +0200
From: @njnes
fixed by removing not needed code (as indicated by stefan)
## Comment 14738
Date: 2010-08-19 18:06:01 +0200
From: @njnes
Changeset [10dde6a52182](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=10dde6a52182) 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=10dde6a52182](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=10dde6a52182)
Changeset description:
fix crash in optimizer. Fixes bug #2653
## Comment 14803
Date: 2010-08-30 09:18:04 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
| segfault sql_mvc.mx:847 | https://api.github.com/repos/MonetDB/MonetDB/issues/2653/comments | 0 | 2020-11-30T11:08:19Z | 2024-06-27T11:49:15Z | https://github.com/MonetDB/MonetDB/issues/2653 | 753,382,985 | 2,653 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-12 16:16:53 +0200
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: 2.38.3 (Jun2010-SP1) [obsolete]
CC: @njnes
Last updated: 2010-08-30 09:18:29 +0200
## Comment 14649
Date: 2010-08-12 16:16:53 +0200
From: @skinkie
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4
Build Identifier:
I am having an issue that I couldn't yet reproduce with a simple query. I stumbled upon this issue, it is not really a problem for me, but I do consider this a bug. I would expect that all fields from the aliased query would also be present. I currently do not see them:
sql>select * from (select naam, vestigingsplaats, beschikking, einddatum, intrekking from anbinew except select naam, vestigingsplaats, beschikking, einddatum, intrekking from anbikvk2) as x, kvk where naam = UPPER(bedrijfsnaam) and kvks not in (select kvk from anbikvk2) limit 10;
+--------+-------------+-----------------------+-------------------------+----------+-----------------+----------------+---------+------+--------------+------------+
| id | kvk | bedrijfsnaam | adres | postcode | plaats | type | kvks | sub | bedrijfsnaam | adres_size |
: : : : : : : : : : _size : :
+========+=============+=======================+=========================+==========+=================+================+=========+======+==============+============+
sql>\d anbinew
CREATE TABLE "sys"."anbinew" (
"naam" VARCHAR(128),
"vestigingsplaats" VARCHAR(64),
"beschikking" DATE,
"einddatum" DATE,
"intrekking" DATE
);
sql>\d anbikvk2
CREATE TABLE "sys"."anbikvk2" (
"naam" VARCHAR(128),
"vestigingsplaats" VARCHAR(32),
"beschikking" DATE,
"einddatum" DATE,
"intrekking" DATE,
"kvks" INTEGER
);
sql>\d kvk
CREATE TABLE "sys"."kvk" (
"id" INTEGER NOT NULL DEFAULT next value for "sys"."seq_5700",
"kvk" BIGINT,
"bedrijfsnaam" VARCHAR(256),
"adres" VARCHAR(256),
"postcode" VARCHAR(10),
"plaats" VARCHAR(32),
"type" VARCHAR(14),
"kvks" INTEGER,
"sub" INTEGER,
"bedrijfsnaam_size" SMALLINT,
"adres_size" SMALLINT,
CONSTRAINT "kvk_id_pkey" PRIMARY KEY ("id")
);
You see, the above shows that only the kvk table is actually shown.
Reproducible: Always
MonetDB server v5.21.0 (64-bit), based on kernel v1.39.0 (64-bit oids)
Not released
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
Visit http://monetdb.cwi.nl/ for further information
Found 3.9GiB available memory, 2 available cpu cores
Configured for prefix: /opt/monetdb-testing
Libraries:
libpcre: 8.02 2010-03-19 (compiled with 8.02)
openssl: OpenSSL 0.9.8o 01 Jun 2010 (compiled with OpenSSL 0.9.8o 01 Jun 2010)
libxml2: 2.7.7 (compiled with 2.7.7)
Compiled by: skinkie@openkvk (x86_64-unknown-linux-gnu)
Compilation: gcc -Wall -Wextra -fno-strict-aliasing -g -Werror-implicit-function-declaration -Werror -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/x86_64-pc-linux-gnu/bin/ld -IPA -m elf_x86_64
## Comment 14659
Date: 2010-08-12 23:35:10 +0200
From: @njnes
added test in_query_missing_columns.Bug-2652.sql
## Comment 14661
Date: 2010-08-13 00:38:55 +0200
From: @njnes
Changeset [014f81caf1ca](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=014f81caf1ca) 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=014f81caf1ca](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=014f81caf1ca)
Changeset description:
fixed bug #2652
Fixed problem in handleing in query
## Comment 14663
Date: 2010-08-13 00:38:56 +0200
From: @njnes
Changeset [53b8e1dd76e8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=53b8e1dd76e8) 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=53b8e1dd76e8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=53b8e1dd76e8)
Changeset description:
fixed bugs 2651 and 2652
fixed problems in DCE optimizer
and IN handleing
## Comment 14819
Date: 2010-08-30 09:18:29 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
| Select * from aliased subquery join doesn't return all columns | https://api.github.com/repos/MonetDB/MonetDB/issues/2652/comments | 0 | 2020-11-30T11:08:16Z | 2024-06-27T11:49:14Z | https://github.com/MonetDB/MonetDB/issues/2652 | 753,382,946 | 2,652 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-12 14:45:30 +0200
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: 2.38.3 (Jun2010-SP1) [obsolete]
CC: @njnes
Last updated: 2010-08-30 09:18:05 +0200
## Comment 14648
Date: 2010-08-12 14:45:30 +0200
From: @skinkie
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4
Build Identifier:
Latest head server output:
MonetDB/SQL module v2.39.0 loaded
>could not find kvk.kvk
anbinew.naam
anbinew.vestigingsplaats
anbinew.beschikking
anbinew.einddatum
anbinew.intrekking
anbinew.%TID%
kvk.id
kvk.bedrijfsnaam
kvk.plaats
kvk.kvks
kvk.%TID%
kvk.kvk_id_pkey
anbikvk2.naam
anbikvk2.%TID%
anbinew.naam
anbinew.%TID%
kvk.kvks
kvk.%TID%
mserver5: ../../../src/server/rel_bin.mx:1571: rel2bin_project: Assertion `0' failed.
sql>select naam, vestigingsplaats, beschikking, einddatum, intrekking, kvks from anbinew, kvk where lower(naam) = lower(bedrijfsnaam) and lower(plaats) = lower(vestigingsplaats) and kvks not in (select kvk from anbikvk2);
MAPI = monetdb@localhost:60001
ACTION= read_line
QUERY = select naam, vestigingsplaats, beschikking, einddatum, intrekking, kvks from anbinew, kvk where lower(naam) = lower(bedrijfsnaam) and lower(plaats) = lower(vestigingsplaats) and kvks not in (select kvk from anbikvk2);
ERROR = !Connection terminated
CREATE TABLE "sys"."anbikvk2" (
"naam" varchar(128),
"vestigingsplaats" varchar(32),
"beschikking" date,
"einddatum" date,
"intrekking" date,
"kvks" int
);
CREATE TABLE "sys"."anbinew" (
"naam" varchar(128),
"vestigingsplaats" varchar(64),
"beschikking" date,
"einddatum" date,
"intrekking" date
);
CREATE TABLE "sys"."kvk" (
"id" int NOT NULL DEFAULT next value for "sys"."seq_5700",
"kvk" bigint,
"bedrijfsnaam" varchar(256),
"adres" varchar(256),
"postcode" varchar(10),
"plaats" varchar(32),
"type" varchar(14),
"kvks" int,
"sub" int,
"bedrijfsnaam_size" smallint,
"adres_size" smallint,
CONSTRAINT "kvk_id_pkey" PRIMARY KEY ("id")
);
Obviously I know what is wrong here, the subquery kvk does not exist. It should be kvks. But I didn't know such things are asserting now...
Reproducible: Always
MonetDB server v5.21.0 (64-bit), based on kernel v1.39.0 (64-bit oids)
Not released
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
Visit http://monetdb.cwi.nl/ for further information
Found 3.9GiB available memory, 2 available cpu cores
Configured for prefix: /opt/monetdb-testing
Libraries:
libpcre: 8.02 2010-03-19 (compiled with 8.02)
openssl: OpenSSL 0.9.8o 01 Jun 2010 (compiled with OpenSSL 0.9.8o 01 Jun 2010)
libxml2: 2.7.7 (compiled with 2.7.7)
Compiled by: skinkie@openkvk (x86_64-unknown-linux-gnu)
Compilation: gcc -Wall -Wextra -fno-strict-aliasing -g -Werror-implicit-function-declaration -Werror -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/x86_64-pc-linux-gnu/bin/ld -IPA -m elf_x86_64
## Comment 14662
Date: 2010-08-13 00:38:56 +0200
From: @njnes
Changeset [53b8e1dd76e8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=53b8e1dd76e8) 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=53b8e1dd76e8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=53b8e1dd76e8)
Changeset description:
fixed bugs 2651 and 2652
fixed problems in DCE optimizer
and IN handleing
## Comment 14664
Date: 2010-08-13 00:39:31 +0200
From: @njnes
added test 2651. fixed by improved dce optimizer
## Comment 14806
Date: 2010-08-30 09:18:05 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
| rel_bin.mx:1571: rel2bin_project: Assertion `0' failed. | https://api.github.com/repos/MonetDB/MonetDB/issues/2651/comments | 0 | 2020-11-30T11:08:12Z | 2024-06-27T11:49:13Z | https://github.com/MonetDB/MonetDB/issues/2651 | 753,382,916 | 2,651 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-11 16:55:13 +0200
From: Wouter Alink <<alink>>
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 5.20.3 (Jun2010-SP1) [obsolete]
Last updated: 2010-08-30 09:18:02 +0200
## Comment 14643
Date: 2010-08-11 16:55:13 +0200
From: Wouter Alink <<alink>>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.10) Gecko/20100622 Fedora/3.5.10-1.fc12 Firefox/3.5.10
Build Identifier:
The name of the database is truncated on mclient prompt (when longer than 23 characters)...
$ mclient -lsql -da01234567890123456789012345
Welcome to mclient, the MonetDB/SQL interactive terminal
Database: MonetDB v5.20.4, 'a0123456789012345678901'
^^^^^^^^^^^^^^^^^^^^^^^
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>
Reproducible: Always
## Comment 14644
Date: 2010-08-11 17:33:09 +0200
From: @grobian
what does monetdb status say?
## Comment 14674
Date: 2010-08-13 11:01:16 +0200
From: @grobian
Changeset [b780c78c9020](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b780c78c9020) made by Fabian Groffen <fabian@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b780c78c9020](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b780c78c9020)
Changeset description:
Fix bug #2650, a too small buffer caused the active database as reported by mclient's welcome message to be truncated
## Comment 14797
Date: 2010-08-30 09:18:02 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
| Name of database is truncated | https://api.github.com/repos/MonetDB/MonetDB/issues/2650/comments | 0 | 2020-11-30T11:08:10Z | 2024-06-27T11:49:12Z | https://github.com/MonetDB/MonetDB/issues/2650 | 753,382,879 | 2,650 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-11 15:31:03 +0200
From: Wouter Alink <<alink>>
To: Documentation maintainers <<bugs-docs>>
Version: unspecified
Last updated: 2011-01-24 14:37:34 +0100
## Comment 14640
Date: 2010-08-11 15:31:03 +0200
From: Wouter Alink <<alink>>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.10) Gecko/20100622 Fedora/3.5.10-1.fc12 Firefox/3.5.10
Build Identifier:
The following is a function in SQL that is accepted by MonetDB:
create function a (x int)
returns int
return select x;
In the documentation (http://www.monetdb.nl/SQL/Documentation/Functions.html) the "RETURN" keyword is missing. (it was difficult to find what was wrong)
Reproducible: Always
## Comment 15414
Date: 2011-01-24 14:37:34 +0100
From: @grobian
It's actually not, it's in the return_statement thing. Not to clear, I admit.
I applied this change to try and make it a bit more clear now (although it hampers correctness a little)
diff -u -r1.59 SQLlanguage.texi
--- Docs/SQL/SQLlanguage.texi 21 Mar 2010 10:54:14 -0000 1.59
+++ Docs/SQL/SQLlanguage.texi 24 Jan 2011 13:35:22 -0000
@@ -1057,7 +1057,9 @@
RETURNS func_data_type EXTERNAL NAME <external_func_name> ;
CREATE FUNCTION <func_name> [(<param_name> <param_type>, ...)]
- RETURNS func_data_type routine_body ;
+ RETURNS func_data_type
+ routine_body
+ RETURN return_value;
func_data_type:
<data_type>
@@ -1090,7 +1092,6 @@
| while_statement
| if_statement
| case_statement
- | return_statement
;
@end smallexample
@end cartouche
| "RETURN" is missing in "CREATE FUNCTION" documentation | https://api.github.com/repos/MonetDB/MonetDB/issues/2649/comments | 0 | 2020-11-30T11:08:07Z | 2024-06-27T11:49:11Z | https://github.com/MonetDB/MonetDB/issues/2649 | 753,382,844 | 2,649 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-11 15:14:57 +0200
From: @grobian
To: SQL devs <<bugs-sql>>
Version: 2.40.1 (Oct2010) [obsolete]
CC: @njnes
Last updated: 2011-03-28 17:31:38 +0200
## Comment 14637
Date: 2010-08-11 15:14:57 +0200
From: @grobian
Setting a sequence value to NULL is allowed, but causes interesting problems afterwards. First a not-NULL violation is caused at the first invocation (it is likely to be on a key column, e.g. serial), then a second invocation yields in a very large negative number (looks like overflow).
I think we should just disallow NULL as valid input here.
## Comment 14638
Date: 2010-08-11 15:19:14 +0200
From: @grobian
The parser correctly forces a positive integer, however, it also allows subselects which can return negative integers and nulls such as a simple SELECT NULL. Hence, the check should be done at execution time.
## Comment 14639
Date: 2010-08-11 15:20:33 +0200
From: @grobian
sql>alter sequence "sys"."seq_5128" restart with null no cycle;
syntax error, unexpected sqlNULL, expecting sqlINT or '(' in: "alter sequence "sys"."seq_5128" restart with null"
sql>alter sequence "sys"."seq_5128" restart with (select null) no cycle;
operation successful
sql>alter sequence "sys"."seq_5128" restart with (select -1) no cycle;
operation successful
sql>
(typical way to find this is to do a "restart with (select max(id) from ..." on a table with no tuples)
## Comment 14830
Date: 2010-08-30 09:21:51 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
## Comment 15267
Date: 2010-12-03 22:34:11 +0100
From: @njnes
could be handled in mvc_restart_seq
## Comment 15415
Date: 2011-01-24 21:02:19 +0100
From: @grobian
Changeset [809ced83d8c4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=809ced83d8c4) made by Fabian Groffen <fabian@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=809ced83d8c4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=809ced83d8c4)
Changeset description:
sequences: refuse starting/restarting with NULL, bug #2648
Using sub-queries, the parser cannot "see" that the restart value is
actually NULL. Implement the runtime checks to ensure that we cannot
set restart value for sequences to NULL.
## Comment 15416
Date: 2011-01-24 21:03:27 +0100
From: @grobian
Fixed in current, test added.
## Comment 15644
Date: 2011-03-28 17:31:38 +0200
From: @sjoerdmullender
The Mar2011 version has been released.
| ALTER SEQUENCE ... RESTART WITH (SELECT NULL) NO CYCLE is accepted | https://api.github.com/repos/MonetDB/MonetDB/issues/2648/comments | 0 | 2020-11-30T11:08:04Z | 2024-06-27T11:49:10Z | https://github.com/MonetDB/MonetDB/issues/2648 | 753,382,803 | 2,648 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-10 16:25:14 +0200
From: Manuel Mayr <<mayrm>>
To: SQL devs <<bugs-sql>>
Version: 2.40.1 (Oct2010) [obsolete]
CC: mayrm, @njnes
Last updated: 2011-03-28 17:31:38 +0200
## Comment 14634
Date: 2010-08-10 16:25:14 +0200
From: Manuel Mayr <<mayrm>>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-us) AppleWebKit/533.17.8 (KHTML, like Gecko) Version/5.0.1 Safari/533.17.8
Build Identifier:
When I run the SQL query (listed in Steps to Reproduce) against M5 using the mclient-tool it breaks with the following error message:
MAPI = monetdb@localhost:50000
ACTION= read_line
QUERY = WITH
ERROR = !Connection terminated
I'm able to run the query partwise
Reproducible: Always
### Steps to Reproduce:
1. Create a database with the following tables and constraints:
DROP TABLE payments; -- dep: orders
DROP TABLE shipments; -- dep: orders
DROP TABLE line_items; -- dep: orders
DROP TABLE orders; -- dep: addresses
DROP TABLE addresses; -- dep: states, countries
DROP TABLE zone_members; -- dep: zones, countries
DROP TABLE countries; -- dep:
DROP TABLE variants; -- dep: products
DROP TABLE products; -- dep:
DROP TABLE schema_migrations; -- dep:
DROP TABLE shipping_methods; -- dep: zones
DROP TABLE states; -- dep: states
DROP TABLE tax_categories; -- dep:
DROP TABLE tax_rates; -- dep: zones
DROP TABLE zones; -- dep:
--
-- Table structure for table payments
--
CREATE TABLE payments (
id integer,
order_id integer default NULL,
created_at timestamp default NULL,
updated_at timestamp default NULL,
amount decimal(8,2) NOT NULL default '0.00',
creditcard_id integer default NULL,
paytype varchar(255) default NULL
);
--
-- Table structure for table addresses
--
CREATE TABLE addresses (
id integer,
firstname varchar(255) default NULL,
lastname varchar(255) default NULL,
address1 varchar(255) default NULL,
address2 varchar(255) default NULL,
city varchar(255) default NULL,
state_id integer default NULL,
zipcode varchar(255) default NULL,
country_id integer default NULL,
phone varchar(255) default NULL,
created_at timestamp default NULL,
updated_at timestamp default NULL,
state_name varchar(255) default NULL
);
--
-- Table structure for table countries
--
CREATE TABLE countries (
id integer,
iso_name varchar(255) default NULL,
iso varchar(255) default NULL,
name varchar(255) default NULL,
iso3 varchar(255) default NULL,
numcode integer default NULL
);
--
-- Table structure for table line_items
--
CREATE TABLE line_items (
id integer,
order_id integer default NULL,
variant_id integer default NULL,
quantity integer NOT NULL,
price decimal(8,2) NOT NULL,
created_at timestamp default NULL,
updated_at timestamp default NULL
);
--
-- Table structure for table orders
--
CREATE TABLE orders (
id integer default NULL,
user_id integer default NULL,
number varchar(255) default NULL,
ship_amount decimal(8,2) NOT NULL default '0.00',
tax_amount decimal(8,2) NOT NULL default '0.00',
item_total decimal(8,2) NOT NULL default '0.00',
total decimal(8,2) NOT NULL default '0.00',
ip_address varchar(255) default NULL,
special_instructions text,
created_at timestamp default NULL,
updated_at timestamp default NULL,
state varchar(255) default NULL,
checkout_complete integer default NULL,
token varchar(255) default NULL,
email varchar(255) default NULL,
bill_address_id integer default NULL,
ship_address_id integer default NULL
);
--
-- Table structure for table products
--
CREATE TABLE products (
id integer default NULL,
name varchar(255) NOT NULL default '',
description text,
master_price decimal(8,2) default NULL,
created_at timestamp default NULL,
updated_at timestamp default NULL,
permalink varchar(255) default NULL,
available_on timestamp default NULL,
tax_category_id integer default NULL,
shipping_category integer default NULL,
deleted_at timestamp default NULL,
meta_description varchar(255) default NULL,
meta_keywords varchar(255) default NULL
);
--
-- Table structure for table schema_migrations
--
CREATE TABLE schema_migrations (
version varchar(255) NOT NULL
);
--
-- Table structure for table shipments
--
CREATE TABLE shipments (
id integer,
order_id integer default NULL,
shipping_method_id integer default NULL,
tracking varchar(255) default NULL,
created_at timestamp default NULL,
updated_at timestamp default NULL,
number varchar(255) default NULL,
cost decimal(8,2) default NULL,
shipped_at timestamp default NULL,
address_id integer default NULL
);
--
-- Table structure for table shipping_methods
--
CREATE TABLE shipping_methods (
id integer,
zone_id integer default NULL,
shipping_calculator varchar(255) default NULL,
name varchar(255) default NULL,
created_at timestamp default NULL,
updated_at timestamp default NULL
);
--
-- Table structure for table states
--
CREATE TABLE states (
id integer,
name varchar(255) default NULL,
abbr varchar(255) default NULL,
country_id integer default NULL
);
--
-- Table structure for table tax_categories
--
CREATE TABLE tax_categories (
id integer,
name varchar(255) default NULL,
description varchar(255) default NULL,
created_at timestamp default NULL,
updated_at timestamp default NULL
);
--
-- Table structure for table tax_rates
--
CREATE TABLE tax_rates (
id integer default NULL,
zone_id integer default NULL,
amount decimal(8,4) default NULL,
created_at timestamp default NULL,
updated_at timestamp default NULL,
tax_type integer default NULL,
tax_category_id integer default NULL
);
--
-- Table structure for table variants
--
CREATE TABLE variants (
id integer default NULL,
product_id integer default NULL,
sku varchar(255) default NULL,
price decimal(8,2) NOT NULL,
weight decimal(8,2) default NULL,
height decimal(8,2) default NULL,
width decimal(8,2) default NULL,
depth decimal(8,2) default NULL,
deleted_at timestamp default NULL
);
--
-- Table structure for table zone_members
--
CREATE TABLE zone_members (
id integer default NULL,
zone_id integer default NULL,
country_id integer default NULL,
zoneable_type varchar(255) default NULL,
created_at timestamp default NULL,
updated_at timestamp default NULL
);
--
-- Table structure for table zones
--
CREATE TABLE zones (
id integer default NULL,
name varchar(255) default NULL,
description varchar(255) default NULL,
created_at timestamp default NULL,
updated_at timestamp default NULL
);
--
-- Constraints for table zones
--
ALTER TABLE zones
ADD CONSTRAINT prim_zones_id
PRIMARY KEY(id);
ALTER TABLE zones
ALTER COLUMN id SET NOT NULL;
--
-- Constraints for table orders
--
ALTER TABLE orders
ADD CONSTRAINT prim_orders_id
PRIMARY KEY(id);
ALTER TABLE orders
ALTER COLUMN id SET NOT NULL;
--
-- Constraints for table addresses
--
ALTER TABLE addresses
ADD CONSTRAINT prim_addresses_id
PRIMARY KEY(id);
ALTER TABLE addresses
ALTER COLUMN id SET NOT NULL;
--
-- Constraints for table countries
--
ALTER TABLE countries
ADD CONSTRAINT prim_countries_id
PRIMARY KEY(id);
ALTER TABLE countries
ALTER COLUMN id SET NOT NULL;
--
-- Constraints for table states
--
ALTER TABLE states
ADD CONSTRAINT prim_states_id
PRIMARY KEY(id);
ALTER TABLE states
ALTER COLUMN id SET NOT NULL;
ALTER TABLE states
ADD CONSTRAINT for_key_states_country_id
FOREIGN KEY (country_id) REFERENCES states(id);
--
-- Constraints for table payments
--
ALTER TABLE payments
ADD CONSTRAINT prim_payments_id
PRIMARY KEY(id);
ALTER TABLE payments
ALTER COLUMN id SET NOT NULL;
ALTER TABLE payments
ADD CONSTRAINT for_key_payments_order_id
FOREIGN KEY (order_id) REFERENCES orders(id);
--
-- Constraints for table products
--
ALTER TABLE products
ADD CONSTRAINT prim_products_id
PRIMARY KEY(id);
ALTER TABLE products
ALTER COLUMN id SET NOT NULL;
--
-- Constraints on table schema_migrations
--
ALTER TABLE schema_migrations
ADD CONSTRAINT prim_schema_migrations_id
PRIMARY KEY(version);
ALTER TABLE schema_migrations
ALTER COLUMN version SET NOT NULL;
--
-- Constraints for table shipping_methods
--
ALTER TABLE shipping_methods
ADD CONSTRAINT prim_shipping_methods_id
PRIMARY KEY(id);
ALTER TABLE shipping_methods
ALTER COLUMN id SET NOT NULL;
--
-- Constraints on table shipments
--
ALTER TABLE shipments
ADD CONSTRAINT prim_shipments_id
PRIMARY KEY(id);
ALTER TABLE shipments
ALTER COLUMN id SET NOT NULL;
ALTER TABLE shipments
ADD CONSTRAINT for_key_shipments_order_id
FOREIGN KEY (order_id) REFERENCES orders(id);
ALTER TABLE shipments
ADD CONSTRAINT for_key_shipments_shipping_method_id
FOREIGN KEY (shipping_method_id) REFERENCES shipping_methods(id);
--
-- Constraints for table tax_categories
--
ALTER TABLE tax_categories
ADD CONSTRAINT prim_tax_categories_id
PRIMARY KEY(id);
ALTER TABLE tax_categories
ALTER COLUMN id SET NOT NULL;
--
-- Constraints for table tax_rates
--
ALTER TABLE tax_rates
ADD CONSTRAINT prim_tax_rates_id
PRIMARY KEY(id);
ALTER TABLE tax_rates
ALTER COLUMN id SET NOT NULL;
ALTER TABLE tax_rates
ADD CONSTRAINT for_key_tax_rates_zone_id
FOREIGN KEY (zone_id) REFERENCES zones(id);
--
-- Constraints for table variants
--
ALTER TABLE variants
ADD CONSTRAINT prim_variants_id
PRIMARY KEY(id);
ALTER TABLE variants
ALTER COLUMN id SET NOT NULL;
ALTER TABLE variants
ADD CONSTRAINT for_key_variants_on_product_id
FOREIGN KEY (product_id) REFERENCES variants(id);
--
-- Constraints for table zone_members
--
ALTER TABLE zone_members
ADD CONSTRAINT prim_zone_members_id
PRIMARY KEY(id);
ALTER TABLE zone_members
ALTER COLUMN id SET NOT NULL;
ALTER TABLE zone_members
ADD CONSTRAINT for_key_zone_members_country_id
FOREIGN KEY (country_id) REFERENCES countries(id);
ALTER TABLE zone_members
ADD CONSTRAINT for_key_zone_members_zone_id
FOREIGN KEY (zone_id) REFERENCES zones(id);
--
-- Constraints for table line_items
--
ALTER TABLE line_items
ADD CONSTRAINT prim_line_items_id
PRIMARY KEY(id);
ALTER TABLE line_items
ALTER COLUMN id SET NOT NULL;
ALTER TABLE line_items
ADD CONSTRAINT for_key_line_items_on_order_id
FOREIGN KEY (order_id) REFERENCES orders(id);
ALTER TABLE line_items
ADD CONSTRAINT for_key_line_items_on_variant_id
FOREIGN KEY (variant_id) REFERENCES variants(id);
2. Run the following query using mclient against the database:
WITH
yv(id, product_id, sku, price, weight,
height, width, depth, deleted_at,
line_item_id, order_id) AS
(SELECT v.id, v.product_id, v.sku,
v.price, v.weight, v.height,
v.width, v.depth, v.deleted_at, li.id, o.id
FROM Orders o, Line_Items li, Variants v
WHERE o.id = li.order_id
AND li.variant_id = v.id
AND o.user_id = 20),
Cheapest_Price(product_id, price) AS
(SELECT product_id, MIN(price)
FROM Variants v
WHERE v.product_id IN (SELECT product_id FROM yv)
GROUP BY product_id),
Cheapest_Variants(id, product_id, sku,
price, weight, height,
width, depth, deleted_at) AS
(SELECT v.id, v.product_id, v.sku, v.price,
v.weight, v.height, v.width, v.depth, v.deleted_at
FROM Variants v, Cheapest_Price cp
WHERE v.price = cp.price
AND v.product_id = cp.product_id),
Suggestions_(rid, id, product_id, sku,
price, weight, height,
width, depth, deleted_at) AS
(SELECT ROW_NUMBER() OVER (PARTITION BY cv.id) AS rid,
cv.id, cv.product_id, cv.sku, cv.price,
cv.weight, cv.height, cv.width, cv.depth, cv.deleted_at
FROM Cheapest_Variants cv),
Suggestions(sugg_id, sugg_product_id, sugg_sku, sugg_price,
sugg_weight, sugg_height, sugg_width, sugg_depth, sugg_deleted_at,
id, product_id, sku, price, weight, height, width, depth, deleted_at,
line_item_id, order_id) AS
(SELECT cv.id as sugg_id, cv.product_id as sugg_product_id, cv.sku as sugg_sku, cv.price as sugg_price,
cv.weight as sugg_weight, cv.height as sugg_height, cv.width as sugg_width, cv.depth as sugg_depth,
cv.deleted_at as sugg_deleted_at,
yv.id, yv.product_id, yv.sku, yv.price, yv.weight, yv.height, yv.width, yv.depth, yv.deleted_at,
yv.line_item_id, yv.order_id
FROM Suggestions_ cv, yv yv
WHERE cv.product_id = yv.product_id
AND rid = 1),
-- return only one variant in suggestions
Savings(order_id, amount) AS
(SELECT order_id, SUM(s.price - s.sugg_price) AS amount
FROM Suggestions s
GROUP BY order_id)
SELECT sugg.*, sav.amount
FROM suggestions sugg, savings sav
WHERE sugg.order_id = sav.order_id;
## Comment 14635
Date: 2010-08-10 17:00:05 +0200
From: @grobian
Hint: you are allowed to use attachments for large pieces of SQL.
## Comment 14747
Date: 2010-08-20 17:05:00 +0200
From: @sjoerdmullender
Changeset [b633bd288199](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b633bd288199) 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=b633bd288199](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b633bd288199)
Changeset description:
Test for bug #2647.
Output needs to be provided once the bug is fixed.
## Comment 14748
Date: 2010-08-20 17:11:03 +0200
From: @sjoerdmullender
Extract from gdb session:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffdf495710 (LWP 11076)]
0x00007fffe0344d30 in exps_mark_used (rel=0x7fffd481f118,
subrel=0x7fffd481f0c8)
at /ufs/sjoerd/src/MonetDB/stable/sql/src/server/rel_optimizer.mx:2818
2818 sql_exp *e = subrel->exps->h->data;
(gdb) p subrel->exps->h
$3 = (node *) 0x0
In other words, it crashes with a NULL pointer dereference.
I suspect it's an SQL bug, and it occurs in Jun2010-SP1.
## Comment 14831
Date: 2010-08-30 09:22:00 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
## Comment 15075
Date: 2010-10-20 09:17:50 +0200
From: @njnes
Changeset [7a38d577f1c6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7a38d577f1c6) 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=7a38d577f1c6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7a38d577f1c6)
Changeset description:
fixed bug #2647. The columns of a 'with view' are now correctly named (ie
with relation and column names).
## Comment 15266
Date: 2010-12-03 22:23:10 +0100
From: @njnes
fixed
## Comment 15643
Date: 2011-03-28 17:31:38 +0200
From: @sjoerdmullender
The Mar2011 version has been released.
| M5 breaks with huge SQL query. | https://api.github.com/repos/MonetDB/MonetDB/issues/2647/comments | 0 | 2020-11-30T11:08:00Z | 2024-06-27T11:49:09Z | https://github.com/MonetDB/MonetDB/issues/2647 | 753,382,746 | 2,647 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-10 11:18:57 +0200
From: @drstmane
To: Documentation maintainers <<bugs-docs>>
Version: unspecified
Last updated: 2010-08-31 10:21:14 +0200
## Comment 14631
Date: 2010-08-10 11:18:57 +0200
From: @drstmane
Not all bug IDs of bug reports that have been closed since July 10 2010 (or were closed before that but have been otherwise changed since then without re-opening them) do appear in any ChangeLog messages:
$ for i in 2645 2641 2642 2591 2589 2613 2637 2611 2577 2548 2635 2617 2633 2636 2557 2606 2631 2614 2619 2626 2629 2628 2627 2624 2558 2623 2625 2622 2597 2592 2596 2610 2542 2573 2564 2547 2534 2598 ; do echo "$i `hg locate ChangeLog* | xargs grep -H $i`" ; done
2645 sql/ChangeLog.Jun2010:- Fixed bug #2645: mat.pack+algebra.slice should be replaced by mat.slice
2641 sql/ChangeLog.Jun2010:- Fixed bug #2641, The SQL server now handles Unicode BOM sequences
2642
2591
2589
2613
2637
2611 sql/ChangeLog.Jun2010:- Fix Bug #2611. Fixed check for multiple functions without parameters.
2577
2548
2635
2617
2633
2636
2557 MonetDB5/ChangeLog.Jun2010:- Fixed bug #2557. There was a bug in the mergetable optimizer which was
2606 sql/ChangeLog.Jun2010:- Fixed ORDER BY over UNION etc. (bug #2606) by
2631 sql/ChangeLog.Jun2010:- Fixed bug in handling 'WITH' and row_number() (Bug #2631).
2614 MonetDB5/ChangeLog.Jun2010: This fixes bugs 2626 & 2614.
2619 clients/ChangeLog.Jun2010: This fixes bug #2619.
2626 MonetDB5/ChangeLog.Jun2010: This fixes bugs 2626 & 2614.
2629
2628 sql/src/backends/monet5/merovingian/ChangeLog.Jun2010: observed in bug #2628.
2627 java/ChangeLog.Jun2010: and boxing/unboxing. Bug #2627
2624 sql/ChangeLog.Jun2010:- Fixed bug #2624: function returning decimal returned result that was
2558 clients/ChangeLog.Jun2010: This fixes bug #2558.
2623 sql/src/backends/monet5/merovingian/ChangeLog.Jun2010: Linux, so make sure they time out. Fixes bug #2623838
2625
2622 sql/ChangeLog.Jun2010:- fixed bug #2622 "LIMIT & OFFSET ignored on 64-bit big-endian when
2597
2592
2596 MonetDB5/ChangeLog.Jun2010: branch. This fixes bug #2596.
2610
2542
2573
2564
2547
2534
2598
## Comment 14632
Date: 2010-08-10 11:48:25 +0200
From: @grobian
$ for b in 2645 2641 2642 2591 2589 2613 2637 2611 2577 2548 2635 2617 2633 2636 2557 2606 2631 2614 2619 2626 2629 2628 2627 2624 2558 2623 2625 2622 2597 2592 2596 2610 2542 2573 2564 2547 2534 2598 ; do echo -n "$b" ; bugz get --base=http://bugs.monetdb.org/ --no-comments $b | grep Title | cut -d: -f2-; done
2645 SQL: mat.pack+algebra.slice should be replaced by mat.slice for 'limit 1'
2641 Unicode BOM upsets the scanner
2642 tarantula.mx: uninitialized variables
2591 missing/not-found file: "could not read createdb.sql"
2589 CREATE TABLE & ALTER TABLE no longer produce "Operation successful"
2613 SQL creates wrong MAL code a.o. with GDK_nr_threads=1
2637 Mapi.mx: implicit declaration of function
2611 creating second function with existing signature succeeds
2577 not in (... union ...) differs from: except (... union ...)
2548 Connect to default segfault
2635 Unable to run select query on view if database is started readonly
2617 Unexpected ORDER BY
2633 crash in rel2bin with complex query and LIMIT
2636 Subquery expected with group by, join
2557 SQLException:assert:INSERT INTO: FOREIGN KEY constraint violated on 64-bits
2606 ORDER BY over UNION / EXCEPT / INTERSECT is ignored
2631 Combination of WITH and numbering function crashes Mserver
2614 Update statement in function ignored
2619 io.printf without newline hangs
2626 Incorrect NULL function results with multi-thread execution
2629 JDBC 1.15 and JunSP1 release compatible?
2628 Cannot reconnect to same database twice
2627 java/merovingian fails to compile on Debian 4.0
2624 function returning decimal with fraction returns too large integer
2558 unixODBC-2.3.0 removed SQLROWOFFSET and SQLROWSETSIZE
2623 autogen.py hangs with new Python 2.7 on Windows
2625 ODBC driver fails to compile on 64-bit MacOS X with Gentoo Prefix and unixODBC 2.3
2622 LIMIT & OFFSET ignored on 64-bit big-endian when combined with GROUP BY
2597 test sql/src/test/Tests/rank.sql produces varying (wrong?) output on various platforms
2592 test sql/src/test/BugTracker-2009/Tests/dumping_tables.SF-2776908--optimizers.sql produces different output
2596 some TPCH tests fail with assertion in opt_mergetable on Windows
2610 selection of big arithmetic expression
2542 Feb2010 database cannot be read by Jun2010 version
2573 DB catalog corrupted after upgrade from Feb2010 to Jun2010
2564 group-by column ordering fails if group-by columns are not in projection
2547 Create schema causes segfault
2534 Prepared statement with wrd arg type cannot be used
2598 Wrong constraint in error message when delete prohibited due to foreign key
## Comment 14633
Date: 2010-08-10 12:38:41 +0200
From: @grobian
these are the bugs without changelog entries (according to Stefan's grep)
$ for b in 2642 2591 2589 2613 2637 2577 2548 2635 2617 2633 2636 2629 2625 2597 2592 2610 2542 2573 2564 2547 2534 2598 ; do echo -n "$b" ; bugz get --base=http://bugs.monetdb.org/ --no-comments $b | grep Title | cut -d: -f2-; done
2642 tarantula.mx: uninitialized variables
2591 missing/not-found file: "could not read createdb.sql"
2589 CREATE TABLE & ALTER TABLE no longer produce "Operation successful"
2613 SQL creates wrong MAL code a.o. with GDK_nr_threads=1
2637 Mapi.mx: implicit declaration of function
2577 not in (... union ...) differs from: except (... union ...)
2548 Connect to default segfault
2635 Unable to run select query on view if database is started readonly
2617 Unexpected ORDER BY
2633 crash in rel2bin with complex query and LIMIT
2636 Subquery expected with group by, join
2629 JDBC 1.15 and JunSP1 release compatible?
2625 ODBC driver fails to compile on 64-bit MacOS X with Gentoo Prefix and unixODBC 2.3
2597 test sql/src/test/Tests/rank.sql produces varying (wrong?) output on various platforms
2592 test sql/src/test/BugTracker-2009/Tests/dumping_tables.SF-2776908--optimizers.sql produces different output
2610 selection of big arithmetic expression
2542 Feb2010 database cannot be read by Jun2010 version
2573 DB catalog corrupted after upgrade from Feb2010 to Jun2010
2564 group-by column ordering fails if group-by columns are not in projection
2547 Create schema causes segfault
2534 Prepared statement with wrd arg type cannot be used
2598 Wrong constraint in error message when delete prohibited due to foreign key
## Comment 14636
Date: 2010-08-10 23:52:36 +0200
From: @drstmane
ChangeLog messages of the following bug reports
2591 missing/not-found file: "could not read createdb.sql"
2597 test sql/src/test/Tests/rank.sql produces varying (wrong?) output on various platforms
2564 group-by column ordering fails if group-by columns are not in projection
had already been to the *.spec file before releasing Jun2010-SP1:
2591: sql/MonetDB-SQL.spec: a newly created database. Bug #2591
2597: MonetDB5/MonetDB-server.spec:- Fixed bug #2597: This bug manifested itself in rank queries in SQL
2564: sql/MonetDB-SQL.spec:- fixed bug #2564: in case group by column is not found as alias in
## Comment 14854
Date: 2010-08-30 09:27:05 +0200
From: @sjoerdmullender
I've gone through the bugs and added changelog messages where I thought appropriate.
Closing now since the release is out the door.
| Not all recently fixed bugs are documented by ChangeLog messages | https://api.github.com/repos/MonetDB/MonetDB/issues/2646/comments | 0 | 2020-11-30T11:07:56Z | 2024-06-27T11:49:08Z | https://github.com/MonetDB/MonetDB/issues/2646 | 753,382,700 | 2,646 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-09 14:52:30 +0200
From: @yzchang
To: SQL devs <<bugs-sql>>
Version: 2.38.3 (Jun2010-SP1) [obsolete]
CC: bugs-sql, @njnes, @drstmane, @yzchang
Last updated: 2010-08-30 09:18:07 +0200
## Comment 14627
Date: 2010-08-09 14:52:30 +0200
From: @yzchang
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.10) Gecko/20100622 Fedora/3.5.10-1.fc12 Firefox/3.5.10
Build Identifier:
A performance bug in the default_pipe triggered by the following queries with 'limit 1':
create table slice_test (x int, y int, val int);
insert into slice_test values ( 0, 1, 12985);
insert into slice_test values ( 1, 1, 28323);
insert into slice_test values ( 3, 5, 89439);
select x,y from slice_test limit 1;
select cast(x as string)||'-bla-'||cast(y as string) from slice_test limit 1;
In the MAL plan, the mat.pack() followed by algebra.slice() should have been replaced by mat.slice() for a performance improvement from 40 sec to 90 msec.
This problem has been solved by Niels (thanks!) in Changeset: [05cd69c91094](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=05cd69c91094)
Reproducible: Always
## Comment 14628
Date: 2010-08-09 15:19:18 +0200
From: @yzchang
Changeset [1f8c20a5c318](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1f8c20a5c318) made by Jennie Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1f8c20a5c318](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1f8c20a5c318)
Changeset description:
Add test for bug #2645
## Comment 14629
Date: 2010-08-09 15:21:03 +0200
From: @yzchang
Bug is already fixed in Jun2010 branch, test added in:
sql/src/test/BugTracker-2010/Tests/mat.slice_limit1.Bug-2645.sql
## Comment 14630
Date: 2010-08-09 15:38:53 +0200
From: @yzchang
Changeset [f75621498d25](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f75621498d25) made by Jennie Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f75621498d25](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f75621498d25)
Changeset description:
Added ChangeLog entry for the fixed bug #2645
## Comment 14647
Date: 2010-08-12 00:10:25 +0200
From: @drstmane
Test provided test fail on various platforms.
Basically, the test onply prints the MAL plans (EXPLAIN) of two "LIMIT 1" queries, but does not run the queries itself (to check whether they indeed produce the correct result.
The printed MAL plan, however, differ depending on how many core the respective machine has respectively how many core/threads MonetDB is allowed to use; e.g.,
1 thread on Windows:
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/Int.32.32.d.1-Windows5.1/src_test_BugTracker-2010/mat.slice_limit1.Bug-2645.out.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/Mic.64.64.d.1-Windows6.0/src_test_BugTracker-2010/mat.slice_limit1.Bug-2645.out.00.html
1 core on Debian:
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/GNU.32.32.d.1-Debian4.0/src_test_BugTracker-2010/mat.slice_limit1.Bug-2645.out.00.html
8 cores on Darwin:
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/GNU.32.32.d.1-Darwin9.8.0/src_test_BugTracker-2010/mat.slice_limit1.Bug-2645.out.00.html
4 core on 64-bit Fedora (approved):
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/GNU.64.64.d.1-Fedora10/src_test_BugTracker-2010/mat.slice_limit1.Bug-2645.out.00.html
24 cores on SunOS:
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/GNU.64.64.d.0-SunOS5.10/src_test_BugTracker-2010/mat.slice_limit1.Bug-2645.out.00.html
Is it indeed necessary that the test prints (only) the MAL plans to check whether the correct plan is chosen?
Since this is about a performance bug, and the performance difference between "correct" and "wrong" plan is rather large (~3 orders of magnitude: 40 sec vs. 90 msec), wouldn't it be possible to simply run the query either on a larger dataset such that the "wrong" plan runs for >> 60 sec and the "correct" plan runs for << 60 sec, or use the given dataset and restrict the default timeout for the test to say 6 sec by adding a <testname>.timeout file with content
0.1
Then, the correct plan would run fine, while the wrong plan would trigger a timeout ...
## Comment 14673
Date: 2010-08-13 07:55:33 +0200
From: @grobian
want to be kept in the loop
## Comment 14711
Date: 2010-08-17 11:34:41 +0200
From: @drstmane
Changeset [fe2c827daceb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fe2c827daceb) 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=fe2c827daceb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=fe2c827daceb)
Changeset description:
make test for bug #2645 work independently of degree of parallelism
As mentioned the bug report, printing the MAL plan (EXPLAIN)
of the query to check whether the desired mat.slice() call is
generated, is not convenient, as the MAL plan highly depends on
the degree of parallelism (number of CPU cores / threads)
used/available.
As althernative, we now exploit the hidden feature of collection
the execution TRACE in a table without returning it as result
(set trace = 'none';) and then query that table to check
whether mitosis was not activated (not mat.*() calls in the MAL
plan) or otherwise there is at least one mat.slice() call.
Caveat:
This might not work on Windows until bug #2612 is fixed.
## Comment 14713
Date: 2010-08-17 11:43:09 +0200
From: @drstmane
To be closed, again, once testing confirms that the test now works fine on all platforms.
## Comment 14715
Date: 2010-08-18 08:08:45 +0200
From: @drstmane
Test now works fine on all platforms except Windows.
The Windows problems is covered by bug #2612.
## Comment 14809
Date: 2010-08-30 09:18:07 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
## Comment 17587
Date: 2012-08-01 11:19:05 +0200
From: @sjoerdmullender
Changeset [3de0b693aaee](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3de0b693aaee) 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=3de0b693aaee](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3de0b693aaee)
Changeset description:
Prevent a race condition from happening by copying trace bats.
In e.g. the mat.slice_limit1.Bug-2645 test, trace information is
retrieved and then used in SQL queries. This could lead to a race
condition, since the trace information was returned as references to
the actual bats which were then used in e.g. a join. The join
happened to create a temporary view on the bat which caused the share
count of the trace bat to be 1 temporarily. In the mean time, in
another thread, MAL instructions were being executed. Whenever an
instruction executes, an entry is added to the trace bat. This means
writing to the bat, which is only allowed if, among other tests, the
share count is 0. If the bat append happens just as the view exists,
the append fails with an error.
The solution is to not return references to the trace bats, but to
return copies instead.
| SQL: mat.pack+algebra.slice should be replaced by mat.slice for 'limit 1' | https://api.github.com/repos/MonetDB/MonetDB/issues/2645/comments | 0 | 2020-11-30T11:07:52Z | 2024-06-27T11:49:07Z | https://github.com/MonetDB/MonetDB/issues/2645 | 753,382,649 | 2,645 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-07 17:03:44 +0200
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: 2.38.3 (Jun2010-SP1) [obsolete]
Last updated: 2010-08-30 09:18:03 +0200
## Comment 14626
Date: 2010-08-07 17:03:44 +0200
From: @drstmane
The following testing regressions --- mainly with multi-threaded (multi-core) execution on 32-bit systems and 64-bit systems using 32-bit OIDs --- occurred after Niels' recent "rowsProp" type fixes.
(Only) since these fixes, mitosis get also triggered on 32-bit systems and 64-bit systems using 32-bit OIDs.
Hence, I suspect that the problems are related to mitosis and/or mergetable --- I cannot yet completely exclude dataflow or other reasons, though.
301 Tests are WORSE than before:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
161 different tests
12 different systems
D9.8.0 G32/32d1 94 tests
W5.1 I32/32d1 48 tests
F12 G32/32d1 44 tests
S5.10 G64/32d0 35 tests
S5.10 G32/32d0 29 tests
F10 I64/32d1 26 tests
F10 G64/32d1 16 tests
W6.0 M64/32d1 3 tests
F12 I64/64d1 2 tests
W6.0 I64/32d1 2 tests
F10 G64/64d0 1 test
S5.10 G64/64d0 1 test
1 test is WORSE than before on 6 systems
6 tests are WORSE than before on 5 systems
13 tests are WORSE than before on 4 systems
20 tests are WORSE than before on 3 systems
32 tests are WORSE than before on 2 systems
89 tests are WORSE than before on 1 system
o o X C D9.8.0 G32/32d1 src/test/Dependencies/Dependencies
o o X o F10 G64/32d1
o o X o F10 I64/32d1
o o X C F12 G32/32d1
o o X T S5.10 G32/32d0
o o X T S5.10 G64/32d0
o o X T D9.8.0 G32/32d1 src/benchmarks/ATIS/select_group
o o X C F10 G64/32d1
o o X C F12 I64/64d1
o o X C S5.10 G32/32d0
o o X C S5.10 G64/32d0
o o X C D9.8.0 G32/32d1 src/benchmarks/tpch/01-22
o o X C F10 G64/32d1
o o X C F12 G32/32d1
o o X C S5.10 G32/32d0
o o X C S5.10 G64/32d0
o o X T D9.8.0 G32/32d1 src/benchmarks/wisconsin/wisconsin-select
o o X o F10 G64/32d1
X o X C F12 G32/32d1
o o X T S5.10 G32/32d0
o o X T S5.10 G64/32d0
o o X X D9.8.0 G32/32d1 src/jdbc/tests/Test_JdbcClient
o o X X F10 G64/32d1
o o X X F10 I64/32d1
o o X T S5.10 G32/32d0
o o X T S5.10 G64/32d0
o o X o F10 G64/32d1 src/test/BugTracker-2010/LIMIT_OFFSET_big-endian.Bug-2622
o o X o F10 I64/32d1
o o X o S5.10 G64/32d0
o o X o W6.0 I64/32d1
o o X o W6.0 M64/32d1
o o X o F10 G64/32d1 src/test/bugs/offset_bug
o o X o F10 I64/32d1
o o X o S5.10 G64/32d0
o o X o W6.0 I64/32d1
o o X o W6.0 M64/32d1
o o X T D9.8.0 G32/32d1 src/benchmarks/tpch/04
o o X C F12 G32/32d1
o o X C S5.10 G32/32d0
o o X C S5.10 G64/32d0
o o X T D9.8.0 G32/32d1 src/benchmarks/tpch/07
o o X o F12 G32/32d1
o o X C S5.10 G32/32d0
o o X C S5.10 G64/32d0
o o X C D9.8.0 G32/32d1 src/benchmarks/tpch/16
o o X C F12 G32/32d1
o o X C S5.10 G32/32d0
o o X C S5.10 G64/32d0
o o X C D9.8.0 G32/32d1 src/benchmarks/tpch/19
o o X C F12 G32/32d1
o o X C S5.10 G32/32d0
o o X C S5.10 G64/32d0
o o X C D9.8.0 G32/32d1 src/benchmarks/tpch/21
o o X X F12 G32/32d1
o o X C S5.10 G32/32d0
o o X C S5.10 G64/32d0
o o X T D9.8.0 G32/32d1 src/test/BugTracker-2009/dumping_tables.SF-2776908--optimizers
o o X C F12 G32/32d1
o o X X F12 I64/64d1
o o X T S5.10 G64/32d0
o o X o D9.8.0 G32/32d1 src/test/BugTracker-2009/set_history_and_drop_table.SF-2607045
o o X o F10 I64/32d1
o o X o F12 G32/32d1
o o X o S5.10 G64/32d0
o o X o D9.8.0 G32/32d1 src/test/BugTracker-2010/with_row_number_crash.Bug-2631
o o X o F10 I64/32d1
o o X o S5.10 G32/32d0
o o X o S5.10 G64/32d0
o o X o D9.8.0 G32/32d1 src/test/BugTracker/rank_over.SF-1691098
o o X o F10 I64/32d1
o o X o S5.10 G32/32d0
o o X o S5.10 G64/32d0
o o X o D9.8.0 G32/32d1 src/test/BugTracker/with_only_once.SF-1720293
o o X o F10 I64/32d1
o o X o S5.10 G32/32d0
o o X o S5.10 G64/32d0
o o X X D9.8.0 G32/32d1 src/test/bugs/rangejoin_optimize_bug
o o X C F12 G32/32d1
o o X X S5.10 G32/32d0
o o X X S5.10 G64/32d0
o o X o D9.8.0 G32/32d1 src/test/bugs/simple_view
o o X o F10 I64/32d1
o o X o S5.10 G32/32d0
o o X o S5.10 G64/32d0
o o X o D9.8.0 G32/32d1 src/test/bugs/subselect_multiple_unionall_where_1=1-bug-sf-1005596
o o X o F10 G64/32d1
o o X o F10 I64/32d1
o o X X F12 G32/32d1
o o X T D9.8.0 G32/32d1 src/benchmarks/ATIS/select_distinct
o o X C S5.10 G32/32d0
o o X C S5.10 G64/32d0
o o X C D9.8.0 G32/32d1 src/benchmarks/tpch/12
o o X C F12 G32/32d1
o o X C S5.10 G32/32d0
o o X X D9.8.0 G32/32d1 src/benchmarks/tpch/14
o o X X S5.10 G32/32d0
o o X X S5.10 G64/32d0
o o X T D9.8.0 G32/32d1 src/odbc/samples/odbcsample1
o o X C S5.10 G32/32d0
o o X C S5.10 G64/32d0
o o X C D9.8.0 G32/32d1 src/test/BugDay_2005-10-06_2.9.3/UNION_JOIN_vs_plain_set_UNION-2.SF-920585
o o X o F10 I64/32d1
o o X C F12 G32/32d1
o o X X F10 G64/32d1 src/test/BugDay_2005-10-06_2.9.3/sesamstr_parser_error.SF-993366
o o X X S5.10 G32/32d0
o o X X S5.10 G64/32d0
o o X T D9.8.0 G32/32d1 src/test/BugTracker-2009/dumping_tables.SF-2776908
o o X C F12 G32/32d1
o o X T S5.10 G64/32d0
o o X T D9.8.0 G32/32d1 src/test/BugTracker-2009/dumping_tables.SF-2776908--performance
o o X C F12 G32/32d1
o o X T S5.10 G64/32d0
o o X o D9.8.0 G32/32d1 src/test/BugTracker-2009/reorder.SF-2770608
o o X T S5.10 G32/32d0
o o X T S5.10 G64/32d0
o o X C D9.8.0 G32/32d1 src/test/BugTracker/crash_on_delete.SF-1639108
o o X X S5.10 G32/32d0
o o X X S5.10 G64/32d0
o o X o D9.8.0 G32/32d1 src/test/BugTracker/temporary_tables.SF-1715669
o o X o F10 I64/32d1
o o X o F12 G32/32d1
o o X T S5.10 G32/32d0 src/test/BugTracker/with_row_number.SF-1898089
o o X T S5.10 G64/32d0
o o X T S5.10 G64/64d0
o o X o D9.8.0 G32/32d1 src/test/DropCascade/drop_columns_cascade
o o X o F10 I64/32d1
o o X o F12 G32/32d1
o o X o D9.8.0 G32/32d1 src/test/DropCascade/drop_function_cascade
o o X o F10 I64/32d1
o o X o F12 G32/32d1
o o X o D9.8.0 G32/32d1 src/test/DropCascade/drop_table_cascade
o o X o F10 I64/32d1
o o X o F12 G32/32d1
o o X o D9.8.0 G32/32d1 src/test/DropCascade/drop_view_cascade
o o X o F10 I64/32d1
o o X o F12 G32/32d1
o o X o D9.8.0 G32/32d1 src/test/Triggers/triggers_schema_operations
o o X o F10 I64/32d1
o o X o F12 G32/32d1
o o X o D9.8.0 G32/32d1 src/test/bugs/subselect_ambigious_columns-bug-sf-949071
o o X o F10 I64/32d1
o o X o F12 G32/32d1
o o X T D9.8.0 G32/32d1 src/test/bugs/union_all-bug-sf-941788
o o X o F10 I64/32d1
o o X o F12 G32/32d1
o o X X D9.8.0 G32/32d1 src/test/xquery/q01
o o X o F10 G64/32d1
o o X o F12 G32/32d1
o o X C D9.8.0 G32/32d1 src/benchmarks/moa/moa_ordered
o o X C S5.10 G32/32d0
o o X o S5.10 G32/32d0 src/benchmarks/tpch/01
o o X o S5.10 G64/32d0
o o X T D9.8.0 G32/32d1 src/benchmarks/tpch/09
o o X C F12 G32/32d1
o o X X S5.10 G32/32d0 src/benchmarks/tpch/11
o o X X S5.10 G64/32d0
o o X o S5.10 G32/32d0 src/benchmarks/tpch/13
o o X o S5.10 G64/32d0
o o X X S5.10 G32/32d0 src/benchmarks/tpch/15
o o X X S5.10 G64/32d0
o o X C D9.8.0 G32/32d1 src/benchmarks/tpch/18
o o X C F12 G32/32d1
o o X X S5.10 G32/32d0 src/benchmarks/tpch/20
o o X X S5.10 G64/32d0
o o X o D9.8.0 G32/32d1 src/test/ADT2006/bram
o o X o F12 G32/32d1
o o X X D9.8.0 G32/32d1 src/test/BugDay_2005-10-06_2.9.3/alter_table_describe-mclient.SF-1146092
o o X X F12 G32/32d1
o o X X D9.8.0 G32/32d1 src/test/BugDay_2005-10-06_2.9.3/alter_table_describe.SF-1146092
o o X X F10 I64/32d1
o o X X D9.8.0 G32/32d1 src/test/BugDay_2005-10-06_2.9.3/not_null.SF-933194
o o X X F10 I64/32d1
o o X o F10 G64/32d1 src/test/BugDay_2005-10-06_2.9.3/simple_union.SF-1005596
o o X o F12 G32/32d1
o o X X D9.8.0 G32/32d1 src/test/BugDay_2005-10-06_2.9.3/type_dump_test.SF-989257
o o X X F10 I64/32d1
o o X o D9.8.0 G32/32d1 src/test/BugDay_2005-12-19_2.9.3/weird_reponse_on_limit.SF-1314643
o o X o F10 I64/32d1
o o X o D9.8.0 G32/32d1 src/test/BugTracker-2009/join_topn.SF-2654133
o o X o F10 I64/32d1
o o X T D9.8.0 G32/32d1 src/test/BugTracker-2009/mclient-lsql-D
o o X C F12 G32/32d1
o o X X D9.8.0 G32/32d1 src/test/BugTracker-2009/multi-column_join_with_expression.SF-2783279
o o X X F12 G32/32d1
o o X T D9.8.0 G32/32d1 src/test/BugTracker-2009/name_clash_with_dump.SF-2780395
o o X o F10 G64/32d1
o o X o D9.8.0 G32/32d1 src/test/BugTracker/insert_not_exists.SF-1380287
o o X C F12 G32/32d1
o o X o D9.8.0 G32/32d1 src/test/Dependencies/dependency_loop
o o X o F12 G32/32d1
o o X o D9.8.0 G32/32d1 src/test/DropCascade/drop_pkey_cascade
o o X o F10 I64/32d1
o o X X D9.8.0 G32/32d1 src/test/UserDump/create
o o X T S5.10 G64/32d0
o o X o D9.8.0 G32/32d1 src/test/bugs/create_insert_select_aggr-bug-00001
o o X o F12 G32/32d1
o o X o D9.8.0 G32/32d1 src/test/bugs/insert_delete-bug-sf-904025
o o X o F12 G32/32d1
o o X o D9.8.0 G32/32d1 src/test/function_syntax
o o X o F12 G32/32d1
o o X o D9.8.0 G32/32d1 src/test/mapi/php_monetdb
o o X o F10 I64/32d1
o o o X F12 G32/32d1 src/test/mapi/python_test_monetdb_sql_capabilities
o o o X W6.0 M64/32d1
o o X o D9.8.0 G32/32d1 src/test/null/coalesce3
o o X o F12 G32/32d1
o o X o D9.8.0 G32/32d1 src/test/osm/delete_alter_bug
o o o X F10 G64/64d0
o o X o D9.8.0 G32/32d1 src/test/procedure_syntax
o o X o F12 G32/32d1
o o X C D9.8.0 G32/32d1 src/test/zones
o o X X F12 G32/32d1
o o X o D9.8.0 G32/32d1 src/benchmarks/ATIS/select_simple_join
o o X C D9.8.0 G32/32d1 src/benchmarks/arno/07
o o X C D9.8.0 G32/32d1 src/benchmarks/arno/08
o o X C D9.8.0 G32/32d1 src/benchmarks/arno/13
o o X C D9.8.0 G32/32d1 src/benchmarks/arno/14
o o X C D9.8.0 G32/32d1 src/benchmarks/arno/18
o o X C D9.8.0 G32/32d1 src/benchmarks/arno/queries_depth2
o o X C F12 G32/32d1 src/benchmarks/tpch/02
o o X C D9.8.0 G32/32d1 src/benchmarks/tpch/03
o o X C F12 G32/32d1 src/benchmarks/tpch/05
o o X X D9.8.0 G32/32d1 src/benchmarks/tpch/06
o o X C F10 G64/32d1 src/benchmarks/tpch/10
o o X o D9.8.0 G32/32d1 src/benchmarks/wisconsin/wisconsin-update
o o X o D9.8.0 G32/32d1 src/test/ADT2006/benesamo
o o X X D9.8.0 G32/32d1 src/test/ADT2006/slam
o o X T D9.8.0 G32/32d1 src/test/BugDay_2005-10-06_2.8/MapiClient-dump.SF-905851
o o o X D9.8.0 G32/32d1 src/test/BugTracker-2008/sql_command_kills_db.SF-2233677
o o X o D9.8.0 G32/32d1 src/test/BugTracker-2009/lost_update.SF-2790020
o o X o D9.8.0 G32/32d1 src/test/BugTracker-2010/SQLengine_error_on_join.Bug-2580
o o o X F10 G64/32d1 src/test/BugTracker-2010/offset_limited_32bit.SF-2950579
o o X o D9.8.0 G32/32d1 src/test/BugTracker/auto_increment.SF-1834820
o o o X D9.8.0 G32/32d1 src/test/BugTracker/cardinality_violation.SF-1240701
o o X C F10 G64/32d1 src/test/BugTracker/crash_on_cast.SF-1357271
o o X C D9.8.0 G32/32d1 src/test/BugTracker/multi-column-constraint.SF-1964587
o o X o D9.8.0 G32/32d1 src/test/BugTracker/set_default_value.SF-1715553
o o o X S5.10 G64/32d0 src/test/Connections/connections
o o X T D9.8.0 G32/32d1 src/test/Dump/dump
o o X o D9.8.0 G32/32d1 src/test/Dump/reload
o o X X D9.8.0 G32/32d1 src/test/Dump/test
o o X o D9.8.0 G32/32d1 src/test/Triggers/referencing_clause_new
o o X o D9.8.0 G32/32d1 src/test/Triggers/referencing_clause_old
o o X o D9.8.0 G32/32d1 src/test/Triggers/trigger_action
o o X o D9.8.0 G32/32d1 src/test/VOC/VOC
o o X X W5.1 I32/32d1 src/test/Via-m/event_s01
o o o X W5.1 I32/32d1 src/test/Via-m/event_s02
o o X X W5.1 I32/32d1 src/test/Via-m/event_s03
o o X X W5.1 I32/32d1 src/test/Via-m/event_s04
o o X X W5.1 I32/32d1 src/test/Via-m/event_s05
o o X X W5.1 I32/32d1 src/test/Via-m/event_s06
o o o X W5.1 I32/32d1 src/test/Via-m/event_s07
o o X X W5.1 I32/32d1 src/test/Via-m/event_s08
o o X X W5.1 I32/32d1 src/test/Via-m/event_s09
o o X X W5.1 I32/32d1 src/test/Via-m/event_s10
o o X X W5.1 I32/32d1 src/test/Via-m/event_s11
o o X X W5.1 I32/32d1 src/test/Via-m/event_s12
o o o X W5.1 I32/32d1 src/test/Via-m/file_s01
o o X X W5.1 I32/32d1 src/test/Via-m/file_s02
o o X X W5.1 I32/32d1 src/test/Via-m/file_s03
o o X X W5.1 I32/32d1 src/test/Via-m/file_s04
o o X X W5.1 I32/32d1 src/test/Via-m/file_s05
o o X X W5.1 I32/32d1 src/test/Via-m/file_s06
o o X X W5.1 I32/32d1 src/test/Via-m/file_s07
o o X X W5.1 I32/32d1 src/test/Via-m/file_s08
o o X X W5.1 I32/32d1 src/test/Via-m/file_s09
o o o X W5.1 I32/32d1 src/test/Via-m/file_s10
o o X X W5.1 I32/32d1 src/test/Via-m/file_s11
o o o X W5.1 I32/32d1 src/test/Via-m/file_s12
o o X X W5.1 I32/32d1 src/test/Via-m/file_s13
o o X X W5.1 I32/32d1 src/test/Via-m/file_s14
o o X X W5.1 I32/32d1 src/test/Via-m/file_s15
o o X X W5.1 I32/32d1 src/test/Via-m/file_s16
o o X X W5.1 I32/32d1 src/test/Via-m/file_s17
o o X X W5.1 I32/32d1 src/test/Via-m/file_s18
o o X X W5.1 I32/32d1 src/test/Via-m/media_s03
o o X X W5.1 I32/32d1 src/test/Via-m/media_s04
o o X X W5.1 I32/32d1 src/test/Via-m/media_s05
o o X X W5.1 I32/32d1 src/test/Via-m/media_s06
o o X X W5.1 I32/32d1 src/test/Via-m/media_s07
o o X X W5.1 I32/32d1 src/test/Via-m/media_s08
o o X X W5.1 I32/32d1 src/test/Via-m/media_s09
o o X X W5.1 I32/32d1 src/test/Via-m/media_s10
o o X X W5.1 I32/32d1 src/test/Via-m/media_s11
o o o X W5.1 I32/32d1 src/test/Via-m/media_s12
o o X X W5.1 I32/32d1 src/test/Via-m/media_s13
o o o X W5.1 I32/32d1 src/test/Via-m/media_s14
o o X X W5.1 I32/32d1 src/test/Via-m/media_s15
o o o X W5.1 I32/32d1 src/test/Via-m/media_s16
o o X X W5.1 I32/32d1 src/test/Via-m/media_s17
o o o X W5.1 I32/32d1 src/test/Via-m/media_s18
o o o X W5.1 I32/32d1 src/test/Via-m/media_s19
o o X X W5.1 I32/32d1 src/test/Via-m/media_s20
o o X o D9.8.0 G32/32d1 src/test/bugs/except-union-intersect-bug-sf-1146079
o o X o D9.8.0 G32/32d1 src/test/bugs/groupby_having-bug-sf-947600
o o X o D9.8.0 G32/32d1 src/test/bugs/order_limit_offset_bug
o o X o F12 G32/32d1 src/test/bugs/zero_or_one_bug
o o o X D9.8.0 G32/32d1 src/test/mapi/python_test_monetdb_sql_dbapi20
o o o S F10 G64/32d1 src/test/mapi/smack01
o o X X D9.8.0 G32/32d1 src/test/null/coalesce
o o X o D9.8.0 G32/32d1 src/test/null/coalesce2
## Comment 14680
Date: 2010-08-13 14:24:22 +0200
From: @drstmane
This is possibly ((most) probably related to bug #2654
"extremely slow query"
## Comment 14699
Date: 2010-08-16 18:50:56 +0200
From: @drstmane
multi-threaded execution on 32-bit systems & 64-bit systems with 32-bit OIDs appears to work, again, after Niels'
http://dev.monetdb.org/hg/MonetDB/rev/b17308d04b57
Thanks!
## Comment 14801
Date: 2010-08-30 09:18:03 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
| multi-threaded execution instable on 32-bit systems & 64-bit systems with 32-bit OIDs | https://api.github.com/repos/MonetDB/MonetDB/issues/2644/comments | 0 | 2020-11-30T11:07:49Z | 2024-06-27T11:49:06Z | https://github.com/MonetDB/MonetDB/issues/2644 | 753,382,607 | 2,644 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-06 15:21:50 +0200
From: @romulogoncalves
To: SQL devs <<bugs-sql>>
Version: 2.38.3 (Jun2010-SP1) [obsolete]
CC: @njnes, @drstmane
Last updated: 2010-08-30 09:17:59 +0200
## Comment 14624
Date: 2010-08-06 15:21:50 +0200
From: @romulogoncalves
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.10) Gecko/20100622 Fedora/3.5.10-1.fc12 Firefox/3.5.10
Build Identifier:
The following SQL code crashes the latest version of Jun2010
create table test (today date);
select sum(today) from test;
drop table test;
Reproducible: Always
### Steps to Reproduce:
1.start mserver
2.execute the SQL statements reported in Details.
3.
### Actual Results:
crash...
A back trace of the problem:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffdfc55710 (LWP 10566)]
0x00007fffe0335cfc in exp_subtype (e=0x0)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_exp.mx:456
456 switch(e->type) {
(gdb) p e
$1 = (sql_exp *) 0x0
(gdb) bt
0 0x00007fffe0335cfc in exp_subtype (e=0x0)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_exp.mx:456
1 0x00007fffe0324edd in _rel_aggr (sql=0x7fffd0005438, rel=0x7fffdfc548f0, distinct=0,
aggrstr=0x7fffd0007868 "sum", sym=0x7fffd00078d8, f=3)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_select.mx:3468
2 0x00007fffe0325028 in rel_aggr (sql=0x7fffd0005438, rel=0x7fffdfc548f0, se=0x7fffd00079a8,
f=3) at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_select.mx:3483
3 0x00007fffe03271d1 in rel_value_exp2 (sql=0x7fffd0005438, rel=0x7fffdfc548f0,
se=0x7fffd00079a8, f=3, ek=..., is_last=0x7fffdfc547f4)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_select.mx:4061
4 0x00007fffe032791f in rel_value_exp (sql=0x7fffd0005438, rel=0x7fffdfc548f0,
se=0x7fffd00079a8, f=3, ek=...)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_select.mx:4196
5 0x00007fffe03279ea in column_exp (sql=0x7fffd0005438, rel=0x7fffdfc548f0,
column_e=0x7fffd0007a48, f=3)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_select.mx:4209
6 0x00007fffe0327b2e in rel_column_exp (sql=0x7fffd0005438, rel=0x7fffdfc548f0,
column_e=0x7fffd0007a48, f=3)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_select.mx:4241
7 0x00007fffe0328dd9 in rel_select_exp (sql=0x7fffd0005438, rel=0x7fffd0073b98, outer=0x0,
sn=0x7fffd0007d08, ek=...) at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_select.mx:4547
8 0x00007fffe0329b22 in rel_query (sql=0x7fffd0005438, rel=0x0, sq=0x7fffd0007d08,
toplevel=1, ek=...) at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_select.mx:4753
9 0x00007fffe032afa1 in rel_subquery (sql=0x7fffd0005438, rel=0x0, sq=0x7fffd0007d08, ek=...)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_select.mx:5096
10 0x00007fffe032b01b in rel_selects (sql=0x7fffd0005438, s=0x7fffd0007d08)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_select.mx:5107
11 0x00007fffe031925d in rel_semantic (sql=0x7fffd0005438, s=0x7fffd0007d08)
at /ufs/goncalve/MonetDB/stable/sql/src/server/rel_semantic.mx:336
---Type <return> to continue, or q <return> to quit---
12 0x00007fffe027e47f in sql_symbol2stmt (c=0x7fffd0005438, sym=0x7fffd0007d08)
at /ufs/goncalve/MonetDB/stable/sql/src/backends/monet5/sql.mx:1340
13 0x00007fffe02ca779 in SQLparser (c=0x605b38)
at /ufs/goncalve/MonetDB/stable/sql/src/backends/monet5/sql_scenario.mx:1177
14 0x00007ffff7d224be in runPhase (c=0x605b38, phase=1)
at /ufs/goncalve/MonetDB/stable/MonetDB5/src/mal/mal_scenario.mx:604
15 0x00007ffff7d225f6 in runScenarioBody (c=0x605b38)
at /ufs/goncalve/MonetDB/stable/MonetDB5/src/mal/mal_scenario.mx:646
16 0x00007ffff7d2287d in runScenario (c=0x605b38)
at /ufs/goncalve/MonetDB/stable/MonetDB5/src/mal/mal_scenario.mx:682
17 0x00007ffff7cd5f59 in MSserveClient (dummy=0x605b38)
at /ufs/goncalve/MonetDB/stable/MonetDB5/src/mal/mal_session.mx:473
18 0x000000399f406a3a in start_thread () from /lib64/libpthread.so.0
19 0x000000399e8de77d in clone () from /lib64/libc.so.6
20 0x0000000000000000 in ?? ()
(gdb)
## Comment 14625
Date: 2010-08-06 20:43:03 +0200
From: @drstmane
Here's a first analysis:
from sql/src/server/rel_select.mx
if (!e)
return NULL;
a = sql_bind_aggr(sql->session->schema, aggrstr, exp_subtype(e));
if (!a) { /* find aggr + convert */
a = sql_find_aggr(sql->session->schema, aggrstr);
if (a) {
sql_arg *arg = a->aggr->ops->h->data;
e = rel_check_type(sql, &arg->type, e, type_equal);
if (!e) <============ if e==NULL here
a = NULL; <== a is set to NULL, too, here
}
}
if (a) {
/* type may have changed, ie. need to fix_scale */
sql_subtype *t = exp_subtype(e);
e = exp_aggr1(e, a, distinct, no_nil, groupby->card, has_nil(e));
exp = e;
if (*rel != groupby || f != sql_sel) /* selection */
exp = rel_groupby_add_aggr(sql, groupby, exp);
return exp_fix_scale(sql, t, exp, 1,
(t->type->scale == SCALE_FIX));
} else {
===> we can enter here with both a & e being NULL (see above) <===
but the code cannot cope with e == NULL ...
char *type = exp_subtype(e)->type->sqlname;
exp_destroy(e);
return sql_error(sql, 02, "%s: no such operator '%s(%s)'", toUpperCopy(alloca(strlen(aggrstr) + 1), aggrstr), aggrstr, type);
}
## Comment 14666
Date: 2010-08-13 00:51:19 +0200
From: @njnes
fixed and test sum_on_date_crash.Bug-2643.sql
added
## Comment 14668
Date: 2010-08-13 01:00:20 +0200
From: @njnes
Changeset [17210e4eb794](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=17210e4eb794) 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=17210e4eb794](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=17210e4eb794)
Changeset description:
fixed bug #2643
added more defensive code in rel_aggr
## Comment 14790
Date: 2010-08-30 09:17:59 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
| sum over a column type date | https://api.github.com/repos/MonetDB/MonetDB/issues/2643/comments | 0 | 2020-11-30T11:07:46Z | 2024-06-27T11:49:05Z | https://github.com/MonetDB/MonetDB/issues/2643 | 753,382,571 | 2,643 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-05 16:14:15 +0200
From: Mitja Kleider <<mitja>>
To: MonetDB5 devs <<bugs-monetdb5>>
Version: -- development
Last updated: 2010-08-05 17:36:17 +0200
## Comment 14615
Date: 2010-08-05 16:14:15 +0200
From: Mitja Kleider <<mitja>>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8
Build Identifier:
The current head does not compile because of the warnings below.
Reproducible: Always
### Steps to Reproduce:
$ hg identify
b6d72ef39dcf+ tip
### Actual Results:
cc1: warnings being treated as errors
../../../src/optimizer/opt_tarantula.mx: In function ‘TARmakeExecution’:
../../../src/optimizer/opt_tarantula.mx:592: error: ‘k’ may be used uninitialized in this function
../../../src/optimizer/opt_tarantula.mx: In function ‘TARmakeRun’:
../../../src/optimizer/opt_tarantula.mx:687: error: ‘x’ may be used uninitialized in this function
make[5]: *** [lib_optimizer_la-opt_tarantula.lo] Error 1
make[5]: Leaving directory `/home/mitja/monetdb-hg/MonetDB5/Linux/src/optimizer'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/home/mitja/monetdb-hg/MonetDB5/Linux/src/optimizer'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/mitja/monetdb-hg/MonetDB5/Linux/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/mitja/monetdb-hg/MonetDB5/Linux/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mitja/monetdb-hg/MonetDB5/Linux'
make: *** [all] Error 2
## Comment 14616
Date: 2010-08-05 17:26:58 +0200
From: @grobian
think this is solved by
[http//devmonetdborg/hg/MonetDB?cmd=changeset;node=57db8d431805](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=57db8d431805)
## Comment 14617
Date: 2010-08-05 17:36:17 +0200
From: Mitja Kleider <<mitja>>
Yes, thank you!
| tarantula.mx: uninitialized variables | https://api.github.com/repos/MonetDB/MonetDB/issues/2642/comments | 0 | 2020-11-30T11:07:42Z | 2024-06-27T11:49:04Z | https://github.com/MonetDB/MonetDB/issues/2642 | 753,382,534 | 2,642 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-05 14:55:24 +0200
From: @grobian
To: SQL devs <<bugs-sql>>
Version: 2.38.3 (Jun2010-SP1) [obsolete]
Last updated: 2020-11-27 11:52:54 +0100
## Comment 14613
Date: 2010-08-05 14:55:24 +0200
From: @grobian
While the BOM may appear everywhere, our SQL doesn't like it very much:
java.sql.SQLException: unexpected character (U+FEFF)
According to the docs (quote):
If the BOM character appears in the middle of a data stream, it should, according to Unicode, be interpreted as a "zero-width non-breaking space" (essentially a null character).
So, I guess if we can, we should just make our scanner/parser do this.
## Comment 14622
Date: 2010-08-06 11:47:52 +0200
From: @grobian
Changeset [095959816123](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=095959816123) made by Fabian Groffen <fabian@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=095959816123](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=095959816123)
Changeset description:
Fix for Bug #2641
When we encounter an Unicode BOM, skip it. mclient does skip the BOM
when it happens to be the first thing in a file, but not all clients are
mclient afterall. Hence, when e.g. a Java API application sends the BOM
it got an error. The implementation in the SQL server is more complete
than what mclient does, though, as it also skips BOMs that appear in the
middle of a file.
I won't remove the BOM skipping from mclient, since it seems to be added
there for MonetDB/XQuery, which for sure doesn't do this BOM skipping.
## Comment 14623
Date: 2010-08-06 11:50:08 +0200
From: @grobian
fix0rzed
## Comment 14791
Date: 2010-08-30 09:17:59 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
## Comment 28295
Date: 2020-11-27 11:52:54 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [2aaa4be50f21](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2aaa4be50f21) 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=2aaa4be50f21](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=2aaa4be50f21)
Changeset description:
Converting unicode-bom.Bug-2641 test to Python (we can't write the BOM character from pymonetdb on normal circustances), but I think there's a bug with BOM character as an identifier
| Unicode BOM upsets the scanner | https://api.github.com/repos/MonetDB/MonetDB/issues/2641/comments | 0 | 2020-11-30T11:07:39Z | 2024-06-27T11:49:03Z | https://github.com/MonetDB/MonetDB/issues/2641 | 753,382,503 | 2,641 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-05 14:29:51 +0200
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: 2.40.1 (Oct2010) [obsolete]
CC: @njnes
Last updated: 2011-03-28 17:31:26 +0200
## Comment 14612
Date: 2010-08-05 14:29:51 +0200
From: @drstmane
When run multi-threaded with 64-bit MonetDB, test sql/src/test/VOC/Tests/VOC.SQL.sh fails, as query
select count(*) from craftsmen c, passengers p
where c.trip = p.trip and exists
(select 1 from voyages v
where c.trip = v.trip and v.boatname = 'AMSTERDAM'
and v.departure_harbour ='Texel');
then produces
+---------+
| L3 |
+=========+
| 4846720 |
+---------+
1 row
instead of
+---------+
| L3 |
+=========+
| 1305366 |
+---------+
1 row
cf., http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/GNU.64.64.d.1-Fedora10/src_test_VOC/VOC.out.00.html
On the (currently) sole working (for this test) 32-bit multi-core platform (32-bit Darwin), it works fine:
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/GNU.32.32.d.1-Darwin9.8.0/src_test_VOC/VOC.out.00.html
Also on Windows (i.e., single-threaded) it works fine:
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/Int.32.32.d.1-Windows5.1/src_test_VOC/VOC.out.00.html
Tests by hand show that also on other platforms, single-threaded execution (`Mtest.py -n1`) works fine.
Note also that query
select count(*) from craftsmen c, passengers p
where c.trip = p.trip and exists (select 1) ;
produces
+---------+
| L4 |
+=========+
| 1308285 |
+---------+
1 row
in all cases.
## Comment 14614
Date: 2010-08-05 15:23:45 +0200
From: @drstmane
disabling the "mitosis" optimizer makes the test work fine also 64-bit multi-threaded
## Comment 14618
Date: 2010-08-05 20:30:04 +0200
From: @drstmane
The reason that it works on 32-bit (and possibly / sometimes on 64-bit with 32-bit OIDs) is mainly that mitosis does not necessarily get triggered in these cases, as there are typing problems with the "rows" property ("rowsProp") in MonetDB5 & sql.
Basically, the "rows" property seems to allow different types (bte, sht, int, lng) is some places, but in others the code that uses it silently assumes the "rows" property is of type lng --- reading lval of a ValRecord that has been initialized as TYPE_int usually results in (at least) unexprected results and behavior.
I do not yet(?) understand the intentions of using sometimes multiple types and sometimes only type for "rowsProp", and hence, cannot yet(/) fix this problem ...
Obviously, this discovery is only a side-effect of and not causually realted to the bug reported here ...
## Comment 14620
Date: 2010-08-06 10:44:34 +0200
From: @drstmane
With the rowsProp type problems fixed, mitosis not also fires on 32-bit systems (and 64-bit systems with 32-bit OIDs), and thus, this test fails in all multi-threaded cases.
## Comment 14832
Date: 2010-08-30 09:22:11 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
## Comment 15048
Date: 2010-10-18 11:19:59 +0200
From: @sjoerdmullender
The problem seems to be the semijoin:
When not using mitosis/mergetable, towards the end of the plan there is a semijoin, the result of which provides the final result.
In the mitosis/mergetable case, there are a bunch of semijoins whose results are combined. All these semijoins have the same left-hand side, which was also the same as in the case where mitosis/mergetable was switched off.
The results of the semijoins cannot simply be appended to each other, which is what is effectively done in the mitosis/mergetable case. The results should be combined intelligently, so that results from the left-hand side are not duplicated. This is not done, hence the incorrect result.
## Comment 15265
Date: 2010-12-03 22:20:17 +0100
From: @njnes
is fixed. Tests return correct results again.
## Comment 15620
Date: 2011-03-28 17:31:26 +0200
From: @sjoerdmullender
The Mar2011 version has been released.
| VOC test fails multi-threaded | https://api.github.com/repos/MonetDB/MonetDB/issues/2640/comments | 0 | 2020-11-30T11:07:36Z | 2024-06-27T11:49:02Z | https://github.com/MonetDB/MonetDB/issues/2640 | 753,382,465 | 2,640 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-03 15:40:45 +0200
From: Wouter Alink <<alink>>
To: SQL devs <<bugs-sql>>
Version: 11.1.1 (Mar2011) [obsolete]
CC: @njnes, @swingbit
Last updated: 2011-04-28 16:25:37 +0200
## Comment 14606
Date: 2010-08-03 15:40:45 +0200
From: Wouter Alink <<alink>>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 ( .NET CLR 3.5.30729; .NET4.0C)
Build Identifier:
When first issuing "START TRANSACTION;" on an mclient prompt and then copy-pasting the following table creation code, I get an error. If I redo the script line by line it works fine (see below). Probably some concurrency conflict.
Reproducible: Didn't try
### Steps to Reproduce:
1. start mclient -lsql
2. type "start transaction;"
3. copy-paste:
CREATE TABLE params_str (paramname VARCHAR(500), value VARCHAR(10000));
CREATE TABLE params_date (paramname VARCHAR(500), value DATE);
CREATE TABLE params_int (paramname VARCHAR(500), value INT);
CREATE TABLE params_double (paramname VARCHAR(500), value DOUBLE);
CREATE TABLE params_point (paramname VARCHAR(500), value POINT);
### Actual Results:
sql>start transaction;
auto commit mode: off
sql>CREATE TABLE params_str (paramname VARCHAR(500), value VARCHAR(10000));
operation successful
sql>CREATE TABLE params_date (paramname VARCHAR(500), value DATE);
operation successful
sql>CREATE TABLE params_int MAPI = alink@localhost:50351
QUERY = SELECT name FROM tables
(paramname VARCHAR(500), value INT);
current transaction is aborted (please ROLLBACK)
sql>CREATE TABLE params_double (paramname VARCHAR(500), value DOUBLE);
current transaction is aborted (please ROLLBACK)
sql>CREATE TABLE params_point (paramname VARCHAR(500), value POINT);
current transaction is aborted (please ROLLBACK)
sql>rollback;
auto commit mode: on
### Expected Results:
sql>start transaction;
auto commit mode: off
sql>CREATE TABLE params_str (paramname VARCHAR(500), value VARCHAR(10000));
operation successful
sql>CREATE TABLE params_int (paramname VARCHAR(500), value INT);
operation successful
sql>CREATE TABLE params_date (paramname VARCHAR(500), value DATE);
operation successful
sql>CREATE TABLE params_double (paramname VARCHAR(500), value DOUBLE);
operation successful
sql>CREATE TABLE params_point (paramname VARCHAR(500), value POINT);
operation successful
sql>commit;
auto commit mode: on
sql>
## Comment 14607
Date: 2010-08-03 15:48:09 +0200
From: Wouter Alink <<alink>>
extra info: if the "create table"-statements are not within a single transaction (not prepended by 'start transaction'), the error message appears too, although each table does get created.
## Comment 14753
Date: 2010-08-23 09:44:19 +0200
From: Wouter Alink <<alink>>
ahhhh... i still have trouble reading the exact error message:
the error says that there is an error in "SELECT name FROM tables", while that query is not being performed.
The bug is probably that there is a tab in the SQL script, which in turn triggers a 'readline' lookup for a list of table names. As the session was not in the 'sys'-schema, it cannot find the 'tables' table (it should have read 'sys.tables') and therefore invalidates the transaction.
## Comment 14833
Date: 2010-08-30 09:22:19 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
## Comment 14896
Date: 2010-09-09 17:20:40 +0200
From: @sjoerdmullender
Changeset [af483074f8f4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=af483074f8f4) 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=af483074f8f4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=af483074f8f4)
Changeset description:
Use fully qualified table name in readline completion.
This should fix bug #2639.
## Comment 14897
Date: 2010-09-09 17:20:41 +0200
From: @sjoerdmullender
Changeset [e18528196508](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e18528196508) 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=e18528196508](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e18528196508)
Changeset description:
Merge with Jun2010 branch:
Use fully qualified table name in readline completion.
This should fix bug #2639.
## Comment 14898
Date: 2010-09-09 17:20:42 +0200
From: @sjoerdmullender
Changeset [05bccd5e318f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=05bccd5e318f) 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=05bccd5e318f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=05bccd5e318f)
Changeset description:
Merge with Oct2010 branch:
Use fully qualified table name in readline completion.
This should fix bug #2639.
## Comment 14899
Date: 2010-09-09 17:22:09 +0200
From: @sjoerdmullender
Wouter, can you check?
No test, since we can't test interactive mclient.
## Comment 14900
Date: 2010-09-10 15:05:08 +0200
From: @sjoerdmullender
Changeset [6f7a65979668](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6f7a65979668) 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=6f7a65979668](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6f7a65979668)
Changeset description:
Added changelog message for fixed bug #2639.
## Comment 14913
Date: 2010-09-15 15:45:10 +0200
From: @swingbit
I checked, the fix works.
## Comment 15611
Date: 2011-03-25 15:50:18 +0100
From: @swingbit
I don't think that after the fix this works really as it should.
1. log in as a non-privileged user, with a custom schema
2. sql>select * from tabl[TAB]
After the fix, this internally looks for sys.tables, but in the prompt it gets completed to:
sql>select * from tables
which is incorrect, because in the custom schema there is no 'tables'.
That should have completed to
sql>select * from sys.tables
## Comment 15679
Date: 2011-03-28 17:36:29 +0200
From: @sjoerdmullender
The Mar2011 version has been released.
## Comment 15701
Date: 2011-03-30 12:59:11 +0200
From: @njnes
now the schema is added, solving this problem. Its not a very clean solution, but auto completion isn't by design.
## Comment 15702
Date: 2011-03-30 12:59:27 +0200
From: @njnes
Changeset [c48ef95dd242](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c48ef95dd242) 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=c48ef95dd242](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c48ef95dd242)
Changeset description:
always append schema name to auto completed table names. This is a somewhat
hackish solution to bug #2639.
## Comment 15750
Date: 2011-04-28 16:25:37 +0200
From: @sjoerdmullender
The Apr2011 release has been uploaded.
| Readline auto-complete reads from 'tables' instead of 'sys.tables' | https://api.github.com/repos/MonetDB/MonetDB/issues/2639/comments | 0 | 2020-11-30T11:07:32Z | 2024-06-27T11:49:01Z | https://github.com/MonetDB/MonetDB/issues/2639 | 753,382,428 | 2,639 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-03 11:54:56 +0200
From: @yzchang
To: SQL devs <<bugs-sql>>
Version: 2.36.1 (Feb2010) [obsolete]
CC: @mlkersten, @yzchang
Last updated: 2010-08-11 23:45:13 +0200
## Comment 14605
Date: 2010-08-03 11:54:56 +0200
From: @yzchang
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.10) Gecko/20100622 Fedora/3.5.10-1.fc12 Firefox/3.5.10
Build Identifier:
Triggered by the need to shift some bits 32 positions to the left, the results of the following statements seem unexpected to me. Is this a bug or is the implementation of shift only limited to tinyint?
Regards,
Jennie
$ mserver5 --set mapi_port=60000
MonetDB server v5.20.4, based on kernel v1.38.4
Serving database 'demo', using 4 threads
Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked
Found 7.751 GiB available main-memory.
Copyright (c) 1993-July 2008 CWI.
Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
Visit http://monetdb.cwi.nl/ for further information
warning: please don't forget to set your vault key!
(see /export/scratch0/zhang/monet-install/stable/optimise/etc/monetdb5.conf)
Listening for connection requests on mapi:monetdb://127.0.0.1:60000/
MonetDB/SQL module v2.38.4 loaded
MonetDB/GIS module v0.18.4 loaded
>include sql;
MonetDB/SQL module v2.38.4 loaded
>sql.start();
>select 1 << 6;
&1 0 1 1 1
% . table_name
% left_shift_single_value name
% tinyint type
% 2 length
[ 64 ]
>select 1 << 7;
&1 0 1 1 1
% . table_name
% left_shift_single_value name
% tinyint type
% 4 length
[ NULL ]
>select 1 << 8;
&1 0 1 1 1
% . table_name
% left_shift_single_value name
% tinyint type
% 1 length
[ 0 ]
>select cast(1 as bigint) << 8;
&1 0 1 1 1
% . table_name
% left_shift_single_value name
% tinyint type
% 1 length
[ 0 ]
>select cast(98 as bigint) << 8;
&1 0 1 1 1
% . table_name
% left_shift_single_value name
% tinyint type
% 1 length
[ 0 ]
>select cast(98 as bigint) << 32;
&1 0 1 1 1
% . table_name
% left_shift_single_value name
% tinyint type
% 2 length
[ 98 ]
>select cast(98 as bigint) << cast (32 as bigint);
&1 0 1 1 1
% . table_name
% left_shift_single_value name
% tinyint type
% 2 length
[ 98 ]
>select cast(1 as bigint) << cast (32 as bigint);
&1 0 1 1 1
% . table_name
% left_shift_single_value name
% tinyint type
% 1 length
[ 1 ]
>
Reproducible: Always
## Comment 14641
Date: 2010-08-11 16:29:16 +0200
From: @mlkersten
SELECT 1<<7 properly produces nil (=-128) because the default type is bte.
SELECT cast(i as int) <<7 produces 128.
for the case SELECT 1<<8 a 0 is produced, because the 1 is shifted out.
The code produced for SELECT CAST(1 AS BIGINT) << 8 seems wrong
function user.s1_1(A0,A1); 0 s1_1:void := user.s1_1(A0:lng, A1:bte) {G}
sql.mvc(); 1 _4:ptr := SQLmvc()
_5 := A0; 2 _5:lng := A0:lng
_6 := calc.bte(_5); 3 _6:bte := lng_2_bte(_5:lng)
_7 := A1; 4 _7:bte := A1:bte
_8 := calc.int(_7); 5 _8:int := bte_2_int(_7:bte)
_9 := calc.<<(_6,_8); 6 _9:bte := CALCbinaryLSHbteint(_6:bte, _8:int)
## Comment 14642
Date: 2010-08-11 16:34:29 +0200
From: @mlkersten
SELECT CAST(98 as bigint) << 32;
is a nice example of a complete rotate over an INT !
## Comment 14645
Date: 2010-08-11 23:41:46 +0200
From: @yzchang
Changeset [2c953e6851b9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2c953e6851b9) made by Jennie Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2c953e6851b9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2c953e6851b9)
Changeset description:
Added test for Bug #2638
## Comment 14646
Date: 2010-08-11 23:45:13 +0200
From: @yzchang
Closing bug:
fixed by Niels (thanks!) in Changeset: [8c7fdd4c286f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8c7fdd4c286f)
test added in sql/src/test/BugTracker-2010/Tests/shift_with_cast.Bug-2638.sql
| SQL: wrong results of shift with type casting | https://api.github.com/repos/MonetDB/MonetDB/issues/2638/comments | 0 | 2020-11-30T11:07:29Z | 2024-06-27T11:49:00Z | https://github.com/MonetDB/MonetDB/issues/2638 | 753,382,382 | 2,638 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-08-01 15:59:26 +0200
From: Mitja Kleider <<mitja>>
To: GDK devs <<bugs-common>>
Version: -- development
CC: @drstmane, @skinkie
Last updated: 2010-08-02 17:00:21 +0200
## Comment 14580
Date: 2010-08-01 15:59:26 +0200
From: Mitja Kleider <<mitja>>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8
Build Identifier:
make[5]: Entering directory `/home/mitja/monetdb-hg/clients/Linux/src/mapilib'
/bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../src/mapilib -I../.. -I../../../src/mapilib -I/usr/include/MonetDB -I/usr/include/MonetDB/common -I/usr/include/MonetDB/gdk -DLIBMAPI -O2 -Wall -Wextra -fno-strict-aliasing -O6 -fomit-frame-pointer -finline-functions -falign-loops=4 -falign-jumps=4 -falign-functions=4 -fexpensive-optimizations -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -ftree-vectorize -Werror-implicit-function-declaration -Werror -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wp,-D_FORTIFY_SOURCE=2 -D_REENTRANT -c -o libMapi_la-Mapi.lo `test -f 'Mapi.c' || echo '../../../src/mapilib/'`Mapi.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../../src/mapilib -I../.. -I../../../src/mapilib -I/usr/include/MonetDB -I/usr/include/MonetDB/common -I/usr/include/MonetDB/gdk -DLIBMAPI -O2 -Wall -Wextra -fno-strict-aliasing -O6 -fomit-frame-pointer -finline-functions -falign-loops=4 -falign-jumps=4 -falign-functions=4 -fexpensive-optimizations -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -ftree-vectorize -Werror-implicit-function-declaration -Werror -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wp,-D_FORTIFY_SOURCE=2 -D_REENTRANT -c Mapi.c -fPIC -DPIC -o .libs/libMapi_la-Mapi.o
../../../src/mapilib/Mapi.mx: In function ‘mapi_log_header’:
../../../src/mapilib/Mapi.mx:1568: error: implicit declaration of function ‘mnstr_printf’
../../../src/mapilib/Mapi.mx:1569: error: implicit declaration of function ‘mnstr_flush’
../../../src/mapilib/Mapi.mx: In function ‘mapi_log’:
../../../src/mapilib/Mapi.mx:1585: error: implicit declaration of function ‘mnstr_close’
../../../src/mapilib/Mapi.mx:1586: error: implicit declaration of function ‘mnstr_destroy’
../../../src/mapilib/Mapi.mx:1592: error: implicit declaration of function ‘mnstr_errnr’
../../../src/mapilib/Mapi.mx: In function ‘close_result’:
../../../src/mapilib/Mapi.mx:1713: error: implicit declaration of function ‘mnstr_error’
cc1: warnings being treated as errors
../../../src/mapilib/Mapi.mx:1713: error: passing argument 2 of ‘mapi_setError’ makes pointer from integer without a cast
../../../src/mapilib/Mapi.mx:1348: note: expected ‘const char *’ but argument is of type ‘int’
../../../src/mapilib/Mapi.mx:1731: error: passing argument 2 of ‘mapi_setError’ makes pointer from integer without a cast
../../../src/mapilib/Mapi.mx:1348: note: expected ‘const char *’ but argument is of type ‘int’
../../../src/mapilib/Mapi.mx: In function ‘finish_handle’:
../../../src/mapilib/Mapi.mx:1932: error: passing argument 2 of ‘mapi_setError’ makes pointer from integer without a cast
../../../src/mapilib/Mapi.mx:1348: note: expected ‘const char *’ but argument is of type ‘int’
../../../src/mapilib/Mapi.mx: In function ‘mapi_mapiuri’:
../../../src/mapilib/Mapi.mx:2066: error: implicit declaration of function ‘mnstr_init’
../../../src/mapilib/Mapi.mx: In function ‘mapi_start_talking’:
../../../src/mapilib/Mapi.mx:2484: error: passing argument 2 of ‘mapi_log_record’ makes pointer from integer without a cast
../../../src/mapilib/Mapi.mx:1573: note: expected ‘const char *’ but argument is of type ‘int’
../../../src/mapilib/Mapi.mx:2484: error: passing argument 2 of ‘mapi_setError’ makes pointer from integer without a cast
../../../src/mapilib/Mapi.mx:1348: note: expected ‘const char *’ but argument is of type ‘int’
../../../src/mapilib/Mapi.mx:2487: error: passing argument 2 of ‘mapi_log_record’ makes pointer from integer without a cast
../../../src/mapilib/Mapi.mx:1573: note: expected ‘const char *’ but argument is of type ‘int’
../../../src/mapilib/Mapi.mx:2487: error: passing argument 2 of ‘mapi_setError’ makes pointer from integer without a cast
../../../src/mapilib/Mapi.mx:1348: note: expected ‘const char *’ but argument is of type ‘int’
../../../src/mapilib/Mapi.mx:2491: error: implicit declaration of function ‘mnstr_read_block’
../../../src/mapilib/Mapi.mx:2788: error: implicit declaration of function ‘mnstr_set_byteorder’
../../../src/mapilib/Mapi.mx:2815: error: implicit declaration of function ‘mnstr_write’
../../../src/mapilib/Mapi.mx: In function ‘mapi_Xcommand’:
../../../src/mapilib/Mapi.mx:3276: error: passing argument 2 of ‘mapi_setError’ makes pointer from integer without a cast
../../../src/mapilib/Mapi.mx:1348: note: expected ‘const char *’ but argument is of type ‘int’
../../../src/mapilib/Mapi.mx: In function ‘read_line’:
../../../src/mapilib/Mapi.mx:3558: error: implicit declaration of function ‘mnstr_read’
../../../src/mapilib/Mapi.mx: In function ‘mapi_cache_limit’:
../../../src/mapilib/Mapi.mx:4532: error: passing argument 2 of ‘mapi_setError’ makes pointer from integer without a cast
../../../src/mapilib/Mapi.mx:1348: note: expected ‘const char *’ but argument is of type ‘int’
../../../src/mapilib/Mapi.mx: In function ‘mapi_fetch_line’:
../../../src/mapilib/Mapi.mx:4689: error: passing argument 2 of ‘mapi_log_record’ makes pointer from integer without a cast
../../../src/mapilib/Mapi.mx:1573: note: expected ‘const char *’ but argument is of type ‘int’
../../../src/mapilib/Mapi.mx:4689: error: passing argument 2 of ‘mapi_setError’ makes pointer from integer without a cast
../../../src/mapilib/Mapi.mx:1348: note: expected ‘const char *’ but argument is of type ‘int’
../../../src/mapilib/Mapi.mx: In function ‘mapi_fetch_all_rows’:
../../../src/mapilib/Mapi.mx:5253: error: passing argument 2 of ‘mapi_log_record’ makes pointer from integer without a cast
../../../src/mapilib/Mapi.mx:1573: note: expected ‘const char *’ but argument is of type ‘int’
../../../src/mapilib/Mapi.mx:5253: error: passing argument 2 of ‘mapi_setError’ makes pointer from integer without a cast
../../../src/mapilib/Mapi.mx:1348: note: expected ‘const char *’ but argument is of type ‘int’
make[5]: *** [libMapi_la-Mapi.lo] Error 1
make[5]: Leaving directory `/home/mitja/monetdb-hg/clients/Linux/src/mapilib'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/home/mitja/monetdb-hg/clients/Linux/src/mapilib'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/mitja/monetdb-hg/clients/Linux/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/mitja/monetdb-hg/clients/Linux/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mitja/monetdb-hg/clients/Linux'
make: *** [all] Error 2
Reproducible: Always
### Steps to Reproduce:
$ hg log -l1
changeset: 37090:7a4056e9411e
tag: tip
parent: 37086:5b53734f2e9b
parent: 37089:0b7f4bc5ce7f
user: Stefan Manegold <Stefan.Manegold@cwi.nl>
date: Sat Jul 31 08:24:38 2010 +0200
summary: merged stable output fixes from Jun2010
Compile this development version with
--enable-optimize --disable-debug --disable-assert
### Actual Results:
Compilation is stopped.
### Expected Results:
Successful compilation.
## Comment 14581
Date: 2010-08-01 21:05:26 +0200
From: @drstmane
Works fine for me on 64-bit Fedora 12 and works fine with nightly testing on all out testing platforms; cf.,
http://monetdb.cwi.nl/Development/TestWeb/Current/clients/index.html
or directly
http://monetdb.cwi.nl/testing/projects/monetdb/Current/clients/.Makes3/index_short.html
I suppose to also updated and re-built MonetDB, i.e., not only clients, right?
In case you complied fro scratch (i.e., removed at least all build-trees of previous builds; possibly also all prefvious installations of MonetDB), it might be a rare Ubuntu-related problems that we are not aware of, yet (though I don't consider this likely).
In case you did a "delta" compilation after a `hg pull -u` using existing builds-trees and MonetDB installation, it might be that our Makefiles file to check some dependency; in that case I'd recommend to possibly first removed you MonetDB installation (e.g., by running `make uninstall` for all packages in revers order of dependency, then remove all build-trees, and then recompile everything from scratch.
In either case, please report what you did, or whether a rebuild from scratch does work or fail for you.
Thanks!
## Comment 14582
Date: 2010-08-01 22:19:10 +0200
From: Mitja Kleider <<mitja>>
(In reply to comment 1)
I updated and rebuilt everything. The error occurs on a Gentoo machine. There is a Jun2010-SP1 installation on this machine in the default paths, might that cause problems? Is there a way to exclude the existing paths without removing the installation?
## Comment 14583
Date: 2010-08-01 23:00:22 +0200
From: @grobian
Yes it is. You should be using proper PATH with your installation first to get it working. In any case this is not a bug.
## Comment 14584
Date: 2010-08-01 23:56:33 +0200
From: @skinkie
But why does this issue occur in the first place then? Shouldn't it link to the prefix (rpaths for example)?
## Comment 14585
Date: 2010-08-01 23:59:57 +0200
From: Mitja Kleider <<mitja>>
Removing the existing installation in default paths (no prefix) indeed helped.
For the record, the correct locations were also in PATH and PYTHONPATH:
export PYTHONPATH=/opt/monetdb/lib64/python2.6/site-packages:/opt/monetdb/lib/python2.6/site-packages
export PATH=$PATH:/opt/monetdb/bin
## Comment 14586
Date: 2010-08-02 01:31:29 +0200
From: @drstmane
Just to clarify:
1)
Path collections (PATH & PYTHONPATH) are scanned left to right (first to last) and the first hit is used; hence, you need to prepend not append alternative paths you use.
2)
The problem was not linking, but compilation; a wrong version of a header files was included.
3)
By default, configure of clients find the location of MonetDB (and hence the location of the respective header files) by callinging monetdb-config of MonetDB; in the given case the Jun2010-SP1 monetdb-config in /usr/bin/ apparently occurred in the PATH before the default installation in /opt/monetdb/bin/
4)
Yes, we might want to check whether the required version checks in our configure files could be improved.
## Comment 14587
Date: 2010-08-02 01:49:58 +0200
From: @skinkie
Should the --prefix be used to initially find the 'correct' monetdb-config, or is this something that would be counter intuitive?
So for example; --prefix=/opt/monetdb
$PREFIX/bin/monetdb-config is probed first?
## Comment 14588
Date: 2010-08-02 02:05:14 +0200
From: @drstmane
no; follows from configure's standard semantics:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
however, configure of (e.g.,) clients show with --help (a.o.)
--with-monetdb=DIR MonetDB Common is installed in DIR
again following standard configure practice.
And monetdb-config reports the setup of the MonetDB installation it belongs to; also this is commonly agreed standard with *-config scripts.
## Comment 14589
Date: 2010-08-02 02:14:49 +0200
From: @skinkie
So if Mitja would specify --with-monetdb=$PREFIX his problems would be solved?
## Comment 14590
Date: 2010-08-02 08:34:52 +0200
From: @drstmane
The very problem reported here would most probably be fixed this way.
I cannot tell, whether mixing Jun2010-SP1 & default the way you (Mitja) mix them will trigger other problems elsewhere.
I (we) strongly recommend to not mix branches, i.e., to always ensure that you build, e.g., Jun2010-SP1 with/against Jun2010-SP1 (only) and default with/against default (only).
## Comment 14591
Date: 2010-08-02 08:56:14 +0200
From: @grobian
Reopening, because our configure(s) should have choked on the (too old) version of monetdb common.
An issue like this with paths is only a bug if monetdb-install.sh suffers from it as well.
## Comment 14592
Date: 2010-08-02 08:56:57 +0200
From: @grobian
Stefan bumped the requirements in our configure scripts in commit [346158a94e79](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=346158a94e79)
[http//devmonetdborg/hg/MonetDB?cmd=changeset;node=346158a94e79](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=346158a94e79)
## Comment 14593
Date: 2010-08-02 08:58:24 +0200
From: @drstmane
Would(n't) http://dev.monetdb.org/hg/MonetDB/rev/346158a94e79 do the job?
## Comment 14594
Date: 2010-08-02 09:00:51 +0200
From: @drstmane
(oops --- concurrent comment ;-))
## Comment 14602
Date: 2010-08-02 16:26:30 +0200
From: Mitja Kleider <<mitja>>
Thank you for clarifying! Prepending the alternative PATH actually helps. I am aware that it is still not a good idea to have multiple installations at once.
## Comment 14604
Date: 2010-08-02 17:00:21 +0200
From: @drstmane
Having multiple MonetDB installations as such is not a problem at all (I usually have about 20 on my machine), in particularly if one is always consciously aware of why one one is using (e.g., by explicitly setting PATH correctly; mixing different versions of MonetDB (consciously or unconsciously) is usually not a good idea ...
| Mapi.mx: implicit declaration of function | https://api.github.com/repos/MonetDB/MonetDB/issues/2637/comments | 0 | 2020-11-30T11:07:26Z | 2024-06-27T11:48:59Z | https://github.com/MonetDB/MonetDB/issues/2637 | 753,382,336 | 2,637 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-30 17:46:11 +0200
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: mitja, @njnes
Last updated: 2010-07-30 19:22:16 +0200
## Comment 14568
Date: 2010-07-30 17:46:11 +0200
From: @skinkie
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4
Build Identifier:
create table testosm (a int, b int, lat double, lon double);
insert into testosm values (1,2, 1.0, 1.0);
insert into testosm values (1,3, 1.0, 1.0);
insert into testosm values (1,4, 2.0, 2.0);
insert into testosm values (2,4, 1.5, 2.0);
insert into testosm values (2,5, 5.0, 5.0);
select testosm.* from testosm as highest, testosm where testosm.a = highest.a and testosm.b = max(highest.b) group by highest.a;
Subquery result missing
Is the above correct?
Because below shows what I did expect:
select testosm.* from testosm, (select a, max(b) as c from testosm group by a) as highest where highest.a = testosm.a and highest.c = testosm.b;
+------+------+------------------------+------------------------+
| a | b | lat | lon |
+======+======+========================+========================+
| 1 | 4 | 2 | 2 |
| 2 | 5 | 5 | 5 |
+------+------+------------------------+------------------------+
2 tuples (14.878ms)
Reproducible: Always
## Comment 14569
Date: 2010-07-30 18:59:34 +0200
From: @njnes
select * from testosm where testosm.b = (select max(highest.b) from highest where testosm.a = highest.a))
## Comment 14570
Date: 2010-07-30 19:22:16 +0200
From: @skinkie
Just as reference (people are watching).
select * from testosm where testosm.b = (select max(highest.b) from testosm as highest where testosm.a = highest.a);
| Subquery expected with group by, join | https://api.github.com/repos/MonetDB/MonetDB/issues/2636/comments | 0 | 2020-11-30T11:07:23Z | 2024-06-28T13:20:39Z | https://github.com/MonetDB/MonetDB/issues/2636 | 753,382,305 | 2,636 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-30 11:00:16 +0200
From: @arjenderijke
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2010-08-02 14:41:23 +0200
## Comment 14563
Date: 2010-07-30 11:00:16 +0200
From: @arjenderijke
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.10) Gecko/20100622 Fedora/3.5.10-1.fc12 Firefox/3.5.10
Build Identifier:
If you start mserver5 with the --readonly flag, a select query on a view failes with the error: schema statements cannot be executed on a readonly database. This is not correct, a select query on a view should be possible on a readonly database.
Reproducible: Always
### Steps to Reproduce:
I added a test in src/test/mserver5-sql-readonly, mserver5-sql-readonly-view.py to test for this situation
### Expected Results:
The checked in version of -view.stable.out and -view.stable.err contain the results i would expect.
## Comment 14574
Date: 2010-07-30 20:10:11 +0200
From: @njnes
Changeset [6490d659f543](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6490d659f543) 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=6490d659f543](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6490d659f543)
Changeset description:
fix bug #2635 . Unable to query view in readonly mode.
## Comment 14596
Date: 2010-08-02 14:36:40 +0200
From: @arjenderijke
Changeset [f6e87edbd246](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f6e87edbd246) made by Arjen de Rijke <arjen.de.rijke@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f6e87edbd246](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f6e87edbd246)
Changeset description:
Approve output after Niels fix of bug #2635
| Unable to run select query on view if database is started readonly | https://api.github.com/repos/MonetDB/MonetDB/issues/2635/comments | 0 | 2020-11-30T11:07:20Z | 2024-06-27T11:48:58Z | https://github.com/MonetDB/MonetDB/issues/2635 | 753,382,277 | 2,635 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-30 03:21:29 +0200
From: Mark Bucciarelli <<mkbucc>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes, @sjoerdmullender, @skinkie
Last updated: 2011-03-28 17:31:26 +0200
## Comment 14558
Date: 2010-07-30 03:21:29 +0200
From: Mark Bucciarelli <<mkbucc>>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8
Build Identifier:
Full error:
MALException:group.refine:Operation failed
!ERROR: CTrefine: both BATs must have the same cardinality and their heads must form a 1-1 match
This just was raised in my Django application, which talks to MonetDB through the SQL client.
Reproducible: Always
### Steps to Reproduce:
For my schema the following SQL generates the error:
SELECT
"tbl1"."id",
"tbl1"."id1",
"tbl1"."id2"
FROM
"tbl1" INNER JOIN "tbl2" ON ("tbl1"."id1" = "tbl2"."id")
ORDER BY
"tbl2"."title" ASC,
"tbl1"."id1" ASC
LIMIT 21
;
If I remove the LIMIT clause, the query executes without problem.
## Comment 14559
Date: 2010-07-30 03:22:34 +0200
From: Mark Bucciarelli <<mkbucc>>
Changing to SQL component, since removing the LIMIT clause suggests that's where it belongs.
## Comment 14571
Date: 2010-07-30 19:54:11 +0200
From: @njnes
mark do you have example data ? I have a small patch which I want to test. Also this is needed for the testweb later on.
## Comment 14572
Date: 2010-07-30 19:57:51 +0200
From: Mark Bucciarelli <<mkbucc>>
(In reply to comment 2)
> mark do you have example data ? I have a small patch which I want to test. Also
> this is needed for the testweb later on.
i don't think i will be able to get this done today.
it is on my todo list, but i'm behind.
i'm also on vacation next week. i can do it when i
get back.
if the patch applies to feb-sp2, and you think it is
low risk, i can try in production.
## Comment 14575
Date: 2010-07-30 20:10:12 +0200
From: @njnes
Changeset [e134609ff6ec](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e134609ff6ec) 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=e134609ff6ec](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e134609ff6ec)
Changeset description:
fix bug in order by with multiple expressions and limit (bug #2634)
## Comment 14982
Date: 2010-10-05 17:59:14 +0200
From: Mark Bucciarelli <<mkbucc>>
The following SQL triggers the bug. Now I will apply your patch and rebuild to see if it fixes the problem.
Did you patch get in 2nd June release?
-- Bug #2634, dev.monetdb.org/bugzilla
-- Tue Oct 5 11:46:49 EDT 2010
-- To run:
-- 1. Create MonetDB datbase test with user test.
-- 2. mclient -l sql -u test -d test < bug.2634.sql
--
CREATE TABLE "test"."tbl1" (
"id" int NOT NULL,
"id1" int NOT NULL,
"id2" int NOT NULL
)
;
CREATE TABLE "test"."tbl2" (
"id" int NOT NULL,
"title" varchar(10)
)
;
INSERT INTO test.tbl1 VALUES (1,1,1)
;
INSERT INTO test.tbl1 VALUES (2,2,2)
;
INSERT INTO test.tbl2 VALUES (1, 'one')
;
INSERT INTO test.tbl2 VALUES (2, 'two')
;
INSERT INTO test.tbl2 VALUES (3, 'three')
;
--
-- ERROR = !MALException:group.refine:Operation failed
-- !ERROR: CTrefine: both BATs must have the same cardinality and their heads must form a 1-1 match.
--
SELECT
tbl1.id,
tbl1.id1,
tbl1.id2
FROM
test.tbl1 INNER JOIN test.tbl2
ON (tbl1.id1 = tbl2.id)
ORDER BY
tbl2.title ASC,
tbl1.id1 ASC
LIMIT 1
;
DROP TABLE "test"."tbl2";
DROP TABLE "test"."tbl1";
## Comment 14983
Date: 2010-10-05 18:18:21 +0200
From: Mark Bucciarelli <<mkbucc>>
Yes, applying your patch makes the test script run fine.
Thanks!
## Comment 15008
Date: 2010-10-07 16:38:55 +0200
From: @sjoerdmullender
Changeset [77001de7db5e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=77001de7db5e) 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=77001de7db5e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=77001de7db5e)
Changeset description:
Added test for bug #2634.
## Comment 15009
Date: 2010-10-07 16:39:57 +0200
From: @sjoerdmullender
This was fixed in the Jun2010-SP2 release.
Since we now also have a working test, the ticket can be closed.
## Comment 15189
Date: 2010-11-11 22:07:48 +0100
From: @skinkie
Currently having the same issue with the latest head.
copy select distinct kvk, bedrijfsnaam, plaats from kvk order by kvks, sub, bedrijfsnaam into '/home/projects/openkvk/download/www/kvk_bedrijfsnaam_plaats.tsv' using delimiters '\t', '\n' null as '';
MALException:group.refine:operation failed
ERROR: CTrefine: both BATs must have the same cardinality and their heads must form a 1-1 match.
sql>select distinct kvk, bedrijfsnaam, plaats from kvk order by kvks, sub, bedrijfsnaam limit 1;
+-------------+--------------------------------------------+------------+
| kvk | bedrijfsnaam | plaats |
+=============+============================================+============+
| 10000400000 | C.H. van Duijsen Bouwmaterialenhandel B.V. | Leeuwarden |
+-------------+--------------------------------------------+------------+
1 tuple (37.487ms)
## Comment 15264
Date: 2010-12-03 22:07:19 +0100
From: @njnes
problem was fixed and test was added (some time ago)
## Comment 15619
Date: 2011-03-28 17:31:26 +0200
From: @sjoerdmullender
The Mar2011 version has been released.
| !ERROR: CTrefine: both BATs must have the same cardinality ... | https://api.github.com/repos/MonetDB/MonetDB/issues/2634/comments | 0 | 2020-11-30T11:07:16Z | 2024-06-27T11:48:57Z | https://github.com/MonetDB/MonetDB/issues/2634 | 753,382,241 | 2,634 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-29 12:26:20 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 2.38.3 (Jun2010-SP1) [obsolete]
CC: @njnes
Last updated: 2010-08-30 09:18:02 +0200
## Comment 14555
Date: 2010-07-29 12:26:20 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.10) Gecko/20100622 Fedora/3.5.10-1.fc12 Firefox/3.5.10 GTB7.0
Build Identifier:
The sql code in attachment creates the schema for an empty DB and defines many (generated) views on top of that.
An EXPLAIN SELECT * on the top view results in a very large relational plan, but works fine.
Adding a LIMIT clause, however, crashes the server during the translation into MAL (rel2bin). See gdb bt.
Reproducible: Always
### Steps to Reproduce:
1.create an empty db
2.feed it with the sql code in attachment
3.
### Actual Results:
SIGABRT
### Expected Results:
MAL code is expected out of the EXPLAIN statement.
$ mserver5 --version
MonetDB server v5.20.4 (64-bit), based on kernel v1.38.4 (64-bit oids)
Not released
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
Visit http://monetdb.cwi.nl/ for further information
Found 7.8GiB available memory, 4 available cpu cores
Configured for prefix: /ufs/roberto/lhm_code/IndexCenter/MonetDB/MonetDB.Spinque_Jun2010/MonetDB
Libraries:
libpcre: 7.8 2008-09-05 (compiled with 7.8)
openssl: OpenSSL 1.0.0a 1 Jun 2010 (compiled with OpenSSL 1.0.0a-fips 1 Jun 2010)
libxml2: 2.7.6 (compiled with 2.7.6)
Compiled by: roberto@skadi.ins.cwi.nl (x86_64-unknown-linux-gnu)
Compilation: gcc -Wall -Wextra -fno-strict-aliasing -g -Werror-implicit-function-declaration -Werror -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/bin/ld -IPA -m elf_x86_64
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fad3d31c710 (LWP 15201)]
0x00000039e2a326c5 in raise () from /lib64/libc.so.6
(gdb) bt
0 0x00000039e2a326c5 in raise () from /lib64/libc.so.6
1 0x00000039e2a33ea5 in abort () from /lib64/libc.so.6
2 0x00000039e2a2b7b5 in __assert_fail () from /lib64/libc.so.6
3 0x00007fad3e614fde in rel2bin_project (sql=0x7fad30005438, rel=0x7fad30442f28, refs=0x7fad30478a68, topn=0x0)
at /ufs/roberto/lhm_code/IndexCenter/MonetDB/MonetDB.Spinque_Jun2010/src/sql/src/server/rel_bin.mx:1571
4 0x00007fad3e61d920 in subrel_bin (sql=0x7fad30005438, rel=0x7fad30442f28, refs=0x7fad30478a68)
at /ufs/roberto/lhm_code/IndexCenter/MonetDB/MonetDB.Spinque_Jun2010/src/sql/src/server/rel_bin.mx:3853
5 0x00007fad3e614eca in rel2bin_project (sql=0x7fad30005438, rel=0x7fad30442838, refs=0x7fad30478a68, topn=0x7fad30396c58)
at /ufs/roberto/lhm_code/IndexCenter/MonetDB/MonetDB.Spinque_Jun2010/src/sql/src/server/rel_bin.mx:1554
6 0x00007fad3e616182 in rel2bin_topn (sql=0x7fad30005438, rel=0x7fad30396c58, refs=0x7fad30478a68)
at /ufs/roberto/lhm_code/IndexCenter/MonetDB/MonetDB.Spinque_Jun2010/src/sql/src/server/rel_bin.mx:1918
7 0x00007fad3e61d9aa in subrel_bin (sql=0x7fad30005438, rel=0x7fad30396c58, refs=0x7fad30478a68)
at /ufs/roberto/lhm_code/IndexCenter/MonetDB/MonetDB.Spinque_Jun2010/src/sql/src/server/rel_bin.mx:3865
8 0x00007fad3e61dbb2 in output_rel_bin (sql=0x7fad30005438, rel=0x7fad30396c58)
at /ufs/roberto/lhm_code/IndexCenter/MonetDB/MonetDB.Spinque_Jun2010/src/sql/src/server/rel_bin.mx:3915
9 0x00007fad3e54b40f in sql_symbol2stmt (c=0x7fad30005438, sym=0x7fad304438a8)
at /ufs/roberto/lhm_code/IndexCenter/MonetDB/MonetDB.Spinque_Jun2010/src/sql/src/backends/monet5/sql.mx:1354
10 0x00007fad3e597669 in SQLparser (c=0x605b38)
at /ufs/roberto/lhm_code/IndexCenter/MonetDB/MonetDB.Spinque_Jun2010/src/sql/src/backends/monet5/sql_scenario.mx:1177
11 0x00007fad569d9cb2 in runPhase (c=0x605b38, phase=1)
at /ufs/roberto/lhm_code/IndexCenter/MonetDB/MonetDB.Spinque_Jun2010/src/MonetDB5/src/mal/mal_scenario.mx:604
12 0x00007fad569d9dea in runScenarioBody (c=0x605b38)
at /ufs/roberto/lhm_code/IndexCenter/MonetDB/MonetDB.Spinque_Jun2010/src/MonetDB5/src/mal/mal_scenario.mx:646
13 0x00007fad569da071 in runScenario (c=0x605b38)
at /ufs/roberto/lhm_code/IndexCenter/MonetDB/MonetDB.Spinque_Jun2010/src/MonetDB5/src/mal/mal_scenario.mx:682
14 0x00007fad5698df69 in MSserveClient (dummy=0x605b38)
at /ufs/roberto/lhm_code/IndexCenter/MonetDB/MonetDB.Spinque_Jun2010/src/MonetDB5/src/mal/mal_session.mx:473
15 0x00000039e3606a3a in start_thread () from /lib64/libpthread.so.0
16 0x00000039e2ade77d in clone () from /lib64/libc.so.6
17 0x0000000000000000 in ?? ()
## Comment 14556
Date: 2010-07-29 12:27:52 +0200
From: @swingbit
Created attachment 23
SQL code to reproduce the bug
> Attached file: [rel2bin_bug.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2633_rel2bin_bug.sql_23) (application/octet-stream, 12208 bytes)
> Description: SQL code to reproduce the bug
## Comment 14576
Date: 2010-07-30 22:36:29 +0200
From: @njnes
by pushing the topn down an alias was lost, this is fixed now.
## Comment 14577
Date: 2010-07-30 22:48:04 +0200
From: @njnes
Changeset [07b938fc43e0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=07b938fc43e0) 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=07b938fc43e0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=07b938fc43e0)
Changeset description:
fixed bug #2633. An alias got lost.
## Comment 14578
Date: 2010-07-30 23:00:43 +0200
From: @njnes
Changeset [dac56439dc53](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dac56439dc53) 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=dac56439dc53](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=dac56439dc53)
Changeset description:
add test script for bug #2633
## Comment 14798
Date: 2010-08-30 09:18:02 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
| crash in rel2bin with complex query and LIMIT | https://api.github.com/repos/MonetDB/MonetDB/issues/2633/comments | 0 | 2020-11-30T11:07:13Z | 2024-06-27T11:48:56Z | https://github.com/MonetDB/MonetDB/issues/2633 | 753,382,208 | 2,633 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-27 13:09:04 +0200
From: @skinkie
To: clients devs <<bugs-clients>>
Version: -- development
Last updated: 2010-11-15 09:39:08 +0100
## Comment 14542
Date: 2010-07-27 13:09:04 +0200
From: @skinkie
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4
Build Identifier:
As $subj, patch attached.
Reproducible: Always
## Comment 14543
Date: 2010-07-27 13:10:06 +0200
From: @skinkie
Created attachment 21
Patch implements termination handler for use with readline.
> Attached file: [mclient-ctrlc.diff](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2632_mclient-ctrlc.diff_21) (text/plain, 1299 bytes)
> Description: Patch implements termination handler for use with readline.
## Comment 14544
Date: 2010-07-27 13:12:06 +0200
From: @skinkie
Created attachment 22
Patch implements termination handler for use with readline
hg didn't diff what i expected to diff
> Attached file: [mclient-ctrlc.diff](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2632_mclient-ctrlc.diff_22) (text/plain, 904 bytes)
> Description: Patch implements termination handler for use with readline
## Comment 14950
Date: 2010-09-29 15:07:45 +0200
From: @skinkie
ping.
## Comment 14952
Date: 2010-10-01 16:50:44 +0200
From: @sjoerdmullender
Changeset [9f7d76987f96](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9f7d76987f96) 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=9f7d76987f96](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9f7d76987f96)
Changeset description:
Save readline history as we go along.
This is a different (and better, since we don't depend on interrupts)
way for fixing bug #2632.
## Comment 14953
Date: 2010-10-01 16:54:07 +0200
From: @sjoerdmullender
Something with a similar effect as what was requested has been implemented.
| Save history after ctrl-c | https://api.github.com/repos/MonetDB/MonetDB/issues/2632/comments | 0 | 2020-11-30T11:07:10Z | 2024-06-27T11:48:55Z | https://github.com/MonetDB/MonetDB/issues/2632 | 753,382,174 | 2,632 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-26 11:20:08 +0200
From: Jan Rittinger <<jan.rittinger>>
To: SQL devs <<bugs-sql>>
Version: 2.38.3 (Jun2010-SP1) [obsolete]
CC: @njnes
Last updated: 2010-08-30 09:17:56 +0200
## Comment 14535
Date: 2010-07-26 11:20:08 +0200
From: Jan Rittinger <<jan.rittinger>>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-us) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16
Build Identifier:
WITH t (i) AS (SELECT ROW_NUMBER () OVER (ORDER BY id ASC) AS i FROM tables)
select i from t;
crashes Mserver with
Assertion failed: (0), function rel2bin_project, file /Users/rittinge/Pathfinder/git/sql/src/server/rel_bin.mx, line 1569.
Removing the order clause ('ORDER BY id ASC') makes the query work again...
Reproducible: Always
### Steps to Reproduce:
1. Run above query :)
### Actual Results:
Mserver crashes
### Expected Results:
Mserver should return a result :)
## Comment 14536
Date: 2010-07-26 11:27:58 +0200
From: @drstmane
problem also occurs with Jun2010-SP1:
mserver5: /ufs/manegold/_/scratch0/Monet/HG/Jun2010/source/sql/src/server/rel_bin.mx:1571: rel2bin_project: Assertion `0' failed.
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffdf498710 (LWP 24864)]
0x000000347b8326c5 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install bzip2-libs-1.0.5-6.fc12.x86_64 cyrus-sasl-lib-2.1.23-9.fc12.x86_64 geos-3.2.1-1.fc12.x86_64 glibc-2.11.2-1.x86_64 keyutils-libs-1.2-6.fc12.x86_64 krb5-libs-1.7.1-9.fc12.x86_64 libcom_err-1.41.9-7.fc12.x86_64 libcurl-7.19.7-10.fc12.x86_64 libgcc-4.4.4-10.fc12.x86_64 libidn-1.9-5.x86_64 libselinux-2.0.90-5.fc12.x86_64 libssh2-1.2.4-1.fc12.x86_64 libstdc++-4.4.4-10.fc12.x86_64 libuuid-2.16.2-9.fc12.x86_64 libxml2-2.7.6-2.fc12.x86_64 libxslt-1.1.26-1.fc12.x86_64 ncurses-libs-5.7-3.20090207.fc12.x86_64 nspr-4.8.4-2.fc12.x86_64 nss-3.12.6-7.fc12.x86_64 nss-softokn-freebl-3.12.6-2.fc12.1.x86_64 nss-util-3.12.6-1.fc12.x86_64 openldap-2.4.19-4.fc12.x86_64 openssl-1.0.0a-1.fc12.x86_64 pcre-7.8-3.fc12.x86_64 raptor-1.4.18-5.fc12.x86_64 readline-6.0-3.fc12.x86_64 zlib-1.2.3-23.fc12.x86_64
(gdb) bt
0 0x000000347b8326c5 in raise () from /lib64/libc.so.6
1 0x000000347b833ea5 in abort () from /lib64/libc.so.6
2 0x000000347b82b7b5 in __assert_fail () from /lib64/libc.so.6
3 0x00007fffe034e02e in rel2bin_project (sql=0x7fffd0005438, rel=0x7fffd007abc8, refs=0x7fffd005a5d8, topn=0x0) at /ufs/manegold/_/scratch0/Monet/HG/Jun2010/source/sql/src/server/rel_bin.mx:1571
4 0x00007fffe0356970 in subrel_bin (sql=0x7fffd0005438, rel=0x7fffd007abc8, refs=0x7fffd005a5d8) at /ufs/manegold/_/scratch0/Monet/HG/Jun2010/source/sql/src/server/rel_bin.mx:3853
5 0x00007fffe034df1a in rel2bin_project (sql=0x7fffd0005438, rel=0x7fffd007ac68, refs=0x7fffd005a5d8, topn=0x0) at /ufs/manegold/_/scratch0/Monet/HG/Jun2010/source/sql/src/server/rel_bin.mx:1554
6 0x00007fffe0356970 in subrel_bin (sql=0x7fffd0005438, rel=0x7fffd007ac68, refs=0x7fffd005a5d8) at /ufs/manegold/_/scratch0/Monet/HG/Jun2010/source/sql/src/server/rel_bin.mx:3853
7 0x00007fffe0356c02 in output_rel_bin (sql=0x7fffd0005438, rel=0x7fffd007ac68) at /ufs/manegold/_/scratch0/Monet/HG/Jun2010/source/sql/src/server/rel_bin.mx:3915
8 0x00007fffe028445f in sql_symbol2stmt (c=0x7fffd0005438, sym=0x7fffd00c1588) at /ufs/manegold/_/scratch0/Monet/HG/Jun2010/source/sql/src/backends/monet5/sql.mx:1354
9 0x00007fffe02d06b9 in SQLparser (c=0x605b38) at /ufs/manegold/_/scratch0/Monet/HG/Jun2010/source/sql/src/backends/monet5/sql_scenario.mx:1177
10 0x00007ffff7d22bde in runPhase (c=0x605b38, phase=1) at /ufs/manegold/_/scratch0/Monet/HG/Jun2010/source/MonetDB5/src/mal/mal_scenario.mx:604
11 0x00007ffff7d22d16 in runScenarioBody (c=0x605b38) at /ufs/manegold/_/scratch0/Monet/HG/Jun2010/source/MonetDB5/src/mal/mal_scenario.mx:646
12 0x00007ffff7d22f9d in runScenario (c=0x605b38) at /ufs/manegold/_/scratch0/Monet/HG/Jun2010/source/MonetDB5/src/mal/mal_scenario.mx:682
13 0x00007ffff7cd6ef9 in MSserveClient (dummy=0x605b38) at /ufs/manegold/_/scratch0/Monet/HG/Jun2010/source/MonetDB5/src/mal/mal_session.mx:473
14 0x000000347c406a3a in start_thread () from /lib64/libpthread.so.0
15 0x000000347b8de77d in clone () from /lib64/libc.so.6
16 0x0000000000000000 in ?? ()
(gdb) up
1 0x000000347b833ea5 in abort () from /lib64/libc.so.6
(gdb)
2 0x000000347b82b7b5 in __assert_fail () from /lib64/libc.so.6
(gdb)
3 0x00007fffe034e02e in rel2bin_project (sql=0x7fffd0005438, rel=0x7fffd007abc8, refs=0x7fffd005a5d8, topn=0x0) at /ufs/manegold/_/scratch0/Monet/HG/Jun2010/source/sql/src/server/rel_bin.mx:1571
1571 assert(0);
(gdb) li
1566 for( en = rel->exps->h; en; en = en->next ) {
1567 sql_exp *exp = en->data;
1568 stmt *s = exp_bin(sql, exp, sub, NULL, NULL, NULL);
1569
1570 if (!s) {
1571 assert(0);
1572 cond_stmt_destroy(sub);
1573 list_destroy(pl);
1574 return NULL;
1575 }
(gdb) p s
$1 = (stmt *) 0x0
(gdb) p sql
$2 = (mvc *) 0x7fffd0005438
(gdb) p *sql
$3 = {errstr = "\000ELECT: identifier 'name' unknown", '\000' <repeats 8158 times>, sa = 0x7fffd00630f8, ra = 0x0, ba = 0x0, qc = 0x7fffd00075a8, prepare_qc = 0x7fffd00075d8, clientid = 1, scanner = {rs = 0x7fffd8006bc0, ws = 0x7fffd8004af0, log = 0x0, yynext = 0, yylast = 259, yysval = 92, yyval = 385,
yycur = 93, yybak = 10 '\n', as = 0, key = 787, started = 1, mode = LINE_N, schema = 0x0}, params = 0x0, vars = 0x7fffd0017888, topvars = 9, sizevars = 32, frame = 1, args = 0x7fffd00180a8, argc = 0, argmax = 32, argfixed = 0, sym = 0x7fffd00c1588, user_id = 3, role_id = 3, last_id = -1, timezone = 0,
cache = 1, history = 0, reply_size = -1, debug = 0, emode = 0 '\000', emod = 0 '\000', session = 0x7fffd00181c8, type = 1, label = 3, cascade_action = 0x0, opt_stats = {0, 0, 0, 0, 0, 0, 0, 0}, result_id = 1, results = 0x0, last = 0x0, times = {tms_utime = 0, tms_stime = 0, tms_cutime = 0,
tms_cstime = 0}, Tparse = 5104165}
(gdb) p exp
$4 = (sql_exp *) 0x7fffd0089568
(gdb) p *exp
$5 = {ref = {refcnt = 4}, type = e_func, name = 0x7fffd00895c8 "i", rname = 0x7fffd0089d08 "t", l = 0x0, r = 0x7fffd005a388, f = 0x7fffd0089528, flag = 0, card = 1 '\001', used = 1, p = 0x0}
(gdb) p sub
$6 = (stmt *) 0x7fffd00b67f8
(gdb) p *sub
$7 = {ref = {refcnt = 1}, type = st_list, op1 = {ival = -805072088, sval = 0x7fffd0039328 "", aval = 0x7fffd0039328, lval = 0x7fffd0039328, stval = 0x7fffd0039328, gval = 0x7fffd0039328, cval = 0x7fffd0039328, kval = 0x7fffd0039328, idxval = 0x7fffd0039328, tval = 0x7fffd0039328, schema = 0x7fffd0039328,
typeval = {type = 0x7fffd0039328, digits = 3688618971, scale = 3688618971, comp_type = 0xdbdbdbdbdbdbdbdb}, aggrval = 0x7fffd0039328, funcval = 0x7fffd0039328}, op2 = {ival = 0, sval = 0x0, aval = 0x0, lval = 0x0, stval = 0x0, gval = 0x0, cval = 0x0, kval = 0x0, idxval = 0x0, tval = 0x0, schema = 0x0,
typeval = {type = 0x0, digits = 3688618971, scale = 3688618971, comp_type = 0xdbdbdbdbdbdbdbdb}, aggrval = 0x0, funcval = 0x0}, op3 = {ival = 0, sval = 0x0, aval = 0x0, lval = 0x0, stval = 0x0, gval = 0x0, cval = 0x0, kval = 0x0, idxval = 0x0, tval = 0x0, schema = 0x0, typeval = {type = 0x0,
digits = 3688618971, scale = 3688618971, comp_type = 0xdbdbdbdbdbdbdbdb}, aggrval = 0x0, funcval = 0x0}, op4 = {ival = 0, sval = 0x0, aval = 0x0, lval = 0x0, stval = 0x0, gval = 0x0, cval = 0x0, kval = 0x0, idxval = 0x0, tval = 0x0, schema = 0x0, typeval = {type = 0x0, digits = 3688618971,
scale = 3688618971, comp_type = 0xdbdbdbdbdbdbdbdb}, aggrval = 0x0, funcval = 0x0}, nrcols = 1 '\001', key = 0 '\000', aggr = 0 '\000', flag = 0, nr = 0, nr2 = -2147483648, h = 0x0, t = 0x0, optimized = -1, rewritten = 0x0}
(gdb) p rel->exps->h
$8 = (node *) 0x7fffd007b0c8
(gdb) p *rel->exps->h
$9 = {next = 0x0, data = 0x7fffd0089568}
(gdb) p rel->exps->h->data
$10 = (void *) 0x7fffd0089568
(gdb) p *rel->exps->h->data
Attempt to dereference a generic pointer.
(gdb) p *(sql_exp*)rel->exps->h->data
$11 = {ref = {refcnt = 4}, type = e_func, name = 0x7fffd00895c8 "i", rname = 0x7fffd0089d08 "t", l = 0x0, r = 0x7fffd005a388, f = 0x7fffd0089528, flag = 0, card = 1 '\001', used = 1, p = 0x0}
(gdb) p en
$12 = (node *) 0x7fffd007b0c8
(gdb) p *en
$13 = {next = 0x0, data = 0x7fffd0089568}
## Comment 14553
Date: 2010-07-29 08:42:40 +0200
From: @njnes
Added test (with_row_number_crash.Bug-2631.sql)
## Comment 14554
Date: 2010-07-29 08:43:47 +0200
From: @njnes
Fixed, the expression created for the 'rownumber' function had incorrect cardinality. This is fixed, given the correct projection and solving the crash.
## Comment 14557
Date: 2010-07-29 12:47:44 +0200
From: @njnes
Changeset [0509ca6d5d33](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0509ca6d5d33) 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=0509ca6d5d33](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0509ca6d5d33)
Changeset description:
fixed bug in handling 'WITH' and row_number(), Bug #2631
The cardinality of the row_number expression was incorrect.
## Comment 14783
Date: 2010-08-30 09:17:56 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
## Comment 15830
Date: 2011-05-26 20:38:36 +0200
From: @drstmane
Changeset [b569bcc61bec](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b569bcc61bec) 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=b569bcc61bec](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b569bcc61bec)
Changeset description:
Merge with Apr2011 branch:
merging with Niels' back-ported changeset [f33773f721a8;](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f33773f721a8;)
no actual changes;
files sql/backends/monet5/sql_gencode.mx, sql/server/rel_prop.c, sql/server/rel_prop.h,
sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out, sql/benchmarks/tpch/Tests/01-22.stable.out
already contained the changes;
ignoring conflicts in sql/server/rel_optimizer.c, assuming they are only due to
new features in the default branch;
also ignoring conflicts in sql/test/BugDay_2005-10-06_2.9.3/Tests/view_on_deleted_table.SF-938583.stable.out,
sql/test/BugTracker-2009/Tests/lookup_column_name_bug_1.SF-2654300.stable.out,
sql/test/BugTracker-2009/Tests/lookup_column_name_bug_2.SF-2656762.stable.out,
sql/test/BugTracker-2010/Tests/with_row_number_crash.Bug-2631.stable.out,
sql/test/BugTracker/Tests/nested_views_algebra_version.SF-1993765.stable.out,
sql/test/BugTracker/Tests/variable_stack_crash.SF-1711251-2.stable.out,
sql/test/BugTracker/Tests/variable_stack_crash.SF-1711251.stable.out,
sql/test/osm/Tests/exp_name_bug.stable.out,
sql/test/xquery/Tests/q01.stable.out,
where necessary, stable output in the default branch needs to be checked
and re-approved.
| Combination of WITH and numbering function crashes Mserver | https://api.github.com/repos/MonetDB/MonetDB/issues/2631/comments | 0 | 2020-11-30T11:07:06Z | 2024-06-27T11:48:54Z | https://github.com/MonetDB/MonetDB/issues/2631 | 753,382,116 | 2,631 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-22 19:14:22 +0200
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @mlkersten, sellam, @drstmane
Last updated: 2016-04-11 11:46:27 +0200
## Comment 14517
Date: 2010-07-22 19:14:22 +0200
From: @skinkie
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4
Build Identifier:
sql>plan select uitspraken.id, length(uitspraken.uitspraak)=length(uitspraken_new.uitspraak) from uitspraken, uitspraken_new where uitspraken.id = uitspraken_new.id;
% .plan table_name
% rel name
% clob type
% 116 length
project (
| join (
| | table(sys.uitspraken) [ uitspraken.id NOT NULL, uitspraken.uitspraak, uitspraken.%TID% NOT NULL ],
| | table(sys.uitspraken_new) [ uitspraken_new.id NOT NULL, uitspraken_new.uitspraak, uitspraken_new.%TID% NOT NULL ]
| ) [ uitspraken.id NOT NULL = uitspraken_new.id NOT NULL ]
) [ uitspraken.id NOT NULL, =(length(uitspraken.uitspraak), length(uitspraken_new.uitspraak)) ]
sql>plan select uitspraken.id, length(uitspraken.uitspraak), length(uitspraken_new.uitspraak) from uitspraken, uitspraken_new where uitspraken.id = uitspraken_new.id and length(uitspraken.uitspraak) <> length(uitspraken_new.uitspraak);
% .plan table_name
% rel name
% clob type
% 124 length
project (
| join (
| | table(sys.uitspraken) [ uitspraken.id NOT NULL, uitspraken.uitspraak, uitspraken.%TID% NOT NULL ],
| | table(sys.uitspraken_new) [ uitspraken_new.id NOT NULL, uitspraken_new.uitspraak, uitspraken_new.%TID% NOT NULL ]
| ) [ uitspraken.id NOT NULL = uitspraken_new.id NOT NULL, length(uitspraken.uitspraak) != length(uitspraken_new.uitspraak) ]
) [ uitspraken.id NOT NULL, length(uitspraken.uitspraak), length(uitspraken_new.uitspraak) ]
First query finishes in 76ms, second doesn't finish fast enough.
sql>explain select uitspraken.id, length(uitspraken.uitspraak)=length(uitspraken_new.uitspraak) from uitspraken, uitspraken_new where uitspraken.id = uitspraken_new.id;
% .explain table_name
% mal name
% clob type
% 0 length
function user.s1_1{autoCommit=true}():void;
_2 := sql.mvc();
barrier _139 := language.dataflow();
_71:bat[:oid,:int] := sql.bind(_2,"sys","uitspraken","id",0,0@0:oid,87752@0);
_7:bat[:oid,:int] := sql.bind(_2,"sys","uitspraken","id",2);
_76 := algebra.kdifference(_71,_7);
_78 := algebra.semijoin(_7,_71);
_80 := algebra.kunion(_76,_78);
_11:bat[:oid,:oid] := sql.bind_dbat(_2,"sys","uitspraken",1);
_12 := bat.reverse(_11);
_82 := algebra.kdifference(_80,_12);
_13:bat[:oid,:int] := sql.bind(_2,"sys","uitspraken_new","id",0);
_15:bat[:oid,:int] := sql.bind(_2,"sys","uitspraken_new","id",2);
_16 := algebra.kdifference(_13,_15);
_17 := algebra.kunion(_16,_15);
_18:bat[:oid,:int] := sql.bind(_2,"sys","uitspraken_new","id",1);
_19 := algebra.kunion(_17,_18);
_20:bat[:oid,:oid] := sql.bind_dbat(_2,"sys","uitspraken_new",1);
_21 := bat.reverse(_20);
_22 := algebra.kdifference(_19,_21);
_23 := bat.reverse(_22);
_85 := algebra.join(_82,_23);
_88 := algebra.markT(_85,3,0);
_99 := bat.reverse(_88);
_74:bat[:oid,:str] := sql.bind(_2,"sys","uitspraken","uitspraak",0,0@0:oid,87752@0);
_26:bat[:oid,:str] := sql.bind(_2,"sys","uitspraken","uitspraak",2);
_108 := algebra.kdifference(_74,_26);
_110 := algebra.semijoin(_26,_74);
_112 := algebra.kunion(_108,_110);
_114 := algebra.leftjoin(_99,_112);
_73:bat[:oid,:int] := sql.bind(_2,"sys","uitspraken","id",0,87752@0,nil:oid);
_77 := algebra.kdifference(_73,_7);
_79 := algebra.semijoin(_7,_73);
_81 := algebra.kunion(_77,_79);
_83 := algebra.kdifference(_81,_12);
_86 := algebra.join(_83,_23);
_91 := algebra.markT(_86,3,1);
_102 := bat.reverse(_91);
_75:bat[:oid,:str] := sql.bind(_2,"sys","uitspraken","uitspraak",0,87752@0,nil:oid);
_109 := algebra.kdifference(_75,_26);
_111 := algebra.semijoin(_26,_75);
_113 := algebra.kunion(_109,_111);
_115 := algebra.leftjoin(_102,_113);
_9:bat[:oid,:int] := sql.bind(_2,"sys","uitspraken","id",1);
_84 := algebra.kdifference(_9,_12);
_87 := algebra.join(_84,_23);
_94 := algebra.markT(_87,3,2);
_104 := bat.reverse(_94);
_29:bat[:oid,:str] := sql.bind(_2,"sys","uitspraken","uitspraak",1);
_116 := algebra.leftjoin(_104,_29);
_30 := mat.pack(_114,_115,_116);
_107 := algebra.leftjoin(_104,_9);
_106 := algebra.leftjoin(_102,_81);
_105 := algebra.leftjoin(_99,_80);
exit _139;
_148 := bat.new(nil:oid,nil:int);
barrier (_152,_153,_154) := bat.newIterator(_30);
_156 := str.stringlength(_154);
bat.insert(_148,_153,_156);
redo (_152,_153,_154) := bat.hasMoreElements(_30);
exit (_152,_153,_154);
_30 := nil:BAT;
_31:bat[:oid,:int] := _148;
barrier _142 := language.dataflow();
_117 := bat.reverse(_85);
_121 := algebra.markT(_117,3,0);
_129 := bat.reverse(_121);
_34:bat[:oid,:str] := sql.bind(_2,"sys","uitspraken_new","uitspraak",0);
_37:bat[:oid,:str] := sql.bind(_2,"sys","uitspraken_new","uitspraak",2);
_39 := algebra.kdifference(_34,_37);
_40 := algebra.kunion(_39,_37);
_41:bat[:oid,:str] := sql.bind(_2,"sys","uitspraken_new","uitspraak",1);
_43 := algebra.kunion(_40,_41);
_135 := algebra.leftjoin(_129,_43);
_119 := bat.reverse(_86);
_124 := algebra.markT(_119,3,1);
_130 := bat.reverse(_124);
_137 := algebra.leftjoin(_130,_43);
_120 := bat.reverse(_87);
_127 := algebra.markT(_120,3,2);
_131 := bat.reverse(_127);
_138 := algebra.leftjoin(_131,_43);
_44 := mat.pack(_135,_137,_138);
exit _142;
_161 := bat.new(nil:oid,nil:int);
barrier (_163,_164,_165) := bat.newIterator(_44);
_167 := str.stringlength(_165);
bat.insert(_161,_164,_167);
redo (_163,_164,_165) := bat.hasMoreElements(_44);
exit (_163,_164,_165);
_44 := nil:BAT;
_45:bat[:oid,:int] := _161;
barrier _145 := language.dataflow();
_24 := mat.pack(_105,_106,_107);
_46:bat[:oid,:bit] := batcalc.==(_31,_45);
exit _145;
_47 := sql.resultSet(2,1,_24);
sql.rsColumn(_47,"sys.uitspraken","id","int",32,0,_24);
sql.rsColumn(_47,"sys.","=_length_uitspraak","boolean",1,0,_46);
_57 := io.stdout();
sql.exportResult(_57,_47);
end s1_1;
sql>explain select uitspraken.id, length(uitspraken.uitspraak), length(uitspraken_new.uitspraak) from uitspraken, uitspraken_new where uitspraken.id = uitspraken_new.id and length(uitspraken.uitspraak) <> length(uitspraken_new.uitspraak);
% .explain table_name
% mal name
% clob type
% 0 length
function user.s2_1{autoCommit=true}():void;
_2 := sql.mvc();
barrier _251 := language.dataflow();
_87:bat[:oid,:str] := sql.bind(_2,"sys","uitspraken","uitspraak",0,0@0:oid,87752@0);
_25:bat[:oid,:str] := sql.bind(_2,"sys","uitspraken","uitspraak",2);
_118 := algebra.kdifference(_87,_25);
_120 := algebra.semijoin(_25,_87);
_122 := algebra.kunion(_118,_120);
_29:bat[:oid,:oid] := sql.bind_dbat(_2,"sys","uitspraken",1);
_30 := bat.reverse(_29);
_125 := algebra.kdifference(_122,_30);
_88:bat[:oid,:str] := sql.bind(_2,"sys","uitspraken","uitspraak",0,87752@0,nil:oid);
_119 := algebra.kdifference(_88,_25);
_121 := algebra.semijoin(_25,_88);
_123 := algebra.kunion(_119,_121);
_126 := algebra.kdifference(_123,_30);
_28:bat[:oid,:str] := sql.bind(_2,"sys","uitspraken","uitspraak",1);
_127 := algebra.kdifference(_28,_30);
_31 := mat.pack(_125,_126,_127);
_9:bat[:oid,:int] := sql.bind(_2,"sys","uitspraken","id",1);
_11:bat[:oid,:oid] := sql.bind_dbat(_2,"sys","uitspraken",1);
_12 := bat.reverse(_11);
_97 := algebra.kdifference(_9,_12);
_13:bat[:oid,:int] := sql.bind(_2,"sys","uitspraken_new","id",0);
_15:bat[:oid,:int] := sql.bind(_2,"sys","uitspraken_new","id",2);
_16 := algebra.kdifference(_13,_15);
_17 := algebra.kunion(_16,_15);
_18:bat[:oid,:int] := sql.bind(_2,"sys","uitspraken_new","id",1);
_19 := algebra.kunion(_17,_18);
_20:bat[:oid,:oid] := sql.bind_dbat(_2,"sys","uitspraken_new",1);
_21 := bat.reverse(_20);
_22 := algebra.kdifference(_19,_21);
_23 := bat.reverse(_22);
_100 := algebra.join(_97,_23);
_107 := algebra.markT(_100,3,2);
_117 := bat.reverse(_107);
_86:bat[:oid,:int] := sql.bind(_2,"sys","uitspraken","id",0,87752@0,nil:oid);
_7:bat[:oid,:int] := sql.bind(_2,"sys","uitspraken","id",2);
_90 := algebra.kdifference(_86,_7);
_92 := algebra.semijoin(_7,_86);
_94 := algebra.kunion(_90,_92);
_96 := algebra.kdifference(_94,_12);
_99 := algebra.join(_96,_23);
_104 := algebra.markT(_99,3,1);
_115 := bat.reverse(_104);
_84:bat[:oid,:int] := sql.bind(_2,"sys","uitspraken","id",0,0@0:oid,87752@0);
_89 := algebra.kdifference(_84,_7);
_91 := algebra.semijoin(_7,_84);
_93 := algebra.kunion(_89,_91);
_95 := algebra.kdifference(_93,_12);
_98 := algebra.join(_95,_23);
_101 := algebra.markT(_98,3,0);
_112 := bat.reverse(_101);
exit _251;
_264 := bat.new(nil:oid,nil:int);
barrier (_268,_269,_270) := bat.newIterator(_31);
_272 := str.stringlength(_270);
bat.insert(_264,_269,_272);
redo (_268,_269,_270) := bat.hasMoreElements(_31);
exit (_268,_269,_270);
_31 := nil:BAT;
_32:bat[:oid,:int] := _264;
barrier _254 := language.dataflow();
_35:bat[:oid,:str] := sql.bind(_2,"sys","uitspraken_new","uitspraak",0);
_38:bat[:oid,:str] := sql.bind(_2,"sys","uitspraken_new","uitspraak",2);
_40 := algebra.kdifference(_35,_38);
_41 := algebra.kunion(_40,_38);
_42:bat[:oid,:str] := sql.bind(_2,"sys","uitspraken_new","uitspraak",1);
_44 := algebra.kunion(_41,_42);
_45:bat[:oid,:oid] := sql.bind_dbat(_2,"sys","uitspraken_new",1);
_46 := bat.reverse(_45);
_47 := algebra.kdifference(_44,_46);
_134 := bat.reverse(_100);
_141 := algebra.markT(_134,3,2);
_148 := bat.reverse(_141);
_133 := bat.reverse(_99);
_138 := algebra.markT(_133,3,1);
_147 := bat.reverse(_138);
_131 := bat.reverse(_98);
_135 := algebra.markT(_131,3,0);
_144 := bat.reverse(_135);
_130 := algebra.leftjoin(_117,_32);
_129 := algebra.leftjoin(_115,_32);
_128 := algebra.leftjoin(_112,_32);
exit _254;
_277 := bat.new(nil:oid,nil:int);
barrier (_279,_280,_281) := bat.newIterator(_47);
_283 := str.stringlength(_281);
bat.insert(_277,_280,_283);
redo (_279,_280,_281) := bat.hasMoreElements(_47);
exit (_279,_280,_281);
_47 := nil:BAT;
_48:bat[:oid,:int] := _277;
barrier _257 := language.dataflow();
_153 := bat.mirror(_128);
_150 := algebra.leftjoin(_144,_48);
_156 := bat.mirror(_150);
_159 := algebra.join(_153,_156);
_165 := algebra.markT(_159,3,0);
_168 := bat.reverse(_165);
_171 := algebra.join(_168,_128);
_162 := algebra.markH(_159,3,0);
_175 := algebra.join(_162,_150);
_179 := batcalc.!=(_171,_175);
_184 := algebra.uselect(_179,true);
_187 := bat.reverse(_184);
_190 := algebra.join(_187,_162);
_193 := bat.reverse(_190);
_196 := algebra.semijoin(_112,_193);
_202 := bat.reverse(_196);
_206 := algebra.semijoin(_144,_193);
_212 := algebra.join(_202,_206);
_215 := algebra.markT(_212,3,0);
_223 := bat.reverse(_215);
_229 := algebra.leftjoin(_223,_122);
_154 := bat.mirror(_129);
_151 := algebra.leftjoin(_147,_48);
_157 := bat.mirror(_151);
_160 := algebra.join(_154,_157);
_166 := algebra.markT(_160,3,1);
_169 := bat.reverse(_166);
_172 := algebra.join(_169,_129);
_163 := algebra.markH(_160,3,1);
_176 := algebra.join(_163,_151);
_182 := batcalc.!=(_172,_176);
_185 := algebra.uselect(_182,true);
_188 := bat.reverse(_185);
_191 := algebra.join(_188,_163);
_194 := bat.reverse(_191);
_198 := algebra.semijoin(_115,_194);
_203 := bat.reverse(_198);
_208 := algebra.semijoin(_147,_194);
_213 := algebra.join(_203,_208);
_219 := algebra.markT(_213,3,1);
_224 := bat.reverse(_219);
_230 := algebra.leftjoin(_224,_123);
_155 := bat.mirror(_130);
_152 := algebra.leftjoin(_148,_48);
_158 := bat.mirror(_152);
_161 := algebra.join(_155,_158);
_167 := algebra.markT(_161,3,2);
_170 := bat.reverse(_167);
_174 := algebra.join(_170,_130);
_164 := algebra.markH(_161,3,2);
_177 := algebra.join(_164,_152);
_183 := batcalc.!=(_174,_177);
_186 := algebra.uselect(_183,true);
_189 := bat.reverse(_186);
_192 := algebra.join(_189,_164);
_195 := bat.reverse(_192);
_199 := algebra.semijoin(_117,_195);
_204 := bat.reverse(_199);
_209 := algebra.semijoin(_148,_195);
_214 := algebra.join(_204,_209);
_221 := algebra.markT(_214,3,2);
_225 := bat.reverse(_221);
_231 := algebra.leftjoin(_225,_28);
_51 := mat.pack(_229,_230,_231);
_228 := algebra.leftjoin(_225,_9);
_227 := algebra.leftjoin(_224,_94);
_226 := algebra.leftjoin(_223,_93);
exit _257;
_288 := bat.new(nil:oid,nil:int);
barrier (_290,_291,_292) := bat.newIterator(_51);
_294 := str.stringlength(_292);
bat.insert(_288,_291,_294);
redo (_290,_291,_292) := bat.hasMoreElements(_51);
exit (_290,_291,_292);
_51 := nil:BAT;
_52:bat[:oid,:int] := _288;
barrier _260 := language.dataflow();
_232 := bat.reverse(_212);
_238 := algebra.markT(_232,3,0);
_244 := bat.reverse(_238);
_248 := algebra.leftjoin(_244,_44);
_234 := bat.reverse(_213);
_239 := algebra.markT(_234,3,1);
_246 := bat.reverse(_239);
_249 := algebra.leftjoin(_246,_44);
_235 := bat.reverse(_214);
_242 := algebra.markT(_235,3,2);
_247 := bat.reverse(_242);
_250 := algebra.leftjoin(_247,_44);
_55 := mat.pack(_248,_249,_250);
exit _260;
_299 := bat.new(nil:oid,nil:int);
barrier (_303,_304,_305) := bat.newIterator(_55);
_307 := str.stringlength(_305);
bat.insert(_299,_304,_307);
redo (_303,_304,_305) := bat.hasMoreElements(_55);
exit (_303,_304,_305);
_55 := nil:BAT;
_56:bat[:oid,:int] := _299;
_50 := mat.pack(_226,_227,_228);
_57 := sql.resultSet(3,1,_50);
sql.rsColumn(_57,"sys.uitspraken","id","int",32,0,_50);
sql.rsColumn(_57,"sys.","length_uitspraak","int",32,0,_52);
sql.rsColumn(_57,"sys.","length_uitspraak","int",32,0,_56);
_70 := io.stdout();
sql.exportResult(_70,_57);
end s2_1;
CREATE TABLE "sys"."uitspraken" (
"id" int NOT NULL,
"ljn" char(6) NOT NULL,
"gepubliceerd" boolean NOT NULL,
"instantie" varchar(63) NOT NULL,
"datum" date NOT NULL,
"publicatie" date,
"zaaknummers" varchar(100) NOT NULL,
"uitspraak" CHARACTER LARGE OBJECT,
"conclusie" CHARACTER LARGE OBJECT,
"zittingsplaats" varchar(16),
"rechtsgebied" varchar(24),
"sector" varchar(20),
"soort" varchar(32),
"indicatie" CHARACTER LARGE OBJECT,
"kop" CHARACTER LARGE OBJECT,
CONSTRAINT "uitspraken_id_pkey" PRIMARY KEY ("id"),
CONSTRAINT "uitspraken_ljn_unique" UNIQUE ("ljn")
);
sql>\d uitspraken_new
CREATE TABLE "sys"."uitspraken_new" (
"id" int NOT NULL,
"ljn" char(6) NOT NULL,
"gepubliceerd" boolean NOT NULL,
"instantie" varchar(63) NOT NULL,
"datum" date NOT NULL,
"publicatie" date,
"zaaknummers" varchar(100) NOT NULL,
"uitspraak" CHARACTER LARGE OBJECT,
"conclusie" CHARACTER LARGE OBJECT,
"zittingsplaats" varchar(16),
"rechtsgebied" varchar(24),
"sector" varchar(20),
"soort" varchar(32),
"indicatie" CHARACTER LARGE OBJECT,
"kop" CHARACTER LARGE OBJECT
);
Now I wonder if the fact that the unique constraint is not present in table 2 any reason for the performance to degrade in such way. (Most likely prefering the length equation?) Now I did try having the same constraints and that did not make any difference.
Facts about the tables; the uitspraken one contains about 2GB the _new one about 373 records, so virtually nothing. But now the database does crash:
mserver5: ../../../src/gdk/gdk_bbp.mx:2367: BBPfree: Assertion `b->P->sharecnt == 0' failed.
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffe32cf710 (LWP 15529)]
0x00007ffff4839445 in raise () from /lib/libc.so.6
(gdb) bt
0 0x00007ffff4839445 in raise () from /lib/libc.so.6
1 0x00007ffff483a941 in abort () from /lib/libc.so.6
2 0x00007ffff48326a0 in __assert_fail () from /lib/libc.so.6
3 0x00007ffff6aa6846 in BBPfree (b=0x15a31d8, calledFrom=0x7ffff7114cd6 "BBPtrim") at ../../../src/gdk/gdk_bbp.mx:2367
4 0x00007ffff6aa8f47 in BBPtrim (memtarget=0, vmtarget=0) at ../../../src/gdk/gdk_bbp.mx:2764
5 0x00007ffff6c29b75 in GDKmemchk (memchk=1, vmchk=0) at ../../../src/gdk/gdk_utils.mx:714
6 0x00007ffff6c2a0c7 in GDKmallocmax (size=2320, maxsize=0x7fffe32ce128, emergency=0) at ../../../src/gdk/gdk_utils.mx:1105
7 0x00007ffff6c2a364 in GDKmalloc (size=2316) at ../../../src/gdk/gdk_utils.mx:1131
8 0x00007ffff6c2ae5d in GDKstrdup (
s=0x7ffd7c1ba618 "gewezen op het beroep in cassatie van X te Z tegen de uitspraak van het Gerechtshof te Arnhem van 19 mei 1995 betreffende na te melden aan hem voor het jaar 1989 opgelegde aanslag in de zuiveringslast"...) at ../../../src/gdk/gdk_utils.mx:1307
9 0x00007ffff6ff5cb0 in VALinit (d=0x15b4ad8, tpe=13, s=0x7ffd7c1ba618) at ../../../src/gdk/gdk_value.mx:192
10 0x00007fffe6ff2dd8 in CHPbunHasMoreElements (cntxt=0x605878, mb=0x1001028, stk=0x15b3958, pci=0xd7fe98) at ../../../../src/modules/mal/chopper.mx:276
11 0x00007ffff7ac5a40 in runMALsequence (cntxt=0x605878, mb=0x1001028, startpc=1, stoppc=0, stk=0x15b3958, env=0x0, pcicaller=0x0)
at ../../../src/mal/mal_interpreter.mx:2044
12 0x00007ffff7abb833 in callMAL (cntxt=0x605878, mb=0x1001028, env=0x7fffe32cec38, argv=0x7fffe32cec80, debug=0 '\000')
at ../../../src/mal/mal_interpreter.mx:435
13 0x00007fffe42930d7 in SQLexecutePrepared (c=0x605878, be=0xb10f48, q=0x158afe8) at ../../../../src/backends/monet5/sql_scenario.mx:1454
14 0x00007fffe4293356 in SQLengineIntern (c=0x605878, be=0xb10f48) at ../../../../src/backends/monet5/sql_scenario.mx:1507
15 0x00007fffe4293891 in SQLengine (c=0x605878) at ../../../../src/backends/monet5/sql_scenario.mx:1617
16 0x00007ffff7b05226 in runPhase (c=0x605878, phase=4) at ../../../src/mal/mal_scenario.mx:604
17 0x00007ffff7b053fd in runScenarioBody (c=0x605878) at ../../../src/mal/mal_scenario.mx:655
18 0x00007ffff7b055e5 in runScenario (c=0x605878) at ../../../src/mal/mal_scenario.mx:682
19 0x00007ffff7ab931f in MSserveClient (dummy=0x605878) at ../../../src/mal/mal_session.mx:473
20 0x00007ffff57a9547 in start_thread () from /lib/libpthread.so.0
21 0x00007ffff48db28d in clone () from /lib/libc.so.6
Reproducible: Always
MonetDB server v5.21.0 (64-bit), based on kernel v1.39.0 (64-bit oids)
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
Visit http://monetdb.cwi.nl/ for further information
Found 3.9GiB available memory, 2 available cpu cores
Configured for prefix: /opt/monetdb-testing
Libraries:
libpcre: 8.02 2010-03-19 (compiled with 8.02)
openssl: OpenSSL 0.9.8o 01 Jun 2010 (compiled with OpenSSL 0.9.8o 01 Jun 2010)
libxml2: 2.7.7 (compiled with 2.7.7)
Compiled by: skinkie@openkvk (x86_64-unknown-linux-gnu)
Compilation: gcc -Wall -Wextra -fno-strict-aliasing -g -Werror-implicit-function-declaration -Werror -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/x86_64-pc-linux-gnu/bin/ld -IPA -m elf_x86_64
(obviously I can upgrade again ;)
## Comment 14518
Date: 2010-07-22 19:20:04 +0200
From: @grobian
how many bugs did you report in total in this epistle?
## Comment 14519
Date: 2010-07-22 19:24:13 +0200
From: @skinkie
(In reply to comment 1)
> how many bugs did you report in total in this epistle?
Just one Fabian. I was just extremely verbose, so * cannot blame me about being unclear. And not providing enough information. As you can see in the plans, it is a comparison between two queries. Where one never finishes.
## Comment 14520
Date: 2010-07-22 19:27:07 +0200
From: @grobian
how about the segfault then?
## Comment 14521
Date: 2010-07-22 19:30:37 +0200
From: @skinkie
(In reply to comment 3)
> how about the segfault then?
The segfault is the same bug, with a constrained second table. I expect that the same behavior (eventually) would show up if I didn't cancel the second query. I just didn't want to wait longer than 76ms for my results.
## Comment 14522
Date: 2010-07-22 19:36:47 +0200
From: @skinkie
MonetDB server v5.21.0 (64-bit), based on kernel v1.39.0 (64-bit oids)
Not released
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
Visit http://monetdb.cwi.nl/ for further information
Found 3.9GiB available memory, 2 available cpu cores
Configured for prefix: /opt/monetdb-testing
Libraries:
libpcre: 8.02 2010-03-19 (compiled with 8.02)
openssl: OpenSSL 0.9.8o 01 Jun 2010 (compiled with OpenSSL 0.9.8o 01 Jun 2010)
libxml2: 2.7.7 (compiled with 2.7.7)
Compiled by: skinkie@openkvk (x86_64-unknown-linux-gnu)
Compilation: gcc -Wall -Wextra -fno-strict-aliasing -g -Werror-implicit-function-declaration -Werror -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/x86_64-pc-linux-gnu/bin/ld -IPA -m elf_x86_64
(Latest HG, same behavior)
## Comment 14523
Date: 2010-07-22 19:50:25 +0200
From: @drstmane
The "poor performance" is apparently due to missing bulk implementation of function str.stringlength() --- or at least the SQL compiler (and or what ever optimizer is in charge) does not know about it.
I cannot comment about the rest (if there is any at all), as "clearity" cannot simply be achieved by "verboseness"; "conciseness" usually serves better purposes ...
## Comment 14524
Date: 2010-07-22 19:53:17 +0200
From: @drstmane
Oh, the assertion (obviously) looks similar to the one reported in bug #2607 "GDK: gdk_bbp.c:2257: BBPfree: Assertion `b->P->sharecnt == 0' failed".
## Comment 14525
Date: 2010-07-22 20:02:30 +0200
From: @skinkie
(In reply to comment 6)
> The "poor performance" is apparently due to missing bulk implementation of
> function str.stringlength() --- or at least the SQL compiler (and or what ever
> optimizer is in charge) does not know about it.
Why would it need a bulk stringlength operation? The first query finishes in 76ms...
## Comment 14526
Date: 2010-07-22 20:08:31 +0200
From: @drstmane
you tell me how often SQL length() resp. MAL str.stringlength needs to be called either of your --- depends on you actual data size, value distribution, selection- and join selectivity, etc. and I don't know that --- basically, the answer to this question should answer your question.
## Comment 14527
Date: 2010-07-22 20:15:33 +0200
From: @skinkie
(In reply to comment 9)
> you tell me how often SQL length() resp. MAL str.stringlength needs to be
> called either of your --- depends on you actual data size, value distribution,
> selection- and join selectivity, etc. and I don't know that --- basically, the
> answer to this question should answer your question.
The amount of records match the resultset of the first operation? If the length(...) = length(...) is preferred over the equijoin while the number of values of combined equijoins is lower and no sql function is used...
How is it possible that the first query that puts the same clause in the select part takes 76ms, and the second query that filters on the where clause of the first query plus the second query breaks?
## Comment 14528
Date: 2010-07-22 20:27:58 +0200
From: @drstmane
From the algebra (PLAN) and MAL (EXPLAIN) plans you provided, I read that for the first query, length is called twice for each result tuple, while for the second query length is called twice for each result tuple plus once for each tuple in table uitspraken plus once for each tuple in table uitspraken_new.
The difference is one reasons for exection time differences between the two queries --- what ever they might be ...
## Comment 14529
Date: 2010-07-22 20:35:13 +0200
From: @skinkie
(In reply to comment 11)
> The difference is one reasons for exection time differences between the two
> queries --- what ever they might be ...
So pragmatically, is my assumption, that the 2 length-functions should exclusively be called for the rows that are selected by the id = id, correct?
If that doesn't hold, I probably am missing a fundamental thing.
## Comment 14530
Date: 2010-07-22 21:43:12 +0200
From: @drstmane
Your assumption is reasonable in theory. The details are much more complicated in practice. The problem is usually referred to as database query optimization and has been proven to be NP-hard ("even" in theory).
## Comment 14531
Date: 2010-07-22 21:58:49 +0200
From: @drstmane
By the way, I would appreciate if you would --- at some point in time --- not mind sharing with us how long the second query actually runs. Only then, we could properly assess the severity of the problem. With all respect, a statement like "doesn't finish fast enough" does not help us much further.
With the first query finishing in 76 ms, killing the second query after 76 ms is everything but an indication of "poor performance" to me.
Also, could you please explain a bit more clearly than "But now the database does crash", in which case the assertion occurs?
When staring the server?
When running the (which?) query?
When running the (which?) query after restarting the server?
Please not also, that bug #2607 mentions a hanging server in relation with a similar assertion as reported here.
## Comment 14532
Date: 2010-07-22 23:20:47 +0200
From: @skinkie
(In reply to comment 14)
> By the way, I would appreciate if you would --- at some point in time --- not
> mind sharing with us how long the second query actually runs.
I have no clue how long I actually takes. I actually thought waiting > 5 minutes was a proper indication to file a bug if I can gather the same information in 76ms.
But the actual point is now, that when I remove the constraints I actually end up in the same assertion, that I didn't see before. And this was about ~3 minutes. So I wonder now if I should reload the secondary table without the primary key/unique in the first place to get the same result.
> Only then, we
> could properly assess the severity of the problem. With all respect, a
> statement like "doesn't finish fast enough" does not help us much further.
With all respect;
If the following query does finish in 77ms, I truly feel that I showed by both plans enough information was provided to unfold an issue in the plan generation.
plan select x from (select uitspraken.id as x, length(uitspraken.uitspraak)=length(uitspraken_new.uitspraak) as y from uitspraken, uitspraken_new where uitspraken.id = uitspraken_new.id) as z where z.y = false;
% .plan table_name
% rel name
% clob type
% 170 length
project (
| select (
| | project (
| | | join (
| | | | table(sys.uitspraken) [ uitspraken.id NOT NULL, uitspraken.uitspraak, uitspraken.%TID% NOT NULL ],
| | | | table(sys.uitspraken_new) [ uitspraken_new.id NOT NULL, uitspraken_new.uitspraak, uitspraken_new.%TID% NOT NULL ]
| | | ) [ uitspraken.id NOT NULL = uitspraken_new.id NOT NULL ]
| | ) [ uitspraken.id NOT NULL as z.x, =(length(uitspraken.uitspraak), length(uitspraken_new.uitspraak)) as z.y, uitspraken.%TID% NOT NULL, uitspraken_new.%TID% NOT NULL ]
| ) [ z.y = false ]
) [ z.x NOT NULL ]
> Also, could you please explain a bit more clearly than "But now the database
> does crash", in which case the assertion occurs?
Currently in the second provided query.
select uitspraken.id, length(uitspraken.uitspraak),
length(uitspraken_new.uitspraak) from uitspraken, uitspraken_new where
uitspraken.id = uitspraken_new.id and length(uitspraken.uitspraak) <>
length(uitspraken_new.uitspraak);
> When staring the server?
Before running the query.
> Please not also, that bug #2607 mentions a hanging server in relation with a
> similar assertion as reported here.
Server does not hang.
## Comment 14537
Date: 2010-07-26 18:20:26 +0200
From: @drstmane
In a different context I just ran a query that perform 100 M (100000000) legth() (resp. str.stringlength()) call in about 100 second, i.e., one per microsecond
(using on optimized build of the Jun2010-SP1 release on a 2.4 GB Core2Quad).
Hence, I doubt that the mal-iterated (as opposed to bulk) str.stringlength() is a significant performance problem.
I suspect (now more than already indicated before) that the "second query" reported here just "happens to trigger" a situation that leads to the assertion and/or hanging server (while processing that query) as reported in bug #2607 (see details there).
## Comment 14538
Date: 2010-07-26 18:27:20 +0200
From: @skinkie
(In reply to comment 16)
> I suspect (now more than already indicated before) that the "second query"
> reported here just "happens to trigger" a situation that leads to the assertion
> and/or hanging server (while processing that query) as reported in bug #2607
> (see details there).
Is the actual 'hang' to pin-point sowhere in the mal plan? Or is it not that 'fixed'. The hang might eat CPU time, ok, can live with that. But wasn't the idea of optimizers to always execute the 'same' kind of query; hence my rewrite of the query should result in the same 'failing' query?
## Comment 14547
Date: 2010-07-27 20:18:34 +0200
From: @mlkersten
The multiplex version of the SQL stringlength operator was missing. It has been added to the kernel.
## Comment 14567
Date: 2010-07-30 16:53:23 +0200
From: @skinkie
(In reply to comment 18)
> The multiplex version of the SQL stringlength operator was missing. It has been
> added to the kernel.
I would like to confirm that this indeed has 'fixed' the issue, making it possible to execute the query.
sql>select uitspraken.id from uitspraken, uitspraken_new where uitspraken.id = uitspraken_new.id and length(uitspraken.uitspraak)<>length(uitspraken_new.uitspraak);
+--------+
| id |
+========+
| 390815 |
| 390904 |
| 385703 |
| 390984 |
| 386513 |
| 390801 |
| 390658 |
| 373523 |
+--------+
8 tuples (32.122s)
(hot: 10s)
But having already elaborated in the initial issue, it seems the wrong choice is made because the following query results within 100ms.
sql>select x from (select uitspraken.id as x, length(uitspraken.uitspraak)=length(uitspraken_new.uitspraak) as y from uitspraken, uitspraken_new where uitspraken.id = uitspraken_new.id) as z where z.y = false;
+--------+
| x |
+========+
| 390815 |
| 390904 |
| 385703 |
| 390984 |
| 386513 |
| 390801 |
| 390658 |
| 373523 |
+--------+
8 tuples (64.491ms)
## Comment 14595
Date: 2010-08-02 11:47:21 +0200
From: @drstmane
To clarify, the improvement of bulk over iterated length() (str.stringLength()), i.e., of http://dev.monetdb.org/hg/MonetDB/rev/b6c69da89ab1 is a factor, i.e., for my 100000000 tuple test, execution time went down from 100 secs to 20 secs.
Note also that http://dev.monetdb.org/hg/MonetDB/rev/3b40c80c9172 fixed a deadlock that I still suspect to be the reason why the second query did (IMHO --- was indeed never tested let alone confirmed) hang.
Finally, the "choice" how to translate and implement single-column vs. multi-columns joins in MonetDB is inherent in the MonetDB architecture; hence, unless the whole MonetDB architecture is considered a "wrong choice", I cannot detect any wrong choice, here. More complex queries often ten to take more time to execute than less complex ones.
## Comment 14597
Date: 2010-08-02 14:53:13 +0200
From: @skinkie
(In reply to comment 20)
> Finally, the "choice" how to translate and implement single-column vs.
> multi-columns joins in MonetDB is inherent in the MonetDB architecture; hence,
> unless the whole MonetDB architecture is considered a "wrong choice", I cannot
> detect any wrong choice, here. More complex queries often ten to take more time
> to execute than less complex ones.
I think how Niels explains it, that a push up of the length function should occur. I mailed him some examples where the complete rewrite takes place:
create table lengthequijoin (id integer, a varchar(10));
create table lengthequijoin_to (id integer, a varchar(10));
plan select b.id from lengthequijoin as b, lengthequijoin_to as c where b.id = c.id and length(c.a) <> length(b.a);
Ik denk dat die hem in principe al laat zien... maar het bizarre is dat deze:
plan select x.d from (select b.id as d, b.a as e, c.a as f from lengthequijoin as b, lengthequijoin_to as c where b.id = c.id) as x where length(x.e) <>
length(x.f);
Dus wel 'terug' wordt geprojecteerd in de vorige, maar deze niet:
plan select x.d from (select b.id as d, length(b.a) <> length(c.a) as e from lengthequijoin as b, lengthequijoin_to as c where b.id = c.id) as x where x.e = true;
## Comment 15134
Date: 2010-10-28 13:27:25 +0200
From: @grobian
this is a feature request for a faster execution
## Comment 15688
Date: 2011-03-28 17:36:33 +0200
From: @sjoerdmullender
The Mar2011 version has been released.
## Comment 16042
Date: 2011-07-29 11:00:07 +0200
From: @sjoerdmullender
Apr2011-SP2 has been released.
## Comment 16281
Date: 2011-09-16 15:10:41 +0200
From: @sjoerdmullender
The Aug2011 version has been released.
## Comment 17685
Date: 2012-08-24 14:56:01 +0200
From: @sjoerdmullender
Jul2012-SP1 has been released.
| Poor performance using length(...) = length(...) in conjuction with a equjoin | https://api.github.com/repos/MonetDB/MonetDB/issues/2630/comments | 0 | 2020-11-30T11:07:01Z | 2024-06-28T13:40:40Z | https://github.com/MonetDB/MonetDB/issues/2630 | 753,382,074 | 2,630 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-22 17:21:13 +0200
From: Nicolas Lemay <<lemay>>
To: SQL devs <<bugs-sql>>
Version: 2.38.3 (Jun2010-SP1) [obsolete]
CC: @drstmane
Last updated: 2010-07-23 17:12:10 +0200
## Comment 14515
Date: 2010-07-22 17:21:13 +0200
From: Nicolas Lemay <<lemay>>
User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); fr; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Build Identifier:
Hi, I've install the Jun SP1 release on my Ubuntu 9.10 and it run well when I'm accessing my database with mclient. But I have a java class witch use the JDBC 1.15 that I found on the download area for the JunSP1 release. When I use it with the FebSP2 release, it works well. But with the JunSP1, it kills my database.
Reproducible: Always
### Steps to Reproduce:
1. start merovigian and the database.
2. Write some code like this
Class.forName("nl.cwi.monetdb.jdbc.MonetDriver");
conn = DriverManager.getConnection("jdbc:monetdb://localhost:50000/testdb", "monetdb", "monetdb");
3. Execute it.
### Actual Results:
A "monetdb status" command give me this :
name state uptime health last crash
testdb crashed 0%, 0s 2010-07-22 17:10:34
### Expected Results:
Should connect correctly
Here are the merovian log :
2010-07-22 12:02:16 MSG control[3068]: (local): started database 'testdb'
2010-07-22 12:03:00 MSG merovingian[3068]: proxying client localhost:50861 for database 'testdb' to mapi:monetdb:///var/MonetDB5/dbfarm/testdb/.mapi.sock?database=testdb
2010-07-22 12:03:00 MSG merovingian[3068]: target connection is on local UNIX domain socket, passing on filedescriptor instead of proxying
2010-07-22 12:03:00 MSG merovingian[3068]: database 'testdb' (3780) was killed by signal SIGSEGV
The java error :
java.sql.SQLException: Unable to connect (localhost:50000): Read from localhost:50000: End of stream reached
## Comment 14516
Date: 2010-07-22 17:40:38 +0200
From: @grobian
One of the queries that JDBC executes to initiate the connection most likely upsets the server. Is your test database loaded with data? Was it originally created with Feb2010-SP2?
## Comment 14533
Date: 2010-07-23 16:05:59 +0200
From: Nicolas Lemay <<lemay>>
Thank you for your reply M. Groffen.
I decided to make a step futher into my test, and I follow your advice. I've rebuild completly my database from scratch with the JunSP1 version and realize a details was making my code incompatible with the JunSP1 release. Now it seen to work fine. Sorry for bothering you.
| JDBC 1.15 and JunSP1 release compatible? | https://api.github.com/repos/MonetDB/MonetDB/issues/2629/comments | 0 | 2020-11-30T11:06:58Z | 2024-06-28T13:20:38Z | https://github.com/MonetDB/MonetDB/issues/2629 | 753,382,038 | 2,629 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-21 16:22:31 +0200
From: Nicolas Lemay <<lemay>>
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 5.20.3 (Jun2010-SP1) [obsolete]
Last updated: 2010-08-30 09:18:06 +0200
## Comment 14509
Date: 2010-07-21 16:22:31 +0200
From: Nicolas Lemay <<lemay>>
User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); fr; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Build Identifier:
I've been trying to use the new Jun2010-SP1 build of MonetDB. I was prevously using the Feb2010-SP2 version.
When I start a database, I can only connect to it once. If I try to reconnect a second time (with mclient or JDBC), I type my password and then it keep waiting without any error message.
I tried several cases. I first unistall my Feb2010-SP2 version to install the Jun2010-SP1 build with the deb on my Ubuntu 9.10. I've also tried compiling the source. I finally decide to install the deb on a all fresh install of Ubuntu 10.04, and it keep giving me the same problem.
Ps. sorry for my bad english, it is not my first language.
Reproducible: Always
### Steps to Reproduce:
0. apt-get update
1. Install Jun2010-SP1 (apt-get install monetdb5-sql monetdb-client)
2.
2. sudo merovigian start
3. sudo monetdb create test
4. sudo monetdb release test
5. sudo monetdb start test (this give a failed message, but database is still running if you do a monetdb status).
6. mclient -lsql -umonetdb -dtest -t
7. \q to quit the database
8. mclient -lsql -umonetdb -dtest -t
### Actual Results:
It does not want to reconnect to the database. It's only waiting for connection and give a blank screen (after asking for password).
### Expected Results:
Should reconnect to database.
## Comment 14510
Date: 2010-07-21 16:42:09 +0200
From: Nicolas Lemay <<lemay>>
I've just reinstall the Feb2010-SP2 version from source on the same machine where I tried the Jun2010-SP1 version (Ubuntu 9.10) and everything work fine.
## Comment 14512
Date: 2010-07-22 10:44:16 +0200
From: @sjoerdmullender
The real issue is that you started merovingian with an argument. According to the man page of merovingian:
"Any arguments given when starting merovingian cause the version to be printed followed by a shutdown of merovingian."
However, there was a bug in the handling of that argument in the released version of merovingian (this handling was fixed yesterday, so will be in the next release).
All other problems that you saw are a consequence of this bug in merovingian.
Try starting merovingian without argument and see what happens then.
Also, note that it is not recommended to run the database as root (i.e. using sudo). See the amended instructions on the website http://dev.monetdb.org/downloads/deb/ (changed yesterday).
## Comment 14513
Date: 2010-07-22 11:02:12 +0200
From: @grobian
Changeset [6908fb1d95e4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6908fb1d95e4) made by Fabian Groffen <fabian@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6908fb1d95e4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6908fb1d95e4)
Changeset description:
split out changelog entry for fix for bug #2628 that I made by coincidence yesterday
## Comment 14514
Date: 2010-07-22 11:28:31 +0200
From: Nicolas Lemay <<lemay>>
Thanks a lot. Dont know why I was writing "merovigian start", was it in the old
docs? Or may be it's just an habit of mine. But I'm happy to see that it will
be better handled in the next release, because I could not guess this was the
problem with the answer it was giving me.
## Comment 14807
Date: 2010-08-30 09:18:06 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
| Cannot reconnect to same database twice | https://api.github.com/repos/MonetDB/MonetDB/issues/2628/comments | 0 | 2020-11-30T11:06:56Z | 2024-06-27T11:48:51Z | https://github.com/MonetDB/MonetDB/issues/2628 | 753,382,012 | 2,628 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-21 08:54:41 +0200
From: @grobian
To: Merovingian devs <<bugs-merovingian>>
Version: 1.38.3 (Jun2010-SP1) [obsolete]
CC: @drstmane
Last updated: 2010-08-30 09:18:04 +0200
## Comment 14500
Date: 2010-07-21 08:54:41 +0200
From: @grobian
On Debian, the compiler (GCJ?) produces the most useless error message:
[javac] 1. ERROR in /home/monet/testing/monet.GNU.32.32.d.1.7295/java/src/nl/cwi/monetdb/merovingian/SabaothDB.java (at line 1)
[javac] /*
[javac] ^^
[javac] The type Enum is not generic; it cannot be parameterized with arguments <SabaothDB.SABdbState>
[javac] ----------
[javac] 1 problem (1 error)
It probably indicates that enum is not yet supported, or that in one way or another it doesn't like the usage (but the compiler isn't really clear on this one).
Either we fix the code not to use an enum here, or we figure out a way to detect misbehaving compilers.
## Comment 14501
Date: 2010-07-21 09:04:01 +0200
From: @drstmane
maybe related to
checking for java... /usr/bin/java
checking for Java >= 1.5, but < 1.6... no -> 1.4.2 found
checking for javadoc... /usr/bin/javadoc
configure: WARNING: Cannot build MonetDB JDBC as it requires ant and Java >= 1.5, but < 1.6.
checking for javadoc... (cached) /usr/bin/javadoc
configure: WARNING: Cannot build MonetDB XRPC as it requires ant and Java >= 1.5.
cf., http://monetdb.cwi.nl/testing/projects/monetdb/Stable/java/.GNU.32.32.d.1-Debian4.0/config.out_log.html
If so, maybe it is possible to skip compilation of merovingian if no suitable version of Java is found, just like we do with JDBC & XRPC?
## Comment 14502
Date: 2010-07-21 09:06:40 +0200
From: @drstmane
Maybe this helps:
$ hg diff java/configure.ag
diff -r [b1604d8a3e25](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b1604d8a3e25) java/configure.ag
--- a/java/configure.ag Tue Jul 20 21:47:20 2010 +0200
+++ b/java/configure.ag Wed Jul 21 09:06:20 2010 +0200
@@ -106,7 +106,7 @@
have_java_control=no
if test "x$enable_control" != xno; then
- req_java_ver_min=1.4 >= $req_java_ver_min required
+ req_java_ver_min=1.5 >= $req_java_ver_min required
unset req_java_ver_max < $req_java_ver_max required
AM_MONETDB_ANT_JAVA($req_java_ver_min, $req_java_ver_max)
if test "x$have_java" = xno; then
?
## Comment 14503
Date: 2010-07-21 09:56:00 +0200
From: @drstmane
just for the records: the java on our Debian machines is indeed GCJ:
monet@timmy:~$ cat /etc/debian_version
4.0
monet@timmy:~$ uname -a
Linux timmy.ins.cwi.nl 2.6.18-5-xen-686 1 SMP Fri Jun 1 05:05:24 UTC 2007 i686 GNU/Linux
monet@timmy:~$ type -a java
java is /usr/bin/java
monet@timmy:~$ /usr/bin/java -version
java version "1.4.2"
gij (GNU libgcj) version 4.1.2 20061115 (prerelease) (Debian 4.1.1-20)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
## Comment 14504
Date: 2010-07-21 09:57:15 +0200
From: @sjoerdmullender
apt-get install openjdk-6-jdk
Works like a charm. On Debian 5.
It seems to be available on Debian 4 also.
## Comment 14505
Date: 2010-07-21 10:03:08 +0200
From: @grobian
(In reply to comment 4)
> apt-get install openjdk-6-jdk
> Works like a charm. On Debian 5.
> It seems to be available on Debian 4 also.
That is in this case just working around the problem. JDBC itself still compiles fine with Java 1.4.
Stefan is right that we just need a check for >1.5 for the merovingian lib. I'm surprised there is none.
## Comment 14506
Date: 2010-07-21 10:06:35 +0200
From: @grobian
Changeset [1c0442c5fa12](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1c0442c5fa12) made by Fabian Groffen <fabian@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1c0442c5fa12](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1c0442c5fa12)
Changeset description:
merocontrol Java library requires Java 2 Platform 1.5 and up, due to enum and boxing/unboxing. Bug #2627
## Comment 14507
Date: 2010-07-21 10:08:10 +0200
From: @grobian
patch as suggested by Stefan should do it
## Comment 14804
Date: 2010-08-30 09:18:04 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
| java/merovingian fails to compile on Debian 4.0 | https://api.github.com/repos/MonetDB/MonetDB/issues/2627/comments | 0 | 2020-11-30T11:06:52Z | 2024-06-27T11:48:50Z | https://github.com/MonetDB/MonetDB/issues/2627 | 753,381,981 | 2,627 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-19 19:50:47 +0200
From: Milena Ivanova <<M.Ivanova>>
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 5.20.3 (Jun2010-SP1) [obsolete]
CC: @mlkersten, @drstmane
Last updated: 2010-08-30 09:18:24 +0200
## Comment 14483
Date: 2010-07-19 19:50:47 +0200
From: Milena Ivanova <<M.Ivanova>>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.10) Gecko/20100622 Fedora/3.5.10-1.fc12 Firefox/3.5.10
Build Identifier:
SQL function selecting an integer value from a table returns a NULL value with default pipe, but works correctly with minimal_pipe, default_pipe without dataflow, or default_pipe with nthreads=1.
Reproducible: Always
### Steps to Reproduce:
1.Run the attached sql file
2.
3.
## Comment 14484
Date: 2010-07-19 19:52:45 +0200
From: Milena Ivanova <<M.Ivanova>>
Created attachment 18
SQL script to create a table, and a function selecting from it.
> Attached file: [barttest.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2626_barttest.sql_18) (application/octet-stream, 2445 bytes)
> Description: SQL script to create a table, and a function selecting from it.
## Comment 14485
Date: 2010-07-19 22:01:35 +0200
From: @drstmane
a)
The test script works fine with Feb2010-SP2 and default_pipe.
b)
With Jun2010-SP1 and default_pipe, the MAL plans (explain) between single-threaded & multi-threaded differ hardly, only a dataflow barrier statements is added in the multi-threaded case:
$ diff -du /tmp/barttest.Jun2010-{1,N}.out
--- /tmp/barttest.Jun2010-1.out 2010-07-19 21:46:52.000000000 +0200
+++ /tmp/barttest.Jun2010-N.out 2010-07-19 21:46:56.000000000 +0200
@@ -13,6 +13,7 @@
function user.s0_1{autoCommit=true}():void;
sql.mvc();
_17 := sql.mvc();
+barrier _169 := language.dataflow();
_18 := nil;
_20 := nil;
_21 := nil;
@@ -52,6 +53,7 @@
_70 := calc.int(_69);
_18 := _70;
_71 := calc.==(_18,1);
+exit _169;
barrier _72 := _71;
_73:bat[:oid,:dbl] := sql.bind(_17,"sys","frequencybands","freq_low",0);
_75:bat[:oid,:dbl] := sql.bind(_17,"sys","frequencybands","freq_low",2);
c)
However, the execution TRACES differ significantly (see attached outputs);
hence, I suspect a dataflow related scheduler / scheduling problem.
## Comment 14486
Date: 2010-07-19 22:05:37 +0200
From: @drstmane
Created attachment 19
trace of single-threaded execution
output of single-threaded execution of Milena's barttest.sql extended with
plan select getBand(300000000.0);
explain select getBand(300000000.0);
trace select getBand(300000000.0);
> Attached file: [barttest.Jun2010-1.out](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2626_barttest.Jun2010-1.out_19) (application/octet-stream, 12001 bytes)
> Description: trace of single-threaded execution
## Comment 14487
Date: 2010-07-19 22:06:24 +0200
From: @drstmane
Created attachment 20
trace of multi-threaded execution
output of multi-threaded execution of Milena's barttest.sql extended with
plan select getBand(300000000.0);
explain select getBand(300000000.0);
trace select getBand(300000000.0);
> Attached file: [barttest.Jun2010-N.out](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2626_barttest.Jun2010-N.out_20) (application/octet-stream, 9076 bytes)
> Description: trace of multi-threaded execution
## Comment 14497
Date: 2010-07-21 07:21:24 +0200
From: @drstmane
Disabling only the dataflow optimizer of the default pipe makes this test work fine; hence, I indeed suspect a dataflow related scheduling error.
## Comment 14499
Date: 2010-07-21 07:33:11 +0200
From: @mlkersten
looks like a potential problem with multiple assignments to the same variable in the dataflow block.
## Comment 14545
Date: 2010-07-27 19:29:52 +0200
From: @mlkersten
The patch made to the dataflow optimizer seems to avoid the problem.
>select getBand(300000000.0);
&1 0 1 1 1
% . table_name
% getband_single_value name
% int type
% 2 length
[ 11 ]
>
There was a superflous initialization of a variable. This is a precaution of the SQL frontend, which generates variable inits at some points without concern if there is a direct path to the first 'real' assignment.
Upon approval it can be closed.
## Comment 14546
Date: 2010-07-27 20:06:45 +0200
From: @drstmane
Changeset [bfb036ae0420](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bfb036ae0420) 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=bfb036ae0420](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bfb036ae0420)
Changeset description:
Added test for bug #2626; appears to work fine, now.
## Comment 14812
Date: 2010-08-30 09:18:24 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
| Incorrect NULL function results with multi-thread execution | https://api.github.com/repos/MonetDB/MonetDB/issues/2626/comments | 0 | 2020-11-30T11:06:48Z | 2024-06-27T11:48:49Z | https://github.com/MonetDB/MonetDB/issues/2626 | 753,381,936 | 2,626 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-18 09:10:45 +0200
From: @drstmane
To: clients devs <<bugs-clients>>
Version: 1.38.1 (Jun2010) [obsolete]
Duplicates: #2558
Last updated: 2010-07-18 19:08:04 +0200
## Comment 14454
Date: 2010-07-18 09:10:45 +0200
From: @drstmane
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.5.9-2.fc12 Firefox/3.5.9
Build Identifier:
On 64-bit MacOS X with Gentoo Prefix and unixODBC 2.3, compilation of our ODBC driver fails with
.../clients/src/odbc/driver/ODBCStmt.h:83: error: expected specifier-qualifier-list before 'SQLROWOFFSET'
cf.,
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/clients/.GNU.64.64.d.1-Darwin9.8.0/make.out.html
It seems that in this case, sqltypes.h does not define type SQLROWOFFSET.
In fact, sqltypes.h of both unixOBDC 2.3 provided by the Gentoo Prefix on MacOS X and unixODBC 2.2.14 on Fedora 12 says:
"
/*
* These are not supprted on 64bit ODBC according to MS, removed, so use at your peril
*
typedef SQLULEN SQLTRANSID;
typedef SQLULEN SQLROWCOUNT;
typedef SQLUINTEGER SQLROWSETSIZE;
typedef SQLLEN SQLROWOFFSET;
*/
"
However, in the Fedora 12 case, it then defines these types after all; here's a diff of the relevant section of sqltypes.h:
"
--- /tmp/ODBC-2.3-GentooPrefix 2010-07-18 08:55:11.000000000 +0200
+++ /tmp/ODBC-2.2.14-Fedora12 2010-07-18 08:55:59.000000000 +0200
@@ -1,51 +1,55 @@
/*
* can't use a long it fails on 64 platforms
*/
/*
* Hopefully by now it should be safe to assume most drivers know about SQLLEN now
* and the defaukt is now sizeof( SQLLEN ) = 8 on 64 bit platforms
*
*/
if (SIZEOF_LONG_INT == 8)
ifdef BUILD_LEGACY_64_BIT_MODE
typedef int SQLINTEGER;
typedef unsigned int SQLUINTEGER;
define SQLLEN SQLINTEGER
define SQLULEN SQLUINTEGER
define SQLSETPOSIROW SQLUSMALLINT
/*
* These are not supprted on 64bit ODBC according to MS, removed, so use at your peril
*
typedef SQLULEN SQLROWCOUNT;
typedef SQLULEN SQLROWSETSIZE;
typedef SQLULEN SQLTRANSID;
typedef SQLLEN SQLROWOFFSET;
*/
else
typedef int SQLINTEGER;
typedef unsigned int SQLUINTEGER;
typedef long SQLLEN;
typedef unsigned long SQLULEN;
typedef unsigned long SQLSETPOSIROW;
/*
* These are not supprted on 64bit ODBC according to MS, removed, so use at your peril
*
typedef SQLULEN SQLTRANSID;
typedef SQLULEN SQLROWCOUNT;
typedef SQLUINTEGER SQLROWSETSIZE;
typedef SQLLEN SQLROWOFFSET;
*/
+typedef SQLULEN SQLROWCOUNT;
+typedef SQLULEN SQLROWSETSIZE;
+typedef SQLULEN SQLTRANSID;
+typedef SQLLEN SQLROWOFFSET;
endif
else
typedef long SQLINTEGER;
typedef unsigned long SQLUINTEGER;
define SQLLEN SQLINTEGER
define SQLULEN SQLUINTEGER
define SQLSETPOSIROW SQLUSMALLINT
typedef SQLULEN SQLROWCOUNT;
typedef SQLULEN SQLROWSETSIZE;
typedef SQLULEN SQLTRANSID;
typedef SQLLEN SQLROWOFFSET;
endif
"
Reproducible: Always
## Comment 14474
Date: 2010-07-18 19:08:04 +0200
From: @drstmane
*** This bug has been marked as a duplicate of bug #2558 ***
| ODBC driver fails to compile on 64-bit MacOS X with Gentoo Prefix and unixODBC 2.3 | https://api.github.com/repos/MonetDB/MonetDB/issues/2625/comments | 0 | 2020-11-30T11:06:45Z | 2024-06-28T13:20:37Z | https://github.com/MonetDB/MonetDB/issues/2625 | 753,381,909 | 2,625 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-17 22:22:43 +0200
From: @sjoerdmullender
To: SQL devs <<bugs-sql>>
Version: 2.38.1 (Jun2010)
Last updated: 2010-08-30 09:18:13 +0200
## Comment 14453
Date: 2010-07-17 22:22:43 +0200
From: @sjoerdmullender
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.4) Gecko/20100622 Fedora/3.6.4-1.fc13 Firefox/3.6.4
Build Identifier:
This shows the problem:
sql>create function foo(i decimal(10,2)) returns decimal(10,2)
more>begin return i; end;
operation successful
sql>select foo(10);
+------------------+
| foo_single_value |
+==================+
| 1000 |
+------------------+
1 tuple
Reproducible: Always
### Steps to Reproduce:
1.create function foo(i decimal(10,2)) returns decimal(10,2) begin return i; end;
2.select foo(10);
3.
### Actual Results:
1000
### Expected Results:
10
sql>explain select foo(10);
+------------------------------------------------------------------------------+
| mal |
+==============================================================================+
| function user.s1_1{autoCommit=true}():void; |
| sql.mvc(); |
| sql.mvc(); |
| sql.exportValue(1,".","foo_single_value","decimal",10,0,8,1000:lng,""); |
| end s1_1; |
+------------------------------------------------------------------------------+
## Comment 14479
Date: 2010-07-19 10:21:00 +0200
From: @sjoerdmullender
Changeset [755b9fac3283](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=755b9fac3283) 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=755b9fac3283](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=755b9fac3283)
Changeset description:
Test for bug #2624.
## Comment 14480
Date: 2010-07-19 10:21:01 +0200
From: @sjoerdmullender
Changeset [24d6620655f2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=24d6620655f2) 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=24d6620655f2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=24d6620655f2)
Changeset description:
Merge with Jun2010 branch: Test for bug #2624.
## Comment 14490
Date: 2010-07-20 14:26:24 +0200
From: @sjoerdmullender
Changeset [3f8d66351ddb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3f8d66351ddb) 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=3f8d66351ddb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3f8d66351ddb)
Changeset description:
Pass scale of return type on to
This fixes bug #2624.
## Comment 14491
Date: 2010-07-20 14:28:46 +0200
From: @sjoerdmullender
Hopefully my fix was correct.
Niels should check.
## Comment 14741
Date: 2010-08-20 12:43:02 +0200
From: @sjoerdmullender
The fix seems to be correct.
## Comment 14810
Date: 2010-08-30 09:18:13 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
| function returning decimal with fraction returns too large integer | https://api.github.com/repos/MonetDB/MonetDB/issues/2624/comments | 0 | 2020-11-30T11:06:42Z | 2024-06-27T11:48:47Z | https://github.com/MonetDB/MonetDB/issues/2624 | 753,381,873 | 2,624 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-17 20:06:14 +0200
From: @drstmane
To: buildtools devs <<bugs-buildtools>>
Version: 1.38.1 (Jun2010) [obsolete]
Last updated: 2010-08-20 14:03:50 +0200
## Comment 14450
Date: 2010-07-17 20:06:14 +0200
From: @drstmane
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.5.9-2.fc12 Firefox/3.5.9
Build Identifier:
Since the upgrade of our Windows testing machines to Python 2.7, autogen appaers to get stuck and hang until the timeout kills it; cf., e.g.,
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/java/.Int.32.32.d.1-Windows5.1..2010.07.17_00-09-03/make.out.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/testing/.Int.64.64.d.1-Windows6.0..2010.07.17_00-09-03/make.out.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/MonetDB/.Mic.64.64.d.1-Windows6.0..2010.07.17_00-09-03/make.out.html
Reproducible: Always
### Steps to Reproduce:
Compile on Windows with Python 2.7 using a similar set up as night testing, e.g., the TestTools.
## Comment 14456
Date: 2010-07-18 09:21:35 +0200
From: @drstmane
Updated URL are:
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/java/.Int.32.32.d.1-Windows5.1/make.out.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/testing/.Int.64.64.d.1-Windows6.0/make.out.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/MonetDB/.Mic.64.64.d.1-Windows6.0/make.out.html
## Comment 14472
Date: 2010-07-18 12:48:10 +0200
From: @drstmane
It appears that calling python from C:\Python27 hangs for user monet (when called from a cmd that is started from a remote login via ssh & cygwin) --- possibly user monet need to accept some licence agreements in some interactive session, first? Or some access right a not yet set such that user monet can use that new Python version?
## Comment 14478
Date: 2010-07-19 09:48:59 +0200
From: @sjoerdmullender
I fixed the registry entries, so hopefully now it works.
## Comment 14488
Date: 2010-07-20 08:05:14 +0200
From: @drstmane
Appear to work fine, again (probably eventually fixed by re-installing Python).
| autogen.py hangs with new Python 2.7 on Windows | https://api.github.com/repos/MonetDB/MonetDB/issues/2623/comments | 0 | 2020-11-30T11:06:39Z | 2024-06-27T11:48:46Z | https://github.com/MonetDB/MonetDB/issues/2623 | 753,381,836 | 2,623 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-17 12:33:44 +0200
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: 2.38.3 (Jun2010-SP1) [obsolete]
Last updated: 2010-08-30 09:18:01 +0200
## Comment 14448
Date: 2010-07-17 12:33:44 +0200
From: @drstmane
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.5.9-2.fc12 Firefox/3.5.9
Build Identifier:
OFFSET seems to work incorrectly, in fact appears to be ignored, on 64-bit big-endian machines --- possibly a big endian problem?
Reproducible: Always
### Steps to Reproduce:
See test following tests in TestWeb
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/GNU.64.32.d.0-SunOS5.10/src_test_bugs/offset_bug.out.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/GNU.64.64.d.0-SunOS5.10/src_test_bugs/offset_bug.out.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/GNU.64.32.d.0-SunOS5.10/src_test_bugs/order_limit_offset_bug.out.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/GNU.64.64.d.0-SunOS5.10/src_test_bugs/order_limit_offset_bug.out.00.html
## Comment 14451
Date: 2010-07-17 20:25:01 +0200
From: @drstmane
The problem only seems to occur in case OFFSET is combined with both ORDER BY & LIMIT.
## Comment 14452
Date: 2010-07-17 21:16:02 +0200
From: @drstmane
Changeset [f6757ebce84e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f6757ebce84e) 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=f6757ebce84e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f6757ebce84e)
Changeset description:
added extra exhasutive test for bug #2622
On a 64-bit big-endian machines, our SQL compiler appears to create
incorrect MAL code for queries that use all three of ORDER BY, LIMIT
and OFFSET. In this case, the generated MAL plan seems to be missing
the algebra.slice() call that implements the LIMIT & OFFSET.
If only one of ORDER BY, LIMIT and OFFSET, or any combination of two
of them is used, the plan appears to be correct also on 64-bit big-endian.
I have not yet managed to locate where in the SQL compiler code this
part of the MAL plan is generated ...
## Comment 14455
Date: 2010-07-18 09:19:52 +0200
From: @drstmane
Updated URL are:
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/GNU.64.32.d.0-SunOS5.10/src_test_bugs/offset_bug.out.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/GNU.64.64.d.0-SunOS5.10/src_test_bugs/offset_bug.out.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/GNU.64.32.d.0-SunOS5.10/src_test_bugs/order_limit_offset_bug.out.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/GNU.64.64.d.0-SunOS5.10/src_test_bugs/order_limit_offset_bug.out.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/GNU.64.32.d.0-SunOS5.10/src_test_BugTracker-2010/LIMIT_OFFSET_big-endian.Bug-2622.out.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/GNU.64.64.d.0-SunOS5.10/src_test_BugTracker-2010/LIMIT_OFFSET_big-endian.Bug-2622.out.00.html
## Comment 14473
Date: 2010-07-18 16:17:40 +0200
From: @drstmane
Changeset [504097576b7f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=504097576b7f) 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=504097576b7f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=504097576b7f)
Changeset description:
fixed bug #2622 "LIMIT & OFFSET ignored on 64-bit big-endian when combined with GROUP BY"
Indeed a 64-bit big-endian problem:
OFFSET value is internally stored as type wrd,
but sql/src/backends/monet5/sql_gencode.mx used to read from
ival instead of wval
## Comment 14795
Date: 2010-08-30 09:18:01 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
## Comment 15067
Date: 2010-10-19 09:13:37 +0200
From: @njnes
Changeset [333e14ad51c7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=333e14ad51c7) 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=333e14ad51c7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=333e14ad51c7)
Changeset description:
fixes bugs in limit (don't push topn under project, is handled in rel_bin
allready) Bug #2622 and Bug #2676
fix crash in Bug #2672 , ie complex between is now handled correctly
fix bug #2586, test for return types when using functions.
(and check for empty results on procedure calls)
| LIMIT & OFFSET ignored on 64-bit big-endian when combined with GROUP BY | https://api.github.com/repos/MonetDB/MonetDB/issues/2622/comments | 0 | 2020-11-30T11:06:36Z | 2024-06-27T11:48:45Z | https://github.com/MonetDB/MonetDB/issues/2622 | 753,381,793 | 2,622 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-17 12:06:41 +0200
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: 2.38.3 (Jun2010-SP1) [obsolete]
Last updated: 2010-08-30 09:17:58 +0200
## Comment 14447
Date: 2010-07-17 12:06:41 +0200
From: @drstmane
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.5.9-2.fc12 Firefox/3.5.9
Build Identifier:
The (formatting of) stderr output on Windows seems to be messed-up for some SQL tests that are implemented in Python.
Reproducible: Always
### Steps to Reproduce:
See the following TestWeb URL or run the respective tests on Windows.
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Int.32.32.d.1-Windows5.1/src_test_BugTracker/set_sql_debug_64__breaking_the_DB.SF-1906287.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Int.64.32.d.1-Windows6.0/src_test_BugTracker/set_a_new_user_password.SF-1844050.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Mic.32.32.d.1-Windows6.0/src_test_Connections/connections.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Mic.64.64.d.1-Windows6.0/src_test_BugTracker/mdb_starts_with_sql_debug_64.SF-1999354.err.00.html
## Comment 14449
Date: 2010-07-17 19:23:35 +0200
From: @sjoerdmullender
The problem, at least with the one test that I looked at, is that the stderr of multiple processes is intermixed. This can be solved be catching the output and printing it in a more coordinated fashion.
## Comment 14457
Date: 2010-07-18 09:26:01 +0200
From: @drstmane
Updated URLs are:
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/Int.32.32.d.1-Windows5.1/src_test_BugTracker/set_sql_debug_64__breaking_the_DB.SF-1906287.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/Int.64.32.d.1-Windows6.0/src_test_BugTracker/set_a_new_user_password.SF-1844050.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/Mic.32.32.d.1-Windows6.0/src_test_Connections/connections.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/Mic.64.64.d.1-Windows6.0/src_test_BugTracker/mdb_starts_with_sql_debug_64.SF-1999354.err.00.html
## Comment 14481
Date: 2010-07-19 11:05:50 +0200
From: @sjoerdmullender
Changeset [0fc1ce9d7571](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0fc1ce9d7571) 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=0fc1ce9d7571](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0fc1ce9d7571)
Changeset description:
Serialize output. This should fix bug #2621.
## Comment 14496
Date: 2010-07-21 06:53:30 +0200
From: @drstmane
On Windows (only) all 4 tests mentioned here now fail with
"initiating connection on socket failed: No error"
## Comment 14551
Date: 2010-07-28 10:52:12 +0200
From: @drstmane
The error with all four tests on Windows is now a simple
"could not connect".
## Comment 14552
Date: 2010-07-28 17:22:11 +0200
From: @sjoerdmullender
There are a couple of issues with these tests.
The tests all start an mserver and then one or more clients to communicate with the server. In all cases, the input and output of the server is connected through pipes to the Python process. Once the clients are done, the server is stopped by closing its stdin and then its output is also read (and printed).
The problem is that the output buffer of the mserver fills up much more quickly on Windows than on Linux, so the server hangs trying to write output before the clients can connect (hence the message).
This can be solved by having threads reading the server's output and so collecting the data. I have a patch ready for this for one of the tests.
However, there is still another problem: the clients can't connect right away. The server first has to initialize fully before it will accept connections. My patch doesn't address that issue, so I won't commit it just yet.
## Comment 14561
Date: 2010-07-30 09:57:37 +0200
From: @drstmane
There are more (pyhton) tests that appear to share the same (or a similar) faith on Windows:
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/Int.64.64.d.1-Windows6.0/src_test_BugTracker/connect_crash.SF-1436626.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/Int.64.64.d.1-Windows6.0/src_test_BugTracker-2009/lost_update.SF-2790020.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/Int.64.64.d.1-Windows6.0/src_test_BugTracker-2009/create_on_ro_db_crash.SF-2830238.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/Int.64.64.d.1-Windows6.0/src_test_mapi/smack01.err.00.html
## Comment 14562
Date: 2010-07-30 10:01:35 +0200
From: @drstmane
typo: "faith" -> "fate"
## Comment 14700
Date: 2010-08-16 22:37:03 +0200
From: @drstmane
Sjoerd,
I noticed that the MonetDB4 tcpip tests switch the server process default from unbuffered (bufsize = 0) to (fully) buffered (bufsize = -1).
Would that also help for these tests?
If so, we could consider the attached patch to change the default globally in process.py .
Stefan
## Comment 14701
Date: 2010-08-16 22:40:51 +0200
From: @drstmane
Created attachment 25
patch to set bufsize default system dependent; Windows: -1, other: 0
> Attached file: [process.py_bufsize_patch](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2621_process.py_bufsize_patch_25) (text/plain, 842 bytes)
> Description: patch to set bufsize default system dependent; Windows: -1, other: 0
## Comment 14703
Date: 2010-08-17 00:04:06 +0200
From: @drstmane
Changeset [3c26cd1b8bd7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3c26cd1b8bd7) 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=3c26cd1b8bd7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3c26cd1b8bd7)
Changeset description:
set default bufsize system dependent; Windows: -1, other: 0
This is mainly to let nightly testing check, whether setting the
bufsize on Windows to -1 (i.e., "use the system default, which
usually means fully buffered") instead of 0 (unbuffered)
helps to fix bug #2621.
I will consider reverting this if it does not help.
## Comment 14704
Date: 2010-08-17 08:45:42 +0200
From: @drstmane
Changeset [74e21cd4752a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=74e21cd4752a) 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=74e21cd4752a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=74e21cd4752a)
Changeset description:
reverting previous checkin; setting bufsize default does not help to fix bug #2621
## Comment 14707
Date: 2010-08-17 09:26:59 +0200
From: @sjoerdmullender
Created attachment 26
patch showing direction of possible fix
I didn't think it would work, but I didn't have time to analyze.
What I think will work is using multiple threads. I have a patch for one of the tests (attached for your amusement), but I'm not happy with this patch: I want something more generic and less complicated code in lots of tests.
I'll try to work out something that will satisfy me.
> Attached file: [threading.patch](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2621_threading.patch_26) (text/plain, 2600 bytes)
> Description: patch showing direction of possible fix
## Comment 14708
Date: 2010-08-17 09:45:14 +0200
From: @drstmane
Thanks!
Well, it's admittedly not a very crucial problem, but I just had that idea
yesterday ...
... and an other one today (;-)):
An alternative for using multiple threads could be (didn't test it, though) to
have each (sub-)process write stdout & stderr to files (say,
<TST>,{server,client}.{out,err}) and then append the content of these files to
tests final output (stdout & stderr) --- thats basically what Mtest.py itself
does with client-server tests --- preferably either solution should indeed be a
generic one (e.g., implemented in process.py) rather than patching all involved
tests individually.
## Comment 14709
Date: 2010-08-17 10:53:46 +0200
From: @sjoerdmullender
Created attachment 27
proposed fix
Here is a more generic solution to the problem. I have verified that at least one of the failing tests works correctly on Windows with this patch. I am now testing them all.
What this patch does is to replace the stdout and stderr file pointers with versions that use a thread to read from the pipe and use queues to communicate with that thread.
This solution should also work if you first read some stuff from the pipe before you call the communicate() method (unlike the first patch).
> Attached file: [threading.patch](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2621_threading.patch_27) (text/plain, 4568 bytes)
> Description: proposed fix
## Comment 14714
Date: 2010-08-17 15:16:49 +0200
From: @sjoerdmullender
Changeset [07ac8508edec](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=07ac8508edec) 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=07ac8508edec](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=07ac8508edec)
Changeset description:
Fix for bug #2621.
When you start multiple clients/servers using our Python process
module, and for each of those processes you collect the output in
order to print the output in an orderly manner (i.e. avoiding
intermixing of output from multiple processes), there is a potential
deadlock (or rather, starvation): several processes may be hanging,
trying to write output, while the Python process orchestrating all of
this is reading from yet another process (usually one that is waiting
for some other event that isn't going to happen).
We solve this by starting reader threads for each of the outputs
(stdout and stderr) of each of the processes we start. In order to be
able to read from the pipes in the Python program, we also provide a
read method to get data from the reader thread.
The upshot of this all is: no changes to the code that uses the
process module.
## Comment 14717
Date: 2010-08-18 08:21:57 +0200
From: @drstmane
With Sjoerd's fix, these tests appear to work fine on Windows, now.
Thanks!
However, on our Debian 4.0 machine, the only one in our testing pool with Python < 2.5 (Python 2.4.4), these tests now fail with
AttributeError: Queue instance has no attribute 'task_done'
cf.,
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/GNU.32.32.d.1-Debian4.0/src_test_BugTracker/set_sql_debug_64__breaking_the_DB.SF-1906287.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/GNU.32.32.d.1-Debian4.0/src_test_BugTracker/set_a_new_user_password.SF-1844050.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/GNU.32.32.d.1-Debian4.0/src_test_Connections/connections.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/GNU.32.32.d.1-Debian4.0/src_test_BugTracker/mdb_starts_with_sql_debug_64.SF-1999354.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/GNU.32.32.d.1-Debian4.0/src_test_BugTracker-2009/lost_update.SF-2790020.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/GNU.32.32.d.1-Debian4.0/src_test_BugTracker-2009/create_on_ro_db_crash.SF-2830238.err.00.html
## Comment 14718
Date: 2010-08-18 08:39:52 +0200
From: @sjoerdmullender
Debian 5 was released in Feb 2009, Python 2.5 was released in 2006. I see no reason whatever to keep supporting even older versions.
## Comment 14719
Date: 2010-08-18 08:50:38 +0200
From: @drstmane
I totally agree ;-)
I just reported the status, just in the unexpected case that there would have been a simple but convenient solution.
Now we need to do either of the following --- which ever is possible & convenient:
- upgrade our Debian 4 to Debian 5
- upgrade Python 2.4 to Python 2.5 on our Debian 4
- require Python 2.5 for (these) tests (via conditional)
- require Pyhton 2.5 for all MonetDB
## Comment 14720
Date: 2010-08-18 09:22:12 +0200
From: @sjoerdmullender
Or use:
try:
self._queue.task_done()
except AttributeError:
pass
The call is not essential, certainly not on versions that don't have it. ;-)
## Comment 14725
Date: 2010-08-18 18:41:52 +0200
From: @drstmane
Changeset [2a288b5e6274](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2a288b5e6274) 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=2a288b5e6274](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2a288b5e6274)
Changeset description:
ignore missing task_done() (with Python < 2.5)
as suggested by Sjoerd's comment to bug #2621
## Comment 14727
Date: 2010-08-19 07:47:01 +0200
From: @drstmane
These Python tests now also work fine with Python 2.4 on Debian 4.0.
## Comment 14789
Date: 2010-08-30 09:17:58 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
| Some *.py tests produce "strange(ly formatted)" stderr output on Windows | https://api.github.com/repos/MonetDB/MonetDB/issues/2621/comments | 0 | 2020-11-30T11:06:31Z | 2024-06-27T11:48:44Z | https://github.com/MonetDB/MonetDB/issues/2621 | 753,381,743 | 2,621 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-16 15:44:29 +0200
From: @grobian
To: SQL devs <<bugs-sql>>
Version: 2.40.1 (Oct2010) [obsolete]
CC: bugs-sql, @njnes
Blocker for: #2665
Last updated: 2010-11-15 09:39:07 +0100
## Comment 14440
Date: 2010-07-16 15:44:29 +0200
From: @grobian
(volund:src/modules/mal) fabian% $INSTALL_DIR/bin/monetdb create rslave
created database in maintenance mode: rslave
(volund:src/modules/mal) fabian% $INSTALL_DIR/bin/monetdb release rslave
taken database out of maintenance mode: rslave
(volund:src/modules/mal) fabian% $INSTALL_DIR/bin/mclient -drslave
Welcome to mclient, the MonetDB/SQL interactive terminal
Database: MonetDB v5.21.0, 'rslave'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>\d
TABLE sys.callhistory
TABLE sys.queryhistory
VIEW sys.querylog
TABLE sys.url_test
sql>
I was surprised to see these four objects, in particular the last one.
## Comment 14672
Date: 2010-08-13 07:53:09 +0200
From: @grobian
want to be kept in the loop
## Comment 14745
Date: 2010-08-20 14:32:34 +0200
From: @grobian
Changeset [e782d77127be](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e782d77127be) made by Fabian Groffen <fabian@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e782d77127be](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e782d77127be)
Changeset description:
Drop url_test table creation, partly fixes bug #2620
## Comment 14746
Date: 2010-08-20 15:48:48 +0200
From: @grobian
performing
UPDATE _tables
SET system = TRUE
WHERE name LIKE 'queryhistory'
AND schema_id = 2000;
in createdb.sql causes the server to crash like this:
SQL catalog created, loading sql scripts once
*** glibc detected *** /ufs/fabian/scratch/monetdb/current/program-x86_64/bin/mserver5: free(): invalid next size (fast): 0x00000000028b5670 ***
======= Backtrace: =========
/lib64/libc.so.6[0x37d9874ac6]
/ufs/fabian/scratch/monetdb/current/program-x86_64/lib/libbat.so.1(+0x9bb8e2)[0x7f0c4f3328e2]
...
Program received signal SIGABRT, Aborted.
0x00000037d98326c5 in raise () from /lib64/libc.so.6
(gdb) up
1 0x00000037d9833ea5 in abort () from /lib64/libc.so.6
(gdb)
2 0x00000037d986f133 in __libc_message () from /lib64/libc.so.6
(gdb)
3 0x00000037d9874ac6 in malloc_printerr () from /lib64/libc.so.6
(gdb)
4 0x00007ffff73268e2 in GDKfree_ (blk=0xb4bac8)
at /ufs/fabian/scratch/monetdb/current/common/src/gdk/gdk_utils.mx:1192
1192 free(((char *) s) - 8);
(gdb)
5 0x00007ffff7326a5a in GDKfree (blk=0xb4bac8)
at /ufs/fabian/scratch/monetdb/current/common/src/gdk/gdk_utils.mx:1201
1201 GDKfree_(blk);
(gdb)
6 0x00007ffff7cc9c07 in trimMalVariables (mb=0x1468738)
at /ufs/fabian/scratch/monetdb/current/five/src/mal/mal_instruction.mx:1739
1739 GDKfree(used);
(gdb) p used
$1 = (
bit *) 0xb4bac8 "\333\333\333\333\333\333\333\333\333\333\333\333\333\333\333\333\333\333\333\333\333\333\333\333\333\333\333\333\333\333\333\333\333\333\333\333\001\001\001\001\001\001\001\001"
(gdb) p sizeof(used)
$2 = 8
(gdb) l
1734 for (i=0; i<mb->ptop; i++) {
1735 if (mb->prps[i].var)
1736 used[mb->prps[i].var] = 1;
1737 }
1738 trimMalVariables_(mb, used, 0);
1739 GDKfree(used);
1740 }
1741
1742 @+ MAL constants
1743 Constants are stored in the symbol table and referenced
(gdb) p mb->ptop
$3 = 395
(gdb) l 1734
1729 q= getInstrPtr(mb,i);
1730
1731 for(j=0; j<q->argc; j++)
1732 used[getArg(q,j)] = 1;
1733 }
1734 for (i=0; i<mb->ptop; i++) {
1735 if (mb->prps[i].var)
1736 used[mb->prps[i].var] = 1;
1737 }
1738 trimMalVariables_(mb, used, 0);
(gdb) l 1729
1724
1725 used= (bit *) GDKzalloc(mb->vtop);
1726
1727 /* build the use table */
1728 for(i=0; i<mb->stop; i++){
1729 q= getInstrPtr(mb,i);
1730
1731 for(j=0; j<q->argc; j++)
1732 used[getArg(q,j)] = 1;
1733 }
(gdb)
1734 for (i=0; i<mb->ptop; i++) {
1735 if (mb->prps[i].var)
1736 used[mb->prps[i].var] = 1;
1737 }
1738 trimMalVariables_(mb, used, 0);
1739 GDKfree(used);
1740 }
1741
1742 @+ MAL constants
1743 Constants are stored in the symbol table and referenced
(gdb) p mb->vtop
$4 = 11
(gdb) p mb->stop
$5 = 8
(gdb) p mb->prps
$6 = (MalProp *) 0x1ab89c8
(gdb) p *mb->prps
$7 = {idx = 14 '\016', op = 2 '\002', var = 11844296}
(gdb) p mb->prps.var
$8 = 11844296
(gdb) p *mb
$9 = {binding = 0x0, help = 0x0, alternative = 0x0, vtop = 11, vsize = 352,
var = 0x1ab7388, stop = 8, ssize = 740, stmt = 0x1a89948, ptop = 395,
psize = 416, prps = 0x1ab89c8, errors = 0, typefixed = 0, flowfixed = 1,
profiler = 0x0, history = 0x0, keephistory = 0, marker = 0x0, maxarg = 12,
replica = 0x0, recycle = 0, recid = 0, legid = -2604246222170760229,
trap = 0}
(gdb) p *mb->prps
$10 = {idx = 14 '\016', op = 2 '\002', var = 11844296}
(gdb) p *mb->prps[394]
Structure has no component named operator*.
(gdb) p mb->prps[394]
$11 = {idx = 2 '\002', op = 2 '\002', var = 0}
(gdb) p mb->prps[395]
$12 = {idx = 0 '\000', op = 0 '\000', var = 0}
(gdb) p mb->prps[393]
$13 = {idx = 23 '\027', op = 0 '\000', var = 0}
(gdb) p mb->prps[392]
$14 = {idx = 22 '\026', op = 3 '\003', var = 5936}
(gdb) quit
A debugging session is active.
Inferior 1 [process 6826] will be killed.
Quit anyway? (y or n) y
## Comment 14878
Date: 2010-09-08 10:56:08 +0200
From: @sjoerdmullender
Changeset [4315a44b501d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4315a44b501d) 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=4315a44b501d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4315a44b501d)
Changeset description:
Test that an empty database is also empty according to msqldump.
This is also a test for bug #2620.
## Comment 14879
Date: 2010-09-08 10:56:09 +0200
From: @sjoerdmullender
Changeset [383a00ae3261](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=383a00ae3261) 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=383a00ae3261](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=383a00ae3261)
Changeset description:
Merge with Oct2010 branch.
Test that an empty database is also empty according to msqldump.
This is also a test for bug #2620.
## Comment 14880
Date: 2010-09-08 10:59:55 +0200
From: @grobian
Created attachment 34
patch from my patchqueue
This is the patch that's in my patchqueue. It is held back due to mserver5 crashing somewhere deep down (see previous comments), but should solve the problem of table queryhistory being a non-system table (and hence visible).
> Attached file: [bug-2620.patch](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2620_bug-2620.patch_34) (text/plain, 5070 bytes)
> Description: patch from my patchqueue
## Comment 14881
Date: 2010-09-08 11:01:47 +0200
From: @sjoerdmullender
I'm declaring this a blocking issue for a release.
If you make a dump of the database, it MUST be possible to reload the database,
and currently it isn't.
## Comment 14882
Date: 2010-09-08 11:04:45 +0200
From: @sjoerdmullender
(In reply to comment 6)
> Created attachment 34 [details]
> patch from my patchqueue
>
> This is the patch that's in my patchqueue. It is held back due to mserver5
> crashing somewhere deep down (see previous comments), but should solve the
> problem of table queryhistory being a non-system table (and hence visible).
Setting the system flag on the tables isn't enough. There are also a bunch of UDFs that pollute the dump.
## Comment 14883
Date: 2010-09-08 11:07:36 +0200
From: @grobian
Maybe make a tracker bug with blocking issues for the release.
We can transform this one into visible tables, and create a new bug for visible UDFs. Both must be solved prior the Oct2010 release (the tracker bug).
## Comment 14886
Date: 2010-09-08 13:54:55 +0200
From: @sjoerdmullender
Changeset [14ff7882903e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=14ff7882903e) 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=14ff7882903e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=14ff7882903e)
Changeset description:
When freeing variables, you must also delete properties that refer to the freed variables.
This is a prerequisite for fixing bug #2620.
## Comment 14887
Date: 2010-09-08 14:26:34 +0200
From: @sjoerdmullender
Changeset [8fa82454536c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8fa82454536c) 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=8fa82454536c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=8fa82454536c)
Changeset description:
Set the 'system' property on tables created by the system.
This is an adaptation of Fabian's patch for bug #2620 and should fix the bug.
## Comment 14888
Date: 2010-09-08 14:26:35 +0200
From: @sjoerdmullender
Changeset [e3d5d6145be0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e3d5d6145be0) 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=e3d5d6145be0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e3d5d6145be0)
Changeset description:
Merge with Oct2010 branch.
Set the 'system' property on tables created by the system.
This is an adaptation of Fabian's patch for bug #2620 and should fix the bug.
## Comment 14894
Date: 2010-09-09 15:58:22 +0200
From: @sjoerdmullender
mclient now no longer reports any tables when doing \d on a newly created database. The server no longer crashes when you update the _tables table as proposed by Fabian's patch.
There is a test that specifically tests dump on a newly created database.
I.e., this bug is fixed.
| fresh database contains tables | https://api.github.com/repos/MonetDB/MonetDB/issues/2620/comments | 0 | 2020-11-30T11:06:27Z | 2024-06-27T11:48:43Z | https://github.com/MonetDB/MonetDB/issues/2620 | 753,381,690 | 2,620 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-16 14:23:49 +0200
From: @grobian
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 5.20.3 (Jun2010-SP1) [obsolete]
CC: @mlkersten, @drstmane
Last updated: 2010-08-30 09:18:03 +0200
## Comment 14437
Date: 2010-07-16 14:23:49 +0200
From: @grobian
mal>io.printf("bla\n");
bla
mal>io.printf("bla");
bla
(never returns prompt, doesn't listen to arguments any more)
same for variants like io.printf("%s", "bla");
## Comment 14438
Date: 2010-07-16 14:28:37 +0200
From: @grobian
I think this is mclient/mapi that waits for a newline, and hence hangs. Not sure if we can fix this at all.
## Comment 14439
Date: 2010-07-16 14:43:41 +0200
From: @grobian
JDBC detects the violation and reports the problem:
Welcome to the MonetDB interactive JDBC terminal!
Type \q to quit, \h for a list of available commands
auto commit mode: on
monetdb-> io.printf("bla");
Error: protocol violation, unexpected line: bla
monetdb-> io.printf("bla\n");
Error: protocol violation, unexpected line: bla
monetdb-> io.printf("bla");
Connection warning: bla
monetdb-> io.printf("bla\n");
Connection warning: bla
monetdb->
## Comment 14477
Date: 2010-07-18 19:22:45 +0200
From: @mlkersten
The io.printf() is purposely defined this way, because a script may decompose the print into multiple steps. All protocol related issues are for the user of this facility. As such, this function is only relevant for those who are directly executing MAL functions.
## Comment 14492
Date: 2010-07-20 17:46:38 +0200
From: @sjoerdmullender
This occurs in Jun2010 version also (and all versions that went before).
## Comment 14493
Date: 2010-07-20 17:54:10 +0200
From: @sjoerdmullender
Changeset [d3b433a65d94](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d3b433a65d94) 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=d3b433a65d94](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d3b433a65d94)
Changeset description:
In case of an incomplete line from the server, add a newline.
This fixes bug #2619.
## Comment 14494
Date: 2010-07-20 18:01:08 +0200
From: @sjoerdmullender
(In reply to comment 3)
> The io.printf() is purposely defined this way, because a script may decompose
> the print into multiple steps. All protocol related issues are for the user of
> this facility. As such, this function is only relevant for those who are
> directly executing MAL functions.
This is somewhat of a red herring. The script may decompose the print into multiple steps, but in the end, a complete line should be written.
My solution (although it doesn't give a warning like JDBC) will add an extra newline at the end of the script if one was missing, but it does that on the client side. This means that if a script uses lots of io.printf statements to produce a single line, nothing changes.
In Fabian's example, the whole script was only the one io.printf statement without the newline.
## Comment 14495
Date: 2010-07-20 18:43:55 +0200
From: @grobian
This bug is somewhat vague, but I think Sjoerd's fix does the right thing if it prevents mclient (mapilib) from hanging because it believes more is to come. In the end, yes printf("bla") is just incomplete, but the client should protect itself from waiting forever (a.k.a. hang).
If everyone agrees, I think we should close this bug now.
## Comment 14534
Date: 2010-07-26 07:29:55 +0200
From: @mlkersten
Yes, we can close it. The user of io.printf should obey the protocol.
## Comment 14539
Date: 2010-07-26 21:51:45 +0200
From: @mlkersten
Ofcourse the test output should be approved as well.
## Comment 14540
Date: 2010-07-26 21:59:15 +0200
From: @mlkersten
The output of Jun2010 src/mal/Tests contains 32 errors.
## Comment 14541
Date: 2010-07-27 08:36:24 +0200
From: @drstmane
Which output and which tests exactly do you refer to?
(As far as I can see, there is not test for this bug (yet?).)
According to the TestWeb, cf.,
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/MonetDB5/.mTests103/index_short.html
all MonetDB5 tests work fine, except
- src/mal/tst660 & src/modules/mal/mapi06 which failed tonight do due yesterday's error message changes; I just approved the new output
- the tests reported to fail on Window in bugs 2584 & 2603
- some remote & mapi tests that (ir?)regularly timeout on Windows
... well, this refers to testing with only MonetDB5 available, i.e., without sql & geom being available; if the latter are available during testing, some tests that report administrative information that depends on which modules are loaded might show different output since their modules are nowadays loaded automatically, if available ...
## Comment 14548
Date: 2010-07-27 20:45:57 +0200
From: @mlkersten
Thanks. Indeed the errors were a result of incomplete version.
## Comment 14799
Date: 2010-08-30 09:18:03 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
| io.printf without newline hangs | https://api.github.com/repos/MonetDB/MonetDB/issues/2619/comments | 0 | 2020-11-30T11:06:24Z | 2024-06-27T11:48:42Z | https://github.com/MonetDB/MonetDB/issues/2619 | 753,381,652 | 2,619 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-16 13:43:23 +0200
From: @grobian
To: MonetDB5 devs <<bugs-monetdb5>>
Version: -- development
CC: @mlkersten, @yzchang
Last updated: 2015-08-28 13:41:43 +0200
## Comment 14436
Date: 2010-07-16 13:43:23 +0200
From: @grobian
MonetDB lacks a master/slave replication scheme, such as e.g. MySQL has.
Many ingredients are already implemented in the development branch. The master and slave properties are being handled by monetdb and merovingian, and a merovingian_url property is passed onto each database being started by merovingian.
The feature should be finished in a generic way, e.g. it shouldn't only just work on the same machine by accident because the IPs of master and slave are the same.
## Comment 16029
Date: 2011-07-29 10:59:40 +0200
From: @sjoerdmullender
Apr2011-SP2 has been released.
## Comment 16266
Date: 2011-09-16 15:09:14 +0200
From: @sjoerdmullender
The Aug2011 version has been released.
## Comment 17355
Date: 2012-06-12 08:36:18 +0200
From: @grobian
as long as this is not working, we should remove the handles from monetdbd for this
## Comment 17359
Date: 2012-06-13 16:03:32 +0200
From: @grobian
Changeset [877b04706e12](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=877b04706e12) made by Fabian Groffen <fabian@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=877b04706e12](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=877b04706e12)
Changeset description:
master/slave replication: remove non-functional work in progress
The master/slave replication work will be committed in a separate
branch that will track the progress for bug #2618.
For as long as that work is not finished, we remove the work in progress
from the default (and so release) branche not to confuse users of the
system by presenting options for non-functional bits.
## Comment 18105
Date: 2012-11-27 15:08:37 +0100
From: @yzchang
Don't know if possible and how to add test for this
## Comment 19963
Date: 2014-08-06 14:59:06 +0200
From: @mlkersten
This request is dealt with in MonetDB Solutions context.
The code becomes available in an upcoming feature release.
## Comment 21183
Date: 2015-08-28 13:41:43 +0200
From: @sjoerdmullender
Jul2015 has been released.
| Implement master slave scheme | https://api.github.com/repos/MonetDB/MonetDB/issues/2618/comments | 0 | 2020-11-30T11:06:21Z | 2024-06-27T11:48:41Z | https://github.com/MonetDB/MonetDB/issues/2618 | 753,381,602 | 2,618 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-15 19:04:00 +0200
From: Mark Bucciarelli <<mkbucc>>
To: SQL devs <<bugs-sql>>
Version: 2.36.5 (Feb2010-SP2) [obsolete]
CC: @mlkersten, @njnes, @drstmane
Last updated: 2010-07-30 23:14:58 +0200
## Comment 14424
Date: 2010-07-15 19:04:00 +0200
From: Mark Bucciarelli <<mkbucc>>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6
Build Identifier:
SELECT
id
FROM
tbl1
WHERE
(
user_id = 1 AND
event_id = (
SELECT
id
FROM
tbl2
ORDER BY
title ASC,
id ASC
LIMIT 1
) AND
dt = '2010-07-14' AND
occurrence_id = 1
)
;
~
Reproducible: Always
### Steps to Reproduce:
1. setup a tbl1 and tbl2 to above query makes sense
2. run above sql with mclient
### Actual Results:
$ mclient -l sql -d test -u test t.sql
password:
MAPI = matcher@localhost:50000
QUERY = SELECT
id
FROM
tbl1
WHERE
(
user_id = 1 AND
event_id = (
SELECT
id
FROM
tbl2
ORDER BY
title ASC,
id ASC
LIMIT 1
) AND
dt = '2010-07-14' AND
occurrence_id = 1
)
;
ERROR = !syntax error, unexpected ORDER, expecting INTERSECT or EXCEPT or UNION or ')' in: "select
! id
!from
! tbl1
!
!where
! (
! user_id = 1 and
! event_id = (
! select
! id
! from
! tbl2
! order"
$
### Expected Results:
This query should run fine.
## Comment 14427
Date: 2010-07-15 19:31:13 +0200
From: @drstmane
Knowing your database schema and the version of MonetDB that you're using would help us very much with reproducing, analyzing and hopefully fixing your problem.
Thanks!
## Comment 14428
Date: 2010-07-15 19:31:44 +0200
From: @drstmane
Oops, sorry --- "Version" says "Feb2010-SP2" -- my fault ...
## Comment 14429
Date: 2010-07-15 19:34:24 +0200
From: Mark Bucciarelli <<mkbucc>>
I suspect any schema that makes this SQL valid
will manifest the problem. That has been my
experience so far with these SQL bugs.
I'm on vacation next week, so if you want me to
do the create table stuff it'll be at least a week.
## Comment 14430
Date: 2010-07-15 19:44:11 +0200
From: @grobian
Schema doesn't matter, ORDER BY isn't allowed in sub-queries, as is LIMIT. Your trick to just get a record by id, and then retrieve the rest isn't allowed per the standard.
## Comment 14431
Date: 2010-07-15 19:49:57 +0200
From: Mark Bucciarelli <<mkbucc>>
Wow, then Django is doing it wrong.
I'll let them know.
Is spec public? Can you link to section
that you reference?
Thanks.
## Comment 14432
Date: 2010-07-15 19:52:49 +0200
From: @grobian
Not that I know actually. I think it costs you a lot of money by design to see it. The bigger problem is that it isn't necessarily easy to suggest an alternative query that does the same.
## Comment 14433
Date: 2010-07-15 20:10:21 +0200
From: @mlkersten
You can use a table producing function?
sql>create function t() returns table( id int) begin return select id from _tables limit 3; end;
operation successful
sql>select * from t();
+------+
| id |
+======+
| 2001 |
| 2006 |
| 2015 |
+------+
3 tuples (2.538ms)
sql>select id from _tables where id in (select id from t());
+------+
| id |
+======+
| 2001 |
| 2006 |
| 2015 |
+------+
3 tuples (5.025ms)
## Comment 14579
Date: 2010-07-30 23:14:58 +0200
From: @njnes
order by can only be applied on the top level select/insert etc.
| Unexpected ORDER BY | https://api.github.com/repos/MonetDB/MonetDB/issues/2617/comments | 0 | 2020-11-30T11:06:18Z | 2024-06-28T13:20:36Z | https://github.com/MonetDB/MonetDB/issues/2617 | 753,381,572 | 2,617 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-15 03:51:35 +0200
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes, @drstmane
Last updated: 2010-08-13 01:10:03 +0200
## Comment 14402
Date: 2010-07-15 03:51:35 +0200
From: @skinkie
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.55 Safari/533.4
Build Identifier:
The following test works:
sql>create table test (test varchar(1), test2 varchar(2), datum date);
operation successful
sql>insert into test values ('a', 'bc', '2010-06-25');
1 affected row
sql>select test from test where test2 = 'bc' order by datum limit 1;
+------+
| test |
+======+
| a |
+------+
1 tuple
The actual query results in the following:
sql>select uitspraak from uitspraken where rechtsgebied = 'Faillissement' order by datum limit 1;
1 tuple
[nothing else]
Removing the order by does result in output. Other types such as order by [varchar] seem not to inhibit this behavior, and just produce output.
Reproducible: Sometimes
MonetDB server v5.21.0 (64-bit), based on kernel v1.39.0 (64-bit oids)
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
Visit http://monetdb.cwi.nl/ for further information
Found 3.9GiB available memory, 2 available cpu cores
Configured for prefix: /opt/monetdb-testing
Libraries:
libpcre: 8.02 2010-03-19 (compiled with 8.02)
openssl: OpenSSL 0.9.8o 01 Jun 2010 (compiled with OpenSSL 0.9.8o 01 Jun 2010)
libxml2: 2.7.7 (compiled with 2.7.7)
Compiled by: skinkie@openkvk (x86_64-unknown-linux-gnu)
Compilation: gcc -Wall -Wextra -fno-strict-aliasing -g -Werror-implicit-function-declaration -Werror -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/x86_64-pc-linux-gnu/bin/ld -IPA -m elf_x86_64
## Comment 14403
Date: 2010-07-15 04:37:10 +0200
From: @skinkie
CREATE TABLE "sys"."uitspraken" (
"ljn" char(6) NOT NULL,
"gepubliceerd" boolean NOT NULL,
"instantie" varchar(63) NOT NULL,
"datum" date NOT NULL,
"publicatie" date,
"zaaknummers" varchar(100) NOT NULL,
"uitspraak" CHARACTER LARGE OBJECT,
"conclusie" CHARACTER LARGE OBJECT,
"zittingsplaats" varchar(16),
"rechtsgebied" varchar(24),
"sector" varchar(20),
"soort" varchar(32),
"indicatie" CHARACTER LARGE OBJECT,
"kop" CHARACTER LARGE OBJECT,
CONSTRAINT "uitspraken_ljn_pkey" PRIMARY KEY ("ljn")
);
## Comment 14407
Date: 2010-07-15 09:15:59 +0200
From: @drstmane
Since your small example does work fine --- possibly because in contains only one single tuple; hence "order by" is more than trivial; maybe you could try with more than one tuple, preferably not inserted in sorting order --- and we do not have your data to reproduce (and hence be able to analyze and hopefully fix) the bug, could you please run your query on your data prefixed with both "PLAN" and "EXPLAIN" (one at a time) and provide us (e.g., attach to this bug report) with the two outputs?
It would be great the have two TRACE outputs of your query (on your data), one when it works fine, and one when it does not (i.e., produces an incomplete result).
## Comment 14410
Date: 2010-07-15 09:58:51 +0200
From: @skinkie
(In reply to comment 2)
> Since your small example does work fine --- possibly because in contains only
> one single tuple; hence "order by" is more than trivial; maybe you could try
> with more than one tuple, preferably not inserted in sorting order ---
I have just tried that, but that seems to be working. For the small example.
> and we
> do not have your data to reproduce (and hence be able to analyze and hopefully
> fix) the bug, could you please run your query on your data prefixed with both
> "PLAN" and "EXPLAIN" (one at a time) and provide us (e.g., attach to this bug
> report) with the two outputs?
Plan:
top N (
| project (
| | select (
| | | table(sys.uitspraken) [ uitspraken.id NOT NULL, uitspraken.datum NOT NULL, uitspraken.uitspraak, uitspraken.rechtsgebied, uitspraken.%TID% NOT NULL ]
| | ) [ uitspraken.rechtsgebied = convert('Faillissement') ]
| ) [ uitspraken.datum ASC NOT NULL ] [ uitspraken.uitspraak ]
) [ 1 ]
Explain:
% .explain table_name
% mal name
% clob type
% 0 length
function user.s1_1{autoCommit=true}():void;
_2 := sql.mvc();
barrier _116 := language.dataflow();
_50:bat[:oid,:str] := sql.bind(_2,"sys","uitspraken","rechtsgebied",0,0@0:oid,87752@0);
_57 := algebra.uselect(_50,"Faillissement":str);
_7:bat[:oid,:str] := sql.bind(_2,"sys","uitspraken","rechtsgebied",2);
_59 := algebra.kdifference(_57,_7);
_9 := algebra.uselect(_7,"Faillissement":str);
_61 := algebra.semijoin(_9,_50);
_63 := algebra.kunion(_59,_61);
_13:bat[:oid,:oid] := sql.bind_dbat(_2,"sys","uitspraken",1);
_14 := bat.reverse(_13);
_65 := algebra.kdifference(_63,_14);
_68 := algebra.markT(_65,3,0);
_79 := bat.reverse(_68);
_53:bat[:oid,:date] := sql.bind(_2,"sys","uitspraken","datum",0,0@0:oid,87752@0);
_16:bat[:oid,:date] := sql.bind(_2,"sys","uitspraken","datum",2);
_85 := algebra.kdifference(_53,_16);
_87 := algebra.semijoin(_16,_53);
_89 := algebra.kunion(_85,_87);
_91 := algebra.leftjoin(_79,_89);
_52:bat[:oid,:str] := sql.bind(_2,"sys","uitspraken","rechtsgebied",0,87752@0,nil:oid);
_58 := algebra.uselect(_52,"Faillissement":str);
_60 := algebra.kdifference(_58,_7);
_62 := algebra.semijoin(_9,_52);
_64 := algebra.kunion(_60,_62);
_66 := algebra.kdifference(_64,_14);
_71 := algebra.markT(_66,3,1);
_83 := bat.reverse(_71);
_54:bat[:oid,:date] := sql.bind(_2,"sys","uitspraken","datum",0,87752@0,nil:oid);
_86 := algebra.kdifference(_54,_16);
_88 := algebra.semijoin(_16,_54);
_90 := algebra.kunion(_86,_88);
_92 := algebra.leftjoin(_83,_90);
_10:bat[:oid,:str] := sql.bind(_2,"sys","uitspraken","rechtsgebied",1);
_12 := algebra.uselect(_10,"Faillissement":str);
_67 := algebra.kdifference(_12,_14);
_74 := algebra.markT(_67,3,2);
_84 := bat.reverse(_74);
_17:bat[:oid,:date] := sql.bind(_2,"sys","uitspraken","datum",1);
_93 := algebra.leftjoin(_84,_17);
_21 := mat.pack(_91,_92,_93);
_22 := pqueue.topn_max(_21,1:wrd);
_23 := algebra.sortTail(_22);
_28:bat[:oid,:str] := sql.bind(_2,"sys","uitspraken","uitspraak",1);
_102 := algebra.leftjoin(_84,_28);
_20 := mat.pack(_89,_90,_17);
_30 := pqueue.topn_max(_20,1:wrd);
_106 := algebra.join(_84,_30);
_109 := algebra.semijoin(_102,_106);
_115 := algebra.semijoin(_109,_23);
_56:bat[:oid,:str] := sql.bind(_2,"sys","uitspraken","uitspraak",0,87752@0,nil:oid);
_26:bat[:oid,:str] := sql.bind(_2,"sys","uitspraken","uitspraak",2);
_95 := algebra.kdifference(_56,_26);
_97 := algebra.semijoin(_26,_56);
_99 := algebra.kunion(_95,_97);
_101 := algebra.leftjoin(_83,_99);
_104 := algebra.join(_83,_30);
_108 := algebra.semijoin(_101,_104);
_114 := algebra.semijoin(_108,_23);
_55:bat[:oid,:str] := sql.bind(_2,"sys","uitspraken","uitspraak",0,0@0:oid,87752@0);
_94 := algebra.kdifference(_55,_26);
_96 := algebra.semijoin(_26,_55);
_98 := algebra.kunion(_94,_96);
_100 := algebra.leftjoin(_79,_98);
_103 := algebra.join(_79,_30);
_107 := algebra.semijoin(_100,_103);
_111 := algebra.semijoin(_107,_23);
exit _116;
_32 := sql.resultSet(1,1,_23);
_31 := mat.pack(_111,_114,_115);
sql.rsColumn(_32,"sys.uitspraken","uitspraak","clob",0,0,_31);
_36 := io.stdout();
sql.exportResult(_36,_32);
end s1_1;
> It would be great the have two TRACE outputs of your query (on your data), one
> when it works fine, and one when it does not (i.e., produces an incomplete
> result).
Broken:
% sys.uitspraken table_name
% uitspraak name
% clob type
% 0 length
% .trace, .trace table_name
% ticks, stmt name
% bigint, varchar type
% 6, 117 length
[ 4, "_3 := sql.mvc();" ]
[ 42, "_55:bat[:oid,:str] <tmp_2507>[87752] := sql.bind(_3=48360856,\"sys\",\"uitspraken\",\"uitspraak\",0,0@0:oid,87752@0);" ]
[ 13, "_27:bat[:oid,:str] <tmp_2223>[0] := sql.bind(_3=48360856,\"sys\",\"uitspraken\",\"uitspraak\",2);" ]
[ 22, "_56:bat[:oid,:str] <tmp_2551>[87752] := sql.bind(_3=48360856,\"sys\",\"uitspraken\",\"uitspraak\",0,87752@0,nil:oid);" ]
[ 35, "_94<tmp_2540>[87752] := algebra.kdifference(_55=<tmp_2507>:bat[:oid,:str][87752],_27=<tmp_2223>:bat[:oid,:str][0]);" ]
[ 14, "_29:bat[:oid,:str] <tmp_2224>[0] := sql.bind(_3=48360856,\"sys\",\"uitspraken\",\"uitspraak\",1);" ]
[ 27, "_95<tmp_2367>[87752] := algebra.kdifference(_56=<tmp_2551>:bat[:oid,:str][87752],_27=<tmp_2223>:bat[:oid,:str][0]);" ]
[ 16, "_18:bat[:oid,:date] <tmp_2246>[0] := sql.bind(_3=48360856,\"sys\",\"uitspraken\",\"datum\",1);" ]
[ 58, "_97<tmpr_2553>[0] := algebra.semijoin(_27=<tmp_2223>:bat[:oid,:str][0],_56=nil:bat[:oid,:str]);" ]
[ 18, "_11:bat[:oid,:str] <tmp_2224>[0] := sql.bind(_3=48360856,\"sys\",\"uitspraken\",\"rechtsgebied\",1);" ]
[ 43, "_13<tmp_2554>[0] := algebra.uselect(_11=nil:bat[:oid,:str],A0=\"Faillissement\");" ]
[ 38, "_96<tmpr_2551>[0] := algebra.semijoin(_27=nil:bat[:oid,:str],_55=nil:bat[:oid,:str]);" ]
[ 39, "_98<tmp_2507>[87752] := algebra.kunion(_94=nil,_96=nil);" ]
[ 26, "_54:bat[:oid,:date] <tmp_2551>[87752] := sql.bind(_3=48360856,\"sys\",\"uitspraken\",\"datum\",0,87752@0,nil:oid);" ]
[ 23, "_52:bat[:oid,:str] <tmp_2540>[87752] := sql.bind(_3=48360856,\"sys\",\"uitspraken\",\"rechtsgebied\",0,87752@0,nil:oid);" ]
[ 1736, "_58<tmp_2557>[606] := algebra.uselect(_52=<tmp_2540>:bat[:oid,:str][87752],A0=\"Faillissement\");" ]
[ 14, "_17:bat[:oid,:date] <tmp_2245>[0] := sql.bind(_3=48360856,\"sys\",\"uitspraken\",\"datum\",2);" ]
[ 24, "_86<tmp_2550>[87752] := algebra.kdifference(_54=<tmp_2551>:bat[:oid,:date][87752],_17=<tmp_2245>:bat[:oid,:date][0]);" ]
[ 26, "_53:bat[:oid,:date] <tmp_2401>[87752] := sql.bind(_3=48360856,\"sys\",\"uitspraken\",\"datum\",0,0@0:oid,87752@0);" ]
[ 19, "_85<tmp_2556>[87752] := algebra.kdifference(_53=<tmp_2401>:bat[:oid,:date][87752],_17=<tmp_2245>:bat[:oid,:date][0]);" ]
[ 47, "_99<tmp_2532>[87752] := algebra.kunion(_95=nil,_97=nil);" ]
[ 11, "_14:bat[:oid,:oid] <tmp_2210>[0] := sql.bind_dbat(_3=48360856,\"sys\",\"uitspraken\",1);" ]
[ 46, "_87<tmpr_2553>[0] := algebra.semijoin(_17=<tmp_2245>:bat[:oid,:date][0],_53=nil:bat[:oid,:date]);" ]
[ 14, "_15<tmpr_2210>[0] := bat.reverse(_14=nil:bat[:oid,:oid]);" ]
[ 46, "_89<tmp_2401>[87752] := algebra.kunion(_85=nil,_87=nil);" ]
[ 40, "_88<tmpr_2553>[0] := algebra.semijoin(_17=nil:bat[:oid,:date],_54=nil:bat[:oid,:date]);" ]
[ 16, "_8:bat[:oid,:str] <tmp_2223>[0] := sql.bind(_3=48360856,\"sys\",\"uitspraken\",\"rechtsgebied\",2);" ]
[ 35, "_90<tmp_2551>[87752] := algebra.kunion(_86=nil,_88=nil);" ]
[ 40, "_10<tmp_2550>[0] := algebra.uselect(_8=<tmp_2223>:bat[:oid,:str][0],A0=\"Faillissement\");" ]
[ 27, "_50:bat[:oid,:str] <tmp_2553>[87752] := sql.bind(_3=48360856,\"sys\",\"uitspraken\",\"rechtsgebied\",0,0@0:oid,87752@0);" ]
[ 1713, "_57<tmp_2556>[373] := algebra.uselect(_50=<tmp_2553>:bat[:oid,:str][87752],A0=\"Faillissement\");" ]
[ 28, "_59<tmp_2367>[373] := algebra.kdifference(_57=nil,_8=<tmp_2223>:bat[:oid,:str][0]);" ]
[ 21, "_60<tmp_2547>[606] := algebra.kdifference(_58=nil,_8=nil:bat[:oid,:str]);" ]
[ 46, "_61<tmpr_2552>[0] := algebra.semijoin(_10=<tmp_2550>[0],_50=nil:bat[:oid,:str]);" ]
[ 35, "_63<tmp_2553>[373] := algebra.kunion(_59=nil,_61=nil);" ]
[ 29, "_65<tmp_2552>[373] := algebra.kdifference(_63=nil,_15=<tmpr_2210>[0]);" ]
[ 27, "_68<tmp_2553>[373] := algebra.markT(_65=nil,3,0);" ]
[ 9, "_79<tmpr_2553>[373] := bat.reverse(_68=nil);" ]
[ 92, "_91<tmp_2552>[373] := algebra.leftjoin(_79=<tmpr_2553>[373],_89=<tmp_2401>[87752]);" ]
[ 45, "_62<tmpr_2555>[0] := algebra.semijoin(_10=nil,_52=nil:bat[:oid,:str]);" ]
[ 45, "_64<tmp_2540>[606] := algebra.kunion(_60=nil,_62=nil);" ]
[ 29, "_66<tmp_2555>[606] := algebra.kdifference(_64=nil,_15=<tmpr_2210>[0]);" ]
[ 29, "_71<tmp_2540>[606] := algebra.markT(_66=nil,3,1);" ]
[ 10, "_83<tmpr_2540>[606] := bat.reverse(_71=nil);" ]
[ 122, "_92<tmp_2555>[606] := algebra.leftjoin(_83=<tmpr_2540>[606],_90=<tmp_2551>[87752]);" ]
[ 41330, "_100<tmp_2367>[373] := algebra.leftjoin(_79=<tmpr_2553>[373],_98=nil);" ]
[ 18, "_67<tmp_2507>[0] := algebra.kdifference(_13=nil,_15=nil);" ]
[ 9, "_74<tmp_2554>[0] := algebra.markT(_67=nil,3,2);" ]
[ 5, "_84<tmpr_2554>[0] := bat.reverse(_74=nil);" ]
[ 16, "_93<tmp_2547>[0] := algebra.leftjoin(_84=<tmpr_2554>[0],_18=<tmp_2246>:bat[:oid,:date][0]);" ]
[ 92, "_20<tmp_2550>[979] := mat.pack(_91=nil,_92=nil,_93=nil);" ]
[ 58, "_21<tmp_2547>[1] := pqueue.topn_max(_20=nil,1:wrd);" ]
[ 27, "_22<tmpr_2550>[1] := algebra.sortTail(_21=nil);" ]
[ 12, "_102<tmp_2533>[0] := algebra.leftjoin(_84=<tmpr_2554>[0],_29=nil:bat[:oid,:str]);" ]
[ 7895, "_19<tmp_2547>[175504] := mat.pack(_89=nil,_90=nil,_18=nil:bat[:oid,:date]);" ]
[ 5472, "_31<tmp_2551>[1] := pqueue.topn_max(_19=nil,1:wrd);" ]
[ 29, "_106<tmp_2547>[0] := algebra.join(_84=nil,_31=<tmp_2551>[1]);" ]
[ 20, "_109<tmp_2554>[0] := algebra.semijoin(_102=nil,_106=nil);" ]
[ 20, "_115<tmp_2530>[0] := algebra.semijoin(_109=nil,_22=<tmpr_2550>[1]);" ]
[ 47393, "_101<tmp_2555>[606] := algebra.leftjoin(_83=<tmpr_2540>[606],_99=nil);" ]
[ 49, "_104<tmpr_2532>[0] := algebra.join(_83=nil,_31=<tmp_2551>[1]);" ]
[ 454, "_108<tmpr_2411>[0] := algebra.semijoin(_101=nil,_104=nil);" ]
[ 19, "_114<tmp_2541>[0] := algebra.semijoin(_108=nil,_22=<tmpr_2550>[1]);" ]
[ 55, "_103<tmpr_2532>[0] := algebra.join(_79=nil,_31=nil);" ]
[ 370, "_107<tmpr_2411>[0] := algebra.semijoin(_100=nil,_103=nil);" ]
[ 18, "_111<tmp_2426>[0] := algebra.semijoin(_107=nil,_22=<tmpr_2550>[1]);" ]
[ 101859, "barrier _116 := language.dataflow();" ]
[ 12, "_33 := sql.resultSet(1,1,_22=nil);" ]
[ 16, "_32<tmp_2402>[0] := mat.pack(_111=nil,_114=nil,_115=nil);" ]
[ 10, "sql.rsColumn(_33=7,\"sys.uitspraken\",\"uitspraak\",\"clob\",0,0,_32=nil);" ]
[ 1, "_37 := io.stdout();" ]
[ 37, "sql.exportResult(_37=41950432,_33=7);" ]
[ 102449, "user.s3_1(\"Faillissement\");" ]
Works:
% sys.test table_name
% test name
% varchar type
% 1 length
[ "c" ]
% .trace, .trace table_name
% ticks, stmt name
% bigint, varchar type
% 4, 109 length
[ 5, "_3 := sql.mvc();" ]
[ 20, "_26:bat[:oid,:str] <tmp_2223>[0] := sql.bind(_3=48360856,\"sys\",\"test\",\"test\",2);" ]
[ 45, "_53:bat[:oid,:str] <tmp_2532>[1] := sql.bind(_3=48360856,\"sys\",\"test\",\"test\",0,0@0:oid,1@0);" ]
[ 31, "_54:bat[:oid,:str] <tmp_2550>[2] := sql.bind(_3=48360856,\"sys\",\"test\",\"test\",0,1@0,nil:oid);" ]
[ 30, "_90<tmp_2367>[1] := algebra.kdifference(_53=<tmp_2532>:bat[:oid,:str][1],_26=<tmp_2223>:bat[:oid,:str][0]);" ]
[ 31, "_91<tmp_2551>[2] := algebra.kdifference(_54=<tmp_2550>:bat[:oid,:str][2],_26=<tmp_2223>:bat[:oid,:str][0]);" ]
[ 12, "_28:bat[:oid,:str] <tmp_2224>[0] := sql.bind(_3=48360856,\"sys\",\"test\",\"test\",1);" ]
[ 58, "_93<tmpr_2556>[0] := algebra.semijoin(_26=<tmp_2223>:bat[:oid,:str][0],_54=nil:bat[:oid,:str]);" ]
[ 14, "_18:bat[:oid,:date] <tmp_2246>[0] := sql.bind(_3=48360856,\"sys\",\"test\",\"datum\",1);" ]
[ 90, "_95<tmp_2550>[2] := algebra.kunion(_91=nil,_93=nil);" ]
[ 20, "_11:bat[:oid,:str] <tmp_2224>[0] := sql.bind(_3=48360856,\"sys\",\"test\",\"test2\",1);" ]
[ 60, "_92<tmpr_2556>[0] := algebra.semijoin(_26=nil:bat[:oid,:str],_53=nil:bat[:oid,:str]);" ]
[ 36, "_13<tmp_2551>[0] := algebra.uselect(_11=nil:bat[:oid,:str],A0=\"bc\");" ]
[ 42, "_94<tmp_2532>[1] := algebra.kunion(_90=nil,_92=nil);" ]
[ 29, "_52:bat[:oid,:date] <tmp_2556>[2] := sql.bind(_3=48360856,\"sys\",\"test\",\"datum\",0,1@0,nil:oid);" ]
[ 22, "_50:bat[:oid,:str] <tmp_2367>[2] := sql.bind(_3=48360856,\"sys\",\"test\",\"test2\",0,1@0,nil:oid);" ]
[ 14, "_17:bat[:oid,:date] <tmp_2245>[0] := sql.bind(_3=48360856,\"sys\",\"test\",\"datum\",2);" ]
[ 36, "_56<tmp_2555>[2] := algebra.uselect(_50=<tmp_2367>:bat[:oid,:str][2],A0=\"bc\");" ]
[ 19, "_82<tmp_2553>[2] := algebra.kdifference(_52=<tmp_2556>:bat[:oid,:date][2],_17=<tmp_2245>:bat[:oid,:date][0]);" ]
[ 9, "_14:bat[:oid,:oid] <tmp_2536>[0] := sql.bind_dbat(_3=48360856,\"sys\",\"test\",1);" ]
[ 25, "_51:bat[:oid,:date] <tmp_2557>[1] := sql.bind(_3=48360856,\"sys\",\"test\",\"datum\",0,0@0:oid,1@0);" ]
[ 10, "_15<tmpr_2536>[0] := bat.reverse(_14=nil:bat[:oid,:oid]);" ]
[ 13, "_8:bat[:oid,:str] <tmp_2223>[0] := sql.bind(_3=48360856,\"sys\",\"test\",\"test2\",2);" ]
[ 28, "_81<tmp_2540>[1] := algebra.kdifference(_51=<tmp_2557>:bat[:oid,:date][1],_17=<tmp_2245>:bat[:oid,:date][0]);" ]
[ 48, "_10<tmp_2547>[0] := algebra.uselect(_8=<tmp_2223>:bat[:oid,:str][0],A0=\"bc\");" ]
[ 55, "_83<tmpr_2554>[0] := algebra.semijoin(_17=<tmp_2245>:bat[:oid,:date][0],_51=nil:bat[:oid,:date]);" ]
[ 32, "_48:bat[:oid,:str] <tmp_2557>[1] := sql.bind(_3=48360856,\"sys\",\"test\",\"test2\",0,0@0:oid,1@0);" ]
[ 34, "_55<tmp_2552>[1] := algebra.uselect(_48=<tmp_2557>:bat[:oid,:str][1],A0=\"bc\");" ]
[ 40, "_85<tmp_2401>[1] := algebra.kunion(_81=nil,_83=nil);" ]
[ 20, "_57<tmp_2507>[1] := algebra.kdifference(_55=nil,_8=<tmp_2223>:bat[:oid,:str][0]);" ]
[ 41, "_84<tmpr_2554>[0] := algebra.semijoin(_17=nil:bat[:oid,:date],_52=nil:bat[:oid,:date]);" ]
[ 17, "_58<tmp_2552>[2] := algebra.kdifference(_56=nil,_8=nil:bat[:oid,:str]);" ]
[ 35, "_86<tmp_2555>[2] := algebra.kunion(_82=nil,_84=nil);" ]
[ 40, "_59<tmpr_2556>[0] := algebra.semijoin(_10=<tmp_2547>[0],_48=nil:bat[:oid,:str]);" ]
[ 41, "_61<tmp_2557>[1] := algebra.kunion(_57=nil,_59=nil);" ]
[ 24, "_63<tmp_2507>[1] := algebra.kdifference(_61=nil,_15=<tmpr_2536>[0]);" ]
[ 14, "_66<tmp_2557>[1] := algebra.markT(_63=nil,3,0);" ]
[ 8, "_76<tmpr_2557>[1] := bat.reverse(_66=nil);" ]
[ 56, "_96<tmp_2556>[1] := algebra.leftjoin(_76=<tmpr_2557>[1],_94=nil);" ]
[ 51, "_87<tmp_2507>[1] := algebra.leftjoin(_76=<tmpr_2557>[1],_85=<tmp_2401>[1]);" ]
[ 49, "_60<tmpr_2532>[0] := algebra.semijoin(_10=nil,_50=nil:bat[:oid,:str]);" ]
[ 32, "_62<tmp_2367>[2] := algebra.kunion(_58=nil,_60=nil);" ]
[ 17, "_64<tmp_2552>[2] := algebra.kdifference(_62=nil,_15=<tmpr_2536>[0]);" ]
[ 15, "_69<tmp_2367>[2] := algebra.markT(_64=nil,3,1);" ]
[ 7, "_79<tmpr_2367>[2] := bat.reverse(_69=nil);" ]
[ 55, "_97<tmp_2547>[2] := algebra.leftjoin(_79=<tmpr_2367>[2],_95=nil);" ]
[ 73, "_88<tmp_2554>[2] := algebra.leftjoin(_79=<tmpr_2367>[2],_86=<tmp_2555>[2]);" ]
[ 26, "_65<tmp_2552>[0] := algebra.kdifference(_13=nil,_15=nil);" ]
[ 16, "_72<tmp_2551>[0] := algebra.markT(_65=nil,3,2);" ]
[ 7, "_80<tmpr_2551>[0] := bat.reverse(_72=nil);" ]
[ 21, "_98<tmp_2530>[0] := algebra.leftjoin(_80=<tmpr_2551>[0],_28=nil:bat[:oid,:str]);" ]
[ 29, "_89<tmp_2550>[0] := algebra.leftjoin(_80=<tmpr_2551>[0],_18=<tmp_2246>:bat[:oid,:date][0]);" ]
[ 71, "_20<tmp_2532>[3] := mat.pack(_87=nil,_88=nil,_89=nil);" ]
[ 43, "_21<tmp_2550>[1] := pqueue.topn_max(_20=nil,1:wrd);" ]
[ 43, "_22<tmpr_2532>[1] := algebra.sortTail(_21=nil);" ]
[ 46, "_19<tmp_2550>[3] := mat.pack(_85=nil,_86=nil,_18=nil:bat[:oid,:date]);" ]
[ 47, "_30<tmp_2555>[1] := pqueue.topn_max(_19=nil,1:wrd);" ]
[ 33, "_101<tmp_2550>[0] := algebra.join(_80=nil,_30=<tmp_2555>[1]);" ]
[ 37, "_100<tmpr_2401>[1] := algebra.join(_79=nil,_30=<tmp_2555>[1]);" ]
[ 33, "_105<tmp_2367>[0] := algebra.semijoin(_98=nil,_101=nil);" ]
[ 45, "_111<tmp_2533>[0] := algebra.semijoin(_105=nil,_22=<tmpr_2532>[1]);" ]
[ 62, "_104<tmpr_2551>[1] := algebra.semijoin(_97=nil,_100=nil);" ]
[ 61, "_99<tmpr_2401>[0] := algebra.join(_76=nil,_30=nil);" ]
[ 67, "_110<tmp_2402>[1] := algebra.semijoin(_104=nil,_22=<tmpr_2532>[1]);" ]
[ 40, "_103<tmpr_2411>[0] := algebra.semijoin(_96=nil,_99=nil);" ]
[ 23, "_107<tmp_2541>[0] := algebra.semijoin(_103=nil,_22=<tmpr_2532>[1]);" ]
[ 8426, "barrier _112 := language.dataflow();" ]
[ 14, "_32 := sql.resultSet(1,1,_22=nil);" ]
[ 33, "_31<tmp_2426>[1] := mat.pack(_107=nil,_110=nil,_111=nil);" ]
[ 14, "sql.rsColumn(_32=9,\"sys.test\",\"test\",\"varchar\",1,0,_31=nil);" ]
[ 3, "_36 := io.stdout();" ]
[ 69, "sql.exportResult(_36=41950432,_32=9);" ]
[ 9228, "user.s4_1(\"bc\");" ]
## Comment 14498
Date: 2010-07-21 07:32:47 +0200
From: @drstmane
I actually meant the TRACE for the situation that your query works and does not work on your big data set --- at least your report says is fails only "sometimes".
(For the small example, we can obviously create & reproduce it ourselves.)
## Comment 14669
Date: 2010-08-13 01:06:15 +0200
From: @njnes
stefan please add a larger example. The small one seems to work fine.
## Comment 14670
Date: 2010-08-13 01:10:03 +0200
From: @skinkie
(In reply to comment 5)
> stefan please add a larger example. The small one seems to work fine.
Tested on (almost) latest head; issue is gone.
| ORDER BY [date] results in no visible output | https://api.github.com/repos/MonetDB/MonetDB/issues/2616/comments | 0 | 2020-11-30T11:06:14Z | 2024-06-28T13:20:35Z | https://github.com/MonetDB/MonetDB/issues/2616 | 753,381,534 | 2,616 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-15 00:54:02 +0200
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes, @drstmane
Last updated: 2015-05-07 09:09:39 +0200
## Comment 14399
Date: 2010-07-15 00:54:02 +0200
From: @skinkie
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.55 Safari/533.4
Build Identifier:
SQLException:importTable:value 'Arrondissementsrechtbank te 's-Gravenhage\nzittinghoudende te Haarlem\nfungerend president\nenkelvoudige kamer voor Vreemdelingenzaken\n\nU I T S P R A A K\n\nartikel 8:81 en 8:86 Algemene Wet Bestuursrecht (Awb)\nartikel 33a, 34a en 34j Vreemdelingenwet (Vw)\n\nreg.nr: AWB 00/6928 VRWET H (voorlopige voorziening)\nAWB 00/6929 VRWET H (beroepszaak)\nAWB 00/6930 VRWET H (vrijheidsontneming)\n\ninzake: A, geboren op [...] 1964, van Iraakse\nnationaliteit, verblijvende in het Grenshospitium te\nAmsterdam, verzoeker,\ngemachtigde: mr. M.R. van der Linde, advocaat te Utrecht,\n\ntegen: de Staatssecretaris van Justitie, verweerder,\ngemachtigden: mr. M. Ramsaroep en mr. T.H.T.W. Zee, werkzaam bij de onder verweerder ressorterende Immigratie- en Naturalisatiedienst te 's-Gravenhage.\n\n1. GEGEVENS INZAKE HET GEDING\n\n1.1. Aan de orde is het verzoek om voorlopige voorziening hangende het beroep van verzoeker tegen de beschikking van verweerder van 21 juli 2000. Deze beschikking is genomen in het kader van de zogenoemde AC-procedure en behelst de \nniet-inwilliging van de aanvraag om toelating als vluchteling en strekt tevens tot het niet verlenen van een vergunning tot verblijf wegens klemmende redenen van humanitaire aard. Verzocht wordt om schorsing van de beslissing van \nverweerder om uitzetting niet achterwege te laten totdat op het beroep tegen voormelde beschikking is beslist.\n\n1.2 Voorts is aan de orde het beroep gericht tegen de vrijheidsontnemende maatregel van artikel 7a Vw die verweerder verzoeker met ingang van 18 juli 2000 heeft opgelegd. Dit beroep strekt tevens tot toekenning van schadevergoeding. \n\n1.3 De openbare behandeling van de geschillen heeft plaatsgevonden op 2 augustus 2000. Daarbij hebben verzoeker en verweerder bij monde van hun gemachtigden hun standpunten nader uiteengezet. Voorts is verzoeker ter zitting gehoord. \n\n2. OVERWEGINGEN\n\n2.1 Ingevolge artikel 8:81 van de Awb kan, indien tegen een besluit bij de rechtbank beroep is ingesteld, de president van de rechtbank die bevoegd is in de hoofdzaak op verzoek een voorlopige voorziening treffen indien onverwijlde \nspoed, gelet op de betrokken belangen, zulks vereist.\n\n2.2 Op grond van artikel 8:86 van de Awb heeft de president na behandeling ter zitting van het verzoek om een voorlopige voorziening de bevoegdheid om, indien hij van oordeel is dat nader onderzoek redelijkerwijs niet kan bijdragen \naan de beoordeling van de zaak, onmiddellijk uitspraak te doen in de hoofdzaak. Er bestaat in dit geval aanleiding om van deze bevoegdheid gebruik te maken.\n\n2.3 De AC-procedure voorziet in een afdoening van asielaanvragen binnen 48 uur. Deze procedure leent zich slechts voor die asielaanvragen waaromtrent binnen deze korte termijn procedureel en inhoudelijk naar behoren kan worden \nbeslist.\n\n2.4 Bij de beoordeling of in het onderhavige geval van een zodanige aanvraag sprake is, is het volgende van belang.\n\n2.5 Ingevolge het door verweerder gevoerde beleid, neergelegd in hoofdstuk B7/3 Vc 1994, bestaat de AC-procedure uit twee fasen. Het eerste deel betreft in ieder geval de formele indiening van de asielaanvraag en het onderzoek naar \nidentiteit, nationaliteit en reisroute. Het tweede deel betreft de beoordeling van de asielaanvraag. Voor het tweede deel zijn maximaal 24 procesuren beschikbaar. Indien de eerste fase langer dan 24 uur duurt, gaat dit ten koste van \nde tijd die beschikbaar is voor de tweede fase.\nIn principe vindt doorverwijzing naar een OC plaats indien de AC-procedure langer duurt dan 48 procesuren.\n\n2.6 Ter beoordeling ligt allereerst voor de vraag of het tweede deel van de AC-procedure is afgerond binnen de voor dat deel maximaal beschikbare termijn van 24 procesuren. Hierover overweegt de president als volgt.\n\n2.7 Tussen partijen is niet in geschil dat (een afschrift van) de beslissing op de asielaanvraag van verzoeker aan verzoeker is uitgereikt op een moment dat reeds 23 uur en 54 minuten waren verstreken van de beschikbare tijd van 24 \nprocesuren.\n\n2.8 In hoofdstuk B7/3.1 Vc 1994 is bepaald dat een beschikking voor het einde van de AC-termijn wordt uitgereikt en de rechtsbijstandverlener een uur de tijd heeft om aan te geven of een rechtsmiddel wordt aangewend. Hieruit kan \nworden afgeleid dat het laatste uur van eerdergenoemde termijn van 24 procesuren exclusief gereserveerd is voor de rechtsbijstandverlener en dat verweerder van dit uur geen gebruik mag maken. Nu verweerder, zoals blijkt uit het \nvoorgaande, van bedoeld uur wel gebruik heeft gemaakt, heeft verweerder in strijd gehandeld met zijn eigen beleid aangaande de AC-procedure.\n\n2.9 De gemachtigde van verweerder heeft ter zitting betoogd dat verzoeker door het vorenstaande niet is benadeeld omdat het rechtsmiddel niet is aangewend binnen het uur dat de rechtshulpverlening alsnog heeft kunnen gebruiken, maar \npas enkele uren daarna. Dit betoog faalt naar het oordeel van de president.\nDaartoe is het navolgende redengevend.\n\n2.10 Verweerder heeft zich blijkens zijn eigen beleid ten doel gesteld om de AC-procedure, met inachtneming van de eisen van zorgvuldigheid, binnen 48 uren af te ronden. Dit impliceert dat de tijd die de rechtsbijstandverlening \ntoekomt in ieder geval in acht moet worden genomen en dat, zoals hiervoor al is opgemerkt, doorverwijzing naar een OC behoort plaats te vinden indien de procedure langer duurt dan 48 uren, tenzij duidelijk is dat beide partijen met \neen overschrijding instemmen.\nIndien, zoals in casu, de 48-uursprocedure alleen kan worden gehaald ten detrimente van het laatste uur dat aan de rechtsbijstandsverlening toekomt en de procedure desondanks wordt voortgezet, moet daarom in beginsel worden \naangenomen dat verzoeker hierdoor in zijn belangen is geschaad. Dat het rechtsmiddel pas na enige tijd is ingesteld is hierbij\nirrelevant, reeds omdat uit het beleid niet kan worden afgeleid dat het rechtsmiddel binnen de beschikbare termijn van 48 procesuren daadwerkelijk moet worden aangewend.\n\n2.11 Verweerder heeft ter zitting voorts aangevoerd dat, wat er ook zij van het vorenstaande, de termijnoverschrijding desondanks voor rekening van verzoeker moet komen. Verweerder heeft daartoe, onder verwijzing naar hoofdstuk \nB7/3.2 en B7/5.2 Vc 1994, betoogd dat de rechtsbijstandverlener de voor de voor- en nabespreking van het nader gehoor beschikbare tijd ruimschoots heeft overschreden. Dienaangaande overweegt de president als volgt.\n\n2.12 Er is, aldus hoofdstuk B7/3.2 Vc 1994, geen sprake van termijnoverschrijding (onder meer) indien de asielzoeker binnen de 48 procesuren meer tijd benut met rechtsbijstand dan de termijnen die daarvoor formeel beschikbaar zijn \n(de extra tijd geldt niet als proceduretijd en is in het belang van de asielzoeker).\nIngevolge hoofdstuk B7/5.2 Vc 1994 heeft de asielzoeker voor aanvang van het nader gehoor gedurende maximaal twee uur de gelegenheid om met behulp van een rechtsbijstandverlener het verslag van het eerste gehoor en overige \nonderzoeksresultaten uit de eerste fase na te bespreken en zich voor te bereiden op het nader gehoor.\nNa afronding van het nader gehoor krijgt de asielzoeker ingevolge hoofdstuk B7/5.3 Vc 1994 maximaal drie uur de gelegenheid te reageren op het voornemen van verweerder de asielaanvraag niet in te willigen en het rapport van het \nnader gehoor na te bespreken. De rechtsbijstandverlener kan binnen die termijn (schriftelijk) reageren op het voornemen van de IND.\n\n2.13 In een tweetal uitspraken van de president van deze rechtbank en nevenzittingsplaats van 14 juli 2000 (onder meer geregistreerd onder de nummers AWB 00\6203 VRWET H t/m AWB 00/6205 VRWET H) is overwogen dat verweerder reeds nu \ngehouden kan worden aan zijn primaire verantwoordelijkheid voor bewaking van de 48-uurstermijn. Voorts is overwogen dat dit betekent dat verweerder de rechtsbijstandverlener er in een voorkomend geval op moet wijzen dat de voor \nrechtsbijstand beschikbare tijd is overschreden. Een en ander brengt met zich mee dat indien in het dossier een deugdelijke verslaglegging van vertragende gebeurtenissen of omstandigheden ontbreekt, aangenomen zal moetfailed to import table
Reproducible: Always
### Steps to Reproduce:
1. copy 175504 records into uitspraken from '/home/skinkie/rechtspraak/rechtspraak.csv' delimiters '\t', '\n' null as '';
### Actual Results:
I already reported a bug for the line number of the error not being equal to the actual error. It is obviously useless to have an importer to produce errors who are not on the actual line of the error, or worse, not even show what is wrong with what field.
MonetDB server v5.21.0 (64-bit), based on kernel v1.39.0 (64-bit oids)
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
Visit http://monetdb.cwi.nl/ for further information
Found 3.9GiB available memory, 2 available cpu cores
Configured for prefix: /opt/monetdb-testing
Libraries:
libpcre: 8.02 2010-03-19 (compiled with 8.02)
openssl: OpenSSL 0.9.8o 01 Jun 2010 (compiled with OpenSSL 0.9.8o 01 Jun 2010)
libxml2: 2.7.7 (compiled with 2.7.7)
Compiled by: skinkie@openkvk (x86_64-unknown-linux-gnu)
Compilation: gcc -Wall -Wextra -fno-strict-aliasing -g -Werror-implicit-function-declaration -Werror -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/x86_64-pc-linux-gnu/bin/ld -IPA -m elf_x86_64
## Comment 14400
Date: 2010-07-15 01:43:55 +0200
From: @skinkie
I (again) find that the true problem is in 'escape' (\) characters. And probably the error message length, is cropped because of the value length.
## Comment 14401
Date: 2010-07-15 01:48:02 +0200
From: @skinkie
So the actual issue was the following sequence:
\6203
Resulting in:
SQLException:importTable:value '\6203' from line 1 field 7 not inserted, expecting type str
failed to import table
## Comment 14405
Date: 2010-07-15 08:38:21 +0200
From: @grobian
is it possible to give us the data lines that cause trouble so we can make a) a test, and b) actually see this ourself + fix it?
## Comment 14408
Date: 2010-07-15 09:46:02 +0200
From: @skinkie
(In reply to comment 3)
> is it possible to give us the data lines that cause trouble so we can make a) a
> test, and b) actually see this ourself + fix it?
The actual data that is wrong 'usually' contains escape sequences. The point in these bugs is that somewhere in the file something is wrong but the somewhere is either beyond the last line in the file or representing a line in a file that but not what position.
## Comment 14409
Date: 2010-07-15 09:50:26 +0200
From: @skinkie
Created attachment 16
Example
CREATE TEMPORARY TABLE faillissementen_tmp ("kvk" integer, "bedrijfsnaam" varchar(255), "plaats" varchar(32), "rechtbank" varchar(64), "rolnummer" varchar(16), "status" varchar(16), "datum" date);
COPY 905 RECORDS INTO faillissementen_tmp FROM 'temporarytable' USING DELIMITERS '\t', '\n', '""';
Observe that the error is:
SQLException:importTable:missing separator ' ' line 906 field 5
failed to import table
But the file is only 905 lines. I did not yet spot the error in this file, but it are these trivial stuff that make importing a true issue in MonetDB. I already showed in the other post that a sequence as \6292 leads to problems. Now from a 'utf-8' parsing standpoint I can understand this is actually correct behavior, but it is totally not observable what might be the issue from client perspective.
> Attached file: [temporarytable](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2615_temporarytable_16) (text/plain, 87792 bytes)
> Description: Example
## Comment 14411
Date: 2010-07-15 10:04:10 +0200
From: @skinkie
Created attachment 17
Escape example
Notice in the file the current escaped '00\\6203' remove a single escape for the behavior.
CREATE TABLE "sys"."uitspraken" (
"id" int NOT NULL,
"ljn" char(6) NOT NULL,
"gepubliceerd" boolean NOT NULL,
"instantie" varchar(63) NOT NULL,
"datum" date NOT NULL,
"publicatie" date,
"zaaknummers" varchar(100) NOT NULL,
"uitspraak" CHARACTER LARGE OBJECT,
"conclusie" CHARACTER LARGE OBJECT,
"zittingsplaats" varchar(16),
"rechtsgebied" varchar(24),
"sector" varchar(20),
"soort" varchar(32),
"indicatie" CHARACTER LARGE OBJECT,
"kop" CHARACTER LARGE OBJECT,
CONSTRAINT "uitspraken_id_pkey" PRIMARY KEY ("id"),
CONSTRAINT "uitspraken_ljn_unique" UNIQUE ("ljn")
);
> Attached file: [test.csv](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_2615_test.csv_17) (text/plain, 15091 bytes)
> Description: Escape example
## Comment 14412
Date: 2010-07-15 10:04:28 +0200
From: @grobian
from the attachment, I'd expect more an encoding problem than a '\' problem, as I don't see any of the latter
## Comment 14413
Date: 2010-07-15 10:06:30 +0200
From: @skinkie
(In reply to comment 7)
> from the attachment, I'd expect more an encoding problem than a '\' problem, as
> I don't see any of the latter
If you do have an idea what the first issue is I would like to know. The escape example was a bit harder to 'fetch' from the source, thus took some time.
## Comment 14414
Date: 2010-07-15 10:21:42 +0200
From: @drstmane
here's a "brief" analysis of the encoding problem (using Jun2010-SP1 and a UTF-8 terminal):
$ grep . /tmp/data?.csv
/tmp/data1.csv:\6292
/tmp/data2.csv:"\6292"
/tmp/data3.csv:\6203
/tmp/data4.csv:"\6203"
/tmp/data5.csv:\\6203
/tmp/data6.csv:"\\6203"
$ grep . /tmp/load?.sql
/tmp/load1.sql:create table t1 (a string);
/tmp/load1.sql:copy 1 records into t1 from '/tmp/data1.csv' delimiters '\t','\n' null as '';
/tmp/load1.sql:select * from t1;
/tmp/load1.sql:drop table t1;
/tmp/load1.sql:
/tmp/load2.sql:create table t2 (a string);
/tmp/load2.sql:copy 1 records into t2 from '/tmp/data2.csv' delimiters '\t','\n','"' null as '';
/tmp/load2.sql:select * from t2;
/tmp/load2.sql:drop table t2;
/tmp/load2.sql:
/tmp/load3.sql:create table t3 (a string);
/tmp/load3.sql:copy 1 records into t3 from '/tmp/data3.csv' delimiters '\t','\n' null as '';
/tmp/load3.sql:select * from t3;
/tmp/load3.sql:drop table t3;
/tmp/load3.sql:
/tmp/load4.sql:create table t4 (a string);
/tmp/load4.sql:copy 1 records into t4 from '/tmp/data4.csv' delimiters '\t','\n','"' null as '';
/tmp/load4.sql:select * from t4;
/tmp/load4.sql:drop table t4;
/tmp/load4.sql:
/tmp/load5.sql:create table t5 (a string);
/tmp/load5.sql:copy 1 records into t5 from '/tmp/data5.csv' delimiters '\t','\n' null as '';
/tmp/load5.sql:select * from t5;
/tmp/load5.sql:drop table t5;
/tmp/load5.sql:
/tmp/load6.sql:create table t6 (a string);
/tmp/load6.sql:copy 1 records into t6 from '/tmp/data6.csv' delimiters '\t','\n','"' null as '';
/tmp/load6.sql:select * from t6;
/tmp/load6.sql:drop table t6;
/tmp/load6.sql:
$ mclient -lsql -ei < /tmp/load1.sql
[ 1 ]
select * from t1;
% sys.t1 table_name
% a name
% clob type
% 3 length
[ "292" ]
$ mclient -lsql -ei < /tmp/load2.sql
[ 1 ]
select * from t2;
% sys.t2 table_name
% a name
% clob type
% 3 length
[ "292" ]
$ mclient -lsql -ei < /tmp/load3.sql
MAPI = monetdb@localhost:50000
QUERY = copy 1 records into t3 from '/tmp/data3.csv' delimiters '\t','\n' null as '';
ERROR = !SQLException:importTable:value '\6203' from line 1 field 1 not inserted, expecting type str
!failed to import table
select * from t3;
% sys.t3 table_name
% a name
% clob type
% 0 length
$ mclient -lsql -ei < /tmp/load4.sql
MAPI = monetdb@localhost:50000
QUERY = copy 1 records into t4 from '/tmp/data4.csv' delimiters '\t','\n','"' null as '';
ERROR = !SQLException:importTable:value '\6203' from line 1 field 1 not inserted, expecting type str
!failed to import table
select * from t4;
% sys.t4 table_name
% a name
% clob type
% 0 length
$ mclient -lsql -ei < /tmp/load5.sql
[ 1 ]
select * from t5;
% sys.t5 table_name
% a name
% clob type
% 5 length
[ "\\6203" ]
$ mclient -lsql -ei < /tmp/load6.sql
[ 1 ]
select * from t6;
% sys.t6 table_name
% a name
% clob type
% 5 length
[ "\\6203" ]
## Comment 14415
Date: 2010-07-15 10:24:54 +0200
From: @drstmane
'brief analysis' -> 'concise way to reproduce'
## Comment 14416
Date: 2010-07-15 10:26:10 +0200
From: @skinkie
(In reply to comment 10)
> 'brief analysis' -> 'concise way to reproduce'
But I guess you might miss the point here. Once you actually found the issue, and bounded it the error message obviously shows whats wrong. But this will not happen in a line > 1024bytes or worse a file of 3GB with wrong line numbers.
## Comment 14417
Date: 2010-07-15 15:09:26 +0200
From: @sjoerdmullender
Changeset [2c2016918d74](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2c2016918d74) 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=2c2016918d74](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2c2016918d74)
Changeset description:
Added test for bug #2615.
This test is disabled for now since we first have to decide
what the error message should look like, and then we need to
approve the test output.
Note that the error should happen in the second line of the data.
## Comment 14418
Date: 2010-07-15 15:09:27 +0200
From: @sjoerdmullender
Changeset [df828b8fc84c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=df828b8fc84c) 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=df828b8fc84c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=df828b8fc84c)
Changeset description:
Merge with Jun2010 branch: Added test for bug #2615.
This test is disabled for now since we first have to decide
what the error message should look like, and then we need to
approve the test output.
Note that the error should happen in the second line of the data.
## Comment 14419
Date: 2010-07-15 15:17:01 +0200
From: @skinkie
(In reply to comment 13)
> This test is disabled for now since we first have to decide
> what the error message should look like, and then we need to
> approve the test output.
Ideally:
SQLException:importTable:value '\6203' from line 1 at position 1 for field something (varchar) not inserted, because [...]
Something should be a name, not a number.
## Comment 14420
Date: 2010-07-15 17:12:01 +0200
From: @sjoerdmullender
Changeset [5d91de65b3fd](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5d91de65b3fd) 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=5d91de65b3fd](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=5d91de65b3fd)
Changeset description:
Fix for bug #2615: truncate value in error message so that line and column can be seen.
## Comment 14421
Date: 2010-07-15 17:12:02 +0200
From: @sjoerdmullender
Changeset [86e2a43ce3de](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=86e2a43ce3de) 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=86e2a43ce3de](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=86e2a43ce3de)
Changeset description:
Merge with Jun2010 branch.
Fix for bug #2615: truncate value in error message so that line and column can be seen.
## Comment 14422
Date: 2010-07-15 17:28:12 +0200
From: @sjoerdmullender
Changeset [226c45783693](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=226c45783693) 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=226c45783693](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=226c45783693)
Changeset description:
Approved test for bug #2615.
This is probably the best we can do in the current table reading infrastructure.
## Comment 14423
Date: 2010-07-15 17:28:13 +0200
From: @sjoerdmullender
Changeset [fa9942e113cb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fa9942e113cb) 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=fa9942e113cb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=fa9942e113cb)
Changeset description:
Merge with Jun2010 branch.
Approved test for bug #2615.
This is probably the best we can do in the current table reading infrastructure.
## Comment 14676
Date: 2010-08-13 14:08:51 +0200
From: @njnes
do you agree this is a workable solution
## Comment 20848
Date: 2015-05-07 09:07:37 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [cccf375dc2eb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cccf375dc2eb) 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=cccf375dc2eb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=cccf375dc2eb)
Changeset description:
error-truncated.Bug-2615: propagating changeset [e3d3cabaebe3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e3d3cabaebe3) to Darwin (+ FreeBSD & SunOS) output
## Comment 20849
Date: 2015-05-07 09:09:39 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [dd371fade725](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dd371fade725) 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=dd371fade725](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=dd371fade725)
Changeset description:
error-truncated.Bug-2615: propagating changeset [e3d3cabaebe3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e3d3cabaebe3) to Windows output
| Error message completely useless after copy into | https://api.github.com/repos/MonetDB/MonetDB/issues/2615/comments | 0 | 2020-11-30T11:06:10Z | 2024-06-27T11:48:38Z | https://github.com/MonetDB/MonetDB/issues/2615 | 753,381,482 | 2,615 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-14 10:32:45 +0200
From: @arjenderijke
To: SQL devs <<bugs-sql>>
Version: 2.38.3 (Jun2010-SP1) [obsolete]
CC: @drstmane
Last updated: 2010-08-30 09:17:57 +0200
## Comment 14395
Date: 2010-07-14 10:32:45 +0200
From: @arjenderijke
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.10) Gecko/20100622 Fedora/3.5.10-1.fc12 Firefox/3.5.10
Build Identifier:
If you have a function with an IF/THEN statement that contains an UPDATE statement, the update is not performed in certain cases, altough the if statement is true. This worked as expected in the Feb2010 release, but now failes in the default.
Reproducible: Always
### Steps to Reproduce:
create table table_b (
column_a int,
column_b int
);
create function next_b()
returns integer
begin
declare col_a integer;
set col_a = null;
set col_a = ( select min(column_a)
from table_b
where column_b is null );
if col_a is not null then
update table_b
set column_b = 1
where column_a = col_a;
end if;
return col_a;
end;
insert into table_b (
column_a,
column_b )
values (
1,
null
);
select * from table_b;
select next_b();
select * from table_b;
### Actual Results:
The last select statement should return [ 1, 1 ] but it returns [ 1, NULL ]
It is likely caused by the : set col_a = ( select ...) statement, because if you use this function:
create function next_a()
returns integer
begin
declare col_a integer;
set col_a = 1;
if col_a is not null then
update table_a
set column_b = 1
where column_a = col_a;
end if;
return col_a;
end;
it gives the expected result
## Comment 14396
Date: 2010-07-14 10:41:30 +0200
From: @arjenderijke
Changeset [fdb07071159e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fdb07071159e) made by Arjen de Rijke <arjen.de.rijke@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=fdb07071159e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=fdb07071159e)
Changeset description:
Add test for bug #2614, Update statement in function ignored
## Comment 14398
Date: 2010-07-14 11:00:40 +0200
From: @drstmane
Changeset [bd573d93438e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bd573d93438e) 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=bd573d93438e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bd573d93438e)
Changeset description:
back-ported tests for bug #2611 & bug #2614 to Jun2010 branch
both problems also occur in the Jun2010-SP1 release (candidate)
## Comment 14434
Date: 2010-07-16 09:24:58 +0200
From: @drstmane
The test for this bug appears to work fine in single threaded case (e.g., on our single-core Debian machine and on Windows where we test with --gdk_nr_threads=1, only):
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/GNU.32.32.d.1-Debian4.0/src_test_BugTracker-2010/update_statement_in_function_ignored.Bug-2614.out.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/GNU.32.32.d.1-Debian4.0/src_test_BugTracker-2010/update_statement_in_function_ignored.Bug-2614.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Int.32.32.d.1-Windows5.1/src_test_BugTracker-2010/update_statement_in_function_ignored.Bug-2614.out.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Int.32.32.d.1-Windows5.1/src_test_BugTracker-2010/update_statement_in_function_ignored.Bug-2614.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Mic.64.64.d.1-Windows6.0/src_test_BugTracker-2010/update_statement_in_function_ignored.Bug-2614.out.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Mic.64.64.d.1-Windows6.0/src_test_BugTracker-2010/update_statement_in_function_ignored.Bug-2614.err.00.html
Hence, this bug seems to be related to parallelism, i.e., potentially the mitosis, mergetable or dataflow optimizers.
## Comment 14458
Date: 2010-07-18 09:27:19 +0200
From: @drstmane
Updated URLs are
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/GNU.32.32.d.1-Debian4.0/src_test_BugTracker-2010/update_statement_in_function_ignored.Bug-2614.out.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/GNU.32.32.d.1-Debian4.0/src_test_BugTracker-2010/update_statement_in_function_ignored.Bug-2614.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/Int.32.32.d.1-Windows5.1/src_test_BugTracker-2010/update_statement_in_function_ignored.Bug-2614.out.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/Int.32.32.d.1-Windows5.1/src_test_BugTracker-2010/update_statement_in_function_ignored.Bug-2614.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/Mic.64.64.d.1-Windows6.0/src_test_BugTracker-2010/update_statement_in_function_ignored.Bug-2614.out.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/Mic.64.64.d.1-Windows6.0/src_test_BugTracker-2010/update_statement_in_function_ignored.Bug-2614.err.00.html
## Comment 14549
Date: 2010-07-28 10:40:42 +0200
From: @drstmane
The test for this bug appears to work fine as of this today.
Most probably, the bug was related to bug #2626, and has hence been fixed by Martin's check in:
http://dev.monetdb.org/hg/MonetDB/rev/2b7eec81b411
## Comment 14786
Date: 2010-08-30 09:17:57 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
| Update statement in function ignored | https://api.github.com/repos/MonetDB/MonetDB/issues/2614/comments | 0 | 2020-11-30T11:06:07Z | 2024-06-27T11:48:37Z | https://github.com/MonetDB/MonetDB/issues/2614 | 753,381,445 | 2,614 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-14 08:49:02 +0200
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: 2.38.3 (Jun2010-SP1) [obsolete]
Last updated: 2010-08-30 09:18:05 +0200
## Comment 14390
Date: 2010-07-14 08:49:02 +0200
From: @drstmane
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.5.9-2.fc12 Firefox/3.5.9
Build Identifier:
(At least) with the tests listed below, SQL appears to create wrong MAL code, i.e.,
"!TypeException:user.s1_1[28]:'_39' may not be used before being initialized"
(a.o.) when run with `Mtest.py --nr_threads=1 ...` as e.g. on Windows:
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Int.64.64.d.1-Windows6.0/src_test_BugTracker/range_predicate.SF-1711242.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Int.64.64.d.1-Windows6.0/src_test_BugTracker/variable_stack_crash.SF-1711251.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Int.64.64.d.1-Windows6.0/src_test_BugTracker/variable_stack_crash.SF-1711251-2.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Int.64.64.d.1-Windows6.0/src_test_bugs/innerjoin_between-bug-sf-960672.err.00.html
but also when compiled with Intels icc on a dual-core 64-bit Fedora 12 machine:
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Int.64.64.d.1-Fedora12/src_test_BugTracker/range_predicate.SF-1711242.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Int.64.64.d.1-Fedora12/src_test_BugTracker/variable_stack_crash.SF-1711251.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Int.64.64.d.1-Fedora12/src_test_BugTracker/variable_stack_crash.SF-1711251-2.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Int.64.64.d.1-Fedora12/src_test_bugs/innerjoin_between-bug-sf-960672.err.00.html
Reproducible: Always
### Steps to Reproduce:
See above links to nightly testing results.
I can also reproduce the problem by running test above tests with `Mtest.py --nr_threads=1 ...` on my 64-bit Fedora 12 desktop (compiled with GNU gcc).
### Actual Results:
error messages like
"!TypeException:user.s1_1[28]:'_39' may not be used before being initialized"
### Expected Results:
no errors.
This is most probably some optimizer problem --- I have not yet tried to reduce the default optimizer pipeline to potentially identify the optimizer that causes the problem.
## Comment 14391
Date: 2010-07-14 08:51:47 +0200
From: @drstmane
PS:
single core execution (without explicit `--set GDK_nr_threads=1`) as e.g. on our "virtual" Debian machine appears to work fine:
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/GNU.32.32.d.1-Debian4.0/src_test_BugTracker/range_predicate.SF-1711242.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/GNU.32.32.d.1-Debian4.0/src_test_BugTracker/variable_stack_crash.SF-1711251.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/GNU.32.32.d.1-Debian4.0/src_test_BugTracker/variable_stack_crash.SF-1711251-2.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/GNU.32.32.d.1-Debian4.0/src_test_bugs/innerjoin_between-bug-sf-960672.err.00.html
## Comment 14426
Date: 2010-07-15 19:22:49 +0200
From: @drstmane
Changeset [735b133ade47](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=735b133ade47) 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=735b133ade47](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=735b133ade47)
Changeset description:
make mitosis work (again) as it is supposed to work
This checkin is basically a selective back-port of the
mitosis & octopus related parts of the following two
multi-purpose changesets:
http://dev.monetdb.org/hg/MonetDB/rev/2a358751a4b6
(i.e.,
opt_support: provide a function to see if later in the pipeline there is a specific optimizer mentioned
opt_octopus: use the legibility test
) and
http://dev.monetdb.org/hg/MonetDB/rev/692eff15bea0
(i.e.,
mitosis should be more aware of octopus
)
Before this checkin, the mitosis logic to calculate the
number and size of the to be created partitions was in
fact disabled, overruled by OPTlegAdviceInternal(),
which alwasy only return the number of threads (GDKnr_threads),
even in case octopus was not activated or used at all.
Consequently, also the logic that made mitosis bail-out
without action if only 1 partition was to be created
(e.g., with small datasets on single-core machines
or when single-threaded execution is requested),
was in fact disabled.
With this checkin, OPTlegAdviceInternal() return a
value (supposely the number of legs to be used ---
currently still hard-wired to GDKnr_threads), only
if octopus is indeed available activated and used.
Otherwise, mitosis falls back to its own logic
of determening the number of partition to create
depending on the number of available threads,
the available memory and the data size.
Also, the mitosis (again) bails-out if it were
to create only a single partition.
On multi-core systems and without restricting the
number of threads to one, this checkin does not
change the behavior of any of the currently available
MonetDB5 or sql tests.
On single core systems or in case the number of threads
is restricted to only one, testing behavor changes in
that the following tests no work fine instead of failing:
sql/src/jdbc/tests/Tests/Test_JdbcClient.SQL.sh
sql/src/test/BugDay_2005-10-06_2.8/Tests/MapiClient-dump.SF-905851.SQL.py
(bug #2557 "SQLException:assert:INSERT INTO: FOREIGN KEY constraint violated on 64-bits")
sql/src/test/BugTracker/Tests/range_predicate.SF-1711242.sql
sql/src/test/BugTracker/Tests/variable_stack_crash.SF-1711251.sql
sql/src/test/BugTracker/Tests/variable_stack_crash.SF-1711251-2.sql
sql/src/test/bugs/Tests/innerjoin_between-bug-sf-960672.sql
(bug #2613 "SQL creates wrong MAL code a.o. with GDK_nr_threads=1")
Most probably, these test do work fine, now, as with a single
partition mitosis, and hence mergetable, do not trigger any more.
The first two tests (bug #2557) still fail in the multi-threaded case.
The latter four tests (bug #2613) did only fail in the single-threaded case,
and when compiled with Intels icc on a dual-core 64-bit Fedora 12 machine;
nightly testing will reveal the effect of this checkin for that case.
## Comment 14444
Date: 2010-07-16 18:56:35 +0200
From: @drstmane
potentially related bugs are
- bug #2557 "SQLException:assert:INSERT INTO: FOREIGN KEY constraint violated on 64-bits"
- bug #2596 "some TPCH tests fail with assertion in opt_mergetable on Windows"
## Comment 14446
Date: 2010-07-17 11:36:36 +0200
From: @drstmane
The problem still occurs as reported when compiled with Intel's icc on a dual-core 64-bit Fedora 12 machine.
## Comment 14459
Date: 2010-07-18 09:29:51 +0200
From: @drstmane
Updated URLs are:
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/Int.64.64.d.1-Fedora12/src_test_BugTracker/range_predicate.SF-1711242.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/Int.64.64.d.1-Fedora12/src_test_BugTracker/variable_stack_crash.SF-1711251.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/Int.64.64.d.1-Fedora12/src_test_BugTracker/variable_stack_crash.SF-1711251-2.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/Int.64.64.d.1-Fedora12/src_test_bugs/innerjoin_between-bug-sf-960672.err.00.html
## Comment 14609
Date: 2010-08-04 08:49:20 +0200
From: @drstmane
The test work fine on a different Fedora 12 machine using icc;
hence, I suspect that the problems are machine (hardware?) related;
closing for now ...
## Comment 14805
Date: 2010-08-30 09:18:05 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
| SQL creates wrong MAL code a.o. with GDK_nr_threads=1 | https://api.github.com/repos/MonetDB/MonetDB/issues/2613/comments | 0 | 2020-11-30T11:06:03Z | 2024-06-27T11:48:36Z | https://github.com/MonetDB/MonetDB/issues/2613 | 753,381,406 | 2,613 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-14 08:28:26 +0200
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: 2.38.5 (Jun2010-SP2) [obsolete]
Last updated: 2010-11-15 09:38:58 +0100
## Comment 14389
Date: 2010-07-14 08:28:26 +0200
From: @drstmane
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.5.9-2.fc12 Firefox/3.5.9
Build Identifier:
Accessing the not automatically returned ("set trace = 'none';") trace using the tracelog() function fails on Windows with
QUERY = SELECT COUNT(*) FROM tracelog();
ERROR = !SQLException:sql.bind:Cannot access descriptor
Reproducible: Always
### Steps to Reproduce:
See test sql/src/test/Tests/trace.sql
http://monetdb.cwi.nl/testing/projects/monetdb/Candidate/sql/.mTests103/Int.32.32.d.1-Windows5.1/src_test/trace.err.00.html
## Comment 14393
Date: 2010-07-14 10:13:27 +0200
From: @grobian
iirc, set trace = 'none' works by accident, not by design.
## Comment 14460
Date: 2010-07-18 09:31:17 +0200
From: @drstmane
Updated URL is:
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/Int.32.32.d.1-Windows5.1/src_test/trace.err.00.html
## Comment 14710
Date: 2010-08-17 11:34:41 +0200
From: @drstmane
Changeset [fe2c827daceb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fe2c827daceb) 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=fe2c827daceb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=fe2c827daceb)
Changeset description:
make test for bug #2645 work independently of degree of parallelism
As mentioned the bug report, printing the MAL plan (EXPLAIN)
of the query to check whether the desired mat.slice() call is
generated, is not convenient, as the MAL plan highly depends on
the degree of parallelism (number of CPU cores / threads)
used/available.
As althernative, we now exploit the hidden feature of collection
the execution TRACE in a table without returning it as result
(set trace = 'none';) and then query that table to check
whether mitosis was not activated (not mat.*() calls in the MAL
plan) or otherwise there is at least one mat.slice() call.
Caveat:
This might not work on Windows until bug #2612 is fixed.
## Comment 14712
Date: 2010-08-17 11:42:03 +0200
From: @drstmane
I know that set trace = 'none' "feature" work more by accident than by design.
Still, there is this test that work fine on other platforms; hence, it should IMHO also not fail (with a not that useful error message) on Windows.
Possibly solutions include (preferably in this order):
1)
Make this undocumented feature also work on Windows.
2)
Trigger an error message that states that this feature is not supported on Windows and approve the respective Windows-specific output (for this test and the test for bug #2645).
3)
Skip this test (and that for bug #2645) on Windows.
## Comment 14716
Date: 2010-08-18 08:10:29 +0200
From: @drstmane
Test URL for bug #2645 is
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/Int.32.32.d.1-Windows5.1/src_test_BugTracker-2010/mat.slice_limit1.Bug-2645.err.00.html
## Comment 14834
Date: 2010-08-30 09:22:29 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
## Comment 14917
Date: 2010-09-20 11:27:43 +0200
From: @sjoerdmullender
Changeset [edbb6276531b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=edbb6276531b) 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=edbb6276531b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=edbb6276531b)
Changeset description:
Export functions. This fixes bug #2612.
## Comment 14918
Date: 2010-09-20 11:27:44 +0200
From: @sjoerdmullender
Changeset [1777bf07fecb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1777bf07fecb) 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=1777bf07fecb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1777bf07fecb)
Changeset description:
Merge with Oct2010 branch.
Export functions. This fixes bug #2612.
## Comment 14919
Date: 2010-09-20 11:28:27 +0200
From: @sjoerdmullender
The usual problem on Windows: you need to export functions that are to be used outside of the dll they're defined in.
| "tracelog()" function (test sql/src/test/Tests/trace.sql) fails on Windows | https://api.github.com/repos/MonetDB/MonetDB/issues/2612/comments | 0 | 2020-11-30T11:06:00Z | 2024-06-27T11:48:35Z | https://github.com/MonetDB/MonetDB/issues/2612 | 753,381,353 | 2,612 |
[
"MonetDB",
"MonetDB"
] | Date: 2010-07-13 15:50:22 +0200
From: @arjenderijke
To: SQL devs <<bugs-sql>>
Version: 2.38.3 (Jun2010-SP1) [obsolete]
CC: @drstmane
Last updated: 2010-08-30 09:18:03 +0200
## Comment 14388
Date: 2010-07-13 15:50:22 +0200
From: @arjenderijke
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.10) Gecko/20100622 Fedora/3.5.10-1.fc12 Firefox/3.5.10
Build Identifier:
If you create a second function with a signature that already exists, for example by running the same "create function" statement twice, than that does not give an error message. You will get an error message when you drop the function: ERROR = !DROP FUNCTION: there are more than one function called 'next_a', please use the full signature
Reproducible: Always
### Steps to Reproduce:
create table table_a (
column_a int,
column_b int
);
create function next_a()
returns integer
begin
declare col_a integer;
set col_a = 1;
return col_a;
end;
create function next_a()
returns integer
begin
declare col_a integer;
set col_a = 1;
return col_a;
end;
drop function next_a;
### Actual Results:
ERROR = !DROP FUNCTION: there are more than one function called 'next_a', please use the full signature
### Expected Results:
The second "create function" statement should fail and the "drop function" statement should succeed
I could reproduce this with code from the Feb2010 release, so the bug is not recent.
## Comment 14392
Date: 2010-07-14 10:12:19 +0200
From: @arjenderijke
Added test second_function_existing_signature.Bug-2611 in sql/src/test/BugTracker-2010/
## Comment 14397
Date: 2010-07-14 11:00:40 +0200
From: @drstmane
Changeset [bd573d93438e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bd573d93438e) 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=bd573d93438e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bd573d93438e)
Changeset description:
back-ported tests for bug #2611 & bug #2614 to Jun2010 branch
both problems also occur in the Jun2010-SP1 release (candidate)
## Comment 14566
Date: 2010-07-30 15:18:37 +0200
From: @njnes
Changeset [ef5c3a087bf0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ef5c3a087bf0) 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=ef5c3a087bf0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ef5c3a087bf0)
Changeset description:
Fixed bug #2611. Matching functions without an parameter list was fixed.
## Comment 14601
Date: 2010-08-02 16:15:07 +0200
From: @drstmane
Test works fine, now, with nightly testing:
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/GNU.64.64.d.1-Fedora12/src_test_BugTracker-2010/second_function_existing_signature.Bug-2611.out.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/GNU.64.64.d.1-Fedora12/src_test_BugTracker-2010/second_function_existing_signature.Bug-2611.err.00.html
## Comment 14800
Date: 2010-08-30 09:18:03 +0200
From: @sjoerdmullender
The Jun2010-SP2 version has been released.
| creating second function with existing signature succeeds | https://api.github.com/repos/MonetDB/MonetDB/issues/2611/comments | 0 | 2020-11-30T11:05:57Z | 2024-06-27T11:48:34Z | https://github.com/MonetDB/MonetDB/issues/2611 | 753,381,317 | 2,611 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.