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

Stack overflow in the query rewriter with a query having an OR condition and a nested SELECT subexpression #6125

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2016-11-17 17:05:20 +0100
From: Dean De Leo <>
To: SQL devs <>
Version: 11.23.13 (Jun2016-SP2)
CC: martin.van.dinther, @njnes

Last updated: 2016-12-21 13:06:52 +0100

Comment 24700

Date: 2016-11-17 17:05:20 +0100
From: Dean De Leo <>

User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.90 Safari/537.36
Build Identifier:

The query rewriter enters in an infinite recursion on the attached query.

On Linux, default development branch up to 62173:60942e23e88f 13/Nov/16, debug build, empty tables.

Reproducible: Always

Steps to Reproduce:

  1. Issue the attached query, the schema is included.
  2. Boom

Actual Results:

The server crashes with a segfault.

Comment 24701

Date: 2016-11-17 17:06:06 +0100
From: Dean De Leo <>

Created attachment 509
repro.sql

Attached file: query10_repro.sql (application/sql, 329 bytes)
Description: repro.sql

Comment 24702

Date: 2016-11-17 17:06:32 +0100
From: Dean De Leo <>

Created attachment 510
debugger backtrace

Attached file: backtrace10.txt (text/plain, 5710 bytes)
Description: debugger backtrace

Comment 24720

Date: 2016-11-24 19:05:36 +0100
From: MonetDB Mercurial Repository <>

Changeset c59ecb13b9da 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=c59ecb13b9da

Changeset description:

Add test script for bug #6125

Comment 24721

Date: 2016-11-24 19:11:25 +0100
From: Martin van Dinther <<martin.van.dinther>>

Changed version to Jun2016-SP2 as the issue (causing crash of mserver5) occurs in that version already.

Comment 24752

Date: 2016-12-03 12:08:14 +0100
From: MonetDB Mercurial Repository <>

Changeset b72b05357cdd made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b72b05357cdd

Changeset description:

fixes for bugs 6124, 6125 and 6121
The apply rename optimizer step has been rewriten.
Apply optimizer now create new relational operators (doesn't steal
the structures, ie safe against referenced subqueries).

Comment 24756

Date: 2016-12-03 18:34:20 +0100
From: @njnes

fixed by rewriting the apply optimizers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant