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

IB server stalled by simple script [CORE297] #628

Closed
firebird-automations opened this issue Jul 23, 2002 · 4 comments
Closed

IB server stalled by simple script [CORE297] #628

firebird-automations opened this issue Jul 23, 2002 · 4 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: datiscum (datiscum)

SFID: 585624#⁠
Submitted By: datiscum

The following script on a simple database with two
tables, and two stored
procedures stalls Firebird and IB Server. Even
disconnecting becomes
impossible, not to speak of other clients connecting.

1.Connect.
2.<script>
delete from TEST where T_GROUP = 2;
execute procedure GROUP_COPY( 1 , 2 );
commit;
</script>
3.Disconnect.

After at most three times repeating these three steps
the server is stalled. I
was very disappointed to finally see Firbird and IB
Server to choke on an
example as simple as that. It has cost me days to track
it down, since I
looked for errors in my application and IBO at first.

The behaviour is reproducible with IBConsole, Interbase
Server 6.01, Firebird
FirebirdSS-1.0.0.796-0.64IO.tar.gz ,
Firebird-1.0.1.821-Win32.exe, and
Firebird-1.0.1.794Win32.exe, using Windows 2000
Professional or SuSE Linux
8.0, other OS not tried.

I hope the example helps to have the error removed,
soon. Having the server
stalled without a chance to shut it down gracefully is
not bearable.

The script to initialize the database follows:

SET SQL DIALECT 3;
SET NAMES ISO8859_1;

CREATE DATABASE '192.168.1.40:/DB/Test.fdb'
USER 'SYSDBA' PASSWORD '!master?'
PAGE_SIZE 8192
DEFAULT CHARACTER SET ISO8859_1;

SET TERM ^ ;

/**************************************************************************
****/
/* Stored Procedures */
/**************************************************************************
****/

CREATE PROCEDURE GROUP_COPY (
SOURCE INTEGER,
DESTINATION INTEGER)
AS
BEGIN
EXIT;
END^

CREATE PROCEDURE INSERT_VALUES (
CONT INTEGER,
D_GROUP INTEGER)
AS
BEGIN
EXIT;
END^

SET TERM ; ^

/**************************************************************************
****/ /* Tables */
/**************************************************************************
****/

CREATE TABLE GROUPS (
GR_ID INTEGER NOT NULL,
GR_NAME VARCHAR(40) CHARACTER SET ISO8859_1 NOT NULL
COLLATE DE_DE
);

CREATE TABLE TEST (
ID INTEGER NOT NULL,
T_GROUP INTEGER NOT NULL
);

/**************************************************************************
****/ /* Primary Keys */
/**************************************************************************
****/
ALTER TABLE GROUPS ADD CONSTRAINT PK_GROUPS PRIMARY
KEY (GR_ID);
ALTER TABLE TEST ADD CONSTRAINT PK_TEST PRIMARY KEY
(ID, T_GROUP);

/**************************************************************************
****/ /* Foreign Keys */
/**************************************************************************
****/
ALTER TABLE TEST ADD CONSTRAINT FK_TEST FOREIGN KEY
(T_GROUP)
REFERENCES GROUPS (GR_ID);

/**************************************************************************
****/ /* Stored Procedures */
/**************************************************************************
****/

SET TERM ^ ;

ALTER PROCEDURE GROUP_COPY (
SOURCE INTEGER,
DESTINATION INTEGER)
AS
begin
insert into TEST( ID, T_GROUP )
select http://A.ID, :Destination from TEST A
where A.T_GROUP = :Source
and not exists (select * from TEST B
where http://B.ID = http://A.ID
and :Destination = B.T_GROUP );
end
^

ALTER PROCEDURE INSERT_VALUES (
CONT INTEGER,
D_GROUP INTEGER)
AS
DECLARE VARIABLE ANZ INTEGER;
begin
ANZ = 0;

while ( ANZ < CONT ) do
begin
if ( not exists ( select ID from TEST where ID = :ANZ
and T_GROUP =

:D_GROUP )) then

insert into TEST ( ID , T_GROUP ) values ( :ANZ ,
:D_GROUP );
ANZ = ANZ +1;
end
end
^

SET TERM ; ^

commit;

/* Default values for the tables. */
insert into GROUPS VALUES ( 1 , 'Group1' );
insert into GROUPS VALUES ( 2 , 'Group2' );
commit;
execute procedure INSERT_VALUES( 30000 , 1);
commit;

====== Test Details ======

Original test:
https://github.com/FirebirdSQL/fbtcs/blob/master/GTCS/tests/CF_ISQL_23.script

@firebird-automations
Copy link
Collaborator Author

Commented by: Alice F. Bird (firebirds)

Date: 2004-04-26 19:49
Sender: brodsom
Logged In: YES
user_id=546439

The bug don't exits in 2.0 HEAD (verified with new fbtcs test)

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 10321 ] => Firebird [ 14553 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: No test => Done successfully

Test Details: Original test:
https://github.com/FirebirdSQL/fbtcs/blob/master/GTCS/tests/CF_ISQL_23.script

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

No branches or pull requests

2 participants