mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 16:03:02 +01:00
Misc.
This commit is contained in:
parent
a6d871184b
commit
514fe7355f
@ -269,7 +269,8 @@ public:
|
||||
|
||||
static size_t hash(const DeferredWork& work, size_t hashSize)
|
||||
{
|
||||
char key[sizeof work.dfw_type + sizeof work.dfw_id + 32];
|
||||
const int nameLimit = 32;
|
||||
char key[sizeof work.dfw_type + sizeof work.dfw_id + nameLimit];
|
||||
memset(key, 0, sizeof key);
|
||||
char* place = key;
|
||||
|
||||
@ -279,7 +280,7 @@ public:
|
||||
memcpy(place, &work.dfw_id, sizeof work.dfw_id);
|
||||
place += sizeof work.dfw_id;
|
||||
|
||||
work.dfw_name.copyTo(place, 32); // It's good enough to have first 32 bytes
|
||||
work.dfw_name.copyTo(place, nameLimit); // It's good enough to have first 32 bytes
|
||||
|
||||
return DefaultHash<DeferredWork>::hash(key, sizeof key, hashSize);
|
||||
}
|
||||
@ -376,6 +377,8 @@ static bool grant_privileges(thread_db*, SSHORT, DeferredWork*, jrd_tra*);
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
||||
static bool create_expression_index(thread_db* tdbb, SSHORT phase, DeferredWork* work,
|
||||
jrd_tra* transaction);
|
||||
static void check_computed_dependencies(thread_db* tdbb, jrd_tra* transaction,
|
||||
const Firebird::MetaName& fieldName);
|
||||
static void check_dependencies(thread_db*, const TEXT*, const TEXT*, int, jrd_tra*);
|
||||
@ -1501,7 +1504,7 @@ static bool user_management(thread_db* tdbb,
|
||||
}
|
||||
|
||||
|
||||
bool grant_privileges(thread_db* tdbb, SSHORT phase, DeferredWork* work, jrd_tra* transaction)
|
||||
static bool grant_privileges(thread_db* tdbb, SSHORT phase, DeferredWork* work, jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1531,7 +1534,8 @@ bool grant_privileges(thread_db* tdbb, SSHORT phase, DeferredWork* work, jrd_tra
|
||||
}
|
||||
|
||||
|
||||
bool create_expression_index(thread_db* tdbb, SSHORT phase, DeferredWork* work, jrd_tra* transaction)
|
||||
static bool create_expression_index(thread_db* tdbb, SSHORT phase, DeferredWork* work,
|
||||
jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -4134,7 +4138,7 @@ static bool find_depend_in_dfw(thread_db* tdbb,
|
||||
}
|
||||
|
||||
// Look to see if an object of the desired type is being deleted.
|
||||
for (DeferredWork* work = transaction->tra_deferred_job->work; work; work = work->getNext())
|
||||
for (const DeferredWork* work = transaction->tra_deferred_job->work; work; work = work->getNext())
|
||||
{
|
||||
if ((work->dfw_type == dfw_type ||
|
||||
(work->dfw_type == dfw_modify_procedure && dfw_type == dfw_delete_procedure)) &&
|
||||
@ -4154,7 +4158,7 @@ static bool find_depend_in_dfw(thread_db* tdbb,
|
||||
{
|
||||
for (size_t i = 0; i < work->dfw_args.getCount(); ++i)
|
||||
{
|
||||
DeferredWork* arg = work->dfw_args[i];
|
||||
const DeferredWork* arg = work->dfw_args[i];
|
||||
if (arg->dfw_type == dfw_arg_index_name &&
|
||||
arg->dfw_name == object_name)
|
||||
{
|
||||
|
@ -200,8 +200,8 @@ void PCMET_expression_index(thread_db* tdbb, const string& name, USHORT id, jrd_
|
||||
|
||||
fb_assert(id <= dbb->dbb_max_idx);
|
||||
idx.idx_id = id;
|
||||
IDX_create_index(tdbb, relation, &idx, name.c_str(), &id,
|
||||
transaction, selectivity);
|
||||
IDX_create_index(tdbb, relation, &idx, name.c_str(), &id, transaction, selectivity);
|
||||
|
||||
fb_assert(id == idx.idx_id);
|
||||
|
||||
TRA_detach_request(idx.idx_expression_request);
|
||||
|
Loading…
Reference in New Issue
Block a user