[fdo-commits] r810 - in branches/3.2.x/Utilities:
SchemaMgr/Inc/Sm/Ph SchemaMgr/Src/Sm/Ph
SchemaMgr/Src/Sm/Ph/Mt TestCommon/Src
svn_fdo at osgeo.org
svn_fdo at osgeo.org
Thu Feb 22 18:10:09 EST 2007
Author: brentrobinson
Date: 2007-02-22 18:10:09 -0500 (Thu, 22 Feb 2007)
New Revision: 810
Modified:
branches/3.2.x/Utilities/SchemaMgr/Inc/Sm/Ph/Owner.h
branches/3.2.x/Utilities/SchemaMgr/Src/Sm/Ph/Mt/ClassReader.cpp
branches/3.2.x/Utilities/SchemaMgr/Src/Sm/Ph/Owner.cpp
branches/3.2.x/Utilities/TestCommon/Src/TestCommonMiscUtil.cpp
Log:
Views Support: Performance (bulk load primary keys when datastore has MetaSchema) and memory leak fixes
Modified: branches/3.2.x/Utilities/SchemaMgr/Inc/Sm/Ph/Owner.h
===================================================================
--- branches/3.2.x/Utilities/SchemaMgr/Inc/Sm/Ph/Owner.h 2007-02-22 20:56:14 UTC (rev 809)
+++ branches/3.2.x/Utilities/SchemaMgr/Inc/Sm/Ph/Owner.h 2007-02-22 23:10:09 UTC (rev 810)
@@ -170,6 +170,10 @@
// Default implementation returns NULL (not supported).
virtual FdoPtr<FdoSmPhRdPkeyReader> CreatePkeyReader() const;
+ // Create a reader to get all primary keys for this join.
+ // Default implementation returns NULL (not supported).
+ virtual FdoPtr<FdoSmPhRdPkeyReader> CreatePkeyReader( FdoPtr<FdoSmPhRdTableJoin> join ) const;
+
/// Create a reader to get all constraints for this owner and object name list.
virtual FdoPtr<FdoSmPhRdConstraintReader> CreateConstraintReader( FdoStringsP objectNames, FdoStringP constraintType ) const;
Modified: branches/3.2.x/Utilities/SchemaMgr/Src/Sm/Ph/Mt/ClassReader.cpp
===================================================================
--- branches/3.2.x/Utilities/SchemaMgr/Src/Sm/Ph/Mt/ClassReader.cpp 2007-02-22 20:56:14 UTC (rev 809)
+++ branches/3.2.x/Utilities/SchemaMgr/Src/Sm/Ph/Mt/ClassReader.cpp 2007-02-22 23:10:09 UTC (rev 810)
@@ -20,6 +20,7 @@
#include <Sm/Ph/DependencyReader.h>
#include <Sm/Ph/Mt/ClassReader.h>
#include <Sm/Ph/Rd/ColumnReader.h>
+#include <Sm/Ph/Rd/PkeyReader.h>
FdoSmPhMtClassReader::FdoSmPhMtClassReader( FdoSmPhRowsP froms, FdoStringP schemaName, FdoStringP className, FdoSmPhMgrP mgr ) :
FdoSmPhReader( MakeReader(froms, schemaName, mgr, className) )
@@ -59,6 +60,7 @@
{
FdoSmPhOwnerP owner = mgr->GetOwner();
FdoSmPhRdDbObjectReaderP objReader;
+ FdoSmPhRdPkeyReaderP pkeyReader;
FdoSmPhRdConstraintReaderP ukeyReader;
FdoSmPhRdConstraintReaderP ckeyReader;
FdoSmPhRdColumnReaderP columnReader;
@@ -85,6 +87,7 @@
// Doing a single query per owner for each component is more efficient than
// a query per dbObject.
// The join is used to limit results to those needed for this schema.
+ pkeyReader = owner->CreatePkeyReader( join );
ukeyReader = owner->CreateConstraintReader( join, L"U" );
ckeyReader = owner->CreateConstraintReader( join, L"C" );
@@ -103,6 +106,9 @@
if ( columnReader )
dbObject->CacheColumns( columnReader );
+ if ( pkeyReader )
+ dbObject->CachePkeys( pkeyReader );
+
if ( depReader )
dbObject->CacheDependenciesUp( depReader );
Modified: branches/3.2.x/Utilities/SchemaMgr/Src/Sm/Ph/Owner.cpp
===================================================================
--- branches/3.2.x/Utilities/SchemaMgr/Src/Sm/Ph/Owner.cpp 2007-02-22 20:56:14 UTC (rev 809)
+++ branches/3.2.x/Utilities/SchemaMgr/Src/Sm/Ph/Owner.cpp 2007-02-22 23:10:09 UTC (rev 810)
@@ -353,6 +353,11 @@
return (FdoSmPhRdPkeyReader*) NULL;
}
+FdoPtr<FdoSmPhRdPkeyReader> FdoSmPhOwner::CreatePkeyReader( FdoPtr<FdoSmPhRdTableJoin> join ) const
+{
+ return (FdoSmPhRdPkeyReader*) NULL;
+}
+
FdoPtr<FdoSmPhRdColumnReader> FdoSmPhOwner::CreateColumnReader() const
{
return (FdoSmPhRdColumnReader*) NULL;
Modified: branches/3.2.x/Utilities/TestCommon/Src/TestCommonMiscUtil.cpp
===================================================================
--- branches/3.2.x/Utilities/TestCommon/Src/TestCommonMiscUtil.cpp 2007-02-22 20:56:14 UTC (rev 809)
+++ branches/3.2.x/Utilities/TestCommon/Src/TestCommonMiscUtil.cpp 2007-02-22 23:10:09 UTC (rev 810)
@@ -186,7 +186,7 @@
{
DeleteFile( L"leak_rpt.txt" );
_CrtSetReportHook( TestCommonMiscUtil::LeakReportHook );
- _CrtSetBreakAlloc( 15192 );
+ _CrtSetBreakAlloc( 3453788 );
}
int TestCommonMiscUtil::LeakReportHook( int reportType, char *message, int *returnValue )
@@ -258,6 +258,9 @@
fprintf( outFp, "\n" );
fflush( outFp );
}
+ else {
+ fprintf( outFp, "{%d} %s", allocNum, message );
+ }
}
fclose(outFp);
More information about the fdo-commits
mailing list