Previously allocateCatalogItemId was called per entry, but since generation does not INSERT, MAX(id) never advanced and every entry got the same id. Now MAX(id) is read once and a local counter hands out sequential ids.
Previously allocateCatalogItemId was called per entry, but since generation does not INSERT, MAX(id) never advanced and every entry got the same id. Now MAX(id) is read once and a local counter hands out sequential ids.