Skip to content

Firebird 6.0.0 complains about plan clause on restore which it uses later on #9085

Description

@tonne1

FB 6.0.0.2068 issues a warning on restore of a FB5 DB if it finds a plan clause in PSQL, although the engine (FB6) uses this plan later on:

gbak: WARNING:index "PUBLIC"."IDX_CONF" cannot be used in the specified plan

test case:

-- in a FB5 DB:

CREATE TABLE CONF (
  UID   INTEGER NOT NULL,
  PARAM VARCHAR(30) NOT NULL,
  VAL  VARCHAR(100) NOT NULL
);

CREATE INDEX IDX_CONF
ON CONF (UID);

create procedure use_plan
returns (
  result integer
)
as
begin
  select uid from conf where uid = 1
  PLAN (CONF INDEX (IDX_CONF))
  into :result;
  suspend;
end;

-- Backup, then restore with FB6. The above mentioned warning comes up. Then:

-- FB6 uses the plan
select uid from conf where uid = 1
PLAN (CONF INDEX (IDX_CONF))

-- even without the plan clause
select uid from conf where uid = 1

There is no problem with the plan, it is applicable and the engine uses it. Looks more like a glitch in the processing of plan clauses in SPs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions