key size too big for index

Hello everybody!!


I was trying to define the index for  my table PRODUCTS using theese fields:

COMPANY_CODE VARCHAR (2)
REF_NUMBER VARCHAR (256)

COMPANY_CODE VARCHAR (2)

and i can’t because this error


SEVERE 27/07/11 15:36:liquibase: Error executing SQL ALTER TABLE PRODUCTS ADD CONSTRAINT PRODUCTS_PK PRIMARY KEY (COMPANY_CODE, REF_NUMBER)
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544351. unsuccessful metadata update

My database has utf8 charset and has a page size of 16384

According to theese index calculator:

http://www.volny.cz/iprenosil/interbase/ip_ib_indexcalculator.htm

i could create this index:

Number of columns 2
Total key size     1292
Remains     2800

¿Why can’t i do it?


Regards