From 4bfbab57f7a2505620042f43f324c7829eb46d2f Mon Sep 17 00:00:00 2001 From: Adriano dos Santos Fernandes <529415+asfernandes@users.noreply.github.com> Date: Tue, 20 Aug 2024 07:03:18 -0300 Subject: [PATCH] Fix #8219 - Database creation in 3.0.12, 4.0.5 and 5.0.1 slower than in previous releases. (#8220) --- src/jrd/dfw.epp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/jrd/dfw.epp b/src/jrd/dfw.epp index 4145dd7827..69c24c02d9 100644 --- a/src/jrd/dfw.epp +++ b/src/jrd/dfw.epp @@ -4121,7 +4121,9 @@ static bool create_collation(thread_db* tdbb, SSHORT phase, DeferredWork* work, case 1: setupSpecificCollationAttributes(tdbb, transaction, TTYPE_TO_CHARSET(work->dfw_id), work->dfw_name.c_str(), false); - if (!INTL_defined_type(tdbb, work->dfw_id)) + + if (!(transaction->tra_flags & TRA_system) && // avoid run during database creation + !INTL_defined_type(tdbb, work->dfw_id)) { setupSpecificCollationAttributes(tdbb, transaction, TTYPE_TO_CHARSET(work->dfw_id), work->dfw_name.c_str(), true);