diff --git a/doc/sql.extensions/README.ddl_triggers.txt b/doc/sql.extensions/README.ddl_triggers.txt index e326591574..4e01a5b848 100644 --- a/doc/sql.extensions/README.ddl_triggers.txt +++ b/doc/sql.extensions/README.ddl_triggers.txt @@ -91,7 +91,7 @@ Semantics: FUNCTION} triggers. Notes: - 1) COMMENT ON, GRANT, REVOKE and ALTER DATABASE does not fire DDL triggers. + 1) COMMENT ON, GRANT, REVOKE and ALTER DATABASE do not fire DDL triggers. Utilities support: DDL triggers is a type of database triggers, so the parameters -nodbtriggers (GBAK and ISQL) diff --git a/src/dsql/ExprNodes.cpp b/src/dsql/ExprNodes.cpp index f74b6b2b85..11bfc891d7 100644 --- a/src/dsql/ExprNodes.cpp +++ b/src/dsql/ExprNodes.cpp @@ -1508,7 +1508,7 @@ dsc* ArithmeticNode::add(const dsc* desc, impure_value* value, const ValueExprNo const SLONG l1 = MOV_get_long(desc, node->nodScale); const SINT64 l2 = MOV_get_long(&value->vlu_desc, node->nodScale); - SINT64 rc = (blrOp == blr_subtract) ? l2 - l1 : l2 + l1; + const SINT64 rc = (blrOp == blr_subtract) ? l2 - l1 : l2 + l1; if (rc < MIN_SLONG || rc > MAX_SLONG) ERR_post(Arg::Gds(isc_exception_integer_overflow)); @@ -10395,7 +10395,8 @@ DmlNode* UdfCallNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb->csb_blr_reader.setPos(savePos); return SysFuncCallNode::parse(tdbb, pool, csb, blr_sys_function); } - else if (blrOp == blr_subfunc) + + if (blrOp == blr_subfunc) { DeclareSubFuncNode* declareNode; if (csb->subFunctions.get(name.identifier, declareNode)) diff --git a/src/jrd/opt.cpp b/src/jrd/opt.cpp index 28e8f03878..42d04dedd7 100644 --- a/src/jrd/opt.cpp +++ b/src/jrd/opt.cpp @@ -689,7 +689,7 @@ RecordSource* OPT_compile(thread_db* tdbb, CompilerScratch* csb, RseNode* rse, nodeBase = opt->opt_base_conjuncts; } - fb_assert(nodeBase >= 0 && j >= 0); + fb_assert(nodeBase >= 0 && j >= 0 && nodeBase + j < MAX_CONJUNCTS); opt->opt_conjuncts[nodeBase + j].opt_conjunct_node = node; }