From: <fir...@us...> - 2011-05-27 03:19:04
|
Revision: 53019 http://firebird.svn.sourceforge.net/firebird/?rev=53019&view=rev Author: firebirds Date: 2011-05-27 03:18:57 +0000 (Fri, 27 May 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-05-27 02:05:27 UTC (rev 53018) +++ firebird/trunk/ChangeLog 2011-05-27 03:18:57 UTC (rev 53019) @@ -1,3 +1,12 @@ + 2011-05-27 02:05 asfernandes + M src/dsql/DdlNodes.epp + M src/dsql/DsqlCompilerScratch.cpp + M src/dsql/ddl.cpp + M src/dsql/dsql.h + M src/dsql/metd.epp + M src/dsql/parse.y +Frontported changes of CORE-3491. + 2011-05-25 12:59 alexpeshkoff M lang_helpers/gds_codes.ftn M lang_helpers/gds_codes.pas Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-05-27 02:05:27 UTC (rev 53018) +++ firebird/trunk/src/jrd/build_no.h 2011-05-27 03:18:57 UTC (rev 53019) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29393 + FORMAL BUILD NUMBER:29394 */ -#define PRODUCT_VER_STRING "3.0.0.29393" -#define FILE_VER_STRING "WI-T3.0.0.29393" -#define LICENSE_VER_STRING "WI-T3.0.0.29393" -#define FILE_VER_NUMBER 3, 0, 0, 29393 +#define PRODUCT_VER_STRING "3.0.0.29394" +#define FILE_VER_STRING "WI-T3.0.0.29394" +#define LICENSE_VER_STRING "WI-T3.0.0.29394" +#define FILE_VER_NUMBER 3, 0, 0, 29394 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29393" +#define FB_BUILD_NO "29394" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-05-27 02:05:27 UTC (rev 53018) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-05-27 03:18:57 UTC (rev 53019) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29393 +BuildNum=29394 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hv...@us...> - 2011-05-27 07:57:25
|
Revision: 53021 http://firebird.svn.sourceforge.net/firebird/?rev=53021&view=rev Author: hvlad Date: 2011-05-27 07:57:16 +0000 (Fri, 27 May 2011) Log Message: ----------- Enabled background threads (garbage collector and cache writer). Introduced special kind of system attachments used in this threads and show its activity in monitoring. Modified Paths: -------------- firebird/trunk/builds/win32/msvc10/engine.vcxproj firebird/trunk/builds/win32/msvc10/engine.vcxproj.filters firebird/trunk/builds/win32/msvc8/engine.vcproj firebird/trunk/builds/win32/msvc9/engine.vcproj firebird/trunk/src/common/common.h firebird/trunk/src/jrd/Attachment.h firebird/trunk/src/jrd/Database.h firebird/trunk/src/jrd/DatabaseSnapshot.cpp firebird/trunk/src/jrd/DatabaseSnapshot.h firebird/trunk/src/jrd/EngineInterface.h firebird/trunk/src/jrd/Relation.cpp firebird/trunk/src/jrd/Relation.h firebird/trunk/src/jrd/cch.cpp firebird/trunk/src/jrd/cch.h firebird/trunk/src/jrd/cch_proto.h firebird/trunk/src/jrd/dfw.epp firebird/trunk/src/jrd/dpm.epp firebird/trunk/src/jrd/jrd.cpp firebird/trunk/src/jrd/req.h firebird/trunk/src/jrd/tra.cpp firebird/trunk/src/jrd/vio.cpp firebird/trunk/src/jrd/vio_proto.h Added Paths: ----------- firebird/trunk/src/jrd/GarbageCollector.cpp firebird/trunk/src/jrd/GarbageCollector.h Modified: firebird/trunk/builds/win32/msvc10/engine.vcxproj =================================================================== --- firebird/trunk/builds/win32/msvc10/engine.vcxproj 2011-05-27 03:27:46 UTC (rev 53020) +++ firebird/trunk/builds/win32/msvc10/engine.vcxproj 2011-05-27 07:57:16 UTC (rev 53021) @@ -82,6 +82,7 @@ <ClCompile Include="..\..\..\src\jrd\ExtEngineManager.cpp" /> <ClCompile Include="..\..\..\src\jrd\filters.cpp" /> <ClCompile Include="..\..\..\src\jrd\flu.cpp" /> + <ClCompile Include="..\..\..\src\jrd\GarbageCollector.cpp" /> <ClCompile Include="..\..\..\src\jrd\GlobalRWLock.cpp" /> <ClCompile Include="..\..\..\src\jrd\idx.cpp" /> <ClCompile Include="..\..\..\src\jrd\inf.cpp" /> @@ -247,6 +248,7 @@ <ClInclude Include="..\..\..\src\jrd\flu_proto.h" /> <ClInclude Include="..\..\..\src\jrd\Function.h" /> <ClInclude Include="..\..\..\src\jrd\fun_proto.h" /> + <ClInclude Include="..\..\..\src\jrd\GarbageCollector.h" /> <ClInclude Include="..\..\..\src\jrd\GlobalRWLock.h" /> <ClInclude Include="..\..\..\src\jrd\grant_proto.h" /> <ClInclude Include="..\..\..\src\jrd\ibase.h" /> Modified: firebird/trunk/builds/win32/msvc10/engine.vcxproj.filters =================================================================== --- firebird/trunk/builds/win32/msvc10/engine.vcxproj.filters 2011-05-27 03:27:46 UTC (rev 53020) +++ firebird/trunk/builds/win32/msvc10/engine.vcxproj.filters 2011-05-27 07:57:16 UTC (rev 53021) @@ -465,6 +465,9 @@ <ClCompile Include="..\..\..\src\jrd\recsrc\ConditionalStream.cpp"> <Filter>JRD files\Data Access</Filter> </ClCompile> + <ClCompile Include="..\..\..\src\jrd\GarbageCollector.cpp"> + <Filter>JRD files</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\..\..\src\jrd\recsrc\RecordSource.h"> @@ -1010,6 +1013,9 @@ <ClInclude Include="..\..\..\src\jrd\vio_proto.h"> <Filter>Header files</Filter> </ClInclude> + <ClInclude Include="..\..\..\src\jrd\GarbageCollector.h"> + <Filter>Header files</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <None Include="..\..\..\src\dsql\DdlNodes.epp"> Modified: firebird/trunk/builds/win32/msvc8/engine.vcproj =================================================================== --- firebird/trunk/builds/win32/msvc8/engine.vcproj 2011-05-27 03:27:46 UTC (rev 53020) +++ firebird/trunk/builds/win32/msvc8/engine.vcproj 2011-05-27 07:57:16 UTC (rev 53021) @@ -420,6 +420,10 @@ > </File> <File + RelativePath="..\..\..\src\jrd\GarbageCollector.cpp" + > + </File> + <File RelativePath="..\..\..\src\jrd\GlobalRWLock.cpp" > </File> @@ -1168,6 +1172,10 @@ > </File> <File + RelativePath="..\..\..\src\jrd\GarbageCollector.h" + > + </File> + <File RelativePath="..\..\..\src\jrd\GlobalRWLock.h" > </File> Modified: firebird/trunk/builds/win32/msvc9/engine.vcproj =================================================================== --- firebird/trunk/builds/win32/msvc9/engine.vcproj 2011-05-27 03:27:46 UTC (rev 53020) +++ firebird/trunk/builds/win32/msvc9/engine.vcproj 2011-05-27 07:57:16 UTC (rev 53021) @@ -420,6 +420,10 @@ > </File> <File + RelativePath="..\..\..\src\jrd\GarbageCollector.cpp" + > + </File> + <File RelativePath="..\..\..\src\jrd\GlobalRWLock.cpp" > </File> @@ -1168,6 +1172,10 @@ > </File> <File + RelativePath="..\..\..\src\jrd\GarbageCollector.h" + > + </File> + <File RelativePath="..\..\..\src\jrd\GlobalRWLock.h" > </File> Modified: firebird/trunk/src/common/common.h =================================================================== --- firebird/trunk/src/common/common.h 2011-05-27 03:27:46 UTC (rev 53020) +++ firebird/trunk/src/common/common.h 2011-05-27 07:57:16 UTC (rev 53021) @@ -78,11 +78,7 @@ do not use links in source code to maintain platform neutrality */ -#ifdef SUPERSERVER -#define GARBAGE_THREAD -#endif - /***************************************************** * Linux platforms *****************************************************/ Modified: firebird/trunk/src/jrd/Attachment.h =================================================================== --- firebird/trunk/src/jrd/Attachment.h 2011-05-27 03:27:46 UTC (rev 53020) +++ firebird/trunk/src/jrd/Attachment.h 2011-05-27 07:57:16 UTC (rev 53021) @@ -351,33 +351,27 @@ // Attachment flags -const ULONG ATT_no_cleanup = 1; // Don't expunge, purge, or garbage collect -const ULONG ATT_shutdown = 2; // attachment has been shutdown -const ULONG ATT_purge_error = 4; // trouble happened in purge attachment, att_mutex remains locked -const ULONG ATT_shutdown_manager = 8; // attachment requesting shutdown -const ULONG ATT_lck_init_done = 16; // LCK_init() called for the attachment -const ULONG ATT_exclusive = 32; // attachment wants exclusive database access -const ULONG ATT_attach_pending = 64; // Indicate attachment is only pending -const ULONG ATT_exclusive_pending = 128; // Indicate exclusive attachment pending -const ULONG ATT_gbak_attachment = 256; // Indicate GBAK attachment +const ULONG ATT_no_cleanup = 0x0001L; // Don't expunge, purge, or garbage collect +const ULONG ATT_shutdown = 0x0002L; // attachment has been shutdown +const ULONG ATT_purge_error = 0x0004L; // trouble happened in purge attachment, att_mutex remains locked +const ULONG ATT_shutdown_manager = 0x0008L; // attachment requesting shutdown +const ULONG ATT_lck_init_done = 0x0010L; // LCK_init() called for the attachment +const ULONG ATT_exclusive = 0x0020L; // attachment wants exclusive database access +const ULONG ATT_attach_pending = 0x0040L; // Indicate attachment is only pending +const ULONG ATT_exclusive_pending = 0x0080L; // Indicate exclusive attachment pending +const ULONG ATT_gbak_attachment = 0x0100L; // Indicate GBAK attachment +const ULONG ATT_notify_gc = 0x0200L; // Notify garbage collector to expunge, purge .. +const ULONG ATT_disable_notify_gc = 0x0400L; // Temporarily perform own garbage collection +const ULONG ATT_garbage_collector = 0x0800L; // I'm a garbage collector +const ULONG ATT_cancel_raise = 0x1000L; // Cancel currently running operation +const ULONG ATT_cancel_disable = 0x2000L; // Disable cancel operations +const ULONG ATT_gfix_attachment = 0x4000L; // Indicate a GFIX attachment +const ULONG ATT_gstat_attachment = 0x8000L; // Indicate a GSTAT attachment +const ULONG ATT_no_db_triggers = 0x10000L; // Don't execute database triggers -#ifdef GARBAGE_THREAD -const ULONG ATT_notify_gc = 1024; // Notify garbage collector to expunge, purge .. -const ULONG ATT_disable_notify_gc = 2048; // Temporarily perform own garbage collection -const ULONG ATT_garbage_collector = 4096; // I'm a garbage collector - const ULONG ATT_NO_CLEANUP = (ATT_no_cleanup | ATT_notify_gc); -#else -const ULONG ATT_NO_CLEANUP = ATT_no_cleanup; -#endif -const ULONG ATT_cancel_raise = 8192; // Cancel currently running operation -const ULONG ATT_cancel_disable = 16384; // Disable cancel operations -const ULONG ATT_gfix_attachment = 32768; // Indicate a GFIX attachment -const ULONG ATT_gstat_attachment = 65536; // Indicate a GSTAT attachment -const ULONG ATT_no_db_triggers = 131072; // Don't execute database triggers - inline bool Attachment::locksmith() const { return att_user && att_user->locksmith(); Modified: firebird/trunk/src/jrd/Database.h =================================================================== --- firebird/trunk/src/jrd/Database.h 2011-05-27 03:27:46 UTC (rev 53020) +++ firebird/trunk/src/jrd/Database.h 2011-05-27 07:57:16 UTC (rev 53021) @@ -75,6 +75,7 @@ class BackupManager; class ExternalFileDirectoryList; class MonitoringData; +class GarbageCollector; // general purpose vector @@ -196,11 +197,9 @@ const ULONG DBB_damaged = 0x1L; const ULONG DBB_exclusive = 0x2L; // Database is accessed in exclusive mode const ULONG DBB_bugcheck = 0x4L; // Bugcheck has occurred -#ifdef GARBAGE_THREAD const ULONG DBB_garbage_collector = 0x8L; // garbage collector thread exists const ULONG DBB_gc_active = 0x10L; // ... and is actively working. const ULONG DBB_gc_pending = 0x20L; // garbage collection requested -#endif const ULONG DBB_force_write = 0x40L; // Database is forced write const ULONG DBB_no_reserve = 0x80L; // No reserve space for versions const ULONG DBB_DB_SQL_dialect_3 = 0x100L; // database SQL dialect 3 @@ -314,6 +313,7 @@ Database* dbb_next; // Next database block in system Attachment* dbb_attachments; // Active attachments + Attachment* dbb_sys_attachments; // System attachments BufferControl* dbb_bcb; // Buffer control block int dbb_monitoring_id; // dbb monitoring identifier Lock* dbb_lock; // granddaddy lock @@ -370,12 +370,10 @@ SLONG dbb_attachment_id; // Next attachment id for ReadOnly DB's ULONG dbb_page_buffers; // Page buffers from header page - -#ifdef GARBAGE_THREAD + GarbageCollector* dbb_garbage_collector; // GarbageCollector class Firebird::Semaphore dbb_gc_sem; // Event to wake up garbage collector Firebird::Semaphore dbb_gc_init; // Event for initialization garbage collector Firebird::Semaphore dbb_gc_fini; // Event for finalization garbage collector -#endif Firebird::MemoryStats dbb_memory_stats; Modified: firebird/trunk/src/jrd/DatabaseSnapshot.cpp =================================================================== --- firebird/trunk/src/jrd/DatabaseSnapshot.cpp 2011-05-27 03:27:46 UTC (rev 53020) +++ firebird/trunk/src/jrd/DatabaseSnapshot.cpp 2011-05-27 07:57:16 UTC (rev 53021) @@ -784,59 +784,70 @@ { Attachment::SyncGuard attGuard(attachment); tdbb->setAttachment(attachment); + dumpAttachment(tdbb, attachment, writer); + } - if (!putAttachment(tdbb, attachment, writer, fb_utils::genUniqueId())) - continue; + for (Attachment* attachment = dbb->dbb_sys_attachments; attachment; attachment = attachment->att_next) + { + Attachment::SyncGuard attGuard(attachment); + tdbb->setAttachment(attachment); + dumpAttachment(tdbb, attachment, writer); + } - putContextVars(attachment->att_context_vars, writer, attachment->att_attachment_id, true); + tdbb->setAttachment(old_attachment); +} - jrd_tra* transaction = NULL; - jrd_req* request = NULL; +void DatabaseSnapshot::dumpAttachment(thread_db* tdbb, const Attachment* attachment, Writer& writer) +{ + if (!putAttachment(tdbb, attachment, writer, fb_utils::genUniqueId())) + return; - // Transaction information + putContextVars(attachment->att_context_vars, writer, attachment->att_attachment_id, true); - for (transaction = attachment->att_transactions; - transaction; transaction = transaction->tra_next) - { - putTransaction(transaction, writer, fb_utils::genUniqueId()); - putContextVars(transaction->tra_context_vars, writer, transaction->tra_number, false); - } + jrd_tra* transaction = NULL; + jrd_req* request = NULL; - // Call stack information + // Transaction information - for (transaction = attachment->att_transactions; - transaction; transaction = transaction->tra_next) - { - for (request = transaction->tra_requests; request; request = request->req_caller) - { - request->adjustCallerStats(); + for (transaction = attachment->att_transactions; + transaction; transaction = transaction->tra_next) + { + putTransaction(transaction, writer, fb_utils::genUniqueId()); + putContextVars(transaction->tra_context_vars, writer, transaction->tra_number, false); + } - if (!(request->getStatement()->flags & - (JrdStatement::FLAG_INTERNAL | JrdStatement::FLAG_SYS_TRIGGER)) && - request->req_caller) - { - putCall(request, writer, fb_utils::genUniqueId()); - } - } - } + // Call stack information - // Request information - - for (const jrd_req* const* i = attachment->att_requests.begin(); - i != attachment->att_requests.end(); - ++i) + for (transaction = attachment->att_transactions; + transaction; transaction = transaction->tra_next) + { + for (request = transaction->tra_requests; request; request = request->req_caller) { - const jrd_req* request = *i; + request->adjustCallerStats(); if (!(request->getStatement()->flags & - (JrdStatement::FLAG_INTERNAL | JrdStatement::FLAG_SYS_TRIGGER))) + (JrdStatement::FLAG_INTERNAL | JrdStatement::FLAG_SYS_TRIGGER)) && + request->req_caller) { - putRequest(request, writer, fb_utils::genUniqueId()); + putCall(request, writer, fb_utils::genUniqueId()); } } } - tdbb->setAttachment(old_attachment); + // Request information + + for (const jrd_req* const* i = attachment->att_requests.begin(); + i != attachment->att_requests.end(); + ++i) + { + const jrd_req* request = *i; + + if (!(request->getStatement()->flags & + (JrdStatement::FLAG_INTERNAL | JrdStatement::FLAG_SYS_TRIGGER))) + { + putRequest(request, writer, fb_utils::genUniqueId()); + } + } } Modified: firebird/trunk/src/jrd/DatabaseSnapshot.h =================================================================== --- firebird/trunk/src/jrd/DatabaseSnapshot.h 2011-05-27 03:27:46 UTC (rev 53020) +++ firebird/trunk/src/jrd/DatabaseSnapshot.h 2011-05-27 07:57:16 UTC (rev 53021) @@ -360,6 +360,7 @@ RecordBuffer* allocBuffer(thread_db*, MemoryPool&, int); static void dumpData(thread_db*); + static void dumpAttachment(thread_db*, const Attachment*, Writer&); static SINT64 getGlobalId(int); Modified: firebird/trunk/src/jrd/EngineInterface.h =================================================================== --- firebird/trunk/src/jrd/EngineInterface.h 2011-05-27 03:27:46 UTC (rev 53020) +++ firebird/trunk/src/jrd/EngineInterface.h 2011-05-27 07:57:16 UTC (rev 53021) @@ -334,6 +334,36 @@ void freeEngineData(Firebird::IStatus* status); }; +// internal class used in system background threads +class SysAttachment : public JAttachment +{ +public: + SysAttachment(Attachment* handle) : + JAttachment(handle) + { + } + + virtual int FB_CARG release() + { + if (--refCounter != 0) + return 1; + + Attachment* attachment = getHandle(); + if (attachment) + { + destroy(attachment); + } + if (!attachment) + { + delete this; + } + return 0; + } + +private: + void destroy(Attachment* attachment); +}; + class JService : public Firebird::RefCntIface<Firebird::IService, FB_SERVICE_VERSION> { public: Added: firebird/trunk/src/jrd/GarbageCollector.cpp =================================================================== --- firebird/trunk/src/jrd/GarbageCollector.cpp (rev 0) +++ firebird/trunk/src/jrd/GarbageCollector.cpp 2011-05-27 07:57:16 UTC (rev 53021) @@ -0,0 +1,275 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl. + * + * Software distributed under the License is distributed AS IS, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. + * See the License for the specific language governing rights + * and limitations under the License. + * + * The Original Code was created by Vlad Khorsun + * for the Firebird Open Source RDBMS project. + * + * Copyright (c) 2011 Vlad Khorsun <hv...@us...> + * and all contributors signed below. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + */ + +#include "../common/classes/alloc.h" +#include "../jrd/GarbageCollector.h" +#include "../jrd/tra.h" + +using namespace Jrd; +using namespace Firebird; + + +namespace Jrd { + +void GarbageCollector::RelationData::clear() +{ + TranData::ConstAccessor accessor(&m_tranData); + if (accessor.getFirst()) + do + { + delete accessor.current()->second; + } while(accessor.getNext()); + + m_tranData.clear(); +} + + +void GarbageCollector::RelationData::addPage(const ULONG pageno, const SLONG tranid) +{ + // look if given page number is already set at given tx bitmap + PageBitmap** bmPtr = m_tranData.get(tranid); + PageBitmap* bm = bmPtr ? *bmPtr : NULL; + if (bm && bm->test(pageno)) + return; + + // search for given page at other transactions bitmaps + // if found at older tx - we are done, just return + // if found at yanger tx - clear it as page should be set at oldest tx (our) + TranData::ConstAccessor accessor(&m_tranData); + if (accessor.getFirst()) + do + { + const TranBitMap* item = accessor.current(); + if (item->first <= tranid) + { + if (item->second->test(pageno)) + return; + } + else + { + if (item->second->clear(pageno)) + break; + } + } while(accessor.getNext()); + + // add page to the our tx bitmap + if (bm) + { + PBM_SET(&m_pool, &bm, pageno); + } + else + { + PBM_SET(&m_pool, &bm, pageno); + m_tranData.put(tranid, bm); + } +} + + +void GarbageCollector::RelationData::getPageBitmap(const SLONG oldest_snapshot, PageBitmap **sbm) +{ + TranData::Accessor accessor(&m_tranData); + while (accessor.getFirst()) + { + TranBitMap* item = accessor.current(); + + if (item->first >= oldest_snapshot) + break; + + PageBitmap* bm_tran = item->second; + PageBitmap** bm_or = PageBitmap::bit_or(sbm, &bm_tran); + if (*bm_or == item->second) + { + bm_tran = *sbm; + *sbm = item->second; + item->second = bm_tran; + } + delete item->second; + + m_tranData.remove(item->first); + } +} + + +void GarbageCollector::RelationData::swept(const SLONG oldest_snapshot) +{ + TranData::Accessor accessor(&m_tranData); + while (accessor.getFirst()) + { + TranBitMap* item = accessor.current(); + + if (item->first >= oldest_snapshot) + break; + + delete item->second; + m_tranData.remove(item->first); + } +} + + +SLONG GarbageCollector::RelationData::minTranID() const +{ + TranData::ConstAccessor accessor(&m_tranData); + if (accessor.getFirst()) + return accessor.current()->first; + else + return MAX_TRA_NUMBER; +} + + +GarbageCollector::~GarbageCollector() +{ + SyncLockGuard exGuard(&m_sync, SYNC_EXCLUSIVE, "GarbageCollector::~GarbageCollector"); + for (size_t pos = 0; pos < m_relations.getCount(); pos++) + { + Sync sync(&m_relations[pos]->m_sync, "GarbageCollector::~GarbageCollector"); + sync.lock(SYNC_EXCLUSIVE); + sync.unlock(); + delete m_relations[pos]; + } + + m_relations.clear(); +} + + +void GarbageCollector::addPage(const USHORT relID, const ULONG pageno, const SLONG tranid) +{ + Sync syncGC(&m_sync, "GarbageCollector::addPage"); + RelationData* relData = getRelData(syncGC, relID, true); + + SyncLockGuard syncData(&relData->m_sync, SYNC_EXCLUSIVE, "GarbageCollector::addPage"); + syncGC.unlock(); + + relData->addPage(pageno, tranid); +} + + +bool GarbageCollector::getPageBitmap(const SLONG oldest_snapshot, USHORT &relID, PageBitmap **sbm) +{ + *sbm = NULL; + SyncLockGuard shGuard(&m_sync, SYNC_EXCLUSIVE, "GarbageCollector::getPageBitmap"); + + if (m_relations.isEmpty()) + { + m_nextRelID = 0; + return false; + } + + size_t pos; + if (!m_relations.find(m_nextRelID, pos) && (pos == m_relations.getCount()) ) + pos = 0; + + for (; pos < m_relations.getCount(); pos++) + { + RelationData* relData = m_relations[pos]; + SyncLockGuard syncData(&relData->m_sync, SYNC_EXCLUSIVE, "GarbageCollector::getPageBitmap"); + relData->getPageBitmap(oldest_snapshot, sbm); + if (*sbm) + { + relID = relData->getRelID(); + m_nextRelID = relID + 1; + return true; + } + } + + m_nextRelID = 0; + return false; +} + + +void GarbageCollector::removeRelation(const USHORT relID) +{ + Sync syncGC(&m_sync, "GarbageCollector::removeRelation"); + syncGC.lock(SYNC_EXCLUSIVE); + + size_t pos; + if (!m_relations.find(relID, pos)) + return; + + RelationData* relData = m_relations[pos]; + Sync syncData(&relData->m_sync, "GarbageCollector::removeRelation"); + syncData.lock(SYNC_EXCLUSIVE); + + m_relations.remove(pos); + syncGC.unlock(); + + syncData.unlock(); + delete relData; +} + + +void GarbageCollector::sweptRelation(const SLONG oldest_snapshot, const USHORT relID) +{ + Sync syncGC(&m_sync, "GarbageCollector::sweptRelation"); + + RelationData* relData = getRelData(syncGC, relID, false); + if (relData) + { + SyncLockGuard syncData(&relData->m_sync, SYNC_EXCLUSIVE, "GarbageCollector::sweptRelation"); + + syncGC.unlock(); + relData->swept(oldest_snapshot); + } + return; +} + + +SLONG GarbageCollector::minTranID(const USHORT relID) +{ + Sync syncGC(&m_sync, "GarbageCollector::minTranID"); + + RelationData* relData = getRelData(syncGC, relID, false); + if (relData) + { + SyncLockGuard syncData(&relData->m_sync, SYNC_SHARED, "GarbageCollector::minTranID"); + + syncGC.unlock(); + return relData->minTranID(); + } + + return MAX_TRA_NUMBER; +} + + +GarbageCollector::RelationData* GarbageCollector::getRelData(Sync &sync, const USHORT relID, bool allowCreate) +{ + size_t pos; + + sync.lock(SYNC_SHARED); + if (!m_relations.find(relID, pos)) + { + if (!allowCreate) + return NULL; + + sync.unlock(); + sync.lock(SYNC_EXCLUSIVE); + if (!m_relations.find(relID, pos)) + { + m_relations.insert(pos, FB_NEW(m_pool) RelationData(m_pool, relID)); + sync.downgrade(SYNC_SHARED); + } + } + + return m_relations[pos]; +} + + +} // namespace Jrd Property changes on: firebird/trunk/src/jrd/GarbageCollector.cpp ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: firebird/trunk/src/jrd/GarbageCollector.h =================================================================== --- firebird/trunk/src/jrd/GarbageCollector.h (rev 0) +++ firebird/trunk/src/jrd/GarbageCollector.h 2011-05-27 07:57:16 UTC (rev 53021) @@ -0,0 +1,108 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl. + * + * Software distributed under the License is distributed AS IS, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. + * See the License for the specific language governing rights + * and limitations under the License. + * + * The Original Code was created by Vlad Khorsun + * for the Firebird Open Source RDBMS project. + * + * Copyright (c) 2011 Vlad Khorsun <hv...@us...> + * and all contributors signed below. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + */ + +#ifndef JRD_GARBAGE_COLLECTOR_H +#define JRD_GARBAGE_COLLECTOR_H + +#include "firebird.h" +#include "../common/classes/array.h" +#include "../common/classes/GenericMap.h" +#include "../common/classes/SyncObject.h" +#include "../jrd/sbm.h" + + +namespace Jrd { + +class Database; +class Savepoint; + +class GarbageCollector +{ +public: + GarbageCollector(MemoryPool& p, Database* dbb) + : m_pool(p), m_database(dbb), m_relations(m_pool), m_nextRelID(0) + {} + + ~GarbageCollector(); + + void addPage(const USHORT relID, const ULONG pageno, const SLONG tranid); + bool getPageBitmap(const SLONG oldest_snapshot, USHORT &relID, PageBitmap **sbm); + void removeRelation(const USHORT relID); + void sweptRelation(const SLONG oldest_snapshot, const USHORT relID); + + SLONG minTranID(const USHORT relID); + +private: + typedef Firebird::Pair<Firebird::NonPooled<SLONG, PageBitmap*> > TranBitMap; + typedef Firebird::GenericMap<TranBitMap> TranData; + + + class RelationData + { + public: + explicit RelationData(MemoryPool& p, USHORT relID) + : m_pool(p), m_tranData(p), m_relID(relID) + {} + + ~RelationData() { clear(); } + + void addPage(const ULONG pageno, const SLONG tranid); + void getPageBitmap(const SLONG oldest_snapshot, PageBitmap **sbm); + void swept(const SLONG oldest_snapshot); + SLONG minTranID() const; + + USHORT getRelID() const + { + return m_relID; + } + + static inline const USHORT generate(void const*, const RelationData* Item) + { + return Item->m_relID; + } + + void clear(); + + Firebird::MemoryPool& m_pool; + Firebird::SyncObject m_sync; + TranData m_tranData; + USHORT m_relID; + }; + + typedef Firebird::SortedArray< + RelationData*, + Firebird::EmptyStorage<RelationData*>, + LONG, + RelationData> RelGarbageArray; + + RelationData* getRelData(Firebird::Sync &sync, const USHORT relID, bool allowCreate); + + Firebird::MemoryPool& m_pool; + Firebird::SyncObject m_sync; + Database* m_database; + RelGarbageArray m_relations; + USHORT m_nextRelID; +}; + +} // namespace Jrd + +#endif JRD_GARBAGE_COLLECTOR_H Property changes on: firebird/trunk/src/jrd/GarbageCollector.h ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Modified: firebird/trunk/src/jrd/Relation.cpp =================================================================== --- firebird/trunk/src/jrd/Relation.cpp 2011-05-27 03:27:46 UTC (rev 53020) +++ firebird/trunk/src/jrd/Relation.cpp 2011-05-27 07:57:16 UTC (rev 53021) @@ -10,10 +10,10 @@ * See the License for the specific language governing rights * and limitations under the License. * - * The Original Code was created by Vlad Horsun + * The Original Code was created by Vlad Khorsun * for the Firebird Open Source RDBMS project. * - * Copyright (c) 2005 Vlad Horsun <hv...@us...> + * Copyright (c) 2005 Vlad Khorsun <hv...@us...> * and all contributors signed below. * * All Rights Reserved. @@ -32,88 +32,8 @@ using namespace Jrd; -#ifdef GARBAGE_THREAD +/// jrd_rel -void RelationGarbage::clear() -{ - TranGarbage *item = array.begin(), *const last = array.end(); - - for (; item < last; item++) - { - delete item->bm; - item->bm = NULL; - } - - array.clear(); -} - -void RelationGarbage::addPage(MemoryPool* pool, const SLONG pageno, const SLONG tranid) -{ - bool found = false; - TranGarbage const *item = array.begin(), *const last = array.end(); - - for (; item < last; item++) - { - if (item->tran <= tranid) - { - if (PageBitmap::test(item->bm, pageno)) - { - found = true; - break; - } - } - else - { - if (item->bm->clear(pageno)) - break; - } - } - - if (!found) - { - PageBitmap *bm = NULL; - size_t pos = 0; - - if (array.find(tranid, pos) ) - { - bm = array[pos].bm; - PBM_SET(pool, &bm, pageno); - } - else - { - bm = NULL; - PBM_SET(pool, &bm, pageno); - array.add(TranGarbage(bm, tranid)); - } - } -} - -void RelationGarbage::getGarbage(const SLONG oldest_snapshot, PageBitmap **sbm) -{ - while (array.getCount() > 0) - { - TranGarbage& garbage = array[0]; - - if (garbage.tran >= oldest_snapshot) - break; - - PageBitmap* bm_tran = garbage.bm; - PageBitmap** bm_or = PageBitmap::bit_or(sbm, &bm_tran); - if (*bm_or == garbage.bm) - { - bm_tran = *sbm; - *sbm = garbage.bm; - garbage.bm = bm_tran; - } - delete garbage.bm; - - // Need to cast zero to exact type because literal zero means null pointer - array.remove(static_cast<size_t>(0)); - } -} - -#endif //GARBAGE_THREAD - RelationPages* jrd_rel::getPagesInternal(thread_db* tdbb, SLONG tran, bool allocPages) { if (tdbb->tdbb_flags & TDBB_use_db_page_space) Modified: firebird/trunk/src/jrd/Relation.h =================================================================== --- firebird/trunk/src/jrd/Relation.h 2011-05-27 03:27:46 UTC (rev 53020) +++ firebird/trunk/src/jrd/Relation.h 2011-05-27 07:57:16 UTC (rev 53021) @@ -63,54 +63,7 @@ typedef Firebird::SortedArray<ViewContext*, Firebird::EmptyStorage<ViewContext*>, USHORT, ViewContext> ViewContexts; -#ifdef GARBAGE_THREAD -class RelationGarbage -{ -private: - class TranGarbage - { - public: - SLONG tran; - PageBitmap *bm; - - TranGarbage(PageBitmap* aBm, SLONG aTran) - : tran(aTran), bm(aBm) - {} - - static inline const SLONG generate(void const*, const TranGarbage& Item) - { - return Item.tran; - } - }; - - typedef Firebird::SortedArray< - TranGarbage, - Firebird::EmptyStorage<TranGarbage>, - SLONG, - TranGarbage> TranGarbageArray; - - TranGarbageArray array; - -public: - explicit RelationGarbage(MemoryPool& p) - : array(p) - {} - ~RelationGarbage() { clear(); } - - void addPage(MemoryPool* pool, const SLONG pageno, const SLONG tranid); - void clear(); - - void getGarbage(const SLONG oldest_snapshot, PageBitmap **sbm); - - SLONG minTranID() const - { - return (array.getCount() > 0) ? array[0].tran : MAX_SLONG; - } -}; - -#endif //GARBAGE_THREAD - class RelationPages { public: @@ -197,10 +150,6 @@ ExternalFile* rel_file; // external file name vec<Record*>* rel_gc_rec; // vector of records for garbage collection -#ifdef GARBAGE_THREAD - PageBitmap* rel_gc_bitmap; // garbage collect bitmap of data page sequences - RelationGarbage* rel_garbage; // deferred gc bitmap's by tran numbers -#endif USHORT rel_use_count; // requests compiled with relation USHORT rel_sweep_count; // sweep and/or garbage collector threads active Modified: firebird/trunk/src/jrd/cch.cpp =================================================================== --- firebird/trunk/src/jrd/cch.cpp 2011-05-27 03:27:46 UTC (rev 53020) +++ firebird/trunk/src/jrd/cch.cpp 2011-05-27 07:57:16 UTC (rev 53021) @@ -76,7 +76,7 @@ IMPLEMENT_TRACE_ROUTINE(cch_trace, "CCH") #endif -// #define CACHE_WRITER +#define CACHE_WRITER #ifdef SUPERSERVER_V2 #define CACHE_READER @@ -1038,7 +1038,6 @@ // Wait for cache writer startup to complete. while (bcb->bcb_flags & BCB_writer_start) { - Database::Checkout dcoHolder(dbb); THREAD_YIELD(); } @@ -1048,10 +1047,7 @@ { bcb->bcb_flags &= ~BCB_cache_writer; bcb->bcb_writer_sem.release(); // Wake up running thread - { // scope - Database::Checkout dcoHolder(dbb); - bcb->bcb_writer_fini.enter(); - } + bcb->bcb_writer_fini.enter(); } #endif @@ -1268,7 +1264,7 @@ BufferDesc* bdb; if ((bcb->bcb_flags & BCB_free_pending) && - (bdb = get_buffer(tdbb, FREE_PAGE, SYNC_SHARED /*LATCH_none*/, 1))) + (bdb = get_buffer(tdbb, FREE_PAGE, SYNC_NONE, 1))) { if (!write_buffer(tdbb, bdb, bdb->bdb_page, true, tdbb->tdbb_status_vector, true)) CCH_unwind(tdbb, false); @@ -1565,7 +1561,17 @@ if (dbb->dbb_lock->lck_logical != LCK_EX) { dbb->dbb_ast_flags |= DBB_assert_locks; } +} + +void CCH_init2(thread_db* tdbb) +{ + Database* dbb = tdbb->getDatabase(); + BufferControl* bcb = dbb->dbb_bcb; + + if (!(bcb->bcb_flags & BCB_exclusive) || (bcb->bcb_flags & (BCB_cache_writer | BCB_writer_start))) + return; + #ifdef CACHE_READER if (gds__thread_start(cache_reader, dbb, THREAD_high, 0, 0)) { @@ -1586,7 +1592,7 @@ try { - ThreadSync::start(cache_writer, dbb, THREAD_high); + Thread::start(cache_writer, dbb, THREAD_medium); } catch (const Exception&) { @@ -1594,10 +1600,7 @@ ERR_bugcheck_msg("cannot start cache writer thread"); } - { // scope - Database::Checkout dcoHolder(dbb); - bcb->bcb_writer_init.enter(); - } + bcb->bcb_writer_init.enter(); } #endif } @@ -2942,6 +2945,7 @@ #ifdef CACHE_WRITER + static THREAD_ENTRY_DECLARE cache_writer(THREAD_ENTRY_PARAM arg) { /************************************** @@ -2958,11 +2962,10 @@ * **************************************/ - /*** Database* dbb = (Database*)arg; - Database::SyncGuard dsGuard(dbb); ISC_STATUS_ARRAY status_vector; + MOVE_CLEAR(status_vector, sizeof(status_vector)); // Establish a thread context. ThreadContextHolder tdbb(status_vector); @@ -2970,10 +2973,20 @@ // Dummy attachment needed for lock owner identification. tdbb->setDatabase(dbb); - Jrd::Attachment* const attachment = Jrd::Attachment::create(dbb, 0); + + RefPtr<JAttachment> jAtt(NULL); + + Jrd::Attachment* attachment = Jrd::Attachment::create(dbb); + jAtt = attachment->att_interface = new SysAttachment(attachment); + jAtt->getMutex()->enter(); + tdbb->setAttachment(attachment); attachment->att_filename = dbb->dbb_filename; + UserId user; + user.usr_user_name = "Cache Writer"; + attachment->att_user = &user; + BufferControl* bcb = dbb->dbb_bcb; Jrd::ContextPoolHolder context(tdbb, bcb->bcb_bufferpool); @@ -2982,9 +2995,13 @@ // return, unlike the other try blocks further down the page. Semaphore& writer_sem = bcb->bcb_writer_sem; - try { + try + { LCK_init(tdbb, LCK_OWNER_attachment); + PAG_header(tdbb, true); + PAG_attachment_id(tdbb); TRA_init(attachment); + bcb->bcb_flags |= BCB_cache_writer; bcb->bcb_flags &= ~BCB_writer_start; @@ -2999,49 +3016,10 @@ bcb->bcb_flags &= ~(BCB_cache_writer | BCB_writer_start); return (THREAD_ENTRY_RETURN)(-1); } - ***/ - ISC_STATUS_ARRAY status_vector = {0}; - Jrd::Attachment* attachment= NULL; + attachment->att_next = dbb->dbb_sys_attachments; + dbb->dbb_sys_attachments = attachment; - { - bcb->bcb_flags |= BCB_cache_writer; - bcb->bcb_flags &= ~BCB_writer_start; - bcb->bcb_writer_init.release(); - - Database* dbb = (Database*)arg; - Database::SyncGuard dsGuard(dbb); - RefPtr<BufferControl> bcb = dbb->dbb_bcb; - - ClumpletWriter dpb(ClumpletReader::Tagged, MAX_DPB_SIZE); - dpb.reset(isc_dpb_version1); - dpb.insertString(isc_dpb_trusted_auth, "Cache Writer"); - - if (jrd8_attach_database(status_vector, NULL, dbb->dbb_filename.c_str(), &attachment, - dpb.getBufferLength(), dpb.getBuffer())) - { - gds__log_status(dbb->dbb_filename.c_str(), status_vector); - - bcb->bcb_flags &= ~BCB_writer_start; - - bcb->bcb_writer_init.release(); // ? - - return (THREAD_ENTRY_RETURN)(-1); - } - } - - Database* dbb = attachment->att_database; - - // Establish a thread context. - ThreadContextHolder tdbb(status_vector); - tdbb->setDatabase(dbb); - tdbb->setAttachment(attachment); - - BufferControl* bcb = dbb->dbb_bcb; - Jrd::ContextPoolHolder context(tdbb, bcb->bcb_bufferpool); - - Semaphore& writer_sem = bcb->bcb_writer_sem; - try { while (bcb->bcb_flags & BCB_cache_writer) @@ -3053,10 +3031,8 @@ if (dbb->dbb_flags & DBB_suspend_bgio) { - { //scope - Database::Checkout dcoHolder(dbb); - writer_sem.tryEnter(10); - } + Attachment::Checkout cout(attachment); + writer_sem.tryEnter(10); continue; } @@ -3070,14 +3046,9 @@ } #endif - { // scope - Database::Checkout dcoHolder(dbb); - THREAD_YIELD(); - } - if (bcb->bcb_flags & BCB_free_pending) { - BufferDesc* bdb = get_buffer(tdbb, FREE_PAGE, None, 1); + BufferDesc* bdb = get_buffer(tdbb, FREE_PAGE, SYNC_NONE, 1); if (bdb) { write_buffer(tdbb, bdb, bdb->bdb_page, true, status_vector, true); } @@ -3090,12 +3061,11 @@ dbb->dbb_reader_sem.post(); } #endif -#ifdef GARBAGE_THREAD + if ((dbb->dbb_flags & DBB_garbage_collector) && !(dbb->dbb_flags & DBB_gc_active)) { dbb->dbb_gc_sem.release(); } -#endif } // If there's more work to do voluntarily ask to be rescheduled. @@ -3121,16 +3091,14 @@ else { bcb->bcb_flags &= ~BCB_writer_active; - Database::Checkout dcoHolder(dbb); + Attachment::Checkout cout(attachment); writer_sem.tryEnter(10); } } - /*** LCK_fini(tdbb, LCK_OWNER_attachment); - Jrd::Attachment::destroy(attachment); // no need saving warning error strings here - ***/ - jrd8_detach_database(status_vector, &attachment); + jAtt = NULL; + tdbb->setAttachment(NULL); bcb->bcb_flags &= ~BCB_cache_writer; @@ -3964,6 +3932,7 @@ } if (walk) { + oldest->release(tdbb); if (!--walk) break; @@ -5047,7 +5016,7 @@ if (!isTempPage && (backup_state == nbak_state_stalled || - (backup_state == nbak_state_merge && bdb->bdb_difference_page))) + (backup_state == nbak_state_merge && bdb->bdb_difference_page))) { const bool res = dbb->dbb_backup_manager->writeDifference(status, Modified: firebird/trunk/src/jrd/cch.h =================================================================== --- firebird/trunk/src/jrd/cch.h 2011-05-27 03:27:46 UTC (rev 53020) +++ firebird/trunk/src/jrd/cch.h 2011-05-27 07:57:16 UTC (rev 53021) @@ -111,13 +111,11 @@ static BufferControl* create(); static void destroy(BufferControl*); + Database* bcb_database; + Firebird::MemoryPool* bcb_bufferpool; Firebird::MemoryStats bcb_memory_stats; - // To be deleted when PAG will be not coupled with Database. - // Used only in CS mode when each BufferControl have one Database. - Database* bcb_database; - UCharStack bcb_memory; // Large block partitioned into buffers que bcb_in_use; // Que of buffers in use, main LRU que que bcb_pending; // Que of buffers which are going to be freed and reassigned Modified: firebird/trunk/src/jrd/cch_proto.h =================================================================== --- firebird/trunk/src/jrd/cch_proto.h 2011-05-27 03:27:46 UTC (rev 53020) +++ firebird/trunk/src/jrd/cch_proto.h 2011-05-27 07:57:16 UTC (rev 53021) @@ -54,6 +54,7 @@ void CCH_get_related(Jrd::thread_db*, Jrd::PageNumber, Jrd::PagesArray&); Ods::pag* CCH_handoff(Jrd::thread_db*, Jrd::win*, ULONG, int, SCHAR, int, const bool); void CCH_init(Jrd::thread_db*, ULONG, bool); +void CCH_init2(Jrd::thread_db*); void CCH_mark(Jrd::thread_db*, Jrd::win*, bool, bool); void CCH_must_write(Jrd::thread_db*, Jrd::win*); void CCH_precedence(Jrd::thread_db*, Jrd::win*, ULONG); Modified: firebird/trunk/src/jrd/dfw.epp =================================================================== --- firebird/trunk/src/jrd/dfw.epp 2011-05-27 03:27:46 UTC (rev 53020) +++ firebird/trunk/src/jrd/dfw.epp 2011-05-27 07:57:16 UTC (rev 53021) @@ -118,6 +118,7 @@ #include "../jrd/event_proto.h" #include "../jrd/nbak.h" #include "../jrd/trig.h" +#include "../jrd/GarbageCollector.h" #include "../jrd/IntlManager.h" #include "../jrd/UserManagement.h" #include "../jrd/Function.h" @@ -4166,15 +4167,11 @@ Arg::Gds(isc_obj_in_use) << Arg::Str(work->dfw_name)); } -#ifdef GARBAGE_THREAD // Free any memory associated with the relation's garbage collection bitmap + if (dbb->dbb_garbage_collector) { + dbb->dbb_garbage_collector->removeRelation(relation->rel_id); + } - delete relation->rel_gc_bitmap; - relation->rel_gc_bitmap = NULL; - - delete relation->rel_garbage; - relation->rel_garbage = NULL; -#endif if (relation->rel_file) { EXT_fini (relation, false); } Modified: firebird/trunk/src/jrd/dpm.epp =================================================================== --- firebird/trunk/src/jrd/dpm.epp 2011-05-27 03:27:46 UTC (rev 53020) +++ firebird/trunk/src/jrd/dpm.epp 2011-05-27 07:57:16 UTC (rev 53021) @@ -1549,7 +1549,7 @@ // If I'm a sweeper I don't need to look at swept pages. Also I should // check processed pages if they were swept. - const bool sweeper = (tdbb->tdbb_flags & TDBB_sweeper); + const bool sweeper = (rpb->rpb_stream_flags & RPB_s_sweeper); if (sweeper && (pp_sequence || slot) && !line) { Modified: firebird/trunk/src/jrd/jrd.cpp =================================================================== --- firebird/trunk/src/jrd/jrd.cpp 2011-05-27 03:27:46 UTC (rev 53020) +++ firebird/trunk/src/jrd/jrd.cpp 2011-05-27 07:57:16 UTC (rev 53021) @@ -1379,6 +1379,7 @@ // initialize shadowing as soon as the database is ready for it // but before any real work is done SDW_init(tdbb, options.dpb_activate_shadow, options.dpb_delete_shadow); + CCH_init2(tdbb); } else { @@ -1604,11 +1605,10 @@ ERR_post(Arg::Gds(isc_bad_dpb_content) << Arg::Gds(isc_cant_validate)); } -#ifdef GARBAGE_THREAD // Can't allow garbage collection during database validation. VIO_fini(tdbb); -#endif + if (!VAL_validate(tdbb, options.dpb_verify)) { ERR_punt(); } @@ -1685,11 +1685,7 @@ } PAG_attachment_id(tdbb); - -#ifdef GARBAGE_THREAD VIO_init(tdbb); -#endif - CCH_release_exclusive(tdbb); // if there was an error, the status vector is all set @@ -2573,10 +2569,8 @@ // but before any real work is done SDW_init(tdbb, options.dpb_activate_shadow, options.dpb_delete_shadow); - -#ifdef GARBAGE_THREAD + CCH_init2(tdbb); VIO_init(tdbb); -#endif if (options.dpb_set_db_readonly) { @@ -4282,6 +4276,22 @@ } +void SysAttachment::destroy(Attachment* attachment) +{ + Database* dbb = attachment->att_database; + + for (Jrd::Attachment** ptr = &dbb->dbb_sys_attachments; *ptr; ptr = &(*ptr)->att_next) + { + if (*ptr == attachment) + { + *ptr = attachment->att_next; + break; + } + } + Jrd::Attachment::destroy(attachment); +} + + JTransaction* JStatement::execute(IStatus* user_status, Firebird::ITransaction* apiTra, unsigned int in_msg_type, const FbMessage* inMsgBuffer, const FbMessage* outMsgBuffer) { @@ -5666,21 +5676,27 @@ if ((dbb->dbb_flags & (DBB_gc_cooperative | DBB_gc_background)) == 0) { - string gc_policy = dbb->dbb_config->getGCPolicy(); - gc_policy.lower(); - if (gc_policy == GCPolicyCooperative) { + if (!dbb->dbb_config->getSharedCache()) { dbb->dbb_flags |= DBB_gc_cooperative; } - else if (gc_policy == GCPolicyBackground) { - dbb->dbb_flags |= DBB_gc_background; - } - else if (gc_policy == GCPolicyCombined) { - dbb->dbb_flags |= DBB_gc_cooperative | DBB_gc_background; - } - else // config value is invalid + else { - // this should not happen - means bug in config - fb_assert(false); + string gc_policy = dbb->dbb_config->getGCPolicy(); + gc_policy.lower(); + if (gc_policy == GCPolicyCooperative) { + dbb->dbb_flags |= DBB_gc_cooperative; + } + else if (gc_policy == GCPolicyBackground) { + dbb->dbb_flags |= DBB_gc_background; + } + else if (gc_policy == GCPolicyCombined) { + dbb->dbb_flags |= DBB_gc_cooperative | DBB_gc_background; + } + else // config value is invalid + { + // this should not happen - means bug in config + fb_assert(false); + } } } @@ -6054,9 +6070,7 @@ TRA_header_write(tdbb, dbb, 0L); // Update transaction info on header page. #endif -#ifdef GARBAGE_THREAD VIO_fini(tdbb); -#endif CMP_fini(tdbb); CCH_fini(tdbb); @@ -6853,6 +6867,10 @@ { shutdown_database(dbb, true); } + else + { + dbb->dbb_sync.unlock(); + } } } } Modified: firebird/trunk/src/jrd/req.h =================================================================== --- firebird/trunk/src/jrd/req.h 2011-05-27 03:27:46 UTC (rev 53020) +++ firebird/trunk/src/jrd/req.h 2011-05-27 07:57:16 UTC (rev 53021) @@ -123,6 +123,7 @@ const USHORT RPB_s_update = 0x2; // input stream fetched for update const USHORT RPB_s_no_data = 0x4; // nobody is going to access the data const USHORT RPB_s_undo_data = 0x8; // data got from undo log +const USHORT RPB_s_sweeper = 0x10; // garbage collector - skip swept pages #define SET_NULL(record, id) record->rec_data [id >> 3] |= (1 << (id & 7)) #define CLEAR_NULL(record, id) record->rec_data [id >> 3] &= ~(1 << (id & 7)) Modified: firebird/trunk/src/jrd/tra.cpp =================================================================== --- firebird/trunk/src/jrd/tra.cpp 2011-05-27 03:27:46 UTC (rev 53020) +++ firebird/trunk/src/jrd/tra.cpp 2011-05-27 07:57:16 UTC (rev 53021) @@ -82,10 +82,6 @@ using namespace Ods; using namespace Firebird; -#ifdef GARBAGE_THREAD -#include "../common/isc_s_proto.h" -#endif - typedef Firebird::GenericMap<Firebird::Pair<Firebird::NonPooled<USHORT, UCHAR> > > RelationLockTypeMap; @@ -446,13 +442,10 @@ if (transaction->tra_flags & (TRA_prepare2 | TRA_reconnected)) MET_update_transaction(tdbb, transaction, true); -#ifdef GARBAGE_THREAD // Flush pages if transaction logically modified data if (transaction->tra_flags & TRA_write) -#endif CCH_flush(tdbb, FLUSH_TRAN, transaction->tra_number); -#ifdef GARBAGE_THREAD else if (transaction->tra_flags & (TRA_prepare2 | TRA_reconnected)) { // If the transaction only read data but is a member of a @@ -461,7 +454,6 @@ CCH_flush(tdbb, FLUSH_SYSTEM, 0); } -#endif if (retaining_flag) { @@ -993,13 +985,10 @@ DFW_perform_work(tdbb, transaction); -#ifdef GARBAGE_THREAD // Flush pages if transaction logically modified data if (transaction->tra_flags & TRA_write) -#endif CCH_flush(tdbb, FLUSH_TRAN, transaction->tra_number); -#ifdef GARBAGE_THREAD else if (transaction->tra_flags & TRA_prepare2) { // If the transaction only read data but is a member of a @@ -1008,7 +997,6 @@ CCH_flush(tdbb, FLUSH_SYSTEM, 0); } -#endif // Set the state on the inventory page to be limbo @@ -1779,7 +1767,6 @@ tdbb->setTransaction(transaction); -#ifdef GARBAGE_THREAD // The garbage collector runs asynchronously with respect to // our database sweep. This isn't good enough since we must // be absolutely certain that all dead transactions have been @@ -1788,7 +1775,6 @@ // synchronously perform the garbage collection ourselves. transaction->tra_attachment->att_flags &= ~ATT_notify_gc; -#endif if (VIO_sweep(tdbb, transaction)) { @@ -3490,13 +3476,11 @@ { dbb->dbb_oldest_snapshot = trans->tra_oldest_active; -#if defined(GARBAGE_THREAD) if (!(dbb->dbb_flags & DBB_gc_active) && (dbb->dbb_flags & DBB_gc_background)) { dbb->dbb_flags |= DBB_gc_pending; dbb->dbb_gc_sem.release(); } -#endif } // If the transaction block is getting out of hand, force a sweep Modified: firebird/trunk/src/jrd/vio.cpp =================================================================== --- firebird/trunk/src/jrd/vio.cpp 2011-05-27 03:27:46 UTC (rev 53020) +++ firebird/trunk/src/jrd/vio.cpp 2011-05-27 07:57:16 UTC (rev 53021) @@ -61,6 +61,8 @@ #include "../jrd/btr.h" #include "../jrd/exe.h" #include "../jrd/rse.h" +#include "../jrd/scl.h" +#include "../common/classes/alloc.h" #include "../common/ThreadStart.h" #include "../jrd/thread_proto.h" #ifdef VIO_DEBUG @@ -77,6 +79,7 @@ #include "../jrd/idx_proto.h" #include "../common/isc_s_proto.h" #include "../jrd/jrd_proto.h" +#include "../jrd/ini_proto.h" #include "../jrd/lck_proto.h" #include "../jrd/met_proto.h" #include "../jrd/mov_proto.h" @@ -88,6 +91,7 @@ #include "../jrd/dyn_ut_proto.h" #include "../jrd/Function.h" #include "../common/StatusArg.h" +#include "../jrd/GarbageCollector.h" using namespace Jrd; using namespace Firebird; @@ -104,9 +108,7 @@ USHORT irrelevant_field, bool void_update_is_relevant = false); static void garbage_collect(thread_db*, record_param*, ULONG, RecordStack&); static void garbage_collect_idx(thread_db*, record_param*, Record*, Record*); -#ifdef GARBAGE_THREAD static THREAD_ENTRY_DECLARE garbage_collector(THREAD_ENTRY_PARAM); -#endif enum UndoDataRet { udExists, @@ -118,9 +120,7 @@ static UndoDataRet get_undo_data(thread_db* tdbb, jrd_tra* transaction, record_param* rpb); static void list_staying(thread_db*, record_param*, RecordStack&); -#ifdef GARBAGE_THREAD static void notify_garbage_collector(thread_db*, record_param *, SLONG = -1); -#endif static Record* realloc_record(Record*& record, USHORT fmt_length); const int PREPARE_OK = 0; @@ -143,15 +143,14 @@ // Pick up relation ids #include "../jrd/ini.h" -#ifdef GARBAGE_THREAD static const UCHAR gc_tpb[] = { isc_tpb_version1, isc_tpb_read, isc_tpb_read_committed, isc_tpb_rec_version, isc_tpb_ignore_limbo }; -#endif + inline void clearRecordStack(RecordStack& stack) { /************************************** @@ -506,16 +505,6 @@ } #endif -#ifndef DEV_BUILD - // The sweeper threads run in the background without - // any way to inspect these counters. For debugging - // purposes, they are maintained in the DEV_BUILD. - - if (tdbb->tdbb_flags & TDBB_sweeper) { - return; - } -#endif - const USHORT relation_id = relation->rel_id; vcl** ptr = attachment->att_counts + count_id; @@ -546,10 +535,8 @@ **************************************/ SET_TDBB(tdbb); -#ifdef GARBAGE_THREAD const bool gcPolicyCooperative = tdbb->getDatabase()->dbb_flags & DBB_gc_cooperative; const bool gcPolicyBackground = tdbb->getDatabase()->dbb_flags & DBB_gc_background; -#endif #ifdef VIO_DEBUG if (debug_flag > DEBUG_TRACE_ALL) @@ -620,10 +607,8 @@ !(rpb->rpb_flags & (rpb_deleted | rpb_damaged)) && (rpb->rpb_b_page == 0 || rpb->rpb_transaction_nr >= transaction->tra_oldest_active)) { -#ifdef GARBAGE_THREAD if (gcPolicyBackground && rpb->rpb_b_page) notify_garbage_collector(tdbb, rpb); -#endif // GARBAGE_THREAD return true; } @@ -747,13 +732,11 @@ rpb->rpb_transaction_nr, transaction->tra_number); } #endif -#ifdef GARBAGE_THREAD - if (!(rpb->rpb_flags & rpb_chained) && attachment->att_flags & ATT_notify_gc) + if (gcPolicyBackground && !(rpb->rpb_flags & rpb_chained) && attachment->att_flags & ATT_notify_gc) { notify_garbage_collector(tdbb, rpb); } -#endif case tra_precommitted: if (attachment->att_flags & ATT_NO_CLEANUP || @@ -852,7 +835,6 @@ return false; } -#ifdef GARBAGE_THREAD // hvlad: if I'm garbage collector I don't need to read backversion // of active record. Just do notify self about it if (attachment->att_flags & ATT_garbage_collector) @@ -861,7 +843,6 @@ CCH_RELEASE(tdbb, &rpb->getWindow(tdbb)); return false; } -#endif if (!(rpb->rpb_flags & rpb_delta)) { @@ -986,7 +967,6 @@ if (rpb->rpb_transaction_nr < transaction->tra_oldest_active && !(attachment->att_flags & ATT_no_cleanup)) { -#ifdef GARBAGE_THREAD if (!gcPolicyCooperative && (attachment->att_flags & ATT_notify_gc) && !rpb->rpb_relation->isTemporary()) { @@ -994,7 +974,6 @@ CCH_RELEASE(tdbb, &rpb->getWindow(tdbb)); } else -#endif { CCH_RELEASE(tdbb, &rpb->getWindow(tdbb)); expunge(tdbb, rpb, transaction, 0); @@ -1017,7 +996,6 @@ if (cannotGC) { -#ifdef GARBAGE_THREAD if (gcPolicyBackground && attachment->att_flags & (ATT_notify_gc | ATT_garbage_collector) && (rpb->rpb_b_page != 0 && !(rpb->rpb_flags & rpb_chained)) ) @@ -1025,20 +1003,18 @@ // VIO_chase_record_version notify_garbage_collector(tdbb, rpb); } -#endif return true; } // Garbage collect. -#ifdef GARBAGE_THREAD if (!gcPolicyCooperative && (attachment->att_flags & ATT_notify_gc) && !rpb->rpb_relation->isTemporary()) { notify_garbage_collector(tdbb, rpb); return true; } -#endif + purge(tdbb, rpb); // Go back to be primary record version and chase versions all over again. @@ -1696,17 +1672,14 @@ transaction->tra_flags |= TRA_perform_autocommit; } -#ifdef GARBAGE_THREAD // VIO_erase if ((tdbb->getDatabase()->dbb_flags & DBB_gc_background) && !rpb->rpb_relation->isTemporary()) { notify_garbage_collector(tdbb, rpb, transaction->tra_number); } -#endif } -#ifdef GARBAGE_THREAD void VIO_fini(thread_db* tdbb) { /************************************** @@ -1728,7 +1701,6 @@ dbb->dbb_gc_fini.enter(); } } -#endif bool VIO_garbage_collect(thread_db* tdbb, record_param* rpb, const jrd_tra* transaction) @@ -2195,7 +2167,6 @@ } -#ifdef GARBAGE_THREAD void VIO_init(thread_db* tdbb) { /************************************** @@ -2248,7 +2219,6 @@ } } } -#endif void VIO_merge_proc_sav_points(thread_db* tdbb, jrd_tra* transaction, Savepoint** sav_point_list) @@ -2658,14 +2628,12 @@ transaction->tra_flags |= TRA_perform_autocommit; } -#ifdef GARBAGE_THREAD // VIO_modify if ((tdbb->getDatabase()->dbb_flags & DBB_gc_background) && !org_rpb->rpb_relation->isTemporary()) { notify_garbage_collector(tdbb, org_rpb, transaction->tra_number); } -#endif } @@ -2792,7 +2760,7 @@ if (!record) { if (!pool) - pool = dbb->dbb_permanent; + pool = rpb->rpb_relation->rel_pool; record = rpb->rpb_record = FB_NEW_RPT(*pool, format->fmt_length) Record(*pool); } @@ -3186,12 +3154,14 @@ record_param rpb; rpb.rpb_record = NULL; - rpb.rpb_stream_flags = 0; + rpb.rpb_stream_flags = RPB_s_no_data | RPB_s_sweeper; rpb.getWindow(tdbb).win_flags = WIN_large_scan; jrd_rel* relation = 0; // wasn't initialized: memory problem in catch() part. vec<jrd_rel*>* vector = 0; + GarbageCollector* gc = dbb->dbb_garbage_collector; + try { for (size_t i = 1; (vector = attachment->att_relations) && i < vector->count(); i++) @@ -3203,11 +3173,11 @@ rpb.rpb_number.setValue(BOF_NUMBER); rpb.rpb_org_scans = relation->rel_scan_count++; ++relation->rel_sweep_count; -#ifdef GARBAGE_THREAD - if (relation->rel_garbage) { - relation->rel_garbage->clear(); + + if (gc) { + gc->sweptRelation(transaction->tra_oldest_active, relation->rel_id); } -#endif + while (VIO_next_record(tdbb, &rpb, transaction, 0, false)) { CCH_RELEASE(tdbb, &rpb.getWindow(tdbb)); @@ -4013,11 +3983,10 @@ if (!DPM_get(tdbb, rpb, LCK_write)) { -#ifdef GARBAGE_THREAD // expunge if (tdbb->getDatabase()->dbb_flags & DBB_gc_background) notify_garbage_collector(tdbb, rpb); -#endif + return; } @@ -4038,11 +4007,9 @@ if (!(rpb->rpb_flags & rpb_deleted) || rpb->rpb_transaction_nr >= transaction->tra_oldest_active) { -#ifdef GARBAGE_THREAD // expunge if (tdbb->getDatabase()->dbb_flags & DBB_gc_background) notify_garbage_collector(tdbb, rpb); -#endif CCH_RELEASE(tdbb, &rpb->getWindow(tdbb)); return; @@ -4180,7 +4147,6 @@ } -#ifdef GARBAGE_THREAD static THREAD_ENTRY_DECLARE garbage_collector(THREAD_ENTRY_PARAM arg) { /************************************** @@ -4216,27 +4182,46 @@ bool found = false, flush = false; record_param rpb; MOVE_CLEAR(&rpb, sizeof(record_param)); + rpb.getWindow(tdbb).win_flags = WIN_garbage_collector; + rpb.rpb_stream_flags = RPB_s_no_data | RPB_s_sweeper; jrd_rel* relation = NULL; jrd_tra* transaction = NULL; + RefPtr<JAttachment> jAtt(NULL); + GarbageCollector* gc = NULL; + try { // Pseudo attachment needed for lock owner identification. Jrd::Attachment* const attachment = Jrd::Attachment::create(dbb); + jAtt = attachment->att_interface = new SysAttachment(attachment); + jAtt->getMutex()->enter(); + tdbb->setAttachment(attachment); attachment->att_filename = dbb->dbb_filename; attachment->att_flags = ATT_garbage_collector; - rpb.getWindow(tdbb).win_flags = WIN_garbage_collector; + UserId user; + user.usr_user_name = "Garbage Collector"; + attachment->att_user = &user; LCK_init(tdbb, LCK_OWNER_attachment); + INI_init(tdbb); + INI_init2(tdbb); + PAG_header(tdbb, true); + PAG_attachment_id(tdbb); TRA_init(attachment); + gc = FB_NEW(*attachment->att_pool) GarbageCollector(*attachment->att_pool, dbb); + dbb->dbb_garbage_collector = gc; + + attachment->att_next = dbb->dbb_sys_attachments; + dbb->dbb_sys_attachments = attachment; + // Notify our creator that we have started dbb->dbb_flags |= DBB_garbage_collector; dbb->dbb_gc_init.release(); - } // try catch (const Firebird::Exception&) { goto gc_exit; @@ -4256,7 +4241,7 @@ dbb->dbb_flags |= DBB_gc_active; found = false; - relation = 0; + relation = NULL; // If background thread activity has been suspended because // of I/O errors then idle until the condition is cleared. @@ -4277,6 +4262,7 @@ while (dbb->dbb_flags & DBB_suspend_bgio) { + Attachment::Checkout cout(jAtt->getHandle()); dbb->dbb_gc_sem.tryEnter(10); if (!(dbb->dbb_flags & DBB_garbage_collector)) @@ -4296,108 +4282,88 @@ // Express interest in the relation to prevent it from being deleted // out from under us while garbage collection is in-progress. - vec<jrd_rel*>* vector = tdbb->getAttachment()->att_relations; - - for (ULONG id = 0; vector && id < vector->count(); ++id) + USHORT relID; + PageBitmap* gc_bitmap = NULL; + if (gc->getPageBitmap(dbb->dbb_oldest_snapshot, relID, &gc_bitmap)) { - relation = (*vector)[id]; + relation = MET_lookup_relation_id(tdbb, relID, false); + if (!relation || (relation->rel_flags & (REL_deleted | REL_deleting))) + { + delete gc_bitmap; + gc_bitmap = NULL; + gc->removeRelation(relID); + } //jrd_rel::RelPagesSnapshot pagesSnapshot(tdbb, relation); //relation->fillPagesSnapshot(pagesSnapshot); - RelationGarbage *relGarbage = - relation ? (RelationGarbage*)relation->rel_garbage : NULL; - - if (relation && (relation->rel_gc_bitmap || relGarbage) && - !(relation->rel_flags & (REL_deleted | REL_deleting))) + if (gc_bitmap) { - if (relGarbage) { - relGarbage->getGarbage(dbb->dbb_oldest_snapshot, &relation->rel_gc_bitmap); - } - ++relation->rel_sweep_count; rpb.rpb_relation = relation; - if (relation->rel_gc_bitmap) + while (gc_bitmap->getFirst()) { - while (relation->rel_gc_bitmap->getFirst()) - { - const ULONG dp_sequence = relation->rel_gc_bitmap->current(); + const ULONG dp_sequence = gc_bitmap->current(); - if (!(dbb->dbb_flags & DBB_garbage_collector)) { - --relation->rel_sweep_count; - goto gc_exit; - } + if (!(dbb->dbb_flags & DBB_garbage_collector)) { + --relation->rel_sweep_count; + goto gc_exit; + } - relation->rel_gc_bitmap->clear(dp_sequence); + gc_bitmap->clear(dp_sequence); - if (!transaction) - { - // Start a "precommitted" transaction by using read-only, - // read committed. Of particular note is the absence of a - // transaction lock which means the transaction does not - // inhibit garbage collection by its very existence. + if (!transaction) + { + // Start a "precommitted" transaction by using read-only, + // read committed. Of particular note is the absence of a + // transaction lock which means the transaction does not + // inhibit garbage collection by its very existence. - transaction = TRA_start(tdbb, sizeof(gc_tpb), gc_tpb); - tdbb->setTransaction(transaction); - } - else - { - // Refresh our notion of the oldest transactions for - // efficient garbage collection. This is very cheap. + transaction = TRA_start(tdbb, sizeof(gc_tpb), gc_tpb); + tdbb->setTransaction(transaction); + } + else + { + // Refresh our notion of the oldest transactions for + // efficient garbage collection. This is very cheap. - transaction->tra_oldest = dbb->dbb_oldest_transaction; - transaction->tra_oldest_active = dbb->dbb_oldest_snapshot; - } + transaction->tra_oldest = dbb->dbb_oldest_transaction; + transaction->tra_oldest_active = dbb->dbb_oldest_snapshot; + } - found = flush = true; - rpb.rpb_number.setValue(((SINT64) dp_sequence * dbb->dbb_max_reco... [truncated message content] |
From: <fir...@us...> - 2011-05-28 03:16:29
|
Revision: 53030 http://firebird.svn.sourceforge.net/firebird/?rev=53030&view=rev Author: firebirds Date: 2011-05-28 03:16:22 +0000 (Sat, 28 May 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-05-28 02:05:45 UTC (rev 53029) +++ firebird/trunk/ChangeLog 2011-05-28 03:16:22 UTC (rev 53030) @@ -1,3 +1,72 @@ + 2011-05-28 02:05 asfernandes + M src/common/classes/ImplementHelper.h + M src/jrd/DatabaseSnapshot.cpp + M src/jrd/EngineInterface.h + M src/jrd/GarbageCollector.cpp + M src/jrd/GarbageCollector.h + M src/jrd/cch.cpp + M src/jrd/jrd.cpp + M src/jrd/req.h + M src/jrd/vio.cpp +Misc. + + 2011-05-27 16:18 asfernandes + M src/jrd/GarbageCollector.cpp + M src/jrd/GarbageCollector.h +Misc. + + 2011-05-27 16:04 asfernandes + M src/jrd/GarbageCollector.h +Correction. + + 2011-05-27 15:29 asfernandes + M src/dsql/ExprNodes.cpp + M src/dsql/metd.epp +Fixed CORE-3475 - Parameters inside the CAST function are described as not nullable. + + 2011-05-27 11:31 alexpeshkoff + M src/common/classes/ImplementHelper.h + M src/jrd/jrd.cpp + M src/yvalve/MasterImplementation.cpp + M src/yvalve/PluginManager.cpp +Avoid deadlocks in timers. Fixes use of timers to delay plugin modules unload. + + 2011-05-27 10:13 alexpeshkoff + M src/jrd/req.h +Make sure rpb is initialized + + 2011-05-27 09:48 alexpeshkoff + M src/jrd/GarbageCollector.h +Misc + + 2011-05-27 07:57 hvlad + M builds/win32/msvc10/engine.vcxproj + M builds/win32/msvc10/engine.vcxproj.filters + M builds/win32/msvc8/engine.vcproj + M builds/win32/msvc9/engine.vcproj + M src/common/common.h + M src/jrd/Attachment.h + M src/jrd/Database.h + M src/jrd/DatabaseSnapshot.cpp + M src/jrd/DatabaseSnapshot.h + M src/jrd/EngineInterface.h + A src/jrd/GarbageCollector.cpp + A src/jrd/GarbageCollector.h + M src/jrd/Relation.cpp + M src/jrd/Relation.h + M src/jrd/cch.cpp + M src/jrd/cch.h + M src/jrd/cch_proto.h + M src/jrd/dfw.epp + M src/jrd/dpm.epp + M src/jrd/jrd.cpp + M src/jrd/req.h + M src/jrd/tra.cpp + M src/jrd/vio.cpp + M src/jrd/vio_proto.h +Enabled background threads (garbage collector and cache writer). +Introduced special kind of system attachments used in this threads and show its activity in monitoring. + 2011-05-27 02:05 asfernandes M src/dsql/DdlNodes.epp M src/dsql/DsqlCompilerScratch.cpp Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-05-28 02:05:45 UTC (rev 53029) +++ firebird/trunk/src/jrd/build_no.h 2011-05-28 03:16:22 UTC (rev 53030) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29394 + FORMAL BUILD NUMBER:29402 */ -#define PRODUCT_VER_STRING "3.0.0.29394" -#define FILE_VER_STRING "WI-T3.0.0.29394" -#define LICENSE_VER_STRING "WI-T3.0.0.29394" -#define FILE_VER_NUMBER 3, 0, 0, 29394 +#define PRODUCT_VER_STRING "3.0.0.29402" +#define FILE_VER_STRING "WI-T3.0.0.29402" +#define LICENSE_VER_STRING "WI-T3.0.0.29402" +#define FILE_VER_NUMBER 3, 0, 0, 29402 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29394" +#define FB_BUILD_NO "29402" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-05-28 02:05:45 UTC (rev 53029) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-05-28 03:16:22 UTC (rev 53030) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29394 +BuildNum=29402 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-05-31 03:17:49
|
Revision: 53044 http://firebird.svn.sourceforge.net/firebird/?rev=53044&view=rev Author: firebirds Date: 2011-05-31 03:17:42 +0000 (Tue, 31 May 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-05-31 01:00:31 UTC (rev 53043) +++ firebird/trunk/ChangeLog 2011-05-31 03:17:42 UTC (rev 53044) @@ -1,3 +1,31 @@ + 2011-05-31 01:00 asfernandes + M src/jrd/RecordSourceNodes.cpp +Frontport fix for CORE-3489 - Blob transliteration may not happen inside the union. + + 2011-05-30 15:51 alexpeshkoff + M builds/install/arch-specific/linux/misc/tarMainInstall.sh.in + M builds/install/arch-specific/linux/misc/tarMainUninstall.sh.in + M builds/install/misc/posixLibrary.sh.in +Frontported CORE-3467: provide a silent install switch + + 2011-05-30 14:26 hvlad + M src/jrd/Relation.h + M src/jrd/dfw.epp + M src/jrd/met.epp +Fixed related bugs +CORE-3502 : DROP VIEW ignores the existing non-column dependencies, and +CORE-3503 : ALTER VIEW crashes the server if the new version has an artificial (aggregate or union) stream at the position of a regular context in the older version. +// Name REL_view is already used in DSQL so i introduced ugly REL_jrd_view flag + + 2011-05-30 14:05 alexpeshkoff + M src/jrd/flu.cpp + M src/jrd/flu.h +Frontported CORE-3443: Races in UDF library lookup + + 2011-05-30 09:59 dimitr + M src/remote/inet.cpp +Fixed CORE-3387: Client library could hang infinitely waiting for a reply packet on a forcibly disconnected server socket. + 2011-05-28 02:05 asfernandes M src/common/classes/ImplementHelper.h M src/jrd/DatabaseSnapshot.cpp Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-05-31 01:00:31 UTC (rev 53043) +++ firebird/trunk/src/jrd/build_no.h 2011-05-31 03:17:42 UTC (rev 53044) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29402 + FORMAL BUILD NUMBER:29407 */ -#define PRODUCT_VER_STRING "3.0.0.29402" -#define FILE_VER_STRING "WI-T3.0.0.29402" -#define LICENSE_VER_STRING "WI-T3.0.0.29402" -#define FILE_VER_NUMBER 3, 0, 0, 29402 +#define PRODUCT_VER_STRING "3.0.0.29407" +#define FILE_VER_STRING "WI-T3.0.0.29407" +#define LICENSE_VER_STRING "WI-T3.0.0.29407" +#define FILE_VER_NUMBER 3, 0, 0, 29407 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29402" +#define FB_BUILD_NO "29407" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-05-31 01:00:31 UTC (rev 53043) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-05-31 03:17:42 UTC (rev 53044) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29402 +BuildNum=29407 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <asf...@us...> - 2011-06-01 01:45:03
|
Revision: 53068 http://firebird.svn.sourceforge.net/firebird/?rev=53068&view=rev Author: asfernandes Date: 2011-06-01 01:44:54 +0000 (Wed, 01 Jun 2011) Log Message: ----------- Work in progress on the external engines API changes. Modified Paths: -------------- firebird/trunk/builds/posix/Makefile.in.plugins_examples firebird/trunk/builds/win32/msvc10/engine.vcxproj firebird/trunk/builds/win32/msvc10/engine.vcxproj.filters firebird/trunk/builds/win32/msvc8/engine.vcproj firebird/trunk/builds/win32/msvc9/engine.vcproj firebird/trunk/examples/udr/UdrCppExample.cpp firebird/trunk/src/common/dsc.cpp firebird/trunk/src/common/dsc.h firebird/trunk/src/dsql/dsql.cpp firebird/trunk/src/include/FirebirdApi.h firebird/trunk/src/include/FirebirdExternalApi.h firebird/trunk/src/include/FirebirdUdrCpp.h firebird/trunk/src/jrd/ExtEngineManager.cpp firebird/trunk/src/jrd/ExtEngineManager.h firebird/trunk/src/jrd/Function.epp firebird/trunk/src/jrd/cmp.cpp firebird/trunk/src/jrd/exe.cpp firebird/trunk/src/jrd/req.h firebird/trunk/src/plugins/udr_engine/UdrEngine.cpp firebird/trunk/src/yvalve/YObjects.h Removed Paths: ------------- firebird/trunk/src/jrd/ValueImpl.cpp firebird/trunk/src/jrd/ValueImpl.h firebird/trunk/src/jrd/ValuesImpl.cpp firebird/trunk/src/jrd/ValuesImpl.h Modified: firebird/trunk/builds/posix/Makefile.in.plugins_examples =================================================================== --- firebird/trunk/builds/posix/Makefile.in.plugins_examples 2011-05-31 16:19:47 UTC (rev 53067) +++ firebird/trunk/builds/posix/Makefile.in.plugins_examples 2011-06-01 01:44:54 UTC (rev 53068) @@ -59,10 +59,12 @@ $(PLUGINS)/udr/$(LIB_PREFIX)udrcpp_example.$(SHRLIB_EXT): $(UDR_Objects) ifeq ($(PLATFORM),DARWIN) - $(LIB_LINK) $(LIB_BUNDLE_OPTIONS) -o $@ $^ @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ + $(LIB_LINK) $(LIB_BUNDLE_OPTIONS) -o $@ $^ @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ \ + $(FIREBIRD_LIBRARY_LINK) else $(LIB_LINK) $(LIB_LINK_OPTIONS) $(LIB_LINK_SONAME)udrcpp_example.$(SHRLIB_EXT) \ -$(LIB_PATH_OPTS) -o $@ $^ $(THR_LIBS) $(PLUGINS)/$(LIB_PREFIX)udr_engine.$(SHRLIB_EXT) + $(LIB_PATH_OPTS) -o $@ $^ $(THR_LIBS) $(PLUGINS)/$(LIB_PREFIX)udr_engine.$(SHRLIB_EXT) \ + $(FIREBIRD_LIBRARY_LINK) endif include $(ROOT)/gen/make.shared.targets Modified: firebird/trunk/builds/win32/msvc10/engine.vcxproj =================================================================== --- firebird/trunk/builds/win32/msvc10/engine.vcxproj 2011-05-31 16:19:47 UTC (rev 53067) +++ firebird/trunk/builds/win32/msvc10/engine.vcxproj 2011-06-01 01:44:54 UTC (rev 53068) @@ -153,8 +153,6 @@ <ClCompile Include="..\..\..\src\jrd\trace\TraceService.cpp" /> <ClCompile Include="..\..\..\src\jrd\UserManagement.cpp" /> <ClCompile Include="..\..\..\src\jrd\validation.cpp" /> - <ClCompile Include="..\..\..\src\jrd\ValueImpl.cpp" /> - <ClCompile Include="..\..\..\src\jrd\ValuesImpl.cpp" /> <ClCompile Include="..\..\..\src\jrd\vio.cpp" /> <ClCompile Include="..\..\..\src\jrd\VirtualTable.cpp" /> <ClCompile Include="..\..\..\src\lock\lock.cpp" /> @@ -339,8 +337,6 @@ <ClInclude Include="..\..\..\src\jrd\types.h" /> <ClInclude Include="..\..\..\src\jrd\UserManagement.h" /> <ClInclude Include="..\..\..\src\jrd\val.h" /> - <ClInclude Include="..\..\..\src\jrd\ValueImpl.h" /> - <ClInclude Include="..\..\..\src\jrd\ValuesImpl.h" /> <ClInclude Include="..\..\..\src\jrd\val_proto.h" /> <ClInclude Include="..\..\..\src\jrd\vio_debug.h" /> <ClInclude Include="..\..\..\src\jrd\vio_proto.h" /> @@ -562,4 +558,4 @@ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> -</Project> \ No newline at end of file +</Project> Modified: firebird/trunk/builds/win32/msvc10/engine.vcxproj.filters =================================================================== --- firebird/trunk/builds/win32/msvc10/engine.vcxproj.filters 2011-05-31 16:19:47 UTC (rev 53067) +++ firebird/trunk/builds/win32/msvc10/engine.vcxproj.filters 2011-06-01 01:44:54 UTC (rev 53068) @@ -384,12 +384,6 @@ <ClCompile Include="..\..\..\src\jrd\validation.cpp"> <Filter>JRD files</Filter> </ClCompile> - <ClCompile Include="..\..\..\src\jrd\ValueImpl.cpp"> - <Filter>JRD files</Filter> - </ClCompile> - <ClCompile Include="..\..\..\src\jrd\ValuesImpl.cpp"> - <Filter>JRD files</Filter> - </ClCompile> <ClCompile Include="..\..\..\src\jrd\vio.cpp"> <Filter>JRD files</Filter> </ClCompile> @@ -1001,12 +995,6 @@ <ClInclude Include="..\..\..\src\jrd\val_proto.h"> <Filter>Header files</Filter> </ClInclude> - <ClInclude Include="..\..\..\src\jrd\ValueImpl.h"> - <Filter>Header files</Filter> - </ClInclude> - <ClInclude Include="..\..\..\src\jrd\ValuesImpl.h"> - <Filter>Header files</Filter> - </ClInclude> <ClInclude Include="..\..\..\src\jrd\vio_debug.h"> <Filter>Header files</Filter> </ClInclude> @@ -1082,4 +1070,4 @@ <Filter>Resource files</Filter> </ResourceCompile> </ItemGroup> -</Project> \ No newline at end of file +</Project> Modified: firebird/trunk/builds/win32/msvc8/engine.vcproj =================================================================== --- firebird/trunk/builds/win32/msvc8/engine.vcproj 2011-05-31 16:19:47 UTC (rev 53067) +++ firebird/trunk/builds/win32/msvc8/engine.vcproj 2011-06-01 01:44:54 UTC (rev 53068) @@ -588,14 +588,6 @@ > </File> <File - RelativePath="..\..\..\src\jrd\ValueImpl.cpp" - > - </File> - <File - RelativePath="..\..\..\src\jrd\ValuesImpl.cpp" - > - </File> - <File RelativePath="..\..\..\src\jrd\vio.cpp" > </File> @@ -1668,14 +1660,6 @@ > </File> <File - RelativePath="..\..\..\src\jrd\ValueImpl.h" - > - </File> - <File - RelativePath="..\..\..\src\jrd\ValuesImpl.h" - > - </File> - <File RelativePath="..\..\..\src\jrd\vio_debug.h" > </File> Modified: firebird/trunk/builds/win32/msvc9/engine.vcproj =================================================================== --- firebird/trunk/builds/win32/msvc9/engine.vcproj 2011-05-31 16:19:47 UTC (rev 53067) +++ firebird/trunk/builds/win32/msvc9/engine.vcproj 2011-06-01 01:44:54 UTC (rev 53068) @@ -588,14 +588,6 @@ > </File> <File - RelativePath="..\..\..\src\jrd\ValueImpl.cpp" - > - </File> - <File - RelativePath="..\..\..\src\jrd\ValuesImpl.cpp" - > - </File> - <File RelativePath="..\..\..\src\jrd\vio.cpp" > </File> @@ -1668,14 +1660,6 @@ > </File> <File - RelativePath="..\..\..\src\jrd\ValueImpl.h" - > - </File> - <File - RelativePath="..\..\..\src\jrd\ValuesImpl.h" - > - </File> - <File RelativePath="..\..\..\src\jrd\vio_debug.h" > </File> Modified: firebird/trunk/examples/udr/UdrCppExample.cpp =================================================================== --- firebird/trunk/examples/udr/UdrCppExample.cpp 2011-05-31 16:19:47 UTC (rev 53067) +++ firebird/trunk/examples/udr/UdrCppExample.cpp 2011-06-01 01:44:54 UTC (rev 53068) @@ -30,28 +30,6 @@ using namespace Firebird::Udr; -typedef IMaster* (ISC_EXPORT *FuncGetMasterInterface)(); - -typedef ISC_LONG (ISC_EXPORT_VARARG *FuncEventBlock)(ISC_UCHAR**, ISC_UCHAR**, ISC_USHORT, ...); -typedef ISC_STATUS (ISC_EXPORT *FuncWaitForEvent)(ISC_STATUS*, isc_db_handle*, - short, const ISC_UCHAR*, ISC_UCHAR*); -typedef void (ISC_EXPORT *FuncEventCounts)(ISC_ULONG*, short, ISC_UCHAR*, const ISC_UCHAR*); - -typedef ISC_STATUS (ISC_EXPORT *FuncDsqlAllocateStatement)(ISC_STATUS*, isc_db_handle*, - isc_stmt_handle*); -typedef ISC_STATUS (ISC_EXPORT *FuncDsqlDescribe)(ISC_STATUS*, isc_stmt_handle*, unsigned short, - XSQLDA*); -typedef ISC_STATUS (ISC_EXPORT *FuncDsqlDescribeBind)(ISC_STATUS*, isc_stmt_handle*, unsigned short, - XSQLDA*); -typedef ISC_STATUS (ISC_EXPORT *FuncDsqlExecute)(ISC_STATUS*, isc_tr_handle*, isc_stmt_handle*, - unsigned short, XSQLDA*); -typedef ISC_STATUS (ISC_EXPORT *FuncDsqlExecute2)(ISC_STATUS*, isc_tr_handle*, isc_stmt_handle*, - unsigned short, XSQLDA*, XSQLDA*); -typedef ISC_STATUS (ISC_EXPORT *FuncDsqlFreeStatement)(ISC_STATUS*, isc_stmt_handle*, unsigned short); -typedef ISC_STATUS (ISC_EXPORT *FuncDsqlPrepare)(ISC_STATUS*, isc_tr_handle*, isc_stmt_handle*, - unsigned short, const ISC_SCHAR*, unsigned short, XSQLDA*); - - namespace { template <typename T> @@ -133,10 +111,461 @@ } +static IMaster* master = fb_get_master_interface(); + + +//------------------------------------------------------------------------------ + + +class MessageImpl; + +class ParamDescBase +{ +public: + ParamDescBase() + : pos(0), + nullPos(0) + { + } + + unsigned pos; + unsigned nullPos; +}; + +template <class T> +class ParamDesc : public ParamDescBase +{ +}; + +template <> +class ParamDesc<void*> : public ParamDescBase +{ +public: + ParamDesc(MessageImpl& message, const Firebird::IParametersMetadata* aParams); + + unsigned align(unsigned size, unsigned aIndex) + { + index = aIndex; + + AutoDispose<IStatus> status(master->getStatus()); + + switch ((type = params->getType(status, index))) + { + case SQL_SHORT: + size = FB_ALIGN(size, sizeof(ISC_SHORT)); + break; + + case SQL_LONG: + size = FB_ALIGN(size, sizeof(ISC_LONG)); + break; + + case SQL_INT64: + size = FB_ALIGN(size, sizeof(ISC_INT64)); + break; + + case SQL_FLOAT: + size = FB_ALIGN(size, sizeof(float)); + break; + + case SQL_DOUBLE: + size = FB_ALIGN(size, sizeof(double)); + break; + + case SQL_BLOB: + size = FB_ALIGN(size, sizeof(ISC_QUAD)); + break; + + case SQL_TEXT: + case SQL_VARYING: + size = FB_ALIGN(size, sizeof(ISC_USHORT)); + break; + + default: + assert(false); + break; + } + + return size; + } + + unsigned addBlr(ISC_UCHAR*& blr) + { + AutoDispose<IStatus> status(master->getStatus()); + unsigned ret; + + switch (type) + { + case SQL_SHORT: + { + unsigned scale = params->getScale(status, index); + *blr++ = blr_short; + *blr++ = scale; + ret = sizeof(ISC_SHORT); + break; + } + + case SQL_LONG: + { + unsigned scale = params->getScale(status, index); + *blr++ = blr_long; + *blr++ = scale; + ret = sizeof(ISC_LONG); + break; + } + + case SQL_INT64: + { + unsigned scale = params->getScale(status, index); + *blr++ = blr_int64; + *blr++ = scale; + ret = sizeof(ISC_INT64); + break; + } + + case SQL_FLOAT: + *blr++ = blr_float; + ret = sizeof(float); + break; + + case SQL_DOUBLE: + *blr++ = blr_double; + ret = sizeof(double); + break; + + case SQL_BLOB: + *blr++ = blr_blob2; + *blr++ = 0; + *blr++ = 0; + *blr++ = 0; + *blr++ = 0; + ret = sizeof(ISC_QUAD); + break; + + case SQL_TEXT: + case SQL_VARYING: + { + unsigned length = params->getLength(status, index); + *blr++ = blr_varying; + *blr++ = length & 0xFF; + *blr++ = (length >> 8) & 0xFF; + ret = sizeof(ISC_USHORT) + length; + break; + } + + default: + assert(false); + ret = 0; + break; + } + + return ret; + } + + unsigned getType() const + { + return type; + } + +private: + const Firebird::IParametersMetadata* params; + unsigned type; + unsigned index; +}; + +class MessageImpl : public Firebird::FbMessage +{ +public: + MessageImpl(unsigned aItemCount, ISC_UCHAR* aBuffer = NULL) + : itemCount(aItemCount * 2), + freeBuffer(!aBuffer), + items(0) + { + static const ISC_UCHAR HEADER[] = { + blr_version5, + blr_begin, + blr_message, 0, 0, 0 + }; + + blrLength = 0; + blr = blrPos = new ISC_UCHAR[sizeof(HEADER) + 10 * itemCount + 2]; + bufferLength = 0; + buffer = aBuffer; + + memcpy(blrPos, HEADER, sizeof(HEADER)); + blrPos += sizeof(HEADER); + } + + ~MessageImpl() + { + if (freeBuffer && buffer) + delete [] buffer; + + if (blr) + delete [] blr; + } + + template <typename T> + void add(ParamDesc<T>& paramDesc) + { + if (items >= itemCount) + return; // return an error, this is already constructed message + + bufferLength = paramDesc.align(bufferLength, items / 2); + paramDesc.pos = bufferLength; + bufferLength += paramDesc.addBlr(blrPos); + + bufferLength = FB_ALIGN(bufferLength, sizeof(ISC_SHORT)); + paramDesc.nullPos = bufferLength; + bufferLength += sizeof(ISC_SHORT); + + *blrPos++ = blr_short; + *blrPos++ = 0; + + items += 2; + + if (items == itemCount) + { + *blrPos++ = blr_end; + *blrPos++ = blr_eoc; + + blrLength = blrPos - blr; + + ISC_UCHAR* blrStart = blrPos - blrLength; + blrStart[4] = items & 0xFF; + blrStart[5] = (items >> 8) & 0xFF; + + if (!buffer) + { + buffer = new ISC_UCHAR[bufferLength]; + memset(buffer, 0, bufferLength); + } + } + } + + bool isNull(const ParamDescBase& index) + { + return *(ISC_SHORT*) (buffer + index.nullPos); + } + + void setNull(const ParamDescBase& index, bool null) + { + *(ISC_SHORT*) (buffer + index.nullPos) = (ISC_SHORT) null; + } + + template <typename T> T& operator [](const ParamDesc<T>& index) + { + return *(T*) (buffer + index.pos); + } + + void* operator [](const ParamDesc<void*>& index) + { + return buffer + index.pos; + } + +public: + unsigned itemCount; + bool freeBuffer; + unsigned items; + ISC_UCHAR* blrPos; +}; + +template <> +class ParamDesc<ISC_SHORT> : public ParamDescBase +{ +public: + ParamDesc(MessageImpl& message, ISC_UCHAR aScale = 0) + : scale(aScale) + { + message.add(*this); + } + + unsigned align(unsigned size, unsigned /*index*/) + { + return FB_ALIGN(size, sizeof(ISC_SHORT)); + } + + unsigned addBlr(ISC_UCHAR*& blr) + { + *blr++ = blr_short; + *blr++ = scale; + return sizeof(ISC_SHORT); + } + +private: + ISC_UCHAR scale; +}; + +template <> +class ParamDesc<ISC_LONG> : public ParamDescBase +{ +public: + ParamDesc(MessageImpl& message, ISC_UCHAR aScale = 0) + : scale(aScale) + { + message.add(*this); + } + + unsigned align(unsigned size, unsigned /*index*/) + { + return FB_ALIGN(size, sizeof(ISC_LONG)); + } + + unsigned addBlr(ISC_UCHAR*& blr) + { + *blr++ = blr_long; + *blr++ = scale; + return sizeof(ISC_LONG); + } + +private: + ISC_UCHAR scale; +}; + +template <> +class ParamDesc<ISC_INT64> : public ParamDescBase +{ +public: + ParamDesc(MessageImpl& message, ISC_UCHAR aScale = 0) + : scale(aScale) + { + message.add(*this); + } + + unsigned align(unsigned size, unsigned /*index*/) + { + return FB_ALIGN(size, sizeof(ISC_INT64)); + } + + unsigned addBlr(ISC_UCHAR*& blr) + { + *blr++ = blr_int64; + *blr++ = scale; + return sizeof(ISC_INT64); + } + +private: + ISC_UCHAR scale; +}; + +template <> +class ParamDesc<float> : public ParamDescBase +{ +public: + ParamDesc(MessageImpl& message) + { + message.add(*this); + } + + unsigned align(unsigned size, unsigned /*index*/) + { + return FB_ALIGN(size, sizeof(float)); + } + + unsigned addBlr(ISC_UCHAR*& blr) + { + *blr++ = blr_float; + return sizeof(float); + } +}; + +template <> +class ParamDesc<double> : public ParamDescBase +{ +public: + ParamDesc(MessageImpl& message) + { + message.add(*this); + } + + unsigned align(unsigned size, unsigned /*index*/) + { + return FB_ALIGN(size, sizeof(double)); + } + + unsigned addBlr(ISC_UCHAR*& blr) + { + *blr++ = blr_double; + return sizeof(double); + } +}; + +template <> +class ParamDesc<ISC_QUAD> : public ParamDescBase +{ +public: + ParamDesc(MessageImpl& message) + { + message.add(*this); + } + + unsigned align(unsigned size, unsigned /*index*/) + { + return FB_ALIGN(size, sizeof(ISC_QUAD)); + } + + unsigned addBlr(ISC_UCHAR*& blr) + { + *blr++ = blr_blob2; + *blr++ = 0; + *blr++ = 0; + *blr++ = 0; + *blr++ = 0; + return sizeof(ISC_QUAD); + } +}; + +struct FbString +{ + ISC_USHORT length; + char str[1]; +}; + +template <> +class ParamDesc<FbString> : public ParamDescBase +{ +public: + ParamDesc(MessageImpl& message, ISC_USHORT aLength) + : length(aLength) + { + message.add(*this); + } + + unsigned align(unsigned size, unsigned /*index*/) + { + return FB_ALIGN(size, sizeof(ISC_USHORT)); + } + + unsigned addBlr(ISC_UCHAR*& blr) + { + *blr++ = blr_varying; + *blr++ = length & 0xFF; + *blr++ = (length >> 8) & 0xFF; + return sizeof(ISC_USHORT) + length; + } + +private: + ISC_USHORT length; +}; + +//// TODO: boolean, date, time, timestamp + +//-------------------------------------- + +inline ParamDesc<void*>::ParamDesc(MessageImpl& message, const Firebird::IParametersMetadata* aParams) + : params(aParams), + type(0) +{ + message.add(*this); +} + + +//------------------------------------------------------------------------------ + + /*** create function wait_event ( - event_name varchar(31) character set ascii -) returns integer + event_name varchar(31) character set ascii not null +) returns integer not null external name 'udrcpp_example!wait_event' engine udr; ***/ @@ -211,91 +640,110 @@ ~FB_UDR_TRIGGER(replicate)(); private: - void initialize(ExternalContext* context, Values* values); + void initialize(ExternalContext* context); bool initialized; XSQLDA* inSqlDa; isc_stmt_handle stmtHandle; - - // ISC entry points - FuncGetMasterInterface funcGetMasterInterface; - FuncDsqlAllocateStatement funcDsqlAllocateStatement; - FuncDsqlDescribe funcDsqlDescribe; - FuncDsqlDescribeBind funcDsqlDescribeBind; - FuncDsqlExecute funcDsqlExecute; - FuncDsqlExecute2 funcDsqlExecute2; - FuncDsqlFreeStatement funcDsqlFreeStatement; - FuncDsqlPrepare funcDsqlPrepare; +#if 0 + IStatement* stmt; +#endif FB_UDR_END_DECLARE_TRIGGER(replicate) FB_UDR_BEGIN_FUNCTION(wait_event) { - // ISC entry points - FuncEventBlock funcEventBlock = (FuncEventBlock) getEntryPoint(context, "isc_event_block"); - FuncWaitForEvent funcWaitForEvent = (FuncWaitForEvent) getEntryPoint(context, "isc_wait_for_event"); - FuncEventCounts funcEventCounts = (FuncEventCounts) getEntryPoint(context, "isc_event_counts"); + MessageImpl inMessage(1, inMsg); + ParamDesc<FbString> nameDesc(inMessage, 31); - Value* val = params->getValue(ThrowError(), 1); + FbString& name = inMessage[nameDesc]; - const char* s = val->getString(ThrowError()); + char* s = new char[name.length + 1]; + memcpy(s, name.str, name.length); + s[name.length] = '\0'; unsigned char* eveBuffer; unsigned char* eveResult; - int eveLen = funcEventBlock(&eveBuffer, &eveResult, 1, s); + int eveLen = isc_event_block(&eveBuffer, &eveResult, 1, s); + delete [] s; + ISC_STATUS_ARRAY statusVector = {0}; isc_db_handle dbHandle = getIscDbHandle(context); ISC_ULONG counter = 0; - ThrowError::check(funcWaitForEvent(statusVector, &dbHandle, eveLen, eveBuffer, eveResult), + ThrowError::check(isc_wait_for_event(statusVector, &dbHandle, eveLen, eveBuffer, eveResult), statusVector); - funcEventCounts(&counter, eveLen, eveBuffer, eveResult); - ThrowError::check(funcWaitForEvent(statusVector, &dbHandle, eveLen, eveBuffer, eveResult), + isc_event_counts(&counter, eveLen, eveBuffer, eveResult); + ThrowError::check(isc_wait_for_event(statusVector, &dbHandle, eveLen, eveBuffer, eveResult), statusVector); - funcEventCounts(&counter, eveLen, eveBuffer, eveResult); + isc_event_counts(&counter, eveLen, eveBuffer, eveResult); isc_free((char*) eveBuffer); isc_free((char*) eveResult); - // returns the counter - result->setInt(ThrowError(), counter); + MessageImpl outMessage(1, outMsg); + ParamDesc<ISC_LONG> retDesc(outMessage); + + outMessage[retDesc] = counter; } FB_UDR_END_FUNCTION(wait_event) FB_UDR_BEGIN_FUNCTION(sum_args) { - unsigned count = params->getCount(); + AutoDispose<IStatus> status(master->getStatus()); + + const IParametersMetadata* params = metadata->getInputParameters(status); + ThrowError::check(status->get()); + + unsigned count = params->getCount(status); + ThrowError::check(status->get()); + + MessageImpl inMessage(count, inMsg); + + MessageImpl outMessage(1, outMsg); + ParamDesc<ISC_LONG> retDesc(outMessage); + int ret = 0; for (unsigned i = 0; i < count; ++i) { - Value* val = params->getValue(ThrowError(), i + 1); - ret += val->getInt(ThrowError()); + ParamDesc<ISC_LONG> numDesc(inMessage); + + if (inMessage.isNull(numDesc)) + { + outMessage.setNull(retDesc, true); + return; + } + else + ret += inMessage[numDesc]; } - result->setInt(ThrowError(), ret); + outMessage[retDesc] = ret; } FB_UDR_END_FUNCTION(sum_args) FB_UDR_BEGIN_PROCEDURE(gen_rows) { - Value* valStart = params->getValue(ThrowError(), 1); - Value* valEnd = params->getValue(ThrowError(), 2); + MessageImpl inMessage(2, inMsg); + ParamDesc<ISC_LONG> startDesc(inMessage); + ParamDesc<ISC_LONG> endDesc(inMessage); - counter = valStart->getInt(ThrowError()); - end = valEnd->getInt(ThrowError()); + counter = inMessage[startDesc]; + end = inMessage[endDesc]; } FB_UDR_FETCH_PROCEDURE(gen_rows) { if (counter > end) return false; - Value* ret = results->getValue(ThrowError(), 1); - ret->setInt(ThrowError(), counter++); + MessageImpl outMessage(1, outMsg); + ParamDesc<ISC_LONG> retDesc(outMessage); + outMessage[retDesc] = counter++; + return true; } FB_UDR_END_PROCEDURE(gen_rows) @@ -321,36 +769,24 @@ delete [] reinterpret_cast<char*>(inSqlDa); ISC_STATUS_ARRAY statusVector = {0}; - funcDsqlFreeStatement(statusVector, &stmtHandle, DSQL_drop); + isc_dsql_free_statement(statusVector, &stmtHandle, DSQL_drop); } -void FB_UDR_TRIGGER(replicate)::initialize(ExternalContext* context, Values* values) +void FB_UDR_TRIGGER(replicate)::initialize(ExternalContext* context) { if (initialized) return; - // ISC entry points - funcGetMasterInterface = (FuncGetMasterInterface) getEntryPoint(context, "fb_get_master_interface"); - funcDsqlAllocateStatement = (FuncDsqlAllocateStatement) - getEntryPoint(context, "isc_dsql_allocate_statement"); - funcDsqlDescribe = (FuncDsqlDescribe) getEntryPoint(context, "isc_dsql_describe"); - funcDsqlDescribeBind = (FuncDsqlDescribeBind) getEntryPoint(context, "isc_dsql_describe_bind"); - funcDsqlExecute = (FuncDsqlExecute) getEntryPoint(context, "isc_dsql_execute"); - funcDsqlExecute2 = (FuncDsqlExecute2) getEntryPoint(context, "isc_dsql_execute2"); - funcDsqlFreeStatement = (FuncDsqlFreeStatement) getEntryPoint(context, "isc_dsql_free_statement"); - funcDsqlPrepare = (FuncDsqlPrepare) getEntryPoint(context, "isc_dsql_prepare"); - ISC_STATUS_ARRAY statusVector = {0}; isc_db_handle dbHandle = getIscDbHandle(context); isc_tr_handle trHandle = getIscTrHandle(context); stmtHandle = 0; - ThrowError::check(funcDsqlAllocateStatement(statusVector, &dbHandle, &stmtHandle), statusVector); - ThrowError::check(funcDsqlPrepare(statusVector, &trHandle, &stmtHandle, 0, + ThrowError::check(isc_dsql_allocate_statement(statusVector, &dbHandle, &stmtHandle), statusVector); + ThrowError::check(isc_dsql_prepare(statusVector, &trHandle, &stmtHandle, 0, "select data_source from replicate_config where name = ?", SQL_DIALECT_CURRENT, NULL), statusVector); - IMaster* master(funcGetMasterInterface()); AutoDispose<IStatus> status(master->getStatus()); const char* table = metadata->getTriggerTable(status); @@ -372,7 +808,7 @@ inSqlDa = reinterpret_cast<XSQLDA*>(new char[(XSQLDA_LENGTH(1))]); inSqlDa->version = SQLDA_VERSION1; inSqlDa->sqln = 1; - ThrowError::check(funcDsqlDescribeBind(statusVector, &stmtHandle, SQL_DIALECT_CURRENT, inSqlDa), + ThrowError::check(isc_dsql_describe_bind(statusVector, &stmtHandle, SQL_DIALECT_CURRENT, inSqlDa), statusVector); inSqlDa->sqlvar[0].sqldata = new char[sizeof(short) + inSqlDa->sqlvar[0].sqllen]; strncpy(inSqlDa->sqlvar[0].sqldata + sizeof(short), info, inSqlDa->sqlvar[0].sqllen); @@ -381,31 +817,35 @@ XSQLDA* outSqlDa = reinterpret_cast<XSQLDA*>(new char[(XSQLDA_LENGTH(1))]); outSqlDa->version = SQLDA_VERSION1; outSqlDa->sqln = 1; - ThrowError::check(funcDsqlDescribe(statusVector, &stmtHandle, SQL_DIALECT_CURRENT, outSqlDa), + ThrowError::check(isc_dsql_describe(statusVector, &stmtHandle, SQL_DIALECT_CURRENT, outSqlDa), statusVector); outSqlDa->sqlvar[0].sqldata = new char[sizeof(short) + outSqlDa->sqlvar[0].sqllen + 1]; outSqlDa->sqlvar[0].sqldata[sizeof(short) + outSqlDa->sqlvar[0].sqllen] = '\0'; - ThrowError::check(funcDsqlExecute2(statusVector, &trHandle, &stmtHandle, SQL_DIALECT_CURRENT, + ThrowError::check(isc_dsql_execute2(statusVector, &trHandle, &stmtHandle, SQL_DIALECT_CURRENT, inSqlDa, outSqlDa), statusVector); - ThrowError::check(funcDsqlFreeStatement(statusVector, &stmtHandle, DSQL_unprepare), statusVector); + ThrowError::check(isc_dsql_free_statement(statusVector, &stmtHandle, DSQL_unprepare), statusVector); delete [] inSqlDa->sqlvar[0].sqldata; delete [] reinterpret_cast<char*>(inSqlDa); inSqlDa = NULL; - int count = values->getCount(); + const IParametersMetadata* fields = metadata->getTriggerFields(status); + ThrowError::check(status->get()); + unsigned count = fields->getCount(status); + ThrowError::check(status->get()); + char buffer[65536]; strcpy(buffer, "execute block (\n"); - for (int i = 1; i <= count; ++i) + for (unsigned i = 0; i < count; ++i) { - if (i > 1) + if (i > 0) strcat(buffer, ",\n"); - Value* val = values->getValue(ThrowError(), i); - const char* name = val->getName(ThrowError()); + const char* name = fields->getField(status, i); + ThrowError::check(status->get()); strcat(buffer, " p"); sprintf(buffer + strlen(buffer), "%d type of column \"%s\".\"%s\" = ?", i, table, name); @@ -420,13 +860,13 @@ strcat(buffer, table); strcat(buffer, "\" ("); - for (int i = 1; i <= count; ++i) + for (unsigned i = 0; i < count; ++i) { - if (i > 1) + if (i > 0) strcat(buffer, ", "); - Value* val = values->getValue(ThrowError(), i); - const char* name = val->getName(ThrowError()); + const char* name = fields->getField(status, i); + ThrowError::check(status->get()); strcat(buffer, "\""); strcat(buffer, name); @@ -435,18 +875,18 @@ strcat(buffer, ") values ("); - for (int i = 1; i <= count; ++i) + for (unsigned i = 0; i < count; ++i) { - if (i > 1) + if (i > 0) strcat(buffer, ", "); strcat(buffer, "?"); } strcat(buffer, ")') ("); - for (int i = 1; i <= count; ++i) + for (unsigned i = 0; i < count; ++i) { - if (i > 1) + if (i > 0) strcat(buffer, ", "); strcat(buffer, ":p"); sprintf(buffer + strlen(buffer), "%d", i); @@ -456,27 +896,28 @@ strcat(buffer, outSqlDa->sqlvar[0].sqldata + sizeof(short)); strcat(buffer, "';\nend"); - ThrowError::check(funcDsqlPrepare(statusVector, &trHandle, &stmtHandle, 0, buffer, + ThrowError::check(isc_dsql_prepare(statusVector, &trHandle, &stmtHandle, 0, buffer, SQL_DIALECT_CURRENT, NULL), statusVector); inSqlDa = reinterpret_cast<XSQLDA*>(new char[(XSQLDA_LENGTH(count))]); inSqlDa->version = SQLDA_VERSION1; inSqlDa->sqln = count; - ThrowError::check(funcDsqlDescribeBind(statusVector, &stmtHandle, SQL_DIALECT_CURRENT, inSqlDa), + ThrowError::check(isc_dsql_describe_bind(statusVector, &stmtHandle, SQL_DIALECT_CURRENT, inSqlDa), statusVector); - for (int i = 0; i < count; ++i) + for (unsigned i = 0; i < count; ++i) { XSQLVAR* var = &inSqlDa->sqlvar[i]; switch (var->sqltype & ~1) { case SQL_TEXT: - var->sqltype = SQL_VARYING | (var->sqltype & 1); - // fall into + var->sqldata = new char[var->sqllen]; + break; case SQL_VARYING: - var->sqldata = new char[sizeof(short) + var->sqllen]; + var->sqldata = new char[var->sqllen]; + var->sqllen += sizeof(short); break; case SQL_SHORT: @@ -493,6 +934,7 @@ case SQL_FLOAT: var->sqltype = SQL_DOUBLE | (var->sqltype & 1); + var->sqllen = sizeof(double); // fall into case SQL_DOUBLE: @@ -526,75 +968,38 @@ FB_UDR_BEGIN_TRIGGER(replicate) { - Values* values = newValues; + initialize(context); - initialize(context, values); + AutoDispose<IStatus> status(master->getStatus()); - int count = values->getCount(); + const IParametersMetadata* fields = metadata->getTriggerFields(status); + ThrowError::check(status->get()); + unsigned fieldsCount = fields->getCount(status); + ThrowError::check(status->get()); + + MessageImpl message(fieldsCount, newMsg); + ISC_STATUS_ARRAY statusVector = {0}; isc_db_handle dbHandle = getIscDbHandle(context); isc_tr_handle trHandle = getIscTrHandle(context); - for (int i = 1; i <= count; ++i) + for (unsigned i = 1; i <= fieldsCount; ++i) { + ParamDesc<void*> field(message, fields); + XSQLVAR* var = &inSqlDa->sqlvar[i - 1]; - Value* val = values->getValue(ThrowError(), i); - if (val->isNull()) - { + if (message.isNull(field)) *var->sqlind = -1; - continue; - } else + { *var->sqlind = 0; - - switch (var->sqltype & ~1) - { - case SQL_VARYING: - { - unsigned len; - const char* s = val->getString(ThrowError(), &len); - *reinterpret_cast<unsigned short*>(var->sqldata) = len; - memcpy(var->sqldata + sizeof(unsigned short), s, len); - break; - } - - case SQL_SHORT: - *reinterpret_cast<short*>(var->sqldata) = (short) val->getInt( - ThrowError(), var->sqlscale); - break; - - case SQL_LONG: - *reinterpret_cast<int32*>(var->sqldata) = val->getInt(ThrowError(), var->sqlscale); - break; - - case SQL_INT64: - *reinterpret_cast<int64*>(var->sqldata) = val->getBigInt(ThrowError(), var->sqlscale); - break; - - case SQL_DOUBLE: - *reinterpret_cast<double*>(var->sqldata) = val->getDouble(ThrowError()); - break; - - case SQL_BLOB: - { - int64 blobId = val->getBlobId(ThrowError()); - ISC_QUAD quad; - quad.gds_quad_low = ISC_ULONG(blobId); - quad.gds_quad_high = ISC_ULONG(blobId >> 32); - *reinterpret_cast<ISC_QUAD*>(var->sqldata) = quad; - break; - } - - //// TODO: SQL_TYPE_DATE, SQL_TIMESTAMP, SQL_TYPE_TIME - - default: - assert(false); + memcpy(var->sqldata, message[field], var->sqllen); } } - ThrowError::check(funcDsqlExecute(statusVector, &trHandle, &stmtHandle, SQL_DIALECT_CURRENT, + ThrowError::check(isc_dsql_execute(statusVector, &trHandle, &stmtHandle, SQL_DIALECT_CURRENT, inSqlDa), statusVector); } FB_UDR_END_TRIGGER(replicate) Modified: firebird/trunk/src/common/dsc.cpp =================================================================== --- firebird/trunk/src/common/dsc.cpp 2011-05-31 16:19:47 UTC (rev 53067) +++ firebird/trunk/src/common/dsc.cpp 2011-06-01 01:44:54 UTC (rev 53068) @@ -34,7 +34,9 @@ #include "../common/gdsassert.h" #include "../common/dsc_proto.h" +using namespace Firebird; + // When converting non-text values to text, how many bytes to allocate // for holding the text image of the value. @@ -1171,6 +1173,96 @@ } +void dsc::getSqlInfo(SLONG* sqlLength, SLONG* sqlSubType, SLONG* sqlScale, SLONG* sqlType) const +{ + *sqlLength = dsc_length; + *sqlSubType = 0; + *sqlScale = 0; + *sqlType = 0; + + switch (dsc_dtype) + { + case dtype_real: + *sqlType = SQL_FLOAT; + break; + + case dtype_array: + *sqlType = SQL_ARRAY; + break; + + case dtype_timestamp: + *sqlType = SQL_TIMESTAMP; + break; + + case dtype_sql_date: + *sqlType = SQL_TYPE_DATE; + break; + + case dtype_sql_time: + *sqlType = SQL_TYPE_TIME; + break; + + case dtype_double: + *sqlType = SQL_DOUBLE; + *sqlScale = dsc_scale; + break; + + case dtype_text: + *sqlType = SQL_TEXT; + *sqlSubType = dsc_sub_type; + break; + + case dtype_blob: + *sqlType = SQL_BLOB; + *sqlSubType = dsc_sub_type; + *sqlScale = dsc_scale; + break; + + case dtype_varying: + *sqlType = SQL_VARYING; + *sqlLength -= sizeof(USHORT); + *sqlSubType = dsc_sub_type; + break; + + case dtype_short: + case dtype_long: + case dtype_int64: + switch (dsc_dtype) + { + case dtype_short: + *sqlType = SQL_SHORT; + break; + + case dtype_long: + *sqlType = SQL_LONG; + break; + + default: + *sqlType = SQL_INT64; + } + + *sqlScale = dsc_scale; + if (dsc_sub_type) + *sqlSubType = dsc_sub_type; + break; + + case dtype_quad: + *sqlType = SQL_QUAD; + *sqlScale = dsc_scale; + break; + + case dtype_boolean: + *sqlType = SQL_BOOLEAN; + break; + + default: + status_exception::raise( + Arg::Gds(isc_sqlerr) << Arg::Num(-804) << + Arg::Gds(isc_dsql_datatype_err)); + } +} + + #ifdef DEV_BUILD void dsc::address32bit() const { Modified: firebird/trunk/src/common/dsc.h =================================================================== --- firebird/trunk/src/common/dsc.h 2011-05-31 16:19:47 UTC (rev 53067) +++ firebird/trunk/src/common/dsc.h 2011-06-01 01:44:54 UTC (rev 53068) @@ -348,6 +348,7 @@ #endif const char* typeToText() const; + void getSqlInfo(SLONG* sqlLength, SLONG* sqlSubType, SLONG* sqlScale, SLONG* sqlType) const; #endif // __cpluplus } DSC; Modified: firebird/trunk/src/dsql/dsql.cpp =================================================================== --- firebird/trunk/src/dsql/dsql.cpp 2011-05-31 16:19:47 UTC (rev 53067) +++ firebird/trunk/src/dsql/dsql.cpp 2011-06-01 01:44:54 UTC (rev 53068) @@ -2621,95 +2621,21 @@ if (param->par_index >= first_index) { - SLONG sql_len = param->par_desc.dsc_length; - SLONG sql_sub_type = 0; - SLONG sql_scale = 0; - SLONG sql_type = 0; + SLONG sql_len, sql_sub_type, sql_scale, sql_type; + param->par_desc.getSqlInfo(&sql_len, &sql_sub_type, &sql_scale, &sql_type); - switch (param->par_desc.dsc_dtype) + if (input_message && param->par_desc.dsc_dtype == dtype_text && + (param->par_desc.dsc_flags & DSC_null)) { - case dtype_real: - sql_type = SQL_FLOAT; - break; - case dtype_array: - sql_type = SQL_ARRAY; - break; - - case dtype_timestamp: - sql_type = SQL_TIMESTAMP; - break; - case dtype_sql_date: - sql_type = SQL_TYPE_DATE; - break; - case dtype_sql_time: - sql_type = SQL_TYPE_TIME; - break; - - case dtype_double: - sql_type = SQL_DOUBLE; - sql_scale = param->par_desc.dsc_scale; - break; - - case dtype_text: - if (input_message && (param->par_desc.dsc_flags & DSC_null)) - { - sql_type = SQL_NULL; - sql_len = 0; - } - else - { - sql_type = SQL_TEXT; - sql_sub_type = param->par_desc.dsc_sub_type; - } - break; - - case dtype_blob: - sql_type = SQL_BLOB; - sql_sub_type = param->par_desc.dsc_sub_type; - sql_scale = param->par_desc.dsc_scale; - break; - - case dtype_varying: - sql_type = param->par_is_text ? SQL_TEXT : SQL_VARYING; - sql_len -= sizeof(USHORT); - sql_sub_type = param->par_desc.dsc_sub_type; - break; - - case dtype_short: - case dtype_long: - case dtype_int64: - switch (param->par_desc.dsc_dtype) - { - case dtype_short: - sql_type = SQL_SHORT; - break; - case dtype_long: - sql_type = SQL_LONG; - break; - default: - sql_type = SQL_INT64; - } - sql_scale = param->par_desc.dsc_scale; - if (param->par_desc.dsc_sub_type) - sql_sub_type = param->par_desc.dsc_sub_type; - break; - - case dtype_quad: - sql_type = SQL_QUAD; - sql_scale = param->par_desc.dsc_scale; - break; - - case dtype_boolean: - sql_type = SQL_BOOLEAN; - break; - - default: - ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-804) << - Arg::Gds(isc_dsql_datatype_err)); + sql_type = SQL_NULL; + sql_len = 0; + sql_sub_type = 0; } + else if (param->par_desc.dsc_dtype == dtype_varying && param->par_is_text) + sql_type = SQL_TEXT; if (sql_type && (param->par_desc.dsc_flags & DSC_nullable)) - sql_type++; + sql_type |= 0x1; for (const UCHAR* describe = items; describe < end_describe;) { Modified: firebird/trunk/src/include/FirebirdApi.h =================================================================== --- firebird/trunk/src/include/FirebirdApi.h 2011-05-31 16:19:47 UTC (rev 53067) +++ firebird/trunk/src/include/FirebirdApi.h 2011-06-01 01:44:54 UTC (rev 53068) @@ -61,30 +61,6 @@ #endif -struct Date -{ - int year; - int month; - int day; -}; - - -struct Time -{ - int hours; - int minutes; - int seconds; - int fractions; -}; - - -struct DateTime //// FIXME: rename to TimeStamp -{ - Date date; - Time time; -}; - - class Error { public: @@ -102,102 +78,6 @@ }; -// Represents a parameter or column. -class Value -{ -public: - // data types - enum Type - { - TYPE_SMALLINT = 1, - TYPE_INTEGER, - TYPE_BIGINT, - TYPE_DOUBLE, - TYPE_CHAR, - TYPE_VARCHAR, - TYPE_BLOB, - TYPE_DATE, - TYPE_TIME, - TYPE_TIMESTAMP - }; - -public: - // Get parameter or column name. - virtual const char* FB_CALL getName(Error* error) const = 0; - - virtual Type FB_CALL getType(Error* error) const = 0; - virtual const char* FB_CALL getCharSet(Error* error) const = 0; - - // Get BLOB sub-type. - virtual int FB_CALL getSubType(Error* error) const = 0; - - // Get numeric precision or maximum string length. - virtual int FB_CALL getPrecision(Error* error) const = 0; - - virtual int FB_CALL getScale(Error* error) const = 0; - virtual bool FB_CALL isNullable(Error* error) const = 0; - - virtual bool FB_CALL isNull() const = 0; - virtual void FB_CALL setNull(Error* error) = 0; - - virtual void FB_CALL copyFrom(Error* error, const Value* from) = 0; - - virtual int16 FB_CALL getSmallInt(Error* error, int scale = 0, bool* isNull = FB_NULL) const = 0; - virtual void FB_CALL setSmallInt(Error* error, int16 value, int scale = 0) = 0; - - virtual int32 FB_CALL getInt(Error* error, int scale = 0, bool* isNull = FB_NULL) const = 0; - virtual void FB_CALL setInt(Error* error, int32 value, int scale = 0) = 0; - - virtual int64 FB_CALL getBigInt(Error* error, int scale = 0, bool* isNull = FB_NULL) const = 0; - virtual void FB_CALL setBigInt(Error* error, int64 value, int scale = 0) = 0; - - virtual double FB_CALL getDouble(Error* error, bool* isNull = FB_NULL) const = 0; - virtual void FB_CALL setDouble(Error* error, double value) = 0; - - virtual const char* FB_CALL getString(Error* error, uint* strLength = FB_NULL, - bool* isNull = FB_NULL) const = 0; - virtual void FB_CALL setString(Error* error, const char* str, uint strLength) = 0; - - virtual int64 FB_CALL getBlobId(Error* error, bool* isNull = FB_NULL) const = 0; - virtual void FB_CALL setBlobId(Error* error, int64 value) = 0; - - virtual void FB_CALL getDate(Error* error, Date* value, bool* isNull = FB_NULL) const = 0; - virtual void FB_CALL setDate(Error* error, const Date* value) = 0; - - virtual void FB_CALL getTime(Error* error, Time* value, bool* isNull = FB_NULL) const = 0; - virtual void FB_CALL setTime(Error* error, const Time* value) = 0; - - virtual void FB_CALL getTimeStamp(Error* error, DateTime* value, bool* isNull = FB_NULL) const = 0; - virtual void FB_CALL setTimeStamp(Error* error, const DateTime* value) = 0; -}; - - -// A queue associated with a Values. Could be used for batching processing. -class ValuesQueue : public Disposable -{ -public: - virtual void FB_CALL enqueue(Error* error) = 0; // Enqueue the current Values. - virtual bool FB_CALL dequeue(Error* error) = 0; // Dequeue in Values. -}; - - -// Represents a group of parameters or columns. -class Values -{ -public: - virtual uint FB_CALL getCount() const = 0; - virtual uint FB_CALL getIndexByName(Error* error, const char* name) const = 0; - - // Get a given value. The first value is at index 1. - virtual Value* FB_CALL getValue(Error* error, uint index) const = 0; - - virtual Value* FB_CALL getValueByName(Error* error, const char* name) const = 0; - - // Creates a queue associated with this Values. - virtual ValuesQueue* FB_CALL createQueue(Error* error) = 0; -}; - - } // namespace Firebird Modified: firebird/trunk/src/include/FirebirdExternalApi.h =================================================================== --- firebird/trunk/src/include/FirebirdExternalApi.h 2011-05-31 16:19:47 UTC (rev 53067) +++ firebird/trunk/src/include/FirebirdExternalApi.h 2011-06-01 01:44:54 UTC (rev 53068) @@ -95,8 +95,8 @@ virtual void FB_CALL getCharSet(Error* error, ExternalContext* context, Utf8* name, uint nameSize) = 0; - virtual void FB_CALL execute(Error* error, ExternalContext* context, Values* params, - Value* result) = 0; + virtual void FB_CALL execute(Error* error, ExternalContext* context, + UCHAR* inMsg, UCHAR* outMsg) = 0; }; @@ -113,7 +113,7 @@ // Returning NULL results in a result set of one record. // Procedures without output parameters should return NULL. virtual ExternalResultSet* FB_CALL open(Error* error, ExternalContext* context, - Values* params, Values* results) = 0; + UCHAR* inMsg, UCHAR* outMsg) = 0; }; @@ -148,7 +148,7 @@ Utf8* name, uint nameSize) = 0; virtual void FB_CALL execute(Error* error, ExternalContext* context, - Action action, const Values* oldValues, Values* newValues) = 0; + Action action, UCHAR* oldMsg, UCHAR* newMsg) = 0; }; @@ -159,10 +159,13 @@ virtual const char* FB_CARG getName(IStatus* status) const = 0; virtual const char* FB_CARG getEntryPoint(IStatus* status) const = 0; virtual const char* FB_CARG getBody(IStatus* status) const = 0; + virtual const IParametersMetadata* FB_CARG getInputParameters(IStatus* status) const = 0; + virtual const IParametersMetadata* FB_CARG getOutputParameters(IStatus* status) const = 0; + virtual const IParametersMetadata* FB_CARG getTriggerFields(IStatus* status) const = 0; virtual const char* FB_CARG getTriggerTable(IStatus* status) const = 0; virtual ExternalTrigger::Type FB_CARG getTriggerType(IStatus* status) const = 0; }; -#define FB_ROUTINE_METADATA_VERSION (FB_VERSIONED_VERSION + 6) +#define FB_ROUTINE_METADATA_VERSION (FB_VERSIONED_VERSION + 9) // In SuperServer, shared by all attachments to one database and disposed when last (non-external) Modified: firebird/trunk/src/include/FirebirdUdrCpp.h =================================================================== --- firebird/trunk/src/include/FirebirdUdrCpp.h 2011-05-31 16:19:47 UTC (rev 53067) +++ firebird/trunk/src/include/FirebirdUdrCpp.h 2011-06-01 01:44:54 UTC (rev 53068) @@ -50,7 +50,7 @@ { \ public: \ virtual void FB_CALL execute(::Firebird::Error* error, ::Firebird::ExternalContext* context, \ - ::Firebird::Values* params, ::Firebird::Value* result); \ + UCHAR* inMsg, UCHAR* outMsg); \ private: #define FB_UDR_END_DECLARE_FUNCTION(name) \ @@ -62,7 +62,7 @@ #define FB_UDR_BEGIN_FUNCTION(name) \ void FB_CALL FB_UDR_FUNCTION(name)::execute(::Firebird::Error* error, \ - ::Firebird::ExternalContext* context, ::Firebird::Values* params, ::Firebird::Value* result) \ + ::Firebird::ExternalContext* context, UCHAR* inMsg, UCHAR* outMsg) \ { \ try \ { @@ -90,8 +90,7 @@ { \ public: \ virtual ::Firebird::ExternalResultSet* FB_CALL open(::Firebird::Error* error, \ - ::Firebird::ExternalContext* context, ::Firebird::Values* params, \ - ::Firebird::Values* results); \ + ::Firebird::ExternalContext* context, UCHAR* inMsg, UCHAR* outMsg); \ #define FB_UDR_END_DECLARE_PROCEDURE(name) \ }; @@ -104,8 +103,8 @@ class ResultSet##name : public ::Firebird::Udr::ResultSet \ { \ public: \ - ResultSet##name(::Firebird::Error* error, ::Firebird::ExternalContext* context, \ - ::Firebird::Values* params, ::Firebird::Values* results); \ + ResultSet##name(::Firebird::Error* error, ::Firebird::ExternalContext* context, \ + ::Firebird::Udr::Procedure* procedure, UCHAR* inMsg, UCHAR* outMsg); \ \ public: \ virtual bool FB_CALL fetch(::Firebird::Error* error); \ @@ -125,15 +124,14 @@ #define FB_UDR_BEGIN_PROCEDURE(name) \ ::Firebird::ExternalResultSet* FB_CALL Proc##name::open(::Firebird::Error* error, \ - ::Firebird::ExternalContext* context, ::Firebird::Values* params, \ - ::Firebird::Values* results) \ + ::Firebird::ExternalContext* context, UCHAR* inMsg, UCHAR* outMsg) \ { \ - return new ResultSet##name(error, context, params, results); \ + return new ResultSet##name(error, context, this, inMsg, outMsg); \ } \ \ ResultSet##name::ResultSet##name(::Firebird::Error* error, ::Firebird::ExternalContext* context, \ - ::Firebird::Values* params, ::Firebird::Values* results) \ - : ResultSet(context, params, results) \ + ::Firebird::Udr::Procedure* procedure, UCHAR* inMsg, UCHAR* outMsg) \ + : ResultSet(context, procedure, inMsg, outMsg) \ { \ try \ { @@ -183,8 +181,7 @@ { \ public: \ virtual void FB_CALL execute(::Firebird::Error* error, ::Firebird::ExternalContext* context, \ - ::Firebird::ExternalTrigger::Action action, const ::Firebird::Values* oldValues, \ - ::Firebird::Values* newValues); \ + ::Firebird::ExternalTrigger::Action action, UCHAR* oldMsg, UCHAR* newMsg); \ private: #define FB_UDR_END_DECLARE_TRIGGER(name) \ @@ -197,7 +194,7 @@ #define FB_UDR_BEGIN_TRIGGER(name) \ void FB_CALL FB_UDR_TRIGGER(name)::execute(::Firebird::Error* error, \ ::Firebird::ExternalContext* context, ::Firebird::ExternalTrigger::Action action, \ - const ::Firebird::Values* oldValues, ::Firebird::Values* newValues) \ + UCHAR* oldMsg, UCHAR* newMsg) \ { \ try \ { @@ -429,6 +426,9 @@ }; +class Procedure; + + class Helper { public: @@ -460,11 +460,12 @@ class ResultSet : public ExternalResultSet, public Helper { public: - ResultSet(Firebird::ExternalContext* aContext, Firebird::Values* aParams, - Firebird::Values* aResults) + ResultSet(Firebird::ExternalContext* aContext, Firebird::Udr::Procedure* aProcedure, + UCHAR* aInMsg, UCHAR* aOutMsg) : context(aContext), - params(aParams), - results(aResults) + procedure(aProcedure), + inMsg(aInMsg), + outMsg(aOutMsg) { } @@ -480,8 +481,9 @@ protected: Firebird::ExternalContext* context; - Firebird::Values* params; - Firebird::Values* results; + Firebird::Udr::Procedure* procedure; + UCHAR* inMsg; + UCHAR* outMsg; }; Modified: firebird/trunk/src/jrd/ExtEngineManager.cpp =================================================================== --- firebird/trunk/src/jrd/ExtEngineManager.cpp 2011-05-31 16:19:47 UTC (rev 53067) +++ firebird/trunk/src/jrd/ExtEngineManager.cpp 2011-06-01 01:44:54 UTC (rev 53068) @@ -26,10 +26,9 @@ #include "inf_pub.h" #include "../jrd/ExtEngineManager.h" #include "../jrd/ErrorImpl.h" -#include "../jrd/ValueImpl.h" -#include "../jrd/ValuesImpl.h" #include "../dsql/sqlda_pub.h" #include "../common/dsc.h" +#include "../jrd/align.h" #include "../jrd/jrd.h" #include "../jrd/exe.h" #include "../jrd/req.h" @@ -305,8 +304,7 @@ } -void ExtEngineManager::Function::execute(thread_db* tdbb, const NestValueArray& args, - impure_value* impure) const +void ExtEngineManager::Function::execute(thread_db* tdbb, UCHAR* inMsg, UCHAR* outMsg) const { EngineAttachmentInfo* attInfo = extManager->getEngineAttachment(tdbb, engine); ContextManager<ExternalFunction> ctxManager(tdbb, attInfo, function, @@ -314,70 +312,9 @@ CallerName(obj_udf, udf->getName().identifier) : CallerName(obj_package_header, udf->getName().package))); - impure->vlu_desc.dsc_flags = DSC_null; - MemoryPool& pool = *tdbb->getDefaultPool(); - ValueImpl result(pool, &impure->vlu_desc, "", true); + Attachment::Checkout attCout(tdbb->getAttachment()); - HalfStaticArray<impure_value, 32> impureArgs; - - jrd_req* request = tdbb->getRequest(); - impure_value* impureArgsPtr = impureArgs.getBuffer(args.getCount()); - - try - { - ValuesImpl params(pool, args.getCount()); - - for (size_t i = 0; i < args.getCount(); ++i) - { - impureArgsPtr->vlu_desc = udf->fun_args[i + 1].fun_parameter->prm_desc; - - if (impureArgsPtr->vlu_desc.isText()) - { - impureArgsPtr->vlu_string = - FB_NEW_RPT(pool, impureArgsPtr->vlu_desc.getStringLength()) VaryingString(); - impureArgsPtr->vlu_desc.dsc_address = (UCHAR*) impureArgsPtr->vlu_string; - } - else - { - impureArgsPtr->vlu_string = NULL; - impureArgsPtr->vlu_desc.dsc_address = (UCHAR*) &impureArgsPtr->vlu_misc; - } - - dsc* arg = EVL_expr(tdbb, request, args[i]); - - if (request->req_flags & req_null) - impureArgsPtr->vlu_desc.dsc_flags = DSC_null; - else - { - MOV_move(tdbb, arg, &impureArgsPtr->vlu_desc); - INTL_adjust_text_descriptor(tdbb, &impureArgsPtr->vlu_desc); - } - - params.getValue(i + 1)->make(&impureArgsPtr->vlu_desc, "", true); - - ++impureArgsPtr; - } - - { // scope - Attachment::Checkout attCout(tdbb->getAttachment()); - function->execute(RaiseError(), attInfo->context, ¶ms, &result); - } - } - catch (...) - { - for (size_t i = 0; i < args.getCount(); ++i) - delete impureArgs[i].vlu_string; - - throw; - } - - for (size_t i = 0; i < args.getCount(); ++i) - delete impureArgs[i].vlu_string; - - if (result.isNull()) - request->req_flags |= req_null; - else - request->req_flags &= ~req_null; + function->execute(RaiseError(), attInfo->context, inMsg, outMsg); } @@ -405,17 +342,17 @@ ExtEngineManager::ResultSet* ExtEngineManager::Procedure::open(thread_db* tdbb, - ValuesImpl* inputParams, ValuesImpl* outputParams) const + UCHAR* inMsg, UCHAR* outMsg) const { - return FB_NEW(*tdbb->getDefaultPool()) ResultSet(tdbb, inputParams, outputParams, this); + return FB_NEW(*tdbb->getDefaultPool()) ResultSet(tdbb, inMsg, outMsg, this); } //--------------------- -ExtEngineManager::ResultSet::ResultSet(thread_db* tdbb, ValuesImpl* inputParams, - ValuesImpl* outputParams, const ExtEngineManager::Procedure* aProcedure) +ExtEngineManager::ResultSet::ResultSet(thread_db* tdbb, UCHAR* inMsg, UCHAR* outMsg, + const ExtEngineManager::Procedure* aProcedure) : procedure(aProcedure), attachment(tdbb->getAttachment()), firstFetch(true) @@ -430,8 +367,7 @@ Attachment::Checkout attCout(attachment); - resultSet = procedure->procedure->open(RaiseError(), attInfo->context, inputParams, - outputParams); + resultSet = procedure->procedure->open(RaiseError(), attInfo->context, inMsg, outMsg); } @@ -494,82 +430,95 @@ ContextManager<ExternalTrigger> ctxManager(tdbb, attInfo, trigger, CallerName(obj_trigger, trg->name)); - Array<dsc*> descs; - try + // ASF: Using Array instead of HalfStaticArray to not need to do alignment hacks here. + Array<UCHAR> oldMsg; + Array<UCHAR> newMsg; + + if (oldRpb) + setValues(tdbb, oldMsg, oldRpb); + + if (newRpb) + setValues(tdbb, newMsg, newRpb); + + Attachment::Checkout attCout(tdbb->getAttachment()); + + trigger->execute(RaiseError(), attInfo->context, action, + (oldRpb ? oldMsg.begin() : NULL), (newRpb ? newMsg.begin() : NULL)); + + if (newRpb) { - MemoryPool& pool = *tdbb->getDefaultPool(); - AutoPtr<ValuesImpl> oldValues, newValues; - int valueOldCount = 0; - int valueNewCount = 0; + Record* record = newRpb->rpb_record; + const Format* format = record->rec_format; + const UCHAR* msg = newMsg.begin(); + unsigned pos = 0; - if (oldRpb) - valueOldCount = setValues(tdbb, pool, oldValues, descs, oldRpb); + for (unsigned i = 0; i < format->fmt_count; ++i) + { + if (format->fmt_desc[i].dsc_dtype == dtype_unknown) + continue; - if (newRpb) - valueNewCount = setValues(tdbb, pool, newValues, descs, newRpb); + dsc desc; + bool readonly = !EVL_field(newRpb->rpb_relation, record, i, &desc) && + desc.dsc_address && !(desc.dsc_flags & DSC_null); - { // scope - Attachment::Checkout attCout(tdbb->getAttachment()); + unsigned align = type_alignments[desc.dsc_dtype]; + if (align) + pos = FB_ALIGN(pos, align); - trigger->execute(RaiseError(), attInfo->context, action, oldValues, newValues); + unsigned dataPos = pos; + pos += desc.dsc_length; - for (int i = 1; i <= valueNewCount; ++i) + align = type_alignments[dtype_short]; + if (align) + pos = FB_ALIGN(pos, align); + + if (!readonly) { - ValueImpl* val = newValues->getValue(i); - - if (val->isNull()) - SET_NULL(newRpb->rpb_record, val->getFieldNumber()); + if (*(USHORT*) &msg[pos]) + SET_NULL(record, i); else - CLEAR_NULL(newRpb->rpb_record, val->getFieldNumber()); + { + memcpy(desc.dsc_address, msg + dataPos, desc.dsc_length); + CLEAR_NULL(record, i); + } } + + pos += sizeof(USHORT); } } - catch (...) - { - for (size_t i = 0; i < descs.getCount(); ++i) - delete descs[i]; - throw; - } - - for (size_t i = 0; i < descs.getCount(); ++i) - delete descs[i]; } -int ExtEngineManager::Trigger::setValues(thread_db* /*tdbb*/, MemoryPool& pool, - AutoPtr<ValuesImpl>& values, Array<dsc*>& descs, +void ExtEngineManager::Trigger::setValues(thread_db* /*tdbb*/, Array<UCHAR>& msgBuffer, record_param* rpb) const { if (!rpb || !rpb->rpb_record) - return 0; + return; Record* record = rpb->rpb_record; const Format* format = record->rec_format; - values = FB_NEW(pool) ValuesImpl(pool, format->fmt_count); + for (unsigned i = 0; i < format->fmt_count; ++i) + { + if (format->fmt_desc[i].dsc_dtype == dtype_unknown) + continue; - int start = descs.getCount(); - descs.resize(start + format->fmt_count); + dsc desc; + EVL_field(rpb->rpb_relation, record, i, &desc); - int j = 0; + unsigned align = type_alignments[desc.dsc_dtype]; + if (align) + msgBuffer.resize(FB_ALIGN(msgBuffer.getCount(), align)); - for (int i = 0; i < format->fmt_count; ++i) - { - descs[start + i] = FB_NEW(pool) dsc; + msgBuffer.add(desc.dsc_address, desc.dsc_length); - if (format->fmt_desc[i].dsc_dtype != dtype_unknown) - { - EVL_field(rpb->rpb_relation, record, i, descs[start + i]); + align = type_alignments[dtype_short]; + if (align) + msgBuffer.resize(FB_ALIGN(msgBuffer.getCount(), align)); - jrd_fld* field = (*rpb->rpb_relation->rel_fields)[i]; - fb_assert(field); - - values->getValue(j + 1)->make(descs[start + i], field->fld_name, true, i); - ++j; - } + USHORT nullFlag = (desc.dsc_flags & DSC_null) != 0; + msgBuffer.add((UCHAR*) &nullFlag, sizeof(nullFlag)); } - - return j; } @@ -654,13 +603,36 @@ CallerName(obj_udf, udf->getName().identifier) : CallerName(obj_package_header, udf->getName().package))); - MemoryPool& pool = *tdbb->getDefaultPool(); + ///MemoryPool& pool = *tdbb->getDefaultPool(); + MemoryPool& pool = *getDefaultMemoryPool(); + AutoPtr<RoutineMetadata> metadata(FB_NEW(pool) RoutineMetadata(pool)); metadata->package = udf->getName().package; metadata->name = udf->getName().identifier; metadata->entryPoint = entryPointTrimmed; metadata->body = body; + metadata->inputParameters = FB_NEW(pool) StatementMetadata::Parameters(pool); + metadata->outputParameters = FB_NEW(pool) StatementMetadata::Parameters(pool); + for (Array<Jrd::Function::Argument>::const_iterator i = udf->fun_args.begin(); + i != udf->fun_args.end(); + ++i) + { + SLONG sqlLen, sqlSubType, sqlScale, sqlType; + i->fun_parameter->prm_desc.getSqlInfo(&sqlLen, &sqlSubType, &sqlScale, &sqlType); + + StatementMetadata::Parameters::Item& item = i == udf->fun_args.begin() ? + metadata->outputParameters->items.add() : + metadata->inputParameters->items.add(); + + item.field = i->fun_parameter->prm_name.c_str(); + item.type = sqlType; + item.subType = sqlSubType; + item.length = sqlLen; + item.scale = sqlScale; + item.nullable = i->fun_parameter->prm_nullable; + } + ExternalFunction* externalFunction; { // scope @@ -702,13 +674,41 @@ CallerName(obj_procedure, prc->getName().identifier) : CallerName(obj_package_header, prc->getName().package))); - MemoryPool& pool = *tdbb->getDefaultPool(); + ///MemoryPool& pool = *tdbb->getDefaultPool(); + MemoryPool& pool = *getDefaultMemoryPool(); + AutoPtr<RoutineMetadata> metadata(FB_NEW(pool) RoutineMetadata(pool)); metadata->package = prc->getName().package; metadata->name = prc->getName().identifier; metadata->entryPoint = entryPointTrimmed; metadata->body = body; + metadata->inputParameters = FB_NEW(pool) StatementMetadata::Parameters(pool); + metadata->outputParameters = FB_NEW(pool) StatementMetadata::Parameters(pool); + const Array<NestConst<Parameter> >* parameters[] = {&prc->prc_input_fields, &prc->prc_output_fields}; + + for (unsigned i = 0; i < 2; ++i) + { + for (Array<NestConst<Parameter> >::const_iterator j = parameters[i]->begin(); + j != parameters[i]->end(); + ++j) + { + SLONG sqlLen, sqlSubType, sqlScale, sqlType; + (*j)->prm_desc.getSqlInfo(&sqlLen, &sqlSubType, &sqlScale, &sqlType); + + StatementMetadata::Parameters::Item& item = i == 1 ? + metadata->outputParameters->items.add() : + metadata->inputParameters->items.add(); + + item.field = (*j)->prm_name.c_str(); + item.type = sqlType; + item.subType = sqlSubType; + item.length = sqlLen; + item.scale = sqlScale; + item.nullable = (*j)->prm_nullable; + } + } + ExternalProcedure* externalProcedure; { // scope @@ -748,7 +748,9 @@ ContextManager<ExternalTrigger> ctxManager(tdbb, attInfo, attInfo->adminCharSet, CallerName(obj_trigger, trg->name)); - MemoryPool& pool = *tdbb->getDefaultPool(); + ///MemoryPool& pool = *tdbb->getDefaultPool(); + MemoryPool& pool = *getDefaultMemoryPool(); + AutoPtr<RoutineMetadata> metadata(FB_NEW(pool) RoutineMetadata(pool)); metadata->name = trg->name; metadata->entryPoint = entryPointTrimmed; @@ -756,7 +758,29 @@ metadata->triggerType = type; if (trg->relation) metadata->triggerTable = trg->relation->rel_name; + metadata->triggerFields = FB_NEW(pool) StatementMetadata::Parameters(pool); + jrd_rel* relation = trg->relation; + Format* relFormat = relation->rel_current_format; + + for (size_t i = 0; i < relation->rel_fields->count(); ++i) + { + jrd_fld* field = (*relation->rel_fields)[i]; + if (!field) + continue; + + SLONG sqlLen, sqlSubType, sqlScale, sqlType; + relFormat->fmt_desc[i].getSqlInfo(&sqlLen, &sqlSubType, &sqlScale, &sqlType); + + StatementMetadata::Parameters::Item& item = metadata->triggerFields->items.add(); + item.field = field->fld_name.c_str(); + item.type = sqlType; + item.subType = sqlSubType; + item.length = sqlLen; + item.scale = sqlScale; + item.nullable = !field->fld_not_null; + } + ExternalTrigger* externalTrigger; { // scope Modified: firebird/trunk/src/jrd/ExtEngineManager.h =================================================================== --- firebird/trunk/src/jrd/ExtEngineManager.h 2011-05-31 16:19:47 UTC (rev 53067) +++ firebird/trunk/src/jrd/ExtEngineManager.h 2011-06-01 01:44:54 UTC (rev 53068) @@ -34,7 +34,7 @@ #include "../common/classes/auto.h" #include "../common/classes/rwlock.h" #include "../common/classes/ImplementHelper.h" -///#include "../dsql/Nodes.h" +#include "../common/StatementMetadata.h" struct dsc; @@ -49,8 +49,6 @@ class Trigger; class Function; class ValueExprNode; -class ValueImpl; -class ValuesImpl; struct impure_value; struct record_param; @@ -97,6 +95,24 @@ return body.c_str(); } + virtual const Firebird::IParametersMetadata* FB_CARG getInputParameters( + Firebird::IStatus* /*status*/) const + { + return inputParameters; + } + + virtual const Firebird::IParametersMetadata* FB_CARG getOutputParameters( + Firebird::IStatus* /*status*/) const + { + return outputParameters; + } + + virtual const Firebird::IParametersMetadata* FB_CARG getTriggerFields( + Firebird::IStatus* /*status*/) const + { + return triggerFields; + } + virtual const char* FB_CARG getTriggerTable(Firebird::IStatus* /*status*/) const { return triggerTable.c_str(); @@ -112,6 +128,9 @@ Firebird::MetaName name; Firebird::string entryPoint; Firebird::string body; + Firebird::AutoPtr<Firebird::StatementMetadata::Parameters> inputParameters; + Firebird::AutoPtr<Firebird::StatementMetadata::Parameters> outputParameters; + Firebird::AutoPtr<Firebird::StatementMetadata::Parameters> triggerFields; Firebird::MetaName triggerTable; Firebird::ExternalTrigger::Type triggerType; }; @@ -190,8 +209,7 @@ const Jrd::Function* aUdf); ~Function(); - void execute(thread_db* tdbb, const Firebird::Array<NestConst<ValueExprNode> >& args, - impure_value* impure) const; + void execute(thread_db* tdbb, UCHAR* inMsg, UCHAR* outMsg) const; private: ExtEngineManager* extManager; @@ -214,7 +232,7 @@ const jrd_prc* aPrc); ~Procedure(); - ResultSet* open(thread_db* tdbb, ValuesImpl* inputParams, ValuesImpl* outputParams) const; + ResultSet* open(thread_db* tdbb, UCHAR* inMsg, UCHAR* outMsg) const; private: ExtEngineManager* extManager; @@ -230,8 +248,7 @@ class ResultSet { public: - Re... [truncated message content] |
From: <fir...@us...> - 2011-06-01 03:18:15
|
Revision: 53069 http://firebird.svn.sourceforge.net/firebird/?rev=53069&view=rev Author: firebirds Date: 2011-06-01 03:18:08 +0000 (Wed, 01 Jun 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-06-01 01:44:54 UTC (rev 53068) +++ firebird/trunk/ChangeLog 2011-06-01 03:18:08 UTC (rev 53069) @@ -1,3 +1,36 @@ + 2011-06-01 01:44 asfernandes + M builds/posix/Makefile.in.plugins_examples + M builds/win32/msvc10/engine.vcxproj + M builds/win32/msvc10/engine.vcxproj.filters + M builds/win32/msvc8/engine.vcproj + M builds/win32/msvc9/engine.vcproj + M examples/udr/UdrCppExample.cpp + M src/common/dsc.cpp + M src/common/dsc.h + M src/dsql/dsql.cpp + M src/include/FirebirdApi.h + M src/include/FirebirdExternalApi.h + M src/include/FirebirdUdrCpp.h + M src/jrd/ExtEngineManager.cpp + M src/jrd/ExtEngineManager.h + M src/jrd/Function.epp + D src/jrd/ValueImpl.cpp + D src/jrd/ValueImpl.h + D src/jrd/ValuesImpl.cpp + D src/jrd/ValuesImpl.h + M src/jrd/cmp.cpp + M src/jrd/exe.cpp + M src/jrd/req.h + M src/plugins/udr_engine/UdrEngine.cpp + M src/yvalve/YObjects.h +Work in progress on the external engines API changes. + + 2011-05-31 14:18 hvlad + M src/jrd/ini.epp + M src/jrd/met.epp + M src/jrd/met_proto.h +Additional fix for CORE-3502 and CORE-3503 + 2011-05-31 01:00 asfernandes M src/jrd/RecordSourceNodes.cpp Frontport fix for CORE-3489 - Blob transliteration may not happen inside the union. Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-06-01 01:44:54 UTC (rev 53068) +++ firebird/trunk/src/jrd/build_no.h 2011-06-01 03:18:08 UTC (rev 53069) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29407 + FORMAL BUILD NUMBER:29409 */ -#define PRODUCT_VER_STRING "3.0.0.29407" -#define FILE_VER_STRING "WI-T3.0.0.29407" -#define LICENSE_VER_STRING "WI-T3.0.0.29407" -#define FILE_VER_NUMBER 3, 0, 0, 29407 +#define PRODUCT_VER_STRING "3.0.0.29409" +#define FILE_VER_STRING "WI-T3.0.0.29409" +#define LICENSE_VER_STRING "WI-T3.0.0.29409" +#define FILE_VER_NUMBER 3, 0, 0, 29409 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29407" +#define FB_BUILD_NO "29409" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-06-01 01:44:54 UTC (rev 53068) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-06-01 03:18:08 UTC (rev 53069) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29407 +BuildNum=29409 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-06-02 03:17:29
|
Revision: 53086 http://firebird.svn.sourceforge.net/firebird/?rev=53086&view=rev Author: firebirds Date: 2011-06-02 03:17:22 +0000 (Thu, 02 Jun 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-06-01 17:29:51 UTC (rev 53085) +++ firebird/trunk/ChangeLog 2011-06-02 03:17:22 UTC (rev 53086) @@ -1,3 +1,59 @@ + 2011-06-01 17:29 dimitr + M src/jrd/dfw.epp +Cleanup. + + 2011-06-01 17:03 dimitr + M src/jrd/dpm.epp +Misc. + + 2011-06-01 16:58 dimitr + M src/jrd/dfw.epp + M src/jrd/dpm.epp + M src/jrd/tra.cpp + M src/jrd/tra.h + M src/jrd/vio.cpp +Better (I hope) solution for CORE-3058: New generators are created with wrong value when more than 32K generators was previously created. It also resolves the [temporary] inability to restore generator values. + + 2011-06-01 16:44 dimitr + M src/dsql/DdlNodes.epp +Fixed the error handling broken after introducing system constraints. + + 2011-06-01 14:09 hvlad + M src/yvalve/why.cpp +Fixed AV when transaction start failed + + 2011-06-01 12:16 alexpeshkoff + M src/utilities/nbackup/nbackup.cpp +Fixed CORE-3199: nackup fails due to O_NOATIME flag in database open + + 2011-06-01 10:52 alexpeshkoff + M src/remote/server/os/posix/inet_server.cpp + M src/utilities/guard/guard.cpp +Fixed CORE-3250: Cannot start firebird server under any username other than "root", "firebird" , "interbas"or "interbase" + + 2011-06-01 10:38 alexpeshkoff + M src/include/consts_pub.h + M src/utilities/fbsvcmgr/fbsvcmgr.cpp +Fixed CORE-3462: Add metadata only restore to Services API + + 2011-06-01 09:36 alexpeshkoff + M src/burp/restore.epp + M src/msgs/facilities2.sql + M src/msgs/messages2.sql +Add verbose message for CORE-3461 + + 2011-06-01 08:04 alexpeshkoff + M src/burp/restore.epp +Simplification - thanks to Vlad + + 2011-06-01 07:47 alexpeshkoff + M src/burp/restore.epp +Fixed CORE-3461: DDL operations fail after backup/restore + + 2011-06-01 06:57 alexpeshkoff + M src/jrd/met.epp +Misc + 2011-06-01 01:44 asfernandes M builds/posix/Makefile.in.plugins_examples M builds/win32/msvc10/engine.vcxproj Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-06-01 17:29:51 UTC (rev 53085) +++ firebird/trunk/src/jrd/build_no.h 2011-06-02 03:17:22 UTC (rev 53086) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29409 + FORMAL BUILD NUMBER:29421 */ -#define PRODUCT_VER_STRING "3.0.0.29409" -#define FILE_VER_STRING "WI-T3.0.0.29409" -#define LICENSE_VER_STRING "WI-T3.0.0.29409" -#define FILE_VER_NUMBER 3, 0, 0, 29409 +#define PRODUCT_VER_STRING "3.0.0.29421" +#define FILE_VER_STRING "WI-T3.0.0.29421" +#define LICENSE_VER_STRING "WI-T3.0.0.29421" +#define FILE_VER_NUMBER 3, 0, 0, 29421 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29409" +#define FB_BUILD_NO "29421" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-06-01 17:29:51 UTC (rev 53085) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-06-02 03:17:22 UTC (rev 53086) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29409 +BuildNum=29421 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <asf...@us...> - 2011-06-02 17:24:04
|
Revision: 53093 http://firebird.svn.sourceforge.net/firebird/?rev=53093&view=rev Author: asfernandes Date: 2011-06-02 15:57:08 +0000 (Thu, 02 Jun 2011) Log Message: ----------- Move v3 public include files to src/include/firebird. Modified Paths: -------------- firebird/trunk/examples/udr/UdrCppExample.cpp firebird/trunk/src/auth/AuthInterface.h firebird/trunk/src/auth/SecurityDatabase/LegacyManagement.epp firebird/trunk/src/auth/SecurityDatabase/LegacyServer.cpp firebird/trunk/src/auth/trusted/AuthSspi.cpp firebird/trunk/src/common/StatementMetadata.h firebird/trunk/src/common/StatusHolder.h firebird/trunk/src/common/classes/ImplementHelper.h firebird/trunk/src/common/config/config.cpp firebird/trunk/src/common/fb_exception.cpp firebird/trunk/src/common/utils_proto.h firebird/trunk/src/gpre/boot/gpre_meta_boot.cpp firebird/trunk/src/jrd/EngineInterface.h firebird/trunk/src/jrd/ErrorImpl.h firebird/trunk/src/jrd/ExtEngineManager.h firebird/trunk/src/jrd/blb.h firebird/trunk/src/jrd/event.h firebird/trunk/src/jrd/jrd.h firebird/trunk/src/jrd/ntrace.h firebird/trunk/src/plugins/udr_engine/UdrEngine.cpp firebird/trunk/src/remote/client/interface.cpp firebird/trunk/src/remote/remote.cpp firebird/trunk/src/remote/server/os/posix/inet_server.cpp firebird/trunk/src/remote/server/os/win32/srvr_w32.cpp firebird/trunk/src/yvalve/MasterImplementation.cpp firebird/trunk/src/yvalve/MasterImplementation.h firebird/trunk/src/yvalve/PluginManager.h firebird/trunk/src/yvalve/YObjects.h firebird/trunk/src/yvalve/gds.cpp firebird/trunk/src/yvalve/why.cpp Added Paths: ----------- firebird/trunk/src/include/firebird/ firebird/trunk/src/include/firebird/ExternalEngine.h firebird/trunk/src/include/firebird/Interface.h firebird/trunk/src/include/firebird/Plugin.h firebird/trunk/src/include/firebird/Provider.h firebird/trunk/src/include/firebird/Timer.h firebird/trunk/src/include/firebird/UdrCppEngine.h firebird/trunk/src/include/firebird/UdrEngine.h Removed Paths: ------------- firebird/trunk/src/include/FirebirdExternalApi.h firebird/trunk/src/include/FirebirdPluginApi.h firebird/trunk/src/include/FirebirdUdr.h firebird/trunk/src/include/FirebirdUdrCpp.h firebird/trunk/src/include/Interface.h firebird/trunk/src/include/ProviderInterface.h firebird/trunk/src/include/Timer.h Modified: firebird/trunk/examples/udr/UdrCppExample.cpp =================================================================== --- firebird/trunk/examples/udr/UdrCppExample.cpp 2011-06-02 14:19:31 UTC (rev 53092) +++ firebird/trunk/examples/udr/UdrCppExample.cpp 2011-06-02 15:57:08 UTC (rev 53093) @@ -21,7 +21,7 @@ */ #include "ibase.h" -#include "FirebirdUdrCpp.h" +#include "firebird/UdrCppEngine.h" #include <assert.h> #include <stdio.h> Modified: firebird/trunk/src/auth/AuthInterface.h =================================================================== --- firebird/trunk/src/auth/AuthInterface.h 2011-06-02 14:19:31 UTC (rev 53092) +++ firebird/trunk/src/auth/AuthInterface.h 2011-06-02 15:57:08 UTC (rev 53093) @@ -29,7 +29,7 @@ #ifndef FB_AUTH_INTERFACE #define FB_AUTH_INTERFACE -#include "FirebirdPluginApi.h" +#include "firebird/Plugin.h" namespace Firebird { class IStatus; Modified: firebird/trunk/src/auth/SecurityDatabase/LegacyManagement.epp =================================================================== --- firebird/trunk/src/auth/SecurityDatabase/LegacyManagement.epp 2011-06-02 14:19:31 UTC (rev 53092) +++ firebird/trunk/src/auth/SecurityDatabase/LegacyManagement.epp 2011-06-02 15:57:08 UTC (rev 53093) @@ -40,7 +40,7 @@ #include "../auth/SecurityDatabase/LegacyManagement.h" #include "../common/classes/ImplementHelper.h" #include "../common/classes/ClumpletWriter.h" -#include "FirebirdPluginApi.h" +#include "firebird/Plugin.h" // Here we use version-independent symbolic link (or copy) of actual database DATABASE database = STATIC FILENAME "security.fdb"; Modified: firebird/trunk/src/auth/SecurityDatabase/LegacyServer.cpp =================================================================== --- firebird/trunk/src/auth/SecurityDatabase/LegacyServer.cpp 2011-06-02 14:19:31 UTC (rev 53092) +++ firebird/trunk/src/auth/SecurityDatabase/LegacyServer.cpp 2011-06-02 15:57:08 UTC (rev 53093) @@ -43,7 +43,7 @@ #include "../common/classes/objects_array.h" #include "../common/classes/init.h" #include "../common/classes/ImplementHelper.h" -#include "Timer.h" +#include "firebird/Timer.h" using namespace Firebird; Modified: firebird/trunk/src/auth/trusted/AuthSspi.cpp =================================================================== --- firebird/trunk/src/auth/trusted/AuthSspi.cpp 2011-06-02 14:19:31 UTC (rev 53092) +++ firebird/trunk/src/auth/trusted/AuthSspi.cpp 2011-06-02 15:57:08 UTC (rev 53093) @@ -30,7 +30,7 @@ #ifdef TRUSTED_AUTH #include "../common/classes/ClumpletReader.h" -#include "Interface.h" +#include "firebird/Interface.h" #include "../common/classes/ImplementHelper.h" using namespace Firebird; Modified: firebird/trunk/src/common/StatementMetadata.h =================================================================== --- firebird/trunk/src/common/StatementMetadata.h 2011-06-02 14:19:31 UTC (rev 53092) +++ firebird/trunk/src/common/StatementMetadata.h 2011-06-02 15:57:08 UTC (rev 53093) @@ -24,7 +24,7 @@ #ifndef COMMON_STATEMENT_METADATA_H #define COMMON_STATEMENT_METADATA_H -#include "ProviderInterface.h" +#include "firebird/Provider.h" #include "iberror.h" #include "../common/classes/Nullable.h" #include "../common/classes/array.h" Modified: firebird/trunk/src/common/StatusHolder.h =================================================================== --- firebird/trunk/src/common/StatusHolder.h 2011-06-02 14:19:31 UTC (rev 53092) +++ firebird/trunk/src/common/StatusHolder.h 2011-06-02 15:57:08 UTC (rev 53093) @@ -29,7 +29,7 @@ #ifndef FB_STATUS_HOLDER #define FB_STATUS_HOLDER -#include "ProviderInterface.h" +#include "firebird/Provider.h" #include "../common/utils_proto.h" #include "../common/classes/ImplementHelper.h" Modified: firebird/trunk/src/common/classes/ImplementHelper.h =================================================================== --- firebird/trunk/src/common/classes/ImplementHelper.h 2011-06-02 14:19:31 UTC (rev 53092) +++ firebird/trunk/src/common/classes/ImplementHelper.h 2011-06-02 15:57:08 UTC (rev 53093) @@ -29,9 +29,9 @@ #ifndef FB_COMMON_CLASSES_IMPLEMENT_HELPER #define FB_COMMON_CLASSES_IMPLEMENT_HELPER -#include "FirebirdPluginApi.h" -#include "Timer.h" -#include "ProviderInterface.h" +#include "firebird/Plugin.h" +#include "firebird/Timer.h" +#include "firebird/Provider.h" #include "../common/classes/alloc.h" #include "gen/iberror.h" #include "../yvalve/gds_proto.h" Modified: firebird/trunk/src/common/config/config.cpp =================================================================== --- firebird/trunk/src/common/config/config.cpp 2011-06-02 14:19:31 UTC (rev 53092) +++ firebird/trunk/src/common/config/config.cpp 2011-06-02 15:57:08 UTC (rev 53093) @@ -28,7 +28,7 @@ #include "../common/classes/init.h" #include "../common/dllinst.h" #include "../common/os/fbsyslog.h" -#include "FirebirdPluginApi.h" +#include "firebird/Plugin.h" #ifdef HAVE_STDLIB_H #include <stdlib.h> Modified: firebird/trunk/src/common/fb_exception.cpp =================================================================== --- firebird/trunk/src/common/fb_exception.cpp 2011-06-02 14:19:31 UTC (rev 53092) +++ firebird/trunk/src/common/fb_exception.cpp 2011-06-02 15:57:08 UTC (rev 53093) @@ -1,6 +1,6 @@ #include "firebird.h" -#include "ProviderInterface.h" +#include "firebird/Provider.h" #include <string.h> #include <errno.h> Modified: firebird/trunk/src/common/utils_proto.h =================================================================== --- firebird/trunk/src/common/utils_proto.h 2011-06-02 14:19:31 UTC (rev 53092) +++ firebird/trunk/src/common/utils_proto.h 2011-06-02 15:57:08 UTC (rev 53093) @@ -33,7 +33,7 @@ #include "../common/classes/fb_string.h" #include "../common/classes/array.h" #include "gen/iberror.h" -#include "ProviderInterface.h" +#include "firebird/Provider.h" #ifdef SFIO #include <stdio.h> Modified: firebird/trunk/src/gpre/boot/gpre_meta_boot.cpp =================================================================== --- firebird/trunk/src/gpre/boot/gpre_meta_boot.cpp 2011-06-02 14:19:31 UTC (rev 53092) +++ firebird/trunk/src/gpre/boot/gpre_meta_boot.cpp 2011-06-02 15:57:08 UTC (rev 53093) @@ -670,7 +670,7 @@ return false; } -#include "Interface.h" +#include "firebird/Interface.h" using namespace Firebird; Deleted: firebird/trunk/src/include/FirebirdExternalApi.h =================================================================== --- firebird/trunk/src/include/FirebirdExternalApi.h 2011-06-02 14:19:31 UTC (rev 53092) +++ firebird/trunk/src/include/FirebirdExternalApi.h 2011-06-02 15:57:08 UTC (rev 53093) @@ -1,205 +0,0 @@ -/* - * The contents of this file are subject to the Initial - * Developer's Public License Version 1.0 (the "License"); - * you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl. - * - * Software distributed under the License is distributed AS IS, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. - * See the License for the specific language governing rights - * and limitations under the License. - * - * The Original Code was created by Adriano dos Santos Fernandes - * for the Firebird Open Source RDBMS project, based on previous work done - * by Eugeney Putilin <evgeneyputilin at mail.ru>, - * Vlad Khorsun <hvlad at users.sourceforge.net> and - * Roman Rokytskyy <roman at rokytskyy.de>. - * - * Copyright (c) 2008 Adriano dos Santos Fernandes <adr...@uo...> - * and all contributors signed below. - * - * All Rights Reserved. - * Contributor(s): ______________________________________. - * Eugeney Putilin <evgeneyputilin at mail.ru> - * Vlad Khorsun <hvlad at users.sourceforge.net> - * Roman Rokytskyy <roman at rokytskyy.de> - */ - -#ifndef FIREBIRD_EXTERNAL_API_H -#define FIREBIRD_EXTERNAL_API_H - -#include "FirebirdApi.h" -#include "FirebirdPluginApi.h" -#include "ProviderInterface.h" - - -namespace Firebird { - -class ExternalEngine; - - -const int EXTERNAL_VERSION_1 = 1; - - -// Connection to current database in external engine. -// Context passed to ExternalEngine has SYSDBA privileges. -// Context passed to ExternalFunction, ExternalProcedure and ExternalTrigger -// has user privileges. -// There is one ExternalContext per attachment. The privileges and character -// set properties are changed during the calls. -class ExternalContext -{ -public: - // Gets the ExternalEngine associated with this context. - virtual ExternalEngine* FB_CALL getEngine(Error* error) = 0; - - // Gets the Attachment associated with this context. - virtual IAttachment* FB_CALL getAttachment(Error* error) = 0; - - // Obtained transaction is valid only before control is returned to the engine - // or in ExternalResultSet::fetch calls of correspondent ExternalProcedure::open. - virtual ITransaction* FB_CALL getTransaction(Error* error) = 0; - - virtual const char* FB_CALL getUserName() = 0; - virtual const char* FB_CALL getDatabaseName() = 0; - - // Get user attachment character set. - virtual const Utf8* FB_CALL getClientCharSet() = 0; - - // Misc info associated with a context. The pointers are never accessed or freed by Firebird. - - // Obtains an unique (across all contexts) code to associate plugin and/or user information. - virtual int FB_CALL obtainInfoCode() = 0; - // Gets a value associated with this code or FB_NULL if no value was set. - virtual void* FB_CALL getInfo(int code) = 0; - // Sets a value associated with this code and returns the last value. - virtual void* FB_CALL setInfo(int code, void* value) = 0; -}; - - -// To return set of rows in selectable procedures. -class ExternalResultSet : public Disposable -{ -public: - virtual bool FB_CALL fetch(Error* error) = 0; -}; - - -class ExternalFunction : public Disposable -{ -public: - // This method is called just before execute and informs the engine our requested character - // set for data exchange inside that method. - // During this call, the context uses the character set obtained from ExternalEngine::getCharSet. - virtual void FB_CALL getCharSet(Error* error, ExternalContext* context, - Utf8* name, uint nameSize) = 0; - - virtual void FB_CALL execute(Error* error, ExternalContext* context, - UCHAR* inMsg, UCHAR* outMsg) = 0; -}; - - -class ExternalProcedure : public Disposable -{ -public: - // This method is called just before open and informs the engine our requested character - // set for data exchange inside that method and ExternalResultSet::fetch. - // During this call, the context uses the character set obtained from ExternalEngine::getCharSet. - virtual void FB_CALL getCharSet(Error* error, ExternalContext* context, - Utf8* name, uint nameSize) = 0; - - // Returns a ExternalResultSet for selectable procedures. - // Returning NULL results in a result set of one record. - // Procedures without output parameters should return NULL. - virtual ExternalResultSet* FB_CALL open(Error* error, ExternalContext* context, - UCHAR* inMsg, UCHAR* outMsg) = 0; -}; - - -class ExternalTrigger : public Disposable -{ -public: - enum Type - { - TYPE_BEFORE = 1, - TYPE_AFTER, - TYPE_DATABASE - }; - - enum Action - { - ACTION_INSERT = 1, - ACTION_UPDATE, - ACTION_DELETE, - ACTION_CONNECT, - ACTION_DISCONNECT, - ACTION_TRANS_START, - ACTION_TRANS_COMMIT, - ACTION_TRANS_ROLLBACK, - ACTION_DDL - }; - -public: - // This method is called just before execute and informs the engine our requested character - // set for data exchange inside that method. - // During this call, the context uses the character set obtained from ExternalEngine::getCharSet. - virtual void FB_CALL getCharSet(Error* error, ExternalContext* context, - Utf8* name, uint nameSize) = 0; - - virtual void FB_CALL execute(Error* error, ExternalContext* context, - Action action, UCHAR* oldMsg, UCHAR* newMsg) = 0; -}; - - -class IRoutineMetadata : public IVersioned -{ -public: - virtual const char* FB_CARG getPackage(IStatus* status) const = 0; - virtual const char* FB_CARG getName(IStatus* status) const = 0; - virtual const char* FB_CARG getEntryPoint(IStatus* status) const = 0; - virtual const char* FB_CARG getBody(IStatus* status) const = 0; - virtual const IParametersMetadata* FB_CARG getInputParameters(IStatus* status) const = 0; - virtual const IParametersMetadata* FB_CARG getOutputParameters(IStatus* status) const = 0; - virtual const IParametersMetadata* FB_CARG getTriggerFields(IStatus* status) const = 0; - virtual const char* FB_CARG getTriggerTable(IStatus* status) const = 0; - virtual ExternalTrigger::Type FB_CARG getTriggerType(IStatus* status) const = 0; -}; -#define FB_ROUTINE_METADATA_VERSION (FB_VERSIONED_VERSION + 9) - - -// In SuperServer, shared by all attachments to one database and disposed when last (non-external) -// user attachment to the database is closed. -class ExternalEngine : public IPluginBase -{ -public: - virtual int FB_CALL getVersion(Error* error) = 0; - - // This method is called once (per ExternalEngine instance) before any following methods. - // The requested character set for data exchange inside methods of this interface should - // be copied to charSet parameter. - // During this call, the context uses the UTF-8 character set. - virtual void FB_CALL open(Error* error, ExternalContext* context, - Utf8* charSet, uint charSetSize) = 0; - - // Attachment is being opened. - virtual void FB_CALL openAttachment(Error* error, ExternalContext* context) = 0; - - // Attachment is being closed. - virtual void FB_CALL closeAttachment(Error* error, ExternalContext* context) = 0; - - // Called when engine wants to load object in the cache. Objects are disposed when - // going out of the cache. - virtual ExternalFunction* FB_CALL makeFunction(Error* error, ExternalContext* context, - const IRoutineMetadata* metadata) = 0; - virtual ExternalProcedure* FB_CALL makeProcedure(Error* error, ExternalContext* context, - const IRoutineMetadata* metadata) = 0; - virtual ExternalTrigger* FB_CALL makeTrigger(Error* error, ExternalContext* context, - const IRoutineMetadata* metadata) = 0; -}; -#define FB_EXTERNAL_ENGINE_VERSION (FB_PLUGIN_VERSION + 7) - -} // namespace Firebird - - -#endif // FIREBIRD_EXTERNAL_API_H Deleted: firebird/trunk/src/include/FirebirdPluginApi.h =================================================================== --- firebird/trunk/src/include/FirebirdPluginApi.h 2011-06-02 14:19:31 UTC (rev 53092) +++ firebird/trunk/src/include/FirebirdPluginApi.h 2011-06-02 15:57:08 UTC (rev 53093) @@ -1,220 +0,0 @@ -/* - * The contents of this file are subject to the Initial - * Developer's Public License Version 1.0 (the "License"); - * you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl. - * - * Software distributed under the License is distributed AS IS, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. - * See the License for the specific language governing rights - * and limitations under the License. - * - * The Original Code was created by Adriano dos Santos Fernandes - * for the Firebird Open Source RDBMS project. - * - * Copyright (c) 2008 Adriano dos Santos Fernandes <adr...@uo...> - * and all contributors signed below. - * - * All Rights Reserved. - * Contributor(s): ______________________________________. - */ - -/* - * Firebird plugins are accessed using methods of PluginLoader interface. - * For each plugin_module tag found, it constructs a Plugin object, reads the corresponding - * plugin_config tag and inserts all config information in the object. - * - * When requested, the engine gets the attribute value of plugin_module/filename, load it as a - * dynamic (shared) library and calls the exported function firebirdPlugin (FB_PLUGIN_ENTRY_POINT - * definition, PluginEntrypoint prototype) passing the Plugin object as parameter. - * - * The plugin library may save the plugin object and call they methods later. The object and all - * pointers returned by it are valid until the plugin is unloaded (done through OS unload of the - * dynamic library) when Firebird is shutting down. - * - * Inside the plugin entry point (firebirdPlugin), the plugin may register extra functionality that - * may be obtained by Firebird when required. Currently only External Engines may be registered - * through Plugin::setExternalEngineFactory. - * - * Example plugin configuration file: - * - * <external_engine UDR> - * plugin_module UDR_engine - * </external_engine> - * - * <plugin_module UDR_engine> - * filename $(this)/udr_engine - * plugin_config UDR_config - * </plugin_module> - * - * <plugin_config UDR_config> - * path $(this)/udr - * </plugin_config> - * - * Note that the external_engine tag is ignored at this stage. Only plugin_module and plugin_config - * are read. The dynamic library extension may be ommitted, and $(this) expands to the directory of - * the .conf file. - * - * Plugins may access Firebird API through the fbclient library. - */ - -#ifndef FIREBIRD_PLUGIN_API_H -#define FIREBIRD_PLUGIN_API_H - -#include "Interface.h" - -#define FB_PLUGIN_ENTRY_POINT firebird_plugin - - -namespace Firebird { - -// IPluginBase interface - base for master plugin interfaces (factories are registered for them) -class IPluginBase : public IRefCounted -{ -public: - // Additional (compared with Interface) functions getOwner() and setOwner() - // are needed to release() owner of the plugin. This is done in releasePlugin() - // function in IPluginManager. Such method is needed to make sure that owner is released - // after plugin itself, and therefore module is unloaded after release of last plugin from it. - // Releasing owner from release() of plugin will unload module and after returning control - // to missing code segfault is unavoidable. - virtual void FB_CARG setOwner(IRefCounted*) = 0; - virtual IRefCounted* FB_CARG getOwner() = 0; -}; -#define FB_PLUGIN_VERSION (FB_REFCOUNTED_VERSION + 2) - -// IPluginSet - low level tool to access plugins according to parameter from firebird.conf -class IPluginSet : public IRefCounted -{ -public: - virtual const char* FB_CARG getName() const = 0; - virtual const char* FB_CARG getModule() const = 0; - virtual IPluginBase* FB_CARG getPlugin() = 0; - virtual void FB_CARG next() = 0; - virtual void FB_CARG set(const char*) = 0; -}; -#define FB_PLUGIN_SET_VERSION (FB_REFCOUNTED_VERSION + 5) - -// Interfaces to work with configuration data -class IConfig; - -// Entry in configuration file -class IConfigEntry : public IRefCounted -{ -public: - virtual const char* FB_CARG getName() = 0; - virtual const char* FB_CARG getValue() = 0; - virtual IConfig* FB_CARG getSubConfig() = 0; -}; -#define FB_CONFIG_PARAMETER_VERSION (FB_REFCOUNTED_VERSION + 3) - -// Generic form of access to configuration file - find specific entry in it -class IConfig : public IRefCounted -{ -public: - virtual IConfigEntry* FB_CARG find(const char* name) = 0; - virtual IConfigEntry* FB_CARG findValue(const char* name, const char* value) = 0; - virtual IConfigEntry* FB_CARG findPos(const char* name, unsigned int pos) = 0; -}; -#define FB_CONFIG_VERSION (FB_REFCOUNTED_VERSION + 3) - -// Used to access config values from firebird.conf (may be DB specific) -class IFirebirdConf : public IRefCounted -{ -public: - // Get integer key by it's name - // Value ~0 means name is invalid - // Keys are stable: one can use once obtained key in other instances of this interface - virtual unsigned int FB_CARG getKey(const char* name) = 0; - // Use to access integer and boolean values - virtual int FB_CARG asInteger(unsigned int key) = 0; - // Use to access string values - virtual const char* FB_CARG asString(unsigned int key) = 0; -}; -#define FB_FIREBIRD_CONF_VERSION (FB_REFCOUNTED_VERSION + 3) - -// This interface is passed to plugin's factory as it's single parameter -// and contains methods to access specific plugin's configuration data -class IPluginConfig : public IRefCounted -{ -public: - virtual const char* FB_CARG getConfigFileName() = 0; - virtual IConfig* FB_CARG getDefaultConfig() = 0; - virtual IFirebirdConf* FB_CARG getFirebirdConf() = 0; -}; -#define FB_PLUGIN_CONFIG_VERSION (FB_REFCOUNTED_VERSION + 3) - -// Required to creat instances of given plugin -class IPluginFactory : public IVersioned -{ -public: - virtual IPluginBase* FB_CARG createPlugin(IPluginConfig* factoryParameter) = 0; -}; -#define FB_PLUGIN_FACTORY_VERSION (FB_VERSIONED_VERSION + 1) - -// Required to let plugins manager invoke module's cleanup routine before unloading it. -// For some OS/compiler this may be done in dtor of global variable in module itself. -// Others (Windows/VC) fail to create some very useful resources (threads) when module is unloading. -class IPluginModule : public IVersioned -{ -public: - virtual void FB_CARG doClean() = 0; -}; -#define FB_PLUGIN_MODULE_VERSION (FB_VERSIONED_VERSION + 1) - - -// Interface to deal with plugins here and there, returned by master interface -class IPluginManager : public IVersioned -{ -public: - // Main function called by plugin modules in firebird_plugin() - virtual void FB_CARG registerPluginFactory(unsigned int interfaceType, const char* defaultName, - IPluginFactory* factory) = 0; - // Sets cleanup for plugin module - // Pay attention - this should be called at plugin-regsiter time! - // Only at this moment manager knows, which module sets his cleanup - virtual void FB_CARG registerModule(IPluginModule* cleanup) = 0; - // Remove registered before cleanup routine. - // This method must be called by module which detects that it's unloaded, - // but not notified prior to it by PluginManager via IPluginModule. - virtual void FB_CARG unregisterModule(IPluginModule* cleanup) = 0; - // Main function called to access plugins registered in plugins manager - // Has front-end in GetPlugins.h - template GetPlugins - // In namesList parameter comma or space separated list of names of configured plugins is passed - // missingFunctionClass is used to add functions "notImplemented" to the end of vtable - // in case when plugin's version is less than desired - // If caller already has an interface for firebird.conf, it may be passed here - // If parameter is missing, plugins will get access to default (non database specific) config - virtual IPluginSet* FB_CARG getPlugins(unsigned int interfaceType, const char* namesList, - int desiredVersion, void* missingFunctionClass, - IFirebirdConf* firebirdConf) = 0; - // Get generic config interface for given file - virtual IConfig* FB_CARG getConfig(const char* filename) = 0; - // Plugins must be released using this function - use of plugin's release() - // will cause resources leak - virtual void FB_CARG releasePlugin(IPluginBase* plugin) = 0; -}; -#define FB_PLUGIN_MANAGER_VERSION (FB_VERSIONED_VERSION + 6) - - -typedef void PluginEntrypoint(IMaster* masterInterface); - -namespace PluginType { - static const unsigned int YValve = 1; - static const unsigned int Provider = 2; - // leave space for may be some more super-std plugins - static const unsigned int FirstNonLibPlugin = 11; - static const unsigned int AuthServer = 11; - static const unsigned int AuthClient = 12; - static const unsigned int AuthUserManagement = 13; - static const unsigned int ExternalEngine = 14; - static const unsigned int Trace = 15; - - static const unsigned int MaxType = 16; // keep in sync please -}; - -} // namespace Firebird - - -#endif // FIREBIRD_PLUGIN_API_H Deleted: firebird/trunk/src/include/FirebirdUdr.h =================================================================== --- firebird/trunk/src/include/FirebirdUdr.h 2011-06-02 14:19:31 UTC (rev 53092) +++ firebird/trunk/src/include/FirebirdUdr.h 2011-06-02 15:57:08 UTC (rev 53093) @@ -1,73 +0,0 @@ -/* - * The contents of this file are subject to the Initial - * Developer's Public License Version 1.0 (the "License"); - * you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl. - * - * Software distributed under the License is distributed AS IS, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. - * See the License for the specific language governing rights - * and limitations under the License. - * - * The Original Code was created by Adriano dos Santos Fernandes - * for the Firebird Open Source RDBMS project. - * - * Copyright (c) 2008 Adriano dos Santos Fernandes <adr...@uo...> - * and all contributors signed below. - * - * All Rights Reserved. - * Contributor(s): ______________________________________. - */ - -#ifndef FIREBIRD_UDR_H -#define FIREBIRD_UDR_H - -#include "FirebirdApi.h" -#include "FirebirdExternalApi.h" - - -namespace Firebird -{ - namespace Udr - { -//------------------------------------------------------------------------------ - - -// Factory classes. They should be singletons instances created by user's modules and -// registered. When UDR engine is going to load a routine, it calls newItem. - -class FunctionFactory -{ -public: - virtual const char* FB_CALL getName() = 0; - virtual ExternalFunction* FB_CALL newItem(const IRoutineMetadata* metadata) = 0; -}; - -class ProcedureFactory -{ -public: - virtual const char* FB_CALL getName() = 0; - virtual ExternalProcedure* FB_CALL newItem(const IRoutineMetadata* metadata) = 0; -}; - -class TriggerFactory -{ -public: - virtual const char* FB_CALL getName() = 0; - virtual ExternalTrigger* FB_CALL newItem(const IRoutineMetadata* metadata) = 0; -}; - - -// Routine registration functions. -extern "C" void fbUdrRegFunction(FunctionFactory* factory); -extern "C" void fbUdrRegProcedure(ProcedureFactory* factory); -extern "C" void fbUdrRegTrigger(TriggerFactory* factory); -extern "C" void* fbUdrGetFunction(const char* symbol); - - -//------------------------------------------------------------------------------ - } // namespace Udr -} // namespace Firebird - -#endif // FIREBIRD_UDR_H Deleted: firebird/trunk/src/include/FirebirdUdrCpp.h =================================================================== --- firebird/trunk/src/include/FirebirdUdrCpp.h 2011-06-02 14:19:31 UTC (rev 53092) +++ firebird/trunk/src/include/FirebirdUdrCpp.h 2011-06-02 15:57:08 UTC (rev 53093) @@ -1,641 +0,0 @@ -/* - * The contents of this file are subject to the Initial - * Developer's Public License Version 1.0 (the "License"); - * you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl. - * - * Software distributed under the License is distributed AS IS, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. - * See the License for the specific language governing rights - * and limitations under the License. - * - * The Original Code was created by Adriano dos Santos Fernandes - * for the Firebird Open Source RDBMS project. - * - * Copyright (c) 2008 Adriano dos Santos Fernandes <adr...@uo...> - * and all contributors signed below. - * - * All Rights Reserved. - * Contributor(s): ______________________________________. - */ - -#ifndef FIREBIRD_PLUGIN_UDR_CPP -#define FIREBIRD_PLUGIN_UDR_CPP - -#include "FirebirdApi.h" -#include "FirebirdExternalApi.h" -#include "FirebirdUdr.h" -#ifndef JRD_IBASE_H -#include "ibase.h" -#include "iberror.h" -#endif -#include <string.h> - - -namespace Firebird -{ - namespace Udr - { -//------------------------------------------------------------------------------ - - -#define FB_UDR_FUNCTION(name) Func##name -#define FB_UDR_PROCEDURE(name) Proc##name -#define FB_UDR_TRIGGER(name) Trig##name - - -#define FB_UDR_BEGIN_DECLARE_FUNCTION(name) \ - class FB_UDR_FUNCTION(name) : public ::Firebird::Udr::Function \ - { \ - public: \ - virtual void FB_CALL execute(::Firebird::Error* error, ::Firebird::ExternalContext* context, \ - UCHAR* inMsg, UCHAR* outMsg); \ - private: - -#define FB_UDR_END_DECLARE_FUNCTION(name) \ - }; - -#define FB_UDR_DECLARE_FUNCTION(name) \ - FB_UDR_BEGIN_DECLARE_FUNCTION(name) \ - FB_UDR_END_DECLARE_FUNCTION(name) - -#define FB_UDR_BEGIN_FUNCTION(name) \ - void FB_CALL FB_UDR_FUNCTION(name)::execute(::Firebird::Error* error, \ - ::Firebird::ExternalContext* context, UCHAR* inMsg, UCHAR* outMsg) \ - { \ - try \ - { - -#define FB_UDR_END_FUNCTION(name) \ - } \ - catch (const ::Firebird::Udr::ThrowError::Exception& e) \ - { \ - e.stuff(error); \ - } \ - catch (...) \ - { \ - error->addCode(isc_arg_gds); \ - error->addCode(isc_random); \ - error->addString( \ - FB_UDR_UNRECOGNIZED_EXCEPTION, \ - strlen(FB_UDR_UNRECOGNIZED_EXCEPTION)); \ - } \ - } \ - ::Firebird::Udr::FunctionFactoryImpl<FB_UDR_FUNCTION(name)> FuncFactory##name(#name); - - -#define FB_UDR_BEGIN_DECLARE_PROCEDURE(name) \ - class FB_UDR_PROCEDURE(name) : public ::Firebird::Udr::Procedure \ - { \ - public: \ - virtual ::Firebird::ExternalResultSet* FB_CALL open(::Firebird::Error* error, \ - ::Firebird::ExternalContext* context, UCHAR* inMsg, UCHAR* outMsg); \ - -#define FB_UDR_END_DECLARE_PROCEDURE(name) \ - }; - -#define FB_UDR_DECLARE_PROCEDURE(name) \ - FB_UDR_BEGIN_DECLARE_PROCEDURE(name) \ - FB_UDR_END_DECLARE_PROCEDURE(name) - -#define FB_UDR_BEGIN_DECLARE_FETCH_PROCEDURE(name) \ - class ResultSet##name : public ::Firebird::Udr::ResultSet \ - { \ - public: \ - ResultSet##name(::Firebird::Error* error, ::Firebird::ExternalContext* context, \ - ::Firebird::Udr::Procedure* procedure, UCHAR* inMsg, UCHAR* outMsg); \ - \ - public: \ - virtual bool FB_CALL fetch(::Firebird::Error* error); \ - \ - private: - -#define FB_UDR_END_DECLARE_FETCH_PROCEDURE(name) \ - }; - -#define FB_UDR_DECLARE_FETCH_PROCEDURE(name) \ - FB_UDR_BEGIN_DECLARE_FETCH_PROCEDURE(name) \ - FB_UDR_END_DECLARE_FETCH_PROCEDURE(name) - -#define FB_UDR_DECLARE_PROCEDURE(name) \ - FB_UDR_BEGIN_DECLARE_PROCEDURE(name) \ - FB_UDR_END_DECLARE_PROCEDURE(name) - -#define FB_UDR_BEGIN_PROCEDURE(name) \ - ::Firebird::ExternalResultSet* FB_CALL Proc##name::open(::Firebird::Error* error, \ - ::Firebird::ExternalContext* context, UCHAR* inMsg, UCHAR* outMsg) \ - { \ - return new ResultSet##name(error, context, this, inMsg, outMsg); \ - } \ - \ - ResultSet##name::ResultSet##name(::Firebird::Error* error, ::Firebird::ExternalContext* context, \ - ::Firebird::Udr::Procedure* procedure, UCHAR* inMsg, UCHAR* outMsg) \ - : ResultSet(context, procedure, inMsg, outMsg) \ - { \ - try \ - { - -#define FB_UDR_FETCH_PROCEDURE(name) \ - } \ - catch (const ::Firebird::Udr::ThrowError::Exception& e) \ - { \ - e.stuff(error); \ - } \ - catch (...) \ - { \ - error->addCode(isc_arg_gds); \ - error->addCode(isc_random); \ - error->addString( \ - FB_UDR_UNRECOGNIZED_EXCEPTION, \ - strlen(FB_UDR_UNRECOGNIZED_EXCEPTION)); \ - } \ - } \ - \ - bool FB_CALL ResultSet##name::fetch(::Firebird::Error* error) \ - { \ - try \ - { - -#define FB_UDR_END_PROCEDURE(name) \ - } \ - catch (const ::Firebird::Udr::ThrowError::Exception& e) \ - { \ - e.stuff(error); \ - } \ - catch (...) \ - { \ - error->addCode(isc_arg_gds); \ - error->addCode(isc_random); \ - error->addString( \ - FB_UDR_UNRECOGNIZED_EXCEPTION, \ - strlen(FB_UDR_UNRECOGNIZED_EXCEPTION)); \ - } \ - return false; \ - } \ - ::Firebird::Udr::ProcedureFactoryImpl<FB_UDR_PROCEDURE(name)> ProcFactory##name(#name); - - -#define FB_UDR_BEGIN_DECLARE_TRIGGER(name) \ - class FB_UDR_TRIGGER(name) : public ::Firebird::Udr::Trigger \ - { \ - public: \ - virtual void FB_CALL execute(::Firebird::Error* error, ::Firebird::ExternalContext* context, \ - ::Firebird::ExternalTrigger::Action action, UCHAR* oldMsg, UCHAR* newMsg); \ - private: - -#define FB_UDR_END_DECLARE_TRIGGER(name) \ - }; - -#define FB_UDR_DECLARE_TRIGGER(name) \ - FB_UDR_BEGIN_DECLARE_TRIGGER(name) \ - FB_UDR_END_DECLARE_TRIGGER(name) - -#define FB_UDR_BEGIN_TRIGGER(name) \ - void FB_CALL FB_UDR_TRIGGER(name)::execute(::Firebird::Error* error, \ - ::Firebird::ExternalContext* context, ::Firebird::ExternalTrigger::Action action, \ - UCHAR* oldMsg, UCHAR* newMsg) \ - { \ - try \ - { - -#define FB_UDR_END_TRIGGER(name) \ - } \ - catch (const ::Firebird::Udr::ThrowError::Exception& e) \ - { \ - e.stuff(error); \ - } \ - catch (...) \ - { \ - error->addCode(isc_arg_gds); \ - error->addCode(isc_random); \ - error->addString( \ - FB_UDR_UNRECOGNIZED_EXCEPTION, \ - strlen(FB_UDR_UNRECOGNIZED_EXCEPTION)); \ - } \ - } \ - ::Firebird::Udr::TriggerFactoryImpl<FB_UDR_TRIGGER(name)> TrigFactory##name(#name); - - -#define FB_UDR_UNRECOGNIZED_EXCEPTION "Unrecognized C++ exception" - - -class ThrowError : public Error -{ -private: - struct Info - { - Info() - : next(FB_NULL), - str(FB_NULL) - { - } - - ~Info() - { - if (str) - delete [] str; - } - - static void free(Info* info) - { - while (info) - { - Info* p = info; - info = info->next; - delete p; - } - } - - enum { TYPE_CODE, TYPE_STR } type; - - Info* next; - int32 code; - char* str; - int strLength; - }; - -public: - class Exception - { - public: - explicit Exception(Info* aInfo) - : info(aInfo) - { - } - - Exception(const Exception& e) - : info(FB_NULL) - { - Info* end = FB_NULL; - - for (const Info* p = e.info; p; p = p->next) - { - Info* newInfo = new Info; - newInfo->type = p->type; - newInfo->code = p->code; - - if (p->str) - { - newInfo->str = new char[p->strLength]; - memcpy(newInfo->str, p->str, p->strLength); - newInfo->strLength = p->strLength; - } - - if (end) - end->next = newInfo; - - end = newInfo; - - if (!info) - info = newInfo; - } - } - - ~Exception() - { - Info::free(info); - } - - public: - void stuff(Error* error) const - { - for (const Info* p = info; p; p = p->next) - { - if (p->type == Info::TYPE_CODE) - error->addCode(p->code); - else if (p->type == Info::TYPE_STR) - error->addString(p->str, p->strLength); - } - } - - private: - Info* info; - }; - -public: - ThrowError() - : start(FB_NULL), - end(FB_NULL) - { - } - - virtual ~ThrowError() - { - raise(); - Info::free(start); - } - -public: - static void check(ISC_STATUS status, const ISC_STATUS* vector) - { - if (status == 0) - return; - - ThrowError error; - - while (*vector != isc_arg_end) - { - switch (*vector) - { - case isc_arg_warning: - case isc_arg_gds: - case isc_arg_number: - case isc_arg_interpreted: - case isc_arg_vms: - case isc_arg_unix: - case isc_arg_win32: - error.addCode(*vector++); - error.addCode(*vector++); - break; - - case isc_arg_string: - error.addString((const char*) vector[1], strlen((const char*) vector[1])); - vector += 2; - break; - - case isc_arg_cstring: - error.addString((const char*) vector[2], vector[1]); - vector += 3; - break; - - default: - return; - } - } - } - - static void check(const ISC_STATUS* vector) - { - check(vector[1], vector); - } - -public: - inline operator Firebird::Error* () - { - return this; - } - -public: - virtual bool FB_CALL addCode(Firebird::int32 code) - { - Info* info = new Info; - info->type = Info::TYPE_CODE; - info->code = code; - - if (end) - end->next = info; - - end = info; - - if (!start) - start = info; - - return true; - } - - virtual bool FB_CALL addString(const char* str, uint strLength) - { - Info* info = new Info; - info->type = Info::TYPE_STR; - info->str = new char[strLength]; - memcpy(info->str, str, strLength); - info->strLength = strLength; - - if (end) - end->next = info; - - end = info; - - if (!start) - start = info; - - return true; - } - -private: - void raise() - { - if (start) - throw Exception(start); - } - -protected: - Info* start; - Info* end; -}; - - -class Procedure; - - -class Helper -{ -public: - static isc_db_handle getIscDbHandle(ExternalContext* context) - { - ISC_STATUS_ARRAY status = {0}; - isc_db_handle handle = 0; - fb_get_database_handle(status, &handle, context->getAttachment(ThrowError())); - ThrowError::check(status); - return handle; - } - - static isc_tr_handle getIscTrHandle(ExternalContext* context) - { - ISC_STATUS_ARRAY status = {0}; - isc_tr_handle handle = 0; - fb_get_transaction_handle(status, &handle, context->getTransaction(ThrowError())); - ThrowError::check(status); - return handle; - } - - static void* getEntryPoint(ExternalContext* /*context*/, const char* entryPoint) - { - return fbUdrGetFunction(entryPoint); - } -}; - - -class ResultSet : public ExternalResultSet, public Helper -{ -public: - ResultSet(Firebird::ExternalContext* aContext, Firebird::Udr::Procedure* aProcedure, - UCHAR* aInMsg, UCHAR* aOutMsg) - : context(aContext), - procedure(aProcedure), - inMsg(aInMsg), - outMsg(aOutMsg) - { - } - - virtual ~ResultSet() - { - } - -public: - virtual void FB_CALL dispose(Firebird::Error* /*error*/) - { - delete this; - } - -protected: - Firebird::ExternalContext* context; - Firebird::Udr::Procedure* procedure; - UCHAR* inMsg; - UCHAR* outMsg; -}; - - -class Function : public ExternalFunction, public Helper -{ -public: - virtual ~Function() - { - } - -public: - virtual void FB_CALL dispose(Error* /*error*/) - { - delete this; - } - - void FB_CALL getCharSet(Error* /*error*/, ExternalContext* /*context*/, Utf8* /*name*/, uint /*nameSize*/) - { - } - -public: - const IRoutineMetadata* metadata; -}; - - -class Procedure : public ExternalProcedure, public Helper -{ -public: - virtual ~Procedure() - { - } - -public: - virtual void FB_CALL dispose(Error* /*error*/) - { - delete this; - } - - void FB_CALL getCharSet(Error* /*error*/, ExternalContext* /*context*/, Utf8* /*name*/, uint /*nameSize*/) - { - } - -public: - const IRoutineMetadata* metadata; -}; - - -class Trigger : public ExternalTrigger, public Helper -{ -public: - virtual ~Trigger() - { - } - -public: - virtual void FB_CALL dispose(Error* /*error*/) - { - delete this; - } - - void FB_CALL getCharSet(Error* /*error*/, ExternalContext* /*context*/, Utf8* /*name*/, uint /*nameSize*/) - { - } - -public: - const IRoutineMetadata* metadata; -}; - - -template <typename T> class FunctionFactoryImpl : public FunctionFactory -{ -public: - explicit FunctionFactoryImpl(const char* aName) - : name(aName) - { - fbUdrRegFunction(this); - } - -public: - virtual const char* FB_CALL getName() - { - return name; - } - - virtual ExternalFunction* FB_CALL newItem(const IRoutineMetadata* metadata) - { - Function* function = new T(); - function->metadata = metadata; - return function; - } - -private: - const char* name; -}; - - -template <typename T> class ProcedureFactoryImpl : public ProcedureFactory -{ -public: - explicit ProcedureFactoryImpl(const char* aName) - : name(aName) - { - fbUdrRegProcedure(this); - } - -public: - virtual const char* FB_CALL getName() - { - return name; - } - - virtual ExternalProcedure* FB_CALL newItem(const IRoutineMetadata* metadata) - { - Procedure* procedure = new T(); - procedure->metadata = metadata; - return procedure; - } - -private: - const char* name; -}; - - -template <typename T> class TriggerFactoryImpl : public TriggerFactory -{ -public: - explicit TriggerFactoryImpl(const char* aName) - : name(aName) - { - fbUdrRegTrigger(this); - } - -public: - virtual const char* FB_CALL getName() - { - return name; - } - - virtual ExternalTrigger* FB_CALL newItem(const IRoutineMetadata* metadata) - { - Trigger* trigger = new T(); - trigger->metadata = metadata; - return trigger; - } - -private: - const char* name; -}; - - -//------------------------------------------------------------------------------ - } // namespace Udr -} // namespace Firebird - -#endif // FIREBIRD_PLUGIN_UDR_CPP Deleted: firebird/trunk/src/include/Interface.h =================================================================== --- firebird/trunk/src/include/Interface.h 2011-06-02 14:19:31 UTC (rev 53092) +++ firebird/trunk/src/include/Interface.h 2011-06-02 15:57:08 UTC (rev 53093) @@ -1,116 +0,0 @@ -/* - * PROGRAM: Firebird interface. - * MODULE: Interface.h - * DESCRIPTION: Base class for all FB interfaces / plugins. - * - * The contents of this file are subject to the Initial - * Developer's Public License Version 1.0 (the "License"); - * you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl. - * - * Software distributed under the License is distributed AS IS, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. - * See the License for the specific language governing rights - * and limitations under the License. - * - * The Original Code was created by Alex Peshkov - * for the Firebird Open Source RDBMS project. - * - * Copyright (c) 2010 Alex Peshkov <peshkoff at mail.ru> - * and all contributors signed below. - * - * All Rights Reserved. - * Contributor(s): ______________________________________. - * - * - */ - -#ifndef FB_INCLUDE_INTERFACE -#define FB_INCLUDE_INTERFACE - -#include "types_pub.h" - -#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) -# define FB_CARG __cdecl -#else -# define FB_CARG -#endif - -namespace Firebird { - -// Versioned interface - base for all FB interfaces -class IVersioned -{ -public: - virtual int FB_CARG getVersion() = 0; -}; -// If this is changed, types of all interfaces must be changed -#define FB_VERSIONED_VERSION 1 - -// Reference counted interface - base for refCounted FB interfaces -class IRefCounted : public IVersioned -{ -public: - virtual void FB_CARG addRef() = 0; - virtual int FB_CARG release() = 0; -}; -// If this is changed, types of refCounted interfaces must be changed -#define FB_REFCOUNTED_VERSION (FB_VERSIONED_VERSION + 2) - -// Disposable interface - base for disposable FB interfaces -class IDisposable : public IVersioned -{ -public: - virtual void FB_CARG dispose() = 0; -}; -// If this is changed, types of disposable interfaces must be changed -#define FB_DISPOSABLE_VERSION (FB_VERSIONED_VERSION + 1) - -// Interface to work with status vector -// Created by master interface by request -// Also may be implemented on stack by internal FB code -class IStatus : public IDisposable -{ -public: - virtual void FB_CARG set(unsigned int length, const ISC_STATUS* value) = 0; - virtual void FB_CARG set(const ISC_STATUS* value) = 0; - virtual void FB_CARG init() = 0; - - virtual const ISC_STATUS* FB_CARG get() const = 0; - virtual int FB_CARG isSuccess() const = 0; -}; -#define FB_STATUS_VERSION (FB_DISPOSABLE_VERSION + 5) - -class IProvider; -class IPluginManager; -class ITimerControl; -class IAttachment; -class ITransaction; -class IDtc; - -// Master interface is used to access almost all other interfaces. -class IMaster : public IVersioned -{ -public: - virtual IStatus* FB_CARG getStatus() = 0; - virtual IProvider* FB_CARG getDispatcher() = 0; - virtual IPluginManager* FB_CARG getPluginManager() = 0; - virtual int FB_CARG upgradeInterface(IVersioned* toUpgrade, int desiredVersion, void* missingFunctionClass) = 0; - virtual const char* FB_CARG circularAlloc(const char* s, size_t len, intptr_t thr) = 0; - virtual ITimerControl* FB_CARG getTimerControl() = 0; - virtual IDtc* FB_CARG getDtc() = 0; - virtual IAttachment* registerAttachment(IProvider* provider, IAttachment* attachment) = 0; - virtual ITransaction* registerTransaction(IAttachment* attachment, ITransaction* transaction) = 0; -}; -#define FB_MASTER_VERSION (FB_VERSIONED_VERSION + 9) - -} // namespace Firebird - -extern "C" -{ - // additional API function - Firebird::IMaster* ISC_EXPORT fb_get_master_interface(); -} - -#endif // FB_INCLUDE_INTERFACE Deleted: firebird/trunk/src/include/ProviderInterface.h =================================================================== --- firebird/trunk/src/include/ProviderInterface.h 2011-06-02 14:19:31 UTC (rev 53092) +++ firebird/trunk/src/include/ProviderInterface.h 2011-06-02 15:57:08 UTC (rev 53093) @@ -1,264 +0,0 @@ -/* - * PROGRAM: Firebird basic API - * MODULE: YValveInterface.h - * DESCRIPTION: Interfaces, used by yValve - * - * The contents of this file are subject to the Initial - * Developer's Public License Version 1.0 (the "License"); - * you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl. - * - * Software distributed under the License is distributed AS IS, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. - * See the License for the specific language governing rights - * and limitations under the License. - * - * The Original Code was created by Alex Peshkov - * for the Firebird Open Source RDBMS project. - * - * Copyright (c) 2010 Alex Peshkov <peshkoff at mail.ru> - * and all contributors signed below. - * - * All Rights Reserved. - * Contributor(s): ______________________________________. - * - * - */ - -#ifndef FB_PROVIDER_INTERFACE -#define FB_PROVIDER_INTERFACE - -#include "firebird.h" -#include "FirebirdPluginApi.h" - -namespace Firebird { - -// This interfaces are implemented by yvalve code and by each of providers. - -class IAttachment; // Forward - -struct FbMessage -{ - const unsigned char* blr; - unsigned char* buffer; - unsigned int blrLength; - unsigned int bufferLength; -}; - -class IEventCallback : public IVersioned -{ -public: - virtual void FB_CARG eventCallbackFunction(unsigned int length, const unsigned char* events) = 0; -}; -#define FB_EVENT_CALLBACK_VERSION (FB_VERSIONED_VERSION + 1) - -/* -class ShutdownCallback -{ -public: - virtual void FB_CARG shutdownCallbackFunction(int reason, int mask) = 0; -}; -*/ - -class IBlob : public IRefCounted -{ -public: - virtual void FB_CARG getInfo(IStatus* status, - unsigned int itemsLength, const unsigned char* items, - unsigned int bufferLength, unsigned char* buffer) = 0; - virtual unsigned int FB_CARG getSegment(IStatus* status, unsigned int length, - void* buffer) = 0; // returns real length - virtual void FB_CARG putSegment(IStatus* status, unsigned int length, - const void* buffer) = 0; - virtual void FB_CARG cancel(IStatus* status) = 0; - virtual void FB_CARG close(IStatus* status) = 0; - virtual int FB_CARG seek(IStatus* status, int mode, int offset) = 0; // returns position -}; -#define FB_BLOB_VERSION (FB_REFCOUNTED_VERSION + 6) - -class ITransaction : public IRefCounted -{ -public: - virtual void FB_CARG getInfo(IStatus* status, - unsigned int itemsLength, const unsigned char* items, - unsigned int bufferLength, unsigned char* buffer) = 0; - virtual void FB_CARG prepare(IStatus* status, - unsigned int msgLength = 0, const unsigned char* message = 0) = 0; - virtual void FB_CARG commit(IStatus* status) = 0; - virtual void FB_CARG commitRetaining(IStatus* status) = 0; - virtual void FB_CARG rollback(IStatus* status) = 0; - virtual void FB_CARG rollbackRetaining(IStatus* status) = 0; - virtual void FB_CARG disconnect(IStatus* status) = 0; - virtual ITransaction* FB_CARG join(IStatus* status, ITransaction* transaction) = 0; - virtual ITransaction* FB_CARG validate(IStatus* status, IAttachment* attachment) = 0; - virtual ITransaction* FB_CARG enterDtc(IStatus* status) = 0; -}; -#define FB_TRANSACTION_VERSION (FB_REFCOUNTED_VERSION + 10) - -class IParametersMetadata : public IVersioned -{ -public: - virtual unsigned FB_CARG getCount(IStatus* status) const = 0; - virtual const char* FB_CARG getField(IStatus* status, unsigned index) const = 0; - virtual const char* FB_CARG getRelation(IStatus* status, unsigned index) const = 0; - virtual const char* FB_CARG getOwner(IStatus* status, unsigned index) const = 0; - virtual const char* FB_CARG getAlias(IStatus* status, unsigned index) const = 0; - virtual unsigned FB_CARG getType(IStatus* status, unsigned index) const = 0; - virtual bool FB_CARG isNullable(IStatus* status, unsigned index) const = 0; - virtual unsigned FB_CARG getSubType(IStatus* status, unsigned index) const = 0; - virtual unsigned FB_CARG getLength(IStatus* status, unsigned index) const = 0; - virtual unsigned FB_CARG getScale(IStatus* status, unsigned index) const = 0; -}; -#define FB_PARAMETERS_METADATA_VERSION (FB_VERSIONED_VERSION + 10) - -class IStatement : public IRefCounted -{ -public: - // Prepare flags. - static const unsigned PREPARE_PREFETCH_TYPE = 0x01; - static const unsigned PREPARE_PREFETCH_INPUT_PARAMETERS = 0x02; - static const unsigned PREPARE_PREFETCH_OUTPUT_PARAMETERS = 0x04; - static const unsigned PREPARE_PREFETCH_LEGACY_PLAN = 0x08; - static const unsigned PREPARE_PREFETCH_DETAILED_PLAN = 0x10; - static const unsigned PREPARE_PREFETCH_AFFECTED_RECORDS = 0x20; // not used yet - static const unsigned PREPARE_PREFETCH_METADATA = - PREPARE_PREFETCH_TYPE | PREPARE_PREFETCH_INPUT_PARAMETERS | PREPARE_PREFETCH_OUTPUT_PARAMETERS; - static const unsigned PREPARE_PREFETCH_ALL = - PREPARE_PREFETCH_METADATA | PREPARE_PREFETCH_LEGACY_PLAN | PREPARE_PREFETCH_DETAILED_PLAN | - PREPARE_PREFETCH_AFFECTED_RECORDS; - - virtual void FB_CARG prepare(IStatus* status, ITransaction* tra, - unsigned int stmtLength, const char* sqlStmt, unsigned int dialect, - unsigned int flags) = 0; - virtual void FB_CARG getInfo(IStatus* status, - unsigned int itemsLength, const unsigned char* items, - unsigned int bufferLength, unsigned char* buffer) = 0; - virtual unsigned FB_CARG getType(IStatus* status) = 0; - virtual const char* FB_CARG getPlan(IStatus* status, bool detailed) = 0; - virtual const IParametersMetadata* FB_CARG getInputParameters(IStatus* status) = 0; - virtual const IParametersMetadata* FB_CARG getOutputParameters(IStatus* status) = 0; - virtual ISC_UINT64 FB_CARG getAffectedRecords(IStatus* status) = 0; - virtual void FB_CARG setCursorName(IStatus* status, const char* name) = 0; - virtual ITransaction* FB_CARG execute(IStatus* status, ITransaction* tra, - unsigned int inMsgType, const FbMessage* inMsgBuffer, - const FbMessage* outMsgBuffer) = 0; - virtual int FB_CARG fetch(IStatus* status, const FbMessage* msgBuffer) = 0; // returns 100 if EOF, 101 if fragmented - virtual void FB_CARG insert(IStatus* status, const FbMessage* msgBuffer) = 0; - virtual void FB_CARG free(IStatus* status, unsigned int option) = 0; -}; -#define FB_STATEMENT_VERSION (FB_REFCOUNTED_VERSION + 12) - -class IRequest : public IRefCounted -{ -public: - virtual void FB_CARG receive(IStatus* status, int level, unsigned int msgType, - unsigned int length, unsigned char* message) = 0; - virtual void FB_CARG send(IStatus* status, int level, unsigned int msgType, - unsigned int length, const unsigned char* message) = 0; - virtual void FB_CARG getInfo(IStatus* status, int level, - unsigned int itemsLength, const unsigned char* items, - unsigned int bufferLength, unsigned char* buffer) = 0; - virtual void FB_CARG start(IStatus* status, ITransaction* tra, int level) = 0; - virtual void FB_CARG startAndSend(IStatus* status, ITransaction* tra, int level, unsigned int msgType, - unsigned int length, const unsigned char* message) = 0; - virtual void FB_CARG unwind(IStatus* status, int level) = 0; - virtual void FB_CARG free(IStatus* status) = 0; -}; -#define FB_REQUEST_VERSION (FB_REFCOUNTED_VERSION + 7) - -class IEvents : public IRefCounted -{ -public: - virtual void FB_CARG cancel(IStatus* status) = 0; -}; -#define FB_EVENTS_VERSION (FB_REFCOUNTED_VERSION + 1) - -class IAttachment : public IRefCounted -{ -public: - virtual void FB_CARG getInfo(IStatus* status, - unsigned int itemsLength, const unsigned char* items, - unsigned int bufferLength, unsigned char* buffer) = 0; - virtual ITransaction* FB_CARG startTransaction(IStatus* status, unsigned int tpbLength, const unsigned char* tpb) = 0; - virtual ITransaction* FB_CARG reconnectTransaction(IStatus* status, unsigned int length, const unsigned char* id) = 0; - virtual IStatement* FB_CARG allocateStatement(IStatus* status) = 0; - virtual IRequest* FB_CARG compileRequest(IStatus* status, unsigned int blrLength, const unsigned char* blr) = 0; - virtual void FB_CARG transactRequest(IStatus* status, ITransaction* transaction, - unsigned int blrLength, const unsigned char* blr, - unsigned int inMsgLength, const unsigned char* inMsg, - unsigned int outMsgLength, unsigned char* outMsg) = 0; - virtual IBlob* FB_CARG createBlob(IStatus* status, ITransaction* transaction, ISC_QUAD* id, - unsigned int bpbLength = 0, const unsigned char* bpb = 0) = 0; - virtual IBlob* FB_CARG openBlob(IStatus* status, ITransaction* transaction, ISC_QUAD* id, - unsigned int bpbLength = 0, const unsigned char* bpb = 0) = 0; - virtual int FB_CARG getSlice(IStatus* status, ITransaction* transaction, ISC_QUAD* id, - unsigned int sdlLength, const unsigned char* sdl, - unsigned int paramLength, const unsigned char* param, - int sliceLength, unsigned char* slice) = 0; - virtual void FB_CARG putSlice(IStatus* status, ITransaction* transaction, ISC_QUAD* id, - unsigned int sdlLength, const unsigned char* sdl, - unsigned int paramLength, const unsigned char* param, - int sliceLength, unsigned char* slice) = 0; - virtual void FB_CARG ddl(IStatus* status, ITransaction* transaction, unsigned int length, - const unsigned char* dyn) = 0; - virtual ITransaction* FB_CARG execute(IStatus* status, ITransaction* transaction, - unsigned int length, const char* string, unsigned int dialect, - unsigned int inMsgType, const FbMessage* inMsgBuffer, - const FbMessage* outMsgBuffer) = 0; - virtual IEvents* FB_CARG queEvents(IStatus* status, IEventCallback* callback, - unsigned int length, const unsigned char* events) = 0; - virtual void FB_CARG cancelOperation(IStatus* status, int option) = 0; - virtual void FB_CARG ping(IStatus* status) = 0; - virtual void FB_CARG detach(IStatus* status) = 0; - virtual void FB_CARG drop(IStatus* status) = 0; -}; -#define FB_ATTACHMENT_VERSION (FB_REFCOUNTED_VERSION + 17) - -class IService : public IRefCounted -{ -public: - virtual void FB_CARG detach(IStatus* status) = 0; - virtual void FB_CARG query(IStatus* status, - unsigned int sendLength, const unsigned char* sendItems, - unsigned int receiveLength, const unsigned char* receiveItems, - unsigned int bufferLength, unsigned char* buffer) = 0; - virtual void FB_CARG start(IStatus* status, - unsigned int spbLength, const unsigned char* spb) = 0; -}; -#define FB_SERVICE_VERSION (FB_REFCOUNTED_VERSION + 3) - -class IProvider : public IPluginBase -{ -public: - virtual IAttachment* FB_CARG attachDatabase(IStatus* status, const char* fileName, - unsigned int dpbLength, const unsigned char* dpb) = 0; - virtual IAttachment* FB_CARG createDatabase(IStatus* status, const char* fileName, - unsigned int dpbLength, const unsigned char* dpb) = 0; - virtual IService* FB_CARG attachServiceManager(IStatus* status, const char* service, - unsigned int spbLength, const unsigned char* spb) = 0; - virtual void FB_CARG shutdown(IStatus* status, unsigned int timeout, const int reason) = 0; -}; -#define FB_PROVIDER_VERSION (FB_PLUGIN_VERSION + 4) - -// DtcStart - structure to start transaction over >1 attachments (former TEB) -struct DtcStart -{ - IAttachment* attachment; - const unsigned char* tpb; - unsigned int tpbLength; -}; - -// Distributed transactions coordinator -class IDtc : public IVersioned -{ -public: - virtual ITransaction* FB_CARG start(IStatus* status, unsigned int cnt, DtcStart* components) = 0; - virtual ITransaction* FB_CARG join(IStatus* status, ITransaction* one, ITransaction* two) = 0; -}; -#define FB_DTC_VERSION (FB_VERSIONED_VERSION + 2) - -} // namespace Firebird - - -#endif // FB_PROVIDER_INTERFACE Deleted: firebird/trunk/src/include/Timer.h =================================================================== --- firebird/trunk/src/include/Timer.h 2011-06-02 14:19:31 UTC (rev 53092) +++ firebird/trunk/src/include/Timer.h 2011-06-02 15:57:08 UTC (rev 53093) @@ -1,61 +0,0 @@ -/* - * PROGRAM: Firebird interface. - * MODULE: Timer.h - * DESCRIPTION: Timer interface defnition. - * - * The contents of this file are subject to the Initial - * Developer's Public License Version 1.0 (the "License"); - * you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl. - * - * Software distributed under the License is distributed AS IS, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. - * See the License for the specific language governing rights - * and limitations under the License. - * - * The Original Code was created by Alex Peshkov - * for the Firebird Open Source RDBMS project. - * - * Copyright (c) 2011 Alex Peshkov <peshkoff at mail.ru> - * and all contributors signed below. - * - * All Rights Reserved. - * Contributor(s): ______________________________________. - * - * - */ - -#ifndef FIREBIRD_TIMER_H -#define FIREBIRD_TIMER_H - -#include "Interface.h" - -namespace Firebird { - -// Identifies particular timer. -// Callback function is invoked when timer fires. -class ITimer : public IRefCounted -{ -public: - virtual void FB_CARG handler() = 0; -}; -#define FB_TIMER_VERSION (FB_REFCOUNTED_VERSION + 1) - -typedef ISC_INT64 TimerDelay; - -// Interface to set timer for particular time -class ITimerControl : public IVersioned -{ -public: - // Set timer - virtual void FB_CARG start(ITimer* timer, TimerDelay microSeconds) = 0; - // Stop timer - virtual void FB_CARG stop(ITimer* timer) = 0; -}; -#define FB_TIMER_CONTROL_VERSION (FB_VERSIONED_VERSION + 2) - -} // namespace Firebird - - -#endif // FIREBIRD_TIMER_H Copied: firebird/trunk/src/include/firebird... [truncated message content] |
From: <fir...@us...> - 2011-06-03 03:18:04
|
Revision: 53095 http://firebird.svn.sourceforge.net/firebird/?rev=53095&view=rev Author: firebirds Date: 2011-06-03 03:17:55 +0000 (Fri, 03 Jun 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-06-02 15:57:42 UTC (rev 53094) +++ firebird/trunk/ChangeLog 2011-06-03 03:17:55 UTC (rev 53095) @@ -1,3 +1,60 @@ + 2011-06-02 15:57 asfernandes + M src/jrd/tra.h +Warning. + + 2011-06-02 15:57 asfernandes + M examples/udr/UdrCppExample.cpp + M src/auth/AuthInterface.h + M src/auth/SecurityDatabase/LegacyManagement.epp + M src/auth/SecurityDatabase/LegacyServer.cpp + M src/auth/trusted/AuthSspi.cpp + M src/common/StatementMetadata.h + M src/common/StatusHolder.h + M src/common/classes/ImplementHelper.h + M src/common/config/config.cpp + M src/common/fb_exception.cpp + M src/common/utils_proto.h + M src/gpre/boot/gpre_meta_boot.cpp + D src/include/FirebirdExternalApi.h + D src/include/FirebirdPluginApi.h + D src/include/FirebirdUdr.h + D src/include/FirebirdUdrCpp.h + D src/include/Interface.h + D src/include/ProviderInterface.h + D src/include/Timer.h + A src/include/firebird + A src/include/firebird/ExternalEngine.h (from /firebird/trunk/src/include/FirebirdExternalApi.h:53092) + A src/include/firebird/Interface.h (from /firebird/trunk/src/include/Interface.h:53092) + A src/include/firebird/Plugin.h (from /firebird/trunk/src/include/FirebirdPluginApi.h:53092) + A src/include/firebird/Provider.h (from /firebird/trunk/src/include/ProviderInterface.h:53092) + A src/include/firebird/Timer.h (from /firebird/trunk/src/include/Timer.h:53092) + A src/include/firebird/UdrCppEngine.h (from /firebird/trunk/src/include/FirebirdUdrCpp.h:53092) + A src/include/firebird/UdrEngine.h (from /firebird/trunk/src/include/FirebirdUdr.h:53092) + M src/jrd/EngineInterface.h + M src/jrd/ErrorImpl.h + M src/jrd/ExtEngineManager.h + M src/jrd/blb.h + M src/jrd/event.h + M src/jrd/jrd.h + M src/jrd/ntrace.h + M src/plugins/udr_engine/UdrEngine.cpp + M src/remote/client/interface.cpp + M src/remote/remote.cpp + M src/remote/server/os/posix/inet_server.cpp + M src/remote/server/os/win32/srvr_w32.cpp + M src/yvalve/MasterImplementation.cpp + M src/yvalve/MasterImplementation.h + M src/yvalve/PluginManager.h + M src/yvalve/YObjects.h + M src/yvalve/gds.cpp + M src/yvalve/why.cpp +Move v3 public include files to src/include/firebird. + + 2011-06-02 14:19 dimitr + M src/jrd/DatabaseSnapshot.cpp + M src/jrd/DatabaseSnapshot.h +Fixed CORE-3508: MON$DATABASE_NAME and MON$ATTACHMENT_NAME fields contain question marks instead of non-ASCII characters regardless of the connection charset. + 2011-06-01 17:29 dimitr M src/jrd/dfw.epp Cleanup. Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-06-02 15:57:42 UTC (rev 53094) +++ firebird/trunk/src/jrd/build_no.h 2011-06-03 03:17:55 UTC (rev 53095) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29421 + FORMAL BUILD NUMBER:29424 */ -#define PRODUCT_VER_STRING "3.0.0.29421" -#define FILE_VER_STRING "WI-T3.0.0.29421" -#define LICENSE_VER_STRING "WI-T3.0.0.29421" -#define FILE_VER_NUMBER 3, 0, 0, 29421 +#define PRODUCT_VER_STRING "3.0.0.29424" +#define FILE_VER_STRING "WI-T3.0.0.29424" +#define LICENSE_VER_STRING "WI-T3.0.0.29424" +#define FILE_VER_NUMBER 3, 0, 0, 29424 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29421" +#define FB_BUILD_NO "29424" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-06-02 15:57:42 UTC (rev 53094) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-06-03 03:17:55 UTC (rev 53095) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29421 +BuildNum=29424 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <asf...@us...> - 2011-06-04 02:19:02
|
Revision: 53110 http://firebird.svn.sourceforge.net/firebird/?rev=53110&view=rev Author: asfernandes Date: 2011-06-04 02:18:55 +0000 (Sat, 04 Jun 2011) Log Message: ----------- Misc. Modified Paths: -------------- firebird/trunk/builds/install/misc/posixLibrary.sh.in firebird/trunk/src/burp/restore.epp firebird/trunk/src/common/fb_exception.cpp firebird/trunk/src/jrd/dfw.epp firebird/trunk/src/jrd/dpm.epp firebird/trunk/src/jrd/extds/InternalDS.cpp firebird/trunk/src/jrd/flu.cpp firebird/trunk/src/jrd/flu.h firebird/trunk/src/jrd/met.epp Modified: firebird/trunk/builds/install/misc/posixLibrary.sh.in =================================================================== --- firebird/trunk/builds/install/misc/posixLibrary.sh.in 2011-06-04 02:18:06 UTC (rev 53109) +++ firebird/trunk/builds/install/misc/posixLibrary.sh.in 2011-06-04 02:18:55 UTC (rev 53110) @@ -858,4 +858,3 @@ export InteractiveInstall fi } - Modified: firebird/trunk/src/burp/restore.epp =================================================================== --- firebird/trunk/src/burp/restore.epp 2011-06-04 02:18:06 UTC (rev 53109) +++ firebird/trunk/src/burp/restore.epp 2011-06-04 02:18:55 UTC (rev 53110) @@ -10339,15 +10339,15 @@ general_on_error(); } -const FixGenerator genToFix[] = +static const FixGenerator genToFix[] = { - { "RDB$CONSTRAINT_NAME", "RDB$RELATION_CONSTRAINTS", "RDB$CONSTRAINT_NAME", "INTEG_" }, - { "RDB$FIELD_NAME", "RDB$FIELDS", "RDB$FIELD_NAME", "RDB$" }, - { "RDB$INDEX_NAME", "RDB$INDICES", "RDB$INDEX_NAME", "RDB$" }, - { "RDB$INDEX_NAME", "RDB$INDICES", "RDB$INDEX_NAME", "RDB$PRIMARY" }, - { "RDB$INDEX_NAME", "RDB$INDICES", "RDB$INDEX_NAME", "RDB$FOREIGN" }, - { "RDB$TRIGGER_NAME", "RDB$TRIGGERS", "RDB$TRIGGER_NAME", "CHECK_" }, -// "RDB$BACKUP_HISTORY" // unused ??? + { "RDB$CONSTRAINT_NAME", "RDB$RELATION_CONSTRAINTS", "RDB$CONSTRAINT_NAME", "INTEG_" }, + { "RDB$FIELD_NAME", "RDB$FIELDS", "RDB$FIELD_NAME", "RDB$" }, + { "RDB$INDEX_NAME", "RDB$INDICES", "RDB$INDEX_NAME", "RDB$" }, + { "RDB$INDEX_NAME", "RDB$INDICES", "RDB$INDEX_NAME", "RDB$PRIMARY" }, + { "RDB$INDEX_NAME", "RDB$INDICES", "RDB$INDEX_NAME", "RDB$FOREIGN" }, + { "RDB$TRIGGER_NAME", "RDB$TRIGGERS", "RDB$TRIGGER_NAME", "CHECK_" }, + ///"RDB$BACKUP_HISTORY" // unused ??? { "RDB$GENERATOR_NAME", "RDB$GENERATORS", "RDB$GENERATOR_NAME", "RDB$" }, { NULL, NULL, NULL, NULL } }; Modified: firebird/trunk/src/common/fb_exception.cpp =================================================================== --- firebird/trunk/src/common/fb_exception.cpp 2011-06-04 02:18:06 UTC (rev 53109) +++ firebird/trunk/src/common/fb_exception.cpp 2011-06-04 02:18:55 UTC (rev 53110) @@ -1,7 +1,5 @@ #include "firebird.h" - #include "firebird/Provider.h" - #include <string.h> #include <errno.h> #include <stdarg.h> Modified: firebird/trunk/src/jrd/dfw.epp =================================================================== --- firebird/trunk/src/jrd/dfw.epp 2011-06-04 02:18:06 UTC (rev 53109) +++ firebird/trunk/src/jrd/dfw.epp 2011-06-04 02:18:55 UTC (rev 53110) @@ -4038,12 +4038,11 @@ } relation = MET_lookup_relation_id(tdbb, work->dfw_id, false); - if (!relation) { + if (!relation) return false; - } - check_dependencies(tdbb, work->dfw_name.c_str(), NULL, NULL, - relation->isView() ? obj_view : obj_relation, transaction); + check_dependencies(tdbb, work->dfw_name.c_str(), NULL, NULL, + (relation->isView() ? obj_view : obj_relation), transaction); return true; case 2: @@ -4262,7 +4261,7 @@ if ( (relation = MET_lookup_relation_id(tdbb, work->dfw_id, false)) ) { check_dependencies(tdbb, relation->rel_name.c_str(), work->dfw_name.c_str(), NULL, - relation->isView() ? obj_view : obj_relation, + (relation->isView() ? obj_view : obj_relation), transaction); } Modified: firebird/trunk/src/jrd/dpm.epp =================================================================== --- firebird/trunk/src/jrd/dpm.epp 2011-06-04 02:18:06 UTC (rev 53109) +++ firebird/trunk/src/jrd/dpm.epp 2011-06-04 02:18:55 UTC (rev 53110) @@ -1273,9 +1273,8 @@ *ptr += val; } - if (transaction) { + if (transaction) transaction->tra_flags |= TRA_write; - } } const SINT64 value = *ptr; Modified: firebird/trunk/src/jrd/extds/InternalDS.cpp =================================================================== --- firebird/trunk/src/jrd/extds/InternalDS.cpp 2011-06-04 02:18:06 UTC (rev 53109) +++ firebird/trunk/src/jrd/extds/InternalDS.cpp 2011-06-04 02:18:55 UTC (rev 53110) @@ -264,9 +264,8 @@ { fb_assert(!m_transaction); - if (m_scope == traCommon && m_IntConnection.isCurrent()) { + if (m_scope == traCommon && m_IntConnection.isCurrent()) m_transaction = tdbb->getTransaction()->getInterface(); - } else { JAttachment* att = m_IntConnection.getJrdAtt(); Modified: firebird/trunk/src/jrd/flu.cpp =================================================================== --- firebird/trunk/src/jrd/flu.cpp 2011-06-04 02:18:06 UTC (rev 53109) +++ firebird/trunk/src/jrd/flu.cpp 2011-06-04 02:18:55 UTC (rev 53110) @@ -241,7 +241,7 @@ // Search for module name in UdfAccess restricted // paths list PathUtils::splitLastComponent(path, relative, fixedModule); - if (path.length() == 0 && PathUtils::isRelative(fixedModule)) + if (path.isEmpty() && PathUtils::isRelative(fixedModule)) { path = fixedModule; if (! iUdfDirectoryList().expandFileName(fixedModule, path)) Modified: firebird/trunk/src/jrd/flu.h =================================================================== --- firebird/trunk/src/jrd/flu.h 2011-06-04 02:18:06 UTC (rev 53109) +++ firebird/trunk/src/jrd/flu.h 2011-06-04 02:18:55 UTC (rev 53110) @@ -48,7 +48,7 @@ ModuleLoader::Module* handle; Firebird::PathName originalName, loadName; - void *findSymbol(const Firebird::string& name) + void* findSymbol(const Firebird::string& name) { if (! handle) { @@ -62,7 +62,8 @@ const Firebird::PathName& on, const Firebird::PathName& ln) : handle(h), - originalName(p, on), loadName(p, ln) + originalName(p, on), + loadName(p, ln) { } ~InternalModule(); Modified: firebird/trunk/src/jrd/met.epp =================================================================== --- firebird/trunk/src/jrd/met.epp 2011-06-04 02:18:06 UTC (rev 53109) +++ firebird/trunk/src/jrd/met.epp 2011-06-04 02:18:55 UTC (rev 53110) @@ -2487,7 +2487,7 @@ } relation->rel_flags |= get_rel_flags_from_FLAGS(X.RDB$FLAGS); - + if (!X.RDB$RELATION_TYPE.NULL) { relation->rel_flags |= MET_get_rel_flags_from_TYPE(X.RDB$RELATION_TYPE); @@ -2571,7 +2571,7 @@ } relation->rel_flags |= get_rel_flags_from_FLAGS(X.RDB$FLAGS); - + if (!X.RDB$RELATION_TYPE.NULL) { relation->rel_flags |= MET_get_rel_flags_from_TYPE(X.RDB$RELATION_TYPE); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-06-04 03:17:41
|
Revision: 53111 http://firebird.svn.sourceforge.net/firebird/?rev=53111&view=rev Author: firebirds Date: 2011-06-04 03:17:34 +0000 (Sat, 04 Jun 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-06-04 02:18:55 UTC (rev 53110) +++ firebird/trunk/ChangeLog 2011-06-04 03:17:34 UTC (rev 53111) @@ -1,3 +1,54 @@ + 2011-06-04 02:18 asfernandes + M builds/install/misc/posixLibrary.sh.in + M src/burp/restore.epp + M src/common/fb_exception.cpp + M src/jrd/dfw.epp + M src/jrd/dpm.epp + M src/jrd/extds/InternalDS.cpp + M src/jrd/flu.cpp + M src/jrd/flu.h + M src/jrd/met.epp +Misc. + + 2011-06-04 02:18 asfernandes + M src/jrd/ExtEngineManager.cpp +Fix for external database/DDL trigger. + + 2011-06-03 19:12 asfernandes + M src/common/IntlUtil.cpp + M src/common/IntlUtil.h +Fixed CORE-3416 - Inserting K?\195?\164se into a CHARACTER SET ASCII column succeeds. + + 2011-06-03 17:39 asfernandes + M src/jrd/met.epp +Fix problem with database triggers. + + 2011-06-03 17:08 asfernandes + M src/jrd/SysFunction.cpp +Fixed CORE-3479 - ASCII_VAL raises error instead of return 0 for empty strings. + + 2011-06-03 15:29 alexpeshkoff + M src/jrd/ExtEngineManager.cpp + M src/jrd/extds/InternalDS.cpp + M src/jrd/jrd.cpp + M src/jrd/tra.cpp + M src/jrd/tra.h +Fixed segfault in execute statement, reported by Dmitry privately + + 2011-06-03 14:19 asfernandes + M src/common/IntlUtil.cpp + M src/common/IntlUtil.h + M src/jrd/jrd.cpp +Fixed CORE-3511 - Unquoted role names with non-ASCII characters passed in DPB are upper-cased wrongly. + + 2011-06-03 14:09 alexpeshkoff + M src/jrd/trace/TraceLog.cpp +Fixed CORE-3512: Server hangs when trace is running (big thanks to Vlad) + + 2011-06-03 08:25 hvlad + M src/jrd/cch.cpp +Fixed mistake noted by Claudio + 2011-06-02 15:57 asfernandes M src/jrd/tra.h Warning. Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-06-04 02:18:55 UTC (rev 53110) +++ firebird/trunk/src/jrd/build_no.h 2011-06-04 03:17:34 UTC (rev 53111) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29424 + FORMAL BUILD NUMBER:29433 */ -#define PRODUCT_VER_STRING "3.0.0.29424" -#define FILE_VER_STRING "WI-T3.0.0.29424" -#define LICENSE_VER_STRING "WI-T3.0.0.29424" -#define FILE_VER_NUMBER 3, 0, 0, 29424 +#define PRODUCT_VER_STRING "3.0.0.29433" +#define FILE_VER_STRING "WI-T3.0.0.29433" +#define LICENSE_VER_STRING "WI-T3.0.0.29433" +#define FILE_VER_NUMBER 3, 0, 0, 29433 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29424" +#define FB_BUILD_NO "29433" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-06-04 02:18:55 UTC (rev 53110) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-06-04 03:17:34 UTC (rev 53111) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29424 +BuildNum=29433 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-06-06 03:15:27
|
Revision: 53122 http://firebird.svn.sourceforge.net/firebird/?rev=53122&view=rev Author: firebirds Date: 2011-06-06 03:15:20 +0000 (Mon, 06 Jun 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-06-06 02:58:08 UTC (rev 53121) +++ firebird/trunk/ChangeLog 2011-06-06 03:15:20 UTC (rev 53122) @@ -1,3 +1,18 @@ + 2011-06-06 02:58 asfernandes + M src/jrd/cvt.cpp +Fixed CORE-3373 - It is possible to store string with lenght 31 chars into column varchar(25). + + 2011-06-05 22:50 hvlad + M src/remote/client/interface.cpp +Windows trusted auth didn't worked + + 2011-06-05 08:15 hvlad + M src/jrd/dpm.epp + M src/jrd/dpm_proto.h + M src/jrd/idx.cpp + M src/jrd/vio.cpp +Fixed bug CORE-3515 : Index corruption. Validation put "missing entries" message into firebird.log + 2011-06-04 02:18 asfernandes M builds/install/misc/posixLibrary.sh.in M src/burp/restore.epp Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-06-06 02:58:08 UTC (rev 53121) +++ firebird/trunk/src/jrd/build_no.h 2011-06-06 03:15:20 UTC (rev 53122) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29433 + FORMAL BUILD NUMBER:29436 */ -#define PRODUCT_VER_STRING "3.0.0.29433" -#define FILE_VER_STRING "WI-T3.0.0.29433" -#define LICENSE_VER_STRING "WI-T3.0.0.29433" -#define FILE_VER_NUMBER 3, 0, 0, 29433 +#define PRODUCT_VER_STRING "3.0.0.29436" +#define FILE_VER_STRING "WI-T3.0.0.29436" +#define LICENSE_VER_STRING "WI-T3.0.0.29436" +#define FILE_VER_NUMBER 3, 0, 0, 29436 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29433" +#define FB_BUILD_NO "29436" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-06-06 02:58:08 UTC (rev 53121) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-06-06 03:15:20 UTC (rev 53122) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29433 +BuildNum=29436 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-06-08 03:16:58
|
Revision: 53132 http://firebird.svn.sourceforge.net/firebird/?rev=53132&view=rev Author: firebirds Date: 2011-06-08 03:16:51 +0000 (Wed, 08 Jun 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-06-08 01:55:13 UTC (rev 53131) +++ firebird/trunk/ChangeLog 2011-06-08 03:16:51 UTC (rev 53132) @@ -1,3 +1,14 @@ + 2011-06-08 01:55 asfernandes + M src/jrd/dpm.epp + M src/jrd/vio.cpp + M src/remote/client/interface.cpp +Misc. + + 2011-06-07 12:59 hvlad + M src/common/Auth.cpp + M src/remote/server/server.cpp +Make TA work with 2.1 clients and not crash. Thanks to Alex. + 2011-06-06 02:58 asfernandes M src/jrd/cvt.cpp Fixed CORE-3373 - It is possible to store string with lenght 31 chars into column varchar(25). Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-06-08 01:55:13 UTC (rev 53131) +++ firebird/trunk/src/jrd/build_no.h 2011-06-08 03:16:51 UTC (rev 53132) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29436 + FORMAL BUILD NUMBER:29438 */ -#define PRODUCT_VER_STRING "3.0.0.29436" -#define FILE_VER_STRING "WI-T3.0.0.29436" -#define LICENSE_VER_STRING "WI-T3.0.0.29436" -#define FILE_VER_NUMBER 3, 0, 0, 29436 +#define PRODUCT_VER_STRING "3.0.0.29438" +#define FILE_VER_STRING "WI-T3.0.0.29438" +#define LICENSE_VER_STRING "WI-T3.0.0.29438" +#define FILE_VER_NUMBER 3, 0, 0, 29438 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29436" +#define FB_BUILD_NO "29438" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-06-08 01:55:13 UTC (rev 53131) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-06-08 03:16:51 UTC (rev 53132) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29436 +BuildNum=29438 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ale...@us...> - 2011-06-10 12:54:00
|
Revision: 53147 http://firebird.svn.sourceforge.net/firebird/?rev=53147&view=rev Author: alexpeshkoff Date: 2011-06-10 12:53:51 +0000 (Fri, 10 Jun 2011) Log Message: ----------- Used upgradeInterface() in a number of places. Fixed memory leak when unloading module, related with upgraded interfaces. Fixed timer on posix to be high resolution. Better diagnostic in services. Modified Paths: -------------- firebird/trunk/builds/posix/make.defaults firebird/trunk/configure.in firebird/trunk/lang_helpers/gds_codes.ftn firebird/trunk/lang_helpers/gds_codes.pas firebird/trunk/src/auth/AuthDbg.cpp firebird/trunk/src/auth/SecurityDatabase/LegacyManagement.epp firebird/trunk/src/auth/SecurityDatabase/LegacyServer.cpp firebird/trunk/src/auth/trusted/AuthSspi.cpp firebird/trunk/src/common/classes/GetPlugins.h firebird/trunk/src/common/classes/ImplementHelper.h firebird/trunk/src/common/security.cpp firebird/trunk/src/common/utils.cpp firebird/trunk/src/gpre/boot/gpre_meta_boot.cpp firebird/trunk/src/include/firebird/ExternalEngine.h firebird/trunk/src/include/firebird/Interface.h firebird/trunk/src/include/firebird/Plugin.h firebird/trunk/src/include/firebird/Provider.h firebird/trunk/src/include/gen/codetext.h firebird/trunk/src/include/gen/iberror.h firebird/trunk/src/include/gen/msgs.h firebird/trunk/src/include/gen/sql_code.h firebird/trunk/src/include/gen/sql_state.h firebird/trunk/src/jrd/ExtEngineManager.cpp firebird/trunk/src/jrd/UserManagement.cpp firebird/trunk/src/jrd/jrd.cpp firebird/trunk/src/jrd/svc.cpp firebird/trunk/src/jrd/trace/TraceManager.cpp firebird/trunk/src/msgs/facilities2.sql firebird/trunk/src/msgs/messages2.sql firebird/trunk/src/msgs/system_errors2.sql firebird/trunk/src/plugins/udr_engine/UdrEngine.cpp firebird/trunk/src/remote/client/interface.cpp firebird/trunk/src/remote/server/server.cpp firebird/trunk/src/utilities/ntrace/TracePluginImpl.cpp firebird/trunk/src/utilities/ntrace/traceplugin.cpp firebird/trunk/src/yvalve/MasterImplementation.cpp firebird/trunk/src/yvalve/MasterImplementation.h firebird/trunk/src/yvalve/PluginManager.cpp firebird/trunk/src/yvalve/PluginManager.h firebird/trunk/src/yvalve/YObjects.h firebird/trunk/src/yvalve/why.cpp Added Paths: ----------- firebird/trunk/src/common/classes/ImplementHelper.cpp Modified: firebird/trunk/builds/posix/make.defaults =================================================================== --- firebird/trunk/builds/posix/make.defaults 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/builds/posix/make.defaults 2011-06-10 12:53:51 UTC (rev 53147) @@ -292,7 +292,7 @@ # Per-library link rules LINK_UDF = $(LIB_LINK) $(LIB_LINK_OPTIONS) $(call LIB_LINK_SONAME,$(1).$(SHRLIB_EXT)) $(UNDEF_FLAGS)\ - $(call LIB_LINK_RPATH,lib) -lm + $(call LIB_LINK_RPATH,lib) $(SO_LINK_LIBS) LINK_UDF_LIBS = $(THR_LIBS) -L$(LIB) -lib_util LINK_IB_UTIL = $(LIB_LINK) $(LINK_IBUTIL_SYMBOLS) $(LIB_LINK_OPTIONS) $(UNDEF_FLAGS)\ Modified: firebird/trunk/configure.in =================================================================== --- firebird/trunk/configure.in 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/configure.in 2011-06-10 12:53:51 UTC (rev 53147) @@ -793,6 +793,8 @@ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <atomic_ops.h>]], [[AO_T x; AO_compare_and_swap_full(&x, 0, 0); return 0;]])], AC_DEFINE(HAVE_AO_COMPARE_AND_SWAP_FULL, 1, [Define this if AO_compare_and_swap_full() is defined in atomic_ops.h])) +AC_SEARCH_LIBS(clock_gettime, rt) +AC_CHECK_FUNCS(clock_gettime) dnl Checks for pthread functions AC_CHECK_FUNCS(pthread_mutexattr_setprotocol) Modified: firebird/trunk/lang_helpers/gds_codes.ftn =================================================================== --- firebird/trunk/lang_helpers/gds_codes.ftn 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/lang_helpers/gds_codes.ftn 2011-06-10 12:53:51 UTC (rev 53147) @@ -1460,6 +1460,8 @@ PARAMETER (GDS__invalid_boolean_usage = 335545023) INTEGER*4 GDS__sysf_argscant_both_be_zero PARAMETER (GDS__sysf_argscant_both_be_zero = 335545024) + INTEGER*4 GDS__spb_no_id + PARAMETER (GDS__spb_no_id = 335545025) INTEGER*4 GDS__gfix_db_name PARAMETER (GDS__gfix_db_name = 335740929) INTEGER*4 GDS__gfix_invalid_sw Modified: firebird/trunk/lang_helpers/gds_codes.pas =================================================================== --- firebird/trunk/lang_helpers/gds_codes.pas 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/lang_helpers/gds_codes.pas 2011-06-10 12:53:51 UTC (rev 53147) @@ -737,6 +737,7 @@ gds_cannot_copy_stmt = 335545022; gds_invalid_boolean_usage = 335545023; gds_sysf_argscant_both_be_zero = 335545024; + gds_spb_no_id = 335545025; gds_gfix_db_name = 335740929; gds_gfix_invalid_sw = 335740930; gds_gfix_incmp_sw = 335740932; Modified: firebird/trunk/src/auth/AuthDbg.cpp =================================================================== --- firebird/trunk/src/auth/AuthDbg.cpp 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/auth/AuthDbg.cpp 2011-06-10 12:53:51 UTC (rev 53147) @@ -33,6 +33,8 @@ //#define AUTH_VERBOSE +static Firebird::MakeUpgradeInfo<> upInfo; + // register plugin static Firebird::SimpleFactory<Auth::DebugClient> clientFactory; static Firebird::SimpleFactory<Auth::DebugServer> serverFactory; @@ -60,6 +62,7 @@ { try { + Firebird::MasterInterfacePtr()->upgradeInterface(writerInterface, FB_AUTH_WRITER_VERSION, upInfo); str.erase(); Firebird::ClumpletReader rdr(isService ? Firebird::ClumpletReader::spbList : @@ -88,6 +91,7 @@ #ifdef AUTH_VERBOSE fprintf(stderr, "DebugServerInstance::contAuthentication: %.*s\n", size, data); #endif + Firebird::MasterInterfacePtr()->upgradeInterface(writerInterface, FB_AUTH_WRITER_VERSION, upInfo); writerInterface->add(Firebird::string((const char*) data, size).c_str(), "DEBUG", ""); return AUTH_SUCCESS; } @@ -126,6 +130,7 @@ { try { + Firebird::MasterInterfacePtr()->upgradeInterface(dpb, FB_AUTH_DPB_READER_VERSION, upInfo); str = "HAND"; if (dpb) { Modified: firebird/trunk/src/auth/SecurityDatabase/LegacyManagement.epp =================================================================== --- firebird/trunk/src/auth/SecurityDatabase/LegacyManagement.epp 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/auth/SecurityDatabase/LegacyManagement.epp 2011-06-10 12:53:51 UTC (rev 53147) @@ -42,6 +42,8 @@ #include "../common/classes/ClumpletWriter.h" #include "firebird/Plugin.h" +static Firebird::MakeUpgradeInfo<> upInfo; + // Here we use version-independent symbolic link (or copy) of actual database DATABASE database = STATIC FILENAME "security.fdb"; @@ -124,6 +126,8 @@ { try { + Firebird::MasterInterfacePtr()->upgradeInterface(logonInfo, FB_AUTH_LOGON_INFO_VERSION, upInfo); + st->init(); if (secDbKey == INIT_KEY) @@ -310,6 +314,8 @@ try { + Firebird::MasterInterfacePtr()->upgradeInterface(user, FB_AUTH_USER_VERSION, upInfo); + ISC_STATUS_ARRAY isc_status; fb_utils::init_status(isc_status); st->init(); @@ -668,12 +674,11 @@ // register plugin static Firebird::SimpleFactory<Auth::SecurityDatabaseManagement> factory; -static Firebird::UnloadDetector unloadDetector; extern "C" void FB_PLUGIN_ENTRY_POINT(Firebird::IMaster* master) { Firebird::PluginManagerInterfacePtr pi(master); pi->registerPluginFactory(Firebird::PluginType::AuthUserManagement, "Legacy_Auth", &factory); - pi->registerModule(&unloadDetector); + pi->registerModule(&Firebird::myModule); } Modified: firebird/trunk/src/auth/SecurityDatabase/LegacyServer.cpp =================================================================== --- firebird/trunk/src/auth/SecurityDatabase/LegacyServer.cpp 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/auth/SecurityDatabase/LegacyServer.cpp 2011-06-10 12:53:51 UTC (rev 53147) @@ -49,6 +49,8 @@ namespace { +MakeUpgradeInfo<> upInfo; + // BLR to search database for user name record const UCHAR PWD_REQUEST[] = @@ -367,6 +369,7 @@ } } + MasterInterfacePtr()->upgradeInterface(authBlock, FB_AUTH_WRITER_VERSION, upInfo); authBlock->add(login.c_str(), "SecDB", secureDbName); return AUTH_SUCCESS; } @@ -517,7 +520,7 @@ ClumpletReader rdr(isService ? ClumpletReader::spbList : ClumpletReader::dpbList, dpb, dpbSize); Result rc = instance->verify(writerInterface, rdr); - Firebird::TimerInterfacePtr()->start(instance, 10 * 1000 * 1000); + TimerInterfacePtr()->start(instance, 10 * 1000 * 1000); return rc; } catch (const Firebird::Exception& ex) Modified: firebird/trunk/src/auth/trusted/AuthSspi.cpp =================================================================== --- firebird/trunk/src/auth/trusted/AuthSspi.cpp 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/auth/trusted/AuthSspi.cpp 2011-06-10 12:53:51 UTC (rev 53147) @@ -69,6 +69,8 @@ *data = name; *dataSize = strlen(name); } + + MakeUpgradeInfo<> upInfo; } namespace Auth { @@ -380,6 +382,7 @@ bool wheel = false; string login; sspi.getLogin(login, wheel); + MasterInterfacePtr()->upgradeInterface(writerInterface, FB_AUTH_WRITER_VERSION, upInfo); writerInterface->add(login.c_str(), "WIN_SSPI", ""); if (wheel) { @@ -417,6 +420,8 @@ if (dpb) { + MasterInterfacePtr()->upgradeInterface(dpb, FB_AUTH_DPB_READER_VERSION, upInfo); + UCHAR tag = isService ? isc_spb_trusted_role : isc_dpb_trusted_role; while (dpb->find(tag)) { Modified: firebird/trunk/src/common/classes/GetPlugins.h =================================================================== --- firebird/trunk/src/common/classes/GetPlugins.h 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/common/classes/GetPlugins.h 2011-06-10 12:53:51 UTC (rev 53147) @@ -34,36 +34,27 @@ namespace Firebird { -// Default replacement for missing virtual functions -class DefaultMissingEntrypoint -{ -public: - virtual void FB_CARG noEntrypoint() - { - Arg::Gds(isc_wish_list).raise(); - } -}; - // Template to help with loop in the set of plugins -template <typename P, typename M = DefaultMissingEntrypoint> +template <typename P> class GetPlugins { public: - GetPlugins(unsigned int interfaceType, unsigned int desiredVersion, const char* namesList = NULL) - : masterInterface(), pluginInterface(masterInterface), missing(), + GetPlugins(unsigned int interfaceType, unsigned int desiredVersion, + UpgradeInfo* ui, const char* namesList = NULL) + : masterInterface(), pluginInterface(masterInterface), pluginSet(pluginInterface->getPlugins(interfaceType, namesList ? namesList : Config::getPlugins(interfaceType), - desiredVersion, &missing, NULL)), + desiredVersion, ui, NULL)), currentPlugin(NULL) { pluginSet->release(); getPlugin(); } - GetPlugins(unsigned int interfaceType, unsigned int desiredVersion, + GetPlugins(unsigned int interfaceType, unsigned int desiredVersion, UpgradeInfo* ui, Config* knownConfig, const char* namesList = NULL) - : masterInterface(), pluginInterface(masterInterface), missing(), + : masterInterface(), pluginInterface(masterInterface), pluginSet(pluginInterface->getPlugins(interfaceType, namesList ? namesList : Config::getPlugins(interfaceType), - desiredVersion, &missing, new FirebirdConf(knownConfig))), + desiredVersion, ui, new FirebirdConf(knownConfig))), currentPlugin(NULL) { pluginSet->release(); @@ -124,7 +115,6 @@ private: MasterInterfacePtr masterInterface; PluginManagerInterfacePtr pluginInterface; - M missing; RefPtr<IPluginSet> pluginSet; P* currentPlugin; Added: firebird/trunk/src/common/classes/ImplementHelper.cpp =================================================================== --- firebird/trunk/src/common/classes/ImplementHelper.cpp (rev 0) +++ firebird/trunk/src/common/classes/ImplementHelper.cpp 2011-06-10 12:53:51 UTC (rev 53147) @@ -0,0 +1,34 @@ +/* + * PROGRAM: Firebird interface. + * MODULE: ImplementHelper.cpp + * DESCRIPTION: Tools to help create interfaces. + * + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl. + * + * Software distributed under the License is distributed AS IS, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. + * See the License for the specific language governing rights + * and limitations under the License. + * + * The Original Code was created by Alex Peshkov + * for the Firebird Open Source RDBMS project. + * + * Copyright (c) 2010 Alex Peshkov <peshkoff at mail.ru> + * and all contributors signed below. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + * + * + */ + +#include "../common/classes/ImplementHelper.h" + +namespace Firebird +{ + UnloadDetector myModule; +} Property changes on: firebird/trunk/src/common/classes/ImplementHelper.cpp ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Modified: firebird/trunk/src/common/classes/ImplementHelper.h =================================================================== --- firebird/trunk/src/common/classes/ImplementHelper.h 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/common/classes/ImplementHelper.h 2011-06-10 12:53:51 UTC (rev 53147) @@ -71,6 +71,8 @@ return V; } + IPluginModule* getModule(); + private: VersionedIface(const VersionedIface&); VersionedIface& operator=(const VersionedIface&); @@ -249,7 +251,10 @@ if (flagOsUnload) { PluginManagerInterfacePtr pi; - pi->unregisterModule(this); + if (pi) + { + pi->unregisterModule(this); + } doClean(); } @@ -282,8 +287,46 @@ }; typedef GlobalPtr<UnloadDetectorHelper, InstanceControl::PRIORITY_DETECT_UNLOAD> UnloadDetector; +extern UnloadDetector myModule; +template <class C, int V> IPluginModule* VersionedIface<C, V>::getModule() +{ + return &myModule; +} + +// Default replacement for missing virtual functions +class DefaultMissingEntrypoint +{ +public: + virtual void FB_CARG noEntrypoint() + { + Arg::Gds(isc_wish_list).raise(); + } +}; + +// Helps to create update information +template <typename M = DefaultMissingEntrypoint> +class MakeUpgradeInfo +{ +public: + MakeUpgradeInfo() + { + ui.missingFunctionClass = &missing; + ui.clientModule = &myModule; + } + + operator UpgradeInfo*() + { + return &ui; + } + +private: + M missing; + struct UpgradeInfo ui; +}; + + class InternalMessageBuffer : public FbMessage { public: Modified: firebird/trunk/src/common/security.cpp =================================================================== --- firebird/trunk/src/common/security.cpp 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/common/security.cpp 2011-06-10 12:53:51 UTC (rev 53147) @@ -36,12 +36,14 @@ (Arg::Gds(isc_random) << "Missing user management plugin").raise(); } +MakeUpgradeInfo<> ui; + } // anonymous namespace namespace Auth { Get::Get(Config* firebirdConf) - : GetPlugins<Auth::IManagement>(PluginType::AuthUserManagement, FB_AUTH_MANAGE_VERSION, firebirdConf) + : GetPlugins<Auth::IManagement>(PluginType::AuthUserManagement, FB_AUTH_MANAGE_VERSION, ui, firebirdConf) { if (!hasData()) { Modified: firebird/trunk/src/common/utils.cpp =================================================================== --- firebird/trunk/src/common/utils.cpp 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/common/utils.cpp 2011-06-10 12:53:51 UTC (rev 53147) @@ -807,7 +807,7 @@ return counter.QuadPart; #elif defined(HAVE_CLOCK_GETTIME) - // Use high-resultion clock + // Use high-resolution clock struct timespec tp; if (clock_gettime(CLOCK_REALTIME, &tp) != 0) return 0; Modified: firebird/trunk/src/gpre/boot/gpre_meta_boot.cpp =================================================================== --- firebird/trunk/src/gpre/boot/gpre_meta_boot.cpp 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/gpre/boot/gpre_meta_boot.cpp 2011-06-10 12:53:51 UTC (rev 53147) @@ -683,6 +683,11 @@ return FB_MASTER_VERSION; } + virtual IPluginModule* FB_CARG getModule() + { + return NULL; + } + virtual IStatus* FB_CARG getStatus() { fb_assert(false); @@ -697,12 +702,12 @@ virtual IPluginManager* FB_CARG getPluginManager() { - fb_assert(false); + //fb_assert(false); return NULL; } virtual int FB_CARG upgradeInterface(IVersioned* /*toUpgrade*/, int /*desiredVersion*/, - void* /*missingFunctionClass*/) + struct UpgradeInfo* /*upInfo*/) { fb_assert(false); return 0; Modified: firebird/trunk/src/include/firebird/ExternalEngine.h =================================================================== --- firebird/trunk/src/include/firebird/ExternalEngine.h 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/include/firebird/ExternalEngine.h 2011-06-10 12:53:51 UTC (rev 53147) @@ -33,6 +33,7 @@ #include "./Plugin.h" #include "./Provider.h" +#include "firebird.h" //// FIXME: namespace Firebird { Modified: firebird/trunk/src/include/firebird/Interface.h =================================================================== --- firebird/trunk/src/include/firebird/Interface.h 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/include/firebird/Interface.h 2011-06-10 12:53:51 UTC (rev 53147) @@ -39,14 +39,18 @@ namespace Firebird { +// Forward declaration - used to identify client and provider of upgraded interface +class IPluginModule; + // Versioned interface - base for all FB interfaces class IVersioned { public: virtual int FB_CARG getVersion() = 0; + virtual IPluginModule* getModule() = 0; }; // If this is changed, types of all interfaces must be changed -#define FB_VERSIONED_VERSION 1 +#define FB_VERSIONED_VERSION 2 // Reference counted interface - base for refCounted FB interfaces class IRefCounted : public IVersioned @@ -89,6 +93,12 @@ class ITransaction; class IDtc; +struct UpgradeInfo +{ + void* missingFunctionClass; + IPluginModule* clientModule; +}; + // Master interface is used to access almost all other interfaces. class IMaster : public IVersioned { @@ -96,7 +106,8 @@ virtual IStatus* FB_CARG getStatus() = 0; virtual IProvider* FB_CARG getDispatcher() = 0; virtual IPluginManager* FB_CARG getPluginManager() = 0; - virtual int FB_CARG upgradeInterface(IVersioned* toUpgrade, int desiredVersion, void* missingFunctionClass) = 0; + virtual int FB_CARG upgradeInterface(IVersioned* toUpgrade, int desiredVersion, + struct UpgradeInfo* upgradeInfo) = 0; virtual const char* FB_CARG circularAlloc(const char* s, size_t len, intptr_t thr) = 0; virtual ITimerControl* FB_CARG getTimerControl() = 0; virtual IDtc* FB_CARG getDtc() = 0; Modified: firebird/trunk/src/include/firebird/Plugin.h =================================================================== --- firebird/trunk/src/include/firebird/Plugin.h 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/include/firebird/Plugin.h 2011-06-10 12:53:51 UTC (rev 53147) @@ -187,7 +187,7 @@ // If caller already has an interface for firebird.conf, it may be passed here // If parameter is missing, plugins will get access to default (non database specific) config virtual IPluginSet* FB_CARG getPlugins(unsigned int interfaceType, const char* namesList, - int desiredVersion, void* missingFunctionClass, + int desiredVersion, UpgradeInfo* ui, IFirebirdConf* firebirdConf) = 0; // Get generic config interface for given file virtual IConfig* FB_CARG getConfig(const char* filename) = 0; Modified: firebird/trunk/src/include/firebird/Provider.h =================================================================== --- firebird/trunk/src/include/firebird/Provider.h 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/include/firebird/Provider.h 2011-06-10 12:53:51 UTC (rev 53147) @@ -29,7 +29,6 @@ #ifndef FB_PROVIDER_INTERFACE #define FB_PROVIDER_INTERFACE -#include "firebird.h" //// FIXME: #include "./Plugin.h" namespace Firebird { Modified: firebird/trunk/src/include/gen/codetext.h =================================================================== --- firebird/trunk/src/include/gen/codetext.h 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/include/gen/codetext.h 2011-06-10 12:53:51 UTC (rev 53147) @@ -726,6 +726,7 @@ {"cannot_copy_stmt", 335545022}, {"invalid_boolean_usage", 335545023}, {"sysf_argscant_both_be_zero", 335545024}, + {"spb_no_id", 335545025}, {"gfix_db_name", 335740929}, {"gfix_invalid_sw", 335740930}, {"gfix_incmp_sw", 335740932}, Modified: firebird/trunk/src/include/gen/iberror.h =================================================================== --- firebird/trunk/src/include/gen/iberror.h 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/include/gen/iberror.h 2011-06-10 12:53:51 UTC (rev 53147) @@ -760,6 +760,7 @@ const ISC_STATUS isc_cannot_copy_stmt = 335545022L; const ISC_STATUS isc_invalid_boolean_usage = 335545023L; const ISC_STATUS isc_sysf_argscant_both_be_zero = 335545024L; +const ISC_STATUS isc_spb_no_id = 335545025L; const ISC_STATUS isc_gfix_db_name = 335740929L; const ISC_STATUS isc_gfix_invalid_sw = 335740930L; const ISC_STATUS isc_gfix_incmp_sw = 335740932L; @@ -1179,7 +1180,7 @@ const ISC_STATUS isc_trace_switch_param_miss = 337182758L; const ISC_STATUS isc_trace_param_act_notcompat = 337182759L; const ISC_STATUS isc_trace_mandatory_switch_miss = 337182760L; -const ISC_STATUS isc_err_max = 1123; +const ISC_STATUS isc_err_max = 1124; #else /* c definitions */ @@ -1909,6 +1910,7 @@ #define isc_cannot_copy_stmt 335545022L #define isc_invalid_boolean_usage 335545023L #define isc_sysf_argscant_both_be_zero 335545024L +#define isc_spb_no_id 335545025L #define isc_gfix_db_name 335740929L #define isc_gfix_invalid_sw 335740930L #define isc_gfix_incmp_sw 335740932L @@ -2328,7 +2330,7 @@ #define isc_trace_switch_param_miss 337182758L #define isc_trace_param_act_notcompat 337182759L #define isc_trace_mandatory_switch_miss 337182760L -#define isc_err_max 1123 +#define isc_err_max 1124 #endif Modified: firebird/trunk/src/include/gen/msgs.h =================================================================== --- firebird/trunk/src/include/gen/msgs.h 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/include/gen/msgs.h 2011-06-10 12:53:51 UTC (rev 53147) @@ -729,6 +729,7 @@ {335545022, "Cannot copy statement @1"}, /* cannot_copy_stmt */ {335545023, "Invalid usage of boolean expression"}, /* invalid_boolean_usage */ {335545024, "Arguments for @1 cannot both be zero"}, /* sysf_argscant_both_be_zero */ + {335545025, "missing service ID in spb"}, /* spb_no_id */ {335740929, "data base file name (@1) already given"}, /* gfix_db_name */ {335740930, "invalid switch @1"}, /* gfix_invalid_sw */ {335740932, "incompatible switch combination"}, /* gfix_incmp_sw */ Modified: firebird/trunk/src/include/gen/sql_code.h =================================================================== --- firebird/trunk/src/include/gen/sql_code.h 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/include/gen/sql_code.h 2011-06-10 12:53:51 UTC (rev 53147) @@ -725,6 +725,7 @@ {335545022, -104}, /* 702 cannot_copy_stmt */ {335545023, -104}, /* 703 invalid_boolean_usage */ {335545024, -833}, /* 704 sysf_argscant_both_be_zero */ + {335545025, -901}, /* 705 spb_no_id */ {335740929, -901}, /* 1 gfix_db_name */ {335740930, -901}, /* 2 gfix_invalid_sw */ {335740932, -901}, /* 4 gfix_incmp_sw */ Modified: firebird/trunk/src/include/gen/sql_state.h =================================================================== --- firebird/trunk/src/include/gen/sql_state.h 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/include/gen/sql_state.h 2011-06-10 12:53:51 UTC (rev 53147) @@ -725,6 +725,7 @@ {335545022, "XX000"}, // 702 cannot_copy_stmt {335545023, "22000"}, // 703 invalid_boolean_usage {335545024, "42000"}, // 704 sysf_argscant_both_be_zero + {335545025, "HY000"}, // 705 spb_no_id {335740929, "00000"}, // 1 gfix_db_name {335740930, "00000"}, // 2 gfix_invalid_sw {335740932, "00000"}, // 4 gfix_incmp_sw Modified: firebird/trunk/src/jrd/ExtEngineManager.cpp =================================================================== --- firebird/trunk/src/jrd/ExtEngineManager.cpp 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/jrd/ExtEngineManager.cpp 2011-06-10 12:53:51 UTC (rev 53147) @@ -58,6 +58,7 @@ namespace Jrd { +MakeUpgradeInfo<> upInfo; template <typename T> class ExtEngineManager::ContextManager { @@ -826,7 +827,7 @@ if (!engines.get(name, engine)) { GetPlugins<ExternalEngine> engineControl(PluginType::ExternalEngine, - FB_EXTERNAL_ENGINE_VERSION, name.c_str()); + FB_EXTERNAL_ENGINE_VERSION, upInfo, name.c_str()); if (engineControl.hasData()) { Modified: firebird/trunk/src/jrd/UserManagement.cpp =================================================================== --- firebird/trunk/src/jrd/UserManagement.cpp 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/jrd/UserManagement.cpp 2011-06-10 12:53:51 UTC (rev 53147) @@ -36,6 +36,7 @@ using namespace Jrd; using namespace Firebird; +static MakeUpgradeInfo<> upInfo; const Format* UsersTableScan::getFormat(thread_db* tdbb, jrd_rel* relation) const { @@ -212,6 +213,7 @@ void UserManagement::Display::list(Auth::IUser* u) { + MasterInterfacePtr()->upgradeInterface(u, FB_AUTH_USER_VERSION, upInfo); userManagement->list(u); } Modified: firebird/trunk/src/jrd/jrd.cpp =================================================================== --- firebird/trunk/src/jrd/jrd.cpp 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/jrd/jrd.cpp 2011-06-10 12:53:51 UTC (rev 53147) @@ -296,8 +296,6 @@ } -static UnloadDetector unloadDetector; - static void shutdownBeforeUnload() { LocalStatus status; @@ -310,7 +308,7 @@ // IPluginFactory implementation IPluginBase* FB_CARG createPlugin(IPluginConfig* factoryParameter) { - if (unloadDetector->unloadStarted()) + if (myModule->unloadStarted()) { return NULL; } @@ -325,9 +323,9 @@ void registerEngine(IPluginManager* iPlugin) { - unloadDetector->setCleanup(shutdownBeforeUnload); + myModule->setCleanup(shutdownBeforeUnload); iPlugin->registerPluginFactory(PluginType::Provider, "Engine12", &engineFactory); - iPlugin->registerModule(&unloadDetector); + iPlugin->registerModule(&myModule); } } // namespace Jrd Modified: firebird/trunk/src/jrd/svc.cpp =================================================================== --- firebird/trunk/src/jrd/svc.cpp 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/jrd/svc.cpp 2011-06-10 12:53:51 UTC (rev 53147) @@ -1890,6 +1890,10 @@ ClumpletReader spb(ClumpletReader::SpbStart, spb_data, spb_length); // The name of the service is the first element of the buffer + if (spb.isEof()) + { + status_exception::raise(Arg::Gds(isc_service_att_err) << Arg::Gds(isc_spb_no_id)); + } const UCHAR svc_id = spb.getClumpTag(); const serv_entry* serv; for (serv = services; serv->serv_action; serv++) Modified: firebird/trunk/src/jrd/trace/TraceManager.cpp =================================================================== --- firebird/trunk/src/jrd/trace/TraceManager.cpp 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/jrd/trace/TraceManager.cpp 2011-06-10 12:53:51 UTC (rev 53147) @@ -64,6 +64,9 @@ return 1; } }; + + MakeUpgradeInfo<IgnoreMissing> upgradePlugin; + MakeUpgradeInfo<> upgradeFactory; } namespace Jrd { @@ -156,7 +159,7 @@ init_factories = true; factories = FB_NEW(*getDefaultMemoryPool()) TraceManager::Factories(*getDefaultMemoryPool()); - for (GetPlugins<TraceFactory, IgnoreMissing> traceItr(PluginType::Trace, FB_TRACE_PLUGIN_VERSION); + for (GetPlugins<TraceFactory> traceItr(PluginType::Trace, FB_TRACE_FACTORY_VERSION, upgradeFactory); traceItr.hasData(); traceItr.next()) { FactoryInfo info; @@ -259,6 +262,8 @@ } } + MasterInterfacePtr master; + for (FactoryInfo* info = factories->begin(); info != factories->end(); ++info) { TraceInitInfoImpl attachInfo(session, attachment, filename); @@ -267,6 +272,8 @@ if (plugin) { + master->upgradeInterface(plugin, FB_TRACE_PLUGIN_VERSION, upgradePlugin); + plugin->addRef(); SessionInfo sesInfo; sesInfo.plugin = plugin; Modified: firebird/trunk/src/msgs/facilities2.sql =================================================================== --- firebird/trunk/src/msgs/facilities2.sql 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/msgs/facilities2.sql 2011-06-10 12:53:51 UTC (rev 53147) @@ -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 (?, ?, ?, ?); -- -('2011-02-02 12:45:00', 'JRD', 0, 705) +('2011-06-10 16:23:31', 'JRD', 0, 706) ('2010-03-15 06:59:09', 'QLI', 1, 531) -- --('2008-11-28 20:27:04', 'GDEF', 2, 346) Modified: firebird/trunk/src/msgs/messages2.sql =================================================================== --- firebird/trunk/src/msgs/messages2.sql 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/msgs/messages2.sql 2011-06-10 12:53:51 UTC (rev 53147) @@ -812,6 +812,7 @@ ('cannot_copy_stmt', NULL, NULL, NULL, 0, 702, NULL, 'Cannot copy statement @1', NULL, NULL); ('invalid_boolean_usage', NULL, NULL, NULL, 0, 703, NULL, 'Invalid usage of boolean expression', NULL, NULL); ('sysf_argscant_both_be_zero', 'evlAtan2', 'SysFunction.cpp', NULL, 0, 704, NULL, 'Arguments for @1 cannot both be zero', NULL, NULL) +('spb_no_id', 'Service::start', 'svc.c', NULL, 0, 705, NULL, 'missing service ID in spb', NULL, NULL); -- QLI (NULL, NULL, NULL, NULL, 1, 0, NULL, 'expected type', NULL, NULL); (NULL, NULL, NULL, NULL, 1, 1, NULL, 'bad block type', NULL, NULL); Modified: firebird/trunk/src/msgs/system_errors2.sql =================================================================== --- firebird/trunk/src/msgs/system_errors2.sql 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/msgs/system_errors2.sql 2011-06-10 12:53:51 UTC (rev 53147) @@ -710,6 +710,7 @@ (-104, 'XX', '000', 0, 702, 'cannot_copy_stmt', NULL, NULL) (-104, '22', '000', 0, 703, 'invalid_boolean_usage', NULL, NULL) (-833, '42', '000', 0, 704, 'sysf_argscant_both_be_zero', NULL, NULL) +(-901, 'HY', '000', 0, 705, 'spb_no_id', NULL, NULL) -- GFIX (-901, '00', '000', 3, 1, 'gfix_db_name', NULL, NULL) (-901, '00', '000', 3, 2, 'gfix_invalid_sw', NULL, NULL) Modified: firebird/trunk/src/plugins/udr_engine/UdrEngine.cpp =================================================================== --- firebird/trunk/src/plugins/udr_engine/UdrEngine.cpp 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/plugins/udr_engine/UdrEngine.cpp 2011-06-10 12:53:51 UTC (rev 53147) @@ -754,13 +754,12 @@ class ExternalEngineFactoryImpl : public SimpleFactory<Engine> { } factory; -static Firebird::UnloadDetector unloadDetector; extern "C" void FB_PLUGIN_ENTRY_POINT(Firebird::IMaster* master) { PluginManagerInterfacePtr pi; pi->registerPluginFactory(PluginType::ExternalEngine, "UDR", &factory); - pi->registerModule(&unloadDetector); + pi->registerModule(&myModule); libraryName->assign("fbclient"); ModuleLoader::doctorModuleExtension(libraryName); Modified: firebird/trunk/src/remote/client/interface.cpp =================================================================== --- firebird/trunk/src/remote/client/interface.cpp 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/remote/client/interface.cpp 2011-06-10 12:53:51 UTC (rev 53147) @@ -5779,6 +5779,7 @@ response->p_resp_data = temp; } +static MakeUpgradeInfo<> upInfo; static void init(IStatus* status, rem_port* port, @@ -5808,7 +5809,7 @@ // Let plugins try to add data to DPB in order to avoid extra network roundtrip Auth::DpbImplementation di(dpb); LocalStatus s; - GetPlugins<Auth::IClient> authItr(PluginType::AuthClient, FB_AUTH_CLIENT_VERSION); + GetPlugins<Auth::IClient> authItr(PluginType::AuthClient, FB_AUTH_CLIENT_VERSION, upInfo); bool working = true; Modified: firebird/trunk/src/remote/server/server.cpp =================================================================== --- firebird/trunk/src/remote/server/server.cpp 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/remote/server/server.cpp 2011-06-10 12:53:51 UTC (rev 53147) @@ -217,6 +217,8 @@ GlobalPtr<FailedLogins> usernameFailedLogins; GlobalPtr<FailedLogins> remoteFailedLogins; +MakeUpgradeInfo<> upInfo; + // delayed authentication block for auth callback class ServerAuth : public GlobalStorage, public ServerAuthBase { @@ -231,7 +233,7 @@ wrt(getPool(), op == op_service_attach ? ClumpletReader::spbList : ClumpletReader::dpbList, MAX_DPB_SIZE, pb, pbLen), authBlockInterface(op == op_service_attach), - authItr(PluginType::AuthServer, FB_AUTH_SERVER_VERSION, config), + authItr(PluginType::AuthServer, FB_AUTH_SERVER_VERSION, upInfo, config), remoteId(getPool()), userName(getPool()), authServer(NULL), part2(p2), operation(op) { Modified: firebird/trunk/src/utilities/ntrace/TracePluginImpl.cpp =================================================================== --- firebird/trunk/src/utilities/ntrace/TracePluginImpl.cpp 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/utilities/ntrace/TracePluginImpl.cpp 2011-06-10 12:53:51 UTC (rev 53147) @@ -38,12 +38,14 @@ #include "../../common/os/path_utils.h" #include "../../jrd/inf_pub.h" #include "../../dsql/sqlda_pub.h" +#include "../common/classes/ImplementHelper.h" using namespace Firebird; using namespace Jrd; static const char* const DEFAULT_LOG_NAME = "default_trace.log"; +static MakeUpgradeInfo<> upInfo; #ifdef WIN_NT #define NEWLINE "\r\n" @@ -89,6 +91,7 @@ services(getDefaultMemoryPool()), unicodeCollation(*getDefaultMemoryPool()) { + MasterInterfacePtr()->upgradeInterface(logWriter, FB_TRACE_LOG_WRITER_VERSION, upInfo); const char* ses_name = initInfo->getTraceSessionName(); session_name = ses_name && *ses_name ? ses_name : " "; @@ -1937,6 +1940,8 @@ { try { + MasterInterfacePtr()->upgradeInterface(connection, FB_TRACE_CONNECTION_VERSION, upInfo); + log_event_attach(connection, create_db, att_result); return true; } @@ -1951,6 +1956,8 @@ { try { + MasterInterfacePtr()->upgradeInterface(connection, FB_TRACE_CONNECTION_VERSION, upInfo); + log_event_detach(connection, drop_db); return true; } @@ -1967,6 +1974,10 @@ { try { + MasterInterfacePtr master; + master->upgradeInterface(connection, FB_TRACE_CONNECTION_VERSION, upInfo); + master->upgradeInterface(transaction, FB_TRACE_TRANSACTION_VERSION, upInfo); + log_event_transaction_start(connection, transaction, tpb_length, tpb, tra_result); return true; } @@ -1982,6 +1993,10 @@ { try { + MasterInterfacePtr master; + master->upgradeInterface(connection, FB_TRACE_CONNECTION_VERSION, upInfo); + master->upgradeInterface(transaction, FB_TRACE_TRANSACTION_VERSION, upInfo); + log_event_transaction_end(connection, transaction, commit, retain_context, tra_result); return true; } @@ -1998,6 +2013,11 @@ { try { + MasterInterfacePtr master; + master->upgradeInterface(connection, FB_TRACE_CONNECTION_VERSION, upInfo); + master->upgradeInterface(transaction, FB_TRACE_TRANSACTION_VERSION, upInfo); + master->upgradeInterface(variable, FB_TRACE_CONTEXT_VARIABLE_VERSION, upInfo); + log_event_set_context(connection, transaction, variable); return true; } @@ -2015,6 +2035,11 @@ { try { + MasterInterfacePtr master; + master->upgradeInterface(connection, FB_TRACE_CONNECTION_VERSION, upInfo); + master->upgradeInterface(transaction, FB_TRACE_TRANSACTION_VERSION, upInfo); + master->upgradeInterface(procedure, FB_TRACE_PROCEDURE_VERSION, upInfo); + log_event_proc_execute(connection, transaction, procedure, started, proc_result); return true; } @@ -2031,6 +2056,11 @@ { try { + MasterInterfacePtr master; + master->upgradeInterface(connection, FB_TRACE_CONNECTION_VERSION, upInfo); + master->upgradeInterface(transaction, FB_TRACE_TRANSACTION_VERSION, upInfo); + master->upgradeInterface(trigger, FB_TRACE_TRIGGER_VERSION, upInfo); + log_event_trigger_execute(connection, transaction, trigger, started, trig_result); return true; } @@ -2048,6 +2078,11 @@ { try { + MasterInterfacePtr master; + master->upgradeInterface(connection, FB_TRACE_CONNECTION_VERSION, upInfo); + master->upgradeInterface(transaction, FB_TRACE_TRANSACTION_VERSION, upInfo); + master->upgradeInterface(statement, FB_TRACE_SQL_STATEMENT_VERSION, upInfo); + log_event_dsql_prepare(connection, transaction, statement, time_millis, req_result); return true; } @@ -2063,6 +2098,10 @@ { try { + MasterInterfacePtr master; + master->upgradeInterface(connection, FB_TRACE_CONNECTION_VERSION, upInfo); + master->upgradeInterface(statement, FB_TRACE_SQL_STATEMENT_VERSION, upInfo); + log_event_dsql_free(connection, statement, option); return true; } @@ -2079,6 +2118,11 @@ { try { + MasterInterfacePtr master; + master->upgradeInterface(connection, FB_TRACE_CONNECTION_VERSION, upInfo); + master->upgradeInterface(transaction, FB_TRACE_TRANSACTION_VERSION, upInfo); + master->upgradeInterface(statement, FB_TRACE_SQL_STATEMENT_VERSION, upInfo); + log_event_dsql_execute(connection, transaction, statement, started, req_result); return true; } @@ -2096,6 +2140,11 @@ { try { + MasterInterfacePtr master; + master->upgradeInterface(connection, FB_TRACE_CONNECTION_VERSION, upInfo); + master->upgradeInterface(transaction, FB_TRACE_TRANSACTION_VERSION, upInfo); + master->upgradeInterface(statement, FB_TRACE_BLR_STATEMENT_VERSION, upInfo); + log_event_blr_compile(connection, transaction, statement, time_millis, req_result); return true; } @@ -2111,6 +2160,11 @@ { try { + MasterInterfacePtr master; + master->upgradeInterface(connection, FB_TRACE_CONNECTION_VERSION, upInfo); + master->upgradeInterface(transaction, FB_TRACE_TRANSACTION_VERSION, upInfo); + master->upgradeInterface(statement, FB_TRACE_BLR_STATEMENT_VERSION, upInfo); + log_event_blr_execute(connection, transaction, statement, req_result); return true; } @@ -2127,6 +2181,11 @@ { try { + MasterInterfacePtr master; + master->upgradeInterface(connection, FB_TRACE_CONNECTION_VERSION, upInfo); + master->upgradeInterface(transaction, FB_TRACE_TRANSACTION_VERSION, upInfo); + master->upgradeInterface(request, FB_TRACE_DYN_REQUEST_VERSION, upInfo); + log_event_dyn_execute(connection, transaction, request, time_millis, req_result); return true; } @@ -2142,6 +2201,7 @@ { try { + MasterInterfacePtr()->upgradeInterface(service, FB_TRACE_SERVICE_VERSION, upInfo); log_event_service_attach(service, att_result); return true; } @@ -2157,6 +2217,7 @@ { try { + MasterInterfacePtr()->upgradeInterface(service, FB_TRACE_SERVICE_VERSION, upInfo); log_event_service_start(service, switches_length, switches, start_result); return true; } @@ -2173,6 +2234,7 @@ { try { + MasterInterfacePtr()->upgradeInterface(service, FB_TRACE_SERVICE_VERSION, upInfo); log_event_service_query(service, send_item_length, send_items, recv_item_length, recv_items, query_result); return true; @@ -2189,6 +2251,7 @@ { try { + MasterInterfacePtr()->upgradeInterface(service, FB_TRACE_SERVICE_VERSION, upInfo); log_event_service_detach(service, detach_result); return true; } Modified: firebird/trunk/src/utilities/ntrace/traceplugin.cpp =================================================================== --- firebird/trunk/src/utilities/ntrace/traceplugin.cpp 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/utilities/ntrace/traceplugin.cpp 2011-06-10 12:53:51 UTC (rev 53147) @@ -26,6 +26,8 @@ * 2008 Khorsun Vladyslav */ +#include "../common/classes/ImplementHelper.h" + #include "TraceConfiguration.h" #include "TracePluginImpl.h" @@ -51,6 +53,8 @@ return 1; } +static Firebird::MakeUpgradeInfo<> upInfo; + ntrace_mask_t FB_CARG TraceFactoryImpl::trace_needs() { return (1 << TRACE_EVENT_MAX) - 1; @@ -58,9 +62,12 @@ TracePlugin* FB_CARG TraceFactoryImpl::trace_create(Firebird::IStatus* status, TraceInitInfo* initInfo) { + Firebird::MasterInterfacePtr master; const char* dbname = NULL; try { + master->upgradeInterface(initInfo, FB_TRACE_INIT_INFO_VERSION, upInfo); + dbname = initInfo->getDatabaseName(); if (!dbname) dbname = ""; @@ -69,6 +76,11 @@ TraceCfgReader::readTraceConfiguration(initInfo->getConfigText(), dbname, config); TraceConnection* connection = initInfo->getConnection(); + if (connection) + { + master->upgradeInterface(connection, FB_TRACE_CONNECTION_VERSION, upInfo); + } + if (!config.enabled || (config.connection_id && connection && (connection->getConnectionID() != SLONG(config.connection_id)))) @@ -90,6 +102,7 @@ TraceLogWriter* logWriter = initInfo->getLogWriter(); if (logWriter) { + master->upgradeInterface(logWriter, FB_TRACE_LOG_WRITER_VERSION, upInfo); const char* strEx = TracePluginImpl::marshal_exception(ex); Firebird::string err; if (dbname) @@ -111,12 +124,11 @@ static Firebird::SimpleFactory<TraceFactoryImpl> traceFactory; -static Firebird::UnloadDetector unloadDetector; void registerTrace(Firebird::IPluginManager* iPlugin) { iPlugin->registerPluginFactory(Firebird::PluginType::Trace, "fbtrace", &traceFactory); - iPlugin->registerModule(&unloadDetector); + iPlugin->registerModule(&Firebird::myModule); } Modified: firebird/trunk/src/yvalve/MasterImplementation.cpp =================================================================== --- firebird/trunk/src/yvalve/MasterImplementation.cpp 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/yvalve/MasterImplementation.cpp 2011-06-10 12:53:51 UTC (rev 53147) @@ -30,6 +30,8 @@ #include "firebird/Interface.h" #include "firebird/Timer.h" +#include <string.h> + #include "../yvalve/MasterImplementation.h" #include "../common/classes/init.h" #include "../common/StatusHolder.h" @@ -113,14 +115,50 @@ FunctionPtr* vTab; }; - typedef Firebird::Pair<Firebird::NonPooled<U_IPTR, FunctionPtr*> > FunctionPair; + class UpgradeKey + { + public: + UpgradeKey(FunctionPtr* aFunc, IPluginModule* aModuleA, IPluginModule* aModuleB) + : func(aFunc), moduleA(aModuleA), moduleB(aModuleB) + { } + + UpgradeKey(const UpgradeKey& el) + : func(el.func), moduleA(el.moduleA), moduleB(el.moduleB) + { } + + UpgradeKey() + : func(NULL), moduleA(NULL), moduleB(NULL) + { } + + bool operator<(const UpgradeKey& el) const + { + return memcmp(this, &el, sizeof(UpgradeKey)) < 0; + } + + bool operator>(const UpgradeKey& el) const + { + return memcmp(this, &el, sizeof(UpgradeKey)) > 0; + } + + bool contains(IPluginModule* module) + { + return moduleA == module || moduleB == module; + } + + private: + FunctionPtr* func; + IPluginModule* moduleA; + IPluginModule* moduleB; + }; + + typedef Firebird::Pair<Firebird::NonPooled<UpgradeKey, FunctionPtr*> > FunctionPair; GlobalPtr<GenericMap<FunctionPair> > functionMap; GlobalPtr<RWLock> mapLock; } int FB_CARG MasterImplementation::upgradeInterface(IVersioned* toUpgrade, int desiredVersion, - void* missingFunctionClass) + struct UpgradeInfo* upgradeInfo) { int existingVersion = toUpgrade->getVersion(); @@ -132,9 +170,11 @@ { CVirtualClass* target = (CVirtualClass*) toUpgrade; + UpgradeKey key(target->vTab, toUpgrade->getModule(), upgradeInfo->clientModule); + { // sync scope ReadLockGuard sync(mapLock); - if (functionMap->get((U_IPTR) target->vTab, newTab)) + if (functionMap->get(key, newTab)) { target->vTab = newTab; return 0; @@ -143,9 +183,9 @@ WriteLockGuard sync(mapLock); - if (!functionMap->get((U_IPTR) target->vTab, newTab)) + if (!functionMap->get(key, newTab)) { - CVirtualClass* miss = (CVirtualClass*) missingFunctionClass; + CVirtualClass* miss = (CVirtualClass*) (upgradeInfo->missingFunctionClass); newTab = FB_NEW(*getDefaultMemoryPool()) FunctionPtr[desiredVersion]; for (int i = 0; i < desiredVersion; ++i) @@ -153,7 +193,7 @@ newTab[i] = i < existingVersion ? target->vTab[i] : miss->vTab[0]; } - functionMap->put((U_IPTR) target->vTab, newTab); + functionMap->put(key, newTab); } target->vTab = newTab; @@ -173,6 +213,29 @@ return 0; } +void releaseUpgradeTabs(IPluginModule* module) +{ + HalfStaticArray<UpgradeKey, 16> removeList; + + WriteLockGuard sync(mapLock); + + GenericMap<FunctionPair>::Accessor scan(&functionMap); + if (scan.getFirst()) do + { + UpgradeKey& cur(scan.current()->first); + if (cur.contains(module)) + { + removeList.add(cur); + } + } + while (scan.getNext()); + + for(unsigned int i = 0; i < removeList.getCount(); ++i) + { + functionMap->remove(removeList[i]); + } +} + } // namespace Why // @@ -415,7 +478,7 @@ TimerDelay curTime() { - return fb_utils::query_performance_counter() / fb_utils::query_performance_frequency(); + return fb_utils::query_performance_counter() / (fb_utils::query_performance_frequency() / 1000000); } TimerEntry* getTimer(ITimer* timer) Modified: firebird/trunk/src/yvalve/MasterImplementation.h =================================================================== --- firebird/trunk/src/yvalve/MasterImplementation.h 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/yvalve/MasterImplementation.h 2011-06-10 12:53:51 UTC (rev 53147) @@ -57,7 +57,8 @@ Firebird::IStatus* FB_CARG getStatus(); Firebird::IProvider* FB_CARG getDispatcher(); Firebird::IPluginManager* FB_CARG getPluginManager(); - int FB_CARG upgradeInterface(Firebird::IVersioned* toUpgrade, int desiredVersion, void* missingFunctionClass); + int FB_CARG upgradeInterface(Firebird::IVersioned* toUpgrade, int desiredVersion, + Firebird::UpgradeInfo* upgradeInfo); const char* FB_CARG circularAlloc(const char* s, size_t len, intptr_t thr); Firebird::ITimerControl* FB_CARG getTimerControl(); Firebird::IAttachment* registerAttachment(Firebird::IProvider* provider, @@ -68,6 +69,7 @@ }; void shutdownTimers(); + void releaseUpgradeTabs(Firebird::IPluginModule* module); } // namespace Why #endif // YVALVE_MASTER_IMPLEMENTATION_H Modified: firebird/trunk/src/yvalve/PluginManager.cpp =================================================================== --- firebird/trunk/src/yvalve/PluginManager.cpp 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/yvalve/PluginManager.cpp 2011-06-10 12:53:51 UTC (rev 53147) @@ -24,6 +24,7 @@ #include "consts_pub.h" #include "iberror.h" #include "../yvalve/PluginManager.h" +#include "../yvalve/MasterImplementation.h" #include "../dsql/sqlda_pub.h" #include "../yvalve/why_proto.h" @@ -344,6 +345,7 @@ if (cleanup) { cleanup->doClean(); + Why::releaseUpgradeTabs(cleanup); } } @@ -442,6 +444,11 @@ ~ConfiguredPlugin(); + const char* getPlugName() + { + return plugName.c_str(); + } + // ITimer implementation void FB_CARG handler() { } @@ -501,6 +508,9 @@ private: ~FactoryParameter() { +#ifdef DEBUG_PLUGINS + fprintf(stderr, "~FactoryParameter places configuredPlugin %s in unload query\n", configuredPlugin->getPlugName()); +#endif TimerInterfacePtr()->start(configuredPlugin, 1000000); // 1 sec } @@ -645,10 +655,10 @@ void FB_CARG next(); PluginSet(unsigned int pinterfaceType, const char* pnamesList, - int pdesiredVersion, void* pmissingFunctionClass, + int pdesiredVersion, UpgradeInfo* pui, IFirebirdConf* fbConf) : interfaceType(pinterfaceType), namesList(getPool()), - desiredVersion(pdesiredVersion), missingFunctionClass(pmissingFunctionClass), + desiredVersion(pdesiredVersion), ui(pui), currentName(getPool()), currentPlugin(NULL), firebirdConf(fbConf) { @@ -672,7 +682,7 @@ unsigned int interfaceType; PathName namesList; int desiredVersion; - void* missingFunctionClass; + UpgradeInfo* ui; PathName currentName; RefPtr<ConfiguredPlugin> currentPlugin; // Missing data in this field indicates EOF @@ -807,7 +817,7 @@ IPluginBase* p = currentPlugin->factory(firebirdConf); if (p) { - if (masterInterface->upgradeInterface(p, desiredVersion, missingFunctionClass) >= 0) + if (masterInterface->upgradeInterface(p, desiredVersion, ui) >= 0) { return p; } @@ -895,13 +905,13 @@ } IPluginSet* FB_CARG PluginManager::getPlugins(unsigned int interfaceType, const char* namesList, - int desiredVersion, void* missingFunctionClass, + int desiredVersion, UpgradeInfo* ui, IFirebirdConf* firebirdConf) { MutexLockGuard g(plugins->mutex); IPluginSet* rc = new PluginSet(interfaceType, namesList, desiredVersion, - missingFunctionClass, firebirdConf); + ui, firebirdConf); rc->addRef(); return rc; } Modified: firebird/trunk/src/yvalve/PluginManager.h =================================================================== --- firebird/trunk/src/yvalve/PluginManager.h 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/yvalve/PluginManager.h 2011-06-10 12:53:51 UTC (rev 53147) @@ -43,14 +43,14 @@ public: // IPluginManager implementation IPluginSet* FB_CARG getPlugins(unsigned int interfaceType, const char* namesList, - int desiredVersion, void* missingFunctionClass, + int desiredVersion, UpgradeInfo* ui, IFirebirdConf* firebirdConf); void FB_CARG registerPluginFactory(unsigned int interfaceType, const char* defaultName, IPluginFactory* factory); IConfig* FB_CARG getConfig(const char* filename); void FB_CARG releasePlugin(IPluginBase* plugin); - void FB_CARG registerModule(IPluginModule* cleanup); - void FB_CARG unregisterModule(IPluginModule* cleanup); + void FB_CARG registerModule(IPluginModule* module); + void FB_CARG unregisterModule(IPluginModule* module); PluginManager(); Modified: firebird/trunk/src/yvalve/YObjects.h =================================================================== --- firebird/trunk/src/yvalve/YObjects.h 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/yvalve/YObjects.h 2011-06-10 12:53:51 UTC (rev 53147) @@ -117,10 +117,7 @@ class YHelper : public Firebird::StdPlugin<Intf, Vers>, public YObject { public: - YHelper(Intf* aNext) : next(aNext) - { - this->addRef(); - } + YHelper(Intf* aNext); int FB_CARG release() { @@ -426,7 +423,7 @@ { if (--refCounter == 0) { - delete this; + //delete this; return 0; } Modified: firebird/trunk/src/yvalve/why.cpp =================================================================== --- firebird/trunk/src/yvalve/why.cpp 2011-06-10 12:35:46 UTC (rev 53146) +++ firebird/trunk/src/yvalve/why.cpp 2011-06-10 12:53:51 UTC (rev 53147) @@ -557,10 +557,12 @@ public: virtual void FB_CARG noEntrypoint(IStatus* s) { - s->set(Arg::Gds(isc_unavailable).value()); + s->set(Arg::Gds(isc_wish_list).value()); } }; + MakeUpgradeInfo<NoEntrypoint> upInfo; + template <typename T, typename CleanupRoutine> // T = YAttachment or YTransaction class CleanupCallbackImpl : public CleanupCallback { @@ -3269,6 +3271,13 @@ return new YTransaction(static_cast<YAttachment*>(attachment), transaction); } +template <typename Impl, typename Intf, int Vers> +YHelper<Impl, Intf, Vers>::YHelper(Intf* aNext) +{ + MasterInterfacePtr()->upgradeInterface(aNext, Vers, upInfo); + next = aNext; + this->addRef(); +} //------------------------------------- @@ -4640,8 +4649,8 @@ RefPtr<Config> config; ResolveDatabaseAlias(expandedFilename, dummy, &config); - for (GetPlugins<IProvider, NoEntrypoint> providerIterator(PluginType::Provider, - FB_PROVIDER_VERSION, config); + for (GetPlugins<IProvider> providerIterator(PluginType::Provider, + FB_PROVIDER_VERSION, upInfo, config); providerIterator.hasData(); providerIterator.next()) { @@ -4763,8 +4772,8 @@ ResolveDatabaseAlias(expandedFilename, dummy, &config); ***/ - for (GetPlugins<IProvider, NoEntrypoint> providerIterator(PluginType::Provider, - FB_PROVIDER_VERSION/***, config***/); + for (GetPlugins<IProvider> providerIterator(PluginType::Provider, + FB_PROVIDER_VERSION, upInfo/***, config***/); providerIterator.hasData(); providerIterator.next()) { @@ -4827,8 +4836,8 @@ try { - for (GetPlugins<IProvider, NoEntrypoint> providerIterator(PluginType::Provider, - FB_PROVIDER_VERSION); + for (GetPlugins<IProvider> providerIterator(PluginType::Provider, + FB_PROVIDER_VERSION, upInfo); providerIterator.hasData(); providerIterator.next()) { @@ -4916,8 +4925,8 @@ shutdownStarted = true; // Shutdown providers (if any present). - for (GetPlugins<IProvider, NoEntrypoint> providerIterator( - PluginType::Provider, FB_PROVIDER_VERSION); + for (GetPlugins<IProvider> providerIterator(PluginType::Provider, + FB_PROVIDER_VERSION, upInfo); providerIterator.hasData(); providerIterator.next()) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-06-21 10:09:41
|
Revision: 53198 http://firebird.svn.sourceforge.net/firebird/?rev=53198&view=rev Author: firebirds Date: 2011-06-21 10:09:32 +0000 (Tue, 21 Jun 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-06-21 09:06:43 UTC (rev 53197) +++ firebird/trunk/ChangeLog 2011-06-21 10:09:32 UTC (rev 53198) @@ -1,3 +1,157 @@ + 2011-06-17 12:39 asfernandes + M src/dsql/DdlNodes.epp +Complement fix for CORE-3140 - Preserve comments for parameters after altering procedures. + + 2011-06-17 01:06 asfernandes + M src/jrd/tra.cpp + M src/jrd/tra.h +Misc. + + 2011-06-16 08:58 hvlad + M src/jrd/tra.cpp + M src/jrd/tra.h +Fixed bug CORE-3525 : Autonomous transactions should not inherit run-time flags of "parent" transaction + + 2011-06-15 15:55 asfernandes + M src/jrd/SimilarToMatcher.h +Fixed CORE-3523 - SIMILAR TO: False matches on descending ranges. + + 2011-06-15 12:44 hvlad + M src/jrd/cch.cpp + M src/jrd/tra.cpp + M src/jrd/tra_proto.h +Try to correctly handle IO errors in cache and avoid some internal deadlocks. + + 2011-06-15 11:59 hvlad + M src/jrd/cch.cpp +Additional fix for correct Nbackup state lock accounting. See also CORE-3465 + + 2011-06-15 11:43 hvlad + M src/jrd/cch.cpp + M src/jrd/nbak.cpp + M src/jrd/nbak.h +Fixed bug CORE-3521 : Delta file contents is not flushed to disk + + 2011-06-15 08:35 paulbeach + M builds/posix/prefix.darwin_i386 +Fix typo + + 2011-06-15 00:47 asfernandes + M src/common/classes/GetPlugins.h + M src/common/classes/alloc.cpp + M src/utilities/ntrace/traceplugin.cpp + M src/yvalve/MasterImplementation.cpp + M src/yvalve/PluginManager.cpp +Misc. + + 2011-06-14 11:34 alexpeshkoff + M src/auth/SecurityDatabase/LegacyManagement.epp + M src/common/classes/ImplementHelper.h + M src/jrd/jrd.cpp + M src/plugins/udr_engine/UdrEngine.cpp + M src/utilities/ntrace/traceplugin.cpp +Fixed UnloadDetector in a case when it gets linked in non-plugin module + + 2011-06-13 19:02 hvlad + M src/jrd/DatabaseSnapshot.cpp +try\catch to always restore original attachment in tdbb. Noted by Claudio. + + 2011-06-13 11:09 hvlad + M src/jrd/EngineInterface.h + M src/jrd/cch.cpp + M src/jrd/jrd.cpp + M src/jrd/vio.cpp +Fixed leak of SysAttachment instance. Noted by Claudio. + + 2011-06-13 11:08 hvlad + M src/common/classes/ImplementHelper.h + M src/include/firebird/Interface.h +Missed FB_CARG + + 2011-06-13 10:40 hvlad + M builds/win32/msvc10/common.vcxproj + M builds/win32/msvc10/common.vcxproj.filters + M builds/win32/msvc8/common.vcproj + M builds/win32/msvc9/common.vcproj +Update Windows build + + 2011-06-11 18:44 asfernandes + M doc/README.intl +Misc. + + 2011-06-11 06:12 robocop + M src/include/firebird/Plugin.h +Misc. + + 2011-06-11 06:09 robocop + M src/common/classes/alloc.cpp +Misc. + + 2011-06-11 06:08 robocop + M builds/win32/msvc8/common.vcproj +Misc. + + 2011-06-10 12:53 alexpeshkoff + M builds/posix/make.defaults + M configure.in + M lang_helpers/gds_codes.ftn + M lang_helpers/gds_codes.pas + M src/auth/AuthDbg.cpp + M src/auth/SecurityDatabase/LegacyManagement.epp + M src/auth/SecurityDatabase/LegacyServer.cpp + M src/auth/trusted/AuthSspi.cpp + M src/common/classes/GetPlugins.h + A src/common/classes/ImplementHelper.cpp + M src/common/classes/ImplementHelper.h + M src/common/security.cpp + M src/common/utils.cpp + M src/gpre/boot/gpre_meta_boot.cpp + M src/include/firebird/ExternalEngine.h + M src/include/firebird/Interface.h + M src/include/firebird/Plugin.h + M src/include/firebird/Provider.h + M src/include/gen/codetext.h + M src/include/gen/iberror.h + M src/include/gen/msgs.h + M src/include/gen/sql_code.h + M src/include/gen/sql_state.h + M src/jrd/ExtEngineManager.cpp + M src/jrd/UserManagement.cpp + M src/jrd/jrd.cpp + M src/jrd/svc.cpp + M src/jrd/trace/TraceManager.cpp + M src/msgs/facilities2.sql + M src/msgs/messages2.sql + M src/msgs/system_errors2.sql + M src/plugins/udr_engine/UdrEngine.cpp + M src/remote/client/interface.cpp + M src/remote/server/server.cpp + M src/utilities/ntrace/TracePluginImpl.cpp + M src/utilities/ntrace/traceplugin.cpp + M src/yvalve/MasterImplementation.cpp + M src/yvalve/MasterImplementation.h + M src/yvalve/PluginManager.cpp + M src/yvalve/PluginManager.h + M src/yvalve/YObjects.h + M src/yvalve/why.cpp +Used upgradeInterface() in a number of places. +Fixed memory leak when unloading module, related with upgraded interfaces. +Fixed timer on posix to be high resolution. +Better diagnostic in services. + + 2011-06-10 12:35 alexpeshkoff + M extern/editline/config.h.in + M extern/editline/configure +regenerated with fresh autotools + + 2011-06-08 09:27 alexpeshkoff + M src/common/classes/ClumpletReader.cpp +Fixed segfault in DEV_BUILD + + 2011-06-08 06:38 alexpeshkoff + M src/common/Auth.cpp +Fixed posix build + 2011-06-08 01:55 asfernandes M src/jrd/dpm.epp M src/jrd/vio.cpp @@ -43,7 +197,7 @@ 2011-06-03 19:12 asfernandes M src/common/IntlUtil.cpp M src/common/IntlUtil.h -Fixed CORE-3416 - Inserting K?\195?\164se into a CHARACTER SET ASCII column succeeds. +Fixed CORE-3416 - Inserting Käse into a CHARACTER SET ASCII column succeeds. 2011-06-03 17:39 asfernandes M src/jrd/met.epp @@ -33095,7 +33249,7 @@ 2008-11-29 18:47 asfernandes M src/jrd/DataTypeUtil.cpp M src/jrd/DataTypeUtil.h -Fixed CORE-2019 ?\195?\162?\226?\130?\172?\226?\128?\156 UTF-8 conversion error (string truncation). +Fixed CORE-2019 – UTF-8 conversion error (string truncation). 2008-11-28 18:49 alexpeshkoff M src/common/classes/SafeArg.cpp @@ -35447,7 +35601,7 @@ 2008-07-16 14:16 asfernandes M src/jrd/idx.cpp -Fixed CORE-1989 - UTF8 UNICODE_CI collate can?\194?\180t be used in foreing key constraint +Fixed CORE-1989 - UTF8 UNICODE_CI collate can´t be used in foreing key constraint 2008-07-16 13:55 asfernandes M src/jrd/Optimizer.cpp @@ -36455,7 +36609,7 @@ 2008-06-14 02:17 asfernandes M doc/sql.extensions/README.similar_to.txt M src/jrd/SimilarToMatcher.h -1) Fixed CORE-1935 ?\195?\162?\226?\130?\172?\226?\128?\156 SIMILAR TO character classes are incorrectly recognized. +1) Fixed CORE-1935 – SIMILAR TO character classes are incorrectly recognized. 2) Improve the documentation after some questions from Claudio. 2008-06-13 14:01 dimitr @@ -48723,7 +48877,7 @@ 2007-05-09 15:23 asfernandes M doc/sql.extensions/README.list -Updated LIST documentation - thanks to Maycon Ferra?\195?\167a +Updated LIST documentation - thanks to Maycon Ferraça 2007-05-09 02:03 asfernandes M src/burp/burp.cpp @@ -50674,7 +50828,7 @@ 2007-03-22 13:07 asfernandes M doc/sql.extensions/README.context_variables2 -Document the new context variable - thanks to Maicon Ferra?\195?\167a +Document the new context variable - thanks to Maicon Ferraça 2007-03-22 12:53 dimitr M src/dsql/pass1.cpp @@ -52351,7 +52505,7 @@ 2006-12-14 10:30 asfernandes M doc/sql.extensions/README.returning -Correction - thanks to Maycon Ferra?\195?\167a +Correction - thanks to Maycon Ferraça 2006-12-14 09:14 dimitr A doc/README.monitoring_tables @@ -53795,7 +53949,7 @@ 2006-10-10 03:53 asfernandes M src/jrd/jrd.cpp -Fix problem reported by Carsten Sch?\195?\164fer in fbdevel of incorrect server start when using connection pooling +Fix problem reported by Carsten Schäfer in fbdevel of incorrect server start when using connection pooling 2006-10-10 03:39 asfernandes M src/jrd/os/posix/isc_ipc.cpp @@ -54144,7 +54298,7 @@ 2006-09-13 12:59 asfernandes M src/dsql/pass1.cpp -Fix the problem with CAST and parameters reported by Maycon Ferra?\195?\167a in fb-devel +Fix the problem with CAST and parameters reported by Maycon Ferraça in fb-devel 2006-09-12 16:31 asfernandes M src/jrd/opt.cpp Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-06-21 09:06:43 UTC (rev 53197) +++ firebird/trunk/src/jrd/build_no.h 2011-06-21 10:09:32 UTC (rev 53198) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29438 + FORMAL BUILD NUMBER:29460 */ -#define PRODUCT_VER_STRING "3.0.0.29438" -#define FILE_VER_STRING "WI-T3.0.0.29438" -#define LICENSE_VER_STRING "WI-T3.0.0.29438" -#define FILE_VER_NUMBER 3, 0, 0, 29438 +#define PRODUCT_VER_STRING "3.0.0.29460" +#define FILE_VER_STRING "WI-T3.0.0.29460" +#define LICENSE_VER_STRING "WI-T3.0.0.29460" +#define FILE_VER_NUMBER 3, 0, 0, 29460 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29438" +#define FB_BUILD_NO "29460" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-06-21 09:06:43 UTC (rev 53197) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-06-21 10:09:32 UTC (rev 53198) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29438 +BuildNum=29460 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-06-22 03:18:32
|
Revision: 53201 http://firebird.svn.sourceforge.net/firebird/?rev=53201&view=rev Author: firebirds Date: 2011-06-22 03:18:25 +0000 (Wed, 22 Jun 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-06-22 00:30:30 UTC (rev 53200) +++ firebird/trunk/ChangeLog 2011-06-22 03:18:25 UTC (rev 53201) @@ -1,3 +1,7 @@ + 2011-06-22 00:30 asfernandes + M src/dsql/DdlNodes.epp +Misc. + 2011-06-17 12:39 asfernandes M src/dsql/DdlNodes.epp Complement fix for CORE-3140 - Preserve comments for parameters after altering procedures. @@ -197,7 +201,7 @@ 2011-06-03 19:12 asfernandes M src/common/IntlUtil.cpp M src/common/IntlUtil.h -Fixed CORE-3416 - Inserting Käse into a CHARACTER SET ASCII column succeeds. +Fixed CORE-3416 - Inserting K?\195?\164se into a CHARACTER SET ASCII column succeeds. 2011-06-03 17:39 asfernandes M src/jrd/met.epp @@ -33249,7 +33253,7 @@ 2008-11-29 18:47 asfernandes M src/jrd/DataTypeUtil.cpp M src/jrd/DataTypeUtil.h -Fixed CORE-2019 – UTF-8 conversion error (string truncation). +Fixed CORE-2019 ?\195?\162?\226?\130?\172?\226?\128?\156 UTF-8 conversion error (string truncation). 2008-11-28 18:49 alexpeshkoff M src/common/classes/SafeArg.cpp @@ -35601,7 +35605,7 @@ 2008-07-16 14:16 asfernandes M src/jrd/idx.cpp -Fixed CORE-1989 - UTF8 UNICODE_CI collate can´t be used in foreing key constraint +Fixed CORE-1989 - UTF8 UNICODE_CI collate can?\194?\180t be used in foreing key constraint 2008-07-16 13:55 asfernandes M src/jrd/Optimizer.cpp @@ -36609,7 +36613,7 @@ 2008-06-14 02:17 asfernandes M doc/sql.extensions/README.similar_to.txt M src/jrd/SimilarToMatcher.h -1) Fixed CORE-1935 – SIMILAR TO character classes are incorrectly recognized. +1) Fixed CORE-1935 ?\195?\162?\226?\130?\172?\226?\128?\156 SIMILAR TO character classes are incorrectly recognized. 2) Improve the documentation after some questions from Claudio. 2008-06-13 14:01 dimitr @@ -48877,7 +48881,7 @@ 2007-05-09 15:23 asfernandes M doc/sql.extensions/README.list -Updated LIST documentation - thanks to Maycon Ferraça +Updated LIST documentation - thanks to Maycon Ferra?\195?\167a 2007-05-09 02:03 asfernandes M src/burp/burp.cpp @@ -50828,7 +50832,7 @@ 2007-03-22 13:07 asfernandes M doc/sql.extensions/README.context_variables2 -Document the new context variable - thanks to Maicon Ferraça +Document the new context variable - thanks to Maicon Ferra?\195?\167a 2007-03-22 12:53 dimitr M src/dsql/pass1.cpp @@ -52505,7 +52509,7 @@ 2006-12-14 10:30 asfernandes M doc/sql.extensions/README.returning -Correction - thanks to Maycon Ferraça +Correction - thanks to Maycon Ferra?\195?\167a 2006-12-14 09:14 dimitr A doc/README.monitoring_tables @@ -53949,7 +53953,7 @@ 2006-10-10 03:53 asfernandes M src/jrd/jrd.cpp -Fix problem reported by Carsten Schäfer in fbdevel of incorrect server start when using connection pooling +Fix problem reported by Carsten Sch?\195?\164fer in fbdevel of incorrect server start when using connection pooling 2006-10-10 03:39 asfernandes M src/jrd/os/posix/isc_ipc.cpp @@ -54298,7 +54302,7 @@ 2006-09-13 12:59 asfernandes M src/dsql/pass1.cpp -Fix the problem with CAST and parameters reported by Maycon Ferraça in fb-devel +Fix the problem with CAST and parameters reported by Maycon Ferra?\195?\167a in fb-devel 2006-09-12 16:31 asfernandes M src/jrd/opt.cpp Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-06-22 00:30:30 UTC (rev 53200) +++ firebird/trunk/src/jrd/build_no.h 2011-06-22 03:18:25 UTC (rev 53201) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29460 + FORMAL BUILD NUMBER:29461 */ -#define PRODUCT_VER_STRING "3.0.0.29460" -#define FILE_VER_STRING "WI-T3.0.0.29460" -#define LICENSE_VER_STRING "WI-T3.0.0.29460" -#define FILE_VER_NUMBER 3, 0, 0, 29460 +#define PRODUCT_VER_STRING "3.0.0.29461" +#define FILE_VER_STRING "WI-T3.0.0.29461" +#define LICENSE_VER_STRING "WI-T3.0.0.29461" +#define FILE_VER_NUMBER 3, 0, 0, 29461 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29460" +#define FB_BUILD_NO "29461" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-06-22 00:30:30 UTC (rev 53200) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-06-22 03:18:25 UTC (rev 53201) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29460 +BuildNum=29461 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ro...@us...> - 2011-06-24 06:34:23
|
Revision: 53218 http://firebird.svn.sourceforge.net/firebird/?rev=53218&view=rev Author: robocop Date: 2011-06-24 06:34:16 +0000 (Fri, 24 Jun 2011) Log Message: ----------- Misc. Modified Paths: -------------- firebird/trunk/examples/udr/UdrCppExample.cpp firebird/trunk/src/common/IntlUtil.h firebird/trunk/src/common/classes/ImplementHelper.h firebird/trunk/src/common/classes/SyncObject.cpp firebird/trunk/src/common/classes/SyncObject.h firebird/trunk/src/common/classes/Synchronize.cpp firebird/trunk/src/common/classes/Synchronize.h firebird/trunk/src/jrd/Attachment.h firebird/trunk/src/jrd/DatabaseSnapshot.cpp firebird/trunk/src/jrd/EngineInterface.h firebird/trunk/src/jrd/ExtEngineManager.cpp firebird/trunk/src/jrd/ExtEngineManager.h firebird/trunk/src/jrd/GarbageCollector.cpp firebird/trunk/src/jrd/cch.cpp firebird/trunk/src/jrd/cch.h firebird/trunk/src/jrd/flu.h firebird/trunk/src/jrd/intl.cpp firebird/trunk/src/jrd/jrd.cpp firebird/trunk/src/jrd/lck.cpp firebird/trunk/src/jrd/tpc.cpp firebird/trunk/src/jrd/tpc_proto.h firebird/trunk/src/jrd/vio.cpp firebird/trunk/src/remote/client/interface.cpp firebird/trunk/src/yvalve/DistributedTransaction.cpp firebird/trunk/src/yvalve/PluginManager.cpp firebird/trunk/src/yvalve/YObjects.h Modified: firebird/trunk/examples/udr/UdrCppExample.cpp =================================================================== --- firebird/trunk/examples/udr/UdrCppExample.cpp 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/examples/udr/UdrCppExample.cpp 2011-06-24 06:34:16 UTC (rev 53218) @@ -716,8 +716,8 @@ outMessage.setNull(retDesc, true); return; } - else - ret += inMessage[numDesc]; + + ret += inMessage[numDesc]; } outMessage[retDesc] = ret; Modified: firebird/trunk/src/common/IntlUtil.h =================================================================== --- firebird/trunk/src/common/IntlUtil.h 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/src/common/IntlUtil.h 2011-06-24 06:34:16 UTC (rev 53218) @@ -105,7 +105,7 @@ class Utf8CharSet { public: - Utf8CharSet(MemoryPool& pool); + explicit Utf8CharSet(MemoryPool& pool); public: charset obj; Modified: firebird/trunk/src/common/classes/ImplementHelper.h =================================================================== --- firebird/trunk/src/common/classes/ImplementHelper.h 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/src/common/classes/ImplementHelper.h 2011-06-24 06:34:16 UTC (rev 53218) @@ -171,7 +171,7 @@ class AccessAutoInterface { public: - AccessAutoInterface(C* aPtr) + explicit AccessAutoInterface(C* aPtr) : ptr(aPtr) { } @@ -206,7 +206,7 @@ PluginManagerInterfacePtr() : AccessAutoInterface<IPluginManager>(MasterInterfacePtr()->getPluginManager()) { } - PluginManagerInterfacePtr(IMaster* master) + explicit PluginManagerInterfacePtr(IMaster* master) : AccessAutoInterface<IPluginManager>(master->getPluginManager()) { } }; Modified: firebird/trunk/src/common/classes/SyncObject.cpp =================================================================== --- firebird/trunk/src/common/classes/SyncObject.cpp 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/src/common/classes/SyncObject.cpp 2011-06-24 06:34:16 UTC (rev 53218) @@ -153,7 +153,6 @@ } } - return false; } else { @@ -180,8 +179,9 @@ } } - return false; } + + return false; } void SyncObject::unlock(Sync* sync, SyncType type) @@ -366,7 +366,7 @@ } } -void SyncObject::validate(SyncType lockType) +void SyncObject::validate(SyncType lockType) const { switch (lockType) { Modified: firebird/trunk/src/common/classes/SyncObject.h =================================================================== --- firebird/trunk/src/common/classes/SyncObject.h 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/src/common/classes/SyncObject.h 2011-06-24 06:34:16 UTC (rev 53218) @@ -99,7 +99,7 @@ void wait(SyncType type, ThreadSync* thread, Sync* sync); ThreadSync* grantThread(ThreadSync* thread); void grantLocks(); - void validate(SyncType lockType); + void validate(SyncType lockType) const; AtomicCounter lockState; AtomicCounter waiters; @@ -207,7 +207,7 @@ class SyncUnlockGuard { public: - SyncUnlockGuard(Sync& aSync) : + explicit SyncUnlockGuard(Sync& aSync) : sync(aSync) { oldState = sync.getState(); Modified: firebird/trunk/src/common/classes/Synchronize.cpp =================================================================== --- firebird/trunk/src/common/classes/Synchronize.cpp 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/src/common/classes/Synchronize.cpp 2011-06-24 06:34:16 UTC (rev 53218) @@ -239,7 +239,7 @@ } -const char* ThreadSync::getWhere() +const char* ThreadSync::getWhere() const { if (lockPending && lockPending->where) return lockPending->where; Modified: firebird/trunk/src/common/classes/Synchronize.h =================================================================== --- firebird/trunk/src/common/classes/Synchronize.h 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/src/common/classes/Synchronize.h 2011-06-24 06:34:16 UTC (rev 53218) @@ -76,14 +76,14 @@ friend class SyncObject; public: - ThreadSync(const char* desc); + explicit ThreadSync(const char* desc); virtual ~ThreadSync(); static ThreadSync* findThread(); static ThreadSync* getThread(const char* desc); static FB_THREAD_ID getCurrentThreadId(); - const char* getWhere(); + const char* getWhere() const; static void validateLocks(); Modified: firebird/trunk/src/jrd/Attachment.h =================================================================== --- firebird/trunk/src/jrd/Attachment.h 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/src/jrd/Attachment.h 2011-06-24 06:34:16 UTC (rev 53218) @@ -132,7 +132,7 @@ class SyncGuard { public: - SyncGuard(Attachment* att, bool optional = false) + explicit SyncGuard(Attachment* att, bool optional = false) : m_mutex(NULL) { if (att && att->att_interface) @@ -161,7 +161,7 @@ class Checkout { public: - Checkout(Attachment* att, bool optional = false) + explicit Checkout(Attachment* att, bool optional = false) : m_mutex(NULL) { if (att && att->att_interface) Modified: firebird/trunk/src/jrd/DatabaseSnapshot.cpp =================================================================== --- firebird/trunk/src/jrd/DatabaseSnapshot.cpp 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/src/jrd/DatabaseSnapshot.cpp 2011-06-24 06:34:16 UTC (rev 53218) @@ -773,7 +773,7 @@ // Attachment information - Attachment* old_attachment = tdbb->getAttachment(); + Attachment* const old_attachment = tdbb->getAttachment(); try { Attachment::Checkout attCout(old_attachment, true); Modified: firebird/trunk/src/jrd/EngineInterface.h =================================================================== --- firebird/trunk/src/jrd/EngineInterface.h 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/src/jrd/EngineInterface.h 2011-06-24 06:34:16 UTC (rev 53218) @@ -299,7 +299,7 @@ virtual void FB_CARG drop(Firebird::IStatus* status); public: - JAttachment(Attachment* handle); + explicit JAttachment(Attachment* handle); Attachment* getHandle() { @@ -338,7 +338,7 @@ class SysAttachment : public JAttachment { public: - SysAttachment(Attachment* handle) + explicit SysAttachment(Attachment* handle) : JAttachment(handle) { } @@ -376,7 +376,7 @@ unsigned int spbLength, const unsigned char* spb); public: - JService(Service* handle); + explicit JService(Service* handle); private: Service* svc; Modified: firebird/trunk/src/jrd/ExtEngineManager.cpp =================================================================== --- firebird/trunk/src/jrd/ExtEngineManager.cpp 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/src/jrd/ExtEngineManager.cpp 2011-06-24 06:34:16 UTC (rev 53218) @@ -466,7 +466,7 @@ if (align) pos = FB_ALIGN(pos, align); - unsigned dataPos = pos; + const unsigned dataPos = pos; pos += desc.dsc_length; align = type_alignments[dtype_short]; @@ -506,7 +506,8 @@ dsc desc; EVL_field(rpb->rpb_relation, record, i, &desc); - + // CVC: I'm not sure why it's not important to check EVL_field's result. + unsigned align = type_alignments[desc.dsc_dtype]; if (align) msgBuffer.resize(FB_ALIGN(msgBuffer.getCount(), align)); Modified: firebird/trunk/src/jrd/ExtEngineManager.h =================================================================== --- firebird/trunk/src/jrd/ExtEngineManager.h 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/src/jrd/ExtEngineManager.h 2011-06-24 06:34:16 UTC (rev 53218) @@ -64,7 +64,7 @@ public Firebird::PermanentStorage { public: - RoutineMetadata(MemoryPool& pool) + explicit RoutineMetadata(MemoryPool& pool) : PermanentStorage(pool), package(pool), name(pool), Modified: firebird/trunk/src/jrd/GarbageCollector.cpp =================================================================== --- firebird/trunk/src/jrd/GarbageCollector.cpp 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/src/jrd/GarbageCollector.cpp 2011-06-24 06:34:16 UTC (rev 53218) @@ -55,7 +55,7 @@ // search for given page at other transactions bitmaps // if found at older tx - we are done, just return - // if found at yanger tx - clear it as page should be set at oldest tx (our) + // if found at younger tx - clear it as page should be set at oldest tx (our) TranData::ConstAccessor accessor(&m_tranData); if (accessor.getFirst()) { @@ -75,16 +75,10 @@ } while(accessor.getNext()); } - // add page to the our tx bitmap - if (bm) - { - PBM_SET(&m_pool, &bm, pageno); - } - else - { - PBM_SET(&m_pool, &bm, pageno); + // add page to our tx bitmap + PBM_SET(&m_pool, &bm, pageno); + if (!bm) m_tranData.put(tranid, bm); - } } @@ -136,8 +130,8 @@ TranData::ConstAccessor accessor(&m_tranData); if (accessor.getFirst()) return accessor.current()->first; - else - return MAX_TRA_NUMBER; + + return MAX_TRA_NUMBER; } Modified: firebird/trunk/src/jrd/cch.cpp =================================================================== --- firebird/trunk/src/jrd/cch.cpp 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/src/jrd/cch.cpp 2011-06-24 06:34:16 UTC (rev 53218) @@ -984,7 +984,7 @@ SET_TDBB(tdbb); Database* dbb = tdbb->getDatabase(); BufferControl* bcb = dbb->dbb_bcb; - if (!dbb->dbb_bcb) + if (!bcb) return; bool flush_error = false; @@ -3572,7 +3572,7 @@ const bcb_repeat* const old_end = bcb->bcb_rpt + bcb->bcb_count; bcb_repeat* new_rpt = FB_NEW(*bcb->bcb_bufferpool) bcb_repeat[number]; - bcb_repeat* old_rpt = bcb->bcb_rpt; + bcb_repeat* const old_rpt = bcb->bcb_rpt; bcb->bcb_rpt = new_rpt; bcb->bcb_count = number; @@ -3913,12 +3913,14 @@ if (oldest->bdb_use_count || !oldest->addRefConditional(tdbb, SYNC_EXCLUSIVE)) continue; - if ((oldest->bdb_flags & BDB_free_pending) || !writeable(dbb, oldest)) { + if ((oldest->bdb_flags & BDB_free_pending) || !writeable(dbb, oldest)) + { oldest->release(tdbb); continue; } - if (oldest->bdb_flags & BDB_lru_chained) { + if (oldest->bdb_flags & BDB_lru_chained) + { oldest->release(tdbb); continue; } @@ -5051,7 +5053,7 @@ if (!isTempPage && (backup_state == nbak_state_stalled || - (backup_state == nbak_state_merge && bdb->bdb_difference_page))) + (backup_state == nbak_state_merge && bdb->bdb_difference_page))) { const bool res = dbb->dbb_backup_manager->writeDifference(status, Modified: firebird/trunk/src/jrd/cch.h =================================================================== --- firebird/trunk/src/jrd/cch.h 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/src/jrd/cch.h 2011-06-24 06:34:16 UTC (rev 53218) @@ -177,7 +177,7 @@ class BufferDesc : public pool_alloc<type_bdb> { public: - BufferDesc(BufferControl* bcb) + explicit BufferDesc(BufferControl* bcb) : bdb_bcb(bcb), bdb_page(0, 0), bdb_pending_page(0, 0) Modified: firebird/trunk/src/jrd/flu.h =================================================================== --- firebird/trunk/src/jrd/flu.h 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/src/jrd/flu.h 2011-06-24 06:34:16 UTC (rev 53218) @@ -77,7 +77,7 @@ Firebird::RefPtr<InternalModule> interMod; - Module(InternalModule* h) + explicit Module(InternalModule* h) : interMod(h) { } Modified: firebird/trunk/src/jrd/intl.cpp =================================================================== --- firebird/trunk/src/jrd/intl.cpp 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/src/jrd/intl.cpp 2011-06-24 06:34:16 UTC (rev 53218) @@ -349,7 +349,7 @@ } Jrd::Attachment* att = tdbb->getAttachment(); - Jrd::Attachment::CheckoutLockGuard guard(att, createCollationMtx); // are we need it ? + Jrd::Attachment::CheckoutLockGuard guard(att, createCollationMtx); // do we need it ? Collation* to_delete = NULL; Modified: firebird/trunk/src/jrd/jrd.cpp =================================================================== --- firebird/trunk/src/jrd/jrd.cpp 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/src/jrd/jrd.cpp 2011-06-24 06:34:16 UTC (rev 53218) @@ -471,7 +471,7 @@ class DatabaseContextHolder : public Jrd::ContextPoolHolder { public: - DatabaseContextHolder(thread_db* tdbb) + explicit DatabaseContextHolder(thread_db* tdbb) : Jrd::ContextPoolHolder(tdbb, tdbb->getDatabase()->dbb_permanent), savedTdbb(tdbb) { @@ -7281,6 +7281,9 @@ try { + if (tpb_length > 0 && tpb == NULL) + status_exception::raise(Arg::Gds(isc_bad_tpb_form)); + jrd_tra* transaction = TRA_start(tdbb, tpb_length, tpb); transaction->tra_sibling = NULL; Modified: firebird/trunk/src/jrd/lck.cpp =================================================================== --- firebird/trunk/src/jrd/lck.cpp 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/src/jrd/lck.cpp 2011-06-24 06:34:16 UTC (rev 53218) @@ -108,8 +108,8 @@ { if (tdbb->getDatabase()->dbb_config->getSharedCache()) return (LOCK_OWNER_T) getpid() << 32 | tdbb->getAttachment()->att_lock_owner_id; - else - return (LOCK_OWNER_T) getpid() << 32 | tdbb->getDatabase()->dbb_lock_owner_id; + + return (LOCK_OWNER_T) getpid() << 32 | tdbb->getDatabase()->dbb_lock_owner_id; } inline SLONG* LCK_OWNER_HANDLE_DBB(thread_db* tdbb) @@ -121,8 +121,8 @@ { if (tdbb->getDatabase()->dbb_config->getSharedCache()) return &tdbb->getAttachment()->att_lock_owner_handle; - else - return &tdbb->getDatabase()->dbb_lock_owner_handle; + + return &tdbb->getDatabase()->dbb_lock_owner_handle; } Modified: firebird/trunk/src/jrd/tpc.cpp =================================================================== --- firebird/trunk/src/jrd/tpc.cpp 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/src/jrd/tpc.cpp 2011-06-24 06:34:16 UTC (rev 53218) @@ -406,7 +406,7 @@ #endif // hvlad: No need to cache TIP pages below hdr_oldest just refreshed from - // header page. Moreover out tip cache can now contain an gap between last + // header page. Moreover out tip cache can now contain a gap between the last // cached tip page and new pages if our process was idle for long time oldest = MAX(oldest, hdr_oldest); Modified: firebird/trunk/src/jrd/tpc_proto.h =================================================================== --- firebird/trunk/src/jrd/tpc_proto.h 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/src/jrd/tpc_proto.h 2011-06-24 06:34:16 UTC (rev 53218) @@ -39,7 +39,7 @@ class TipCache { public: - TipCache(Database* dbb); + explicit TipCache(Database* dbb); ~TipCache(); int cacheState(thread_db*, SLONG number); Modified: firebird/trunk/src/jrd/vio.cpp =================================================================== --- firebird/trunk/src/jrd/vio.cpp 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/src/jrd/vio.cpp 2011-06-24 06:34:16 UTC (rev 53218) @@ -4273,7 +4273,8 @@ for (attachment = dbb->dbb_attachments; attachment; attachment = attachment->att_next) { - if (attachment->att_flags & ATT_notify_gc) { + if (attachment->att_flags & ATT_notify_gc) + { attachment->att_flags &= ~ATT_notify_gc; attachment->att_flags |= ATT_disable_notify_gc; } @@ -4290,7 +4291,8 @@ for (attachment = dbb->dbb_attachments; attachment; attachment = attachment->att_next) { - if (attachment->att_flags & ATT_disable_notify_gc) { + if (attachment->att_flags & ATT_disable_notify_gc) + { attachment->att_flags &= ~ATT_disable_notify_gc; attachment->att_flags |= ATT_notify_gc; } Modified: firebird/trunk/src/remote/client/interface.cpp =================================================================== --- firebird/trunk/src/remote/client/interface.cpp 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/src/remote/client/interface.cpp 2011-06-24 06:34:16 UTC (rev 53218) @@ -147,7 +147,7 @@ virtual int FB_CARG seek(IStatus* status, int mode, int offset); // returns position public: - Blob(Rbl* handle) + explicit Blob(Rbl* handle) : blob(handle) { } Modified: firebird/trunk/src/yvalve/DistributedTransaction.cpp =================================================================== --- firebird/trunk/src/yvalve/DistributedTransaction.cpp 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/src/yvalve/DistributedTransaction.cpp 2011-06-24 06:34:16 UTC (rev 53218) @@ -83,7 +83,7 @@ RWLock rwLock; bool limbo; - DTransaction(const SubArray& aSub) + explicit DTransaction(const SubArray& aSub) : sub(getPool()), limbo(false) { sub.assign(aSub); Modified: firebird/trunk/src/yvalve/PluginManager.cpp =================================================================== --- firebird/trunk/src/yvalve/PluginManager.cpp 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/src/yvalve/PluginManager.cpp 2011-06-24 06:34:16 UTC (rev 53218) @@ -320,7 +320,7 @@ #endif // This is called only by unregister module // when current module is forced to go away by OS. - // Do not unload it ourself in this case. + // Do not unload it ourselves in this case. addRef(); } else if (next) @@ -900,7 +900,7 @@ // Module cleanup should be unregistered only if it's unloaded // and only if it's unloaded not by PluginManager, but by OS. // That means that task is closing unexpectedly - sooner of all - // exit() is called by client of embedded server. Shutdown ourself. + // exit() is called by client of embedded server. Shutdown ourselves. fb_shutdown(5000, fb_shutrsn_exit_called); } Modified: firebird/trunk/src/yvalve/YObjects.h =================================================================== --- firebird/trunk/src/yvalve/YObjects.h 2011-06-23 14:54:42 UTC (rev 53217) +++ firebird/trunk/src/yvalve/YObjects.h 2011-06-24 06:34:16 UTC (rev 53218) @@ -117,7 +117,7 @@ class YHelper : public Firebird::StdPlugin<Intf, Vers>, public YObject { public: - YHelper(Intf* aNext); + explicit YHelper(Intf* aNext); int FB_CARG release() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-06-25 03:17:30
|
Revision: 53233 http://firebird.svn.sourceforge.net/firebird/?rev=53233&view=rev Author: firebirds Date: 2011-06-25 03:17:23 +0000 (Sat, 25 Jun 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-06-24 13:14:27 UTC (rev 53232) +++ firebird/trunk/ChangeLog 2011-06-25 03:17:23 UTC (rev 53233) @@ -1,3 +1,68 @@ + 2011-06-24 12:54 hvlad + M src/jrd/tra.cpp + M src/jrd/vio.cpp + M src/jrd/vio_proto.h +Improvement CORE-3537 : There is no need to undo changes made in GTT created with ON COMMIT DELETE ROWS option when transaction is rolled back. + + 2011-06-24 12:49 hvlad + M src/jrd/Attachment.h + M src/jrd/tra.cpp + M src/jrd/tra.h + M src/jrd/vio.cpp +Improvement CORE-3536 : Garbage collection in GTT is unnecessary delayed by active transactions in another attachments + + 2011-06-24 12:03 hvlad + M src/jrd/vio.cpp +Delete deferred work when savepoint is cleaned up after failure even if no records was modified. Else DFW task will be repeated at commit making system tables logically inconsistent. + + 2011-06-24 08:44 hvlad + M src/jrd/cch.cpp +Missed lock + + 2011-06-24 08:39 hvlad + M src/jrd/nbak.cpp + M src/jrd/nbak.h +Fixed bug CORE-3535 : Write target of dirty page could be undefined if error happens when nbackup state is changed. +Also prevent overwriting of first page of allocation table by data page contents. + + 2011-06-24 07:55 hvlad + M src/jrd/nbak.h +Additional patch for CORE-3521. +When CCH_flush() is called after last disconnect there is no attachment. + + 2011-06-24 06:35 robocop + M src/jrd/blb.cpp +Misc. + + 2011-06-24 06:34 robocop + M examples/udr/UdrCppExample.cpp + M src/common/IntlUtil.h + M src/common/classes/ImplementHelper.h + M src/common/classes/SyncObject.cpp + M src/common/classes/SyncObject.h + M src/common/classes/Synchronize.cpp + M src/common/classes/Synchronize.h + M src/jrd/Attachment.h + M src/jrd/DatabaseSnapshot.cpp + M src/jrd/EngineInterface.h + M src/jrd/ExtEngineManager.cpp + M src/jrd/ExtEngineManager.h + M src/jrd/GarbageCollector.cpp + M src/jrd/cch.cpp + M src/jrd/cch.h + M src/jrd/flu.h + M src/jrd/intl.cpp + M src/jrd/jrd.cpp + M src/jrd/lck.cpp + M src/jrd/tpc.cpp + M src/jrd/tpc_proto.h + M src/jrd/vio.cpp + M src/remote/client/interface.cpp + M src/yvalve/DistributedTransaction.cpp + M src/yvalve/PluginManager.cpp + M src/yvalve/YObjects.h +Misc. + 2011-06-22 00:30 asfernandes M src/dsql/DdlNodes.epp Misc. Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-06-24 13:14:27 UTC (rev 53232) +++ firebird/trunk/src/jrd/build_no.h 2011-06-25 03:17:23 UTC (rev 53233) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29461 + FORMAL BUILD NUMBER:29469 */ -#define PRODUCT_VER_STRING "3.0.0.29461" -#define FILE_VER_STRING "WI-T3.0.0.29461" -#define LICENSE_VER_STRING "WI-T3.0.0.29461" -#define FILE_VER_NUMBER 3, 0, 0, 29461 +#define PRODUCT_VER_STRING "3.0.0.29469" +#define FILE_VER_STRING "WI-T3.0.0.29469" +#define LICENSE_VER_STRING "WI-T3.0.0.29469" +#define FILE_VER_NUMBER 3, 0, 0, 29469 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29461" +#define FB_BUILD_NO "29469" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-06-24 13:14:27 UTC (rev 53232) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-06-25 03:17:23 UTC (rev 53233) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29461 +BuildNum=29469 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-06-26 03:17:09
|
Revision: 53238 http://firebird.svn.sourceforge.net/firebird/?rev=53238&view=rev Author: firebirds Date: 2011-06-26 03:17:03 +0000 (Sun, 26 Jun 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-06-25 18:13:25 UTC (rev 53237) +++ firebird/trunk/ChangeLog 2011-06-26 03:17:03 UTC (rev 53238) @@ -1,3 +1,12 @@ + 2011-06-25 18:13 asfernandes + M src/dsql/parse.y +Warning. + + 2011-06-25 03:40 robocop + M src/jrd/tra.cpp + M src/jrd/vio.cpp +Misc. + 2011-06-24 12:54 hvlad M src/jrd/tra.cpp M src/jrd/vio.cpp Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-06-25 18:13:25 UTC (rev 53237) +++ firebird/trunk/src/jrd/build_no.h 2011-06-26 03:17:03 UTC (rev 53238) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29469 + FORMAL BUILD NUMBER:29471 */ -#define PRODUCT_VER_STRING "3.0.0.29469" -#define FILE_VER_STRING "WI-T3.0.0.29469" -#define LICENSE_VER_STRING "WI-T3.0.0.29469" -#define FILE_VER_NUMBER 3, 0, 0, 29469 +#define PRODUCT_VER_STRING "3.0.0.29471" +#define FILE_VER_STRING "WI-T3.0.0.29471" +#define LICENSE_VER_STRING "WI-T3.0.0.29471" +#define FILE_VER_NUMBER 3, 0, 0, 29471 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29469" +#define FB_BUILD_NO "29471" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-06-25 18:13:25 UTC (rev 53237) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-06-26 03:17:03 UTC (rev 53238) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29469 +BuildNum=29471 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <asf...@us...> - 2011-06-26 15:58:02
|
Revision: 53242 http://firebird.svn.sourceforge.net/firebird/?rev=53242&view=rev Author: asfernandes Date: 2011-06-26 15:57:55 +0000 (Sun, 26 Jun 2011) Log Message: ----------- Work in progress on message-based external functions and procedures. Modified Paths: -------------- firebird/trunk/builds/win32/msvc9/Firebird3_Examples.sln firebird/trunk/examples/udr/UdrCppExample.cpp firebird/trunk/src/include/firebird/UdrCppEngine.h firebird/trunk/src/misc/copy-boost.sh Added Paths: ----------- firebird/trunk/src/include/firebird/Message.h firebird/trunk/src/include/ibase.h Modified: firebird/trunk/builds/win32/msvc9/Firebird3_Examples.sln =================================================================== --- firebird/trunk/builds/win32/msvc9/Firebird3_Examples.sln 2011-06-26 15:56:56 UTC (rev 53241) +++ firebird/trunk/builds/win32/msvc9/Firebird3_Examples.sln 2011-06-26 15:57:55 UTC (rev 53242) @@ -13,12 +13,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "udrcpp_example", "udrcpp_example.vcproj", "{FF0FD8DF-1E5C-486E-B395-A620376A4633}" ProjectSection(ProjectDependencies) = postProject {20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B} = {20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B} + {4FE03933-98CD-4879-A135-FD9430087A6B} = {4FE03933-98CD-4879-A135-FD9430087A6B} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "udr_engine", "udr_engine.vcproj", "{20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}" ProjectSection(ProjectDependencies) = postProject + {4FE03933-98CD-4879-A135-FD9430087A6B} = {4FE03933-98CD-4879-A135-FD9430087A6B} {15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465} - {4FE03933-98CD-4879-A135-FD9430087A6B} = {4FE03933-98CD-4879-A135-FD9430087A6B} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "common.vcproj", "{15605F44-BFFD-444F-AD4C-55DC9D704465}" @@ -52,25 +53,33 @@ {9546EF04-1326-464B-A6ED-395C60DD63CC}.Debug|x64.ActiveCfg = Debug|x64 {9546EF04-1326-464B-A6ED-395C60DD63CC}.Debug|x64.Build.0 = Debug|x64 {9546EF04-1326-464B-A6ED-395C60DD63CC}.Release|Win32.ActiveCfg = Release|Win32 + {9546EF04-1326-464B-A6ED-395C60DD63CC}.Release|Win32.Build.0 = Release|Win32 {9546EF04-1326-464B-A6ED-395C60DD63CC}.Release|x64.ActiveCfg = Release|x64 + {9546EF04-1326-464B-A6ED-395C60DD63CC}.Release|x64.Build.0 = Release|x64 {FF0FD8DF-1E5C-486E-B395-A620376A4633}.Debug|Win32.ActiveCfg = Debug|Win32 {FF0FD8DF-1E5C-486E-B395-A620376A4633}.Debug|Win32.Build.0 = Debug|Win32 - {FF0FD8DF-1E5C-486E-B395-A620376A4633}.Debug|x64.ActiveCfg = Debug|Win32 + {FF0FD8DF-1E5C-486E-B395-A620376A4633}.Debug|x64.ActiveCfg = Debug|x64 + {FF0FD8DF-1E5C-486E-B395-A620376A4633}.Debug|x64.Build.0 = Debug|x64 {FF0FD8DF-1E5C-486E-B395-A620376A4633}.Release|Win32.ActiveCfg = Release|Win32 {FF0FD8DF-1E5C-486E-B395-A620376A4633}.Release|Win32.Build.0 = Release|Win32 - {FF0FD8DF-1E5C-486E-B395-A620376A4633}.Release|x64.ActiveCfg = Release|Win32 + {FF0FD8DF-1E5C-486E-B395-A620376A4633}.Release|x64.ActiveCfg = Release|x64 + {FF0FD8DF-1E5C-486E-B395-A620376A4633}.Release|x64.Build.0 = Release|x64 {20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}.Debug|Win32.ActiveCfg = Debug|Win32 {20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}.Debug|Win32.Build.0 = Debug|Win32 - {20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}.Debug|x64.ActiveCfg = Debug|Win32 + {20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}.Debug|x64.ActiveCfg = Debug|x64 + {20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}.Debug|x64.Build.0 = Debug|x64 {20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}.Release|Win32.ActiveCfg = Release|Win32 {20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}.Release|Win32.Build.0 = Release|Win32 - {20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}.Release|x64.ActiveCfg = Release|Win32 + {20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}.Release|x64.ActiveCfg = Release|x64 + {20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}.Release|x64.Build.0 = Release|x64 {15605F44-BFFD-444F-AD4C-55DC9D704465}.Debug|Win32.ActiveCfg = Debug|Win32 {15605F44-BFFD-444F-AD4C-55DC9D704465}.Debug|Win32.Build.0 = Debug|Win32 - {15605F44-BFFD-444F-AD4C-55DC9D704465}.Debug|x64.ActiveCfg = Debug|Win32 + {15605F44-BFFD-444F-AD4C-55DC9D704465}.Debug|x64.ActiveCfg = Debug|x64 + {15605F44-BFFD-444F-AD4C-55DC9D704465}.Debug|x64.Build.0 = Debug|x64 {15605F44-BFFD-444F-AD4C-55DC9D704465}.Release|Win32.ActiveCfg = Release|Win32 {15605F44-BFFD-444F-AD4C-55DC9D704465}.Release|Win32.Build.0 = Release|Win32 - {15605F44-BFFD-444F-AD4C-55DC9D704465}.Release|x64.ActiveCfg = Release|Win32 + {15605F44-BFFD-444F-AD4C-55DC9D704465}.Release|x64.ActiveCfg = Release|x64 + {15605F44-BFFD-444F-AD4C-55DC9D704465}.Release|x64.Build.0 = Release|x64 {4FE03933-98CD-4879-A135-FD9430087A6B}.Debug|Win32.ActiveCfg = Debug|Win32 {4FE03933-98CD-4879-A135-FD9430087A6B}.Debug|Win32.Build.0 = Debug|Win32 {4FE03933-98CD-4879-A135-FD9430087A6B}.Debug|x64.ActiveCfg = Debug|x64 Modified: firebird/trunk/examples/udr/UdrCppExample.cpp =================================================================== --- firebird/trunk/examples/udr/UdrCppExample.cpp 2011-06-26 15:56:56 UTC (rev 53241) +++ firebird/trunk/examples/udr/UdrCppExample.cpp 2011-06-26 15:57:55 UTC (rev 53242) @@ -275,7 +275,7 @@ class MessageImpl : public Firebird::FbMessage { public: - MessageImpl(unsigned aItemCount, ISC_UCHAR* aBuffer = NULL) + MessageImpl(unsigned aItemCount, void* aBuffer = NULL) : itemCount(aItemCount * 2), freeBuffer(!aBuffer), items(0) @@ -289,7 +289,7 @@ blrLength = 0; blr = blrPos = new ISC_UCHAR[sizeof(HEADER) + 10 * itemCount + 2]; bufferLength = 0; - buffer = aBuffer; + buffer = (ISC_UCHAR*) aBuffer; memcpy(blrPos, HEADER, sizeof(HEADER)); blrPos += sizeof(HEADER); @@ -564,14 +564,46 @@ /*** create function wait_event ( - event_name varchar(31) character set ascii not null + event_name varchar(31) character set utf8 not null ) returns integer not null external name 'udrcpp_example!wait_event' engine udr; ***/ -FB_UDR_DECLARE_FUNCTION(wait_event) +FB_UDR_BEGIN_FUNCTION(wait_event) + FB_UDR_EXECUTE_MESSAGE_FUNCTION( + (FB_VARCHAR(31 * 4), name) + , + (FB_INTEGER, result)) + { + char* s = new char[in->name.length + 1]; + memcpy(s, in->name.str, in->name.length); + s[in->name.length] = '\0'; + unsigned char* eveBuffer; + unsigned char* eveResult; + int eveLen = isc_event_block(&eveBuffer, &eveResult, 1, s); + delete [] s; + + ISC_STATUS_ARRAY statusVector = {0}; + isc_db_handle dbHandle = getIscDbHandle(context); + ISC_ULONG counter = 0; + + ThrowError::check(isc_wait_for_event(statusVector, &dbHandle, eveLen, eveBuffer, eveResult), + statusVector); + isc_event_counts(&counter, eveLen, eveBuffer, eveResult); + ThrowError::check(isc_wait_for_event(statusVector, &dbHandle, eveLen, eveBuffer, eveResult), + statusVector); + isc_event_counts(&counter, eveLen, eveBuffer, eveResult); + + isc_free((char*) eveBuffer); + isc_free((char*) eveResult); + + out->result = counter; + } +FB_UDR_END_FUNCTION + + /*** create function sum_args ( n1 integer, @@ -581,9 +613,42 @@ external name 'udrcpp_example!sum_args' engine udr; ***/ -FB_UDR_DECLARE_FUNCTION(sum_args) +FB_UDR_BEGIN_FUNCTION(sum_args) + FB_UDR_EXECUTE_DYNAMIC_FUNCTION + { + AutoDispose<IStatus> status(master->getStatus()); + const IParametersMetadata* params = metadata->getInputParameters(status); + ThrowError::check(status->get()); + unsigned count = params->getCount(status); + ThrowError::check(status->get()); + + MessageImpl inMessage(count, in); + + MessageImpl outMessage(1, out); + ParamDesc<ISC_LONG> retDesc(outMessage); + + int ret = 0; + + for (unsigned i = 0; i < count; ++i) + { + ParamDesc<ISC_LONG> numDesc(inMessage); + + if (inMessage.isNull(numDesc)) + { + outMessage.setNull(retDesc, true); + return; + } + else + ret += inMessage[numDesc]; + } + + outMessage[retDesc] = ret; + } +FB_UDR_END_FUNCTION + + /*** create procedure gen_rows ( start_n integer not null, @@ -594,14 +659,143 @@ external name 'udrcpp_example!gen_rows' engine udr; ***/ -FB_UDR_DECLARE_PROCEDURE(gen_rows) -FB_UDR_BEGIN_DECLARE_FETCH_PROCEDURE(gen_rows) - int counter; - int end; -FB_UDR_END_DECLARE_FETCH_PROCEDURE(gen_rows) +FB_UDR_BEGIN_PROCEDURE(gen_rows) + FB_UDR_EXECUTE_DYNAMIC_PROCEDURE + { + MessageImpl inMessage(2, inMsg); + ParamDesc<ISC_LONG> startDesc(inMessage); + ParamDesc<ISC_LONG> endDesc(inMessage); + counter = inMessage[startDesc]; + end = inMessage[endDesc]; + } + FB_UDR_FETCH_PROCEDURE + { + if (counter > end) + return false; + + MessageImpl outMessage(1, out); + ParamDesc<ISC_LONG> retDesc(outMessage); + + outMessage[retDesc] = counter++; + + return true; + } + + ISC_LONG counter; + ISC_LONG end; +FB_UDR_END_PROCEDURE + + /*** +create procedure gen_rows2 ( + start_n integer not null, + end_n integer not null +) returns ( + n integer not null +) + external name 'udrcpp_example!gen_rows2' + engine udr; +***/ +FB_UDR_BEGIN_PROCEDURE(gen_rows2) + FB_UDR_EXECUTE_MESSAGE_PROCEDURE( + (FB_INTEGER, start) + (FB_INTEGER, end) + , + (FB_INTEGER, result)) + { + out->result = in->start - 1; + } + + FB_UDR_FETCH_PROCEDURE + { + return out->result++ < in->end; + } +FB_UDR_END_PROCEDURE + + +/*** +create procedure inc ( + count_n integer not null +) returns ( + n0 integer not null, + n1 integer not null, + n2 integer not null, + n3 integer not null, + n4 integer not null +) + external name 'udrcpp_example!inc' + engine udr; +***/ +// This is a sample procedure demonstrating how the scopes of variables works. +// n1 and n2 are on the Procedure scope, i.e., they're shared for each execution of the same cached +// metadata object. +// n3 and n4 are on the ResultSet scope, i.e., each procedure execution have they own instances. +FB_UDR_BEGIN_PROCEDURE(inc) + ISC_LONG n1; + + // This is how a procedure (class) initializer is written. + // ResultSet variables are not accessible here. + // If there is nothing to initialize, it can be completelly suppressed. + FB_UDR_PROCEDURE(inc)() + : n1(0), + n2(0) + { + } + + ISC_LONG n2; + + // FB_UDR_EXECUTE_MESSAGE_PROCEDURE or FB_UDR_EXECUTE_DYNAMIC_PROCEDURE starts the ResultSet scope. + FB_UDR_EXECUTE_MESSAGE_PROCEDURE( + (FB_INTEGER, count) + , + (FB_INTEGER, n0) + (FB_INTEGER, n1) + (FB_INTEGER, n2) + (FB_INTEGER, n3) + (FB_INTEGER, n4)) + // This is the ResultSet (class) initializer. If there is nothing to initialize, the comma + // should be suppressed. + , + n3(procedure->n1), // n3 will start with the next value for n1 of the last execution + n4(0) + { + out->n0 = 0; + + // In the execute method, the procedure scope must be accessed using the 'procedure' pointer. + procedure->n1 = 0; + + // We don't touch n2 here, so it incremented counter will be kept after each execution. + + // The ResultSet scope must be accessed directly, i.e., they're member variables of the + // 'this' pointer. + ++n4; + } + + ISC_LONG n3; + + // FB_UDR_FETCH must be always after FB_UDR_EXECUTE_MESSAGE_PROCEDURE or + // FB_UDR_EXECUTE_DYNAMIC_PROCEDURE. + FB_UDR_FETCH_PROCEDURE + { + if (out->n0++ <= in->count) + { + out->n1 = ++procedure->n1; + out->n2 = ++procedure->n2; + out->n3 = ++n3; + out->n4 = ++n4; + return true; + } + + return false; + } + + ISC_LONG n4; +FB_UDR_END_PROCEDURE + + +/*** Sample usage: create database 'c:\temp\slave.fdb'; @@ -645,110 +839,9 @@ bool initialized; XSQLDA* inSqlDa; isc_stmt_handle stmtHandle; -#if 0 - IStatement* stmt; -#endif FB_UDR_END_DECLARE_TRIGGER(replicate) -FB_UDR_BEGIN_FUNCTION(wait_event) -{ - MessageImpl inMessage(1, inMsg); - ParamDesc<FbString> nameDesc(inMessage, 31); - - FbString& name = inMessage[nameDesc]; - - char* s = new char[name.length + 1]; - memcpy(s, name.str, name.length); - s[name.length] = '\0'; - - unsigned char* eveBuffer; - unsigned char* eveResult; - int eveLen = isc_event_block(&eveBuffer, &eveResult, 1, s); - - delete [] s; - - ISC_STATUS_ARRAY statusVector = {0}; - isc_db_handle dbHandle = getIscDbHandle(context); - ISC_ULONG counter = 0; - - ThrowError::check(isc_wait_for_event(statusVector, &dbHandle, eveLen, eveBuffer, eveResult), - statusVector); - isc_event_counts(&counter, eveLen, eveBuffer, eveResult); - ThrowError::check(isc_wait_for_event(statusVector, &dbHandle, eveLen, eveBuffer, eveResult), - statusVector); - isc_event_counts(&counter, eveLen, eveBuffer, eveResult); - - isc_free((char*) eveBuffer); - isc_free((char*) eveResult); - - MessageImpl outMessage(1, outMsg); - ParamDesc<ISC_LONG> retDesc(outMessage); - - outMessage[retDesc] = counter; -} -FB_UDR_END_FUNCTION(wait_event) - - -FB_UDR_BEGIN_FUNCTION(sum_args) -{ - AutoDispose<IStatus> status(master->getStatus()); - - const IParametersMetadata* params = metadata->getInputParameters(status); - ThrowError::check(status->get()); - - unsigned count = params->getCount(status); - ThrowError::check(status->get()); - - MessageImpl inMessage(count, inMsg); - - MessageImpl outMessage(1, outMsg); - ParamDesc<ISC_LONG> retDesc(outMessage); - - int ret = 0; - - for (unsigned i = 0; i < count; ++i) - { - ParamDesc<ISC_LONG> numDesc(inMessage); - - if (inMessage.isNull(numDesc)) - { - outMessage.setNull(retDesc, true); - return; - } - - ret += inMessage[numDesc]; - } - - outMessage[retDesc] = ret; -} -FB_UDR_END_FUNCTION(sum_args) - - -FB_UDR_BEGIN_PROCEDURE(gen_rows) -{ - MessageImpl inMessage(2, inMsg); - ParamDesc<ISC_LONG> startDesc(inMessage); - ParamDesc<ISC_LONG> endDesc(inMessage); - - counter = inMessage[startDesc]; - end = inMessage[endDesc]; -} -FB_UDR_FETCH_PROCEDURE(gen_rows) -{ - if (counter > end) - return false; - - MessageImpl outMessage(1, outMsg); - ParamDesc<ISC_LONG> retDesc(outMessage); - - outMessage[retDesc] = counter++; - - return true; -} -FB_UDR_END_PROCEDURE(gen_rows) - - FB_UDR_TRIGGER(replicate)::FB_UDR_TRIGGER(replicate)() : initialized(false) { Added: firebird/trunk/src/include/firebird/Message.h =================================================================== --- firebird/trunk/src/include/firebird/Message.h (rev 0) +++ firebird/trunk/src/include/firebird/Message.h 2011-06-26 15:57:55 UTC (rev 53242) @@ -0,0 +1,112 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl. + * + * Software distributed under the License is distributed AS IS, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. + * See the License for the specific language governing rights + * and limitations under the License. + * + * The Original Code was created by Adriano dos Santos Fernandes + * for the Firebird Open Source RDBMS project. + * + * Copyright (c) 2011 Adriano dos Santos Fernandes <adr...@uo...> + * and all contributors signed below. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + */ + +#ifndef FIREBIRD_MESSAGE_H +#define FIREBIRD_MESSAGE_H + +#include "ibase.h" +#include "firebird/impl/boost/preprocessor/seq/for_each_i.hpp" + +#define FB_MESSAGE(name, fields) \ + FB_MESSAGE_I(name, FB_BOOST_PP_CAT(FB_MESSAGE_X fields, 0)) + +#define FB_MESSAGE_X(x, y) ((x, y)) FB_MESSAGE_Y +#define FB_MESSAGE_Y(x, y) ((x, y)) FB_MESSAGE_X +#define FB_MESSAGE_X0 +#define FB_MESSAGE_Y0 + +#define FB_MESSAGE_I(name, fields) \ + struct name \ + { \ + /* TODO: use it */ \ + static const unsigned char* BLR() \ + { \ + static const unsigned char blr[] = { \ + blr_version5, \ + blr_begin, \ + blr_message, 0, \ + (2 * (FB_BOOST_PP_SEQ_SIZE(fields))) & 0xFF, \ + (2 * (FB_BOOST_PP_SEQ_SIZE(fields))) >> 8, \ + FB_BOOST_PP_SEQ_FOR_EACH_I(FB_MESSAGE_BLR, _, fields) \ + blr_end, \ + blr_eoc \ + }; \ + return blr; \ + } \ + \ + static unsigned SIZE() \ + { \ + return (unsigned)(size_t) (&((name*) 0)->FB_BOOST_PP_CAT( \ + FB_BOOST_PP_TUPLE_ELEM(2, 1, \ + FB_BOOST_PP_SEQ_ELEM(FB_BOOST_PP_DEC(FB_BOOST_PP_SEQ_SIZE(fields)), fields)), \ + Null) - 0) + sizeof(ISC_SHORT); \ + } \ + \ + FB_BOOST_PP_SEQ_FOR_EACH_I(FB_MESSAGE_FIELD, _, fields) \ + }; + +#define FB_MESSAGE_FIELD(r, _, i, xy) \ + FB_BOOST_PP_CAT(FB_TYPE_, FB_BOOST_PP_TUPLE_ELEM(2, 0, xy)) FB_BOOST_PP_TUPLE_ELEM(2, 1, xy); \ + ISC_SHORT FB_BOOST_PP_CAT(FB_BOOST_PP_TUPLE_ELEM(2, 1, xy), Null); + +#define FB_MESSAGE_BLR(r, _, i, xy) \ + FB_BOOST_PP_CAT(FB_BLR_, FB_BOOST_PP_TUPLE_ELEM(2, 0, xy)), \ + FB_BLR_FB_SMALLINT, + +//// TODO: more types +#define FB_BLR_FB_SCALED_SMALLINT(scale) blr_short, (scale) +#define FB_BLR_FB_SCALED_INTEGER(scale) blr_long, (scale) +#define FB_BLR_FB_SCALED_BIGINT(scale) blr_int64, (scale) +#define FB_BLR_FB_SMALLINT FB_BLR_FB_SCALED_SMALLINT(0) +#define FB_BLR_FB_INTEGER FB_BLR_FB_SCALED_INTEGER(0) +#define FB_BLR_FB_BIGINT FB_BLR_FB_SCALED_BIGINT(0) +#define FB_BLR_FB_VARCHAR(len) blr_varying, (len) & 0xFF, (len) >> 8 + +#define FB_TYPE_FB_SCALED_SMALLINT(x) ISC_SHORT +#define FB_TYPE_FB_SCALED_INTEGER(x) ISC_LONG +#define FB_TYPE_FB_SCALED_BIGINT(x) ISC_INT64 +#define FB_TYPE_FB_SMALLINT ISC_SHORT +#define FB_TYPE_FB_INTEGER ISC_LONG +#define FB_TYPE_FB_BIGINT ISC_INT64 +#define FB_TYPE_FB_VARCHAR(len) FbVarChar<(len)> + + +namespace Firebird { + + +template <unsigned N> +struct FbVarChar +{ + ISC_USHORT length; + char str[N]; + + void set(const char* s) + { + length = strlen(s); + memcpy(str, s, length); + } +}; + + +} // namespace Firebird + +#endif // FIREBIRD_MESSAGE_H Property changes on: firebird/trunk/src/include/firebird/Message.h ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Modified: firebird/trunk/src/include/firebird/UdrCppEngine.h =================================================================== --- firebird/trunk/src/include/firebird/UdrCppEngine.h 2011-06-26 15:56:56 UTC (rev 53241) +++ firebird/trunk/src/include/firebird/UdrCppEngine.h 2011-06-26 15:57:55 UTC (rev 53242) @@ -20,11 +20,12 @@ * Contributor(s): ______________________________________. */ -#ifndef FIREBIRD_PLUGIN_UDR_CPP -#define FIREBIRD_PLUGIN_UDR_CPP +#ifndef FIREBIRD_UDR_CPP_ENGINE +#define FIREBIRD_UDR_CPP_ENGINE #include "./ExternalEngine.h" #include "./UdrEngine.h" +#include "./Message.h" #ifndef JRD_IBASE_H #include "ibase.h" #include "iberror.h" @@ -44,29 +45,41 @@ #define FB_UDR_TRIGGER(name) Trig##name -#define FB_UDR_BEGIN_DECLARE_FUNCTION(name) \ - class FB_UDR_FUNCTION(name) : public ::Firebird::Udr::Function \ +#define FB_UDR_BEGIN_FUNCTION(name) \ + class FB_UDR_FUNCTION(name); \ + \ + ::Firebird::Udr::FunctionFactoryImpl<FB_UDR_FUNCTION(name)> FuncFactory##name(#name); \ + \ + class FB_UDR_FUNCTION(name) : public ::Firebird::Udr::Function<FB_UDR_FUNCTION(name)> \ { \ - public: \ - virtual void FB_CALL execute(::Firebird::Error* error, ::Firebird::ExternalContext* context, \ - UCHAR* inMsg, UCHAR* outMsg); \ - private: + public: -#define FB_UDR_END_DECLARE_FUNCTION(name) \ +#define FB_UDR_END_FUNCTION \ }; -#define FB_UDR_DECLARE_FUNCTION(name) \ - FB_UDR_BEGIN_DECLARE_FUNCTION(name) \ - FB_UDR_END_DECLARE_FUNCTION(name) +#define FB_UDR_EXECUTE_DYNAMIC_FUNCTION \ + typedef void* InMessage; \ + typedef void* OutMessage; \ + \ + FB_UDR_EXECUTE__FUNCTION -#define FB_UDR_BEGIN_FUNCTION(name) \ - void FB_CALL FB_UDR_FUNCTION(name)::execute(::Firebird::Error* error, \ - ::Firebird::ExternalContext* context, UCHAR* inMsg, UCHAR* outMsg) \ +#define FB_UDR_EXECUTE_MESSAGE_FUNCTION(inputs, output) \ + FB_MESSAGE(InMessage, \ + inputs \ + ) \ + FB_MESSAGE(OutMessage, \ + output \ + ) \ + \ + FB_UDR_EXECUTE__FUNCTION + +#define FB_UDR_EXECUTE__FUNCTION \ + virtual void FB_CALL execute(::Firebird::Error* error, ::Firebird::ExternalContext* context, \ + UCHAR* inMsg, UCHAR* outMsg) \ { \ try \ - { - -#define FB_UDR_END_FUNCTION(name) \ + { \ + execute(error, context, (InMessage*) inMsg, (OutMessage*) outMsg); \ } \ catch (const ::Firebird::Udr::ThrowError::Exception& e) \ { \ @@ -81,61 +94,48 @@ strlen(FB_UDR_UNRECOGNIZED_EXCEPTION)); \ } \ } \ - ::Firebird::Udr::FunctionFactoryImpl<FB_UDR_FUNCTION(name)> FuncFactory##name(#name); + \ + virtual void FB_CALL execute(::Firebird::Error* error, ::Firebird::ExternalContext* context, \ + InMessage* in, OutMessage* out) -#define FB_UDR_BEGIN_DECLARE_PROCEDURE(name) \ - class FB_UDR_PROCEDURE(name) : public ::Firebird::Udr::Procedure \ +#define FB_UDR_BEGIN_PROCEDURE(name) \ + class FB_UDR_PROCEDURE(name); \ + \ + ::Firebird::Udr::ProcedureFactoryImpl<FB_UDR_PROCEDURE(name)> ProcFactory##name(#name); \ + \ + class FB_UDR_PROCEDURE(name) : public ::Firebird::Udr::Procedure<FB_UDR_PROCEDURE(name)> \ { \ public: \ - virtual ::Firebird::ExternalResultSet* FB_CALL open(::Firebird::Error* error, \ - ::Firebird::ExternalContext* context, UCHAR* inMsg, UCHAR* outMsg); \ + typedef FB_UDR_PROCEDURE(name) This; -#define FB_UDR_END_DECLARE_PROCEDURE(name) \ +#define FB_UDR_END_PROCEDURE \ + }; \ }; -#define FB_UDR_DECLARE_PROCEDURE(name) \ - FB_UDR_BEGIN_DECLARE_PROCEDURE(name) \ - FB_UDR_END_DECLARE_PROCEDURE(name) +#define FB_UDR_EXECUTE_DYNAMIC_PROCEDURE \ + typedef void* InMessage; \ + typedef void* OutMessage; \ + \ + FB_UDR_EXECUTE__PROCEDURE -#define FB_UDR_BEGIN_DECLARE_FETCH_PROCEDURE(name) \ - class ResultSet##name : public ::Firebird::Udr::ResultSet \ - { \ - public: \ - ResultSet##name(::Firebird::Error* error, ::Firebird::ExternalContext* context, \ - ::Firebird::Udr::Procedure* procedure, UCHAR* inMsg, UCHAR* outMsg); \ +#define FB_UDR_EXECUTE_MESSAGE_PROCEDURE(inputs, outputs) \ + FB_MESSAGE(InMessage, \ + inputs \ + ) \ + FB_MESSAGE(OutMessage, \ + outputs \ + ) \ \ - public: \ - virtual bool FB_CALL fetch(::Firebird::Error* error); \ - \ - private: + FB_UDR_EXECUTE__PROCEDURE -#define FB_UDR_END_DECLARE_FETCH_PROCEDURE(name) \ - }; - -#define FB_UDR_DECLARE_FETCH_PROCEDURE(name) \ - FB_UDR_BEGIN_DECLARE_FETCH_PROCEDURE(name) \ - FB_UDR_END_DECLARE_FETCH_PROCEDURE(name) - -#define FB_UDR_DECLARE_PROCEDURE(name) \ - FB_UDR_BEGIN_DECLARE_PROCEDURE(name) \ - FB_UDR_END_DECLARE_PROCEDURE(name) - -#define FB_UDR_BEGIN_PROCEDURE(name) \ - ::Firebird::ExternalResultSet* FB_CALL Proc##name::open(::Firebird::Error* error, \ +#define FB_UDR_EXECUTE__PROCEDURE \ + virtual ::Firebird::ExternalResultSet* FB_CALL open(::Firebird::Error* error, \ ::Firebird::ExternalContext* context, UCHAR* inMsg, UCHAR* outMsg) \ { \ - return new ResultSet##name(error, context, this, inMsg, outMsg); \ - } \ - \ - ResultSet##name::ResultSet##name(::Firebird::Error* error, ::Firebird::ExternalContext* context, \ - ::Firebird::Udr::Procedure* procedure, UCHAR* inMsg, UCHAR* outMsg) \ - : ResultSet(context, procedure, inMsg, outMsg) \ - { \ try \ - { - -#define FB_UDR_FETCH_PROCEDURE(name) \ + { \ + return new ResultSet(error, context, this, (InMessage*) inMsg, (OutMessage*) outMsg); \ } \ catch (const ::Firebird::Udr::ThrowError::Exception& e) \ { \ @@ -149,14 +149,24 @@ FB_UDR_UNRECOGNIZED_EXCEPTION, \ strlen(FB_UDR_UNRECOGNIZED_EXCEPTION)); \ } \ + \ + return 0; \ } \ \ - bool FB_CALL ResultSet##name::fetch(::Firebird::Error* error) \ + class ResultSet : public ::Firebird::Udr::ResultSet<ResultSet, This, InMessage, OutMessage> \ { \ + public: \ + ResultSet(::Firebird::Error* error, ::Firebird::ExternalContext* context, \ + This* procedure, InMessage* inMsg, OutMessage* outMsg) \ + : ::Firebird::Udr::ResultSet<ResultSet, This, InMessage, OutMessage>( \ + context, procedure, inMsg, outMsg) + +#define FB_UDR_FETCH_PROCEDURE \ + virtual bool FB_CALL fetch(::Firebird::Error* error) \ + { \ try \ - { - -#define FB_UDR_END_PROCEDURE(name) \ + { \ + return fetch0(error); \ } \ catch (const ::Firebird::Udr::ThrowError::Exception& e) \ { \ @@ -170,18 +180,19 @@ FB_UDR_UNRECOGNIZED_EXCEPTION, \ strlen(FB_UDR_UNRECOGNIZED_EXCEPTION)); \ } \ - return false; \ + \ + return 0; \ } \ - ::Firebird::Udr::ProcedureFactoryImpl<FB_UDR_PROCEDURE(name)> ProcFactory##name(#name); + \ + bool FB_CALL fetch0(::Firebird::Error* error) #define FB_UDR_BEGIN_DECLARE_TRIGGER(name) \ - class FB_UDR_TRIGGER(name) : public ::Firebird::Udr::Trigger \ + class FB_UDR_TRIGGER(name) : public ::Firebird::Udr::Trigger<FB_UDR_TRIGGER(name)> \ { \ public: \ virtual void FB_CALL execute(::Firebird::Error* error, ::Firebird::ExternalContext* context, \ - ::Firebird::ExternalTrigger::Action action, UCHAR* oldMsg, UCHAR* newMsg); \ - private: + ::Firebird::ExternalTrigger::Action action, UCHAR* oldMsg, UCHAR* newMsg); #define FB_UDR_END_DECLARE_TRIGGER(name) \ }; @@ -425,7 +436,7 @@ }; -class Procedure; +template <typename T> class Procedure; class Helper @@ -456,97 +467,133 @@ }; +template <typename This, typename Procedure, typename InMessage, typename OutMessage> class ResultSet : public ExternalResultSet, public Helper { public: - ResultSet(Firebird::ExternalContext* aContext, Firebird::Udr::Procedure* aProcedure, - UCHAR* aInMsg, UCHAR* aOutMsg) + ResultSet(Firebird::ExternalContext* aContext, Procedure* aProcedure, + InMessage* aIn, OutMessage* aOut) : context(aContext), procedure(aProcedure), - inMsg(aInMsg), - outMsg(aOutMsg) + in(aIn), + out(aOut) { } - virtual ~ResultSet() - { - } - public: virtual void FB_CALL dispose(Firebird::Error* /*error*/) { - delete this; + delete static_cast<This*>(this); } protected: Firebird::ExternalContext* context; - Firebird::Udr::Procedure* procedure; - UCHAR* inMsg; - UCHAR* outMsg; + Procedure* procedure; + InMessage* in; + OutMessage* out; }; -class Function : public ExternalFunction, public Helper +// This class is used to fix an apparent bug with clang, where the object is wrongly initialized +// and overwrites the members set in the operator new. +template <typename T> +class Routine : public T { public: - virtual ~Function() + Routine() { } +}; + +template <typename This> +class Function : public ExternalFunction, public Helper +{ public: virtual void FB_CALL dispose(Error* /*error*/) { - delete this; + delete static_cast<This*>(this); } - void FB_CALL getCharSet(Error* /*error*/, ExternalContext* /*context*/, Utf8* /*name*/, uint /*nameSize*/) + virtual void FB_CALL getCharSet(Error* /*error*/, ExternalContext* /*context*/, + Utf8* /*name*/, uint /*nameSize*/) { } + void* operator new(size_t size, const IRoutineMetadata* metadata) + { + Function* p = reinterpret_cast<Function*>(::new char[size]); + p->metadata = metadata; + return p; + } + + void operator delete(void* p) + { + ::delete [] static_cast<char*>(p); + } + public: const IRoutineMetadata* metadata; }; +template <typename This> class Procedure : public ExternalProcedure, public Helper { public: - virtual ~Procedure() + virtual void FB_CALL dispose(Error* /*error*/) { + delete static_cast<This*>(this); } -public: - virtual void FB_CALL dispose(Error* /*error*/) + virtual void FB_CALL getCharSet(Error* /*error*/, ExternalContext* /*context*/, + Utf8* /*name*/, uint /*nameSize*/) { - delete this; } - void FB_CALL getCharSet(Error* /*error*/, ExternalContext* /*context*/, Utf8* /*name*/, uint /*nameSize*/) + void* operator new(size_t size, const IRoutineMetadata* metadata) { + Procedure* p = reinterpret_cast<Procedure*>(::new char[size]); + p->metadata = metadata; + return p; } + void operator delete(void* p) + { + ::delete [] static_cast<char*>(p); + } + public: const IRoutineMetadata* metadata; }; +template <typename This> class Trigger : public ExternalTrigger, public Helper { public: - virtual ~Trigger() + virtual void FB_CALL dispose(Error* /*error*/) { + delete static_cast<This*>(this); } -public: - virtual void FB_CALL dispose(Error* /*error*/) + virtual void FB_CALL getCharSet(Error* /*error*/, ExternalContext* /*context*/, + Utf8* /*name*/, uint /*nameSize*/) { - delete this; } - void FB_CALL getCharSet(Error* /*error*/, ExternalContext* /*context*/, Utf8* /*name*/, uint /*nameSize*/) + void* operator new(size_t size, const IRoutineMetadata* metadata) { + Trigger* p = reinterpret_cast<Trigger*>(::new char[size]); + p->metadata = metadata; + return p; } + void operator delete(void* p) + { + ::delete [] static_cast<char*>(p); + } + public: const IRoutineMetadata* metadata; }; @@ -569,9 +616,7 @@ virtual ExternalFunction* FB_CALL newItem(const IRoutineMetadata* metadata) { - Function* function = new T(); - function->metadata = metadata; - return function; + return new(metadata) Routine<T>; } private: @@ -596,9 +641,7 @@ virtual ExternalProcedure* FB_CALL newItem(const IRoutineMetadata* metadata) { - Procedure* procedure = new T(); - procedure->metadata = metadata; - return procedure; + return new(metadata) Routine<T>; } private: @@ -623,9 +666,7 @@ virtual ExternalTrigger* FB_CALL newItem(const IRoutineMetadata* metadata) { - Trigger* trigger = new T(); - trigger->metadata = metadata; - return trigger; + return new(metadata) Routine<T>; } private: @@ -637,4 +678,4 @@ } // namespace Udr } // namespace Firebird -#endif // FIREBIRD_PLUGIN_UDR_CPP +#endif // FIREBIRD_UDR_CPP_ENGINE Added: firebird/trunk/src/include/ibase.h =================================================================== --- firebird/trunk/src/include/ibase.h (rev 0) +++ firebird/trunk/src/include/ibase.h 2011-06-26 15:57:55 UTC (rev 53242) @@ -0,0 +1 @@ +#include "../jrd/ibase.h" Property changes on: firebird/trunk/src/include/ibase.h ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Modified: firebird/trunk/src/misc/copy-boost.sh =================================================================== --- firebird/trunk/src/misc/copy-boost.sh 2011-06-26 15:56:56 UTC (rev 53241) +++ firebird/trunk/src/misc/copy-boost.sh 2011-06-26 15:57:55 UTC (rev 53242) @@ -15,6 +15,7 @@ git add src/include/firebird/impl/boost/preprocessor/repetition/detail rm gen/boost -#git commit src/include/firebird/impl/boost -#rm -rf src/include/firebird/impl/boost -#git checkout -- src/include/firebird +echo Now run this: +echo git commit src/include/firebird/impl/boost +echo rm -rf src/include/firebird/impl/boost +echo git checkout -- src/include/firebird This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-06-27 03:16:34
|
Revision: 53245 http://firebird.svn.sourceforge.net/firebird/?rev=53245&view=rev Author: firebirds Date: 2011-06-27 03:16:27 +0000 (Mon, 27 Jun 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-06-26 22:27:07 UTC (rev 53244) +++ firebird/trunk/ChangeLog 2011-06-27 03:16:27 UTC (rev 53245) @@ -1,3 +1,75 @@ + 2011-06-26 18:48 asfernandes + M src/common/classes/SyncObject.cpp + M src/common/classes/SyncObject.h + M src/jrd/ExtEngineManager.cpp + M src/jrd/GarbageCollector.cpp + M src/jrd/jrd.cpp + M src/jrd/nbak.cpp + M src/jrd/nbak.h + M src/jrd/tpc.cpp + M src/jrd/tra.cpp + M src/jrd/vio.cpp +Misc. + + 2011-06-26 15:57 asfernandes + M builds/win32/msvc9/Firebird3_Examples.sln + M examples/udr/UdrCppExample.cpp + A src/include/firebird/Message.h + M src/include/firebird/UdrCppEngine.h + A src/include/ibase.h + M src/misc/copy-boost.sh +Work in progress on message-based external functions and procedures. + + 2011-06-26 15:56 asfernandes + A src/include/firebird/impl + A src/include/firebird/impl/boost + A src/include/firebird/impl/boost/preprocessor + A src/include/firebird/impl/boost/preprocessor/arithmetic + A src/include/firebird/impl/boost/preprocessor/arithmetic/dec.hpp + A src/include/firebird/impl/boost/preprocessor/arithmetic/inc.hpp + A src/include/firebird/impl/boost/preprocessor/cat.hpp + A src/include/firebird/impl/boost/preprocessor/config + A src/include/firebird/impl/boost/preprocessor/config/config.hpp + A src/include/firebird/impl/boost/preprocessor/control + A src/include/firebird/impl/boost/preprocessor/control/expr_if.hpp + A src/include/firebird/impl/boost/preprocessor/control/expr_iif.hpp + A src/include/firebird/impl/boost/preprocessor/control/if.hpp + A src/include/firebird/impl/boost/preprocessor/control/iif.hpp + A src/include/firebird/impl/boost/preprocessor/debug + A src/include/firebird/impl/boost/preprocessor/debug/error.hpp + A src/include/firebird/impl/boost/preprocessor/detail + A src/include/firebird/impl/boost/preprocessor/detail/auto_rec.hpp + A src/include/firebird/impl/boost/preprocessor/detail/dmc + A src/include/firebird/impl/boost/preprocessor/detail/dmc/auto_rec.hpp + A src/include/firebird/impl/boost/preprocessor/facilities + A src/include/firebird/impl/boost/preprocessor/facilities/empty.hpp + A src/include/firebird/impl/boost/preprocessor/logical + A src/include/firebird/impl/boost/preprocessor/logical/bool.hpp + A src/include/firebird/impl/boost/preprocessor/repetition + A src/include/firebird/impl/boost/preprocessor/repetition/detail + A src/include/firebird/impl/boost/preprocessor/repetition/detail/dmc + A src/include/firebird/impl/boost/preprocessor/repetition/detail/dmc/for.hpp + A src/include/firebird/impl/boost/preprocessor/repetition/detail/edg + A src/include/firebird/impl/boost/preprocessor/repetition/detail/edg/for.hpp + A src/include/firebird/impl/boost/preprocessor/repetition/detail/for.hpp + A src/include/firebird/impl/boost/preprocessor/repetition/detail/msvc + A src/include/firebird/impl/boost/preprocessor/repetition/detail/msvc/for.hpp + A src/include/firebird/impl/boost/preprocessor/repetition/for.hpp + A src/include/firebird/impl/boost/preprocessor/seq + A src/include/firebird/impl/boost/preprocessor/seq/elem.hpp + A src/include/firebird/impl/boost/preprocessor/seq/for_each_i.hpp + A src/include/firebird/impl/boost/preprocessor/seq/seq.hpp + A src/include/firebird/impl/boost/preprocessor/seq/size.hpp + A src/include/firebird/impl/boost/preprocessor/tuple + A src/include/firebird/impl/boost/preprocessor/tuple/eat.hpp + A src/include/firebird/impl/boost/preprocessor/tuple/elem.hpp + A src/include/firebird/impl/boost/preprocessor/tuple/rem.hpp +Add boost files for FB_MESSAGE. + + 2011-06-26 15:38 asfernandes + A src/misc/copy-boost.sh +Add script to copy a modified subset of boost to our tree. + 2011-06-25 18:13 asfernandes M src/dsql/parse.y Warning. Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-06-26 22:27:07 UTC (rev 53244) +++ firebird/trunk/src/jrd/build_no.h 2011-06-27 03:16:27 UTC (rev 53245) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29471 + FORMAL BUILD NUMBER:29475 */ -#define PRODUCT_VER_STRING "3.0.0.29471" -#define FILE_VER_STRING "WI-T3.0.0.29471" -#define LICENSE_VER_STRING "WI-T3.0.0.29471" -#define FILE_VER_NUMBER 3, 0, 0, 29471 +#define PRODUCT_VER_STRING "3.0.0.29475" +#define FILE_VER_STRING "WI-T3.0.0.29475" +#define LICENSE_VER_STRING "WI-T3.0.0.29475" +#define FILE_VER_NUMBER 3, 0, 0, 29475 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29471" +#define FB_BUILD_NO "29475" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-06-26 22:27:07 UTC (rev 53244) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-06-27 03:16:27 UTC (rev 53245) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29471 +BuildNum=29475 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-06-30 03:18:37
|
Revision: 53262 http://firebird.svn.sourceforge.net/firebird/?rev=53262&view=rev Author: firebirds Date: 2011-06-30 03:18:31 +0000 (Thu, 30 Jun 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-06-29 20:18:37 UTC (rev 53261) +++ firebird/trunk/ChangeLog 2011-06-30 03:18:31 UTC (rev 53262) @@ -1,3 +1,24 @@ + 2011-06-29 20:18 hvlad + M src/jrd/jrd.cpp + M src/yvalve/why.cpp +Fixed some AV's reported privately + + 2011-06-29 09:41 alexpeshkoff + M src/common/StatusArg.cpp + M src/common/StatusArg.h + M src/common/StatusHolder.cpp + M src/common/StatusHolder.h + M src/dsql/sqlda_pub.h + M src/include/firebird/Provider.h + M src/remote/client/interface.cpp + M src/remote/protocol.cpp + M src/remote/protocol.h + M src/remote/remote.h + M src/remote/server/server.cpp + M src/yvalve/YObjects.h + M src/yvalve/why.cpp +Use interface-based API in remote server. Use stable "next" pointers in yvalve. + 2011-06-26 18:48 asfernandes M src/common/classes/SyncObject.cpp M src/common/classes/SyncObject.h Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-06-29 20:18:37 UTC (rev 53261) +++ firebird/trunk/src/jrd/build_no.h 2011-06-30 03:18:31 UTC (rev 53262) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29475 + FORMAL BUILD NUMBER:29477 */ -#define PRODUCT_VER_STRING "3.0.0.29475" -#define FILE_VER_STRING "WI-T3.0.0.29475" -#define LICENSE_VER_STRING "WI-T3.0.0.29475" -#define FILE_VER_NUMBER 3, 0, 0, 29475 +#define PRODUCT_VER_STRING "3.0.0.29477" +#define FILE_VER_STRING "WI-T3.0.0.29477" +#define LICENSE_VER_STRING "WI-T3.0.0.29477" +#define FILE_VER_NUMBER 3, 0, 0, 29477 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29475" +#define FB_BUILD_NO "29477" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-06-29 20:18:37 UTC (rev 53261) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-06-30 03:18:31 UTC (rev 53262) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29475 +BuildNum=29477 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hv...@us...> - 2011-06-30 13:17:12
|
Revision: 53263 http://firebird.svn.sourceforge.net/firebird/?rev=53263&view=rev Author: hvlad Date: 2011-06-30 13:17:04 +0000 (Thu, 30 Jun 2011) Log Message: ----------- Make legacy (security database based) user management plugin consistent : - binary name changed from user_management.dll to legacy_usermanager.dll (on Windows only, POSIX will follow soon) - registration name was changed from "Legacy_Auth" to "Legacy_UserManager" (see UserManager setting in firebird.conf) Modified Paths: -------------- firebird/trunk/builds/install/misc/firebird.conf.in firebird/trunk/builds/win32/msvc10/Firebird3.sln firebird/trunk/builds/win32/msvc8/Firebird3.sln firebird/trunk/builds/win32/msvc9/Firebird3.sln firebird/trunk/src/auth/SecurityDatabase/LegacyManagement.epp firebird/trunk/src/common/config/config.cpp Added Paths: ----------- firebird/trunk/builds/win32/msvc10/legacy_usermanager.vcxproj firebird/trunk/builds/win32/msvc10/legacy_usermanager.vcxproj.filters firebird/trunk/builds/win32/msvc8/legacy_usermanager.vcxproj firebird/trunk/builds/win32/msvc9/legacy_usermanager.vcxproj Removed Paths: ------------- firebird/trunk/builds/win32/msvc10/user_management.vcxproj firebird/trunk/builds/win32/msvc10/user_management.vcxproj.filters firebird/trunk/builds/win32/msvc8/user_management.vcproj firebird/trunk/builds/win32/msvc9/user_management.vcproj Modified: firebird/trunk/builds/install/misc/firebird.conf.in =================================================================== --- firebird/trunk/builds/install/misc/firebird.conf.in 2011-06-30 03:18:31 UTC (rev 53262) +++ firebird/trunk/builds/install/misc/firebird.conf.in 2011-06-30 13:17:04 UTC (rev 53263) @@ -366,7 +366,7 @@ # UserManager sets plugin used to work with security database. If more than # one plugin is given, first plugin from the list is used. # -#UserManager = Legacy_Auth +#UserManager = Legacy_UserManager # TracePlugin is used by firebird trace facility to send trace data to the user # or log file in audit case. Modified: firebird/trunk/builds/win32/msvc10/Firebird3.sln =================================================================== --- firebird/trunk/builds/win32/msvc10/Firebird3.sln 2011-06-30 03:18:31 UTC (rev 53262) +++ firebird/trunk/builds/win32/msvc10/Firebird3.sln 2011-06-30 13:17:04 UTC (rev 53263) @@ -75,7 +75,7 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "yvalve", "yvalve.vcxproj", "{4FE03933-98CD-4879-A135-FD9430087A6B}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "user_management", "user_management.vcxproj", "{D836FBF5-071E-4E04-8D63-C7EB6701B296}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "legacy_usermanager", "legacy_usermanager.vcxproj", "{D836FBF5-071E-4E04-8D63-C7EB6701B296}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Copied: firebird/trunk/builds/win32/msvc10/legacy_usermanager.vcxproj (from rev 53251, firebird/trunk/builds/win32/msvc10/user_management.vcxproj) =================================================================== --- firebird/trunk/builds/win32/msvc10/legacy_usermanager.vcxproj (rev 0) +++ firebird/trunk/builds/win32/msvc10/legacy_usermanager.vcxproj 2011-06-30 13:17:04 UTC (rev 53263) @@ -0,0 +1,191 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{D836FBF5-071E-4E04-8D63-C7EB6701B296}</ProjectGuid> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + <Import Project="firebird2.props" /> + <Import Project="firebird2release.props" /> + <Import Project="DllNoEmbedManifest.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + <Import Project="firebird2.props" /> + <Import Project="firebird2debug.props" /> + <Import Project="DllNoEmbedManifest.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + <Import Project="firebird2.props" /> + <Import Project="firebird2release.props" /> + <Import Project="DllNoEmbedManifest.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + <Import Project="firebird2.props" /> + <Import Project="firebird2debug.props" /> + <Import Project="DllNoEmbedManifest.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\plugins\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\plugins\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\plugins\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\plugins\</OutDir> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\..\..\src\include;..\..\..\src\include\gen;..\..\..\src\common\classes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;DEV_BUILD;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <Link> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> + <IntrinsicFunctions>true</IntrinsicFunctions> + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> + <AdditionalIncludeDirectories>..\..\..\src\include\gen;..\..\..\src\include;..\..\..\src\common\classes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PrecompiledHeader> + </PrecompiledHeader> + </ClCompile> + <Link> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\..\..\src\include;..\..\..\src\include\gen;..\..\..\src\common\classes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;DEV_BUILD;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <Link> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX64</TargetMachine> + <ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> + <IntrinsicFunctions>true</IntrinsicFunctions> + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> + <AdditionalIncludeDirectories>..\..\..\src\include\gen;..\..\..\src\include;..\..\..\src\common\classes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PrecompiledHeader> + </PrecompiledHeader> + </ClCompile> + <Link> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX64</TargetMachine> + <ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ResourceCompile Include="..\..\..\src\jrd\version.rc" /> + </ItemGroup> + <ItemGroup> + <None Include="..\..\..\src\auth\SecurityDatabase\LegacyManagement.epp" /> + <None Include="..\defs\plugin.def" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="common.vcxproj"> + <Project>{15605f44-bffd-444f-ad4c-55dc9d704465}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + <ProjectReference Include="yvalve.vcxproj"> + <Project>{4fe03933-98cd-4879-a135-fd9430087a6b}</Project> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\src\auth\SecurityDatabase\LegacyManagement.h" /> + </ItemGroup> + <ItemGroup> + <ClCompile Include="..\..\..\gen\auth\SecurityDatabase\LegacyManagement.cpp" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> \ No newline at end of file Copied: firebird/trunk/builds/win32/msvc10/legacy_usermanager.vcxproj.filters (from rev 53251, firebird/trunk/builds/win32/msvc10/user_management.vcxproj.filters) =================================================================== --- firebird/trunk/builds/win32/msvc10/legacy_usermanager.vcxproj.filters (rev 0) +++ firebird/trunk/builds/win32/msvc10/legacy_usermanager.vcxproj.filters 2011-06-30 13:17:04 UTC (rev 53263) @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Resource files"> + <UniqueIdentifier>{f5abfba7-e5fe-444a-8f3a-71613bd06b14}</UniqueIdentifier> + </Filter> + <Filter Include="headers"> + <UniqueIdentifier>{4d7668b6-d659-4684-ac32-6285d87a8977}</UniqueIdentifier> + </Filter> + <Filter Include="GPRE cpp"> + <UniqueIdentifier>{65cc725f-d68d-46a8-b9fd-1a442c5aa8bb}</UniqueIdentifier> + </Filter> + <Filter Include="GPRE epp"> + <UniqueIdentifier>{a4bf3426-2fd1-4474-8dcf-41acdd200b1a}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="..\..\..\src\jrd\version.rc"> + <Filter>Resource files</Filter> + </ResourceCompile> + </ItemGroup> + <ItemGroup> + <None Include="..\..\..\src\auth\SecurityDatabase\LegacyManagement.epp"> + <Filter>GPRE epp</Filter> + </None> + <None Include="..\defs\plugin.def" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\src\auth\SecurityDatabase\LegacyManagement.h"> + <Filter>headers</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <ClCompile Include="..\..\..\gen\auth\SecurityDatabase\LegacyManagement.cpp"> + <Filter>GPRE cpp</Filter> + </ClCompile> + </ItemGroup> +</Project> \ No newline at end of file Deleted: firebird/trunk/builds/win32/msvc10/user_management.vcxproj =================================================================== --- firebird/trunk/builds/win32/msvc10/user_management.vcxproj 2011-06-30 03:18:31 UTC (rev 53262) +++ firebird/trunk/builds/win32/msvc10/user_management.vcxproj 2011-06-30 13:17:04 UTC (rev 53263) @@ -1,191 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{D836FBF5-071E-4E04-8D63-C7EB6701B296}</ProjectGuid> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> - <CharacterSet>MultiByte</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> - <CharacterSet>MultiByte</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> - <CharacterSet>MultiByte</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> - <CharacterSet>MultiByte</CharacterSet> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - <Import Project="firebird2.props" /> - <Import Project="firebird2release.props" /> - <Import Project="DllNoEmbedManifest.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - <Import Project="firebird2.props" /> - <Import Project="firebird2debug.props" /> - <Import Project="DllNoEmbedManifest.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - <Import Project="firebird2.props" /> - <Import Project="firebird2release.props" /> - <Import Project="DllNoEmbedManifest.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - <Import Project="firebird2.props" /> - <Import Project="firebird2debug.props" /> - <Import Project="DllNoEmbedManifest.props" /> - </ImportGroup> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup> - <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> - <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> - <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> - <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> - <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> - <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> - <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> - <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> - <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> - <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> - <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> - <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> - <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\plugins\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\plugins\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\plugins\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\plugins\</OutDir> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>..\..\..\src\include;..\..\..\src\include\gen;..\..\..\src\common\classes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>WIN32;_DEBUG;DEV_BUILD;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <Link> - <RandomizedBaseAddress>false</RandomizedBaseAddress> - <DataExecutionPrevention> - </DataExecutionPrevention> - <ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <Optimization>MaxSpeed</Optimization> - <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> - <IntrinsicFunctions>true</IntrinsicFunctions> - <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> - <AdditionalIncludeDirectories>..\..\..\src\include\gen;..\..\..\src\include;..\..\..\src\common\classes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PrecompiledHeader> - </PrecompiledHeader> - </ClCompile> - <Link> - <RandomizedBaseAddress>false</RandomizedBaseAddress> - <DataExecutionPrevention> - </DataExecutionPrevention> - <ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <Midl> - <TargetEnvironment>X64</TargetEnvironment> - </Midl> - <ClCompile> - <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>..\..\..\src\include;..\..\..\src\include\gen;..\..\..\src\common\classes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>WIN32;_DEBUG;DEV_BUILD;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <Link> - <RandomizedBaseAddress>false</RandomizedBaseAddress> - <DataExecutionPrevention> - </DataExecutionPrevention> - <TargetMachine>MachineX64</TargetMachine> - <ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <Midl> - <TargetEnvironment>X64</TargetEnvironment> - </Midl> - <ClCompile> - <Optimization>MaxSpeed</Optimization> - <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> - <IntrinsicFunctions>true</IntrinsicFunctions> - <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> - <AdditionalIncludeDirectories>..\..\..\src\include\gen;..\..\..\src\include;..\..\..\src\common\classes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PrecompiledHeader> - </PrecompiledHeader> - </ClCompile> - <Link> - <RandomizedBaseAddress>false</RandomizedBaseAddress> - <DataExecutionPrevention> - </DataExecutionPrevention> - <TargetMachine>MachineX64</TargetMachine> - <ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile> - </Link> - </ItemDefinitionGroup> - <ItemGroup> - <ResourceCompile Include="..\..\..\src\jrd\version.rc" /> - </ItemGroup> - <ItemGroup> - <None Include="..\..\..\src\auth\SecurityDatabase\LegacyManagement.epp" /> - <None Include="..\defs\plugin.def" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="common.vcxproj"> - <Project>{15605f44-bffd-444f-ad4c-55dc9d704465}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> - <ProjectReference Include="yvalve.vcxproj"> - <Project>{4fe03933-98cd-4879-a135-fd9430087a6b}</Project> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <ClInclude Include="..\..\..\src\auth\SecurityDatabase\LegacyManagement.h" /> - </ItemGroup> - <ItemGroup> - <ClCompile Include="..\..\..\gen\auth\SecurityDatabase\LegacyManagement.cpp" /> - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> -</Project> \ No newline at end of file Deleted: firebird/trunk/builds/win32/msvc10/user_management.vcxproj.filters =================================================================== --- firebird/trunk/builds/win32/msvc10/user_management.vcxproj.filters 2011-06-30 03:18:31 UTC (rev 53262) +++ firebird/trunk/builds/win32/msvc10/user_management.vcxproj.filters 2011-06-30 13:17:04 UTC (rev 53263) @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <Filter Include="Resource files"> - <UniqueIdentifier>{f5abfba7-e5fe-444a-8f3a-71613bd06b14}</UniqueIdentifier> - </Filter> - <Filter Include="headers"> - <UniqueIdentifier>{4d7668b6-d659-4684-ac32-6285d87a8977}</UniqueIdentifier> - </Filter> - <Filter Include="GPRE cpp"> - <UniqueIdentifier>{65cc725f-d68d-46a8-b9fd-1a442c5aa8bb}</UniqueIdentifier> - </Filter> - <Filter Include="GPRE epp"> - <UniqueIdentifier>{a4bf3426-2fd1-4474-8dcf-41acdd200b1a}</UniqueIdentifier> - </Filter> - </ItemGroup> - <ItemGroup> - <ResourceCompile Include="..\..\..\src\jrd\version.rc"> - <Filter>Resource files</Filter> - </ResourceCompile> - </ItemGroup> - <ItemGroup> - <None Include="..\..\..\src\auth\SecurityDatabase\LegacyManagement.epp"> - <Filter>GPRE epp</Filter> - </None> - <None Include="..\defs\plugin.def" /> - </ItemGroup> - <ItemGroup> - <ClInclude Include="..\..\..\src\auth\SecurityDatabase\LegacyManagement.h"> - <Filter>headers</Filter> - </ClInclude> - </ItemGroup> - <ItemGroup> - <ClCompile Include="..\..\..\gen\auth\SecurityDatabase\LegacyManagement.cpp"> - <Filter>GPRE cpp</Filter> - </ClCompile> - </ItemGroup> -</Project> \ No newline at end of file Modified: firebird/trunk/builds/win32/msvc8/Firebird3.sln =================================================================== --- firebird/trunk/builds/win32/msvc8/Firebird3.sln 2011-06-30 03:18:31 UTC (rev 53262) +++ firebird/trunk/builds/win32/msvc8/Firebird3.sln 2011-06-30 13:17:04 UTC (rev 53263) @@ -162,7 +162,7 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpre_common", "gpre_common.vcproj", "{2925B855-5975-44AE-BB00-1217A2A4E511}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "user_management", "user_management.vcproj", "{D836FBF5-071E-4E04-8D63-C7EB6701B296}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "legacy_usermanager", "legacy_usermanager.vcproj", "{D836FBF5-071E-4E04-8D63-C7EB6701B296}" ProjectSection(ProjectDependencies) = postProject {4FE03933-98CD-4879-A135-FD9430087A6B} = {4FE03933-98CD-4879-A135-FD9430087A6B} {15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465} Copied: firebird/trunk/builds/win32/msvc8/legacy_usermanager.vcxproj (from rev 53251, firebird/trunk/builds/win32/msvc8/user_management.vcproj) =================================================================== --- firebird/trunk/builds/win32/msvc8/legacy_usermanager.vcxproj (rev 0) +++ firebird/trunk/builds/win32/msvc8/legacy_usermanager.vcxproj 2011-06-30 13:17:04 UTC (rev 53263) @@ -0,0 +1,344 @@ +<?xml version="1.0" encoding="windows-1251"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="user_management" + ProjectGUID="{D836FBF5-071E-4E04-8D63-C7EB6701B296}" + > + <Platforms> + <Platform + Name="Win32" + /> + <Platform + Name="x64" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\plugins\" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\firebird2.vsprops;.\firebird2debug.vsprops;.\DllNoEmbedManifest.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\..\src\include;..\..\..\src\include\gen;..\..\..\include;..\..\..\src\common\classes;../../../extern/icu/include" + PreprocessorDefinitions="WIN32;_DEBUG;DEV_BUILD;_WINDOWS;_USRDLL;SUPERCLIENT;FBTRACE_EXPORTS;NAMESPACE=Vulcan" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalLibraryDirectories="" + ModuleDefinitionFile="..\defs\plugin.def" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Debug|x64" + OutputDirectory="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\plugins\" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\firebird2.vsprops;.\firebird2debug.vsprops;.\DllNoEmbedManifest.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TargetEnvironment="3" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\..\src\include;..\..\..\src\include\gen;..\..\..\include;..\..\..\src\common\classes;../../../extern/icu/include" + PreprocessorDefinitions="WIN32;_DEBUG;DEV_BUILD;_WINDOWS;_USRDLL;SUPERCLIENT;FBTRACE_EXPORTS;NAMESPACE=Vulcan" + Detect64BitPortabilityProblems="true" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalLibraryDirectories="" + ModuleDefinitionFile="..\defs\plugin.def" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\plugins\" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\firebird2.vsprops;.\firebird2release.vsprops;.\DllNoEmbedManifest.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + EnableIntrinsicFunctions="true" + FavorSizeOrSpeed="1" + AdditionalIncludeDirectories="..\..\..\src\include\gen;..\..\..\src\include;..\..\..\src\common\classes;../../../extern/icu/include" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FBTRACE_EXPORTS;SUPERCLIENT;NAMESPACE=Vulcan" + UsePrecompiledHeader="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalLibraryDirectories="" + ModuleDefinitionFile="..\defs\plugin.def" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|x64" + OutputDirectory="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\plugins\" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\firebird2.vsprops;.\firebird2release.vsprops;.\DllNoEmbedManifest.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TargetEnvironment="3" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + EnableIntrinsicFunctions="true" + FavorSizeOrSpeed="1" + AdditionalIncludeDirectories="..\..\..\src\include\gen;..\..\..\src\include;..\..\..\src\common\classes;../../../extern/icu/include" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FBTRACE_EXPORTS;SUPERCLIENT;NAMESPACE=Vulcan" + UsePrecompiledHeader="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalLibraryDirectories="" + ModuleDefinitionFile="..\defs\plugin.def" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="headers" + > + <File + RelativePath="..\..\..\src\auth\SecurityDatabase\LegacyManagement.h" + > + </File> + </Filter> + <Filter + Name="GPRE cpp" + > + <File + RelativePath="..\..\..\gen\auth\SecurityDatabase\LegacyManagement.cpp" + > + </File> + </Filter> + <Filter + Name="GPRE epp" + > + <File + RelativePath="..\..\..\src\auth\SecurityDatabase\LegacyManagement.epp" + > + </File> + </Filter> + <Filter + Name="Resource files" + > + <File + RelativePath="..\..\..\src\jrd\version.rc" + > + </File> + </Filter> + <File + RelativePath="..\defs\plugin.def" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> Deleted: firebird/trunk/builds/win32/msvc8/user_management.vcproj =================================================================== --- firebird/trunk/builds/win32/msvc8/user_management.vcproj 2011-06-30 03:18:31 UTC (rev 53262) +++ firebird/trunk/builds/win32/msvc8/user_management.vcproj 2011-06-30 13:17:04 UTC (rev 53263) @@ -1,344 +0,0 @@ -<?xml version="1.0" encoding="windows-1251"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="8.00" - Name="user_management" - ProjectGUID="{D836FBF5-071E-4E04-8D63-C7EB6701B296}" - > - <Platforms> - <Platform - Name="Win32" - /> - <Platform - Name="x64" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\plugins\" - ConfigurationType="2" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\firebird2.vsprops;.\firebird2debug.vsprops;.\DllNoEmbedManifest.vsprops" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\..\..\src\include;..\..\..\src\include\gen;..\..\..\include;..\..\..\src\common\classes;../../../extern/icu/include" - PreprocessorDefinitions="WIN32;_DEBUG;DEV_BUILD;_WINDOWS;_USRDLL;SUPERCLIENT;FBTRACE_EXPORTS;NAMESPACE=Vulcan" - DebugInformationFormat="4" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalLibraryDirectories="" - ModuleDefinitionFile="..\defs\plugin.def" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Debug|x64" - OutputDirectory="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\plugins\" - ConfigurationType="2" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\firebird2.vsprops;.\firebird2debug.vsprops;.\DllNoEmbedManifest.vsprops" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\..\..\src\include;..\..\..\src\include\gen;..\..\..\include;..\..\..\src\common\classes;../../../extern/icu/include" - PreprocessorDefinitions="WIN32;_DEBUG;DEV_BUILD;_WINDOWS;_USRDLL;SUPERCLIENT;FBTRACE_EXPORTS;NAMESPACE=Vulcan" - Detect64BitPortabilityProblems="true" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalLibraryDirectories="" - ModuleDefinitionFile="..\defs\plugin.def" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\plugins\" - ConfigurationType="2" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\firebird2.vsprops;.\firebird2release.vsprops;.\DllNoEmbedManifest.vsprops" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - InlineFunctionExpansion="1" - EnableIntrinsicFunctions="true" - FavorSizeOrSpeed="1" - AdditionalIncludeDirectories="..\..\..\src\include\gen;..\..\..\src\include;..\..\..\src\common\classes;../../../extern/icu/include" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FBTRACE_EXPORTS;SUPERCLIENT;NAMESPACE=Vulcan" - UsePrecompiledHeader="0" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalLibraryDirectories="" - ModuleDefinitionFile="..\defs\plugin.def" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|x64" - OutputDirectory="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\plugins\" - ConfigurationType="2" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\firebird2.vsprops;.\firebird2release.vsprops;.\DllNoEmbedManifest.vsprops" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - InlineFunctionExpansion="1" - EnableIntrinsicFunctions="true" - FavorSizeOrSpeed="1" - AdditionalIncludeDirectories="..\..\..\src\include\gen;..\..\..\src\include;..\..\..\src\common\classes;../../../extern/icu/include" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FBTRACE_EXPORTS;SUPERCLIENT;NAMESPACE=Vulcan" - UsePrecompiledHeader="0" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalLibraryDirectories="" - ModuleDefinitionFile="..\defs\plugin.def" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="headers" - > - <File - RelativePath="..\..\..\src\auth\SecurityDatabase\LegacyManagement.h" - > - </File> - </Filter> - <Filter - Name="GPRE cpp" - > - <File - RelativePath="..\..\..\gen\auth\SecurityDatabase\LegacyManagement.cpp" - > - </File> - </Filter> - <Filter - Name="GPRE epp" - > - <File - RelativePath="..\..\..\src\auth\SecurityDatabase\LegacyManagement.epp" - > - </File> - </Filter> - <Filter - Name="Resource files" - > - <File - RelativePath="..\..\..\src\jrd\version.rc" - > - </File> - </Filter> - <File - RelativePath="..\defs\plugin.def" - > - </File> - </Files> - <Globals> - </Globals> -</VisualStudioProject> Modified: firebird/trunk/builds/win32/msvc9/Firebird3.sln =================================================================== --- firebird/trunk/builds/win32/msvc9/Firebird3.sln 2011-06-30 03:18:31 UTC (rev 53262) +++ firebird/trunk/builds/win32/msvc9/Firebird3.sln 2011-06-30 13:17:04 UTC (rev 53263) @@ -162,7 +162,7 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpre_common", "gpre_common.vcproj", "{2925B855-5975-44AE-BB00-1217A2A4E511}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "user_management", "user_management.vcproj", "{D836FBF5-071E-4E04-8D63-C7EB6701B296}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "legacy_usermanager", "legacy_usermanager.vcproj", "{D836FBF5-071E-4E04-8D63-C7EB6701B296}" ProjectSection(ProjectDependencies) = postProject {4FE03933-98CD-4879-A135-FD9430087A6B} = {4FE03933-98CD-4879-A135-FD9430087A6B} {15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465} Copied: firebird/trunk/builds/win32/msvc9/legacy_usermanager.vcxproj (from rev 53251, firebird/trunk/builds/win32/msvc9/user_management.vcproj) =================================================================== --- firebird/trunk/builds/win32/msvc9/legacy_usermanager.vcxproj (rev 0) +++ firebird/trunk/builds/win32/msvc9/legacy_usermanager.vcxproj 2011-06-30 13:17:04 UTC (rev 53263) @@ -0,0 +1,344 @@ +<?xml version="1.0" encoding="windows-1251"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="user_management" + ProjectGUID="{D836FBF5-071E-4E04-8D63-C7EB6701B296}" + > + <Platforms> + <Platform + Name="Win32" + /> + <Platform + Name="x64" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\plugins\" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\firebird2.vsprops;.\firebird2debug.vsprops;.\DllNoEmbedManifest.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\..\src\include;..\..\..\src\include\gen;..\..\..\include;..\..\..\src\common\classes;../../../extern/icu/include" + PreprocessorDefinitions="WIN32;_DEBUG;DEV_BUILD;_WINDOWS;_USRDLL;SUPERCLIENT;FBTRACE_EXPORTS;NAMESPACE=Vulcan" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalLibraryDirectories="" + ModuleDefinitionFile="..\defs\plugin.def" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Debug|x64" + OutputDirectory="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\plugins\" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\firebird2.vsprops;.\firebird2debug.vsprops;.\DllNoEmbedManifest.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TargetEnvironment="3" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\..\src\include;..\..\..\src\include\gen;..\..\..\include;..\..\..\src\common\classes;../../../extern/icu/include" + PreprocessorDefinitions="WIN32;_DEBUG;DEV_BUILD;_WINDOWS;_USRDLL;SUPERCLIENT;FBTRACE_EXPORTS;NAMESPACE=Vulcan" + Detect64BitPortabilityProblems="true" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalLibraryDirectories="" + TargetMachine="17" + ModuleDefinitionFile="..\defs\plugin.def" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\plugins\" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\firebird2.vsprops;.\firebird2release.vsprops;.\DllNoEmbedManifest.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + EnableIntrinsicFunctions="true" + FavorSizeOrSpeed="1" + AdditionalIncludeDirectories="..\..\..\src\include\gen;..\..\..\src\include;..\..\..\src\common\classes;../../../extern/icu/include" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FBTRACE_EXPORTS;SUPERCLIENT;NAMESPACE=Vulcan" + UsePrecompiledHeader="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalLibraryDirectories="" + ModuleDefinitionFile="..\defs\plugin.def" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|x64" + OutputDirectory="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\plugins\" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\firebird2.vsprops;.\firebird2release.vsprops;.\DllNoEmbedManifest.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TargetEnvironment="3" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + EnableIntrinsicFunctions="true" + FavorSizeOrSpeed="1" + AdditionalIncludeDirectories="..\..\..\src\include\gen;..\..\..\src\include;..\..\..\src\common\classes;../../../extern/icu/include" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FBTRACE_EXPORTS;SUPERCLIENT;NAMESPACE=Vulcan" + UsePrecompiledHeader="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalLibraryDirectories="" + ModuleDefinitionFile="..\defs\plugin.def" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="headers" + > + <File + RelativePath="..\..\..\src\auth\SecurityDatabase\LegacyManagement.h" + > + </File> + </Filter> + <Filter + Name="GPRE cpp" + > + <File + RelativePath="..\..\..\gen\auth\SecurityDatabase\LegacyManagement.cpp" + > + </File> + </Filter> + <Filter + Name="GPRE epp" + > + <File + RelativePath="..\..\..\src\auth\SecurityDatabase\LegacyManagement.epp" + > + </File> + </Filter> + <Filter + Name="Resource files" + > + <File + RelativePath="..\..\..\src\jrd\version.rc" + > + </File> + </Filter> + <File + RelativePath="..\defs\plugin.def" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> Deleted: firebird/trunk/builds/win32/msvc9/user_management.vcproj =================================================================== --- firebird/trunk/builds/win32/msvc9/user_management.vcproj 2011-06-30 03:18:31 UTC (rev 53262) +++ firebird/trunk/builds/win32/msvc9/user_management.vcproj 2011-06-30 13:17:04 UTC (rev 53263) @@ -1,344 +0,0 @@ -<?xml version="1.0" encoding="windows-1251"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9,00" - Name="user_management" - ProjectGUID="{D836FBF5-071E-4E04-8D63-C7EB6701B296}" - > - <Platforms> - <Platform - Name="Win32" - /> - <Platform - Name="x64" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\plugins\" - ConfigurationType="2" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\firebird2.vsprops;.\firebird2debug.vsprops;.\DllNoEmbedManifest.vsprops" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\..\..\src\include;..\..\..\src\include\gen;..\..\..\include;..\..\..\src\common\classes;../../../extern/icu/include" - PreprocessorDefinitions="WIN32;_DEBUG;DEV_BUILD;_WINDOWS;_USRDLL;SUPERCLIENT;FBTRACE_EXPORTS;NAMESPACE=Vulcan" - DebugInformationFormat="4" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalLibraryDirectories="" - ModuleDefinitionFile="..\defs\plugin.def" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Debug|x64" - OutputDirectory="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\plugins\" - ConfigurationType="2" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\firebird2.vsprops;.\firebird2debug.vsprops;.\DllNoEmbedManifest.vsprops" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\..\..\src\include;..\..\..\src\include\gen;..\..\..\include;..\..\..\src\common\classes;../../../extern/icu/include" - PreprocessorDefinitions="WIN32;_DEBUG;DEV_BUILD;_WINDOWS;_USRDLL;SUPERCLIENT;FBTRACE_EXPORTS;NAMESPACE=Vulcan" - Detect64BitPortabilityProblems="true" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalLibraryDirectories="" - TargetMachine="17" - ModuleDefinitionFile="..\defs\plugin.def" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\plugins\" - ConfigurationType="2" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\firebird2.vsprops;.\firebird2release.vsprops;.\DllNoEmbedManifest.vsprops" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTo... [truncated message content] |
From: <fir...@us...> - 2011-07-01 03:18:46
|
Revision: 53264 http://firebird.svn.sourceforge.net/firebird/?rev=53264&view=rev Author: firebirds Date: 2011-07-01 03:18:37 +0000 (Fri, 01 Jul 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-06-30 13:17:04 UTC (rev 53263) +++ firebird/trunk/ChangeLog 2011-07-01 03:18:37 UTC (rev 53264) @@ -1,3 +1,22 @@ + 2011-06-30 13:17 hvlad + M builds/install/misc/firebird.conf.in + M builds/win32/msvc10/Firebird3.sln + A builds/win32/msvc10/legacy_usermanager.vcxproj (from /firebird/trunk/builds/win32/msvc10/user_management.vcxproj:53251) + A builds/win32/msvc10/legacy_usermanager.vcxproj.filters (from /firebird/trunk/builds/win32/msvc10/user_management.vcxproj.filters:53251) + D builds/win32/msvc10/user_management.vcxproj + D builds/win32/msvc10/user_management.vcxproj.filters + M builds/win32/msvc8/Firebird3.sln + A builds/win32/msvc8/legacy_usermanager.vcxproj (from /firebird/trunk/builds/win32/msvc8/user_management.vcproj:53251) + D builds/win32/msvc8/user_management.vcproj + M builds/win32/msvc9/Firebird3.sln + A builds/win32/msvc9/legacy_usermanager.vcxproj (from /firebird/trunk/builds/win32/msvc9/user_management.vcproj:53251) + D builds/win32/msvc9/user_management.vcproj + M src/auth/SecurityDatabase/LegacyManagement.epp + M src/common/config/config.cpp +Make legacy (security database based) user management plugin consistent : +- binary name changed from user_management.dll to legacy_usermanager.dll (on Windows only, POSIX will follow soon) +- registration name was changed from "Legacy_Auth" to "Legacy_UserManager" (see UserManager setting in firebird.conf) + 2011-06-29 20:18 hvlad M src/jrd/jrd.cpp M src/yvalve/why.cpp Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-06-30 13:17:04 UTC (rev 53263) +++ firebird/trunk/src/jrd/build_no.h 2011-07-01 03:18:37 UTC (rev 53264) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29477 + FORMAL BUILD NUMBER:29478 */ -#define PRODUCT_VER_STRING "3.0.0.29477" -#define FILE_VER_STRING "WI-T3.0.0.29477" -#define LICENSE_VER_STRING "WI-T3.0.0.29477" -#define FILE_VER_NUMBER 3, 0, 0, 29477 +#define PRODUCT_VER_STRING "3.0.0.29478" +#define FILE_VER_STRING "WI-T3.0.0.29478" +#define LICENSE_VER_STRING "WI-T3.0.0.29478" +#define FILE_VER_NUMBER 3, 0, 0, 29478 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29477" +#define FB_BUILD_NO "29478" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-06-30 13:17:04 UTC (rev 53263) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-07-01 03:18:37 UTC (rev 53264) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29477 +BuildNum=29478 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-07-02 03:17:18
|
Revision: 53274 http://firebird.svn.sourceforge.net/firebird/?rev=53274&view=rev Author: firebirds Date: 2011-07-02 03:17:09 +0000 (Sat, 02 Jul 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-07-01 16:15:52 UTC (rev 53273) +++ firebird/trunk/ChangeLog 2011-07-02 03:17:09 UTC (rev 53274) @@ -1,3 +1,23 @@ + 2011-07-01 16:15 dimitr + A builds/win32/msvc8/legacy_usermanager.vcproj (from /firebird/trunk/builds/win32/msvc8/legacy_usermanager.vcxproj:53272) + D builds/win32/msvc8/legacy_usermanager.vcxproj + A builds/win32/msvc9/legacy_usermanager.vcproj (from /firebird/trunk/builds/win32/msvc9/legacy_usermanager.vcxproj:53272) + D builds/win32/msvc9/legacy_usermanager.vcxproj +Fixed the build. + + 2011-07-01 11:08 firebirds + M mkChangeLog.sh +Check svn exit codes in order to avoid half-done ChangeLog + + 2011-07-01 07:56 alexpeshkoff + M src/yvalve/YObjects.h + M src/yvalve/why.cpp +Avoid some casts in yValve + + 2011-07-01 07:55 alexpeshkoff + M builds/posix/Makefile.in +Reflect Vlad's changes in posix build + 2011-06-30 13:17 hvlad M builds/install/misc/firebird.conf.in M builds/win32/msvc10/Firebird3.sln Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-07-01 16:15:52 UTC (rev 53273) +++ firebird/trunk/src/jrd/build_no.h 2011-07-02 03:17:09 UTC (rev 53274) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29478 + FORMAL BUILD NUMBER:29482 */ -#define PRODUCT_VER_STRING "3.0.0.29478" -#define FILE_VER_STRING "WI-T3.0.0.29478" -#define LICENSE_VER_STRING "WI-T3.0.0.29478" -#define FILE_VER_NUMBER 3, 0, 0, 29478 +#define PRODUCT_VER_STRING "3.0.0.29482" +#define FILE_VER_STRING "WI-T3.0.0.29482" +#define LICENSE_VER_STRING "WI-T3.0.0.29482" +#define FILE_VER_NUMBER 3, 0, 0, 29482 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29478" +#define FB_BUILD_NO "29482" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-07-01 16:15:52 UTC (rev 53273) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-07-02 03:17:09 UTC (rev 53274) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29478 +BuildNum=29482 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |