8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-02-02 10:00:38 +01:00
This commit is contained in:
GitHub Action 2022-06-30 10:25:44 +00:00
parent 4716e4fa11
commit c7db6dc207
27 changed files with 64 additions and 64 deletions

View File

@ -1,7 +1,7 @@
/*
* PROGRAM: JRD Backup and Restore Program
* MODULE: BurpTasks.cpp
* DESCRIPTION:
* DESCRIPTION:
*
* The contents of this file are subject to the Interbase Public
* License Version 1.0 (the "License"); you may not use this file
@ -356,7 +356,7 @@ IOBuffer* BackupRelationTask::renewBuffer(BurpGlobals* tdgbl)
used = newBuf->getSize() - used;
memcpy(p, tdgbl->mvol_io_data, used);
}
else
else
{
oldBuf->setUsed(oldBuf->getSize());
oldBuf->linkNext(newBuf);
@ -389,7 +389,7 @@ void BackupRelationTask::releaseBuffer(Item& item)
oldBuf->setUsed(used);
putDirtyBuffer(oldBuf);
}
else
else
{
oldBuf->clear();
putCleanBuffer(oldBuf);
@ -507,7 +507,7 @@ void BackupRelationTask::initItem(BurpGlobals* tdgbl, Item& item)
// add snapshot id
tpb.insertBigInt(isc_tpb_at_snapshot_number, m_masterGbl->tr_snapshot);
item.m_tra = item.m_att->startTransaction(&status,
item.m_tra = item.m_att->startTransaction(&status,
tpb.getBufferLength(), tpb.getBuffer());
if (status->getState() & IStatus::STATE_ERRORS)
@ -619,7 +619,7 @@ BackupRelationTask::Item::EnsureUnlockBuffer::~EnsureUnlockBuffer()
}
/// class RestoreRelationTask
/// class RestoreRelationTask
RestoreRelationTask::RestoreRelationTask(BurpGlobals* tdgbl) : Task(),
m_masterGbl(tdgbl),
@ -882,8 +882,8 @@ void RestoreRelationTask::initItem(BurpGlobals* tdgbl, Item& item)
FbLocalStatus status;
DispatcherPtr provider;
ClumpletWriter dpb(ClumpletReader::dpbList, 128,
m_masterGbl->gbl_dpb_data.begin(),
ClumpletWriter dpb(ClumpletReader::dpbList, 128,
m_masterGbl->gbl_dpb_data.begin(),
m_masterGbl->gbl_dpb_data.getCount());
dpb.deleteWithTag(isc_dpb_gbak_attach);
@ -1003,7 +1003,7 @@ void RestoreRelationTask::putDirtyBuffer(IOBuffer* buf)
IOBuffer* RestoreRelationTask::renewBuffer(BurpGlobals* tdgbl)
{
// table writer needs new dirty buffer with records
// table writer needs new dirty buffer with records
fb_assert(!tdgbl->master);
@ -1028,7 +1028,7 @@ IOBuffer* RestoreRelationTask::renewBuffer(BurpGlobals* tdgbl)
if (newBuf)
newBuf->lock();
else
else
newBuf = task->getDirtyBuffer();
if (!newBuf)

View File

@ -1,7 +1,7 @@
/*
* PROGRAM: JRD Backup and Restore Program
* MODULE: BurpTasks.h
* DESCRIPTION:
* DESCRIPTION:
*
* The contents of this file are subject to the Interbase Public
* License Version 1.0 (the "License"); you may not use this file

View File

@ -4390,11 +4390,11 @@ void ReadRelationMeta::setRelation(const burp_rel* relation, bool partition)
// Build request BLR. There could be two kind of requests :
// a) partition == true
// SELECT * FROM relation
// WHERE dbkey >= MAKE_DBKEY(rel_id, 0, 0, :loPP)
// AND dbkey < MAKE_DBKEY(rel_id, 0, 0, :hiPP)
// SELECT * FROM relation
// WHERE dbkey >= MAKE_DBKEY(rel_id, 0, 0, :loPP)
// AND dbkey < MAKE_DBKEY(rel_id, 0, 0, :hiPP)
// b) partition = false
// SELECT * FROM relation
// SELECT * FROM relation
// Note, computed fields are not included into results
// CVC: A signed short isn't enough if the engine allows near 32K fields,
@ -4426,7 +4426,7 @@ void ReadRelationMeta::setRelation(const burp_rel* relation, bool partition)
{
add_byte(blr, blr_message);
add_byte(blr, m_inMgsNum); // Message number
add_word(blr, 2); //
add_word(blr, 2); //
add_byte(blr, blr_long); // loPP
add_byte(blr, 0);
add_byte(blr, blr_long); // hiPP

View File

@ -3092,7 +3092,7 @@ static void commit_relation_data(BurpGlobals* tdgbl, burp_rel* relation)
BURP_print_status(false, &tdgbl->status_vector);
FOR(REQUEST_HANDLE req_handle)
IDX IN RDB$INDICES
IDX IN RDB$INDICES
WITH IDX.RDB$INDEX_NAME EQ index_name
{
MODIFY IDX USING
@ -12183,7 +12183,7 @@ bool RestoreRelationTask::fileReader(Item& item)
{
// get record length and decide if it fits into the current buffer
// blobs\arrays is not accounted here
// record is
// record is
// <att_data_length> <len>
// <att_xdr_length> <xdrLen> (optional)
// <att_data_data> <data>
@ -12242,7 +12242,7 @@ bool RestoreRelationTask::fileReader(Item& item)
buf += sizeof(SLONG);
}
*buf++ = att_data_data;
*buf++ = att_data_data;
if (tdgbl->gbl_sw_compress)
len = get_compressed(tdgbl, buf, len);

View File

@ -300,7 +300,7 @@ public:
UCHAR* getBytes()
{
return (UCHAR*)(&v);
return (UCHAR*)(&v);
}
protected:

View File

@ -42,8 +42,8 @@ class Worker;
class Coordinator;
class WorkerThread;
// Task (probably big one), contains parameters, could break whole task by
// smaller items (WorkItem), handle items, track common running state, track
// Task (probably big one), contains parameters, could break whole task by
// smaller items (WorkItem), handle items, track common running state, track
// results and error happens.
class Task
{

View File

@ -74,7 +74,7 @@ void TimerImpl::reset(unsigned int timeout)
MutexLockGuard guard(m_mutex, FB_FUNCTION);
// Start timer if necessary. If timer was already started, don't restart
// (or stop) it - handler() will take care about it.
// (or stop) it - handler() will take care about it.
if (!timeout)
{

View File

@ -1497,13 +1497,13 @@ static bool getMappedFileName(void* addr, PathName& mappedName)
ntLen = strlen(ntDevice);
if (ntLen <= mapLen &&
_memicmp(ntDevice, mapName, ntLen) == 0 &&
if (ntLen <= mapLen &&
_memicmp(ntDevice, mapName, ntLen) == 0 &&
mapName[ntLen] == '\\')
{
mappedName.replace(0, ntLen, dosDevice);
return true;
}
}
}
return false;
@ -1828,8 +1828,8 @@ SharedMemoryBase::SharedMemoryBase(const TEXT* filename, ULONG length, IpcObject
gds__log("Wrong file for memory mapping:\n"
"\t expected %s\n"
"\talready mapped %s\n"
"\tCheck for presence of another Firebird instance with different lock directory",
"\talready mapped %s\n"
"\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();

View File

@ -558,7 +558,7 @@ bool isGlobalKernelPrefix()
}
// Incapsulates Windows private namespace
// Incapsulates Windows private namespace
class PrivateNamespace
{
public:
@ -648,7 +648,7 @@ private:
raiseError("ConvertStringSecurityDescriptorToSecurityDescriptor");
}
Firebird::Cleanup cleanSecDesc( [&sa] {
Firebird::Cleanup cleanSecDesc( [&sa] {
LocalFree(sa.lpSecurityDescriptor);
});

View File

@ -47,7 +47,7 @@ struct TraceCounts
{
// Per-table performance counters, must correspond to RuntimeStatistics::StatType
// between RECORD_FIRST_ITEM and RECORD_LAST_ITEM
enum RecordCounters
enum RecordCounters
{
SEQ_READS = 0,
IDX_READS,

View File

@ -307,7 +307,7 @@ void VerbAction::undo(thread_db* tdbb, jrd_tra* transaction, bool preserveLocks,
if (preserveAction)
RBM_SET(transaction->tra_pool, &preserveAction->vct_records, rpb.rpb_number.getValue());
}
}
else
VIO_backout(tdbb, &rpb, transaction);
}

View File

@ -94,7 +94,7 @@ namespace Jrd
UndoItemTree* vct_undo; // Data for undo records
void mergeTo(thread_db* tdbb, jrd_tra* transaction, VerbAction* nextAction);
void undo(thread_db* tdbb, jrd_tra* transaction, bool preserveLocks,
void undo(thread_db* tdbb, jrd_tra* transaction, bool preserveLocks,
VerbAction* preserveAction);
void garbageCollectIdxLite(thread_db* tdbb, jrd_tra* transaction, SINT64 recordNumber,
VerbAction* nextAction, Record* goingRecord);

View File

@ -1246,7 +1246,7 @@ void makeBinShift(DataTypeUtilBase*, const SysFunction* function, dsc* result,
}
void makeBlobAppend(DataTypeUtilBase* dataTypeUtil, const SysFunction* function, dsc* result,
void makeBlobAppend(DataTypeUtilBase* dataTypeUtil, const SysFunction* function, dsc* result,
int argsCount, const dsc** args)
{
USHORT ttype = CS_dynamic;
@ -2286,7 +2286,7 @@ HUGEINT getScale(impure_value* impure)
}
static void appendFromBlob(thread_db* tdbb, jrd_tra* transaction, blb* blob,
static void appendFromBlob(thread_db* tdbb, jrd_tra* transaction, blb* blob,
const dsc* blobDsc, const dsc* srcDsc)
{
if (!srcDsc->dsc_address)
@ -2307,7 +2307,7 @@ static void appendFromBlob(thread_db* tdbb, jrd_tra* transaction, blb* blob,
Database* dbb = tdbb->getDatabase();
HalfStaticArray<UCHAR, BUFFER_LARGE> buffer;
const SLONG buffSize = (srcBlob->getLevel() == 0) ?
const SLONG buffSize = (srcBlob->getLevel() == 0) ?
MAX(BUFFER_LARGE, srcBlob->blb_length) : dbb->dbb_page_size - BLP_SIZE;
UCHAR* buff = buffer.getBuffer(buffSize);
@ -2320,7 +2320,7 @@ static void appendFromBlob(thread_db* tdbb, jrd_tra* transaction, blb* blob,
}
dsc* evlBlobAppend(thread_db* tdbb, const SysFunction* function, const NestValueArray& args,
dsc* evlBlobAppend(thread_db* tdbb, const SysFunction* function, const NestValueArray& args,
impure_value* impure)
{
Request* request = tdbb->getRequest();

View File

@ -217,7 +217,7 @@ void WorkerAttachment::shutdown()
WorkerAttachment* item = acc.current()->second;
item->clear(false);
delete item;
}
}
while (acc.getNext());
m_map->clear();

View File

@ -40,7 +40,7 @@
#include "../jrd/status.h"
namespace Jrd
namespace Jrd
{
class WorkerStableAttachment : public SysStableAttachment
@ -98,7 +98,7 @@ private:
void clear(bool checkRefs);
typedef Firebird::GenericMap<Firebird::Pair<Firebird::Left<Firebird::PathName, WorkerAttachment*> > >
typedef Firebird::GenericMap<Firebird::Pair<Firebird::Left<Firebird::PathName, WorkerAttachment*> > >
MapDbIdToWorkAtts;
static Firebird::GlobalPtr<Firebird::Mutex> m_mapMutex;

View File

@ -297,7 +297,7 @@ blb* blb::create2(thread_db* tdbb,
else if (request)
{
const Statement* const statement = request->getStatement();
if (statement && statement->sqlText)
if (statement && statement->sqlText)
info = string("By query: ") + *statement->sqlText;
string stack;

View File

@ -3314,11 +3314,11 @@ static rhd* locate_space(thread_db* tdbb,
if ((type == DPM_primary) && relPages->rel_last_free_pri_dp ||
isBlob && relPages->rel_last_free_blb_dp)
{
window->win_page = (type == DPM_primary) ? relPages->rel_last_free_pri_dp :
window->win_page = (type == DPM_primary) ? relPages->rel_last_free_pri_dp :
relPages->rel_last_free_blb_dp;
data_page* dpage = (data_page*) CCH_FETCH(tdbb, window, LCK_write, pag_undefined);
const UCHAR wrongFlags = dpg_orphan |
const UCHAR wrongFlags = dpg_orphan |
((type == DPM_primary) ? dpg_secondary | dpg_large : 0);
const bool pageOk =

View File

@ -349,7 +349,7 @@ public:
try
{
WorkerContextHolder holder(tdbb, FB_FUNCTION);
m_tra = TRA_start(tdbb, creation->transaction->tra_flags,
m_tra = TRA_start(tdbb, creation->transaction->tra_flags,
creation->transaction->tra_lock_timeout);
}
catch (const Exception& ex)
@ -532,7 +532,7 @@ bool IndexCreateTask::handler(WorkItem& _item)
CompilerScratch* csb = NULL;
Jrd::ContextPoolHolder context(tdbb, attachment->createPool());
idx->idx_expression = static_cast<ValueExprNode*> (MET_parse_blob(tdbb, relation, &m_exprBlob,
idx->idx_expression = static_cast<ValueExprNode*> (MET_parse_blob(tdbb, relation, &m_exprBlob,
&csb, &idx->idx_expression_statement, false, false));
delete csb;
@ -759,7 +759,7 @@ bool IndexCreateTask::getWorkItem(WorkItem** pItem)
if (!item)
return false;
item->m_inuse = (m_nextPP < m_countPP) ||
item->m_inuse = (m_nextPP < m_countPP) ||
(item->m_sort && item->m_sort->isSorted()) == 0;
if (item->m_inuse)

View File

@ -7248,7 +7248,7 @@ void DatabaseOptions::get(const UCHAR* dpb, USHORT dpb_length, bool& invalid_cli
dpb_parallel_workers < 0)
{
string str;
str.printf("Wrong parallel workers value %i, valid range are from 1 to %i",
str.printf("Wrong parallel workers value %i, valid range are from 1 to %i",
dpb_parallel_workers, Config::getMaxParallelWorkers());
ERR_post(Arg::Gds(isc_bad_dpb_content) << Arg::Gds(isc_random) << Arg::Str(str));
}

View File

@ -381,8 +381,8 @@ private:
SortOwner* m_owner;
Firebird::HalfStaticArray<sort_control, 8> m_parts;
Firebird::HalfStaticArray<merge_control, 8> m_nodes; // nodes of merge tree
merge_control* m_merge; // root of merge tree
Firebird::HalfStaticArray<merge_control, 8> m_nodes; // nodes of merge tree
merge_control* m_merge; // root of merge tree
};

View File

@ -259,7 +259,7 @@ void ConfigStorage::checkAudit()
}
p[len] = 0;
}
else
else
{
gds__log("Audit configuration file \"%s\" is empty", configFileName.c_str());
return;
@ -444,7 +444,7 @@ struct SlotByOffset
static ULONG generate(const SlotByOffset& i) { return i.offset; }
};
typedef SortedArray<SlotByOffset, EmptyStorage<SlotByOffset>, ULONG, SlotByOffset>
typedef SortedArray<SlotByOffset, EmptyStorage<SlotByOffset>, ULONG, SlotByOffset>
SlotsByOffsetArray;
@ -633,10 +633,10 @@ bool ConfigStorage::validate()
ULONG ConfigStorage::getSessionSize(const TraceSession& session)
{
ULONG ret = 1; // tagEnd
const ULONG sz = 1 + sizeof(ULONG); // sizeof tag + sizeof len
const ULONG sz = 1 + sizeof(ULONG); // sizeof tag + sizeof len
ULONG len = session.ses_name.length();
if (len)
if (len)
ret += sz + len;
if ((len = session.ses_auth.getCount()))

View File

@ -428,7 +428,7 @@ void TraceManager::event_dsql_execute(Attachment* att, jrd_tra* transaction,
TraceConnectionImpl conn(att);
TraceTransactionImpl tran(transaction);
att->att_trace_manager->event_dsql_execute(&conn, transaction ? &tran : NULL, statement,
att->att_trace_manager->event_dsql_execute(&conn, transaction ? &tran : NULL, statement,
started, req_result);
}

View File

@ -210,7 +210,7 @@ bool TraceSvcJrd::changeFlags(ULONG id, int setFlags, int clearFlags)
session.ses_flags |= setFlags;
session.ses_flags &= ~clearFlags;
if (saveFlags != session.ses_flags)
if (saveFlags != session.ses_flags)
storage->updateFlags(session);
return true;

View File

@ -177,7 +177,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 Jrd
{
class SweepTask : public Task
@ -214,7 +214,7 @@ public:
m_lastRelID = att->att_relations->count();
};
virtual ~SweepTask()
virtual ~SweepTask()
{
for (Item** p = m_items.begin(); p < m_items.end(); p++)
delete *p;
@ -232,7 +232,7 @@ public:
m_lastPP(0)
{}
virtual ~Item()
virtual ~Item()
{
if (!m_ownAttach || !m_attStable)
return;
@ -255,7 +255,7 @@ public:
WorkerAttachment::releaseAttachment(&status, m_attStable);
}
SweepTask* getSweepTask() const
SweepTask* getSweepTask() const
{
return reinterpret_cast<SweepTask*> (m_task);
}
@ -334,12 +334,12 @@ public:
}
int getMaxWorkers()
{
return m_items.getCount();
{
return m_items.getCount();
}
private:
// item is handled, get next portion of work and update RelInfo
// item is handled, get next portion of work and update RelInfo
// also, detect if relation is handled completely
// return true if there is some more work to do
bool updateRelInfo(Item* item)

View File

@ -26,7 +26,7 @@
#ifndef JRD_VIO_PROTO_H
#define JRD_VIO_PROTO_H
namespace Jrd
namespace Jrd
{
class jrd_rel;
class jrd_tra;

View File

@ -1231,7 +1231,7 @@ UCHAR* LockManager::alloc(USHORT size, CheckStatusWrapper* statusVector)
if (m_sharedMemory->getHeader()->lhb_used + size > m_sharedMemory->getHeader()->lhb_length)
{
// New table size shouldn't exceed max table length
// New table size shouldn't exceed max table length
if (m_sharedMemory->getHeader()->lhb_length + memorySize > MAX_TABLE_LENGTH)
{
if (m_sharedMemory->getHeader()->lhb_used + size <= MAX_TABLE_LENGTH)

View File

@ -2515,7 +2515,7 @@ FB_BOOLEAN TracePluginImpl::trace_dsql_restart(ITraceDatabaseConnection* connect
{
try
{
log_event_dsql_execute(connection, transaction, statement, true, number,
log_event_dsql_execute(connection, transaction, statement, true, number,
ITracePlugin::RESULT_SUCCESS);
return true;
}