Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

temporary tables on readonly mode #2704

monetdb-team opened this issue Nov 30, 2020 · 0 comments

temporary tables on readonly mode #2704

monetdb-team opened this issue Nov 30, 2020 · 0 comments


Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2010-10-25 12:00:00 +0200
From: @romulogoncalves
To: SQL devs <>
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: 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))
FROM _tables
WHERE name = UPPER(nme)

Stop mserver and start it in readonly mode and run the following query:
from _tables s, _tables l
where = funcTest('QSO');

At the mclient side I get the following:
[goncalve@alviss queries]$ mclient current debug sql < test
MAPI = monetdb@localhost:55000
from _tables s, _tables l
where = 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/
(gdb) bt
0 0x000000399e87f2e2 in __strlen_sse2 () from /lib64/
1 0x00007fffdfe0a9a5 in SQLparser (c=0x605b78)
at /ufs/goncalve/MonetDB/current/sql/src/backends/monet5/
2 0x00007ffff7d2337e in runPhase (c=0x605b78, phase=1)
at /ufs/goncalve/MonetDB/current/MonetDB5/src/mal/
3 0x00007ffff7d234b6 in runScenarioBody (c=0x605b78)
at /ufs/goncalve/MonetDB/current/MonetDB5/src/mal/
4 0x00007ffff7d2373d in runScenario (c=0x605b78)
at /ufs/goncalve/MonetDB/current/MonetDB5/src/mal/
5 0x00007ffff7cd0167 in MSserveClient (dummy=0x605b78)
at /ufs/goncalve/MonetDB/current/MonetDB5/src/mal/
6 0x000000399f406a3a in start_thread () from /lib64/
7 0x000000399e8de77d in clone () from /lib64/
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".

Actual Results:

crash in the mserver

Expected Results:

from _tables s, _tables l
where = 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant