mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 02:03:04 +01:00
Misc
This commit is contained in:
parent
222d02cb16
commit
26a79e3c6e
@ -1786,15 +1786,16 @@ dsql_nod* PASS1_statement(CompiledStatement* statement, dsql_nod* input)
|
||||
// process various optional arguments
|
||||
if (input->nod_arg[e_exec_stmt_options])
|
||||
{
|
||||
dsql_nod *list = input->nod_arg[e_exec_stmt_options];
|
||||
dsql_nod* list = input->nod_arg[e_exec_stmt_options];
|
||||
fb_assert(list->nod_type == nod_list);
|
||||
|
||||
dsql_nod **ptr = list->nod_arg;
|
||||
const dsql_nod *const *end = list->nod_arg + list->nod_count;
|
||||
for (; ptr < end; ptr++)
|
||||
const dsql_nod* const* end = list->nod_arg + list->nod_count;
|
||||
|
||||
for (dsql_nod** ptr = list->nod_arg;; ptr < end; ptr++)
|
||||
{
|
||||
char *dupClause = NULL;
|
||||
dsql_nod *opt = *ptr;
|
||||
char* dupClause = NULL;
|
||||
dsql_nod* opt = *ptr;
|
||||
|
||||
switch (opt->nod_type)
|
||||
{
|
||||
case nod_exec_stmt_datasrc:
|
||||
|
@ -453,9 +453,9 @@ void CMP_verify_access(thread_db* tdbb, jrd_req* request)
|
||||
// When external SP's will be introduced we need to decide if they also can
|
||||
// inherit caller's privileges
|
||||
jrd_tra* transaction = tdbb->getTransaction();
|
||||
const jrd_req *exec_stmt_caller =
|
||||
const jrd_req* exec_stmt_caller =
|
||||
(transaction && transaction->tra_callback_count && !request->req_caller) ?
|
||||
transaction->tra_callback_caller : NULL;
|
||||
transaction->tra_callback_caller : NULL;
|
||||
|
||||
for (const AccessItem* access = request->req_access.begin(); access < request->req_access.end();
|
||||
access++)
|
||||
|
@ -672,7 +672,9 @@ void Statement::prepare(thread_db *tdbb, Transaction *tran, const string& sql, b
|
||||
// already prepared the same non-empty statement
|
||||
if (isAllocated() && (m_sql == sql) && (m_sql != "") &&
|
||||
m_preparedByReq == (m_callerPrivileges ? tdbb->getRequest() : NULL))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_error = false;
|
||||
m_transaction = tran;
|
||||
|
@ -159,7 +159,7 @@ void InternalConnection::detach(thread_db *tdbb)
|
||||
{
|
||||
ISC_STATUS_ARRAY status = {0};
|
||||
|
||||
{
|
||||
{ // scope
|
||||
Attachment* att = m_attachment;
|
||||
m_attachment = NULL;
|
||||
|
||||
@ -168,6 +168,7 @@ void InternalConnection::detach(thread_db *tdbb)
|
||||
|
||||
m_attachment = att;
|
||||
}
|
||||
|
||||
if (status[1]) {
|
||||
raise(status, tdbb, "dettach");
|
||||
}
|
||||
@ -182,7 +183,7 @@ void InternalConnection::detach(thread_db *tdbb)
|
||||
bool InternalConnection::isAvailable(thread_db *tdbb, TraScope traScope) const
|
||||
{
|
||||
return !m_isCurrent ||
|
||||
m_isCurrent && (tdbb->getAttachment() == m_attachment);
|
||||
(m_isCurrent && (tdbb->getAttachment() == m_attachment));
|
||||
}
|
||||
|
||||
bool InternalConnection::isSameDatabase(thread_db *tdbb, const Firebird::string &dbName,
|
||||
@ -309,7 +310,7 @@ void InternalStatement::doPrepare(thread_db *tdbb, const string &sql)
|
||||
|
||||
{
|
||||
EngineCallbackGuard guard(tdbb, *this);
|
||||
|
||||
|
||||
jrd_req* save_caller = tran->tra_callback_caller;
|
||||
tran->tra_callback_caller = m_callerPrivileges ? tdbb->getRequest() : NULL;
|
||||
|
||||
|
@ -522,7 +522,7 @@ protected:
|
||||
virtual Transaction* doCreateTransaction();
|
||||
virtual Statement* doCreateStatement();
|
||||
|
||||
IscProvider &m_iscProvider;
|
||||
IscProvider& m_iscProvider;
|
||||
FB_API_HANDLE m_handle;
|
||||
};
|
||||
|
||||
|
@ -52,7 +52,7 @@ class LockManager : public Firebird::RefCounted, public Firebird::GlobalStorage
|
||||
public:
|
||||
static LockManager* create(const Firebird::PathName&);
|
||||
|
||||
bool initializeOwner(thread_db*, LOCK_OWNER_T, UCHAR, SLONG *);
|
||||
bool initializeOwner(thread_db*, LOCK_OWNER_T, UCHAR, SLONG*);
|
||||
void shutdownOwner(thread_db*, SLONG *);
|
||||
bool setOwnerHandle(SLONG, SLONG);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user