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

AV preparing a query with aggregate over derived table [CORE2416] #2834

Closed
firebird-issue-importer opened this issue Apr 10, 2009 · 14 comments
Closed

Comments

@firebird-issue-importer

Submitted by: @hvlad

Is related to QA235

WITH
t0 AS (
SELECT 1 AS f0, date '01.03.09' AS f1, 'Event1' AS f2
FROM rdb$database
),

t1 (f1) AS (
SELECT MIN(t2.f1) AS f1 FROM t0 AS t2 WHERE t2.f0 > t3.f0 AND t2.f1 >= t3.f1 AND t2.f2 = t3.f2
)

SELECT t4.f2, t4.f1_p
FROM (SELECT t3.f0, t3.f1, t3.f2, CAST((SELECT t1.f1 FROM t1) - t3.f1 AS INTEGER) AS f1_p
FROM t0 AS t3
) AS t4
WHERE t4.f1_p IS NOT NULL
GROUP BY t4.f2, t4.f1_p

Commits: b1e58c9 8f8472f

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 10, 2009

Modified by: @hvlad

assignee: Vlad Khorsun [ hvlad ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 4, 2009

Commented by: @hvlad

Case for FB 2.0.x

SELECT t4.f2, t4.f1_p
FROM (SELECT t3.f0, t3.f1, t3.f2,
CAST((SELECT t1.f1 FROM (
SELECT MIN(t2.f1) AS f1 FROM (
SELECT 1 AS f0, date '01.03.09' AS f1, 'Event1' AS f2
FROM rdb$database) AS t2
WHERE t2.f0 > t3.f0 AND t2.f1 >= t3.f1 AND t2.f2 = t3.f2) as t1)
- t3.f1 AS INTEGER) AS f1_p
FROM (
SELECT 1 AS f0, date '01.03.09' AS f1, 'Event1' AS f2
FROM rdb$database) AS t3
) AS t4
WHERE t4.f1_p IS NOT NULL
GROUP BY t4.f2, t4.f1_p

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 4, 2009

Modified by: @hvlad

Version: 2.1.2 [ 10270 ]

Version: 2.0.5 [ 10222 ]

Version: 2.5 Alpha 1 [ 10224 ]

Version: 2.0.4 [ 10211 ]

Version: 2.1.0 [ 10041 ]

Version: 2.0.3 [ 10200 ]

Version: 2.0.2 [ 10130 ]

Version: 2.0.1 [ 10090 ]

Version: 2.0.0 [ 10091 ]

Version: 2.1.1 [ 10223 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 5, 2009

Modified by: @hvlad

Fix Version: 2.1.3 [ 10302 ]

Fix Version: 2.5 RC1 [ 10300 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 5, 2009

Modified by: @hvlad

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 16, 2009

Modified by: @pcisar

Link: This issue is related to QA235 [ QA235 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 31, 2011

Commented by: @pcisar

Well, I can't reproduce this problem with neither 2.1.1 or 2.0.5 (both 64-bit SS Linux version). Do I miss something here?

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 31, 2011

Commented by: @hvlad

Just reproduced it with 2.0.0 and 2.0.6, both Win32 SS

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 31, 2011

Commented by: @hvlad

Found very old 2.1.0 RC2 - Win32 SS crashed while Win64 SS don't

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 31, 2011

Commented by: @pcisar

I can confirm it too with Win32 version too. So it seems strictly 32-bit related.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 31, 2011

Commented by: @pcisar

QA test added.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 31, 2011

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 18, 2016

Modified by: @pavel-zotov

QA Status: No test

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 4, 2016

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: No test => Done successfully

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