From: <ro...@us...> - 2010-08-09 11:50:19
|
Revision: 51415 http://firebird.svn.sourceforge.net/firebird/?rev=51415&view=rev Author: robocop Date: 2010-08-09 11:50:12 +0000 (Mon, 09 Aug 2010) Log Message: ----------- Misc. Modified Paths: -------------- firebird/trunk/src/common/classes/Nullable.h firebird/trunk/src/dsql/DdlNodes.epp firebird/trunk/src/dsql/DdlNodes.h firebird/trunk/src/dsql/Nodes.h firebird/trunk/src/msgs/facilities2.sql Modified: firebird/trunk/src/common/classes/Nullable.h =================================================================== --- firebird/trunk/src/common/classes/Nullable.h 2010-08-08 17:07:53 UTC (rev 51414) +++ firebird/trunk/src/common/classes/Nullable.h 2010-08-09 11:50:12 UTC (rev 51415) @@ -28,7 +28,7 @@ #include "../common/classes/MetaName.h" -// Auxiliary template to build a empty value. +// Auxiliary template to build an empty value. template <typename T> // Generic NullableClear class NullableClear { Modified: firebird/trunk/src/dsql/DdlNodes.epp =================================================================== --- firebird/trunk/src/dsql/DdlNodes.epp 2010-08-08 17:07:53 UTC (rev 51414) +++ firebird/trunk/src/dsql/DdlNodes.epp 2010-08-09 11:50:12 UTC (rev 51415) @@ -388,9 +388,7 @@ // the field, subtract 1 to move the fields to their new positions otherwise, // increase the value in RDB$FIELD_POSITION by one. - bool moveDown = false; - if (existingPosition < newPosition) - moveDown = true; + const bool moveDown = (existingPosition < newPosition); // Retrieve the records for the fields which have a position between the // existing field position and the new field position. @@ -836,7 +834,7 @@ setup(dsqlScratch); } -void TypeClause::setup(DsqlCompilerScratch* dsqlScratch) +void TypeClause::setup(DsqlCompilerScratch* /*dsqlScratch*/) { type = legacyField->fld_dtype; length = legacyField->fld_length; @@ -4591,7 +4589,7 @@ void RelationNode::FieldDefinition::modify(thread_db* tdbb, jrd_tra* transaction) { - Attachment* attachment = transaction->tra_attachment; + //Attachment* attachment = transaction->tra_attachment; AutoRequest request; @@ -4869,6 +4867,8 @@ } END_FOR + // Delete de automatically created generator for Identity columns. + request.reset(tdbb, drq_e_lfield, DYN_REQUESTS); found = false; @@ -4939,7 +4939,7 @@ void RelationNode::defineField(thread_db* tdbb, jrd_tra* transaction, const dsql_nod* element, SSHORT position, const dsql_nod* pkCols) { - Attachment* attachment = transaction->tra_attachment; + //Attachment* attachment = transaction->tra_attachment; dsql_fld* field = (dsql_fld*) element->nod_arg[Dsql::e_dfl_field]; // Add the field to the relation being defined for parsing purposes. @@ -5207,7 +5207,7 @@ } // Define a DEFAULT clause. Return true for DEFAULT NULL. -bool RelationNode::defineDefault(thread_db* tdbb, dsql_fld* field, dsql_nod* node, +bool RelationNode::defineDefault(thread_db* tdbb, dsql_fld* /*field*/, dsql_nod* node, string& source, BlrWriter::BlrData& value) { dsql_nod* input = PASS1_node(dsqlScratch, node->nod_arg[Dsql::e_dft_default]); @@ -5496,7 +5496,7 @@ fb_assert(false); } - // These constraints requires creation of an index. + // These constraints require creation of an index. switch (constraint.type) { case Constraint::TYPE_PK: @@ -6102,7 +6102,7 @@ // Generate blr to express: if (old.primary_key != new.primary_key). // Do a column by column comparison. -void RelationNode::stuffTriggerFiringCondition(Constraint& constraint, BlrWriter& blrWriter) +void RelationNode::stuffTriggerFiringCondition(const Constraint& constraint, BlrWriter& blrWriter) { blrWriter.appendUChar(blr_if); @@ -6140,7 +6140,7 @@ void CreateRelationNode::execute(thread_db* tdbb, jrd_tra* transaction) { - Attachment* attachment = transaction->tra_attachment; + //Attachment* attachment = transaction->tra_attachment; saveRelation(tdbb, dsqlScratch, name, false, true); @@ -6280,7 +6280,7 @@ void AlterRelationNode::execute(thread_db* tdbb, jrd_tra* transaction) { - Attachment* attachment = transaction->tra_attachment; + //Attachment* attachment = transaction->tra_attachment; saveRelation(tdbb, dsqlScratch, name, false, false); @@ -6566,7 +6566,7 @@ { Attachment* attachment = transaction->tra_attachment; - DsqlCompiledStatement* statement = dsqlScratch->getStatement(); + //DsqlCompiledStatement* statement = dsqlScratch->getStatement(); dsql_fld* field = (dsql_fld*) element->nod_arg[Dsql::e_mod_fld_type_field]; // Add the field to the relation being defined for parsing purposes. @@ -6634,11 +6634,11 @@ origDom.dyn_fld_source = RFR.RDB$FIELD_SOURCE; // If the original field type is an array, force its blr type to blr_blob. - bool hasDimensions = FLD.RDB$DIMENSIONS != 0; + const bool hasDimensions = FLD.RDB$DIMENSIONS != 0; if (hasDimensions) origDom.dyn_dtype = blr_blob; - bool wasInternalDomain = fb_utils::implicit_domain(origDom.dyn_fld_source.c_str()) && + const bool wasInternalDomain = fb_utils::implicit_domain(origDom.dyn_fld_source.c_str()) && RFR.RDB$BASE_FIELD.NULL; string computedSource; BlrWriter::BlrData computedValue; @@ -7730,7 +7730,7 @@ } // Generate triggers to implement the WITH CHECK OPTION clause for a VIEW. -void CreateAlterViewNode::createCheckTriggers(thread_db* tdbb, jrd_tra* transaction, dsql_nod* items) +void CreateAlterViewNode::createCheckTriggers(thread_db* tdbb, jrd_tra* /*transaction*/, dsql_nod* items) { // Specify that the trigger should abort if the condition is not met. dsql_nod* actionNode = MAKE_node(Dsql::nod_list, 1); @@ -8070,9 +8070,9 @@ // Store an index. void CreateIndexNode::store(thread_db* tdbb, jrd_tra* transaction, MetaName& name, - Definition& definition, MetaName* referredIndexName) + const Definition& definition, MetaName* referredIndexName) { - Attachment* attachment = transaction->tra_attachment; + //Attachment* attachment = transaction->tra_attachment; if (name.isEmpty()) DYN_UTIL_generate_index_name(tdbb, transaction, name, definition.type); Modified: firebird/trunk/src/dsql/DdlNodes.h =================================================================== --- firebird/trunk/src/dsql/DdlNodes.h 2010-08-08 17:07:53 UTC (rev 51414) +++ firebird/trunk/src/dsql/DdlNodes.h 2010-08-09 11:50:12 UTC (rev 51415) @@ -127,7 +127,7 @@ } public: - virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const + virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& /*nodes*/) const { text.printf("RecreateNode\n"); } @@ -439,7 +439,7 @@ class TriggerDefinition { public: - TriggerDefinition(MemoryPool& p) + explicit TriggerDefinition(MemoryPool& p) : name(p), relationName(p), external(NULL), @@ -453,11 +453,11 @@ bool modify(thread_db* tdbb, jrd_tra* transaction); protected: - virtual void preModify(thread_db* tdbb, jrd_tra* transaction) + virtual void preModify(thread_db* /*tdbb*/, jrd_tra* /*transaction*/) { } - virtual void postModify(thread_db* tdbb, jrd_tra* transaction) + virtual void postModify(thread_db* /*tdbb*/, jrd_tra* /*transaction*/) { } @@ -892,7 +892,7 @@ class FieldDefinition { public: - FieldDefinition(MemoryPool& p) + explicit FieldDefinition(MemoryPool& p) : name(p), relationName(p), fieldSource(p), @@ -927,7 +927,7 @@ class BlrWriter : public Jrd::BlrWriter { public: - BlrWriter(MemoryPool& p) + explicit BlrWriter(MemoryPool& p) : Jrd::BlrWriter(p), dsqlScratch(NULL) { @@ -956,7 +956,7 @@ DsqlCompilerScratch* dsqlScratch; }; - Constraint(MemoryPool& p) + explicit Constraint(MemoryPool& p) : PermanentStorage(p), type(TYPE_CHECK), // Just something to initialize. Do not assume it. name(p), @@ -1017,7 +1017,7 @@ void generateUnnamedTriggerBeginning(Constraint& constraint, bool onUpdate, BlrWriter& blrWriter); void stuffDefaultBlr(const Firebird::ByteChunk& defaultBlr, BlrWriter& blrWriter); void stuffMatchingBlr(Constraint& constraint, BlrWriter& blrWriter); - void stuffTriggerFiringCondition(Constraint& constraint, BlrWriter& blrWriter); + void stuffTriggerFiringCondition(const Constraint& constraint, BlrWriter& blrWriter); public: dsql_nod* dsqlNode; @@ -1200,7 +1200,7 @@ }; static void store(thread_db* tdbb, jrd_tra* transaction, Firebird::MetaName& name, - Definition& definition, Firebird::MetaName* referredIndexName = NULL); + const Definition& definition, Firebird::MetaName* referredIndexName = NULL); }; Modified: firebird/trunk/src/dsql/Nodes.h =================================================================== --- firebird/trunk/src/dsql/Nodes.h 2010-08-08 17:07:53 UTC (rev 51414) +++ firebird/trunk/src/dsql/Nodes.h 2010-08-09 11:50:12 UTC (rev 51415) @@ -28,7 +28,7 @@ #include "../dsql/node.h" #include "../dsql/Visitors.h" #include "../common/classes/array.h" -#include "../common/classes/ByteChunk.h" +//#include "../common/classes/ByteChunk.h" namespace Jrd { @@ -145,15 +145,15 @@ { if (create && alter) return createOrAlterCode; - else if (create) + + if (create) return createCode; - else if (alter) + + if (alter) return alterCode; - else - { - fb_assert(false); - return 0; - } + + fb_assert(false); + return 0; } void executeDdlTrigger(thread_db* tdbb, jrd_tra* transaction, Modified: firebird/trunk/src/msgs/facilities2.sql =================================================================== --- firebird/trunk/src/msgs/facilities2.sql 2010-08-08 17:07:53 UTC (rev 51414) +++ firebird/trunk/src/msgs/facilities2.sql 2010-08-09 11:50:12 UTC (rev 51415) @@ -1,7 +1,7 @@ /* MAX_NUMBER is the next number to be used, always one more than the highest message number. */ set bulk_insert INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES (?, ?, ?, ?); -- -('2010-02-25 12:40:00', 'JRD', 0, 700) +('2010-08-01 12:40:00', 'JRD', 0, 700) ('2010-03-15 06:59:09', 'QLI', 1, 531) -- --('2008-11-28 20:27:04', 'GDEF', 2, 346) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |