Skip to content

Crash when INNER JOIN with CONTAINS #7466

Closed

Description

@suyZhong

Describe the bug
Consider the test cases below. It would crash the monetdb server. The server log (merovingian.log) would show: 2024-02-27 09:53:35 MSG merovingian[159]: database 'monetdb' (2897) has crashed with signal SIGABRT (dumped core)

To Reproduce

DROP TABLE t0 CASCADE;
DROP TABLE t1 CASCADE;

CREATE TABLE t0(c1 INT);
CREATE TABLE t1(c1 VARCHAR(500));
CREATE VIEW v0(c0) AS SELECT (('a')||('b')) FROM t1;

SELECT * FROM t1, t0 INNER  JOIN v0 ON t0.c1 WHERE CONTAINS((t1.c1 > 'a'), t0.c1) UNION ALL SELECT * FROM t1, t0 INNER  JOIN v0 ON t0.c1 WHERE (NOT CONTAINS((t1.c1 > 'a'), t0.c1)); -- 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: c9e0977) (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: @618e73c727b6 (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. added a commit that references this issue on Feb 28, 2024
  2. mvdvm commented on Feb 29, 2024

    @mvdvm
    Contributor

    It works ok in Dec2023 but fails in default branch.

  3. njnes commented on Mar 6, 2024

    @njnes
    Contributor

    problem was at the join reorder optimizer.

  4. added this to the NEXTFEATURERELEASE milestone on Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions