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

Crash when INNER JOIN with VIEW #7456

Closed
suyZhong opened this issue Feb 12, 2024 · 3 comments
Closed

Crash when INNER JOIN with VIEW #7456

suyZhong opened this issue Feb 12, 2024 · 3 comments
Assignees
Labels
bug Something isn't working SQL
Milestone

Comments

@suyZhong
Copy link

Describe the bug
Consider the test cases below. It would crash the monetdb server. The server log (merovingian.log) would show: database 'monetdb' (1364) has crashed with signal SIGSEGV (dumped core)

To Reproduce

DROP TABLE IF EXISTS t0 CASCADE;
DROP VIEW IF EXISTS v0 CASCADE;

CREATE TABLE t0(c0 BOOLEAN);
CREATE VIEW v0(c0) AS SELECT 1 FROM t0 HAVING true ORDER BY ((false)OR(false));

SELECT * FROM t0 INNER  JOIN v0 ON v0.c0; -- unexpected end of file

Expected behavior
Should return an error message, or return the correct result.

Screenshots
N/A

Software versions
Build from source:

> docker exec monetdb-test mserver5 --version --dbname=monetdb
MonetDB 5 server 11.50.0 (hg id: 6654ce9) (64-bit, 128-bit integers)
This is an unreleased version
Copyright (c) 1993 - July 2008 CWI
Copyright (c) August 2008 - 2023 MonetDB B.V., all rights reserved
Visit https://www.monetdb.org/ for further information
Found 503.5GiB available memory, 128 available cpu cores
Libraries:
Compiled by: @cb50362562d1 (x86_64-pc-linux-gnu)
Compilation: /usr/bin/cc 
Linking    : /usr/bin/ld

Issue labeling
Bug

Additional context
Kindly inform me if you need more information (e.g. error trace, etc.)

@mvdvm mvdvm added the bug Something isn't working label Feb 15, 2024
@mvdvm
Copy link
Contributor

mvdvm commented Feb 15, 2024

The problem is in the ORDER BY ((false)OR(false)) part of the view. When using ORDER BY false it works.

monetdb-team pushed a commit that referenced this issue Feb 15, 2024
@njnes njnes self-assigned this Feb 17, 2024
@njnes njnes added this to the NEXTRELEASE milestone Feb 17, 2024
@njnes
Copy link
Contributor

njnes commented Feb 17, 2024

added fix in the dec2023 branch

@njnes
Copy link
Contributor

njnes commented Apr 10, 2024

2508e64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working SQL
Projects
None yet
Development

No branches or pull requests

4 participants