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

Server fails when doing DROP DATABASE right after error in statistical fnction [CORE2455] #2869

Closed
firebird-issue-importer opened this issue May 7, 2009 · 6 comments

Comments

@firebird-issue-importer
Copy link

@firebird-issue-importer firebird-issue-importer commented May 7, 2009

Submitted by: @AlexPeshkoff

AV happens in the end of execution of the following isql script:

SET NAMES ASCII;
CREATE DATABASE 'test.fdb' DEFAULT CHARACTER SET ISO8859_1;

-- this implementation of factorial is not recursive.

set term ^;
create procedure factorial (
max_rows integer,
mode integer )
returns (row_num integer, result integer ) as
declare variable temp integer;
declare variable counter integer;
begin
counter=0;
temp=1;
while (counter <= max_rows) do begin
row_num = counter;
if (row_num=0) then
temp=1;
else
temp=temp * row_num;
result=temp;
counter = counter + 1;
if (mode=1) then suspend;
end
if (mode=2) then suspend;
end
^
set term ; ^

select * from factorial (5,2);

create table onerow (i integer);
insert into onerow values (5);

-- note the derived table query
select (select ROW_NUM from factorial(i,2)) as RN from onerow ;
select (select RESULT from factorial(i,2)) as RS from onerow ;

-- note the derived table query
select (select ROW_NUM from factorial(i,1)) as RN from onerow ;
select (select RESULT from factorial(i,1)) as RS from onerow ;

drop database ;

Commits: 4742f45

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 7, 2009

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 7, 2009

Commented by: @AlexPeshkoff

Without calls to RSE_close req_attachment in procedural request reamins set, and points to already deleted attachment when MET_clear_cache() is called during database shutdown. It is good idea to try to close rsb on error thrown during statistical function evaluation.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 7, 2009

Modified by: @AlexPeshkoff

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

resolution: Fixed [ 1 ]

Fix Version: 2.5 RC1 [ 10300 ]

@firebird-issue-importer
Copy link
Author

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

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 15, 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants