Subject internal gds software consistency check (index key too big (174))
Author phil_hhn
Hi, I'm using Firebird 1.5.3.4870.
I had a column defined as:
UTEXT varchar(250) CHARACTER SET NONE COLLATE NONE

I need to convert it to a charset which handles accents (so chose
ISO8859_1, EN_UK) and it must be indexed. Because an index cannot be
applied to a column this size (with the new char set), I've reduced
the column to 80 chars. Here is my code:

update RDB$FIELDS set RDB$FIELD_LENGTH = 80, RDB$CHARACTER_LENGTH
= 80, RDB$CHARACTER_SET_ID = 21, RDB$COLLATION_ID = 12 where
RDB$FIELD_NAME = (select RDB$FIELD_SOURCE from RDB$RELATION_FIELDS
where RDB$RELATION_NAME='MYWORDS' AND RDB$FIELD_NAME='UTEXT')
update RDB$RELATION_FIELDS set RDB$COLLATION_ID = 12 where
(RDB$FIELD_NAME = 'UTEXT') and (RDB$RELATION_NAME = 'MYWORDS')
CREATE INDEX IWS_UTEXT ON MYWORDS (UTEXT)

This has worked without a problem on several different databases I
have (different clients & data, but all the same structure
[metadata]). But I've just got a database off another machine and
after running the above 3 statements, when I commit I get:
internal gds software consistency check (index key too big (174))

I thought maybe this error was occurring because there was data in the
UTEXT column (which once the charset changes it will not fit), but
this is not the case. Before running the above statements, there is no
data in the UTEXT column (i.e all null).

I've looked around and the only mention of this I could find was in
2003... looked to be a problem in 1.5RC3 - is it still an issue?
Have also done a backup & restore but the problem still occurs. The
only other thing I thought to check was the DB page size but they're
all the same.


Does anyone have any ideas?