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

Server terminates after CREATE FUNCTION in multi-user scenario #2837

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

Server terminates after CREATE FUNCTION in multi-user scenario #2837

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working normal SQL

Comments

@monetdb-team
Copy link

Date: 2011-07-12 16:31:57 +0200
From: cdxxxx
To: SQL devs <>
Version: 11.3.3 (Apr2011-SP1) [obsolete]
CC: @njnes

Last updated: 2011-07-29 10:52:41 +0200

Comment 15935

Date: 2011-07-12 16:31:57 +0200
From: cdxxxx

MonetDB5-SQL-Installer-x86_64-OID64-20110516.msi on Windows 7 x64

Script 1:

CREATE USER "SYSDBA" WITH PASSWORD 'masterkey' NAME 'SYSDBA' SCHEMA "sys";
CREATE SCHEMA "oe" AUTHORIZATION "SYSDBA";
ALTER USER "SYSDBA" SET SCHEMA "oe";

Script 2:

CREATE FUNCTION xtest(a integer) RETURNS TABLE(b integer) BEGIN RETURN TABLE(SELECT NULL); END;

Steps:

  1. Launch server with clean DB
  2. Launch mclient 1 with default user/password
  3. Execute script 1 with client 1, do not close
  4. Launch mclient 2 with user=SYSDBA password=masterkey (defined in script 1)
  5. Execute script 2 with client 2, then \q
  6. Press enter into client 1, observe server crash

Console windows:
Server:
c:\Program Files\MonetDB\MonetDB5>rmdir /S /Q d:\db\MonetDB5
c:\Program Files\MonetDB\MonetDB5>mkdir d:\db\MonetDB5
c:\Program Files\MonetDB\MonetDB5>setlocal&&SET APPDATA=d:\db\MonetDB5&& MSQLServer.bat --dbname=oetest&&endlocal
MonetDB 5 server v11.3.3 "Apr2011-SP1"
Serving database 'oetest', using 4 threads
Compiled for x86_64-pc-winnt/64bit with 64bit OIDs dynamically linked
Found 3.749 GiB available main-memory.
Copyright (c) 1993-July 2008 CWI.
Copyright (c) August 2008-2011 MonetDB B.V., all rights reserved
Visit http://monetdb.cwi.nl/ for further information
Listening for connection requests on mapi:monetdb://127.0.0.1:50000/
MonetDB/SQL module loaded

SQL catalog created, loading sql scripts once
c:\Program Files\MonetDB\MonetDB5>

Client 1:
c:\Program Files\MonetDB\MonetDB5>mclient -d oetest
user(win32):monetdb
password:
Welcome to mclient, the MonetDB/SQL interactive terminal (Apr2011-SP1)
Database: MonetDB v11.3.3, 'oetest'
Type \q to quit, ? for a list of available commands
auto commit mode: on
sql>CREATE USER "SYSDBA" WITH PASSWORD 'masterkey' NAME 'SYSDBA' SCHEMA "sys";
operation successful
sql>CREATE SCHEMA "oe" AUTHORIZATION "SYSDBA";
operation successful
sql>ALTER USER "SYSDBA" SET SCHEMA "oe";
operation successful
sql>
sql>
MAPI = monetdb@localhost:50000
ACTION= read_line
ERROR = !Connection terminated
Press any key to continue . . .
c:\Program Files\MonetDB\MonetDB5>

Client 2:
c:\Program Files\MonetDB\MonetDB5>mclient -d oetest -u SYSDBA
password:
Welcome to mclient, the MonetDB/SQL interactive terminal (Apr2011-SP1)
Database: MonetDB v11.3.3, 'oetest'
Type \q to quit, ? for a list of available commands
auto commit mode: on
sql>CREATE FUNCTION xtest(a integer) RETURNS TABLE(b integer) BEGIN RETURN TABLE(SELECT NULL); END;
operation successful
sql>\q
c:\Program Files\MonetDB\MonetDB5>

Comment 15936

Date: 2011-07-12 16:51:01 +0200
From: @sjoerdmullender

Also fails on Linux.

Comment 15943

Date: 2011-07-13 22:00:00 +0200
From: @njnes

Changeset f8bc98881e9d 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=f8bc98881e9d

Changeset description:

fixed Bug #2837 	Server terminates after CREATE FUNCTION in multi-user scenario

(ie backported protection against empty list of tables)

Comment 16002

Date: 2011-07-29 10:52:41 +0200
From: @sjoerdmullender

The Apr2011-SP2 bugfix release is out.

@monetdb-team monetdb-team added bug Something isn't working normal SQL labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working normal SQL
Projects
None yet
Development

No branches or pull requests

2 participants