mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 22:43:04 +01:00
Misc
This commit is contained in:
parent
58e589fd9c
commit
4a3d198ade
@ -95,7 +95,7 @@ public:
|
||||
this->specified = o.specified;
|
||||
}
|
||||
|
||||
void operator=(const T& v)
|
||||
void operator =(const T& v)
|
||||
{
|
||||
this->value = v;
|
||||
this->specified = true;
|
||||
|
@ -85,7 +85,7 @@ void DdlNode::executeDdlTrigger(thread_db* tdbb, jrd_tra* transaction,
|
||||
if (attachment->att_flags & ATT_no_db_triggers)
|
||||
return;
|
||||
|
||||
fb_assert(action > 0);
|
||||
fb_assert(action > 0); // first element is NULL
|
||||
DdlTriggerContext context;
|
||||
context.ddlEvent = DDL_TRIGGER_ACTION_NAMES[action];
|
||||
context.objectName = objectName;
|
||||
@ -122,9 +122,7 @@ MetaName DdlNode::nameInMetaCharSet(thread_db* tdbb, const MetaName& name)
|
||||
if (charSet == CS_METADATA || charSet == CS_NONE)
|
||||
return name;
|
||||
|
||||
//Attachment* attachment = tdbb->getAttachment();
|
||||
UCHAR buffer[MAX_SQL_IDENTIFIER_SIZE];
|
||||
|
||||
ULONG len = INTL_convert_bytes(tdbb, CS_METADATA, buffer, MAX_SQL_IDENTIFIER_LEN,
|
||||
charSet, (const BYTE*) name.c_str(), name.length(), ERR_post);
|
||||
buffer[len] = '\0';
|
||||
@ -139,9 +137,7 @@ MetaName DdlNode::nameInUserCharSet(thread_db* tdbb, const MetaName& name)
|
||||
if (charSet == CS_METADATA || charSet == CS_NONE)
|
||||
return name;
|
||||
|
||||
//Attachment* attachment = tdbb->getAttachment();
|
||||
UCHAR buffer[MAX_SQL_IDENTIFIER_SIZE];
|
||||
|
||||
ULONG len = INTL_convert_bytes(tdbb, charSet, buffer, MAX_SQL_IDENTIFIER_LEN,
|
||||
CS_METADATA, (const BYTE*) name.c_str(), name.length(), ERR_post);
|
||||
buffer[len] = '\0';
|
||||
@ -404,7 +400,6 @@ void AlterCharSetNode::execute(thread_db* tdbb, jrd_tra* transaction)
|
||||
MET_dsql_cache_release(tdbb, SYM_intlsym_charset, charSet);
|
||||
}
|
||||
|
||||
//Database* dbb = tdbb->getDatabase();
|
||||
const MetaName metaName(nameInMetaCharSet(tdbb, charSet));
|
||||
bool charSetFound = false;
|
||||
bool collationFound = false;
|
||||
@ -927,7 +922,6 @@ void CreateAlterFunctionNode::storeArgument(thread_db* tdbb, jrd_tra* transactio
|
||||
Arg::Str("DEFAULT in function parameters"));
|
||||
}
|
||||
|
||||
//Database* dbb = tdbb->getDatabase();
|
||||
AutoCacheRequest requestHandle(tdbb, drq_s_func_args2, DYN_REQUESTS);
|
||||
|
||||
STORE (REQUEST_HANDLE requestHandle TRANSACTION_HANDLE transaction)
|
||||
@ -1032,7 +1026,6 @@ void DropFunctionNode::print(string& text, Array<dsql_nod*>& /*nodes*/) const
|
||||
|
||||
void DropFunctionNode::execute(thread_db* tdbb, jrd_tra* transaction)
|
||||
{
|
||||
//Database* dbb = tdbb->getDatabase();
|
||||
const MetaName metaName(nameInMetaCharSet(tdbb, name));
|
||||
|
||||
// run all statements under savepoint control
|
||||
@ -1317,7 +1310,6 @@ void CreateAlterProcedureNode::execute(thread_db* tdbb, jrd_tra* transaction)
|
||||
|
||||
void CreateAlterProcedureNode::executeCreate(thread_db* tdbb, jrd_tra* transaction)
|
||||
{
|
||||
//Database* dbb = tdbb->getDatabase();
|
||||
Attachment* attachment = tdbb->getAttachment();
|
||||
const MetaName metaName(nameInMetaCharSet(tdbb, name));
|
||||
|
||||
@ -1410,7 +1402,6 @@ void CreateAlterProcedureNode::executeCreate(thread_db* tdbb, jrd_tra* transacti
|
||||
bool CreateAlterProcedureNode::executeAlter(thread_db* tdbb, jrd_tra* transaction,
|
||||
bool secondPass, bool runTriggers)
|
||||
{
|
||||
//Attachment* attachment = tdbb->getAttachment();
|
||||
Database* dbb = tdbb->getDatabase();
|
||||
MetaName metaName(nameInMetaCharSet(tdbb, name));
|
||||
|
||||
@ -1948,7 +1939,6 @@ Node* DropProcedureNode::internalDsqlPass()
|
||||
|
||||
void DropProcedureNode::execute(thread_db* tdbb, jrd_tra* transaction)
|
||||
{
|
||||
//Database* dbb = tdbb->getDatabase();
|
||||
MetaName metaName(nameInMetaCharSet(tdbb, name));
|
||||
|
||||
// run all statements under savepoint control
|
||||
@ -2189,7 +2179,6 @@ void CreateAlterTriggerNode::execute(thread_db* tdbb, jrd_tra* transaction)
|
||||
void CreateAlterTriggerNode::executeCreate(thread_db* tdbb, jrd_tra* transaction)
|
||||
{
|
||||
Database* dbb = tdbb->getDatabase();
|
||||
//Attachment* attachment = tdbb->getAttachment();
|
||||
const MetaName metaName(nameInMetaCharSet(tdbb, name));
|
||||
|
||||
executeDdlTrigger(tdbb, transaction, DTW_BEFORE, DDL_TRIGGER_CREATE_TRIGGER, metaName);
|
||||
@ -2225,7 +2214,6 @@ void CreateAlterTriggerNode::executeCreate(thread_db* tdbb, jrd_tra* transaction
|
||||
|
||||
bool CreateAlterTriggerNode::executeAlter(thread_db* tdbb, jrd_tra* transaction, bool runTriggers)
|
||||
{
|
||||
//Attachment* attachment = tdbb->getAttachment();
|
||||
Database* dbb = tdbb->getDatabase();
|
||||
MetaName metaName(nameInMetaCharSet(tdbb, name));
|
||||
bool modified = false;
|
||||
@ -2468,7 +2456,6 @@ Node* DropTriggerNode::internalDsqlPass()
|
||||
|
||||
void DropTriggerNode::execute(thread_db* tdbb, jrd_tra* transaction)
|
||||
{
|
||||
//Database* dbb = tdbb->getDatabase();
|
||||
const MetaName metaName(nameInMetaCharSet(tdbb, name));
|
||||
|
||||
// run all statements under savepoint control
|
||||
|
@ -527,7 +527,6 @@ void CreateAlterPackageNode::executeCreate(thread_db* tdbb, jrd_tra* transaction
|
||||
|
||||
bool CreateAlterPackageNode::executeAlter(thread_db* tdbb, jrd_tra* transaction)
|
||||
{
|
||||
//Attachment* attachment = tdbb->getAttachment();
|
||||
Database* dbb = tdbb->getDatabase();
|
||||
const MetaName metaName(nameInMetaCharSet(tdbb, name));
|
||||
|
||||
@ -602,7 +601,6 @@ void DropPackageNode::print(string& text, Array<dsql_nod*>& /*nodes*/) const
|
||||
|
||||
void DropPackageNode::execute(thread_db* tdbb, jrd_tra* transaction)
|
||||
{
|
||||
//Attachment* attachment = tdbb->getAttachment();
|
||||
Database* dbb = tdbb->getDatabase();
|
||||
MetaName metaName(nameInMetaCharSet(tdbb, name));
|
||||
|
||||
@ -839,7 +837,6 @@ Node* CreatePackageBodyNode::internalDsqlPass()
|
||||
|
||||
void CreatePackageBodyNode::execute(thread_db* tdbb, jrd_tra* transaction)
|
||||
{
|
||||
//Attachment* attachment = tdbb->getAttachment();
|
||||
Database* dbb = tdbb->getDatabase();
|
||||
const MetaName metaName(nameInMetaCharSet(tdbb, name));
|
||||
|
||||
@ -1021,7 +1018,6 @@ void DropPackageBodyNode::print(string& text, Array<dsql_nod*>& /*nodes*/) const
|
||||
|
||||
void DropPackageBodyNode::execute(thread_db* tdbb, jrd_tra* transaction)
|
||||
{
|
||||
//Attachment* attachment = tdbb->getAttachment();
|
||||
Database* dbb = tdbb->getDatabase();
|
||||
const MetaName metaName(nameInMetaCharSet(tdbb, name));
|
||||
|
||||
|
@ -762,7 +762,8 @@ SavepointNode* SavepointNode::internalDsqlPass()
|
||||
// ASF: It should never enter in this IF, because the grammar does not allow it.
|
||||
if (compiledStatement->req_flags & REQ_block) // blocks, procedures and triggers
|
||||
{
|
||||
const char* cmd = 0;
|
||||
const char* cmd = NULL;
|
||||
|
||||
switch (command)
|
||||
{
|
||||
//case CMD_NOTHING:
|
||||
@ -780,6 +781,7 @@ SavepointNode* SavepointNode::internalDsqlPass()
|
||||
break;
|
||||
default:
|
||||
cmd = "UNKNOWN";
|
||||
fb_assert(false);
|
||||
}
|
||||
|
||||
ERRD_post(
|
||||
|
@ -185,7 +185,7 @@ class SavepointNode : public StmtNode
|
||||
public:
|
||||
enum Command
|
||||
{
|
||||
CMD_NOTHING,
|
||||
CMD_NOTHING = -1,
|
||||
CMD_SET = blr_savepoint_set,
|
||||
CMD_RELEASE = blr_savepoint_release,
|
||||
CMD_RELEASE_ONLY = blr_savepoint_release_single,
|
||||
|
@ -72,4 +72,3 @@ void DDL_put_local_variable(Jrd::CompiledStatement*, Jrd::dsql_var*, Jrd::dsql_n
|
||||
void DDL_put_local_variables(Jrd::CompiledStatement*, Jrd::dsql_nod*, SSHORT);
|
||||
|
||||
#endif // DSQL_DDL_PROTO_H
|
||||
|
||||
|
@ -56,4 +56,3 @@ inline void stuff_cstring(Jrd::CompiledStatement* statement, const char* string)
|
||||
}
|
||||
|
||||
#endif // DSQL_GEN_PROTO_H
|
||||
|
||||
|
@ -1674,7 +1674,8 @@ data_type_descriptor : init_data_type data_type
|
||||
}
|
||||
;
|
||||
|
||||
init_data_type :
|
||||
init_data_type
|
||||
:
|
||||
{
|
||||
lex.g_field = make_field(NULL);
|
||||
$$ = lex.g_field;
|
||||
|
@ -10341,7 +10341,6 @@ static bool set_parameter_type(CompiledStatement* statement, dsql_nod* in_node,
|
||||
dsql_nod* node, bool force_varchar)
|
||||
{
|
||||
thread_db* tdbb = JRD_get_thread_data();
|
||||
//Jrd::Attachment* att = tdbb->getAttachment();
|
||||
|
||||
DEV_BLKCHK(in_node, dsql_type_nod);
|
||||
DEV_BLKCHK(node, dsql_type_nod);
|
||||
|
@ -397,7 +397,6 @@ void ExtEngineManager::Function::execute(thread_db* tdbb, jrd_nod* args, impure_
|
||||
EngineAttachmentInfo* attInfo = extManager->getEngineAttachment(tdbb, engine);
|
||||
ContextManager<ExternalFunction> ctxManager(tdbb, attInfo,
|
||||
function); // CallerName(obj_udf, function->fun_name)
|
||||
//Attachment* attachment = tdbb->getAttachment();
|
||||
|
||||
impure->vlu_desc.dsc_flags = DSC_null;
|
||||
MemoryPool& pool = *tdbb->getDefaultPool();
|
||||
@ -582,10 +581,10 @@ void ExtEngineManager::Trigger::execute(thread_db* tdbb, Firebird::ExternalTrigg
|
||||
int valueNewCount = 0;
|
||||
|
||||
if (oldRpb)
|
||||
valueOldCount = setValues(tdbb, pool, attInfo->context, oldValues, descs, oldRpb);
|
||||
valueOldCount = setValues(tdbb, pool, oldValues, descs, oldRpb);
|
||||
|
||||
if (newRpb)
|
||||
valueNewCount = setValues(tdbb, pool, attInfo->context, newValues, descs, newRpb);
|
||||
valueNewCount = setValues(tdbb, pool, newValues, descs, newRpb);
|
||||
|
||||
{ // scope
|
||||
Database::Checkout dcoHolder(tdbb->getDatabase());
|
||||
@ -616,11 +615,9 @@ void ExtEngineManager::Trigger::execute(thread_db* tdbb, Firebird::ExternalTrigg
|
||||
|
||||
|
||||
int ExtEngineManager::Trigger::setValues(thread_db* tdbb, MemoryPool& pool,
|
||||
ExternalContextImpl* /*context*/, AutoPtr<ValuesImpl>& values, Array<dsc*>& descs,
|
||||
AutoPtr<ValuesImpl>& values, Array<dsc*>& descs,
|
||||
record_param* rpb)
|
||||
{
|
||||
//Attachment* attachment = tdbb->getAttachment();
|
||||
|
||||
if (!rpb || !rpb->rpb_record)
|
||||
return 0;
|
||||
|
||||
|
@ -194,7 +194,7 @@ public:
|
||||
record_param* oldRpb, record_param* newRpb);
|
||||
|
||||
private:
|
||||
int setValues(thread_db* tdbb, Firebird::MemoryPool& pool, ExternalContextImpl* context,
|
||||
int setValues(thread_db* tdbb, Firebird::MemoryPool& pool,
|
||||
Firebird::AutoPtr<ValuesImpl>& values, Firebird::Array<dsc*>& descs,
|
||||
record_param* rpb);
|
||||
|
||||
|
@ -2194,7 +2194,6 @@ dsc* evlSetContext(Jrd::thread_db* tdbb, const SysFunction*, Jrd::jrd_nod* args,
|
||||
fb_assert(args->nod_count == 3);
|
||||
|
||||
Jrd::Attachment* attachment = tdbb->getAttachment();
|
||||
//Database* dbb = tdbb->getDatabase();
|
||||
jrd_tra* transaction = tdbb->getTransaction();
|
||||
jrd_req* request = tdbb->getRequest();
|
||||
|
||||
|
@ -94,7 +94,6 @@ bool WindowRsb::get(thread_db* tdbb)
|
||||
if (!RSE_internal_get_record(tdbb, next->rsb_next, NULL, RSE_get_forward))
|
||||
return false;
|
||||
|
||||
//jrd_req* request = tdbb->getRequest();
|
||||
jrd_nod* node = (jrd_nod*) next->rsb_arg[0];
|
||||
jrd_nod* map = node->nod_arg[e_agg_map];
|
||||
|
||||
@ -102,7 +101,6 @@ bool WindowRsb::get(thread_db* tdbb)
|
||||
for (const jrd_nod* const* end = ptr + map->nod_count; ptr < end; ptr++)
|
||||
{
|
||||
jrd_nod* from = (*ptr)->nod_arg[e_asgn_from];
|
||||
//impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + from->nod_impure);
|
||||
|
||||
switch (from->nod_type)
|
||||
{
|
||||
|
@ -1494,7 +1494,6 @@ static bool check_not_null(thread_db* tdbb, SSHORT phase, DeferredWork* work, jr
|
||||
**************************************/
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
//Database* dbb = tdbb->getDatabase();
|
||||
|
||||
Lock* relationLock = NULL;
|
||||
bool releaseRelationLock = false;
|
||||
|
@ -595,7 +595,7 @@ void EXE_execute_ddl_triggers(thread_db* tdbb, jrd_tra* transaction, bool preTri
|
||||
|
||||
if (tdbb->getDatabase()->dbb_ddl_triggers)
|
||||
{
|
||||
jrd_tra* const old_transaction = tdbb->getTransaction();
|
||||
jrd_tra* const oldTransaction = tdbb->getTransaction();
|
||||
tdbb->setTransaction(transaction);
|
||||
|
||||
try
|
||||
@ -617,11 +617,11 @@ void EXE_execute_ddl_triggers(thread_db* tdbb, jrd_tra* transaction, bool preTri
|
||||
execute_triggers(tdbb, &triggersPtr, NULL, NULL,
|
||||
jrd_req::req_trigger_ddl, ALL_TRIGS);
|
||||
|
||||
tdbb->setTransaction(old_transaction);
|
||||
tdbb->setTransaction(oldTransaction);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
tdbb->setTransaction(old_transaction);
|
||||
tdbb->setTransaction(oldTransaction);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ struct CallerName
|
||||
{
|
||||
}
|
||||
|
||||
void operator=(const CallerName& o)
|
||||
void operator =(const CallerName& o)
|
||||
{
|
||||
if (&o != this)
|
||||
{
|
||||
|
@ -91,4 +91,3 @@ namespace Jrd
|
||||
}
|
||||
|
||||
#endif // JRD_VIO_PROTO_H
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user