Skip to content

DDL statements hang when the compiled statements cache is enabled #7598

@ilya071294

Description

@ilya071294

FB5. How to reproduce:

  1. Prepare data:
connect '127.0.0.1:employee' user SYSDBA password 'masterkey';

create table TEST_TABLE(ID integer, STR1 varchar(50));

set term ^;

create or alter procedure GEN_DATA (
    i integer)
as
begin
  while (i > 0) do
  begin
    insert into TEST_TABLE values (:i, '01234567890123456789012345678901234567890123456789');
    i = i - 1;
  end
end^

set term ;^

execute procedure GEN_DATA(5000000);
commit;
create index TEST_TABLE_IDX1 on TEST_TABLE (ID);
commit;

Close this connection.

  1. Execute statements in the first ISQL and leave it open:
connect '127.0.0.1:employee' user SYSDBA password 'masterkey';
select first 10 * from TEST_TABLE where ID > 0;
commit;
  1. Execute statements in the second ISQL, and it will hang on the CREATE TABLE statement:
connect '127.0.0.1:employee' user SYSDBA password 'masterkey';
create table T1 (ID integer);

Seems like the issue is related to the compiled statements cache and occurs when DsqlStatementCache::shrink() is called.
MaxStatementCacheSize = 0 solves the issue.
Also when I try these steps on the debug build with MaxStatementCacheSize = 32K, I get a violated fb_assert in DsqlStatementCache::purgeAllAttachments().

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions