Subject Re: [firebird-support] why does it fail?
Author Michael Ludwig
ebenestante@... schrieb am 25.11.2011 um 08:21 (-0300):
> Hi, using FB 2.5.1 on Debian stable (FB is from unstable, tried also
> with FB 2.5.0 from stable with the same results).

> In a newly created database, using isql connected as SYSDBA:
>
> SQL> create table WholeLottaRecords (
> CON> id bigint not null primary key,
> CON> description varchar(32)
> CON> );
> Statement failed, SQLSTATE = 42000
> unsuccessful metadata update
> -cannot create index RDB$PRIMARY27

Works fine on Windows.

A problem with your Linux? :)

More to the point, try this search:

https://www.google.com?q=%22Statement+failed%2C+SQLSTATE+%3D+42000%22+%22unsuccessful+metadata+update%22+%22cannot+create+index%22

Which will lead you to a bug:

http://tracker.firebirdsql.org/browse/CORE-3529

That might be it, no? I could reproduce those errors:

SQL> show tables;
WHOLELOTTARECORDS
SQL> set autoddl off;
SQL> recreate table t1 (id bigint not null primary key, dd varchar(32) );
SQL> -- forgot to commit
SQL> recreate table t1 (id bigint not null primary key, dd varchar(32) );
SQL> commit;
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-too few key columns found for index RDB$PRIMARY14 (incorrect column name?)
SQL> show tables;
WHOLELOTTARECORDS
SQL> recreate table t2 (id bigint not null primary key, dd varchar(32) );
SQL> -- forgot to commit again
SQL> recreate table t2 (id bigint not null primary key, dd varchar(32) );
SQL> commit;
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-too few key columns found for index RDB$PRIMARY14 (incorrect column name?)
SQL> recreate table t2 (id bigint not null primary key, dd varchar(32) );
SQL> commit;
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-too few key columns found for index RDB$PRIMARY14 (incorrect column name?)
SQL> recreate table t3 (id bigint not null primary key, dd varchar(32) );
SQL> commit;
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-too few key columns found for index RDB$PRIMARY14 (incorrect column name?)
SQL> show tables;
WHOLELOTTARECORDS
SQL> set autoddl on;
SQL> recreate table t3 (id bigint not null primary key, dd varchar(32) );
Statement failed, SQLSTATE = 40001
deadlock
SQL> show tables;
WHOLELOTTARECORDS
SQL> recreate table t4 (id bigint not null primary key, dd varchar(32) );
Statement failed, SQLSTATE = 40001
deadlock
SQL> show tables;
WHOLELOTTARECORDS

--
Michael Ludwig