summaryrefslogtreecommitdiff
path: root/external/firebird
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-09-01 17:08:10 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-09-02 08:39:54 +0200
commita5bb0e66492118b79da5fef31f8d2bd686947354 (patch)
tree72fadb7e57dbb27b843dcd03ba4293b5bbfc7e02 /external/firebird
parent7ded01efaec8171a204a255395767432bab881b5 (diff)
tdf#144172: patch FB to use per-process LOCK directories
As discussed at https://github.com/FirebirdSQL/firebird/pull/6937: > > But as well, we may just use process id instead of session id in > > the ConfigStorage::ConfigStorage creating filename. That would be > > even better, fitting better into our per-process temp dir policy. > I tend to agree with you here. It looks safe assuming LO uses > SuperServer only. Let's not replace the session id with process id, but instead append process id after session id, to avoid (unlikely?) accidental overlap of process id and session id, which would produce the same name as already used by, say, isql tool. Change-Id: Ibce8a8c75d405aae3e8949e7daf2476accdff22b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121457 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'external/firebird')
-rw-r--r--external/firebird/UnpackedTarball_firebird.mk1
-rw-r--r--external/firebird/wnt-per-process-trace-storage.patch.118
2 files changed, 19 insertions, 0 deletions
diff --git a/external/firebird/UnpackedTarball_firebird.mk b/external/firebird/UnpackedTarball_firebird.mk
index 37234a0a573c..64052570fb2b 100644
--- a/external/firebird/UnpackedTarball_firebird.mk
+++ b/external/firebird/UnpackedTarball_firebird.mk
@@ -44,6 +44,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,firebird,\
external/firebird/0001-Fix-checks-for-null-HANDLE-in-Windows-only-code.patch.1 \
external/firebird/0001-extern-cloop-Missing-dependency-of-BIN_DIR-cloop-on-.patch.1 \
external/firebird/msvc.patch \
+ external/firebird/wnt-per-process-trace-storage.patch.1 \
))
ifeq ($(OS),WNT)
diff --git a/external/firebird/wnt-per-process-trace-storage.patch.1 b/external/firebird/wnt-per-process-trace-storage.patch.1
new file mode 100644
index 000000000000..46af6c5e5c5c
--- /dev/null
+++ b/external/firebird/wnt-per-process-trace-storage.patch.1
@@ -0,0 +1,18 @@
+diff --git a/src/jrd/trace/TraceConfigStorage.cpp b/src/jrd/trace/TraceConfigStorage.cpp
+index 05fce3211ae7..d267713e85de 100644
+--- a/src/jrd/trace/TraceConfigStorage.cpp
++++ b/src/jrd/trace/TraceConfigStorage.cpp
+@@ -103,11 +103,11 @@ ConfigStorage::ConfigStorage()
+ pfnProcessIdToSessionId(GetCurrentProcessId(), &sesID) == 0 ||
+ sesID == 0)
+ {
+- filename.printf(TRACE_FILE); // TODO: it must be per engine instance
++ filename.printf("%s.0.%u", TRACE_FILE, GetCurrentProcessId()); // TODO: it must be per engine instance
+ }
+ else
+ {
+- filename.printf("%s.%u", TRACE_FILE, sesID);
++ filename.printf("%s.%u.%u", TRACE_FILE, sesID, GetCurrentProcessId());
+ }
+ #else
+ filename.printf(TRACE_FILE); // TODO: it must be per engine instance