From 5df7d8f1979f7fa1092524cf6db45244e27f0b2d Mon Sep 17 00:00:00 2001
From: Dmitry Yemanov
Date: Thu, 8 Aug 2024 10:59:44 +0300
Subject: [PATCH] Introduce ODS 14 for v6 (#8208)
* Introduce ODS 14 for v6
* Builds/docs changes for ODS14
---
.../android/BuildFinalPackage.sh | 2 +-
builds/install/misc/firebird.conf | 2 +-
builds/win32/msvc15/engine.vcxproj | 8 +++---
doc/README.connection_strings | 2 +-
doc/README.plugins.html | 8 +++---
doc/README.providers.html | 6 ++---
doc/Using_OO_API.html | 2 +-
src/CMakeLists.txt | 4 +--
src/isql/isql.epp | 2 +-
src/jrd/constants.h | 2 +-
src/jrd/ods.h | 25 ++++++++++++-------
src/jrd/sys-packages/SqlPackage.cpp | 2 +-
src/jrd/version.h | 2 +-
13 files changed, 37 insertions(+), 30 deletions(-)
diff --git a/builds/install/arch-specific/android/BuildFinalPackage.sh b/builds/install/arch-specific/android/BuildFinalPackage.sh
index 758f52c550..b7611e905f 100755
--- a/builds/install/arch-specific/android/BuildFinalPackage.sh
+++ b/builds/install/arch-specific/android/BuildFinalPackage.sh
@@ -43,7 +43,7 @@ $ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName shell "rm -rf $AndroidDir
$ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName shell "mkdir $AndroidDir"
$ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName push gen/$InitialDebugTar $AndroidDir/
$ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName shell "(cd $AndroidDir && tar xvf $InitialDebugTar)"
-$ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName shell "(cd $AndroidDir/firebird && ./common_test --log_level=all && ./libEngine13_test --log_level=all)"
+$ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName shell "(cd $AndroidDir/firebird && ./common_test --log_level=all && ./libEngine14_test --log_level=all)"
$ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName shell "(cd $AndroidDir/firebird && ./AfterUntar.sh)"
$ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName pull $AndroidDir/firebird/firebird.msg gen/Release/firebird/
$ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName pull $AndroidDir/firebird/security6.fdb gen/Release/firebird/
diff --git a/builds/install/misc/firebird.conf b/builds/install/misc/firebird.conf
index fdda0290bf..dff4907c17 100644
--- a/builds/install/misc/firebird.conf
+++ b/builds/install/misc/firebird.conf
@@ -530,7 +530,7 @@
#
# Per-database & per-connection configurable.
#
-#Providers = Remote,Engine13,Loopback
+#Providers = Remote,Engine14,Loopback
# ----------------------------
diff --git a/builds/win32/msvc15/engine.vcxproj b/builds/win32/msvc15/engine.vcxproj
index 380322d04d..dac34ca809 100644
--- a/builds/win32/msvc15/engine.vcxproj
+++ b/builds/win32/msvc15/engine.vcxproj
@@ -151,10 +151,10 @@
AllRules.ruleset
- engine13
- engine13
- engine13
- engine13
+ engine14
+ engine14
+ engine14
+ engine14
..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\plugins\
..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\plugins\
..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\plugins\
diff --git a/doc/README.connection_strings b/doc/README.connection_strings
index 39fe8b538a..6bc1d1f3fc 100644
--- a/doc/README.connection_strings
+++ b/doc/README.connection_strings
@@ -127,7 +127,7 @@ or TCP localhost loopback.
On the server side, default provider configuration is:
- Providers = Remote, Engine13, Loopback
+ Providers = Remote, Engine14, Loopback
It means that if the remote provider fails to match the connection string (because of missing
protocol / host parts), then the embedded engine handles the hostless connection. If you need
diff --git a/doc/README.plugins.html b/doc/README.plugins.html
index f73170510c..5c704ea636 100644
--- a/doc/README.plugins.html
+++ b/doc/README.plugins.html
@@ -135,7 +135,7 @@ Win_Sspi, Legacy_Auth
UserManager = Srp
TracePlugin = fbtrace
Providers =
-Remote,Engine13,Loopback
+Remote,Engine14,Loopback
WireCryptPlugin = Arc4
This provides normal
operation in server, client and embedded cases. If you want to add
@@ -158,10 +158,10 @@ default equals to plugin implementation's name (and it's factory name
which is actually used in firebird.conf). Certainly in typical case,
module contains one plugin, and that plugin works with only one
configuration, and all 3 names are equal, and no more configuration
-is needed – for example libEngine13.so or Engine13.dll contains
-implementation of provider Engine13, and nothing else except record
+is needed – for example libEngine14.so or Engine14.dll contains
+implementation of provider Engine14, and nothing else except record
-Providers = Engine13
+Providers = Engine14
in firebird.conf is needed
to load it. But if you have something complex – configuration file
plugins.conf will help you to have such plugin factories which you
diff --git a/doc/README.providers.html b/doc/README.providers.html
index f513c7797a..cef8f0abd6 100644
--- a/doc/README.providers.html
+++ b/doc/README.providers.html
@@ -47,7 +47,7 @@ attach stage.
Next
samples are with default configuration, which contains 3 providers:
-Remote (establish network connection), Engine13 (main
+Remote (establish network connection), Engine14 (main
database engine) and Loopback (force network connection to
local server for database name without explicitly given network
protocol).
@@ -59,7 +59,7 @@ provider in the list) at once redirects such call to RemoteHost.
That's how typical client configuration works.
When
database name does not contain network protocol (just dbname)
-Remote provider rejects it and Engine13 provider comes
+Remote provider rejects it and Engine14 provider comes
to stage. It tries to open dbname – and in case of
success we get embedded connection to the database. Pay attention –
we do not need special embedded library to have embedded connection,
@@ -74,7 +74,7 @@ to open database file. This is normal case if database was not
created by that user in embedded mode or if he was not explicitly
given OS rights for embedded access to databases on given box.
Moreover, setting access rights in such a manner is a requirement for
-correct superserver operation. So after failure of Engine13 to
+correct superserver operation. So after failure of Engine14 to
access database Loopback provider is attempted for an attach.
It does not differ much from Remote, but tries to access
database dbname on a server running on local host. On windows
diff --git a/doc/Using_OO_API.html b/doc/Using_OO_API.html
index ee7c3e1710..d3db125f2f 100644
--- a/doc/Using_OO_API.html
+++ b/doc/Using_OO_API.html
@@ -2121,7 +2121,7 @@ codes:
DIR_GUARD
– where guardian lock is stored (fb_guard)
DIR_PLUGINS
-– plugins directory ([lib]Engine13.{dll|so})
+– plugins directory ([lib]Engine14.{dll|so})
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3b96d7d528..a1751782bd 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -494,7 +494,7 @@ add_library (boot_engine SHARED ${engine_generated_src_boot} ${V
target_link_libraries (boot_engine engine_common boot_alice boot_burp common boot_yvalve)
set_output_directory (boot_engine plugins CURRENT_DIR)
set_exported_symbols (boot_engine fbplugin)
-copy_and_rename_lib (boot_engine Engine13)
+copy_and_rename_lib (boot_engine Engine14)
project_group (boot_engine Boot)
endif() # if (NOT CMAKE_CROSSCOMPILING)
@@ -506,7 +506,7 @@ endif() # if (NOT CMAKE_CROSSCOMPILING)
add_library (engine SHARED ${engine_generated_src_master} ${VERSION_RC})
target_link_libraries (engine engine_common alice burp common yvalve)
-set_target_properties (engine PROPERTIES OUTPUT_NAME Engine13)
+set_target_properties (engine PROPERTIES OUTPUT_NAME Engine14)
set_output_directory (engine plugins)
set_exported_symbols (engine fbplugin)
diff --git a/src/isql/isql.epp b/src/isql/isql.epp
index 108ed3fecd..1681414f6a 100644
--- a/src/isql/isql.epp
+++ b/src/isql/isql.epp
@@ -4034,7 +4034,7 @@ static void check_autoterm()
}
if (!(protocolVersion == 0 || protocolVersion >= 19) && // PROTOCOL_VERSION19
- ENCODE_ODS(isqlGlob.major_ods, isqlGlob.minor_ods) >= ODS_13_2)
+ isqlGlob.major_ods >= ODS_VERSION14)
{
setValues.AutoTerm = false;
diff --git a/src/jrd/constants.h b/src/jrd/constants.h
index cc27a6da76..ce322ee78d 100644
--- a/src/jrd/constants.h
+++ b/src/jrd/constants.h
@@ -464,7 +464,7 @@ const TraNumber MAX_TRA_NUMBER = 0x0000FFFFFFFFFFFF; // ~2.8 * 10^14
const unsigned OPT_STATIC_ITEMS = 16;
const unsigned OPT_STATIC_STREAMS = 64;
-#define CURRENT_ENGINE "Engine13"
+#define CURRENT_ENGINE "Engine14"
#define EMBEDDED_PROVIDERS "Providers=" CURRENT_ENGINE
// Features set for current version of engine provider
diff --git a/src/jrd/ods.h b/src/jrd/ods.h
index 957e000e73..4b065cb53d 100644
--- a/src/jrd/ods.h
+++ b/src/jrd/ods.h
@@ -54,8 +54,10 @@
** ODS 10 was shipped with IB version 6.0
** Here the Firebird history begins:
** ODS 10.0 is for FB1.0 and ODS 10.1 is for FB1.5.
-** ODS 11.0 is for FB2.0, ODS11.1 is for FB2.1 and ODS11.2 is for FB2.5.
-** ODS 12.0 is for FB3, ODS 13.0 is for FB4.
+** ODS 11.0 is for FB2.0, ODS 11.1 is for FB2.1 and ODS 11.2 is for FB2.5.
+** ODS 12.0 is for FB3.
+** ODS 13.0 is for FB4, ODS 13.1 is for FB5.
+** ODS 14.0 is for FB6.
**
***********************************************************************/
@@ -70,6 +72,7 @@ const USHORT ODS_VERSION10 = 10; // V6.0 features. SQL delimited idetifier,
const USHORT ODS_VERSION11 = 11; // Firebird 2.x features
const USHORT ODS_VERSION12 = 12; // Firebird 3.x features
const USHORT ODS_VERSION13 = 13; // Firebird 4.x features
+const USHORT ODS_VERSION14 = 14; // Firebird 6.x features
// ODS minor version -- minor versions ARE compatible, but may be
// increasingly functional. Add new minor versions, but leave previous
@@ -124,8 +127,12 @@ const USHORT ODS_CURRENT12 = 0;
const USHORT ODS_CURRENT13_0 = 0; // Firebird 4.0 features
const USHORT ODS_CURRENT13_1 = 1; // Firebird 5.0 features
-const USHORT ODS_CURRENT13_2 = 2; // Firebird 6.0 features
-const USHORT ODS_CURRENT13 = 2;
+const USHORT ODS_CURRENT13 = 1;
+
+// Minor versions for ODS 14
+
+const USHORT ODS_CURRENT14_0 = 0; // Firebird 6.0 features
+const USHORT ODS_CURRENT14 = 0;
// useful ODS macros. These are currently used to flag the version of the
// system triggers and system indices in ini.e
@@ -147,7 +154,7 @@ const USHORT ODS_11_2 = ENCODE_ODS(ODS_VERSION11, 2);
const USHORT ODS_12_0 = ENCODE_ODS(ODS_VERSION12, 0);
const USHORT ODS_13_0 = ENCODE_ODS(ODS_VERSION13, 0);
const USHORT ODS_13_1 = ENCODE_ODS(ODS_VERSION13, 1);
-const USHORT ODS_13_2 = ENCODE_ODS(ODS_VERSION13, 2);
+const USHORT ODS_14_0 = ENCODE_ODS(ODS_VERSION14, 0);
const USHORT ODS_FIREBIRD_FLAG = 0x8000;
@@ -166,16 +173,16 @@ inline USHORT DECODE_ODS_MINOR(USHORT ods_version)
// Set current ODS major and minor version
-const USHORT ODS_VERSION = ODS_VERSION13; // Current ODS major version -- always
+const USHORT ODS_VERSION = ODS_VERSION14; // Current ODS major version -- always
// the highest.
-const USHORT ODS_RELEASED = ODS_CURRENT13_0; // The lowest stable minor version
+const USHORT ODS_RELEASED = ODS_CURRENT14_0; // The lowest stable minor version
// number for this ODS_VERSION!
-const USHORT ODS_CURRENT = ODS_CURRENT13; // The highest defined minor version
+const USHORT ODS_CURRENT = ODS_CURRENT14; // The highest defined minor version
// number for this ODS_VERSION!
-const USHORT ODS_CURRENT_VERSION = ODS_13_2; // Current ODS version in use which includes
+const USHORT ODS_CURRENT_VERSION = ODS_14_0; // Current ODS version in use which includes
// both major and minor ODS versions!
diff --git a/src/jrd/sys-packages/SqlPackage.cpp b/src/jrd/sys-packages/SqlPackage.cpp
index 3c5bf0e33c..28ebf5268f 100644
--- a/src/jrd/sys-packages/SqlPackage.cpp
+++ b/src/jrd/sys-packages/SqlPackage.cpp
@@ -165,7 +165,7 @@ SqlPackage::SqlPackage(MemoryPool& pool)
: SystemPackage(
pool,
"RDB$SQL",
- ODS_13_2,
+ ODS_14_0,
// procedures
{
SystemProcedure(
diff --git a/src/jrd/version.h b/src/jrd/version.h
index 86c7276968..094ffef206 100644
--- a/src/jrd/version.h
+++ b/src/jrd/version.h
@@ -30,7 +30,7 @@
#ifdef RC_TARGET_chacha
#define VER_FILEDESC "Wire Encryption plugin using ChaCha cypher"
-#elif RC_TARGET_engine13
+#elif RC_TARGET_engine14
#define VER_FILEDESC "Engine plugin"
#elif defined RC_TARGET_fb_lock_print