Skip to content

Crash when INNER JOIN with VIEW #7456

Description

@suyZhong

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.)

Activity

  1. mvdvm commented on Feb 15, 2024

    @mvdvm
    Contributor

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

  2. added a commit that references this issue on Feb 15, 2024
  3. self-assigned this
    on Feb 17, 2024
  4. added this to the NEXTRELEASE milestone on Feb 17, 2024
  5. njnes commented on Feb 17, 2024

    @njnes
    Contributor

    added fix in the dec2023 branch

  6. njnes commented on Apr 10, 2024

    @njnes
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions