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

Using both the procedure name and alias inside an explicit plan crashes the server [CORE3064] #3443

Closed
firebird-issue-importer opened this issue Jul 2, 2010 · 13 comments

Comments

@firebird-issue-importer
Copy link

@firebird-issue-importer firebird-issue-importer commented Jul 2, 2010

Submitted by: @livius2

Is related to QA255

example (but for all proc this happed)

SET TERM ^ ;
CREATE PROCEDURE GET_DATES (
ADATE_FROM Date,
ADATE_TO Date )
RETURNS (
OUT_DATE Date )
AS
DECLARE VARIABLE D DATE;
BEGIN
D = ADATE_FROM;

WHILE (D<=ADATE_TO) DO
BEGIN
out_DATE = D;
SUSPEND;
D = D + 1;
END
END^
SET TERM ; ^

now do select

SELECT p.OUT_DATE
FROM GET_DATES(CAST('2010-01-01' as date), CAST('2010-06-01' as date)) p

you get plan
PLAN (GET_DATES NATURAL)

but change this plan to this and do select

SELECT p.OUT_DATE
FROM GET_DATES(CAST('2010-01-01' as date), CAST('2010-06-01' as date)) p
PLAN (P GET_DATES NATURAL)

server crash
in windows log
" Abnormal Termination: "C:\Program Files\Firebird\Firebird_2_1\bin\fbserver.exe": terminated abnormally (4294967295)268435456 ü."

in fb log
"
WCOMP1 (Client) Fri Jul 02 11:18:16 2010
"C:\Program Files\Firebird\Firebird_2_1\bin\fbserver.exe": terminated abnormally (4294967295)"

Commits: 0da0b0c 7f9f768 8fa0fad fc70141

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 2, 2010

Modified by: @livius2

description: example (but for all proc this happed)

SET TERM ^ ;
CREATE PROCEDURE GET_DATES (
ADATE_FROM Date,
ADATE_TO Date )
RETURNS (
OUT_DATE Date )
AS
DECLARE VARIABLE D DATE;
BEGIN
D = ADATE_FROM;

WHILE (D<=ADATE_TO) DO
BEGIN
out_DATE = D;
SUSPEND;
D = D + 1;
END
END^
SET TERM ; ^

now do select

SELECT p.OUT_DATE
FROM GET_DATES(CAST('2010-01-01' as date), CAST('2010-06-01' as date)) p

you get plan
PLAN (P GET_DATES NATURAL)

but change this plan to this and do select

SELECT p.OUT_DATE
FROM GET_DATES(CAST('2010-01-01' as date), CAST('2010-06-01' as date)) p
PLAN (P GET_DATES NATURAL)

server crash
in windows log
" Abnormal Termination: "C:\Program Files\Firebird\Firebird_2_1\bin\fbserver.exe": terminated abnormally (4294967295)268435456 ü."

in fb log
"
WCOMP1 (Client) Fri Jul 02 11:18:16 2010
"C:\Program Files\Firebird\Firebird_2_1\bin\fbserver.exe": terminated abnormally (4294967295)"

=>

example (but for all proc this happed)

SET TERM ^ ;
CREATE PROCEDURE GET_DATES (
ADATE_FROM Date,
ADATE_TO Date )
RETURNS (
OUT_DATE Date )
AS
DECLARE VARIABLE D DATE;
BEGIN
D = ADATE_FROM;

WHILE (D<=ADATE_TO) DO
BEGIN
out_DATE = D;
SUSPEND;
D = D + 1;
END
END^
SET TERM ; ^

now do select

SELECT p.OUT_DATE
FROM GET_DATES(CAST('2010-01-01' as date), CAST('2010-06-01' as date)) p

you get plan
PLAN (GET_DATES NATURAL)

but change this plan to this and do select

SELECT p.OUT_DATE
FROM GET_DATES(CAST('2010-01-01' as date), CAST('2010-06-01' as date)) p
PLAN (P GET_DATES NATURAL)

server crash
in windows log
" Abnormal Termination: "C:\Program Files\Firebird\Firebird_2_1\bin\fbserver.exe": terminated abnormally (4294967295)268435456 ü."

in fb log
"
WCOMP1 (Client) Fri Jul 02 11:18:16 2010
"C:\Program Files\Firebird\Firebird_2_1\bin\fbserver.exe": terminated abnormally (4294967295)"

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 2, 2010

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 2, 2010

Modified by: @dyemanov

priority: Critical [ 2 ] => Major [ 3 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 2, 2010

Modified by: @dyemanov

status: Open [ 1 ] => In Progress [ 3 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 2, 2010

Commented by: @dyemanov

The crash is surely a bug. The expected result is an error.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 2, 2010

Modified by: @dyemanov

Version: 2.0.6 [ 10303 ]

Version: 2.5 RC2 [ 10372 ]

Version: 2.5 RC1 [ 10362 ]

Version: 3.0 Initial [ 10301 ]

Version: 1.5.6 [ 10225 ]

Version: 2.5 Beta 2 [ 10300 ]

Version: 2.5 Beta 1 [ 10251 ]

Version: 2.1.2 [ 10270 ]

Version: 2.0.5 [ 10222 ]

Version: 2.1.1 [ 10223 ]

Version: 2.5 Alpha 1 [ 10224 ]

Version: 2.0.4 [ 10211 ]

Version: 2.1.0 [ 10041 ]

Version: 1.5.5 [ 10220 ]

Version: 2.0.3 [ 10200 ]

Version: 2.0.2 [ 10130 ]

Version: 2.0.1 [ 10090 ]

Version: 1.5.4 [ 10100 ]

Version: 2.0.0 [ 10091 ]

summary: select statement from stored procedure crash Server when wrong plan is specified => Using the procedure alias inside an explicit plan crashes the server

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 2, 2010

Modified by: @dyemanov

status: In Progress [ 3 ] => Open [ 1 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 2, 2010

Modified by: @dyemanov

summary: Using the procedure alias inside an explicit plan crashes the server => Using both the procedure name and alias inside an explicit plan crashes the server

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 2, 2010

Modified by: @dyemanov

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

resolution: Fixed [ 1 ]

Fix Version: 2.1.4 [ 10361 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

Fix Version: 2.0.7 [ 10390 ]

Fix Version: 2.5.1 [ 10333 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 23, 2011

Modified by: @pcisar

Link: This issue is related to QA255 [ QA255 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 29, 2015

Modified by: @pavel-zotov

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

QA Status: Done successfully

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 25, 2015

Commented by: @pcisar

Test created.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 25, 2015

Modified by: @pcisar

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

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