From 66568b12d5b027889d66c0c527f907c76b6339cc Mon Sep 17 00:00:00 2001
From: AlexPeshkoff
Date: Wed, 22 Dec 2021 19:55:24 +0300
Subject: [PATCH 001/187] Fixed #7080: Executing batch crashes server
(cherry picked from commit 7776f552c2988dec6d2d8b3e8bad131206f91eff)
---
src/remote/client/interface.cpp | 5 +++++
src/remote/protocol.cpp | 2 ++
2 files changed, 7 insertions(+)
diff --git a/src/remote/client/interface.cpp b/src/remote/client/interface.cpp
index dca515ecf5..1343aeadc4 100644
--- a/src/remote/client/interface.cpp
+++ b/src/remote/client/interface.cpp
@@ -8612,6 +8612,11 @@ static void receive_packet_noqueue(rem_port* port, PACKET* packet)
bCheckResponse = true;
break;
+ case op_batch_create:
+ stmt_id = p->packet.p_batch_create.p_batch_statement;
+ bCheckResponse = true;
+ break;
+
case op_free_statement:
stmt_id = p->packet.p_sqlfree.p_sqlfree_statement;
bFreeStmt = (p->packet.p_sqlfree.p_sqlfree_option == DSQL_drop);
diff --git a/src/remote/protocol.cpp b/src/remote/protocol.cpp
index 890472c45e..926091c4d0 100644
--- a/src/remote/protocol.cpp
+++ b/src/remote/protocol.cpp
@@ -888,6 +888,8 @@ bool_t xdr_protocol(RemoteXdr* xdrs, PACKET* p)
ULONG count = b->p_batch_messages;
ULONG size = statement->rsr_batch_size;
+ if (!size)
+ statement->rsr_batch_size = size = FB_ALIGN(statement->rsr_format->fmt_length, FB_ALIGNMENT);
if (xdrs->x_op == XDR_DECODE)
{
b->p_batch_data.cstr_length = (count ? count : 1) * size;
From 2920891287dc2af781981bf1a011ff010628c6bb Mon Sep 17 00:00:00 2001
From: Adriano dos Santos Fernandes
Date: Wed, 22 Dec 2021 15:18:46 -0300
Subject: [PATCH 002/187] Fixed #7084 - Creating unique constraints on MacOS
fails on larger tables.
configure.ac macros were not compiling and returning 1.
That caused FB_ALIGNMENT and FB_DOUBLE_ALIGN to have the wrong value 1.
---
configure.ac | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index beebfbb57d..0dcb0ca19a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1049,7 +1049,7 @@ AC_MSG_CHECKING(for working sem_init())
AC_RUN_IFELSE([AC_LANG_SOURCE([[#include
main () {
sem_t s;
- exit(sem_init(&s,0,0));
+ return sem_init(&s,0,0);
}
]])],[AC_DEFINE(WORKING_SEM_INIT,1,[Define this if sem_init() works on the platform])
AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
@@ -1089,7 +1089,7 @@ if test "$ac_cv_sys_file_offset_bits" = "no"; then
AC_MSG_CHECKING(for native large file support)
AC_RUN_IFELSE([AC_LANG_SOURCE([[#include
main () {
- exit(!(sizeof(off_t) == 8));
+ return !(sizeof(off_t) == 8);
}]])],[ac_cv_sys_file_offset_bits=64; AC_DEFINE(_FILE_OFFSET_BITS,64)
AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)],[])
fi
@@ -1140,7 +1140,7 @@ main () {
char a;
union { long long x; sem_t y; } b;
};
- exit((int)&((struct s*)0)->b);
+ return (int)&((struct s*)0)->b;
}]])],[ac_cv_c_alignment=$ac_status],[ac_cv_c_alignment=$ac_status],[])
AC_MSG_RESULT($ac_cv_c_alignment)
AC_DEFINE_UNQUOTED(FB_ALIGNMENT, $ac_cv_c_alignment, [Alignment of long])
@@ -1151,7 +1151,7 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[main () {
char a;
double b;
};
- exit((int)&((struct s*)0)->b);
+ return (int)&((struct s*)0)->b;
}]])],[ac_cv_c_double_align=$ac_status],[ac_cv_c_double_align=$ac_status],[])
AC_MSG_RESULT($ac_cv_c_double_align)
AC_DEFINE_UNQUOTED(FB_DOUBLE_ALIGN, $ac_cv_c_double_align, [Alignment of double])
@@ -1168,7 +1168,7 @@ static int abs64Compare(SINT64 n1, SINT64 n2) {
return n1 == n2 ? 0 : n1 < n2 ? 1 : -1;
}
int main() {
- exit (abs64Compare(-9223372036854775808, 3652058) == 1 ? 0 : 1);
+ return abs64Compare(-9223372036854775808, 3652058) == 1 ? 0 : 1;
}]])],[ac_cv_compare_failed=0
ac_cv_compare_result=success])
CFLAGS="$savedflags"
From f9fbd80ec6d33efe72e8f1d2088652ae0c90d00f Mon Sep 17 00:00:00 2001
From: firebirds <>
Date: Thu, 23 Dec 2021 00:05:22 +0000
Subject: [PATCH 003/187] increment build number
---
src/jrd/build_no.h | 12 ++++++------
src/misc/writeBuildNum.sh | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/jrd/build_no.h b/src/jrd/build_no.h
index d112aef6b2..7faf924a13 100644
--- a/src/jrd/build_no.h
+++ b/src/jrd/build_no.h
@@ -3,16 +3,16 @@
*** DO NOT EDIT ***
TO CHANGE ANY INFORMATION IN HERE PLEASE
EDIT src/misc/writeBuildNum.sh
- FORMAL BUILD NUMBER:351
+ FORMAL BUILD NUMBER:353
*/
-#define PRODUCT_VER_STRING "5.0.0.351"
-#define FILE_VER_STRING "WI-T5.0.0.351"
-#define LICENSE_VER_STRING "WI-T5.0.0.351"
-#define FILE_VER_NUMBER 5, 0, 0, 351
+#define PRODUCT_VER_STRING "5.0.0.353"
+#define FILE_VER_STRING "WI-T5.0.0.353"
+#define LICENSE_VER_STRING "WI-T5.0.0.353"
+#define FILE_VER_NUMBER 5, 0, 0, 353
#define FB_MAJOR_VER "5"
#define FB_MINOR_VER "0"
#define FB_REV_NO "0"
-#define FB_BUILD_NO "351"
+#define FB_BUILD_NO "353"
#define FB_BUILD_TYPE "T"
#define FB_BUILD_SUFFIX "Firebird 5.0 Initial"
diff --git a/src/misc/writeBuildNum.sh b/src/misc/writeBuildNum.sh
index 0070254189..8411aedb07 100755
--- a/src/misc/writeBuildNum.sh
+++ b/src/misc/writeBuildNum.sh
@@ -9,7 +9,7 @@ BuildType=T
MajorVer=5
MinorVer=0
RevNo=0
-BuildNum=351
+BuildNum=353
NowAt=`pwd`
cd `dirname $0`
From 02c30525ca03dbb30edffb55af5db61395440dda Mon Sep 17 00:00:00 2001
From: Dmitry Yemanov
Date: Fri, 24 Dec 2021 09:37:44 +0300
Subject: [PATCH 004/187] Cleanup the remainders of the BLR-backed savepoint
operations.
---
src/dsql/dsql.cpp | 3 +-
src/dsql/gen.cpp | 79 ++++++++++++++++++++---------------------------
2 files changed, 35 insertions(+), 47 deletions(-)
diff --git a/src/dsql/dsql.cpp b/src/dsql/dsql.cpp
index 9902782246..682e08d84b 100644
--- a/src/dsql/dsql.cpp
+++ b/src/dsql/dsql.cpp
@@ -697,8 +697,7 @@ void DsqlDmlRequest::dsqlPass(thread_db* tdbb, DsqlCompilerScratch* scratch, boo
bool DsqlDmlRequest::needRestarts()
{
- return (req_transaction && (req_transaction->tra_flags & TRA_read_consistency) &&
- statement->getType() != DsqlCompiledStatement::TYPE_SAVEPOINT);
+ return (req_transaction && (req_transaction->tra_flags & TRA_read_consistency));
};
// Execute a dynamic SQL statement
diff --git a/src/dsql/gen.cpp b/src/dsql/gen.cpp
index 627a2c0edd..e0dc3944a9 100644
--- a/src/dsql/gen.cpp
+++ b/src/dsql/gen.cpp
@@ -239,60 +239,49 @@ void GEN_request(DsqlCompilerScratch* scratch, DmlNode* node)
else
scratch->appendUChar(blr_version5);
- if (statement->getType() == DsqlCompiledStatement::TYPE_SAVEPOINT)
+ const bool block = statement->getType() == DsqlCompiledStatement::TYPE_EXEC_BLOCK ||
+ statement->getType() == DsqlCompiledStatement::TYPE_SELECT_BLOCK;
+
+ // To parse sub-routines messages, they must not have that begin...end pair.
+ // And since it appears to be unnecessary for execute block too, do not generate them.
+ if (!block)
+ scratch->appendUChar(blr_begin);
+
+ GEN_hidden_variables(scratch);
+
+ switch (statement->getType())
{
- // Do not generate BEGIN..END block around savepoint statement
- // to avoid breaking of savepoint logic
- statement->setSendMsg(NULL);
- statement->setReceiveMsg(NULL);
+ case DsqlCompiledStatement::TYPE_SELECT:
+ case DsqlCompiledStatement::TYPE_SELECT_UPD:
+ case DsqlCompiledStatement::TYPE_EXEC_BLOCK:
+ case DsqlCompiledStatement::TYPE_SELECT_BLOCK:
node->genBlr(scratch);
- }
- else
- {
- const bool block = statement->getType() == DsqlCompiledStatement::TYPE_EXEC_BLOCK ||
- statement->getType() == DsqlCompiledStatement::TYPE_SELECT_BLOCK;
+ break;
- // To parse sub-routines messages, they must not have that begin...end pair.
- // And since it appears to be unnecessary for execute block too, do not generate them.
- if (!block)
- scratch->appendUChar(blr_begin);
-
- GEN_hidden_variables(scratch);
-
- switch (statement->getType())
+ ///case DsqlCompiledStatement::TYPE_RETURNING_CURSOR:
+ default:
{
- case DsqlCompiledStatement::TYPE_SELECT:
- case DsqlCompiledStatement::TYPE_SELECT_UPD:
- case DsqlCompiledStatement::TYPE_EXEC_BLOCK:
- case DsqlCompiledStatement::TYPE_SELECT_BLOCK:
- node->genBlr(scratch);
- break;
-
- ///case DsqlCompiledStatement::TYPE_RETURNING_CURSOR:
- default:
+ dsql_msg* message = statement->getSendMsg();
+ if (!message->msg_parameter)
+ statement->setSendMsg(NULL);
+ else
{
- dsql_msg* message = statement->getSendMsg();
- if (!message->msg_parameter)
- statement->setSendMsg(NULL);
- else
- {
- GEN_port(scratch, message);
- scratch->appendUChar(blr_receive_batch);
- scratch->appendUChar(message->msg_number);
- }
- message = statement->getReceiveMsg();
- if (!message->msg_parameter)
- statement->setReceiveMsg(NULL);
- else
- GEN_port(scratch, message);
- node->genBlr(scratch);
+ GEN_port(scratch, message);
+ scratch->appendUChar(blr_receive_batch);
+ scratch->appendUChar(message->msg_number);
}
+ message = statement->getReceiveMsg();
+ if (!message->msg_parameter)
+ statement->setReceiveMsg(NULL);
+ else
+ GEN_port(scratch, message);
+ node->genBlr(scratch);
}
-
- if (!block)
- scratch->appendUChar(blr_end);
}
+ if (!block)
+ scratch->appendUChar(blr_end);
+
scratch->appendUChar(blr_eoc);
}
From 850e21a34ce34b1bc20c9c23bceff0f8070adc39 Mon Sep 17 00:00:00 2001
From: Adriano dos Santos Fernandes
Date: Fri, 24 Dec 2021 11:29:37 -0300
Subject: [PATCH 005/187] Fix warnings.
---
examples/udr/Triggers.cpp | 2 --
src/dsql/metd.epp | 7 -------
src/jrd/vio.cpp | 9 +++------
3 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/examples/udr/Triggers.cpp b/examples/udr/Triggers.cpp
index 4e9bcca834..f397b9a373 100644
--- a/examples/udr/Triggers.cpp
+++ b/examples/udr/Triggers.cpp
@@ -234,8 +234,6 @@ FB_UDR_BEGIN_TRIGGER(replicate_persons)
"select data_source from replicate_config where name = ?",
SQL_DIALECT_CURRENT, NULL), status, statusVector);
- const char* table = metadata->getTriggerTable(status);
-
// Skip the first exclamation point, separating the module name and entry point.
const char* info = strchr(metadata->getEntryPoint(status), '!');
diff --git a/src/dsql/metd.epp b/src/dsql/metd.epp
index 9eb1ea8528..bfb47f644e 100644
--- a/src/dsql/metd.epp
+++ b/src/dsql/metd.epp
@@ -63,13 +63,6 @@ using namespace Firebird;
DATABASE DB = STATIC "yachts.lnk";
-static const UCHAR blr_bpb[] =
-{
- isc_bpb_version1,
- isc_bpb_source_type, 1, isc_blob_blr,
- isc_bpb_target_type, 1, isc_blob_blr
-};
-
static void convert_dtype(TypeClause*, SSHORT);
static void free_relation(dsql_rel*);
diff --git a/src/jrd/vio.cpp b/src/jrd/vio.cpp
index 8af88effdc..07aaa3fb7a 100644
--- a/src/jrd/vio.cpp
+++ b/src/jrd/vio.cpp
@@ -238,7 +238,6 @@ inline void check_gbak_cheating_insupd(thread_db* tdbb, const jrd_rel* relation,
inline void check_gbak_cheating_delete(thread_db* tdbb, const jrd_rel* relation)
{
const Attachment* const attachment = tdbb->getAttachment();
- const jrd_tra* const transaction = tdbb->getTransaction();
if (relation->isSystem() && attachment->isGbak())
{
@@ -2527,8 +2526,6 @@ bool VIO_get_current(thread_db* tdbb,
**************************************/
SET_TDBB(tdbb);
- Attachment* const attachment = tdbb->getAttachment();
-
#ifdef VIO_DEBUG
jrd_rel* relation = rpb->rpb_relation;
VIO_trace(DEBUG_TRACE,
@@ -5195,12 +5192,12 @@ static void list_staying_fast(thread_db* tdbb, record_param* rpb, RecordStack& s
}
}
- const TraNumber oldest_active = tdbb->getTransaction()->tra_oldest_active;
+ ///const TraNumber oldest_active = tdbb->getTransaction()->tra_oldest_active;
while (temp.rpb_b_page)
{
- ULONG page = temp.rpb_page = temp.rpb_b_page;
- USHORT line = temp.rpb_line = temp.rpb_b_line;
+ ///ULONG page = temp.rpb_page = temp.rpb_b_page;
+ ///USHORT line = temp.rpb_line = temp.rpb_b_line;
temp.rpb_record = NULL;
if (temp.rpb_flags & rpb_delta)
From 68a7e885722f5684154db978ab8e9a54888e08fb Mon Sep 17 00:00:00 2001
From: Dmitry Yemanov
Date: Fri, 24 Dec 2021 17:42:04 +0300
Subject: [PATCH 006/187] Raise protocol version
---
src/remote/inet.cpp | 3 ++-
src/remote/os/win32/xnet.cpp | 3 ++-
src/remote/protocol.h | 9 +++++++--
src/remote/server/server.cpp | 2 +-
4 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/remote/inet.cpp b/src/remote/inet.cpp
index b706178066..92471b149c 100644
--- a/src/remote/inet.cpp
+++ b/src/remote/inet.cpp
@@ -716,7 +716,8 @@ rem_port* INET_analyze(ClntAuthBlock* cBlock,
REMOTE_PROTOCOL(PROTOCOL_VERSION14, ptype_lazy_send, 5),
REMOTE_PROTOCOL(PROTOCOL_VERSION15, ptype_lazy_send, 6),
REMOTE_PROTOCOL(PROTOCOL_VERSION16, ptype_lazy_send, 7),
- REMOTE_PROTOCOL(PROTOCOL_VERSION17, ptype_lazy_send, 8)
+ REMOTE_PROTOCOL(PROTOCOL_VERSION17, ptype_lazy_send, 8),
+ REMOTE_PROTOCOL(PROTOCOL_VERSION18, ptype_lazy_send, 9)
};
fb_assert(FB_NELEM(protocols_to_try) <= FB_NELEM(cnct->p_cnct_versions));
cnct->p_cnct_count = FB_NELEM(protocols_to_try);
diff --git a/src/remote/os/win32/xnet.cpp b/src/remote/os/win32/xnet.cpp
index b1645657c0..9dc8e34557 100644
--- a/src/remote/os/win32/xnet.cpp
+++ b/src/remote/os/win32/xnet.cpp
@@ -306,7 +306,8 @@ rem_port* XNET_analyze(ClntAuthBlock* cBlock,
REMOTE_PROTOCOL(PROTOCOL_VERSION14, ptype_batch_send, 5),
REMOTE_PROTOCOL(PROTOCOL_VERSION15, ptype_batch_send, 6),
REMOTE_PROTOCOL(PROTOCOL_VERSION16, ptype_batch_send, 7),
- REMOTE_PROTOCOL(PROTOCOL_VERSION17, ptype_batch_send, 8)
+ REMOTE_PROTOCOL(PROTOCOL_VERSION17, ptype_batch_send, 8),
+ REMOTE_PROTOCOL(PROTOCOL_VERSION18, ptype_batch_send, 9)
};
fb_assert(FB_NELEM(protocols_to_try) <= FB_NELEM(cnct->p_cnct_versions));
cnct->p_cnct_count = FB_NELEM(protocols_to_try);
diff --git a/src/remote/protocol.h b/src/remote/protocol.h
index 862f896db0..8acfde2ce1 100644
--- a/src/remote/protocol.h
+++ b/src/remote/protocol.h
@@ -94,10 +94,15 @@ const USHORT PROTOCOL_VERSION16 = (FB_PROTOCOL_FLAG | 16);
const USHORT PROTOCOL_STMT_TOUT = PROTOCOL_VERSION16;
// Protocol 17:
-// - supports op_batch_sync, op_info_batch, op_fetch_scroll
+// - supports op_batch_sync, op_info_batch
const USHORT PROTOCOL_VERSION17 = (FB_PROTOCOL_FLAG | 17);
-const USHORT PROTOCOL_FETCH_SCROLL = PROTOCOL_VERSION17;
+
+// Protocol 18:
+// - supports op_fetch_scroll
+
+const USHORT PROTOCOL_VERSION18 = (FB_PROTOCOL_FLAG | 18);
+const USHORT PROTOCOL_FETCH_SCROLL = PROTOCOL_VERSION18;
// Architecture types
diff --git a/src/remote/server/server.cpp b/src/remote/server/server.cpp
index 4873772dab..10c6ea2dbe 100644
--- a/src/remote/server/server.cpp
+++ b/src/remote/server/server.cpp
@@ -1920,7 +1920,7 @@ static bool accept_connection(rem_port* port, P_CNCT* connect, PACKET* send)
{
if ((protocol->p_cnct_version == PROTOCOL_VERSION10 ||
(protocol->p_cnct_version >= PROTOCOL_VERSION11 &&
- protocol->p_cnct_version <= PROTOCOL_VERSION17)) &&
+ protocol->p_cnct_version <= PROTOCOL_VERSION18)) &&
(protocol->p_cnct_architecture == arch_generic ||
protocol->p_cnct_architecture == ARCHITECTURE) &&
protocol->p_cnct_weight >= weight)
From 00218503d69b7383c2d6cc40f6867982df87a23e Mon Sep 17 00:00:00 2001
From: Adriano dos Santos Fernandes
Date: Fri, 24 Dec 2021 11:54:52 -0300
Subject: [PATCH 007/187] Revert "Fix warnings."
This reverts commit 850e21a34ce34b1bc20c9c23bceff0f8070adc39.
---
examples/udr/Triggers.cpp | 2 ++
src/dsql/metd.epp | 7 +++++++
src/jrd/vio.cpp | 9 ++++++---
3 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/examples/udr/Triggers.cpp b/examples/udr/Triggers.cpp
index f397b9a373..4e9bcca834 100644
--- a/examples/udr/Triggers.cpp
+++ b/examples/udr/Triggers.cpp
@@ -234,6 +234,8 @@ FB_UDR_BEGIN_TRIGGER(replicate_persons)
"select data_source from replicate_config where name = ?",
SQL_DIALECT_CURRENT, NULL), status, statusVector);
+ const char* table = metadata->getTriggerTable(status);
+
// Skip the first exclamation point, separating the module name and entry point.
const char* info = strchr(metadata->getEntryPoint(status), '!');
diff --git a/src/dsql/metd.epp b/src/dsql/metd.epp
index bfb47f644e..9eb1ea8528 100644
--- a/src/dsql/metd.epp
+++ b/src/dsql/metd.epp
@@ -63,6 +63,13 @@ using namespace Firebird;
DATABASE DB = STATIC "yachts.lnk";
+static const UCHAR blr_bpb[] =
+{
+ isc_bpb_version1,
+ isc_bpb_source_type, 1, isc_blob_blr,
+ isc_bpb_target_type, 1, isc_blob_blr
+};
+
static void convert_dtype(TypeClause*, SSHORT);
static void free_relation(dsql_rel*);
diff --git a/src/jrd/vio.cpp b/src/jrd/vio.cpp
index 07aaa3fb7a..8af88effdc 100644
--- a/src/jrd/vio.cpp
+++ b/src/jrd/vio.cpp
@@ -238,6 +238,7 @@ inline void check_gbak_cheating_insupd(thread_db* tdbb, const jrd_rel* relation,
inline void check_gbak_cheating_delete(thread_db* tdbb, const jrd_rel* relation)
{
const Attachment* const attachment = tdbb->getAttachment();
+ const jrd_tra* const transaction = tdbb->getTransaction();
if (relation->isSystem() && attachment->isGbak())
{
@@ -2526,6 +2527,8 @@ bool VIO_get_current(thread_db* tdbb,
**************************************/
SET_TDBB(tdbb);
+ Attachment* const attachment = tdbb->getAttachment();
+
#ifdef VIO_DEBUG
jrd_rel* relation = rpb->rpb_relation;
VIO_trace(DEBUG_TRACE,
@@ -5192,12 +5195,12 @@ static void list_staying_fast(thread_db* tdbb, record_param* rpb, RecordStack& s
}
}
- ///const TraNumber oldest_active = tdbb->getTransaction()->tra_oldest_active;
+ const TraNumber oldest_active = tdbb->getTransaction()->tra_oldest_active;
while (temp.rpb_b_page)
{
- ///ULONG page = temp.rpb_page = temp.rpb_b_page;
- ///USHORT line = temp.rpb_line = temp.rpb_b_line;
+ ULONG page = temp.rpb_page = temp.rpb_b_page;
+ USHORT line = temp.rpb_line = temp.rpb_b_line;
temp.rpb_record = NULL;
if (temp.rpb_flags & rpb_delta)
From 80e7651261edf8d1f5e63cfb6127def9804f8eae Mon Sep 17 00:00:00 2001
From: Adriano dos Santos Fernandes
Date: Fri, 24 Dec 2021 11:57:57 -0300
Subject: [PATCH 008/187] Fix warnings.
---
examples/udr/Triggers.cpp | 2 --
src/dsql/metd.epp | 7 -------
src/jrd/vio.cpp | 12 ++++++------
3 files changed, 6 insertions(+), 15 deletions(-)
diff --git a/examples/udr/Triggers.cpp b/examples/udr/Triggers.cpp
index 4e9bcca834..f397b9a373 100644
--- a/examples/udr/Triggers.cpp
+++ b/examples/udr/Triggers.cpp
@@ -234,8 +234,6 @@ FB_UDR_BEGIN_TRIGGER(replicate_persons)
"select data_source from replicate_config where name = ?",
SQL_DIALECT_CURRENT, NULL), status, statusVector);
- const char* table = metadata->getTriggerTable(status);
-
// Skip the first exclamation point, separating the module name and entry point.
const char* info = strchr(metadata->getEntryPoint(status), '!');
diff --git a/src/dsql/metd.epp b/src/dsql/metd.epp
index 9eb1ea8528..bfb47f644e 100644
--- a/src/dsql/metd.epp
+++ b/src/dsql/metd.epp
@@ -63,13 +63,6 @@ using namespace Firebird;
DATABASE DB = STATIC "yachts.lnk";
-static const UCHAR blr_bpb[] =
-{
- isc_bpb_version1,
- isc_bpb_source_type, 1, isc_blob_blr,
- isc_bpb_target_type, 1, isc_blob_blr
-};
-
static void convert_dtype(TypeClause*, SSHORT);
static void free_relation(dsql_rel*);
diff --git a/src/jrd/vio.cpp b/src/jrd/vio.cpp
index 8af88effdc..5443e920b6 100644
--- a/src/jrd/vio.cpp
+++ b/src/jrd/vio.cpp
@@ -238,7 +238,6 @@ inline void check_gbak_cheating_insupd(thread_db* tdbb, const jrd_rel* relation,
inline void check_gbak_cheating_delete(thread_db* tdbb, const jrd_rel* relation)
{
const Attachment* const attachment = tdbb->getAttachment();
- const jrd_tra* const transaction = tdbb->getTransaction();
if (relation->isSystem() && attachment->isGbak())
{
@@ -2527,8 +2526,6 @@ bool VIO_get_current(thread_db* tdbb,
**************************************/
SET_TDBB(tdbb);
- Attachment* const attachment = tdbb->getAttachment();
-
#ifdef VIO_DEBUG
jrd_rel* relation = rpb->rpb_relation;
VIO_trace(DEBUG_TRACE,
@@ -5195,12 +5192,15 @@ static void list_staying_fast(thread_db* tdbb, record_param* rpb, RecordStack& s
}
}
- const TraNumber oldest_active = tdbb->getTransaction()->tra_oldest_active;
+ ///const TraNumber oldest_active = tdbb->getTransaction()->tra_oldest_active;
while (temp.rpb_b_page)
{
- ULONG page = temp.rpb_page = temp.rpb_b_page;
- USHORT line = temp.rpb_line = temp.rpb_b_line;
+ ///ULONG page = temp.rpb_page = temp.rpb_b_page;
+ ///USHORT line = temp.rpb_line = temp.rpb_b_line;
+ temp.rpb_page = temp.rpb_b_page;
+ temp.rpb_line = temp.rpb_b_line;
+
temp.rpb_record = NULL;
if (temp.rpb_flags & rpb_delta)
From a0c88b83033b2bc7cf77e0c21977ea5e2200fc24 Mon Sep 17 00:00:00 2001
From: firebirds <>
Date: Sat, 25 Dec 2021 00:05:18 +0000
Subject: [PATCH 009/187] increment build number
---
src/jrd/build_no.h | 12 ++++++------
src/misc/writeBuildNum.sh | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/jrd/build_no.h b/src/jrd/build_no.h
index 7faf924a13..ad63467e1b 100644
--- a/src/jrd/build_no.h
+++ b/src/jrd/build_no.h
@@ -3,16 +3,16 @@
*** DO NOT EDIT ***
TO CHANGE ANY INFORMATION IN HERE PLEASE
EDIT src/misc/writeBuildNum.sh
- FORMAL BUILD NUMBER:353
+ FORMAL BUILD NUMBER:358
*/
-#define PRODUCT_VER_STRING "5.0.0.353"
-#define FILE_VER_STRING "WI-T5.0.0.353"
-#define LICENSE_VER_STRING "WI-T5.0.0.353"
-#define FILE_VER_NUMBER 5, 0, 0, 353
+#define PRODUCT_VER_STRING "5.0.0.358"
+#define FILE_VER_STRING "WI-T5.0.0.358"
+#define LICENSE_VER_STRING "WI-T5.0.0.358"
+#define FILE_VER_NUMBER 5, 0, 0, 358
#define FB_MAJOR_VER "5"
#define FB_MINOR_VER "0"
#define FB_REV_NO "0"
-#define FB_BUILD_NO "353"
+#define FB_BUILD_NO "358"
#define FB_BUILD_TYPE "T"
#define FB_BUILD_SUFFIX "Firebird 5.0 Initial"
diff --git a/src/misc/writeBuildNum.sh b/src/misc/writeBuildNum.sh
index 8411aedb07..a8defc4cd9 100755
--- a/src/misc/writeBuildNum.sh
+++ b/src/misc/writeBuildNum.sh
@@ -9,7 +9,7 @@ BuildType=T
MajorVer=5
MinorVer=0
RevNo=0
-BuildNum=353
+BuildNum=358
NowAt=`pwd`
cd `dirname $0`
From 9772a398af7daef47279de53d75603c219d56b02 Mon Sep 17 00:00:00 2001
From: Adriano dos Santos Fernandes
Date: Sun, 26 Dec 2021 11:35:16 -0300
Subject: [PATCH 010/187] Fix MacOS UDR and Legacy_UserManager plugins not
working due to not exported entry point. (#7088)
Add FB_DLL_EXPORT to public headers.
Use default visibility also for Linux/Unix (in addition to MacOS) as
user application can also be compiled with -fvisibility=hidden.
---
doc/Using_OO_API.html | 4 ++--
examples/dbcrypt/CryptKeyHolder.cpp | 2 +-
examples/dbcrypt/DbCrypt.cpp | 2 +-
examples/extauth/ExtAuth.cpp | 8 +-------
examples/interfaces/ifaceExamples.h | 8 --------
examples/replication/fbSampleReplicator.cpp | 9 +--------
src/auth/AuthDbg.cpp | 2 +-
.../SecureRemotePassword/manage/SrpManagement.cpp | 10 +---------
src/auth/SecurityDatabase/LegacyManagement.epp | 2 +-
src/auth/SecurityDatabase/LegacyServer.cpp | 2 +-
src/common/common.h | 6 ------
src/extlib/ib_util.cpp | 8 +++-----
src/include/firebird.h | 7 -------
src/include/firebird/UdrCppEngine.h | 2 +-
src/include/ibase.h | 12 ++++++++++++
src/intl/ld.cpp | 8 ++++----
src/intl/ld.h | 8 --------
src/intl/ld_proto.h | 8 ++++----
src/jrd/jrd.cpp | 2 +-
src/plugins/crypt/chacha/ChaCha.cpp | 2 +-
src/plugins/udr_engine/UdrEngine.cpp | 2 +-
src/remote/client/interface.cpp | 2 +-
src/utilities/ntrace/traceplugin.cpp | 2 +-
src/yvalve/gds.cpp | 4 ++--
src/yvalve/gds_proto.h | 6 ++++--
25 files changed, 45 insertions(+), 83 deletions(-)
diff --git a/doc/Using_OO_API.html b/doc/Using_OO_API.html
index b15ab1adf4..841a4b49d4 100644
--- a/doc/Using_OO_API.html
+++ b/doc/Using_OO_API.html
@@ -1673,7 +1673,7 @@ only for some specific OS you can make this place a bit simpler. In
minimum case the function should register module and all factories in
plugin manager:
extern
-"C" void FB_DLL_EXPORT FB_PLUGIN_ENTRY_POINT(IMaster*
+"C" FB_DLL_EXPORT void FB_PLUGIN_ENTRY_POINT(IMaster*
master)
{
IPluginManager*
@@ -3793,4 +3793,4 @@ release of it.