Subject Re: [firebird-support] FB 2.1.0 Metadata upgrade (from FB 1.5)
Author Helen Borrie
At 11:18 PM 20/04/2008, you wrote:
>Hi,
>
>I am having problems with metadata upgrade script and I wonder if
>anyone else is having the same problem.
>
>To test the upgrade this is what I did:
>- Backup database on FB1.5 (metadata only)
>- Restore database on FB 2.1
>- Using isql I connected to the restored database and run upgrade
>script. select * from rdb$check_metadata returned error ... so I run
>select * from rdb$fix_metadata('WIN1250'); ... this finished OK.
>- When I tried to commit the work I got this error:
>
>SQL> COMMIT;
>Statement failed, SQLCODE = -151
>attempted update of read-only column
>SQL>

This one is quite likely unrelated to the other one. The script will try to commit the fixed source for your triggers and this one appears to fail because you have an AFTER trigger that tries to update something in the record being processed. Fb 2 and above explicitly make the NEW. and OLD. variables read-only in AFTER triggers. If you can't drop the offending trigger (which might be the Catch-22 case) then I think you'll need to start over and correct these triggers in Fb 1.5 before you launch into the upgrade process.


>...
>
>Also strange thing is that "select * from rdb$check_metadata" fails
>on a field that does not have description, but is COMPUTED BY field
>defined as:
>
>TABLE1_FIELD1 COMPUTED BY (i_customer||'ยง'||i_version)

Would you please post a tracker item for this? It looks possible that the charset_UNICODE character set may not be able to map some of these 8-bit ascii characters that were put there originally in character set NONE and are not represented in the conversion character set. After posting the tracker item, watch the firebird-devel list for Adriano's response.

./heLen