You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using an third qualifier in a table name (such as sys.sys.table_name) this is accepted by the SQL parser. It should return an error as we do not support a 3-level table name qualifier (as in catalog.schema.table).
Reproducible: Always
Steps to Reproduce:
Start mserver5
Start mclient
Issue SQL commands:
select * from dependency_types;
-- returns table ouput, so ok
select * from sys.dependency_types;
-- returns table ouput, so ok
select * from sys.sys.dependency_types;
-- returns table output! It should return an error such as next query
select * from sys.sys.sys.dependency_types;
-- returns an error
Actual Results:
bash-4.3$ mclient
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.22.0 (unreleased), 'demo'
Type \q to quit, ? for a list of available commands
auto commit mode: on
sql>select * from dependency_types;
+--------------------+----------------------+
| dependency_type_id | dependency_type_name |
+====================+======================+
| 1 | SCHEMA |
| 2 | TABLE |
| 3 | COLUMN |
| 4 | KEY |
| 5 | VIEW |
| 6 | USER |
| 7 | FUNCTION |
| 8 | TRIGGER |
| 9 | OWNER |
| 10 | INDEX |
| 11 | FKEY |
| 12 | SEQUENCE |
| 13 | PROCEDURE |
| 14 | BE_DROPPED |
+--------------------+----------------------+
14 tuples (0.905ms)
sql>-- returns table ouput, so ok
sql>select * from sys.dependency_types;
+--------------------+----------------------+
| dependency_type_id | dependency_type_name |
+====================+======================+
| 1 | SCHEMA |
| 2 | TABLE |
| 3 | COLUMN |
| 4 | KEY |
| 5 | VIEW |
| 6 | USER |
| 7 | FUNCTION |
| 8 | TRIGGER |
| 9 | OWNER |
| 10 | INDEX |
| 11 | FKEY |
| 12 | SEQUENCE |
| 13 | PROCEDURE |
| 14 | BE_DROPPED |
+--------------------+----------------------+
14 tuples (0.560ms)
sql>-- returns table ouput, so ok
sql>
sql>select * from sys.sys.dependency_types;
+--------------------+----------------------+
| dependency_type_id | dependency_type_name |
+====================+======================+
| 1 | SCHEMA |
| 2 | TABLE |
| 3 | COLUMN |
| 4 | KEY |
| 5 | VIEW |
| 6 | USER |
| 7 | FUNCTION |
| 8 | TRIGGER |
| 9 | OWNER |
| 10 | INDEX |
| 11 | FKEY |
| 12 | SEQUENCE |
| 13 | PROCEDURE |
| 14 | BE_DROPPED |
+--------------------+----------------------+
14 tuples (0.654ms)
sql>-- returns table output! It should return an error such as next query
sql>select * from sys.sys.sys.dependency_types;
syntax error, unexpected '.', expecting SCOLON in: "select * from sys.sys.sys."
sql>-- returns an error
sql>
Expected Results:
query:
select * from sys.sys.dependency_types;
should return an error instead.
See also Bug #2526 (for adding support of: schema.table.column name usage in SQL)
Date: 2016-03-10 15:43:23 +0100
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <>
Version: 11.21.13 (Jul2015-SP2)
CC: @njnes
Last updated: 2016-03-25 09:59:29 +0100
Comment 21873
Date: 2016-03-10 15:43:23 +0100
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0
Build Identifier:
When using an third qualifier in a table name (such as sys.sys.table_name) this is accepted by the SQL parser. It should return an error as we do not support a 3-level table name qualifier (as in catalog.schema.table).
Reproducible: Always
Steps to Reproduce:
select * from dependency_types;
-- returns table ouput, so ok
select * from sys.dependency_types;
-- returns table ouput, so ok
select * from sys.sys.dependency_types;
-- returns table output! It should return an error such as next query
select * from sys.sys.sys.dependency_types;
-- returns an error
Actual Results:
bash-4.3$ mclient
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.22.0 (unreleased), 'demo'
Type \q to quit, ? for a list of available commands
auto commit mode: on
sql>select * from dependency_types;
+--------------------+----------------------+
| dependency_type_id | dependency_type_name |
+====================+======================+
| 1 | SCHEMA |
| 2 | TABLE |
| 3 | COLUMN |
| 4 | KEY |
| 5 | VIEW |
| 6 | USER |
| 7 | FUNCTION |
| 8 | TRIGGER |
| 9 | OWNER |
| 10 | INDEX |
| 11 | FKEY |
| 12 | SEQUENCE |
| 13 | PROCEDURE |
| 14 | BE_DROPPED |
+--------------------+----------------------+
14 tuples (0.905ms)
sql>-- returns table ouput, so ok
sql>select * from sys.dependency_types;
+--------------------+----------------------+
| dependency_type_id | dependency_type_name |
+====================+======================+
| 1 | SCHEMA |
| 2 | TABLE |
| 3 | COLUMN |
| 4 | KEY |
| 5 | VIEW |
| 6 | USER |
| 7 | FUNCTION |
| 8 | TRIGGER |
| 9 | OWNER |
| 10 | INDEX |
| 11 | FKEY |
| 12 | SEQUENCE |
| 13 | PROCEDURE |
| 14 | BE_DROPPED |
+--------------------+----------------------+
14 tuples (0.560ms)
sql>-- returns table ouput, so ok
sql>
sql>select * from sys.sys.dependency_types;
+--------------------+----------------------+
| dependency_type_id | dependency_type_name |
+====================+======================+
| 1 | SCHEMA |
| 2 | TABLE |
| 3 | COLUMN |
| 4 | KEY |
| 5 | VIEW |
| 6 | USER |
| 7 | FUNCTION |
| 8 | TRIGGER |
| 9 | OWNER |
| 10 | INDEX |
| 11 | FKEY |
| 12 | SEQUENCE |
| 13 | PROCEDURE |
| 14 | BE_DROPPED |
+--------------------+----------------------+
14 tuples (0.654ms)
sql>-- returns table output! It should return an error such as next query
sql>select * from sys.sys.sys.dependency_types;
syntax error, unexpected '.', expecting SCOLON in: "select * from sys.sys.sys."
sql>-- returns an error
sql>
Expected Results:
query:
select * from sys.sys.dependency_types;
should return an error instead.
See also Bug #2526 (for adding support of: schema.table.column name usage in SQL)
Comment 21882
Date: 2016-03-13 14:27:23 +0100
From: @njnes
Martin could you add the test? The code now returns an error.
Comment 21925
Date: 2016-03-17 12:14:53 +0100
From: MonetDB Mercurial Repository <>
Changeset c3f2ee09cf31 made by Martin van Dinther martin.van.dinther@monetdbsolutions.com in the MonetDB repo, refers to this bug.
For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c3f2ee09cf31
Changeset description:
Comment 21968
Date: 2016-03-25 09:59:29 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
The text was updated successfully, but these errors were encountered: