From 144dc24f0a408be78bfb642039b7bba390ae59a9 Mon Sep 17 00:00:00 2001 From: Adriano dos Santos Fernandes Date: Fri, 6 Mar 2026 08:27:40 -0300 Subject: [PATCH 001/104] WIP --- src/common/CharSet.cpp | 2 +- src/common/common.h | 13 ++++++++ src/common/sdl.cpp | 2 +- src/common/tests/CvtTest.cpp | 2 +- src/common/utils.cpp | 3 +- src/common/utils_proto.h | 3 +- src/dsql/AggNodes.cpp | 4 +-- src/dsql/AggNodes.h | 2 +- src/dsql/BlrDebugWriter.cpp | 2 +- src/dsql/BlrDebugWriter.h | 2 +- src/dsql/BoolNodes.cpp | 2 +- src/dsql/BoolNodes.h | 2 +- src/dsql/DSqlDataTypeUtil.h | 2 +- src/dsql/DdlNodes.epp | 2 +- src/dsql/DdlNodes.h | 2 +- src/dsql/DsqlBatch.cpp | 2 +- src/dsql/DsqlBatch.h | 2 +- src/dsql/DsqlCompilerScratch.cpp | 2 +- src/dsql/DsqlCompilerScratch.h | 3 +- src/dsql/DsqlCursor.cpp | 2 +- src/dsql/DsqlCursor.h | 2 +- src/dsql/DsqlRequests.cpp | 2 +- src/dsql/DsqlRequests.h | 2 +- src/dsql/DsqlStatementCache.cpp | 2 +- src/dsql/DsqlStatementCache.h | 2 +- src/dsql/DsqlStatements.cpp | 2 +- src/dsql/DsqlStatements.h | 2 +- src/dsql/ExprNodes.cpp | 4 +-- src/dsql/ExprNodes.h | 2 +- src/dsql/Keywords.cpp | 2 +- src/dsql/Keywords.h | 3 +- src/dsql/NodePrinter.h | 2 +- src/dsql/Nodes.h | 2 +- src/dsql/PackageNodes.epp | 2 +- src/dsql/PackageNodes.h | 2 +- src/dsql/Parser.cpp | 2 +- src/dsql/Parser.h | 2 +- src/dsql/StmtNodes.cpp | 6 ++-- src/dsql/StmtNodes.h | 2 +- src/dsql/Visitors.h | 2 +- src/dsql/WinNodes.cpp | 4 +-- src/dsql/WinNodes.h | 2 +- src/dsql/ddl.cpp | 2 +- src/dsql/ddl_proto.h | 2 +- src/dsql/dsql.cpp | 2 +- src/dsql/dsql.h | 5 ++- src/dsql/dsql_proto.h | 2 +- src/dsql/errd.cpp | 2 +- src/dsql/gen.cpp | 2 +- src/dsql/gen_proto.h | 3 +- src/dsql/make.cpp | 2 +- src/dsql/make_proto.h | 2 +- src/dsql/metd.epp | 2 +- src/dsql/metd_proto.h | 2 +- src/dsql/movd.cpp | 2 +- src/dsql/pass1.cpp | 2 +- src/dsql/pass1_proto.h | 3 +- src/dsql/sym.h | 2 +- src/dsql/utld.cpp | 2 +- src/jrd/Attachment.cpp | 2 +- src/jrd/Attachment.h | 5 ++- src/jrd/BlobUtil.cpp | 4 +-- src/jrd/BlobUtil.h | 2 +- src/jrd/CacheVector.cpp | 2 +- src/jrd/CacheVector.h | 2 +- src/jrd/CharSetContainer.cpp | 2 +- src/jrd/CharSetContainer.h | 2 +- src/jrd/Coercion.cpp | 2 +- src/jrd/Coercion.h | 3 +- src/jrd/Collation.cpp | 4 +-- src/jrd/Collation.h | 2 +- src/jrd/ConfigTable.cpp | 2 +- src/jrd/ConfigTable.h | 3 +- src/jrd/CryptoManager.cpp | 3 +- src/jrd/CryptoManager.h | 2 +- src/jrd/DataTypeUtil.cpp | 2 +- src/jrd/DataTypeUtil.h | 2 +- src/jrd/Database.cpp | 3 +- src/jrd/Database.h | 3 +- src/jrd/DbCreators.cpp | 24 +++++++------- src/jrd/DbCreators.h | 2 +- src/jrd/DebugInterface.cpp | 2 +- src/jrd/DebugInterface.h | 2 +- src/jrd/EngineInterface.h | 2 +- src/jrd/ExtEngineManager.cpp | 2 +- src/jrd/ExtEngineManager.h | 2 +- src/jrd/Function.epp | 2 +- src/jrd/Function.h | 3 +- src/jrd/GarbageCollector.cpp | 4 +-- src/jrd/GarbageCollector.h | 2 +- src/jrd/GlobalRWLock.cpp | 2 +- src/jrd/GlobalRWLock.h | 2 +- src/jrd/HazardPtr.h | 2 +- src/jrd/InitCDSLib.cpp | 3 +- src/jrd/InitCDSLib.h | 3 +- src/jrd/IntlManager.cpp | 2 +- src/jrd/IntlManager.h | 2 +- src/jrd/KeywordsTable.cpp | 2 +- src/jrd/KeywordsTable.h | 3 +- src/jrd/LocalTemporaryTable.h | 3 +- src/jrd/Mapping.cpp | 40 +++++++++++------------ src/jrd/Mapping.h | 2 +- src/jrd/MetaName.cpp | 2 +- src/jrd/MetaName.h | 2 +- src/jrd/Monitoring.cpp | 2 +- src/jrd/Monitoring.h | 2 +- src/jrd/PageToBufferMap.h | 2 +- src/jrd/PreparedStatement.cpp | 2 +- src/jrd/PreparedStatement.h | 2 +- src/jrd/ProfilerManager.cpp | 2 +- src/jrd/ProfilerManager.h | 2 +- src/jrd/ProtectRelations.h | 2 +- src/jrd/QualifiedName.h | 2 +- src/jrd/RandomGenerator.cpp | 2 +- src/jrd/RandomGenerator.h | 2 +- src/jrd/Record.h | 3 +- src/jrd/RecordBuffer.cpp | 2 +- src/jrd/RecordBuffer.h | 2 +- src/jrd/RecordNumber.h | 3 +- src/jrd/RecordSourceNodes.cpp | 2 +- src/jrd/RecordSourceNodes.h | 2 +- src/jrd/Relation.cpp | 2 +- src/jrd/Relation.h | 3 +- src/jrd/Resources.cpp | 2 +- src/jrd/Resources.h | 2 +- src/jrd/ResultSet.cpp | 2 +- src/jrd/ResultSet.h | 2 +- src/jrd/Routine.cpp | 2 +- src/jrd/Routine.h | 3 +- src/jrd/RuntimeStatistics.cpp | 2 +- src/jrd/RuntimeStatistics.h | 2 +- src/jrd/Savepoint.cpp | 2 +- src/jrd/Savepoint.h | 3 +- src/jrd/SharedReadVector.h | 2 +- src/jrd/Statement.cpp | 4 +-- src/jrd/Statement.h | 2 +- src/jrd/SysFunction.cpp | 2 +- src/jrd/SysFunction.h | 3 +- src/jrd/SystemPackages.cpp | 2 +- src/jrd/SystemPackages.h | 3 +- src/jrd/SystemPrivileges.h | 2 +- src/jrd/SystemTriggers.epp | 2 +- src/jrd/SystemTriggers.h | 5 ++- src/jrd/TempSpace.cpp | 2 +- src/jrd/ThreadCollect.h | 2 +- src/jrd/TimeZone.cpp | 2 +- src/jrd/TimeZone.h | 2 +- src/jrd/UserManagement.cpp | 2 +- src/jrd/UserManagement.h | 2 +- src/jrd/VirtualTable.cpp | 2 +- src/jrd/VirtualTable.h | 3 +- src/jrd/WorkerAttachment.cpp | 2 +- src/jrd/WorkerAttachment.h | 3 +- src/jrd/blb.cpp | 2 +- src/jrd/blb.h | 3 +- src/jrd/blf_proto.h | 2 +- src/jrd/blob_filter.cpp | 2 +- src/jrd/blob_filter.h | 2 +- src/jrd/btn.cpp | 2 +- src/jrd/btn.h | 2 +- src/jrd/btr.cpp | 2 +- src/jrd/btr.h | 2 +- src/jrd/cch.cpp | 7 ++-- src/jrd/cch.h | 2 +- src/jrd/cmp.cpp | 2 +- src/jrd/cvt.cpp | 2 +- src/jrd/cvt2.cpp | 2 +- src/jrd/cvt_proto.h | 3 +- src/jrd/dfw.epp | 4 +-- src/jrd/dfw_proto.h | 3 +- src/jrd/dpm.epp | 2 +- src/jrd/dpm_proto.h | 3 +- src/jrd/dyn.h | 2 +- src/jrd/dyn_util.epp | 2 +- src/jrd/err.cpp | 2 +- src/jrd/err_proto.h | 2 +- src/jrd/event.cpp | 2 +- src/jrd/event_proto.h | 2 +- src/jrd/evl.cpp | 2 +- src/jrd/evl_proto.h | 6 ++-- src/jrd/exe.cpp | 2 +- src/jrd/exe.h | 2 +- src/jrd/exe_proto.h | 5 ++- src/jrd/ext.cpp | 5 ++- src/jrd/ext_proto.h | 2 +- src/jrd/extds/ExtDS.cpp | 4 +-- src/jrd/extds/ExtDS.h | 5 ++- src/jrd/extds/InternalDS.cpp | 4 +-- src/jrd/extds/InternalDS.h | 2 +- src/jrd/extds/IscDS.cpp | 5 ++- src/jrd/extds/IscDS.h | 2 +- src/jrd/extds/ValidatePassword.cpp | 4 +-- src/jrd/extds/ValidatePassword.h | 5 ++- src/jrd/filters.cpp | 2 +- src/jrd/flu.cpp | 3 +- src/jrd/flu.h | 3 +- src/jrd/fun.epp | 2 +- src/jrd/grant.epp | 2 +- src/jrd/idx.cpp | 4 +-- src/jrd/idx_proto.h | 3 +- src/jrd/inf.cpp | 2 +- src/jrd/inf_proto.h | 2 +- src/jrd/ini.epp | 2 +- src/jrd/ini_proto.h | 2 +- src/jrd/intl.cpp | 2 +- src/jrd/intl_classes.h | 2 +- src/jrd/intl_proto.h | 2 +- src/jrd/jrd.cpp | 10 +++--- src/jrd/jrd.h | 6 ++-- src/jrd/jrd_proto.h | 2 +- src/jrd/lck.cpp | 2 +- src/jrd/lck.h | 4 +-- src/jrd/lls.h | 2 +- src/jrd/met.epp | 2 +- src/jrd/met.h | 4 +-- src/jrd/met_proto.h | 3 +- src/jrd/mov.cpp | 3 +- src/jrd/mov_proto.h | 3 +- src/jrd/nbak.cpp | 2 +- src/jrd/nbak.h | 2 +- src/jrd/opt_proto.h | 2 +- src/jrd/optimizer/InnerJoin.cpp | 2 +- src/jrd/optimizer/Optimizer.cpp | 2 +- src/jrd/optimizer/Optimizer.h | 2 +- src/jrd/optimizer/OuterJoin.cpp | 2 +- src/jrd/optimizer/Retrieval.cpp | 2 +- src/jrd/os/pio.h | 2 +- src/jrd/os/pio_proto.h | 2 +- src/jrd/os/posix/unix.cpp | 2 +- src/jrd/os/win32/winnt.cpp | 4 +-- src/jrd/pag.cpp | 2 +- src/jrd/pag.h | 2 +- src/jrd/pag_proto.h | 2 +- src/jrd/par.cpp | 2 +- src/jrd/par_proto.h | 2 +- src/jrd/que.h | 2 +- src/jrd/recsrc/AggregatedStream.cpp | 2 +- src/jrd/recsrc/BitmapTableScan.cpp | 2 +- src/jrd/recsrc/BufferedStream.cpp | 2 +- src/jrd/recsrc/ConditionalStream.cpp | 2 +- src/jrd/recsrc/Cursor.cpp | 2 +- src/jrd/recsrc/Cursor.h | 3 +- src/jrd/recsrc/ExternalTableScan.cpp | 2 +- src/jrd/recsrc/FilteredStream.cpp | 2 +- src/jrd/recsrc/FirstRowsStream.cpp | 2 +- src/jrd/recsrc/FullOuterJoin.cpp | 2 +- src/jrd/recsrc/FullTableScan.cpp | 2 +- src/jrd/recsrc/HashJoin.cpp | 2 +- src/jrd/recsrc/IndexTableScan.cpp | 2 +- src/jrd/recsrc/LocalTableStream.cpp | 2 +- src/jrd/recsrc/LockedStream.cpp | 2 +- src/jrd/recsrc/MergeJoin.cpp | 2 +- src/jrd/recsrc/NestedLoopJoin.cpp | 2 +- src/jrd/recsrc/ProcedureScan.cpp | 2 +- src/jrd/recsrc/RecordSource.cpp | 2 +- src/jrd/recsrc/RecordSource.h | 3 +- src/jrd/recsrc/RecursiveStream.cpp | 2 +- src/jrd/recsrc/SingularStream.cpp | 2 +- src/jrd/recsrc/SkipRowsStream.cpp | 2 +- src/jrd/recsrc/SortedStream.cpp | 2 +- src/jrd/recsrc/TableValueFunctionScan.cpp | 2 +- src/jrd/recsrc/Union.cpp | 2 +- src/jrd/recsrc/VirtualTableScan.cpp | 2 +- src/jrd/recsrc/WindowedStream.cpp | 2 +- src/jrd/replication/Applier.cpp | 2 +- src/jrd/replication/Applier.h | 3 +- src/jrd/replication/ChangeLog.cpp | 2 +- src/jrd/replication/Manager.cpp | 2 +- src/jrd/replication/Publisher.cpp | 2 +- src/jrd/replication/Publisher.h | 3 +- src/jrd/replication/Replicator.cpp | 2 +- src/jrd/req.h | 4 +-- src/jrd/rlck.cpp | 2 +- src/jrd/rlck_proto.h | 2 +- src/jrd/rpb_chain.cpp | 2 +- src/jrd/rpb_chain.h | 2 +- src/jrd/sbm.h | 2 +- src/jrd/scl.epp | 2 +- src/jrd/scl.h | 2 +- src/jrd/scl_proto.h | 4 +-- src/jrd/sdw.cpp | 2 +- src/jrd/sdw.h | 2 +- src/jrd/sdw_proto.h | 2 +- src/jrd/shut.cpp | 2 +- src/jrd/shut_proto.h | 2 +- src/jrd/sort.cpp | 2 +- src/jrd/sort.h | 2 +- src/jrd/sqz.cpp | 2 +- src/jrd/sqz.h | 3 +- src/jrd/status.h | 3 +- src/jrd/svc.cpp | 2 +- src/jrd/svc.h | 2 +- src/jrd/sys-packages/SqlPackage.cpp | 2 +- src/jrd/sys-packages/SqlPackage.h | 2 +- src/jrd/tdbb.h | 3 +- src/jrd/tests/BlrGenTest.cpp | 2 +- src/jrd/tests/CompressorTest.cpp | 2 +- src/jrd/tests/RecordNumberTest.cpp | 2 +- src/jrd/tpc.cpp | 2 +- src/jrd/tpc_proto.h | 2 +- src/jrd/tra.cpp | 2 +- src/jrd/tra.h | 4 +-- src/jrd/tra_proto.h | 2 +- src/jrd/trace/TraceConfigStorage.cpp | 2 +- src/jrd/trace/TraceConfigStorage.h | 2 +- src/jrd/trace/TraceDSQLHelpers.h | 2 +- src/jrd/trace/TraceJrdHelpers.h | 2 +- src/jrd/trace/TraceLog.cpp | 2 +- src/jrd/trace/TraceLog.h | 2 +- src/jrd/trace/TraceManager.cpp | 2 +- src/jrd/trace/TraceManager.h | 2 +- src/jrd/trace/TraceObjects.cpp | 2 +- src/jrd/trace/TraceObjects.h | 2 +- src/jrd/trace/TraceService.cpp | 2 +- src/jrd/trig.h | 2 +- src/jrd/val.h | 2 +- src/jrd/validation.cpp | 5 ++- src/jrd/validation.h | 3 +- src/jrd/vec.cpp | 2 +- src/jrd/vec.h | 2 +- src/jrd/vio.cpp | 5 ++- src/jrd/vio_proto.h | 3 +- src/lock/lock.cpp | 2 +- src/lock/lock_proto.h | 2 +- src/lock/tests/LockManagerTest.cpp | 2 +- 325 files changed, 405 insertions(+), 451 deletions(-) diff --git a/src/common/CharSet.cpp b/src/common/CharSet.cpp index 8bce947a2eb..6e837f54283 100644 --- a/src/common/CharSet.cpp +++ b/src/common/CharSet.cpp @@ -95,7 +95,7 @@ #include "../jrd/intl_classes.h" #include "../common/classes/Aligner.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; diff --git a/src/common/common.h b/src/common/common.h index 799dfb0f023..81eaefdb7ab 100644 --- a/src/common/common.h +++ b/src/common/common.h @@ -853,6 +853,19 @@ namespace Firebird { static IMessageMetadata* const DELAYED_OUT_FORMAT = reinterpret_cast(1); } +namespace Firebird::Jrd { +} + +namespace Firebird::Jrd::EDS { +} + +namespace Firebird::fb_utils { +} + +namespace Jrd = Firebird::Jrd; +namespace EDS = Firebird::Jrd::EDS; +namespace fb_utils = Firebird::fb_utils; + //#define DEBUG_LOST_POOLS 1 #endif /* COMMON_COMMON_H */ diff --git a/src/common/sdl.cpp b/src/common/sdl.cpp index 46eeedb908f..df0605d6608 100644 --- a/src/common/sdl.cpp +++ b/src/common/sdl.cpp @@ -32,7 +32,7 @@ constexpr int COMPILE_SIZE = 256; -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; struct sdl_arg diff --git a/src/common/tests/CvtTest.cpp b/src/common/tests/CvtTest.cpp index e0f0a380985..b64ad36e3e3 100644 --- a/src/common/tests/CvtTest.cpp +++ b/src/common/tests/CvtTest.cpp @@ -8,7 +8,7 @@ #include "../jrd/intl.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; using namespace CvtTestUtils; diff --git a/src/common/utils.cpp b/src/common/utils.cpp index 749be6c197e..32e319b79ed 100644 --- a/src/common/utils.cpp +++ b/src/common/utils.cpp @@ -85,8 +85,7 @@ #endif -namespace fb_utils -{ +namespace Firebird::fb_utils { bool implicit_name(const char* name, const char* prefix, int prefix_len) noexcept; diff --git a/src/common/utils_proto.h b/src/common/utils_proto.h index 06fbffc15a5..7dfa83f5e31 100644 --- a/src/common/utils_proto.h +++ b/src/common/utils_proto.h @@ -39,8 +39,7 @@ #include "firebird/Interface.h" #include "memory_routines.h" -namespace fb_utils -{ +namespace Firebird::fb_utils { char* copy_terminate(char* dest, const char* src, size_t bufsize) noexcept; char* exact_name(char* const name) noexcept; inline void exact_name(Firebird::string& str) diff --git a/src/dsql/AggNodes.cpp b/src/dsql/AggNodes.cpp index 403cf592ebb..3cda8e4c9fe 100644 --- a/src/dsql/AggNodes.cpp +++ b/src/dsql/AggNodes.cpp @@ -43,9 +43,9 @@ #include using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; -namespace Jrd { +namespace Firebird::Jrd { static RegisterNode regAggNode({blr_agg_function}); diff --git a/src/dsql/AggNodes.h b/src/dsql/AggNodes.h index b9a186b698e..1f6a4343230 100644 --- a/src/dsql/AggNodes.h +++ b/src/dsql/AggNodes.h @@ -27,7 +27,7 @@ #include "../dsql/Nodes.h" #include "../dsql/NodePrinter.h" -namespace Jrd { +namespace Firebird::Jrd { class AnyValueAggNode final : public AggNode diff --git a/src/dsql/BlrDebugWriter.cpp b/src/dsql/BlrDebugWriter.cpp index a6b43aeaf0e..edba78a472b 100644 --- a/src/dsql/BlrDebugWriter.cpp +++ b/src/dsql/BlrDebugWriter.cpp @@ -34,7 +34,7 @@ using namespace Firebird; -namespace Jrd { +namespace Firebird::Jrd { void BlrDebugWriter::raiseError(const Arg::StatusVector& vector) { diff --git a/src/dsql/BlrDebugWriter.h b/src/dsql/BlrDebugWriter.h index 6569a65b928..927a6f7975c 100644 --- a/src/dsql/BlrDebugWriter.h +++ b/src/dsql/BlrDebugWriter.h @@ -24,7 +24,7 @@ #include "../common/classes/BlrWriter.h" -namespace Jrd { +namespace Firebird::Jrd { class DeclareSubFuncNode; diff --git a/src/dsql/BoolNodes.cpp b/src/dsql/BoolNodes.cpp index 29f8a8eb78d..2b49bc8113f 100644 --- a/src/dsql/BoolNodes.cpp +++ b/src/dsql/BoolNodes.cpp @@ -45,7 +45,7 @@ #include "../dsql/DSqlDataTypeUtil.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; namespace { diff --git a/src/dsql/BoolNodes.h b/src/dsql/BoolNodes.h index bdf0301f654..4a5fd1af061 100644 --- a/src/dsql/BoolNodes.h +++ b/src/dsql/BoolNodes.h @@ -26,7 +26,7 @@ #include "firebird/impl/blr.h" #include "../dsql/Nodes.h" -namespace Jrd { +namespace Firebird::Jrd { class SubQuery; diff --git a/src/dsql/DSqlDataTypeUtil.h b/src/dsql/DSqlDataTypeUtil.h index cd8a4abdaf5..58d030eac81 100644 --- a/src/dsql/DSqlDataTypeUtil.h +++ b/src/dsql/DSqlDataTypeUtil.h @@ -27,7 +27,7 @@ #include "../jrd/DataTypeUtil.h" -namespace Jrd { +namespace Firebird::Jrd { class DsqlCompilerScratch; diff --git a/src/dsql/DdlNodes.epp b/src/dsql/DdlNodes.epp index 02e4550a85c..f0ba707d85d 100644 --- a/src/dsql/DdlNodes.epp +++ b/src/dsql/DdlNodes.epp @@ -81,7 +81,7 @@ #include "../jrd/GarbageCollector.h" #include "../jrd/ProtectRelations.h" -namespace Jrd { +namespace Firebird::Jrd { // Define range of user relation ids diff --git a/src/dsql/DdlNodes.h b/src/dsql/DdlNodes.h index b72ac145e9a..6d89dfb8154 100644 --- a/src/dsql/DdlNodes.h +++ b/src/dsql/DdlNodes.h @@ -40,7 +40,7 @@ #include "../jrd/Savepoint.h" #include "../dsql/errd_proto.h" -namespace Jrd { +namespace Firebird::Jrd { enum SqlSecurity { diff --git a/src/dsql/DsqlBatch.cpp b/src/dsql/DsqlBatch.cpp index d15da6ff51b..fec16540e04 100644 --- a/src/dsql/DsqlBatch.cpp +++ b/src/dsql/DsqlBatch.cpp @@ -37,7 +37,7 @@ #include "../common/classes/BatchCompletionState.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; namespace { const char* const TEMP_NAME = "fb_batch"; diff --git a/src/dsql/DsqlBatch.h b/src/dsql/DsqlBatch.h index 1a9aefcdf6e..736e091f92b 100644 --- a/src/dsql/DsqlBatch.h +++ b/src/dsql/DsqlBatch.h @@ -37,7 +37,7 @@ class ClumpletReader; } -namespace Jrd { +namespace Firebird::Jrd { class DsqlDmlRequest; class dsql_msg; diff --git a/src/dsql/DsqlCompilerScratch.cpp b/src/dsql/DsqlCompilerScratch.cpp index e1dc329de0e..04a49fa4183 100644 --- a/src/dsql/DsqlCompilerScratch.cpp +++ b/src/dsql/DsqlCompilerScratch.cpp @@ -35,7 +35,7 @@ #include using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; #ifdef DSQL_DEBUG diff --git a/src/dsql/DsqlCompilerScratch.h b/src/dsql/DsqlCompilerScratch.h index ccebe02ba02..19716810dae 100644 --- a/src/dsql/DsqlCompilerScratch.h +++ b/src/dsql/DsqlCompilerScratch.h @@ -34,8 +34,7 @@ #include #include -namespace Jrd -{ +namespace Firebird::Jrd { class BinaryBoolNode; class LocalDeclarationsNode; diff --git a/src/dsql/DsqlCursor.cpp b/src/dsql/DsqlCursor.cpp index 5c83259bf0b..7101f1da80b 100644 --- a/src/dsql/DsqlCursor.cpp +++ b/src/dsql/DsqlCursor.cpp @@ -31,7 +31,7 @@ #include "../dsql/StmtNodes.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; static const char* const SCRATCH = "fb_cursor_"; static const ULONG PREFETCH_SIZE = 65536; // 64 KB diff --git a/src/dsql/DsqlCursor.h b/src/dsql/DsqlCursor.h index f98d8985349..239e07bf8ab 100644 --- a/src/dsql/DsqlCursor.h +++ b/src/dsql/DsqlCursor.h @@ -25,7 +25,7 @@ #include "../jrd/TempSpace.h" -namespace Jrd { +namespace Firebird::Jrd { class DsqlDmlRequest; class JResultSet; diff --git a/src/dsql/DsqlRequests.cpp b/src/dsql/DsqlRequests.cpp index 00522d975ad..188fdf7c238 100644 --- a/src/dsql/DsqlRequests.cpp +++ b/src/dsql/DsqlRequests.cpp @@ -37,7 +37,7 @@ #include "../jrd/exe_proto.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; static void checkD(IStatus* st); diff --git a/src/dsql/DsqlRequests.h b/src/dsql/DsqlRequests.h index 3dd0a955ab1..357ce8bc624 100644 --- a/src/dsql/DsqlRequests.h +++ b/src/dsql/DsqlRequests.h @@ -31,7 +31,7 @@ #include "../common/classes/RefCounted.h" #include "../jrd/jrd.h" -namespace Jrd { +namespace Firebird::Jrd { class DdlNode; diff --git a/src/dsql/DsqlStatementCache.cpp b/src/dsql/DsqlStatementCache.cpp index 8e769132b2d..85e49b02a6b 100644 --- a/src/dsql/DsqlStatementCache.cpp +++ b/src/dsql/DsqlStatementCache.cpp @@ -28,7 +28,7 @@ #include "../jrd/lck.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // Class DsqlStatementCache diff --git a/src/dsql/DsqlStatementCache.h b/src/dsql/DsqlStatementCache.h index 8f31a6411ab..c67372e241a 100644 --- a/src/dsql/DsqlStatementCache.h +++ b/src/dsql/DsqlStatementCache.h @@ -32,7 +32,7 @@ #include "../common/classes/objects_array.h" #include "../common/classes/RefCounted.h" -namespace Jrd { +namespace Firebird::Jrd { class Attachment; diff --git a/src/dsql/DsqlStatements.cpp b/src/dsql/DsqlStatements.cpp index 34aec832e7b..63617d33fab 100644 --- a/src/dsql/DsqlStatements.cpp +++ b/src/dsql/DsqlStatements.cpp @@ -31,7 +31,7 @@ #include "../jrd/cmp_proto.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // Class DsqlStatement diff --git a/src/dsql/DsqlStatements.h b/src/dsql/DsqlStatements.h index a8a7ba01910..03718764c0e 100644 --- a/src/dsql/DsqlStatements.h +++ b/src/dsql/DsqlStatements.h @@ -31,7 +31,7 @@ #include "../jrd/ntrace.h" #include "../dsql/DsqlRequests.h" -namespace Jrd { +namespace Firebird::Jrd { class DdlNode; diff --git a/src/dsql/ExprNodes.cpp b/src/dsql/ExprNodes.cpp index bb495acfb52..f1abf8e5d44 100644 --- a/src/dsql/ExprNodes.cpp +++ b/src/dsql/ExprNodes.cpp @@ -68,7 +68,7 @@ #include "../jrd/trace/TraceJrdHelpers.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; namespace { @@ -200,7 +200,7 @@ namespace } } -namespace Jrd { +namespace Firebird::Jrd { static const long LONG_POS_MAX = 2147483647; diff --git a/src/dsql/ExprNodes.h b/src/dsql/ExprNodes.h index 108daf7d984..6156da828b0 100644 --- a/src/dsql/ExprNodes.h +++ b/src/dsql/ExprNodes.h @@ -33,7 +33,7 @@ class SysFunction; -namespace Jrd { +namespace Firebird::Jrd { class ItemInfo; class DeclareVariableNode; diff --git a/src/dsql/Keywords.cpp b/src/dsql/Keywords.cpp index eea8b754f1f..e386ab7cbaa 100644 --- a/src/dsql/Keywords.cpp +++ b/src/dsql/Keywords.cpp @@ -29,7 +29,7 @@ #include "parse.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; #define PARSER_TOKEN(ident, str, nonReserved) \ diff --git a/src/dsql/Keywords.h b/src/dsql/Keywords.h index 43dff129318..03e15a709e1 100644 --- a/src/dsql/Keywords.h +++ b/src/dsql/Keywords.h @@ -29,8 +29,7 @@ #include "../jrd/MetaName.h" -namespace Jrd -{ +namespace Firebird::Jrd { class Keywords final { public: diff --git a/src/dsql/NodePrinter.h b/src/dsql/NodePrinter.h index 156e246658f..64fc7bb8a24 100644 --- a/src/dsql/NodePrinter.h +++ b/src/dsql/NodePrinter.h @@ -32,7 +32,7 @@ //#define TRIVIAL_NODE_PRINTER -namespace Jrd { +namespace Firebird::Jrd { #ifndef TRIVIAL_NODE_PRINTER diff --git a/src/dsql/Nodes.h b/src/dsql/Nodes.h index 673d358abe6..f1c875b9044 100644 --- a/src/dsql/Nodes.h +++ b/src/dsql/Nodes.h @@ -33,7 +33,7 @@ #include #include -namespace Jrd { +namespace Firebird::Jrd { class AggregateSort; class CompilerScratch; diff --git a/src/dsql/PackageNodes.epp b/src/dsql/PackageNodes.epp index 42f888c9cb0..991e4b05e09 100644 --- a/src/dsql/PackageNodes.epp +++ b/src/dsql/PackageNodes.epp @@ -41,7 +41,7 @@ using namespace Firebird; -namespace Jrd { +namespace Firebird::Jrd { using namespace Firebird; diff --git a/src/dsql/PackageNodes.h b/src/dsql/PackageNodes.h index 839e3c8d0f6..a50a8796644 100644 --- a/src/dsql/PackageNodes.h +++ b/src/dsql/PackageNodes.h @@ -26,7 +26,7 @@ #include "../dsql/DdlNodes.h" #include "../common/classes/array.h" -namespace Jrd { +namespace Firebird::Jrd { class CreateAlterPackageNode : public DdlNode diff --git a/src/dsql/Parser.cpp b/src/dsql/Parser.cpp index 6a2c9db5fa4..7a8358f1d0c 100644 --- a/src/dsql/Parser.cpp +++ b/src/dsql/Parser.cpp @@ -37,7 +37,7 @@ #endif using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; Parser::Parser(thread_db* tdbb, MemoryPool& pool, MemoryPool* aStatementPool, DsqlCompilerScratch* aScratch, diff --git a/src/dsql/Parser.h b/src/dsql/Parser.h index 265a125cc9a..71798b7f7d9 100644 --- a/src/dsql/Parser.h +++ b/src/dsql/Parser.h @@ -48,7 +48,7 @@ namespace Arg { } // namespace } // namespace -namespace Jrd { +namespace Firebird::Jrd { class Parser : public Firebird::PermanentStorage { diff --git a/src/dsql/StmtNodes.cpp b/src/dsql/StmtNodes.cpp index 3126fd74ded..846f02a598a 100644 --- a/src/dsql/StmtNodes.cpp +++ b/src/dsql/StmtNodes.cpp @@ -67,10 +67,10 @@ #include "../dsql/DsqlStatementCache.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; -namespace Jrd { +namespace Firebird::Jrd { template static void dsqlExplodeFields(dsql_rel* relation, Array >& fields, bool includeComputed); @@ -191,7 +191,7 @@ namespace //-------------------- -namespace Jrd { +namespace Firebird::Jrd { string StmtNode::internalPrint(NodePrinter& printer) const diff --git a/src/dsql/StmtNodes.h b/src/dsql/StmtNodes.h index 901224784ff..28f603dd62a 100644 --- a/src/dsql/StmtNodes.h +++ b/src/dsql/StmtNodes.h @@ -34,7 +34,7 @@ #include "../common/DecFloat.h" #include "../common/classes/TriState.h" -namespace Jrd { +namespace Firebird::Jrd { class CompoundStmtNode; class ExecBlockNode; diff --git a/src/dsql/Visitors.h b/src/dsql/Visitors.h index 4bb7eb0f188..9e3bfdb64b8 100644 --- a/src/dsql/Visitors.h +++ b/src/dsql/Visitors.h @@ -26,7 +26,7 @@ #include "../common/classes/auto.h" #include "../common/classes/NestConst.h" -namespace Jrd { +namespace Firebird::Jrd { class CompilerScratch; class ExprNode; diff --git a/src/dsql/WinNodes.cpp b/src/dsql/WinNodes.cpp index 4f03eceea4c..3e1ba4bfaa2 100644 --- a/src/dsql/WinNodes.cpp +++ b/src/dsql/WinNodes.cpp @@ -31,9 +31,9 @@ #include "../jrd/recsrc/RecordSource.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; -namespace Jrd { +namespace Firebird::Jrd { WinFuncNode::WinFuncNode(MemoryPool& pool, const AggInfo& aAggInfo, ValueExprNode* aArg) diff --git a/src/dsql/WinNodes.h b/src/dsql/WinNodes.h index bc4cfa8e3e5..179da85f9ea 100644 --- a/src/dsql/WinNodes.h +++ b/src/dsql/WinNodes.h @@ -27,7 +27,7 @@ #include "../dsql/Nodes.h" #include "../dsql/NodePrinter.h" -namespace Jrd { +namespace Firebird::Jrd { // DENSE_RANK function. diff --git a/src/dsql/ddl.cpp b/src/dsql/ddl.cpp index c45291b3bfc..3af03215f4c 100644 --- a/src/dsql/ddl.cpp +++ b/src/dsql/ddl.cpp @@ -106,7 +106,7 @@ #include "../common/prett_proto.h" #endif -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; diff --git a/src/dsql/ddl_proto.h b/src/dsql/ddl_proto.h index f67187cdfaf..32a19f92681 100644 --- a/src/dsql/ddl_proto.h +++ b/src/dsql/ddl_proto.h @@ -30,7 +30,7 @@ // This is a DSQL internal file. Not to be used by anything but // the DSQL module itself. -namespace Jrd { +namespace Firebird::Jrd { class DsqlCompilerScratch; class dsql_fld; }; diff --git a/src/dsql/dsql.cpp b/src/dsql/dsql.cpp index 2beb3594acb..6381c11a9ec 100644 --- a/src/dsql/dsql.cpp +++ b/src/dsql/dsql.cpp @@ -81,7 +81,7 @@ #include #endif -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; diff --git a/src/dsql/dsql.h b/src/dsql/dsql.h index c81cf09dff2..d698b8e2773 100644 --- a/src/dsql/dsql.h +++ b/src/dsql/dsql.h @@ -73,8 +73,7 @@ inline constexpr const char* NEW_CONTEXT_NAME = "NEW"; inline constexpr int OLD_CONTEXT_VALUE = 0; inline constexpr int NEW_CONTEXT_VALUE = 1; -namespace Jrd -{ +namespace Firebird::Jrd { class Attachment; class Database; class DsqlCompilerScratch; @@ -110,7 +109,7 @@ namespace Jrd #include "../common/dsc.h" -namespace Jrd { +namespace Firebird::Jrd { // blocks used to cache metadata diff --git a/src/dsql/dsql_proto.h b/src/dsql/dsql_proto.h index 89a6e2b4c35..a6fe7368ba0 100644 --- a/src/dsql/dsql_proto.h +++ b/src/dsql/dsql_proto.h @@ -28,7 +28,7 @@ #include "../common/classes/array.h" #include "firebird/Interface.h" -namespace Jrd { +namespace Firebird::Jrd { class Attachment; class jrd_tra; class DsqlDmlRequest; diff --git a/src/dsql/errd.cpp b/src/dsql/errd.cpp index 593e42886a2..a2f2aa37add 100644 --- a/src/dsql/errd.cpp +++ b/src/dsql/errd.cpp @@ -54,7 +54,7 @@ #include "../yvalve/gds_proto.h" #include "../common/utils_proto.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; diff --git a/src/dsql/gen.cpp b/src/dsql/gen.cpp index cefff20795d..be3efecaa52 100644 --- a/src/dsql/gen.cpp +++ b/src/dsql/gen.cpp @@ -59,7 +59,7 @@ #include "iberror.h" #include "../common/StatusArg.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; static void gen_plan(DsqlCompilerScratch*, const PlanNode*); diff --git a/src/dsql/gen_proto.h b/src/dsql/gen_proto.h index 6edf97052be..95d062375b5 100644 --- a/src/dsql/gen_proto.h +++ b/src/dsql/gen_proto.h @@ -24,8 +24,7 @@ #ifndef DSQL_GEN_PROTO_H #define DSQL_GEN_PROTO_H -namespace Jrd -{ +namespace Firebird::Jrd { class ExprNode; class ValueListNode; } diff --git a/src/dsql/make.cpp b/src/dsql/make.cpp index e30e24359ba..da57aa0bc03 100644 --- a/src/dsql/make.cpp +++ b/src/dsql/make.cpp @@ -60,7 +60,7 @@ #include "../common/config/config.h" #include "../common/StatusArg.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; // DsqlDescMaker methods diff --git a/src/dsql/make_proto.h b/src/dsql/make_proto.h index 270161fca9c..d37894eea3f 100644 --- a/src/dsql/make_proto.h +++ b/src/dsql/make_proto.h @@ -29,7 +29,7 @@ #include "../dsql/sym.h" #include "../jrd/intl.h" -namespace Jrd { +namespace Firebird::Jrd { class dsql_ctx; class dsql_fld; class TypeClause; diff --git a/src/dsql/metd.epp b/src/dsql/metd.epp index 60827137d0e..d26e83071a9 100644 --- a/src/dsql/metd.epp +++ b/src/dsql/metd.epp @@ -56,7 +56,7 @@ #include "../common/classes/init.h" #include "../jrd/LocalTemporaryTable.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; // NOTE: The static definition of DB and gds_trans by gpre will not diff --git a/src/dsql/metd_proto.h b/src/dsql/metd_proto.h index 883a1853739..37ad115e1a8 100644 --- a/src/dsql/metd_proto.h +++ b/src/dsql/metd_proto.h @@ -31,7 +31,7 @@ #include "../common/classes/fb_pair.h" // forward declarations -namespace Jrd { +namespace Firebird::Jrd { typedef Firebird::GenericMap MetaNamePairMap; class DsqlRequest; diff --git a/src/dsql/movd.cpp b/src/dsql/movd.cpp index af6f8357f35..a353696e1cb 100644 --- a/src/dsql/movd.cpp +++ b/src/dsql/movd.cpp @@ -28,7 +28,7 @@ #include "../jrd/mov_proto.h" #include "../dsql/movd_proto.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; diff --git a/src/dsql/pass1.cpp b/src/dsql/pass1.cpp index cad9b6cc039..f4009b0c40d 100644 --- a/src/dsql/pass1.cpp +++ b/src/dsql/pass1.cpp @@ -175,7 +175,7 @@ #include "../common/config/config.h" #include "../common/StatusArg.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; diff --git a/src/dsql/pass1_proto.h b/src/dsql/pass1_proto.h index 4eb7e99fe5c..190dd567ffd 100644 --- a/src/dsql/pass1_proto.h +++ b/src/dsql/pass1_proto.h @@ -24,8 +24,7 @@ #ifndef DSQL_PASS1_PROTO_H #define DSQL_PASS1_PROTO_H -namespace Jrd -{ +namespace Firebird::Jrd { class CompoundStmtNode; class DeclareCursorNode; class DsqlMapNode; diff --git a/src/dsql/sym.h b/src/dsql/sym.h index e294cbbbd6f..5069ff1cc42 100644 --- a/src/dsql/sym.h +++ b/src/dsql/sym.h @@ -24,7 +24,7 @@ #ifndef DSQL_SYM_H #define DSQL_SYM_H -namespace Jrd { +namespace Firebird::Jrd { // possible symbol types diff --git a/src/dsql/utld.cpp b/src/dsql/utld.cpp index 5d142f77e4f..9427e858c04 100644 --- a/src/dsql/utld.cpp +++ b/src/dsql/utld.cpp @@ -42,7 +42,7 @@ #include "../yvalve/gds_proto.h" #include "../common/classes/init.h" -using namespace Jrd; +using namespace Firebird::Jrd; /** diff --git a/src/jrd/Attachment.cpp b/src/jrd/Attachment.cpp index cc4c22550da..3385495727f 100644 --- a/src/jrd/Attachment.cpp +++ b/src/jrd/Attachment.cpp @@ -60,7 +60,7 @@ #include "../common/classes/RefMutex.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; /// class ActiveSnapshots diff --git a/src/jrd/Attachment.h b/src/jrd/Attachment.h index 5361985ba01..5605b362b2b 100644 --- a/src/jrd/Attachment.h +++ b/src/jrd/Attachment.h @@ -57,7 +57,7 @@ #include -namespace EDS { +namespace Firebird::Jrd::EDS { class Connection; } @@ -66,8 +66,7 @@ namespace Replication class TableMatcher; } -namespace Jrd -{ +namespace Firebird::Jrd { class thread_db; class Database; class jrd_tra; diff --git a/src/jrd/BlobUtil.cpp b/src/jrd/BlobUtil.cpp index 18ca4a4270c..f566629345e 100644 --- a/src/jrd/BlobUtil.cpp +++ b/src/jrd/BlobUtil.cpp @@ -25,7 +25,7 @@ #include "../jrd/blb.h" #include "../jrd/tra.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; @@ -59,7 +59,7 @@ namespace } } -namespace Jrd { +namespace Firebird::Jrd { //-------------------------------------- diff --git a/src/jrd/BlobUtil.h b/src/jrd/BlobUtil.h index b26f596c6df..3a9eed10812 100644 --- a/src/jrd/BlobUtil.h +++ b/src/jrd/BlobUtil.h @@ -30,7 +30,7 @@ #include "../common/status.h" #include "../jrd/SystemPackages.h" -namespace Jrd { +namespace Firebird::Jrd { class BlobUtilPackage : public SystemPackage diff --git a/src/jrd/CacheVector.cpp b/src/jrd/CacheVector.cpp index 0f0db147e07..621c8c614d7 100644 --- a/src/jrd/CacheVector.cpp +++ b/src/jrd/CacheVector.cpp @@ -35,7 +35,7 @@ #include "../jrd/met.h" #include "../jrd/tpc_proto.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; // class TransactionNumber diff --git a/src/jrd/CacheVector.h b/src/jrd/CacheVector.h index 14c00b90278..df174162dc2 100644 --- a/src/jrd/CacheVector.h +++ b/src/jrd/CacheVector.h @@ -40,7 +40,7 @@ #include "../jrd/tra_proto.h" #include "../jrd/QualifiedName.h" -namespace Jrd { +namespace Firebird::Jrd { class thread_db; class Lock; diff --git a/src/jrd/CharSetContainer.cpp b/src/jrd/CharSetContainer.cpp index b4bfef4e9a8..f87b3a1aa04 100644 --- a/src/jrd/CharSetContainer.cpp +++ b/src/jrd/CharSetContainer.cpp @@ -28,7 +28,7 @@ #include "../jrd/jrd.h" #include "../jrd/obj.h" -using namespace Jrd; +using namespace Firebird::Jrd; CharSetVers* CharSetVers::create(thread_db* tdbb, MemoryPool& pool, Cached::CharSet* csp) { diff --git a/src/jrd/CharSetContainer.h b/src/jrd/CharSetContainer.h index c2945ca489e..859ebd3135b 100644 --- a/src/jrd/CharSetContainer.h +++ b/src/jrd/CharSetContainer.h @@ -44,7 +44,7 @@ class CsConvert; } -namespace Jrd { +namespace Firebird::Jrd { struct SubtypeInfo; diff --git a/src/jrd/Coercion.cpp b/src/jrd/Coercion.cpp index 8d635bfd580..ee7ce9cca8a 100644 --- a/src/jrd/Coercion.cpp +++ b/src/jrd/Coercion.cpp @@ -34,7 +34,7 @@ #include "../jrd/align.h" #include "../jrd/DataTypeUtil.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; static const USHORT FROM_MASK = FLD_has_len | FLD_has_chset | FLD_has_scale | diff --git a/src/jrd/Coercion.h b/src/jrd/Coercion.h index 17a8c6a88b1..cb16d9cb8b6 100644 --- a/src/jrd/Coercion.h +++ b/src/jrd/Coercion.h @@ -33,8 +33,7 @@ #include "../common/classes/array.h" #include "../common/dsc.h" -namespace Jrd -{ +namespace Firebird::Jrd { class thread_db; class TypeClause; diff --git a/src/jrd/Collation.cpp b/src/jrd/Collation.cpp index 1eb74293cd6..83505b01e75 100644 --- a/src/jrd/Collation.cpp +++ b/src/jrd/Collation.cpp @@ -105,7 +105,7 @@ #include "../common/SimilarToRegex.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; namespace { @@ -1104,7 +1104,7 @@ Collation* newCollation(MemoryPool& pool, TTypeId id, texttype* tt, USHORT attri //------------- -namespace Jrd { +namespace Firebird::Jrd { Collation* Collation::createInstance(MemoryPool& pool, TTypeId id, texttype* tt, USHORT attributes, CharSet* cs) diff --git a/src/jrd/Collation.h b/src/jrd/Collation.h index 7fa8b24ec5f..ae8af3d990f 100644 --- a/src/jrd/Collation.h +++ b/src/jrd/Collation.h @@ -43,7 +43,7 @@ class CharSet; } -namespace Jrd { +namespace Firebird::Jrd { class Lock; class BaseSubstringSimilarMatcher; diff --git a/src/jrd/ConfigTable.cpp b/src/jrd/ConfigTable.cpp index 9fb4f1a2e2b..a6f99759f42 100644 --- a/src/jrd/ConfigTable.cpp +++ b/src/jrd/ConfigTable.cpp @@ -24,7 +24,7 @@ #include "../jrd/ini.h" #include "../jrd/ids.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; diff --git a/src/jrd/ConfigTable.h b/src/jrd/ConfigTable.h index a8932f04813..1f176440de9 100644 --- a/src/jrd/ConfigTable.h +++ b/src/jrd/ConfigTable.h @@ -29,8 +29,7 @@ #include "../jrd/recsrc/RecordSource.h" -namespace Jrd -{ +namespace Firebird::Jrd { class ConfigTable : public SnapshotData { diff --git a/src/jrd/CryptoManager.cpp b/src/jrd/CryptoManager.cpp index 6379180e35d..88cd908c8fb 100644 --- a/src/jrd/CryptoManager.cpp +++ b/src/jrd/CryptoManager.cpp @@ -73,8 +73,7 @@ namespace } -namespace Jrd -{ +namespace Firebird::Jrd { class Header { protected: diff --git a/src/jrd/CryptoManager.h b/src/jrd/CryptoManager.h index d78b897ade8..26d4b9404f2 100644 --- a/src/jrd/CryptoManager.h +++ b/src/jrd/CryptoManager.h @@ -57,7 +57,7 @@ class ClumpletReader; } -namespace Jrd { +namespace Firebird::Jrd { class Database; class Attachment; diff --git a/src/jrd/DataTypeUtil.cpp b/src/jrd/DataTypeUtil.cpp index 0199e78fc9d..5c7dfaa6a04 100644 --- a/src/jrd/DataTypeUtil.cpp +++ b/src/jrd/DataTypeUtil.cpp @@ -350,7 +350,7 @@ bool DataTypeUtilBase::makeBlobOrText(dsc* result, const dsc* arg, bool force) } -namespace Jrd { +namespace Firebird::Jrd { UCHAR DataTypeUtil::maxBytesPerChar(CSetId charSet) { diff --git a/src/jrd/DataTypeUtil.h b/src/jrd/DataTypeUtil.h index 957687d713d..3b07e4db108 100644 --- a/src/jrd/DataTypeUtil.h +++ b/src/jrd/DataTypeUtil.h @@ -61,7 +61,7 @@ class DataTypeUtilBase }; -namespace Jrd { +namespace Firebird::Jrd { class thread_db; diff --git a/src/jrd/Database.cpp b/src/jrd/Database.cpp index c133351d659..083cf4be6f9 100644 --- a/src/jrd/Database.cpp +++ b/src/jrd/Database.cpp @@ -56,8 +56,7 @@ namespace } } -namespace Jrd -{ +namespace Firebird::Jrd { bool Database::onRawDevice() const { const auto pageSpace = dbb_page_manager.findPageSpace(DB_PAGE_SPACE); diff --git a/src/jrd/Database.h b/src/jrd/Database.h index f8bf181a969..3d9e0c4f17b 100644 --- a/src/jrd/Database.h +++ b/src/jrd/Database.h @@ -81,8 +81,7 @@ #define SPTHR_DEBUG(A) -namespace Jrd -{ +namespace Firebird::Jrd { template class vec; class jrd_rel; class Shadow; diff --git a/src/jrd/DbCreators.cpp b/src/jrd/DbCreators.cpp index 01289f892e1..eee6a750ff7 100644 --- a/src/jrd/DbCreators.cpp +++ b/src/jrd/DbCreators.cpp @@ -54,12 +54,12 @@ #define DBC_DEBUG(A) using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Auth; namespace { -void check(const char* s, IStatus* st) +void checkStatus(const char* s, IStatus* st) { if (!(st->getState() & IStatus::STATE_ERRORS)) return; @@ -84,7 +84,7 @@ bool openDb(const char* securityDb, RefPtr& att, RefPtrgetState() & IStatus::STATE_ERRORS) { if (!fb_utils::containsErrorCode(st->getErrors(), isc_io_error)) - check("IProvider::attachDatabase", &st); + checkStatus("IProvider::attachDatabase", &st); // missing security DB - checking granted rights not possible return false; @@ -94,7 +94,7 @@ bool openDb(const char* securityDb, RefPtr& att, RefPtrstartTransaction(&st, readOnly.getBufferLength(), readOnly.getBuffer())); - check("IAttachment::startTransaction", &st); + checkStatus("IAttachment::startTransaction", &st); return true; } @@ -102,7 +102,7 @@ bool openDb(const char* securityDb, RefPtr& att, RefPtrgetInfo(&st, sizeof(info), info, sizeof(buffer), buffer); - check("IAttachment::getInfo", &st); + checkStatus("IAttachment::getInfo", &st); int dialect = SQL_DIALECT_V5; // reasonable default @@ -158,7 +158,7 @@ CreateGrant checkCreateDatabaseGrant(const MetaString& userName, const MetaStrin // isc_dsql_relation_err when exec SQL - i.e. table RDB$USER_PRIVILEGES // is missing due to non-FB security DB if (!fb_utils::containsErrorCode(st->getErrors(), isc_dsql_relation_err)) - check("IAttachment::execute", &st); + checkStatus("IAttachment::execute", &st); role = ""; } @@ -200,7 +200,7 @@ CreateGrant checkCreateDatabaseGrant(const MetaString& userName, const MetaStrin // is missing due to non-FB3 security DB return CreateGrant::NONE; } - check("IAttachment::execute", &st); + checkStatus("IAttachment::execute", &st); } if (cnt > 0) @@ -235,7 +235,7 @@ CreateGrant checkCreateDatabaseGrant(const MetaString& userName, const MetaStrin " from role_tree t join system.rdb$roles r on t.nm = r.rdb$role_name "; RefPtr rs(REF_NO_INCR, att->openCursor(&st, tra, 0, sql, SQL_DIALECT_V6, par2.getMetadata(), par2.getBuffer(), res2.getMetadata(), NULL, 0)); - check("IAttachment::execute", &st); + checkStatus("IAttachment::execute", &st); UserId::Privileges privileges, wrk; @@ -245,7 +245,7 @@ CreateGrant checkCreateDatabaseGrant(const MetaString& userName, const MetaStrin privileges |= wrk; } - check("IResultSet::fetchNext", &st); + checkStatus("IResultSet::fetchNext", &st); return wrk.test(CREATE_DATABASE) ? CreateGrant::GRANTED : CreateGrant::NONE; } @@ -310,7 +310,7 @@ RecordBuffer* DbCreatorsList::getList(thread_db* tdbb, RelationPermanent* relati if (st->getState() & IStatus::STATE_ERRORS) { if (!fb_utils::containsErrorCode(st->getErrors(), isc_dsql_relation_err)) - check("IAttachment::openCursor", &st); + checkStatus("IAttachment::openCursor", &st); // isc_dsql_relation_err when opening cursor - i.e. table // is missing due to non-FB3 security DB @@ -339,7 +339,7 @@ RecordBuffer* DbCreatorsList::getList(thread_db* tdbb, RelationPermanent* relati buffer->store(record); } - check("IResultSet::fetchNext", &st); + checkStatus("IResultSet::fetchNext", &st); } catch (const Exception&) { diff --git a/src/jrd/DbCreators.h b/src/jrd/DbCreators.h index d3a6a5ecc11..d01e5cd817b 100644 --- a/src/jrd/DbCreators.h +++ b/src/jrd/DbCreators.h @@ -34,7 +34,7 @@ #include "../jrd/recsrc/RecordSource.h" #include "../jrd/Monitoring.h" -namespace Jrd { +namespace Firebird::Jrd { enum class CreateGrant { diff --git a/src/jrd/DebugInterface.cpp b/src/jrd/DebugInterface.cpp index 72e27b971b7..b79e3958047 100644 --- a/src/jrd/DebugInterface.cpp +++ b/src/jrd/DebugInterface.cpp @@ -25,7 +25,7 @@ #include "../jrd/DebugInterface.h" #include "../jrd/blb_proto.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; void DBG_parse_debug_info(thread_db* tdbb, bid* blob_id, DbgInfo& dbgInfo) diff --git a/src/jrd/DebugInterface.h b/src/jrd/DebugInterface.h index 63952cfa151..0790a1b2184 100644 --- a/src/jrd/DebugInterface.h +++ b/src/jrd/DebugInterface.h @@ -35,7 +35,7 @@ inline constexpr UCHAR DBG_INFO_VERSION_1 = UCHAR(1); inline constexpr UCHAR DBG_INFO_VERSION_2 = UCHAR(2); inline constexpr UCHAR CURRENT_DBG_INFO_VERSION = DBG_INFO_VERSION_2; -namespace Jrd { +namespace Firebird::Jrd { class MetaName; } diff --git a/src/jrd/EngineInterface.h b/src/jrd/EngineInterface.h index 3a2adf4fcc6..67be74429d0 100644 --- a/src/jrd/EngineInterface.h +++ b/src/jrd/EngineInterface.h @@ -28,7 +28,7 @@ #include "../common/StatementMetadata.h" #include "../common/classes/RefCounted.h" -namespace Jrd { +namespace Firebird::Jrd { // Engine objects used by interface objects class blb; diff --git a/src/jrd/ExtEngineManager.cpp b/src/jrd/ExtEngineManager.cpp index c2facb5fd24..8546a29d8dc 100644 --- a/src/jrd/ExtEngineManager.cpp +++ b/src/jrd/ExtEngineManager.cpp @@ -61,7 +61,7 @@ #include "../common/classes/GetPlugins.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; static EngineCheckout::Type checkoutType(IExternalEngine* engine); diff --git a/src/jrd/ExtEngineManager.h b/src/jrd/ExtEngineManager.h index 5528d6af0c7..dc1454261b9 100644 --- a/src/jrd/ExtEngineManager.h +++ b/src/jrd/ExtEngineManager.h @@ -42,7 +42,7 @@ struct dsc; -namespace Jrd { +namespace Firebird::Jrd { class thread_db; class jrd_prc; diff --git a/src/jrd/Function.epp b/src/jrd/Function.epp index d29f41a2a82..7eb426f520f 100644 --- a/src/jrd/Function.epp +++ b/src/jrd/Function.epp @@ -53,7 +53,7 @@ #include "../jrd/Function.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; DATABASE DB = FILENAME "ODS.RDB"; diff --git a/src/jrd/Function.h b/src/jrd/Function.h index 1bac8bbc65d..2ad5e3439fa 100644 --- a/src/jrd/Function.h +++ b/src/jrd/Function.h @@ -30,8 +30,7 @@ #include "../jrd/CacheVector.h" #include "../jrd/lck.h" -namespace Jrd -{ +namespace Firebird::Jrd { class ValueListNode; class Function final : public Routine diff --git a/src/jrd/GarbageCollector.cpp b/src/jrd/GarbageCollector.cpp index 9c0642073a0..ddac6cc561b 100644 --- a/src/jrd/GarbageCollector.cpp +++ b/src/jrd/GarbageCollector.cpp @@ -24,10 +24,10 @@ #include "../jrd/GarbageCollector.h" #include "../jrd/tra.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; -namespace Jrd { +namespace Firebird::Jrd { void GarbageCollector::RelationData::clear() diff --git a/src/jrd/GarbageCollector.h b/src/jrd/GarbageCollector.h index 8f9ef6791e8..02ced0228df 100644 --- a/src/jrd/GarbageCollector.h +++ b/src/jrd/GarbageCollector.h @@ -30,7 +30,7 @@ #include "../jrd/sbm.h" -namespace Jrd { +namespace Firebird::Jrd { class Database; class Savepoint; diff --git a/src/jrd/GlobalRWLock.cpp b/src/jrd/GlobalRWLock.cpp index 57b6dbeeeeb..a7a9ae30dc5 100644 --- a/src/jrd/GlobalRWLock.cpp +++ b/src/jrd/GlobalRWLock.cpp @@ -46,7 +46,7 @@ IMPLEMENT_TRACE_ROUTINE(cos_trace, "COS") #endif using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; int GlobalRWLock::blocking_ast_cached_lock(void* ast_object) diff --git a/src/jrd/GlobalRWLock.h b/src/jrd/GlobalRWLock.h index e5df49a4c73..4057f918141 100644 --- a/src/jrd/GlobalRWLock.h +++ b/src/jrd/GlobalRWLock.h @@ -50,7 +50,7 @@ DEFINE_TRACE_ROUTINE(cos_trace); #endif -namespace Jrd { +namespace Firebird::Jrd { enum lck_t : UCHAR; diff --git a/src/jrd/HazardPtr.h b/src/jrd/HazardPtr.h index 438aa5bfc0c..6e0a6427965 100644 --- a/src/jrd/HazardPtr.h +++ b/src/jrd/HazardPtr.h @@ -38,7 +38,7 @@ extern atomics::atomic totHaz; -namespace Jrd { +namespace Firebird::Jrd { class HazardObject { diff --git a/src/jrd/InitCDSLib.cpp b/src/jrd/InitCDSLib.cpp index dd27722a90d..e9d644900e1 100644 --- a/src/jrd/InitCDSLib.cpp +++ b/src/jrd/InitCDSLib.cpp @@ -41,8 +41,7 @@ using namespace Firebird; -namespace Jrd -{ +namespace Firebird::Jrd { Array* InitCDS::m_pools = nullptr; MemoryPool* InitCDS::m_pool = nullptr; diff --git a/src/jrd/InitCDSLib.h b/src/jrd/InitCDSLib.h index 1aea3705351..af55c649a4b 100644 --- a/src/jrd/InitCDSLib.h +++ b/src/jrd/InitCDSLib.h @@ -35,8 +35,7 @@ //#define DEBUG_CDS_MEMORY -namespace Jrd -{ +namespace Firebird::Jrd { class InitCDS { diff --git a/src/jrd/IntlManager.cpp b/src/jrd/IntlManager.cpp index 3c4c74c1547..54cb22d927f 100644 --- a/src/jrd/IntlManager.cpp +++ b/src/jrd/IntlManager.cpp @@ -68,7 +68,7 @@ namespace }; } -namespace Jrd { +namespace Firebird::Jrd { struct ExternalInfo diff --git a/src/jrd/IntlManager.h b/src/jrd/IntlManager.h index 3b28562697d..68b7e15b395 100644 --- a/src/jrd/IntlManager.h +++ b/src/jrd/IntlManager.h @@ -37,7 +37,7 @@ struct charset; struct texttype; -namespace Jrd { +namespace Firebird::Jrd { class IntlManager { diff --git a/src/jrd/KeywordsTable.cpp b/src/jrd/KeywordsTable.cpp index e2b7cb7da7d..c9e07adaa15 100644 --- a/src/jrd/KeywordsTable.cpp +++ b/src/jrd/KeywordsTable.cpp @@ -25,7 +25,7 @@ #include "../jrd/ids.h" #include "../common/Token.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; diff --git a/src/jrd/KeywordsTable.h b/src/jrd/KeywordsTable.h index 6f771d0aefd..2f884e36bd8 100644 --- a/src/jrd/KeywordsTable.h +++ b/src/jrd/KeywordsTable.h @@ -29,8 +29,7 @@ #include "../jrd/recsrc/RecordSource.h" -namespace Jrd -{ +namespace Firebird::Jrd { class KeywordsTable : public SnapshotData { diff --git a/src/jrd/LocalTemporaryTable.h b/src/jrd/LocalTemporaryTable.h index f40ea57e7e2..8fb5a522aad 100644 --- a/src/jrd/LocalTemporaryTable.h +++ b/src/jrd/LocalTemporaryTable.h @@ -32,8 +32,7 @@ #include "../common/classes/objects_array.h" #include -namespace Jrd -{ +namespace Firebird::Jrd { class jrd_rel; class LocalTemporaryTable diff --git a/src/jrd/Mapping.cpp b/src/jrd/Mapping.cpp index 10090d0be9b..b3449773237 100644 --- a/src/jrd/Mapping.cpp +++ b/src/jrd/Mapping.cpp @@ -57,7 +57,7 @@ #define MAP_DEBUG(A) using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; namespace { @@ -75,7 +75,7 @@ constexpr const char* NM_ROLE = "Role"; constexpr const char* NM_USER = "User"; constexpr const char* TYPE_SEEN = "Seen"; -void check(const char* s, const IStatus* st) +void checkStatus(const char* s, const IStatus* st) { if (!(st->getState() & IStatus::STATE_ERRORS)) return; @@ -87,7 +87,7 @@ void check(const char* s, const IStatus* st) } // anonymous namespace -namespace Jrd { +namespace Firebird::Jrd { class AuthWriter : public ClumpletWriter { @@ -187,7 +187,7 @@ bool Mapping::DbHandle::attach(const char* aliasDb, ICryptKeyCallback* cryptCb) if (cryptCb) { prov->setDbCryptCallback(&st, cryptCb); - check("IProvider::setDbCryptCallback", &st); + checkStatus("IProvider::setDbCryptCallback", &st); } ClumpletWriter embeddedSysdba(ClumpletWriter::dpbList, MAX_DPB_SIZE); @@ -208,7 +208,7 @@ bool Mapping::DbHandle::attach(const char* aliasDb, ICryptKeyCallback* cryptCb) const bool missing = fb_utils::containsErrorCode(s, isc_io_error); down = fb_utils::containsErrorCode(s, isc_shutdown); if (!(missing || down)) - check("IProvider::attachDatabase", &st); + checkStatus("IProvider::attachDatabase", &st); // down/missing DB is not a reason to fail mapping } @@ -334,7 +334,7 @@ bool Mapping::Cache::populate(IAttachment *att) readOnly.insertTag(isc_tpb_read); readOnly.insertTag(isc_tpb_wait); tra = att->startTransaction(&st, readOnly.getBufferLength(), readOnly.getBuffer()); - check("IAttachment::startTransaction", &st); + checkStatus("IAttachment::startTransaction", &st); Message mMap; Field usng(mMap, 1); @@ -360,7 +360,7 @@ bool Mapping::Cache::populate(IAttachment *att) dataFlag = true; return false; } - check("IAttachment::openCursor", &st); + checkStatus("IAttachment::openCursor", &st); } while (curs->fetchNext(&st, mMap.getBuffer()) == IStatus::RESULT_OK) @@ -381,14 +381,14 @@ bool Mapping::Cache::populate(IAttachment *att) MAP_DEBUG(fprintf(stderr, "Add = %s\n", map->makeHashKey().c_str())); add(map); } - check("IResultSet::fetchNext", &st); + checkStatus("IResultSet::fetchNext", &st); curs->close(&st); - check("IResultSet::close", &st); + checkStatus("IResultSet::close", &st); curs = nullptr; tra->rollback(&st); - check("ITransaction::rollback", &st); + checkStatus("ITransaction::rollback", &st); tra = nullptr; dataFlag = true; @@ -1277,7 +1277,7 @@ void resetMap(const char* db, ULONG index) } // anonymous namespace -namespace Jrd { +namespace Firebird::Jrd { Mapping::Mapping(const ULONG f, Firebird::ICryptKeyCallback* cryptCb) : flags(f), @@ -1716,7 +1716,7 @@ RecordBuffer* MappingList::getList(thread_db* tdbb, const RelationPermanent* rel if (st->getState() & IStatus::STATE_ERRORS) { if (!fb_utils::containsErrorCode(st->getErrors(), isc_io_error)) - check("IProvider::attachDatabase", &st); + checkStatus("IProvider::attachDatabase", &st); // In embedded mode we are not raising any errors - silent return if (MasterInterfacePtr()->serverMode(-1) < 0) @@ -1729,7 +1729,7 @@ RecordBuffer* MappingList::getList(thread_db* tdbb, const RelationPermanent* rel readOnly.insertTag(isc_tpb_read); readOnly.insertTag(isc_tpb_wait); tra = att->startTransaction(&st, readOnly.getBufferLength(), readOnly.getBuffer()); - check("IAttachment::startTransaction", &st); + checkStatus("IAttachment::startTransaction", &st); Message mMap; Field name(mMap, MAX_SQL_IDENTIFIER_SIZE); @@ -1750,7 +1750,7 @@ RecordBuffer* MappingList::getList(thread_db* tdbb, const RelationPermanent* rel if (st->getState() & IStatus::STATE_ERRORS) { if (!fb_utils::containsErrorCode(st->getErrors(), isc_dsql_relation_err)) - check("IAttachment::openCursor", &st); + checkStatus("IAttachment::openCursor", &st); // isc_dsql_relation_err when opening cursor - i.e. table RDB$AUTH_MAPPING // is missing due to non-FB3 security DB @@ -1817,12 +1817,12 @@ RecordBuffer* MappingList::getList(thread_db* tdbb, const RelationPermanent* rel if (!desc.null) { RefPtr blb(REF_NO_INCR, att->openBlob(&st, tra, &desc, 0, nullptr)); - check("IAttachment::openBlob", &st); + checkStatus("IAttachment::openBlob", &st); string buf; constexpr FB_SIZE_T FLD_LIMIT = MAX_COLUMN_SIZE; unsigned length = 0; blb->getSegment(&st, FLD_LIMIT, buf.getBuffer(FLD_LIMIT), &length); - check("IBlob::getSegment", &st); + checkStatus("IBlob::getSegment", &st); putField(tdbb, record, DumpField(f_sec_map_comment, VALUE_STRING, length, buf.c_str())); @@ -1830,18 +1830,18 @@ RecordBuffer* MappingList::getList(thread_db* tdbb, const RelationPermanent* rel buffer->store(record); } - check("IResultSet::fetchNext", &st); + checkStatus("IResultSet::fetchNext", &st); curs->close(&st); - check("IResultSet::close", &st); + checkStatus("IResultSet::close", &st); curs = nullptr; tra->rollback(&st); - check("ITransaction::rollback", &st); + checkStatus("ITransaction::rollback", &st); tra = nullptr; att->detach(&st); - check("IAttachment::detach", &st); + checkStatus("IAttachment::detach", &st); att = nullptr; } catch (const Exception&) diff --git a/src/jrd/Mapping.h b/src/jrd/Mapping.h index 298f3e8e325..57092e78812 100644 --- a/src/jrd/Mapping.h +++ b/src/jrd/Mapping.h @@ -38,7 +38,7 @@ #include "../jrd/Monitoring.h" #include "../jrd/scl.h" -namespace Jrd { +namespace Firebird::Jrd { class AuthWriter; diff --git a/src/jrd/MetaName.cpp b/src/jrd/MetaName.cpp index d1506b384d6..d87240acf02 100644 --- a/src/jrd/MetaName.cpp +++ b/src/jrd/MetaName.cpp @@ -36,7 +36,7 @@ #include "../common/classes/RefMutex.h" #include "../jrd/jrd.h" -namespace Jrd { +namespace Firebird::Jrd { int MetaName::compare(const char* s, FB_SIZE_T len) const { diff --git a/src/jrd/MetaName.h b/src/jrd/MetaName.h index 1d24c150e0c..af06b1143bb 100644 --- a/src/jrd/MetaName.h +++ b/src/jrd/MetaName.h @@ -52,7 +52,7 @@ #endif -namespace Jrd { +namespace Firebird::Jrd { class Dictionary : public Firebird::PermanentStorage { diff --git a/src/jrd/Monitoring.cpp b/src/jrd/Monitoring.cpp index df41d643ff9..da2394fb1b2 100644 --- a/src/jrd/Monitoring.cpp +++ b/src/jrd/Monitoring.cpp @@ -60,7 +60,7 @@ constexpr const char* SCRATCH = "fb_monitor_"; using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; namespace diff --git a/src/jrd/Monitoring.h b/src/jrd/Monitoring.h index f86e779edfb..78a7a2d993d 100644 --- a/src/jrd/Monitoring.h +++ b/src/jrd/Monitoring.h @@ -33,7 +33,7 @@ #include "../jrd/TempSpace.h" #include -namespace Jrd { +namespace Firebird::Jrd { // forward declarations class jrd_rel; diff --git a/src/jrd/PageToBufferMap.h b/src/jrd/PageToBufferMap.h index 36fe04ea8c3..497766723bb 100644 --- a/src/jrd/PageToBufferMap.h +++ b/src/jrd/PageToBufferMap.h @@ -29,7 +29,7 @@ #include "../common/classes/Hash.h" #include "../jrd/cch.h" -namespace Jrd { +namespace Firebird::Jrd { // PageToBufferMap used to cache pointers to the often used page buffers. // Its purpose is to avoid more costly usage of shared hash table. diff --git a/src/jrd/PreparedStatement.cpp b/src/jrd/PreparedStatement.cpp index 4c4c078747e..f91277b0924 100644 --- a/src/jrd/PreparedStatement.cpp +++ b/src/jrd/PreparedStatement.cpp @@ -173,7 +173,7 @@ namespace } -namespace Jrd { +namespace Firebird::Jrd { // Move data from result set message to user variables. diff --git a/src/jrd/PreparedStatement.h b/src/jrd/PreparedStatement.h index 5168662e8ec..95b6dbeceac 100644 --- a/src/jrd/PreparedStatement.h +++ b/src/jrd/PreparedStatement.h @@ -36,7 +36,7 @@ #include "../common/classes/MetaString.h" #include "../jrd/MetaName.h" -namespace Jrd { +namespace Firebird::Jrd { class thread_db; class jrd_tra; diff --git a/src/jrd/ProfilerManager.cpp b/src/jrd/ProfilerManager.cpp index 9a01cc03fd9..fa655d9424e 100644 --- a/src/jrd/ProfilerManager.cpp +++ b/src/jrd/ProfilerManager.cpp @@ -38,7 +38,7 @@ #include "../jrd/Statement.h" #include -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; diff --git a/src/jrd/ProfilerManager.h b/src/jrd/ProfilerManager.h index 173ea283a2d..d948d425e42 100644 --- a/src/jrd/ProfilerManager.h +++ b/src/jrd/ProfilerManager.h @@ -36,7 +36,7 @@ #include "../jrd/SystemPackages.h" #include "../jrd/Statement.h" -namespace Jrd { +namespace Firebird::Jrd { class Attachment; class Request; diff --git a/src/jrd/ProtectRelations.h b/src/jrd/ProtectRelations.h index cf47eb3617d..8765e94f163 100644 --- a/src/jrd/ProtectRelations.h +++ b/src/jrd/ProtectRelations.h @@ -32,7 +32,7 @@ #if (!defined(FB_JRD_PROTECT_RELATIONS)) #define FB_JRD_PROTECT_RELATIONS -namespace Jrd { +namespace Firebird::Jrd { class thread_db; class jrd_tra; diff --git a/src/jrd/QualifiedName.h b/src/jrd/QualifiedName.h index a7e90b7763f..daf19e69a10 100644 --- a/src/jrd/QualifiedName.h +++ b/src/jrd/QualifiedName.h @@ -34,7 +34,7 @@ #include "../common/classes/QualifiedMetaString.h" #include "../common/StatusArg.h" -namespace Jrd { +namespace Firebird::Jrd { using QualifiedName = Firebird::BaseQualifiedName; using QualifiedNameMetaNamePair = Firebird::FullPooledPair; diff --git a/src/jrd/RandomGenerator.cpp b/src/jrd/RandomGenerator.cpp index 673fcf5c027..d3aae834e55 100644 --- a/src/jrd/RandomGenerator.cpp +++ b/src/jrd/RandomGenerator.cpp @@ -25,7 +25,7 @@ #include "../common/os/guid.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; RandomGenerator::RandomGenerator() diff --git a/src/jrd/RandomGenerator.h b/src/jrd/RandomGenerator.h index 37718cbb0d5..d4d76597e67 100644 --- a/src/jrd/RandomGenerator.h +++ b/src/jrd/RandomGenerator.h @@ -24,7 +24,7 @@ #define JRD_RANDOM_GENERATOR_H -namespace Jrd { +namespace Firebird::Jrd { class RandomGenerator { diff --git a/src/jrd/Record.h b/src/jrd/Record.h index 1a00d6b785c..329fbe9409e 100644 --- a/src/jrd/Record.h +++ b/src/jrd/Record.h @@ -27,8 +27,7 @@ #include "../jrd/pag.h" #include "../jrd/val.h" -namespace Jrd -{ +namespace Firebird::Jrd { class Record { friend class AutoTempRecord; diff --git a/src/jrd/RecordBuffer.cpp b/src/jrd/RecordBuffer.cpp index 1bf837d570a..703ec51e750 100644 --- a/src/jrd/RecordBuffer.cpp +++ b/src/jrd/RecordBuffer.cpp @@ -29,7 +29,7 @@ const char* const SCRATCH = "fb_recbuf_"; -using namespace Jrd; +using namespace Firebird::Jrd; RecordBuffer::RecordBuffer(MemoryPool& pool, const Format* format) : PermanentStorage(pool) diff --git a/src/jrd/RecordBuffer.h b/src/jrd/RecordBuffer.h index 4cd7979faf0..60ede84196b 100644 --- a/src/jrd/RecordBuffer.h +++ b/src/jrd/RecordBuffer.h @@ -28,7 +28,7 @@ #include "../common/classes/File.h" #include "../jrd/TempSpace.h" -namespace Jrd { +namespace Firebird::Jrd { class Format; class Record; diff --git a/src/jrd/RecordNumber.h b/src/jrd/RecordNumber.h index af4ec70197b..eaf80674b56 100644 --- a/src/jrd/RecordNumber.h +++ b/src/jrd/RecordNumber.h @@ -205,8 +205,7 @@ class RecordNumber bool valid; }; -namespace Jrd -{ +namespace Firebird::Jrd { /* Blob id. A blob has two states -- temporary and permanent. In each case, the blob id is 8 bytes (2 longwords) long. In the case of a temporary blob, the first word is NULL and the second word points to diff --git a/src/jrd/RecordSourceNodes.cpp b/src/jrd/RecordSourceNodes.cpp index 764effa6f47..f80b873a3a5 100644 --- a/src/jrd/RecordSourceNodes.cpp +++ b/src/jrd/RecordSourceNodes.cpp @@ -41,7 +41,7 @@ #include "../dsql/DSqlDataTypeUtil.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; static RecordSourceNode* dsqlPassRelProc(DsqlCompilerScratch* dsqlScratch, RecordSourceNode* source); diff --git a/src/jrd/RecordSourceNodes.h b/src/jrd/RecordSourceNodes.h index bb2f0d66236..e366819d4fe 100644 --- a/src/jrd/RecordSourceNodes.h +++ b/src/jrd/RecordSourceNodes.h @@ -32,7 +32,7 @@ #include "../dsql/Visitors.h" #include "../dsql/pass1_proto.h" -namespace Jrd { +namespace Firebird::Jrd { class IndexRetrieval; class OptimizerRetrieval; diff --git a/src/jrd/Relation.cpp b/src/jrd/Relation.cpp index fea7b75dc8e..4786bb7f906 100644 --- a/src/jrd/Relation.cpp +++ b/src/jrd/Relation.cpp @@ -40,7 +40,7 @@ // Pick up relation ids #include "../jrd/ini.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; diff --git a/src/jrd/Relation.h b/src/jrd/Relation.h index 0acf552c0e3..30df0fb5e73 100644 --- a/src/jrd/Relation.h +++ b/src/jrd/Relation.h @@ -36,8 +36,7 @@ #include "../common/classes/TriState.h" #include "../common/sha2/sha2.h" -namespace Jrd -{ +namespace Firebird::Jrd { template class vec; class BoolExprNode; diff --git a/src/jrd/Resources.cpp b/src/jrd/Resources.cpp index 99962ee616d..7e333412d79 100644 --- a/src/jrd/Resources.cpp +++ b/src/jrd/Resources.cpp @@ -17,7 +17,7 @@ #include "../jrd/met.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; void Resources::transfer(thread_db* tdbb, VersionedObjects* to, bool internal) diff --git a/src/jrd/Resources.h b/src/jrd/Resources.h index cb7f2f9276d..b55319f0b6c 100644 --- a/src/jrd/Resources.h +++ b/src/jrd/Resources.h @@ -29,7 +29,7 @@ #include "../common/sha2/sha2.h" #include -namespace Jrd { +namespace Firebird::Jrd { class RelationPermanent; class RoutinePermanent; diff --git a/src/jrd/ResultSet.cpp b/src/jrd/ResultSet.cpp index 59d0f038613..ea3c8f2b321 100644 --- a/src/jrd/ResultSet.cpp +++ b/src/jrd/ResultSet.cpp @@ -32,7 +32,7 @@ using namespace Firebird; -namespace Jrd { +namespace Firebird::Jrd { ResultSet::ResultSet(thread_db* tdbb, PreparedStatement* aStmt, jrd_tra* aTransaction) diff --git a/src/jrd/ResultSet.h b/src/jrd/ResultSet.h index 15de4f4e9e8..d950e2ad638 100644 --- a/src/jrd/ResultSet.h +++ b/src/jrd/ResultSet.h @@ -33,7 +33,7 @@ struct dsc; -namespace Jrd { +namespace Firebird::Jrd { class thread_db; class jrd_tra; diff --git a/src/jrd/Routine.cpp b/src/jrd/Routine.cpp index e32096996e9..3747216c19c 100644 --- a/src/jrd/Routine.cpp +++ b/src/jrd/Routine.cpp @@ -33,7 +33,7 @@ using namespace Firebird; -namespace Jrd { +namespace Firebird::Jrd { RoutinePermanent::RoutinePermanent(thread_db* tdbb, MemoryPool& p, MetaId metaId, NoData) : PermanentStorage(p), diff --git a/src/jrd/Routine.h b/src/jrd/Routine.h index 6d79cebe373..243d4e2a470 100644 --- a/src/jrd/Routine.h +++ b/src/jrd/Routine.h @@ -34,8 +34,7 @@ #include "../common/ThreadStart.h" #include "../common/sha2/sha2.h" -namespace Jrd -{ +namespace Firebird::Jrd { class thread_db; class CompilerScratch; class Statement; diff --git a/src/jrd/RuntimeStatistics.cpp b/src/jrd/RuntimeStatistics.cpp index 41f0a7996fa..762beb64256 100644 --- a/src/jrd/RuntimeStatistics.cpp +++ b/src/jrd/RuntimeStatistics.cpp @@ -30,7 +30,7 @@ using namespace Firebird; -namespace Jrd { +namespace Firebird::Jrd { GlobalPtr RuntimeStatistics::dummy; diff --git a/src/jrd/RuntimeStatistics.h b/src/jrd/RuntimeStatistics.h index 3db58932ab0..f031c5401c5 100644 --- a/src/jrd/RuntimeStatistics.h +++ b/src/jrd/RuntimeStatistics.h @@ -34,7 +34,7 @@ #include -namespace Jrd { +namespace Firebird::Jrd { class Attachment; class Database; diff --git a/src/jrd/Savepoint.cpp b/src/jrd/Savepoint.cpp index 241e30742c0..2d258214c70 100644 --- a/src/jrd/Savepoint.cpp +++ b/src/jrd/Savepoint.cpp @@ -32,7 +32,7 @@ #include "Savepoint.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // UndoItem implementation diff --git a/src/jrd/Savepoint.h b/src/jrd/Savepoint.h index e5010921264..37aa4f4c995 100644 --- a/src/jrd/Savepoint.h +++ b/src/jrd/Savepoint.h @@ -26,8 +26,7 @@ #include "../jrd/Record.h" #include "../jrd/RecordNumber.h" -namespace Jrd -{ +namespace Firebird::Jrd { class jrd_tra; class LocalTemporaryTable; diff --git a/src/jrd/SharedReadVector.h b/src/jrd/SharedReadVector.h index 1c1e335c633..9c98479cf0e 100644 --- a/src/jrd/SharedReadVector.h +++ b/src/jrd/SharedReadVector.h @@ -48,7 +48,7 @@ #include "../jrd/Database.h" */ -namespace Jrd { +namespace Firebird::Jrd { template class SharedReadVector diff --git a/src/jrd/Statement.cpp b/src/jrd/Statement.cpp index bf5418ee4b0..e5e2329d83c 100644 --- a/src/jrd/Statement.cpp +++ b/src/jrd/Statement.cpp @@ -41,7 +41,7 @@ #include "../common/classes/auto.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; template static void makeSubRoutines(thread_db* tdbb, Statement* statement, @@ -1118,7 +1118,7 @@ const int devNodePrint(DmlNode* node) #endif #ifdef DEBUG_SHARED_VECTOR -namespace Jrd { +namespace Firebird::Jrd { struct Acc { diff --git a/src/jrd/Statement.h b/src/jrd/Statement.h index 01e6faf5cd1..8dfe644da9e 100644 --- a/src/jrd/Statement.h +++ b/src/jrd/Statement.h @@ -30,7 +30,7 @@ #include #include "../common/sha2/sha2.h" -namespace Jrd { +namespace Firebird::Jrd { class PlanEntry; diff --git a/src/jrd/SysFunction.cpp b/src/jrd/SysFunction.cpp index d34fd07fd99..7f8bebc4973 100644 --- a/src/jrd/SysFunction.cpp +++ b/src/jrd/SysFunction.cpp @@ -80,7 +80,7 @@ #include using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; namespace { diff --git a/src/jrd/SysFunction.h b/src/jrd/SysFunction.h index 5a2cbc671b9..c8732104112 100644 --- a/src/jrd/SysFunction.h +++ b/src/jrd/SysFunction.h @@ -36,8 +36,7 @@ #include "../dsql/Nodes.h" #include "../common/dsc.h" -namespace Jrd -{ +namespace Firebird::Jrd { class thread_db; struct impure_value; } diff --git a/src/jrd/SystemPackages.cpp b/src/jrd/SystemPackages.cpp index e61e2c2e431..d622ce52067 100644 --- a/src/jrd/SystemPackages.cpp +++ b/src/jrd/SystemPackages.cpp @@ -28,7 +28,7 @@ #include "../jrd/sys-packages/SqlPackage.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; namespace diff --git a/src/jrd/SystemPackages.h b/src/jrd/SystemPackages.h index acb47b379b3..c7754d0a3ff 100644 --- a/src/jrd/SystemPackages.h +++ b/src/jrd/SystemPackages.h @@ -36,8 +36,7 @@ #include #include -namespace Jrd -{ +namespace Firebird::Jrd { struct SystemProcedureParameter { SystemProcedureParameter( diff --git a/src/jrd/SystemPrivileges.h b/src/jrd/SystemPrivileges.h index 7dd08e809f8..1c95ef0c8a8 100644 --- a/src/jrd/SystemPrivileges.h +++ b/src/jrd/SystemPrivileges.h @@ -33,7 +33,7 @@ #define FB_JRD_SYSTEM_PRIVILEGES #define FB_JRD_SYSTEM_PRIVILEGES_TMP -namespace Jrd { +namespace Firebird::Jrd { enum SystemPrivilege { NULL_PRIVILEGE, diff --git a/src/jrd/SystemTriggers.epp b/src/jrd/SystemTriggers.epp index ac53b45369c..b6f9b621cdd 100644 --- a/src/jrd/SystemTriggers.epp +++ b/src/jrd/SystemTriggers.epp @@ -46,7 +46,7 @@ DATABASE DB = FILENAME "ODS.RDB"; using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; namespace diff --git a/src/jrd/SystemTriggers.h b/src/jrd/SystemTriggers.h index fa68bb1029c..40e01b2438b 100644 --- a/src/jrd/SystemTriggers.h +++ b/src/jrd/SystemTriggers.h @@ -25,14 +25,13 @@ #include "firebird.h" -namespace Jrd -{ +namespace Firebird::Jrd { class jrd_rel; class thread_db; class Record; } // namespace Jrd -namespace Jrd::SystemTriggers +namespace Firebird::Jrd::SystemTriggers { void executeBeforeInsertTriggers(thread_db* tdbb, jrd_rel* relation, Record* record); void executeAfterInsertTriggers(thread_db* tdbb, jrd_rel* relation, Record* record); diff --git a/src/jrd/TempSpace.cpp b/src/jrd/TempSpace.cpp index 6e22ecfd869..c52e0341dce 100644 --- a/src/jrd/TempSpace.cpp +++ b/src/jrd/TempSpace.cpp @@ -34,7 +34,7 @@ #include "../jrd/TempSpace.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // Static definitions/initializations diff --git a/src/jrd/ThreadCollect.h b/src/jrd/ThreadCollect.h index 497c404c614..25724b26190 100644 --- a/src/jrd/ThreadCollect.h +++ b/src/jrd/ThreadCollect.h @@ -37,7 +37,7 @@ #include -namespace Jrd { +namespace Firebird::Jrd { class ThreadCollect { diff --git a/src/jrd/TimeZone.cpp b/src/jrd/TimeZone.cpp index 9b6092f344c..f5c16cafb99 100644 --- a/src/jrd/TimeZone.cpp +++ b/src/jrd/TimeZone.cpp @@ -27,7 +27,7 @@ #include "../jrd/tra.h" #include "../jrd/ids.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; diff --git a/src/jrd/TimeZone.h b/src/jrd/TimeZone.h index eb86d7773ac..43764bea641 100644 --- a/src/jrd/TimeZone.h +++ b/src/jrd/TimeZone.h @@ -30,7 +30,7 @@ #include "../jrd/SystemPackages.h" #include "../jrd/recsrc/RecordSource.h" -namespace Jrd { +namespace Firebird::Jrd { class thread_db; class jrd_tra; diff --git a/src/jrd/UserManagement.cpp b/src/jrd/UserManagement.cpp index d410f1cb359..6058021a23b 100644 --- a/src/jrd/UserManagement.cpp +++ b/src/jrd/UserManagement.cpp @@ -32,7 +32,7 @@ #include "../jrd/ini.h" #include "../jrd/ids.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; namespace diff --git a/src/jrd/UserManagement.h b/src/jrd/UserManagement.h index eb4980fc78c..c5880bf8218 100644 --- a/src/jrd/UserManagement.h +++ b/src/jrd/UserManagement.h @@ -31,7 +31,7 @@ #include "firebird/Interface.h" #include "../common/security.h" -namespace Jrd { +namespace Firebird::Jrd { class thread_db; class jrd_tra; diff --git a/src/jrd/VirtualTable.cpp b/src/jrd/VirtualTable.cpp index 55c2aa4636d..6c1e8486bc3 100644 --- a/src/jrd/VirtualTable.cpp +++ b/src/jrd/VirtualTable.cpp @@ -42,7 +42,7 @@ #include "../jrd/RecordBuffer.h" #include "../jrd/VirtualTable.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; diff --git a/src/jrd/VirtualTable.h b/src/jrd/VirtualTable.h index 07ebb1e2d3d..2e54c043b17 100644 --- a/src/jrd/VirtualTable.h +++ b/src/jrd/VirtualTable.h @@ -24,8 +24,7 @@ #ifndef JRD_VIRTUAL_TABLE_H #define JRD_VIRTUAL_TABLE_H -namespace Jrd -{ +namespace Firebird::Jrd { class VirtualTable { public: diff --git a/src/jrd/WorkerAttachment.cpp b/src/jrd/WorkerAttachment.cpp index d1a69ef8682..49f4e64f3e1 100644 --- a/src/jrd/WorkerAttachment.cpp +++ b/src/jrd/WorkerAttachment.cpp @@ -43,7 +43,7 @@ using namespace Firebird; -namespace Jrd { +namespace Firebird::Jrd { constexpr unsigned WORKER_IDLE_TIMEOUT = 60; // 1 minute diff --git a/src/jrd/WorkerAttachment.h b/src/jrd/WorkerAttachment.h index ffbce80c0a1..1d597fbc7f7 100644 --- a/src/jrd/WorkerAttachment.h +++ b/src/jrd/WorkerAttachment.h @@ -41,8 +41,7 @@ #include "../jrd/status.h" -namespace Jrd -{ +namespace Firebird::Jrd { class WorkerAttachment; diff --git a/src/jrd/blb.cpp b/src/jrd/blb.cpp index f7e141a1be8..d2b62fae94e 100644 --- a/src/jrd/blb.cpp +++ b/src/jrd/blb.cpp @@ -75,7 +75,7 @@ #include "../common/classes/VaryStr.h" #include "../jrd/Statement.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; typedef Ods::blob_page blob_page; diff --git a/src/jrd/blb.h b/src/jrd/blb.h index 4d9b227266e..f0289b0fb3d 100644 --- a/src/jrd/blb.h +++ b/src/jrd/blb.h @@ -47,8 +47,7 @@ namespace Ods struct blh; } -namespace Jrd -{ +namespace Firebird::Jrd { class Attachment; class BlobControl; diff --git a/src/jrd/blf_proto.h b/src/jrd/blf_proto.h index d5c0dfe6413..6837173c646 100644 --- a/src/jrd/blf_proto.h +++ b/src/jrd/blf_proto.h @@ -24,7 +24,7 @@ #ifndef JRD_BLF_PROTO_H #define JRD_BLF_PROTO_H -namespace Jrd { +namespace Firebird::Jrd { struct bid; } diff --git a/src/jrd/blob_filter.cpp b/src/jrd/blob_filter.cpp index e34d00ea1bf..c38e081d9bf 100644 --- a/src/jrd/blob_filter.cpp +++ b/src/jrd/blob_filter.cpp @@ -43,7 +43,7 @@ #include "../common/isc_s_proto.h" #include "iberror.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; // System provided internal filters for filtering internal diff --git a/src/jrd/blob_filter.h b/src/jrd/blob_filter.h index 442f5f6867a..a1f9a190c3d 100644 --- a/src/jrd/blob_filter.h +++ b/src/jrd/blob_filter.h @@ -26,7 +26,7 @@ #include "../include/fb_blk.h" -namespace Jrd { +namespace Firebird::Jrd { /* Note: The BlobControl class is the internal version of the * blob control structure (ISC_BLOB_CTL) which is in ibase.h. diff --git a/src/jrd/btn.cpp b/src/jrd/btn.cpp index 44184e0dddb..705ef1a2c0e 100644 --- a/src/jrd/btn.cpp +++ b/src/jrd/btn.cpp @@ -30,7 +30,7 @@ #include "../jrd/ods.h" #include "../jrd/btn.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Ods; USHORT IndexNode::computePrefix(const UCHAR* prevString, USHORT prevLength, diff --git a/src/jrd/btn.h b/src/jrd/btn.h index dc48eb6ba84..35b53c594e5 100644 --- a/src/jrd/btn.h +++ b/src/jrd/btn.h @@ -33,7 +33,7 @@ #include "../jrd/ods.h" #include "../common/classes/array.h" -namespace Jrd { +namespace Firebird::Jrd { // Flags (3-bits) used for index node inline constexpr int BTN_NORMAL_FLAG = 0; diff --git a/src/jrd/btr.cpp b/src/jrd/btr.cpp index 1767eda9b83..811a97c398a 100644 --- a/src/jrd/btr.cpp +++ b/src/jrd/btr.cpp @@ -66,7 +66,7 @@ #include "../jrd/tpc_proto.h" #include "../dsql/DdlNodes.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Ods; using namespace Firebird; diff --git a/src/jrd/btr.h b/src/jrd/btr.h index 8edc0e34364..5ff45bc223e 100644 --- a/src/jrd/btr.h +++ b/src/jrd/btr.h @@ -41,7 +41,7 @@ struct dsc; -namespace Jrd { +namespace Firebird::Jrd { class jrd_rel; class jrd_tra; diff --git a/src/jrd/cch.cpp b/src/jrd/cch.cpp index b38f17f5e3e..16f95fd61bf 100644 --- a/src/jrd/cch.cpp +++ b/src/jrd/cch.cpp @@ -77,7 +77,7 @@ #endif -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Ods; using namespace Firebird; @@ -208,8 +208,7 @@ constexpr int PRE_SEARCH_LIMIT = 256; constexpr int PRE_EXISTS = -1; constexpr int PRE_UNKNOWN = -2; -namespace Jrd -{ +namespace Firebird::Jrd { #ifdef HASH_USE_CDS_LIST @@ -5304,7 +5303,7 @@ void BufferDesc::unLockIO(thread_db* tdbb) } -namespace Jrd { +namespace Firebird::Jrd { /// class BCBHashTable diff --git a/src/jrd/cch.h b/src/jrd/cch.h index 98671de3024..9c0082ee0dc 100644 --- a/src/jrd/cch.h +++ b/src/jrd/cch.h @@ -54,7 +54,7 @@ namespace Ods { struct pag; } -namespace Jrd { +namespace Firebird::Jrd { class Lock; class Precedence; diff --git a/src/jrd/cmp.cpp b/src/jrd/cmp.cpp index 84d0fafcc55..0d78716ab36 100644 --- a/src/jrd/cmp.cpp +++ b/src/jrd/cmp.cpp @@ -92,7 +92,7 @@ #include "../dsql/ExprNodes.h" #include "../dsql/StmtNodes.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; diff --git a/src/jrd/cvt.cpp b/src/jrd/cvt.cpp index 7a921428d0d..1e18aebd75c 100644 --- a/src/jrd/cvt.cpp +++ b/src/jrd/cvt.cpp @@ -85,7 +85,7 @@ #define INT64_LIMIT ((((SINT64) 1) << 62) / 5) #define NUMERIC_LIMIT (INT64_LIMIT) -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; diff --git a/src/jrd/cvt2.cpp b/src/jrd/cvt2.cpp index 81ca4658ce8..385d459bc98 100644 --- a/src/jrd/cvt2.cpp +++ b/src/jrd/cvt2.cpp @@ -52,7 +52,7 @@ #include "../common/classes/Aligner.h" #include "../common/classes/VaryStr.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; /* The original order of dsc_type values corresponded to the priority diff --git a/src/jrd/cvt_proto.h b/src/jrd/cvt_proto.h index be85df5feb7..1df67515520 100644 --- a/src/jrd/cvt_proto.h +++ b/src/jrd/cvt_proto.h @@ -42,8 +42,7 @@ ISC_TIME_TZ CVT_get_sql_time_tz(const dsc*); GDS_TIMESTAMP CVT_get_timestamp(const dsc*); ISC_TIMESTAMP_TZ CVT_get_timestamp_tz(const dsc*); -namespace Jrd -{ +namespace Firebird::Jrd { class EngineCallbacks : public Firebird::Callbacks { public: diff --git a/src/jrd/dfw.epp b/src/jrd/dfw.epp index aadb253cd90..d5ca40fca57 100644 --- a/src/jrd/dfw.epp +++ b/src/jrd/dfw.epp @@ -147,10 +147,10 @@ inline constexpr int WAIT_PERIOD = -1; DATABASE DB = FILENAME "ODS.RDB"; -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; -namespace Jrd { +namespace Firebird::Jrd { typedef HashTable< DeferredWork, diff --git a/src/jrd/dfw_proto.h b/src/jrd/dfw_proto.h index 64d592c4a42..91d8afdba74 100644 --- a/src/jrd/dfw_proto.h +++ b/src/jrd/dfw_proto.h @@ -29,8 +29,7 @@ #include "../jrd/Resources.h" #include "../common/classes/fb_string.h" -namespace Jrd -{ +namespace Firebird::Jrd { enum dfw_t : int; class thread_db; diff --git a/src/jrd/dpm.epp b/src/jrd/dpm.epp index 3feddb21b9a..39b0a43af41 100644 --- a/src/jrd/dpm.epp +++ b/src/jrd/dpm.epp @@ -72,7 +72,7 @@ DATABASE DB = FILENAME "ODS.RDB"; #define HIGH_WATER(x) ((USHORT) sizeof (data_page) + (USHORT) sizeof (data_page::dpg_repeat) * (x - 1)) #define SPACE_FUDGE (ROUNDUP(RHDF_SIZE, ODS_ALIGNMENT) + sizeof(data_page::dpg_repeat)) -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Ods; using namespace Firebird; diff --git a/src/jrd/dpm_proto.h b/src/jrd/dpm_proto.h index a882ec53548..274e40db4be 100644 --- a/src/jrd/dpm_proto.h +++ b/src/jrd/dpm_proto.h @@ -30,8 +30,7 @@ #include "../jrd/Resources.h" // fwd. decl. -namespace Jrd -{ +namespace Firebird::Jrd { class blb; class jrd_rel; struct record_param; diff --git a/src/jrd/dyn.h b/src/jrd/dyn.h index 65c950e2217..1327505c624 100644 --- a/src/jrd/dyn.h +++ b/src/jrd/dyn.h @@ -40,7 +40,7 @@ inline constexpr const char* ALL_DDL_PRIVILEGES = "CLO"; inline constexpr int DYN_MSG_FAC = FB_IMPL_MSG_FACILITY_DYN; -namespace Jrd { +namespace Firebird::Jrd { class jrd_tra; class thread_db; diff --git a/src/jrd/dyn_util.epp b/src/jrd/dyn_util.epp index 5f9b769f0f3..fdc2307643d 100644 --- a/src/jrd/dyn_util.epp +++ b/src/jrd/dyn_util.epp @@ -56,7 +56,7 @@ using MsgFormat::SafeArg; using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; DATABASE DB = STATIC "ODS.RDB"; diff --git a/src/jrd/err.cpp b/src/jrd/err.cpp index 71eb4f39cc7..c520ce68d86 100644 --- a/src/jrd/err.cpp +++ b/src/jrd/err.cpp @@ -46,7 +46,7 @@ #include "../common/config/config.h" #include "../common/utils_proto.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; //#define JRD_FAILURE_SPACE 2048 diff --git a/src/jrd/err_proto.h b/src/jrd/err_proto.h index 944c44413be..ff1a14e2e3b 100644 --- a/src/jrd/err_proto.h +++ b/src/jrd/err_proto.h @@ -30,7 +30,7 @@ #include "../common/StatusArg.h" #include "../jrd/status.h" -namespace Jrd { +namespace Firebird::Jrd { // Index error types diff --git a/src/jrd/event.cpp b/src/jrd/event.cpp index 59b8139f9ad..818368ff389 100644 --- a/src/jrd/event.cpp +++ b/src/jrd/event.cpp @@ -63,7 +63,7 @@ using namespace Firebird; -namespace Jrd { +namespace Firebird::Jrd { void EventManager::init(Attachment* attachment) diff --git a/src/jrd/event_proto.h b/src/jrd/event_proto.h index 7ab5ac91e5d..e7e8af08767 100644 --- a/src/jrd/event_proto.h +++ b/src/jrd/event_proto.h @@ -34,7 +34,7 @@ #include "../common/config/config.h" -namespace Jrd { +namespace Firebird::Jrd { class Attachment; diff --git a/src/jrd/evl.cpp b/src/jrd/evl.cpp index 9941f4b7b08..409bc428bb9 100644 --- a/src/jrd/evl.cpp +++ b/src/jrd/evl.cpp @@ -114,7 +114,7 @@ #include "../common/classes/Aligner.h" #include "../jrd/Function.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; diff --git a/src/jrd/evl_proto.h b/src/jrd/evl_proto.h index 0053be18dbd..ce84add8857 100644 --- a/src/jrd/evl_proto.h +++ b/src/jrd/evl_proto.h @@ -27,8 +27,7 @@ #include "../jrd/intl_classes.h" #include "../jrd/req.h" -namespace Jrd -{ +namespace Firebird::Jrd { class DbKeyRangeNode; class InversionNode; struct Item; @@ -43,8 +42,7 @@ bool EVL_field(Jrd::jrd_rel*, Jrd::Record*, USHORT, dsc*); void EVL_make_value(Jrd::thread_db* tdbb, const dsc*, Jrd::impure_value*, MemoryPool* pool = NULL); void EVL_validate(Jrd::thread_db*, const Jrd::Item&, const Jrd::ItemInfo*, dsc*, bool); -namespace Jrd -{ +namespace Firebird::Jrd { // Evaluate a value expression. inline dsc* EVL_expr(thread_db* tdbb, Request* request, const ValueExprNode* node) { diff --git a/src/jrd/exe.cpp b/src/jrd/exe.cpp index 0ec9deafabd..e6dc9fd3004 100644 --- a/src/jrd/exe.cpp +++ b/src/jrd/exe.cpp @@ -114,7 +114,7 @@ #include "../jrd/ProfilerManager.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; // Item class implementation diff --git a/src/jrd/exe.h b/src/jrd/exe.h index e361292ab17..e0f332e4311 100644 --- a/src/jrd/exe.h +++ b/src/jrd/exe.h @@ -71,7 +71,7 @@ DEFINE_TRACE_ROUTINE(cmp_trace); class VaryingString; -namespace Jrd { +namespace Firebird::Jrd { class jrd_rel; class Sort; diff --git a/src/jrd/exe_proto.h b/src/jrd/exe_proto.h index 7ca051aa174..aa898c97205 100644 --- a/src/jrd/exe_proto.h +++ b/src/jrd/exe_proto.h @@ -27,7 +27,7 @@ #include "../jrd/cmp_proto.h" #include -namespace Jrd { +namespace Firebird::Jrd { class Request; class jrd_tra; class AssignmentNode; @@ -57,8 +57,7 @@ void EXE_send(Jrd::thread_db*, Jrd::Request*, USHORT, ULONG, const void*); void EXE_start(Jrd::thread_db*, Jrd::Request*, Jrd::jrd_tra*); void EXE_unwind(Jrd::thread_db*, Jrd::Request*); -namespace Jrd -{ +namespace Firebird::Jrd { class CachedRequestId { public: diff --git a/src/jrd/ext.cpp b/src/jrd/ext.cpp index be3affde92a..65f301840c7 100644 --- a/src/jrd/ext.cpp +++ b/src/jrd/ext.cpp @@ -82,8 +82,7 @@ __int64 __cdecl _ftelli64(FILE*); using namespace Firebird; -namespace Jrd -{ +namespace Firebird::Jrd { class ExternalFileDirectoryList : public DirectoryList { private: @@ -113,7 +112,7 @@ namespace Jrd }; } -using namespace Jrd; +using namespace Firebird::Jrd; namespace { diff --git a/src/jrd/ext_proto.h b/src/jrd/ext_proto.h index fbb18312877..33f7ba151f3 100644 --- a/src/jrd/ext_proto.h +++ b/src/jrd/ext_proto.h @@ -31,7 +31,7 @@ #ifndef JRD_EXT_PROTO_H #define JRD_EXT_PROTO_H -namespace Jrd { +namespace Firebird::Jrd { class jrd_tra; class RecordSource; diff --git a/src/jrd/extds/ExtDS.cpp b/src/jrd/extds/ExtDS.cpp index 414e8da4c69..db1fe78a3ea 100644 --- a/src/jrd/extds/ExtDS.cpp +++ b/src/jrd/extds/ExtDS.cpp @@ -70,11 +70,11 @@ #endif -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; -namespace EDS { +namespace Firebird::Jrd::EDS { // Manager diff --git a/src/jrd/extds/ExtDS.h b/src/jrd/extds/ExtDS.h index 8f51e6861fe..0fc445b21ee 100644 --- a/src/jrd/extds/ExtDS.h +++ b/src/jrd/extds/ExtDS.h @@ -33,14 +33,13 @@ #include -namespace Jrd -{ +namespace Firebird::Jrd { class jrd_tra; class thread_db; class ValueListNode; } -namespace EDS { +namespace Firebird::Jrd::EDS { class Manager; class Provider; diff --git a/src/jrd/extds/InternalDS.cpp b/src/jrd/extds/InternalDS.cpp index 5c6b040251b..f5b47b82bc1 100644 --- a/src/jrd/extds/InternalDS.cpp +++ b/src/jrd/extds/InternalDS.cpp @@ -44,10 +44,10 @@ #include "InternalDS.h" #include "ValidatePassword.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; -namespace EDS { +namespace Firebird::Jrd::EDS { const char* INTERNAL_PROVIDER_NAME = "Internal"; diff --git a/src/jrd/extds/InternalDS.h b/src/jrd/extds/InternalDS.h index 90f64c6b46b..f26fab536d2 100644 --- a/src/jrd/extds/InternalDS.h +++ b/src/jrd/extds/InternalDS.h @@ -26,7 +26,7 @@ #include "ExtDS.h" -namespace EDS { +namespace Firebird::Jrd::EDS { class InternalProvider : public Provider { diff --git a/src/jrd/extds/IscDS.cpp b/src/jrd/extds/IscDS.cpp index 57f6680f4b4..6c1b6e5ce60 100644 --- a/src/jrd/extds/IscDS.cpp +++ b/src/jrd/extds/IscDS.cpp @@ -41,11 +41,10 @@ #include "../common/utils_proto.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; -namespace EDS -{ +namespace Firebird::Jrd::EDS { const char* FIREBIRD_PROVIDER_NAME = "Firebird"; diff --git a/src/jrd/extds/IscDS.h b/src/jrd/extds/IscDS.h index ad85daffc04..1a5c5eacdc5 100644 --- a/src/jrd/extds/IscDS.h +++ b/src/jrd/extds/IscDS.h @@ -29,7 +29,7 @@ #include "../jrd/status.h" -namespace EDS { +namespace Firebird::Jrd::EDS { class IscProvider : public Provider { diff --git a/src/jrd/extds/ValidatePassword.cpp b/src/jrd/extds/ValidatePassword.cpp index c5488aed7d3..947969b8335 100644 --- a/src/jrd/extds/ValidatePassword.cpp +++ b/src/jrd/extds/ValidatePassword.cpp @@ -33,7 +33,7 @@ #include "../common/classes/ParsedList.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; @@ -170,7 +170,7 @@ void SBlock::putData(CheckStatusWrapper* status, unsigned int length, const void } // anonymous namespace -namespace EDS { +namespace Firebird::Jrd::EDS { bool validatePassword(thread_db* tdbb, const PathName& file, ClumpletWriter& dpb) { diff --git a/src/jrd/extds/ValidatePassword.h b/src/jrd/extds/ValidatePassword.h index 6419fd14f73..dd1257b6095 100644 --- a/src/jrd/extds/ValidatePassword.h +++ b/src/jrd/extds/ValidatePassword.h @@ -27,12 +27,11 @@ #include "../../common/classes/ClumpletWriter.h" -namespace Jrd -{ +namespace Firebird::Jrd { class thread_db; } -namespace EDS { +namespace Firebird::Jrd::EDS { bool validatePassword(Jrd::thread_db* tdbb, const Firebird::PathName& file, Firebird::ClumpletWriter& dpb); diff --git a/src/jrd/filters.cpp b/src/jrd/filters.cpp index 41acb8dcc07..19bddbdddff 100644 --- a/src/jrd/filters.cpp +++ b/src/jrd/filters.cpp @@ -42,7 +42,7 @@ #include "../jrd/mov_proto.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; static ISC_STATUS caller(USHORT, BlobControl*, USHORT, UCHAR*, USHORT*); static void dump_blr(void*, SSHORT, const char*); diff --git a/src/jrd/flu.cpp b/src/jrd/flu.cpp index ddd57c05fcb..465609437b3 100644 --- a/src/jrd/flu.cpp +++ b/src/jrd/flu.cpp @@ -133,8 +133,7 @@ namespace { Firebird::InitInstance iUdfDirectoryList; } -namespace Jrd -{ +namespace Firebird::Jrd { bool Module::operator>(const Module &im) const { // we need it to sort on some key diff --git a/src/jrd/flu.h b/src/jrd/flu.h index 45880a24b1a..535c4a3bad0 100644 --- a/src/jrd/flu.h +++ b/src/jrd/flu.h @@ -33,8 +33,7 @@ #include "../common/os/mod_loader.h" #include "../common/classes/RefCounted.h" -namespace Jrd -{ +namespace Firebird::Jrd { class Database; class Module diff --git a/src/jrd/fun.epp b/src/jrd/fun.epp index 94163f4de2d..a228b4b0d84 100644 --- a/src/jrd/fun.epp +++ b/src/jrd/fun.epp @@ -73,7 +73,7 @@ #include // dladdr #endif -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; diff --git a/src/jrd/grant.epp b/src/jrd/grant.epp index a92f11ef3f3..5eba1a03061 100644 --- a/src/jrd/grant.epp +++ b/src/jrd/grant.epp @@ -57,7 +57,7 @@ #include "../jrd/constants.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // privileges given to the owner of a relation diff --git a/src/jrd/idx.cpp b/src/jrd/idx.cpp index 4a23500f23f..4c056200740 100644 --- a/src/jrd/idx.cpp +++ b/src/jrd/idx.cpp @@ -68,7 +68,7 @@ #include "../common/Task.h" #include "../jrd/WorkerAttachment.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Ods; using namespace Firebird; @@ -206,7 +206,7 @@ bool IDX_check_master_types(thread_db* tdbb, index_desc& idx, Cached::Relation* } -namespace Jrd { +namespace Firebird::Jrd { class IndexCreateTask : public Task { diff --git a/src/jrd/idx_proto.h b/src/jrd/idx_proto.h index 2337b6af572..ba005c99a61 100644 --- a/src/jrd/idx_proto.h +++ b/src/jrd/idx_proto.h @@ -28,8 +28,7 @@ #include "../jrd/exe.h" #include "../jrd/req.h" -namespace Jrd -{ +namespace Firebird::Jrd { class jrd_rel; class jrd_tra; struct record_param; diff --git a/src/jrd/inf.cpp b/src/jrd/inf.cpp index 270b3bee1c1..8437d53bfe1 100644 --- a/src/jrd/inf.cpp +++ b/src/jrd/inf.cpp @@ -67,7 +67,7 @@ #include "../jrd/CryptoManager.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // The variable DBSERVER_BASE_LEVEL was originally IB_MAJOR_VER but with // the change to Firebird this number could no longer be used. diff --git a/src/jrd/inf_proto.h b/src/jrd/inf_proto.h index 2478689bfc7..6bab06f9c59 100644 --- a/src/jrd/inf_proto.h +++ b/src/jrd/inf_proto.h @@ -24,7 +24,7 @@ #ifndef JRD_INF_PROTO_H #define JRD_INF_PROTO_H -namespace Jrd { +namespace Firebird::Jrd { class Request; class jrd_tra; class blb; diff --git a/src/jrd/ini.epp b/src/jrd/ini.epp index 27bf34994b2..fddd8c74ff5 100644 --- a/src/jrd/ini.epp +++ b/src/jrd/ini.epp @@ -66,7 +66,7 @@ #include "../dsql/DdlNodes.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; DATABASE DB = FILENAME "ODS.RDB"; diff --git a/src/jrd/ini_proto.h b/src/jrd/ini_proto.h index 08e51b68202..ff12b8f04ef 100644 --- a/src/jrd/ini_proto.h +++ b/src/jrd/ini_proto.h @@ -24,7 +24,7 @@ #ifndef JRD_INI_PROTO_H #define JRD_INI_PROTO_H -namespace Jrd { +namespace Firebird::Jrd { struct jrd_trg; class dsql_dbb; } diff --git a/src/jrd/intl.cpp b/src/jrd/intl.cpp index 45bb706547d..f8895a3b2fe 100644 --- a/src/jrd/intl.cpp +++ b/src/jrd/intl.cpp @@ -124,7 +124,7 @@ #include "../jrd/IntlManager.h" #include "../common/classes/init.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; #define IS_TEXT(x) (((x)->dsc_dtype == dtype_text) ||\ diff --git a/src/jrd/intl_classes.h b/src/jrd/intl_classes.h index 022cae16a5e..0e637c25499 100644 --- a/src/jrd/intl_classes.h +++ b/src/jrd/intl_classes.h @@ -37,7 +37,7 @@ #include "../common/CharSet.h" #include "../common/TextType.h" -namespace Jrd { +namespace Firebird::Jrd { class PatternMatcher { diff --git a/src/jrd/intl_proto.h b/src/jrd/intl_proto.h index 31c5f927d9d..e2f36ded259 100644 --- a/src/jrd/intl_proto.h +++ b/src/jrd/intl_proto.h @@ -27,7 +27,7 @@ #include "../jrd/intl_classes.h" #include "../common/cvt.h" -namespace Jrd { +namespace Firebird::Jrd { class thread_db; class Lock; class Collation; diff --git a/src/jrd/jrd.cpp b/src/jrd/jrd.cpp index f3cb774e90b..cd303f22092 100644 --- a/src/jrd/jrd.cpp +++ b/src/jrd/jrd.cpp @@ -148,7 +148,7 @@ #include "../common/dllinst.h" #endif -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; constexpr SSHORT WAIT_PERIOD = -1; @@ -158,8 +158,7 @@ constexpr SSHORT WAIT_PERIOD = -1; #endif -namespace Jrd -{ +namespace Firebird::Jrd { int JBlob::release() { @@ -986,8 +985,7 @@ namespace } -namespace Jrd -{ +namespace Firebird::Jrd { // Option block for database parameter block class DatabaseOptions @@ -1557,7 +1555,7 @@ static void trace_failed_attach(const char* filename, const DatabaseOptions& opt } -namespace Jrd { +namespace Firebird::Jrd { JTransaction* JAttachment::getTransactionInterface(CheckStatusWrapper* status, ITransaction* tra) { diff --git a/src/jrd/jrd.h b/src/jrd/jrd.h index 220634bdcd4..8debdf977d3 100644 --- a/src/jrd/jrd.h +++ b/src/jrd/jrd.h @@ -99,7 +99,7 @@ struct dsc; -namespace EDS { +namespace Firebird::Jrd::EDS { class Connection; } @@ -107,7 +107,7 @@ namespace Firebird { class TextType; } -namespace Jrd { +namespace Firebird::Jrd { inline constexpr unsigned MAX_CALLBACKS = 50; @@ -321,7 +321,7 @@ inline void SET_DBB(Jrd::Database*& dbb) // global variables for engine -namespace Jrd { +namespace Firebird::Jrd { typedef Firebird::SubsystemContextPoolHolder ContextPoolHolder; class DatabaseContextHolder : public Jrd::ContextPoolHolder diff --git a/src/jrd/jrd_proto.h b/src/jrd/jrd_proto.h index 2a764f2aaa1..6b97745d544 100644 --- a/src/jrd/jrd_proto.h +++ b/src/jrd/jrd_proto.h @@ -29,7 +29,7 @@ #include "../common/classes/objects_array.h" #include "../jrd/status.h" -namespace Jrd { +namespace Firebird::Jrd { class Database; class Attachment; class jrd_tra; diff --git a/src/jrd/lck.cpp b/src/jrd/lck.cpp index a1868ed441e..787dafb684f 100644 --- a/src/jrd/lck.cpp +++ b/src/jrd/lck.cpp @@ -54,7 +54,7 @@ #endif -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; static void bug_lck(const TEXT*); diff --git a/src/jrd/lck.h b/src/jrd/lck.h index ce927051978..5a4915b43ba 100644 --- a/src/jrd/lck.h +++ b/src/jrd/lck.h @@ -35,7 +35,7 @@ #include "../jrd/Attachment.h" #include "../common/classes/auto.h" -namespace Jrd { +namespace Firebird::Jrd { class Database; class thread_db; @@ -209,7 +209,7 @@ void LCK_re_post(Jrd::thread_db*, Jrd::Lock*); void LCK_write_data(Jrd::thread_db*, Jrd::Lock*, LOCK_DATA_T); -namespace Jrd { +namespace Firebird::Jrd { class AutoLock { diff --git a/src/jrd/lls.h b/src/jrd/lls.h index d741293df7c..0ac21d9d2c0 100644 --- a/src/jrd/lls.h +++ b/src/jrd/lls.h @@ -25,7 +25,7 @@ #include "../common/classes/stack.h" -namespace Jrd { +namespace Firebird::Jrd { class Record; class BoolExprNode; class ValueExprNode; diff --git a/src/jrd/met.epp b/src/jrd/met.epp index f68e9cfc824..ca4e8209b53 100644 --- a/src/jrd/met.epp +++ b/src/jrd/met.epp @@ -109,7 +109,7 @@ DATABASE DB = FILENAME "ODS.RDB"; -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; static ULONG get_rel_flags_from_FLAGS(USHORT); diff --git a/src/jrd/met.h b/src/jrd/met.h index 16055082e57..dcd01b205d5 100644 --- a/src/jrd/met.h +++ b/src/jrd/met.h @@ -40,7 +40,7 @@ #include "../jrd/CharSetContainer.h" -namespace Jrd { +namespace Firebird::Jrd { // Record types for record summary blob records @@ -100,7 +100,7 @@ inline constexpr int TFB_array = 2; #include "../jrd/obj.h" #include "../dsql/sym.h" -namespace Jrd { +namespace Firebird::Jrd { // Forward decl diff --git a/src/jrd/met_proto.h b/src/jrd/met_proto.h index 67f21fc19ca..dee89c32b56 100644 --- a/src/jrd/met_proto.h +++ b/src/jrd/met_proto.h @@ -39,8 +39,7 @@ struct dsc; -namespace Jrd -{ +namespace Firebird::Jrd { class jrd_tra; class Request; class Statement; diff --git a/src/jrd/mov.cpp b/src/jrd/mov.cpp index 7ff880e204b..02fc90dc412 100644 --- a/src/jrd/mov.cpp +++ b/src/jrd/mov.cpp @@ -494,8 +494,7 @@ Int128 MOV_get_int128(Jrd::thread_db* tdbb, const dsc* desc, SSHORT scale) } -namespace Jrd -{ +namespace Firebird::Jrd { DescPrinter::DescPrinter(thread_db* tdbb, const dsc* desc, FB_SIZE_T mLen, TTypeId charSetId) : maxLen(mLen) diff --git a/src/jrd/mov_proto.h b/src/jrd/mov_proto.h index 2be6e1a9c27..a09ab4c798f 100644 --- a/src/jrd/mov_proto.h +++ b/src/jrd/mov_proto.h @@ -57,8 +57,7 @@ Firebird::Decimal64 MOV_get_dec64(Jrd::thread_db*, const dsc*); Firebird::Decimal128 MOV_get_dec128(Jrd::thread_db*, const dsc*); Firebird::Int128 MOV_get_int128(Jrd::thread_db*, const dsc*, SSHORT); -namespace Jrd -{ +namespace Firebird::Jrd { class DescPrinter { diff --git a/src/jrd/nbak.cpp b/src/jrd/nbak.cpp index 03e20e228d0..b5dfdbbde69 100644 --- a/src/jrd/nbak.cpp +++ b/src/jrd/nbak.cpp @@ -68,7 +68,7 @@ IMPLEMENT_TRACE_ROUTINE(nbak_trace, "NBAK") #endif -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; diff --git a/src/jrd/nbak.h b/src/jrd/nbak.h index f4c5a2c679c..827aa1fa4da 100644 --- a/src/jrd/nbak.h +++ b/src/jrd/nbak.h @@ -54,7 +54,7 @@ namespace Ods { struct pag; } -namespace Jrd { +namespace Firebird::Jrd { class Lock; class Record; diff --git a/src/jrd/opt_proto.h b/src/jrd/opt_proto.h index af6b9bddc54..3ac1a3205c9 100644 --- a/src/jrd/opt_proto.h +++ b/src/jrd/opt_proto.h @@ -28,7 +28,7 @@ #include "../jrd/btr.h" #include "../jrd/lls.h" -namespace Jrd { +namespace Firebird::Jrd { class Request; class jrd_rel; class RecordSource; diff --git a/src/jrd/optimizer/InnerJoin.cpp b/src/jrd/optimizer/InnerJoin.cpp index 9a6b440f343..088f80c5a66 100644 --- a/src/jrd/optimizer/InnerJoin.cpp +++ b/src/jrd/optimizer/InnerJoin.cpp @@ -50,7 +50,7 @@ #include "../jrd/optimizer/Optimizer.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // diff --git a/src/jrd/optimizer/Optimizer.cpp b/src/jrd/optimizer/Optimizer.cpp index e3ac4f7f78f..e0202e10cbe 100644 --- a/src/jrd/optimizer/Optimizer.cpp +++ b/src/jrd/optimizer/Optimizer.cpp @@ -89,7 +89,7 @@ #include "../jrd/optimizer/Optimizer.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; #ifdef OPT_DEBUG_RETRIEVAL diff --git a/src/jrd/optimizer/Optimizer.h b/src/jrd/optimizer/Optimizer.h index 6d56dced2e8..6e28bc2dbb6 100644 --- a/src/jrd/optimizer/Optimizer.h +++ b/src/jrd/optimizer/Optimizer.h @@ -43,7 +43,7 @@ #include "../jrd/Statement.h" #include "../jrd/recsrc/RecordSource.h" -namespace Jrd { +namespace Firebird::Jrd { // AB: 2005-11-05 // Constants below needs some discussions and ideas diff --git a/src/jrd/optimizer/OuterJoin.cpp b/src/jrd/optimizer/OuterJoin.cpp index 7dcea0febad..3a172656ce1 100644 --- a/src/jrd/optimizer/OuterJoin.cpp +++ b/src/jrd/optimizer/OuterJoin.cpp @@ -30,7 +30,7 @@ #include "../jrd/optimizer/Optimizer.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // diff --git a/src/jrd/optimizer/Retrieval.cpp b/src/jrd/optimizer/Retrieval.cpp index 32d0cd995db..d7a058b4bbb 100644 --- a/src/jrd/optimizer/Retrieval.cpp +++ b/src/jrd/optimizer/Retrieval.cpp @@ -53,7 +53,7 @@ #include using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; namespace diff --git a/src/jrd/os/pio.h b/src/jrd/os/pio.h index bafe5c75191..53d22060f3b 100644 --- a/src/jrd/os/pio.h +++ b/src/jrd/os/pio.h @@ -34,7 +34,7 @@ #include "../common/classes/array.h" #include "../common/classes/File.h" -namespace Jrd { +namespace Firebird::Jrd { #ifdef UNIX diff --git a/src/jrd/os/pio_proto.h b/src/jrd/os/pio_proto.h index 99a7dda760b..a19d8dcb5e5 100644 --- a/src/jrd/os/pio_proto.h +++ b/src/jrd/os/pio_proto.h @@ -26,7 +26,7 @@ #include "../common/classes/fb_string.h" -namespace Jrd { +namespace Firebird::Jrd { class jrd_file; class Database; class BufferDesc; diff --git a/src/jrd/os/posix/unix.cpp b/src/jrd/os/posix/unix.cpp index 780eeb90500..a3682656a98 100644 --- a/src/jrd/os/posix/unix.cpp +++ b/src/jrd/os/posix/unix.cpp @@ -77,7 +77,7 @@ #include "../common/classes/init.h" #include "../common/os/os_utils.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; // Some operating systems have problems with use of write/read with diff --git a/src/jrd/os/win32/winnt.cpp b/src/jrd/os/win32/winnt.cpp index 3b28d4eea35..ba2952a4804 100644 --- a/src/jrd/os/win32/winnt.cpp +++ b/src/jrd/os/win32/winnt.cpp @@ -54,7 +54,7 @@ #include -namespace Jrd { +namespace Firebird::Jrd { class FileExtendLockGuard { @@ -97,7 +97,7 @@ class FileExtendLockGuard } // namespace Jrd -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; #ifdef TEXT diff --git a/src/jrd/pag.cpp b/src/jrd/pag.cpp index 8b4e1d33697..9c51b7b141c 100644 --- a/src/jrd/pag.cpp +++ b/src/jrd/pag.cpp @@ -96,7 +96,7 @@ #include "../common/classes/DbImplementation.h" #include "../jrd/CryptoManager.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Ods; using namespace Firebird; diff --git a/src/jrd/pag.h b/src/jrd/pag.h index e11daf85d07..1e281b81979 100644 --- a/src/jrd/pag.h +++ b/src/jrd/pag.h @@ -40,7 +40,7 @@ #include "../jrd/ods.h" #include "../jrd/lls.h" -namespace Jrd { +namespace Firebird::Jrd { // Page control block -- used by PAG to keep track of critical constants /** diff --git a/src/jrd/pag_proto.h b/src/jrd/pag_proto.h index 025b7fd2519..0ca1c18fcd1 100644 --- a/src/jrd/pag_proto.h +++ b/src/jrd/pag_proto.h @@ -24,7 +24,7 @@ #ifndef JRD_PAG_PROTO_H #define JRD_PAG_PROTO_H -namespace Jrd { +namespace Firebird::Jrd { class thread_db; class Database; class PageNumber; diff --git a/src/jrd/par.cpp b/src/jrd/par.cpp index 549165478a8..b447a64ccb1 100644 --- a/src/jrd/par.cpp +++ b/src/jrd/par.cpp @@ -72,7 +72,7 @@ #include "../jrd/intl_proto.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; diff --git a/src/jrd/par_proto.h b/src/jrd/par_proto.h index ada47b9a7a5..e5a3ba32862 100644 --- a/src/jrd/par_proto.h +++ b/src/jrd/par_proto.h @@ -24,7 +24,7 @@ #ifndef JRD_PAR_PROTO_H #define JRD_PAR_PROTO_H -namespace Jrd { +namespace Firebird::Jrd { class CompilerScratch; class jrd_rel; class Request; diff --git a/src/jrd/que.h b/src/jrd/que.h index b7e4e362eff..aeaf57b3022 100644 --- a/src/jrd/que.h +++ b/src/jrd/que.h @@ -27,7 +27,7 @@ // // general purpose queue // -namespace Jrd { +namespace Firebird::Jrd { struct que { diff --git a/src/jrd/recsrc/AggregatedStream.cpp b/src/jrd/recsrc/AggregatedStream.cpp index dcc5a43337a..bbc5bf37d62 100644 --- a/src/jrd/recsrc/AggregatedStream.cpp +++ b/src/jrd/recsrc/AggregatedStream.cpp @@ -32,7 +32,7 @@ #include "RecordSource.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // ------------------------ // Data access: aggregation diff --git a/src/jrd/recsrc/BitmapTableScan.cpp b/src/jrd/recsrc/BitmapTableScan.cpp index e7cb01d77fb..d7a24d3f024 100644 --- a/src/jrd/recsrc/BitmapTableScan.cpp +++ b/src/jrd/recsrc/BitmapTableScan.cpp @@ -29,7 +29,7 @@ #include "RecordSource.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // --------------------------------------------- // Data access: Bitmap (DBKEY) driven table scan diff --git a/src/jrd/recsrc/BufferedStream.cpp b/src/jrd/recsrc/BufferedStream.cpp index c2b54554195..e8299d3d920 100644 --- a/src/jrd/recsrc/BufferedStream.cpp +++ b/src/jrd/recsrc/BufferedStream.cpp @@ -33,7 +33,7 @@ #include "RecordSource.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // -------------------------- // Data access: record buffer diff --git a/src/jrd/recsrc/ConditionalStream.cpp b/src/jrd/recsrc/ConditionalStream.cpp index 674e1affcea..e35d093a0dd 100644 --- a/src/jrd/recsrc/ConditionalStream.cpp +++ b/src/jrd/recsrc/ConditionalStream.cpp @@ -32,7 +32,7 @@ #include "RecordSource.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // ------------------------------------ // Data access: predicate driven filter diff --git a/src/jrd/recsrc/Cursor.cpp b/src/jrd/recsrc/Cursor.cpp index 652f58ac5aa..465f3027430 100644 --- a/src/jrd/recsrc/Cursor.cpp +++ b/src/jrd/recsrc/Cursor.cpp @@ -30,7 +30,7 @@ #include "Cursor.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; namespace { diff --git a/src/jrd/recsrc/Cursor.h b/src/jrd/recsrc/Cursor.h index 886427dba22..fd5362014bb 100644 --- a/src/jrd/recsrc/Cursor.h +++ b/src/jrd/recsrc/Cursor.h @@ -26,8 +26,7 @@ #include "../common/classes/array.h" #include "../jrd/MetaName.h" -namespace Jrd -{ +namespace Firebird::Jrd { class thread_db; class CompilerScratch; class RecordSource; diff --git a/src/jrd/recsrc/ExternalTableScan.cpp b/src/jrd/recsrc/ExternalTableScan.cpp index e42b3c0f0f4..0ea1c20edf8 100644 --- a/src/jrd/recsrc/ExternalTableScan.cpp +++ b/src/jrd/recsrc/ExternalTableScan.cpp @@ -31,7 +31,7 @@ #include "RecordSource.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // -------------------------------- // Data access: external table scan diff --git a/src/jrd/recsrc/FilteredStream.cpp b/src/jrd/recsrc/FilteredStream.cpp index bfbfd03aa64..9fe3e7e3416 100644 --- a/src/jrd/recsrc/FilteredStream.cpp +++ b/src/jrd/recsrc/FilteredStream.cpp @@ -30,7 +30,7 @@ #include "RecordSource.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // ------------------------------------ // Data access: predicate driven filter diff --git a/src/jrd/recsrc/FirstRowsStream.cpp b/src/jrd/recsrc/FirstRowsStream.cpp index 1c9aaf41ac5..4652deadb42 100644 --- a/src/jrd/recsrc/FirstRowsStream.cpp +++ b/src/jrd/recsrc/FirstRowsStream.cpp @@ -31,7 +31,7 @@ #include "RecordSource.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // -------------------------------- // Data access: first N rows filter diff --git a/src/jrd/recsrc/FullOuterJoin.cpp b/src/jrd/recsrc/FullOuterJoin.cpp index aa629249d71..7e0651eaea1 100644 --- a/src/jrd/recsrc/FullOuterJoin.cpp +++ b/src/jrd/recsrc/FullOuterJoin.cpp @@ -31,7 +31,7 @@ #include "RecordSource.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // ---------------------------- // Data access: full outer join diff --git a/src/jrd/recsrc/FullTableScan.cpp b/src/jrd/recsrc/FullTableScan.cpp index 810abec4eb9..357de8b6c29 100644 --- a/src/jrd/recsrc/FullTableScan.cpp +++ b/src/jrd/recsrc/FullTableScan.cpp @@ -30,7 +30,7 @@ #include "RecordSource.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // ------------------------------------------- // Data access: sequential complete table scan diff --git a/src/jrd/recsrc/HashJoin.cpp b/src/jrd/recsrc/HashJoin.cpp index 8b416c15742..380799dc01f 100644 --- a/src/jrd/recsrc/HashJoin.cpp +++ b/src/jrd/recsrc/HashJoin.cpp @@ -35,7 +35,7 @@ #include "RecordSource.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; //#define PRINT_HASH_TABLE diff --git a/src/jrd/recsrc/IndexTableScan.cpp b/src/jrd/recsrc/IndexTableScan.cpp index 61ac3d9bbea..661b162357b 100644 --- a/src/jrd/recsrc/IndexTableScan.cpp +++ b/src/jrd/recsrc/IndexTableScan.cpp @@ -33,7 +33,7 @@ #include "RecordSource.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // ------------------------------------ // Data access: index driven table scan diff --git a/src/jrd/recsrc/LocalTableStream.cpp b/src/jrd/recsrc/LocalTableStream.cpp index 5b72e5111cc..efebc4a49c2 100644 --- a/src/jrd/recsrc/LocalTableStream.cpp +++ b/src/jrd/recsrc/LocalTableStream.cpp @@ -30,7 +30,7 @@ #include "RecordSource.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // ------------------------ // Data access: local table diff --git a/src/jrd/recsrc/LockedStream.cpp b/src/jrd/recsrc/LockedStream.cpp index cdcfe8f3556..3062e38aafa 100644 --- a/src/jrd/recsrc/LockedStream.cpp +++ b/src/jrd/recsrc/LockedStream.cpp @@ -29,7 +29,7 @@ #include "RecordSource.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // ------------------------------------ // Data access: stream locked for write diff --git a/src/jrd/recsrc/MergeJoin.cpp b/src/jrd/recsrc/MergeJoin.cpp index 2259731ddad..de7d46d3302 100644 --- a/src/jrd/recsrc/MergeJoin.cpp +++ b/src/jrd/recsrc/MergeJoin.cpp @@ -28,7 +28,7 @@ #include "RecordSource.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; static const char* const SCRATCH = "fb_merge_"; diff --git a/src/jrd/recsrc/NestedLoopJoin.cpp b/src/jrd/recsrc/NestedLoopJoin.cpp index 715690c333a..14768c804a1 100644 --- a/src/jrd/recsrc/NestedLoopJoin.cpp +++ b/src/jrd/recsrc/NestedLoopJoin.cpp @@ -29,7 +29,7 @@ #include "RecordSource.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // ------------------------------ // Data access: nested loops join diff --git a/src/jrd/recsrc/ProcedureScan.cpp b/src/jrd/recsrc/ProcedureScan.cpp index 06f05e0df6f..44eaee9ebb5 100644 --- a/src/jrd/recsrc/ProcedureScan.cpp +++ b/src/jrd/recsrc/ProcedureScan.cpp @@ -35,7 +35,7 @@ #include "RecordSource.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // --------------------------- // Data access: procedure scan diff --git a/src/jrd/recsrc/RecordSource.cpp b/src/jrd/recsrc/RecordSource.cpp index 158433b52b4..38f0e2f48d7 100644 --- a/src/jrd/recsrc/RecordSource.cpp +++ b/src/jrd/recsrc/RecordSource.cpp @@ -39,7 +39,7 @@ #include "RecordSource.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // Disabled so far, should be uncommented for debugging/testing //#define PRINT_OPT_INFO // print optimizer info (cardinality, cost) in plans diff --git a/src/jrd/recsrc/RecordSource.h b/src/jrd/recsrc/RecordSource.h index c05d68a9ad8..d3c23838b3f 100644 --- a/src/jrd/recsrc/RecordSource.h +++ b/src/jrd/recsrc/RecordSource.h @@ -34,8 +34,7 @@ #include "../jrd/evl_proto.h" #include "../jrd/vio_proto.h" -namespace Jrd -{ +namespace Firebird::Jrd { class thread_db; class Request; class jrd_prc; diff --git a/src/jrd/recsrc/RecursiveStream.cpp b/src/jrd/recsrc/RecursiveStream.cpp index 44c18c78ce5..e909ca64741 100644 --- a/src/jrd/recsrc/RecursiveStream.cpp +++ b/src/jrd/recsrc/RecursiveStream.cpp @@ -30,7 +30,7 @@ #include "RecordSource.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // ---------------------------- // Data access: recursive union diff --git a/src/jrd/recsrc/SingularStream.cpp b/src/jrd/recsrc/SingularStream.cpp index c5b961afff1..f0b5e147a2a 100644 --- a/src/jrd/recsrc/SingularStream.cpp +++ b/src/jrd/recsrc/SingularStream.cpp @@ -27,7 +27,7 @@ #include "RecordSource.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // ------------------------------ // Data access: single row stream diff --git a/src/jrd/recsrc/SkipRowsStream.cpp b/src/jrd/recsrc/SkipRowsStream.cpp index 1ebc2650bdc..bea221a1094 100644 --- a/src/jrd/recsrc/SkipRowsStream.cpp +++ b/src/jrd/recsrc/SkipRowsStream.cpp @@ -30,7 +30,7 @@ #include "RecordSource.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // ------------------------------- // Data access: skip N rows filter diff --git a/src/jrd/recsrc/SortedStream.cpp b/src/jrd/recsrc/SortedStream.cpp index f4c7ab1d388..1e30feff3a9 100644 --- a/src/jrd/recsrc/SortedStream.cpp +++ b/src/jrd/recsrc/SortedStream.cpp @@ -37,7 +37,7 @@ #include "RecordSource.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // ----------------------------- // Data access: external sorting diff --git a/src/jrd/recsrc/TableValueFunctionScan.cpp b/src/jrd/recsrc/TableValueFunctionScan.cpp index b0b5bbe30b3..1fe741a8945 100644 --- a/src/jrd/recsrc/TableValueFunctionScan.cpp +++ b/src/jrd/recsrc/TableValueFunctionScan.cpp @@ -32,7 +32,7 @@ #include using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; TableValueFunctionScan::TableValueFunctionScan(CompilerScratch* csb, StreamType stream, const string& alias) diff --git a/src/jrd/recsrc/Union.cpp b/src/jrd/recsrc/Union.cpp index c7fbb29ac6c..317e5caf41d 100644 --- a/src/jrd/recsrc/Union.cpp +++ b/src/jrd/recsrc/Union.cpp @@ -27,7 +27,7 @@ #include "RecordSource.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // -------------------------- // Data access: regular union diff --git a/src/jrd/recsrc/VirtualTableScan.cpp b/src/jrd/recsrc/VirtualTableScan.cpp index 8e2298beda8..f913bbe66ca 100644 --- a/src/jrd/recsrc/VirtualTableScan.cpp +++ b/src/jrd/recsrc/VirtualTableScan.cpp @@ -30,7 +30,7 @@ #include "RecordSource.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // ------------------------------- // Data access: virtual table scan diff --git a/src/jrd/recsrc/WindowedStream.cpp b/src/jrd/recsrc/WindowedStream.cpp index 7063e9bdeaf..6194044bbd4 100644 --- a/src/jrd/recsrc/WindowedStream.cpp +++ b/src/jrd/recsrc/WindowedStream.cpp @@ -32,7 +32,7 @@ #include using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; // ------------------------------ // Data access: window expression diff --git a/src/jrd/replication/Applier.cpp b/src/jrd/replication/Applier.cpp index e28e2a52d4f..75d414d3d88 100644 --- a/src/jrd/replication/Applier.cpp +++ b/src/jrd/replication/Applier.cpp @@ -57,7 +57,7 @@ using namespace Firebird; using namespace Ods; -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Replication; namespace diff --git a/src/jrd/replication/Applier.h b/src/jrd/replication/Applier.h index f6609268750..280f5c96974 100644 --- a/src/jrd/replication/Applier.h +++ b/src/jrd/replication/Applier.h @@ -32,8 +32,7 @@ #include "Utils.h" -namespace Jrd -{ +namespace Firebird::Jrd { class Applier : private Firebird::PermanentStorage { typedef Firebird::GenericMap > > TransactionMap; diff --git a/src/jrd/replication/ChangeLog.cpp b/src/jrd/replication/ChangeLog.cpp index 735d474df9f..7983b53321e 100644 --- a/src/jrd/replication/ChangeLog.cpp +++ b/src/jrd/replication/ChangeLog.cpp @@ -57,7 +57,7 @@ #endif using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Replication; #if !defined(WIN_NT) && !defined(LINUX) diff --git a/src/jrd/replication/Manager.cpp b/src/jrd/replication/Manager.cpp index 610fe213d8b..8170c964aa9 100644 --- a/src/jrd/replication/Manager.cpp +++ b/src/jrd/replication/Manager.cpp @@ -32,7 +32,7 @@ #include "Utils.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Replication; namespace Replication diff --git a/src/jrd/replication/Publisher.cpp b/src/jrd/replication/Publisher.cpp index c8c4caf1696..d4e7c7041b2 100644 --- a/src/jrd/replication/Publisher.cpp +++ b/src/jrd/replication/Publisher.cpp @@ -41,7 +41,7 @@ #include using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Replication; namespace diff --git a/src/jrd/replication/Publisher.h b/src/jrd/replication/Publisher.h index c69d25215b9..75c2eb72118 100644 --- a/src/jrd/replication/Publisher.h +++ b/src/jrd/replication/Publisher.h @@ -23,8 +23,7 @@ #ifndef JRD_REPLICATION_PUBLISHER_H #define JRD_REPLICATION_PUBLISHER_H -namespace Jrd -{ +namespace Firebird::Jrd { class thread_db; class jrd_tra; class Database; diff --git a/src/jrd/replication/Replicator.cpp b/src/jrd/replication/Replicator.cpp index e0ee95027e5..59dfc3b2357 100644 --- a/src/jrd/replication/Replicator.cpp +++ b/src/jrd/replication/Replicator.cpp @@ -29,7 +29,7 @@ #include "Utils.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Replication; diff --git a/src/jrd/req.h b/src/jrd/req.h index 0be07103dda..9b7711ec64b 100644 --- a/src/jrd/req.h +++ b/src/jrd/req.h @@ -37,11 +37,11 @@ #include "../common/classes/timestamp.h" #include "../common/TimeZoneUtil.h" -namespace EDS { +namespace Firebird::Jrd::EDS { class Statement; } -namespace Jrd { +namespace Firebird::Jrd { class Lock; class jrd_rel; diff --git a/src/jrd/rlck.cpp b/src/jrd/rlck.cpp index 18b8a15d6c9..00abc812c61 100644 --- a/src/jrd/rlck.cpp +++ b/src/jrd/rlck.cpp @@ -32,7 +32,7 @@ #include "../jrd/lck.h" #include "../jrd/rlck_proto.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; Lock* RLCK_reserve_relation(thread_db* tdbb, jrd_tra* transaction, Cached::Relation* relation, bool write_flag) diff --git a/src/jrd/rlck_proto.h b/src/jrd/rlck_proto.h index 69486b4997b..c9445414b7d 100644 --- a/src/jrd/rlck_proto.h +++ b/src/jrd/rlck_proto.h @@ -24,7 +24,7 @@ #ifndef JRD_RLCK_PROTO_H #define JRD_RLCK_PROTO_H -namespace Jrd { +namespace Firebird::Jrd { class Lock; class jrd_tra; struct record_param; diff --git a/src/jrd/rpb_chain.cpp b/src/jrd/rpb_chain.cpp index c7214481815..5895c83b6b6 100644 --- a/src/jrd/rpb_chain.cpp +++ b/src/jrd/rpb_chain.cpp @@ -23,7 +23,7 @@ #include "firebird.h" #include "../jrd/rpb_chain.h" -using namespace Jrd; +using namespace Firebird::Jrd; #ifdef DEV_BUILD #define ExecAssert(x) fb_assert(x) diff --git a/src/jrd/rpb_chain.h b/src/jrd/rpb_chain.h index 1b63aed3628..f179a939dca 100644 --- a/src/jrd/rpb_chain.h +++ b/src/jrd/rpb_chain.h @@ -32,7 +32,7 @@ // req.h defines struct record_param -namespace Jrd { +namespace Firebird::Jrd { class traRpbListElement { diff --git a/src/jrd/sbm.h b/src/jrd/sbm.h index a5ffe167e41..31a9a7f2a97 100644 --- a/src/jrd/sbm.h +++ b/src/jrd/sbm.h @@ -31,7 +31,7 @@ #include "../common/classes/sparse_bitmap.h" -namespace Jrd { +namespace Firebird::Jrd { // Bitmap of record numbers typedef Firebird::SparseBitmap RecordBitmap; diff --git a/src/jrd/scl.epp b/src/jrd/scl.epp index 174e8ac9891..679e877ce64 100644 --- a/src/jrd/scl.epp +++ b/src/jrd/scl.epp @@ -64,7 +64,7 @@ inline constexpr int UIC_BASE = 10; -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; DATABASE DB = FILENAME "ODS.RDB"; diff --git a/src/jrd/scl.h b/src/jrd/scl.h index 99633b4ac7c..3517c81ef7f 100644 --- a/src/jrd/scl.h +++ b/src/jrd/scl.h @@ -35,7 +35,7 @@ namespace Firebird { class ClumpletWriter; } -namespace Jrd { +namespace Firebird::Jrd { class thread_db; diff --git a/src/jrd/scl_proto.h b/src/jrd/scl_proto.h index 8e0597a4cbf..9c02f39244a 100644 --- a/src/jrd/scl_proto.h +++ b/src/jrd/scl_proto.h @@ -29,7 +29,7 @@ #include "../common/classes/fb_string.h" #include "../jrd/MetaName.h" -//namespace Jrd { +//namespace Firebird::Jrd { // class SecurityClass; //} @@ -65,7 +65,7 @@ Jrd::SecurityClass::flags_t SCL_get_object_mask(ObjectType object_type, const Jr ULONG SCL_get_number(const UCHAR*); USHORT SCL_convert_privilege(Jrd::thread_db* tdbb, Jrd::jrd_tra* transaction, const Firebird::string& priv); -namespace Jrd { +namespace Firebird::Jrd { typedef Firebird::Array Acl; } bool SCL_move_priv(Jrd::SecurityClass::flags_t, Jrd::Acl&); diff --git a/src/jrd/sdw.cpp b/src/jrd/sdw.cpp index 44f3303e7f7..2f3d8810d40 100644 --- a/src/jrd/sdw.cpp +++ b/src/jrd/sdw.cpp @@ -50,7 +50,7 @@ #include "../jrd/Attachment.h" #include "../jrd/CryptoManager.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Ods; using namespace Firebird; diff --git a/src/jrd/sdw.h b/src/jrd/sdw.h index 98b24e75d5a..021f1eca55f 100644 --- a/src/jrd/sdw.h +++ b/src/jrd/sdw.h @@ -26,7 +26,7 @@ #include "../include/fb_blk.h" -namespace Jrd { +namespace Firebird::Jrd { class jrd_file; // Shadowing block diff --git a/src/jrd/sdw_proto.h b/src/jrd/sdw_proto.h index 6c41ff42ecf..40d3bc3f7a7 100644 --- a/src/jrd/sdw_proto.h +++ b/src/jrd/sdw_proto.h @@ -23,7 +23,7 @@ #ifndef JRD_SDW_PROTO_H #define JRD_SDW_PROTO_H -namespace Jrd { +namespace Firebird::Jrd { class jrd_file; class Shadow; } diff --git a/src/jrd/shut.cpp b/src/jrd/shut.cpp index 9ab356e0e40..e0cb47ad3ba 100644 --- a/src/jrd/shut.cpp +++ b/src/jrd/shut.cpp @@ -37,7 +37,7 @@ #include "../jrd/tra_proto.h" #include "../jrd/extds/ExtDS.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; // Shutdown lock data diff --git a/src/jrd/shut_proto.h b/src/jrd/shut_proto.h index 36ce6ab1a46..1a9b534b20d 100644 --- a/src/jrd/shut_proto.h +++ b/src/jrd/shut_proto.h @@ -24,7 +24,7 @@ #ifndef JRD_SHUT_PROTO_H #define JRD_SHUT_PROTO_H -namespace Jrd { +namespace Firebird::Jrd { class Database; } diff --git a/src/jrd/sort.cpp b/src/jrd/sort.cpp index b1a0a7fe19c..41b4bb0c76b 100644 --- a/src/jrd/sort.cpp +++ b/src/jrd/sort.cpp @@ -65,7 +65,7 @@ constexpr USHORT RUN_GROUP = 8; constexpr USHORT MAX_MERGE_LEVEL = 2; -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; // The sort buffer size should be just under a multiple of the diff --git a/src/jrd/sort.h b/src/jrd/sort.h index 1758583c4cf..1879a711ed5 100644 --- a/src/jrd/sort.h +++ b/src/jrd/sort.h @@ -29,7 +29,7 @@ #include "../jrd/TempSpace.h" #include "../jrd/align.h" -namespace Jrd { +namespace Firebird::Jrd { // Forward declaration class Attachment; diff --git a/src/jrd/sqz.cpp b/src/jrd/sqz.cpp index 5ebcc7db49d..8601b1a764b 100644 --- a/src/jrd/sqz.cpp +++ b/src/jrd/sqz.cpp @@ -28,7 +28,7 @@ #include "../jrd/err_proto.h" #include "../yvalve/gds_proto.h" -using namespace Jrd; +using namespace Firebird::Jrd; // Compression (run-length encoding aka RLE) scheme: // diff --git a/src/jrd/sqz.h b/src/jrd/sqz.h index 073a1d9f3ef..6db12160371 100644 --- a/src/jrd/sqz.h +++ b/src/jrd/sqz.h @@ -27,8 +27,7 @@ #include "../include/fb_blk.h" #include "../../common/classes/array.h" -namespace Jrd -{ +namespace Firebird::Jrd { class thread_db; class Compressor diff --git a/src/jrd/status.h b/src/jrd/status.h index 1f8bb906ee0..b2a88c4702c 100644 --- a/src/jrd/status.h +++ b/src/jrd/status.h @@ -31,8 +31,7 @@ #include "../common/status.h" -namespace Jrd -{ +namespace Firebird::Jrd { typedef Firebird::CheckStatusWrapper FbStatusVector; } diff --git a/src/jrd/svc.cpp b/src/jrd/svc.cpp index dfa81d24fc2..8daa0ee9391 100644 --- a/src/jrd/svc.cpp +++ b/src/jrd/svc.cpp @@ -121,7 +121,7 @@ int main_gstat(Firebird::UtilSvc* uSvc); using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; inline constexpr int SVC_user_dba = 2; inline constexpr int SVC_user_any = 1; diff --git a/src/jrd/svc.h b/src/jrd/svc.h index 4fe3a327fd0..c4724cec40e 100644 --- a/src/jrd/svc.h +++ b/src/jrd/svc.h @@ -50,7 +50,7 @@ namespace Firebird { } } -namespace Jrd { +namespace Firebird::Jrd { typedef int ServiceEntry(Firebird::UtilSvc*); diff --git a/src/jrd/sys-packages/SqlPackage.cpp b/src/jrd/sys-packages/SqlPackage.cpp index d7d2a66bc5d..52626bfcda1 100644 --- a/src/jrd/sys-packages/SqlPackage.cpp +++ b/src/jrd/sys-packages/SqlPackage.cpp @@ -28,7 +28,7 @@ #include "../dsql/dsql_proto.h" #include "../jrd/mov_proto.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; diff --git a/src/jrd/sys-packages/SqlPackage.h b/src/jrd/sys-packages/SqlPackage.h index 264922c08c2..343320c057b 100644 --- a/src/jrd/sys-packages/SqlPackage.h +++ b/src/jrd/sys-packages/SqlPackage.h @@ -30,7 +30,7 @@ #include "../common/classes/objects_array.h" #include "../jrd/SystemPackages.h" -namespace Jrd { +namespace Firebird::Jrd { class SqlPackage final : public SystemPackage diff --git a/src/jrd/tdbb.h b/src/jrd/tdbb.h index 7d5406c8294..415ff46ae2a 100644 --- a/src/jrd/tdbb.h +++ b/src/jrd/tdbb.h @@ -52,8 +52,7 @@ class MemoryPool; } -namespace Jrd -{ +namespace Firebird::Jrd { class Database; class Attachment; diff --git a/src/jrd/tests/BlrGenTest.cpp b/src/jrd/tests/BlrGenTest.cpp index be65b9e7b71..ec26a3504d1 100644 --- a/src/jrd/tests/BlrGenTest.cpp +++ b/src/jrd/tests/BlrGenTest.cpp @@ -3,7 +3,7 @@ #include "../dsql/DsqlCompilerScratch.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; BOOST_AUTO_TEST_SUITE(EngineSuite) BOOST_AUTO_TEST_SUITE(BlrGenSuite) diff --git a/src/jrd/tests/CompressorTest.cpp b/src/jrd/tests/CompressorTest.cpp index 2b54c411e06..25de5770fed 100644 --- a/src/jrd/tests/CompressorTest.cpp +++ b/src/jrd/tests/CompressorTest.cpp @@ -3,7 +3,7 @@ #include "../jrd/sqz.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; BOOST_AUTO_TEST_SUITE(EngineSuite) BOOST_AUTO_TEST_SUITE(CompressorSuite) diff --git a/src/jrd/tests/RecordNumberTest.cpp b/src/jrd/tests/RecordNumberTest.cpp index 620dc7cb14b..c2acbf7ce6f 100644 --- a/src/jrd/tests/RecordNumberTest.cpp +++ b/src/jrd/tests/RecordNumberTest.cpp @@ -3,7 +3,7 @@ #include "../jrd/RecordNumber.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; BOOST_AUTO_TEST_SUITE(EngineSuite) BOOST_AUTO_TEST_SUITE(RecordNumberSuite) diff --git a/src/jrd/tpc.cpp b/src/jrd/tpc.cpp index a7a72efa8a4..6a192877b04 100644 --- a/src/jrd/tpc.cpp +++ b/src/jrd/tpc.cpp @@ -38,7 +38,7 @@ using namespace Firebird; -namespace Jrd { +namespace Firebird::Jrd { void TipCache::MemoryInitializer::mutexBug(int osErrorCode, const char* text) { diff --git a/src/jrd/tpc_proto.h b/src/jrd/tpc_proto.h index 0090a34491c..0d39cf181b7 100644 --- a/src/jrd/tpc_proto.h +++ b/src/jrd/tpc_proto.h @@ -36,7 +36,7 @@ struct tx_inv_page; } -namespace Jrd { +namespace Firebird::Jrd { class Database; class thread_db; diff --git a/src/jrd/tra.cpp b/src/jrd/tra.cpp index 6d03cceb0bb..b6cc675b9dd 100644 --- a/src/jrd/tra.cpp +++ b/src/jrd/tra.cpp @@ -81,7 +81,7 @@ #include "firebird/impl/msg_helper.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Ods; using namespace Firebird; diff --git a/src/jrd/tra.h b/src/jrd/tra.h index e10079bebb4..ca5abf53c4d 100644 --- a/src/jrd/tra.h +++ b/src/jrd/tra.h @@ -48,11 +48,11 @@ #include "../jrd/Savepoint.h" #include "../jrd/tra_proto.h" -namespace EDS { +namespace Firebird::Jrd::EDS { class Transaction; } -namespace Jrd { +namespace Firebird::Jrd { class blb; class Lock; diff --git a/src/jrd/tra_proto.h b/src/jrd/tra_proto.h index 6ef327d85c0..891aca76594 100644 --- a/src/jrd/tra_proto.h +++ b/src/jrd/tra_proto.h @@ -24,7 +24,7 @@ #ifndef JRD_TRA_PROTO_H #define JRD_TRA_PROTO_H -namespace Jrd { +namespace Firebird::Jrd { class Attachment; class Database; class TraceTransactionEnd; diff --git a/src/jrd/trace/TraceConfigStorage.cpp b/src/jrd/trace/TraceConfigStorage.cpp index 67ea28fee70..5876c511bab 100644 --- a/src/jrd/trace/TraceConfigStorage.cpp +++ b/src/jrd/trace/TraceConfigStorage.cpp @@ -63,7 +63,7 @@ using namespace Firebird; -namespace Jrd { +namespace Firebird::Jrd { static constexpr FB_UINT64 TOUCH_INTERVAL = 60 * 60; // in seconds, one hour should be enough diff --git a/src/jrd/trace/TraceConfigStorage.h b/src/jrd/trace/TraceConfigStorage.h index 2b569389754..c3a4d75956c 100644 --- a/src/jrd/trace/TraceConfigStorage.h +++ b/src/jrd/trace/TraceConfigStorage.h @@ -37,7 +37,7 @@ #include "../../common/classes/RefCounted.h" #include -namespace Jrd { +namespace Firebird::Jrd { /* Session ID and flags are stored within slot itself. diff --git a/src/jrd/trace/TraceDSQLHelpers.h b/src/jrd/trace/TraceDSQLHelpers.h index 1941edcac42..38fc7d5aa95 100644 --- a/src/jrd/trace/TraceDSQLHelpers.h +++ b/src/jrd/trace/TraceDSQLHelpers.h @@ -33,7 +33,7 @@ #include -namespace Jrd { +namespace Firebird::Jrd { using Firebird::ITracePlugin; using Firebird::ITraceFactory; diff --git a/src/jrd/trace/TraceJrdHelpers.h b/src/jrd/trace/TraceJrdHelpers.h index 9fcc1ee2975..c391c276c12 100644 --- a/src/jrd/trace/TraceJrdHelpers.h +++ b/src/jrd/trace/TraceJrdHelpers.h @@ -32,7 +32,7 @@ #include "../../jrd/trace/TraceManager.h" #include "../../jrd/trace/TraceObjects.h" -namespace Jrd { +namespace Firebird::Jrd { using Firebird::ITracePlugin; using Firebird::ITraceFactory; diff --git a/src/jrd/trace/TraceLog.cpp b/src/jrd/trace/TraceLog.cpp index ad024044f39..2d5b75c4bbf 100644 --- a/src/jrd/trace/TraceLog.cpp +++ b/src/jrd/trace/TraceLog.cpp @@ -50,7 +50,7 @@ using namespace Firebird; -namespace Jrd { +namespace Firebird::Jrd { constexpr unsigned int INIT_LOG_SIZE = 1024*1024; // 1MB constexpr unsigned int FREE_SPACE_THRESHOLD = INIT_LOG_SIZE / 4; diff --git a/src/jrd/trace/TraceLog.h b/src/jrd/trace/TraceLog.h index 702a41e2315..cd97e8fc2ef 100644 --- a/src/jrd/trace/TraceLog.h +++ b/src/jrd/trace/TraceLog.h @@ -31,7 +31,7 @@ #include "../../common/classes/fb_string.h" #include "../../common/isc_s_proto.h" -namespace Jrd { +namespace Firebird::Jrd { struct TraceLogHeader final : public Firebird::MemoryHeader { diff --git a/src/jrd/trace/TraceManager.cpp b/src/jrd/trace/TraceManager.cpp index 0a2f0857745..39438e23f99 100644 --- a/src/jrd/trace/TraceManager.cpp +++ b/src/jrd/trace/TraceManager.cpp @@ -43,7 +43,7 @@ using namespace Firebird; -namespace Jrd { +namespace Firebird::Jrd { GlobalPtr TraceManager::storageInstance; diff --git a/src/jrd/trace/TraceManager.h b/src/jrd/trace/TraceManager.h index 91c3b6b2dea..438de900284 100644 --- a/src/jrd/trace/TraceManager.h +++ b/src/jrd/trace/TraceManager.h @@ -45,7 +45,7 @@ class ICryptKeyCallback; } -namespace Jrd { +namespace Firebird::Jrd { class Database; class Attachment; diff --git a/src/jrd/trace/TraceObjects.cpp b/src/jrd/trace/TraceObjects.cpp index b91d579523d..45da65304e4 100644 --- a/src/jrd/trace/TraceObjects.cpp +++ b/src/jrd/trace/TraceObjects.cpp @@ -118,7 +118,7 @@ bool descToUTF8(const paramdsc* param, string& result) } // namespace -namespace Jrd { +namespace Firebird::Jrd { const char* StatementHolder::ensurePlan(bool explained) { diff --git a/src/jrd/trace/TraceObjects.h b/src/jrd/trace/TraceObjects.h index 00b0d466228..3bf4d57958d 100644 --- a/src/jrd/trace/TraceObjects.h +++ b/src/jrd/trace/TraceObjects.h @@ -48,7 +48,7 @@ #include "../../common/prett_proto.h" //// TODO: DDL triggers, packages and external procedures and functions support -namespace Jrd { +namespace Firebird::Jrd { class Database; class Attachment; diff --git a/src/jrd/trace/TraceService.cpp b/src/jrd/trace/TraceService.cpp index 6762f266394..aace12e78d6 100644 --- a/src/jrd/trace/TraceService.cpp +++ b/src/jrd/trace/TraceService.cpp @@ -44,7 +44,7 @@ #include "../../jrd/Mapping.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; class TraceSvcJrd : public TraceSvcIntf diff --git a/src/jrd/trig.h b/src/jrd/trig.h index 53bb6bba270..14d6f92ba80 100644 --- a/src/jrd/trig.h +++ b/src/jrd/trig.h @@ -30,7 +30,7 @@ check out GRANT.GDL, modify the trigger source to generate the proper blr, replace the blr in TRIG.H, and check both files back in. */ -namespace Jrd { +namespace Firebird::Jrd { /* trigger definition structure */ diff --git a/src/jrd/val.h b/src/jrd/val.h index 06da4f8ad9e..29a9a7d5dfa 100644 --- a/src/jrd/val.h +++ b/src/jrd/val.h @@ -53,7 +53,7 @@ class VaryingString : public pool_alloc_rpt inline constexpr ULONG MAX_RECORD_SIZE = 1048576; // 1 MB -- just to protect from possible misuse -namespace Jrd { +namespace Firebird::Jrd { class ArrayField; class blb; diff --git a/src/jrd/validation.cpp b/src/jrd/validation.cpp index 183e2489a34..fd76b5be65b 100644 --- a/src/jrd/validation.cpp +++ b/src/jrd/validation.cpp @@ -582,7 +582,7 @@ VI. ADDITIONAL NOTES static USHORT VAL_debug_level = 0; #endif -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Ods; using namespace Firebird; @@ -805,8 +805,7 @@ int VAL_service(Firebird::UtilSvc* svc) } -namespace Jrd -{ +namespace Firebird::Jrd { const Validation::MSG_ENTRY Validation::vdr_msg_table[VAL_MAX_ERROR] = { diff --git a/src/jrd/validation.h b/src/jrd/validation.h index b1f42913d2f..18dbbabdfe5 100644 --- a/src/jrd/validation.h +++ b/src/jrd/validation.h @@ -40,8 +40,7 @@ namespace Firebird class UtilSvc; } -namespace Jrd -{ +namespace Firebird::Jrd { class Attachment; class Database; diff --git a/src/jrd/vec.cpp b/src/jrd/vec.cpp index 08b58133ec9..a229d683fff 100644 --- a/src/jrd/vec.cpp +++ b/src/jrd/vec.cpp @@ -30,7 +30,7 @@ #if defined(DEV_BUILD) -using namespace Jrd; +using namespace Firebird::Jrd; thread_db* JRD_get_thread_data() { diff --git a/src/jrd/vec.h b/src/jrd/vec.h index ec83b598b71..296c101f3ec 100644 --- a/src/jrd/vec.h +++ b/src/jrd/vec.h @@ -29,7 +29,7 @@ #include "../common/ThreadData.h" #include "../common/classes/array.h" -namespace Jrd { +namespace Firebird::Jrd { // general purpose vector template diff --git a/src/jrd/vio.cpp b/src/jrd/vio.cpp index 7a223ddfd6d..be96692b0fc 100644 --- a/src/jrd/vio.cpp +++ b/src/jrd/vio.cpp @@ -95,7 +95,7 @@ #include "../common/Task.h" #include "../jrd/WorkerAttachment.h" -using namespace Jrd; +using namespace Firebird::Jrd; using namespace Firebird; static void check_class(thread_db*, jrd_tra*, record_param*, record_param*, USHORT); @@ -186,8 +186,7 @@ static bool set_security_class(thread_db*, Record*, USHORT); static void set_system_flag(thread_db*, Record*, USHORT); static void verb_post(thread_db*, jrd_tra*, record_param*, Record*); -namespace Jrd -{ +namespace Firebird::Jrd { class SweepTask : public Task { diff --git a/src/jrd/vio_proto.h b/src/jrd/vio_proto.h index a0647e057f5..c5ec7f7d1ff 100644 --- a/src/jrd/vio_proto.h +++ b/src/jrd/vio_proto.h @@ -26,8 +26,7 @@ #ifndef JRD_VIO_PROTO_H #define JRD_VIO_PROTO_H -namespace Jrd -{ +namespace Firebird::Jrd { class jrd_rel; class jrd_tra; class Record; diff --git a/src/lock/lock.cpp b/src/lock/lock.cpp index 42cc614f17b..7d3b1361a75 100644 --- a/src/lock/lock.cpp +++ b/src/lock/lock.cpp @@ -162,7 +162,7 @@ static constexpr bool compatibility[LCK_max][LCK_max] = }; -namespace Jrd { +namespace Firebird::Jrd { LockManager::LockManager(const string& id, const Config* conf) diff --git a/src/lock/lock_proto.h b/src/lock/lock_proto.h index a44e86c8062..1cc2f17f4b1 100644 --- a/src/lock/lock_proto.h +++ b/src/lock/lock_proto.h @@ -288,7 +288,7 @@ namespace Firebird { class Config; } -namespace Jrd { +namespace Firebird::Jrd { class LockManager final : public Firebird::GlobalStorage, public Firebird::IpcObject { diff --git a/src/lock/tests/LockManagerTest.cpp b/src/lock/tests/LockManagerTest.cpp index 26717b30d87..bc7e65ec163 100644 --- a/src/lock/tests/LockManagerTest.cpp +++ b/src/lock/tests/LockManagerTest.cpp @@ -17,7 +17,7 @@ #include "../jrd/lck.h" using namespace Firebird; -using namespace Jrd; +using namespace Firebird::Jrd; namespace From 26f62597566dd24138802c9d194833ff00379a52 Mon Sep 17 00:00:00 2001 From: Adriano dos Santos Fernandes Date: Fri, 6 Mar 2026 08:27:40 -0300 Subject: [PATCH 002/104] WIP --- src/alice/alice.cpp | 10 +- src/alice/alice_proto.h | 4 +- src/alice/tdr.cpp | 2 +- src/auth/AuthDbg.cpp | 6 +- src/auth/AuthDbg.h | 2 +- src/auth/SecDbCache.cpp | 4 +- src/auth/SecDbCache.h | 2 +- .../SecureRemotePassword/client/SrpClient.cpp | 18 +- .../SecureRemotePassword/client/SrpClient.h | 2 +- .../manage/SrpManagement.cpp | 6 +- .../SecureRemotePassword/misc/test_srp.cpp | 2 +- .../SecureRemotePassword/server/SrpServer.cpp | 6 +- .../SecureRemotePassword/server/SrpServer.h | 2 +- src/auth/SecureRemotePassword/srp.cpp | 6 +- src/auth/SecureRemotePassword/srp.h | 6 +- src/auth/SecurityDatabase/LegacyClient.cpp | 2 +- src/auth/SecurityDatabase/LegacyClient.h | 2 +- src/auth/SecurityDatabase/LegacyHash.h | 2 +- .../SecurityDatabase/LegacyManagement.epp | 4 +- src/auth/SecurityDatabase/LegacyManagement.h | 2 +- src/auth/SecurityDatabase/LegacyServer.cpp | 16 +- src/auth/SecurityDatabase/LegacyServer.h | 2 +- src/auth/trusted/AuthSspi.cpp | 6 +- src/auth/trusted/AuthSspi.h | 2 +- src/burp/BurpTasks.cpp | 2 +- src/burp/backup.epp | 2 +- src/burp/burp.cpp | 24 +- src/burp/burp_proto.h | 16 +- src/burp/mvol.cpp | 6 +- src/burp/restore.epp | 4 +- src/burp/split/spit.cpp | 2 +- src/common/Auth.cpp | 2 +- src/common/Auth.h | 2 +- src/common/BigInteger.cpp | 2 +- src/common/CharSet.cpp | 8 +- src/common/CvtFormat.cpp | 132 ++- src/common/DecFloat.cpp | 6 +- src/common/Int128.cpp | 24 +- src/common/IntlParametersBlock.cpp | 4 +- src/common/MsgMetadata.cpp | 8 +- src/common/MsgMetadata.h | 4 +- src/common/MsgUtil.cpp | 2 +- src/common/ScanDir.cpp | 4 +- src/common/SimilarToRegex.cpp | 62 +- src/common/SimilarToRegex.h | 5 +- src/common/StatementMetadata.cpp | 4 +- src/common/StatusArg.cpp | 1 - src/common/StatusHolder.cpp | 4 +- src/common/TimeZoneUtil.cpp | 44 +- src/common/Tokens.cpp | 2 +- src/common/UtilSvc.cpp | 4 +- src/common/UtilSvc.h | 6 +- src/common/call_service.cpp | 40 +- src/common/call_service.h | 2 +- src/common/classes/BaseStream.cpp | 3 +- src/common/classes/BaseStream.h | 3 +- src/common/classes/BatchCompletionState.h | 4 +- src/common/classes/BlrReader.h | 28 +- src/common/classes/BlrWriter.cpp | 4 +- src/common/classes/BlrWriter.h | 2 +- src/common/classes/InternalMessageBuffer.cpp | 30 +- src/common/classes/MetaString.h | 8 +- src/common/classes/MsgPrint.cpp | 5 +- src/common/classes/MsgPrint.h | 5 +- src/common/classes/QualifiedMetaString.h | 12 +- src/common/classes/SafeArg.cpp | 3 +- src/common/classes/SafeArg.h | 3 +- src/common/classes/TempFile.cpp | 22 +- src/common/classes/alloc.cpp | 16 +- src/common/classes/init.cpp | 7 +- src/common/classes/init.h | 4 +- src/common/common.h | 32 +- src/common/config/ConfigCache.cpp | 2 +- src/common/config/config.cpp | 2 +- src/common/config/config_file.cpp | 10 +- src/common/cvt.cpp | 102 +- src/common/db_alias.cpp | 10 +- src/common/dsc.cpp | 4 +- src/common/fb_exception.cpp | 8 +- src/common/gdsassert.h | 2 +- src/common/ipc/IpcMessage.h | 2 +- src/common/ipc/IpcNamedSignal.h | 2 +- src/common/isc.cpp | 2 +- src/common/isc_file.cpp | 26 +- src/common/isc_sync.cpp | 56 +- src/common/os/darwin/mod_loader.cpp | 2 +- src/common/os/os_utils.h | 3 +- src/common/os/posix/divorce.cpp | 2 +- src/common/os/posix/guid.cpp | 2 +- src/common/os/posix/mod_loader.cpp | 2 +- src/common/os/posix/os_utils.cpp | 27 +- src/common/os/posix/path_utils.cpp | 6 +- src/common/os/win32/os_utils.cpp | 5 +- src/common/sdl.cpp | 34 +- src/common/security.cpp | 4 +- src/common/security.h | 2 +- src/common/unicode_util.cpp | 14 +- src/common/utils.cpp | 2 +- src/dsql/AggNodes.cpp | 50 +- src/dsql/BlrDebugWriter.cpp | 2 +- src/dsql/BoolNodes.cpp | 30 +- src/dsql/DdlNodes.epp | 978 +++++++++--------- src/dsql/DdlNodes.h | 10 +- src/dsql/DsqlBatch.cpp | 92 +- src/dsql/DsqlCompilerScratch.cpp | 70 +- src/dsql/DsqlCursor.cpp | 10 +- src/dsql/DsqlRequests.cpp | 130 +-- src/dsql/DsqlStatements.cpp | 18 +- src/dsql/ExprNodes.cpp | 502 ++++----- src/dsql/Nodes.h | 2 +- src/dsql/PackageNodes.epp | 68 +- src/dsql/Parser.cpp | 80 +- src/dsql/Parser.h | 8 +- src/dsql/StmtNodes.cpp | 410 ++++---- src/dsql/WinNodes.cpp | 18 +- src/dsql/ddl.cpp | 72 +- src/dsql/dsql.cpp | 48 +- src/dsql/errd.cpp | 14 +- src/dsql/gen.cpp | 16 +- src/dsql/make.cpp | 14 +- src/dsql/metd.epp | 20 +- src/dsql/movd.cpp | 6 +- src/dsql/pass1.cpp | 272 ++--- src/gpre/gpre.cpp | 10 +- src/include/fb_exception.h | 2 +- src/isql/InputDevices.cpp | 4 +- src/isql/extract.epp | 2 +- src/isql/isql.epp | 14 +- src/isql/iutils.cpp | 2 +- src/isql/iutils_proto.h | 6 +- src/isql/show.epp | 2 +- src/jrd/Attachment.cpp | 14 +- src/jrd/BlobUtil.cpp | 14 +- src/jrd/Coercion.cpp | 2 +- src/jrd/CryptoManager.cpp | 54 +- src/jrd/DataTypeUtil.cpp | 10 +- src/jrd/Database.cpp | 4 +- src/jrd/DbCreators.cpp | 10 +- src/jrd/DebugInterface.cpp | 2 +- src/jrd/ExtEngineManager.cpp | 12 +- src/jrd/Function.epp | 8 +- src/jrd/IntlManager.cpp | 6 +- src/jrd/Mapping.cpp | 34 +- src/jrd/Monitoring.cpp | 8 +- src/jrd/ProfilerManager.cpp | 12 +- src/jrd/RecordSourceNodes.cpp | 122 +-- src/jrd/Resources.cpp | 2 +- src/jrd/Routine.cpp | 4 +- src/jrd/Savepoint.cpp | 4 +- src/jrd/Statement.cpp | 12 +- src/jrd/SysFunction.cpp | 514 ++++----- src/jrd/SystemTriggers.epp | 64 +- src/jrd/TempSpace.cpp | 4 +- src/jrd/UserManagement.cpp | 50 +- src/jrd/UserManagement.h | 6 +- src/jrd/VirtualTable.cpp | 6 +- src/jrd/WorkerAttachment.cpp | 4 +- src/jrd/blb.cpp | 42 +- src/jrd/blob_filter.cpp | 2 +- src/jrd/btr.cpp | 48 +- src/jrd/cch.cpp | 26 +- src/jrd/cmp.cpp | 16 +- src/jrd/cvt.cpp | 10 +- src/jrd/cvt2.cpp | 8 +- src/jrd/dfw.epp | 112 +- src/jrd/dpm.epp | 6 +- src/jrd/dyn_util.epp | 4 +- src/jrd/err.cpp | 20 +- src/jrd/event.cpp | 10 +- src/jrd/evl.cpp | 10 +- src/jrd/exe.cpp | 40 +- src/jrd/ext.cpp | 44 +- src/jrd/extds/ExtDS.cpp | 66 +- src/jrd/extds/InternalDS.cpp | 2 +- src/jrd/extds/IscDS.cpp | 18 +- src/jrd/extds/ValidatePassword.cpp | 16 +- src/jrd/flu.cpp | 4 +- src/jrd/fun.epp | 56 +- src/jrd/idx.cpp | 18 +- src/jrd/inf.cpp | 2 +- src/jrd/ini.epp | 6 +- src/jrd/intl.cpp | 18 +- src/jrd/jrd.cpp | 288 +++--- src/jrd/lck.cpp | 4 +- src/jrd/met.epp | 26 +- src/jrd/mov.cpp | 4 +- src/jrd/nbak.cpp | 10 +- src/jrd/optimizer/Optimizer.cpp | 26 +- src/jrd/os/posix/unix.cpp | 108 +- src/jrd/os/win32/winnt.cpp | 22 +- src/jrd/pag.cpp | 42 +- src/jrd/par.cpp | 62 +- src/jrd/recsrc/AggregatedStream.cpp | 2 +- src/jrd/recsrc/Cursor.cpp | 20 +- src/jrd/recsrc/ExternalTableScan.cpp | 2 +- src/jrd/recsrc/FirstRowsStream.cpp | 2 +- src/jrd/recsrc/LocalTableStream.cpp | 2 +- src/jrd/recsrc/ProcedureScan.cpp | 8 +- src/jrd/recsrc/RecursiveStream.cpp | 4 +- src/jrd/recsrc/SingularStream.cpp | 2 +- src/jrd/recsrc/SkipRowsStream.cpp | 2 +- src/jrd/recsrc/SortedStream.cpp | 10 +- src/jrd/recsrc/TableValueFunctionScan.cpp | 4 +- src/jrd/recsrc/VirtualTableScan.cpp | 2 +- src/jrd/recsrc/WindowedStream.cpp | 8 +- src/jrd/replication/Applier.cpp | 2 +- src/jrd/replication/ChangeLog.cpp | 26 +- src/jrd/replication/Config.cpp | 8 +- src/jrd/replication/Publisher.cpp | 2 +- src/jrd/replication/Utils.cpp | 8 +- src/jrd/rlck.cpp | 8 +- src/jrd/scl.epp | 34 +- src/jrd/scl.h | 2 +- src/jrd/sdw.cpp | 14 +- src/jrd/shut.cpp | 16 +- src/jrd/svc.cpp | 112 +- src/jrd/svc.h | 6 +- src/jrd/tpc.cpp | 4 +- src/jrd/tra.cpp | 372 +++---- src/jrd/trace/TraceCmdLine.cpp | 12 +- src/jrd/trace/TraceConfigStorage.cpp | 26 +- src/jrd/validation.cpp | 12 +- src/jrd/vio.cpp | 84 +- src/lock/lock.cpp | 40 +- src/lock/print.cpp | 10 +- src/plugins/crypt/chacha/ChaCha.cpp | 6 +- src/remote/SockAddr.h | 2 +- src/remote/client/BlrFromMessage.cpp | 4 +- src/remote/client/interface.cpp | 172 +-- src/remote/inet.cpp | 35 +- src/remote/os/win32/xnet.cpp | 32 +- src/remote/protocol.cpp | 2 +- src/remote/remote.cpp | 12 +- src/remote/remote.h | 5 +- src/remote/server/ReplServer.cpp | 6 +- src/remote/server/os/posix/inet_server.cpp | 8 +- src/remote/server/os/win32/srvr_w32.cpp | 10 +- src/remote/server/server.cpp | 124 +-- src/utilities/analyse.cpp | 6 +- src/utilities/fbsvcmgr/fbsvcmgr.cpp | 48 +- src/utilities/fbtracemgr/traceMgrMain.cpp | 20 +- src/utilities/gsec/gsec.cpp | 4 +- src/utilities/gsec/gsec.h | 5 +- src/utilities/gstat/dba.epp | 6 +- src/utilities/guard/guard.cpp | 2 +- src/utilities/guard/util.cpp | 2 +- src/utilities/nbackup/nbackup.cpp | 136 +-- src/utilities/ntrace/PluginLogWriter.cpp | 4 +- src/utilities/ntrace/TracePluginImpl.cpp | 2 +- .../ntrace/os/posix/misc/FileObject.cpp | 6 +- src/utilities/rebuild/rebuild.cpp | 8 +- src/yvalve/DistributedTransaction.cpp | 6 +- src/yvalve/PluginManager.cpp | 20 +- src/yvalve/alt.cpp | 16 +- src/yvalve/array.cpp | 26 +- src/yvalve/blob.cpp | 16 +- src/yvalve/gds.cpp | 22 +- src/yvalve/preparse.cpp | 2 +- src/yvalve/user_dsql.cpp | 22 +- src/yvalve/utl.cpp | 34 +- src/yvalve/why.cpp | 124 +-- 261 files changed, 4026 insertions(+), 4023 deletions(-) diff --git a/src/alice/alice.cpp b/src/alice/alice.cpp index 06b1ce4357a..fa18ae1de38 100644 --- a/src/alice/alice.cpp +++ b/src/alice/alice.cpp @@ -60,7 +60,7 @@ #include #endif -using MsgFormat::SafeArg; +using Firebird::MsgFormat::SafeArg; static constexpr USHORT val_err_table[] = @@ -401,15 +401,15 @@ int alice(Firebird::UtilSvc* uSvc) case fb_utils::FETCH_PASS_OK: break; case fb_utils::FETCH_PASS_FILE_OPEN_ERROR: - ALICE_error(116, MsgFormat::SafeArg() << *argv << errno); + ALICE_error(116, Firebird::MsgFormat::SafeArg() << *argv << errno); // error @2 opening password file @1 break; case fb_utils::FETCH_PASS_FILE_READ_ERROR: - ALICE_error(117, MsgFormat::SafeArg() << *argv << errno); + ALICE_error(117, Firebird::MsgFormat::SafeArg() << *argv << errno); // error @2 reading password file @1 break; case fb_utils::FETCH_PASS_FILE_EMPTY: - ALICE_error(118, MsgFormat::SafeArg() << *argv); + ALICE_error(118, Firebird::MsgFormat::SafeArg() << *argv); // password file @1 is empty break; } @@ -506,7 +506,7 @@ int alice(Firebird::UtilSvc* uSvc) { if (uSvc->isService()) { - uSvc->getStatusAccessor().setServiceStatus(ALICE_MSG_FAC, 20, MsgFormat::SafeArg()); + uSvc->getStatusAccessor().setServiceStatus(ALICE_MSG_FAC, 20, Firebird::MsgFormat::SafeArg()); } else { diff --git a/src/alice/alice_proto.h b/src/alice/alice_proto.h index 3907a466850..947dfaafd49 100644 --- a/src/alice/alice_proto.h +++ b/src/alice/alice_proto.h @@ -34,8 +34,8 @@ int alice(Firebird::UtilSvc*); class AliceGlobals; void ALICE_upper_case(const TEXT*, TEXT*, const size_t) noexcept; -void ALICE_print(USHORT, const MsgFormat::SafeArg& arg = MsgFormat::SafeArg()); -[[noreturn]] void ALICE_error(USHORT, const MsgFormat::SafeArg& arg = MsgFormat::SafeArg()); +void ALICE_print(USHORT, const Firebird::MsgFormat::SafeArg& arg = Firebird::MsgFormat::SafeArg()); +[[noreturn]] void ALICE_error(USHORT, const Firebird::MsgFormat::SafeArg& arg = Firebird::MsgFormat::SafeArg()); void ALICE_print_status(bool error, const ISC_STATUS*); [[noreturn]] void ALICE_exit(int, AliceGlobals*); diff --git a/src/alice/tdr.cpp b/src/alice/tdr.cpp index c8dc9b4d31c..c7e8950ee4e 100644 --- a/src/alice/tdr.cpp +++ b/src/alice/tdr.cpp @@ -47,7 +47,7 @@ #include "../jrd/constants.h" #include "../common/classes/ClumpletWriter.h" -using MsgFormat::SafeArg; +using Firebird::MsgFormat::SafeArg; static SINT64 ask(); diff --git a/src/auth/AuthDbg.cpp b/src/auth/AuthDbg.cpp index 386f9f5e231..69be6a4d83e 100644 --- a/src/auth/AuthDbg.cpp +++ b/src/auth/AuthDbg.cpp @@ -35,8 +35,8 @@ //#define AUTH_VERBOSE // register plugin -static Firebird::SimpleFactory clientFactory; -static Firebird::SimpleFactory serverFactory; +static Firebird::SimpleFactory clientFactory; +static Firebird::SimpleFactory serverFactory; extern "C" FB_DLL_EXPORT void FB_PLUGIN_ENTRY_POINT(Firebird::IMaster* master) { @@ -51,7 +51,7 @@ extern "C" FB_DLL_EXPORT void FB_PLUGIN_ENTRY_POINT(Firebird::IMaster* master) } -namespace Auth { +namespace Firebird::Auth { DebugServer::DebugServer(Firebird::IPluginConfig* pConf) : str(getPool()) diff --git a/src/auth/AuthDbg.h b/src/auth/AuthDbg.h index b556bd537fb..57215144153 100644 --- a/src/auth/AuthDbg.h +++ b/src/auth/AuthDbg.h @@ -41,7 +41,7 @@ #include "../common/classes/array.h" #include "../common/classes/fb_string.h" -namespace Auth { +namespace Firebird::Auth { // The idea of debug plugin is to send some data from server to client, // modify them on client and return result (which becomes login name) to the server diff --git a/src/auth/SecDbCache.cpp b/src/auth/SecDbCache.cpp index 601790bdba9..6de1768350b 100644 --- a/src/auth/SecDbCache.cpp +++ b/src/auth/SecDbCache.cpp @@ -35,7 +35,7 @@ using namespace Firebird; -namespace Auth { +namespace Firebird::Auth { void CachedSecurityDatabase::close() { @@ -64,7 +64,7 @@ void PluginDatabases::getInstance(IPluginConfig* pluginConfig, CachedSecurityDat unsigned int secDbKey = keys->getKey(config, "SecurityDatabase"); const char* tmp = config->asString(secDbKey); if (!tmp) - Arg::Gds(isc_secdb_name).raise(); + Firebird::Arg::Gds(isc_secdb_name).raise(); secDbName = tmp; } diff --git a/src/auth/SecDbCache.h b/src/auth/SecDbCache.h index 1937e4a7ca9..12048622b7d 100644 --- a/src/auth/SecDbCache.h +++ b/src/auth/SecDbCache.h @@ -35,7 +35,7 @@ #include "../common/classes/auto.h" -namespace Auth { +namespace Firebird::Auth { class VSecDb { diff --git a/src/auth/SecureRemotePassword/client/SrpClient.cpp b/src/auth/SecureRemotePassword/client/SrpClient.cpp index e019a636dac..9cdbfd9a345 100644 --- a/src/auth/SecureRemotePassword/client/SrpClient.cpp +++ b/src/auth/SecureRemotePassword/client/SrpClient.cpp @@ -32,7 +32,7 @@ using namespace Firebird; -namespace Auth { +namespace Firebird::Auth { class SrpClient : public StdPlugin > { @@ -80,7 +80,7 @@ int SrpClient::authenticate(CheckStatusWrapper* status, IClientBlock* cb) if (sessionKey.hasData()) { // Why are we called when auth is completed? - (Arg::Gds(isc_random) << "Auth sync failure - SRP's authenticate called more times than supported").raise(); + (Firebird::Arg::Gds(isc_random) << "Auth sync failure - SRP's authenticate called more times than supported").raise(); } if (!client) @@ -108,14 +108,14 @@ int SrpClient::authenticate(CheckStatusWrapper* status, IClientBlock* cb) const unsigned char* saltAndKey = cb->getData(&length); if (!saltAndKey || length == 0) { - Arg::Gds(isc_auth_data).raise(); + Firebird::Arg::Gds(isc_auth_data).raise(); } constexpr unsigned expectedLength = (RemotePassword::SRP_SALT_SIZE + RemotePassword::SRP_KEY_SIZE + 2) * 2; if (length > expectedLength) { - (Arg::Gds(isc_auth_datalength) << Arg::Num(length) << - Arg::Num(expectedLength) << "data").raise(); + (Firebird::Arg::Gds(isc_auth_datalength) << Firebird::Arg::Num(length) << + Firebird::Arg::Num(expectedLength) << "data").raise(); } string salt, key; @@ -123,8 +123,8 @@ int SrpClient::authenticate(CheckStatusWrapper* status, IClientBlock* cb) charSize += ((unsigned) *saltAndKey++) << 8; if (charSize > RemotePassword::SRP_SALT_SIZE * 2) { - (Arg::Gds(isc_auth_datalength) << Arg::Num(charSize) << - Arg::Num(RemotePassword::SRP_SALT_SIZE * 2) << "salt").raise(); + (Firebird::Arg::Gds(isc_auth_datalength) << Firebird::Arg::Num(charSize) << + Firebird::Arg::Num(RemotePassword::SRP_SALT_SIZE * 2) << "salt").raise(); } salt.assign(saltAndKey, charSize); dumpIt("Clnt: salt", salt); @@ -135,8 +135,8 @@ int SrpClient::authenticate(CheckStatusWrapper* status, IClientBlock* cb) charSize += ((unsigned) *saltAndKey++) << 8; if (charSize != length - 2) { - (Arg::Gds(isc_auth_datalength) << Arg::Num(charSize) << - Arg::Num(length - 2) << "key").raise(); + (Firebird::Arg::Gds(isc_auth_datalength) << Firebird::Arg::Num(charSize) << + Firebird::Arg::Num(length - 2) << "key").raise(); } key.assign(saltAndKey, charSize); dumpIt("Clnt: key(srvPub)", key); diff --git a/src/auth/SecureRemotePassword/client/SrpClient.h b/src/auth/SecureRemotePassword/client/SrpClient.h index 767d602c823..57d279d6a78 100644 --- a/src/auth/SecureRemotePassword/client/SrpClient.h +++ b/src/auth/SecureRemotePassword/client/SrpClient.h @@ -29,7 +29,7 @@ #include "firebird/Interface.h" -namespace Auth { +namespace Firebird::Auth { void registerSrpClient(Firebird::IPluginManager* iPlugin); diff --git a/src/auth/SecureRemotePassword/manage/SrpManagement.cpp b/src/auth/SecureRemotePassword/manage/SrpManagement.cpp index 54df74eb26e..f9ae1fc39f7 100644 --- a/src/auth/SecureRemotePassword/manage/SrpManagement.cpp +++ b/src/auth/SecureRemotePassword/manage/SrpManagement.cpp @@ -50,7 +50,7 @@ Firebird::GlobalPtr keys; } // anonymous namespace -namespace Auth { +namespace Firebird::Auth { class SrpManagement final : public Firebird::StdPlugin > { @@ -967,13 +967,13 @@ class SrpManagement final : public Firebird::StdPlugin factory; +static Firebird::SimpleFactory factory; } // namespace Auth extern "C" FB_DLL_EXPORT void FB_PLUGIN_ENTRY_POINT(Firebird::IMaster* master) { Firebird::CachedMasterInterface::set(master); - Firebird::PluginManagerInterfacePtr()->registerPluginFactory(Firebird::IPluginManager::TYPE_AUTH_USER_MANAGEMENT, Auth::RemotePassword::plugName, &Auth::factory); + Firebird::PluginManagerInterfacePtr()->registerPluginFactory(Firebird::IPluginManager::TYPE_AUTH_USER_MANAGEMENT, Firebird::Auth::RemotePassword::plugName, &Firebird::Auth::factory); Firebird::getUnloadDetector()->registerMe(); } diff --git a/src/auth/SecureRemotePassword/misc/test_srp.cpp b/src/auth/SecureRemotePassword/misc/test_srp.cpp index 6247f508ff2..b430f68e8ee 100644 --- a/src/auth/SecureRemotePassword/misc/test_srp.cpp +++ b/src/auth/SecureRemotePassword/misc/test_srp.cpp @@ -1,6 +1,6 @@ #include "../auth/SecureRemotePassword/srp.h" -using namespace Auth; +using namespace Firebird::Auth; templatevoid runTest(int argc, char** argv) { diff --git a/src/auth/SecureRemotePassword/server/SrpServer.cpp b/src/auth/SecureRemotePassword/server/SrpServer.cpp index 7afde371d3b..acb614a5e16 100644 --- a/src/auth/SecureRemotePassword/server/SrpServer.cpp +++ b/src/auth/SecureRemotePassword/server/SrpServer.cpp @@ -39,7 +39,7 @@ #include "../auth/SecDbCache.h" using namespace Firebird; -using namespace Auth; +using namespace Firebird::Auth; namespace { @@ -276,7 +276,7 @@ int SrpServer::authenticate(CheckStatusWrapper* status, IServerBlock* sb, IWrite const size_t len = account.length(); if (len > SZ_LOGIN) - status_exception::raise(Arg::Gds(isc_long_login) << Arg::Num(len) << Arg::Num(SZ_LOGIN)); + status_exception::raise(Firebird::Arg::Gds(isc_long_login) << Firebird::Arg::Num(len) << Firebird::Arg::Num(SZ_LOGIN)); unsigned int length; const unsigned char* val = sb->getData(&length); @@ -418,7 +418,7 @@ SimpleFactory > factory_sha512; } // anonymous namespace -namespace Auth { +namespace Firebird::Auth { void registerSrpServer(IPluginManager* iPlugin) { diff --git a/src/auth/SecureRemotePassword/server/SrpServer.h b/src/auth/SecureRemotePassword/server/SrpServer.h index 596772643a2..f181939a0e7 100644 --- a/src/auth/SecureRemotePassword/server/SrpServer.h +++ b/src/auth/SecureRemotePassword/server/SrpServer.h @@ -29,7 +29,7 @@ #include "firebird/Interface.h" -namespace Auth { +namespace Firebird::Auth { void registerSrpServer(Firebird::IPluginManager* iPlugin); diff --git a/src/auth/SecureRemotePassword/srp.cpp b/src/auth/SecureRemotePassword/srp.cpp index c1a5df118f4..54eebccd19e 100644 --- a/src/auth/SecureRemotePassword/srp.cpp +++ b/src/auth/SecureRemotePassword/srp.cpp @@ -19,7 +19,7 @@ const char* primeStr = "E67D2E994B2F900C3F41F08F5BB2627ED0D49EE1FE767A52EFCD565C const char* genStr = "02"; } // anonumous namespace -namespace Auth { +namespace Firebird::Auth { class RemoteGroup { @@ -29,7 +29,7 @@ class RemoteGroup explicit RemoteGroup(Firebird::MemoryPool&) : prime(primeStr), generator(genStr), k() { - Auth::SecureHash hash; + Firebird::Auth::SecureHash hash; hash.processInt(prime); if (prime.length() > generator.length()) @@ -240,7 +240,7 @@ void checkStatusVectorForMissingTable(const ISC_STATUS* v, std::function -namespace Auth { +namespace Firebird::Auth { /* * Order of battle for SRP handshake: @@ -86,7 +86,7 @@ class RemotePassword : public Firebird::GlobalStorage { private: const RemoteGroup* group; - Auth::SecureHash hash; + Firebird::Auth::SecureHash hash; Firebird::BigInteger privateKey; Firebird::BigInteger scramble; @@ -135,7 +135,7 @@ template class RemotePasswordImpl : public RemotePassword Firebird::BigInteger makeProof(const Firebird::BigInteger n1, const Firebird::BigInteger n2, const char* salt, const Firebird::UCharBuffer& sessionKey) { - Auth::SecureHash digest; + Firebird::Auth::SecureHash digest; digest.processInt(n1); // H(prime) ^ H(g) digest.processInt(n2); // H(I) digest.process(salt); // s diff --git a/src/auth/SecurityDatabase/LegacyClient.cpp b/src/auth/SecurityDatabase/LegacyClient.cpp index 517566a88bb..d96c77309d1 100644 --- a/src/auth/SecurityDatabase/LegacyClient.cpp +++ b/src/auth/SecurityDatabase/LegacyClient.cpp @@ -33,7 +33,7 @@ #include "../common/classes/ImplementHelper.h" #include "../common/classes/init.h" -namespace Auth { +namespace Firebird::Auth { int SecurityDatabaseClient::authenticate(Firebird::CheckStatusWrapper* status, Firebird::IClientBlock* cb) { diff --git a/src/auth/SecurityDatabase/LegacyClient.h b/src/auth/SecurityDatabase/LegacyClient.h index c271f945206..8401bef6c94 100644 --- a/src/auth/SecurityDatabase/LegacyClient.h +++ b/src/auth/SecurityDatabase/LegacyClient.h @@ -30,7 +30,7 @@ #include "firebird/Interface.h" #include "../common/classes/ImplementHelper.h" -namespace Auth { +namespace Firebird::Auth { // Required to stop analyzing rest of plugins before first roundtrip to server // if legacy login is present in DPB diff --git a/src/auth/SecurityDatabase/LegacyHash.h b/src/auth/SecurityDatabase/LegacyHash.h index 3c80154a890..99196f9ef36 100644 --- a/src/auth/SecurityDatabase/LegacyHash.h +++ b/src/auth/SecurityDatabase/LegacyHash.h @@ -32,7 +32,7 @@ #include "../common/os/guid.h" #include "../common/utils_proto.h" -namespace Auth { +namespace Firebird::Auth { inline constexpr size_t MAX_LEGACY_PASSWORD_LENGTH = 64; // used to store passwords internally static inline constexpr const char* LEGACY_PASSWORD_SALT = "9z"; // for old ENC_crypt() diff --git a/src/auth/SecurityDatabase/LegacyManagement.epp b/src/auth/SecurityDatabase/LegacyManagement.epp index 31fd920de9e..350682d1050 100644 --- a/src/auth/SecurityDatabase/LegacyManagement.epp +++ b/src/auth/SecurityDatabase/LegacyManagement.epp @@ -104,7 +104,7 @@ static bool grantRevokeAdmin(ISC_STATUS* isc_status, FB_API_HANDLE database, FB_ static Firebird::GlobalPtr keys; -namespace Auth { +namespace Firebird::Auth { SecurityDatabaseManagement::SecurityDatabaseManagement(Firebird::IPluginConfig* par) : database(0), transaction(0) @@ -766,7 +766,7 @@ int SecurityDatabaseManagement::execute(Firebird::CheckStatusWrapper* st, Firebi } // namespace Auth // register plugin -static Firebird::SimpleFactory factory; +static Firebird::SimpleFactory factory; extern "C" FB_DLL_EXPORT void FB_PLUGIN_ENTRY_POINT(Firebird::IMaster* master) { diff --git a/src/auth/SecurityDatabase/LegacyManagement.h b/src/auth/SecurityDatabase/LegacyManagement.h index 65136edb6ad..24adbc2c596 100644 --- a/src/auth/SecurityDatabase/LegacyManagement.h +++ b/src/auth/SecurityDatabase/LegacyManagement.h @@ -31,7 +31,7 @@ #include "firebird/Interface.h" -namespace Auth { +namespace Firebird::Auth { class SecurityDatabaseManagement final : public Firebird::StdPlugin > diff --git a/src/auth/SecurityDatabase/LegacyServer.cpp b/src/auth/SecurityDatabase/LegacyServer.cpp index 66f1340c7d9..73dd570f1a4 100644 --- a/src/auth/SecurityDatabase/LegacyServer.cpp +++ b/src/auth/SecurityDatabase/LegacyServer.cpp @@ -57,7 +57,7 @@ const UCHAR PWD_REQUEST[] = blr_long, 0, blr_long, 0, blr_short, 0, - blr_text, BLR_WORD(Auth::MAX_LEGACY_PASSWORD_LENGTH + 2), + blr_text, BLR_WORD(Firebird::Auth::MAX_LEGACY_PASSWORD_LENGTH + 2), blr_message, 0, 1, 0, blr_cstring, 129, 0, blr_receive, 0, @@ -107,7 +107,7 @@ struct user_record SLONG gid; SLONG uid; SSHORT flag; - SCHAR password[Auth::MAX_LEGACY_PASSWORD_LENGTH + 2]; + SCHAR password[Firebird::Auth::MAX_LEGACY_PASSWORD_LENGTH + 2]; }; typedef char user_name[129]; @@ -124,7 +124,7 @@ const UCHAR TPB[4] = } // anonymous namespace -namespace Auth { +namespace Firebird::Auth { GlobalPtr instances; @@ -263,13 +263,13 @@ void SecurityDatabase::checkStatus(const char* callName, ISC_STATUS userError) if (!userError) return; - Arg::Gds secDbError(userError); + Firebird::Arg::Gds secDbError(userError); string message; message.printf("Error in %s() API call when working with legacy security database", callName); - secDbError << Arg::Gds(isc_random) << message; + secDbError << Firebird::Arg::Gds(isc_random) << message; - secDbError << Arg::StatusVector(status); + secDbError << Firebird::Arg::StatusVector(status); secDbError.raise(); } @@ -419,8 +419,8 @@ extern "C" FB_DLL_EXPORT void FB_PLUGIN_ENTRY_POINT(IMaster* master) { CachedMasterInterface::set(master); - getUnloadDetector()->setCleanup(Auth::SecurityDatabase::cleanup); - Auth::registerLegacyServer(PluginManagerInterfacePtr()); + getUnloadDetector()->setCleanup(Firebird::Auth::SecurityDatabase::cleanup); + Firebird::Auth::registerLegacyServer(PluginManagerInterfacePtr()); getUnloadDetector()->registerMe(); } diff --git a/src/auth/SecurityDatabase/LegacyServer.h b/src/auth/SecurityDatabase/LegacyServer.h index 43f7f306dee..0aea08c4f07 100644 --- a/src/auth/SecurityDatabase/LegacyServer.h +++ b/src/auth/SecurityDatabase/LegacyServer.h @@ -29,7 +29,7 @@ #include "firebird/Interface.h" -namespace Auth { +namespace Firebird::Auth { void registerLegacyServer(Firebird::IPluginManager* iPlugin); diff --git a/src/auth/trusted/AuthSspi.cpp b/src/auth/trusted/AuthSspi.cpp index 04570e77c65..b4d07b5c340 100644 --- a/src/auth/trusted/AuthSspi.cpp +++ b/src/auth/trusted/AuthSspi.cpp @@ -38,8 +38,8 @@ using namespace Firebird; namespace { - Firebird::SimpleFactory clientFactory; - Firebird::SimpleFactory serverFactory; + Firebird::SimpleFactory clientFactory; + Firebird::SimpleFactory serverFactory; constexpr const char* plugName = "Win_Sspi"; @@ -65,7 +65,7 @@ namespace } } -namespace Auth { +namespace Firebird::Auth { static thread_local bool legacySSP = false; diff --git a/src/auth/trusted/AuthSspi.h b/src/auth/trusted/AuthSspi.h index 9f693ff0f22..06115197461 100644 --- a/src/auth/trusted/AuthSspi.h +++ b/src/auth/trusted/AuthSspi.h @@ -49,7 +49,7 @@ #include #include -namespace Auth { +namespace Firebird::Auth { class AuthSspi { diff --git a/src/burp/BurpTasks.cpp b/src/burp/BurpTasks.cpp index 5b9feb7b51a..ce94c025c34 100644 --- a/src/burp/BurpTasks.cpp +++ b/src/burp/BurpTasks.cpp @@ -32,7 +32,7 @@ #include "../burp/burp_proto.h" #include "../burp/mvol_proto.h" -using MsgFormat::SafeArg; +using Firebird::MsgFormat::SafeArg; using namespace Firebird; namespace Burp diff --git a/src/burp/backup.epp b/src/burp/backup.epp index f3df7267962..b06e72d075d 100644 --- a/src/burp/backup.epp +++ b/src/burp/backup.epp @@ -62,7 +62,7 @@ #include "../burp/OdsDetection.h" #include "../burp/BurpTasks.h" -using MsgFormat::SafeArg; +using Firebird::MsgFormat::SafeArg; using namespace Firebird; using namespace Burp; diff --git a/src/burp/burp.cpp b/src/burp/burp.cpp index a1b7f4d4598..bb6709172cb 100644 --- a/src/burp/burp.cpp +++ b/src/burp/burp.cpp @@ -85,7 +85,7 @@ #endif using namespace Firebird; -using MsgFormat::SafeArg; +using Firebird::MsgFormat::SafeArg; using namespace Burp; inline constexpr const char* fopen_write_type = "w"; @@ -929,14 +929,14 @@ int gbak(Firebird::UtilSvc* uSvc) if (tdgbl->sw_redirect == REDIRECT) // not NOREDIRECT, and not NOOUTPUT { // Make sure the status file doesn't already exist - FILE* tmp_outfile = os_utils::fopen(redirect, fopen_read_type); + FILE* tmp_outfile = Firebird::os_utils::fopen(redirect, fopen_read_type); if (tmp_outfile) { fclose(tmp_outfile); BURP_error(66, true, SafeArg() << redirect); // msg 66 can't open status and error output file %s } - if (! (tdgbl->output_file = os_utils::fopen(redirect, fopen_write_type))) + if (! (tdgbl->output_file = Firebird::os_utils::fopen(redirect, fopen_write_type))) { BURP_error(66, true, SafeArg() << redirect); // msg 66 can't open status and error output file %s @@ -1884,7 +1884,7 @@ void BURP_verbose(USHORT number, const SafeArg& arg) } -void BURP_message(USHORT number, const MsgFormat::SafeArg& arg, bool totals) +void BURP_message(USHORT number, const Firebird::MsgFormat::SafeArg& arg, bool totals) { /************************************** * @@ -2310,7 +2310,7 @@ static gbak_action open_files(const TEXT* file1, if ((fil->fil_fd = NT_tape_open(nm.c_str(), MODE_READ, OPEN_EXISTING)) == INVALID_HANDLE_VALUE) #else const int rmode = MODE_READ | (tdgbl->gbl_sw_direct_io ? O_DIRECT : 0); - if ((fil->fil_fd = os_utils::open(nm.c_str(), rmode)) == INVALID_HANDLE_VALUE) + if ((fil->fil_fd = Firebird::os_utils::open(nm.c_str(), rmode)) == INVALID_HANDLE_VALUE) #endif { BURP_error(65, true, fil->fil_name.c_str()); @@ -2355,7 +2355,7 @@ static gbak_action open_files(const TEXT* file1, #ifdef WIN_NT if ((fil->fil_fd = NT_tape_open(nm.c_str(), MODE_READ, OPEN_EXISTING)) == INVALID_HANDLE_VALUE) #else - if ((fil->fil_fd = os_utils::open(nm.c_str(), rmode)) == INVALID_HANDLE_VALUE) + if ((fil->fil_fd = Firebird::os_utils::open(nm.c_str(), rmode)) == INVALID_HANDLE_VALUE) #endif { BURP_error(65, false, fil->fil_name.c_str()); @@ -2402,7 +2402,7 @@ static gbak_action open_files(const TEXT* file1, else SetTapePosition(fil->fil_fd, TAPE_REWIND, 0, 0, 0, FALSE); #else - os_utils::lseek(fil->fil_fd, 0, SEEK_SET); + Firebird::os_utils::lseek(fil->fil_fd, 0, SEEK_SET); #endif tdgbl->file_desc = fil->fil_fd; tdgbl->gbl_sw_files = fil->fil_next; @@ -2684,10 +2684,10 @@ void close_platf(DESC file) #define O_ACCMODE 3 #endif - off_t fileSize = os_utils::lseek(file, 0, SEEK_CUR); + off_t fileSize = Firebird::os_utils::lseek(file, 0, SEEK_CUR); if (fileSize != (off_t)(-1)) { - FB_UNUSED(os_utils::ftruncate(file, fileSize)); + FB_UNUSED(Firebird::os_utils::ftruncate(file, fileSize)); } } @@ -2906,15 +2906,15 @@ static void processFetchPass(const SCHAR*& password, int& itr, const int argc, F case fb_utils::FETCH_PASS_OK: break; case fb_utils::FETCH_PASS_FILE_OPEN_ERROR: - BURP_error(308, true, MsgFormat::SafeArg() << argv[itr] << errno); + BURP_error(308, true, Firebird::MsgFormat::SafeArg() << argv[itr] << errno); // error @2 opening password file @1 break; case fb_utils::FETCH_PASS_FILE_READ_ERROR: - BURP_error(309, true, MsgFormat::SafeArg() << argv[itr] << errno); + BURP_error(309, true, Firebird::MsgFormat::SafeArg() << argv[itr] << errno); // error @2 reading password file @1 break; case fb_utils::FETCH_PASS_FILE_EMPTY: - BURP_error(310, true, MsgFormat::SafeArg() << argv[itr]); + BURP_error(310, true, Firebird::MsgFormat::SafeArg() << argv[itr]); // password file @1 is empty break; } diff --git a/src/burp/burp_proto.h b/src/burp/burp_proto.h index ad9814ee029..07a446fe1a1 100644 --- a/src/burp/burp_proto.h +++ b/src/burp/burp_proto.h @@ -35,19 +35,19 @@ int BURP_main(Firebird::UtilSvc*); int gbak(Firebird::UtilSvc*); void BURP_abort(const Firebird::IStatus* status = nullptr); -void BURP_error(USHORT, bool, const MsgFormat::SafeArg& arg = MsgFormat::SafeArg()); +void BURP_error(USHORT, bool, const Firebird::MsgFormat::SafeArg& arg = Firebird::MsgFormat::SafeArg()); void BURP_error(USHORT, bool, const char* str); -void BURP_error_redirect(const Firebird::IStatus*, USHORT, const MsgFormat::SafeArg& arg = MsgFormat::SafeArg()); -void BURP_msg_partial(bool, USHORT, const MsgFormat::SafeArg& arg = MsgFormat::SafeArg()); -void BURP_msg_put(bool, USHORT, const MsgFormat::SafeArg& arg); +void BURP_error_redirect(const Firebird::IStatus*, USHORT, const Firebird::MsgFormat::SafeArg& arg = Firebird::MsgFormat::SafeArg()); +void BURP_msg_partial(bool, USHORT, const Firebird::MsgFormat::SafeArg& arg = Firebird::MsgFormat::SafeArg()); +void BURP_msg_put(bool, USHORT, const Firebird::MsgFormat::SafeArg& arg); inline constexpr int BURP_MSG_GET_SIZE = 128; // Use it for buffers passed to this function. -void BURP_msg_get(USHORT, TEXT*, const MsgFormat::SafeArg& arg = MsgFormat::SafeArg()); -void BURP_print(bool err, USHORT, const MsgFormat::SafeArg& arg = MsgFormat::SafeArg()); +void BURP_msg_get(USHORT, TEXT*, const Firebird::MsgFormat::SafeArg& arg = Firebird::MsgFormat::SafeArg()); +void BURP_print(bool err, USHORT, const Firebird::MsgFormat::SafeArg& arg = Firebird::MsgFormat::SafeArg()); void BURP_print(bool err, USHORT, const char* str); void BURP_print_status(bool err, const Firebird::IStatus* status, USHORT secondNumber = 0); void BURP_print_warning(const Firebird::IStatus* status, bool printErrorAsWarning = false); -void BURP_verbose(USHORT, const MsgFormat::SafeArg& arg = MsgFormat::SafeArg()); +void BURP_verbose(USHORT, const Firebird::MsgFormat::SafeArg& arg = Firebird::MsgFormat::SafeArg()); void BURP_verbose(USHORT, const Firebird::string& str); -void BURP_message(USHORT, const MsgFormat::SafeArg& arg = MsgFormat::SafeArg(), bool totals = false); +void BURP_message(USHORT, const Firebird::MsgFormat::SafeArg& arg = Firebird::MsgFormat::SafeArg(), bool totals = false); #endif // BURP_BURP_PROTO_H diff --git a/src/burp/mvol.cpp b/src/burp/mvol.cpp index 33b9f191839..317239a4acd 100644 --- a/src/burp/mvol.cpp +++ b/src/burp/mvol.cpp @@ -68,7 +68,7 @@ #include "../common/status.h" #include "../common/classes/zip.h" -using MsgFormat::SafeArg; +using Firebird::MsgFormat::SafeArg; using Firebird::FbLocalStatus; using namespace Burp; @@ -1625,12 +1625,12 @@ static void prompt_for_name(SCHAR* name, int length) // Get a location to read from. fb_assert(!tdgbl->uSvc->isService()); - if (isatty(fileno(stdout)) || !(term_out = os_utils::fopen(TERM_OUTPUT, "w"))) + if (isatty(fileno(stdout)) || !(term_out = Firebird::os_utils::fopen(TERM_OUTPUT, "w"))) { term_out = stdout; } - if (isatty(fileno(stdin)) || !(term_in = os_utils::fopen(TERM_INPUT, "r"))) + if (isatty(fileno(stdin)) || !(term_in = Firebird::os_utils::fopen(TERM_INPUT, "r"))) { term_in = stdin; } diff --git a/src/burp/restore.epp b/src/burp/restore.epp index 1108459d14d..6b9c88eb774 100644 --- a/src/burp/restore.epp +++ b/src/burp/restore.epp @@ -66,7 +66,7 @@ #include "../common/msg_encode.h" #include "../common/classes/BatchCompletionState.h" -using MsgFormat::SafeArg; +using Firebird::MsgFormat::SafeArg; using namespace Firebird; using namespace Burp; @@ -648,7 +648,7 @@ int RESTORE_restore (const TEXT* file_name, const TEXT* database_name) if (!tdgbl->flag_on_line) { FbLocalStatus st; - (Arg::Gds(ENCODE_ISC_MSG(246, burp_msg_fac)) << Arg::Gds(ENCODE_ISC_MSG(247, burp_msg_fac))).copyTo(&st); + (Firebird::Arg::Gds(ENCODE_ISC_MSG(246, burp_msg_fac)) << Firebird::Arg::Gds(ENCODE_ISC_MSG(247, burp_msg_fac))).copyTo(&st); // msg 246 Database is not online due to failure to activate one or more indices. // msg 247 Run gfix -online to bring database online without active indices. BURP_print_status(true, &st); diff --git a/src/burp/split/spit.cpp b/src/burp/split/spit.cpp index 1e93db809bc..a330d962c68 100644 --- a/src/burp/split/spit.cpp +++ b/src/burp/split/spit.cpp @@ -73,7 +73,7 @@ static DESC open_platf(const char* name, int writeFlag) return CreateFile(name, (writeFlag ? GENERIC_WRITE : GENERIC_READ), 0, NULL, (writeFlag ? CREATE_ALWAYS : OPEN_EXISTING), FILE_ATTRIBUTE_NORMAL, 0); #else - return os_utils::open(name, (writeFlag ? mode_write : mode_read), mask); + return Firebird::os_utils::open(name, (writeFlag ? mode_write : mode_read), mask); #endif } diff --git a/src/common/Auth.cpp b/src/common/Auth.cpp index 43224fe23fd..d6e71ccce63 100644 --- a/src/common/Auth.cpp +++ b/src/common/Auth.cpp @@ -34,7 +34,7 @@ using namespace Firebird; -namespace Auth { +namespace Firebird::Auth { WriterImplementation::WriterImplementation() : current(*getDefaultMemoryPool(), ClumpletReader::WideUnTagged, MAX_DPB_SIZE), diff --git a/src/common/Auth.h b/src/common/Auth.h index affe519bd95..e542afc1ee5 100644 --- a/src/common/Auth.h +++ b/src/common/Auth.h @@ -37,7 +37,7 @@ #include "../common/classes/fb_string.h" #include "../common/classes/ImplementHelper.h" -namespace Auth { +namespace Firebird::Auth { class WriterImplementation : public Firebird::AutoIface > diff --git a/src/common/BigInteger.cpp b/src/common/BigInteger.cpp index 45e6c3a4739..d7bd05f7563 100644 --- a/src/common/BigInteger.cpp +++ b/src/common/BigInteger.cpp @@ -50,7 +50,7 @@ namespace Firebird BadAlloc::raise(); default: // Libtommath error code @1 in function @2 - (Arg::Gds(isc_libtommath_generic) << Arg::Num(rc) << function).raise(); + (Firebird::Arg::Gds(isc_libtommath_generic) << Firebird::Arg::Num(rc) << function).raise(); } } diff --git a/src/common/CharSet.cpp b/src/common/CharSet.cpp index 6e837f54283..1bcdba5576c 100644 --- a/src/common/CharSet.cpp +++ b/src/common/CharSet.cpp @@ -162,8 +162,8 @@ ULONG FixedWidthCharSet::substring(const ULONG srcLen, const UCHAR* src, const U } if (result == INTL_BAD_STR_LENGTH) - status_exception::raise(Arg::Gds(isc_arith_except) << Arg::Gds(isc_string_truncation) << - Arg::Gds(isc_trunc_limits) << Arg::Num(dstLen) << Arg::Num(len)); + status_exception::raise(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_string_truncation) << + Firebird::Arg::Gds(isc_trunc_limits) << Firebird::Arg::Num(dstLen) << Firebird::Arg::Num(len)); return result; } @@ -229,8 +229,8 @@ ULONG MultiByteCharSet::substring(const ULONG srcLen, const UCHAR* src, const UL } if (result == INTL_BAD_STR_LENGTH) - status_exception::raise(Arg::Gds(isc_arith_except) << Arg::Gds(isc_string_truncation) << - Arg::Gds(isc_trunc_limits) << Arg::Num(dstLen) << Arg::Num(len)); + status_exception::raise(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_string_truncation) << + Firebird::Arg::Gds(isc_trunc_limits) << Firebird::Arg::Num(dstLen) << Firebird::Arg::Num(len)); return result; } diff --git a/src/common/CvtFormat.cpp b/src/common/CvtFormat.cpp index 6476f39da57..4cd7ce296eb 100644 --- a/src/common/CvtFormat.cpp +++ b/src/common/CvtFormat.cpp @@ -150,8 +150,7 @@ namespace #define CVT_FORMAT(id, format) constexpr Patterns format = 1llu << (id - 1); #define CVT_FORMAT2(id, format1, format2) constexpr Patterns format2 = 1llu << (id - 1); #define CVT_FORMAT_FLAG(id, format) constexpr Patterns format = 1llu << (id - 1); - namespace Format - { + namespace Format { typedef FB_UINT64 Patterns; constexpr Patterns NONE = 0; @@ -164,8 +163,7 @@ namespace #define CVT_FORMAT(id, format) constexpr const char* format = #format; #define CVT_FORMAT2(id, format1, format2) constexpr const char* format2 = #format1; #define CVT_FORMAT_FLAG(id, format) - namespace FormatStr - { + namespace FormatStr { #include "CvtFormatImpl.h" } #undef CVT_FORMAT @@ -487,12 +485,12 @@ namespace void invalidPatternException(std::string_view pattern, Callbacks* cb) { - cb->err(Arg::Gds(isc_invalid_date_format) << pattern); + cb->err(Firebird::Arg::Gds(isc_invalid_date_format) << pattern); } void incompatibleDateFormatException(std::string_view pattern, Callbacks* cb) { - cb->err(Arg::Gds(isc_incompatible_date_format_with_current_date_type) << pattern); + cb->err(Firebird::Arg::Gds(isc_incompatible_date_format_with_current_date_type) << pattern); } //----------------------------------------------------------------------------------------------------------------- @@ -529,7 +527,7 @@ namespace break; default: - cb->err(Arg::Gds(isc_invalid_data_type_for_date_format)); + cb->err(Firebird::Arg::Gds(isc_invalid_data_type_for_date_format)); } } @@ -551,7 +549,7 @@ namespace { const FB_SIZE_T pos = formatUpper.find('\"', i + 1); if (pos == string::npos) - cb->err(Arg::Gds(isc_invalid_raw_string_in_date_format)); + cb->err(Firebird::Arg::Gds(isc_invalid_raw_string_in_date_format)); FB_SIZE_T tempPos = pos; if (formatUpper[--tempPos] == '\\') { @@ -951,7 +949,7 @@ namespace void throwExceptionOnEmptyValue(std::optional value, std::string_view pattern, Callbacks* cb) { if (!value.has_value()) - cb->err(Arg::Gds(isc_missing_value_for_format_pattern) << pattern); + cb->err(Firebird::Arg::Gds(isc_missing_value_for_format_pattern) << pattern); } std::vector parseStringToDateTimeFormat(const dsc* desc, const string& formatUpper, Format::Patterns& outFormatPatterns, Callbacks* cb) @@ -982,7 +980,7 @@ namespace if (pattern == Format::NONE) invalidPatternException(patternStr, cb); if (outFormatPatterns & pattern) - cb->err(Arg::Gds(isc_can_not_use_same_pattern_twice) << patternStr); + cb->err(Firebird::Arg::Gds(isc_can_not_use_same_pattern_twice) << patternStr); if (!patternIsCompatibleWithDscType(desc, pattern)) incompatibleDateFormatException(patternStr, cb); @@ -1011,44 +1009,44 @@ namespace case Format::YEAR: break; default: - cb->err(Arg::Gds(isc_only_one_pattern_can_be_used) << Arg::Str("Y/YY/YYY/YYYY/YEAR")); + cb->err(Firebird::Arg::Gds(isc_only_one_pattern_can_be_used) << Firebird::Arg::Str("Y/YY/YYY/YYYY/YEAR")); } } // CT shall contain at most one of each of the following: if (formatFlags & Format::RR && formatFlags & Format::RRRR) - cb->err(Arg::Gds(isc_only_one_pattern_can_be_used) << Arg::Str("RR/RRRR")); + cb->err(Firebird::Arg::Gds(isc_only_one_pattern_can_be_used) << Firebird::Arg::Str("RR/RRRR")); // CT shall not contain both and if ((formatFlags & (Format::Y | Format::YY | Format::YYY | Format::YYYY | Format::YEAR)) && (formatFlags & (Format::RR | Format::RRRR))) - cb->err(Arg::Gds(isc_incompatible_format_patterns) << Arg::Str("Y/YY/YYY/YYYY/YEAR") << Arg::Str("RR/RRRR")); + cb->err(Firebird::Arg::Gds(isc_incompatible_format_patterns) << Firebird::Arg::Str("Y/YY/YYY/YYYY/YEAR") << Firebird::Arg::Str("RR/RRRR")); // If CT contains , then CT shall not contain // or . if (formatFlags & Format::DDD && formatFlags & (Format::MM | Format::DD)) - cb->err(Arg::Gds(isc_incompatible_format_patterns) << Arg::Str("DDD") << Arg::Str("MM/DD")); + cb->err(Firebird::Arg::Gds(isc_incompatible_format_patterns) << Firebird::Arg::Str("DDD") << Firebird::Arg::Str("MM/DD")); if (formatFlags & (Format::HH | Format::HH12 | Format::AM | Format::PM)) { // If CT contains , then CT shall not contain or . if (formatFlags & Format::HH24) - cb->err(Arg::Gds(isc_incompatible_format_patterns) << Arg::Str("HH24") << Arg::Str("HH/HH12/A.M./P.M.")); + cb->err(Firebird::Arg::Gds(isc_incompatible_format_patterns) << Firebird::Arg::Str("HH24") << Firebird::Arg::Str("HH/HH12/A.M./P.M.")); // If CT contains , then CT shall contain and shall not contain . // If CT contains , then CT shall contain and shall not contain . if (static_cast(formatFlags & (Format::HH12 | Format::HH)) != static_cast(formatFlags & (Format::AM | Format::PM))) { - cb->err(Arg::Gds(isc_pattern_cant_be_used_without_other_pattern_and_vice_versa) - << Arg::Str("HH/HH12") << Arg::Str("A.M./P.M.")); + cb->err(Firebird::Arg::Gds(isc_pattern_cant_be_used_without_other_pattern_and_vice_versa) + << Firebird::Arg::Str("HH/HH12") << Firebird::Arg::Str("A.M./P.M.")); } // CT shall contain at most one of each of the following: if (formatFlags & Format::HH && formatFlags & Format::HH12) - cb->err(Arg::Gds(isc_only_one_pattern_can_be_used) << Arg::Str("HH/HH12")); + cb->err(Firebird::Arg::Gds(isc_only_one_pattern_can_be_used) << Firebird::Arg::Str("HH/HH12")); // CT shall contain at most one of each of the following: if (formatFlags & Format::AM && formatFlags & Format::PM) - cb->err(Arg::Gds(isc_only_one_pattern_can_be_used) << Arg::Str("A.M./P.M.")); + cb->err(Firebird::Arg::Gds(isc_only_one_pattern_can_be_used) << Firebird::Arg::Str("A.M./P.M.")); } // CT shall contain at most one of each of the following: @@ -1069,7 +1067,7 @@ namespace case Format::FF9: break; default: - cb->err(Arg::Gds(isc_only_one_pattern_can_be_used) << Arg::Str("FF1/FF2/FF3/FF4/FF5/FF6/FF7/FF8/FF9")); + cb->err(Firebird::Arg::Gds(isc_only_one_pattern_can_be_used) << Firebird::Arg::Str("FF1/FF2/FF3/FF4/FF5/FF6/FF7/FF8/FF9")); } } @@ -1079,20 +1077,20 @@ namespace if (formatFlags & Format::SSSSS) { if (formatFlags & Format::HH12) - cb->err(Arg::Gds(isc_incompatible_format_patterns) << Arg::Str("SSSSS") << Arg::Str("HH/HH12")); + cb->err(Firebird::Arg::Gds(isc_incompatible_format_patterns) << Firebird::Arg::Str("SSSSS") << Firebird::Arg::Str("HH/HH12")); if (formatFlags & Format::HH24) - cb->err(Arg::Gds(isc_incompatible_format_patterns) << Arg::Str("SSSSS") << Arg::Str("HH24")); + cb->err(Firebird::Arg::Gds(isc_incompatible_format_patterns) << Firebird::Arg::Str("SSSSS") << Firebird::Arg::Str("HH24")); if (formatFlags & Format::MI) - cb->err(Arg::Gds(isc_incompatible_format_patterns) << Arg::Str("SSSSS") << Arg::Str("MI")); + cb->err(Firebird::Arg::Gds(isc_incompatible_format_patterns) << Firebird::Arg::Str("SSSSS") << Firebird::Arg::Str("MI")); if (formatFlags & Format::SS) - cb->err(Arg::Gds(isc_incompatible_format_patterns) << Arg::Str("SSSSS") << Arg::Str("HH/HH12")); + cb->err(Firebird::Arg::Gds(isc_incompatible_format_patterns) << Firebird::Arg::Str("SSSSS") << Firebird::Arg::Str("HH/HH12")); if (formatFlags & (Format::AM | Format::PM)) - cb->err(Arg::Gds(isc_incompatible_format_patterns) << Arg::Str("SSSSS") << Arg::Str("A.M./P.M.")); + cb->err(Firebird::Arg::Gds(isc_incompatible_format_patterns) << Firebird::Arg::Str("SSSSS") << Firebird::Arg::Str("A.M./P.M.")); } // If CT contains , then CT shall contain . if (formatFlags & Format::TZM && !(formatFlags & Format::TZH)) - cb->err(Arg::Gds(isc_pattern_cant_be_used_without_other_pattern) << Arg::Str("TZM") << Arg::Str("TZH")); + cb->err(Firebird::Arg::Gds(isc_pattern_cant_be_used_without_other_pattern) << Firebird::Arg::Str("TZM") << Firebird::Arg::Str("TZH")); } constexpr int romanToInt(const char* str, FB_SIZE_T length, FB_SIZE_T& offset) @@ -1136,7 +1134,7 @@ namespace else if (period == FormatStr::PM) return twelveHours == 12 ? twelveHours : 12 + twelveHours; - cb->err(Arg::Gds(isc_incorrect_hours_period) << period); + cb->err(Firebird::Arg::Gds(isc_incorrect_hours_period) << period); return 0; // suppress compiler warning/error } @@ -1275,15 +1273,15 @@ namespace if (minutes.value() > 59) { - cb->err(Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << Arg::Num(0) << - Arg::Num(59)); + cb->err(Firebird::Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << Firebird::Arg::Num(0) << + Firebird::Arg::Num(59)); } if (!TimeZoneUtil::isValidOffset(sign, hours.value(), minutes.value())) { string timezoneOffset; timezoneOffset.printf("%c%u:%u", sign == -1 ? '-' : '+', hours.value(), minutes.value()); - cb->err(Arg::Gds(isc_invalid_timezone_offset) << timezoneOffset); + cb->err(Firebird::Arg::Gds(isc_invalid_timezone_offset) << timezoneOffset); } return sign * (hours.value() * 60 + minutes.value()); @@ -1347,7 +1345,7 @@ namespace break; } if (strOffset >= strLength) - cb->err(Arg::Gds(isc_data_for_format_is_exhausted) << string(it->patternStr.data())); + cb->err(Firebird::Arg::Gds(isc_data_for_format_is_exhausted) << string(it->patternStr.data())); std::string_view patternStr = it->patternStr; @@ -1398,8 +1396,8 @@ namespace if (year > 9999) { - cb->err(Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << - Arg::Num(0) << Arg::Num(9999)); + cb->err(Firebird::Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << + Firebird::Arg::Num(0) << Firebird::Arg::Num(9999)); } outTimes.tm_year = year.value() - 1900; break; @@ -1411,8 +1409,8 @@ namespace if (minutes > 59) { - cb->err(Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << - Arg::Num(0) << Arg::Num(59)); + cb->err(Firebird::Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << + Firebird::Arg::Num(0) << Firebird::Arg::Num(59)); } outTimes.tm_min = minutes.value(); @@ -1425,8 +1423,8 @@ namespace if (month < 1 || month > 12) { - cb->err(Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << - Arg::Num(1) << Arg::Num(12)); + cb->err(Firebird::Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << + Firebird::Arg::Num(1) << Firebird::Arg::Num(12)); } outTimes.tm_mon = month.value() - 1; @@ -1450,7 +1448,7 @@ namespace } if (!isFound) - cb->err(Arg::Gds(isc_month_name_mismatch) << monthShortName); + cb->err(Firebird::Arg::Gds(isc_month_name_mismatch) << monthShortName); break; } case Format::MONTH: @@ -1471,7 +1469,7 @@ namespace } if (!isFound) - cb->err(Arg::Gds(isc_month_name_mismatch) << monthFullName); + cb->err(Firebird::Arg::Gds(isc_month_name_mismatch) << monthFullName); break; } @@ -1503,8 +1501,8 @@ namespace const int month = romanToInt(str, strLength, strOffset); if (month == 0 || month > 12) { - cb->err(Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << - Arg::Num(1) << Arg::Num(12)); + cb->err(Firebird::Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << + Firebird::Arg::Num(1) << Firebird::Arg::Num(12)); } outTimes.tm_mon = month - 1; @@ -1518,8 +1516,8 @@ namespace if (day == 0 || day > 31) { - cb->err(Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << - Arg::Num(1) << Arg::Num(31)); + cb->err(Firebird::Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << + Firebird::Arg::Num(1) << Firebird::Arg::Num(31)); } outTimes.tm_mday = day.value(); @@ -1535,8 +1533,8 @@ namespace constexpr int maxJDN = 5373484; // 31.12.9999 if (JDN < minJDN || JDN > maxJDN) { - cb->err(Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << - Arg::Num(minJDN) << Arg::Num(maxJDN)); + cb->err(Firebird::Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << + Firebird::Arg::Num(minJDN) << Firebird::Arg::Num(maxJDN)); } int year = 0, month = 0, day = 0; @@ -1555,8 +1553,8 @@ namespace if (hours < 1 || hours > 12) { - cb->err(Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << - Arg::Num(1) << Arg::Num(12)); + cb->err(Firebird::Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << + Firebird::Arg::Num(1) << Firebird::Arg::Num(12)); } outTimes.tm_hour = hours.value(); @@ -1569,8 +1567,8 @@ namespace if (hours > 23) { - cb->err(Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << - Arg::Num(0) << Arg::Num(23)); + cb->err(Firebird::Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << + Firebird::Arg::Num(0) << Firebird::Arg::Num(23)); } outTimes.tm_hour = hours.value(); @@ -1584,8 +1582,8 @@ namespace if (seconds > 59) { - cb->err(Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << - Arg::Num(0) << Arg::Num(59)); + cb->err(Firebird::Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << + Firebird::Arg::Num(0) << Firebird::Arg::Num(59)); } outTimes.tm_sec = seconds.value(); @@ -1601,8 +1599,8 @@ namespace const int secondsInDayValue = secondsInDay.value(); if (secondsInDayValue > maximumSecondsInDay) { - cb->err(Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << - Arg::Num(0) << Arg::Num(maximumSecondsInDay)); + cb->err(Firebird::Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << + Firebird::Arg::Num(0) << Firebird::Arg::Num(maximumSecondsInDay)); } const int hours = secondsInDayValue / 24; @@ -1650,7 +1648,7 @@ namespace const int hoursValue = hours.value(); const int signValue = sign(outTimezoneInMinutes); if (!TimeZoneUtil::isValidOffset(signValue, abs(hoursValue), 0)) - cb->err(Arg::Gds(isc_invalid_timezone_offset) << Arg::Num(hoursValue)); + cb->err(Firebird::Arg::Gds(isc_invalid_timezone_offset) << Firebird::Arg::Num(hoursValue)); outTimezoneInMinutes += signValue * hoursValue * 60; } @@ -1661,7 +1659,7 @@ namespace const int hoursValue = hours.value(); if (!TimeZoneUtil::isValidOffset(sign(hours), abs(hoursValue), 0)) - cb->err(Arg::Gds(isc_invalid_timezone_offset) << Arg::Num(hoursValue)); + cb->err(Firebird::Arg::Gds(isc_invalid_timezone_offset) << Firebird::Arg::Num(hoursValue)); outTimezoneInMinutes = hoursValue * 60; } @@ -1677,8 +1675,8 @@ namespace if (minutes > 59) { - cb->err(Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << - Arg::Num(0) << Arg::Num(59)); + cb->err(Firebird::Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << + Firebird::Arg::Num(0) << Firebird::Arg::Num(59)); } outTimezoneInMinutes += sign(outTimezoneInMinutes) * minutes.value(); @@ -1691,8 +1689,8 @@ namespace const int minutesValue = minutes.value(); if (abs(minutesValue) > 59) { - cb->err(Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << - Arg::Num(0) << Arg::Num(59)); + cb->err(Firebird::Arg::Gds(isc_value_for_pattern_is_out_of_range) << patternStr << + Firebird::Arg::Num(0) << Firebird::Arg::Num(59)); } outTimezoneInMinutes = minutesValue; @@ -1718,7 +1716,7 @@ namespace std::string_view timezoneName = getTimezoneNameFromString(str, strLength, oldOffset); status_exception::raise( - Arg::Gds(isc_invalid_timezone_region_or_displacement) << timezoneName); + Firebird::Arg::Gds(isc_invalid_timezone_region_or_displacement) << timezoneName); } strOffset += parsedTimezoneNameLength; @@ -1737,7 +1735,7 @@ namespace break; } if (strOffset < strLength) - cb->err(Arg::Gds(isc_trailing_part_of_string) << string(str + strOffset)); + cb->err(Firebird::Arg::Gds(isc_trailing_part_of_string) << string(str + strOffset)); } void timeStampToUtc(ISC_TIMESTAMP_TZ& timestampTZ, USHORT sessionTimeZone, EXPECT_DATETIME expectedType, @@ -1768,15 +1766,15 @@ namespace switch (expectedType) { case expect_sql_date: - cb->err(Arg::Gds(isc_date_range_exceeded)); + cb->err(Firebird::Arg::Gds(isc_date_range_exceeded)); break; case expect_sql_time: case expect_sql_time_tz: - cb->err(Arg::Gds(isc_time_range_exceeded)); + cb->err(Firebird::Arg::Gds(isc_time_range_exceeded)); break; case expect_timestamp: case expect_timestamp_tz: - cb->err(Arg::Gds(isc_datetime_range_exceeded)); + cb->err(Firebird::Arg::Gds(isc_datetime_range_exceeded)); break; default: // this should never happen! CVT_conversion_error(desc, cb->err); @@ -1824,7 +1822,7 @@ namespace string CVT_format_datetime_to_string(const dsc* desc, const string& format, Callbacks* cb) { if (format.isEmpty()) - cb->err(Arg::Gds(isc_sysf_invalid_null_empty) << Arg::Str(STRINGIZE(format))); + cb->err(Firebird::Arg::Gds(isc_sysf_invalid_null_empty) << Firebird::Arg::Str(STRINGIZE(format))); struct tm times; memset(×, 0, sizeof(struct tm)); @@ -1844,10 +1842,10 @@ ISC_TIMESTAMP_TZ CVT_format_string_to_datetime(const dsc* desc, const Firebird:: const EXPECT_DATETIME expectedType, Firebird::Callbacks* cb) { if (!DTYPE_IS_TEXT(desc->dsc_dtype)) - cb->err(Arg::Gds(isc_invalid_data_type_for_date_format)); + cb->err(Firebird::Arg::Gds(isc_invalid_data_type_for_date_format)); if (format.isEmpty()) - cb->err(Arg::Gds(isc_sysf_invalid_null_empty) << Arg::Str(STRINGIZE(format))); + cb->err(Firebird::Arg::Gds(isc_sysf_invalid_null_empty) << Firebird::Arg::Str(STRINGIZE(format))); TTypeId dtype; UCHAR* sourceString; diff --git a/src/common/DecFloat.cpp b/src/common/DecFloat.cpp index 1d4528e790d..1cb09dcf572 100644 --- a/src/common/DecFloat.cpp +++ b/src/common/DecFloat.cpp @@ -105,9 +105,9 @@ class DecimalContext : public decContext for (const Dec2fb* e = dec2fb; e->decError; ++e) { - // Arg::Gds(isc_arith_except) as first vector element ? + // Firebird::Arg::Gds(isc_arith_except) as first vector element ? if (e->decError & unmaskedExceptions) - Arg::Gds(dblError ? e->fbDoubleError : e->fbError).raise(); + Firebird::Arg::Gds(dblError ? e->fbDoubleError : e->fbError).raise(); } } @@ -267,7 +267,7 @@ void grab(ULONG* key, cl = DEC_CLASS_QNAN; break; default: - (Arg::Gds(isc_random) << "Invalid class of special decfloat value in sort key").raise(); + (Firebird::Arg::Gds(isc_random) << "Invalid class of special decfloat value in sort key").raise(); } return; diff --git a/src/common/Int128.cpp b/src/common/Int128.cpp index 9f22b595196..0890efe283d 100644 --- a/src/common/Int128.cpp +++ b/src/common/Int128.cpp @@ -114,7 +114,7 @@ void Int128::setScale(int scale) { while (scale++) { if (v > i128limit.v || v < -i128limit.v) - (Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range)).raise(); + (Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_numeric_out_of_range)).raise(); v *= 10; } } @@ -126,8 +126,8 @@ void Int128::toString(int scale, unsigned length, char* to) const toString(scale, buffer); if (buffer.length() + 1 > length) { - (Arg::Gds(isc_arith_except) << Arg::Gds(isc_string_truncation) << - Arg::Gds(isc_trunc_limits) << Arg::Num(length) << Arg::Num(buffer.length() + 1)).raise(); + (Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_string_truncation) << + Firebird::Arg::Gds(isc_trunc_limits) << Firebird::Arg::Num(length) << Firebird::Arg::Num(buffer.length() + 1)).raise(); } buffer.copyTo(to, length); } @@ -208,7 +208,7 @@ Int128 Int128::neg() const Int128 Int128::div(Int128 op2, int scale) const { if (compare(MIN_Int128) == 0 && op2.compare(minus1) == 0) - Arg::Gds(isc_exception_integer_overflow).raise(); + Firebird::Arg::Gds(isc_exception_integer_overflow).raise(); if (op2.v == 0) zerodivide(); @@ -243,12 +243,12 @@ Int128 Int128::div(Int128 op2, int scale) const [[noreturn]] void Int128::zerodivide() { - (Arg::Gds(isc_arith_except) << Arg::Gds(isc_exception_integer_divide_by_zero)).raise(); + (Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_exception_integer_divide_by_zero)).raise(); } [[noreturn]] void Int128::overflow() { - (Arg::Gds(isc_arith_except) << Arg::Gds(isc_exception_integer_overflow)).raise(); + (Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_exception_integer_overflow)).raise(); } #ifdef DEV_BUILD @@ -394,7 +394,7 @@ void Int128::setScale(int scale) { while (scale++) { if (v > i128limit.v || v < -i128limit.v) - (Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range)).raise(); + (Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_numeric_out_of_range)).raise(); v.MulInt(10); } } @@ -416,8 +416,8 @@ void Int128::toString(int scale, unsigned length, char* to) const toString(scale, buffer); if (buffer.length() + 1 > length) { - (Arg::Gds(isc_arith_except) << Arg::Gds(isc_string_truncation) << - Arg::Gds(isc_trunc_limits) << Arg::Num(length) << Arg::Num(buffer.length() + 1)).raise(); + (Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_string_truncation) << + Firebird::Arg::Gds(isc_trunc_limits) << Firebird::Arg::Num(length) << Firebird::Arg::Num(buffer.length() + 1)).raise(); } buffer.copyTo(to, length); } @@ -504,7 +504,7 @@ Int128 Int128::mul(Int128 op2) const Int128 Int128::div(Int128 op2, int scale) const { if (compare(MIN_Int128) == 0 && op2.compare(minus1) == 0) - Arg::Gds(isc_exception_integer_overflow).raise(); + Firebird::Arg::Gds(isc_exception_integer_overflow).raise(); static const CInt128 MIN_BY10(MIN_Int128 / 10); static const CInt128 MAX_BY10(MAX_Int128 / 10); @@ -604,12 +604,12 @@ Int128 Int128::operator&=(ULONG mask) [[noreturn]] void Int128::zerodivide() { - (Arg::Gds(isc_arith_except) << Arg::Gds(isc_exception_integer_divide_by_zero)).raise(); + (Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_exception_integer_divide_by_zero)).raise(); } [[noreturn]] void Int128::overflow() { - (Arg::Gds(isc_arith_except) << Arg::Gds(isc_exception_integer_overflow)).raise(); + (Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_exception_integer_overflow)).raise(); } diff --git a/src/common/IntlParametersBlock.cpp b/src/common/IntlParametersBlock.cpp index 67027bde503..df4b33ab053 100644 --- a/src/common/IntlParametersBlock.cpp +++ b/src/common/IntlParametersBlock.cpp @@ -161,11 +161,11 @@ void IntlParametersBlock::processParametersBlock(ProcessString* processString, C st.stuffException(&l); if ((l.getState() & IStatus::STATE_ERRORS) && (l.getErrors()[1] == isc_bad_conn_str) && tagName) { - Arg::Gds newErrors(isc_intl_char); + Firebird::Arg::Gds newErrors(isc_intl_char); newErrors << tagName; const ISC_STATUS* errors = l.getErrors(); - newErrors << Arg::StatusVector(errors + 2); // skip isc_bad_conn_str + newErrors << Firebird::Arg::StatusVector(errors + 2); // skip isc_bad_conn_str l.setErrors(newErrors.value()); status_exception::raise(&l); diff --git a/src/common/MsgMetadata.cpp b/src/common/MsgMetadata.cpp index 8432337b880..3ca5b767a39 100644 --- a/src/common/MsgMetadata.cpp +++ b/src/common/MsgMetadata.cpp @@ -264,7 +264,7 @@ void MetadataBuilder::moveNameToIndex(CheckStatusWrapper* status, const char* na } } - (Arg::Gds(isc_metadata_name) << name).raise(); + (Firebird::Arg::Gds(isc_metadata_name) << name).raise(); } catch (const Exception& ex) { @@ -301,7 +301,7 @@ IMessageMetadata* MetadataBuilder::getMetadata(CheckStatusWrapper* status) const unsigned i = msgMetadata->makeOffsets(); if (i != ~0u) { - (Arg::Gds(isc_item_finish) << Arg::Num(i)).raise(); + (Firebird::Arg::Gds(isc_item_finish) << Firebird::Arg::Num(i)).raise(); } MsgMetadata* rc = FB_NEW MsgMetadata(msgMetadata); @@ -321,7 +321,7 @@ void MetadataBuilder::metadataError(const char* functionName) // function and check for now. if (!msgMetadata) { - (Arg::Gds(isc_random) << (string("IMetadataBuilder interface is already inactive: " + (Firebird::Arg::Gds(isc_random) << (string("IMetadataBuilder interface is already inactive: " "IMetadataBuilder::") + functionName)).raise(); } } @@ -332,7 +332,7 @@ void MetadataBuilder::indexError(unsigned index, const char* functionName) if (index >= msgMetadata->items.getCount()) { - (Arg::Gds(isc_invalid_index_val) << Arg::Num(index) << (string("IMetadataBuilder::") + + (Firebird::Arg::Gds(isc_invalid_index_val) << Firebird::Arg::Num(index) << (string("IMetadataBuilder::") + functionName)).raise(); } } diff --git a/src/common/MsgMetadata.h b/src/common/MsgMetadata.h index 14f8ef2a80b..2b359ab7f42 100644 --- a/src/common/MsgMetadata.h +++ b/src/common/MsgMetadata.h @@ -300,8 +300,8 @@ class MsgMetadata : public RefCntIfaced_name)) return true; @@ -155,7 +155,7 @@ bool ScanDir::isDirectory() #else struct STAT buf; - if (os_utils::stat(getFilePath(), &buf)) + if (Firebird::os_utils::stat(getFilePath(), &buf)) return false; return S_ISDIR (buf.st_mode); diff --git a/src/common/SimilarToRegex.cpp b/src/common/SimilarToRegex.cpp index 7c2fa26af5e..37fb81321f9 100644 --- a/src/common/SimilarToRegex.cpp +++ b/src/common/SimilarToRegex.cpp @@ -36,7 +36,7 @@ namespace UChar32 getChar(bool latin, const char* str, unsigned len, unsigned& pos) { if (!hasChar(len, pos)) - status_exception::raise(Arg::Gds(isc_invalid_similar_pattern)); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_similar_pattern)); UChar32 c; @@ -47,7 +47,7 @@ namespace U8_NEXT_UNSAFE(str, pos, c); if (c < 0) - status_exception::raise(Arg::Gds(isc_invalid_similar_pattern)); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_similar_pattern)); } return c; @@ -75,7 +75,7 @@ namespace if (!(flags & COMP_FLAG_LATIN) && !(flags & COMP_FLAG_WELLFORMED)) { if (!UnicodeUtil::utf8WellFormed(patternLen, reinterpret_cast(patternStr), nullptr)) - status_exception::raise(Arg::Gds(isc_malformed_string)); + status_exception::raise(Firebird::Arg::Gds(isc_malformed_string)); } if (escapeStr) @@ -83,14 +83,14 @@ namespace if (!(flags & COMP_FLAG_LATIN) && !(flags & COMP_FLAG_WELLFORMED)) { if (!UnicodeUtil::utf8WellFormed(escapeLen, reinterpret_cast(escapeStr), nullptr)) - status_exception::raise(Arg::Gds(isc_malformed_string)); + status_exception::raise(Firebird::Arg::Gds(isc_malformed_string)); } unsigned escapePos = 0; escapeChar = getChar(flags & COMP_FLAG_LATIN, escapeStr, escapeLen, escapePos); if (escapePos != escapeLen) - status_exception::raise(Arg::Gds(isc_escape_invalid)); + status_exception::raise(Firebird::Arg::Gds(isc_escape_invalid)); } if (flags & COMP_FLAG_GROUP_CAPTURE) @@ -104,7 +104,7 @@ namespace // Check for proper termination. if (patternPos < patternLen) - status_exception::raise(Arg::Gds(isc_invalid_similar_pattern)); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_similar_pattern)); RE2::Options options; options.set_log_errors(false); @@ -116,7 +116,7 @@ namespace regexp = FB_NEW_POOL(pool) RE2(sp, options); if (!regexp->ok()) - status_exception::raise(Arg::Gds(isc_invalid_similar_pattern)); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_similar_pattern)); } inline bool hasPatternChar() const noexcept @@ -233,7 +233,7 @@ namespace } if (!(parseFlags & PARSE_FLAG_NOT_EMPTY) && op != '?') - status_exception::raise(Arg::Gds(isc_invalid_similar_pattern)); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_similar_pattern)); fb_assert(op == '*' || op == '+' || op == '?' || op == '{'); @@ -265,20 +265,20 @@ namespace while (true) { if (!hasPatternChar()) - status_exception::raise(Arg::Gds(isc_invalid_similar_pattern)); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_similar_pattern)); const UChar32 c = getPatternChar(); if (c == '}') { if (s1.isEmpty()) - status_exception::raise(Arg::Gds(isc_invalid_similar_pattern)); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_similar_pattern)); break; } else if (c == ',') { if (comma) - status_exception::raise(Arg::Gds(isc_invalid_similar_pattern)); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_similar_pattern)); comma = true; } else @@ -291,7 +291,7 @@ namespace s1 += (char) c; } else - status_exception::raise(Arg::Gds(isc_invalid_similar_pattern)); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_similar_pattern)); } } @@ -305,7 +305,7 @@ namespace } if (hasPatternChar() && isRep(peekPatternChar())) - status_exception::raise(Arg::Gds(isc_invalid_similar_pattern)); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_similar_pattern)); } void parsePrimary(int* parseFlagOut) @@ -361,7 +361,7 @@ namespace do { if (!hasPatternChar()) - status_exception::raise(Arg::Gds(isc_invalid_similar_pattern)); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_similar_pattern)); unsigned charSavePos = patternPos; UChar32 c = getPatternChar(); @@ -370,13 +370,13 @@ namespace if (useEscape && c == escapeChar) { if (!hasPatternChar()) - status_exception::raise(Arg::Gds(isc_escape_invalid)); + status_exception::raise(Firebird::Arg::Gds(isc_escape_invalid)); charSavePos = patternPos; c = getPatternChar(); if (!(c == escapeChar || SimilarToRegex::isSpecialChar(c))) - status_exception::raise(Arg::Gds(isc_escape_invalid)); + status_exception::raise(Firebird::Arg::Gds(isc_escape_invalid)); } else { @@ -385,7 +385,7 @@ namespace else if (c == '^') { if (exclude) - status_exception::raise(Arg::Gds(isc_invalid_similar_pattern)); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_similar_pattern)); exclude = true; continue; @@ -398,7 +398,7 @@ namespace if (charClass) { if (!hasPatternChar() || getPatternChar() != ':') - status_exception::raise(Arg::Gds(isc_invalid_similar_pattern)); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_similar_pattern)); charSavePos = patternPos; @@ -408,7 +408,7 @@ namespace const SLONG len = patternPos - charSavePos - 1; if (!hasPatternChar() || getPatternChar() != ']') - status_exception::raise(Arg::Gds(isc_invalid_similar_pattern)); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_similar_pattern)); for (item.clazz = 0; static_cast(item.clazz) < FB_NELEM(classes); ++item.clazz) { @@ -420,7 +420,7 @@ namespace } if (static_cast(item.clazz) >= FB_NELEM(classes)) - status_exception::raise(Arg::Gds(isc_invalid_similar_pattern)); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_similar_pattern)); } else { @@ -439,13 +439,13 @@ namespace if (useEscape && c == escapeChar) { if (!hasPatternChar()) - status_exception::raise(Arg::Gds(isc_escape_invalid)); + status_exception::raise(Firebird::Arg::Gds(isc_escape_invalid)); charSavePos = patternPos; c = getPatternChar(); if (!(c == escapeChar || SimilarToRegex::isSpecialChar(c))) - status_exception::raise(Arg::Gds(isc_escape_invalid)); + status_exception::raise(Firebird::Arg::Gds(isc_escape_invalid)); } item.lastStart = charSavePos; @@ -475,7 +475,7 @@ namespace } if (!hasPatternChar()) - status_exception::raise(Arg::Gds(isc_invalid_similar_pattern)); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_similar_pattern)); } while (peekPatternChar() != ']'); exclude = includeCount < items.getCount(); @@ -590,7 +590,7 @@ namespace parseExpr(&parseFlags); if (!hasPatternChar() || getPatternChar() != ')') - status_exception::raise(Arg::Gds(isc_invalid_similar_pattern)); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_similar_pattern)); re2PatternStr.append(")"); @@ -613,7 +613,7 @@ namespace op = getPatternChar(); if (!SimilarToRegex::isSpecialChar(op) && op != escapeChar) - status_exception::raise(Arg::Gds(isc_escape_invalid)); + status_exception::raise(Firebird::Arg::Gds(isc_escape_invalid)); } else { @@ -634,7 +634,7 @@ namespace } while (!controlChar && hasPatternChar()); if (patternPos == savePos) - status_exception::raise(Arg::Gds(isc_invalid_similar_pattern)); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_similar_pattern)); *parseFlagOut |= PARSE_FLAG_NOT_EMPTY; } @@ -672,7 +672,7 @@ namespace escapeChar = getChar(flags & COMP_FLAG_LATIN, escapeStr, escapeLen, escapePos); if (escapePos != escapeLen) - status_exception::raise(Arg::Gds(isc_escape_invalid)); + status_exception::raise(Firebird::Arg::Gds(isc_escape_invalid)); unsigned positions[2]; unsigned part = 0; @@ -685,21 +685,21 @@ namespace continue; if (!hasPatternChar()) - status_exception::raise(Arg::Gds(isc_invalid_similar_pattern)); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_similar_pattern)); c = getPatternChar(); if (c == '"') { if (part >= 2) - status_exception::raise(Arg::Gds(isc_invalid_similar_pattern)); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_similar_pattern)); positions[part++] = patternPos; } } if (part != 2) - status_exception::raise(Arg::Gds(isc_invalid_similar_pattern)); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_similar_pattern)); AutoPtr regexp1, regexp2, regexp3; @@ -741,7 +741,7 @@ namespace regexp = FB_NEW_POOL(pool) RE2(sp, options); if (!regexp->ok()) - status_exception::raise(Arg::Gds(isc_invalid_similar_pattern)); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_similar_pattern)); } inline bool hasPatternChar() const noexcept diff --git a/src/common/SimilarToRegex.h b/src/common/SimilarToRegex.h index 56d5c1e9fb0..1eda2bbb0a4 100644 --- a/src/common/SimilarToRegex.h +++ b/src/common/SimilarToRegex.h @@ -28,10 +28,7 @@ #include "../common/classes/fb_string.h" namespace Firebird { - - -namespace SimilarToFlag -{ +namespace SimilarToFlag { static inline constexpr unsigned CASE_INSENSITIVE = 0x1; static inline constexpr unsigned LATIN = 0x2; static inline constexpr unsigned WELLFORMED = 0x4; diff --git a/src/common/StatementMetadata.cpp b/src/common/StatementMetadata.cpp index 7c62581c99b..b948208fe33 100644 --- a/src/common/StatementMetadata.cpp +++ b/src/common/StatementMetadata.cpp @@ -364,7 +364,7 @@ void StatementMetadata::parse(unsigned bufferLength, const UCHAR* buffer) { const ISC_STATUS errorCode = getErrorInfo(&buffer, bufferEnd); if (errorCode != isc_infunk) - Arg::Gds(errorCode).raise(); + Firebird::Arg::Gds(errorCode).raise(); break; } @@ -422,7 +422,7 @@ void StatementMetadata::parse(unsigned bufferLength, const UCHAR* buffer) { const ISC_STATUS errorCode = getErrorInfo(&buffer, bufferEnd); if (errorCode != isc_infunk) - Arg::Gds(errorCode).raise(); + Firebird::Arg::Gds(errorCode).raise(); break; } diff --git a/src/common/StatusArg.cpp b/src/common/StatusArg.cpp index a4fb738e530..a8690d25540 100644 --- a/src/common/StatusArg.cpp +++ b/src/common/StatusArg.cpp @@ -49,7 +49,6 @@ namespace { } namespace Firebird { - namespace Arg { Base::Base(ISC_STATUS k, ISC_STATUS c) : diff --git a/src/common/StatusHolder.cpp b/src/common/StatusHolder.cpp index d9dae10dffd..25e246f9b16 100644 --- a/src/common/StatusHolder.cpp +++ b/src/common/StatusHolder.cpp @@ -63,8 +63,8 @@ void StatusHolder::raise() { if (getError()) { - Arg::StatusVector tmp(getErrors()); - tmp << Arg::StatusVector(getWarnings()); + Firebird::Arg::StatusVector tmp(getErrors()); + tmp << Firebird::Arg::StatusVector(getWarnings()); m_raised = true; tmp.raise(); } diff --git a/src/common/TimeZoneUtil.cpp b/src/common/TimeZoneUtil.cpp index 6533976f855..6a405005e44 100644 --- a/src/common/TimeZoneUtil.cpp +++ b/src/common/TimeZoneUtil.cpp @@ -199,13 +199,13 @@ namespace { PathName idsPath; PathUtils::concatPath(idsPath, TimeZoneUtil::getTzDataPath(), "ids.dat"); - const int fileHandle = os_utils::open(idsPath.c_str(), O_RDONLY | O_BINARY, 0); + const int fileHandle = Firebird::os_utils::open(idsPath.c_str(), O_RDONLY | O_BINARY, 0); if (fileHandle == -1) return false; struct STAT stat; - if (os_utils::fstat(fileHandle, &stat) != 0) + if (Firebird::os_utils::fstat(fileHandle, &stat) != 0) { close(fileHandle); return false; @@ -441,7 +441,7 @@ void TimeZoneUtil::getDatabaseVersion(Firebird::string& str) const char* version = icuLib.ucalGetTZDataVersion(&icuErrorCode); if (U_FAILURE(icuErrorCode)) - status_exception::raise(Arg::Gds(isc_random) << "Error calling ICU's ucal_getTZDataVersion."); + status_exception::raise(Firebird::Arg::Gds(isc_random) << "Error calling ICU's ucal_getTZDataVersion."); str = version; } @@ -494,7 +494,7 @@ USHORT TimeZoneUtil::parse(const char* str, unsigned strLen, bool strict) } } - status_exception::raise(Arg::Gds(isc_invalid_timezone_offset) << string(start, end)); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_timezone_offset) << string(start, end)); return 0; // avoid warning } @@ -535,7 +535,7 @@ USHORT TimeZoneUtil::parseRegion(const char* str, unsigned strLen) return id; } - status_exception::raise(Arg::Gds(isc_invalid_timezone_region) << string(start, end)); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_timezone_region) << string(start, end)); return 0; } @@ -620,18 +620,18 @@ void TimeZoneUtil::extractOffset(const ISC_TIMESTAMP_TZ& timeStampTz, SSHORT* of auto icuCalendar = getDesc(timeStampTz.time_zone)->getCalendar(icuLib, &icuErrorCode); if (!icuCalendar) - status_exception::raise(Arg::Gds(isc_random) << "Error calling ICU's ucal_open."); + status_exception::raise(Firebird::Arg::Gds(isc_random) << "Error calling ICU's ucal_open."); icuLib.ucalSetMillis(icuCalendar, timeStampToIcuDate(timeStampTz.utc_timestamp), &icuErrorCode); if (U_FAILURE(icuErrorCode)) - status_exception::raise(Arg::Gds(isc_random) << "Error calling ICU's ucal_setMillis."); + status_exception::raise(Firebird::Arg::Gds(isc_random) << "Error calling ICU's ucal_setMillis."); displacement = (icuLib.ucalGet(icuCalendar, UCAL_ZONE_OFFSET, &icuErrorCode) + icuLib.ucalGet(icuCalendar, UCAL_DST_OFFSET, &icuErrorCode)) / U_MILLIS_PER_MINUTE; if (U_FAILURE(icuErrorCode)) - status_exception::raise(Arg::Gds(isc_random) << "Error calling ICU's ucal_get."); + status_exception::raise(Firebird::Arg::Gds(isc_random) << "Error calling ICU's ucal_get."); } *offset = displacement; @@ -655,7 +655,7 @@ USHORT TimeZoneUtil::makeFromOffset(int sign, unsigned tzh, unsigned tzm) { string str; str.printf("%s%02u:%02u", (sign == -1 ? "-" : "+"), tzh, tzm); - status_exception::raise(Arg::Gds(isc_invalid_timezone_offset) << str); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_timezone_offset) << str); } return (USHORT)displacementToOffsetZone((tzh * 60 + tzm) * sign); @@ -720,7 +720,7 @@ void TimeZoneUtil::localTimeStampToUtc(ISC_TIMESTAMP_TZ& timeStampTz) auto icuCalendar = getDesc(timeStampTz.time_zone)->getCalendar(icuLib, &icuErrorCode); if (!icuCalendar) - status_exception::raise(Arg::Gds(isc_random) << "Error calling ICU's ucal_open."); + status_exception::raise(Firebird::Arg::Gds(isc_random) << "Error calling ICU's ucal_open."); icuLib.ucalSetAttribute(icuCalendar, UCAL_REPEATED_WALL_TIME, UCAL_WALLTIME_FIRST); icuLib.ucalSetAttribute(icuCalendar, UCAL_SKIPPED_WALL_TIME, UCAL_WALLTIME_FIRST); @@ -729,13 +729,13 @@ void TimeZoneUtil::localTimeStampToUtc(ISC_TIMESTAMP_TZ& timeStampTz) times.tm_hour, times.tm_min, times.tm_sec, &icuErrorCode); if (U_FAILURE(icuErrorCode)) - status_exception::raise(Arg::Gds(isc_random) << "Error calling ICU's ucal_setDateTime."); + status_exception::raise(Firebird::Arg::Gds(isc_random) << "Error calling ICU's ucal_setDateTime."); displacement = (icuLib.ucalGet(icuCalendar, UCAL_ZONE_OFFSET, &icuErrorCode) + icuLib.ucalGet(icuCalendar, UCAL_DST_OFFSET, &icuErrorCode)) / U_MILLIS_PER_MINUTE; if (U_FAILURE(icuErrorCode)) - status_exception::raise(Arg::Gds(isc_random) << "Error calling ICU's ucal_get."); + status_exception::raise(Firebird::Arg::Gds(isc_random) << "Error calling ICU's ucal_get."); } const auto ticks = TimeStamp::timeStampToTicks(timeStampTz.utc_timestamp) - @@ -773,25 +773,25 @@ bool TimeZoneUtil::decodeTimeStamp(const ISC_TIMESTAMP_TZ& timeStampTz, bool gmt { #ifdef DEV_BUILD if (gmtFallback && getenv("MISSING_ICU_EMULATION")) - (Arg::Gds(isc_random) << "Emulating missing ICU").raise(); + (Firebird::Arg::Gds(isc_random) << "Emulating missing ICU").raise(); #endif UnicodeUtil::ConversionICU& icuLib = UnicodeUtil::getConversionICU(); auto icuCalendar = getDesc(timeStampTz.time_zone)->getCalendar(icuLib, &icuErrorCode); if (!icuCalendar) - status_exception::raise(Arg::Gds(isc_random) << "Error calling ICU's ucal_open."); + status_exception::raise(Firebird::Arg::Gds(isc_random) << "Error calling ICU's ucal_open."); icuLib.ucalSetMillis(icuCalendar, timeStampToIcuDate(timeStampTz.utc_timestamp), &icuErrorCode); if (U_FAILURE(icuErrorCode)) - status_exception::raise(Arg::Gds(isc_random) << "Error calling ICU's ucal_setMillis."); + status_exception::raise(Firebird::Arg::Gds(isc_random) << "Error calling ICU's ucal_setMillis."); displacement = (icuLib.ucalGet(icuCalendar, UCAL_ZONE_OFFSET, &icuErrorCode) + icuLib.ucalGet(icuCalendar, UCAL_DST_OFFSET, &icuErrorCode)) / U_MILLIS_PER_MINUTE; if (U_FAILURE(icuErrorCode)) - status_exception::raise(Arg::Gds(isc_random) << "Error calling ICU's ucal_get."); + status_exception::raise(Firebird::Arg::Gds(isc_random) << "Error calling ICU's ucal_get."); } catch (const Exception&) { @@ -1065,7 +1065,7 @@ TimeZoneRuleIterator::TimeZoneRuleIterator(USHORT id, const ISC_TIMESTAMP_TZ& aF UErrorCode icuErrorCode = U_ZERO_ERROR; if (!icuCalendar) - status_exception::raise(Arg::Gds(isc_random) << "Error calling ICU's ucal_open."); + status_exception::raise(Firebird::Arg::Gds(isc_random) << "Error calling ICU's ucal_open."); icuDate = TimeZoneUtil::timeStampToIcuDate(aFrom.utc_timestamp); @@ -1074,7 +1074,7 @@ TimeZoneRuleIterator::TimeZoneRuleIterator(USHORT id, const ISC_TIMESTAMP_TZ& aF if (U_FAILURE(icuErrorCode)) { fb_assert(false); - status_exception::raise(Arg::Gds(isc_random) << "Error calling ICU's ucal_setMillis."); + status_exception::raise(Firebird::Arg::Gds(isc_random) << "Error calling ICU's ucal_setMillis."); } const UBool hasInitial = icuLib.ucalGetTimeZoneTransitionDate(icuCalendar, @@ -1083,7 +1083,7 @@ TimeZoneRuleIterator::TimeZoneRuleIterator(USHORT id, const ISC_TIMESTAMP_TZ& aF if (U_FAILURE(icuErrorCode)) { fb_assert(false); - status_exception::raise(Arg::Gds(isc_random) << "Error calling ICU's ucal_getTimeZoneTransitionDate."); + status_exception::raise(Firebird::Arg::Gds(isc_random) << "Error calling ICU's ucal_getTimeZoneTransitionDate."); } if (!hasInitial) @@ -1094,7 +1094,7 @@ TimeZoneRuleIterator::TimeZoneRuleIterator(USHORT id, const ISC_TIMESTAMP_TZ& aF if (U_FAILURE(icuErrorCode)) { fb_assert(false); - status_exception::raise(Arg::Gds(isc_random) << "Error calling ICU's ucal_setMillis."); + status_exception::raise(Firebird::Arg::Gds(isc_random) << "Error calling ICU's ucal_setMillis."); } startTicks = TimeStamp::timeStampToTicks(TimeZoneUtil::icuDateToTimeStamp(icuDate)); @@ -1119,7 +1119,7 @@ bool TimeZoneRuleIterator::next() if (U_FAILURE(icuErrorCode)) { fb_assert(false); - status_exception::raise(Arg::Gds(isc_random) << "Error calling ICU's ucal_getTimeZoneTransitionDate."); + status_exception::raise(Firebird::Arg::Gds(isc_random) << "Error calling ICU's ucal_getTimeZoneTransitionDate."); } if (!hasNext || icuDate > MAX_ICU_TIMESTAMP) @@ -1149,7 +1149,7 @@ static const TimeZoneDesc* getDesc(USHORT timeZone) if (id < timeZoneStartup().getTimeZoneList().getCount()) return &timeZoneStartup().getTimeZoneList()[id]; - status_exception::raise(Arg::Gds(isc_invalid_timezone_id) << Arg::Num(timeZone)); + status_exception::raise(Firebird::Arg::Gds(isc_invalid_timezone_id) << Firebird::Arg::Num(timeZone)); return nullptr; } diff --git a/src/common/Tokens.cpp b/src/common/Tokens.cpp index 98c387b4573..c721ab68bb4 100644 --- a/src/common/Tokens.cpp +++ b/src/common/Tokens.cpp @@ -212,7 +212,7 @@ void Tokens::error(const char* fmt, ...) buffer.vprintf(fmt, params); va_end(params); - (Arg::Gds(isc_tokens_parse) << Arg::Gds(isc_random) << buffer).raise(); + (Firebird::Arg::Gds(isc_tokens_parse) << Firebird::Arg::Gds(isc_random) << buffer).raise(); } string Tokens::Tok::stripped() const diff --git a/src/common/UtilSvc.cpp b/src/common/UtilSvc.cpp index 0aeca03cdae..a356544f13c 100644 --- a/src/common/UtilSvc.cpp +++ b/src/common/UtilSvc.cpp @@ -121,7 +121,7 @@ class StandaloneUtilityInterface : public UtilSvc void checkService() override { - status_exception::raise(Arg::Gds(isc_utl_trusted_switch)); + status_exception::raise(Firebird::Arg::Gds(isc_utl_trusted_switch)); } unsigned int getAuthBlock(const unsigned char** bytes) override @@ -140,7 +140,7 @@ class StandaloneUtilityInterface : public UtilSvc void putBytes(const UCHAR*, FB_SIZE_T) override { } ULONG getBytes(UCHAR*, ULONG) override { return 0; } void setServiceStatus(const ISC_STATUS*) override { } - void setServiceStatus(const USHORT, const USHORT, const MsgFormat::SafeArg&) override { } + void setServiceStatus(const USHORT, const USHORT, const Firebird::MsgFormat::SafeArg&) override { } StatusAccessor getStatusAccessor() override { return StatusAccessor(); } void fillDpb(ClumpletWriter&) override { } bool finished() override { return false; } diff --git a/src/common/UtilSvc.h b/src/common/UtilSvc.h index 746f8dca281..de8fbf4395d 100644 --- a/src/common/UtilSvc.h +++ b/src/common/UtilSvc.h @@ -36,7 +36,7 @@ #include "../common/classes/array.h" #include "../common/classes/fb_string.h" -namespace MsgFormat { +namespace Firebird::MsgFormat { class SafeArg; } @@ -96,7 +96,7 @@ class UtilSvc : public Firebird::GlobalStorage uSvc->setServiceStatus(status); } - void setServiceStatus(const USHORT fac, const USHORT code, const MsgFormat::SafeArg& args) + void setServiceStatus(const USHORT fac, const USHORT code, const Firebird::MsgFormat::SafeArg& args) { if (uSvc) uSvc->setServiceStatus(fac, code, args); @@ -135,7 +135,7 @@ class UtilSvc : public Firebird::GlobalStorage private: virtual void setServiceStatus(const ISC_STATUS*) = 0; - virtual void setServiceStatus(const USHORT, const USHORT, const MsgFormat::SafeArg&) = 0; + virtual void setServiceStatus(const USHORT, const USHORT, const Firebird::MsgFormat::SafeArg&) = 0; public: virtual StatusAccessor getStatusAccessor() = 0; diff --git a/src/common/call_service.cpp b/src/common/call_service.cpp index 86b9f330989..480d49e26be 100644 --- a/src/common/call_service.cpp +++ b/src/common/call_service.cpp @@ -94,7 +94,7 @@ static bool serverSizeValidate(ISC_STATUS* status, const TEXT* server) } -static int typeBuffer(ISC_STATUS*, char*, int, Auth::UserData&, Firebird::IListUsers*, Firebird::string&); +static int typeBuffer(ISC_STATUS*, char*, int, Firebird::Auth::UserData&, Firebird::IListUsers*, Firebird::string&); // all this spb-writing functions should be gone @@ -279,7 +279,7 @@ isc_svc_handle attachRemoteServiceManager(ISC_STATUS* status, @param userData **/ -static void userInfoToSpb(char*& spb, Auth::UserData& userData) +static void userInfoToSpb(char*& spb, Firebird::Auth::UserData& userData) { stuffSpb2(spb, isc_spb_sec_username, userData.user.get()); if (userData.u.entered()) @@ -338,7 +338,7 @@ static void setAttr(string& a, const char* nm, Firebird::IIntUserField* f) } -static void setAttr(CheckStatusWrapper* status, Auth::UserData* u) +static void setAttr(CheckStatusWrapper* status, Firebird::Auth::UserData* u) { string attr; setAttr(attr, "Uid", &u->u); @@ -367,16 +367,16 @@ static void setAttr(CheckStatusWrapper* status, Auth::UserData* u) **/ void callRemoteServiceManager(ISC_STATUS* status, isc_svc_handle handle, - Auth::UserData& userData, + Firebird::Auth::UserData& userData, Firebird::IListUsers* callback) { char spb_buffer[1024]; char* spb = spb_buffer; const int op = userData.op; - if (op != Auth::DIS_OPER && - op != Auth::OLD_DIS_OPER && - op != Auth::MAP_SET_OPER && - op != Auth::MAP_DROP_OPER && + if (op != Firebird::Auth::DIS_OPER && + op != Firebird::Auth::OLD_DIS_OPER && + op != Firebird::Auth::MAP_SET_OPER && + op != Firebird::Auth::MAP_DROP_OPER && !userData.user.entered()) { status[0] = isc_arg_gds; @@ -387,17 +387,17 @@ void callRemoteServiceManager(ISC_STATUS* status, switch (op) { - case Auth::ADD_OPER: + case Firebird::Auth::ADD_OPER: stuffSpbByte(spb, isc_action_svc_add_user); userInfoToSpb(spb, userData); break; - case Auth::MOD_OPER: + case Firebird::Auth::MOD_OPER: stuffSpbByte(spb, isc_action_svc_modify_user); userInfoToSpb(spb, userData); break; - case Auth::DEL_OPER: + case Firebird::Auth::DEL_OPER: stuffSpbByte(spb, isc_action_svc_delete_user); stuffSpb2(spb, isc_spb_sec_username, userData.user.get()); if (userData.role.entered()) @@ -406,8 +406,8 @@ void callRemoteServiceManager(ISC_STATUS* status, } break; - case Auth::DIS_OPER: - case Auth::OLD_DIS_OPER: + case Firebird::Auth::DIS_OPER: + case Firebird::Auth::OLD_DIS_OPER: { char usersDisplayTag = 0; checkServerUsersVersion(handle, usersDisplayTag); @@ -423,11 +423,11 @@ void callRemoteServiceManager(ISC_STATUS* status, } break; - case Auth::MAP_SET_OPER: + case Firebird::Auth::MAP_SET_OPER: stuffSpbByte(spb, isc_action_svc_set_mapping); break; - case Auth::MAP_DROP_OPER: + case Firebird::Auth::MAP_DROP_OPER: stuffSpbByte(spb, isc_action_svc_drop_mapping); break; @@ -460,11 +460,11 @@ void callRemoteServiceManager(ISC_STATUS* status, ISC_STATUS* local_status = status[1] ? temp_status : status; fb_utils::init_status(local_status); - if (op == Auth::DIS_OPER || op == Auth::OLD_DIS_OPER) + if (op == Firebird::Auth::DIS_OPER || op == Firebird::Auth::OLD_DIS_OPER) { const char request[] = {isc_info_svc_get_users}; int startQuery = 0; - Auth::UserData uData; + Firebird::Auth::UserData uData; for (;;) { @@ -558,7 +558,7 @@ void detachRemoteServiceManager(ISC_STATUS* status, isc_svc_handle handle) // all this spb-parsing functions should be gone // as soon as we create SvcClumpletReader -static void parseString2(const char*& p, Auth::CharField& f, FB_SIZE_T& loop) +static void parseString2(const char*& p, Firebird::Auth::CharField& f, FB_SIZE_T& loop) { const FB_SIZE_T len = static_cast(isc_vax_integer(p, sizeof(USHORT))); @@ -580,7 +580,7 @@ static void parseString2(const char*& p, Auth::CharField& f, FB_SIZE_T& loop) check(&statusWrapper); } -static void parseLong(const char*& p, Auth::IntField& f, FB_SIZE_T& loop) +static void parseLong(const char*& p, Firebird::Auth::IntField& f, FB_SIZE_T& loop) { LocalStatus s; CheckStatusWrapper statusWrapper(&s); @@ -618,7 +618,7 @@ static void parseLong(const char*& p, Auth::IntField& f, FB_SIZE_T& loop) **/ static int typeBuffer(ISC_STATUS* status, char* buf, int offset, - Auth::UserData& uData, Firebird::IListUsers* callback, + Firebird::Auth::UserData& uData, Firebird::IListUsers* callback, Firebird::string& text) { const char* p = &buf[offset]; diff --git a/src/common/call_service.h b/src/common/call_service.h index aaccb014c05..5719b86eb7f 100644 --- a/src/common/call_service.h +++ b/src/common/call_service.h @@ -31,7 +31,7 @@ isc_svc_handle attachRemoteServiceManager(ISC_STATUS*, const TEXT*, const TEXT*, bool, int, const TEXT*); isc_svc_handle attachRemoteServiceManager(ISC_STATUS*, const TEXT*, const TEXT*, bool, const TEXT*, bool); -void callRemoteServiceManager(ISC_STATUS*, isc_svc_handle, Auth::UserData&, Firebird::IListUsers*); +void callRemoteServiceManager(ISC_STATUS*, isc_svc_handle, Firebird::Auth::UserData&, Firebird::IListUsers*); void detachRemoteServiceManager(ISC_STATUS*, isc_svc_handle); #endif // UTILITIES_GSEC_CALL_SERVICE_H diff --git a/src/common/classes/BaseStream.cpp b/src/common/classes/BaseStream.cpp index 0a8e5d49f95..08e38699507 100644 --- a/src/common/classes/BaseStream.cpp +++ b/src/common/classes/BaseStream.cpp @@ -32,8 +32,7 @@ #include #endif -namespace MsgFormat -{ +namespace Firebird::MsgFormat { int RawStream::write(const void* str, unsigned int n) { diff --git a/src/common/classes/BaseStream.h b/src/common/classes/BaseStream.h index d7815cc0b01..ffa5deae2c7 100644 --- a/src/common/classes/BaseStream.h +++ b/src/common/classes/BaseStream.h @@ -34,8 +34,7 @@ #include "../common/classes/fb_string.h" #include -namespace MsgFormat -{ +namespace Firebird::MsgFormat { // This is the abstract base class that is used by the MsgPrint routines. // It doesn't own the stream, thus it doesn't open, check or close it. diff --git a/src/common/classes/BatchCompletionState.h b/src/common/classes/BatchCompletionState.h index c8de5d5c0e4..b57ba82a906 100644 --- a/src/common/classes/BatchCompletionState.h +++ b/src/common/classes/BatchCompletionState.h @@ -146,7 +146,7 @@ namespace Firebird { fb_utils::copyStatus(&w, rare[index].second); return; } - (Arg::Gds(isc_batch_compl_detail) << Arg::Num(pos)).raise(); + (Firebird::Arg::Gds(isc_batch_compl_detail) << Firebird::Arg::Num(pos)).raise(); } } catch (const Exception& ex) @@ -181,7 +181,7 @@ namespace Firebird { void checkRange(unsigned pos) { if (pos >= reccount) - (Arg::Gds(isc_batch_compl_range) << Arg::Num(pos) << Arg::Num(reccount)).raise(); + (Firebird::Arg::Gds(isc_batch_compl_range) << Firebird::Arg::Num(pos) << Firebird::Arg::Num(reccount)).raise(); } }; } diff --git a/src/common/classes/BlrReader.h b/src/common/classes/BlrReader.h index cc654220d28..5700bb08f7f 100644 --- a/src/common/classes/BlrReader.h +++ b/src/common/classes/BlrReader.h @@ -97,7 +97,7 @@ class BlrReader fb_assert(pos); if (pos >= end) - (Arg::Gds(isc_invalid_blr) << Arg::Num(getOffset())).raise(); + (Firebird::Arg::Gds(isc_invalid_blr) << Firebird::Arg::Num(getOffset())).raise(); return *pos; } @@ -140,9 +140,9 @@ class BlrReader default: status_exception::raise( - Arg::Gds(isc_metadata_corrupt) << - Arg::Gds(isc_wroblrver2) << Arg::Num(blr_version4) << Arg::Num(blr_version5/*6*/) << - Arg::Num(version)); + Firebird::Arg::Gds(isc_metadata_corrupt) << + Firebird::Arg::Gds(isc_wroblrver2) << Firebird::Arg::Num(blr_version4) << Firebird::Arg::Num(blr_version5/*6*/) << + Firebird::Arg::Num(version)); } auto code = getByte(); @@ -177,10 +177,10 @@ class BlrReader if (byte != expected) { - status_exception::raise(Arg::Gds(isc_syntaxerr) << - Arg::Num(expected) << - Arg::Num(getOffset() - 1) << - Arg::Num(byte)); + status_exception::raise(Firebird::Arg::Gds(isc_syntaxerr) << + Firebird::Arg::Num(expected) << + Firebird::Arg::Num(getOffset() - 1) << + Firebird::Arg::Num(byte)); } return byte; @@ -192,10 +192,10 @@ class BlrReader if (word != expected) { - status_exception::raise(Arg::Gds(isc_syntaxerr) << - Arg::Num(expected) << - Arg::Num(getOffset() - 2) << - Arg::Num(word)); + status_exception::raise(Firebird::Arg::Gds(isc_syntaxerr) << + Firebird::Arg::Num(expected) << + Firebird::Arg::Num(getOffset() - 2) << + Firebird::Arg::Num(word)); } return word; @@ -206,7 +206,7 @@ class BlrReader const unsigned len = getByte(); if (pos + len >= end) - (Arg::Gds(isc_invalid_blr) << Arg::Num(getOffset())).raise(); + (Firebird::Arg::Gds(isc_invalid_blr) << Firebird::Arg::Num(getOffset())).raise(); s.assign(pos, len); @@ -222,7 +222,7 @@ class BlrReader // Check for overly long identifiers at BLR parse stage to prevent unwanted // surprises in deeper layers of the engine. if (str.length() > MAX_SQL_IDENTIFIER_LEN) - (Arg::Gds(isc_identifier_too_long) << Arg::Str(str)).raise(); + (Firebird::Arg::Gds(isc_identifier_too_long) << Firebird::Arg::Str(str)).raise(); name.assign(str.c_str()); } diff --git a/src/common/classes/BlrWriter.cpp b/src/common/classes/BlrWriter.cpp index 6fb04f382a9..a9ed37069d4 100644 --- a/src/common/classes/BlrWriter.cpp +++ b/src/common/classes/BlrWriter.cpp @@ -106,13 +106,13 @@ void BlrWriter::endBlr() const ULONG length = (blrData.getCount() - baseOffset) - 2; if (length > 0xFFFF) - raiseError(Arg::Gds(isc_too_big_blr) << Arg::Num(length) << Arg::Num(0xFFFF)); + raiseError(Firebird::Arg::Gds(isc_too_big_blr) << Firebird::Arg::Num(length) << Firebird::Arg::Num(0xFFFF)); *blr_base++ = (UCHAR) length; *blr_base = (UCHAR) (length >> 8); } -void BlrWriter::raiseError(const Arg::StatusVector& vector) +void BlrWriter::raiseError(const Firebird::Arg::StatusVector& vector) { vector.raise(); } diff --git a/src/common/classes/BlrWriter.h b/src/common/classes/BlrWriter.h index f8875c0a96f..3c0be139f21 100644 --- a/src/common/classes/BlrWriter.h +++ b/src/common/classes/BlrWriter.h @@ -128,7 +128,7 @@ class BlrWriter : public Firebird::PermanentStorage void setBaseOffset(ULONG value) { baseOffset = value; } virtual bool isVersion4() = 0; - virtual void raiseError(const Arg::StatusVector& vector); + virtual void raiseError(const Firebird::Arg::StatusVector& vector); private: BlrData blrData; diff --git a/src/common/classes/InternalMessageBuffer.cpp b/src/common/classes/InternalMessageBuffer.cpp index 2a2f82d961b..48ea4578def 100644 --- a/src/common/classes/InternalMessageBuffer.cpp +++ b/src/common/classes/InternalMessageBuffer.cpp @@ -55,18 +55,18 @@ MetadataFromBlr::MetadataFromBlr(unsigned aBlrLength, const unsigned char* aBlr, const UCHAR byte = rdr.getByte(); if (byte != blr_version4 && byte != blr_version5) { - (Arg::Gds(isc_dsql_error) << - Arg::Gds(isc_sqlerr) << Arg::Num(-804) << - Arg::Gds(isc_wroblrver2) << Arg::Num(blr_version4) << Arg::Num(blr_version5) << Arg::Num(byte) + (Firebird::Arg::Gds(isc_dsql_error) << + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-804) << + Firebird::Arg::Gds(isc_wroblrver2) << Firebird::Arg::Num(blr_version4) << Firebird::Arg::Num(blr_version5) << Firebird::Arg::Num(byte) ).raise(); } if (rdr.getByte() != blr_begin || rdr.getByte() != blr_message) { - (Arg::Gds(isc_sqlerr) << Arg::Num(-804) << - Arg::Gds(isc_dsql_sqlda_err) + (Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-804) << + Firebird::Arg::Gds(isc_dsql_sqlda_err) #ifdef DEV_BUILD - << Arg::Gds(isc_random) << "Missing blr_begin / blr_message" + << Firebird::Arg::Gds(isc_random) << "Missing blr_begin / blr_message" #endif ).raise(); } @@ -209,20 +209,20 @@ MetadataFromBlr::MetadataFromBlr(unsigned aBlrLength, const unsigned char* aBlr, break; default: - (Arg::Gds(isc_sqlerr) << Arg::Num(-804) << - Arg::Gds(isc_dsql_sqlda_err) + (Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-804) << + Firebird::Arg::Gds(isc_dsql_sqlda_err) #ifdef DEV_BUILD - << Arg::Gds(isc_random) << "Wrong BLR type" + << Firebird::Arg::Gds(isc_random) << "Wrong BLR type" #endif ).raise(); } if (rdr.getByte() != blr_short || rdr.getByte() != 0) { - (Arg::Gds(isc_sqlerr) << Arg::Num(-804) << - Arg::Gds(isc_dsql_sqlda_err) + (Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-804) << + Firebird::Arg::Gds(isc_dsql_sqlda_err) #ifdef DEV_BUILD - << Arg::Gds(isc_random) << "Wrong BLR type for NULL indicator" + << Firebird::Arg::Gds(isc_random) << "Wrong BLR type for NULL indicator" #endif ).raise(); } @@ -234,10 +234,10 @@ MetadataFromBlr::MetadataFromBlr(unsigned aBlrLength, const unsigned char* aBlr, if (rdr.getByte() != (UCHAR) blr_end || length != aLength) { - (Arg::Gds(isc_sqlerr) << Arg::Num(-804) << - Arg::Gds(isc_dsql_sqlda_err) + (Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-804) << + Firebird::Arg::Gds(isc_dsql_sqlda_err) #ifdef DEV_BUILD - << Arg::Gds(isc_random) << (length != aLength ? "Invalid message length" : "Missing blr_end") + << Firebird::Arg::Gds(isc_random) << (length != aLength ? "Invalid message length" : "Missing blr_end") #endif ).raise(); } diff --git a/src/common/classes/MetaString.h b/src/common/classes/MetaString.h index 7a8f568f1ab..69251179967 100644 --- a/src/common/classes/MetaString.h +++ b/src/common/classes/MetaString.h @@ -125,7 +125,7 @@ class MetaString if (i + 1 < name.length() - 1 && name[i + 1] == '"') ++i; else - (Arg::Gds(isc_invalid_unqualified_name_list) << str).raise(); + (Firebird::Arg::Gds(isc_invalid_unqualified_name_list) << str).raise(); } result += name[i]; @@ -137,7 +137,7 @@ class MetaString const auto validateUnquotedIdentifier = [&](const string& name) { if (name.length() > MAX_SQL_IDENTIFIER_LEN) - (Arg::Gds(isc_invalid_name) << str).raise(); + (Firebird::Arg::Gds(isc_invalid_name) << str).raise(); bool first = true; @@ -151,7 +151,7 @@ class MetaString (!first && c == '$') || (!first && c == '_'))) { - (Arg::Gds(isc_invalid_unqualified_name_list) << str).raise(); + (Firebird::Arg::Gds(isc_invalid_unqualified_name_list) << str).raise(); } first = false; @@ -193,7 +193,7 @@ class MetaString } if (name.isEmpty()) - (Arg::Gds(isc_invalid_unqualified_name_list) << str).raise(); + (Firebird::Arg::Gds(isc_invalid_unqualified_name_list) << str).raise(); list.add(name); diff --git a/src/common/classes/MsgPrint.cpp b/src/common/classes/MsgPrint.cpp index c07d68d920e..5d5e74ab9a1 100644 --- a/src/common/classes/MsgPrint.cpp +++ b/src/common/classes/MsgPrint.cpp @@ -33,8 +33,7 @@ #include "../common/file_params.h" -namespace MsgFormat -{ +namespace Firebird::MsgFormat { // Enough to the current conversions. If SINT128 is decoded as a full number // instead of two parts, it may be updated to 63, because 2^128 ~ 3.4e38. @@ -357,7 +356,7 @@ int MsgPrintErr(const char* format, const SafeArg& arg, bool userFormatting) // Lookup and format message. Return as much of formatted string as fits in caller's buffer. int fb_msg_format(void* handle, USHORT facility, USHORT number, unsigned int bsize, TEXT* buffer, - const MsgFormat::SafeArg& arg) + const Firebird::MsgFormat::SafeArg& arg) { int total_msg = 0; char msg[BUFFER_SMALL] = ""; diff --git a/src/common/classes/MsgPrint.h b/src/common/classes/MsgPrint.h index fa9afc79e31..b78bdbc6c42 100644 --- a/src/common/classes/MsgPrint.h +++ b/src/common/classes/MsgPrint.h @@ -30,8 +30,7 @@ #include "SafeArg.h" -namespace MsgFormat -{ +namespace Firebird::MsgFormat { class BaseStream; // Here we have routines that print a message that contains placeholders for @@ -104,6 +103,6 @@ int fb_msg_format(void* handle, USHORT number, unsigned int bsize, TEXT* buffer, - const MsgFormat::SafeArg& arg); + const Firebird::MsgFormat::SafeArg& arg); #endif // FB_MSGPRINT_H diff --git a/src/common/classes/QualifiedMetaString.h b/src/common/classes/QualifiedMetaString.h index 01ee26a5a2f..fc885f2a86e 100644 --- a/src/common/classes/QualifiedMetaString.h +++ b/src/common/classes/QualifiedMetaString.h @@ -110,7 +110,7 @@ class BaseQualifiedName if (i + 1 < name.length() - 1 && name[i + 1] == '"') ++i; else - (Arg::Gds(isc_invalid_name) << str).raise(); + (Firebird::Arg::Gds(isc_invalid_name) << str).raise(); } result += name[i]; @@ -122,7 +122,7 @@ class BaseQualifiedName const auto validateUnquotedIdentifier = [&](const string& name) { if (name.length() > MAX_SQL_IDENTIFIER_LEN) - (Arg::Gds(isc_invalid_name) << str).raise(); + (Firebird::Arg::Gds(isc_invalid_name) << str).raise(); bool first = true; @@ -136,7 +136,7 @@ class BaseQualifiedName (!first && c == '$') || (!first && c == '_'))) { - (Arg::Gds(isc_invalid_name) << str).raise(); + (Firebird::Arg::Gds(isc_invalid_name) << str).raise(); } first = false; @@ -247,7 +247,7 @@ class BaseQualifiedName } if (dotPos != string::npos && result.schema.isEmpty()) - (Arg::Gds(isc_invalid_name) << str).raise(); + (Firebird::Arg::Gds(isc_invalid_name) << str).raise(); // Process object if (isQuoted(object)) @@ -261,7 +261,7 @@ class BaseQualifiedName } if (result.object.isEmpty()) - (Arg::Gds(isc_invalid_name) << str).raise(); + (Firebird::Arg::Gds(isc_invalid_name) << str).raise(); list.add(result); } while (i < str.size()); @@ -273,7 +273,7 @@ class BaseQualifiedName parseSchemaObjectListNoSep(str, list); if (list.getCount() != 1) - (Arg::Gds(isc_invalid_name) << str).raise(); + (Firebird::Arg::Gds(isc_invalid_name) << str).raise(); return list[0]; } diff --git a/src/common/classes/SafeArg.cpp b/src/common/classes/SafeArg.cpp index ca3a3333c44..9a508264a2d 100644 --- a/src/common/classes/SafeArg.cpp +++ b/src/common/classes/SafeArg.cpp @@ -32,8 +32,7 @@ #include #include "SafeArg.h" -namespace MsgFormat -{ +namespace Firebird::MsgFormat { // This is just a silly convenience in case all arguments are of type int. SafeArg::SafeArg(const int val[], FB_SIZE_T v_size) noexcept diff --git a/src/common/classes/SafeArg.h b/src/common/classes/SafeArg.h index 02af0c32ce7..5cc9346bf63 100644 --- a/src/common/classes/SafeArg.h +++ b/src/common/classes/SafeArg.h @@ -61,8 +61,7 @@ struct DoubleQuad typedef DoubleQuad SINT128; -namespace MsgFormat -{ +namespace Firebird::MsgFormat { // For now we allow 9 parameters; @1..@9 in MsgPrint. inline constexpr FB_SIZE_T SAFEARG_MAX_ARG = 9; diff --git a/src/common/classes/TempFile.cpp b/src/common/classes/TempFile.cpp index c6ab3ad1fc2..83bc10ed842 100644 --- a/src/common/classes/TempFile.cpp +++ b/src/common/classes/TempFile.cpp @@ -215,36 +215,36 @@ void TempFile::init(const PathName& directory, const PathName& prefix) const DWORD err = GetLastError(); if (err != ERROR_FILE_EXISTS) { - (Arg::Gds(isc_io_error) << Arg::Str("CreateFile (create)") << Arg::Str(name) << - Arg::Gds(isc_io_create_err) << Arg::OsError(err)).raise(); + (Firebird::Arg::Gds(isc_io_error) << Firebird::Arg::Str("CreateFile (create)") << Firebird::Arg::Str(name) << + Firebird::Arg::Gds(isc_io_create_err) << Firebird::Arg::OsError(err)).raise(); } randomness++; } if (handle == INVALID_HANDLE_VALUE) { - (Arg::Gds(isc_io_error) << Arg::Str("CreateFile (create)") << Arg::Str(filename) << - Arg::Gds(isc_io_create_err) << Arg::OsError()).raise(); + (Firebird::Arg::Gds(isc_io_error) << Firebird::Arg::Str("CreateFile (create)") << Firebird::Arg::Str(filename) << + Firebird::Arg::Gds(isc_io_create_err) << Firebird::Arg::OsError()).raise(); } #else filename += prefix; filename += NAME_PATTERN; #ifdef HAVE_MKSTEMP - handle = (IPTR) os_utils::mkstemp(filename.begin()); + handle = (IPTR) Firebird::os_utils::mkstemp(filename.begin()); #else if (!mktemp(filename.begin())) { - (Arg::Gds(isc_io_error) << Arg::Str("mktemp") << Arg::Str(filename) << - Arg::Gds(isc_io_create_err) << Arg::OsError()).raise(); + (Firebird::Arg::Gds(isc_io_error) << Firebird::Arg::Str("mktemp") << Firebird::Arg::Str(filename) << + Firebird::Arg::Gds(isc_io_create_err) << Firebird::Arg::OsError()).raise(); } - handle = os_utils::open(filename.c_str(), O_RDWR | O_EXCL | O_CREAT); + handle = Firebird::os_utils::open(filename.c_str(), O_RDWR | O_EXCL | O_CREAT); #endif if (handle == -1) { - (Arg::Gds(isc_io_error) << Arg::Str("open") << Arg::Str(filename) << - Arg::Gds(isc_io_create_err) << Arg::OsError()).raise(); + (Firebird::Arg::Gds(isc_io_error) << Firebird::Arg::Str("open") << Firebird::Arg::Str(filename) << + Firebird::Arg::Gds(isc_io_create_err) << Firebird::Arg::OsError()).raise(); } if (doUnlink) @@ -296,7 +296,7 @@ void TempFile::seek(const offset_t offset) system_error::raise("SetFilePointer"); } #else - const off_t seek_result = os_utils::lseek(handle, (off_t) offset, SEEK_SET); + const off_t seek_result = Firebird::os_utils::lseek(handle, (off_t) offset, SEEK_SET); if (seek_result == (off_t) -1) { system_error::raise("lseek"); diff --git a/src/common/classes/alloc.cpp b/src/common/classes/alloc.cpp index c7132e9661f..9e2e0245395 100644 --- a/src/common/classes/alloc.cpp +++ b/src/common/classes/alloc.cpp @@ -202,9 +202,7 @@ inline size_t get_map_page_size() } // anonymous namespace namespace Firebird { - -namespace SemiDoubleLink -{ +namespace SemiDoubleLink { // SemiDoubleLink makes it possible to walk list one direction, // push/pop/remove members with very efficient back-link to the head pointer somewhere @@ -2467,13 +2465,13 @@ void* MemPool::allocRaw(size_t size) #ifdef MAP_ANONYMOUS - result = os_utils::mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + result = Firebird::os_utils::mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); #else // MAP_ANONYMOUS if (dev_zero_fd < 0) - dev_zero_fd = os_utils::open("/dev/zero", O_RDWR); - result = os_utils::mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, dev_zero_fd, 0); + dev_zero_fd = Firebird::os_utils::open("/dev/zero", O_RDWR); + result = Firebird::os_utils::mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, dev_zero_fd, 0); #endif // MAP_ANONYMOUS @@ -2670,7 +2668,7 @@ bool MemPool::validate(char* buf, FB_SIZE_T size) #ifdef MEM_DEBUG void MemPool::print_contents(const char* filename, unsigned flags, const char* filter_path) noexcept { - FILE* out = os_utils::fopen(filename, "w"); + FILE* out = Firebird::os_utils::fopen(filename, "w"); if (!out) return; @@ -2926,12 +2924,12 @@ friend class MemoryPool; { // scope char name[PATH_MAX]; - if (os_utils::getCurrentModulePath(name, sizeof(name))) + if (Firebird::os_utils::getCurrentModulePath(name, sizeof(name))) strncat(name, ".memdebug.external.log", sizeof(name) - 1); else strcpy(name, "memdebug.external.log"); - file = os_utils::fopen(name, alreadyPrinted ? "at" : "w+t"); + file = Firebird::os_utils::fopen(name, alreadyPrinted ? "at" : "w+t"); } if (file) diff --git a/src/common/classes/init.cpp b/src/common/classes/init.cpp index 75949ae6a9e..9737916ac39 100644 --- a/src/common/classes/init.cpp +++ b/src/common/classes/init.cpp @@ -101,12 +101,12 @@ namespace { // scope char name[PATH_MAX]; - if (os_utils::getCurrentModulePath(name, sizeof(name))) + if (Firebird::os_utils::getCurrentModulePath(name, sizeof(name))) strncat(name, ".memdebug.log", sizeof(name) - 1); else strcpy(name, "memdebug.log"); - file = os_utils::fopen(name, "w+t"); + file = Firebird::os_utils::fopen(name, "w+t"); } #endif // DEBUG_GDS_ALLOC @@ -324,8 +324,7 @@ namespace Firebird dontCleanup = true; } - namespace StaticMutex - { + namespace StaticMutex { Firebird::Mutex* mutex = NULL; void create() noexcept diff --git a/src/common/classes/init.h b/src/common/classes/init.h index f673e9bbbf8..081829df48d 100644 --- a/src/common/classes/init.h +++ b/src/common/classes/init.h @@ -32,9 +32,7 @@ #include namespace Firebird { - -namespace StaticMutex -{ +namespace StaticMutex { // Support for common mutex for various inits extern Mutex* mutex; void create() noexcept; diff --git a/src/common/common.h b/src/common/common.h index 81eaefdb7ab..131551a5118 100644 --- a/src/common/common.h +++ b/src/common/common.h @@ -355,7 +355,7 @@ #define FB_CC CcMsvc #endif -#define SYS_ERR Arg::Windows +#define SYS_ERR Firebird::Arg::Windows //format for __LINE__ #define LINEFORMAT "d" @@ -415,11 +415,11 @@ * UNIX *****************************************************/ #ifdef UNIX -#define SYS_ERR Arg::Unix +#define SYS_ERR Firebird::Arg::Unix #endif /* UNIX */ #ifndef SYS_ERR -#define SYS_ERR Arg::Unix +#define SYS_ERR Firebird::Arg::Unix #endif #ifndef ERRNO @@ -854,17 +854,43 @@ namespace Firebird { } namespace Firebird::Jrd { + namespace Firebird = ::Firebird; } namespace Firebird::Jrd::EDS { } namespace Firebird::fb_utils { + namespace Firebird = ::Firebird; +} + +namespace Firebird::Arg { + namespace Firebird = ::Firebird; +} + +namespace Firebird::Auth { + namespace Firebird = ::Firebird; +} + +namespace Firebird::MsgFormat { + namespace Firebird = ::Firebird; +} + +namespace Firebird::MsgUtil { + namespace Firebird = ::Firebird; +} + +namespace Firebird::os_utils { + namespace Firebird = ::Firebird; } namespace Jrd = Firebird::Jrd; namespace EDS = Firebird::Jrd::EDS; namespace fb_utils = Firebird::fb_utils; +namespace Arg = Firebird::Arg; +namespace MsgFormat = Firebird::MsgFormat; +namespace MsgUtil = Firebird::MsgUtil; +namespace os_utils = Firebird::os_utils; //#define DEBUG_LOST_POOLS 1 diff --git a/src/common/config/ConfigCache.cpp b/src/common/config/ConfigCache.cpp index d47a05a0c3b..0cc610d1117 100644 --- a/src/common/config/ConfigCache.cpp +++ b/src/common/config/ConfigCache.cpp @@ -94,7 +94,7 @@ ConfigCache::File::PreciseTime ConfigCache::File::getTime() #else struct STAT st; - if (os_utils::stat(fileName.c_str(), &st) != 0) + if (Firebird::os_utils::stat(fileName.c_str(), &st) != 0) { if (errno == ENOENT) { diff --git a/src/common/config/config.cpp b/src/common/config/config.cpp index 0589fbd435d..64fa493e031 100644 --- a/src/common/config/config.cpp +++ b/src/common/config/config.cpp @@ -693,7 +693,7 @@ const char* Config::getPlugins(unsigned int type) const } default: - (Arg::Gds(isc_random) << "Internal error in Config::getPlugins(): unknown plugin type requested").raise(); + (Firebird::Arg::Gds(isc_random) << "Internal error in Config::getPlugins(): unknown plugin type requested").raise(); return nullptr; } diff --git a/src/common/config/config_file.cpp b/src/common/config/config_file.cpp index 24572dfc13c..e6c802adb27 100644 --- a/src/common/config/config_file.cpp +++ b/src/common/config/config_file.cpp @@ -62,12 +62,12 @@ class MainStream : public ConfigFile::Stream { public: MainStream(const char* fname, bool errorWhenMissing) - : file(os_utils::fopen(fname, "rt")), fileName(fname), l(0) + : file(Firebird::os_utils::fopen(fname, "rt")), fileName(fname), l(0) { if (errorWhenMissing && !file) { // config file does not exist - (Arg::Gds(isc_miss_config) << fname << Arg::OsError()).raise(); + (Firebird::Arg::Gds(isc_miss_config) << fname << Firebird::Arg::OsError()).raise(); } } @@ -642,7 +642,7 @@ const ConfigFile::Parameter* ConfigFile::findParameter(const KeyType& name, cons void ConfigFile::badLine(const char* fileName, const String& line) { - (Arg::Gds(isc_conf_line) << (fileName ? fileName : "Passed text") << line).raise(); + (Firebird::Arg::Gds(isc_conf_line) << (fileName ? fileName : "Passed text") << line).raise(); } /****************************************************************************** @@ -762,7 +762,7 @@ void ConfigFile::include(const char* currentFileName, const PathName& parPath) AutoSetRestore depth(&includeLimit, includeLimit + 1); if (includeLimit > INCLUDE_LIMIT) { - (Arg::Gds(isc_conf_include) << currentFileName << parPath << Arg::Gds(isc_include_depth)).raise(); + (Firebird::Arg::Gds(isc_conf_include) << currentFileName << parPath << Firebird::Arg::Gds(isc_include_depth)).raise(); } // for relative paths first of all prepend with current path (i.e. path of current conf file) @@ -798,7 +798,7 @@ void ConfigFile::include(const char* currentFileName, const PathName& parPath) // no matches found - check for presence of wild symbols in path if (!hadWildCards) { - (Arg::Gds(isc_conf_include) << currentFileName << parPath << Arg::Gds(isc_include_miss)).raise(); + (Firebird::Arg::Gds(isc_conf_include) << currentFileName << parPath << Firebird::Arg::Gds(isc_include_miss)).raise(); } } } diff --git a/src/common/cvt.cpp b/src/common/cvt.cpp index da9b6c40d6a..dfea966787c 100644 --- a/src/common/cvt.cpp +++ b/src/common/cvt.cpp @@ -256,15 +256,15 @@ static void validateTimeStamp(const ISC_TIMESTAMP timestamp, const EXPECT_DATETI switch (expectedType) { case expect_sql_date: - cb->err(Arg::Gds(isc_date_range_exceeded)); + cb->err(Firebird::Arg::Gds(isc_date_range_exceeded)); break; case expect_sql_time: case expect_sql_time_tz: - cb->err(Arg::Gds(isc_time_range_exceeded)); + cb->err(Firebird::Arg::Gds(isc_time_range_exceeded)); break; case expect_timestamp: case expect_timestamp_tz: - cb->err(Arg::Gds(isc_datetime_range_exceeded)); + cb->err(Firebird::Arg::Gds(isc_datetime_range_exceeded)); break; default: // this should never happen! CVT_conversion_error(desc, cb->err); @@ -389,7 +389,7 @@ static void float_to_text(const dsc* from, dsc* to, Callbacks* cb) const char num_format[] = "%- #*.*g"; chars_printed = fb_utils::snprintf(temp2, sizeof(temp2), num_format, width, precision, d); if (chars_printed <= 0 || static_cast(chars_printed) >= sizeof(temp2)) - cb->err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range)); + cb->err(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_numeric_out_of_range)); // If the full-precision result is too wide for the destination, // reduce the precision and try again. @@ -401,11 +401,11 @@ static void float_to_text(const dsc* from, dsc* to, Callbacks* cb) // If we cannot print at least two digits, one on each side of the // ".", report an overflow exception. if (precision < 2) - cb->err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range)); + cb->err(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_numeric_out_of_range)); chars_printed = fb_utils::snprintf(temp2, sizeof(temp2), num_format, width, precision, d); if (chars_printed <= 0 || static_cast(chars_printed) >= sizeof(temp2)) - cb->err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range)); + cb->err(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_numeric_out_of_range)); // It's possible that reducing the precision caused sprintf to switch // from f-format to e-format, and that the output is still too long @@ -416,13 +416,13 @@ static void float_to_text(const dsc* from, dsc* to, Callbacks* cb) { precision -= (chars_printed - width); if (precision < 2) - cb->err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range)); + cb->err(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_numeric_out_of_range)); // Note: we use here temp2 with sizeof(temp) because temp2 is bigger than temp. // The check should be chars_printed > width because it's our last chance to // fit into "width" else we should throw error. chars_printed = fb_utils::snprintf(temp2, sizeof(temp), num_format, width, precision, d); if (chars_printed <= 0 || chars_printed > width) - cb->err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range)); + cb->err(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_numeric_out_of_range)); } } @@ -478,7 +478,7 @@ static void decimal_float_to_text(const dsc* from, dsc* to, DecimalStatus decSt, catch (const Exception& ex) { // reraise using function passed in callbacks - Arg::StatusVector v(ex); + Firebird::Arg::StatusVector v(ex); cb->err(v); } @@ -506,7 +506,7 @@ static void int128_to_text(const dsc* from, dsc* to, Callbacks* cb) catch (const Exception& ex) { // reraise using function passed in callbacks - Arg::StatusVector v(ex); + Firebird::Arg::StatusVector v(ex); cb->err(v); } @@ -540,7 +540,7 @@ static void integer_to_text(const dsc* from, dsc* to, Callbacks* cb) if (from->dsc_dtype == dtype_quad) { fb_assert(false); - cb->err(Arg::Gds(isc_badblk)); // internal error + cb->err(Firebird::Arg::Gds(isc_badblk)); // internal error } SSHORT pad_count = 0, decimal = 0, neg = 0; @@ -1185,7 +1185,7 @@ void adjustForScale(V& val, SSHORT scale, const V limit, ErrorFunction err) { do { if ((val > limit) || (val < -limit)) - err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range)); + err(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_numeric_out_of_range)); val *= 10; } while (++scale); } @@ -1232,7 +1232,7 @@ static SSHORT cvt_get_short(const dsc* desc, SSHORT scale, DecimalStatus decSt, ULONG lval = CVT_get_long(desc, scale, decSt, err); value = (SSHORT) lval; if (value != SLONG(lval)) - err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range)); + err(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_numeric_out_of_range)); } return value; @@ -1291,7 +1291,7 @@ SLONG CVT_get_long(const dsc* desc, SSHORT scale, DecimalStatus decSt, ErrorFunc // adjust for scale first, *before* range-checking the value. adjustForScale(val64, scale, INT64_LIMIT, err); if ((val64 > LONG_MAX_int64) || (val64 < LONG_MIN_int64)) - err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range)); + err(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_numeric_out_of_range)); return (SLONG) val64; case dtype_quad: @@ -1299,7 +1299,7 @@ SLONG CVT_get_long(const dsc* desc, SSHORT scale, DecimalStatus decSt, ErrorFunc high = ((SLONG *) p)[HIGH_WORD]; if ((value >= 0 && !high) || (value < 0 && high == -1)) break; - err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range)); + err(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_numeric_out_of_range)); break; case dtype_dec64: @@ -1345,13 +1345,13 @@ SLONG CVT_get_long(const dsc* desc, SSHORT scale, DecimalStatus decSt, ErrorFunc { if (d > (double) LONG_MIN_real - 1.) return SLONG_MIN; - err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range)); + err(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_numeric_out_of_range)); } if (d > (double) LONG_MAX_real) { if (d < (double) LONG_MAX_real + 1.) return LONG_MAX_int; - err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range)); + err(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_numeric_out_of_range)); } return (SLONG) d; @@ -1579,7 +1579,7 @@ double CVT_get_double(const dsc* desc, DecimalStatus decSt, ErrorFunction err, b return 0; } - err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range)); + err(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_numeric_out_of_range)); } } else if (*p == '-' && !digit_seen && !sign) @@ -1620,7 +1620,7 @@ double CVT_get_double(const dsc* desc, DecimalStatus decSt, ErrorFunction err, b return 0; } - err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range)); + err(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_numeric_out_of_range)); } // Repeated division is a good way to mung the least significant bits @@ -1643,7 +1643,7 @@ double CVT_get_double(const dsc* desc, DecimalStatus decSt, ErrorFunction err, b return 0; } - err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range)); + err(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_numeric_out_of_range)); } } return value; @@ -1664,7 +1664,7 @@ double CVT_get_double(const dsc* desc, DecimalStatus decSt, ErrorFunction err, b // the user know... if (ABSOLUT(dscale) > DBL_MAX_10_EXP) - err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range)); + err(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_numeric_out_of_range)); if (dscale > 0) value *= CVT_power_of_ten(dscale); @@ -1964,9 +1964,9 @@ void CVT_move_common(const dsc* from, dsc* to, DecimalStatus decSt, Callbacks* c if (len / maxBytesPerChar < from->dsc_length) { - cb->err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_string_truncation) << - Arg::Gds(isc_trunc_limits) << Arg::Num(len / maxBytesPerChar) << - Arg::Num(from->dsc_length)); + cb->err(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_string_truncation) << + Firebird::Arg::Gds(isc_trunc_limits) << Firebird::Arg::Num(len / maxBytesPerChar) << + Firebird::Arg::Num(from->dsc_length)); } cb->validateData(charSet, from->dsc_length, from->dsc_address); @@ -2164,7 +2164,7 @@ void CVT_move_common(const dsc* from, dsc* to, DecimalStatus decSt, Callbacks* c } if (to->dsc_dtype != from->dsc_dtype) - cb->err(Arg::Gds(isc_wish_list) << Arg::Gds(isc_blobnotsup) << "move"); + cb->err(Firebird::Arg::Gds(isc_wish_list) << Firebird::Arg::Gds(isc_blobnotsup) << "move"); // Note: DSC_EQUIV failed above as the blob sub_types were different, // or their character sets were different. In V4 we aren't trying @@ -2200,7 +2200,7 @@ void CVT_move_common(const dsc* from, dsc* to, DecimalStatus decSt, Callbacks* c { double d_value = CVT_get_double(from, decSt, cb->err); if (ABSOLUT(d_value) > FLOAT_MAX && ABSOLUT(d_value) != INFINITY) - cb->err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range)); + cb->err(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_numeric_out_of_range)); *(float*) p = (float) d_value; } return; @@ -2263,11 +2263,11 @@ void CVT_move_common(const dsc* from, dsc* to, DecimalStatus decSt, Callbacks* c if (from->dsc_dtype == dtype_array || from->dsc_dtype == dtype_blob) { - cb->err(Arg::Gds(isc_wish_list) << Arg::Gds(isc_blobnotsup) << "move"); + cb->err(Firebird::Arg::Gds(isc_wish_list) << Firebird::Arg::Gds(isc_blobnotsup) << "move"); } fb_assert(false); - cb->err(Arg::Gds(isc_badblk)); // internal error + cb->err(Firebird::Arg::Gds(isc_badblk)); // internal error } @@ -2288,7 +2288,7 @@ void CVT_conversion_error(const dsc* desc, ErrorFunction err, const Exception* o if (desc->dsc_dtype >= DTYPE_TYPE_MAX) { fb_assert(false); - err(Arg::Gds(isc_badblk)); + err(Firebird::Arg::Gds(isc_badblk)); } if (desc->dsc_dtype == dtype_blob) @@ -2352,10 +2352,10 @@ void CVT_conversion_error(const dsc* desc, ErrorFunction err, const Exception* o } //// TODO: Need access to transliterate here to convert message to metadata charset. - Arg::StatusVector vector; + Firebird::Arg::StatusVector vector; if (original) vector.assign(*original); - vector << Arg::Gds(isc_convert_error) << message; + vector << Firebird::Arg::Gds(isc_convert_error) << message; err(vector); } @@ -2418,7 +2418,7 @@ static void datetime_to_text(const dsc* from, dsc* to, Callbacks* cb) default: fb_assert(false); - cb->err(Arg::Gds(isc_badblk)); // internal error + cb->err(Firebird::Arg::Gds(isc_badblk)); // internal error break; } @@ -2539,9 +2539,9 @@ void make_null_string(const dsc* desc, length -= sizeof(USHORT); // Take into an account VaryStr specifics if (len > length) { - err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_string_truncation) << - Arg::Gds(isc_imp_exc) << - Arg::Gds(isc_trunc_limits) << Arg::Num(length) << Arg::Num(len)); + err(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_string_truncation) << + Firebird::Arg::Gds(isc_imp_exc) << + Firebird::Arg::Gds(isc_trunc_limits) << Firebird::Arg::Num(length) << Firebird::Arg::Num(len)); } memcpy(temp->vary_string, *address, len); temp->vary_length = len; @@ -2776,12 +2776,12 @@ static SSHORT cvt_decompose(const char* string, if (p >= end) continue; } - err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range)); + err(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_numeric_out_of_range)); return 0; case RetPtr::RETVAL_POSSIBLE_OVERFLOW: if ((*p > '8' && sign == -1) || (*p > '7' && sign != -1)) { - err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range)); + err(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_numeric_out_of_range)); return 0; } break; @@ -2857,7 +2857,7 @@ static SSHORT cvt_decompose(const char* string, if (exp >= SHORT_LIMIT) { - err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range)); + err(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_numeric_out_of_range)); return 0; } } @@ -3127,7 +3127,7 @@ Decimal64 CVT_get_dec64(const dsc* desc, DecimalStatus decSt, ErrorFunction err) catch (const Exception& ex) { // reraise using passed error function - Arg::StatusVector v(ex); + Firebird::Arg::StatusVector v(ex); err(v); } @@ -3211,7 +3211,7 @@ Decimal128 CVT_get_dec128(const dsc* desc, DecimalStatus decSt, ErrorFunction er catch (const Exception& ex) { // reraise using passed error function - Arg::StatusVector v(ex); + Firebird::Arg::StatusVector v(ex); err(v); } @@ -3323,7 +3323,7 @@ Int128 CVT_get_int128(const dsc* desc, SSHORT scale, DecimalStatus decSt, ErrorF double, and thus will have no effect on the sum. */ if (d < I128_MIN_dbl || I128_MAX_dbl < d) - err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range)); + err(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_numeric_out_of_range)); int128.set(d); break; @@ -3347,7 +3347,7 @@ Int128 CVT_get_int128(const dsc* desc, SSHORT scale, DecimalStatus decSt, ErrorF double, and thus will have no effect on the sum. */ if (tmp.compare(decSt, I128_MIN_dcft) < 0 || I128_MAX_dcft.compare(decSt, tmp) < 0) - err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range)); + err(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_numeric_out_of_range)); int128.set(decSt, tmp); break; @@ -3359,14 +3359,14 @@ Int128 CVT_get_int128(const dsc* desc, SSHORT scale, DecimalStatus decSt, ErrorF default: fb_assert(false); - err(Arg::Gds(isc_badblk)); // internal error + err(Firebird::Arg::Gds(isc_badblk)); // internal error break; } } catch (const Exception& ex) { // reraise using passed error function - Arg::StatusVector v(ex); + Firebird::Arg::StatusVector v(ex); err(v); } @@ -3506,7 +3506,7 @@ SQUAD CVT_get_quad(const dsc* desc, SSHORT scale, DecimalStatus decSt, ErrorFunc default: fb_assert(false); - err(Arg::Gds(isc_badblk)); // internal error + err(Firebird::Arg::Gds(isc_badblk)); // internal error break; } @@ -3515,7 +3515,7 @@ SQUAD CVT_get_quad(const dsc* desc, SSHORT scale, DecimalStatus decSt, ErrorFunc if (scale != 0) { fb_assert(false); - err(Arg::Gds(isc_badblk)); // internal error + err(Firebird::Arg::Gds(isc_badblk)); // internal error } return value; @@ -3614,7 +3614,7 @@ SINT64 CVT_get_int64(const dsc* desc, SSHORT scale, DecimalStatus decSt, ErrorFu double, and thus will have no effect on the sum. */ if (d < (double) QUAD_MIN_real || (double) QUAD_MAX_real < d) - err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range)); + err(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_numeric_out_of_range)); return (SINT64) d; @@ -3646,7 +3646,7 @@ SINT64 CVT_get_int64(const dsc* desc, SSHORT scale, DecimalStatus decSt, ErrorFu default: fb_assert(false); - err(Arg::Gds(isc_badblk)); // internal error + err(Firebird::Arg::Gds(isc_badblk)); // internal error break; } @@ -3769,9 +3769,9 @@ namespace { if (*p++ != fillChar) { - err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_string_truncation) << - Arg::Gds(isc_trunc_limits) << - Arg::Num(size) << Arg::Num(length)); + err(Firebird::Arg::Gds(isc_arith_except) << Firebird::Arg::Gds(isc_string_truncation) << + Firebird::Arg::Gds(isc_trunc_limits) << + Firebird::Arg::Num(size) << Firebird::Arg::Num(length)); } } } diff --git a/src/common/db_alias.cpp b/src/common/db_alias.cpp index 3fea5f009c1..bfd55fbd5dc 100644 --- a/src/common/db_alias.cpp +++ b/src/common/db_alias.cpp @@ -292,7 +292,7 @@ namespace db = FB_NEW_POOL(getPool()) DbName(getPool(), file); #ifdef HAVE_ID_BY_NAME UCharBuffer id; - os_utils::getUniqueFileId(db->name.c_str(), id); + Firebird::os_utils::getUniqueFileId(db->name.c_str(), id); if (id.hasData()) { Id* i = idHash.lookup(id); @@ -496,7 +496,7 @@ bool expandDatabaseName(Firebird::PathName alias, catch (const fatal_exception& ex) { gds__log("File databases.conf contains bad data: %s", ex.what()); - Arg::Gds(isc_server_misconfigured).raise(); + Firebird::Arg::Gds(isc_server_misconfigured).raise(); } // remove whitespaces from database name @@ -539,14 +539,14 @@ bool expandDatabaseName(Firebird::PathName alias, if (!db) { UCharBuffer id; - os_utils::getUniqueFileId(file.c_str(), id); + Firebird::os_utils::getUniqueFileId(file.c_str(), id); if (id.hasData()) { Id* i = aliasesConf().idHash.lookup(id); if (i) { UCharBuffer oldId; - os_utils::getUniqueFileId(i->db->name.c_str(), oldId); + Firebird::os_utils::getUniqueFileId(i->db->name.c_str(), oldId); if (oldId == id) // Yes, that's really same file, and we should use same config db = i->db; } @@ -575,7 +575,7 @@ bool notifyDatabaseName(const Firebird::PathName& file) return true; UCharBuffer id; - os_utils::getUniqueFileId(file.c_str(), id); + Firebird::os_utils::getUniqueFileId(file.c_str(), id); if (id.hasData()) { aliasesConf().linkId(db, id); diff --git a/src/common/dsc.cpp b/src/common/dsc.cpp index f08c96b0661..d0504a9cc64 100644 --- a/src/common/dsc.cpp +++ b/src/common/dsc.cpp @@ -1785,8 +1785,8 @@ void dsc::getSqlInfo(SLONG* sqlLength, SLONG* sqlSubType, SLONG* sqlScale, SLONG default: status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-804) << - Arg::Gds(isc_dsql_datatype_err)); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-804) << + Firebird::Arg::Gds(isc_dsql_datatype_err)); } } diff --git a/src/common/fb_exception.cpp b/src/common/fb_exception.cpp index db288c5ac3d..75b25d2d003 100644 --- a/src/common/fb_exception.cpp +++ b/src/common/fb_exception.cpp @@ -138,7 +138,7 @@ const char* status_exception::what() const noexcept throw status_exception(status_vector.begin()); } -[[noreturn]] void status_exception::raise(const Arg::StatusVector& statusVector) +[[noreturn]] void status_exception::raise(const Firebird::Arg::StatusVector& statusVector) { throw status_exception(statusVector.value()); } @@ -205,11 +205,11 @@ const char* LongJump::what() const noexcept system_error::system_error(const char* syscall, const char* arg, int error_code) noexcept : status_exception(), errorCode(error_code) { - Arg::Gds temp(isc_sys_request); - temp << Arg::Str(syscall); + Firebird::Arg::Gds temp(isc_sys_request); + temp << Firebird::Arg::Str(syscall); temp << SYS_ERR(errorCode); if (arg) - temp << Arg::Gds(isc_random) << arg; + temp << Firebird::Arg::Gds(isc_random) << arg; set_status(temp.value()); } diff --git a/src/common/gdsassert.h b/src/common/gdsassert.h index 2ad552f51eb..879ccb9cc8b 100644 --- a/src/common/gdsassert.h +++ b/src/common/gdsassert.h @@ -68,7 +68,7 @@ inline void fb_assert_impl(const char* msg, const char* file, int line, bool do_ #endif // DEV_BUILD -namespace DtorException { +namespace Firebird::DtorException { inline void devHalt() noexcept { // If any guard's dtor is executed during exception processing, diff --git a/src/common/ipc/IpcMessage.h b/src/common/ipc/IpcMessage.h index 8c558824bd1..ebbdfc439c3 100644 --- a/src/common/ipc/IpcMessage.h +++ b/src/common/ipc/IpcMessage.h @@ -187,7 +187,7 @@ class IpcMessageObjectImpl final : public IpcObject void mutexBug(int osErrorCode, const char* text) override { iscLogStatus(("Error when working with " + parameters.logicalName).c_str(), - (Arg::Gds(isc_sys_request) << text << Arg::OsError(osErrorCode)).value()); + (Firebird::Arg::Gds(isc_sys_request) << text << Firebird::Arg::OsError(osErrorCode)).value()); } USHORT getType() const override diff --git a/src/common/ipc/IpcNamedSignal.h b/src/common/ipc/IpcNamedSignal.h index 667e4f51095..f10d9a71cfe 100644 --- a/src/common/ipc/IpcNamedSignal.h +++ b/src/common/ipc/IpcNamedSignal.h @@ -89,7 +89,7 @@ inline IpcNamedSignal::IpcNamedSignal(const string& name) strncpy(objectName, name.c_str(), sizeof(objectName)); if (!fb_utils::private_kernel_object_name(objectName, sizeof(objectName))) - (Arg::Gds(isc_random) << "private_kernel_object_name failed").raise(); + (Firebird::Arg::Gds(isc_random) << "private_kernel_object_name failed").raise(); handle = CreateEvent(nullptr, TRUE, FALSE, objectName); diff --git a/src/common/isc.cpp b/src/common/isc.cpp index 9183d8bfbeb..61c1ced8c7a 100644 --- a/src/common/isc.cpp +++ b/src/common/isc.cpp @@ -600,7 +600,7 @@ void iscPrefixLock(TEXT* string, const TEXT* root, bool createLockDir) gds__prefix_lock(string, ""); if (createLockDir) - os_utils::createLockDirectory(string); + Firebird::os_utils::createLockDirectory(string); iscSafeConcatPath(string, root); } diff --git a/src/common/isc_file.cpp b/src/common/isc_file.cpp index 53ff5c9ab74..8be4b4f02c8 100644 --- a/src/common/isc_file.cpp +++ b/src/common/isc_file.cpp @@ -121,7 +121,7 @@ constexpr const char* MTAB = "/etc/mtab"; #define MTAB_OPEN(path, type) setmntent(path, "r") #define MTAB_CLOSE(stream) endmntent(stream) #else -#define MTAB_OPEN(path, type) os_utils::fopen(path, type) +#define MTAB_OPEN(path, type) Firebird::os_utils::fopen(path, type) #define MTAB_CLOSE(stream) fclose(stream) #endif @@ -236,14 +236,14 @@ bool ISC_analyze_nfs(tstring& expanded_filename, tstring& node_name) struct stat fileStat; unsigned m = 1; // use something that is known to be not non-device major - if (os_utils::stat(expanded_filename.c_str(), &fileStat) == 0) + if (Firebird::os_utils::stat(expanded_filename.c_str(), &fileStat) == 0) m = major(fileStat.st_dev); else // stat error - let's try with path component { tstring path, name; PathUtils::splitLastComponent(path, name, expanded_filename); - if (path.hasData() && os_utils::stat(path.c_str(), &fileStat) == 0) + if (path.hasData() && Firebird::os_utils::stat(path.c_str(), &fileStat) == 0) m = major(fileStat.st_dev); } @@ -1115,7 +1115,7 @@ static void expand_filename2(tstring& buff, bool expand_mounts) tstring q; while (*from && *from != '/') q += *from++; - if (os_utils::get_user_home(q.hasData() ? os_utils::get_user_id(q.c_str()) : geteuid(), + if (Firebird::os_utils::get_user_home(q.hasData() ? Firebird::os_utils::get_user_id(q.c_str()) : geteuid(), buff)) { expand_filename2(buff, expand_mounts); @@ -1601,9 +1601,9 @@ class IConv char* inbuf = str.begin(); if (iconv(ic, &inbuf, &insize, &outbuf, &outsize) == (size_t) -1) { - (Arg::Gds(isc_bad_conn_str) << - Arg::Gds(isc_transliteration_failed) << - Arg::Unix(errno)).raise(); + (Firebird::Arg::Gds(isc_bad_conn_str) << + Firebird::Arg::Gds(isc_transliteration_failed) << + Firebird::Arg::Unix(errno)).raise(); } outsize = outlength - outsize; @@ -1635,7 +1635,7 @@ class IConv { iconv_t ret = iconv_open(tocode, fromcode); if (ret == (iconv_t) -1) - (Arg::Gds(isc_iconv_open) << fromcode << tocode << Arg::Unix(errno)).raise(); + (Firebird::Arg::Gds(isc_iconv_open) << fromcode << tocode << Firebird::Arg::Unix(errno)).raise(); return ret; } @@ -1786,8 +1786,8 @@ void ISC_systemToUtf8(Firebird::AbstractString& str) { const DWORD err = GetLastError(); status_exception::raise( - Arg::Gds(isc_bad_conn_str) << Arg::Gds(isc_transliteration_failed) << - Arg::Windows(err)); + Firebird::Arg::Gds(isc_bad_conn_str) << Firebird::Arg::Gds(isc_transliteration_failed) << + Firebird::Arg::Windows(err)); } #elif defined(HAVE_ICONV_H) @@ -1809,8 +1809,8 @@ void ISC_utf8ToSystem(Firebird::AbstractString& str) { const DWORD err = GetLastError(); status_exception::raise( - Arg::Gds(isc_bad_conn_str) << Arg::Gds(isc_transliteration_failed) << - Arg::Windows(err)); + Firebird::Arg::Gds(isc_bad_conn_str) << Firebird::Arg::Gds(isc_transliteration_failed) << + Firebird::Arg::Windows(err)); } #elif defined(HAVE_ICONV_H) @@ -1893,7 +1893,7 @@ void ISC_unescape(AbstractString& /*str*/) else if (pos + 2 <= str.length() && p[1] == '#') str.erase(pos++, 1); else - status_exception::raise(Arg::Gds(isc_bad_conn_str) << Arg::Gds(isc_escape_invalid)); + status_exception::raise(Firebird::Arg::Gds(isc_bad_conn_str) << Firebird::Arg::Gds(isc_escape_invalid)); } #endif } diff --git a/src/common/isc_sync.cpp b/src/common/isc_sync.cpp index 9998406e93f..495173f2ca9 100644 --- a/src/common/isc_sync.cpp +++ b/src/common/isc_sync.cpp @@ -231,7 +231,7 @@ namespace { DevNode getNode(const char* name) { struct STAT statistics; - if (os_utils::stat(name, &statistics) != 0) + if (Firebird::os_utils::stat(name, &statistics) != 0) { if (errno == ENOENT) { @@ -248,7 +248,7 @@ namespace { DevNode getNode(int fd) { struct STAT statistics; - if (os_utils::fstat(fd, &statistics) != 0) + if (Firebird::os_utils::fstat(fd, &statistics) != 0) system_call_failed::raise("stat"); return DevNode(statistics.st_dev, statistics.st_ino); @@ -298,7 +298,7 @@ class SharedFileInfo : public RefCounted if (!file) { - int fd = os_utils::openCreateSharedFile(fileName, 0); + int fd = Firebird::os_utils::openCreateSharedFile(fileName, 0); id = getNode(fd); file = FB_NEW_POOL(*getDefaultMemoryPool()) SharedFileInfo(fd, id); SharedFileInfo** put = sharedFiles->put(id); @@ -552,7 +552,7 @@ namespace { if (rc == 0) return 0; iscLogStatus("Pthread Error", - (Arg::Gds(isc_sys_request) << Arg::Str(function) << Arg::Unix(rc)).value()); + (Firebird::Arg::Gds(isc_sys_request) << Firebird::Arg::Str(function) << Firebird::Arg::Unix(rc)).value()); return rc; } @@ -579,8 +579,8 @@ bool MemoryHeader::check(const char* name, USHORT type, USHORT version, bool rai expected.printf("%d/%d:%d", type, HEADER_VERSION, version); // @1: inconsistent shared memory type/version; found @2, expected @3 - (Arg::Gds(isc_wrong_shmem_ver) << - Arg::Str(name) << Arg::Str(found) << Arg::Str(expected)).raise(); + (Firebird::Arg::Gds(isc_wrong_shmem_ver) << + Firebird::Arg::Str(name) << Firebird::Arg::Str(found) << Firebird::Arg::Str(expected)).raise(); } int SharedMemoryBase::eventInit(event_t* event) @@ -1218,7 +1218,7 @@ bool allocFileSpace(int fd, off_t offset, FB_SIZE_T length, CheckStatusWrapper* const FB_SIZE_T bufSize = length < buf128KSize ? length : buf128KSize; memset(buf.getBuffer(bufSize), 0, bufSize); - os_utils::lseek(fd, LSEEK_OFFSET_CAST offset, SEEK_SET); + Firebird::os_utils::lseek(fd, LSEEK_OFFSET_CAST offset, SEEK_SET); while (length) { @@ -1340,7 +1340,7 @@ SharedMemoryBase::SharedMemoryBase(const TEXT* filename, ULONG length, IpcObject // Get and use the existing length of the shared segment struct STAT file_stat; - if (os_utils::fstat(mainLock->getFd(), &file_stat) == -1) + if (Firebird::os_utils::fstat(mainLock->getFd(), &file_stat) == -1) system_call_failed::raise("fstat"); length = file_stat.st_size; @@ -1348,12 +1348,12 @@ SharedMemoryBase::SharedMemoryBase(const TEXT* filename, ULONG length, IpcObject if (length == 0) { // keep old text of message here - will be assigned a bit later - (Arg::Gds(isc_random) << "shmem_data->sh_mem_length_mapped is 0").raise(); + (Firebird::Arg::Gds(isc_random) << "shmem_data->sh_mem_length_mapped is 0").raise(); } } // map file to memory - void* const address = os_utils::mmap(0, length, + void* const address = Firebird::os_utils::mmap(0, length, PROT_READ | PROT_WRITE, MAP_SHARED, mainLock->getFd(), 0); if ((U_IPTR) address == (U_IPTR) -1) @@ -1411,7 +1411,7 @@ SharedMemoryBase::SharedMemoryBase(const TEXT* filename, ULONG length, IpcObject { if (trunc_flag) { - FB_UNUSED(os_utils::ftruncate(mainLock->getFd(), length)); + FB_UNUSED(Firebird::os_utils::ftruncate(mainLock->getFd(), length)); allocFileSpace(mainLock->getFd(), 0, length, NULL); } @@ -1454,8 +1454,8 @@ SharedMemoryBase::SharedMemoryBase(const TEXT* filename, ULONG length, IpcObject int protocolRc = pthread_mutexattr_setprotocol(&mattr, PTHREAD_PRIO_INHERIT); if (protocolRc && (protocolRc != ENOTSUP)) { - iscLogStatus("Pthread Error", (Arg::Gds(isc_sys_request) << - "pthread_mutexattr_setprotocol" << Arg::Unix(protocolRc)).value()); + iscLogStatus("Pthread Error", (Firebird::Arg::Gds(isc_sys_request) << + "pthread_mutexattr_setprotocol" << Firebird::Arg::Unix(protocolRc)).value()); } #ifdef BUGGY_LINUX_MUTEX } @@ -1483,8 +1483,8 @@ SharedMemoryBase::SharedMemoryBase(const TEXT* filename, ULONG length, IpcObject #endif ) { - iscLogStatus("Pthread Error", (Arg::Gds(isc_sys_request) << - "pthread_mutex_init" << Arg::Unix(state)).value()); + iscLogStatus("Pthread Error", (Firebird::Arg::Gds(isc_sys_request) << + "pthread_mutex_init" << Firebird::Arg::Unix(state)).value()); } LOG_PTHREAD_ERROR(pthread_mutexattr_destroy(&mattr)); @@ -1513,7 +1513,7 @@ SharedMemoryBase::SharedMemoryBase(const TEXT* filename, ULONG length, IpcObject if (statusVector.hasData()) status_exception::raise(&statusVector); else - (Arg::Gds(isc_random) << "Unknown error in setlock(SHARED)").raise(); + (Firebird::Arg::Gds(isc_random) << "Unknown error in setlock(SHARED)").raise(); } } } @@ -1526,7 +1526,7 @@ SharedMemoryBase::SharedMemoryBase(const TEXT* filename, ULONG length, IpcObject if (statusVector.hasData()) status_exception::raise(&statusVector); else - (Arg::Gds(isc_random) << "Unknown error in setlock(SHARED)").raise(); + (Firebird::Arg::Gds(isc_random) << "Unknown error in setlock(SHARED)").raise(); } } } @@ -1697,7 +1697,7 @@ SharedMemoryBase::SharedMemoryBase(const TEXT* filename, ULONG length, IpcObject { CloseHandle(event_handle); if (retry_count > 10) - (Arg::Gds(isc_random) << Arg::Str("Wait for shared memory initialization timed out.")).raise(); + (Firebird::Arg::Gds(isc_random) << Firebird::Arg::Str("Wait for shared memory initialization timed out.")).raise(); goto retry; } @@ -1758,7 +1758,7 @@ SharedMemoryBase::SharedMemoryBase(const TEXT* filename, ULONG length, IpcObject goto retry; CloseHandle(event_handle); - Arg::Gds(isc_instance_conflict).raise(); + Firebird::Arg::Gds(isc_instance_conflict).raise(); } else { @@ -1779,7 +1779,7 @@ SharedMemoryBase::SharedMemoryBase(const TEXT* filename, ULONG length, IpcObject unlinkFile(); } - (Arg::Gds(isc_random) << Arg::Str("File for memory mapping is empty.")).raise(); + (Firebird::Arg::Gds(isc_random) << Firebird::Arg::Str("File for memory mapping is empty.")).raise(); } LARGE_INTEGER offset; @@ -1924,7 +1924,7 @@ SharedMemoryBase::SharedMemoryBase(const TEXT* filename, ULONG length, IpcObject "\tCheck for presence of another Firebird instance with different lock directory", expanded_filename, mappedName.c_str()); - (Arg::Gds(isc_random) << Arg::Str("Wrong file for memory mapping, see details in firebird.log")).raise(); + (Firebird::Arg::Gds(isc_random) << Firebird::Arg::Str("Wrong file for memory mapping, see details in firebird.log")).raise(); } ISC_mutex_init(&sh_mem_winMutex, filename); @@ -1989,7 +1989,7 @@ UCHAR* SharedMemoryBase::mapObject(CheckStatusWrapper* statusVector, ULONG objec const ULONG end = FB_ALIGN(object_offset + object_length, page_size); const ULONG length = end - start; - UCHAR* address = (UCHAR*) os_utils::mmap(0, length, + UCHAR* address = (UCHAR*) Firebird::os_utils::mmap(0, length, PROT_READ | PROT_WRITE, MAP_SHARED, mainLock->getFd(), start); if ((U_IPTR) address == (U_IPTR) -1) @@ -2521,7 +2521,7 @@ bool SharedMemoryBase::remapFile(CheckStatusWrapper* statusVector, ULONG new_len { new_length = FB_ALIGN(new_length, getSystemPageSize(statusVector)); - FB_UNUSED(os_utils::ftruncate(mainLock->getFd(), new_length)); + FB_UNUSED(Firebird::os_utils::ftruncate(mainLock->getFd(), new_length)); if (new_length > sh_mem_length_mapped) { @@ -2533,7 +2533,7 @@ bool SharedMemoryBase::remapFile(CheckStatusWrapper* statusVector, ULONG new_len } } - MemoryHeader* const address = (MemoryHeader*) os_utils::mmap(0, new_length, + MemoryHeader* const address = (MemoryHeader*) Firebird::os_utils::mmap(0, new_length, PROT_READ | PROT_WRITE, MAP_SHARED, mainLock->getFd(), 0); if ((U_IPTR) address == (U_IPTR) -1) @@ -2680,8 +2680,8 @@ bool SharedMemoryBase::remapFile(CheckStatusWrapper* statusVector, ULONG, bool) * **************************************/ - (Arg::Gds(isc_unavailable) << - Arg::Gds(isc_random) << "SharedMemory::remapFile").copyTo(statusVector); + (Firebird::Arg::Gds(isc_unavailable) << + Firebird::Arg::Gds(isc_random) << "SharedMemory::remapFile").copyTo(statusVector); return NULL; } @@ -2907,6 +2907,6 @@ static void error(CheckStatusWrapper* statusVector, const TEXT* string, ISC_STAT * We've encountered an error, report it. * **************************************/ - (Arg::StatusVector(statusVector) << - Arg::Gds(isc_sys_request) << string << SYS_ERR(status)).copyTo(statusVector); + (Firebird::Arg::StatusVector(statusVector) << + Firebird::Arg::Gds(isc_sys_request) << string << SYS_ERR(status)).copyTo(statusVector); } diff --git a/src/common/os/darwin/mod_loader.cpp b/src/common/os/darwin/mod_loader.cpp index 463209174b9..1065e43a0d1 100644 --- a/src/common/os/darwin/mod_loader.cpp +++ b/src/common/os/darwin/mod_loader.cpp @@ -60,7 +60,7 @@ bool ModuleLoader::isLoadableModule(const Firebird::PathName& module) { struct stat sb; - if (-1 == os_utils::stat(module.c_str(), &sb)) + if (-1 == Firebird::os_utils::stat(module.c_str(), &sb)) return false; if ( ! (sb.st_mode & S_IFREG) ) // Make sure it is a plain file diff --git a/src/common/os/os_utils.h b/src/common/os/os_utils.h index bbdc2f1c459..1ccd3202cbc 100644 --- a/src/common/os/os_utils.h +++ b/src/common/os/os_utils.h @@ -68,8 +68,7 @@ #define FLOCK flock #endif -namespace os_utils -{ +namespace Firebird::os_utils { SLONG get_user_group_id(const TEXT* user_group_name); SLONG get_user_id(const TEXT* user_name); diff --git a/src/common/os/posix/divorce.cpp b/src/common/os/posix/divorce.cpp index ce2089fbe95..da12683c218 100644 --- a/src/common/os/posix/divorce.cpp +++ b/src/common/os/posix/divorce.cpp @@ -124,7 +124,7 @@ void divorce_terminal(int mask) // Perform terminal divorce // this is in case of BSD systems - fid = os_utils::open("/dev/tty", 2); + fid = Firebird::os_utils::open("/dev/tty", 2); if (fid >= 0) { ioctl(fid, TIOCNOTTY, 0); diff --git a/src/common/os/posix/guid.cpp b/src/common/os/posix/guid.cpp index b431026afbc..f4a36d35226 100644 --- a/src/common/os/posix/guid.cpp +++ b/src/common/os/posix/guid.cpp @@ -44,7 +44,7 @@ namespace Firebird { void GenerateRandomBytes(void* buffer, FB_SIZE_T size) { // do not use /dev/random because it may return lesser data than we need. - int fd = os_utils::open("/dev/urandom", O_RDONLY); + int fd = Firebird::os_utils::open("/dev/urandom", O_RDONLY); if (fd < 0) Firebird::system_call_failed::raise("open"); diff --git a/src/common/os/posix/mod_loader.cpp b/src/common/os/posix/mod_loader.cpp index 5bf928e7ada..a498d998ff5 100644 --- a/src/common/os/posix/mod_loader.cpp +++ b/src/common/os/posix/mod_loader.cpp @@ -74,7 +74,7 @@ bool ModuleLoader::isLoadableModule(const Firebird::PathName& module) { struct STAT sb; - if (-1 == os_utils::stat(module.c_str(), &sb)) + if (-1 == Firebird::os_utils::stat(module.c_str(), &sb)) return false; if ( ! (sb.st_mode & S_IFREG) ) // Make sure it is a plain file diff --git a/src/common/os/posix/os_utils.cpp b/src/common/os/posix/os_utils.cpp index e2d39b73d27..37a89c0980f 100644 --- a/src/common/os/posix/os_utils.cpp +++ b/src/common/os/posix/os_utils.cpp @@ -88,8 +88,7 @@ using namespace Firebird; -namespace os_utils -{ +namespace Firebird::os_utils { static GlobalPtr grMutex; @@ -171,7 +170,7 @@ void createLockDirectory(const char* pathname) { if (access(pathname, R_OK | W_OK | X_OK) == 0) { - if (os_utils::stat(pathname, &st) != 0) + if (Firebird::os_utils::stat(pathname, &st) != 0) system_call_failed::raise("stat", pathname); if (S_ISDIR(st.st_mode)) return; @@ -195,7 +194,7 @@ void createLockDirectory(const char* pathname) { if (SYSCALL_INTERRUPTED(errno)) continue; - (Arg::Gds(isc_lock_dir_access) << pathname2).raise(); + (Firebird::Arg::Gds(isc_lock_dir_access) << pathname2).raise(); } changeFileRights(pathname2, 0770); @@ -211,7 +210,7 @@ void createLockDirectory(const char* pathname) } if (SYSCALL_INTERRUPTED(errno)) continue; - (Arg::Gds(isc_lock_dir_access) << renameGuard).raise(); + (Firebird::Arg::Gds(isc_lock_dir_access) << renameGuard).raise(); } while (rename(pathname2, pathname) != 0) @@ -225,21 +224,21 @@ void createLockDirectory(const char* pathname) { if (SYSCALL_INTERRUPTED(errno)) continue; - (Arg::Gds(isc_lock_dir_access) << pathname).raise(); + (Firebird::Arg::Gds(isc_lock_dir_access) << pathname).raise(); } while (rmdir(pathname2) != 0) { if (SYSCALL_INTERRUPTED(errno)) continue; - (Arg::Gds(isc_lock_dir_access) << pathname).raise(); + (Firebird::Arg::Gds(isc_lock_dir_access) << pathname).raise(); } for(;;) { if (access(pathname, R_OK | W_OK | X_OK) == 0) { - if (os_utils::stat(pathname, &st) != 0) + if (Firebird::os_utils::stat(pathname, &st) != 0) system_call_failed::raise("stat", pathname); if (S_ISDIR(st.st_mode)) return; @@ -255,7 +254,7 @@ void createLockDirectory(const char* pathname) return; } - (Arg::Gds(isc_lock_dir_access) << pathname).raise(); + (Firebird::Arg::Gds(isc_lock_dir_access) << pathname).raise(); } } @@ -268,7 +267,7 @@ void createLockDirectory(const char* pathname) static void raiseError(int errCode, const char* filename) { - (Arg::Gds(isc_io_error) << "open" << filename << Arg::Gds(isc_io_open_err) + (Firebird::Arg::Gds(isc_io_error) << "open" << filename << Firebird::Arg::Gds(isc_io_open_err) << SYS_ERR(errCode)).raise(); } @@ -276,7 +275,7 @@ static void raiseError(int errCode, const char* filename) // open (or create if missing) and set appropriate access rights int openCreateSharedFile(const char* pathname, int flags) { - int fd = os_utils::open(pathname, flags | O_RDWR | O_CREAT, S_IREAD | S_IWRITE); + int fd = Firebird::os_utils::open(pathname, flags | O_RDWR | O_CREAT, S_IREAD | S_IWRITE); if (fd < 0) raiseError(ERRNO, pathname); @@ -287,7 +286,7 @@ int openCreateSharedFile(const char* pathname, int flags) struct STAT st; int rc; - rc = os_utils::fstat(fd, &st); + rc = Firebird::os_utils::fstat(fd, &st); if (rc != 0) { @@ -409,7 +408,7 @@ static void makeUniqueFileId(const struct STAT& statistics, UCharBuffer& id) void getUniqueFileId(int fd, UCharBuffer& id) { struct STAT statistics; - if (os_utils::fstat(fd, &statistics) != 0) + if (Firebird::os_utils::fstat(fd, &statistics) != 0) system_call_failed::raise("fstat"); makeUniqueFileId(statistics, id); @@ -419,7 +418,7 @@ void getUniqueFileId(int fd, UCharBuffer& id) void getUniqueFileId(const char* name, UCharBuffer& id) { struct STAT statistics; - if (os_utils::stat(name, &statistics) != 0) + if (Firebird::os_utils::stat(name, &statistics) != 0) { id.clear(); return; diff --git a/src/common/os/posix/path_utils.cpp b/src/common/os/posix/path_utils.cpp index 26f6476a8e5..85fc35e32a2 100644 --- a/src/common/os/posix/path_utils.cpp +++ b/src/common/os/posix/path_utils.cpp @@ -100,7 +100,7 @@ const PosixDirIterator& PosixDirIterator::operator++() { if (!done) { - while ( (ent = os_utils::readdir(dir)) ) + while ( (ent = Firebird::os_utils::readdir(dir)) ) { PathName entryname; PathUtils::concatPath(entryname, dirPrefix, ent->d_name); @@ -241,10 +241,10 @@ bool PathUtils::isSymLink(const PathName& path) { struct STAT st, lst; - if (os_utils::stat(path.c_str(), &st) != 0) + if (Firebird::os_utils::stat(path.c_str(), &st) != 0) return false; - if (os_utils::lstat(path.c_str(), &lst) != 0) + if (Firebird::os_utils::lstat(path.c_str(), &lst) != 0) return false; return st.st_ino != lst.st_ino; diff --git a/src/common/os/win32/os_utils.cpp b/src/common/os/win32/os_utils.cpp index 25369ae7b29..fa53779c98a 100644 --- a/src/common/os/win32/os_utils.cpp +++ b/src/common/os/win32/os_utils.cpp @@ -127,8 +127,7 @@ namespace InitMutex entryLoader("EntryPointLoader"); } // anonymous namespace -namespace os_utils -{ +namespace Firebird::os_utils { // waits for implementation SLONG get_user_group_id(const TEXT* /*user_group_name*/) @@ -321,7 +320,7 @@ int openCreateSharedFile(const char* pathname, int flags) int rc = open(pathname, flags | O_RDWR | O_CREAT, S_IREAD | S_IWRITE); if (rc < 0) { - (Arg::Gds(isc_io_error) << "open" << pathname << Arg::Gds(isc_io_open_err) + (Firebird::Arg::Gds(isc_io_error) << "open" << pathname << Firebird::Arg::Gds(isc_io_open_err) << strerror(errno)).raise(); } return rc; diff --git a/src/common/sdl.cpp b/src/common/sdl.cpp index df0605d6608..2be204a0129 100644 --- a/src/common/sdl.cpp +++ b/src/common/sdl.cpp @@ -62,7 +62,7 @@ struct array_range }; static const UCHAR* compile(const UCHAR*, sdl_arg*); -static ISC_STATUS error(CheckStatusWrapper* status_vector, const Arg::StatusVector& v); +static ISC_STATUS error(CheckStatusWrapper* status_vector, const Firebird::Arg::StatusVector& v); static bool execute(sdl_arg*); static const UCHAR* get_range(const UCHAR*, array_range*, SLONG*, SLONG*); @@ -131,8 +131,8 @@ SLONG SDL_compute_subscript(CheckStatusWrapper* status_vector, **************************************/ if (dimensions != desc->iad_dimensions) { - error(status_vector, Arg::Gds(isc_invalid_dimension) << Arg::Num(desc->iad_dimensions) << - Arg::Num(dimensions)); + error(status_vector, Firebird::Arg::Gds(isc_invalid_dimension) << Firebird::Arg::Num(desc->iad_dimensions) << + Firebird::Arg::Num(dimensions)); return -1; } @@ -145,8 +145,8 @@ SLONG SDL_compute_subscript(CheckStatusWrapper* status_vector, const SLONG n = *subscripts++; if (n < range->iad_lower || n > range->iad_upper) { - error(status_vector, Arg::Gds(isc_ss_out_of_bounds) << - Arg::Num(n) << Arg::Num(range->iad_lower) << Arg::Num(range->iad_upper)); + error(status_vector, Firebird::Arg::Gds(isc_ss_out_of_bounds) << + Firebird::Arg::Num(n) << Firebird::Arg::Num(range->iad_lower) << Firebird::Arg::Num(range->iad_upper)); return -1; } subscript += (n - range->iad_lower) * range->iad_length; @@ -179,7 +179,7 @@ ISC_STATUS SDL_info(CheckStatusWrapper* status_vector, info->sdl_info_field.clear(); if (*p++ != isc_sdl_version1) - return error(status_vector, Arg::Gds(isc_invalid_sdl) << Arg::Num(0)); + return error(status_vector, Firebird::Arg::Gds(isc_invalid_sdl) << Firebird::Arg::Num(0)); for (;;) switch (*p++) @@ -187,10 +187,10 @@ ISC_STATUS SDL_info(CheckStatusWrapper* status_vector, case isc_sdl_struct: n = *p++; if (n != 1) - return error(status_vector, Arg::Gds(isc_invalid_sdl) << Arg::Num(p - sdl - 1)); + return error(status_vector, Firebird::Arg::Gds(isc_invalid_sdl) << Firebird::Arg::Num(p - sdl - 1)); offset = p - sdl; if (!(p = sdl_desc(p, &info->sdl_info_element))) - return error(status_vector, Arg::Gds(isc_invalid_sdl) << Arg::Num(offset)); + return error(status_vector, Firebird::Arg::Gds(isc_invalid_sdl) << Firebird::Arg::Num(offset)); info->sdl_info_element.dsc_address = 0; break; @@ -278,7 +278,7 @@ int SDL_walk(CheckStatusWrapper* status_vector, { offset = p - sdl - 1; if (!(p = sdl_desc(p, &junk))) - return error(status_vector, Arg::Gds(isc_invalid_sdl) << Arg::Num(offset)); + return error(status_vector, Firebird::Arg::Gds(isc_invalid_sdl) << Firebird::Arg::Num(offset)); } break; @@ -430,8 +430,8 @@ static const UCHAR* compile(const UCHAR* sdl, sdl_arg* arg) if (arg && count != arg->sdl_arg_desc->iad_dimensions) { error(arg->sdl_arg_status_vector, - Arg::Gds(isc_invalid_dimension) << Arg::Num(arg->sdl_arg_desc->iad_dimensions) << - Arg::Num(count)); + Firebird::Arg::Gds(isc_invalid_dimension) << Firebird::Arg::Num(arg->sdl_arg_desc->iad_dimensions) << + Firebird::Arg::Num(count)); return NULL; } expr = expressions; @@ -454,7 +454,7 @@ static const UCHAR* compile(const UCHAR* sdl, sdl_arg* arg) count = *p++; if (arg && count != 1) { - error(arg->sdl_arg_status_vector, Arg::Gds(isc_datnotsup)); + error(arg->sdl_arg_status_vector, Firebird::Arg::Gds(isc_datnotsup)); // Msg107: "data operation not supported" (arrays of structures) return NULL; } @@ -474,13 +474,13 @@ static const UCHAR* compile(const UCHAR* sdl, sdl_arg* arg) return p; default: - error(arg->sdl_arg_status_vector, Arg::Gds(isc_invalid_sdl) << Arg::Num(p - arg->sdl_arg_sdl - 1)); + error(arg->sdl_arg_status_vector, Firebird::Arg::Gds(isc_invalid_sdl) << Firebird::Arg::Num(p - arg->sdl_arg_sdl - 1)); return NULL; } } -static ISC_STATUS error(CheckStatusWrapper* status_vector, const Arg::StatusVector& v) +static ISC_STATUS error(CheckStatusWrapper* status_vector, const Firebird::Arg::StatusVector& v) { /************************************** * @@ -594,8 +594,8 @@ static bool execute(sdl_arg* arg) const SLONG n = *stack_ptr++; if (n < range->iad_lower || n > range->iad_upper) { - error(arg->sdl_arg_status_vector, Arg::Gds(isc_ss_out_of_bounds) << - Arg::Num(n) << Arg::Num(range->iad_lower) << Arg::Num(range->iad_upper)); + error(arg->sdl_arg_status_vector, Firebird::Arg::Gds(isc_ss_out_of_bounds) << + Firebird::Arg::Num(n) << Firebird::Arg::Num(range->iad_lower) << Firebird::Arg::Num(range->iad_upper)); return false; } subscript += (n - range->iad_lower) * range->iad_length; @@ -956,7 +956,7 @@ static IPTR* stuff(IPTR value, sdl_arg* arg) return (IPTR*) TRUE; if (arg->sdl_arg_next >= arg->sdl_arg_end) - error(arg->sdl_arg_status_vector, Arg::Gds(isc_virmemexh)); + error(arg->sdl_arg_status_vector, Firebird::Arg::Gds(isc_virmemexh)); // unable to allocate memory from operating system *(arg->sdl_arg_next)++ = value; diff --git a/src/common/security.cpp b/src/common/security.cpp index e309557c942..970b39ef0de 100644 --- a/src/common/security.cpp +++ b/src/common/security.cpp @@ -36,12 +36,12 @@ namespace { void raise() { - Arg::Gds(isc_user_manager).raise(); + Firebird::Arg::Gds(isc_user_manager).raise(); } } // anonymous namespace -namespace Auth { +namespace Firebird::Auth { Get::Get(const Config* firebirdConf) : GetPlugins(IPluginManager::TYPE_AUTH_USER_MANAGEMENT, firebirdConf) diff --git a/src/common/security.h b/src/common/security.h index 2851816d2ea..ef34d339a43 100644 --- a/src/common/security.h +++ b/src/common/security.h @@ -31,7 +31,7 @@ #include "../common/classes/MetaString.h" #include "../common/classes/objects_array.h" -namespace Auth { +namespace Firebird::Auth { class CharField : public Firebird::AutoIface > diff --git a/src/common/unicode_util.cpp b/src/common/unicode_util.cpp index 05ffe216b40..4d3563018f8 100644 --- a/src/common/unicode_util.cpp +++ b/src/common/unicode_util.cpp @@ -120,7 +120,7 @@ struct BaseICU } if (!optional) - (Arg::Gds(isc_icu_entrypoint) << name).raise(); + (Firebird::Arg::Gds(isc_icu_entrypoint) << name).raise(); return ""; } @@ -203,7 +203,7 @@ void BaseICU::initialize(ModuleLoader::Module* module) (int) versionInfo[0], (int) versionInfo[1], this->majorVersion, this->minorVersion); - (Arg::Gds(isc_random) << Arg::Str(err)).raise(); + (Firebird::Arg::Gds(isc_random) << Firebird::Arg::Str(err)).raise(); } majorVersion = versionInfo[0]; @@ -267,7 +267,7 @@ void BaseICU::initialize(ModuleLoader::Module* module) { string diag; diag.printf("u_init() error %d", status); - (Arg::Gds(isc_random) << diag).raise(); + (Firebird::Arg::Gds(isc_random) << diag).raise(); } } @@ -1363,12 +1363,12 @@ UnicodeUtil::ConversionICU& UnicodeUtil::getConversionICU() major--; } - Arg::Gds err(isc_icu_library); + Firebird::Arg::Gds err(isc_icu_library); if (lastError.getState() & Firebird::IStatus::STATE_ERRORS) { - err << Arg::StatusVector(lastError.getErrors()) << - Arg::Gds(isc_random) << Arg::Str(version); + err << Firebird::Arg::StatusVector(lastError.getErrors()) << + Firebird::Arg::Gds(isc_random) << Firebird::Arg::Str(version); } err.raise(); @@ -2070,7 +2070,7 @@ UnicodeUtil::ICU* UnicodeUtil::Utf16Collation::loadICU( collVersion.c_str(), icuVersion.c_str()); } - (Arg::Gds(isc_random) << errorMsg).raise(); + (Firebird::Arg::Gds(isc_random) << errorMsg).raise(); } diff --git a/src/common/utils.cpp b/src/common/utils.cpp index 32e319b79ed..1ba26be30b5 100644 --- a/src/common/utils.cpp +++ b/src/common/utils.cpp @@ -689,7 +689,7 @@ namespace { f = stdin; } else { - f = os_utils::fopen(name.c_str(), "rt"); + f = Firebird::os_utils::fopen(name.c_str(), "rt"); } if (f && isatty(fileno(f))) { diff --git a/src/dsql/AggNodes.cpp b/src/dsql/AggNodes.cpp index 3cda8e4c9fe..0652bd3c0bb 100644 --- a/src/dsql/AggNodes.cpp +++ b/src/dsql/AggNodes.cpp @@ -81,7 +81,7 @@ DmlNode* AggNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, } if (!node) - PAR_error(csb, Arg::Gds(isc_funnotdef) << name); + PAR_error(csb, Firebird::Arg::Gds(isc_funnotdef) << name); const UCHAR count = csb->csb_blr_reader.getByte(); @@ -89,7 +89,7 @@ DmlNode* AggNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, node->getChildren(holder, false); if (count != holder.refs.getCount()) - PAR_error(csb, Arg::Gds(isc_funmismat) << name); + PAR_error(csb, Firebird::Arg::Gds(isc_funmismat) << name); node->parseArgs(tdbb, csb, count); @@ -100,8 +100,8 @@ AggNode* AggNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) { if (dsqlScratch->isPsql()) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << - Arg::Gds(isc_dsql_command_err)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << + Firebird::Arg::Gds(isc_dsql_command_err)); } if (!(dsqlScratch->inSelectList || dsqlScratch->inWhereClause || dsqlScratch->inGroupByClause || @@ -109,8 +109,8 @@ AggNode* AggNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) { // not part of a select list, where clause, group by clause, // having clause, or order by clause - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << - Arg::Gds(isc_dsql_agg_ref_err)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << + Firebird::Arg::Gds(isc_dsql_agg_ref_err)); } return dsqlCopy(dsqlScratch); @@ -259,8 +259,8 @@ bool AggNode::dsqlInvalidReferenceFinder(InvalidReferenceFinder& visitor) FIELD_MATCH_TYPE_EQUAL, false, *i)) { // Nested aggregate functions are not allowed - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << - Arg::Gds(isc_dsql_agg_nested_err)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << + Firebird::Arg::Gds(isc_dsql_agg_nested_err)); } } } @@ -654,8 +654,8 @@ void AvgAggNode::make(DsqlCompilerScratch* dsqlScratch, dsc* desc) { if (!DTYPE_IS_NUMERIC(desc->dsc_dtype) && !DTYPE_IS_TEXT(desc->dsc_dtype)) { - ERRD_post(Arg::Gds(isc_expression_eval_err) << - Arg::Gds(isc_dsql_agg_wrongarg) << Arg::Str("AVG")); + ERRD_post(Firebird::Arg::Gds(isc_expression_eval_err) << + Firebird::Arg::Gds(isc_dsql_agg_wrongarg) << Firebird::Arg::Str("AVG")); } else if (DTYPE_IS_TEXT(desc->dsc_dtype)) { @@ -667,8 +667,8 @@ void AvgAggNode::make(DsqlCompilerScratch* dsqlScratch, dsc* desc) { if (!DTYPE_IS_NUMERIC(desc->dsc_dtype)) { - ERRD_post(Arg::Gds(isc_expression_eval_err) << - Arg::Gds(isc_dsql_agg2_wrongarg) << Arg::Str("AVG")); + ERRD_post(Firebird::Arg::Gds(isc_expression_eval_err) << + Firebird::Arg::Gds(isc_dsql_agg2_wrongarg) << Firebird::Arg::Str("AVG")); } else if (desc->dsc_dtype == dtype_int128) { @@ -733,7 +733,7 @@ void AvgAggNode::outputDesc(dsc* desc) const if (!(DTYPE_IS_NUMERIC(desc->dsc_dtype) || DTYPE_IS_TEXT(desc->dsc_dtype))) { if (desc->dsc_dtype != dtype_unknown) - ERR_post(Arg::Gds(isc_datype_notsup)); // data type not supported for arithmetic + ERR_post(Firebird::Arg::Gds(isc_datype_notsup)); // data type not supported for arithmetic } desc->dsc_dtype = DEFAULT_DOUBLE; @@ -774,7 +774,7 @@ void AvgAggNode::outputDesc(dsc* desc) const if (desc->dsc_dtype == dtype_quad) IBERROR(224); // msg 224 quad word arithmetic not supported - ERR_post(Arg::Gds(isc_datype_notsup)); // data type not supported for arithmetic + ERR_post(Firebird::Arg::Gds(isc_datype_notsup)); // data type not supported for arithmetic } desc->dsc_dtype = DEFAULT_DOUBLE; @@ -1234,8 +1234,8 @@ void SumAggNode::make(DsqlCompilerScratch* dsqlScratch, dsc* desc) { if (!DTYPE_IS_NUMERIC(desc->dsc_dtype) && !DTYPE_IS_TEXT(desc->dsc_dtype)) { - ERRD_post(Arg::Gds(isc_expression_eval_err) << - Arg::Gds(isc_dsql_agg_wrongarg) << Arg::Str("SUM")); + ERRD_post(Firebird::Arg::Gds(isc_expression_eval_err) << + Firebird::Arg::Gds(isc_dsql_agg_wrongarg) << Firebird::Arg::Str("SUM")); } else if (desc->dsc_dtype == dtype_short) { @@ -1257,8 +1257,8 @@ void SumAggNode::make(DsqlCompilerScratch* dsqlScratch, dsc* desc) { if (!DTYPE_IS_NUMERIC(desc->dsc_dtype)) { - ERRD_post(Arg::Gds(isc_expression_eval_err) << - Arg::Gds(isc_dsql_agg2_wrongarg) << Arg::Str("SUM")); + ERRD_post(Firebird::Arg::Gds(isc_expression_eval_err) << + Firebird::Arg::Gds(isc_dsql_agg2_wrongarg) << Firebird::Arg::Str("SUM")); } else if (desc->dsc_dtype == dtype_int64 || desc->dsc_dtype == dtype_int128) { @@ -1398,7 +1398,7 @@ void SumAggNode::getDesc(thread_db* tdbb, CompilerScratch* csb, dsc* desc) if (desc->dsc_dtype == dtype_quad) IBERROR(224); // msg 224 quad word arithmetic not supported - ERR_post(Arg::Gds(isc_datype_notsup)); // data type not supported for arithmetic + ERR_post(Firebird::Arg::Gds(isc_datype_notsup)); // data type not supported for arithmetic } ValueExprNode* SumAggNode::copy(thread_db* tdbb, NodeCopier& copier) const @@ -1584,19 +1584,19 @@ void BinAggNode::make(DsqlCompilerScratch* dsqlScratch, dsc* desc) switch (type) { case TYPE_BIN_AND: - ERRD_post(Arg::Gds(isc_expression_eval_err) << - Arg::Gds(isc_dsql_agg2_wrongarg) << Arg::Str("BIN_AND_AGG")); + ERRD_post(Firebird::Arg::Gds(isc_expression_eval_err) << + Firebird::Arg::Gds(isc_dsql_agg2_wrongarg) << Firebird::Arg::Str("BIN_AND_AGG")); break; case TYPE_BIN_OR: - ERRD_post(Arg::Gds(isc_expression_eval_err) << - Arg::Gds(isc_dsql_agg2_wrongarg) << Arg::Str("BIN_OR_AGG")); + ERRD_post(Firebird::Arg::Gds(isc_expression_eval_err) << + Firebird::Arg::Gds(isc_dsql_agg2_wrongarg) << Firebird::Arg::Str("BIN_OR_AGG")); break; case TYPE_BIN_XOR: case TYPE_BIN_XOR_DISTINCT: - ERRD_post(Arg::Gds(isc_expression_eval_err) << - Arg::Gds(isc_dsql_agg2_wrongarg) << Arg::Str("BIN_XOR_AGG")); + ERRD_post(Firebird::Arg::Gds(isc_expression_eval_err) << + Firebird::Arg::Gds(isc_dsql_agg2_wrongarg) << Firebird::Arg::Str("BIN_XOR_AGG")); break; default: diff --git a/src/dsql/BlrDebugWriter.cpp b/src/dsql/BlrDebugWriter.cpp index edba78a472b..04df3c54305 100644 --- a/src/dsql/BlrDebugWriter.cpp +++ b/src/dsql/BlrDebugWriter.cpp @@ -36,7 +36,7 @@ using namespace Firebird; namespace Firebird::Jrd { -void BlrDebugWriter::raiseError(const Arg::StatusVector& vector) +void BlrDebugWriter::raiseError(const Firebird::Arg::StatusVector& vector) { ERRD_post(vector); } diff --git a/src/dsql/BoolNodes.cpp b/src/dsql/BoolNodes.cpp index 2b49bc8113f..596b0e9d994 100644 --- a/src/dsql/BoolNodes.cpp +++ b/src/dsql/BoolNodes.cpp @@ -422,9 +422,9 @@ BoolExprNode* ComparativeBoolNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) { if (listNode->items.getCount() > MAX_MEMBER_LIST) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-901) << - Arg::Gds(isc_imp_exc) << - Arg::Gds(isc_dsql_too_many_values) << Arg::Num(MAX_MEMBER_LIST)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-901) << + Firebird::Arg::Gds(isc_imp_exc) << + Firebird::Arg::Gds(isc_dsql_too_many_values) << Firebird::Arg::Num(MAX_MEMBER_LIST)); } if (listNode->items.getCount() == 1) @@ -476,8 +476,8 @@ BoolExprNode* ComparativeBoolNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) if (desc.dsc_dtype != dtype_boolean && desc.dsc_dtype != dtype_unknown && !desc.isNull()) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << - Arg::Gds(isc_invalid_boolean_usage)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << + Firebird::Arg::Gds(isc_invalid_boolean_usage)); } } @@ -668,7 +668,7 @@ void ComparativeBoolNode::pass2Boolean(thread_db* tdbb, CompilerScratch* csb, st if (arg3) { if ((keyNode = nodeAs(arg3)) && keyNode->aggregate) - ERR_post(Arg::Gds(isc_bad_dbkey)); + ERR_post(Firebird::Arg::Gds(isc_bad_dbkey)); dsc descriptor_c; arg1->getDesc(tdbb, csb, &descriptor_c); @@ -683,7 +683,7 @@ void ComparativeBoolNode::pass2Boolean(thread_db* tdbb, CompilerScratch* csb, st if (((keyNode = nodeAs(arg1)) && keyNode->aggregate) || ((keyNode = nodeAs(arg2)) && keyNode->aggregate)) { - ERR_post(Arg::Gds(isc_bad_dbkey)); + ERR_post(Firebird::Arg::Gds(isc_bad_dbkey)); } dsc descriptor_a, descriptor_b; @@ -939,7 +939,7 @@ TriState ComparativeBoolNode::stringBoolean(thread_db* tdbb, Request* request, if (!escapeLen || charset->length(escapeLen, escapeStr, true) != 1) { // If characters left, or null byte character, return error - ERR_post(Arg::Gds(isc_escape_invalid)); + ERR_post(Firebird::Arg::Gds(isc_escape_invalid)); } USHORT escape[2] = {0, 0}; @@ -949,7 +949,7 @@ TriState ComparativeBoolNode::stringBoolean(thread_db* tdbb, Request* request, if (!escape[0]) { // If or null byte character, return error - ERR_post(Arg::Gds(isc_escape_invalid)); + ERR_post(Firebird::Arg::Gds(isc_escape_invalid)); } } } @@ -1474,7 +1474,7 @@ void InListBoolNode::pass2Boolean(thread_db* tdbb, CompilerScratch* csb, std::fu if (const auto keyNode = nodeAs(arg)) { if (keyNode->aggregate) - ERR_post(Arg::Gds(isc_bad_dbkey)); + ERR_post(Firebird::Arg::Gds(isc_bad_dbkey)); } dsc argDesc, listDesc; @@ -1593,8 +1593,8 @@ BoolExprNode* MissingBoolNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) if (dsqlUnknown && desc.dsc_dtype != dtype_boolean && !desc.isNull()) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << - Arg::Gds(isc_invalid_boolean_usage)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << + Firebird::Arg::Gds(isc_invalid_boolean_usage)); } return node; @@ -1627,7 +1627,7 @@ void MissingBoolNode::pass2Boolean(thread_db* tdbb, CompilerScratch* csb, std::f RecordKeyNode* keyNode = nodeAs(arg); if (keyNode && keyNode->aggregate) - ERR_post(Arg::Gds(isc_bad_dbkey)); + ERR_post(Firebird::Arg::Gds(isc_bad_dbkey)); // check for syntax errors in the calculation dsc descriptor_a; @@ -1908,8 +1908,8 @@ BoolExprNode* RseBoolNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) { if (dsqlScratch->flags & DsqlCompilerScratch::FLAG_VIEW_WITH_CHECK) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_subquery_err)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_subquery_err)); } const DsqlContextStack::iterator base(*dsqlScratch->context); diff --git a/src/dsql/DdlNodes.epp b/src/dsql/DdlNodes.epp index f0ba707d85d..7ce63be077e 100644 --- a/src/dsql/DdlNodes.epp +++ b/src/dsql/DdlNodes.epp @@ -267,7 +267,7 @@ static void checkLttNotInUse(thread_db* tdbb, jrd_tra* transaction, const LocalT string obj; obj.printf("TABLE %s", ltt->name.toQuotedString().c_str()); - status_exception::raise(Arg::Gds(isc_no_meta_update) << Arg::Gds(isc_obj_in_use) << obj); + status_exception::raise(Firebird::Arg::Gds(isc_no_meta_update) << Firebird::Arg::Gds(isc_obj_in_use) << obj); } } } @@ -336,7 +336,7 @@ static void checkSpTrigDependency(thread_db* tdbb, jrd_tra* transaction, // msg 206: Column %s from table %s is referenced in %s. status_exception::raise( - Arg::PrivateDyn(206) << + Firebird::Arg::PrivateDyn(206) << fieldName.toQuotedString() << relationName.toQuotedString() << depName.toQuotedString()); @@ -371,7 +371,7 @@ static void checkViewDependency(thread_db* tdbb, jrd_tra* transaction, // msg 206: Column %s from table %s is referenced in %s. status_exception::raise( - Arg::PrivateDyn(206) << + Firebird::Arg::PrivateDyn(206) << fieldName.toQuotedString() << relationName.toQuotedString() << viewName.toQuotedString()); @@ -558,7 +558,7 @@ static void deleteKeyConstraint(thread_db* tdbb, jrd_tra* transaction, if (!found) { // msg 130: "CONSTRAINT %s does not exist." - status_exception::raise(Arg::PrivateDyn(130) << constraintName); + status_exception::raise(Firebird::Arg::PrivateDyn(130) << constraintName); } } @@ -645,7 +645,7 @@ static QualifiedName getIndexRelationName(thread_db* tdbb, jrd_tra* transaction, if (!silent) { // msg 48: "Index not found" - status_exception::raise(Arg::PrivateDyn(48)); + status_exception::raise(Firebird::Arg::PrivateDyn(48)); } return {}; @@ -704,7 +704,7 @@ static void checkRelationType(const rel_t type, const QualifiedName& name) string scope; makeRelationScopeName(scope, name, type); - (Arg::PrivateDyn(289) << scope).raise(); + (Firebird::Arg::PrivateDyn(289) << scope).raise(); } // Check, can a pair of relations be used in FK @@ -718,7 +718,7 @@ static void checkFkPairTypes(const rel_t masterType, const QualifiedName& master makeRelationScopeName(master, masterName, masterType); makeRelationScopeName(child, childName, childType); // Msg 232 : "%s can't reference %s" - status_exception::raise(Arg::PrivateDyn(232) << child << master); + status_exception::raise(Firebird::Arg::PrivateDyn(232) << child << master); } } @@ -780,7 +780,7 @@ static void modifyLocalFieldPosition(thread_db* tdbb, jrd_tra* transaction, { // msg 176: "column %s does not exist in table/view %s" status_exception::raise( - Arg::PrivateDyn(176) << + Firebird::Arg::PrivateDyn(176) << fieldName.toQuotedString() << relationName.toQuotedString()); } @@ -1107,8 +1107,8 @@ void DdlNode::storeGlobalField(thread_db* tdbb, jrd_tra* transaction, QualifiedN if (dims > MAX_ARRAY_DIMENSIONS) { status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-604) << - Arg::Gds(isc_dsql_max_arr_dim_exceeded)); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-604) << + Firebird::Arg::Gds(isc_dsql_max_arr_dim_exceeded)); } if (name.object.isEmpty()) @@ -1181,8 +1181,8 @@ void DdlNode::storeGlobalField(thread_db* tdbb, jrd_tra* transaction, QualifiedN if (lrange >= hrange) { status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-604) << - Arg::Gds(isc_dsql_arr_range_error)); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-604) << + Firebird::Arg::Gds(isc_dsql_arr_range_error)); } STORE (REQUEST_HANDLE requestHandle TRANSACTION_HANDLE transaction) @@ -1290,12 +1290,12 @@ void AlterCharSetNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch END_FOR if (!charSetFound) - status_exception::raise(Arg::Gds(isc_charset_not_found) << charSet.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_charset_not_found) << charSet.toQuotedString()); if (!collationFound) { status_exception::raise( - Arg::Gds(isc_collation_not_found) << defaultCollation.toQuotedString() << charSet.toQuotedString()); + Firebird::Arg::Gds(isc_collation_not_found) << defaultCollation.toQuotedString() << charSet.toQuotedString()); } executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_AFTER, DDL_TRIGGER_ALTER_CHARACTER_SET, charSet, {}); @@ -1308,7 +1308,7 @@ void AlterCharSetNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch void AlterEDSPoolSetNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) { if (!tdbb->getAttachment()->locksmith(tdbb, MODIFY_EXT_CONN_POOL)) - status_exception::raise(Arg::Gds(isc_miss_prvlg) << "MODIFY_EXT_CONN_POOL"); + status_exception::raise(Firebird::Arg::Gds(isc_miss_prvlg) << "MODIFY_EXT_CONN_POOL"); } string AlterEDSPoolSetNode::internalPrint(NodePrinter& printer) const @@ -1336,7 +1336,7 @@ void AlterEDSPoolSetNode::execute(thread_db* tdbb, DsqlCompilerScratch* /*dsqlSc default: status_exception::raise( - Arg::Gds(isc_random) << Arg::Str("Unknown param for ALTER EXTERNAL CONNECTIONS POOL statement")); + Firebird::Arg::Gds(isc_random) << Firebird::Arg::Str("Unknown param for ALTER EXTERNAL CONNECTIONS POOL statement")); } } @@ -1347,7 +1347,7 @@ void AlterEDSPoolSetNode::execute(thread_db* tdbb, DsqlCompilerScratch* /*dsqlSc void AlterEDSPoolClearNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) { if (!tdbb->getAttachment()->locksmith(tdbb, MODIFY_EXT_CONN_POOL)) - status_exception::raise(Arg::Gds(isc_miss_prvlg) << "MODIFY_EXT_CONN_POOL"); + status_exception::raise(Firebird::Arg::Gds(isc_miss_prvlg) << "MODIFY_EXT_CONN_POOL"); } string AlterEDSPoolClearNode::internalPrint(NodePrinter& printer) const @@ -1385,7 +1385,7 @@ void AlterEDSPoolClearNode::execute(thread_db* tdbb, DsqlCompilerScratch* /*dsql default: status_exception::raise( - Arg::Gds(isc_random) << Arg::Str("Unknown param for ALTER EXTERNAL CONNECTIONS POOL statement")); + Firebird::Arg::Gds(isc_random) << Firebird::Arg::Str("Unknown param for ALTER EXTERNAL CONNECTIONS POOL statement")); } } @@ -1457,16 +1457,16 @@ DdlNode* CommentOnNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) objType = obj_procedure; else { - status_exception::raise(Arg::Gds(isc_dyn_routine_param_ambiguous) << - Arg::Str(subName) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_routine_param_ambiguous) << + Firebird::Arg::Str(subName) << name.toQuotedString()); } } END_FOR if (objType == obj_parameter) { - status_exception::raise(Arg::Gds(isc_dyn_routine_param_not_found) << - Arg::Str(subName) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_routine_param_not_found) << + Firebird::Arg::Str(subName) << name.toQuotedString()); } else name = nameCopy; @@ -1500,7 +1500,7 @@ void CommentOnNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) { Attachment* const attachment = transaction->tra_attachment; - Arg::StatusVector status; + Firebird::Arg::StatusVector status; switch (objType) { @@ -1608,7 +1608,7 @@ void CommentOnNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, j const char* subColumnClause = nullptr; const char* addWhereClause = nullptr; bool useSchemaClause = true; - Arg::StatusVector status; + Firebird::Arg::StatusVector status; const string objNameStr = name.toQuotedString(); fb_assert(objType != obj_parameter); @@ -1624,19 +1624,19 @@ void CommentOnNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, j tableClause = "rdb$schemas"; columnClause = "rdb$schema_name"; useSchemaClause = false; - status << Arg::Gds(isc_dyn_schema_not_found) << Arg::Str(objNameStr); + status << Firebird::Arg::Gds(isc_dyn_schema_not_found) << Firebird::Arg::Str(objNameStr); break; case obj_field: tableClause = "rdb$fields"; columnClause = "rdb$field_name"; - status << Arg::Gds(isc_dyn_domain_not_found); + status << Firebird::Arg::Gds(isc_dyn_domain_not_found); break; case obj_relation: if (attachment->att_local_temporary_tables.exist(name)) { - status_exception::raise(Arg::Gds(isc_dsql_ltt_invalid_reference) << + status_exception::raise(Firebird::Arg::Gds(isc_dsql_ltt_invalid_reference) << name.toQuotedString() << "COMMENT ON"); } @@ -1644,14 +1644,14 @@ void CommentOnNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, j { tableClause = "rdb$relation_fields"; subColumnClause = "rdb$field_name"; - status << Arg::Gds(isc_dyn_column_does_not_exist) << - Arg::Str(subName) << Arg::Str(objNameStr); + status << Firebird::Arg::Gds(isc_dyn_column_does_not_exist) << + Firebird::Arg::Str(subName) << Firebird::Arg::Str(objNameStr); } else { tableClause = "rdb$relations"; addWhereClause = "rdb$view_blr is null"; - status << Arg::Gds(isc_dyn_table_not_found) << Arg::Str(objNameStr); + status << Firebird::Arg::Gds(isc_dyn_table_not_found) << Firebird::Arg::Str(objNameStr); } columnClause = "rdb$relation_name"; break; @@ -1659,7 +1659,7 @@ void CommentOnNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, j case obj_view: tableClause = "rdb$relations"; columnClause = "rdb$relation_name"; - status << Arg::Gds(isc_dyn_view_not_found) << Arg::Str(objNameStr); + status << Firebird::Arg::Gds(isc_dyn_view_not_found) << Firebird::Arg::Str(objNameStr); addWhereClause = "rdb$view_blr is not null"; break; @@ -1668,13 +1668,13 @@ void CommentOnNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, j { tableClause = "rdb$procedure_parameters"; subColumnClause = "rdb$parameter_name"; - status << Arg::Gds(isc_dyn_proc_param_not_found) << - Arg::Str(subName) << Arg::Str(objNameStr); + status << Firebird::Arg::Gds(isc_dyn_proc_param_not_found) << + Firebird::Arg::Str(subName) << Firebird::Arg::Str(objNameStr); } else { tableClause = "rdb$procedures"; - status << Arg::Gds(isc_dyn_proc_not_found) << Arg::Str(objNameStr); + status << Firebird::Arg::Gds(isc_dyn_proc_not_found) << Firebird::Arg::Str(objNameStr); } columnClause = "rdb$procedure_name"; @@ -1683,7 +1683,7 @@ void CommentOnNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, j case obj_trigger: tableClause = "rdb$triggers"; columnClause = "rdb$trigger_name"; - status << Arg::Gds(isc_dyn_trig_not_found) << Arg::Str(objNameStr); + status << Firebird::Arg::Gds(isc_dyn_trig_not_found) << Firebird::Arg::Str(objNameStr); break; case obj_udf: @@ -1691,13 +1691,13 @@ void CommentOnNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, j { tableClause = "rdb$function_arguments"; subColumnClause = "rdb$argument_name"; - status << Arg::Gds(isc_dyn_func_param_not_found) << - Arg::Str(subName) << Arg::Str(objNameStr); + status << Firebird::Arg::Gds(isc_dyn_func_param_not_found) << + Firebird::Arg::Str(subName) << Firebird::Arg::Str(objNameStr); } else { tableClause = "rdb$functions"; - status << Arg::Gds(isc_dyn_func_not_found) << Arg::Str(objNameStr); + status << Firebird::Arg::Gds(isc_dyn_func_not_found) << Firebird::Arg::Str(objNameStr); } columnClause = "rdb$function_name"; @@ -1707,50 +1707,50 @@ void CommentOnNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, j tableClause = "rdb$filters"; columnClause = "rdb$function_name"; useSchemaClause = false; - status << Arg::Gds(isc_dyn_filter_not_found) << Arg::Str(objNameStr); + status << Firebird::Arg::Gds(isc_dyn_filter_not_found) << Firebird::Arg::Str(objNameStr); break; case obj_exception: tableClause = "rdb$exceptions"; columnClause = "rdb$exception_name"; - status << Arg::Gds(isc_dyn_exception_not_found) << Arg::Str(objNameStr); + status << Firebird::Arg::Gds(isc_dyn_exception_not_found) << Firebird::Arg::Str(objNameStr); break; case obj_generator: tableClause = "rdb$generators"; columnClause = "rdb$generator_name"; - status << Arg::Gds(isc_dyn_gen_not_found) << Arg::Str(objNameStr); + status << Firebird::Arg::Gds(isc_dyn_gen_not_found) << Firebird::Arg::Str(objNameStr); break; case obj_index: tableClause = "rdb$indices"; columnClause = "rdb$index_name"; - status << Arg::Gds(isc_dyn_index_not_found) << Arg::Str(objNameStr); + status << Firebird::Arg::Gds(isc_dyn_index_not_found) << Firebird::Arg::Str(objNameStr); break; case obj_sql_role: tableClause = "rdb$roles"; columnClause = "rdb$role_name"; useSchemaClause = false; - status << Arg::Gds(isc_dyn_role_not_found) << Arg::Str(objNameStr); + status << Firebird::Arg::Gds(isc_dyn_role_not_found) << Firebird::Arg::Str(objNameStr); break; case obj_charset: tableClause = "rdb$character_sets"; columnClause = "rdb$character_set_name"; - status << Arg::Gds(isc_dyn_charset_not_found) << Arg::Str(objNameStr); + status << Firebird::Arg::Gds(isc_dyn_charset_not_found) << Firebird::Arg::Str(objNameStr); break; case obj_collation: tableClause = "rdb$collations"; columnClause = "rdb$collation_name"; - status << Arg::Gds(isc_dyn_collation_not_found) << Arg::Str(objNameStr); + status << Firebird::Arg::Gds(isc_dyn_collation_not_found) << Firebird::Arg::Str(objNameStr); break; case obj_package_header: tableClause = "rdb$packages"; columnClause = "rdb$package_name"; - status << Arg::Gds(isc_dyn_package_not_found) << Arg::Str(objNameStr); + status << Firebird::Arg::Gds(isc_dyn_package_not_found) << Firebird::Arg::Str(objNameStr); break; default: @@ -1847,9 +1847,9 @@ DdlNode* CreateAlterFunctionNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) else if (hasDefaultParams) { // parameter without default value after parameters with default - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-204) << - Arg::Gds(isc_bad_default_value) << - Arg::Gds(isc_invalid_clause) << Arg::Str("defaults must be last")); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-204) << + Firebird::Arg::Gds(isc_bad_default_value) << + Firebird::Arg::Gds(isc_invalid_clause) << Firebird::Arg::Str("defaults must be last")); } } @@ -1862,8 +1862,8 @@ DdlNode* CreateAlterFunctionNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) // check SQL SECURITY is not set if function declared in package if (name.package.hasData() && ssDefiner.has_value()) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-204) << - Arg::Gds(isc_invalid_clause) << Arg::Str("SQL SECURITY for functions is prohibit in packages")); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-204) << + Firebird::Arg::Gds(isc_invalid_clause) << Firebird::Arg::Str("SQL SECURITY for functions is prohibit in packages")); } return DdlNode::dsqlPass(dsqlScratch); @@ -1896,7 +1896,7 @@ void CreateAlterFunctionNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsql if (executeAlterIndividualParameters(tdbb, dsqlScratch, transaction, false, true)) altered = true; else - status_exception::raise(Arg::Gds(isc_dyn_func_not_found) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_func_not_found) << name.toQuotedString()); } else if (alter) { @@ -1907,7 +1907,7 @@ void CreateAlterFunctionNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsql if (create) // create or alter executeCreate(tdbb, dsqlScratch, transaction); else - status_exception::raise(Arg::Gds(isc_dyn_func_not_found) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_func_not_found) << name.toQuotedString()); } } else if (!executeCreate(tdbb, dsqlScratch, transaction)) @@ -2061,7 +2061,7 @@ bool CreateAlterFunctionNode::executeAlter(thread_db* tdbb, DsqlCompilerScratch* if (FUN.RDB$SYSTEM_FLAG) { status_exception::raise( - Arg::Gds(isc_dyn_cannot_mod_sysfunc) << + Firebird::Arg::Gds(isc_dyn_cannot_mod_sysfunc) << name.toQuotedString()); } @@ -2123,9 +2123,9 @@ bool CreateAlterFunctionNode::executeAlter(thread_db* tdbb, DsqlCompilerScratch* { // Return mode by value not allowed for this data type. status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_return_mode_err)); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_return_mode_err)); } // For functions returning a blob, coerce return argument position to @@ -2139,9 +2139,9 @@ bool CreateAlterFunctionNode::executeAlter(thread_db* tdbb, DsqlCompilerScratch* // External functions can not have more than 10 parameters // Or 9 if the function returns a BLOB. status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_extern_func_err)); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_extern_func_err)); } FUN.RDB$RETURN_ARGUMENT = (SSHORT) returnPos; @@ -2161,9 +2161,9 @@ bool CreateAlterFunctionNode::executeAlter(thread_db* tdbb, DsqlCompilerScratch* // External functions can not have more than 10 parameters // Not strictly correct -- return position error status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << // gds__extern_func_err - Arg::Gds(isc_dsql_udf_return_pos_err) << Arg::Num(parameters.getCount())); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << // gds__extern_func_err + Firebird::Arg::Gds(isc_dsql_udf_return_pos_err) << Firebird::Arg::Num(parameters.getCount())); } // We'll verify that SCALAR_ARRAY can't be used as a return type. @@ -2173,9 +2173,9 @@ bool CreateAlterFunctionNode::executeAlter(thread_db* tdbb, DsqlCompilerScratch* parameters[udfReturnPos - 1]->udfMechanism.value() == FUN_scalar_array) { status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_random) << "BY SCALAR_ARRAY can't be used as a return parameter"); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_random) << "BY SCALAR_ARRAY can't be used as a return parameter"); } FUN.RDB$RETURN_ARGUMENT = (SSHORT) udfReturnPos; @@ -2191,13 +2191,13 @@ bool CreateAlterFunctionNode::executeAlter(thread_db* tdbb, DsqlCompilerScratch* external->engine.copyTo(FUN.RDB$ENGINE_NAME, sizeof(FUN.RDB$ENGINE_NAME)); if (external->udfModule.length() >= sizeof(FUN.RDB$MODULE_NAME)) - status_exception::raise(Arg::Gds(isc_dyn_name_longer)); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_name_longer)); FUN.RDB$MODULE_NAME.NULL = (SSHORT) external->udfModule.isEmpty(); external->udfModule.copyTo(FUN.RDB$MODULE_NAME, sizeof(FUN.RDB$MODULE_NAME)); if (external->name.length() >= sizeof(FUN.RDB$ENTRYPOINT)) - status_exception::raise(Arg::Gds(isc_dyn_name_longer)); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_name_longer)); FUN.RDB$ENTRYPOINT.NULL = (SSHORT) external->name.isEmpty(); external->name.copyTo(FUN.RDB$ENTRYPOINT, sizeof(FUN.RDB$ENTRYPOINT)); @@ -2281,7 +2281,7 @@ bool CreateAlterFunctionNode::executeAlterIndividualParameters(thread_db* tdbb, if (FUN.RDB$SYSTEM_FLAG) { status_exception::raise( - Arg::Gds(isc_dyn_cannot_mod_sysfunc) << + Firebird::Arg::Gds(isc_dyn_cannot_mod_sysfunc) << name.toQuotedString()); } @@ -2453,7 +2453,7 @@ void CreateAlterFunctionNode::storeArgument(thread_db* tdbb, DsqlCompilerScratch if (preserveDefaults) { status_exception::raise( - Arg::Gds(isc_dyn_defvaldecl_package_func) << + Firebird::Arg::Gds(isc_dyn_defvaldecl_package_func) << name.getSchemaAndPackage().toQuotedString() << name.object.toQuotedString()); } @@ -2520,7 +2520,7 @@ void CreateAlterFunctionNode::storeArgument(thread_db* tdbb, DsqlCompilerScratch void CreateAlterFunctionNode::compile(thread_db* /*tdbb*/, DsqlCompilerScratch* dsqlScratch) { if (invalid) - status_exception::raise(Arg::Gds(isc_dyn_invalid_ddl_func) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_invalid_ddl_func) << name.toQuotedString()); if (compiled) return; @@ -2656,10 +2656,10 @@ void AlterExternalFunctionNode::execute(thread_db* tdbb, DsqlCompilerScratch* ds if (clauses.name.isEmpty() && clauses.udfModule.isEmpty()) { status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-104) /*** FIXME: << + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) /*** FIXME: << // Unexpected end of command - Arg::Gds(isc_command_end_err2) << Arg::Num(node->nod_line) << - Arg::Num(node->nod_column + obj_name->str_length)***/); // + strlen("FUNCTION") + Firebird::Arg::Gds(isc_command_end_err2) << Firebird::Arg::Num(node->nod_line) << + Firebird::Arg::Num(node->nod_column + obj_name->str_length)***/); // + strlen("FUNCTION") } // run all statements under savepoint control @@ -2680,7 +2680,7 @@ void AlterExternalFunctionNode::execute(thread_db* tdbb, DsqlCompilerScratch* ds executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_BEFORE, DDL_TRIGGER_ALTER_FUNCTION, name, {}); if (!FUN.RDB$ENGINE_NAME.NULL || !FUN.RDB$FUNCTION_BLR.NULL) - status_exception::raise(Arg::Gds(isc_dyn_newfc_oldsyntax) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_newfc_oldsyntax) << name.toQuotedString()); MetadataCache::oldVersion(tdbb, (id = FUN.RDB$FUNCTION_ID), CacheFlag::OLD_ALTER); @@ -2688,7 +2688,7 @@ void AlterExternalFunctionNode::execute(thread_db* tdbb, DsqlCompilerScratch* ds if (clauses.name.hasData()) { if (clauses.name.length() >= sizeof(FUN.RDB$ENTRYPOINT)) - status_exception::raise(Arg::Gds(isc_dyn_name_longer)); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_name_longer)); FUN.RDB$ENTRYPOINT.NULL = FALSE; strcpy(FUN.RDB$ENTRYPOINT, clauses.name.c_str()); @@ -2697,7 +2697,7 @@ void AlterExternalFunctionNode::execute(thread_db* tdbb, DsqlCompilerScratch* ds if (clauses.udfModule.hasData()) { if (clauses.udfModule.length() >= sizeof(FUN.RDB$MODULE_NAME)) - status_exception::raise(Arg::Gds(isc_dyn_name_longer)); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_name_longer)); FUN.RDB$MODULE_NAME.NULL = FALSE; strcpy(FUN.RDB$MODULE_NAME, clauses.udfModule.c_str()); @@ -2714,7 +2714,7 @@ void AlterExternalFunctionNode::execute(thread_db* tdbb, DsqlCompilerScratch* ds else { // msg 41: "Function %s not found" - status_exception::raise(Arg::PrivateDyn(41) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(41) << name.toQuotedString()); } savePoint.release(); // everything is ok @@ -2816,7 +2816,7 @@ void DropFunctionNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch if (FUN.RDB$SYSTEM_FLAG) { status_exception::raise( - Arg::Gds(isc_dyn_cannot_mod_sysfunc) << + Firebird::Arg::Gds(isc_dyn_cannot_mod_sysfunc) << name.toQuotedString()); } @@ -2833,7 +2833,7 @@ void DropFunctionNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch END_FOR if (!found && !silent) - status_exception::raise(Arg::Gds(isc_dyn_func_not_found) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_func_not_found) << name.toQuotedString()); if (name.package.isEmpty()) { @@ -2921,9 +2921,9 @@ DdlNode* CreateAlterProcedureNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) else if (hasDefaultParams) { // parameter without default value after parameters with default - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-204) << - Arg::Gds(isc_bad_default_value) << - Arg::Gds(isc_invalid_clause) << Arg::Str("defaults must be last")); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-204) << + Firebird::Arg::Gds(isc_bad_default_value) << + Firebird::Arg::Gds(isc_invalid_clause) << Firebird::Arg::Str("defaults must be last")); } } @@ -2936,8 +2936,8 @@ DdlNode* CreateAlterProcedureNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) // check SQL SECURITY is not set if procedure declared in package if (name.package.hasData() && ssDefiner.has_value()) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-204) << - Arg::Gds(isc_invalid_clause) << Arg::Str("SQL SECURITY for procedures is prohibit in packages")); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-204) << + Firebird::Arg::Gds(isc_invalid_clause) << Firebird::Arg::Str("SQL SECURITY for procedures is prohibit in packages")); } return DdlNode::dsqlPass(dsqlScratch); @@ -2970,7 +2970,7 @@ void CreateAlterProcedureNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsq if (executeAlterIndividualParameters(tdbb, dsqlScratch, transaction, false, true)) altered = true; else - status_exception::raise(Arg::Gds(isc_dyn_proc_not_found) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_proc_not_found) << name.toQuotedString()); } else if (alter) { @@ -2981,7 +2981,7 @@ void CreateAlterProcedureNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsq if (create) // create or alter executeCreate(tdbb, dsqlScratch, transaction); else - status_exception::raise(Arg::Gds(isc_dyn_proc_not_found) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_proc_not_found) << name.toQuotedString()); } } else if (!executeCreate(tdbb, dsqlScratch, transaction)) @@ -3127,7 +3127,7 @@ bool CreateAlterProcedureNode::executeAlter(thread_db* tdbb, DsqlCompilerScratch if (P.RDB$SYSTEM_FLAG) { status_exception::raise( - Arg::Gds(isc_dyn_cannot_mod_sysproc) << + Firebird::Arg::Gds(isc_dyn_cannot_mod_sysproc) << name.toQuotedString()); } @@ -3192,7 +3192,7 @@ bool CreateAlterProcedureNode::executeAlter(thread_db* tdbb, DsqlCompilerScratch strcpy(P.RDB$ENGINE_NAME, external->engine.c_str()); if (external->name.length() >= sizeof(P.RDB$ENTRYPOINT)) - status_exception::raise(Arg::Gds(isc_dyn_name_longer)); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_name_longer)); P.RDB$ENTRYPOINT.NULL = (SSHORT) external->name.isEmpty(); strcpy(P.RDB$ENTRYPOINT, external->name.c_str()); @@ -3329,7 +3329,7 @@ bool CreateAlterProcedureNode::executeAlterIndividualParameters(thread_db* tdbb, if (P.RDB$SYSTEM_FLAG) { status_exception::raise( - Arg::Gds(isc_dyn_cannot_mod_sysproc) << + Firebird::Arg::Gds(isc_dyn_cannot_mod_sysproc) << name.toQuotedString()); } @@ -3448,7 +3448,7 @@ void CreateAlterProcedureNode::storeParameter(thread_db* tdbb, DsqlCompilerScrat if (preserveDefaults) { status_exception::raise( - Arg::Gds(isc_dyn_defvaldecl_package_proc) << + Firebird::Arg::Gds(isc_dyn_defvaldecl_package_proc) << name.getSchemaAndPackage().toQuotedString() << name.object.toQuotedString()); } @@ -3491,7 +3491,7 @@ void CreateAlterProcedureNode::storeParameter(thread_db* tdbb, DsqlCompilerScrat void CreateAlterProcedureNode::compile(thread_db* /*tdbb*/, DsqlCompilerScratch* dsqlScratch) { if (invalid) - status_exception::raise(Arg::Gds(isc_dyn_invalid_ddl_proc) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_invalid_ddl_proc) << name.toQuotedString()); if (compiled) return; @@ -3700,7 +3700,7 @@ void DropProcedureNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratc if (PRC.RDB$SYSTEM_FLAG) { status_exception::raise( - Arg::Gds(isc_dyn_cannot_mod_sysproc) << + Firebird::Arg::Gds(isc_dyn_cannot_mod_sysproc) << name.toQuotedString()); } @@ -3717,7 +3717,7 @@ void DropProcedureNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratc END_FOR if (!found && !silent) - status_exception::raise(Arg::Gds(isc_dyn_proc_not_found) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_proc_not_found) << name.toQuotedString()); if (name.package.isEmpty()) { @@ -3800,8 +3800,8 @@ bool TriggerDefinition::modify(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch TRG.RDB$RELATION_NAME.NULL) { status_exception::raise( - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_dsql_db_trigger_type_cant_change)); + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_dsql_db_trigger_type_cant_change)); } if (systemFlag == fb_sysflag_user) @@ -3811,11 +3811,11 @@ bool TriggerDefinition::modify(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch case fb_sysflag_check_constraint: case fb_sysflag_referential_constraint: case fb_sysflag_view_check: - status_exception::raise(Arg::Gds(isc_dyn_cant_modify_auto_trig)); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_cant_modify_auto_trig)); break; case fb_sysflag_system: - status_exception::raise(Arg::Gds(isc_dyn_cannot_mod_systrig) << + status_exception::raise(Firebird::Arg::Gds(isc_dyn_cannot_mod_systrig) << QualifiedName(TRG.RDB$TRIGGER_NAME, TRG.RDB$SCHEMA_NAME).toQuotedString()); break; @@ -3859,7 +3859,7 @@ bool TriggerDefinition::modify(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch strcpy(TRG.RDB$ENGINE_NAME, external->engine.c_str()); if (external->name.length() >= sizeof(TRG.RDB$ENTRYPOINT)) - status_exception::raise(Arg::Gds(isc_dyn_name_longer)); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_name_longer)); TRG.RDB$ENTRYPOINT.NULL = (SSHORT) external->name.isEmpty(); strcpy(TRG.RDB$ENTRYPOINT, external->name.c_str()); @@ -3944,7 +3944,7 @@ DdlNode* CreateAlterTriggerNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) if (name.schema != relationName.schema) { status_exception::raise( - Arg::Gds(isc_dyn_trig_schema_must_match_table) << + Firebird::Arg::Gds(isc_dyn_trig_schema_must_match_table) << name.schema.toQuotedString() << relationName.schema.toQuotedString()); } @@ -3965,13 +3965,13 @@ DdlNode* CreateAlterTriggerNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) (type.value() & (unsigned) TRIGGER_TYPE_MASK) != (unsigned) TRIGGER_TYPE_DDL))) { status_exception::raise( - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_dsql_incompatible_trigger_type)); + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_dsql_incompatible_trigger_type)); } } if (create && ssDefiner.has_value() && ssDefiner.value() == SqlSecurity::SS_DROP) - status_exception::raise(Arg::Gds(isc_dsql_command_err) << Arg::Gds(isc_dsql_invalid_drop_ss_clause)); + status_exception::raise(Firebird::Arg::Gds(isc_dsql_command_err) << Firebird::Arg::Gds(isc_dsql_invalid_drop_ss_clause)); return DdlNode::dsqlPass(dsqlScratch); } @@ -3996,7 +3996,7 @@ void CreateAlterTriggerNode::checkPermission(thread_db* tdbb, jrd_tra* transacti END_FOR if (!type.has_value()) - status_exception::raise(Arg::Gds(isc_dyn_trig_not_found) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_trig_not_found) << name.toQuotedString()); } if (relationName.object.hasData()) @@ -4030,7 +4030,7 @@ void CreateAlterTriggerNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlS if (create) // create or alter executeCreate(tdbb, dsqlScratch, transaction); else - status_exception::raise(Arg::Gds(isc_dyn_trig_not_found) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_trig_not_found) << name.toQuotedString()); } } else @@ -4057,7 +4057,7 @@ void CreateAlterTriggerNode::executeCreate(thread_db* tdbb, DsqlCompilerScratch* void CreateAlterTriggerNode::compile(thread_db* /*tdbb*/, DsqlCompilerScratch* dsqlScratch) { if (invalid) - status_exception::raise(Arg::Gds(isc_dyn_invalid_ddl_trig) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_invalid_ddl_trig) << name.toQuotedString()); if (compiled) return; @@ -4216,11 +4216,11 @@ void DropTriggerNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, case fb_sysflag_check_constraint: case fb_sysflag_referential_constraint: case fb_sysflag_view_check: - status_exception::raise(Arg::Gds(isc_dyn_cant_modify_auto_trig)); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_cant_modify_auto_trig)); break; case fb_sysflag_system: - status_exception::raise(Arg::Gds(isc_dyn_cannot_mod_systrig) << + status_exception::raise(Firebird::Arg::Gds(isc_dyn_cannot_mod_systrig) << name.toQuotedString()); break; @@ -4237,7 +4237,7 @@ void DropTriggerNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, END_FOR if (!found && !silent) - status_exception::raise(Arg::Gds(isc_dyn_trig_not_found) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_trig_not_found) << name.toQuotedString()); requestHandle.reset(tdbb, drq_e_trg_msgs3, DYN_REQUESTS); @@ -4424,7 +4424,7 @@ void CreateCollationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScra { // msg: 223: "Collation @1 not installed for character set @2" status_exception::raise( - Arg::PrivateDyn(223) << info.baseCollationName << info.charsetName[0].toQuotedString()); + Firebird::Arg::PrivateDyn(223) << info.baseCollationName << info.charsetName[0].toQuotedString()); } IntlUtil::SpecificAttributesMap map; @@ -4435,7 +4435,7 @@ void CreateCollationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScra cs, specificAttributes.getCount(), specificAttributes.begin(), &map)) { // msg: 222: "Invalid collation attributes" - status_exception::raise(Arg::PrivateDyn(222)); + status_exception::raise(Firebird::Arg::PrivateDyn(222)); } const string s = IntlUtil::generateSpecificAttributes(cs, map); @@ -4446,7 +4446,7 @@ void CreateCollationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScra newSpecificAttributes)) { // msg: 222: "Invalid collation attributes" - status_exception::raise(Arg::PrivateDyn(222)); + status_exception::raise(Firebird::Arg::PrivateDyn(222)); } memcpy(info.specificAttributes.getBuffer(newSpecificAttributes.length()), @@ -4467,7 +4467,7 @@ void CreateCollationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScra if (!INTL_texttype_validate(tdbb, &info)) { // msg: 222: "Invalid collation attributes" - status_exception::raise(Arg::PrivateDyn(222)); + status_exception::raise(Firebird::Arg::PrivateDyn(222)); } // ASF: User collations are created with the last number available, @@ -4496,7 +4496,7 @@ void CreateCollationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScra END_FOR if (X.RDB$COLLATION_ID.NULL) - status_exception::raise(Arg::Gds(isc_max_coll_per_charset)); + status_exception::raise(Firebird::Arg::Gds(isc_max_coll_per_charset)); } END_STORE @@ -4529,8 +4529,8 @@ DdlNode* CreateCollationNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) if (!resolvedCharSet) { // specified character set not found - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-504) << - Arg::Gds(isc_charset_not_found) << forCharSet.toQuotedString()); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-504) << + Firebird::Arg::Gds(isc_charset_not_found) << forCharSet.toQuotedString()); } forCharSetId = resolvedCharSet->intlsym_charset_id; @@ -4543,8 +4543,8 @@ DdlNode* CreateCollationNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) if (!resolvedCollation) { // Specified collation not found - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-204) << - Arg::Gds(isc_collation_not_found) << fromName.toQuotedString() << forCharSet.toQuotedString()); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-204) << + Firebird::Arg::Gds(isc_collation_not_found) << fromName.toQuotedString() << forCharSet.toQuotedString()); } fromCollationId = resolvedCollation->intlsym_collate_id; @@ -4589,14 +4589,14 @@ void DropCollationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratc executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_BEFORE, DDL_TRIGGER_DROP_COLLATION, name, {}); if (COLL.RDB$SYSTEM_FLAG) - status_exception::raise(Arg::Gds(isc_dyn_cannot_del_syscoll)); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_cannot_del_syscoll)); if (COLL.RDB$COLLATION_ID == 0 || (!CS.RDB$DEFAULT_COLLATE_NAME.NULL && name == QualifiedName(CS.RDB$DEFAULT_COLLATE_NAME, CS.RDB$DEFAULT_COLLATE_SCHEMA_NAME))) { status_exception::raise( - Arg::Gds(isc_dyn_cannot_del_def_coll) << + Firebird::Arg::Gds(isc_dyn_cannot_del_def_coll) << QualifiedName(CS.RDB$CHARACTER_SET_NAME, CS.RDB$SCHEMA_NAME).toQuotedString()); } @@ -4617,7 +4617,7 @@ void DropCollationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratc fb_utils::exact_name_limit(RF.RDB$FIELD_NAME, sizeof(RF.RDB$FIELD_NAME)); status_exception::raise( - Arg::Gds(isc_dyn_coll_used_table) << + Firebird::Arg::Gds(isc_dyn_coll_used_table) << name.toQuotedString() << QualifiedName(RF.RDB$RELATION_NAME, RF.RDB$SCHEMA_NAME).toQuotedString() << RF.RDB$FIELD_NAME); @@ -4638,7 +4638,7 @@ void DropCollationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratc fb_utils::exact_name_limit(PRM.RDB$PARAMETER_NAME, sizeof(PRM.RDB$PARAMETER_NAME)); status_exception::raise( - Arg::Gds(isc_dyn_coll_used_procedure) << + Firebird::Arg::Gds(isc_dyn_coll_used_procedure) << name.toQuotedString() << QualifiedName(PRM.RDB$PROCEDURE_NAME, PRM.RDB$SCHEMA_NAME, (PRM.RDB$PACKAGE_NAME.NULL ? NULL : PRM.RDB$PACKAGE_NAME)).toQuotedString() << @@ -4660,7 +4660,7 @@ void DropCollationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratc fb_utils::exact_name_limit(ARG.RDB$ARGUMENT_NAME, sizeof(ARG.RDB$ARGUMENT_NAME)); status_exception::raise( - Arg::Gds(isc_dyn_coll_used_function) << + Firebird::Arg::Gds(isc_dyn_coll_used_function) << name.toQuotedString() << QualifiedName(ARG.RDB$FUNCTION_NAME, ARG.RDB$SCHEMA_NAME, (ARG.RDB$PACKAGE_NAME.NULL ? NULL : ARG.RDB$PACKAGE_NAME)).toQuotedString() << @@ -4678,7 +4678,7 @@ void DropCollationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratc fb_utils::exact_name_limit(F.RDB$FIELD_NAME, sizeof(F.RDB$FIELD_NAME)); status_exception::raise( - Arg::Gds(isc_dyn_coll_used_domain) << + Firebird::Arg::Gds(isc_dyn_coll_used_domain) << name.toQuotedString() << F.RDB$FIELD_NAME); } @@ -4696,7 +4696,7 @@ void DropCollationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratc if (found) executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_AFTER, DDL_TRIGGER_DROP_COLLATION, name, {}); else if (!silent) - status_exception::raise(Arg::Gds(isc_dyn_collation_not_found) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_collation_not_found) << name.toQuotedString()); savePoint.release(); // everything is ok @@ -4736,8 +4736,8 @@ void CreateDomainNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch if (strncmp(name.object.c_str(), IMPLICIT_DOMAIN_PREFIX, IMPLICIT_DOMAIN_PREFIX_LEN) == 0) { status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-637) << - Arg::Gds(isc_dsql_implicit_domain_name) << name.toQuotedString()); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-637) << + Firebird::Arg::Gds(isc_dsql_implicit_domain_name) << name.toQuotedString()); } const ValueListNode* elements = type->ranges; @@ -4746,7 +4746,7 @@ void CreateDomainNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch if (defaultClause && dims != 0) { // Default value is not allowed for array type in domain %s - status_exception::raise(Arg::PrivateDyn(226) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(226) << name.toQuotedString()); } type->resolve(dsqlScratch); @@ -5228,18 +5228,18 @@ void AlterDomainNode::checkUpdate(const dyn_fld& origFld, const dyn_fld& newFld) { case isc_dyn_dtype_invalid: // Cannot change datatype for column %s.The operation cannot be performed on DATE, BLOB, or ARRAY columns. - status_exception::raise(Arg::Gds(errorCode) << origFld.dyn_fld_name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(errorCode) << origFld.dyn_fld_name.toQuotedString()); break; case isc_dyn_dtype_conv_invalid: // Cannot convert column %s from character to non-character data. - status_exception::raise(Arg::Gds(errorCode) << origFld.dyn_fld_name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(errorCode) << origFld.dyn_fld_name.toQuotedString()); break; case isc_dyn_char_fld_too_small: // msg 208: New size specified for column %s must be at least %d characters. status_exception::raise( - Arg::Gds(errorCode) << origFld.dyn_fld_name.toQuotedString() << Arg::Num(origLen)); + Firebird::Arg::Gds(errorCode) << origFld.dyn_fld_name.toQuotedString() << Firebird::Arg::Num(origLen)); break; case isc_dyn_scale_too_big: @@ -5259,7 +5259,7 @@ void AlterDomainNode::checkUpdate(const dyn_fld& origFld, const dyn_fld& newFld) // scale_too_big: New scale specified for column @1 must be at most @2. // precision_too_small: New precision specified for column @1 must be at least @2. status_exception::raise( - Arg::Gds(code) << origFld.dyn_fld_name.toQuotedString() << Arg::Num(diff)); + Firebird::Arg::Gds(code) << origFld.dyn_fld_name.toQuotedString() << Firebird::Arg::Num(diff)); } break; @@ -5272,13 +5272,13 @@ void AlterDomainNode::checkUpdate(const dyn_fld& origFld, const dyn_fld& newFld) // Cannot change datatype for @1. Conversion from base type @2 to @3 is not supported. status_exception::raise( - Arg::Gds(errorCode) << origFld.dyn_fld_name.toQuotedString() << orig_type << new_type); + Firebird::Arg::Gds(errorCode) << origFld.dyn_fld_name.toQuotedString() << orig_type << new_type); } break; default: // msg 95: "MODIFY RDB$RELATION_FIELDS failed" - status_exception::raise(Arg::PrivateDyn(95)); + status_exception::raise(Firebird::Arg::PrivateDyn(95)); } } @@ -5409,7 +5409,7 @@ void AlterDomainNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, if (FLD.RDB$SYSTEM_FLAG == fb_sysflag_system) { - status_exception::raise(Arg::Gds(isc_dyn_cant_modify_sysobj) << + status_exception::raise(Firebird::Arg::Gds(isc_dyn_cant_modify_sysobj) << "domain" << name.toQuotedString()); } @@ -5431,7 +5431,7 @@ void AlterDomainNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, if (!FLD.RDB$VALIDATION_BLR.NULL) { // msg 160: "Only one constraint allowed for a domain" - status_exception::raise(Arg::PrivateDyn(160)); + status_exception::raise(Firebird::Arg::PrivateDyn(160)); } dsql_fld localField(dsqlScratch->getPool()); @@ -5442,9 +5442,9 @@ void AlterDomainNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, { // Specified domain or source field does not exist status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_dsql_domain_not_found) << name.toQuotedString()); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_dsql_domain_not_found) << name.toQuotedString()); } DsqlDescMaker::fromField(&dsqlScratch->domainValue, &localField); @@ -5480,7 +5480,7 @@ void AlterDomainNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, if (FLD.RDB$DIMENSIONS) { // msg 226: "Default value is not allowed for array type in domain %s" - status_exception::raise(Arg::PrivateDyn(226) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(226) << name.toQuotedString()); } FLD.RDB$DEFAULT_SOURCE.NULL = FALSE; @@ -5528,7 +5528,7 @@ void AlterDomainNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, RELCON.RDB$CONSTRAINT_TYPE EQ PRIMARY_KEY { status_exception::raise( - Arg::Gds(isc_domain_primary_key_notnull) << + Firebird::Arg::Gds(isc_domain_primary_key_notnull) << QualifiedName(RFL.RDB$RELATION_NAME, RFL.RDB$SCHEMA_NAME).toQuotedString()); } END_FOR @@ -5603,7 +5603,7 @@ void AlterDomainNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, { // Domain @1 must be of exact number type with zero scale because it's used // in an identity column. - status_exception::raise(Arg::PrivateDyn(276) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(276) << name.toQuotedString()); } END_FOR } @@ -5643,8 +5643,8 @@ void AlterDomainNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, if (strncmp(renameTo.c_str(), IMPLICIT_DOMAIN_PREFIX, IMPLICIT_DOMAIN_PREFIX_LEN) == 0) { status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-637) << - Arg::Gds(isc_dsql_implicit_domain_name) << renameTo); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-637) << + Firebird::Arg::Gds(isc_dsql_implicit_domain_name) << renameTo); } rename(tdbb, transaction, (FLD.RDB$DIMENSIONS.NULL ? 0 : FLD.RDB$DIMENSIONS)); @@ -5657,7 +5657,7 @@ void AlterDomainNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, if (!found) { // msg 89: "Global field not found" - status_exception::raise(Arg::PrivateDyn(89)); + status_exception::raise(Firebird::Arg::PrivateDyn(89)); } executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_AFTER, DDL_TRIGGER_ALTER_DOMAIN, @@ -5679,7 +5679,7 @@ void AlterDomainNode::rename(thread_db* tdbb, jrd_tra* transaction, SSHORT dimen FLD.RDB$FIELD_NAME EQ renameTo.c_str() { // msg 204: Cannot rename domain %s to %s. A domain with that name already exists. - status_exception::raise(Arg::PrivateDyn(204) << name.toQuotedString() << renameTo); + status_exception::raise(Firebird::Arg::PrivateDyn(204) << name.toQuotedString() << renameTo); } END_FOR @@ -5789,7 +5789,7 @@ void DropDomainNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, else if (!silent) { // msg 89: "Domain not found" - status_exception::raise(Arg::PrivateDyn(89)); + status_exception::raise(Firebird::Arg::PrivateDyn(89)); } savePoint.release(); // everything is ok @@ -5808,7 +5808,7 @@ void DropDomainNode::check(thread_db* tdbb, jrd_tra* transaction) // msg 43: "Domain %s is used in table %s (local name %s) and can not be dropped" status_exception::raise( - Arg::PrivateDyn(43) << name.toQuotedString() << + Firebird::Arg::PrivateDyn(43) << name.toQuotedString() << QualifiedName(Y.RDB$RELATION_NAME, Y.RDB$SCHEMA_NAME).toQuotedString() << MetaName(Y.RDB$FIELD_NAME).toQuotedString()); } @@ -5825,7 +5825,7 @@ void DropDomainNode::check(thread_db* tdbb, jrd_tra* transaction) // msg 239: "Domain %s is used in procedure %s (parameter name %s) and cannot be dropped" status_exception::raise( - Arg::PrivateDyn(239) << name.toQuotedString() << + Firebird::Arg::PrivateDyn(239) << name.toQuotedString() << QualifiedName(X.RDB$PROCEDURE_NAME, X.RDB$SCHEMA_NAME, X.RDB$PACKAGE_NAME).toQuotedString() << MetaName(X.RDB$PARAMETER_NAME).toQuotedString()); } @@ -5842,7 +5842,7 @@ void DropDomainNode::check(thread_db* tdbb, jrd_tra* transaction) // msg 239: "Domain %s is used in function %s (parameter name %s) and cannot be dropped" status_exception::raise( - Arg::Gds(isc_dyn_domain_used_function) << name.toQuotedString() << + Firebird::Arg::Gds(isc_dyn_domain_used_function) << name.toQuotedString() << QualifiedName(X.RDB$FUNCTION_NAME, X.RDB$SCHEMA_NAME, X.RDB$PACKAGE_NAME).toQuotedString() << MetaName(X.RDB$ARGUMENT_NAME).toQuotedString()); } @@ -5881,7 +5881,7 @@ void CreateAlterExceptionNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsq fb_assert(create || alter); if (message.length() > XCP_MESSAGE_LENGTH) - status_exception::raise(Arg::Gds(isc_dyn_name_longer)); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_name_longer)); // run all statements under savepoint control AutoSavePoint savePoint(tdbb, transaction); @@ -5895,7 +5895,7 @@ void CreateAlterExceptionNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsq else { // msg 144: "Exception not found" - status_exception::raise(Arg::PrivateDyn(144)); + status_exception::raise(Firebird::Arg::PrivateDyn(144)); } } } @@ -6042,7 +6042,7 @@ void DropExceptionNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratc else if (!silent) { // msg 144: "Exception not found" - status_exception::raise(Arg::PrivateDyn(144)); + status_exception::raise(Firebird::Arg::PrivateDyn(144)); } savePoint.release(); // everything is ok @@ -6095,7 +6095,7 @@ void CreateAlterSequenceNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsql else { // msg 214: "Sequence not found" - status_exception::raise(Arg::PrivateDyn(214) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(214) << name.toQuotedString()); } } } @@ -6147,7 +6147,7 @@ void CreateAlterSequenceNode::executeCreate(thread_db* tdbb, DsqlCompilerScratch { initialStep = step.value(); if (initialStep == 0) - status_exception::raise(Arg::Gds(isc_dyn_cant_use_zero_increment) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_cant_use_zero_increment) << name.toQuotedString()); } store(tdbb, transaction, name, fb_sysflag_user, val, initialStep); @@ -6174,7 +6174,7 @@ bool CreateAlterSequenceNode::executeAlter(thread_db* tdbb, DsqlCompilerScratch* return false; if (forbidden && !tdbb->getAttachment()->isRWGbak()) - status_exception::raise(Arg::Gds(isc_dyn_cant_modify_sysobj) << "generator" << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_cant_modify_sysobj) << "generator" << name.toQuotedString()); executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_BEFORE, DDL_TRIGGER_ALTER_SEQUENCE, name, {}); @@ -6184,7 +6184,7 @@ bool CreateAlterSequenceNode::executeAlter(thread_db* tdbb, DsqlCompilerScratch* { const SLONG newStep = step.value(); if (newStep == 0) - status_exception::raise(Arg::Gds(isc_dyn_cant_use_zero_increment) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_cant_use_zero_increment) << name.toQuotedString()); // Perhaps it's better to move this to DFW? if (newStep != oldStep) @@ -6226,7 +6226,7 @@ bool CreateAlterSequenceNode::executeAlter(thread_db* tdbb, DsqlCompilerScratch* { const SLONG newStep = step.value(); if (newStep == 0) - status_exception::raise(Arg::Gds(isc_dyn_cant_use_zero_increment) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_cant_use_zero_increment) << name.toQuotedString()); if (newStep != X.RDB$GENERATOR_INCREMENT) { @@ -6257,7 +6257,7 @@ bool CreateAlterSequenceNode::executeAlter(thread_db* tdbb, DsqlCompilerScratch* END_FOR if (forbidden) - status_exception::raise(Arg::Gds(isc_dyn_cant_modify_sysobj) << "generator" << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_cant_modify_sysobj) << "generator" << name.toQuotedString()); return found; } @@ -6362,7 +6362,7 @@ void DropSequenceNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch if (GEN.RDB$SYSTEM_FLAG != 0) { // msg 272: "Cannot delete system generator @1" - status_exception::raise(Arg::PrivateDyn(272) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(272) << name.toQuotedString()); } executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_BEFORE, DDL_TRIGGER_DROP_SEQUENCE, name, {}); @@ -6381,7 +6381,7 @@ void DropSequenceNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch if (found) executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_AFTER, DDL_TRIGGER_DROP_SEQUENCE, name, {}); else if (!silent) - status_exception::raise(Arg::Gds(isc_gennotdef) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_gennotdef) << name.toQuotedString()); savePoint.release(); // everything is ok } @@ -6530,9 +6530,9 @@ MetaId RelationNode::generateRelId(thread_db* tdbb, MetaName name) END_FOR // !!!!!! printf("\n"); fflush(stdout); - ERR_post(Arg::Gds(isc_no_meta_update) << - Arg::Gds(isc_table_name) << Arg::Str(name) << - Arg::Gds(isc_imp_exc)); + ERR_post(Firebird::Arg::Gds(isc_no_meta_update) << + Firebird::Arg::Gds(isc_table_name) << Firebird::Arg::Str(name) << + Firebird::Arg::Gds(isc_imp_exc)); } // Calculate the dbkey length to include each of the base relations. @@ -6863,7 +6863,7 @@ bool RelationNode::deleteLocalField(thread_db* tdbb, jrd_tra* transaction, // msg 52: "field %s from relation %s is referenced in view %s" status_exception::raise( - Arg::PrivateDyn(52) << + Firebird::Arg::PrivateDyn(52) << fieldName.toQuotedString() << relationName.toQuotedString() << QualifiedName(Y.RDB$RELATION_NAME, Y.RDB$SCHEMA_NAME).toQuotedString()); @@ -6900,7 +6900,7 @@ bool RelationNode::deleteLocalField(thread_db* tdbb, jrd_tra* transaction, { // msg 187: "field %s from relation %s is referenced in index %s" status_exception::raise( - Arg::PrivateDyn(187) << + Firebird::Arg::PrivateDyn(187) << fieldName.toQuotedString() << relationName.toQuotedString() << MetaName(IDX.RDB$INDEX_NAME).toQuotedString()); @@ -6935,7 +6935,7 @@ bool RelationNode::deleteLocalField(thread_db* tdbb, jrd_tra* transaction, // msg 187: "field %s from relation %s is referenced in index %s" status_exception::raise( - Arg::PrivateDyn(187) << + Firebird::Arg::PrivateDyn(187) << fieldName.toQuotedString() << relationName.toQuotedString() << MetaName(IDX.RDB$INDEX_NAME).toQuotedString()); @@ -6996,7 +6996,7 @@ bool RelationNode::deleteLocalField(thread_db* tdbb, jrd_tra* transaction, { // msg 176: "column %s does not exist in table/view %s" status_exception::raise( - Arg::PrivateDyn(176) << + Firebird::Arg::PrivateDyn(176) << fieldName.toQuotedString() << relationName.toQuotedString()); } @@ -7011,25 +7011,25 @@ void RelationNode::validateLttColumnClause(const AddColumnClause* addColumnClaus if (addColumnClause->defaultValue) { status_exception::raise( - Arg::Gds(isc_random) << "DEFAULT is not allowed for LOCAL TEMPORARY TABLE columns"); + Firebird::Arg::Gds(isc_random) << "DEFAULT is not allowed for LOCAL TEMPORARY TABLE columns"); } if (addColumnClause->computed) { status_exception::raise( - Arg::Gds(isc_random) << "COMPUTED BY is not allowed for LOCAL TEMPORARY TABLE columns"); + Firebird::Arg::Gds(isc_random) << "COMPUTED BY is not allowed for LOCAL TEMPORARY TABLE columns"); } if (addColumnClause->identityOptions) { status_exception::raise( - Arg::Gds(isc_random) << "IDENTITY columns are not allowed for LOCAL TEMPORARY TABLEs"); + Firebird::Arg::Gds(isc_random) << "IDENTITY columns are not allowed for LOCAL TEMPORARY TABLEs"); } if (addColumnClause->field->dimensions != 0) { status_exception::raise( - Arg::Gds(isc_random) << "Array type columns are not allowed for LOCAL TEMPORARY TABLEs"); + Firebird::Arg::Gds(isc_random) << "Array type columns are not allowed for LOCAL TEMPORARY TABLEs"); } // Only unnamed NOT NULL constraints are supported on LTT columns @@ -7046,9 +7046,9 @@ void RelationNode::validateLttColumnClause(const AddColumnClause* addColumnClaus if (hasInvalidConstraint) { status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_random) << + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_random) << "Only NOT NULL constraints without names are supported on LOCAL TEMPORARY TABLEs"); } } @@ -7090,9 +7090,9 @@ void RelationNode::defineField(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch { // Specified domain or source field does not exist status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_dsql_domain_not_found) << field->typeOfName.toQuotedString()); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_dsql_domain_not_found) << field->typeOfName.toQuotedString()); } fieldDefinition.fieldSource = field->typeOfName; @@ -7168,9 +7168,9 @@ void RelationNode::defineField(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch const char* typeName = (field->dtype == dtype_blob ? "BLOB" : "ARRAY"); status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_dsql_type_not_supp_ext_tab) << typeName << + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_dsql_type_not_supp_ext_tab) << typeName << name.toQuotedString() << field->fld_name.toQuotedString()); } @@ -7178,8 +7178,8 @@ void RelationNode::defineField(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch { if (clause->identityOptions->increment.value_or(1) == 0) { - status_exception::raise(Arg::Gds(isc_dyn_cant_use_zero_inc_ident) << - Arg::Str(field->fld_name) << + status_exception::raise(Firebird::Arg::Gds(isc_dyn_cant_use_zero_inc_ident) << + Firebird::Arg::Str(field->fld_name) << name.toQuotedString()); } @@ -7189,7 +7189,7 @@ void RelationNode::defineField(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch if (!desc.isExact() || desc.dsc_scale != 0) { // Identity column @1 of table @2 must be exact numeric with zero scale. - status_exception::raise(Arg::PrivateDyn(273) << + status_exception::raise(Firebird::Arg::PrivateDyn(273) << field->fld_name.toQuotedString() << name.toQuotedString()); } @@ -7213,9 +7213,9 @@ void RelationNode::defineField(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch notNullFlag) { status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-204) << - Arg::Gds(isc_bad_default_value) << - Arg::Gds(isc_invalid_clause) << "default null not null"); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-204) << + Firebird::Arg::Gds(isc_bad_default_value) << + Firebird::Arg::Gds(isc_invalid_clause) << "default null not null"); } } @@ -7320,7 +7320,7 @@ void RelationNode::makeConstraint(thread_db* tdbb, DsqlCompilerScratch* dsqlScra if (attachment->att_local_temporary_tables.exist(clause->refRelation)) { status_exception::raise( - Arg::Gds(isc_dsql_ltt_invalid_reference) << clause->refRelation.toQuotedString() << "FOREIGN KEY"); + Firebird::Arg::Gds(isc_dsql_ltt_invalid_reference) << clause->refRelation.toQuotedString() << "FOREIGN KEY"); } CreateDropConstraint& constraint = constraints.add(); @@ -7347,9 +7347,9 @@ void RelationNode::makeConstraint(thread_db* tdbb, DsqlCompilerScratch* dsqlScra // KEY on referenced table status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_reftable_requires_pk)); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_reftable_requires_pk)); } else { @@ -7364,9 +7364,9 @@ void RelationNode::makeConstraint(thread_db* tdbb, DsqlCompilerScratch* dsqlScra { // Foreign key field count does not match primary key. status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_key_field_count_err)); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_key_field_count_err)); } // Define the foreign key index and the triggers that may be needed @@ -7595,7 +7595,7 @@ void RelationNode::defineConstraint(thread_db* tdbb, DsqlCompilerScratch* dsqlSc { // msg 123: "Field: %s not defined as NOT NULL - can't be used in PRIMARY KEY // constraint definition" - status_exception::raise(Arg::PrivateDyn(123) << + status_exception::raise(Firebird::Arg::PrivateDyn(123) << QualifiedName(RFR.RDB$FIELD_NAME, RFR.RDB$SCHEMA_NAME).toQuotedString()); } @@ -7618,7 +7618,7 @@ void RelationNode::defineConstraint(thread_db* tdbb, DsqlCompilerScratch* dsqlSc if (uniqueCount != allCount) { // msg 124: "A column name is repeated in the definition of constraint: %s" - status_exception::raise(Arg::PrivateDyn(124) << constraintName); + status_exception::raise(Firebird::Arg::PrivateDyn(124) << constraintName); } if (constraint.type == Constraint::TYPE_FK) @@ -7705,7 +7705,7 @@ void RelationNode::defineConstraint(thread_db* tdbb, DsqlCompilerScratch* dsqlSc { // msg 126: "Same set of columns cannot be used in more than one PRIMARY KEY // and/or UNIQUE constraint definition" - status_exception::raise(Arg::PrivateDyn(126)); + status_exception::raise(Firebird::Arg::PrivateDyn(126)); } } } @@ -8463,8 +8463,8 @@ void RelationNode::makeVersion(thread_db* tdbb, jrd_tra* transaction, const Qual if (null_view && REL.RDB$FORMAT.NULL) DPM_delete_relation(tdbb, getPermanent(relation)); - ERR_post(Arg::Gds(isc_no_meta_update) << - Arg::Gds(isc_random) << relName.toQuotedString()); + ERR_post(Firebird::Arg::Gds(isc_no_meta_update) << + Firebird::Arg::Gds(isc_random) << relName.toQuotedString()); } // Make sure the text type specified is implemented @@ -8473,8 +8473,8 @@ void RelationNode::makeVersion(thread_db* tdbb, jrd_tra* transaction, const Qual if (null_view && REL.RDB$FORMAT.NULL) DPM_delete_relation(tdbb, getPermanent(relation)); - ERR_post_nothrow(Arg::Gds(isc_no_meta_update) << - Arg::Gds(isc_random) << relName.toQuotedString()); + ERR_post_nothrow(Firebird::Arg::Gds(isc_no_meta_update) << + Firebird::Arg::Gds(isc_random) << relName.toQuotedString()); INTL_texttype_lookup(tdbb, tfb->tfb_desc.getTextType()); // should punt ERR_punt(); // if INTL_texttype_lookup hasn't punt } @@ -8601,9 +8601,9 @@ void RelationNode::makeVersion(thread_db* tdbb, jrd_tra* transaction, const Qual if (REL.RDB$FORMAT.NULL) DPM_delete_relation(tdbb, getPermanent(relation)); - ERR_post(Arg::Gds(isc_no_meta_update) << - Arg::Gds(isc_table_name) << relName.toQuotedString() << - Arg::Gds(isc_must_have_phys_field)); + ERR_post(Firebird::Arg::Gds(isc_no_meta_update) << + Firebird::Arg::Gds(isc_table_name) << relName.toQuotedString() << + Firebird::Arg::Gds(isc_must_have_phys_field)); } blob = setupTriggers(tdbb, relation, null_view, triggers, blob); @@ -8804,9 +8804,9 @@ void RelationNode::setupTriggerDetails(thread_db* tdbb, jrd_rel* relation, blb* void RelationNode::raiseTooManyVersionsError(const int obj_type, const QualifiedName& obj_name) { - ERR_post(Arg::Gds(isc_no_meta_update) << - Arg::Gds(getErrorCodeByObjectType(obj_type)) << obj_name.toQuotedString() << - Arg::Gds(isc_version_err)); + ERR_post(Firebird::Arg::Gds(isc_no_meta_update) << + Firebird::Arg::Gds(getErrorCodeByObjectType(obj_type)) << obj_name.toQuotedString() << + Firebird::Arg::Gds(isc_version_err)); } @@ -9086,9 +9086,9 @@ Format* RelationNode::makeFormat(thread_db* tdbb, jrd_tra* transaction, Cached:: if (offset > MAX_RECORD_SIZE) { delete format; - ERR_post(Arg::Gds(isc_no_meta_update) << - Arg::Gds(isc_rec_size_err) << Arg::Num(offset) << - Arg::Gds(isc_table_name) << relation->getName().toQuotedString()); + ERR_post(Firebird::Arg::Gds(isc_no_meta_update) << + Firebird::Arg::Gds(isc_rec_size_err) << Firebird::Arg::Num(offset) << + Firebird::Arg::Gds(isc_table_name) << relation->getName().toQuotedString()); // Msg361: new record size of %ld bytes is too big } @@ -9283,10 +9283,10 @@ void CreateRelationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScrat if (externalFile) { if (externalFile->length() >= sizeof(REL.RDB$EXTERNAL_FILE)) - status_exception::raise(Arg::Gds(isc_dyn_name_longer)); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_name_longer)); if (ISC_check_if_remote(externalFile->c_str(), false)) - status_exception::raise(Arg::PrivateDyn(163)); + status_exception::raise(Firebird::Arg::PrivateDyn(163)); REL.RDB$EXTERNAL_FILE.NULL = FALSE; strcpy(REL.RDB$EXTERNAL_FILE, externalFile->c_str()); @@ -9440,12 +9440,12 @@ void CreateRelationNode::defineLocalTempTable(thread_db* tdbb, DsqlCompilerScrat if (createIfNotExistsOnly) return; - status_exception::raise(Arg::PrivateDyn(132) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(132) << name.toQuotedString()); } // Prevent external file for local temporary tables if (externalFile) - status_exception::raise(Arg::Gds(isc_random) << "External file is not allowed for local temporary tables"); + status_exception::raise(Firebird::Arg::Gds(isc_random) << "External file is not allowed for local temporary tables"); const auto ltt = FB_NEW_POOL(attPool) LocalTemporaryTable(attPool, name); ltt->relationType = tempRowsFlag.value_or(REL_temp_tran) == REL_temp_tran ? rel_temp_delete : rel_temp_preserve; @@ -9467,7 +9467,7 @@ void CreateRelationNode::defineLocalTempTable(thread_db* tdbb, DsqlCompilerScrat { // msg 323: "Column @1 already exists in table @2" status_exception::raise( - Arg::PrivateDyn(323) << + Firebird::Arg::PrivateDyn(323) << field->fld_name.toQuotedString() << name.toQuotedString()); } @@ -9506,9 +9506,9 @@ void CreateRelationNode::defineLocalTempTable(thread_db* tdbb, DsqlCompilerScrat else if (clause->type == Clause::TYPE_ADD_CONSTRAINT) { status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_random) << + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_random) << "Only NOT NULL constraints without names are supported on local temporary tables"); } } @@ -9538,9 +9538,9 @@ void CreateRelationNode::defineLocalTempTable(thread_db* tdbb, DsqlCompilerScrat if (attachment->att_next_ltt_id.value() == initialLttIdProbe) { - ERR_post(Arg::Gds(isc_imp_exc) << - Arg::Gds(isc_random) << - Arg::Str("Too many local temporary tables exist already")); + ERR_post(Firebird::Arg::Gds(isc_imp_exc) << + Firebird::Arg::Gds(isc_random) << + Firebird::Arg::Str("Too many local temporary tables exist already")); } } @@ -9590,9 +9590,9 @@ void AlterRelationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratc if (!relation || (relation->rel_flags & REL_view)) { status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_dsql_table_not_found) << name.toQuotedString()); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_dsql_table_not_found) << name.toQuotedString()); } if (!dsqlScratch->relation) @@ -9604,10 +9604,10 @@ void AlterRelationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratc ***/ status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-204) << - Arg::Gds(isc_dsql_relation_err) << - Arg::Gds(isc_random) << name.toQuotedString() /***<< - Arg::Gds(isc_random) << linecol***/); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-204) << + Firebird::Arg::Gds(isc_dsql_relation_err) << + Firebird::Arg::Gds(isc_random) << name.toQuotedString() /***<< + Firebird::Arg::Gds(isc_random) << linecol***/); } // Handle Local Temporary Tables differently @@ -9712,7 +9712,7 @@ void AlterRelationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratc // msg 205: Cannot rename field %s to %s. A field with that name // already exists in table %s. status_exception::raise( - Arg::PrivateDyn(205) << clause->fromName << clause->toName << name.toQuotedString()); + Firebird::Arg::PrivateDyn(205) << clause->fromName << clause->toName << name.toQuotedString()); } END_MODIFY } @@ -9721,7 +9721,7 @@ void AlterRelationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratc if (!found) { // msg 176: "column %s does not exist in table/view %s" - status_exception::raise(Arg::PrivateDyn(176) << clause->fromName << name.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(176) << clause->fromName << name.toQuotedString()); } AutoRequest request2; @@ -9767,7 +9767,7 @@ void AlterRelationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratc if (!clause->notNullFlag && !RFL.RDB$GENERATOR_NAME.NULL) { // msg 274: Identity column @1 of table @2 cannot be changed to NULLable - status_exception::raise(Arg::PrivateDyn(274) << clause->name << name.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(274) << clause->name << name.toQuotedString()); } if (clause->notNullFlag) @@ -9812,7 +9812,7 @@ void AlterRelationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratc if (!found) { // msg 176: "column %s does not exist in table/view %s" - status_exception::raise(Arg::PrivateDyn(176) << clause->name << name.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(176) << clause->name << name.toQuotedString()); } break; @@ -9848,9 +9848,9 @@ void AlterRelationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratc { // Unsupported DSQL construct status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-901) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_dsql_construct_err)); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-901) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_dsql_construct_err)); } deleteLocalField(tdbb, transaction, name, clause->name, clause->silent, executeBeforeTrigger); @@ -10007,7 +10007,7 @@ void AlterRelationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratc if (!found) { // msg 130: "CONSTRAINT %s does not exist." - status_exception::raise(Arg::PrivateDyn(130) << constraint->name); + status_exception::raise(Firebird::Arg::PrivateDyn(130) << constraint->name); } } } @@ -10114,7 +10114,7 @@ void AlterRelationNode::modifyField(thread_db* tdbb, DsqlCompilerScratch* dsqlSc if (!isView && (!FLD.RDB$COMPUTED_BLR.NULL != (clause->computed != NULL))) { // Cannot add or remove COMPUTED from column @1 - status_exception::raise(Arg::PrivateDyn(249) << field->fld_name); + status_exception::raise(Firebird::Arg::PrivateDyn(249) << field->fld_name); } dyn_fld origDom; @@ -10157,7 +10157,7 @@ void AlterRelationNode::modifyField(thread_db* tdbb, DsqlCompilerScratch* dsqlSc if (!RFR.RDB$GENERATOR_NAME.NULL) { // msg 275: Identity column @1 of table @2 cannot have default value - status_exception::raise(Arg::PrivateDyn(275) << + status_exception::raise(Firebird::Arg::PrivateDyn(275) << field->fld_name.toQuotedString() << name.toQuotedString()); } @@ -10165,13 +10165,13 @@ void AlterRelationNode::modifyField(thread_db* tdbb, DsqlCompilerScratch* dsqlSc if (hasDimensions) { // msg 225: "Default value is not allowed for array type in field %s" - status_exception::raise(Arg::PrivateDyn(225) << field->fld_name); + status_exception::raise(Firebird::Arg::PrivateDyn(225) << field->fld_name); } if (clause->computed) { // msg 233: "Local column %s is computed, cannot set a default value" - status_exception::raise(Arg::PrivateDyn(233) << field->fld_name); + status_exception::raise(Firebird::Arg::PrivateDyn(233) << field->fld_name); } string defaultSource; @@ -10197,13 +10197,13 @@ void AlterRelationNode::modifyField(thread_db* tdbb, DsqlCompilerScratch* dsqlSc if (FLD.RDB$DEFAULT_VALUE.NULL) { // msg 229: "Local column %s doesn't have a default" - status_exception::raise(Arg::PrivateDyn(229) << field->fld_name); + status_exception::raise(Firebird::Arg::PrivateDyn(229) << field->fld_name); } else { // msg 230: "Local column %s default belongs to domain %s" status_exception::raise( - Arg::PrivateDyn(230) << + Firebird::Arg::PrivateDyn(230) << field->fld_name.toQuotedString() << QualifiedName(FLD.RDB$FIELD_NAME, FLD.RDB$SCHEMA_NAME).toQuotedString()); } @@ -10220,7 +10220,7 @@ void AlterRelationNode::modifyField(thread_db* tdbb, DsqlCompilerScratch* dsqlSc if (RFR.RDB$GENERATOR_NAME.NULL) { // msg 285: "Column @1 is not an identity column" - status_exception::raise(Arg::PrivateDyn(285) << field->fld_name); + status_exception::raise(Firebird::Arg::PrivateDyn(285) << field->fld_name); } DropSequenceNode::deleteIdentity(tdbb, transaction, @@ -10265,8 +10265,8 @@ void AlterRelationNode::modifyField(thread_db* tdbb, DsqlCompilerScratch* dsqlSc { if (clause->identityOptions->increment.value() == 0) { - status_exception::raise(Arg::Gds(isc_dyn_cant_use_zero_inc_ident) << - Arg::Str(field->fld_name) << + status_exception::raise(Firebird::Arg::Gds(isc_dyn_cant_use_zero_inc_ident) << + Firebird::Arg::Str(field->fld_name) << name.toQuotedString()); } @@ -10286,7 +10286,7 @@ void AlterRelationNode::modifyField(thread_db* tdbb, DsqlCompilerScratch* dsqlSc if (!found) { // msg 285: "Column @1 is not an identity column" - status_exception::raise(Arg::PrivateDyn(285) << field->fld_name); + status_exception::raise(Firebird::Arg::PrivateDyn(285) << field->fld_name); } } else @@ -10307,7 +10307,7 @@ void AlterRelationNode::modifyField(thread_db* tdbb, DsqlCompilerScratch* dsqlSc { // msg 224: "Cannot use the internal domain %s as new type for field %s". status_exception::raise( - Arg::PrivateDyn(224) << newDomainName.toQuotedString() << field->fld_name); + Firebird::Arg::PrivateDyn(224) << newDomainName.toQuotedString() << field->fld_name); } // Get the domain information. @@ -10315,9 +10315,9 @@ void AlterRelationNode::modifyField(thread_db* tdbb, DsqlCompilerScratch* dsqlSc { // Specified domain or source field does not exist. status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_dsql_domain_not_found) << newDomainName.toQuotedString()); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_dsql_domain_not_found) << newDomainName.toQuotedString()); } QualifiedName dummyCollationName; @@ -10406,7 +10406,7 @@ void AlterRelationNode::modifyField(thread_db* tdbb, DsqlCompilerScratch* dsqlSc if (!newDom.dyn_dsc.isExact() || newDom.dyn_dsc.dsc_scale != 0) { // Identity column @1 of table @2 must be exact numeric with zero scale. - status_exception::raise(Arg::PrivateDyn(273) << + status_exception::raise(Firebird::Arg::PrivateDyn(273) << field->fld_name.toQuotedString() << name.toQuotedString()); } @@ -10509,7 +10509,7 @@ void AlterRelationNode::modifyField(thread_db* tdbb, DsqlCompilerScratch* dsqlSc if (!found) { // msg 176: "column %s does not exist in table/view %s" - status_exception::raise(Arg::PrivateDyn(176) << + status_exception::raise(Firebird::Arg::PrivateDyn(176) << field->fld_name.toQuotedString() << name.toQuotedString()); } @@ -10542,9 +10542,9 @@ void AlterRelationNode::alterLocalTempTable(thread_db* tdbb, DsqlCompilerScratch if (!lttPtr) { status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_dsql_table_not_found) << name.toQuotedString()); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_dsql_table_not_found) << name.toQuotedString()); } const auto ltt = *lttPtr; @@ -10579,7 +10579,7 @@ void AlterRelationNode::alterLocalTempTable(thread_db* tdbb, DsqlCompilerScratch { // msg 323: "Column @1 already exists in table @2" status_exception::raise( - Arg::PrivateDyn(323) << + Firebird::Arg::PrivateDyn(323) << field->fld_name.toQuotedString() << name.toQuotedString()); } @@ -10633,8 +10633,8 @@ void AlterRelationNode::alterLocalTempTable(thread_db* tdbb, DsqlCompilerScratch if (ltt->pendingFields.getCount() == 1) { // Msg354: last column in a table cannot be deleted - status_exception::raise(Arg::Gds(isc_no_meta_update) << - Arg::Gds(isc_del_last_field)); + status_exception::raise(Firebird::Arg::Gds(isc_no_meta_update) << + Firebird::Arg::Gds(isc_del_last_field)); } ltt->pendingFields.remove(fieldFoundIt); @@ -10642,7 +10642,7 @@ void AlterRelationNode::alterLocalTempTable(thread_db* tdbb, DsqlCompilerScratch else if (!dropClause->silent) { // msg 176: "column %s does not exist in table/view %s" - status_exception::raise(Arg::PrivateDyn(176) << dropClause->name << name.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(176) << dropClause->name << name.toQuotedString()); } break; } @@ -10657,7 +10657,7 @@ void AlterRelationNode::alterLocalTempTable(thread_db* tdbb, DsqlCompilerScratch { // msg 205: Cannot rename field %s to %s. A field with that name already exists status_exception::raise( - Arg::PrivateDyn(205) << renameClause->fromName << renameClause->toName << name.toQuotedString()); + Firebird::Arg::PrivateDyn(205) << renameClause->fromName << renameClause->toName << name.toQuotedString()); } auto fieldFoundIt = std::find_if(ltt->pendingFields.begin(), ltt->pendingFields.end(), @@ -10666,7 +10666,7 @@ void AlterRelationNode::alterLocalTempTable(thread_db* tdbb, DsqlCompilerScratch if (fieldFoundIt == ltt->pendingFields.end()) { // msg 176: "column %s does not exist in table/view %s" - status_exception::raise(Arg::PrivateDyn(176) << renameClause->fromName << name.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(176) << renameClause->fromName << name.toQuotedString()); } else fieldFoundIt->name = renameClause->toName; @@ -10695,7 +10695,7 @@ void AlterRelationNode::alterLocalTempTable(thread_db* tdbb, DsqlCompilerScratch if (!found) { // msg 176: "column %s does not exist in table/view %s" - status_exception::raise(Arg::PrivateDyn(176) << nullClause->name << name.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(176) << nullClause->name << name.toQuotedString()); } break; } @@ -10708,9 +10708,9 @@ void AlterRelationNode::alterLocalTempTable(thread_db* tdbb, DsqlCompilerScratch if (newPos < 0 || static_cast(newPos) >= ltt->pendingFields.getCount()) { status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_random) << "Invalid column position"); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_random) << "Invalid column position"); } // Find the field and its current position @@ -10727,7 +10727,7 @@ void AlterRelationNode::alterLocalTempTable(thread_db* tdbb, DsqlCompilerScratch if (currentPos >= ltt->pendingFields.getCount()) { // msg 176: "column %s does not exist in table/view %s" - status_exception::raise(Arg::PrivateDyn(176) << posClause->name << name.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(176) << posClause->name << name.toQuotedString()); } // Move the field @@ -10809,7 +10809,7 @@ void AlterRelationNode::alterLocalTempTable(thread_db* tdbb, DsqlCompilerScratch { // msg 176: "column %s does not exist in table/view %s" status_exception::raise( - Arg::PrivateDyn(176) << + Firebird::Arg::PrivateDyn(176) << field->fld_name.toQuotedString() << name.toQuotedString()); } @@ -10819,9 +10819,9 @@ void AlterRelationNode::alterLocalTempTable(thread_db* tdbb, DsqlCompilerScratch case Clause::TYPE_ADD_CONSTRAINT: case Clause::TYPE_DROP_CONSTRAINT: status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_random) << + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_random) << "Only NOT NULL constraints without names are supported on local temporary tables"); break; @@ -10829,9 +10829,9 @@ void AlterRelationNode::alterLocalTempTable(thread_db* tdbb, DsqlCompilerScratch case Clause::TYPE_ALTER_PUBLICATION: // These don't apply to LTTs status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_random) << "Operation not supported for local temporary tables"); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_random) << "Operation not supported for local temporary tables"); break; default: @@ -10931,9 +10931,9 @@ void DropRelationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch if (view) { status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_dsql_view_not_found) << name.toQuotedString()); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_dsql_view_not_found) << name.toQuotedString()); } const auto ltt = *lttIt; @@ -10966,7 +10966,7 @@ void DropRelationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch return; if (tdbb->getDatabase()->readOnly()) - ERRD_post(Arg::Gds(isc_read_only_database)); + ERRD_post(Firebird::Arg::Gds(isc_read_only_database)); auto* relation = getPermanent(rel); @@ -10976,9 +10976,9 @@ void DropRelationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch if (!relation || (relation && !(relation->isView()))) { status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_dsql_view_not_found) << name.toQuotedString()); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_dsql_view_not_found) << name.toQuotedString()); } } else @@ -10986,9 +10986,9 @@ void DropRelationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch if (!relation || (relation && (relation->isView()))) { status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_dsql_table_not_found) << name.toQuotedString()); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_dsql_table_not_found) << name.toQuotedString()); } } @@ -11011,7 +11011,7 @@ void DropRelationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch if (!found) { // msg 61: "Relation not found" - status_exception::raise(Arg::PrivateDyn(61)); + status_exception::raise(Firebird::Arg::PrivateDyn(61)); } request.reset(tdbb, drq_e_rel_con2, DYN_REQUESTS); @@ -11343,7 +11343,7 @@ void CreateAlterViewNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScra modifyingView = METD_get_relation(dsqlScratch->getTransaction(), dsqlScratch, name); if (!modifyingView && !create) - status_exception::raise(Arg::Gds(isc_dyn_view_not_found) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_view_not_found) << name.toQuotedString()); } saveRelation(tdbb, dsqlScratch, name, true, modifyingView == NULL); @@ -11400,7 +11400,7 @@ void CreateAlterViewNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScra END_FOR if (!found) - status_exception::raise(Arg::Gds(isc_dyn_view_not_found) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_view_not_found) << name.toQuotedString()); AutoRequest request2; @@ -11535,7 +11535,7 @@ void CreateAlterViewNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScra { // msg 32: no permission for %s access to %s %s status_exception::raise( - Arg::Gds(isc_no_priv) << Arg::Str("SELECT") << // Non-Translatable + Firebird::Arg::Gds(isc_no_priv) << Firebird::Arg::Str("SELECT") << // Non-Translatable // Remember, a view may be based on a view. "TABLE/VIEW" << // Non-Translatable // We want to print the name of the base table or view. @@ -11647,9 +11647,9 @@ void CreateAlterViewNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScra { // must specify field name for view select expression status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_specify_field_err)); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_specify_field_err)); } // CVC: Small modification here to catch any mismatch between number of @@ -11684,9 +11684,9 @@ void CreateAlterViewNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScra { // column @1 appears more than once in ALTER VIEW status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-104) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_dsql_col_more_than_once_view) << Arg::Str(fieldStr)); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_dsql_col_more_than_once_view) << Firebird::Arg::Str(fieldStr)); } modifiedFields.add(relField); @@ -11848,9 +11848,9 @@ void CreateAlterViewNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScra { // number of fields does not match select list status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_num_field_err)); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_num_field_err)); } if (modifyingView) // modifying a view @@ -11871,9 +11871,9 @@ void CreateAlterViewNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScra { // Only simple column names permitted for VIEW WITH CHECK OPTION status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_col_name_err)); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_col_name_err)); } RseNode* querySpec = nodeAs(selectExpr->querySpec); @@ -11884,27 +11884,27 @@ void CreateAlterViewNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScra { // Only one table allowed for VIEW WITH CHECK OPTION status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_table_view_err)); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_table_view_err)); } if (!querySpec->dsqlWhere) { // No where clause for VIEW WITH CHECK OPTION status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_where_err)); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_where_err)); } if (querySpec->dsqlDistinct || querySpec->dsqlGroup || querySpec->dsqlHaving) { // DISTINCT, GROUP or HAVING not permitted for VIEW WITH CHECK OPTION status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_distinct_err)); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_distinct_err)); } dsqlScratch->flags |= DsqlCompilerScratch::FLAG_VIEW_WITH_CHECK; @@ -12296,8 +12296,8 @@ MetaId StoreIndexNode::create(thread_db* tdbb, Cached::Relation* rel, jrd_tra* t jrd_rel* relation = rel->getVersioned(tdbb, CacheFlag::AUTOCREATE); if (!relation) { - ERR_post(Arg::Gds(isc_no_meta_update) << - Arg::Gds(isc_idx_create_err) << indexName.toQuotedString()); + ERR_post(Firebird::Arg::Gds(isc_no_meta_update) << + Firebird::Arg::Gds(isc_idx_create_err) << indexName.toQuotedString()); // Msg308: can't create index %s } @@ -12340,14 +12340,14 @@ MetaId StoreIndexNode::create(thread_db* tdbb, Cached::Relation* rel, jrd_tra* t { if (!idx.idx_count) { - ERR_post(Arg::Gds(isc_no_meta_update) << - Arg::Gds(isc_idx_seg_err) << indexName.toQuotedString()); + ERR_post(Firebird::Arg::Gds(isc_no_meta_update) << + Firebird::Arg::Gds(isc_idx_seg_err) << indexName.toQuotedString()); // Msg304: segment count of 0 defined for index %s } else { - ERR_post(Arg::Gds(isc_no_meta_update) << - Arg::Gds(isc_idx_key_err) << indexName.toQuotedString()); + ERR_post(Firebird::Arg::Gds(isc_no_meta_update) << + Firebird::Arg::Gds(isc_idx_key_err) << indexName.toQuotedString()); // Msg311: too many keys defined for index %s } } @@ -12427,29 +12427,29 @@ MetaId StoreIndexNode::create(thread_db* tdbb, Cached::Relation* rel, jrd_tra* t { if (key_count > idx.idx_count) { - ERR_post(Arg::Gds(isc_no_meta_update) << - Arg::Gds(isc_idx_key_err) << indexName.toQuotedString()); + ERR_post(Firebird::Arg::Gds(isc_no_meta_update) << + Firebird::Arg::Gds(isc_idx_key_err) << indexName.toQuotedString()); // Msg311: too many keys defined for index %s } else if (SEG.RDB$FIELD_POSITION > idx.idx_count) { fb_utils::exact_name(RFR.RDB$FIELD_NAME); - ERR_post(Arg::Gds(isc_no_meta_update) << - Arg::Gds(isc_inval_key_posn) << + ERR_post(Firebird::Arg::Gds(isc_no_meta_update) << + Firebird::Arg::Gds(isc_inval_key_posn) << // Msg358: invalid key position - Arg::Gds(isc_field_name) << Arg::Str(RFR.RDB$FIELD_NAME) << - Arg::Gds(isc_index_name) << indexName.toQuotedString()); + Firebird::Arg::Gds(isc_field_name) << Firebird::Arg::Str(RFR.RDB$FIELD_NAME) << + Firebird::Arg::Gds(isc_index_name) << indexName.toQuotedString()); } else if (FLD.RDB$FIELD_TYPE == blr_blob) { - ERR_post(Arg::Gds(isc_no_meta_update) << - Arg::Gds(isc_blob_idx_err) << indexName.toQuotedString()); + ERR_post(Firebird::Arg::Gds(isc_no_meta_update) << + Firebird::Arg::Gds(isc_blob_idx_err) << indexName.toQuotedString()); // Msg350: attempt to index blob column in index %s } else { - ERR_post(Arg::Gds(isc_no_meta_update) << - Arg::Gds(isc_array_idx_err) << indexName.toQuotedString()); + ERR_post(Firebird::Arg::Gds(isc_no_meta_update) << + Firebird::Arg::Gds(isc_array_idx_err) << indexName.toQuotedString()); // Msg351: attempt to index array column in index %s } } @@ -12483,15 +12483,15 @@ MetaId StoreIndexNode::create(thread_db* tdbb, Cached::Relation* rel, jrd_tra* t if (key_count != idx.idx_count) { - ERR_post(Arg::Gds(isc_no_meta_update) << - Arg::Gds(isc_key_field_err) << indexName.toQuotedString()); + ERR_post(Firebird::Arg::Gds(isc_no_meta_update) << + Firebird::Arg::Gds(isc_key_field_err) << indexName.toQuotedString()); // Msg352: too few key columns found for index %s (incorrect column name?) } if (rel->isView()) { - ERR_post(Arg::Gds(isc_no_meta_update) << - Arg::Gds(isc_idx_create_err) << indexName.toQuotedString()); + ERR_post(Firebird::Arg::Gds(isc_no_meta_update) << + Firebird::Arg::Gds(isc_idx_create_err) << indexName.toQuotedString()); // Msg308: can't create index %s } @@ -12515,7 +12515,7 @@ MetaId StoreIndexNode::create(thread_db* tdbb, Cached::Relation* rel, jrd_tra* t { MetaName constraint_name; MET_lookup_cnstrt_for_index(tdbb, constraint_name, indexName); - ERR_post(Arg::Gds(isc_partner_idx_not_found) << Arg::Str(constraint_name)); + ERR_post(Firebird::Arg::Gds(isc_partner_idx_not_found) << Firebird::Arg::Str(constraint_name)); } // Get an protected_read lock on the both relations if the index being @@ -12527,8 +12527,8 @@ MetaId StoreIndexNode::create(thread_db* tdbb, Cached::Relation* rel, jrd_tra* t int bad_segment; if (!IDX_check_master_types(tdbb, idx, partner_relation, bad_segment)) { - ERR_post(Arg::Gds(isc_no_meta_update) << - Arg::Gds(isc_partner_idx_incompat_type) << Arg::Num(bad_segment + 1)); + ERR_post(Firebird::Arg::Gds(isc_no_meta_update) << + Firebird::Arg::Gds(isc_partner_idx_incompat_type) << Firebird::Arg::Num(bad_segment + 1)); } /*** hvlad: this code was never called but i preserve it for Claudio review and decision @@ -12605,8 +12605,8 @@ MetaId StoreIndexNode::createExpression(thread_db* tdbb, Cached::Relation* rel, jrd_rel* relation = rel->getVersioned(tdbb, CacheFlag::AUTOCREATE); if (!relation) { - ERR_post(Arg::Gds(isc_no_meta_update) << - Arg::Gds(isc_idx_create_err) << indexName.toQuotedString()); + ERR_post(Firebird::Arg::Gds(isc_no_meta_update) << + Firebird::Arg::Gds(isc_idx_create_err) << indexName.toQuotedString()); // Msg308: can't create index %s } @@ -12646,8 +12646,8 @@ MetaId StoreIndexNode::createExpression(thread_db* tdbb, Cached::Relation* rel, if (IDX.RDB$SEGMENT_COUNT) { // Msg359: segments not allowed in expression index %s - ERR_post(Arg::Gds(isc_no_meta_update) << - Arg::Gds(isc_no_segments_err) << indexName.toQuotedString()); + ERR_post(Firebird::Arg::Gds(isc_no_meta_update) << + Firebird::Arg::Gds(isc_no_segments_err) << indexName.toQuotedString()); } if (IDX.RDB$UNIQUE_FLAG) @@ -12717,8 +12717,8 @@ MetaId StoreIndexNode::createExpression(thread_db* tdbb, Cached::Relation* rel, if (!relation) { // Msg308: can't create index %s - ERR_post(Arg::Gds(isc_no_meta_update) << - Arg::Gds(isc_idx_create_err) << indexName.toQuotedString()); + ERR_post(Firebird::Arg::Gds(isc_no_meta_update) << + Firebird::Arg::Gds(isc_idx_create_err) << indexName.toQuotedString()); } delete csb; @@ -12816,7 +12816,7 @@ ModifyIndexNode* CreateIndexNode::store(thread_db* tdbb, MemoryPool& p, jrd_tra* if (!VREL.RDB$VIEW_BLR.NULL) { // msg 181: "attempt to index a view" - status_exception::raise(Arg::PrivateDyn(181)); + status_exception::raise(Firebird::Arg::PrivateDyn(181)); } } END_FOR @@ -12849,7 +12849,7 @@ ModifyIndexNode* CreateIndexNode::store(thread_db* tdbb, MemoryPool& p, jrd_tra* { // msg 240 "Field %s cannot be used twice in index %s" status_exception::raise( - Arg::PrivateDyn(240) << definition.columns[i] << IDX.RDB$INDEX_NAME); + Firebird::Arg::PrivateDyn(240) << definition.columns[i] << IDX.RDB$INDEX_NAME); } } @@ -12869,17 +12869,17 @@ ModifyIndexNode* CreateIndexNode::store(thread_db* tdbb, MemoryPool& p, jrd_tra* if (GF.RDB$FIELD_TYPE == blr_blob) { // msg 116 "attempt to index blob field in index %s" - status_exception::raise(Arg::PrivateDyn(116) << idxName.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(116) << idxName.toQuotedString()); } else if (!GF.RDB$DIMENSIONS.NULL) { // msg 117 "attempt to index array field in index %s" - status_exception::raise(Arg::PrivateDyn(117) << idxName.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(117) << idxName.toQuotedString()); } else if (!GF.RDB$COMPUTED_BLR.NULL) { // msg 179 "attempt to index COMPUTED BY field in index %s" - status_exception::raise(Arg::PrivateDyn(179) << idxName.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(179) << idxName.toQuotedString()); } else if (GF.RDB$FIELD_TYPE == blr_varying || GF.RDB$FIELD_TYPE == blr_text) { @@ -12921,7 +12921,7 @@ ModifyIndexNode* CreateIndexNode::store(thread_db* tdbb, MemoryPool& p, jrd_tra* if (!found) { // msg 120 "Unknown columns in index %s" - status_exception::raise(Arg::PrivateDyn(120) << idxName.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(120) << idxName.toQuotedString()); } } @@ -12941,7 +12941,7 @@ ModifyIndexNode* CreateIndexNode::store(thread_db* tdbb, MemoryPool& p, jrd_tra* if (keyLength >= MAX_KEY) { // msg 118 "key size too big for index %s" - status_exception::raise(Arg::PrivateDyn(118) << idxName.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(118) << idxName.toQuotedString()); } if (definition.columns.hasData()) @@ -12968,7 +12968,7 @@ ModifyIndexNode* CreateIndexNode::store(thread_db* tdbb, MemoryPool& p, jrd_tra* else if (IDX.RDB$EXPRESSION_BLR.NULL) { // msg 119 "no keys for index %s" - status_exception::raise(Arg::PrivateDyn(119) << idxName.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(119) << idxName.toQuotedString()); } if (definition.refColumns.hasData()) @@ -12979,7 +12979,7 @@ ModifyIndexNode* CreateIndexNode::store(thread_db* tdbb, MemoryPool& p, jrd_tra* { // msg 133: "Number of referencing columns do not equal number of // referenced columns - status_exception::raise(Arg::PrivateDyn(133)); + status_exception::raise(Firebird::Arg::PrivateDyn(133)); } // Lookup a unique index in the referenced relation with the @@ -13060,19 +13060,19 @@ ModifyIndexNode* CreateIndexNode::store(thread_db* tdbb, MemoryPool& p, jrd_tra* if (isView) { // msg 242: "attempt to reference a view (%s) in a foreign key" - status_exception::raise(Arg::PrivateDyn(242) << definition.refRelation.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(242) << definition.refRelation.toQuotedString()); } if (found) { // msg 18: "could not find UNIQUE or PRIMARY KEY constraint in table %s with // specified columns" - status_exception::raise(Arg::PrivateDyn(18) << definition.refRelation.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(18) << definition.refRelation.toQuotedString()); } else { // msg 241: "Table %s not found" - status_exception::raise(Arg::PrivateDyn(241) << definition.refRelation.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(241) << definition.refRelation.toQuotedString()); } } } @@ -13095,7 +13095,7 @@ ModifyIndexNode* CreateIndexNode::store(thread_db* tdbb, MemoryPool& p, jrd_tra* { // msg 133: "Number of referencing columns do not equal number of // referenced columns" - status_exception::raise(Arg::PrivateDyn(133)); + status_exception::raise(Firebird::Arg::PrivateDyn(133)); } fb_utils::exact_name_limit(IND.RDB$SCHEMA_NAME, sizeof(IND.RDB$SCHEMA_NAME)); @@ -13115,7 +13115,7 @@ ModifyIndexNode* CreateIndexNode::store(thread_db* tdbb, MemoryPool& p, jrd_tra* if (IDX.RDB$FOREIGN_KEY.NULL) { // msg 20: "could not find PRIMARY KEY index in specified table %s" - status_exception::raise(Arg::PrivateDyn(20) << definition.refRelation.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(20) << definition.refRelation.toQuotedString()); } } @@ -13191,7 +13191,7 @@ void CreateIndexNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, } if (tdbb->getDatabase()->readOnly()) - ERRD_post(Arg::Gds(isc_read_only_database)); + ERRD_post(Firebird::Arg::Gds(isc_read_only_database)); if (createIfNotExistsOnly && !DYN_UTIL_check_unique_name_nothrow(tdbb, name, obj_index)) return; @@ -13232,7 +13232,7 @@ void CreateIndexNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, { const auto dbb = tdbb->getDatabase(); if (dbb->getEncodedOdsVersion() < ODS_13_1) - ERR_post(Arg::Gds(isc_wish_list)); + ERR_post(Firebird::Arg::Gds(isc_wish_list)); BlrDebugWriter::BlrData partialValue; definePartial(dsqlScratch, relation, partial, partialValue); @@ -13267,17 +13267,17 @@ void CreateIndexNode::defineLocalTempIndex(thread_db* tdbb, DsqlCompilerScratch* if (computed) { status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_wish_list) << - Arg::Gds(isc_random) << "Expression-based indexes are not supported for local temporary tables"); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_wish_list) << + Firebird::Arg::Gds(isc_random) << "Expression-based indexes are not supported for local temporary tables"); } if (partial) { status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_wish_list) << - Arg::Gds(isc_random) << "Partial indexes are not supported for local temporary tables"); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_wish_list) << + Firebird::Arg::Gds(isc_random) << "Partial indexes are not supported for local temporary tables"); } // Check index name uniqueness within the LTT scope @@ -13289,7 +13289,7 @@ void CreateIndexNode::defineLocalTempIndex(thread_db* tdbb, DsqlCompilerScratch* return; status_exception::raise( - Arg::Gds(isc_no_dup) << name.toQuotedString()); + Firebird::Arg::Gds(isc_no_dup) << name.toQuotedString()); } } @@ -13300,11 +13300,11 @@ void CreateIndexNode::defineLocalTempIndex(thread_db* tdbb, DsqlCompilerScratch* if (createIfNotExistsOnly) return; - status_exception::raise(Arg::Gds(isc_no_dup) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_no_dup) << name.toQuotedString()); } if (columns->items.getCount() > MAX_INDEX_SEGMENTS) - status_exception::raise(Arg::Gds(isc_idx_key_err) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_idx_key_err) << name.toQuotedString()); const auto& fields = ltt->hasPendingChanges ? ltt->pendingFields : ltt->fields; @@ -13319,12 +13319,12 @@ void CreateIndexNode::defineLocalTempIndex(thread_db* tdbb, DsqlCompilerScratch* { // Column not found in LTT status_exception::raise( - Arg::Gds(isc_dyn_column_does_not_exist) << colName.c_str() << ltt->name.toQuotedString()); + Firebird::Arg::Gds(isc_dyn_column_does_not_exist) << colName.c_str() << ltt->name.toQuotedString()); } // Check if field type is indexable (no blobs or arrays) if (fieldIt->desc.dsc_dtype == dtype_blob) - status_exception::raise(Arg::Gds(isc_blob_idx_err) << colName.c_str()); + status_exception::raise(Firebird::Arg::Gds(isc_blob_idx_err) << colName.c_str()); } // Register undo action with the savepoint @@ -13345,7 +13345,7 @@ void CreateIndexNode::defineLocalTempIndex(thread_db* tdbb, DsqlCompilerScratch* ltt->nextIndexId++; if (ltt->nextIndexId == initialIdProbe) - status_exception::raise(Arg::Gds(isc_no_meta_update) << Arg::Gds(isc_max_idx) << Arg::Num(MAX_USHORT)); + status_exception::raise(Firebird::Arg::Gds(isc_no_meta_update) << Firebird::Arg::Gds(isc_max_idx) << Firebird::Arg::Num(MAX_USHORT)); } // Add the index to the LTT @@ -13373,7 +13373,7 @@ DdlNode* CreateIndexNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) if (name.schema != relation->dsqlName.schema) { status_exception::raise( - Arg::Gds(isc_dyn_index_schema_must_match_table) << + Firebird::Arg::Gds(isc_dyn_index_schema_must_match_table) << name.schema.toQuotedString() << relation->dsqlName.schema.toQuotedString()); } @@ -13424,7 +13424,7 @@ void AlterIndexNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, } if (tdbb->getDatabase()->readOnly()) - ERRD_post(Arg::Gds(isc_read_only_database)); + ERRD_post(Firebird::Arg::Gds(isc_read_only_database)); Cached::Relation* relation = nullptr; bool expressionIndex = false; @@ -13485,7 +13485,7 @@ void AlterIndexNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, if (!found) { // msg 48: "Index not found" - status_exception::raise(Arg::PrivateDyn(48)); + status_exception::raise(Firebird::Arg::PrivateDyn(48)); } if (active == create) @@ -13647,7 +13647,7 @@ void SetStatisticsNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratc else { // msg 48: "Index not found" - status_exception::raise(Arg::PrivateDyn(48)); + status_exception::raise(Firebird::Arg::PrivateDyn(48)); } savePoint.release(); // everything is ok @@ -13738,7 +13738,7 @@ void DropIndexNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, j } if (tdbb->getDatabase()->readOnly()) - ERRD_post(Arg::Gds(isc_read_only_database)); + ERRD_post(Firebird::Arg::Gds(isc_read_only_database)); ModifyIndexList oneItemList(*MemoryPool::getContextPool()); Cached::Relation* rel = drop(tdbb, dsqlScratch, transaction, oneItemList, true); @@ -13766,7 +13766,7 @@ Cached::Relation* DropIndexNode::drop(thread_db* tdbb, DsqlCompilerScratch* dsql WITH RLC.RDB$SCHEMA_NAME EQ indexName.schema.c_str() AND RLC.RDB$INDEX_NAME EQ indexName.object.c_str() { - ERR_post(Arg::Gds(isc_integ_index_del)); + ERR_post(Firebird::Arg::Gds(isc_integ_index_del)); } END_FOR @@ -13851,7 +13851,7 @@ Cached::Relation* DropIndexNode::drop(thread_db* tdbb, DsqlCompilerScratch* dsql else if (!silent) { // msg 48: "Index not found" - status_exception::raise(Arg::PrivateDyn(48)); + status_exception::raise(Firebird::Arg::PrivateDyn(48)); } return rel; @@ -14124,9 +14124,9 @@ void CreateFilterNode::execute(thread_db* tdbb, DsqlCompilerScratch* /*dsqlScrat &X.RDB$INPUT_SUB_TYPE)) { status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-204) << - Arg::Gds(isc_dsql_datatype_err) << - Arg::Gds(isc_dsql_blob_type_unknown) << inputFilter->name); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-204) << + Firebird::Arg::Gds(isc_dsql_datatype_err) << + Firebird::Arg::Gds(isc_dsql_blob_type_unknown) << inputFilter->name); } } else @@ -14138,9 +14138,9 @@ void CreateFilterNode::execute(thread_db* tdbb, DsqlCompilerScratch* /*dsqlScrat &X.RDB$OUTPUT_SUB_TYPE)) { status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-204) << - Arg::Gds(isc_dsql_datatype_err) << - Arg::Gds(isc_dsql_blob_type_unknown) << outputFilter->name); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-204) << + Firebird::Arg::Gds(isc_dsql_datatype_err) << + Firebird::Arg::Gds(isc_dsql_blob_type_unknown) << outputFilter->name); } } else @@ -14191,7 +14191,7 @@ void DropFilterNode::execute(thread_db* tdbb, DsqlCompilerScratch* /*dsqlScratch if (!found && !silent) { // msg 37: "Blob Filter %s not found" - status_exception::raise(Arg::PrivateDyn(37) << name); + status_exception::raise(Firebird::Arg::PrivateDyn(37) << name); } savePoint.release(); // everything is ok @@ -14224,9 +14224,9 @@ void CreateShadowNode::execute(thread_db* tdbb, DsqlCompilerScratch* /*dsqlScrat if (number == 0) { status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_command_err) << - Arg::Gds(isc_dsql_shadow_number_err)); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_command_err) << + Firebird::Arg::Gds(isc_dsql_shadow_number_err)); } // run all statements under savepoint control @@ -14244,17 +14244,17 @@ void CreateShadowNode::execute(thread_db* tdbb, DsqlCompilerScratch* /*dsqlScrat return; // msg 165: "Shadow %ld already exists" - status_exception::raise(Arg::PrivateDyn(165) << Arg::Num(number)); + status_exception::raise(Firebird::Arg::PrivateDyn(165) << Firebird::Arg::Num(number)); } END_FOR PathName expandedName = fileName.ToPathName(); if (!ISC_expand_filename(expandedName, false)) - status_exception::raise(Arg::PrivateDyn(231)); // File name is invalid + status_exception::raise(Firebird::Arg::PrivateDyn(231)); // File name is invalid if (tdbb->getDatabase()->dbb_filename == expandedName) - status_exception::raise(Arg::PrivateDyn(166)); + status_exception::raise(Firebird::Arg::PrivateDyn(166)); request.reset(tdbb, drq_l_files, DYN_REQUESTS); @@ -14262,7 +14262,7 @@ void CreateShadowNode::execute(thread_db* tdbb, DsqlCompilerScratch* /*dsqlScrat FIRST 1 X IN RDB$FILES WITH X.RDB$FILE_NAME EQ expandedName.c_str() { - status_exception::raise(Arg::PrivateDyn(166)); + status_exception::raise(Firebird::Arg::PrivateDyn(166)); } END_FOR @@ -14364,7 +14364,7 @@ void CreateAlterRoleNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScra if (createFlag && sysPrivDrop) { // msg 293: DROP SYSTEM PRIVILEGES should not be used in CREATE ROLE - Arg::PrivateDyn(293).raise(); + Firebird::Arg::PrivateDyn(293).raise(); } Attachment* const attachment = transaction->tra_attachment; @@ -14383,25 +14383,25 @@ void CreateAlterRoleNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScra if (name == ownerName) { // msg 193: "user name @1 could not be used for SQL role" - status_exception::raise(Arg::PrivateDyn(193) << ownerName); + status_exception::raise(Firebird::Arg::PrivateDyn(193) << ownerName); } if (name == NULL_ROLE) { // msg 195: "keyword @1 could not be used as SQL role name" - status_exception::raise(Arg::PrivateDyn(195) << name); + status_exception::raise(Firebird::Arg::PrivateDyn(195) << name); } if (isItUserName(tdbb, transaction)) { // msg 193: "user name @1 could not be used for SQL role" - status_exception::raise(Arg::PrivateDyn(193) << name); + status_exception::raise(Firebird::Arg::PrivateDyn(193) << name); } if (createFlag && isItSqlRole(tdbb, transaction, name, dummyName)) { // msg 194: "SQL role @1 already exists" - status_exception::raise(Arg::PrivateDyn(194) << name); + status_exception::raise(Firebird::Arg::PrivateDyn(194) << name); } if (privileges.hasData() || sysPrivDrop) @@ -14409,7 +14409,7 @@ void CreateAlterRoleNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScra if (!tdbb->getAttachment()->locksmith(tdbb, CREATE_PRIVILEGED_ROLES)) { // msg 294: Access to SYSTEM PRIVILEGES in ROLES denied to @1 - (Arg::PrivateDyn(294) << ownerName).raise(); + (Firebird::Arg::PrivateDyn(294) << ownerName).raise(); } } @@ -14442,7 +14442,7 @@ void CreateAlterRoleNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScra if (ps->executeUpdate(tdbb, transaction) == 0) { // msg 155: "Role %s not found" - (Arg::PrivateDyn(155) << name).raise(); + (Firebird::Arg::PrivateDyn(155) << name).raise(); } } @@ -14517,7 +14517,7 @@ string MappingNode::internalPrint(NodePrinter& printer) const void MappingNode::validateAdmin() { if (to && (*to != ADMIN_ROLE)) - Arg::Gds(isc_alter_role).raise(); + Firebird::Arg::Gds(isc_alter_role).raise(); } // add some item to DDL in quotes @@ -14674,14 +14674,14 @@ void MappingNode::runInSecurityDb(SecDbContext* secDbContext) { case MAP_ADD: if (hasLine) - (Arg::Gds(isc_map_already_exists) << name).raise(); + (Firebird::Arg::Gds(isc_map_already_exists) << name).raise(); break; case MAP_COMMENT: case MAP_MOD: case MAP_DROP: if (!hasLine) - (Arg::Gds(isc_map_not_exists) << name).raise(); + (Firebird::Arg::Gds(isc_map_not_exists) << name).raise(); break; case MAP_RPL: @@ -14775,7 +14775,7 @@ void MappingNode::runInSecurityDb(SecDbContext* secDbContext) void MappingNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { if (!(tdbb->getAttachment() && tdbb->getAttachment()->locksmith(tdbb, CHANGE_MAPPING_RULES))) - (Arg::Gds(isc_adm_task_denied) << Arg::Gds(isc_miss_prvlg) << "CHANGE_MAPPING_RULES").raise(); + (Firebird::Arg::Gds(isc_adm_task_denied) << Firebird::Arg::Gds(isc_miss_prvlg) << "CHANGE_MAPPING_RULES").raise(); if (from) fromUtf8 = from->toUtf8(transaction); @@ -14871,7 +14871,7 @@ void MappingNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd { if (createIfNotExistsOnly) return; - (Arg::Gds(isc_map_already_exists) << name).raise(); + (Firebird::Arg::Gds(isc_map_already_exists) << name).raise(); } // fall through ... @@ -14918,12 +14918,12 @@ void MappingNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd case MAP_MOD: case MAP_COMMENT: if (!found) - (Arg::Gds(isc_map_not_exists) << name).raise(); + (Firebird::Arg::Gds(isc_map_not_exists) << name).raise(); break; case MAP_DROP: if (!found && !silentDrop) - (Arg::Gds(isc_map_not_exists) << name).raise(); + (Firebird::Arg::Gds(isc_map_not_exists) << name).raise(); break; } @@ -14972,7 +14972,7 @@ void DropRoleNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jr if (ROL.RDB$SYSTEM_FLAG != 0) { // msg 284: can not drop system SQL role @1 - status_exception::raise(Arg::PrivateDyn(284) << name); + status_exception::raise(Firebird::Arg::PrivateDyn(284) << name); } AutoCacheRequest request2(tdbb, drq_del_role_1, DYN_REQUESTS); @@ -15013,7 +15013,7 @@ void DropRoleNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jr else if (!silent) { // msg 155: "Role %s not found" - status_exception::raise(Arg::PrivateDyn(155) << name); + status_exception::raise(Firebird::Arg::PrivateDyn(155) << name); } savePoint.release(); // everything is ok @@ -15052,7 +15052,7 @@ string CreateAlterUserNode::internalPrint(NodePrinter& printer) const } -static void setCharField(Auth::CharField& field, const string* value) +static void setCharField(Firebird::Auth::CharField& field, const string* value) { if (value) { @@ -15090,19 +15090,19 @@ void CreateAlterUserNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScra adminRole.isUnknown() && active.isUnknown() && !comment && !properties.hasData()) { // 283: ALTER USER requires at least one clause to be specified - status_exception::raise(Arg::PrivateDyn(283)); + status_exception::raise(Firebird::Arg::PrivateDyn(283)); } } else if (!password) { // 291: CREATE USER requires password to be specified - status_exception::raise(Arg::PrivateDyn(291)); + status_exception::raise(Firebird::Arg::PrivateDyn(291)); } // run all statements under savepoint control AutoSavePoint savePoint(tdbb, transaction); - Auth::UserData* userData = FB_NEW_POOL(*transaction->tra_pool) Auth::UserData; + Firebird::Auth::UserData* userData = FB_NEW_POOL(*transaction->tra_pool) Firebird::Auth::UserData; MetaName text(name); if (text.isEmpty() && mode == USER_MOD) @@ -15111,7 +15111,7 @@ void CreateAlterUserNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScra text = tdbb->getAttachment()->getUserName(); if (text.isEmpty()) - (Arg::Gds(isc_random) << "Missing user name for ALTER CURRENT USER").raise(); + (Firebird::Arg::Gds(isc_random) << "Missing user name for ALTER CURRENT USER").raise(); } userData->createIfNotExistsOnly = createIfNotExistsOnly; @@ -15119,8 +15119,8 @@ void CreateAlterUserNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScra Firebird::LocalStatus s; CheckStatusWrapper statusWrapper(&s); - userData->op = mode == USER_ADD ? Auth::ADD_OPER : mode == USER_MOD ? - Auth::MOD_OPER : Auth::ADDMOD_OPER; + userData->op = mode == USER_ADD ? Firebird::Auth::ADD_OPER : mode == USER_MOD ? + Firebird::Auth::MOD_OPER : Firebird::Auth::ADDMOD_OPER; userData->user.set(&statusWrapper, text.c_str()); check(&statusWrapper); userData->user.setEntered(&statusWrapper, 1); @@ -15131,7 +15131,7 @@ void CreateAlterUserNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScra if (password->isEmpty()) { // 250: Password should not be empty string - status_exception::raise(Arg::PrivateDyn(250)); + status_exception::raise(Firebird::Arg::PrivateDyn(250)); } setCharField(userData->pass, password); @@ -15219,14 +15219,14 @@ void DropUserNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jr // run all statements under savepoint control AutoSavePoint savePoint(tdbb, transaction); - Auth::UserData* userData = FB_NEW_POOL(*transaction->tra_pool) Auth::UserData; + Firebird::Auth::UserData* userData = FB_NEW_POOL(*transaction->tra_pool) Firebird::Auth::UserData; string text = name.c_str(); Firebird::LocalStatus s; CheckStatusWrapper statusWrapper(&s); - userData->op = Auth::DEL_OPER; + userData->op = Firebird::Auth::DEL_OPER; userData->user.set(&statusWrapper, text.c_str()); userData->user.setEntered(&statusWrapper, 1); userData->plugin = plugin; @@ -15351,8 +15351,8 @@ void GrantRevokeNode::runInSecurityDb(SecDbContext* secDbContext) if (cnt == 0) { // msg 188: Role doesn't exist. - status_exception::raise(Arg::PrivateDyn(188) << j.user << - Arg::Gds(isc_random) << "in security database"); + status_exception::raise(Firebird::Arg::PrivateDyn(188) << j.user << + Firebird::Arg::Gds(isc_random) << "in security database"); } } @@ -15397,18 +15397,18 @@ void GrantRevokeNode::runInSecurityDb(SecDbContext* secDbContext) if (j.badGrantor) { // msg 246: @1 is not grantor of @2 on @3 to @4. - (Arg::PrivateDyn(246) << j.revoker.c_str() << all << all << j.user).raise(); + (Firebird::Arg::PrivateDyn(246) << j.revoker.c_str() << all << all << j.user).raise(); } // msg 247: Warning: @1 on @2 is not granted to @3. ERR_post_warning( - Arg::Warning(isc_dyn_miss_priv_warning) << + Firebird::Arg::Warning(isc_dyn_miss_priv_warning) << all << all << j.user); } else { // msg 247: Warning: @1 on @2 is not granted to @3. - ERR_post_warning(Arg::Warning(isc_dyn_miss_priv_warning) << + ERR_post_warning(Firebird::Arg::Warning(isc_dyn_miss_priv_warning) << privilegeName('C') << "DATABASE" << j.user); } } @@ -15612,13 +15612,13 @@ void GrantRevokeNode::grantRevoke(thread_db* tdbb, jrd_tra* transaction, const G { if (options || grantor) { - (Arg::Gds(isc_wish_list) << Arg::Gds(isc_random) << + (Firebird::Arg::Gds(isc_wish_list) << Firebird::Arg::Gds(isc_random) << "GRANT/ADMIN OPTION and GRANTED BY not supported for CREATE DATABASE grants").raise(); } if (userType != obj_sql_role && userType != obj_user) { - (Arg::Gds(isc_wish_list) << Arg::Gds(isc_random) << + (Firebird::Arg::Gds(isc_wish_list) << Firebird::Arg::Gds(isc_random) << "Only grants to USER or ROLE are supported for CREATE DATABASE").raise(); } @@ -15638,7 +15638,7 @@ void GrantRevokeNode::grantRevoke(thread_db* tdbb, jrd_tra* transaction, const G if (user.object == NULL_ROLE) { // msg 195: keyword NONE could not be used as SQL role name. - status_exception::raise(Arg::PrivateDyn(195) << user.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(195) << user.toQuotedString()); } } else @@ -15651,44 +15651,44 @@ void GrantRevokeNode::grantRevoke(thread_db* tdbb, jrd_tra* transaction, const G case obj_udf: if (!checkObjectExist(tdbb, transaction, user, userType)) - status_exception::raise(Arg::PrivateDyn(301) << user.toQuotedString()); // Function @1 does not exist + status_exception::raise(Firebird::Arg::PrivateDyn(301) << user.toQuotedString()); // Function @1 does not exist break; case obj_procedure: if (!checkObjectExist(tdbb, transaction, user, userType)) - status_exception::raise(Arg::PrivateDyn(302) << user.toQuotedString()); // Procedure @1 does not exist + status_exception::raise(Firebird::Arg::PrivateDyn(302) << user.toQuotedString()); // Procedure @1 does not exist break; case obj_package_header: if (!checkObjectExist(tdbb, transaction, user, userType)) - status_exception::raise(Arg::PrivateDyn(303) << user.toQuotedString()); // Package @1 does not exist + status_exception::raise(Firebird::Arg::PrivateDyn(303) << user.toQuotedString()); // Package @1 does not exist break; case obj_schema: if (!checkObjectExist(tdbb, transaction, user, userType)) - status_exception::raise(Arg::Gds(isc_dyn_schema_not_found) << user.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_schema_not_found) << user.toQuotedString()); break; case obj_trigger: if (!checkObjectExist(tdbb, transaction, user, userType)) - status_exception::raise(Arg::PrivateDyn(304) << user.toQuotedString()); // Trigger @1 does not exist + status_exception::raise(Firebird::Arg::PrivateDyn(304) << user.toQuotedString()); // Trigger @1 does not exist break; case obj_view: if (!checkObjectExist(tdbb, transaction, user, userType)) - status_exception::raise(Arg::PrivateDyn(305) << user.toQuotedString()); // View @1 does not exist + status_exception::raise(Firebird::Arg::PrivateDyn(305) << user.toQuotedString()); // View @1 does not exist break; case obj_sql_role: if (!crdb && (!isItSqlRole(tdbb, transaction, user.object, dummyName))) { // msg 188: Role doesn't exist. - status_exception::raise(Arg::PrivateDyn(188) << user.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(188) << user.toQuotedString()); } if (user.object == NULL_ROLE) { // msg 195: keyword NONE could not be used as SQL role name. - status_exception::raise(Arg::PrivateDyn(195) << user.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(195) << user.toQuotedString()); } break; @@ -15705,61 +15705,61 @@ void GrantRevokeNode::grantRevoke(thread_db* tdbb, jrd_tra* transaction, const G { case obj_view: if (!checkObjectExist(tdbb, transaction, objName, objType)) - status_exception::raise(Arg::PrivateDyn(305) << objName.toQuotedString()); // View @1 does not exist + status_exception::raise(Firebird::Arg::PrivateDyn(305) << objName.toQuotedString()); // View @1 does not exist break; case obj_relation: if (tdbb->getAttachment()->att_local_temporary_tables.exist(objName)) { - status_exception::raise(Arg::Gds(isc_dsql_ltt_invalid_reference) << + status_exception::raise(Firebird::Arg::Gds(isc_dsql_ltt_invalid_reference) << objName.toQuotedString() << (isGrant ? "GRANT" : "REVOKE")); } if (!checkObjectExist(tdbb, transaction, objName, objType)) - status_exception::raise(Arg::PrivateDyn(306) << objName.toQuotedString()); // Table @1 does not exist + status_exception::raise(Firebird::Arg::PrivateDyn(306) << objName.toQuotedString()); // Table @1 does not exist if (field.hasData() && !checkFieldExist(tdbb, transaction, objName, field)) - status_exception::raise(Arg::PrivateDyn(309) << field.c_str() << objName.toQuotedString()); // Field @1 of table @2 does not exist + status_exception::raise(Firebird::Arg::PrivateDyn(309) << field.c_str() << objName.toQuotedString()); // Field @1 of table @2 does not exist break; case obj_schema: if (!checkObjectExist(tdbb, transaction, objName, objType)) - status_exception::raise(Arg::Gds(isc_dyn_schema_not_found) << objName.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_schema_not_found) << objName.toQuotedString()); break; case obj_trigger: if (!checkObjectExist(tdbb, transaction, objName, objType)) - status_exception::raise(Arg::PrivateDyn(304) << objName.toQuotedString()); // Trigger @1 does not exist + status_exception::raise(Firebird::Arg::PrivateDyn(304) << objName.toQuotedString()); // Trigger @1 does not exist break; case obj_procedure: if (!checkObjectExist(tdbb, transaction, objName, objType)) - status_exception::raise(Arg::PrivateDyn(302) << objName.toQuotedString()); // Procedure @1 does not exist + status_exception::raise(Firebird::Arg::PrivateDyn(302) << objName.toQuotedString()); // Procedure @1 does not exist break; case obj_exception: if (!checkObjectExist(tdbb, transaction, objName, objType)) - status_exception::raise(Arg::PrivateDyn(307) << objName.toQuotedString()); // Exception @1 does not exist + status_exception::raise(Firebird::Arg::PrivateDyn(307) << objName.toQuotedString()); // Exception @1 does not exist break; case obj_generator: if (!checkObjectExist(tdbb, transaction, objName, objType)) - status_exception::raise(Arg::PrivateDyn(308) << objName.toQuotedString()); // Generator/Sequence @1 does not exist + status_exception::raise(Firebird::Arg::PrivateDyn(308) << objName.toQuotedString()); // Generator/Sequence @1 does not exist break; case obj_udf: if (!checkObjectExist(tdbb, transaction, objName, objType)) - status_exception::raise(Arg::PrivateDyn(301) << objName.toQuotedString()); // Function @1 does not exist + status_exception::raise(Firebird::Arg::PrivateDyn(301) << objName.toQuotedString()); // Function @1 does not exist break; case obj_package_header: if (!checkObjectExist(tdbb, transaction, objName, objType)) - status_exception::raise(Arg::PrivateDyn(303) << objName.toQuotedString()); // Package @1 does not exist + status_exception::raise(Firebird::Arg::PrivateDyn(303) << objName.toQuotedString()); // Package @1 does not exist break; case obj_sql_role: if (!isItSqlRole(tdbb, transaction, objName.object, dummyName)) - status_exception::raise(Arg::PrivateDyn(188) << objName.toQuotedString()); // Role doesn't exist. + status_exception::raise(Firebird::Arg::PrivateDyn(188) << objName.toQuotedString()); // Role doesn't exist. break; case obj_relations: @@ -15773,7 +15773,7 @@ void GrantRevokeNode::grantRevoke(thread_db* tdbb, jrd_tra* transaction, const G case obj_charsets: case obj_collations: if (!checkObjectExist(tdbb, transaction, QualifiedName(objName.schema), obj_schema)) - status_exception::raise(Arg::Gds(isc_dyn_schema_not_found) << objName.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_schema_not_found) << objName.toQuotedString()); default: fb_assert(object == NULL || isDdlObject(objType)); @@ -15784,31 +15784,31 @@ void GrantRevokeNode::grantRevoke(thread_db* tdbb, jrd_tra* transaction, const G switch (userType) { case obj_procedure: - ERRD_post(Arg::Gds(isc_dsql_cant_grant_option) << Arg::Str("procedures")); + ERRD_post(Firebird::Arg::Gds(isc_dsql_cant_grant_option) << Firebird::Arg::Str("procedures")); break; case obj_schema: - ERRD_post(Arg::Gds(isc_dsql_cant_grant_option) << Arg::Str("schemas")); + ERRD_post(Firebird::Arg::Gds(isc_dsql_cant_grant_option) << Firebird::Arg::Str("schemas")); break; case obj_trigger: - ERRD_post(Arg::Gds(isc_dsql_cant_grant_option) << Arg::Str("triggers")); + ERRD_post(Firebird::Arg::Gds(isc_dsql_cant_grant_option) << Firebird::Arg::Str("triggers")); break; case obj_view: - ERRD_post(Arg::Gds(isc_dsql_cant_grant_option) << Arg::Str("views")); + ERRD_post(Firebird::Arg::Gds(isc_dsql_cant_grant_option) << Firebird::Arg::Str("views")); break; case obj_privilege: - ERRD_post(Arg::Gds(isc_dsql_cant_grant_option) << Arg::Str("system privileges")); + ERRD_post(Firebird::Arg::Gds(isc_dsql_cant_grant_option) << Firebird::Arg::Str("system privileges")); break; case obj_udf: - ERRD_post(Arg::Gds(isc_dsql_cant_grant_option) << Arg::Str("functions")); + ERRD_post(Firebird::Arg::Gds(isc_dsql_cant_grant_option) << Firebird::Arg::Str("functions")); break; case obj_package_header: - ERRD_post(Arg::Gds(isc_dsql_cant_grant_option) << Arg::Str("packages")); + ERRD_post(Firebird::Arg::Gds(isc_dsql_cant_grant_option) << Firebird::Arg::Str("packages")); break; default: @@ -15823,9 +15823,9 @@ void GrantRevokeNode::grantRevoke(thread_db* tdbb, jrd_tra* transaction, const G const MetaName& owner(tdbb->getDatabase()->dbb_owner); if (owner == DBA_USER_NAME) - (Arg::PrivateDyn(252) << DBA_USER_NAME).raise(); + (Firebird::Arg::PrivateDyn(252) << DBA_USER_NAME).raise(); else - (Arg::PrivateDyn(295) << DBA_USER_NAME << owner).raise(); + (Firebird::Arg::PrivateDyn(295) << DBA_USER_NAME << owner).raise(); } const MetaName currentUser(attachment->getEffectiveUserName()); @@ -15866,7 +15866,7 @@ void GrantRevokeNode::grantRevoke(thread_db* tdbb, jrd_tra* transaction, const G if (isGrant) { // msg 195: keyword NONE could not be used as SQL role name. - status_exception::raise(Arg::PrivateDyn(195) << objName.object.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(195) << objName.object.toQuotedString()); } else { @@ -15949,7 +15949,7 @@ void GrantRevokeNode::grantRevoke(thread_db* tdbb, jrd_tra* transaction, const G if (grantedRoles.roleInUse(tdbb, user.object)) { // 292: role @1 can not be granted to role @2 - status_exception::raise(Arg::PrivateDyn(292) << objName.toQuotedString() << user.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(292) << objName.toQuotedString() << user.toQuotedString()); } } } @@ -16103,15 +16103,15 @@ void GrantRevokeNode::grantRevoke(thread_db* tdbb, jrd_tra* transaction, const G if (badGrantor) { // msg 246: @1 is not grantor of @2 on @3 to @4. - status_exception::raise(Arg::PrivateDyn(246) << + status_exception::raise(Firebird::Arg::PrivateDyn(246) << grantorRevoker.c_str() << privilegeName(priv[0]) << objName.toQuotedString() << user.toQuotedString()); } // msg 247: Warning: @1 on @2 is not granted to @3. ERR_post_warning( - Arg::Warning(isc_dyn_miss_priv_warning) << - Arg::Str(privilegeName(priv[0])) << + Firebird::Arg::Warning(isc_dyn_miss_priv_warning) << + Firebird::Arg::Str(privilegeName(priv[0])) << objName.toQuotedString() << user.toQuotedString()); } @@ -16147,7 +16147,7 @@ void GrantRevokeNode::checkGrantorCanGrantRelation(thread_db* tdbb, jrd_tra* tra if (!relationExists) { // table/view .. does not exist - status_exception::raise(Arg::PrivateDyn(175) << relationName.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(175) << relationName.toQuotedString()); } // Verify the input field exists. @@ -16171,7 +16171,7 @@ void GrantRevokeNode::checkGrantorCanGrantRelation(thread_db* tdbb, jrd_tra* tra if (!fieldExists) { // column .. does not exist in table/view .. - status_exception::raise(Arg::PrivateDyn(176) << + status_exception::raise(Firebird::Arg::PrivateDyn(176) << fieldName.toQuotedString() << relationName.toQuotedString()); } @@ -16255,7 +16255,7 @@ void GrantRevokeNode::checkGrantorCanGrantRelation(thread_db* tdbb, jrd_tra* tra if (goFld == 0) { // no grant option for privilege .. on column .. of [base] table/view .. - status_exception::raise(Arg::PrivateDyn(topLevel ? 167 : 168) << + status_exception::raise(Firebird::Arg::PrivateDyn(topLevel ? 167 : 168) << privilegeName(*privilege) << fieldName.toQuotedString() << relationName.toQuotedString()); } @@ -16264,14 +16264,14 @@ void GrantRevokeNode::checkGrantorCanGrantRelation(thread_db* tdbb, jrd_tra* tra if (goRel == 0) { // no grant option for privilege .. on [base] table/view .. (for column ..) - status_exception::raise(Arg::PrivateDyn(topLevel ? 169 : 170) << + status_exception::raise(Firebird::Arg::PrivateDyn(topLevel ? 169 : 170) << privilegeName(*privilege) << relationName.toQuotedString() << fieldName.toQuotedString()); } if (goRel == -1) { // no .. privilege with grant option on [base] table/view .. (for column ..) - status_exception::raise(Arg::PrivateDyn(topLevel ? 171 : 172) << + status_exception::raise(Firebird::Arg::PrivateDyn(topLevel ? 171 : 172) << privilegeName(*privilege) << relationName.toQuotedString() << fieldName.toQuotedString()); } } @@ -16281,13 +16281,13 @@ void GrantRevokeNode::checkGrantorCanGrantRelation(thread_db* tdbb, jrd_tra* tra if (goRel == 0) { // no grant option for privilege .. on table/view .. - status_exception::raise(Arg::PrivateDyn(173) << privilegeName(*privilege) << relationName.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(173) << privilegeName(*privilege) << relationName.toQuotedString()); } if (goRel == -1) { // no .. privilege with grant option on table/view .. - status_exception::raise(Arg::PrivateDyn(174) << privilegeName(*privilege) << relationName.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(174) << privilegeName(*privilege) << relationName.toQuotedString()); } } @@ -16395,7 +16395,7 @@ void GrantRevokeNode::checkGrantorCanGrantRole(thread_db* tdbb, jrd_tra* transac else { // 188: role name not exist. - status_exception::raise(Arg::PrivateDyn(188) << roleName.c_str()); + status_exception::raise(Firebird::Arg::PrivateDyn(188) << roleName.c_str()); } const int r = getGrantorOption(tdbb, transaction, grantor, obj_user, roleName); @@ -16404,7 +16404,7 @@ void GrantRevokeNode::checkGrantorCanGrantRole(thread_db* tdbb, jrd_tra* transac { // 189: user have no admin option. // 190: user is not a member of the role. - status_exception::raise(Arg::PrivateDyn(r ? 189 : 190) << grantor.c_str() << roleName.c_str()); + status_exception::raise(Firebird::Arg::PrivateDyn(r ? 189 : 190) << grantor.c_str() << roleName.c_str()); } } @@ -16447,7 +16447,7 @@ void GrantRevokeNode::checkGrantorCanGrantDdl(thread_db* tdbb, jrd_tra* transact if (!grantable) { // no @1 privilege with grant option on DDL @2 - status_exception::raise(Arg::PrivateDyn(299) << privilegeName(*privilege) << objName.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(299) << privilegeName(*privilege) << objName.toQuotedString()); } } @@ -16487,7 +16487,7 @@ void GrantRevokeNode::checkGrantorCanGrantObject(thread_db* tdbb, jrd_tra* trans if (!grantable) { // no @1 privilege with grant option on object @2 - status_exception::raise(Arg::PrivateDyn(300) << privilegeName(*privilege) << objName.toQuotedString()); + status_exception::raise(Firebird::Arg::PrivateDyn(300) << privilegeName(*privilege) << objName.toQuotedString()); } } @@ -16620,23 +16620,23 @@ void AlterDatabaseNode::checkClauses(thread_db* tdbb) if (clauses & CLAUSE_END_BACKUP) { if (clauses & CLAUSE_BEGIN_BACKUP) - (Arg::PrivateDyn(298) << Arg::Str("BEGIN BACKUP") << Arg::Str("END BACKUP")).raise(); + (Firebird::Arg::PrivateDyn(298) << Firebird::Arg::Str("BEGIN BACKUP") << Firebird::Arg::Str("END BACKUP")).raise(); if (differenceFile.hasData()) - (Arg::PrivateDyn(298) << Arg::Str("END BACKUP") << Arg::Str("ADD DIFFERENCE FILE")).raise(); + (Firebird::Arg::PrivateDyn(298) << Firebird::Arg::Str("END BACKUP") << Firebird::Arg::Str("ADD DIFFERENCE FILE")).raise(); if (clauses & CLAUSE_DROP_DIFFERENCE) - (Arg::PrivateDyn(298) << Arg::Str("END BACKUP") << Arg::Str("DROP DIFFERENCE FILE")).raise(); + (Firebird::Arg::PrivateDyn(298) << Firebird::Arg::Str("END BACKUP") << Firebird::Arg::Str("DROP DIFFERENCE FILE")).raise(); } if ((clauses & CLAUSE_DROP_DIFFERENCE) && differenceFile.hasData()) - (Arg::PrivateDyn(298) << Arg::Str("ADD DIFFERENCE FILE") << Arg::Str("DROP DIFFERENCE FILE")).raise(); + (Firebird::Arg::PrivateDyn(298) << Firebird::Arg::Str("ADD DIFFERENCE FILE") << Firebird::Arg::Str("DROP DIFFERENCE FILE")).raise(); if ((clauses & CLAUSE_ENABLE_PUB) && (clauses & CLAUSE_DISABLE_PUB)) - (Arg::PrivateDyn(298) << Arg::Str("ENABLE PUBLICATION") << Arg::Str("DISABLE PUBLICATION")).raise(); + (Firebird::Arg::PrivateDyn(298) << Firebird::Arg::Str("ENABLE PUBLICATION") << Firebird::Arg::Str("DISABLE PUBLICATION")).raise(); if ((clauses & CLAUSE_PUB_INCL_TABLE) && (clauses & CLAUSE_PUB_EXCL_TABLE)) - (Arg::PrivateDyn(298) << Arg::Str("INCLUDE TABLE TO PUBLICATION") << Arg::Str("EXCLUDE TABLE FROM PUBLICATION")).raise(); + (Firebird::Arg::PrivateDyn(298) << Firebird::Arg::Str("INCLUDE TABLE TO PUBLICATION") << Firebird::Arg::Str("EXCLUDE TABLE FROM PUBLICATION")).raise(); } void AlterDatabaseNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, @@ -16660,10 +16660,10 @@ void AlterDatabaseNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratc // msg 297: Concurrent ALTER DATABASE is not supported if (!conflict_trans) - Arg::PrivateDyn(297).raise(); + Firebird::Arg::PrivateDyn(297).raise(); - // Cannot use Arg::Num here because transaction number is 64-bit unsigned integer - (Arg::PrivateDyn(297) << Arg::Gds(isc_concurrent_transaction) << Arg::Int64(conflict_trans)).raise(); + // Cannot use Firebird::Arg::Num here because transaction number is 64-bit unsigned integer + (Firebird::Arg::PrivateDyn(297) << Firebird::Arg::Gds(isc_concurrent_transaction) << Firebird::Arg::Int64(conflict_trans)).raise(); } } @@ -16745,7 +16745,7 @@ void AlterDatabaseNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratc END_FOR if (!found) - status_exception::raise(Arg::Gds(isc_dyn_table_not_found) << tableName.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_table_not_found) << tableName.toQuotedString()); } } @@ -16800,7 +16800,7 @@ void AlterDatabaseNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratc if (!METD_get_charset(transaction, setDefaultCharSet)) { // specified character set not found - status_exception::raise(Arg::Gds(isc_charset_not_found) << setDefaultCharSet.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_charset_not_found) << setDefaultCharSet.toQuotedString()); } DBB.RDB$CHARACTER_SET_SCHEMA_NAME.NULL = FALSE; @@ -16917,14 +16917,14 @@ void AlterDatabaseNode::changeBackupMode(thread_db* tdbb, jrd_tra* transaction, { // msg 217: "Database is already in the physical backup mode" // msg 218: "Database is not in the physical backup mode" - status_exception::raise(Arg::PrivateDyn(clause == CLAUSE_BEGIN_BACKUP ? 217 : 218)); + status_exception::raise(Firebird::Arg::PrivateDyn(clause == CLAUSE_BEGIN_BACKUP ? 217 : 218)); } if (!found) { // msg 218: "Database is not in the physical backup mode" // msg 215: "Difference file is not defined" - status_exception::raise(Arg::PrivateDyn(clause == CLAUSE_END_BACKUP ? 218 : 215)); + status_exception::raise(Firebird::Arg::PrivateDyn(clause == CLAUSE_END_BACKUP ? 218 : 215)); } } @@ -16945,7 +16945,7 @@ void AlterDatabaseNode::defineDifference(thread_db* tdbb, jrd_tra* transaction, if (found) { // msg 216: "Difference file is already defined" - status_exception::raise(Arg::PrivateDyn(216)); + status_exception::raise(Firebird::Arg::PrivateDyn(216)); } request.reset(tdbb, drq_s_difference, DYN_REQUESTS); @@ -16954,7 +16954,7 @@ void AlterDatabaseNode::defineDifference(thread_db* tdbb, jrd_tra* transaction, FIL IN RDB$FILES { if (file.length() >= sizeof(FIL.RDB$FILE_NAME)) - status_exception::raise(Arg::Gds(isc_dyn_name_longer)); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_name_longer)); strcpy(FIL.RDB$FILE_NAME, file.c_str()); FIL.RDB$FILE_FLAGS = FILE_difference; @@ -17027,7 +17027,7 @@ string CreateAlterSchemaNode::internalPrint(NodePrinter& printer) const DdlNode* CreateAlterSchemaNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) { if (create && (name == "INFORMATION_SCHEMA" || name == "DEFINITION_SCHEMA")) - status_exception::raise(Arg::Gds(isc_dyn_cannot_create_reserved_schema) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_cannot_create_reserved_schema) << name.toQuotedString()); dsqlScratch->ddlSchema = name; @@ -17036,7 +17036,7 @@ DdlNode* CreateAlterSchemaNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) dsqlScratch->qualifyExistingName(setDefaultCharSet.value(), obj_charset); if (!METD_get_charset(dsqlScratch->getTransaction(), setDefaultCharSet.value())) - status_exception::raise(Arg::Gds(isc_charset_not_found) << setDefaultCharSet->toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_charset_not_found) << setDefaultCharSet->toQuotedString()); } return DdlNode::dsqlPass(dsqlScratch); @@ -17067,7 +17067,7 @@ void CreateAlterSchemaNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlSc if (create) // create or alter executeCreate(tdbb, dsqlScratch, transaction); else - status_exception::raise(Arg::Gds(isc_dyn_schema_not_found) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_schema_not_found) << name.toQuotedString()); } } else @@ -17173,7 +17173,7 @@ bool CreateAlterSchemaNode::executeAlter(thread_db* tdbb, DsqlCompilerScratch* d WITH SCH.RDB$SCHEMA_NAME = name.c_str() { if (SCH.RDB$SYSTEM_FLAG) - status_exception::raise(Arg::Gds(isc_dyn_cannot_mod_system_schema)); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_cannot_mod_system_schema)); executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_BEFORE, DDL_TRIGGER_ALTER_SCHEMA, qualifiedName, {}); @@ -17261,14 +17261,14 @@ void DropSchemaNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, WITH SCH.RDB$SCHEMA_NAME = name.c_str() { if (SCH.RDB$SYSTEM_FLAG) - status_exception::raise(Arg::Gds(isc_dyn_cannot_mod_system_schema)); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_cannot_mod_system_schema)); found = true; executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_BEFORE, DDL_TRIGGER_DROP_SCHEMA, qualifiedName, {}); if (collectObjects(tdbb, transaction)) - status_exception::raise(Arg::Gds(isc_dyn_cannot_drop_non_emptyschema) << name.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_cannot_drop_non_emptyschema) << name.toQuotedString()); ERASE SCH; @@ -17314,8 +17314,8 @@ void DropSchemaNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, if (!found && !silent) { status_exception::raise( - Arg::Gds(isc_no_meta_update) << - Arg::Gds(isc_dyn_schema_not_found) << name.toQuotedString()); + Firebird::Arg::Gds(isc_no_meta_update) << + Firebird::Arg::Gds(isc_dyn_schema_not_found) << name.toQuotedString()); } if (found) diff --git a/src/dsql/DdlNodes.h b/src/dsql/DdlNodes.h index 6d89dfb8154..0408154d87f 100644 --- a/src/dsql/DdlNodes.h +++ b/src/dsql/DdlNodes.h @@ -866,7 +866,7 @@ class CreateCollationNode final : public DdlNode { // msg: 222: "Invalid collation attributes" using namespace Firebird; - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << Arg::PrivateDyn(222)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << Firebird::Arg::PrivateDyn(222)); } attributesOn |= attribute; @@ -878,7 +878,7 @@ class CreateCollationNode final : public DdlNode { // msg: 222: "Invalid collation attributes" using namespace Firebird; - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << Arg::PrivateDyn(222)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << Firebird::Arg::PrivateDyn(222)); } attributesOff |= attribute; @@ -1196,10 +1196,10 @@ class CreateAlterSequenceNode final : public DdlNode if (!aValue.specified && !aStep.specified) { using namespace Firebird; - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << // Unexpected end of command - Arg::Gds(isc_command_end_err2) << Arg::Num(this->line) << - Arg::Num(this->column)); + Firebird::Arg::Gds(isc_command_end_err2) << Firebird::Arg::Num(this->line) << + Firebird::Arg::Num(this->column)); } */ } diff --git a/src/dsql/DsqlBatch.cpp b/src/dsql/DsqlBatch.cpp index fec16540e04..d971f12882c 100644 --- a/src/dsql/DsqlBatch.cpp +++ b/src/dsql/DsqlBatch.cpp @@ -188,22 +188,22 @@ DsqlBatch* DsqlBatch::open(thread_db* tdbb, DsqlDmlRequest* req, IMessageMetadat if (req->req_cursor) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-502) << - Arg::Gds(isc_dsql_cursor_open_err)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-502) << + Firebird::Arg::Gds(isc_dsql_cursor_open_err)); } if (req->req_batch) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-502) << - Arg::Gds(isc_batch_open)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-502) << + Firebird::Arg::Gds(isc_batch_open)); } // Sanity checks before creating batch if (!req->getRequest()) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-504) << - Arg::Gds(isc_unprepared_stmt)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-504) << + Firebird::Arg::Gds(isc_unprepared_stmt)); } const auto statement = req->getDsqlStatement(); @@ -218,22 +218,22 @@ DsqlBatch* DsqlBatch::open(thread_db* tdbb, DsqlDmlRequest* req, IMessageMetadat break; default: - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-901) << - Arg::Gds(isc_batch_type)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-901) << + Firebird::Arg::Gds(isc_batch_type)); } const dsql_msg* message = statement->getSendMsg(); if (! (inMetadata && message && message->msg_parameter > 0)) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-901) << - Arg::Gds(isc_batch_param)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-901) << + Firebird::Arg::Gds(isc_batch_param)); } // Open reader for parameters block ClumpletReader pb(ClumpletReader::WideTagged, par, parLength); if (pb.getBufferLength() && (pb.getBufferTag() != IBatch::VERSION1)) - ERRD_post(Arg::Gds(isc_batch_param_version)); + ERRD_post(Firebird::Arg::Gds(isc_batch_param_version)); // Create batch @@ -261,8 +261,8 @@ void DsqlBatch::blobCheckMeta() { if (!m_blobMeta.hasData()) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << - Arg::Gds(isc_batch_blobs)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << + Firebird::Arg::Gds(isc_batch_blobs)); } } @@ -283,8 +283,8 @@ void DsqlBatch::blobCheckMode(bool stream, const char* fname) break; } - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << - Arg::Gds(isc_batch_policy) << fname); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << + Firebird::Arg::Gds(isc_batch_policy) << fname); } void DsqlBatch::blobSetSize() @@ -312,8 +312,8 @@ void DsqlBatch::setDefaultBpb(thread_db* tdbb, unsigned parLength, const unsigne { if (m_blobs.getSize()) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << - Arg::Gds(isc_batch_defbpb)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << + Firebird::Arg::Gds(isc_batch_defbpb)); } setDefBpb(parLength, par); } @@ -364,8 +364,8 @@ void DsqlBatch::appendBlobData(thread_db* tdbb, ULONG length, const void* inBuff if (m_lastBlob == MAX_ULONG) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << - Arg::Gds(isc_batch_blob_append)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << + Firebird::Arg::Gds(isc_batch_blob_append)); } m_setBlobSize = true; @@ -378,8 +378,8 @@ void DsqlBatch::putSegment(ULONG length, const void* inBuffer) { if (length > MAX_USHORT) { - ERR_post(Arg::Gds(isc_imp_exc) << Arg::Gds(isc_blobtoobig) << - Arg::Gds(isc_big_segment) << Arg::Num(length)); + ERR_post(Firebird::Arg::Gds(isc_imp_exc) << Firebird::Arg::Gds(isc_blobtoobig) << + Firebird::Arg::Gds(isc_big_segment) << Firebird::Arg::Num(length)); } USHORT l = length; m_blobs.align(IBatch::BLOB_SEGHDR_ALIGN); @@ -399,8 +399,8 @@ void DsqlBatch::addBlobStream(thread_db* tdbb, unsigned length, const void* inBu return; if (length % BLOB_STREAM_ALIGN) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << - Arg::Gds(isc_batch_stream_align)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << + Firebird::Arg::Gds(isc_batch_stream_align)); } blobCheckMode(true, "addBlobStream"); @@ -431,8 +431,8 @@ void DsqlBatch::registerBlob(const ISC_QUAD* engineBlob, const ISC_QUAD* batchBl ISC_QUAD* idPtr = m_blobMap.put(*batchBlob); if (!idPtr) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << - Arg::Gds(isc_batch_rpt_blob) << Arg::Quad(batchBlob)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << + Firebird::Arg::Gds(isc_batch_rpt_blob) << Firebird::Arg::Quad(batchBlob)); } *idPtr = *engineBlob; @@ -524,9 +524,9 @@ Firebird::IBatchCompletionState* DsqlBatch::execute(thread_db* tdbb) flow.remains = m_blobs.reget(flow.remains, &flow.data, BLOB_STREAM_ALIGN); if (flow.remains < SIZEOF_BLOB_HEAD) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << - Arg::Gds(isc_batch_blob_buf) << - Arg::Gds(isc_batch_small_data) << "BLOB"); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << + Firebird::Arg::Gds(isc_batch_blob_buf) << + Firebird::Arg::Gds(isc_batch_small_data) << "BLOB"); } // parse blob header @@ -546,8 +546,8 @@ Firebird::IBatchCompletionState* DsqlBatch::execute(thread_db* tdbb) // Sanity check if (*bpbSize) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << - Arg::Gds(isc_batch_blob_buf) << Arg::Gds(isc_batch_cont_bpb)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << + Firebird::Arg::Gds(isc_batch_blob_buf) << Firebird::Arg::Gds(isc_batch_cont_bpb)); } } else @@ -562,9 +562,9 @@ Firebird::IBatchCompletionState* DsqlBatch::execute(thread_db* tdbb) flow.remains = m_blobs.reget(flow.remains, &flow.data, BLOB_STREAM_ALIGN); if (currentBpbSize > flow.remains) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << - Arg::Gds(isc_batch_blob_buf) << - Arg::Gds(isc_batch_big_bpb) << Arg::Num(currentBpbSize) << Arg::Num(flow.remains)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << + Firebird::Arg::Gds(isc_batch_blob_buf) << + Firebird::Arg::Gds(isc_batch_big_bpb) << Firebird::Arg::Num(currentBpbSize) << Firebird::Arg::Num(flow.remains)); } localBpb.add(flow.data, currentBpbSize); bpb = &localBpb; @@ -610,18 +610,18 @@ Firebird::IBatchCompletionState* DsqlBatch::execute(thread_db* tdbb) DEB_BATCH(fprintf(stderr, " Seg: %u\n", dataSize)); if (dataSize > flow.currentBlobSize) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << - Arg::Gds(isc_batch_blob_buf) << - Arg::Gds(isc_batch_big_segment) << Arg::Num(dataSize) << Arg::Num(flow.currentBlobSize)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << + Firebird::Arg::Gds(isc_batch_blob_buf) << + Firebird::Arg::Gds(isc_batch_big_segment) << Firebird::Arg::Num(dataSize) << Firebird::Arg::Num(flow.currentBlobSize)); } if (dataSize > flow.remains) { flow.remains = m_blobs.reget(flow.remains, &flow.data, BLOB_STREAM_ALIGN); if (dataSize > flow.remains) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << - Arg::Gds(isc_batch_blob_buf) << - Arg::Gds(isc_batch_big_seg2) << Arg::Num(dataSize) << Arg::Num(flow.remains)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << + Firebird::Arg::Gds(isc_batch_blob_buf) << + Firebird::Arg::Gds(isc_batch_big_seg2) << Firebird::Arg::Num(dataSize) << Firebird::Arg::Num(flow.remains)); } } } @@ -678,9 +678,9 @@ Firebird::IBatchCompletionState* DsqlBatch::execute(thread_db* tdbb) { if (remains < m_messageSize) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << - Arg::Gds(isc_batch_blob_buf) << - Arg::Gds(isc_batch_small_data) << "messages"); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << + Firebird::Arg::Gds(isc_batch_blob_buf) << + Firebird::Arg::Gds(isc_batch_small_data) << "messages"); } while (remains >= m_messageSize) @@ -716,8 +716,8 @@ Firebird::IBatchCompletionState* DsqlBatch::execute(thread_db* tdbb) ISC_QUAD newId; if (!m_blobMap.get(*id, newId)) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << - Arg::Gds(isc_batch_blob_id) << Arg::Quad(id)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << + Firebird::Arg::Gds(isc_batch_blob_id) << Firebird::Arg::Quad(id)); } m_blobMap.remove(*id); @@ -770,7 +770,7 @@ Firebird::IBatchCompletionState* DsqlBatch::execute(thread_db* tdbb) if (m_blobMap.count()) { DEB_BATCH(fprintf(stderr, "BLOBs %d were not used in messages\n", m_blobMap.count())); - ERR_post_warning(Arg::Warning(isc_random) << "m_blobMap.count() BLOBs were not used in messages"); // !!!!!! new warning + ERR_post_warning(Firebird::Arg::Warning(isc_random) << "m_blobMap.count() BLOBs were not used in messages"); // !!!!!! new warning } // reset to initial state @@ -834,7 +834,7 @@ void DsqlBatch::DataCache::put3(const void* data, ULONG dataSize, ULONG offset) void DsqlBatch::DataCache::put(const void* d, ULONG dataSize) { if (m_used + m_cache.getCount() + dataSize > m_limit) - ERR_post(Arg::Gds(isc_batch_too_big)); + ERR_post(Firebird::Arg::Gds(isc_batch_too_big)); const UCHAR* data = reinterpret_cast(d); diff --git a/src/dsql/DsqlCompilerScratch.cpp b/src/dsql/DsqlCompilerScratch.cpp index 04a49fa4183..fd327183d2a 100644 --- a/src/dsql/DsqlCompilerScratch.cpp +++ b/src/dsql/DsqlCompilerScratch.cpp @@ -68,9 +68,9 @@ void DsqlCompilerScratch::qualifyNewName(QualifiedName& name) const if (!dbb->dbb_attachment->qualifyNewName(tdbb, name)) { if (name.schema.isEmpty()) - status_exception::raise(Arg::Gds(isc_dyn_cannot_infer_schema)); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_cannot_infer_schema)); else - status_exception::raise(Arg::Gds(isc_dyn_schema_not_found) << name.schema.toQuotedString()); + status_exception::raise(Firebird::Arg::Gds(isc_dyn_schema_not_found) << name.schema.toQuotedString()); } } @@ -635,9 +635,9 @@ void DsqlCompilerScratch::addCTEs(WithClause* withClause) { if (ctes.getCount()) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << // WITH clause can't be nested - Arg::Gds(isc_dsql_cte_nested_with)); + Firebird::Arg::Gds(isc_dsql_cte_nested_with)); } if (withClause->recursive) @@ -702,11 +702,11 @@ void DsqlCompilerScratch::checkUnusedCTEs() { if (!sqlWarn) { - ERRD_post_warning(Arg::Warning(isc_sqlwarn) << Arg::Num(-104)); + ERRD_post_warning(Firebird::Arg::Warning(isc_sqlwarn) << Firebird::Arg::Num(-104)); sqlWarn = true; } - ERRD_post_warning(Arg::Warning(isc_dsql_cte_not_used) << cte->alias); + ERRD_post_warning(Firebird::Arg::Warning(isc_dsql_cte_not_used) << cte->alias); } } @@ -735,7 +735,7 @@ void DsqlCompilerScratch::putSubFunction(DeclareSubFuncNode* subFunc, bool repla if (!replace && subFunctions.exist(subFunc->name)) { status_exception::raise( - Arg::Gds(isc_dsql_duplicate_spec) << subFunc->name); + Firebird::Arg::Gds(isc_dsql_duplicate_spec) << subFunc->name); } subFunctions.put(subFunc->name, subFunc); @@ -757,7 +757,7 @@ void DsqlCompilerScratch::putSubProcedure(DeclareSubProcNode* subProc, bool repl if (!replace && subProcedures.exist(subProc->name)) { status_exception::raise( - Arg::Gds(isc_dsql_duplicate_spec) << subProc->name); + Firebird::Arg::Gds(isc_dsql_duplicate_spec) << subProc->name); } subProcedures.put(subProc->name, subProc); @@ -791,9 +791,9 @@ SelectExprNode* DsqlCompilerScratch::pass1RecursiveCte(SelectExprNode* input) if (!pass1RseIsRecursive(nodeAs(query))) return input; - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << // Recursive CTE (%s) must be an UNION - Arg::Gds(isc_dsql_cte_not_a_union) << input->alias); + Firebird::Arg::Gds(isc_dsql_cte_not_a_union) << input->alias); } // Split queries list on two parts: anchor and recursive. @@ -839,40 +839,40 @@ SelectExprNode* DsqlCompilerScratch::pass1RecursiveCte(SelectExprNode* input) { if (anchors) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << // CTE '%s' defined non-recursive member after recursive - Arg::Gds(isc_dsql_cte_nonrecurs_after_recurs) << input->alias); + Firebird::Arg::Gds(isc_dsql_cte_nonrecurs_after_recurs) << input->alias); } if (newRse->dsqlDistinct) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << // Recursive member of CTE '%s' has %s clause - Arg::Gds(isc_dsql_cte_wrong_clause) << input->alias << - Arg::Str("DISTINCT")); + Firebird::Arg::Gds(isc_dsql_cte_wrong_clause) << input->alias << + Firebird::Arg::Str("DISTINCT")); } if (newRse->dsqlGroup) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << // Recursive member of CTE '%s' has %s clause - Arg::Gds(isc_dsql_cte_wrong_clause) << input->alias << - Arg::Str("GROUP BY")); + Firebird::Arg::Gds(isc_dsql_cte_wrong_clause) << input->alias << + Firebird::Arg::Str("GROUP BY")); } if (newRse->dsqlHaving) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << // Recursive member of CTE '%s' has %s clause - Arg::Gds(isc_dsql_cte_wrong_clause) << input->alias << - Arg::Str("HAVING")); + Firebird::Arg::Gds(isc_dsql_cte_wrong_clause) << input->alias << + Firebird::Arg::Str("HAVING")); } if (!dsqlAll) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << // Recursive members of CTE (%s) must be linked with another members via UNION ALL - Arg::Gds(isc_dsql_cte_union_all) << input->alias); + Firebird::Arg::Gds(isc_dsql_cte_union_all) << input->alias); } recursiveStack.push(newRse); @@ -913,9 +913,9 @@ SelectExprNode* DsqlCompilerScratch::pass1RecursiveCte(SelectExprNode* input) } else if (!anchorRse) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << // Non-recursive member is missing in CTE '%s' - Arg::Gds(isc_dsql_cte_miss_nonrecursive) << input->alias); + Firebird::Arg::Gds(isc_dsql_cte_miss_nonrecursive) << input->alias); } // Merge recursive parts into a single node @@ -1008,9 +1008,9 @@ RseNode* DsqlCompilerScratch::pass1RseIsRecursive(RseNode* input) { if (found) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << // Recursive member of CTE can't reference itself more than once - Arg::Gds(isc_dsql_cte_mult_references)); + Firebird::Arg::Gds(isc_dsql_cte_mult_references)); } found = true; @@ -1025,9 +1025,9 @@ RseNode* DsqlCompilerScratch::pass1RseIsRecursive(RseNode* input) { if (found) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << // Recursive member of CTE can't reference itself more than once - Arg::Gds(isc_dsql_cte_mult_references)); + Firebird::Arg::Gds(isc_dsql_cte_mult_references)); } found = true; @@ -1113,9 +1113,9 @@ BoolExprNode* DsqlCompilerScratch::pass1JoinIsRecursive(RecordSourceNode*& input if (leftRecursive && joinType != blr_inner) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << // Recursive member of CTE can't be member of an outer join - Arg::Gds(isc_dsql_cte_outer_join)); + Firebird::Arg::Gds(isc_dsql_cte_outer_join)); } bool rightRecursive = false; @@ -1139,16 +1139,16 @@ BoolExprNode* DsqlCompilerScratch::pass1JoinIsRecursive(RecordSourceNode*& input if (rightRecursive && joinType != blr_inner) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << // Recursive member of CTE can't be member of an outer join - Arg::Gds(isc_dsql_cte_outer_join)); + Firebird::Arg::Gds(isc_dsql_cte_outer_join)); } if (leftRecursive && rightRecursive) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-104) << // Recursive member of CTE can't reference itself more than once - Arg::Gds(isc_dsql_cte_mult_references)); + Firebird::Arg::Gds(isc_dsql_cte_mult_references)); } if (leftRecursive) diff --git a/src/dsql/DsqlCursor.cpp b/src/dsql/DsqlCursor.cpp index 7101f1da80b..8efd32b90c0 100644 --- a/src/dsql/DsqlCursor.cpp +++ b/src/dsql/DsqlCursor.cpp @@ -172,7 +172,7 @@ int DsqlCursor::fetchNext(thread_db* tdbb, UCHAR* buffer) int DsqlCursor::fetchPrior(thread_db* tdbb, UCHAR* buffer) { if (!(m_flags & IStatement::CURSOR_TYPE_SCROLLABLE)) - (Arg::Gds(isc_invalid_fetch_option) << Arg::Str("PRIOR")).raise(); + (Firebird::Arg::Gds(isc_invalid_fetch_option) << Firebird::Arg::Str("PRIOR")).raise(); return fetchRelative(tdbb, buffer, -1); } @@ -180,7 +180,7 @@ int DsqlCursor::fetchPrior(thread_db* tdbb, UCHAR* buffer) int DsqlCursor::fetchFirst(thread_db* tdbb, UCHAR* buffer) { if (!(m_flags & IStatement::CURSOR_TYPE_SCROLLABLE)) - (Arg::Gds(isc_invalid_fetch_option) << Arg::Str("FIRST")).raise(); + (Firebird::Arg::Gds(isc_invalid_fetch_option) << Firebird::Arg::Str("FIRST")).raise(); return fetchAbsolute(tdbb, buffer, 1); } @@ -188,7 +188,7 @@ int DsqlCursor::fetchFirst(thread_db* tdbb, UCHAR* buffer) int DsqlCursor::fetchLast(thread_db* tdbb, UCHAR* buffer) { if (!(m_flags & IStatement::CURSOR_TYPE_SCROLLABLE)) - (Arg::Gds(isc_invalid_fetch_option) << Arg::Str("LAST")).raise(); + (Firebird::Arg::Gds(isc_invalid_fetch_option) << Firebird::Arg::Str("LAST")).raise(); return fetchAbsolute(tdbb, buffer, -1); } @@ -196,7 +196,7 @@ int DsqlCursor::fetchLast(thread_db* tdbb, UCHAR* buffer) int DsqlCursor::fetchAbsolute(thread_db* tdbb, UCHAR* buffer, SLONG position) { if (!(m_flags & IStatement::CURSOR_TYPE_SCROLLABLE)) - (Arg::Gds(isc_invalid_fetch_option) << Arg::Str("ABSOLUTE")).raise(); + (Firebird::Arg::Gds(isc_invalid_fetch_option) << Firebird::Arg::Str("ABSOLUTE")).raise(); if (!position) { @@ -229,7 +229,7 @@ int DsqlCursor::fetchAbsolute(thread_db* tdbb, UCHAR* buffer, SLONG position) int DsqlCursor::fetchRelative(thread_db* tdbb, UCHAR* buffer, SLONG offset) { if (!(m_flags & IStatement::CURSOR_TYPE_SCROLLABLE)) - (Arg::Gds(isc_invalid_fetch_option) << Arg::Str("RELATIVE")).raise(); + (Firebird::Arg::Gds(isc_invalid_fetch_option) << Firebird::Arg::Str("RELATIVE")).raise(); SINT64 position = m_position + offset; diff --git a/src/dsql/DsqlRequests.cpp b/src/dsql/DsqlRequests.cpp index 188fdf7c238..f094ce85425 100644 --- a/src/dsql/DsqlRequests.cpp +++ b/src/dsql/DsqlRequests.cpp @@ -112,25 +112,25 @@ void DsqlRequest::releaseRequest(thread_db* tdbb) void DsqlRequest::setCursor(thread_db* /*tdbb*/, const TEXT* /*name*/) { status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-804) << - Arg::Gds(isc_dsql_sqlda_err) << - Arg::Gds(isc_req_sync)); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-804) << + Firebird::Arg::Gds(isc_dsql_sqlda_err) << + Firebird::Arg::Gds(isc_req_sync)); } void DsqlRequest::setDelayedFormat(thread_db* /*tdbb*/, IMessageMetadata* /*metadata*/) { status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-804) << - Arg::Gds(isc_dsql_sqlda_err) << - Arg::Gds(isc_req_sync)); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-804) << + Firebird::Arg::Gds(isc_dsql_sqlda_err) << + Firebird::Arg::Gds(isc_req_sync)); } bool DsqlRequest::fetch(thread_db* /*tdbb*/, UCHAR* /*msgBuffer*/) { status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-804) << - Arg::Gds(isc_dsql_sqlda_err) << - Arg::Gds(isc_req_sync)); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-804) << + Firebird::Arg::Gds(isc_dsql_sqlda_err) << + Firebird::Arg::Gds(isc_req_sync)); return false; // avoid warning } @@ -254,9 +254,9 @@ DsqlDmlRequest::DsqlDmlRequest(thread_db* tdbb, MemoryPool& pool, dsql_dbb* dbb, if (!symbol) { // cursor is not found - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-504) << - Arg::Gds(isc_dsql_cursor_err) << - Arg::Gds(isc_dsql_cursor_not_found) << aStatement->parentCursorName); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-504) << + Firebird::Arg::Gds(isc_dsql_cursor_err) << + Firebird::Arg::Gds(isc_dsql_cursor_not_found) << aStatement->parentCursorName); } parentRequest = *symbol; @@ -267,8 +267,8 @@ DsqlDmlRequest::DsqlDmlRequest(thread_db* tdbb, MemoryPool& pool, dsql_dbb* dbb, if (parentRequest->getDsqlStatement()->getType() != DsqlStatement::TYPE_SELECT_UPD) { // cursor is not updatable - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-510) << - Arg::Gds(isc_dsql_cursor_update_err) << aStatement->parentCursorName); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-510) << + Firebird::Arg::Gds(isc_dsql_cursor_update_err) << aStatement->parentCursorName); } // Check that it contains this relation name @@ -287,8 +287,8 @@ DsqlDmlRequest::DsqlDmlRequest(thread_db* tdbb, MemoryPool& pool, dsql_dbb* dbb, { // Relation is used twice in cursor ERRD_post( - Arg::Gds(isc_dsql_cursor_err) << - Arg::Gds(isc_dsql_cursor_rel_ambiguous) << + Firebird::Arg::Gds(isc_dsql_cursor_err) << + Firebird::Arg::Gds(isc_dsql_cursor_rel_ambiguous) << relName.toQuotedString() << aStatement->parentCursorName.toQuotedString()); } parentContext = i; @@ -300,8 +300,8 @@ DsqlDmlRequest::DsqlDmlRequest(thread_db* tdbb, MemoryPool& pool, dsql_dbb* dbb, { // Relation is not in cursor ERRD_post( - Arg::Gds(isc_dsql_cursor_err) << - Arg::Gds(isc_dsql_cursor_rel_not_found) << + Firebird::Arg::Gds(isc_dsql_cursor_err) << + Firebird::Arg::Gds(isc_dsql_cursor_rel_not_found) << relName.toQuotedString() << aStatement->parentCursorName.toQuotedString()); } parentRequest->cursors.add(this); @@ -332,9 +332,9 @@ void DsqlDmlRequest::setDelayedFormat(thread_db* tdbb, IMessageMetadata* metadat if (!needDelayedFormat) { status_exception::raise( - Arg::Gds(isc_sqlerr) << Arg::Num(-804) << - Arg::Gds(isc_dsql_sqlda_err) << - Arg::Gds(isc_req_sync)); + Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-804) << + Firebird::Arg::Gds(isc_dsql_sqlda_err) << + Firebird::Arg::Gds(isc_req_sync)); } metadataToFormat(metadata, dsqlStatement->getReceiveMsg()); @@ -353,23 +353,23 @@ bool DsqlDmlRequest::fetch(thread_db* tdbb, UCHAR* msgBuffer) { if (!req_cursor) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-504) << - Arg::Gds(isc_dsql_cursor_err) << - Arg::Gds(isc_dsql_cursor_not_open)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-504) << + Firebird::Arg::Gds(isc_dsql_cursor_err) << + Firebird::Arg::Gds(isc_dsql_cursor_not_open)); } } if (!request) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-504) << - Arg::Gds(isc_unprepared_stmt)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-504) << + Firebird::Arg::Gds(isc_unprepared_stmt)); } // At this point we have to have output metadata from client if (needDelayedFormat) { - ERRD_post(Arg::Gds(isc_dsql_sqlda_err) << - Arg::Gds(isc_dsql_no_output_sqlda)); + ERRD_post(Firebird::Arg::Gds(isc_dsql_sqlda_err) << + Firebird::Arg::Gds(isc_dsql_no_output_sqlda)); } // Set up things for tracing this call @@ -457,9 +457,9 @@ void DsqlDmlRequest::setCursor(thread_db* tdbb, const TEXT* name) if (!length) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-502) << - Arg::Gds(isc_dsql_decl_err) << - Arg::Gds(isc_dsql_cursor_invalid)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-502) << + Firebird::Arg::Gds(isc_dsql_decl_err) << + Firebird::Arg::Gds(isc_dsql_cursor_invalid)); } if (length > MAX_CURSOR_LENGTH) @@ -475,9 +475,9 @@ void DsqlDmlRequest::setCursor(thread_db* tdbb, const TEXT* name) if (this == *symbol) return; - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-502) << - Arg::Gds(isc_dsql_decl_err) << - Arg::Gds(isc_dsql_cursor_redefined) << cursor); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-502) << + Firebird::Arg::Gds(isc_dsql_decl_err) << + Firebird::Arg::Gds(isc_dsql_cursor_redefined) << cursor); } // If there already is a cursor and its name isn't the same, ditto. @@ -486,9 +486,9 @@ void DsqlDmlRequest::setCursor(thread_db* tdbb, const TEXT* name) if (req_cursor && req_cursor_name.hasData()) { fb_assert(!symbol); - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-502) << - Arg::Gds(isc_dsql_decl_err) << - Arg::Gds(isc_dsql_cursor_redefined) << req_cursor_name); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-502) << + Firebird::Arg::Gds(isc_dsql_decl_err) << + Firebird::Arg::Gds(isc_dsql_cursor_redefined) << req_cursor_name); } if (req_cursor_name.hasData()) @@ -509,27 +509,27 @@ DsqlCursor* DsqlDmlRequest::openCursor(thread_db* tdbb, jrd_tra** traHandle, if (!*traHandle) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-901) << - Arg::Gds(isc_bad_trans_handle)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-901) << + Firebird::Arg::Gds(isc_bad_trans_handle)); } // Validate statement type if (!dsqlStatement->isCursorBased()) - Arg::Gds(isc_no_cursor).raise(); + Firebird::Arg::Gds(isc_no_cursor).raise(); // Validate cursor or batch being not already open if (req_cursor) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-502) << - Arg::Gds(isc_dsql_cursor_open_err)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-502) << + Firebird::Arg::Gds(isc_dsql_cursor_open_err)); } if (req_batch) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-502) << - Arg::Gds(isc_batch_open)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-502) << + Firebird::Arg::Gds(isc_batch_open)); } req_transaction = *traHandle; @@ -600,7 +600,7 @@ void DsqlDmlRequest::doExecute(thread_db* tdbb, jrd_tra** traHandle, // No record returned though expected if (!(request->req_flags & req_active)) { - status_exception::raise(Arg::Gds(isc_stream_eof)); + status_exception::raise(Firebird::Arg::Gds(isc_stream_eof)); } // Create a temp message buffer and try one more receive. @@ -613,7 +613,7 @@ void DsqlDmlRequest::doExecute(thread_db* tdbb, jrd_tra** traHandle, // Still active request means that second record exists if ((request->req_flags & req_active)) { - status_exception::raise(Arg::Gds(isc_sing_select_err)); + status_exception::raise(Firebird::Arg::Gds(isc_sing_select_err)); } } } @@ -624,18 +624,18 @@ void DsqlDmlRequest::doExecute(thread_db* tdbb, jrd_tra** traHandle, case DsqlStatement::TYPE_UPDATE_CURSOR: if (!request->req_records_updated) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-913) << - Arg::Gds(isc_deadlock) << - Arg::Gds(isc_update_conflict)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-913) << + Firebird::Arg::Gds(isc_deadlock) << + Firebird::Arg::Gds(isc_update_conflict)); } break; case DsqlStatement::TYPE_DELETE_CURSOR: if (!request->req_records_deleted) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-913) << - Arg::Gds(isc_deadlock) << - Arg::Gds(isc_update_conflict)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-913) << + Firebird::Arg::Gds(isc_deadlock) << + Firebird::Arg::Gds(isc_update_conflict)); } break; @@ -658,8 +658,8 @@ void DsqlDmlRequest::execute(thread_db* tdbb, jrd_tra** traHandle, { if (!request) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-504) << - Arg::Gds(isc_unprepared_stmt)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-504) << + Firebird::Arg::Gds(isc_unprepared_stmt)); } // If there is no data required, just start the request @@ -669,8 +669,8 @@ void DsqlDmlRequest::execute(thread_db* tdbb, jrd_tra** traHandle, { if (!inMetadata) { - ERRD_post(Arg::Gds(isc_dsql_sqlda_err) << - Arg::Gds(isc_dsql_no_input_sqlda)); + ERRD_post(Firebird::Arg::Gds(isc_dsql_sqlda_err) << + Firebird::Arg::Gds(isc_dsql_no_input_sqlda)); } // If this is not first call of execute(), metadata most likely is already converted to message @@ -754,7 +754,7 @@ void DsqlDmlRequest::executeReceiveWithRestarts(thread_db* tdbb, jrd_tra** traHa string s; s.printf("restarts = %d", numTries); - ERRD_post_warning(Arg::Warning(isc_random) << Arg::Str(s)); + ERRD_post_warning(Firebird::Arg::Warning(isc_random) << Firebird::Arg::Str(s)); } #endif savePoint.release(); // everything is ok @@ -812,8 +812,8 @@ void DsqlDmlRequest::metadataToFormat(Firebird::IMessageMetadata* meta, const ds if (count * 2 != count2) { - ERRD_post(Arg::Gds(isc_dsql_sqlda_err) << - Arg::Gds(isc_dsql_wrong_param_num) <fmt_count) { fb_assert(false); - ERRD_post(Arg::Gds(isc_dsql_sqlda_err) << - Arg::Gds(isc_dsql_wrong_param_num) <fmt_count) << Arg::Num(assigned)); + ERRD_post(Firebird::Arg::Gds(isc_dsql_sqlda_err) << + Firebird::Arg::Gds(isc_dsql_wrong_param_num) <fmt_count) << Firebird::Arg::Num(assigned)); } msg->setFormat(request, newFormat); @@ -895,13 +895,13 @@ void DsqlDmlRequest::mapCursorKey(thread_db* tdbb) if (!parentRequest || !parentRequest->req_cursor) // It has been already closed { // Here may be code to re-establish link to parent cursor. - ERRD_post(Arg::Gds(isc_dsql_cursor_err) << - Arg::Gds(isc_dsql_cursor_not_found) << dsqlStatement->parentCursorName); + ERRD_post(Firebird::Arg::Gds(isc_dsql_cursor_err) << + Firebird::Arg::Gds(isc_dsql_cursor_not_found) << dsqlStatement->parentCursorName); } if (!parentRequest->req_cursor->getCurrentRecordKey(parentContext, dbKey)) { - ERRD_post(Arg::Gds(isc_cursor_not_positioned) << dsqlStatement->parentCursorName); + ERRD_post(Firebird::Arg::Gds(isc_cursor_not_positioned) << dsqlStatement->parentCursorName); } fb_assert(request); @@ -1059,5 +1059,5 @@ void DsqlSessionManagementRequest::execute(thread_db* tdbb, jrd_tra** traHandle, static void checkD(IStatus* st) { if (st->getState() & IStatus::STATE_ERRORS) - ERRD_post(Arg::StatusVector(st)); + ERRD_post(Firebird::Arg::StatusVector(st)); } diff --git a/src/dsql/DsqlStatements.cpp b/src/dsql/DsqlStatements.cpp index 63617d33fab..a64284ca787 100644 --- a/src/dsql/DsqlStatements.cpp +++ b/src/dsql/DsqlStatements.cpp @@ -48,10 +48,10 @@ DsqlStatement::DsqlStatement(MemoryPool& pool, dsql_dbb* aDsqlAttachment) // Rethrow an exception with isc_no_meta_update and prefix codes. void DsqlStatement::rethrowDdlException(status_exception& ex, bool metadataUpdate, DdlNode* node) { - Arg::StatusVector newVector; + Firebird::Arg::StatusVector newVector; if (metadataUpdate) - newVector << Arg::Gds(isc_no_meta_update); + newVector << Firebird::Arg::Gds(isc_no_meta_update); node->putErrorPrefix(newVector); @@ -60,7 +60,7 @@ void DsqlStatement::rethrowDdlException(status_exception& ex, bool metadataUpdat if (status[1] == isc_no_meta_update) status += 2; - newVector.append(Arg::StatusVector(status)); + newVector.append(Firebird::Arg::StatusVector(status)); status_exception::raise(newVector); } @@ -204,8 +204,8 @@ void DsqlDmlStatement::dsqlPass(thread_db* tdbb, DsqlCompilerScratch* scratch, n // restore warnings (if there are any) if (localStatus->getState() & IStatus::STATE_WARNINGS) { - Arg::StatusVector cur(tdbb->tdbb_status_vector->getWarnings()); - Arg::StatusVector saved(localStatus->getWarnings()); + Firebird::Arg::StatusVector cur(tdbb->tdbb_status_vector->getWarnings()); + Firebird::Arg::StatusVector saved(localStatus->getWarnings()); saved << cur; tdbb->tdbb_status_vector->setWarnings2(saved.length(), saved.value()); @@ -255,7 +255,7 @@ void DsqlDdlStatement::dsqlPass(thread_db* tdbb, DsqlCompilerScratch* scratch, n } if (dbb->readOnly() && node->disallowedInReadOnlyDatabase()) - ERRD_post(Arg::Gds(isc_read_only_database)); + ERRD_post(Firebird::Arg::Gds(isc_read_only_database)); // In read-only replica, only replicator is allowed to execute DDL. // As an exception, not replicated DDL statements are also allowed. @@ -263,7 +263,7 @@ void DsqlDdlStatement::dsqlPass(thread_db* tdbb, DsqlCompilerScratch* scratch, n !(tdbb->tdbb_flags & TDBB_replicator) && node->mustBeReplicated()) { - ERRD_post(Arg::Gds(isc_read_only_trans)); + ERRD_post(Firebird::Arg::Gds(isc_read_only_trans)); } const auto dbDialect = (dbb->dbb_flags & DBB_DB_SQL_dialect_3) ? SQL_DIALECT_V6 : SQL_DIALECT_V5; @@ -271,8 +271,8 @@ void DsqlDdlStatement::dsqlPass(thread_db* tdbb, DsqlCompilerScratch* scratch, n if ((scratch->flags & DsqlCompilerScratch::FLAG_AMBIGUOUS_STMT) && dbDialect != scratch->clientDialect) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-817) << - Arg::Gds(isc_ddl_not_allowed_by_db_sql_dial) << Arg::Num(dbDialect)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-817) << + Firebird::Arg::Gds(isc_ddl_not_allowed_by_db_sql_dial) << Firebird::Arg::Num(dbDialect)); } if (scratch->clientDialect > SQL_DIALECT_V5) diff --git a/src/dsql/ExprNodes.cpp b/src/dsql/ExprNodes.cpp index f1abf8e5d44..c9fa7d56aa1 100644 --- a/src/dsql/ExprNodes.cpp +++ b/src/dsql/ExprNodes.cpp @@ -816,8 +816,8 @@ void ArithmeticNode::makeDialect1(dsc* desc, dsc& desc1, dsc& desc2) if (DTYPE_IS_BLOB(dtype)) { - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-607) << - Arg::Gds(isc_dsql_no_blob_array)); + ERRD_post(Firebird::Arg::Gds(isc_sqlerr) << Firebird::Arg::Num(-607) << + Firebird::Arg::Gds(isc_dsql_no_blob_array)); } desc->dsc_flags = (desc1.dsc_flags | desc2.dsc_flags) & DSC_nullable; @@ -827,7 +827,7 @@ void ArithmeticNode::makeDialect1(dsc* desc, dsc& desc1, dsc& desc2) case dtype_ex_time_tz: case dtype_ex_timestamp_tz: fb_assert(false); - ERRD_post(Arg::Gds(isc_expression_eval_err)); + ERRD_post(Firebird::Arg::Gds(isc_expression_eval_err)); case dtype_sql_time: case dtype_sql_time_tz: @@ -837,8 +837,8 @@ void ArithmeticNode::makeDialect1(dsc* desc, dsc& desc1, dsc& desc2) // Forbid +- if (DTYPE_IS_TEXT(desc1.dsc_dtype) || DTYPE_IS_TEXT(desc2.dsc_dtype)) { - ERRD_post(Arg::Gds(isc_expression_eval_err) << - Arg::Gds(isc_dsql_nodateortime_pm_string)); + ERRD_post(Firebird::Arg::Gds(isc_expression_eval_err) << + Firebird::Arg::Gds(isc_dsql_nodateortime_pm_string)); } // fall into @@ -882,8 +882,8 @@ void ArithmeticNode::makeDialect1(dsc* desc, dsc& desc1, dsc& desc2) dtype = desc2.dsc_dtype; else { - ERRD_post(Arg::Gds(isc_expression_eval_err) << - Arg::Gds(isc_dsql_invalid_datetime_subtract)); + ERRD_post(Firebird::Arg::Gds(isc_expression_eval_err) << + Firebird::Arg::Gds(isc_dsql_invalid_datetime_subtract)); } if (dtype == dtype_sql_date) @@ -921,8 +921,8 @@ void ArithmeticNode::makeDialect1(dsc* desc, dsc& desc1, dsc& desc2) // + //