You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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;
The text was updated successfully, but these errors were encountered:
It isn't related to ISQL, it is core engine bug.
So the ticket title should be changed like
"trouble with double recreation table
with PK in the same transaction".
… raises when attempt to create table with PK and immediatelly drop this PK within the same transaction
This commit also fixesFirebirdSQL#5173 and FirebirdSQL#3886.
The situation when the record is not found in RDB$INDICES was not handled correctly in create_index DFW.
… raises when attempt to create table with PK and immediatelly drop this PK within the same transaction
This commit also fixesFirebirdSQL#5173 and FirebirdSQL#3886.
The situation when the record is not found in RDB$INDICES was not handled correctly in create_index DFW.
ilya071294
added a commit
to red-soft-ru/firebird
that referenced
this issue
Oct 20, 2021
… raises when attempt to create table with PK and immediatelly drop this PK within the same transaction
This commit also fixesFirebirdSQL#5173 and FirebirdSQL#3886.
The situation when the record is not found in RDB$INDICES was not handled correctly in create_index DFW.
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;
The text was updated successfully, but these errors were encountered: