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 running query:
SELECT s.name AS schema_nm, s.system AS is_system_schema
, (SELECT CAST(COUNT() as int) FROM sys.functions f WHERE f.schema_id = s.id AND f.type <> 2 AND f.id NOT IN (SELECT function_id FROM sys.systemfunctions)) AS " user defined functions"
, (SELECT CAST(COUNT() as int) FROM sys.functions f WHERE f.schema_id = s.id AND f.type = 2 AND f.id NOT IN (SELECT function_id FROM sys.systemfunctions)) AS " user defined procedures"
FROM sys.schemas AS s
WHERE s.name IN ('json', 'profiler', 'sys');
The problem is with the:
AND f.id NOT IN (SELECT function_id FROM sys.systemfunctions)
part. Without it the query does not crash.
Reproducible: Always
Steps to Reproduce:
Start mserver5 (MonetDB 5 server v11.25.20 with assertions enabled)
Start mclient
Run query:
SELECT s.name AS schema_nm, s.system AS is_system_schema
, (SELECT CAST(COUNT() as int) FROM sys.functions f WHERE f.schema_id = s.id AND f.type <> 2 AND f.id NOT IN (SELECT function_id FROM sys.systemfunctions)) AS " user defined functions"
, (SELECT CAST(COUNT() as int) FROM sys.functions f WHERE f.schema_id = s.id AND f.type = 2 AND f.id NOT IN (SELECT function_id FROM sys.systemfunctions)) AS " user defined procedures"
FROM sys.schemas AS s
WHERE s.name IN ('json', 'profiler', 'sys');
Actual Results:
Crash of mserver5, with assertion failure.
mserver5: ../../../dev/sql/server/rel_optimizer.c:8536: rel_apply_rewrite: Assertion `col' failed.
Date: 2017-04-21 15:14:56 +0200
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <>
Version: 11.25.15 (Dec2016-SP3)
Last updated: 2017-06-12 15:21:50 +0200
Comment 25256
Date: 2017-04-21 15:14:56 +0200
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Build Identifier:
Assertion failure:
mserver5: ../../../dev/sql/server/rel_optimizer.c:8536: rel_apply_rewrite: Assertion `col' failed.
when running query:
SELECT s.name AS schema_nm, s.system AS is_system_schema
, (SELECT CAST(COUNT() as int) FROM sys.functions f WHERE f.schema_id = s.id AND f.type <> 2 AND f.id NOT IN (SELECT function_id FROM sys.systemfunctions)) AS " user defined functions"
, (SELECT CAST(COUNT() as int) FROM sys.functions f WHERE f.schema_id = s.id AND f.type = 2 AND f.id NOT IN (SELECT function_id FROM sys.systemfunctions)) AS " user defined procedures"
FROM sys.schemas AS s
WHERE s.name IN ('json', 'profiler', 'sys');
The problem is with the:
AND f.id NOT IN (SELECT function_id FROM sys.systemfunctions)
part. Without it the query does not crash.
Reproducible: Always
Steps to Reproduce:
SELECT s.name AS schema_nm, s.system AS is_system_schema
, (SELECT CAST(COUNT() as int) FROM sys.functions f WHERE f.schema_id = s.id AND f.type <> 2 AND f.id NOT IN (SELECT function_id FROM sys.systemfunctions)) AS " user defined functions"
, (SELECT CAST(COUNT() as int) FROM sys.functions f WHERE f.schema_id = s.id AND f.type = 2 AND f.id NOT IN (SELECT function_id FROM sys.systemfunctions)) AS " user defined procedures"
FROM sys.schemas AS s
WHERE s.name IN ('json', 'profiler', 'sys');
Actual Results:
Crash of mserver5, with assertion failure.
mserver5: ../../../dev/sql/server/rel_optimizer.c:8536: rel_apply_rewrite: Assertion `col' failed.
Expected Results:
No crash and no assertion violation.
Comment 25290
Date: 2017-05-11 13:44:39 +0200
From: MonetDB Mercurial Repository <>
Changeset d46b715e0f7a 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=d46b715e0f7a
Changeset description:
Comment 25291
Date: 2017-05-11 13:48:46 +0200
From: Martin van Dinther <<martin.van.dinther>>
Fix has been implemented as part of http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e4578a201e15
The text was updated successfully, but these errors were encountered: