From 105bb191149a36b1dc828ae76899b7babef4dd6b Mon Sep 17 00:00:00 2001 From: robocop Date: Thu, 24 Dec 2009 12:56:31 +0000 Subject: [PATCH] Shortcut. --- src/dsql/StmtNodes.cpp | 2 +- src/dsql/dsql.cpp | 6 +++--- src/dsql/dsql.h | 1 + src/dsql/pass1.cpp | 3 +-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dsql/StmtNodes.cpp b/src/dsql/StmtNodes.cpp index d1a7b97bc1..7a4af33823 100644 --- a/src/dsql/StmtNodes.cpp +++ b/src/dsql/StmtNodes.cpp @@ -968,7 +968,7 @@ SuspendNode* SuspendNode::internalDsqlPass() Arg::Gds(isc_dsql_unsupported_in_auto_trans) << Arg::Str("SUSPEND")); } - statement->setFlags(statement->getFlags() | DsqlCompiledStatement::FLAG_SELECTABLE); + statement->addFlags(DsqlCompiledStatement::FLAG_SELECTABLE); blockNode = statement->getBlockNode(); diff --git a/src/dsql/dsql.cpp b/src/dsql/dsql.cpp index d35bab5238..acfbde4630 100644 --- a/src/dsql/dsql.cpp +++ b/src/dsql/dsql.cpp @@ -2652,9 +2652,9 @@ static dsql_req* prepareStatement(thread_db* tdbb, dsql_dbb* database, jrd_tra* default: if (client_dialect > SQL_DIALECT_V5) - statement->setFlags(statement->getFlags() | DsqlCompiledStatement::FLAG_BLR_VERSION5); + statement->addFlags(DsqlCompiledStatement::FLAG_BLR_VERSION5); else - statement->setFlags(statement->getFlags() | DsqlCompiledStatement::FLAG_BLR_VERSION4); + statement->addFlags(DsqlCompiledStatement::FLAG_BLR_VERSION4); GEN_request(request, scratch, node); // fall into @@ -2864,7 +2864,7 @@ static void release_request(thread_db* tdbb, dsql_req* request, bool drop) for (size_t i = 0; i < request->cursors.getCount(); ++i) { DsqlCompiledStatement* child = request->cursors[i]; - child->setFlags(child->getFlags() | DsqlCompiledStatement::FLAG_ORPHAN); + child->addFlags(DsqlCompiledStatement::FLAG_ORPHAN); child->setParentRequest(NULL); Jrd::ContextPoolHolder context(tdbb, &child->getPool()); diff --git a/src/dsql/dsql.h b/src/dsql/dsql.h index 63bdb54076..6ac0770ea6 100644 --- a/src/dsql/dsql.h +++ b/src/dsql/dsql.h @@ -414,6 +414,7 @@ public: ULONG getFlags() const { return flags; } void setFlags(ULONG value) { flags = value; } + void addFlags(ULONG value) { flags |= value; } Firebird::RefStrPtr& getSqlText() { return sqlText; } const Firebird::RefStrPtr& getSqlText() const { return sqlText; } diff --git a/src/dsql/pass1.cpp b/src/dsql/pass1.cpp index 2fdd6b1db6..32d358092d 100644 --- a/src/dsql/pass1.cpp +++ b/src/dsql/pass1.cpp @@ -1759,8 +1759,7 @@ dsql_nod* PASS1_statement(DsqlCompilerScratch* dsqlScratch, dsql_nod* input) if (input->nod_arg[e_select_update]) { dsqlScratch->getStatement()->setType(DsqlCompiledStatement::TYPE_SELECT_UPD); - dsqlScratch->getStatement()->setFlags(dsqlScratch->getStatement()->getFlags() | - DsqlCompiledStatement::FLAG_NO_BATCH); + dsqlScratch->getStatement()->addFlags(DsqlCompiledStatement::FLAG_NO_BATCH); break; }