Subject Request depth exceeded problem
Author Josef KokeŇ°

I am having trouble with one installation of my application: Whenever I
try to create a table, I receive error 335544351 "unsuccessful metadata
update\nrequest depth exceeded. (Recursive definition?)". I cannot
figure what could possibly be causing this, as the CREATE TABLE
statement is extremely simple:

CREATE TABLE sometable (
table_id TID NOT NULL,
value1 INTEGER,
CONSTRAINT pk_sometable PRIMARY KEY (table_id)

(Note: The script is "anonymized", but right as I am writing this, I am
trying to create precisely this table, named "sometable"

If I remove the constraint, the table gets created OK, but of course, I
rather need the primary key. If I try to add it separately (ALTER TABLE
sometable ADD PRIMARY KEY (table_id))

I tried the following database-wide settings:

- Start/stop the server.
- Upgrade Firebird to version 2.5.3.
- Make sure the application is using a fbclient.dll (gds32.dll) from
version 2.5.3.
- Use SuperServer (fbserver.exe).
- Use a default firebird.conf.
- Run a backup/restore cycle.
- Compare that the database structure is the same as in a good
installation (where table creation works fine).
- Grab a structure from a good installation, copy all data from the
"bad" database to this correct structure, run a backup/restore cycle.

None of them helped. This one instance just won't create tables :-(

GSTAT says:

Database header page information:
Flags 0
Checksum 12345
Generation 1673822
Page size 8192
ODS version 11.2
Oldest transaction 169804
Oldest active 1672359
Oldest snapshot 1672279
Next transaction 1673795
Bumped transaction 1
Sequence number 0
Next attachment ID 136502
Implementation ID 16
Shadow count 0
Page buffers 0
Next header page 0
Database dialect 3
Creation date Nov 15, 2014 7:43:26

I find it strange that I have such a difference between Oldest
transaction, Oldest active and Next transaction, as I am convinced that
my application is closing transactions correctly, but perhaps that is
the result of the failed table-creation attempts.

Can anybody suggest a course that I could try? I am running out of
ideas. Thank you.