|
From: <fir...@us...> - 2011-04-30 03:16:07
|
Revision: 52856
http://firebird.svn.sourceforge.net/firebird/?rev=52856&view=rev
Author: firebirds
Date: 2011-04-30 03:16:00 +0000 (Sat, 30 Apr 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-04-30 02:28:31 UTC (rev 52855)
+++ firebird/trunk/ChangeLog 2011-04-30 03:16:00 UTC (rev 52856)
@@ -1,3 +1,55 @@
+ 2011-04-30 02:28 asfernandes
+ 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/common/classes/fb_atomic.h
+ M src/jrd/jrd.cpp
+ M src/yvalve/PluginManager.cpp
+ M src/yvalve/why.cpp
+Misc.
+
+ 2011-04-29 19:11 hvlad
+ M src/common/classes/fb_atomic.h
+Windows version of PlatformAtomicPointer
+
+ 2011-04-29 16:24 alexpeshkoff
+ M src/common/classes/ImplementHelper.h
+ M src/include/FirebirdPluginApi.h
+ M src/jrd/jrd.cpp
+ M src/yvalve/MasterImplementation.cpp
+ M src/yvalve/PluginManager.cpp
+ M src/yvalve/PluginManager.h
+Added delay before unloading plugin module after last reference to that module outside plugin manager is gone
+
+ 2011-04-29 15:50 alexpeshkoff
+ D src/common/classes/Interlock.h
+ M src/common/classes/SyncObject.cpp
+ M src/common/classes/alloc.cpp
+ M src/common/classes/alloc.h
+ M src/common/classes/fb_atomic.h
+Cleanup: make fb_atomic be the single file working with atomic operations and membars
+
+ 2011-04-29 15:16 asfernandes
+ M src/dsql/DdlNodes.epp
+Correction.
+
+ 2011-04-29 12:03 hvlad
+ M src/common/classes/fb_atomic.h
+Typo and missed cast
+
+ 2011-04-29 11:34 hvlad
+ M src/common/classes/SyncObject.cpp
+Cleanup and some comments
+
+ 2011-04-29 11:12 hvlad
+ M src/common/classes/fb_atomic.h
+Let PlatformAtomicCounter::setValue() returns old value on Windows too
+
+ 2011-04-29 09:25 alexpeshkoff
+ M src/common/classes/fb_atomic.h
+Fixed posix build
+
2011-04-28 16:59 dimitr
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-04-30 02:28:31 UTC (rev 52855)
+++ firebird/trunk/src/jrd/build_no.h 2011-04-30 03:16:00 UTC (rev 52856)
@@ -3,16 +3,16 @@
*** DO NOT EDIT ***
TO CHANGE ANY INFORMATION IN HERE PLEASE
EDIT src/misc/writeBuildNum.sh
- FORMAL BUILD NUMBER:29319
+ FORMAL BUILD NUMBER:29328
*/
-#define PRODUCT_VER_STRING "3.0.0.29319"
-#define FILE_VER_STRING "WI-T3.0.0.29319"
-#define LICENSE_VER_STRING "WI-T3.0.0.29319"
-#define FILE_VER_NUMBER 3, 0, 0, 29319
+#define PRODUCT_VER_STRING "3.0.0.29328"
+#define FILE_VER_STRING "WI-T3.0.0.29328"
+#define LICENSE_VER_STRING "WI-T3.0.0.29328"
+#define FILE_VER_NUMBER 3, 0, 0, 29328
#define FB_MAJOR_VER "3"
#define FB_MINOR_VER "0"
#define FB_REV_NO "0"
-#define FB_BUILD_NO "29319"
+#define FB_BUILD_NO "29328"
#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-04-30 02:28:31 UTC (rev 52855)
+++ firebird/trunk/src/misc/writeBuildNum.sh 2011-04-30 03:16:00 UTC (rev 52856)
@@ -9,7 +9,7 @@
MajorVer=3
MinorVer=0
RevNo=0
-BuildNum=29319
+BuildNum=29328
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-01 03:16:33
|
Revision: 52860
http://firebird.svn.sourceforge.net/firebird/?rev=52860&view=rev
Author: firebirds
Date: 2011-05-01 03:16:27 +0000 (Sun, 01 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-04-30 18:23:04 UTC (rev 52859)
+++ firebird/trunk/ChangeLog 2011-05-01 03:16:27 UTC (rev 52860)
@@ -1,3 +1,15 @@
+ 2011-04-30 18:23 asfernandes
+ M src/common/config/os/config_root.h
+Invert the functionality of addSlash to fixPath. It was creating paths with double slashes in config files.
+The right way to create paths in others places is with PathUtils::concatPath, and it don't need what addSlash was doing.
+
+ 2011-04-30 11:38 hvlad
+ M src/common/classes/SyncObject.cpp
+ M src/common/classes/SyncObject.h
+ M src/common/classes/Synchronize.cpp
+ M src/common/classes/Synchronize.h
+Some refactoring and cleanup.
+
2011-04-30 02:28 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-04-30 18:23:04 UTC (rev 52859)
+++ firebird/trunk/src/jrd/build_no.h 2011-05-01 03:16:27 UTC (rev 52860)
@@ -3,16 +3,16 @@
*** DO NOT EDIT ***
TO CHANGE ANY INFORMATION IN HERE PLEASE
EDIT src/misc/writeBuildNum.sh
- FORMAL BUILD NUMBER:29328
+ FORMAL BUILD NUMBER:29330
*/
-#define PRODUCT_VER_STRING "3.0.0.29328"
-#define FILE_VER_STRING "WI-T3.0.0.29328"
-#define LICENSE_VER_STRING "WI-T3.0.0.29328"
-#define FILE_VER_NUMBER 3, 0, 0, 29328
+#define PRODUCT_VER_STRING "3.0.0.29330"
+#define FILE_VER_STRING "WI-T3.0.0.29330"
+#define LICENSE_VER_STRING "WI-T3.0.0.29330"
+#define FILE_VER_NUMBER 3, 0, 0, 29330
#define FB_MAJOR_VER "3"
#define FB_MINOR_VER "0"
#define FB_REV_NO "0"
-#define FB_BUILD_NO "29328"
+#define FB_BUILD_NO "29330"
#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-04-30 18:23:04 UTC (rev 52859)
+++ firebird/trunk/src/misc/writeBuildNum.sh 2011-05-01 03:16:27 UTC (rev 52860)
@@ -9,7 +9,7 @@
MajorVer=3
MinorVer=0
RevNo=0
-BuildNum=29328
+BuildNum=29330
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-04 03:17:16
|
Revision: 52872
http://firebird.svn.sourceforge.net/firebird/?rev=52872&view=rev
Author: firebirds
Date: 2011-05-04 03:17:09 +0000 (Wed, 04 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-03 17:09:46 UTC (rev 52871)
+++ firebird/trunk/ChangeLog 2011-05-04 03:17:09 UTC (rev 52872)
@@ -1,3 +1,11 @@
+ 2011-05-03 12:03 hvlad
+ M src/common/classes/alloc.cpp
+Don't use placement new[] as its behavior is inconsistent between compilers
+
+ 2011-05-03 07:43 alexpeshkoff
+ M src/yvalve/MasterImplementation.cpp
+This should fix deadlock, noticed by Damyan
+
2011-04-30 18:23 asfernandes
M src/common/config/os/config_root.h
Invert the functionality of addSlash to fixPath. It was creating paths with double slashes in config files.
Modified: firebird/trunk/src/jrd/build_no.h
===================================================================
--- firebird/trunk/src/jrd/build_no.h 2011-05-03 17:09:46 UTC (rev 52871)
+++ firebird/trunk/src/jrd/build_no.h 2011-05-04 03:17:09 UTC (rev 52872)
@@ -3,16 +3,16 @@
*** DO NOT EDIT ***
TO CHANGE ANY INFORMATION IN HERE PLEASE
EDIT src/misc/writeBuildNum.sh
- FORMAL BUILD NUMBER:29330
+ FORMAL BUILD NUMBER:29332
*/
-#define PRODUCT_VER_STRING "3.0.0.29330"
-#define FILE_VER_STRING "WI-T3.0.0.29330"
-#define LICENSE_VER_STRING "WI-T3.0.0.29330"
-#define FILE_VER_NUMBER 3, 0, 0, 29330
+#define PRODUCT_VER_STRING "3.0.0.29332"
+#define FILE_VER_STRING "WI-T3.0.0.29332"
+#define LICENSE_VER_STRING "WI-T3.0.0.29332"
+#define FILE_VER_NUMBER 3, 0, 0, 29332
#define FB_MAJOR_VER "3"
#define FB_MINOR_VER "0"
#define FB_REV_NO "0"
-#define FB_BUILD_NO "29330"
+#define FB_BUILD_NO "29332"
#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-03 17:09:46 UTC (rev 52871)
+++ firebird/trunk/src/misc/writeBuildNum.sh 2011-05-04 03:17:09 UTC (rev 52872)
@@ -9,7 +9,7 @@
MajorVer=3
MinorVer=0
RevNo=0
-BuildNum=29330
+BuildNum=29332
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-06 03:17:42
|
Revision: 52883
http://firebird.svn.sourceforge.net/firebird/?rev=52883&view=rev
Author: firebirds
Date: 2011-05-06 03:17:35 +0000 (Fri, 06 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-05 22:05:59 UTC (rev 52882)
+++ firebird/trunk/ChangeLog 2011-05-06 03:17:35 UTC (rev 52883)
@@ -1,3 +1,24 @@
+ 2011-05-05 22:05 hvlad
+ M src/jrd/dpm.epp
+Fixed bug CORE-3468 : Attempt to read after the end of file when nbackup state is stalled
+
+ 2011-05-05 18:11 hvlad
+ M src/jrd/cch.cpp
+ M src/jrd/cch.h
+ M src/jrd/cch_proto.h
+ M src/jrd/nbak.cpp
+Fixed bug CORE-3466 : Some changes could be lost during the merge of delta file into main database file.
+Removed BDB_merge flag and related code.
+
+ 2011-05-05 17:40 hvlad
+ M src/jrd/cch.cpp
+FiFixed bug CORE-3465 : Nbackup state lock could be not released after cache error. It results in "Can't lock state for write" bugcheck when backup state is going to be changed.
+
+ 2011-05-05 14:33 hvlad
+ M src/jrd/cch.cpp
+Fixed bug CORE-3464.
+Correct error reporting - bugcheck's 215 and 216 was confused with each other.
+
2011-05-03 12:03 hvlad
M src/common/classes/alloc.cpp
Don't use placement new[] as its behavior is inconsistent between compilers
Modified: firebird/trunk/src/jrd/build_no.h
===================================================================
--- firebird/trunk/src/jrd/build_no.h 2011-05-05 22:05:59 UTC (rev 52882)
+++ firebird/trunk/src/jrd/build_no.h 2011-05-06 03:17:35 UTC (rev 52883)
@@ -3,16 +3,16 @@
*** DO NOT EDIT ***
TO CHANGE ANY INFORMATION IN HERE PLEASE
EDIT src/misc/writeBuildNum.sh
- FORMAL BUILD NUMBER:29332
+ FORMAL BUILD NUMBER:29336
*/
-#define PRODUCT_VER_STRING "3.0.0.29332"
-#define FILE_VER_STRING "WI-T3.0.0.29332"
-#define LICENSE_VER_STRING "WI-T3.0.0.29332"
-#define FILE_VER_NUMBER 3, 0, 0, 29332
+#define PRODUCT_VER_STRING "3.0.0.29336"
+#define FILE_VER_STRING "WI-T3.0.0.29336"
+#define LICENSE_VER_STRING "WI-T3.0.0.29336"
+#define FILE_VER_NUMBER 3, 0, 0, 29336
#define FB_MAJOR_VER "3"
#define FB_MINOR_VER "0"
#define FB_REV_NO "0"
-#define FB_BUILD_NO "29332"
+#define FB_BUILD_NO "29336"
#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-05 22:05:59 UTC (rev 52882)
+++ firebird/trunk/src/misc/writeBuildNum.sh 2011-05-06 03:17:35 UTC (rev 52883)
@@ -9,7 +9,7 @@
MajorVer=3
MinorVer=0
RevNo=0
-BuildNum=29332
+BuildNum=29336
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-05-07 19:52:52
|
Revision: 52892
http://firebird.svn.sourceforge.net/firebird/?rev=52892&view=rev
Author: asfernandes
Date: 2011-05-07 19:52:44 +0000 (Sat, 07 May 2011)
Log Message:
-----------
Integrate IAttachment and ITransaction in the external engines API.
Modified Paths:
--------------
firebird/trunk/builds/posix/firebird.vers
firebird/trunk/builds/win32/defs/firebird.def
firebird/trunk/examples/udr/UdrCppExample.cpp
firebird/trunk/src/gpre/boot/gpre_meta_boot.cpp
firebird/trunk/src/include/FirebirdApi.h
firebird/trunk/src/include/FirebirdExternalApi.h
firebird/trunk/src/include/FirebirdUdrCpp.h
firebird/trunk/src/include/Interface.h
firebird/trunk/src/include/ProviderInterface.h
firebird/trunk/src/jrd/Attachment.cpp
firebird/trunk/src/jrd/Attachment.h
firebird/trunk/src/jrd/EngineInterface.h
firebird/trunk/src/jrd/ExtEngineManager.cpp
firebird/trunk/src/jrd/ExtEngineManager.h
firebird/trunk/src/jrd/extds/InternalDS.cpp
firebird/trunk/src/jrd/ibase.h
firebird/trunk/src/jrd/jrd.cpp
firebird/trunk/src/jrd/tra.h
firebird/trunk/src/plugins/udr_engine/UdrEngine.cpp
firebird/trunk/src/remote/client/interface.cpp
firebird/trunk/src/yvalve/MasterImplementation.cpp
firebird/trunk/src/yvalve/MasterImplementation.h
firebird/trunk/src/yvalve/PluginManager.cpp
firebird/trunk/src/yvalve/why.cpp
firebird/trunk/src/yvalve/why_proto.h
Modified: firebird/trunk/builds/posix/firebird.vers
===================================================================
--- firebird/trunk/builds/posix/firebird.vers 2011-05-07 19:33:46 UTC (rev 52891)
+++ firebird/trunk/builds/posix/firebird.vers 2011-05-07 19:52:44 UTC (rev 52892)
@@ -342,6 +342,9 @@
fb_get_master_interface
+fb_get_database_handle
+fb_get_transaction_handle
+
# Other misc functions
isc_ftof
Modified: firebird/trunk/builds/win32/defs/firebird.def
===================================================================
--- firebird/trunk/builds/win32/defs/firebird.def 2011-05-07 19:33:46 UTC (rev 52891)
+++ firebird/trunk/builds/win32/defs/firebird.def 2011-05-07 19:52:44 UTC (rev 52892)
@@ -352,6 +352,8 @@
fb_ping
fb_get_master_interface
+ fb_get_database_handle
+ fb_get_transaction_handle
gds__trace
gds__trace_raw
Modified: firebird/trunk/examples/udr/UdrCppExample.cpp
===================================================================
--- firebird/trunk/examples/udr/UdrCppExample.cpp 2011-05-07 19:33:46 UTC (rev 52891)
+++ firebird/trunk/examples/udr/UdrCppExample.cpp 2011-05-07 19:52:44 UTC (rev 52892)
@@ -158,8 +158,6 @@
unsigned char* eveBuffer;
unsigned char* eveResult;
- // NOTE: isc_event_block leaks the two memory buffers allocated.
- // You should manually construct the EPB if you care.
int eveLen = funcEventBlock(&eveBuffer, &eveResult, 1, s);
ISC_STATUS_ARRAY statusVector = {0};
@@ -173,6 +171,9 @@
statusVector);
funcEventCounts(&counter, eveLen, eveBuffer, eveResult);
+ isc_free((char*) eveBuffer);
+ isc_free((char*) eveResult);
+
// returns the counter
result->setInt(ThrowError(), counter);
}
Modified: firebird/trunk/src/gpre/boot/gpre_meta_boot.cpp
===================================================================
--- firebird/trunk/src/gpre/boot/gpre_meta_boot.cpp 2011-05-07 19:33:46 UTC (rev 52891)
+++ firebird/trunk/src/gpre/boot/gpre_meta_boot.cpp 2011-05-07 19:52:44 UTC (rev 52892)
@@ -720,6 +720,18 @@
fb_assert(false);
return NULL;
}
+
+ virtual IAttachment* registerAttachment(IProvider* /*provider*/, IAttachment* /*attachment*/)
+ {
+ fb_assert(false);
+ return NULL;
+ }
+
+ virtual ITransaction* registerTransaction(IAttachment* /*attachment*/, ITransaction* /*transaction*/)
+ {
+ fb_assert(false);
+ return NULL;
+ }
};
Modified: firebird/trunk/src/include/FirebirdApi.h
===================================================================
--- firebird/trunk/src/include/FirebirdApi.h 2011-05-07 19:33:46 UTC (rev 52891)
+++ firebird/trunk/src/include/FirebirdApi.h 2011-05-07 19:52:44 UTC (rev 52892)
@@ -106,25 +106,6 @@
};
-class Attachment : public Disposable
-{
-public:
- // Get an ISC compatible attachment handle.
- virtual Handle FB_CALL getHandle(Error* error) const = 0;
-
- virtual const char* FB_CALL getUserName() const = 0;
- virtual const char* FB_CALL getDatabaseName() const = 0;
-};
-
-
-class Transaction
-{
-public:
- // Get an ISC compatible transaction handle.
- virtual Handle FB_CALL getHandle(Error* error) const = 0;
-};
-
-
// Represents a parameter or column.
class Value
{
Modified: firebird/trunk/src/include/FirebirdExternalApi.h
===================================================================
--- firebird/trunk/src/include/FirebirdExternalApi.h 2011-05-07 19:33:46 UTC (rev 52891)
+++ firebird/trunk/src/include/FirebirdExternalApi.h 2011-05-07 19:52:44 UTC (rev 52892)
@@ -35,6 +35,7 @@
#include "FirebirdApi.h"
#include "FirebirdPluginApi.h"
+#include "ProviderInterface.h"
namespace Firebird {
@@ -58,12 +59,15 @@
virtual ExternalEngine* FB_CALL getEngine(Error* error) = 0;
// Gets the Attachment associated with this context.
- virtual Attachment* FB_CALL getAttachment(Error* error) = 0;
+ 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 Transaction* FB_CALL getTransaction(Error* error) = 0;
+ 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;
Modified: firebird/trunk/src/include/FirebirdUdrCpp.h
===================================================================
--- firebird/trunk/src/include/FirebirdUdrCpp.h 2011-05-07 19:33:46 UTC (rev 52891)
+++ firebird/trunk/src/include/FirebirdUdrCpp.h 2011-05-07 19:52:44 UTC (rev 52892)
@@ -438,14 +438,20 @@
public:
static isc_db_handle getIscDbHandle(ExternalContext* context)
{
- Attachment* att = context->getAttachment(ThrowError());
- return att->getHandle(ThrowError());
+ 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)
{
- Transaction* tra = context->getTransaction(ThrowError());
- return tra->getHandle(ThrowError());
+ 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)
Modified: firebird/trunk/src/include/Interface.h
===================================================================
--- firebird/trunk/src/include/Interface.h 2011-05-07 19:33:46 UTC (rev 52891)
+++ firebird/trunk/src/include/Interface.h 2011-05-07 19:52:44 UTC (rev 52892)
@@ -77,6 +77,8 @@
class IProvider;
class IPluginManager;
class ITimerControl;
+class IAttachment;
+class ITransaction;
// Master interface is used to access almost all other interfaces.
class IMaster : public IDisposable
@@ -91,6 +93,8 @@
virtual int FB_CARG upgradeInterface(IInterface* 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 IAttachment* registerAttachment(IProvider* provider, IAttachment* attachment) = 0;
+ virtual ITransaction* registerTransaction(IAttachment* attachment, ITransaction* transaction) = 0;
};
} // namespace Firebird
Modified: firebird/trunk/src/include/ProviderInterface.h
===================================================================
--- firebird/trunk/src/include/ProviderInterface.h 2011-05-07 19:33:46 UTC (rev 52891)
+++ firebird/trunk/src/include/ProviderInterface.h 2011-05-07 19:52:44 UTC (rev 52892)
@@ -178,8 +178,7 @@
unsigned int bufferLength, unsigned char* buffer) = 0;
// virtual ITransaction* FB_CARG startTransaction(IStatus* status, unsigned int tpbLength, const unsigned char* tpb) = 0;
// second form is tmp - not to rewrite external engines right now
- virtual ITransaction* FB_CARG startTransaction(IStatus* status, unsigned int tpbLength, const unsigned char* tpb,
- FB_API_HANDLE api) = 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;
@@ -230,10 +229,10 @@
class IProvider : public IPluginBase
{
public:
- virtual void FB_CARG attachDatabase(IStatus* status, IAttachment** ptr, FB_API_HANDLE api, const char* fileName,
- unsigned int dpbLength, const unsigned char* dpb) = 0;
- virtual void FB_CARG createDatabase(IStatus* status, IAttachment** ptr, FB_API_HANDLE api, const char* fileName,
- unsigned int dpbLength, const unsigned char* dpb) = 0;
+ 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 ITransaction* FB_CARG startTransaction(IStatus* status, unsigned int count, ...) = 0;
Modified: firebird/trunk/src/jrd/Attachment.cpp
===================================================================
--- firebird/trunk/src/jrd/Attachment.cpp 2011-05-07 19:33:46 UTC (rev 52891)
+++ firebird/trunk/src/jrd/Attachment.cpp 2011-05-07 19:52:44 UTC (rev 52892)
@@ -48,13 +48,13 @@
// static method
-Jrd::Attachment* Jrd::Attachment::create(Database* dbb, FB_API_HANDLE publicHandle)
+Jrd::Attachment* Jrd::Attachment::create(Database* dbb)
{
MemoryPool* const pool = dbb->createPool();
try
{
- Attachment* const attachment = FB_NEW(*pool) Attachment(pool, dbb, publicHandle);
+ Attachment* const attachment = FB_NEW(*pool) Attachment(pool, dbb);
pool->setStatsGroup(attachment->att_memory_stats);
return attachment;
}
@@ -135,11 +135,10 @@
}
-Jrd::Attachment::Attachment(MemoryPool* pool, Database* dbb, FB_API_HANDLE publicHandle)
+Jrd::Attachment::Attachment(MemoryPool* pool, Database* dbb)
: att_pool(pool),
att_memory_stats(&dbb->dbb_memory_stats),
att_database(dbb),
- att_public_handle(publicHandle),
att_requests(*pool),
att_lock_owner_id(Database::getLockOwnerId()),
att_backup_state_counter(0),
@@ -157,7 +156,8 @@
att_ext_connection(NULL),
att_ext_call_depth(0),
att_trace_manager(FB_NEW(*att_pool) TraceManager(this)),
- att_interface(NULL)
+ att_interface(NULL),
+ att_public_interface(NULL)
{
}
Modified: firebird/trunk/src/jrd/Attachment.h
===================================================================
--- firebird/trunk/src/jrd/Attachment.h 2011-05-07 19:33:46 UTC (rev 52891)
+++ firebird/trunk/src/jrd/Attachment.h 2011-05-07 19:52:44 UTC (rev 52892)
@@ -121,14 +121,13 @@
class Attachment : public pool_alloc<type_att>
{
public:
- static Attachment* create(Database* dbb, FB_API_HANDLE publicHandle);
+ static Attachment* create(Database* dbb);
static void destroy(Attachment* const attachment);
MemoryPool* const att_pool; // Memory pool
Firebird::MemoryStats att_memory_stats;
Database* att_database; // Parent database block
- FB_API_HANDLE att_public_handle; // Public handle
Attachment* att_next; // Next attachment to database
UserId* att_user; // User identification
jrd_tra* att_transactions; // Transactions belonging to attachment
@@ -177,6 +176,7 @@
TraceManager* att_trace_manager; // Trace API manager
JAttachment* att_interface;
+ Firebird::IAttachment* att_public_interface;
bool locksmith() const;
jrd_tra* getSysTransaction();
@@ -216,7 +216,7 @@
void backupStateReadUnLock(thread_db* tdbb);
private:
- Attachment(MemoryPool* pool, Database* dbb, FB_API_HANDLE publicHandle);
+ Attachment(MemoryPool* pool, Database* dbb);
~Attachment();
};
Modified: firebird/trunk/src/jrd/EngineInterface.h
===================================================================
--- firebird/trunk/src/jrd/EngineInterface.h 2011-05-07 19:33:46 UTC (rev 52891)
+++ firebird/trunk/src/jrd/EngineInterface.h 2011-05-07 19:52:44 UTC (rev 52892)
@@ -256,8 +256,8 @@
virtual void FB_CARG getInfo(Firebird::IStatus* status,
unsigned int itemsLength, const unsigned char* items,
unsigned int bufferLength, unsigned char* buffer);
- virtual JTransaction* FB_CARG startTransaction(Firebird::IStatus* status, unsigned int tpbLength, const unsigned char* tpb,
- FB_API_HANDLE api);
+ virtual JTransaction* FB_CARG startTransaction(Firebird::IStatus* status,
+ unsigned int tpbLength, const unsigned char* tpb);
virtual JTransaction* FB_CARG reconnectTransaction(Firebird::IStatus* status, unsigned int length, const unsigned char* id);
virtual JStatement* FB_CARG allocateStatement(Firebird::IStatus* status);
virtual JRequest* FB_CARG compileRequest(Firebird::IStatus* status, unsigned int blr_length, const unsigned char* blr);
@@ -353,10 +353,10 @@
}
// IProvider implementation
- virtual void FB_CARG attachDatabase(Firebird::IStatus* status, Firebird::IAttachment** ptr,
- FB_API_HANDLE api, const char* fileName, unsigned int dpbLength, const unsigned char* dpb);
- virtual void FB_CARG createDatabase(Firebird::IStatus* status, Firebird::IAttachment** ptr,
- FB_API_HANDLE api, const char* fileName, unsigned int dpbLength, const unsigned char* dpb);
+ virtual JAttachment* FB_CARG attachDatabase(Firebird::IStatus* status, const char* fileName,
+ unsigned int dpbLength, const unsigned char* dpb);
+ virtual JAttachment* FB_CARG createDatabase(Firebird::IStatus* status, const char* fileName,
+ unsigned int dpbLength, const unsigned char* dpb);
virtual JService* FB_CARG attachServiceManager(Firebird::IStatus* status, const char* service,
unsigned int spbLength, const unsigned char* spb);
//virtual ITransaction* startTransaction(Firebird::IStatus* status, unsigned int count, ...);
Modified: firebird/trunk/src/jrd/ExtEngineManager.cpp
===================================================================
--- firebird/trunk/src/jrd/ExtEngineManager.cpp 2011-05-07 19:33:46 UTC (rev 52891)
+++ firebird/trunk/src/jrd/ExtEngineManager.cpp 2011-05-07 19:52:44 UTC (rev 52892)
@@ -60,40 +60,6 @@
namespace Jrd {
-class ExtEngineManager::AttachmentImpl : public Firebird::Attachment
-{
-public:
- AttachmentImpl(ExternalContextImpl* aContext, Handle aHandle, Jrd::Attachment* aAttachment);
- virtual ~AttachmentImpl();
-
-public:
- virtual void FB_CALL dispose(Error* error);
-
- virtual Handle FB_CALL getHandle(Error* error) const;
- virtual const char* FB_CALL getUserName() const;
- virtual const char* FB_CALL getDatabaseName() const;
-
-private:
- ExternalContextImpl* context;
- FB_API_HANDLE handle;
- Jrd::Attachment* attachment;
-};
-
-
-class ExtEngineManager::TransactionImpl : public Firebird::Transaction
-{
-public:
- TransactionImpl(Handle aHandle);
- virtual ~TransactionImpl();
-
-public:
- virtual Handle FB_CALL getHandle(Error* error) const;
-
-private:
- FB_API_HANDLE handle;
-};
-
-
template <typename T> class ExtEngineManager::ContextManager
{
public:
@@ -200,89 +166,18 @@
//---------------------
-ExtEngineManager::AttachmentImpl::AttachmentImpl(ExternalContextImpl* aContext, Handle aHandle,
- Jrd::Attachment* aAttachment)
- : context(aContext),
- handle(aHandle),
- attachment(aAttachment)
-{
-}
-
-ExtEngineManager::AttachmentImpl::~AttachmentImpl()
-{
- context->attachment.release();
- handle = 0;
- dispose(LogError());
-}
-
-void FB_CALL ExtEngineManager::AttachmentImpl::dispose(Error* error)
-{
- ISC_STATUS_ARRAY statusVector;
-
- if (handle)
- {
- if (isc_detach_database(statusVector, &handle) != 0)
- {
- ErrorImpl::statusVectorToError(statusVector, error);
- return;
- }
- }
-
- context->attachment = NULL;
-}
-
-Handle FB_CALL ExtEngineManager::AttachmentImpl::getHandle(Error* /*error*/) const
-{
- return handle;
-}
-
-
-const char* FB_CALL ExtEngineManager::AttachmentImpl::getUserName() const
-{
- return attachment->att_user->usr_user_name.c_str();
-}
-
-
-const char* FB_CALL ExtEngineManager::AttachmentImpl::getDatabaseName() const
-{
- return attachment->att_database->dbb_database_name.c_str();
-}
-
-
-//---------------------
-
-
-ExtEngineManager::TransactionImpl::TransactionImpl(Handle aHandle)
- : handle(aHandle)
-{
-}
-
-ExtEngineManager::TransactionImpl::~TransactionImpl()
-{
-}
-
-Handle FB_CALL ExtEngineManager::TransactionImpl::getHandle(Error* /*error*/) const
-{
- return handle;
-}
-
-
-//---------------------
-
-
ExtEngineManager::ExternalContextImpl::ExternalContextImpl(thread_db* tdbb,
ExternalEngine* aEngine)
: engine(aEngine),
internalAttachment(tdbb->getAttachment()),
- miscInfo(*internalAttachment->att_pool),
- traHandle(0)
+ internalTransaction(NULL),
+ externalAttachment(NULL),
+ externalTransaction(NULL),
+ miscInfo(*internalAttachment->att_pool)
{
//// TODO: admin rights
- attHandle = internalAttachment->att_public_handle;
clientCharSet = INTL_charset_lookup(tdbb, internalAttachment->att_client_charset)->getName();
-
- setTransaction(tdbb);
}
ExtEngineManager::ExternalContextImpl::~ExternalContextImpl()
@@ -292,21 +187,48 @@
void ExtEngineManager::ExternalContextImpl::releaseTransaction()
{
- if (traHandle)
+ if (externalTransaction)
{
- traHandle = 0;
- transaction = NULL;
+ externalTransaction->release();
+ externalTransaction = NULL;
}
+
+ if (externalAttachment)
+ {
+ externalAttachment->release();
+ externalAttachment = NULL;
+ }
+
+ internalTransaction = NULL;
}
void ExtEngineManager::ExternalContextImpl::setTransaction(thread_db* tdbb)
{
+ jrd_tra* newTransaction = tdbb->getTransaction();
+
+ if (newTransaction == internalTransaction)
+ return;
+
releaseTransaction();
+ fb_assert(!externalAttachment && !externalTransaction);
- jrd_tra* tra = tdbb->getTransaction();
- traHandle = tra ? tra->tra_public_handle : 0;
+ MasterInterfacePtr master;
- transaction = FB_NEW(*internalAttachment->att_pool) TransactionImpl(traHandle);
+ if (internalAttachment)
+ {
+ internalAttachment->att_interface->addRef();
+
+ externalAttachment = master->registerAttachment(currentProvider(),
+ internalAttachment->att_interface);
+ }
+
+ if ((internalTransaction = newTransaction))
+ {
+ internalTransaction->tra_interface->addRef();
+
+ externalTransaction = master->registerTransaction(externalAttachment,
+ internalTransaction->tra_interface);
+ }
}
ExternalEngine* ExtEngineManager::ExternalContextImpl::getEngine(Error* /*error*/)
@@ -314,37 +236,37 @@
return engine;
}
-Firebird::Attachment* FB_CALL ExtEngineManager::ExternalContextImpl::getAttachment(Error* /*error*/)
+Firebird::IAttachment* FB_CALL ExtEngineManager::ExternalContextImpl::getAttachment(Error* /*error*/)
{
- if (!this->attachment)
- {
- thread_db* tdbb = JRD_get_thread_data();
- attachment = FB_NEW(*internalAttachment->att_pool) AttachmentImpl(this, attHandle,
- tdbb->getAttachment());
- }
+ return externalAttachment;
+}
- return attachment;
+Firebird::ITransaction* FB_CALL ExtEngineManager::ExternalContextImpl::getTransaction(Error* /*error*/)
+{
+ return externalTransaction;
}
-Firebird::Transaction* FB_CALL ExtEngineManager::ExternalContextImpl::getTransaction(Error* /*error*/)
+const char* FB_CALL ExtEngineManager::ExternalContextImpl::getUserName()
{
- return transaction;
+ return internalAttachment->att_user->usr_user_name.c_str();
}
+const char* FB_CALL ExtEngineManager::ExternalContextImpl::getDatabaseName()
+{
+ return internalAttachment->att_database->dbb_database_name.c_str();
+}
const Utf8* FB_CALL ExtEngineManager::ExternalContextImpl::getClientCharSet()
{
return clientCharSet.c_str();
}
-
int FB_CALL ExtEngineManager::ExternalContextImpl::obtainInfoCode()
{
static AtomicCounter counter;
return ++counter;
}
-
void* FB_CALL ExtEngineManager::ExternalContextImpl::getInfo(int code)
{
void* value = NULL;
@@ -352,7 +274,6 @@
return value;
}
-
void* FB_CALL ExtEngineManager::ExternalContextImpl::setInfo(int code, void* value)
{
void* oldValue = getInfo(code);
@@ -705,8 +626,11 @@
if (attInfo)
{
- ContextManager<ExternalFunction> ctxManager(tdbb, attInfo, attInfo->adminCharSet);
- engine->closeAttachment(LogError(), attInfo->context);
+ { // scope
+ ContextManager<ExternalFunction> ctxManager(tdbb, attInfo, attInfo->adminCharSet);
+ engine->closeAttachment(LogError(), attInfo->context);
+ }
+
delete attInfo;
}
}
Modified: firebird/trunk/src/jrd/ExtEngineManager.h
===================================================================
--- firebird/trunk/src/jrd/ExtEngineManager.h 2011-05-07 19:33:46 UTC (rev 52891)
+++ firebird/trunk/src/jrd/ExtEngineManager.h 2011-05-07 19:52:44 UTC (rev 52892)
@@ -41,6 +41,7 @@
class thread_db;
class jrd_prc;
+class jrd_tra;
class Attachment;
class Database;
class Format;
@@ -72,8 +73,10 @@
void setTransaction(thread_db* tdbb);
virtual Firebird::ExternalEngine* FB_CALL getEngine(Firebird::Error* error);
- virtual Firebird::Attachment* FB_CALL getAttachment(Firebird::Error* error);
- virtual Firebird::Transaction* FB_CALL getTransaction(Firebird::Error* error);
+ virtual Firebird::IAttachment* FB_CALL getAttachment(Firebird::Error* error);
+ virtual Firebird::ITransaction* FB_CALL getTransaction(Firebird::Error* error);
+ virtual const char* FB_CALL getUserName();
+ virtual const char* FB_CALL getDatabaseName();
virtual const Firebird::Utf8* FB_CALL getClientCharSet();
virtual int FB_CALL obtainInfoCode();
virtual void* FB_CALL getInfo(int code);
@@ -82,12 +85,11 @@
private:
Firebird::ExternalEngine* engine;
Attachment* internalAttachment;
+ jrd_tra* internalTransaction;
+ Firebird::IAttachment* externalAttachment;
+ Firebird::ITransaction* externalTransaction;
Firebird::GenericMap<Firebird::NonPooled<int, void*> > miscInfo;
- FB_API_HANDLE traHandle;
- FB_API_HANDLE attHandle;
Firebird::MetaName clientCharSet;
- Firebird::AutoPtr<AttachmentImpl> attachment;
- Firebird::AutoPtr<TransactionImpl> transaction;
};
struct EngineAttachment
Modified: firebird/trunk/src/jrd/extds/InternalDS.cpp
===================================================================
--- firebird/trunk/src/jrd/extds/InternalDS.cpp 2011-05-07 19:33:46 UTC (rev 52891)
+++ firebird/trunk/src/jrd/extds/InternalDS.cpp 2011-05-07 19:52:44 UTC (rev 52892)
@@ -163,7 +163,7 @@
{
EngineCallbackGuard guard(tdbb, *this);
- currentProvider()->attachDatabase(&status, &a, 0, m_dbName.c_str(),
+ a = currentProvider()->attachDatabase(&status, m_dbName.c_str(),
m_dpb.getBufferLength(), m_dpb.getBuffer());
}
@@ -277,8 +277,7 @@
EngineCallbackGuard guard(tdbb, *this);
IntStatus s(status);
- m_transaction = att->startTransaction(&s, tpb.getBufferLength(), tpb.getBuffer(), 0);
- //// FIXME: public_handle
+ m_transaction = att->startTransaction(&s, tpb.getBufferLength(), tpb.getBuffer());
}
}
Modified: firebird/trunk/src/jrd/ibase.h
===================================================================
--- firebird/trunk/src/jrd/ibase.h 2011-05-07 19:33:46 UTC (rev 52891)
+++ firebird/trunk/src/jrd/ibase.h 2011-05-07 19:52:44 UTC (rev 52892)
@@ -1154,6 +1154,13 @@
ISC_STATUS ISC_EXPORT fb_ping(ISC_STATUS*, isc_db_handle*);
+/***********************/
+/* Object interface */
+/***********************/
+
+ISC_STATUS ISC_EXPORT fb_get_database_handle(ISC_STATUS*, isc_db_handle*, void*);
+ISC_STATUS ISC_EXPORT fb_get_transaction_handle(ISC_STATUS*, isc_tr_handle*, void*);
+
/********************************/
/* Client information functions */
/********************************/
Modified: firebird/trunk/src/jrd/jrd.cpp
===================================================================
--- firebird/trunk/src/jrd/jrd.cpp 2011-05-07 19:33:46 UTC (rev 52891)
+++ firebird/trunk/src/jrd/jrd.cpp 2011-05-07 19:52:44 UTC (rev 52892)
@@ -788,8 +788,7 @@
static Database* init(thread_db*, const PathName&, RefPtr<Config>, bool);
static void prepare_tra(thread_db*, jrd_tra*, USHORT, const UCHAR*);
static void start_transaction(thread_db* tdbb, bool transliterate, jrd_tra** tra_handle,
- Jrd::Attachment* attachment, unsigned int tpb_length, const UCHAR* tpb,
- FB_API_HANDLE public_handle = 0);
+ Jrd::Attachment* attachment, unsigned int tpb_length, const UCHAR* tpb);
static void release_attachment(thread_db*, Jrd::Attachment*);
static void rollback(thread_db*, jrd_tra*, const bool);
static void shutdown_database(Database*, const bool);
@@ -1076,12 +1075,8 @@
namespace Jrd {
-void JProvider::attachDatabase(IStatus* user_status,
- Firebird::IAttachment** handle,
- FB_API_HANDLE public_handle,
- const char* filename,
- unsigned int dpb_length,
- const unsigned char* dpb)
+JAttachment* FB_CARG JProvider::attachDatabase(IStatus* user_status, const char* filename,
+ unsigned int dpb_length, const unsigned char* dpb)
{
/**************************************
*
@@ -1094,8 +1089,6 @@
* sullied by user data.
*
**************************************/
- *handle = NULL;
-
try
{
ThreadContextHolder tdbb(user_status);
@@ -1223,7 +1216,7 @@
}
}
- attachment = Jrd::Attachment::create(dbb, public_handle);
+ attachment = Jrd::Attachment::create(dbb);
tdbb->setAttachment(attachment);
attachment->att_filename = is_alias ? file_name : expanded_name;
attachment->att_network_protocol = options.dpb_network_protocol;
@@ -1662,7 +1655,6 @@
attachment->att_interface = jAtt;
MutexLockGuard guard(*(jAtt->getMutex()));
- *handle = jAtt;
if (attachment->att_trace_manager->needs(TRACE_EVENT_ATTACH))
{
@@ -1706,7 +1698,6 @@
}
catch (const Exception&)
{
- *handle = NULL;
attachment->att_flags = save_flags;
if (!(dbb->dbb_flags & DBB_bugcheck) && transaction)
TRA_rollback(tdbb, transaction, false, false);
@@ -1717,7 +1708,7 @@
// guardDatabases.leave();
jAtt->addRef();
- return;
+ return jAtt;
} // try
catch (const Exception& ex)
{
@@ -1733,7 +1724,8 @@
{
ex.stuffException(user_status);
}
- *handle = NULL;
+
+ return NULL;
}
@@ -2161,9 +2153,8 @@
}
-void JProvider::createDatabase(IStatus* user_status, Firebird::IAttachment** handle,
- FB_API_HANDLE public_handle, const char* filename, unsigned int dpb_length,
- const unsigned char* dpb)
+JAttachment* FB_CARG JProvider::createDatabase(IStatus* user_status, const char* filename,
+ unsigned int dpb_length, const unsigned char* dpb)
{
/**************************************
*
@@ -2175,8 +2166,6 @@
* Create a nice, squeeky clean database, uncorrupted by user data.
*
**************************************/
- *handle = NULL;
-
try
{
ThreadContextHolder tdbb(user_status);
@@ -2277,7 +2266,7 @@
dbb->dbb_encrypt_key = options.dpb_key;
}
- attachment = Jrd::Attachment::create(dbb, public_handle);
+ attachment = Jrd::Attachment::create(dbb);
tdbb->setAttachment(attachment);
attachment->att_filename = is_alias ? file_name : expanded_name;
attachment->att_network_protocol = options.dpb_network_protocol;
@@ -2348,7 +2337,7 @@
{
if (options.dpb_overwrite)
{
- attachDatabase(user_status, handle, public_handle, filename, dpb_length, dpb);
+ JAttachment* attachment2 = attachDatabase(user_status, filename, dpb_length, dpb);
if (user_status->get()[1] == isc_adm_task_denied)
{
throw;
@@ -2356,10 +2345,10 @@
bool allow_overwrite = false;
- if (*handle)
+ if (attachment2)
{
- allow_overwrite = reinterpret_cast<Attachment*>(*handle)->att_user->locksmith();
- (*handle)->detach(user_status);
+ allow_overwrite = attachment2->getHandle()->att_user->locksmith();
+ attachment2->detach(user_status);
}
else
{
@@ -2506,9 +2495,8 @@
JAttachment* jAtt = new JAttachment(attachment);
jAtt->addRef();
attachment->att_interface = jAtt;
- *handle = jAtt;
- return;
+ return jAtt;
} // try
catch (const Exception& ex)
{
@@ -2525,7 +2513,7 @@
ex.stuffException(user_status);
}
- *handle = NULL;
+ return NULL;
}
@@ -3910,7 +3898,7 @@
JTransaction* JAttachment::startTransaction(IStatus* user_status,
- unsigned int tpbLength, const unsigned char* tpb, FB_API_HANDLE public_handle)
+ unsigned int tpbLength, const unsigned char* tpb)
{
/**************************************
*
@@ -3929,7 +3917,7 @@
EngineContextHolder tdbb(user_status, this);
check_database(tdbb);
- start_transaction(tdbb, true, &tra, getHandle(), tpbLength, tpb, public_handle);
+ start_transaction(tdbb, true, &tra, getHandle(), tpbLength, tpb);
}
catch (const Exception& ex)
{
@@ -7147,8 +7135,7 @@
static void start_transaction(thread_db* tdbb, bool transliterate, jrd_tra** tra_handle,
- Jrd::Attachment* attachment, unsigned int tpb_length, const UCHAR* tpb,
- FB_API_HANDLE public_handle)
+ Jrd::Attachment* attachment, uns...
[truncated message content] |
|
From: <fir...@us...> - 2011-05-08 03:17:42
|
Revision: 52893
http://firebird.svn.sourceforge.net/firebird/?rev=52893&view=rev
Author: firebirds
Date: 2011-05-08 03:17:35 +0000 (Sun, 08 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-07 19:52:44 UTC (rev 52892)
+++ firebird/trunk/ChangeLog 2011-05-08 03:17:35 UTC (rev 52893)
@@ -1,3 +1,39 @@
+ 2011-05-07 19:52 asfernandes
+ M builds/posix/firebird.vers
+ M builds/win32/defs/firebird.def
+ M examples/udr/UdrCppExample.cpp
+ M src/gpre/boot/gpre_meta_boot.cpp
+ M src/include/FirebirdApi.h
+ M src/include/FirebirdExternalApi.h
+ M src/include/FirebirdUdrCpp.h
+ M src/include/Interface.h
+ M src/include/ProviderInterface.h
+ M src/jrd/Attachment.cpp
+ M src/jrd/Attachment.h
+ M src/jrd/EngineInterface.h
+ M src/jrd/ExtEngineManager.cpp
+ M src/jrd/ExtEngineManager.h
+ M src/jrd/extds/InternalDS.cpp
+ M src/jrd/ibase.h
+ M src/jrd/jrd.cpp
+ M src/jrd/tra.h
+ M src/plugins/udr_engine/UdrEngine.cpp
+ M src/remote/client/interface.cpp
+ M src/yvalve/MasterImplementation.cpp
+ M src/yvalve/MasterImplementation.h
+ M src/yvalve/PluginManager.cpp
+ M src/yvalve/why.cpp
+ M src/yvalve/why_proto.h
+Integrate IAttachment and ITransaction in the external engines API.
+
+ 2011-05-07 19:33 asfernandes
+ M src/common/classes/SyncObject.h
+ M src/common/classes/Synchronize.h
+ M src/common/classes/alloc.cpp
+ M src/jrd/cch.cpp
+ M src/jrd/cch.h
+Misc.
+
2011-05-05 22:05 hvlad
M src/jrd/dpm.epp
Fixed bug CORE-3468 : Attempt to read after the end of file when nbackup state is stalled
Modified: firebird/trunk/src/jrd/build_no.h
===================================================================
--- firebird/trunk/src/jrd/build_no.h 2011-05-07 19:52:44 UTC (rev 52892)
+++ firebird/trunk/src/jrd/build_no.h 2011-05-08 03:17:35 UTC (rev 52893)
@@ -3,16 +3,16 @@
*** DO NOT EDIT ***
TO CHANGE ANY INFORMATION IN HERE PLEASE
EDIT src/misc/writeBuildNum.sh
- FORMAL BUILD NUMBER:29336
+ FORMAL BUILD NUMBER:29338
*/
-#define PRODUCT_VER_STRING "3.0.0.29336"
-#define FILE_VER_STRING "WI-T3.0.0.29336"
-#define LICENSE_VER_STRING "WI-T3.0.0.29336"
-#define FILE_VER_NUMBER 3, 0, 0, 29336
+#define PRODUCT_VER_STRING "3.0.0.29338"
+#define FILE_VER_STRING "WI-T3.0.0.29338"
+#define LICENSE_VER_STRING "WI-T3.0.0.29338"
+#define FILE_VER_NUMBER 3, 0, 0, 29338
#define FB_MAJOR_VER "3"
#define FB_MINOR_VER "0"
#define FB_REV_NO "0"
-#define FB_BUILD_NO "29336"
+#define FB_BUILD_NO "29338"
#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-07 19:52:44 UTC (rev 52892)
+++ firebird/trunk/src/misc/writeBuildNum.sh 2011-05-08 03:17:35 UTC (rev 52893)
@@ -9,7 +9,7 @@
MajorVer=3
MinorVer=0
RevNo=0
-BuildNum=29336
+BuildNum=29338
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-09 03:17:22
|
Revision: 52895
http://firebird.svn.sourceforge.net/firebird/?rev=52895&view=rev
Author: firebirds
Date: 2011-05-09 03:17:15 +0000 (Mon, 09 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-08 17:53:37 UTC (rev 52894)
+++ firebird/trunk/ChangeLog 2011-05-09 03:17:15 UTC (rev 52895)
@@ -1,3 +1,12 @@
+ 2011-05-08 17:53 asfernandes
+ M src/include/FirebirdApi.h
+ M src/include/FirebirdExternalApi.h
+ M src/include/FirebirdUdr.h
+ M src/include/FirebirdUdrCpp.h
+ M src/include/Interface.h
+Remove "#pragma GCC system_header". Current build with GCC 4.5.2 and clang 2.8 shows no related warning.
+This pragma was interfering with -MMD dependency output, causing crashes after full build when the API is changed.
+
2011-05-07 19:52 asfernandes
M builds/posix/firebird.vers
M builds/win32/defs/firebird.def
Modified: firebird/trunk/src/jrd/build_no.h
===================================================================
--- firebird/trunk/src/jrd/build_no.h 2011-05-08 17:53:37 UTC (rev 52894)
+++ firebird/trunk/src/jrd/build_no.h 2011-05-09 03:17:15 UTC (rev 52895)
@@ -3,16 +3,16 @@
*** DO NOT EDIT ***
TO CHANGE ANY INFORMATION IN HERE PLEASE
EDIT src/misc/writeBuildNum.sh
- FORMAL BUILD NUMBER:29338
+ FORMAL BUILD NUMBER:29339
*/
-#define PRODUCT_VER_STRING "3.0.0.29338"
-#define FILE_VER_STRING "WI-T3.0.0.29338"
-#define LICENSE_VER_STRING "WI-T3.0.0.29338"
-#define FILE_VER_NUMBER 3, 0, 0, 29338
+#define PRODUCT_VER_STRING "3.0.0.29339"
+#define FILE_VER_STRING "WI-T3.0.0.29339"
+#define LICENSE_VER_STRING "WI-T3.0.0.29339"
+#define FILE_VER_NUMBER 3, 0, 0, 29339
#define FB_MAJOR_VER "3"
#define FB_MINOR_VER "0"
#define FB_REV_NO "0"
-#define FB_BUILD_NO "29338"
+#define FB_BUILD_NO "29339"
#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-08 17:53:37 UTC (rev 52894)
+++ firebird/trunk/src/misc/writeBuildNum.sh 2011-05-09 03:17:15 UTC (rev 52895)
@@ -9,7 +9,7 @@
MajorVer=3
MinorVer=0
RevNo=0
-BuildNum=29338
+BuildNum=29339
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-09 10:15:29
|
Revision: 52896
http://firebird.svn.sourceforge.net/firebird/?rev=52896&view=rev
Author: hvlad
Date: 2011-05-09 10:15:19 +0000 (Mon, 09 May 2011)
Log Message:
-----------
Shared page cache implementation
Modified Paths:
--------------
firebird/trunk/builds/install/misc/firebird.conf.in
firebird/trunk/src/common/classes/SyncObject.h
firebird/trunk/src/common/classes/locks.h
firebird/trunk/src/common/config/config.cpp
firebird/trunk/src/common/config/config.h
firebird/trunk/src/common/isc_sync.cpp
firebird/trunk/src/dsql/AggNodes.cpp
firebird/trunk/src/dsql/dsql.cpp
firebird/trunk/src/dsql/dsql.h
firebird/trunk/src/jrd/Attachment.cpp
firebird/trunk/src/jrd/Attachment.h
firebird/trunk/src/jrd/Database.cpp
firebird/trunk/src/jrd/Database.h
firebird/trunk/src/jrd/DatabaseSnapshot.cpp
firebird/trunk/src/jrd/ExtEngineManager.cpp
firebird/trunk/src/jrd/ExtEngineManager.h
firebird/trunk/src/jrd/Function.epp
firebird/trunk/src/jrd/GlobalRWLock.cpp
firebird/trunk/src/jrd/GlobalRWLock.h
firebird/trunk/src/jrd/JrdStatement.cpp
firebird/trunk/src/jrd/Relation.cpp
firebird/trunk/src/jrd/Relation.h
firebird/trunk/src/jrd/RuntimeStatistics.cpp
firebird/trunk/src/jrd/RuntimeStatistics.h
firebird/trunk/src/jrd/ValueImpl.cpp
firebird/trunk/src/jrd/blb.cpp
firebird/trunk/src/jrd/cch.cpp
firebird/trunk/src/jrd/cch.h
firebird/trunk/src/jrd/cch_proto.h
firebird/trunk/src/jrd/cmp.cpp
firebird/trunk/src/jrd/dfw.epp
firebird/trunk/src/jrd/dpm.epp
firebird/trunk/src/jrd/dyn.epp
firebird/trunk/src/jrd/exe.cpp
firebird/trunk/src/jrd/exe_proto.h
firebird/trunk/src/jrd/ext.cpp
firebird/trunk/src/jrd/extds/ExtDS.cpp
firebird/trunk/src/jrd/fun.epp
firebird/trunk/src/jrd/idx.cpp
firebird/trunk/src/jrd/inf.cpp
firebird/trunk/src/jrd/ini.epp
firebird/trunk/src/jrd/intl.cpp
firebird/trunk/src/jrd/jrd.cpp
firebird/trunk/src/jrd/jrd.h
firebird/trunk/src/jrd/jrd_proto.h
firebird/trunk/src/jrd/lck.cpp
firebird/trunk/src/jrd/lck.h
firebird/trunk/src/jrd/met.epp
firebird/trunk/src/jrd/nbak.cpp
firebird/trunk/src/jrd/nbak.h
firebird/trunk/src/jrd/os/pio.h
firebird/trunk/src/jrd/os/win32/winnt.cpp
firebird/trunk/src/jrd/pag.cpp
firebird/trunk/src/jrd/pcmet.epp
firebird/trunk/src/jrd/recsrc/SortedStream.cpp
firebird/trunk/src/jrd/sdw.cpp
firebird/trunk/src/jrd/shut.cpp
firebird/trunk/src/jrd/sort.cpp
firebird/trunk/src/jrd/sort.h
firebird/trunk/src/jrd/tpc.cpp
firebird/trunk/src/jrd/tpc_proto.h
firebird/trunk/src/jrd/tra.cpp
firebird/trunk/src/jrd/tra.h
firebird/trunk/src/jrd/trace/TraceDSQLHelpers.h
firebird/trunk/src/jrd/trace/TraceJrdHelpers.h
firebird/trunk/src/jrd/trace/TraceObjects.cpp
firebird/trunk/src/jrd/trace/TraceObjects.h
firebird/trunk/src/jrd/validation.cpp
firebird/trunk/src/jrd/vio.cpp
firebird/trunk/src/lock/lock.cpp
firebird/trunk/src/lock/lock_proto.h
firebird/trunk/src/remote/server/os/win32/srvr_w32.cpp
firebird/trunk/src/remote/server/server.cpp
Modified: firebird/trunk/builds/install/misc/firebird.conf.in
===================================================================
--- firebird/trunk/builds/install/misc/firebird.conf.in 2011-05-09 03:17:15 UTC (rev 52895)
+++ firebird/trunk/builds/install/misc/firebird.conf.in 2011-05-09 10:15:19 UTC (rev 52896)
@@ -660,11 +660,11 @@
# The value is taken from a bit map in which each bit represents a CPU.
# Thus, to use only the first processor, the value is 1. To use both
# CPU 1 and CPU 2, the value is 3. To use CPU 2 and CPU 3, the value
-# is 6. The default value is 1.
+# is 6. The default value is 0 - no affinity will be set.
#
# Type: integer
#
-#CpuAffinityMask = 1
+#CpuAffinityMask = 0
# ----------------------------
@@ -838,3 +838,16 @@
# 16 16777216 320 335544320 896 939524096
# 32 33554432 384 402653184 1024 1073741824
#
+
+# Type: boolean
+#SharedCache = true
+
+# Type: boolean
+#SharedDatabase = false
+
+
+# SharedCache SharedDatabase Mode
+# false false Classic with exlusive access // single attachment only ?
+# false true Classic with shared access // traditional CS\SC
+# true false Super with exlusive access // traditional SS
+# true true Super with shared access //
Modified: firebird/trunk/src/common/classes/SyncObject.h
===================================================================
--- firebird/trunk/src/common/classes/SyncObject.h 2011-05-09 03:17:15 UTC (rev 52895)
+++ firebird/trunk/src/common/classes/SyncObject.h 2011-05-09 10:15:19 UTC (rev 52896)
@@ -173,6 +173,11 @@
syncObject = obj;
}
+ SyncType getState() const
+ {
+ return state;
+ }
+
protected:
SyncType state;
SyncType request;
@@ -199,27 +204,28 @@
}
};
-class SyncUnlockGuard : public Sync
+class SyncUnlockGuard
{
public:
- SyncUnlockGuard(SyncObject* obj, const char* fromWhere)
- : Sync(obj, fromWhere)
+ SyncUnlockGuard(Sync& _sync) :
+ sync(_sync)
{
- oldState = state;
+ oldState = sync.getState();
fb_assert(oldState != SYNC_NONE);
if (oldState != SYNC_NONE)
- unlock();
+ sync.unlock();
}
~SyncUnlockGuard()
{
if (oldState != SYNC_NONE)
- lock(oldState);
+ sync.lock(oldState);
}
private:
SyncType oldState;
+ Sync& sync;
};
} // namespace Firebird
Modified: firebird/trunk/src/common/classes/locks.h
===================================================================
--- firebird/trunk/src/common/classes/locks.h 2011-05-09 03:17:15 UTC (rev 52895)
+++ firebird/trunk/src/common/classes/locks.h 2011-05-09 10:15:19 UTC (rev 52896)
@@ -378,6 +378,49 @@
Mutex* lock;
};
+class MutexUnlockGuard
+{
+public:
+ explicit MutexUnlockGuard(Mutex &aLock)
+ : lock(&aLock)
+ {
+ try {
+ lock->leave();
+ }
+ catch (const Exception&)
+ {
+ DtorException::devHalt();
+ }
+ }
+
+ ~MutexUnlockGuard()
+ {
+ lock->enter();
+ }
+
+private:
+ // Forbid copying
+ MutexUnlockGuard(const MutexUnlockGuard&);
+ MutexUnlockGuard& operator=(const MutexUnlockGuard&);
+
+ Mutex* lock;
+};
+
+
+class MutexCheckoutGuard
+{
+public:
+ MutexCheckoutGuard(Mutex& mtxCout, Mutex& mtxLock) :
+ unlock(mtxCout),
+ lock(mtxLock)
+ {
+ }
+
+private:
+ MutexUnlockGuard unlock;
+ MutexLockGuard lock;
+};
+
} //namespace Firebird
#endif // CLASSES_LOCKS_H
Modified: firebird/trunk/src/common/config/config.cpp
===================================================================
--- firebird/trunk/src/common/config/config.cpp 2011-05-09 03:17:15 UTC (rev 52895)
+++ firebird/trunk/src/common/config/config.cpp 2011-05-09 10:15:19 UTC (rev 52896)
@@ -115,7 +115,7 @@
{TYPE_INTEGER, "TempCacheLimit", (ConfigValue) -1}, // bytes
{TYPE_BOOLEAN, "RemoteFileOpenAbility", (ConfigValue) false},
{TYPE_INTEGER, "GuardianOption", (ConfigValue) 1},
- {TYPE_INTEGER, "CpuAffinityMask", (ConfigValue) 1},
+ {TYPE_INTEGER, "CpuAffinityMask", (ConfigValue) 0},
{TYPE_INTEGER, "TcpRemoteBufferSize", (ConfigValue) 8192}, // bytes
{TYPE_BOOLEAN, "TcpNoNagle", (ConfigValue) true},
{TYPE_INTEGER, "DefaultDbCachePages", (ConfigValue) -1}, // pages
@@ -171,7 +171,9 @@
{TYPE_STRING, "AuthClient", (ConfigValue) "Legacy_Auth, Win_Sspi"},
{TYPE_STRING, "UserManager", (ConfigValue) "Legacy_Auth"},
{TYPE_STRING, "TracePlugin", (ConfigValue) "fbtrace"},
- {TYPE_STRING, "SecurityDatabase", (ConfigValue) "$(root)/security3.fdb"} // security database name
+ {TYPE_STRING, "SecurityDatabase", (ConfigValue) "$(root)/security3.fdb"}, // security database name
+ {TYPE_BOOLEAN, "SharedCache", (ConfigValue) true},
+ {TYPE_BOOLEAN, "SharedDatabase", (ConfigValue) false}
};
/******************************************************************************
@@ -668,20 +670,12 @@
bool Config::getSharedCache()
{
-#ifdef SUPERSERVER
- return true;
-#else
- return false;
-#endif
+ return (bool) getDefaultConfig()->values[KEY_SHARED_CACHE];
}
bool Config::getSharedDatabase()
{
-#ifdef SUPERSERVER
- return false;
-#else
- return true;
-#endif
+ return (bool) getDefaultConfig()->values[KEY_SHARED_DATABASE];
}
bool Config::getMultiClientServer()
Modified: firebird/trunk/src/common/config/config.h
===================================================================
--- firebird/trunk/src/common/config/config.h 2011-05-09 03:17:15 UTC (rev 52895)
+++ firebird/trunk/src/common/config/config.h 2011-05-09 10:15:19 UTC (rev 52896)
@@ -135,6 +135,8 @@
KEY_PLUG_AUTH_MANAGE,
KEY_PLUG_TRACE,
KEY_SECURITY_DATABASE,
+ KEY_SHARED_CACHE,
+ KEY_SHARED_DATABASE,
MAX_CONFIG_KEY // keep it last
};
Modified: firebird/trunk/src/common/isc_sync.cpp
===================================================================
--- firebird/trunk/src/common/isc_sync.cpp 2011-05-09 03:17:15 UTC (rev 52895)
+++ firebird/trunk/src/common/isc_sync.cpp 2011-05-09 10:15:19 UTC (rev 52896)
@@ -1334,13 +1334,9 @@
*
**************************************/
-#ifdef SUPERSERVER
- event->event_id = 0;
-#else
- static int idCounter = 0; // Should it be AtomicCounter? AP-2008
+ static AtomicCounter idCounter;
event->event_id = ++idCounter;
-#endif
event->event_pid = process_id = getpid();
event->event_count = 0;
@@ -2745,16 +2741,12 @@
BOOL res = FALSE;
if (fnSwitchToThread)
{
-#if !defined SUPERSERVER
const HANDLE hThread = GetCurrentThread();
SetThreadPriority(hThread, THREAD_PRIORITY_ABOVE_NORMAL);
-#endif
res = (*fnSwitchToThread)();
-#if !defined SUPERSERVER
SetThreadPriority(hThread, THREAD_PRIORITY_NORMAL);
-#endif
}
return res;
Modified: firebird/trunk/src/dsql/AggNodes.cpp
===================================================================
--- firebird/trunk/src/dsql/AggNodes.cpp 2011-05-09 03:17:15 UTC (rev 52895)
+++ firebird/trunk/src/dsql/AggNodes.cpp 2011-05-09 10:15:19 UTC (rev 52896)
@@ -322,7 +322,7 @@
asbImpure->iasb_sort = NULL;
asbImpure->iasb_sort = FB_NEW(request->req_sorts.getPool()) Sort(
- database, &request->req_sorts, asb->length,
+ request->req_attachment, &request->req_sorts, asb->length,
asb->keyItems.getCount(), 1, asb->keyItems.begin(),
RecordSource::rejectDuplicate, 0);
}
Modified: firebird/trunk/src/dsql/dsql.cpp
===================================================================
--- firebird/trunk/src/dsql/dsql.cpp 2011-05-09 03:17:15 UTC (rev 52895)
+++ firebird/trunk/src/dsql/dsql.cpp 2011-05-09 10:15:19 UTC (rev 52896)
@@ -1381,10 +1381,9 @@
if (attachment->att_dsql_instance)
return attachment->att_dsql_instance;
- MemoryPool& pool = *attachment->att_database->createPool();
+ MemoryPool& pool = *attachment->createPool();
dsql_dbb* const database = FB_NEW(pool) dsql_dbb(pool);
database->dbb_attachment = attachment;
- database->dbb_database = attachment->att_database;
attachment->att_dsql_instance = database;
INI_init_dsql(tdbb, database);
Modified: firebird/trunk/src/dsql/dsql.h
===================================================================
--- firebird/trunk/src/dsql/dsql.h 2011-05-09 03:17:15 UTC (rev 52895)
+++ firebird/trunk/src/dsql/dsql.h 2011-05-09 10:15:19 UTC (rev 52896)
@@ -37,7 +37,7 @@
#include "../common/common.h"
#include "../jrd/RuntimeStatistics.h"
#include "../jrd/val.h" // Get rid of duplicated FUN_T enum.
-#include "../jrd/Database.h"
+#include "../jrd/Attachment.h"
#include "../dsql/BlrWriter.h"
#include "../common/classes/array.h"
#include "../common/classes/GenericMap.h"
@@ -146,7 +146,6 @@
Firebird::string, class dsql_req*> > > dbb_cursors; // known cursors in database
MemoryPool& dbb_pool; // The current pool for the dbb
- Database* dbb_database;
Attachment* dbb_attachment;
dsql_str* dbb_dfl_charset;
bool dbb_no_charset;
@@ -170,12 +169,12 @@
MemoryPool* createPool()
{
- return dbb_database->createPool();
+ return dbb_attachment->createPool();
}
void deletePool(MemoryPool* pool)
{
- dbb_database->deletePool(pool);
+ dbb_attachment->deletePool(pool);
}
};
Modified: firebird/trunk/src/jrd/Attachment.cpp
===================================================================
--- firebird/trunk/src/jrd/Attachment.cpp 2011-05-09 03:17:15 UTC (rev 52895)
+++ firebird/trunk/src/jrd/Attachment.cpp 2011-05-09 10:15:19 UTC (rev 52896)
@@ -25,6 +25,7 @@
#include "firebird.h"
#include "../jrd/Attachment.h"
#include "../jrd/Database.h"
+#include "../jrd/Function.h"
#include "../jrd/nbak.h"
#include "../jrd/trace/TraceManager.h"
#include "../jrd/PreparedStatement.h"
@@ -95,6 +96,29 @@
}
+MemoryPool* Jrd::Attachment::createPool()
+{
+ MemoryPool* const pool = MemoryPool::createPool(att_pool, att_memory_stats);
+ att_pools.add(pool);
+ return pool;
+}
+
+
+void Jrd::Attachment::deletePool(MemoryPool* pool)
+{
+ if (pool)
+ {
+ size_t pos;
+ if (att_pools.find(pool, pos))
+ {
+ att_pools.remove(pos);
+ }
+
+ MemoryPool::deletePool(pool);
+ }
+}
+
+
bool Jrd::Attachment::backupStateWriteLock(thread_db* tdbb, SSHORT wait)
{
if (att_backup_state_counter++)
@@ -157,15 +181,29 @@
att_ext_call_depth(0),
att_trace_manager(FB_NEW(*att_pool) TraceManager(this)),
att_interface(NULL),
- att_public_interface(NULL)
+ att_public_interface(NULL),
+ att_functions(*pool),
+ att_internal(*pool),
+ att_dyn_req(*pool),
+ att_charsets(*pool),
+ att_charset_ids(*pool),
+ att_pools(*pool)
{
+ att_internal.grow(irq_MAX);
+ att_dyn_req.grow(drq_MAX);
}
Jrd::Attachment::~Attachment()
{
+ destroyIntlObjects();
delete att_trace_manager;
+ while (att_pools.getCount())
+ {
+ deletePool(att_pools.pop());
+ }
+
// For normal attachments that happens in release_attachment(),
// but for special ones like GC should be done also in dtor -
// they do not (and should not) call release_attachment().
@@ -326,6 +364,12 @@
* block doesn't get dereferenced after it is released
*
**************************************/
+ if (!att_long_locks)
+ return;
+
+ Sync lckSync(&att_database->dbb_lck_sync, "Attachment::detachLocksFromAttachment");
+ lckSync.lock(SYNC_EXCLUSIVE);
+
Lock* long_lock = att_long_locks;
while (long_lock)
{
@@ -337,3 +381,134 @@
}
att_long_locks = NULL;
}
+
+// Find an inactive incarnation of a system request. If necessary, clone it.
+jrd_req* Jrd::Attachment::findSystemRequest(thread_db* tdbb, USHORT id, USHORT which)
+{
+ static const int MAX_RECURSION = 100;
+
+ // If the request hasn't been compiled or isn't active, there're nothing to do.
+
+ //Database::CheckoutLockGuard guard(this, dbb_cmp_clone_mutex);
+
+ fb_assert(which == IRQ_REQUESTS || which == DYN_REQUESTS);
+
+ JrdStatement* statement = (which == IRQ_REQUESTS ? att_internal[id] : att_dyn_req[id]);
+
+ if (!statement)
+ return NULL;
+
+ // Look for requests until we find one that is available.
+
+ for (int n = 0;; ++n)
+ {
+ if (n > MAX_RECURSION)
+ {
+ ERR_post(Arg::Gds(isc_no_meta_update) <<
+ Arg::Gds(isc_req_depth_exceeded) << Arg::Num(MAX_RECURSION));
+ // Msg363 "request depth exceeded. (Recursive definition?)"
+ }
+
+ jrd_req* clone = statement->getRequest(tdbb, n);
+
+ if (!(clone->req_flags & (req_active | req_reserved)))
+ {
+ clone->req_flags |= req_reserved;
+ return clone;
+ }
+ }
+}
+
+void Jrd::Attachment::shutdown(thread_db* tdbb)
+{
+ // go through relations and indices and release
+ // all existence locks that might have been taken
+
+ vec<jrd_rel*>* rvector = att_relations;
+ if (rvector)
+ {
+ vec<jrd_rel*>::iterator ptr, end;
+ for (ptr = rvector->begin(), end = rvector->end(); ptr < end; ++ptr)
+ {
+ jrd_rel* relation = *ptr;
+ if (relation)
+ {
+ if (relation->rel_existence_lock)
+ {
+ LCK_release(tdbb, relation->rel_existence_lock);
+ relation->rel_flags |= REL_check_existence;
+ relation->rel_use_count = 0;
+ }
+ if (relation->rel_partners_lock)
+ {
+ LCK_release(tdbb, relation->rel_partners_lock);
+ relation->rel_flags |= REL_check_partners;
+ }
+ if (relation->rel_rescan_lock)
+ {
+ LCK_release(tdbb, relation->rel_rescan_lock);
+ relation->rel_flags &= ~REL_scanned;
+ }
+ for (IndexLock* index = relation->rel_index_locks; index; index = index->idl_next)
+ {
+ if (index->idl_lock)
+ {
+ index->idl_count = 0;
+ LCK_release(tdbb, index->idl_lock);
+ }
+ }
+ }
+ }
+ }
+
+ // release all procedure existence locks that might have been taken
+
+ vec<jrd_prc*>* pvector = att_procedures;
+ if (pvector)
+ {
+ vec<jrd_prc*>::iterator pptr, pend;
+ for (pptr = pvector->begin(), pend = pvector->end(); pptr < pend; ++pptr)
+ {
+ jrd_prc* procedure = *pptr;
+ if (procedure)
+ {
+ if (procedure->prc_existence_lock)
+ {
+ LCK_release(tdbb, procedure->prc_existence_lock);
+ procedure->prc_flags |= PRC_check_existence;
+ procedure->prc_use_count = 0;
+ }
+ }
+ }
+ }
+
+ // release all function existence locks that might have been taken
+
+ for (Function** iter = att_functions.begin(); iter < att_functions.end(); ++iter)
+ {
+ Function* const function = *iter;
+
+ if (function)
+ {
+ function->releaseLocks(tdbb);
+ }
+ }
+
+ // release collation existence locks
+
+ releaseIntlObjects();
+
+ // And release the system requests.
+
+ for (JrdStatement** itr = att_internal.begin(); itr != att_internal.end(); ++itr)
+ {
+ if (*itr)
+ (*itr)->release(tdbb);
+ }
+
+ for (JrdStatement** itr = att_dyn_req.begin(); itr != att_dyn_req.end(); ++itr)
+ {
+ if (*itr)
+ (*itr)->release(tdbb);
+ }
+}
Modified: firebird/trunk/src/jrd/Attachment.h
===================================================================
--- firebird/trunk/src/jrd/Attachment.h 2011-05-09 03:17:15 UTC (rev 52895)
+++ firebird/trunk/src/jrd/Attachment.h 2011-05-09 10:15:19 UTC (rev 52896)
@@ -45,6 +45,8 @@
class Connection;
}
+class CharSetContainer;
+
namespace Jrd
{
class thread_db;
@@ -71,6 +73,12 @@
class PreparedStatement;
class TraceManager;
template <typename T> class vec;
+ class jrd_rel;
+ class jrd_prc;
+ class Trigger;
+ typedef Firebird::ObjectsArray<Trigger> trig_vec;
+ class Function;
+ class JrdStatement;
struct DSqlCacheItem
{
@@ -121,6 +129,95 @@
class Attachment : public pool_alloc<type_att>
{
public:
+ class SyncGuard
+ {
+ public:
+ SyncGuard(Attachment* att, bool optional = false) :
+ m_mutex(NULL)
+ {
+ if (att && att->att_interface)
+ m_mutex = att->att_interface->getMutex();
+
+ fb_assert(optional || m_mutex);
+
+ if (m_mutex)
+ m_mutex->enter();
+ }
+
+ ~SyncGuard()
+ {
+ if (m_mutex)
+ m_mutex->leave();
+ }
+
+ private:
+ // copying is prohibited
+ SyncGuard(const SyncGuard&);
+ SyncGuard& operator=(const SyncGuard&);
+
+ Firebird::Mutex* m_mutex;
+ };
+
+ class Checkout
+ {
+ public:
+ Checkout(Attachment* att, bool optional = false) :
+ m_mutex(NULL)
+ {
+ if (att && att->att_interface)
+ {
+ m_ref = att->att_interface;
+ m_mutex = att->att_interface->getMutex();
+ }
+
+ fb_assert(optional || m_mutex);
+
+ if (m_mutex)
+ m_mutex->leave();
+ }
+
+ ~Checkout()
+ {
+ if (m_mutex)
+ m_mutex->enter();
+ }
+
+ private:
+ // copying is prohibited
+ Checkout(const Checkout&);
+ Checkout& operator=(const Checkout&);
+
+ Firebird::Mutex* m_mutex;
+ Firebird::RefPtr<JAttachment> m_ref;
+ };
+
+ class CheckoutLockGuard
+ {
+ public:
+ CheckoutLockGuard(Attachment* att, Firebird::Mutex& mutex, bool optional = false) :
+ m_mutex(mutex)
+ {
+ if (!m_mutex.tryEnter())
+ {
+ Checkout attCout(att, optional);
+ m_mutex.enter();
+ }
+ }
+
+ ~CheckoutLockGuard()
+ {
+ m_mutex.leave();
+ }
+
+ private:
+ // copying is prohibited
+ CheckoutLockGuard(const CheckoutLockGuard&);
+ CheckoutLockGuard& operator=(const CheckoutLockGuard&);
+
+ Firebird::Mutex& m_mutex;
+ };
+
+public:
static Attachment* create(Database* dbb);
static void destroy(Attachment* const attachment);
@@ -170,6 +267,7 @@
Firebird::SortedArray<void*> att_udf_pointers;
dsql_dbb* att_dsql_instance;
bool att_in_use; // attachment in use (can't be detached or dropped)
+ int att_use_count; // number of API calls running except of asyncronous ones
EDS::Connection* att_ext_connection; // external connection executed by this attachment
ULONG att_ext_call_depth; // external connection call depth, 0 for user attachment
@@ -178,6 +276,35 @@
JAttachment* att_interface;
Firebird::IAttachment* att_public_interface;
+/// former Database members
+ vec<jrd_rel*>* att_relations; // relation vector
+ vec<jrd_prc*>* att_procedures; // scanned procedures
+ trig_vec* att_triggers[DB_TRIGGER_MAX];
+ trig_vec* att_ddl_triggers;
+ Firebird::Array<Function*> att_functions; // User defined functions
+
+ Firebird::Array<JrdStatement*> att_internal; // internal statements
+ Firebird::Array<JrdStatement*> att_dyn_req; // internal dyn statements
+
+ jrd_req* findSystemRequest(thread_db* tdbb, USHORT id, USHORT which);
+
+ Firebird::Array<CharSetContainer*> att_charsets; // intl character set descriptions
+ Firebird::GenericMap<Firebird::Pair<Firebird::Left<
+ Firebird::MetaName, USHORT> > > att_charset_ids; // Character set ids
+
+ void releaseIntlObjects(); // defined in intl.cpp
+ void destroyIntlObjects(); // defined in intl.cpp
+
+ // from CMP_shutdown_database and CMP_fini
+ void shutdown(thread_db* tdbb);
+
+ Firebird::Array<MemoryPool*> att_pools; // pools
+
+ MemoryPool* createPool();
+ void deletePool(MemoryPool* pool);
+
+/// former Database members
+
bool locksmith() const;
jrd_tra* getSysTransaction();
void setSysTransaction(jrd_tra* trans); // used only by TRA_init
Modified: firebird/trunk/src/jrd/Database.cpp
===================================================================
--- firebird/trunk/src/jrd/Database.cpp 2011-05-09 03:17:15 UTC (rev 52895)
+++ firebird/trunk/src/jrd/Database.cpp 2011-05-09 10:15:19 UTC (rev 52896)
@@ -77,12 +77,14 @@
Database::~Database()
{
- destroyIntlObjects();
-
- fb_assert(dbb_pools[0] == dbb_permanent);
- for (size_t i = 1; i < dbb_pools.getCount(); ++i)
{
- MemoryPool::deletePool(dbb_pools[i]);
+ Firebird::SyncLockGuard guard(&dbb_pools_sync, SYNC_EXCLUSIVE, "Database::~Database");
+
+ fb_assert(dbb_pools[0] == dbb_permanent);
+ for (size_t i = 1; i < dbb_pools.getCount(); ++i)
+ {
+ MemoryPool::deletePool(dbb_pools[i]);
+ }
}
delete dbb_monitoring_data;
@@ -90,7 +92,8 @@
dbb_flags |= DBB_destroying;
- Checkout dcoHolder(this);
+// Checkout dcoHolder(this);
+
// This line decrements the usage counter and may cause the destructor to be called.
// It should happen with the dbb_sync unlocked.
LockManager::destroy(dbb_lock_mgr);
@@ -101,57 +104,19 @@
{
if (pool)
{
- size_t pos;
- if (dbb_pools.find(pool, pos))
{
- dbb_pools.remove(pos);
+ Firebird::SyncLockGuard guard(&dbb_pools_sync, SYNC_EXCLUSIVE, "Database::deletePool");
+ size_t pos;
+ if (dbb_pools.find(pool, pos))
+ {
+ dbb_pools.remove(pos);
+ }
}
MemoryPool::deletePool(pool);
}
}
- // Find an inactive incarnation of a system request. If necessary, clone it.
- jrd_req* Database::findSystemRequest(thread_db* tdbb, USHORT id, USHORT which)
- {
- static const int MAX_RECURSION = 100;
-
- // If the request hasn't been compiled or isn't active, there're nothing to do.
-
- Database::CheckoutLockGuard guard(this, dbb_cmp_clone_mutex);
-
- fb_assert(which == IRQ_REQUESTS || which == DYN_REQUESTS);
-
- JrdStatement* statement = (which == IRQ_REQUESTS ? dbb_internal[id] : dbb_dyn_req[id]);
-
- if (!statement)
- return NULL;
-
- // Look for requests until we find one that is available.
-
- for (int n = 0;; ++n)
- {
- if (n > MAX_RECURSION)
- {
- ERR_post(Arg::Gds(isc_no_meta_update) <<
- Arg::Gds(isc_req_depth_exceeded) << Arg::Num(MAX_RECURSION));
- // Msg363 "request depth exceeded. (Recursive definition?)"
- }
-
- jrd_req* clone = statement->getRequest(tdbb, n);
-
- if (!(clone->req_flags & (req_active | req_reserved)))
- {
- clone->req_flags |= req_reserved;
- clone->setAttachment(tdbb->getAttachment());
- fb_assert(clone->req_attachment);
- return clone;
- }
- }
- }
-
- // Database::SharedCounter implementation
-
Database::SharedCounter::SharedCounter()
{
memset(m_counters, 0, sizeof(m_counters));
@@ -180,6 +145,8 @@
ValueCache* const counter = &m_counters[space];
Database* const dbb = tdbb->getDatabase();
+ SyncLockGuard guard(&dbb->dbb_sh_counter_sync, SYNC_EXCLUSIVE, "Database::SharedCounter::generate");
+
if (!counter->lock)
{
Lock* const lock = FB_NEW_RPT(*dbb->dbb_permanent, sizeof(SLONG)) Lock();
@@ -225,11 +192,13 @@
try
{
- Database::SyncGuard dsGuard(dbb, true);
+ if (dbb->dbb_flags & DBB_not_in_use)
+ return 0;
+ SyncLockGuard guard(&dbb->dbb_sh_counter_sync, SYNC_EXCLUSIVE, "Database::blockingAstSharedCounter");
+
ThreadContextHolder tdbb;
tdbb->setDatabase(dbb);
- // tdbb->setAttachment(counter->lock->lck_attachment);
Jrd::ContextPoolHolder context(tdbb, dbb->dbb_permanent);
Modified: firebird/trunk/src/jrd/Database.h
===================================================================
--- firebird/trunk/src/jrd/Database.h 2011-05-09 03:17:15 UTC (rev 52895)
+++ firebird/trunk/src/jrd/Database.h 2011-05-09 10:15:19 UTC (rev 52896)
@@ -62,25 +62,21 @@
#include "../jrd/event_proto.h"
#include "../lock/lock_proto.h"
#include "../common/config/config.h"
+#include "../common/classes/SyncObject.h"
+#include "../common/classes/Synchronize.h"
-class CharSetContainer;
-
namespace Jrd
{
- class Trigger;
- template <typename T> class vec;
- class jrd_prc;
- class jrd_rel;
- class Shadow;
- class BlobFilter;
- class TxPageCache;
- class BackupManager;
- class ExternalFileDirectoryList;
- class MonitoringData;
+template <typename T> class vec;
+class jrd_rel;
+class Shadow;
+class BlobFilter;
+class TipCache;
+class BackupManager;
+class ExternalFileDirectoryList;
+class MonitoringData;
- typedef Firebird::ObjectsArray<Trigger> trig_vec;
-
// general purpose vector
template <class T, BlockType TYPE = type_vec>
class vec_base : protected pool_alloc<TYPE>
@@ -238,150 +234,7 @@
class Database : public pool_alloc<type_dbb>
{
- class Sync : public Firebird::RefCounted
- {
- public:
- Sync() : threadId(0)
- {}
-
- void lock()
- {
- ThreadPriorityScheduler::enter();
- ++waiters;
- syncMutex.enter();
- --waiters;
- threadId = getThreadId();
- }
-
- void unlock()
- {
- ThreadPriorityScheduler::exit();
- threadId = 0;
- syncMutex.leave();
- }
-
- bool hasContention() const
- {
- return (waiters.value() > 0);
- }
-
- private:
- ~Sync()
- {
- if (threadId)
- {
- syncMutex.leave();
- }
- }
-
- // copying is prohibited
- Sync(const Sync&);
- Sync& operator=(const Sync&);
-
- Firebird::Mutex syncMutex;
- Firebird::AtomicCounter waiters;
- FB_THREAD_ID threadId;
- };
-
public:
-
- class SyncGuard
- {
- public:
- explicit SyncGuard(Database* dbb, bool ast = false)
- : sync(*dbb->dbb_sync)
- {
- if (!dbb)
- {
- Firebird::status_exception::raise(Firebird::Arg::Gds(isc_bad_db_handle));
- }
-
- sync.addRef();
- sync.lock();
-
- if (ast && dbb->dbb_flags & DBB_destroying)
- {
- sync.unlock();
- sync.release();
- Firebird::LongJump::raise();
- }
- }
-
- ~SyncGuard()
- {
- try
- {
- sync.unlock();
- }
- catch (const Firebird::Exception&)
- {
- DtorException::devHalt();
- }
- sync.release();
- }
-
- private:
- // copying is prohibited
- SyncGuard(const SyncGuard&);
- SyncGuard& operator=(const SyncGuard&);
-
- Sync& sync;
- };
-
- class Checkout
- {
- public:
- explicit Checkout(Database* dbb)
- : sync(*dbb->dbb_sync)
- {
- sync.unlock();
- }
-
- ~Checkout()
- {
- sync.lock();
- }
-
- private:
- // copying is prohibited
- Checkout(const Checkout&);
- Checkout& operator=(const Checkout&);
-
- Sync& sync;
- };
-
- class CheckoutLockGuard
- {
- public:
- CheckoutLockGuard(Database* dbb, Firebird::Mutex& m)
- : mutex(m)
- {
- if (!mutex.tryEnter())
- {
- Checkout dcoHolder(dbb);
- mutex.enter();
- }
- }
-
- ~CheckoutLockGuard()
- {
- try {
- mutex.leave();
- }
- catch (const Firebird::Exception&)
- {
- DtorException::devHalt();
- }
- }
-
- private:
- // copying is prohibited
- CheckoutLockGuard(const CheckoutLockGuard&);
- CheckoutLockGuard& operator=(const CheckoutLockGuard&);
-
- Firebird::Mutex& mutex;
- };
-
class SharedCounter
{
static const ULONG DEFAULT_CACHE_SIZE = 16;
@@ -452,44 +305,42 @@
return fb_utils::genUniqueId();
}
- mutable Firebird::RefPtr<Sync> dbb_sync; // Database sync primitive
+ Firebird::SyncObject dbb_sync;
+ Firebird::SyncObject dbb_lck_sync; // syncronize operations with att_long_locks at different attachments
+
LockManager* dbb_lock_mgr;
EventManager* dbb_event_mgr;
Database* dbb_next; // Next database block in system
Attachment* dbb_attachments; // Active attachments
BufferControl* dbb_bcb; // Buffer control block
- vec<jrd_rel*>* dbb_relations; // relation vector
- vec<jrd_prc*>* dbb_procedures; // scanned procedures
int dbb_monitoring_id; // dbb monitoring identifier
Lock* dbb_lock; // granddaddy lock
+
+ Firebird::SyncObject dbb_sh_counter_sync;
+
+ Firebird::SyncObject dbb_shadow_sync;
Shadow* dbb_shadow; // shadow control block
Lock* dbb_shadow_lock; // lock for synchronizing addition of shadows
+
Lock* dbb_retaining_lock; // lock for preserving commit retaining snapshot
Lock* dbb_monitor_lock; // lock for monitoring purposes
PageManager dbb_page_manager;
vcl* dbb_t_pages; // pages number for transactions
vcl* dbb_gen_id_pages; // known pages for gen_id
BlobFilter* dbb_blob_filters; // known blob filters
- trig_vec* dbb_triggers[DB_TRIGGER_MAX];
- trig_vec* dbb_ddl_triggers;
- MonitoringData* dbb_monitoring_data; // monitoring data
+ Firebird::SyncObject dbb_mon_sync; // syncronize operations with d...
[truncated message content] |
|
From: <asf...@us...> - 2011-05-10 01:12:21
|
Revision: 52897
http://firebird.svn.sourceforge.net/firebird/?rev=52897&view=rev
Author: asfernandes
Date: 2011-05-10 01:12:14 +0000 (Tue, 10 May 2011)
Log Message:
-----------
Misc.
Modified Paths:
--------------
firebird/trunk/builds/install/misc/firebird.conf.in
firebird/trunk/src/common/classes/SyncObject.h
firebird/trunk/src/common/classes/locks.h
firebird/trunk/src/common/isc_sync.cpp
firebird/trunk/src/jrd/Attachment.cpp
firebird/trunk/src/jrd/Attachment.h
firebird/trunk/src/jrd/Database.cpp
firebird/trunk/src/jrd/Database.h
firebird/trunk/src/jrd/DatabaseSnapshot.cpp
firebird/trunk/src/jrd/ExtEngineManager.cpp
firebird/trunk/src/jrd/Function.epp
firebird/trunk/src/jrd/GlobalRWLock.cpp
firebird/trunk/src/jrd/Relation.cpp
firebird/trunk/src/jrd/cch.cpp
firebird/trunk/src/jrd/cch.h
firebird/trunk/src/jrd/dyn.epp
firebird/trunk/src/jrd/exe.cpp
firebird/trunk/src/jrd/extds/ExtDS.cpp
firebird/trunk/src/jrd/ibase.h
firebird/trunk/src/jrd/inf.cpp
firebird/trunk/src/jrd/intl.cpp
firebird/trunk/src/jrd/jrd.cpp
firebird/trunk/src/jrd/jrd.h
firebird/trunk/src/jrd/lck.cpp
firebird/trunk/src/jrd/os/win32/winnt.cpp
firebird/trunk/src/jrd/tpc.cpp
firebird/trunk/src/jrd/tpc_proto.h
Modified: firebird/trunk/builds/install/misc/firebird.conf.in
===================================================================
--- firebird/trunk/builds/install/misc/firebird.conf.in 2011-05-09 10:15:19 UTC (rev 52896)
+++ firebird/trunk/builds/install/misc/firebird.conf.in 2011-05-10 01:12:14 UTC (rev 52897)
@@ -848,6 +848,6 @@
# SharedCache SharedDatabase Mode
# false false Classic with exlusive access // single attachment only ?
-# false true Classic with shared access // traditional CS\SC
+# false true Classic with shared access // traditional CS/SC
# true false Super with exlusive access // traditional SS
# true true Super with shared access //
Modified: firebird/trunk/src/common/classes/SyncObject.h
===================================================================
--- firebird/trunk/src/common/classes/SyncObject.h 2011-05-09 10:15:19 UTC (rev 52896)
+++ firebird/trunk/src/common/classes/SyncObject.h 2011-05-10 01:12:14 UTC (rev 52897)
@@ -204,11 +204,11 @@
}
};
-class SyncUnlockGuard
+class SyncUnlockGuard
{
public:
- SyncUnlockGuard(Sync& _sync) :
- sync(_sync)
+ SyncUnlockGuard(Sync& aSync) :
+ sync(aSync)
{
oldState = sync.getState();
@@ -225,7 +225,7 @@
private:
SyncType oldState;
- Sync& sync;
+ Sync& sync;
};
} // namespace Firebird
Modified: firebird/trunk/src/common/classes/locks.h
===================================================================
--- firebird/trunk/src/common/classes/locks.h 2011-05-09 10:15:19 UTC (rev 52896)
+++ firebird/trunk/src/common/classes/locks.h 2011-05-10 01:12:14 UTC (rev 52897)
@@ -361,7 +361,8 @@
~MutexLockGuard()
{
- try {
+ try
+ {
lock->leave();
}
catch (const Exception&)
@@ -384,7 +385,8 @@
explicit MutexUnlockGuard(Mutex &aLock)
: lock(&aLock)
{
- try {
+ try
+ {
lock->leave();
}
catch (const Exception&)
Modified: firebird/trunk/src/common/isc_sync.cpp
===================================================================
--- firebird/trunk/src/common/isc_sync.cpp 2011-05-09 10:15:19 UTC (rev 52896)
+++ firebird/trunk/src/common/isc_sync.cpp 2011-05-10 01:12:14 UTC (rev 52897)
@@ -2732,13 +2732,14 @@
if (!bInit)
{
HMODULE hLib = GetModuleHandle("kernel32.dll");
- if (hLib) {
+ if (hLib)
fnSwitchToThread = (pfnSwitchToThread) GetProcAddress(hLib, "SwitchToThread");
- }
+
bInit = true;
}
BOOL res = FALSE;
+
if (fnSwitchToThread)
{
const HANDLE hThread = GetCurrentThread();
Modified: firebird/trunk/src/jrd/Attachment.cpp
===================================================================
--- firebird/trunk/src/jrd/Attachment.cpp 2011-05-09 10:15:19 UTC (rev 52896)
+++ firebird/trunk/src/jrd/Attachment.cpp 2011-05-10 01:12:14 UTC (rev 52897)
@@ -110,9 +110,7 @@
{
size_t pos;
if (att_pools.find(pool, pos))
- {
att_pools.remove(pos);
- }
MemoryPool::deletePool(pool);
}
@@ -199,10 +197,8 @@
destroyIntlObjects();
delete att_trace_manager;
- while (att_pools.getCount())
- {
+ while (att_pools.hasData())
deletePool(att_pools.pop());
- }
// For normal attachments that happens in release_attachment(),
// but for special ones like GC should be done also in dtor -
@@ -421,16 +417,19 @@
void Jrd::Attachment::shutdown(thread_db* tdbb)
{
- // go through relations and indices and release
- // all existence locks that might have been taken
+ // Go through relations and indices and release
+ // all existence locks that might have been taken.
vec<jrd_rel*>* rvector = att_relations;
+
if (rvector)
{
vec<jrd_rel*>::iterator ptr, end;
+
for (ptr = rvector->begin(), end = rvector->end(); ptr < end; ++ptr)
{
jrd_rel* relation = *ptr;
+
if (relation)
{
if (relation->rel_existence_lock)
@@ -439,16 +438,19 @@
relation->rel_flags |= REL_check_existence;
relation->rel_use_count = 0;
}
+
if (relation->rel_partners_lock)
{
LCK_release(tdbb, relation->rel_partners_lock);
relation->rel_flags |= REL_check_partners;
}
+
if (relation->rel_rescan_lock)
{
LCK_release(tdbb, relation->rel_rescan_lock);
relation->rel_flags &= ~REL_scanned;
}
+
for (IndexLock* index = relation->rel_index_locks; index; index = index->idl_next)
{
if (index->idl_lock)
@@ -461,15 +463,18 @@
}
}
- // release all procedure existence locks that might have been taken
+ // Release all procedure existence locks that might have been taken.
vec<jrd_prc*>* pvector = att_procedures;
+
if (pvector)
{
vec<jrd_prc*>::iterator pptr, pend;
+
for (pptr = pvector->begin(), pend = pvector->end(); pptr < pend; ++pptr)
{
jrd_prc* procedure = *pptr;
+
if (procedure)
{
if (procedure->prc_existence_lock)
@@ -482,20 +487,17 @@
}
}
- // release all function existence locks that might have been taken
+ // Release all function existence locks that might have been taken.
for (Function** iter = att_functions.begin(); iter < att_functions.end(); ++iter)
{
Function* const function = *iter;
if (function)
- {
function->releaseLocks(tdbb);
- }
}
- // release collation existence locks
-
+ // Release collation existence locks.
releaseIntlObjects();
// And release the system requests.
Modified: firebird/trunk/src/jrd/Attachment.h
===================================================================
--- firebird/trunk/src/jrd/Attachment.h 2011-05-09 10:15:19 UTC (rev 52896)
+++ firebird/trunk/src/jrd/Attachment.h 2011-05-10 01:12:14 UTC (rev 52897)
@@ -132,8 +132,8 @@
class SyncGuard
{
public:
- SyncGuard(Attachment* att, bool optional = false) :
- m_mutex(NULL)
+ SyncGuard(Attachment* att, bool optional = false)
+ : m_mutex(NULL)
{
if (att && att->att_interface)
m_mutex = att->att_interface->getMutex();
@@ -161,8 +161,8 @@
class Checkout
{
public:
- Checkout(Attachment* att, bool optional = false) :
- m_mutex(NULL)
+ Checkout(Attachment* att, bool optional = false)
+ : m_mutex(NULL)
{
if (att && att->att_interface)
{
@@ -194,8 +194,8 @@
class CheckoutLockGuard
{
public:
- CheckoutLockGuard(Attachment* att, Firebird::Mutex& mutex, bool optional = false) :
- m_mutex(mutex)
+ CheckoutLockGuard(Attachment* att, Firebird::Mutex& mutex, bool optional = false)
+ : m_mutex(mutex)
{
if (!m_mutex.tryEnter())
{
@@ -267,7 +267,7 @@
Firebird::SortedArray<void*> att_udf_pointers;
dsql_dbb* att_dsql_instance;
bool att_in_use; // attachment in use (can't be detached or dropped)
- int att_use_count; // number of API calls running except of asyncronous ones
+ int att_use_count; // number of API calls running except of asyncronous ones
EDS::Connection* att_ext_connection; // external connection executed by this attachment
ULONG att_ext_call_depth; // external connection call depth, 0 for user attachment
@@ -276,7 +276,8 @@
JAttachment* att_interface;
Firebird::IAttachment* att_public_interface;
-/// former Database members
+ /// former Database members - start
+
vec<jrd_rel*>* att_relations; // relation vector
vec<jrd_prc*>* att_procedures; // scanned procedures
trig_vec* att_triggers[DB_TRIGGER_MAX];
@@ -294,7 +295,7 @@
void releaseIntlObjects(); // defined in intl.cpp
void destroyIntlObjects(); // defined in intl.cpp
-
+
// from CMP_shutdown_database and CMP_fini
void shutdown(thread_db* tdbb);
@@ -303,7 +304,7 @@
MemoryPool* createPool();
void deletePool(MemoryPool* pool);
-/// former Database members
+ /// former Database members - end
bool locksmith() const;
jrd_tra* getSysTransaction();
Modified: firebird/trunk/src/jrd/Database.cpp
===================================================================
--- firebird/trunk/src/jrd/Database.cpp 2011-05-09 10:15:19 UTC (rev 52896)
+++ firebird/trunk/src/jrd/Database.cpp 2011-05-10 01:12:14 UTC (rev 52897)
@@ -57,14 +57,14 @@
#endif
}
- Firebird::string Database::getUniqueFileId() const
+ string Database::getUniqueFileId() const
{
const PageSpace* const pageSpace = dbb_page_manager.findPageSpace(DB_PAGE_SPACE);
- Firebird::UCharBuffer buffer;
+ UCharBuffer buffer;
PIO_get_unique_file_id(pageSpace->file, buffer);
- Firebird::string file_id;
+ string file_id;
char* s = file_id.getBuffer(2 * buffer.getCount());
for (size_t i = 0; i < buffer.getCount(); i++)
{
@@ -78,13 +78,12 @@
Database::~Database()
{
{
- Firebird::SyncLockGuard guard(&dbb_pools_sync, SYNC_EXCLUSIVE, "Database::~Database");
-
+ SyncLockGuard guard(&dbb_pools_sync, SYNC_EXCLUSIVE, "Database::~Database");
+
fb_assert(dbb_pools[0] == dbb_permanent);
+
for (size_t i = 1; i < dbb_pools.getCount(); ++i)
- {
MemoryPool::deletePool(dbb_pools[i]);
- }
}
delete dbb_monitoring_data;
@@ -92,7 +91,7 @@
dbb_flags |= DBB_destroying;
-// Checkout dcoHolder(this);
+ //Checkout dcoHolder(this);
// This line decrements the usage counter and may cause the destructor to be called.
// It should happen with the dbb_sync unlocked.
@@ -105,12 +104,11 @@
if (pool)
{
{
- Firebird::SyncLockGuard guard(&dbb_pools_sync, SYNC_EXCLUSIVE, "Database::deletePool");
+ SyncLockGuard guard(&dbb_pools_sync, SYNC_EXCLUSIVE, "Database::deletePool");
size_t pos;
+
if (dbb_pools.find(pool, pos))
- {
dbb_pools.remove(pos);
- }
}
MemoryPool::deletePool(pool);
@@ -204,7 +202,7 @@
LCK_downgrade(tdbb, counter->lock);
}
- catch (const Firebird::Exception&)
+ catch (const Exception&)
{} // no-op
return 0;
Modified: firebird/trunk/src/jrd/Database.h
===================================================================
--- firebird/trunk/src/jrd/Database.h 2011-05-09 10:15:19 UTC (rev 52896)
+++ firebird/trunk/src/jrd/Database.h 2011-05-10 01:12:14 UTC (rev 52897)
@@ -317,9 +317,9 @@
BufferControl* dbb_bcb; // Buffer control block
int dbb_monitoring_id; // dbb monitoring identifier
Lock* dbb_lock; // granddaddy lock
-
+
Firebird::SyncObject dbb_sh_counter_sync;
-
+
Firebird::SyncObject dbb_shadow_sync;
Shadow* dbb_shadow; // shadow control block
Lock* dbb_shadow_lock; // lock for synchronizing addition of shadows
Modified: firebird/trunk/src/jrd/DatabaseSnapshot.cpp
===================================================================
--- firebird/trunk/src/jrd/DatabaseSnapshot.cpp 2011-05-09 10:15:19 UTC (rev 52896)
+++ firebird/trunk/src/jrd/DatabaseSnapshot.cpp 2011-05-10 01:12:14 UTC (rev 52897)
@@ -363,6 +363,7 @@
if (!(dbb->dbb_flags & DBB_not_in_use))
{
ContextPoolHolder context(tdbb, dbb->dbb_permanent);
+
try
{
dumpData(tdbb);
@@ -410,13 +411,13 @@
{
SyncLockGuard monGuard(&dbb->dbb_mon_sync, SYNC_EXCLUSIVE, "DatabaseSnapshot::DatabaseSnapshot");
- // Release our own lock
+ // Release our own lock.
LCK_release(tdbb, dbb->dbb_monitor_lock);
dbb->dbb_ast_flags &= ~DBB_monitor_off;
{ // scope for the RAII object
- // Ensure we'll be dealing with a valid backup state inside the call below
+ // Ensure we'll be dealing with a valid backup state inside the call below.
BackupManager::StateReadGuard holder(tdbb);
// Dump our own data
@@ -775,7 +776,7 @@
putDatabase(dbb, writer, fb_utils::genUniqueId());
// Attachment information
-
+
Attachment* old_attachment = tdbb->getAttachment();
Attachment::Checkout attCout(old_attachment, true);
Modified: firebird/trunk/src/jrd/ExtEngineManager.cpp
===================================================================
--- firebird/trunk/src/jrd/ExtEngineManager.cpp 2011-05-09 10:15:19 UTC (rev 52896)
+++ firebird/trunk/src/jrd/ExtEngineManager.cpp 2011-05-10 01:12:14 UTC (rev 52897)
@@ -299,7 +299,7 @@
ExtEngineManager::Function::~Function()
{
- // Database::Checkout dcoHolder(database);
+ //Database::Checkout dcoHolder(database);
function->dispose(LogError());
}
Modified: firebird/trunk/src/jrd/Function.epp
===================================================================
--- firebird/trunk/src/jrd/Function.epp 2011-05-09 10:15:19 UTC (rev 52896)
+++ firebird/trunk/src/jrd/Function.epp 2011-05-10 01:12:14 UTC (rev 52897)
@@ -175,9 +175,7 @@
Database* const dbb = tdbb->getDatabase();
if (id >= attachment->att_functions.getCount())
- {
attachment->att_functions.grow(id + 1);
- }
Function* function = attachment->att_functions[id];
@@ -193,9 +191,7 @@
}
if (!function)
- {
function = FB_NEW(*attachment->att_pool) Function(*attachment->att_pool);
- }
try
{
Modified: firebird/trunk/src/jrd/GlobalRWLock.cpp
===================================================================
--- firebird/trunk/src/jrd/GlobalRWLock.cpp 2011-05-09 10:15:19 UTC (rev 52896)
+++ firebird/trunk/src/jrd/GlobalRWLock.cpp 2011-05-10 01:12:14 UTC (rev 52897)
@@ -164,12 +164,15 @@
if (!LCK_lock(tdbb, cachedLock, LCK_write, wait))
{
Attachment::CheckoutLockGuard counterGuard(att, counterMutex, true);
+
--pendingLock;
+
if (--pendingWriters)
{
if (!currentWriter)
writerFinished.notifyAll();
}
+
return false;
}
Modified: firebird/trunk/src/jrd/Relation.cpp
===================================================================
--- firebird/trunk/src/jrd/Relation.cpp 2011-05-09 10:15:19 UTC (rev 52896)
+++ firebird/trunk/src/jrd/Relation.cpp 2011-05-10 01:12:14 UTC (rev 52897)
@@ -137,9 +137,8 @@
else
inst_id = PAG_attachment_id(tdbb);
- if (!rel_pages_inst) {
+ if (!rel_pages_inst)
rel_pages_inst = FB_NEW(*rel_pool) RelationPagesInstances(*rel_pool);
- }
size_t pos;
if (!rel_pages_inst->find(inst_id, pos))
Modified: firebird/trunk/src/jrd/cch.cpp
===================================================================
--- firebird/trunk/src/jrd/cch.cpp 2011-05-09 10:15:19 UTC (rev 52896)
+++ firebird/trunk/src/jrd/cch.cpp 2011-05-10 01:12:14 UTC (rev 52897)
@@ -109,7 +109,7 @@
#define PAGE_OVERHEAD (sizeof(bcb_repeat) + sizeof(BufferDesc) + sizeof(Lock) + (int) bcb->bcb_page_size)
-enum LatchState
+enum LatchState
{
lsOk,
lsTimeout,
@@ -402,7 +402,7 @@
if (!exLock) {
dsGuard.lock(SYNC_SHARED);
}
-
+
Jrd::Attachment* attachment = tdbb->getAttachment();
if (attachment->att_flags & ATT_exclusive) {
return true;
@@ -772,7 +772,7 @@
BufferDesc* bdb = get_buffer(tdbb, window->win_page, ((lock_type >= LCK_write) ? SYNC_EXCLUSIVE : SYNC_SHARED), wait);
- if (wait != 1 && bdb == 0)
+ if (wait != 1 && bdb == 0)
{
attachment->backupStateReadUnLock(tdbb);
return lsLatchTimeout; // latch timeout
@@ -1351,7 +1351,7 @@
Sync bcbSync(&bcb->bcb_syncObject, "CCH_get_related");
bcbSync.lock(SYNC_SHARED);
-
+
BufferDesc* bdb = find_buffer(bcb, page, false);
bcbSync.unlock();
@@ -1406,7 +1406,7 @@
BufferDesc *bdb = window->win_bdb;
// unmark
- if ((bdb->bdb_writers == 1) && (bdb->bdb_flags & BDB_marked))
+ if ((bdb->bdb_writers == 1) && (bdb->bdb_flags & BDB_marked))
{
bdb->bdb_flags &= ~BDB_marked;
bdb->unLockIO(tdbb);
@@ -1428,8 +1428,8 @@
volatile PageNumber pg = window->win_page;
- // This prevents a deadlock with the precedence queue, as shown by
- // mwrite mwrite1 2 mwrite2 2 test.fdb
+ // This prevents a deadlock with the precedence queue, as shown by
+ // mwrite mwrite1 2 mwrite2 2 test.fdb
const int wait2 = bdb->ourExclusiveLock() ? LCK_NO_WAIT : wait;
LockState must_read = CCH_fetch_lock(tdbb, window, lock, wait2, page_type);
@@ -2005,7 +2005,7 @@
tdbb->getAttachment()->backupStateReadUnLock(tdbb);
// if (bdb->bdb_writers == 1 || bdb->bdb_use_count == 1)
- if (bdb->bdb_writers == 1 ||
+ if (bdb->bdb_writers == 1 ||
bdb->bdb_writers == 0 && (bdb->bdb_flags & BDB_must_write))
{
const bool marked = bdb->bdb_flags & BDB_marked;
@@ -2063,7 +2063,7 @@
{
bdb->bdb_flags &= ~BDB_garbage_collect;
}
-
+
// hvlad: we want to make it least recently used, not most recently used
//recentlyUsed(bdb);
#ifdef CACHE_WRITER
@@ -2235,7 +2235,7 @@
if (bdb->bdb_flags & BDB_marked) {
BUGCHECK(268); // msg 268 buffer marked during cache unwind
}
-
+
tdbb->getAttachment()->backupStateReadUnLock(tdbb);
if (bdb->ourExclusiveLock()) {
@@ -2271,7 +2271,7 @@
// hvlad : as far as I understand thread can't hold more than two shared latches
// on the same bdb, so findSharedLatch below will not be called many times
-
+
SharedLatch* latch = findSharedLatch(tdbb, bdb);
while (latch)
{
@@ -2280,7 +2280,7 @@
release_bdb(tdbb, bdb, true, false, false);
latch = findSharedLatch(tdbb, bdb);
}
-
+
#ifndef SUPERSERVER
const pag* const page = bdb->bdb_buffer;
if (page->pag_type == pag_header || page->pag_type == pag_transactions)
@@ -2359,7 +2359,7 @@
page = (pag*) spare_buffer.getBuffer(dbb->dbb_page_size);
memcpy(page, bdb->bdb_buffer, HDR_SIZE);
old_buffer = bdb->bdb_buffer;
-
+
// hvlad: is it mt-safe ?
bdb->bdb_buffer = page;
}
@@ -2555,7 +2555,7 @@
{
BufferControl *bcb = bdb->bdb_bcb;
fb_assert(!(bcb->bcb_flags & BCB_exclusive));
-
+
Database* dbb = bcb->bcb_database;
fb_assert(dbb);
@@ -2574,7 +2574,7 @@
const bool keep_pages = (bcb->bcb_flags & BCB_keep_pages) != 0;
bcb->bcb_flags |= BCB_keep_pages;
- down_grade(tdbb, bdb);
+ down_grade(tdbb, bdb);
if (!keep_pages) {
bcb->bcb_flags &= ~BCB_keep_pages;
@@ -2665,9 +2665,9 @@
continue;
}
- if ((transaction_mask & bdb->bdb_transactions) ||
+ if ((transaction_mask & bdb->bdb_transactions) ||
(bdb->bdb_flags & BDB_system_dirty) ||
- (!transaction_mask && !sys_only) ||
+ (!transaction_mask && !sys_only) ||
(!bdb->bdb_transactions))
{
flush.add(bdb);
@@ -2799,7 +2799,7 @@
}
bdb->release(tdbb);
- if (release_flag)
+ if (release_flag)
{
PAGE_LOCK_RELEASE(tdbb, bcb, bdb->bdb_lock);
}
@@ -3059,7 +3059,7 @@
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,
+ 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);
@@ -3245,7 +3245,7 @@
// Start by finding the buffer containing the high priority page
Sync bcbSync(&bcb->bcb_syncObject, "check_precedence");
- bcbSync.lock(SYNC_SHARED);
+ bcbSync.lock(SYNC_SHARED);
BufferDesc* high = find_buffer(bcb, page, false);
bcbSync.unlock();
@@ -3271,7 +3271,7 @@
// forget about about establishing the relationship.
Sync precSync(&bcb->bcb_syncPrecedence, "check_precedence");
- precSync.lock(SYNC_EXCLUSIVE);
+ precSync.lock(SYNC_EXCLUSIVE);
if (QUE_NOT_EMPTY(high->bdb_lower))
{
@@ -3283,7 +3283,7 @@
if (relationship == PRE_UNKNOWN)
{
- precSync.unlock();
+ precSync.unlock();
const PageNumber high_page = high->bdb_page;
if (!write_buffer(tdbb, high, high_page, false, tdbb->tdbb_status_vector, true)) {
CCH_unwind(tdbb, true);
@@ -3372,7 +3372,7 @@
BufferDesc* low_bdb = precedence->pre_low;
QUE_DELETE(precedence->pre_higher);
QUE_DELETE(precedence->pre_lower);
-
+
precedence->pre_hi = (BufferDesc*) bcb->bcb_free;
bcb->bcb_free = precedence;
if (!(precedence->pre_flags & PRE_cleared))
@@ -3492,7 +3492,7 @@
syncPrec.unlock();
down_grade(tdbb, blocking_bdb);
- if (blocking_bdb->bdb_flags & BDB_dirty && !(precedence->pre_flags & PRE_cleared))
+ if (blocking_bdb->bdb_flags & BDB_dirty && !(precedence->pre_flags & PRE_cleared))
{
in_use = true;
}
@@ -3502,7 +3502,7 @@
in_use = false;
que_inst = bdb->bdb_higher.que_forward;
}
-
+
break;
}
}
@@ -3650,7 +3650,7 @@
for (bcb_repeat* old_tail = old_rpt; old_tail < old_end; old_tail++, new_tail++)
{
new_tail->bcb_bdb = old_tail->bcb_bdb;
- while (QUE_NOT_EMPTY(old_tail->bcb_page_mod))
+ while (QUE_NOT_EMPTY(old_tail->bcb_page_mod))
{
QUE que_inst = old_tail->bcb_page_mod.que_forward;
BufferDesc* bdb = BLOCK(que_inst, BufferDesc*, bdb_que);
@@ -3697,7 +3697,7 @@
for (; que_inst != mod_que; que_inst = que_inst->que_forward)
{
BufferDesc* bdb = BLOCK(que_inst, BufferDesc*, bdb_que);
- if (bdb->bdb_page == page)
+ if (bdb->bdb_page == page)
return bdb;
}
@@ -3716,7 +3716,7 @@
}
-static LatchState latch_buffer(thread_db* tdbb, Sync &bcbSync, BufferDesc *bdb,
+static LatchState latch_buffer(thread_db* tdbb, Sync &bcbSync, BufferDesc *bdb,
const PageNumber page, SyncType syncType, int wait)
{
//++bdb->bdb_use_count;
@@ -3730,16 +3730,16 @@
recentlyUsed(bdb);
}
- // If buffer is currently replacing by another page but still writting
- // to disk we should wait until this write finished, else we could
- // allocate another buffer and read old page image (or even zero's)
+ // If buffer is currently replacing by another page but still writting
+ // to disk we should wait until this write finished, else we could
+ // allocate another buffer and read old page image (or even zero's)
// from disk into new buffer
const bool waitPending = (bdb->bdb_flags & BDB_free_pending && bdb->bdb_page == page);
bcbSync.unlock();
- if (waitPending)
+ if (waitPending)
{
//--bdb->bdb_use_count;
if (wait <= 0) {
@@ -3751,7 +3751,7 @@
else
{
bool latchOk = true;
- if (wait <= 0)
+ if (wait <= 0)
latchOk = bdb->addRefConditional(tdbb, syncType);
else
bdb->addRef(tdbb, syncType);
@@ -3814,7 +3814,7 @@
{
bcbSync.lock(SYNC_SHARED);
BufferDesc *bdb = find_buffer(bcb, page, true);
- while (bdb)
+ while (bdb)
{
const LatchState ret = latch_buffer(tdbb, bcbSync, bdb, page, syncType, wait);
if (ret == lsOk) {
@@ -3840,7 +3840,7 @@
{
// Check to see if buffer has already been assigned to page
BufferDesc *bdb = find_buffer(bcb, page, true);
- while (bdb)
+ while (bdb)
{
const LatchState ret = latch_buffer(tdbb, bcbSync, bdb, page, syncType, wait);
if (ret == lsOk) {
@@ -3896,7 +3896,7 @@
que_inst = bcb->bcb_empty.que_forward;
QUE_DELETE(*que_inst);
BufferDesc* bdb = BLOCK(que_inst, BufferDesc*, bdb_que);
-
+
bcb->bcb_inuse++;
bdb->addRef(tdbb, SYNC_EXCLUSIVE);
@@ -3993,7 +3993,7 @@
continue;
}
#endif
-
+
#ifdef CACHE_WRITER
if (oldest->bdb_flags & (BDB_dirty | BDB_db_dirty))
{
@@ -4024,7 +4024,7 @@
QUE_DELETE(bdb->bdb_que);
QUE_INSERT(bcb->bcb_pending, bdb->bdb_que);
-
+
lruSync.unlock();
bcbSync.unlock();
@@ -4050,7 +4050,7 @@
// screwed up, the only precedence blocks that can still be hanging
// around are ones cleared at AST level.
- if (QUE_NOT_EMPTY(bdb->bdb_higher) || QUE_NOT_EMPTY(bdb->bdb_lower))
+ if (QUE_NOT_EMPTY(bdb->bdb_higher) || QUE_NOT_EMPTY(bdb->bdb_lower))
{
Sync precSync(&bcb->bcb_syncPrecedence, "get_buffer");
precSync.lock(SYNC_EXCLUSIVE);
@@ -4074,7 +4074,7 @@
bcbSync.lock(SYNC_EXCLUSIVE);
QUE_DELETE(bdb->bdb_que); // bcb_pending
-
+
QUE mod_que = &bcb->bcb_rpt[page.getPageNum() % bcb->bcb_count].bcb_page_mod;
QUE_INSERT((*mod_que), bdb->bdb_que);
bdb->bdb_flags &= ~BDB_free_pending;
@@ -4092,7 +4092,7 @@
bdb->bdb_flags &= BDB_lru_chained; // yes, clear all except BDB_lru_chained
bdb->bdb_flags |= BDB_read_pending;
bdb->bdb_scan_count = 0;
-
+
bcbSync.unlock();
if (page != FREE_PAGE)
@@ -4242,7 +4242,7 @@
const USHORT lock_type = (bdb->bdb_flags & (BDB_dirty | BDB_writer)) ? LCK_write : LCK_read;
- CCH_TRACE(("FE LOCK %d:%06d, %s", bdb->bdb_page.getPageSpaceID(), bdb->bdb_page.getPageNum(),
+ CCH_TRACE(("FE LOCK %d:%06d, %s", bdb->bdb_page.getPageSpaceID(), bdb->bdb_page.getPageNum(),
(lock_type >= LCK_write) ? "EX" : "SH" ));
Lock* const lock = bdb->bdb_lock;
@@ -4361,7 +4361,7 @@
ERR_log(JRD_BUGCHK, 215, errmsg); // msg 215 page %ld, page type %ld lock conversion denied
CCH_unwind(tdbb, true);
-
+
return lsError; // Added to get rid of Compiler Warning
}
@@ -4923,7 +4923,7 @@
BufferDesc* hi_bdb = precedence->pre_hi;
const PageNumber hi_page = hi_bdb->bdb_page;
-
+
int write_status = 0;
syncPrec.unlock();
@@ -4967,7 +4967,7 @@
{
result = write_page(tdbb, bdb, status, false);
}
-
+
bdb->unLockIO(tdbb);
if (result) {
clear_precedence(tdbb, bdb);
@@ -5006,7 +5006,7 @@
// hvlad: why it is needed in Vulcan ???
//Sync syncWrite(&bcb->bcb_syncPageWrite, "write_page");
//syncWrite.lock(SYNC_EXCLUSIVE);
-
+
if (bdb->bdb_flags & BDB_not_valid)
{
ERR_build_status(status, Arg::Gds(isc_buf_invalid) << Arg::Num(bdb->bdb_page.getPageNum()));
@@ -5389,6 +5389,6 @@
if (--bdb_io_locks == 0) {
bdb_io = NULL;
}
-
+
bdb_syncIO.unlock(NULL, SYNC_EXCLUSIVE);
}
Modified: firebird/trunk/src/jrd/cch.h
===================================================================
--- firebird/trunk/src/jrd/cch.h 2011-05-09 10:15:19 UTC (rev 52896)
+++ firebird/trunk/src/jrd/cch.h 2011-05-10 01:12:14 UTC (rev 52897)
@@ -82,10 +82,10 @@
class BufferControl : public pool_alloc<type_bcb>
{
- explicit BufferControl(MemoryPool& p) :
+ explicit BufferControl(MemoryPool& p) :
bcb_bufferpool(&p),
- bcb_memory(p)
- {
+ bcb_memory(p)
+ {
bcb_database = NULL;
QUE_INIT(bcb_in_use);
QUE_INIT(bcb_pending);
@@ -123,10 +123,10 @@
que bcb_pending; // Que of buffers which are going to be freed and reassigned
que bcb_empty; // Que of empty buffers
- // Recently used buffer put there without locking common LRU que (bcb_in_use).
+ // Recently used buffer put there without locking common LRU que (bcb_in_use).
// When bcb_syncLRU is locked this chain is merged into bcb_in_use. See also
// requeueRecentlyUsed() and recentlyUsed()
- Firebird::AtomicPointer<BufferDesc> bcb_lru_chain;
+ Firebird::AtomicPointer<BufferDesc> bcb_lru_chain;
que bcb_dirty; // que of dirty buffers
SLONG bcb_dirty_count; // count of pages in dirty page btree
@@ -179,8 +179,8 @@
class BufferDesc : public pool_alloc<type_bdb>
{
public:
- BufferDesc(BufferControl* bcb) :
- bdb_bcb(bcb),
+ BufferDesc(BufferControl* bcb) :
+ bdb_bcb(bcb),
bdb_page(0, 0),
bdb_pending_page(0, 0)
{
Modified: firebird/trunk/src/jrd/dyn.epp
===================================================================
--- firebird/trunk/src/jrd/dyn.epp 2011-05-09 10:15:19 UTC (rev 52896)
+++ firebird/trunk/src/jrd/dyn.epp 2011-05-10 01:12:14 UTC (rev 52897)
@@ -123,9 +123,8 @@
const UCHAR* ptr = ddl;
- if (*ptr++ != isc_dyn_version_1) {
+ if (*ptr++ != isc_dyn_version_1)
ERR_post(Arg::Gds(isc_wrodynver));
- }
fb_utils::init_status(tdbb->tdbb_status_vector);
@@ -136,7 +135,8 @@
MemoryPool* const tempPool = attachment->createPool();
Jrd::ContextPoolHolder context(tdbb, tempPool);
- try {
+ try
+ {
VIO_start_save_point(tdbb, transaction);
transaction->tra_save_point->sav_verb_count++;
Modified: firebird/trunk/src/jrd/exe.cpp
===================================================================
--- firebird/trunk/src/jrd/exe.cpp 2011-05-09 10:15:19 UTC (rev 52896)
+++ firebird/trunk/src/jrd/exe.cpp 2011-05-10 01:12:14 UTC (rev 52897)
@@ -492,7 +492,7 @@
**************************************/
Jrd::Attachment* attachment = tdbb->getAttachment();
- // do nothing if user doesn't want database triggers
+ // Do nothing if user doesn't want database triggers.
if (attachment->att_flags & ATT_no_db_triggers)
return;
Modified: firebird/trunk/src/jrd/extds/ExtDS.cpp
===================================================================
--- firebird/trunk/src/jrd/extds/ExtDS.cpp 2011-05-09 10:15:19 UTC (rev 52896)
+++ firebird/trunk/src/jrd/extds/ExtDS.cpp 2011-05-10 01:12:14 UTC (rev 52897)
@@ -1615,16 +1615,17 @@
if (m_tdbb)
{
Jrd::Attachment* attachment = m_tdbb->getAttachment();
- if (attachment)
+
+ if (attachment)
{
attachment->att_interface->getMutex()->enter();
attachment->att_ext_connection = m_saveConnection;
}
jrd_tra* transaction = m_tdbb->getTransaction();
- if (transaction) {
+
+ if (transaction)
transaction->tra_callback_count--;
- }
}
}
Modified: firebird/trunk/src/jrd/ibase.h
===================================================================
--- firebird/trunk/src/jrd/ibase.h 2011-05-09 10:15:19 UTC (rev 52896)
+++ firebird/trunk/src/jrd/ibase.h 2011-05-10 01:12:14 UTC (rev 52897)
@@ -1154,9 +1154,9 @@
ISC_STATUS ISC_EXPORT fb_ping(ISC_STATUS*, isc_db_handle*);
-/***********************/
+/********************/
/* Object interface */
-/***********************/
+/********************/
ISC_STATUS ISC_EXPORT fb_get_database_handle(ISC_STATUS*, isc_db_handle*, void*);
ISC_STATUS ISC_...
[truncated message content] |
|
From: <fir...@us...> - 2011-05-10 03:17:45
|
Revision: 52898
http://firebird.svn.sourceforge.net/firebird/?rev=52898&view=rev
Author: firebirds
Date: 2011-05-10 03:17:39 +0000 (Tue, 10 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-10 01:12:14 UTC (rev 52897)
+++ firebird/trunk/ChangeLog 2011-05-10 03:17:39 UTC (rev 52898)
@@ -1,3 +1,109 @@
+ 2011-05-10 01:12 asfernandes
+ M builds/install/misc/firebird.conf.in
+ M src/common/classes/SyncObject.h
+ M src/common/classes/locks.h
+ M src/common/isc_sync.cpp
+ M src/jrd/Attachment.cpp
+ M src/jrd/Attachment.h
+ M src/jrd/Database.cpp
+ M src/jrd/Database.h
+ M src/jrd/DatabaseSnapshot.cpp
+ M src/jrd/ExtEngineManager.cpp
+ M src/jrd/Function.epp
+ M src/jrd/GlobalRWLock.cpp
+ M src/jrd/Relation.cpp
+ M src/jrd/cch.cpp
+ M src/jrd/cch.h
+ M src/jrd/dyn.epp
+ M src/jrd/exe.cpp
+ M src/jrd/extds/ExtDS.cpp
+ M src/jrd/ibase.h
+ M src/jrd/inf.cpp
+ M src/jrd/intl.cpp
+ M src/jrd/jrd.cpp
+ M src/jrd/jrd.h
+ M src/jrd/lck.cpp
+ M src/jrd/os/win32/winnt.cpp
+ M src/jrd/tpc.cpp
+ M src/jrd/tpc_proto.h
+Misc.
+
+ 2011-05-09 10:15 hvlad
+ M builds/install/misc/firebird.conf.in
+ M src/common/classes/SyncObject.h
+ M src/common/classes/locks.h
+ M src/common/config/config.cpp
+ M src/common/config/config.h
+ M src/common/isc_sync.cpp
+ M src/dsql/AggNodes.cpp
+ M src/dsql/dsql.cpp
+ M src/dsql/dsql.h
+ M src/jrd/Attachment.cpp
+ M src/jrd/Attachment.h
+ M src/jrd/Database.cpp
+ M src/jrd/Database.h
+ M src/jrd/DatabaseSnapshot.cpp
+ M src/jrd/ExtEngineManager.cpp
+ M src/jrd/ExtEngineManager.h
+ M src/jrd/Function.epp
+ M src/jrd/GlobalRWLock.cpp
+ M src/jrd/GlobalRWLock.h
+ M src/jrd/JrdStatement.cpp
+ M src/jrd/Relation.cpp
+ M src/jrd/Relation.h
+ M src/jrd/RuntimeStatistics.cpp
+ M src/jrd/RuntimeStatistics.h
+ M src/jrd/ValueImpl.cpp
+ M src/jrd/blb.cpp
+ M src/jrd/cch.cpp
+ M src/jrd/cch.h
+ M src/jrd/cch_proto.h
+ M src/jrd/cmp.cpp
+ M src/jrd/dfw.epp
+ M src/jrd/dpm.epp
+ M src/jrd/dyn.epp
+ M src/jrd/exe.cpp
+ M src/jrd/exe_proto.h
+ M src/jrd/ext.cpp
+ M src/jrd/extds/ExtDS.cpp
+ M src/jrd/fun.epp
+ M src/jrd/idx.cpp
+ M src/jrd/inf.cpp
+ M src/jrd/ini.epp
+ M src/jrd/intl.cpp
+ M src/jrd/jrd.cpp
+ M src/jrd/jrd.h
+ M src/jrd/jrd_proto.h
+ M src/jrd/lck.cpp
+ M src/jrd/lck.h
+ M src/jrd/met.epp
+ M src/jrd/nbak.cpp
+ M src/jrd/nbak.h
+ M src/jrd/os/pio.h
+ M src/jrd/os/win32/winnt.cpp
+ M src/jrd/pag.cpp
+ M src/jrd/pcmet.epp
+ M src/jrd/recsrc/SortedStream.cpp
+ M src/jrd/sdw.cpp
+ M src/jrd/shut.cpp
+ M src/jrd/sort.cpp
+ M src/jrd/sort.h
+ M src/jrd/tpc.cpp
+ M src/jrd/tpc_proto.h
+ M src/jrd/tra.cpp
+ M src/jrd/tra.h
+ M src/jrd/trace/TraceDSQLHelpers.h
+ M src/jrd/trace/TraceJrdHelpers.h
+ M src/jrd/trace/TraceObjects.cpp
+ M src/jrd/trace/TraceObjects.h
+ M src/jrd/validation.cpp
+ M src/jrd/vio.cpp
+ M src/lock/lock.cpp
+ M src/lock/lock_proto.h
+ M src/remote/server/os/win32/srvr_w32.cpp
+ M src/remote/server/server.cpp
+Shared page cache implementation
+
2011-05-08 17:53 asfernandes
M src/include/FirebirdApi.h
M src/include/FirebirdExternalApi.h
Modified: firebird/trunk/src/jrd/build_no.h
===================================================================
--- firebird/trunk/src/jrd/build_no.h 2011-05-10 01:12:14 UTC (rev 52897)
+++ firebird/trunk/src/jrd/build_no.h 2011-05-10 03:17:39 UTC (rev 52898)
@@ -3,16 +3,16 @@
*** DO NOT EDIT ***
TO CHANGE ANY INFORMATION IN HERE PLEASE
EDIT src/misc/writeBuildNum.sh
- FORMAL BUILD NUMBER:29339
+ FORMAL BUILD NUMBER:29341
*/
-#define PRODUCT_VER_STRING "3.0.0.29339"
-#define FILE_VER_STRING "WI-T3.0.0.29339"
-#define LICENSE_VER_STRING "WI-T3.0.0.29339"
-#define FILE_VER_NUMBER 3, 0, 0, 29339
+#define PRODUCT_VER_STRING "3.0.0.29341"
+#define FILE_VER_STRING "WI-T3.0.0.29341"
+#define LICENSE_VER_STRING "WI-T3.0.0.29341"
+#define FILE_VER_NUMBER 3, 0, 0, 29341
#define FB_MAJOR_VER "3"
#define FB_MINOR_VER "0"
#define FB_REV_NO "0"
-#define FB_BUILD_NO "29339"
+#define FB_BUILD_NO "29341"
#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-10 01:12:14 UTC (rev 52897)
+++ firebird/trunk/src/misc/writeBuildNum.sh 2011-05-10 03:17:39 UTC (rev 52898)
@@ -9,7 +9,7 @@
MajorVer=3
MinorVer=0
RevNo=0
-BuildNum=29339
+BuildNum=29341
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-11 03:18:46
|
Revision: 52916
http://firebird.svn.sourceforge.net/firebird/?rev=52916&view=rev
Author: firebirds
Date: 2011-05-11 03:18:40 +0000 (Wed, 11 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-11 02:43:39 UTC (rev 52915)
+++ firebird/trunk/ChangeLog 2011-05-11 03:18:40 UTC (rev 52916)
@@ -1,3 +1,50 @@
+ 2011-05-11 02:43 asfernandes
+ M src/jrd/jrd.cpp
+ M src/remote/server/server.cpp
+Warning / error.
+
+ 2011-05-11 01:18 asfernandes
+ M src/jrd/met.epp
+ M src/jrd/nbak.cpp
+ M src/jrd/sdw.cpp
+ M src/jrd/tpc.cpp
+ M src/jrd/tpc_proto.h
+ M src/jrd/tra.cpp
+ M src/jrd/validation.cpp
+ M src/jrd/vio.cpp
+ M src/remote/server/os/win32/srvr_w32.cpp
+ M src/yvalve/PluginManager.cpp
+Misc.
+
+ 2011-05-10 14:03 alexpeshkoff
+ M src/jrd/os/posix/unix.cpp
+make it compile with shared cache
+
+ 2011-05-10 13:44 hvlad
+ M src/yvalve/PluginManager.cpp
+Temporary solution to not crash utilities working with embedded engine on exit.
+
+ 2011-05-10 13:37 hvlad
+ M builds/install/arch-specific/win32/install_super.bat
+Don't use Guardian with services
+
+ 2011-05-10 13:36 hvlad
+ M src/utilities/fbcpl/fbdialog.cpp
+ M src/utilities/fbcpl/fbpanel.cpp
+Adjusted CPL applet with current binaries names and paths.
+Make it show error even when there is no registry information.
+
+ 2011-05-10 13:03 hvlad
+ M src/iscguard/iscguard.h
+ M src/utilities/install/install_nt.h
+ M src/utilities/install/install_reg.cpp
+ M src/utilities/install/install_svc.cpp
+Adjusted instreg, instsvc and fbguard with current binaries names and paths
+
+ 2011-05-10 11:56 alexpeshkoff
+ M src/jrd/Database.h
+fixed gcc warning
+
2011-05-10 01:12 asfernandes
M builds/install/misc/firebird.conf.in
M src/common/classes/SyncObject.h
Modified: firebird/trunk/src/jrd/build_no.h
===================================================================
--- firebird/trunk/src/jrd/build_no.h 2011-05-11 02:43:39 UTC (rev 52915)
+++ firebird/trunk/src/jrd/build_no.h 2011-05-11 03:18:40 UTC (rev 52916)
@@ -3,16 +3,16 @@
*** DO NOT EDIT ***
TO CHANGE ANY INFORMATION IN HERE PLEASE
EDIT src/misc/writeBuildNum.sh
- FORMAL BUILD NUMBER:29341
+ FORMAL BUILD NUMBER:29349
*/
-#define PRODUCT_VER_STRING "3.0.0.29341"
-#define FILE_VER_STRING "WI-T3.0.0.29341"
-#define LICENSE_VER_STRING "WI-T3.0.0.29341"
-#define FILE_VER_NUMBER 3, 0, 0, 29341
+#define PRODUCT_VER_STRING "3.0.0.29349"
+#define FILE_VER_STRING "WI-T3.0.0.29349"
+#define LICENSE_VER_STRING "WI-T3.0.0.29349"
+#define FILE_VER_NUMBER 3, 0, 0, 29349
#define FB_MAJOR_VER "3"
#define FB_MINOR_VER "0"
#define FB_REV_NO "0"
-#define FB_BUILD_NO "29341"
+#define FB_BUILD_NO "29349"
#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-11 02:43:39 UTC (rev 52915)
+++ firebird/trunk/src/misc/writeBuildNum.sh 2011-05-11 03:18:40 UTC (rev 52916)
@@ -9,7 +9,7 @@
MajorVer=3
MinorVer=0
RevNo=0
-BuildNum=29341
+BuildNum=29349
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-12 03:16:17
|
Revision: 52925
http://firebird.svn.sourceforge.net/firebird/?rev=52925&view=rev
Author: firebirds
Date: 2011-05-12 03:16:10 +0000 (Thu, 12 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-12 00:42:40 UTC (rev 52924)
+++ firebird/trunk/ChangeLog 2011-05-12 03:16:10 UTC (rev 52925)
@@ -1,3 +1,42 @@
+ 2011-05-12 00:42 asfernandes
+ M src/jrd/cch.cpp
+ M src/jrd/cch.h
+Misc.
+
+ 2011-05-11 17:42 asfernandes
+ M src/jrd/EngineInterface.h
+ M src/jrd/ExtEngineManager.cpp
+ M src/jrd/extds/InternalDS.cpp
+ M src/jrd/jrd.cpp
+ M src/jrd/jrd_proto.h
+Lets try to avoid global functions using name with mixed new (functionName) and old SUBSYS_name name style.
+
+ 2011-05-11 15:57 asfernandes
+ M src/yvalve/why.cpp
+Fix the build.
+
+ 2011-05-11 14:45 hvlad
+ M src/jrd/ExtEngineManager.cpp
+ M src/jrd/extds/InternalDS.cpp
+ M src/jrd/jrd.cpp
+ M src/jrd/jrd_proto.h
+Renamed currentProvider to EngineProvider to better reflect its nature and corrected its declaration (with Alex permission ;). Removed unneeded cast.
+
+ 2011-05-11 14:24 hvlad
+ M src/yvalve/why.cpp
+Avoid memory leaks due to wrong reference counting.
+
+ 2011-05-11 09:56 hvlad
+ M src/remote/server/os/win32/property.rc
+Show long version string in "Firebird Server Properties" dialog properly
+
+ 2011-05-11 09:39 hvlad
+ M src/jrd/Attachment.cpp
+ M src/jrd/Attachment.h
+ M src/jrd/jrd.cpp
+Adjust order of releasing metadata objects when attachment is released.
+It also avoids assert in MET_verify_cache() pointed privately by Alex.
+
2011-05-11 02:43 asfernandes
M src/jrd/jrd.cpp
M src/remote/server/server.cpp
Modified: firebird/trunk/src/jrd/build_no.h
===================================================================
--- firebird/trunk/src/jrd/build_no.h 2011-05-12 00:42:40 UTC (rev 52924)
+++ firebird/trunk/src/jrd/build_no.h 2011-05-12 03:16:10 UTC (rev 52925)
@@ -3,16 +3,16 @@
*** DO NOT EDIT ***
TO CHANGE ANY INFORMATION IN HERE PLEASE
EDIT src/misc/writeBuildNum.sh
- FORMAL BUILD NUMBER:29349
+ FORMAL BUILD NUMBER:29356
*/
-#define PRODUCT_VER_STRING "3.0.0.29349"
-#define FILE_VER_STRING "WI-T3.0.0.29349"
-#define LICENSE_VER_STRING "WI-T3.0.0.29349"
-#define FILE_VER_NUMBER 3, 0, 0, 29349
+#define PRODUCT_VER_STRING "3.0.0.29356"
+#define FILE_VER_STRING "WI-T3.0.0.29356"
+#define LICENSE_VER_STRING "WI-T3.0.0.29356"
+#define FILE_VER_NUMBER 3, 0, 0, 29356
#define FB_MAJOR_VER "3"
#define FB_MINOR_VER "0"
#define FB_REV_NO "0"
-#define FB_BUILD_NO "29349"
+#define FB_BUILD_NO "29356"
#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-12 00:42:40 UTC (rev 52924)
+++ firebird/trunk/src/misc/writeBuildNum.sh 2011-05-12 03:16:10 UTC (rev 52925)
@@ -9,7 +9,7 @@
MajorVer=3
MinorVer=0
RevNo=0
-BuildNum=29349
+BuildNum=29356
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-13 03:17:47
|
Revision: 52935
http://firebird.svn.sourceforge.net/firebird/?rev=52935&view=rev
Author: firebirds
Date: 2011-05-13 03:17:35 +0000 (Fri, 13 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-13 01:23:53 UTC (rev 52934)
+++ firebird/trunk/ChangeLog 2011-05-13 03:17:35 UTC (rev 52935)
@@ -1,3 +1,20 @@
+ 2011-05-13 01:23 asfernandes
+ M src/common/classes/fb_atomic.h
+Correction.
+
+ 2011-05-13 01:15 asfernandes
+ M src/jrd/cch.cpp
+ M src/jrd/jrd.cpp
+Misc.
+
+ 2011-05-12 14:56 dimitr
+ M src/dsql/dsql.cpp
+Fixed CORE-3477: Passing non-existing SQL parameters always crash server.
+
+ 2011-05-12 08:45 dimitr
+ M src/jrd/met.epp
+Front-ported CORE-3314: Dependencies are not removed after dropping the procedure and the table it depends on in the same transaction.
+
2011-05-12 00:42 asfernandes
M src/jrd/cch.cpp
M src/jrd/cch.h
Modified: firebird/trunk/src/jrd/build_no.h
===================================================================
--- firebird/trunk/src/jrd/build_no.h 2011-05-13 01:23:53 UTC (rev 52934)
+++ firebird/trunk/src/jrd/build_no.h 2011-05-13 03:17:35 UTC (rev 52935)
@@ -3,16 +3,16 @@
*** DO NOT EDIT ***
TO CHANGE ANY INFORMATION IN HERE PLEASE
EDIT src/misc/writeBuildNum.sh
- FORMAL BUILD NUMBER:29356
+ FORMAL BUILD NUMBER:29360
*/
-#define PRODUCT_VER_STRING "3.0.0.29356"
-#define FILE_VER_STRING "WI-T3.0.0.29356"
-#define LICENSE_VER_STRING "WI-T3.0.0.29356"
-#define FILE_VER_NUMBER 3, 0, 0, 29356
+#define PRODUCT_VER_STRING "3.0.0.29360"
+#define FILE_VER_STRING "WI-T3.0.0.29360"
+#define LICENSE_VER_STRING "WI-T3.0.0.29360"
+#define FILE_VER_NUMBER 3, 0, 0, 29360
#define FB_MAJOR_VER "3"
#define FB_MINOR_VER "0"
#define FB_REV_NO "0"
-#define FB_BUILD_NO "29356"
+#define FB_BUILD_NO "29360"
#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-13 01:23:53 UTC (rev 52934)
+++ firebird/trunk/src/misc/writeBuildNum.sh 2011-05-13 03:17:35 UTC (rev 52935)
@@ -9,7 +9,7 @@
MajorVer=3
MinorVer=0
RevNo=0
-BuildNum=29356
+BuildNum=29360
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-14 03:18:26
|
Revision: 52940
http://firebird.svn.sourceforge.net/firebird/?rev=52940&view=rev
Author: firebirds
Date: 2011-05-14 03:18:18 +0000 (Sat, 14 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-14 02:49:02 UTC (rev 52939)
+++ firebird/trunk/ChangeLog 2011-05-14 03:18:18 UTC (rev 52940)
@@ -1,3 +1,15 @@
+ 2011-05-14 02:49 asfernandes
+ M src/dsql/pass1.cpp
+Fixed crash with nested unions, reported by Vlad.
+SELECT 'a' FROM RDB$DATABASE
+UNION ALL
+SELECT X FROM
+ (
+ SELECT 'b' AS X FROM RDB$DATABASE
+ UNION ALL
+ SELECT 'c' FROM RDB$DATABASE
+ ) AS T;
+
2011-05-13 01:23 asfernandes
M src/common/classes/fb_atomic.h
Correction.
Modified: firebird/trunk/src/jrd/build_no.h
===================================================================
--- firebird/trunk/src/jrd/build_no.h 2011-05-14 02:49:02 UTC (rev 52939)
+++ firebird/trunk/src/jrd/build_no.h 2011-05-14 03:18:18 UTC (rev 52940)
@@ -3,16 +3,16 @@
*** DO NOT EDIT ***
TO CHANGE ANY INFORMATION IN HERE PLEASE
EDIT src/misc/writeBuildNum.sh
- FORMAL BUILD NUMBER:29360
+ FORMAL BUILD NUMBER:29361
*/
-#define PRODUCT_VER_STRING "3.0.0.29360"
-#define FILE_VER_STRING "WI-T3.0.0.29360"
-#define LICENSE_VER_STRING "WI-T3.0.0.29360"
-#define FILE_VER_NUMBER 3, 0, 0, 29360
+#define PRODUCT_VER_STRING "3.0.0.29361"
+#define FILE_VER_STRING "WI-T3.0.0.29361"
+#define LICENSE_VER_STRING "WI-T3.0.0.29361"
+#define FILE_VER_NUMBER 3, 0, 0, 29361
#define FB_MAJOR_VER "3"
#define FB_MINOR_VER "0"
#define FB_REV_NO "0"
-#define FB_BUILD_NO "29360"
+#define FB_BUILD_NO "29361"
#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-14 02:49:02 UTC (rev 52939)
+++ firebird/trunk/src/misc/writeBuildNum.sh 2011-05-14 03:18:18 UTC (rev 52940)
@@ -9,7 +9,7 @@
MajorVer=3
MinorVer=0
RevNo=0
-BuildNum=29360
+BuildNum=29361
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-15 03:17:16
|
Revision: 52943
http://firebird.svn.sourceforge.net/firebird/?rev=52943&view=rev
Author: firebirds
Date: 2011-05-15 03:17:09 +0000 (Sun, 15 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-14 21:44:07 UTC (rev 52942)
+++ firebird/trunk/ChangeLog 2011-05-15 03:17:09 UTC (rev 52943)
@@ -1,3 +1,7 @@
+ 2011-05-14 21:44 asfernandes
+ M src/common/classes/SyncObject.h
+Fix warning.
+
2011-05-14 02:49 asfernandes
M src/dsql/pass1.cpp
Fixed crash with nested unions, reported by Vlad.
Modified: firebird/trunk/src/jrd/build_no.h
===================================================================
--- firebird/trunk/src/jrd/build_no.h 2011-05-14 21:44:07 UTC (rev 52942)
+++ firebird/trunk/src/jrd/build_no.h 2011-05-15 03:17:09 UTC (rev 52943)
@@ -3,16 +3,16 @@
*** DO NOT EDIT ***
TO CHANGE ANY INFORMATION IN HERE PLEASE
EDIT src/misc/writeBuildNum.sh
- FORMAL BUILD NUMBER:29361
+ FORMAL BUILD NUMBER:29362
*/
-#define PRODUCT_VER_STRING "3.0.0.29361"
-#define FILE_VER_STRING "WI-T3.0.0.29361"
-#define LICENSE_VER_STRING "WI-T3.0.0.29361"
-#define FILE_VER_NUMBER 3, 0, 0, 29361
+#define PRODUCT_VER_STRING "3.0.0.29362"
+#define FILE_VER_STRING "WI-T3.0.0.29362"
+#define LICENSE_VER_STRING "WI-T3.0.0.29362"
+#define FILE_VER_NUMBER 3, 0, 0, 29362
#define FB_MAJOR_VER "3"
#define FB_MINOR_VER "0"
#define FB_REV_NO "0"
-#define FB_BUILD_NO "29361"
+#define FB_BUILD_NO "29362"
#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-14 21:44:07 UTC (rev 52942)
+++ firebird/trunk/src/misc/writeBuildNum.sh 2011-05-15 03:17:09 UTC (rev 52943)
@@ -9,7 +9,7 @@
MajorVer=3
MinorVer=0
RevNo=0
-BuildNum=29361
+BuildNum=29362
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-05-15 15:37:18
|
Revision: 52944
http://firebird.svn.sourceforge.net/firebird/?rev=52944&view=rev
Author: asfernandes
Date: 2011-05-15 15:37:11 +0000 (Sun, 15 May 2011)
Log Message:
-----------
Added IRoutineMetadata to external engines.
Not well tested:
1) EE is broken after shared page cache.
2) Semantics of addRef/release still keeps changing in developers minds.
Modified Paths:
--------------
firebird/trunk/examples/udr/UdrCppExample.cpp
firebird/trunk/src/include/FirebirdExternalApi.h
firebird/trunk/src/include/FirebirdUdr.h
firebird/trunk/src/include/FirebirdUdrCpp.h
firebird/trunk/src/jrd/ExtEngineManager.cpp
firebird/trunk/src/jrd/ExtEngineManager.h
firebird/trunk/src/plugins/udr_engine/UdrEngine.cpp
Modified: firebird/trunk/examples/udr/UdrCppExample.cpp
===================================================================
--- firebird/trunk/examples/udr/UdrCppExample.cpp 2011-05-15 03:17:09 UTC (rev 52943)
+++ firebird/trunk/examples/udr/UdrCppExample.cpp 2011-05-15 15:37:11 UTC (rev 52944)
@@ -30,6 +30,8 @@
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*);
@@ -50,6 +52,87 @@
unsigned short, const ISC_SCHAR*, unsigned short, XSQLDA*);
+namespace
+{
+ template <typename T>
+ class AutoDispose
+ {
+ public:
+ AutoDispose<T>(T* aPtr = NULL)
+ : ptr(aPtr)
+ {
+ }
+
+ ~AutoDispose()
+ {
+ clear();
+ }
+
+ AutoDispose<T>& operator =(T* aPtr)
+ {
+ clear();
+ ptr = aPtr;
+ return *this;
+ }
+
+ operator T*()
+ {
+ return ptr;
+ }
+
+ operator const T*() const
+ {
+ return ptr;
+ }
+
+ bool operator !() const
+ {
+ return !ptr;
+ }
+
+ bool hasData() const
+ {
+ return ptr != NULL;
+ }
+
+ T* operator ->()
+ {
+ return ptr;
+ }
+
+ T* release()
+ {
+ T* tmp = ptr;
+ ptr = NULL;
+ return tmp;
+ }
+
+ void reset(T* aPtr = NULL)
+ {
+ if (aPtr != ptr)
+ {
+ clear();
+ ptr = aPtr;
+ }
+ }
+
+ private:
+ void clear()
+ {
+ if (ptr)
+ ptr->dispose();
+ }
+
+ // not implemented
+ AutoDispose<T>(AutoDispose<T>&);
+ void operator =(AutoDispose<T>&);
+
+ private:
+ T* ptr;
+ };
+}
+
+
/***
create function wait_event (
event_name varchar(31) character set ascii
@@ -135,6 +218,7 @@
isc_stmt_handle stmtHandle;
// ISC entry points
+ FuncGetMasterInterface funcGetMasterInterface;
FuncDsqlAllocateStatement funcDsqlAllocateStatement;
FuncDsqlDescribe funcDsqlDescribe;
FuncDsqlDescribeBind funcDsqlDescribeBind;
@@ -246,6 +330,7 @@
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");
@@ -265,14 +350,33 @@
"select data_source from replicate_config where name = ?",
SQL_DIALECT_CURRENT, NULL), statusVector);
+ AutoDispose<IMaster> master(funcGetMasterInterface());
+ AutoDispose<IStatus> status(master->getStatus());
+
+ const char* table = metadata->getTriggerTable(status);
+ ThrowError::check(status->get());
+
+ // Skip the first exclamation point, separing the module name and entry point.
+ const char* info = strchr(metadata->getEntryPoint(status), '!');
+ ThrowError::check(status->get());
+
+ // Skip the second exclamation point, separing the entry point and the misc info (config).
+ if (info)
+ info = strchr(info + 1, '!');
+
+ if (info)
+ ++info;
+ else
+ info = "";
+
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),
statusVector);
inSqlDa->sqlvar[0].sqldata = new char[sizeof(short) + inSqlDa->sqlvar[0].sqllen];
- strncpy(inSqlDa->sqlvar[0].sqldata + sizeof(short), metaInfo->info, inSqlDa->sqlvar[0].sqllen);
- *reinterpret_cast<short*>(inSqlDa->sqlvar[0].sqldata) = strlen(metaInfo->info);
+ strncpy(inSqlDa->sqlvar[0].sqldata + sizeof(short), info, inSqlDa->sqlvar[0].sqllen);
+ *reinterpret_cast<short*>(inSqlDa->sqlvar[0].sqldata) = strlen(info);
XSQLDA* outSqlDa = reinterpret_cast<XSQLDA*>(new char[(XSQLDA_LENGTH(1))]);
outSqlDa->version = SQLDA_VERSION1;
@@ -304,7 +408,7 @@
const char* name = val->getName(ThrowError());
strcat(buffer, " p");
- sprintf(buffer + strlen(buffer), "%d type of column \"%s\".\"%s\" = ?", i, metaInfo->table, name);
+ sprintf(buffer + strlen(buffer), "%d type of column \"%s\".\"%s\" = ?", i, table, name);
}
strcat(buffer,
@@ -313,7 +417,7 @@
"begin\n"
" execute statement ('insert into \"");
- strcat(buffer, metaInfo->table);
+ strcat(buffer, table);
strcat(buffer, "\" (");
for (int i = 1; i <= count; ++i)
@@ -449,7 +553,7 @@
{
case SQL_VARYING:
{
- uint len;
+ unsigned len;
const char* s = val->getString(ThrowError(), &len);
*reinterpret_cast<unsigned short*>(var->sqldata) = len;
memcpy(var->sqldata + sizeof(unsigned short), s, len);
Modified: firebird/trunk/src/include/FirebirdExternalApi.h
===================================================================
--- firebird/trunk/src/include/FirebirdExternalApi.h 2011-05-15 03:17:09 UTC (rev 52943)
+++ firebird/trunk/src/include/FirebirdExternalApi.h 2011-05-15 15:37:11 UTC (rev 52944)
@@ -152,6 +152,19 @@
};
+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 char* FB_CARG getTriggerTable(IStatus* status) const = 0;
+ virtual ExternalTrigger::Type FB_CARG getTriggerType(IStatus* status) const = 0;
+};
+// #define FB_I_ROUTINE_METADATA_VERSION (FB_VERSIONED_VERSION + 6)
+
+
// 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
@@ -175,12 +188,11 @@
// 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 char* package, const char* name, const char* entryPoint, const char* body) = 0;
+ const IRoutineMetadata* metadata) = 0;
virtual ExternalProcedure* FB_CALL makeProcedure(Error* error, ExternalContext* context,
- const char* package, const char* name, const char* entryPoint, const char* body) = 0;
+ const IRoutineMetadata* metadata) = 0;
virtual ExternalTrigger* FB_CALL makeTrigger(Error* error, ExternalContext* context,
- const char* name, const char* entryPoint, const char* body,
- const char* table, ExternalTrigger::Type type) = 0;
+ const IRoutineMetadata* metadata) = 0;
};
#define FB_EXTERNAL_ENGINE_VERSION (FB_PLUGIN_VERSION + 7)
Modified: firebird/trunk/src/include/FirebirdUdr.h
===================================================================
--- firebird/trunk/src/include/FirebirdUdr.h 2011-05-15 03:17:09 UTC (rev 52943)
+++ firebird/trunk/src/include/FirebirdUdr.h 2011-05-15 15:37:11 UTC (rev 52944)
@@ -34,24 +34,6 @@
//------------------------------------------------------------------------------
-// Metadata information passed from the UDR engine to user's routines factories when asking to
-// create routines instances.
-struct MetaInfo
-{
- const char* package; // package name - NULL from triggers
- const char* name; // metadata object name
- const char* entryPoint; // external routine's name
- const char* info; // misc. info encoded on the external name
- const char* body; // body text
-};
-
-struct TriggerMetaInfo : public MetaInfo
-{
- ExternalTrigger::Type type; // trigger type
- const char* table; // table name
-};
-
-
// 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.
@@ -59,21 +41,21 @@
{
public:
virtual const char* FB_CALL getName() = 0;
- virtual ExternalFunction* FB_CALL newItem(MetaInfo* metaInfo) = 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(MetaInfo* metaInfo) = 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(TriggerMetaInfo* metaInfo) = 0;
+ virtual ExternalTrigger* FB_CALL newItem(const IRoutineMetadata* metadata) = 0;
};
Modified: firebird/trunk/src/include/FirebirdUdrCpp.h
===================================================================
--- firebird/trunk/src/include/FirebirdUdrCpp.h 2011-05-15 03:17:09 UTC (rev 52943)
+++ firebird/trunk/src/include/FirebirdUdrCpp.h 2011-05-15 15:37:11 UTC (rev 52944)
@@ -503,7 +503,7 @@
}
public:
- MetaInfo* metaInfo;
+ const IRoutineMetadata* metadata;
};
@@ -525,7 +525,7 @@
}
public:
- MetaInfo* metaInfo;
+ const IRoutineMetadata* metadata;
};
@@ -547,7 +547,7 @@
}
public:
- TriggerMetaInfo* metaInfo;
+ const IRoutineMetadata* metadata;
};
@@ -566,10 +566,10 @@
return name;
}
- virtual ExternalFunction* FB_CALL newItem(MetaInfo* metaInfo)
+ virtual ExternalFunction* FB_CALL newItem(const IRoutineMetadata* metadata)
{
Function* function = new T();
- function->metaInfo = metaInfo;
+ function->metadata = metadata;
return function;
}
@@ -593,10 +593,10 @@
return name;
}
- virtual ExternalProcedure* FB_CALL newItem(MetaInfo* metaInfo)
+ virtual ExternalProcedure* FB_CALL newItem(const IRoutineMetadata* metadata)
{
Procedure* procedure = new T();
- procedure->metaInfo = metaInfo;
+ procedure->metadata = metadata;
return procedure;
}
@@ -620,10 +620,10 @@
return name;
}
- virtual ExternalTrigger* FB_CALL newItem(TriggerMetaInfo* metaInfo)
+ virtual ExternalTrigger* FB_CALL newItem(const IRoutineMetadata* metadata)
{
Trigger* trigger = new T();
- trigger->metaInfo = metaInfo;
+ trigger->metadata = metadata;
return trigger;
}
Modified: firebird/trunk/src/jrd/ExtEngineManager.cpp
===================================================================
--- firebird/trunk/src/jrd/ExtEngineManager.cpp 2011-05-15 03:17:09 UTC (rev 52943)
+++ firebird/trunk/src/jrd/ExtEngineManager.cpp 2011-05-15 15:37:11 UTC (rev 52944)
@@ -286,10 +286,11 @@
ExtEngineManager::Function::Function(thread_db* tdbb, ExtEngineManager* aExtManager,
- ExternalEngine* aEngine, ExternalFunction* aFunction,
+ ExternalEngine* aEngine, RoutineMetadata* aMetadata, ExternalFunction* aFunction,
const Jrd::Function* aUdf)
: extManager(aExtManager),
engine(aEngine),
+ metadata(aMetadata),
function(aFunction),
udf(aUdf),
database(tdbb->getDatabase())
@@ -384,10 +385,11 @@
ExtEngineManager::Procedure::Procedure(thread_db* tdbb, ExtEngineManager* aExtManager,
- ExternalEngine* aEngine, ExternalProcedure* aProcedure,
+ ExternalEngine* aEngine, RoutineMetadata* aMetadata, ExternalProcedure* aProcedure,
const jrd_prc* aPrc)
: extManager(aExtManager),
engine(aEngine),
+ metadata(aMetadata),
procedure(aProcedure),
prc(aPrc),
database(tdbb->getDatabase())
@@ -467,10 +469,11 @@
ExtEngineManager::Trigger::Trigger(thread_db* tdbb, ExtEngineManager* aExtManager,
- ExternalEngine* aEngine, ExternalTrigger* aTrigger,
+ ExternalEngine* aEngine, RoutineMetadata* aMetadata, ExternalTrigger* aTrigger,
const Jrd::Trigger* aTrg)
: extManager(aExtManager),
engine(aEngine),
+ metadata(aMetadata),
trigger(aTrigger),
trg(aTrg),
database(tdbb->getDatabase())
@@ -651,14 +654,19 @@
CallerName(obj_udf, udf->getName().identifier) :
CallerName(obj_package_header, udf->getName().package)));
+ MemoryPool& pool = *tdbb->getDefaultPool();
+ AutoPtr<RoutineMetadata> metadata(FB_NEW(pool) RoutineMetadata(pool));
+ metadata->package = udf->getName().package;
+ metadata->name = udf->getName().identifier;
+ metadata->entryPoint = entryPointTrimmed;
+ metadata->body = body;
+
ExternalFunction* externalFunction;
{ // scope
Attachment::Checkout attCout(tdbb->getAttachment());
- externalFunction = attInfo->engine->makeFunction(RaiseError(),
- attInfo->context, udf->getName().package.nullStr(), udf->getName().identifier.c_str(),
- entryPointTrimmed.nullStr(), body.nullStr());
+ externalFunction = attInfo->engine->makeFunction(RaiseError(), attInfo->context, metadata);
if (!externalFunction)
{
@@ -670,7 +678,8 @@
try
{
- return FB_NEW(getPool()) Function(tdbb, this, attInfo->engine, externalFunction, udf);
+ return FB_NEW(getPool()) Function(tdbb, this, attInfo->engine, metadata.release(),
+ externalFunction, udf);
}
catch (...)
{
@@ -693,14 +702,19 @@
CallerName(obj_procedure, prc->getName().identifier) :
CallerName(obj_package_header, prc->getName().package)));
+ MemoryPool& pool = *tdbb->getDefaultPool();
+ AutoPtr<RoutineMetadata> metadata(FB_NEW(pool) RoutineMetadata(pool));
+ metadata->package = prc->getName().package;
+ metadata->name = prc->getName().identifier;
+ metadata->entryPoint = entryPointTrimmed;
+ metadata->body = body;
+
ExternalProcedure* externalProcedure;
{ // scope
Attachment::Checkout attCout(tdbb->getAttachment());
- externalProcedure = attInfo->engine->makeProcedure(RaiseError(),
- attInfo->context, prc->getName().package.nullStr(), prc->getName().identifier.c_str(),
- entryPointTrimmed.nullStr(), body.nullStr());
+ externalProcedure = attInfo->engine->makeProcedure(RaiseError(), attInfo->context, metadata);
if (!externalProcedure)
{
@@ -712,7 +726,8 @@
try
{
- return FB_NEW(getPool()) Procedure(tdbb, this, attInfo->engine, externalProcedure, prc);
+ return FB_NEW(getPool()) Procedure(tdbb, this, attInfo->engine, metadata.release(),
+ externalProcedure, prc);
}
catch (...)
{
@@ -729,22 +744,25 @@
string entryPointTrimmed = entryPoint;
entryPointTrimmed.trim();
- MetaName relationNameTrimmed;
- if (trg->relation)
- relationNameTrimmed = trg->relation->rel_name;
-
EngineAttachmentInfo* attInfo = getEngineAttachment(tdbb, engine);
ContextManager<ExternalTrigger> ctxManager(tdbb, attInfo, attInfo->adminCharSet,
CallerName(obj_trigger, trg->name));
+ MemoryPool& pool = *tdbb->getDefaultPool();
+ AutoPtr<RoutineMetadata> metadata(FB_NEW(pool) RoutineMetadata(pool));
+ metadata->name = trg->name;
+ metadata->entryPoint = entryPointTrimmed;
+ metadata->body = body;
+ metadata->triggerType = type;
+ if (trg->relation)
+ metadata->triggerTable = trg->relation->rel_name;
+
ExternalTrigger* externalTrigger;
{ // scope
Attachment::Checkout attCout(tdbb->getAttachment());
- externalTrigger = attInfo->engine->makeTrigger(RaiseError(), attInfo->context,
- trg->name.c_str(), entryPointTrimmed.nullStr(), body.nullStr(),
- relationNameTrimmed.c_str(), type);
+ externalTrigger = attInfo->engine->makeTrigger(RaiseError(), attInfo->context, metadata);
if (!externalTrigger)
{
@@ -755,7 +773,8 @@
try
{
- return FB_NEW(getPool()) Trigger(tdbb, this, attInfo->engine, externalTrigger, trg);
+ return FB_NEW(getPool()) Trigger(tdbb, this, attInfo->engine, metadata.release(),
+ externalTrigger, trg);
}
catch (...)
{
Modified: firebird/trunk/src/jrd/ExtEngineManager.h
===================================================================
--- firebird/trunk/src/jrd/ExtEngineManager.h 2011-05-15 03:17:09 UTC (rev 52943)
+++ firebird/trunk/src/jrd/ExtEngineManager.h 2011-05-15 15:37:11 UTC (rev 52944)
@@ -61,6 +61,59 @@
template <typename T> class ContextManager;
class TransactionImpl;
+ class RoutineMetadata : public Firebird::IRoutineMetadata, public Firebird::PermanentStorage
+ {
+ public:
+ RoutineMetadata(MemoryPool& pool)
+ : PermanentStorage(pool),
+ package(pool),
+ name(pool),
+ entryPoint(pool),
+ body(pool),
+ triggerTable(pool),
+ triggerType(Firebird::ExternalTrigger::Type(0))
+ {
+ }
+
+ virtual const char* FB_CARG getPackage(Firebird::IStatus* /*status*/) const
+ {
+ return package.nullStr();
+ }
+
+ virtual const char* FB_CARG getName(Firebird::IStatus* /*status*/) const
+ {
+ return name.c_str();
+ }
+
+ virtual const char* FB_CARG getEntryPoint(Firebird::IStatus* /*status*/) const
+ {
+ return entryPoint.c_str();
+ }
+
+ virtual const char* FB_CARG getBody(Firebird::IStatus* /*status*/) const
+ {
+ return body.c_str();
+ }
+
+ virtual const char* FB_CARG getTriggerTable(Firebird::IStatus* /*status*/) const
+ {
+ return triggerTable.c_str();
+ }
+
+ virtual Firebird::ExternalTrigger::Type FB_CARG getTriggerType(Firebird::IStatus* /*status*/) const
+ {
+ return triggerType;
+ }
+
+ public:
+ Firebird::MetaName package;
+ Firebird::MetaName name;
+ Firebird::string entryPoint;
+ Firebird::string body;
+ Firebird::MetaName triggerTable;
+ Firebird::ExternalTrigger::Type triggerType;
+ };
+
class ExternalContextImpl : public Firebird::ExternalContext
{
friend class AttachmentImpl;
@@ -130,6 +183,7 @@
public:
Function(thread_db* tdbb, ExtEngineManager* aExtManager,
Firebird::ExternalEngine* aEngine,
+ RoutineMetadata* aMetadata,
Firebird::ExternalFunction* aFunction,
const Jrd::Function* aUdf);
~Function();
@@ -140,6 +194,7 @@
private:
ExtEngineManager* extManager;
Firebird::ExternalEngine* engine;
+ Firebird::AutoPtr<RoutineMetadata> metadata;
Firebird::ExternalFunction* function;
const Jrd::Function* udf;
Database* database;
@@ -152,6 +207,7 @@
public:
Procedure(thread_db* tdbb, ExtEngineManager* aExtManager,
Firebird::ExternalEngine* aEngine,
+ RoutineMetadata* aMetadata,
Firebird::ExternalProcedure* aProcedure,
const jrd_prc* aPrc);
~Procedure();
@@ -161,6 +217,7 @@
private:
ExtEngineManager* extManager;
Firebird::ExternalEngine* engine;
+ Firebird::AutoPtr<RoutineMetadata> metadata;
Firebird::ExternalProcedure* procedure;
const jrd_prc* prc;
Database* database;
@@ -191,6 +248,7 @@
public:
Trigger(thread_db* tdbb, ExtEngineManager* aExtManager,
Firebird::ExternalEngine* aEngine,
+ RoutineMetadata* aMetadata,
Firebird::ExternalTrigger* aTrigger,
const Jrd::Trigger* aTrg);
~Trigger();
@@ -205,6 +263,7 @@
ExtEngineManager* extManager;
Firebird::ExternalEngine* engine;
+ Firebird::AutoPtr<RoutineMetadata> metadata;
Firebird::ExternalTrigger* trigger;
const Jrd::Trigger* trg;
Database* database;
Modified: firebird/trunk/src/plugins/udr_engine/UdrEngine.cpp
===================================================================
--- firebird/trunk/src/plugins/udr_engine/UdrEngine.cpp 2011-05-15 03:17:09 UTC (rev 52943)
+++ firebird/trunk/src/plugins/udr_engine/UdrEngine.cpp 2011-05-15 15:37:11 UTC (rev 52944)
@@ -36,6 +36,7 @@
#include "../common/os/mod_loader.h"
#include "../common/os/path_utils.h"
#include "../common/classes/ImplementHelper.h"
+#include "../common/StatusHolder.h"
namespace Firebird
@@ -130,7 +131,7 @@
}
public:
- void loadModule(const string& str, PathName* moduleName, string* entryPoint, string* info);
+ void loadModule(const IRoutineMetadata* metadata, PathName* moduleName, string* entryPoint);
template <typename NodeType, typename ObjType, typename SharedObjType> ObjType* getChild(
GenericMap<Pair<NonPooled<ExternalContext*, ObjType*> > >& children, SharedObjType* sharedObj,
ExternalContext* context, NodeType* nodes, SortedArray<SharedObjType*>& sharedObjs,
@@ -138,12 +139,12 @@
template <typename ObjType> void deleteChildren(
GenericMap<Pair<NonPooled<ExternalContext*, ObjType*> > >& children);
- template <typename T, typename T2> T* findNode(T* nodes, const PathName& moduleName,
- T2* metaInfo);
+ template <typename T> T* findNode(T* nodes, const PathName& moduleName,
+ const string& entryPoint);
private:
- template <typename T, typename T2, typename T3> T2* getNode(T* nodes, const PathName& moduleName,
- T3* metaInfo);
+ template <typename T, typename T2> T2* getNode(T* nodes, const PathName& moduleName,
+ const IRoutineMetadata* metadata, const string& entryPoint);
public:
virtual int FB_CALL getVersion(Error* error);
@@ -151,12 +152,11 @@
virtual void FB_CALL openAttachment(Error* error, ExternalContext* context);
virtual void FB_CALL closeAttachment(Error* error, ExternalContext* context);
virtual ExternalFunction* FB_CALL makeFunction(Error* error, ExternalContext* context,
- const char* package, const char* name, const char* entryPoint, const char* body);
+ const IRoutineMetadata* metadata);
virtual ExternalProcedure* FB_CALL makeProcedure(Error* error, ExternalContext* context,
- const char* package, const char* name, const char* entryPoint, const char* body);
+ const IRoutineMetadata* metadata);
virtual ExternalTrigger* FB_CALL makeTrigger(Error* error, ExternalContext* context,
- const char* name, const char* entryPoint, const char* body, const char* table,
- ExternalTrigger::Type type);
+ const IRoutineMetadata* metadata);
public:
virtual void FB_CALL dispose(Error* error);
@@ -205,25 +205,16 @@
class SharedFunction : public ExternalFunction
{
public:
- SharedFunction(Engine* aEngine, const string& aPackage, const string& aName,
- const string& aEntryPoint, const string& aBody)
+ SharedFunction(Engine* aEngine, const IRoutineMetadata* aMetadata)
: engine(aEngine),
- package(*getDefaultMemoryPool(), aPackage),
- name(*getDefaultMemoryPool(), aName),
- entryPoint(*getDefaultMemoryPool()),
- body(*getDefaultMemoryPool(), aBody),
+ metadata(aMetadata),
moduleName(*getDefaultMemoryPool()),
+ entryPoint(*getDefaultMemoryPool()),
info(*getDefaultMemoryPool()),
children(*getDefaultMemoryPool())
{
- engine->loadModule(aEntryPoint, &moduleName, &entryPoint, &info);
- metaInfo.package = package.nullStr();
- metaInfo.name = name.c_str();
- metaInfo.entryPoint = entryPoint.c_str();
- metaInfo.body = body.c_str();
- metaInfo.info = info.c_str();
-
- engine->findNode<FunctionNode, MetaInfo>(registeredFunctions, moduleName, &metaInfo);
+ engine->loadModule(metadata, &moduleName, &entryPoint);
+ engine->findNode<FunctionNode>(registeredFunctions, moduleName, entryPoint);
}
virtual ~SharedFunction()
@@ -266,13 +257,10 @@
}
public:
- MetaInfo metaInfo;
Engine* engine;
- string package;
- string name;
- string entryPoint;
- string body;
+ const IRoutineMetadata* metadata;
PathName moduleName;
+ string entryPoint;
string info;
GenericMap<Pair<NonPooled<ExternalContext*, ExternalFunction*> > > children;
};
@@ -284,25 +272,15 @@
class SharedProcedure : public ExternalProcedure
{
public:
- SharedProcedure(Engine* aEngine, const string& aPackage, const string& aName,
- const string& aEntryPoint, const string& aBody)
+ SharedProcedure(Engine* aEngine, const IRoutineMetadata* aMetadata)
: engine(aEngine),
- package(*getDefaultMemoryPool(), aPackage),
- name(*getDefaultMemoryPool(), aName),
- entryPoint(*getDefaultMemoryPool(), aEntryPoint),
- body(*getDefaultMemoryPool(), aBody),
moduleName(*getDefaultMemoryPool()),
+ entryPoint(*getDefaultMemoryPool()),
info(*getDefaultMemoryPool()),
children(*getDefaultMemoryPool())
{
- engine->loadModule(aEntryPoint, &moduleName, &entryPoint, &info);
- metaInfo.package = package.nullStr();
- metaInfo.name = name.c_str();
- metaInfo.entryPoint = entryPoint.c_str();
- metaInfo.body = body.c_str();
- metaInfo.info = info.c_str();
-
- engine->findNode<ProcedureNode, MetaInfo>(registeredProcedures, moduleName, &metaInfo);
+ engine->loadModule(metadata, &moduleName, &entryPoint);
+ engine->findNode<ProcedureNode>(registeredProcedures, moduleName, entryPoint);
}
virtual ~SharedProcedure()
@@ -352,13 +330,10 @@
}
public:
- MetaInfo metaInfo;
Engine* engine;
- string package;
- string name;
- string entryPoint;
- string body;
+ const IRoutineMetadata* metadata;
PathName moduleName;
+ string entryPoint;
string info;
GenericMap<Pair<NonPooled<ExternalContext*, ExternalProcedure*> > > children;
};
@@ -370,28 +345,16 @@
class SharedTrigger : public ExternalTrigger
{
public:
- SharedTrigger(Engine* aEngine, const string& aName, const string& aEntryPoint,
- const string& aBody, const string& aTable, ExternalTrigger::Type aType)
+ SharedTrigger(Engine* aEngine, const IRoutineMetadata* aMetadata)
: engine(aEngine),
- name(*getDefaultMemoryPool(), aName),
- entryPoint(*getDefaultMemoryPool(), aEntryPoint),
- body(*getDefaultMemoryPool(), aBody),
+ metadata(aMetadata),
moduleName(*getDefaultMemoryPool()),
+ entryPoint(*getDefaultMemoryPool()),
info(*getDefaultMemoryPool()),
- table(*getDefaultMemoryPool(), aTable),
- type(aType),
children(*getDefaultMemoryPool())
{
- engine->loadModule(aEntryPoint, &moduleName, &entryPoint, &info);
- metaInfo.package = NULL;
- metaInfo.name = name.c_str();
- metaInfo.entryPoint = entryPoint.c_str();
- metaInfo.body = body.c_str();
- metaInfo.info = info.c_str();
- metaInfo.type = type;
- metaInfo.table = table.nullStr();
-
- engine->findNode<TriggerNode, TriggerMetaInfo>(registeredTriggers, moduleName, &metaInfo);
+ engine->loadModule(metadata, &moduleName, &entryPoint);
+ engine->findNode<TriggerNode>(registeredTriggers, moduleName, entryPoint);
}
virtual ~SharedTrigger()
@@ -434,15 +397,11 @@
}
public:
- TriggerMetaInfo metaInfo;
Engine* engine;
- string name;
- string entryPoint;
- string body;
+ const IRoutineMetadata* metadata;
PathName moduleName;
+ string entryPoint;
string info;
- string table;
- ExternalTrigger::Type type;
GenericMap<Pair<NonPooled<ExternalContext*, ExternalTrigger*> > > children;
};
@@ -530,8 +489,12 @@
//--------------------------------------
-void Engine::loadModule(const string& str, PathName* moduleName, string* entryPoint, string* info)
+void Engine::loadModule(const IRoutineMetadata* metadata, PathName* moduleName, string* entryPoint)
{
+ LocalStatus status;
+ const string str(metadata->getEntryPoint(&status));
+ ThrowError::check(status.get());
+
const size_t pos = str.find('!');
if (pos == string::npos)
{
@@ -562,7 +525,6 @@
*entryPoint = str.substr(pos + 1);
size_t n = entryPoint->find('!');
- *info = (n == string::npos ? "" : entryPoint->substr(n + 1));
*entryPoint = (n == string::npos ? *entryPoint : entryPoint->substr(0, n));
MutexLockGuard guard(modulesMutex);
@@ -612,7 +574,7 @@
ObjType* obj;
if (!children.get(context, obj))
{
- obj = getNode<NodeType, ObjType>(nodes, moduleName, &sharedObj->metaInfo);
+ obj = getNode<NodeType, ObjType>(nodes, moduleName, sharedObj->metadata, sharedObj->entryPoint);
if (obj)
children.put(context, obj);
}
@@ -634,11 +596,9 @@
}
-template <typename T, typename T2> T* Engine::findNode(T* nodes,
- const PathName& moduleName, T2* params)
+template <typename T> T* Engine::findNode(T* nodes, const PathName& moduleName,
+ const string& entryPoint)
{
- const string entryPoint(params->entryPoint);
-
for (T* node = nodes; node; node = node->next)
{
if (node->module == moduleName && entryPoint == node->factory->getName())
@@ -658,11 +618,11 @@
}
-template <typename T, typename T2, typename T3> T2* Engine::getNode(T* nodes,
- const PathName& moduleName, T3* params)
+template <typename T, typename T2> T2* Engine::getNode(T* nodes, const PathName& moduleName,
+ const IRoutineMetadata* metadata, const string& entryPoint)
{
- T* node = findNode<T, T3>(nodes, moduleName, params);
- return node->factory->newItem(params);
+ T* node = findNode<T>(nodes, moduleName, entryPoint);
+ return node->factory->newItem(metadata);
}
@@ -720,12 +680,11 @@
ExternalFunction* FB_CALL Engine::makeFunction(Error* error, ExternalContext* /*context*/,
- const char* package, const char* name, const char* entryPoint, const char* body)
+ const IRoutineMetadata* metadata)
{
try
{
- return new SharedFunction(this, (package ? package : ""), name,
- (entryPoint ? entryPoint : ""), (body ? body : ""));
+ return new SharedFunction(this, metadata);
}
catch (const ThrowError::Exception& e)
{
@@ -736,12 +695,11 @@
ExternalProcedure* FB_CALL Engine::makeProcedure(Error* error, ExternalContext* /*context*/,
- const char* package, const char* name, const char* entryPoint, const char* body)
+ const IRoutineMetadata* metadata)
{
try
{
- return new SharedProcedure(this, (package ? package : ""), name,
- (entryPoint ? entryPoint : ""), (body ? body : ""));
+ return new SharedProcedure(this, metadata);
}
catch (const ThrowError::Exception& e)
{
@@ -752,13 +710,11 @@
ExternalTrigger* FB_CALL Engine::makeTrigger(Error* error, ExternalContext* /*context*/,
- const char* name, const char* entryPoint, const char* body, const char* table,
- ExternalTrigger::Type type)
+ const IRoutineMetadata* metadata)
{
try
{
- return new SharedTrigger(this, name, (entryPoint ? entryPoint : ""), (body ? body : ""),
- table, type);
+ return new SharedTrigger(this, metadata);
}
catch (const ThrowError::Exception& e)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fir...@us...> - 2011-05-16 03:17:19
|
Revision: 52947
http://firebird.svn.sourceforge.net/firebird/?rev=52947&view=rev
Author: firebirds
Date: 2011-05-16 03:17:12 +0000 (Mon, 16 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-15 19:56:12 UTC (rev 52946)
+++ firebird/trunk/ChangeLog 2011-05-16 03:17:12 UTC (rev 52947)
@@ -1,3 +1,22 @@
+ 2011-05-15 15:37 asfernandes
+ M src/jrd/os/posix/unix.cpp
+ M src/utilities/fbcpl/fbpanel.cpp
+ M src/yvalve/why.cpp
+Misc
+
+ 2011-05-15 15:37 asfernandes
+ M examples/udr/UdrCppExample.cpp
+ M src/include/FirebirdExternalApi.h
+ M src/include/FirebirdUdr.h
+ M src/include/FirebirdUdrCpp.h
+ M src/jrd/ExtEngineManager.cpp
+ M src/jrd/ExtEngineManager.h
+ M src/plugins/udr_engine/UdrEngine.cpp
+Added IRoutineMetadata to external engines.
+Not well tested:
+1) EE is broken after shared page cache.
+2) Semantics of addRef/release still keeps changing in developers minds.
+
2011-05-14 21:44 asfernandes
M src/common/classes/SyncObject.h
Fix warning.
Modified: firebird/trunk/src/jrd/build_no.h
===================================================================
--- firebird/trunk/src/jrd/build_no.h 2011-05-15 19:56:12 UTC (rev 52946)
+++ firebird/trunk/src/jrd/build_no.h 2011-05-16 03:17:12 UTC (rev 52947)
@@ -3,16 +3,16 @@
*** DO NOT EDIT ***
TO CHANGE ANY INFORMATION IN HERE PLEASE
EDIT src/misc/writeBuildNum.sh
- FORMAL BUILD NUMBER:29362
+ FORMAL BUILD NUMBER:29364
*/
-#define PRODUCT_VER_STRING "3.0.0.29362"
-#define FILE_VER_STRING "WI-T3.0.0.29362"
-#define LICENSE_VER_STRING "WI-T3.0.0.29362"
-#define FILE_VER_NUMBER 3, 0, 0, 29362
+#define PRODUCT_VER_STRING "3.0.0.29364"
+#define FILE_VER_STRING "WI-T3.0.0.29364"
+#define LICENSE_VER_STRING "WI-T3.0.0.29364"
+#define FILE_VER_NUMBER 3, 0, 0, 29364
#define FB_MAJOR_VER "3"
#define FB_MINOR_VER "0"
#define FB_REV_NO "0"
-#define FB_BUILD_NO "29362"
+#define FB_BUILD_NO "29364"
#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-15 19:56:12 UTC (rev 52946)
+++ firebird/trunk/src/misc/writeBuildNum.sh 2011-05-16 03:17:12 UTC (rev 52947)
@@ -9,7 +9,7 @@
MajorVer=3
MinorVer=0
RevNo=0
-BuildNum=29362
+BuildNum=29364
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-05-19 16:24:55
|
Revision: 52968
http://firebird.svn.sourceforge.net/firebird/?rev=52968&view=rev
Author: alexpeshkoff
Date: 2011-05-19 16:24:46 +0000 (Thu, 19 May 2011)
Log Message:
-----------
Better interfaces hierarchy: all of them are derived from IVersioned
Modified Paths:
--------------
firebird/trunk/examples/udr/UdrCppExample.cpp
firebird/trunk/src/auth/AuthInterface.h
firebird/trunk/src/auth/SecurityDatabase/LegacyServer.cpp
firebird/trunk/src/common/Auth.cpp
firebird/trunk/src/common/Auth.h
firebird/trunk/src/common/StatementMetadata.h
firebird/trunk/src/common/StatusHolder.h
firebird/trunk/src/common/classes/GetPlugins.h
firebird/trunk/src/common/classes/ImplementHelper.h
firebird/trunk/src/common/config/config.h
firebird/trunk/src/common/security.h
firebird/trunk/src/gpre/boot/gpre_meta_boot.cpp
firebird/trunk/src/include/FirebirdExternalApi.h
firebird/trunk/src/include/FirebirdPluginApi.h
firebird/trunk/src/include/Interface.h
firebird/trunk/src/include/ProviderInterface.h
firebird/trunk/src/include/Timer.h
firebird/trunk/src/jrd/EngineInterface.h
firebird/trunk/src/jrd/ExtEngineManager.h
firebird/trunk/src/jrd/UserManagement.cpp
firebird/trunk/src/jrd/UserManagement.h
firebird/trunk/src/jrd/dyn.epp
firebird/trunk/src/jrd/jrd.cpp
firebird/trunk/src/jrd/ntrace.h
firebird/trunk/src/jrd/trace/TraceConfigStorage.h
firebird/trunk/src/jrd/trace/TraceObjects.cpp
firebird/trunk/src/jrd/trace/TraceObjects.h
firebird/trunk/src/remote/client/interface.cpp
firebird/trunk/src/utilities/gsec/gsec.cpp
firebird/trunk/src/utilities/ntrace/PluginLogWriter.h
firebird/trunk/src/utilities/ntrace/TracePluginImpl.h
firebird/trunk/src/yvalve/DistributedTransaction.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/why.cpp
Modified: firebird/trunk/examples/udr/UdrCppExample.cpp
===================================================================
--- firebird/trunk/examples/udr/UdrCppExample.cpp 2011-05-19 11:38:38 UTC (rev 52967)
+++ firebird/trunk/examples/udr/UdrCppExample.cpp 2011-05-19 16:24:46 UTC (rev 52968)
@@ -350,7 +350,7 @@
"select data_source from replicate_config where name = ?",
SQL_DIALECT_CURRENT, NULL), statusVector);
- AutoDispose<IMaster> master(funcGetMasterInterface());
+ IMaster* master(funcGetMasterInterface());
AutoDispose<IStatus> status(master->getStatus());
const char* table = metadata->getTriggerTable(status);
Modified: firebird/trunk/src/auth/AuthInterface.h
===================================================================
--- firebird/trunk/src/auth/AuthInterface.h 2011-05-19 11:38:38 UTC (rev 52967)
+++ firebird/trunk/src/auth/AuthInterface.h 2011-05-19 16:24:46 UTC (rev 52968)
@@ -39,20 +39,22 @@
enum Result {AUTH_SUCCESS, AUTH_CONTINUE, AUTH_FAILED, AUTH_MORE_DATA};
-class IWriter : public Firebird::IDisposable
+class IWriter : public Firebird::IVersioned
{
public:
virtual void FB_CARG reset() = 0;
virtual void FB_CARG add(const char* user, const char* method, const char* details) = 0;
};
+#define FB_AUTH_WRITER_VERSION (FB_VERSIONED_VERSION + 2)
-class IDpbReader : public Firebird::IDisposable
+class IDpbReader : public Firebird::IVersioned
{
public:
virtual int FB_CARG find(UCHAR tag) = 0;
virtual void FB_CARG add(UCHAR tag, const void* bytes, unsigned int count) = 0;
virtual void FB_CARG drop() = 0;
};
+#define FB_AUTH_DPB_READER_VERSION (FB_VERSIONED_VERSION + 3)
class IServer : public Firebird::IPluginBase
{
@@ -75,13 +77,14 @@
};
#define FB_AUTH_CLIENT_VERSION (FB_PLUGIN_VERSION + 3)
-class IUserField : public Firebird::IDisposable
+class IUserField : public Firebird::IVersioned
{
public:
virtual int FB_CARG entered() = 0;
virtual int FB_CARG specified() = 0;
virtual void FB_CARG setEntered(int newValue) = 0;
};
+#define FB_AUTH_FIELD_VERSION (FB_VERSIONED_VERSION + 3)
class ICharUserField : public IUserField
{
@@ -89,6 +92,7 @@
virtual const char* FB_CARG get() = 0;
virtual void FB_CARG set(const char* newValue) = 0;
};
+#define FB_AUTH_CHAR_FIELD_VERSION (FB_AUTH_FIELD_VERSION + 2)
class IIntUserField : public IUserField
{
@@ -96,8 +100,9 @@
virtual int FB_CARG get() = 0;
virtual void FB_CARG set(int newValue) = 0;
};
+#define FB_AUTH_INT_FIELD_VERSION (FB_AUTH_FIELD_VERSION + 2)
-class IUser : public Firebird::IDisposable
+class IUser : public Firebird::IVersioned
{
public:
virtual int FB_CARG operation() = 0;
@@ -116,14 +121,16 @@
virtual void FB_CARG clear() = 0;
};
+#define FB_AUTH_USER_VERSION (FB_VERSIONED_VERSION + 11)
-class IListUsers : public Firebird::IDisposable
+class IListUsers : public Firebird::IVersioned
{
public:
virtual void FB_CARG list(IUser* user) = 0;
};
+#define FB_AUTH_LIST_USERS_VERSION (FB_VERSIONED_VERSION + 1)
-class ILogonInfo : public Firebird::IDisposable
+class ILogonInfo : public Firebird::IVersioned
{
public:
virtual const char* FB_CARG name() = 0;
@@ -132,6 +139,7 @@
virtual const char* FB_CARG networkProtocol() = 0;
virtual const char* FB_CARG remoteAddress() = 0;
};
+#define FB_AUTH_LOGON_INFO_VERSION (FB_VERSIONED_VERSION + 5)
class IManagement : public Firebird::IPluginBase
{
Modified: firebird/trunk/src/auth/SecurityDatabase/LegacyServer.cpp
===================================================================
--- firebird/trunk/src/auth/SecurityDatabase/LegacyServer.cpp 2011-05-19 11:38:38 UTC (rev 52967)
+++ firebird/trunk/src/auth/SecurityDatabase/LegacyServer.cpp 2011-05-19 16:24:46 UTC (rev 52968)
@@ -122,7 +122,7 @@
namespace Auth {
-class SecurityDatabase : public Firebird::StdIface<Firebird::ITimer, FB_I_TIMER_VERSION>
+class SecurityDatabase : public Firebird::RefCntIface<Firebird::ITimer, FB_TIMER_VERSION>
{
public:
Result verify(IWriter* authBlock, Firebird::ClumpletReader& originalDpb);
Modified: firebird/trunk/src/common/Auth.cpp
===================================================================
--- firebird/trunk/src/common/Auth.cpp 2011-05-19 11:38:38 UTC (rev 52967)
+++ firebird/trunk/src/common/Auth.cpp 2011-05-19 16:24:46 UTC (rev 52968)
@@ -33,7 +33,8 @@
namespace Auth {
WriterImplementation::WriterImplementation(bool svcFlag)
- : body(getPool()), sequence(0), tag(svcFlag ? isc_spb_auth_block : isc_dpb_auth_block)
+ : body(*getDefaultMemoryPool()),
+ sequence(0), tag(svcFlag ? isc_spb_auth_block : isc_dpb_auth_block)
{ }
void WriterImplementation::store(Firebird::ClumpletWriter& to)
Modified: firebird/trunk/src/common/Auth.h
===================================================================
--- firebird/trunk/src/common/Auth.h 2011-05-19 11:38:38 UTC (rev 52967)
+++ firebird/trunk/src/common/Auth.h 2011-05-19 16:24:46 UTC (rev 52968)
@@ -41,7 +41,7 @@
bool legacy(const char* nm);
-class WriterImplementation : public Firebird::StackIface<IWriter>
+class WriterImplementation : public Firebird::AutoIface<IWriter, FB_AUTH_WRITER_VERSION>
{
public:
WriterImplementation(bool svcFlag);
@@ -58,7 +58,7 @@
unsigned char tag;
};
-class DpbImplementation : public Firebird::StackIface<IDpbReader>
+class DpbImplementation : public Firebird::AutoIface<IDpbReader, FB_AUTH_DPB_READER_VERSION>
{
public:
DpbImplementation(Firebird::ClumpletWriter& base);
Modified: firebird/trunk/src/common/StatementMetadata.h
===================================================================
--- firebird/trunk/src/common/StatementMetadata.h 2011-05-19 11:38:38 UTC (rev 52967)
+++ firebird/trunk/src/common/StatementMetadata.h 2011-05-19 16:24:46 UTC (rev 52968)
@@ -30,6 +30,7 @@
#include "../common/classes/array.h"
#include "../common/classes/fb_string.h"
#include "../common/classes/objects_array.h"
+#include "../common/classes/ImplementHelper.h"
namespace Firebird {
@@ -38,7 +39,8 @@
class StatementMetadata : public PermanentStorage
{
public:
- class Parameters : public IParametersMetadata, public PermanentStorage
+ class Parameters : public VersionedIface<IParametersMetadata, FB_PARAMETERS_METADATA_VERSION>,
+ public PermanentStorage
{
public:
struct Item : public PermanentStorage
Modified: firebird/trunk/src/common/StatusHolder.h
===================================================================
--- firebird/trunk/src/common/StatusHolder.h 2011-05-19 11:38:38 UTC (rev 52967)
+++ firebird/trunk/src/common/StatusHolder.h 2011-05-19 16:24:46 UTC (rev 52968)
@@ -80,8 +80,11 @@
ISC_STATUS vector[40]; // FixMe - may be a kind of dynamic storage will be better?
};
-class LocalStatus : public StackIface<BaseStatus>
+class LocalStatus : public AutoIface<BaseStatus, FB_STATUS_VERSION>
{
+public:
+ virtual void FB_CARG dispose()
+ { }
};
class StatusHolder
Modified: firebird/trunk/src/common/classes/GetPlugins.h
===================================================================
--- firebird/trunk/src/common/classes/GetPlugins.h 2011-05-19 11:38:38 UTC (rev 52967)
+++ firebird/trunk/src/common/classes/GetPlugins.h 2011-05-19 16:24:46 UTC (rev 52968)
@@ -1,7 +1,7 @@
/*
* PROGRAM: Firebird interface.
* MODULE: ImplementHelper.h
- * DESCRIPTION: Tools to help write plugins.
+ * DESCRIPTION: Tools to help access plugins.
*
* The contents of this file are subject to the Initial
* Developer's Public License Version 1.0 (the "License");
@@ -50,7 +50,7 @@
{
public:
GetPlugins(unsigned int interfaceType, unsigned int desiredVersion, const char* namesList = NULL)
- : masterInterface(fb_get_master_interface()), pluginInterface(masterInterface->getPluginManager()), missing(),
+ : masterInterface(), pluginInterface(masterInterface), missing(),
pluginSet(pluginInterface->getPlugins(interfaceType, namesList ? namesList : Config::getPlugins(interfaceType),
desiredVersion, &missing, NULL)),
currentPlugin(NULL)
@@ -61,7 +61,7 @@
GetPlugins(unsigned int interfaceType, unsigned int desiredVersion,
Config* knownConfig, const char* namesList = NULL)
- : masterInterface(fb_get_master_interface()), pluginInterface(masterInterface->getPluginManager()), missing(),
+ : masterInterface(), pluginInterface(masterInterface), missing(),
pluginSet(pluginInterface->getPlugins(interfaceType, namesList ? namesList : Config::getPlugins(interfaceType),
desiredVersion, &missing, new FirebirdConf(knownConfig))),
currentPlugin(NULL)
@@ -122,8 +122,8 @@
}
private:
- AutoPtr<IMaster, AutoDisposable> masterInterface;
- AutoPtr<IPluginManager, AutoDisposable> pluginInterface;
+ MasterInterfacePtr masterInterface;
+ PluginManagerInterfacePtr pluginInterface;
M missing;
RefPtr<IPluginSet> pluginSet;
P* currentPlugin;
Modified: firebird/trunk/src/common/classes/ImplementHelper.h
===================================================================
--- firebird/trunk/src/common/classes/ImplementHelper.h 2011-05-19 11:38:38 UTC (rev 52967)
+++ firebird/trunk/src/common/classes/ImplementHelper.h 2011-05-19 16:24:46 UTC (rev 52968)
@@ -1,7 +1,7 @@
/*
* PROGRAM: Firebird interface.
* MODULE: ImplementHelper.h
- * DESCRIPTION: Tools to help write plugins.
+ * 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");
@@ -59,25 +59,30 @@
// Implement standard interface and plugin functions
-// Helps to implement disposable interfaces
-template <class C, typename S = GlobalStorage>
-class DisposeIface : public C, public S
+// Helps to implement generic versioned interfaces
+template <class C, int V>
+class VersionedIface : public C
{
public:
- DisposeIface() { }
+ VersionedIface() { }
+ int FB_CARG getVersion()
+ {
+ return V;
+ }
+
private:
- DisposeIface(const DisposeIface&);
- DisposeIface& operator=(const DisposeIface&);
+ VersionedIface(const VersionedIface&);
+ VersionedIface& operator=(const VersionedIface&);
};
-// Helps to implement disposable interfaces on stack or static
-template <class C, typename S = GlobalStorage>
-class StackIface : public DisposeIface<C, S>
+
+// Helps to implement versioned interfaces on stack or static
+template <class C, int V>
+class AutoIface : public VersionedIface<C, V>
{
public:
- void FB_CARG dispose()
- { }
+ AutoIface() { }
void* operator new(size_t, void* memory) throw()
{
@@ -85,20 +90,23 @@
}
};
+// Helps to implement disposable interfaces
+template <class C, int V>
+class DisposeIface : public VersionedIface<C, V>, public GlobalStorage
+{
+public:
+ DisposeIface() { }
+};
+
// Helps to implement standard interfaces
-template <class C, int V, typename S = GlobalStorage>
-class StdIface : public C, public S
+template <class C, int V>
+class RefCntIface : public VersionedIface<C, V>, public GlobalStorage
{
public:
- StdIface() : refCounter(0) { }
+ RefCntIface() : refCounter(0) { }
- int FB_CARG getVersion()
- {
- return V;
- }
-
#ifdef DEV_BUILD
- ~StdIface()
+ ~RefCntIface()
{
fb_assert(refCounter.value() == 0);
}
@@ -111,30 +119,26 @@
protected:
AtomicCounter refCounter;
-
-private:
- StdIface(const StdIface&);
- StdIface& operator=(const StdIface&);
};
// Helps to implement plugins
-template <class C, int V, typename S = GlobalStorage>
-class StdPlugin : public StdIface<C, V, S>
+template <class C, int V>
+class StdPlugin : public RefCntIface<C, V>
{
private:
- IInterface* owner;
+ IRefCounted* owner;
public:
StdPlugin() : owner(NULL)
{ }
- IInterface* FB_CARG getOwner()
+ IRefCounted* FB_CARG getOwner()
{
return owner;
}
- void FB_CARG setOwner(IInterface* iface)
+ void FB_CARG setOwner(IRefCounted* iface)
{
owner = iface;
}
@@ -143,7 +147,7 @@
// Trivial factory
template <class P>
-class SimpleFactoryBase : public StackIface<IPluginFactory>
+class SimpleFactoryBase : public AutoIface<IPluginFactory, FB_PLUGIN_FACTORY_VERSION>
{
public:
IPluginBase* FB_CARG createPlugin(IPluginConfig* factoryParameter)
@@ -160,40 +164,68 @@
};
+// Base for interface type indpendent accessors
+template <typename C>
+class AccessAutoInterface
+{
+public:
+ AccessAutoInterface(C* aPtr)
+ : ptr(aPtr)
+ { }
+
+ operator C*()
+ {
+ return ptr;
+ }
+
+ C* operator->()
+ {
+ return ptr;
+ }
+
+private:
+ C* ptr;
+};
+
// Master interface access
-class MasterInterfacePtr : public AutoPtr<IMaster, AutoDisposable>
+class MasterInterfacePtr : public AccessAutoInterface<IMaster>
{
public:
- MasterInterfacePtr() : AutoPtr<IMaster, AutoDisposable>(fb_get_master_interface())
+ MasterInterfacePtr()
+ : AccessAutoInterface<IMaster>(fb_get_master_interface())
{ }
};
// Generic plugins interface access
-class PluginManagerInterfacePtr : public AutoPtr<IPluginManager, AutoDisposable>
+class PluginManagerInterfacePtr : public AccessAutoInterface<IPluginManager>
{
public:
- PluginManagerInterfacePtr() : AutoPtr<IPluginManager, AutoDisposable>(fb_get_master_interface()->getPluginManager())
+ PluginManagerInterfacePtr()
+ : AccessAutoInterface<IPluginManager>(MasterInterfacePtr()->getPluginManager())
{ }
- PluginManagerInterfacePtr(IMaster* master) : AutoPtr<IPluginManager, AutoDisposable>(master->getPluginManager())
+ PluginManagerInterfacePtr(IMaster* master)
+ : AccessAutoInterface<IPluginManager>(master->getPluginManager())
{ }
};
// Control timer interface access
-class TimerInterfacePtr : public AutoPtr<ITimerControl, AutoDisposable>
+class TimerInterfacePtr : public AccessAutoInterface<ITimerControl>
{
public:
- TimerInterfacePtr() : AutoPtr<ITimerControl, AutoDisposable>(fb_get_master_interface()->getTimerControl())
+ TimerInterfacePtr()
+ : AccessAutoInterface<ITimerControl>(fb_get_master_interface()->getTimerControl())
{ }
};
// Distributed transactions coordinator access
-class DtcInterfacePtr : public AutoPtr<IDtc, AutoDisposable>
+class DtcInterfacePtr : public AccessAutoInterface<IDtc>
{
public:
- DtcInterfacePtr() : AutoPtr<IDtc, AutoDisposable>(fb_get_master_interface()->getDtc())
+ DtcInterfacePtr()
+ : AccessAutoInterface<IDtc>(fb_get_master_interface()->getDtc())
{ }
};
@@ -203,12 +235,8 @@
// when yvalve is starting fb_shutdown(). This causes almost unavoidable segfault.
// To avoid it this class is added - it detects spontaneous (not by PluginManager)
// module unload and notifies PluginManager about this said fact.
-class DummyStorage
+class UnloadDetectorHelper : public VersionedIface<IPluginModule, FB_PLUGIN_MODULE_VERSION>
{
-};
-
-class UnloadDetectorHelper : public DisposeIface<IPluginModule, DummyStorage>
-{
public:
explicit UnloadDetectorHelper(MemoryPool&)
: flagOsUnload(true)
@@ -230,11 +258,6 @@
return !flagOsUnload;
}
- void FB_CARG dispose()
- {
- // delete this; -don't do that!
- }
-
private:
bool flagOsUnload;
Modified: firebird/trunk/src/common/config/config.h
===================================================================
--- firebird/trunk/src/common/config/config.h 2011-05-19 11:38:38 UTC (rev 52967)
+++ firebird/trunk/src/common/config/config.h 2011-05-19 16:24:46 UTC (rev 52968)
@@ -351,7 +351,7 @@
};
// Implementation of interface to access master configuration file
-class FirebirdConf : public Firebird::StdIface<Firebird::IFirebirdConf, FB_I_FIREBIRD_CONF_VERSION>
+class FirebirdConf : public Firebird::RefCntIface<Firebird::IFirebirdConf, FB_FIREBIRD_CONF_VERSION>
{
public:
FirebirdConf(Config* existingConfig)
Modified: firebird/trunk/src/common/security.h
===================================================================
--- firebird/trunk/src/common/security.h 2011-05-19 11:38:38 UTC (rev 52967)
+++ firebird/trunk/src/common/security.h 2011-05-19 16:24:46 UTC (rev 52968)
@@ -30,7 +30,7 @@
namespace Auth {
-class CharField : public Firebird::StackIface<ICharUserField>
+class CharField : public Firebird::AutoIface<ICharUserField, FB_AUTH_CHAR_FIELD_VERSION>
{
public:
CharField()
@@ -88,7 +88,7 @@
Firebird::string value;
};
-class IntField : public Firebird::StackIface<IIntUserField>
+class IntField : public Firebird::AutoIface<IIntUserField, FB_AUTH_INT_FIELD_VERSION>
{
public:
IntField()
@@ -207,7 +207,7 @@
CharField database, dba, dbaPassword, role, trustedUser;
};
-class StackUserData : public Firebird::StackIface<UserData>
+class StackUserData : public Firebird::AutoIface<UserData, FB_AUTH_USER_VERSION>
{
};
Modified: firebird/trunk/src/gpre/boot/gpre_meta_boot.cpp
===================================================================
--- firebird/trunk/src/gpre/boot/gpre_meta_boot.cpp 2011-05-19 11:38:38 UTC (rev 52967)
+++ firebird/trunk/src/gpre/boot/gpre_meta_boot.cpp 2011-05-19 16:24:46 UTC (rev 52968)
@@ -678,8 +678,9 @@
{
public:
// IMaster implementation (almost dummy, for boot build)
- virtual void FB_CARG dispose()
+ virtual int FB_CARG getVersion()
{
+ return FB_MASTER_VERSION;
}
virtual IStatus* FB_CARG getStatus()
@@ -700,7 +701,7 @@
return NULL;
}
- virtual int FB_CARG upgradeInterface(IInterface* /*toUpgrade*/, int /*desiredVersion*/,
+ virtual int FB_CARG upgradeInterface(IVersioned* /*toUpgrade*/, int /*desiredVersion*/,
void* /*missingFunctionClass*/)
{
fb_assert(false);
Modified: firebird/trunk/src/include/FirebirdExternalApi.h
===================================================================
--- firebird/trunk/src/include/FirebirdExternalApi.h 2011-05-19 11:38:38 UTC (rev 52967)
+++ firebird/trunk/src/include/FirebirdExternalApi.h 2011-05-19 16:24:46 UTC (rev 52968)
@@ -152,7 +152,7 @@
};
-class IRoutineMetadata // : public IVersioned
+class IRoutineMetadata : public IVersioned
{
public:
virtual const char* FB_CARG getPackage(IStatus* status) const = 0;
@@ -162,7 +162,7 @@
virtual const char* FB_CARG getTriggerTable(IStatus* status) const = 0;
virtual ExternalTrigger::Type FB_CARG getTriggerType(IStatus* status) const = 0;
};
-// #define FB_I_ROUTINE_METADATA_VERSION (FB_VERSIONED_VERSION + 6)
+#define FB_ROUTINE_METADATA_VERSION (FB_VERSIONED_VERSION + 6)
// In SuperServer, shared by all attachments to one database and disposed when last (non-external)
Modified: firebird/trunk/src/include/FirebirdPluginApi.h
===================================================================
--- firebird/trunk/src/include/FirebirdPluginApi.h 2011-05-19 11:38:38 UTC (rev 52967)
+++ firebird/trunk/src/include/FirebirdPluginApi.h 2011-05-19 16:24:46 UTC (rev 52968)
@@ -70,7 +70,7 @@
namespace Firebird {
// IPluginBase interface - base for master plugin interfaces (factories are registered for them)
-class IPluginBase : public IInterface
+class IPluginBase : public IRefCounted
{
public:
// Additional (compared with Interface) functions getOwner() and setOwner()
@@ -79,13 +79,13 @@
// 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(IInterface*) = 0;
- virtual IInterface* FB_CARG getOwner() = 0;
+ virtual void FB_CARG setOwner(IRefCounted*) = 0;
+ virtual IRefCounted* FB_CARG getOwner() = 0;
};
-#define FB_PLUGIN_VERSION (FB_INTERFACE_VERSION + 2)
+#define FB_PLUGIN_VERSION (FB_REFCOUNTED_VERSION + 2)
// IPluginSet - low level tool to access plugins according to parameter from firebird.conf
-class IPluginSet : public IInterface
+class IPluginSet : public IRefCounted
{
public:
virtual const char* FB_CARG getName() const = 0;
@@ -94,33 +94,33 @@
virtual void FB_CARG next() = 0;
virtual void FB_CARG set(const char*) = 0;
};
-#define FB_PLUGIN_SET_VERSION (FB_INTERFACE_VERSION + 5)
+#define FB_PLUGIN_SET_VERSION (FB_REFCOUNTED_VERSION + 5)
// Interfaces to work with configuration data
class IConfig;
// Entry in configuration file
-class IConfigEntry : public IInterface
+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_I_CONFIG_PARAMETER_VERSION (FB_INTERFACE_VERSION + 3)
+#define FB_CONFIG_PARAMETER_VERSION (FB_REFCOUNTED_VERSION + 3)
// Generic form of access to configuration file - find specific entry in it
-class IConfig : public IInterface
+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_I_CONFIG_VERSION (FB_INTERFACE_VERSION + 3)
+#define FB_CONFIG_VERSION (FB_REFCOUNTED_VERSION + 3)
// Used to access config values from firebird.conf (may be DB specific)
-class IFirebirdConf : public IInterface
+class IFirebirdConf : public IRefCounted
{
public:
// Get integer key by it's name
@@ -132,37 +132,40 @@
// Use to access string values
virtual const char* FB_CARG asString(unsigned int key) = 0;
};
-#define FB_I_FIREBIRD_CONF_VERSION (FB_INTERFACE_VERSION + 3)
+#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 IInterface
+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_FACTORY_PARAMETER_VERSION (FB_INTERFACE_VERSION + 3)
+#define FB_PLUGIN_CONFIG_VERSION (FB_REFCOUNTED_VERSION + 3)
// Required to creat instances of given plugin
-class IPluginFactory : public IDisposable
+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 IDisposable
+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 IDisposable
+class IPluginManager : public IVersioned
{
public:
// Main function called by plugin modules in firebird_plugin()
@@ -192,7 +195,9 @@
// 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 {
Modified: firebird/trunk/src/include/Interface.h
===================================================================
--- firebird/trunk/src/include/Interface.h 2011-05-19 11:38:38 UTC (rev 52967)
+++ firebird/trunk/src/include/Interface.h 2011-05-19 16:24:46 UTC (rev 52968)
@@ -39,22 +39,33 @@
namespace Firebird {
-// Regular interface - base for refCounted FB interfaces
-class IInterface
+// 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;
- virtual int FB_CARG getVersion() = 0;
};
-#define FB_INTERFACE_VERSION 3 // If this is changed, types of all interfaces must be changed
+// If this is changed, types of refCounted interfaces must be changed
+#define FB_REFCOUNTED_VERSION (FB_VERSIONED_VERSION + 2)
-// Disposable interface - base for static and onStack interfaces, may be used in regular case too
+// Disposable interface - base for disposable FB interfaces
class IDisposable
{
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
@@ -69,6 +80,7 @@
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;
@@ -78,22 +90,20 @@
class IDtc;
// Master interface is used to access almost all other interfaces.
-class IMaster : public IDisposable
+class IMaster : public IVersioned
{
public:
- // This interface can't be upgraded - therefore another form of version is used
- const static unsigned int VERSION = 1; // To be changed each time any interface, passed
- // by firebird to plugins is changed
virtual IStatus* FB_CARG getStatus() = 0;
virtual IProvider* FB_CARG getDispatcher() = 0;
virtual IPluginManager* FB_CARG getPluginManager() = 0;
- virtual int FB_CARG upgradeInterface(IInterface* toUpgrade, int desiredVersion, void* missingFunctionClass) = 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 + 6)
} // namespace Firebird
Modified: firebird/trunk/src/include/ProviderInterface.h
===================================================================
--- firebird/trunk/src/include/ProviderInterface.h 2011-05-19 11:38:38 UTC (rev 52967)
+++ firebird/trunk/src/include/ProviderInterface.h 2011-05-19 16:24:46 UTC (rev 52968)
@@ -46,11 +46,12 @@
unsigned int bufferLength;
};
-class IEventCallback
+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
@@ -60,7 +61,7 @@
};
*/
-class IBlob : public IInterface
+class IBlob : public IRefCounted
{
public:
virtual void FB_CARG getInfo(IStatus* status,
@@ -74,9 +75,9 @@
virtual void FB_CARG close(IStatus* status) = 0;
virtual int FB_CARG seek(IStatus* status, int mode, int offset) = 0; // returns position
};
-#define FB_I_BLOB_VERSION (FB_INTERFACE_VERSION + 6)
+#define FB_BLOB_VERSION (FB_REFCOUNTED_VERSION + 6)
-class ITransaction : public IInterface
+class ITransaction : public IRefCounted
{
public:
virtual void FB_CARG getInfo(IStatus* status,
@@ -93,9 +94,9 @@
virtual ITransaction* FB_CARG validate(IStatus* status, IAttachment* attachment) = 0;
virtual ITransaction* FB_CARG enterDtc(IStatus* status) = 0;
};
-#define FB_I_TRANSACTION_VERSION (FB_INTERFACE_VERSION + 10)
+#define FB_TRANSACTION_VERSION (FB_REFCOUNTED_VERSION + 10)
-class IParametersMetadata // : public IVersioned
+class IParametersMetadata : public IVersioned
{
public:
virtual unsigned FB_CARG getCount(IStatus* status) const = 0;
@@ -109,9 +110,9 @@
virtual unsigned FB_CARG getLength(IStatus* status, unsigned index) const = 0;
virtual unsigned FB_CARG getScale(IStatus* status, unsigned index) const = 0;
};
-// #define FB_I_PARAMETERS_METADATA_VERSION (FB_VERSIONED_VERSION + 10)
+#define FB_PARAMETERS_METADATA_VERSION (FB_VERSIONED_VERSION + 10)
-class IStatement : public IInterface
+class IStatement : public IRefCounted
{
public:
// Prepare flags.
@@ -146,9...
[truncated message content] |
|
From: <fir...@us...> - 2011-05-20 03:18:18
|
Revision: 52971
http://firebird.svn.sourceforge.net/firebird/?rev=52971&view=rev
Author: firebirds
Date: 2011-05-20 03:18:11 +0000 (Fri, 20 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-19 17:09:44 UTC (rev 52970)
+++ firebird/trunk/ChangeLog 2011-05-20 03:18:11 UTC (rev 52971)
@@ -1,3 +1,80 @@
+ 2011-05-19 17:09 alexpeshkoff
+ M src/gpre/languages/rmc.cpp
+warnings
+
+ 2011-05-19 16:24 alexpeshkoff
+ M examples/udr/UdrCppExample.cpp
+ M src/auth/AuthInterface.h
+ M src/auth/SecurityDatabase/LegacyServer.cpp
+ M src/common/Auth.cpp
+ M src/common/Auth.h
+ M src/common/StatementMetadata.h
+ M src/common/StatusHolder.h
+ M src/common/classes/GetPlugins.h
+ M src/common/classes/ImplementHelper.h
+ M src/common/config/config.h
+ M src/common/security.h
+ M src/gpre/boot/gpre_meta_boot.cpp
+ M src/include/FirebirdExternalApi.h
+ M src/include/FirebirdPluginApi.h
+ M src/include/Interface.h
+ M src/include/ProviderInterface.h
+ M src/include/Timer.h
+ M src/jrd/EngineInterface.h
+ M src/jrd/ExtEngineManager.h
+ M src/jrd/UserManagement.cpp
+ M src/jrd/UserManagement.h
+ M src/jrd/dyn.epp
+ M src/jrd/jrd.cpp
+ M src/jrd/ntrace.h
+ M src/jrd/trace/TraceConfigStorage.h
+ M src/jrd/trace/TraceObjects.cpp
+ M src/jrd/trace/TraceObjects.h
+ M src/remote/client/interface.cpp
+ M src/utilities/gsec/gsec.cpp
+ M src/utilities/ntrace/PluginLogWriter.h
+ M src/utilities/ntrace/TracePluginImpl.h
+ M src/yvalve/DistributedTransaction.cpp
+ M src/yvalve/MasterImplementation.cpp
+ M src/yvalve/MasterImplementation.h
+ M src/yvalve/PluginManager.cpp
+ M src/yvalve/PluginManager.h
+ M src/yvalve/why.cpp
+Better interfaces hierarchy: all of them are derived from IVersioned
+
+ 2011-05-19 11:38 alexpeshkoff
+ M src/alice/alice_meta.epp
+ M src/alice/tdr.cpp
+ M src/common/classes/ImplementHelper.h
+ M src/common/classes/array.h
+ M src/common/utils.cpp
+ M src/common/utils_proto.h
+ M src/gpre/boot/gpre_meta_boot.cpp
+ M src/include/Interface.h
+ M src/include/ProviderInterface.h
+ M src/jrd/EngineInterface.h
+ M src/jrd/inf.cpp
+ M src/jrd/inf_pub.h
+ M src/jrd/jrd.cpp
+ M src/remote/client/interface.cpp
+ M src/remote/server/server.cpp
+ A src/yvalve/DistributedTransaction.cpp
+ M src/yvalve/MasterImplementation.h
+ M src/yvalve/why.cpp
+Interface for 2PC (distributed transactions coordinator)
+
+ 2011-05-19 11:12 mapopa
+ M src/common/common.h
+cleanup comment EKU: obsolete, replaced by _FILE_OFFSET_BITS
+
+ 2011-05-19 09:46 mapopa
+ M src/jrd/inf_pub.h
+header cleanup , unused defines anywhere (long dead platforms)
+
+ 2011-05-19 09:44 mapopa
+ M src/jrd/ibase.h
+Disabled, not found anywhere function (commented anyway)
+
2011-05-15 15:37 asfernandes
M src/jrd/os/posix/unix.cpp
M src/utilities/fbcpl/fbpanel.cpp
Modified: firebird/trunk/src/jrd/build_no.h
===================================================================
--- firebird/trunk/src/jrd/build_no.h 2011-05-19 17:09:44 UTC (rev 52970)
+++ firebird/trunk/src/jrd/build_no.h 2011-05-20 03:18:11 UTC (rev 52971)
@@ -3,16 +3,16 @@
*** DO NOT EDIT ***
TO CHANGE ANY INFORMATION IN HERE PLEASE
EDIT src/misc/writeBuildNum.sh
- FORMAL BUILD NUMBER:29364
+ FORMAL BUILD NUMBER:29370
*/
-#define PRODUCT_VER_STRING "3.0.0.29364"
-#define FILE_VER_STRING "WI-T3.0.0.29364"
-#define LICENSE_VER_STRING "WI-T3.0.0.29364"
-#define FILE_VER_NUMBER 3, 0, 0, 29364
+#define PRODUCT_VER_STRING "3.0.0.29370"
+#define FILE_VER_STRING "WI-T3.0.0.29370"
+#define LICENSE_VER_STRING "WI-T3.0.0.29370"
+#define FILE_VER_NUMBER 3, 0, 0, 29370
#define FB_MAJOR_VER "3"
#define FB_MINOR_VER "0"
#define FB_REV_NO "0"
-#define FB_BUILD_NO "29364"
+#define FB_BUILD_NO "29370"
#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-19 17:09:44 UTC (rev 52970)
+++ firebird/trunk/src/misc/writeBuildNum.sh 2011-05-20 03:18:11 UTC (rev 52971)
@@ -9,7 +9,7 @@
MajorVer=3
MinorVer=0
RevNo=0
-BuildNum=29364
+BuildNum=29370
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-21 03:18:47
|
Revision: 52980
http://firebird.svn.sourceforge.net/firebird/?rev=52980&view=rev
Author: firebirds
Date: 2011-05-21 03:18:40 +0000 (Sat, 21 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-21 01:02:33 UTC (rev 52979)
+++ firebird/trunk/ChangeLog 2011-05-21 03:18:40 UTC (rev 52980)
@@ -1,3 +1,37 @@
+ 2011-05-21 01:02 asfernandes
+ M src/gpre/sqe.cpp
+ M src/qli/exe.h
+ M src/qli/gener_proto.h
+Warnings.
+
+ 2011-05-20 17:14 alexpeshkoff
+ M src/yvalve/why.cpp
+Destroy transaction only when next level returns success
+
+ 2011-05-20 16:45 alexpeshkoff
+ M src/common/classes/fb_atomic.h
+Atomic operations: use gcc builtin functions instead asm, fix atomic_ops library use
+
+ 2011-05-20 16:44 alexpeshkoff
+ M builds/posix/Makefile.in
+misc
+
+ 2011-05-20 09:13 mapopa
+ M src/gpre/gpre.h
+fix warning: using the result of an assignment as a condition without parentheses
+note:place parentheses around the assignment to silence this warning
+
+ 2011-05-20 08:31 mapopa
+ M autogen.sh
+PKG_NAME is now Firebird3 for trunk
+
+ 2011-05-20 07:22 hvlad
+ M builds/win32/msvc10/yvalve.vcxproj
+ M builds/win32/msvc10/yvalve.vcxproj.filters
+ M builds/win32/msvc8/yvalve.vcproj
+ M builds/win32/msvc9/yvalve.vcproj
+Update Windows build
+
2011-05-19 17:09 alexpeshkoff
M src/gpre/languages/rmc.cpp
warnings
Modified: firebird/trunk/src/jrd/build_no.h
===================================================================
--- firebird/trunk/src/jrd/build_no.h 2011-05-21 01:02:33 UTC (rev 52979)
+++ firebird/trunk/src/jrd/build_no.h 2011-05-21 03:18:40 UTC (rev 52980)
@@ -3,16 +3,16 @@
*** DO NOT EDIT ***
TO CHANGE ANY INFORMATION IN HERE PLEASE
EDIT src/misc/writeBuildNum.sh
- FORMAL BUILD NUMBER:29370
+ FORMAL BUILD NUMBER:29377
*/
-#define PRODUCT_VER_STRING "3.0.0.29370"
-#define FILE_VER_STRING "WI-T3.0.0.29370"
-#define LICENSE_VER_STRING "WI-T3.0.0.29370"
-#define FILE_VER_NUMBER 3, 0, 0, 29370
+#define PRODUCT_VER_STRING "3.0.0.29377"
+#define FILE_VER_STRING "WI-T3.0.0.29377"
+#define LICENSE_VER_STRING "WI-T3.0.0.29377"
+#define FILE_VER_NUMBER 3, 0, 0, 29377
#define FB_MAJOR_VER "3"
#define FB_MINOR_VER "0"
#define FB_REV_NO "0"
-#define FB_BUILD_NO "29370"
+#define FB_BUILD_NO "29377"
#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-21 01:02:33 UTC (rev 52979)
+++ firebird/trunk/src/misc/writeBuildNum.sh 2011-05-21 03:18:40 UTC (rev 52980)
@@ -9,7 +9,7 @@
MajorVer=3
MinorVer=0
RevNo=0
-BuildNum=29370
+BuildNum=29377
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-22 03:17:42
|
Revision: 52987
http://firebird.svn.sourceforge.net/firebird/?rev=52987&view=rev
Author: firebirds
Date: 2011-05-22 03:17:35 +0000 (Sun, 22 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-21 21:43:13 UTC (rev 52986)
+++ firebird/trunk/ChangeLog 2011-05-22 03:17:35 UTC (rev 52987)
@@ -1,3 +1,39 @@
+ 2011-05-21 21:43 asfernandes
+ M src/yvalve/why.cpp
+Misc.
+
+ 2011-05-21 19:11 asfernandes
+ M src/common/classes/fb_atomic.h
+ M src/common/utils.cpp
+ M src/common/utils_proto.h
+ M src/remote/client/interface.cpp
+ M src/yvalve/why.cpp
+Misc.
+
+ 2011-05-21 19:10 asfernandes
+ M src/include/Interface.h
+Correction.
+
+ 2011-05-21 18:56 asfernandes
+ M src/common/Auth.cpp
+ M src/common/classes/ImplementHelper.h
+ M src/common/classes/fb_atomic.h
+ M src/gpre/gpre.h
+ M src/include/ProviderInterface.h
+ M src/jrd/jrd.cpp
+ M src/remote/client/interface.cpp
+ M src/yvalve/DistributedTransaction.cpp
+ M src/yvalve/why.cpp
+Misc.
+
+ 2011-05-21 18:55 asfernandes
+ M src/include/Interface.h
+Correction.
+
+ 2011-05-21 14:04 asfernandes
+ M src/jrd/blb.cpp
+Fixed CORE-3476 - LIST function wrongly concatenates binary blobs.
+
2011-05-21 01:02 asfernandes
M src/gpre/sqe.cpp
M src/qli/exe.h
Modified: firebird/trunk/src/jrd/build_no.h
===================================================================
--- firebird/trunk/src/jrd/build_no.h 2011-05-21 21:43:13 UTC (rev 52986)
+++ firebird/trunk/src/jrd/build_no.h 2011-05-22 03:17:35 UTC (rev 52987)
@@ -3,16 +3,16 @@
*** DO NOT EDIT ***
TO CHANGE ANY INFORMATION IN HERE PLEASE
EDIT src/misc/writeBuildNum.sh
- FORMAL BUILD NUMBER:29377
+ FORMAL BUILD NUMBER:29383
*/
-#define PRODUCT_VER_STRING "3.0.0.29377"
-#define FILE_VER_STRING "WI-T3.0.0.29377"
-#define LICENSE_VER_STRING "WI-T3.0.0.29377"
-#define FILE_VER_NUMBER 3, 0, 0, 29377
+#define PRODUCT_VER_STRING "3.0.0.29383"
+#define FILE_VER_STRING "WI-T3.0.0.29383"
+#define LICENSE_VER_STRING "WI-T3.0.0.29383"
+#define FILE_VER_NUMBER 3, 0, 0, 29383
#define FB_MAJOR_VER "3"
#define FB_MINOR_VER "0"
#define FB_REV_NO "0"
-#define FB_BUILD_NO "29377"
+#define FB_BUILD_NO "29383"
#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-21 21:43:13 UTC (rev 52986)
+++ firebird/trunk/src/misc/writeBuildNum.sh 2011-05-22 03:17:35 UTC (rev 52987)
@@ -9,7 +9,7 @@
MajorVer=3
MinorVer=0
RevNo=0
-BuildNum=29377
+BuildNum=29383
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-24 03:19:12
|
Revision: 52991
http://firebird.svn.sourceforge.net/firebird/?rev=52991&view=rev
Author: firebirds
Date: 2011-05-24 03:19:05 +0000 (Tue, 24 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-23 15:33:19 UTC (rev 52990)
+++ firebird/trunk/ChangeLog 2011-05-24 03:19:05 UTC (rev 52991)
@@ -1,3 +1,16 @@
+ 2011-05-23 15:33 asfernandes
+ M src/common/classes/Synchronize.cpp
+ M src/common/classes/Synchronize.h
+Make synchronization primitives work in the POSIX build.
+
+ 2011-05-23 11:45 alexpeshkoff
+ M src/yvalve/why.cpp
+Fixed isc_start_multiple() - thanks to Adriano
+
+ 2011-05-23 11:45 alexpeshkoff
+ M src/include/ProviderInterface.h
+Slightly better struct layout from cunning alignment POV
+
2011-05-21 21:43 asfernandes
M src/yvalve/why.cpp
Misc.
Modified: firebird/trunk/src/jrd/build_no.h
===================================================================
--- firebird/trunk/src/jrd/build_no.h 2011-05-23 15:33:19 UTC (rev 52990)
+++ firebird/trunk/src/jrd/build_no.h 2011-05-24 03:19:05 UTC (rev 52991)
@@ -3,16 +3,16 @@
*** DO NOT EDIT ***
TO CHANGE ANY INFORMATION IN HERE PLEASE
EDIT src/misc/writeBuildNum.sh
- FORMAL BUILD NUMBER:29383
+ FORMAL BUILD NUMBER:29386
*/
-#define PRODUCT_VER_STRING "3.0.0.29383"
-#define FILE_VER_STRING "WI-T3.0.0.29383"
-#define LICENSE_VER_STRING "WI-T3.0.0.29383"
-#define FILE_VER_NUMBER 3, 0, 0, 29383
+#define PRODUCT_VER_STRING "3.0.0.29386"
+#define FILE_VER_STRING "WI-T3.0.0.29386"
+#define LICENSE_VER_STRING "WI-T3.0.0.29386"
+#define FILE_VER_NUMBER 3, 0, 0, 29386
#define FB_MAJOR_VER "3"
#define FB_MINOR_VER "0"
#define FB_REV_NO "0"
-#define FB_BUILD_NO "29383"
+#define FB_BUILD_NO "29386"
#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-23 15:33:19 UTC (rev 52990)
+++ firebird/trunk/src/misc/writeBuildNum.sh 2011-05-24 03:19:05 UTC (rev 52991)
@@ -9,7 +9,7 @@
MajorVer=3
MinorVer=0
RevNo=0
-BuildNum=29383
+BuildNum=29386
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-25 03:19:06
|
Revision: 53003
http://firebird.svn.sourceforge.net/firebird/?rev=53003&view=rev
Author: firebirds
Date: 2011-05-25 03:18:59 +0000 (Wed, 25 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-25 00:54:59 UTC (rev 53002)
+++ firebird/trunk/ChangeLog 2011-05-25 03:18:59 UTC (rev 53003)
@@ -1,3 +1,35 @@
+ 2011-05-25 00:54 asfernandes
+ M src/yvalve/why.cpp
+Fix attachment leak due to variable shadow in isc_start_multiple.
+
+ 2011-05-25 00:45 asfernandes
+ M src/yvalve/DistributedTransaction.cpp
+Misc.
+
+ 2011-05-24 22:39 asfernandes
+ M src/yvalve/MasterImplementation.cpp
+ M src/yvalve/MasterImplementation.h
+Hope this fixes the windows build.
+
+ 2011-05-24 20:44 hvlad
+ M builds/win32/msvc10/common.vcxproj
+ M builds/win32/msvc10/common.vcxproj.filters
+ M builds/win32/msvc10/engine.vcxproj
+ M builds/win32/msvc10/engine.vcxproj.filters
+ M builds/win32/msvc10/yvalve.vcxproj.filters
+Cleanup
+
+ 2011-05-24 15:20 asfernandes
+ M src/yvalve/DistributedTransaction.cpp
+ M src/yvalve/MasterImplementation.cpp
+ M src/yvalve/MasterImplementation.h
+ A src/yvalve/YObjects.h
+ M src/yvalve/why.cpp
+Fix problems with new multi-db transactions implementation:
+1) fb_get_transaction_handle access object of invalid type and crash
+2) Attachment::createBlob/openBlob access object of invalid type and crash
+3) isc_start_multiple creates YTransaction with NULL attachment and makes its constructor crash
+
2011-05-23 15:33 asfernandes
M src/common/classes/Synchronize.cpp
M src/common/classes/Synchronize.h
Modified: firebird/trunk/src/jrd/build_no.h
===================================================================
--- firebird/trunk/src/jrd/build_no.h 2011-05-25 00:54:59 UTC (rev 53002)
+++ firebird/trunk/src/jrd/build_no.h 2011-05-25 03:18:59 UTC (rev 53003)
@@ -3,16 +3,16 @@
*** DO NOT EDIT ***
TO CHANGE ANY INFORMATION IN HERE PLEASE
EDIT src/misc/writeBuildNum.sh
- FORMAL BUILD NUMBER:29386
+ FORMAL BUILD NUMBER:29391
*/
-#define PRODUCT_VER_STRING "3.0.0.29386"
-#define FILE_VER_STRING "WI-T3.0.0.29386"
-#define LICENSE_VER_STRING "WI-T3.0.0.29386"
-#define FILE_VER_NUMBER 3, 0, 0, 29386
+#define PRODUCT_VER_STRING "3.0.0.29391"
+#define FILE_VER_STRING "WI-T3.0.0.29391"
+#define LICENSE_VER_STRING "WI-T3.0.0.29391"
+#define FILE_VER_NUMBER 3, 0, 0, 29391
#define FB_MAJOR_VER "3"
#define FB_MINOR_VER "0"
#define FB_REV_NO "0"
-#define FB_BUILD_NO "29386"
+#define FB_BUILD_NO "29391"
#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-25 00:54:59 UTC (rev 53002)
+++ firebird/trunk/src/misc/writeBuildNum.sh 2011-05-25 03:18:59 UTC (rev 53003)
@@ -9,7 +9,7 @@
MajorVer=3
MinorVer=0
RevNo=0
-BuildNum=29386
+BuildNum=29391
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-05-25 12:59:48
|
Revision: 53011
http://firebird.svn.sourceforge.net/firebird/?rev=53011&view=rev
Author: alexpeshkoff
Date: 2011-05-25 12:59:41 +0000 (Wed, 25 May 2011)
Log Message:
-----------
Frontported fix for CORE-3482: nbackup ctrl-c segfaults and leaves db locked (delta file continues to grow)
Modified Paths:
--------------
firebird/trunk/lang_helpers/gds_codes.ftn
firebird/trunk/lang_helpers/gds_codes.pas
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/msgs/facilities2.sql
firebird/trunk/src/msgs/messages2.sql
firebird/trunk/src/msgs/system_errors2.sql
firebird/trunk/src/utilities/nbackup/nbackup.cpp
Modified: firebird/trunk/lang_helpers/gds_codes.ftn
===================================================================
--- firebird/trunk/lang_helpers/gds_codes.ftn 2011-05-25 11:50:25 UTC (rev 53010)
+++ firebird/trunk/lang_helpers/gds_codes.ftn 2011-05-25 12:59:41 UTC (rev 53011)
@@ -2274,6 +2274,8 @@
PARAMETER (GDS__nbackup_lostguid_l0bk = 337117251)
INTEGER*4 GDS__nbackup_switchd_parameter
PARAMETER (GDS__nbackup_switchd_parameter = 337117255)
+ INTEGER*4 GDS__nbackup_user_stop
+ PARAMETER (GDS__nbackup_user_stop = 337117257)
INTEGER*4 GDS__trace_conflict_acts
PARAMETER (GDS__trace_conflict_acts = 337182750)
INTEGER*4 GDS__trace_act_notfound
Modified: firebird/trunk/lang_helpers/gds_codes.pas
===================================================================
--- firebird/trunk/lang_helpers/gds_codes.pas 2011-05-25 11:50:25 UTC (rev 53010)
+++ firebird/trunk/lang_helpers/gds_codes.pas 2011-05-25 12:59:41 UTC (rev 53011)
@@ -1144,6 +1144,7 @@
gds_nbackup_err_eofhdr_restdb = 337117250;
gds_nbackup_lostguid_l0bk = 337117251;
gds_nbackup_switchd_parameter = 337117255;
+ gds_nbackup_user_stop = 337117257;
gds_trace_conflict_acts = 337182750;
gds_trace_act_notfound = 337182751;
gds_trace_switch_once = 337182752;
Modified: firebird/trunk/src/include/gen/codetext.h
===================================================================
--- firebird/trunk/src/include/gen/codetext.h 2011-05-25 11:50:25 UTC (rev 53010)
+++ firebird/trunk/src/include/gen/codetext.h 2011-05-25 12:59:41 UTC (rev 53011)
@@ -1133,6 +1133,7 @@
{"nbackup_err_eofhdr_restdb", 337117250},
{"nbackup_lostguid_l0bk", 337117251},
{"nbackup_switchd_parameter", 337117255},
+ {"nbackup_user_stop", 337117257},
{"trace_conflict_acts", 337182750},
{"trace_act_notfound", 337182751},
{"trace_switch_once", 337182752},
Modified: firebird/trunk/src/include/gen/iberror.h
===================================================================
--- firebird/trunk/src/include/gen/iberror.h 2011-05-25 11:50:25 UTC (rev 53010)
+++ firebird/trunk/src/include/gen/iberror.h 2011-05-25 12:59:41 UTC (rev 53011)
@@ -1167,6 +1167,7 @@
const ISC_STATUS isc_nbackup_err_eofhdr_restdb = 337117250L;
const ISC_STATUS isc_nbackup_lostguid_l0bk = 337117251L;
const ISC_STATUS isc_nbackup_switchd_parameter = 337117255L;
+const ISC_STATUS isc_nbackup_user_stop = 337117257L;
const ISC_STATUS isc_trace_conflict_acts = 337182750L;
const ISC_STATUS isc_trace_act_notfound = 337182751L;
const ISC_STATUS isc_trace_switch_once = 337182752L;
@@ -1178,7 +1179,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 = 1122;
+const ISC_STATUS isc_err_max = 1123;
#else /* c definitions */
@@ -2315,6 +2316,7 @@
#define isc_nbackup_err_eofhdr_restdb 337117250L
#define isc_nbackup_lostguid_l0bk 337117251L
#define isc_nbackup_switchd_parameter 337117255L
+#define isc_nbackup_user_stop 337117257L
#define isc_trace_conflict_acts 337182750L
#define isc_trace_act_notfound 337182751L
#define isc_trace_switch_once 337182752L
@@ -2326,7 +2328,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 1122
+#define isc_err_max 1123
#endif
Modified: firebird/trunk/src/include/gen/msgs.h
===================================================================
--- firebird/trunk/src/include/gen/msgs.h 2011-05-25 11:50:25 UTC (rev 53010)
+++ firebird/trunk/src/include/gen/msgs.h 2011-05-25 12:59:41 UTC (rev 53011)
@@ -1136,6 +1136,7 @@
{337117250, "Unexpected end of file when reading header of restored database file (stage @1)"}, /* nbackup_err_eofhdr_restdb */
{337117251, "Cannot get backup guid clumplet from L0 backup"}, /* nbackup_lostguid_l0bk */
{337117255, "Wrong parameter @1 for switch -D, need ON or OFF"}, /* nbackup_switchd_parameter */
+ {337117257, "Terminated due to user request"}, /* nbackup_user_stop */
{337182750, "conflicting actions \"@1\" and \"@2\" found"}, /* trace_conflict_acts */
{337182751, "action switch not found"}, /* trace_act_notfound */
{337182752, "switch \"@1\" must be set only once"}, /* trace_switch_once */
Modified: firebird/trunk/src/include/gen/sql_code.h
===================================================================
--- firebird/trunk/src/include/gen/sql_code.h 2011-05-25 11:50:25 UTC (rev 53010)
+++ firebird/trunk/src/include/gen/sql_code.h 2011-05-25 12:59:41 UTC (rev 53011)
@@ -1132,6 +1132,7 @@
{337117250, -901}, /* 66 nbackup_err_eofhdr_restdb */
{337117251, -901}, /* 67 nbackup_lostguid_l0bk */
{337117255, -901}, /* 71 nbackup_switchd_parameter */
+ {337117257, -901}, /* 73 nbackup_user_stop */
{337182750, -901}, /* 30 trace_conflict_acts */
{337182751, -901}, /* 31 trace_act_notfound */
{337182752, -901}, /* 32 trace_switch_once */
Modified: firebird/trunk/src/include/gen/sql_state.h
===================================================================
--- firebird/trunk/src/include/gen/sql_state.h 2011-05-25 11:50:25 UTC (rev 53010)
+++ firebird/trunk/src/include/gen/sql_state.h 2011-05-25 12:59:41 UTC (rev 53011)
@@ -1132,6 +1132,7 @@
{337117250, "00000"}, // 66 nbackup_err_eofhdr_restdb
{337117251, "00000"}, // 67 nbackup_lostguid_l0bk
{337117255, "00000"}, // 71 nbackup_switchd_parameter
+ {337117257, "08006"}, // 73 nbackup_user_stop
{337182750, "00000"}, // 30 trace_conflict_acts
{337182751, "00000"}, // 31 trace_act_notfound
{337182752, "00000"}, // 32 trace_switch_once
Modified: firebird/trunk/src/msgs/facilities2.sql
===================================================================
--- firebird/trunk/src/msgs/facilities2.sql 2011-05-25 11:50:25 UTC (rev 53010)
+++ firebird/trunk/src/msgs/facilities2.sql 2011-05-25 12:59:41 UTC (rev 53011)
@@ -35,7 +35,7 @@
('2009-12-26 14:22:00', 'GSTAT', 21, 50)
('2009-12-18 19:33:34', 'FBSVCMGR', 22, 57)
('2009-07-18 12:12:12', 'UTL', 23, 2)
-('2009-12-19 06:19:15', 'NBACKUP', 24, 73)
+('2011-05-25 16:17:34', 'NBACKUP', 24, 74)
('2009-07-20 07:55:48', 'FBTRACEMGR', 25, 41)
stop
Modified: firebird/trunk/src/msgs/messages2.sql
===================================================================
--- firebird/trunk/src/msgs/messages2.sql 2011-05-25 11:50:25 UTC (rev 53010)
+++ firebird/trunk/src/msgs/messages2.sql 2011-05-25 12:59:41 UTC (rev 53011)
@@ -3147,6 +3147,7 @@
(NULL, 'usage', 'nbackup.cpp', NULL, 24, 70, NULL, ' -D(IRECT) [ON | OFF] Use or not direct I/O when backing up database', NULL, NULL)
('nbackup_switchd_parameter', 'main', 'nbackup.cpp', NULL, 24, 71, NULL, 'Wrong parameter @1 for switch -D, need ON or OFF', NULL, NULL)
(NULL, 'usage', 'nbackup.cpp', NULL, 24, 72, NULL, 'special options are:', NULL, NULL)
+('nbackup_user_stop', 'checkCtrlC()', 'nbackup.cpp', NULL, 24, 73, NULL, 'Terminated due to user request', NULL, NULL)
-- FBTRACEMGR
-- All messages use the new format.
(NULL, 'usage', 'TraceCmdLine.cpp', NULL, 25, 1, NULL, 'Firebird Trace Manager version @1', NULL, NULL)
Modified: firebird/trunk/src/msgs/system_errors2.sql
===================================================================
--- firebird/trunk/src/msgs/system_errors2.sql 2011-05-25 11:50:25 UTC (rev 53010)
+++ firebird/trunk/src/msgs/system_errors2.sql 2011-05-25 12:59:41 UTC (rev 53011)
@@ -1130,6 +1130,7 @@
(-901, '00', '000', 24, 66, 'nbackup_err_eofhdr_restdb', NULL, NULL)
(-901, '00', '000', 24, 67, 'nbackup_lostguid_l0bk', NULL, NULL)
(-901, '00', '000', 24, 71, 'nbackup_switchd_parameter', NULL, NULL)
+(-901, '08', '006', 24, 73, 'nbackup_user_stop', NULL, NULL)
-- FBTRACEMGR
(-901, '00', '000', 25, 30, 'trace_conflict_acts', NULL, NULL)
(-901, '00', '000', 25, 31, 'trace_act_notfound', NULL, NULL)
Modified: firebird/trunk/src/utilities/nbackup/nbackup.cpp
===================================================================
--- firebird/trunk/src/utilities/nbackup/nbackup.cpp 2011-05-25 11:50:25 UTC (rev 53010)
+++ firebird/trunk/src/utilities/nbackup/nbackup.cpp 2011-05-25 12:59:41 UTC (rev 53011)
@@ -212,10 +212,30 @@
}
#endif // HAVE_POSIX_FADVISE
+ bool flShutdown = false;
+
+ int nbackupShutdown(const int reason, const int, void*)
+ {
+ if (reason == fb_shutrsn_signal)
+ {
+ flShutdown = true;
+ return FB_FAILURE;
+ }
+ return FB_SUCCESS;
+ }
+
} // namespace
+static void checkCtrlC(UtilSvc* uSvc)
+{
+ if (flShutdown)
+ {
+ Arg::Gds(isc_nbackup_user_stop).raise();
+ }
+}
+
#ifdef WIN_NT
#define FILE_HANDLE HANDLE
#else
@@ -261,6 +281,15 @@
if (!ResolveDatabaseAlias(db, dbname, NULL))
dbname = db;
+
+ if (!uSvc->isService())
+ {
+ // It's time to take care about shutdown handling
+ if (fb_shutdown_callback(status, nbackupShutdown, fb_shut_confirmation, NULL))
+ {
+ pr_error(status, "setting shutdown callback");
+ }
+ }
}
typedef ObjectsArray<PathName> BackupFiles;
@@ -960,6 +989,8 @@
page_writes++;
}
+ checkCtrlC(uSvc);
+
if ((db_size_pages != 0) && (db_size == 0))
break;
@@ -1241,6 +1272,7 @@
}
seek_file(dbase, ((SINT64) pageNum) * bakheader.page_size);
write_file(dbase, page_buffer, bakheader.page_size);
+ checkCtrlC(uSvc);
}
delete_database = false;
}
@@ -1252,6 +1284,7 @@
status_exception::raise(Arg::Gds(isc_nbackup_err_copy) <<
dbname.c_str() << bakname.c_str() << Arg::OsError());
}
+ checkCtrlC(uSvc);
delete_database = true; // database is possibly broken
open_database_write();
#else
@@ -1263,6 +1296,7 @@
if (bytesRead == 0)
break;
write_file(dbase, buffer, bytesRead);
+ checkCtrlC(uSvc);
}
seek_file(dbase, 0);
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fir...@us...> - 2011-05-26 03:18:41
|
Revision: 53012
http://firebird.svn.sourceforge.net/firebird/?rev=53012&view=rev
Author: firebirds
Date: 2011-05-26 03:18:34 +0000 (Thu, 26 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-25 12:59:41 UTC (rev 53011)
+++ firebird/trunk/ChangeLog 2011-05-26 03:18:34 UTC (rev 53012)
@@ -1,3 +1,21 @@
+ 2011-05-25 12:59 alexpeshkoff
+ M lang_helpers/gds_codes.ftn
+ M lang_helpers/gds_codes.pas
+ 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/msgs/facilities2.sql
+ M src/msgs/messages2.sql
+ M src/msgs/system_errors2.sql
+ M src/utilities/nbackup/nbackup.cpp
+Frontported fix for CORE-3482: nbackup ctrl-c segfaults and leaves db locked (delta file continues to grow)
+
+ 2011-05-25 10:59 dimitr
+ M src/dsql/ExprNodes.cpp
+Fixed CORE-3493: Adding a value to a timestamp below '16.11.1858 00:00:01' throws 'value exceeds the range for valid timestamp'. v2.1 wasn't really affected although the validation sequence was wrong.
+
2011-05-25 00:54 asfernandes
M src/yvalve/why.cpp
Fix attachment leak due to variable shadow in isc_start_multiple.
Modified: firebird/trunk/src/jrd/build_no.h
===================================================================
--- firebird/trunk/src/jrd/build_no.h 2011-05-25 12:59:41 UTC (rev 53011)
+++ firebird/trunk/src/jrd/build_no.h 2011-05-26 03:18:34 UTC (rev 53012)
@@ -3,16 +3,16 @@
*** DO NOT EDIT ***
TO CHANGE ANY INFORMATION IN HERE PLEASE
EDIT src/misc/writeBuildNum.sh
- FORMAL BUILD NUMBER:29391
+ FORMAL BUILD NUMBER:29393
*/
-#define PRODUCT_VER_STRING "3.0.0.29391"
-#define FILE_VER_STRING "WI-T3.0.0.29391"
-#define LICENSE_VER_STRING "WI-T3.0.0.29391"
-#define FILE_VER_NUMBER 3, 0, 0, 29391
+#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 FB_MAJOR_VER "3"
#define FB_MINOR_VER "0"
#define FB_REV_NO "0"
-#define FB_BUILD_NO "29391"
+#define FB_BUILD_NO "29393"
#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-25 12:59:41 UTC (rev 53011)
+++ firebird/trunk/src/misc/writeBuildNum.sh 2011-05-26 03:18:34 UTC (rev 53012)
@@ -9,7 +9,7 @@
MajorVer=3
MinorVer=0
RevNo=0
-BuildNum=29391
+BuildNum=29393
NowAt=`pwd`
cd `dirname $0`
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|