On 11/09/2015 06:10, Jiří Činčura wrote: > Hi, > > can somebody explain this behavior? Tested on FB 2.5.4 and 2.5.3 x64 SC. > > CREATE TABLE T_TRANSLATION_META ( > F_TRM_ID BIGINT NOT NULL, > F_TRM_CODE VARCHAR(512) CHARACTER SET UTF8 NOT NULL COLLATE > UNICODE_CI > ); > CREATE TABLE T_COUNTRY ( > F_CNR_ID BIGINT NOT NULL, > F_TRM_NAME_ID BIGINT DEFAULT -1 NOT NULL, > CF_CNR_NAME COMPUTED BY (((select > F_TRM_CODE > from T_TRANSLATION_META > where F_TRM_ID = F_TRM_NAME_ID))) > ); > > Now this returns `null` (RDB$5 is CF_CNR_NAME). > select rdb$collation_id from rdb$fields where rdb$field_name = 'RDB$5' > > Now I later the above mentioned field to the same expression. > ALTER TABLE T_COUNTRY ALTER CF_CNR_NAME COMPUTED BY (((select > F_TRM_CODE > from T_TRANSLATION_META > where F_TRM_ID = F_TRM_NAME_ID))); > > But now the query for rdb$collation_id returns 3. What the hell?
Some bug fixed (intentionally or not) in v3. Adriano ------------------------------------------------------------------------------ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel