Skip to content

recreate table T with PK or UK is impossible after duplicate typing w/o commit when ISQL is launched in AUTODDL=OFF mode [CORE3529] #3886

@firebird-automations

Description

@firebird-automations

Submitted by: @pavel-zotov

The following scenario will brings up some strange state of metadata: table T would not be able neither to recreate again nor to be dropped.

C:\FIREBIRD\Data>isql -n
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database 'test5.fdb' pagesize 4096; commit;
SQL> connect test5.fdb user sysdba password masterkey;
Database: test5.fdb, User: sysdba
SQL> recreate table t(id int primary key); -- accidentally forgot to place COMMIT here and recall prev. command
SQL> recreate table t(id int primary key); commit; -- accidentally forgot to delete previous 'recreate' command
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-too few key columns found for index RDB$PRIMARY1 (incorrect column name?)
SQL> commit; -- since that point the problem persists until b/r will be done
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-too few key columns found for index RDB$PRIMARY1 (incorrect column name?)
SQL> exit;
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-too few key columns found for index RDB$PRIMARY1 (incorrect column name?)

C:\FIREBIRD\Data>isql TEST5.FDB -- now launch ISQL *without* switch '-N' but the problem remains
Database: TEST5.FDB
SQL> commit; recreate table t(id int primary key); commit;
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-cannot create index RDB$PRIMARY3
SQL> exit;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions