Bug 3996 - select * from sys.connections always returns 0 rows. Expected to see at least one row for the active connection.
Summary: select * from sys.connections always returns 0 rows. Expected to see at least...
Alias: None
Product: SQL
Classification: Unclassified
Component: all (show other bugs)
Version: 11.21.19 (Jul2015-SP4)
Hardware: x86_64 (amd64/em64t) All
: Normal normal
Assignee: SQL devs
Depends on:
Reported: 2016-04-28 12:34 CEST by Martin van Dinther
Modified: 2019-02-12 13:54 CET (History)
2 users (show)


Note You need to log in before you can comment on or make changes to this bug.
Description Martin van Dinther cwiconfidential 2016-04-28 12:34:19 CEST
User-Agent:       Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Build Identifier: 

Query: select * from sys.connections;
should list the connections conencted on the MonetDB server.
However it always returns no rows, no matter how many clients (mclient or JdbcClient or other connections) are connected to the MonetDB server.

This makes it impossible to find out who's or which clients are connected to the server.

Reproducible: Always

Steps to Reproduce:
1. start mserver5 process (Jul2105)
2. start mclient
3. execute SQL query: select * from sys.connections;
4. start a second mclient with the same credentials
5. execute SQL query: select * from sys.connections;

Actual Results:  
bash-4.3$ ./start_INSTALL_mserver5.sh 
# builtin opt 	gdk_dbpath = /export/scratch2/dinther/INSTALL/var/monetdb5/dbfarm/demo
# builtin opt 	gdk_debug = 0
# builtin opt 	gdk_vmtrim = no
# builtin opt 	monet_prompt = >
# builtin opt 	monet_daemon = no
# builtin opt 	mapi_port = 50000
# builtin opt 	mapi_open = false
# builtin opt 	mapi_autosense = false
# builtin opt 	sql_optimizer = default_pipe
# builtin opt 	sql_debug = 0
# cmdline opt 	embedded_r = true
# cmdline opt 	mapi_port = 41000
# cmdline opt 	gdk_debug = 10
# MonetDB 5 server v11.21.20
# This is an unreleased version
# Serving database 'demo', using 8 threads
# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs and 128bit integers dynamically linked
# Found 15.589 GiB available main-memory.
# Copyright (c) 1993-July 2008 CWI.
# Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved
# Visit http://www.monetdb.org/ for further information
# Listening for connection requests on mapi:monetdb://
# MonetDB/GIS module loaded
# Start processing logs sql/sql_logs version 52200
# Finished processing logs sql/sql_logs
# MonetDB/SQL module loaded
# MonetDB/R   module loaded
># SQL catalog created, loading sql scripts once
# loading sql script: 09_like.sql
# loading sql script: 10_math.sql
# loading sql script: 11_times.sql
# loading sql script: 12_url.sql
# loading sql script: 13_date.sql
# loading sql script: 14_inet.sql
# loading sql script: 15_querylog.sql
# loading sql script: 16_tracelog.sql
# loading sql script: 17_temporal.sql
# loading sql script: 20_vacuum.sql
# loading sql script: 21_dependency_functions.sql
# loading sql script: 22_clients.sql
# loading sql script: 23_skyserver.sql
# loading sql script: 24_zorder.sql
# loading sql script: 25_debug.sql
# loading sql script: 26_sysmon.sql
# loading sql script: 27_rejects.sql
# loading sql script: 39_analytics.sql
# loading sql script: 39_analytics_hge.sql
# loading sql script: 40_geom.sql
# loading sql script: 40_json.sql
# loading sql script: 40_json_hge.sql
# loading sql script: 41_md5sum.sql
# loading sql script: 45_uuid.sql
# loading sql script: 46_gsl.sql
# loading sql script: 51_sys_schema_extension.sql
# loading sql script: 72_fits.sql
# loading sql script: 74_netcdf.sql
# loading sql script: 75_storagemodel.sql
# loading sql script: 80_statistics.sql
# loading sql script: 80_udf.sql
# loading sql script: 80_udf_hge.sql
# loading sql script: 85_bam.sql
# loading sql script: 90_generator.sql
# loading sql script: 90_generator_hge.sql
# loading sql script: 99_system.sql

bash-4.3$ mclient
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.21.20 (unreleased), 'demo'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>select * from sys.connections;
| id | server | port | db | db_alias | user | password | language |
0 tuples (2.079ms)

Expected Results:  
For each connected client program or connection, a row listing the connection information.
When using mclient it should list at least one row; the connection made by mclient.
Comment 1 Sjoerd Mullender cwiconfidential 2016-05-30 17:11:06 CEST
The table sys.connections has nothing to do with MAPI connections.  It is a remnant from experimental code which was removed in February 2012 (changeset 8ee024048e42).

The bug is rather that the table still exists.
Comment 2 Niels Nes cwiconfidential 2016-08-19 16:00:37 CEST
should we cleanup the mvc_connect_catalog code (including this table)?
Comment 3 Sjoerd Mullender cwiconfidential 2016-08-29 11:41:11 CEST
(In reply to Niels Nes from comment #2)
> should we cleanup the mvc_connect_catalog code (including this table)?

Comment 4 MonetDB Mercurial Repository cwiconfidential 2017-02-06 22:20:16 CET
Changeset 873075e01254, made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.

For complete details, see http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=873075e01254

Changeset description:

	Removed table sys.connections.
	This "fixes" bug 3996.
Comment 5 Sjoerd Mullender cwiconfidential 2017-02-06 22:24:53 CET
The sys.connections table will be removed in the next feature release.  This should end the confusion.