On 28/05/2018 02:02, Dmitry Yemanov wrote: > >> For system tables, their IDs starts with 0, while user tables starts >> at 128. >> >> User procedures already starts with 0, so initially I'm creating system >> procedures with negative IDs. > > I suppose you assign IDs directly, without generator usage? So it > remains initialized with zero? > >> Anyone see a problem with that? > > I suspect some code pieces may treat IDs as USHORT. It's harmless per > se, but problems may arise after promoting those unsigned IDs to > ULONG. I'm not sure it happens, but it's worth checking. > That really happens. They start as SSHORT, are casted to USHORT and used as index in the procedures array cache.
Another option, as Firebird itself does not emit IDs (blr_pid*) in DDL, would be to just ignore backed up routine IDs and restore them after the system ones. What do you think about this? Adriano ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel