From: <asf...@us...> - 2011-02-18 00:52:16
|
Revision: 52391 http://firebird.svn.sourceforge.net/firebird/?rev=52391&view=rev Author: asfernandes Date: 2011-02-18 00:52:10 +0000 (Fri, 18 Feb 2011) Log Message: ----------- Misc Modified Paths: -------------- firebird/trunk/doc/sql.extensions/README.execute_statement2 firebird/trunk/src/dsql/ExprNodes.cpp firebird/trunk/src/dsql/gen.cpp firebird/trunk/src/dsql/make.cpp firebird/trunk/src/jrd/Database.h firebird/trunk/src/jrd/DatabaseSnapshot.h firebird/trunk/src/jrd/UserManagement.h firebird/trunk/src/jrd/btr.cpp Modified: firebird/trunk/doc/sql.extensions/README.execute_statement2 =================================================================== --- firebird/trunk/doc/sql.extensions/README.execute_statement2 2011-02-17 17:40:27 UTC (rev 52390) +++ firebird/trunk/doc/sql.extensions/README.execute_statement2 2011-02-18 00:52:10 UTC (rev 52391) @@ -86,8 +86,8 @@ CURRENT_USER/CURRENT_ROLE is effective user account and role a3) for remote database - operating system account under which engine process is currently run is effective user account. - b) else isc_dpb_user_name (if <user_name> is present and not empty) and isc_dpb_sql_role_name - (if <role_name> is present and not empty) will be filled in DPB and native autentication + b) else isc_dpb_user_name (if <user_name> is present and not empty) and isc_dpb_sql_role_name + (if <role_name> is present and not empty) will be filled in DPB and native autentication is performed. - if WITH CALLER PRIVILEGES is specified and ON EXTERNAL DATA SOURCE is omitted, then Modified: firebird/trunk/src/dsql/ExprNodes.cpp =================================================================== --- firebird/trunk/src/dsql/ExprNodes.cpp 2011-02-17 17:40:27 UTC (rev 52390) +++ firebird/trunk/src/dsql/ExprNodes.cpp 2011-02-18 00:52:10 UTC (rev 52391) @@ -2733,10 +2733,11 @@ { FieldNode* fieldNode = other->as<FieldNode>(); + dsc desc1, desc2; + getDesc(tdbb, csb, &desc1); + if (fieldNode) { - dsc desc1, desc2; - getDesc(tdbb, csb, &desc1); fieldNode->getDesc(tdbb, csb, &desc2); if (DSC_EQUIV(&desc1, &desc2, true) && source->sameAs(tdbb, csb, fieldNode)) @@ -2749,9 +2750,6 @@ CastNode* o = other->as<CastNode>(); fb_assert(o); - dsc desc1, desc2; - - getDesc(tdbb, csb, &desc1); o->getDesc(tdbb, csb, &desc2); return DSC_EQUIV(&desc1, &desc2, true) && source->sameAs(tdbb, csb, o->source); Modified: firebird/trunk/src/dsql/gen.cpp =================================================================== --- firebird/trunk/src/dsql/gen.cpp 2011-02-17 17:40:27 UTC (rev 52390) +++ firebird/trunk/src/dsql/gen.cpp 2011-02-18 00:52:10 UTC (rev 52391) @@ -115,51 +115,41 @@ **/ void GEN_expr(DsqlCompilerScratch* dsqlScratch, dsql_nod* node) { - switch (node->nod_type) + if (node->nod_type == nod_class_exprnode) { - case nod_class_exprnode: + ExprNode* exprNode = reinterpret_cast<ExprNode*>(node->nod_arg[0]); + + if (exprNode->is<RseNode>()) { - ExprNode* exprNode = reinterpret_cast<ExprNode*>(node->nod_arg[0]); + GEN_rse(dsqlScratch, node); + return; + } - if (exprNode->is<RseNode>()) - { - GEN_rse(dsqlScratch, node); - return; - } + exprNode->genBlr(dsqlScratch); - exprNode->genBlr(dsqlScratch); + // Check whether the node we just processed is for a dialect 3 + // operation which gives a different result than the corresponding + // operation in dialect 1. If it is, and if the client dialect is 2, + // issue a warning about the difference. - // Check whether the node we just processed is for a dialect 3 - // operation which gives a different result than the corresponding - // operation in dialect 1. If it is, and if the client dialect is 2, - // issue a warning about the difference. + // ASF: Shouldn't we check nod_gen_id2 too? - // ASF: Shouldn't we check nod_gen_id2 too? + if (exprNode->dsqlCompatDialectVerb && + dsqlScratch->clientDialect == SQL_DIALECT_V6_TRANSITION) + { + dsc desc; + MAKE_desc(dsqlScratch, &desc, node); - if (exprNode->dsqlCompatDialectVerb && - dsqlScratch->clientDialect == SQL_DIALECT_V6_TRANSITION) + if (desc.dsc_dtype == dtype_int64) { - dsc desc; - MAKE_desc(dsqlScratch, &desc, node); - - if (desc.dsc_dtype == dtype_int64) - { - ERRD_post_warning( - Arg::Warning(isc_dsql_dialect_warning_expr) << - Arg::Str(exprNode->dsqlCompatDialectVerb)); - } + ERRD_post_warning( + Arg::Warning(isc_dsql_dialect_warning_expr) << + Arg::Str(exprNode->dsqlCompatDialectVerb)); } - - return; } - - case nod_assign: - dsqlScratch->appendUChar(blr_assignment); - GEN_expr(dsqlScratch, node->nod_arg[0]); - GEN_expr(dsqlScratch, node->nod_arg[1]); - return; - - default: + } + else + { ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-901) << Arg::Gds(isc_dsql_internal_err) << // expression evaluation not supported Modified: firebird/trunk/src/dsql/make.cpp =================================================================== --- firebird/trunk/src/dsql/make.cpp 2011-02-17 17:40:27 UTC (rev 52390) +++ firebird/trunk/src/dsql/make.cpp 2011-02-18 00:52:10 UTC (rev 52391) @@ -483,8 +483,8 @@ DEV_BLKCHK(indices, dsql_type_nod); thread_db* const tdbb = JRD_get_thread_data(); - FieldNode* const node = - FB_NEW(*tdbb->getDefaultPool()) FieldNode(*tdbb->getDefaultPool(), context, field, indices); + FieldNode* const node = FB_NEW(*tdbb->getDefaultPool()) FieldNode( + *tdbb->getDefaultPool(), context, field, indices); if (field->fld_dimensions) { @@ -785,10 +785,6 @@ **/ void MAKE_parameter_names(dsql_par* parameter, const dsql_nod* item) { - const dsql_ctx* context = NULL; - const dsql_str* string; - const dsql_nod* alias; - fb_assert(parameter && item); if (item->nod_type == nod_class_exprnode) Modified: firebird/trunk/src/jrd/Database.h =================================================================== --- firebird/trunk/src/jrd/Database.h 2011-02-17 17:40:27 UTC (rev 52390) +++ firebird/trunk/src/jrd/Database.h 2011-02-18 00:52:10 UTC (rev 52391) @@ -396,13 +396,12 @@ struct ValueCache { - Lock* lock; - SLONG curVal; - SLONG maxVal; + Lock* lock; // lock which holds shared counter value + SLONG curVal; // current value of shared counter lock + SLONG maxVal; // maximum cached value of shared counter lock }; public: - enum { ATTACHMENT_ID_SPACE = 0, @@ -417,7 +416,6 @@ void shutdown(thread_db* tdbb); private: - static int blockingAst(void* arg); ValueCache m_counters[TOTAL_ITEMS]; Modified: firebird/trunk/src/jrd/DatabaseSnapshot.h =================================================================== --- firebird/trunk/src/jrd/DatabaseSnapshot.h 2011-02-17 17:40:27 UTC (rev 52390) +++ firebird/trunk/src/jrd/DatabaseSnapshot.h 2011-02-18 00:52:10 UTC (rev 52391) @@ -278,6 +278,7 @@ : VirtualTableScan(csb, name, stream) {} +protected: const Format* getFormat(thread_db* tdbb, jrd_rel* relation) const; bool retrieveRecord(thread_db* tdbb, jrd_rel* relation, FB_UINT64 position, Record* record) const; }; Modified: firebird/trunk/src/jrd/UserManagement.h =================================================================== --- firebird/trunk/src/jrd/UserManagement.h 2011-02-17 17:40:27 UTC (rev 52390) +++ firebird/trunk/src/jrd/UserManagement.h 2011-02-18 00:52:10 UTC (rev 52391) @@ -45,6 +45,7 @@ : VirtualTableScan(csb, name, stream) {} +protected: const Format* getFormat(thread_db* tdbb, jrd_rel* relation) const; bool retrieveRecord(thread_db* tdbb, jrd_rel* relation, FB_UINT64 position, Record* record) const; }; Modified: firebird/trunk/src/jrd/btr.cpp =================================================================== --- firebird/trunk/src/jrd/btr.cpp 2011-02-17 17:40:27 UTC (rev 52390) +++ firebird/trunk/src/jrd/btr.cpp 2011-02-18 00:52:10 UTC (rev 52391) @@ -3812,7 +3812,7 @@ for (keyList::iterator itr = jumpKeys.begin(); itr < jumpKeys.end(); ++itr) { delete[] (*itr)->keyData; - delete (*itr); + delete *itr; } } // try catch (const Firebird::Exception& ex) @@ -3829,12 +3829,10 @@ // If index flush fails, try to delete the index tree. // If the index delete fails, just go ahead and punt. - try { - + try + { if (error) - { ERR_punt(); - } CCH_flush(tdbb, FLUSH_ALL, 0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |