[mapguide-commits] r8627 - in branches/3.0/MgDev: . Server/src/Services/Feature

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed Apr 29 06:21:03 PDT 2015


Author: jng
Date: 2015-04-29 06:21:03 -0700 (Wed, 29 Apr 2015)
New Revision: 8627

Modified:
   branches/3.0/MgDev/
   branches/3.0/MgDev/Server/src/Services/Feature/ServerFeatureReader.cpp
   branches/3.0/MgDev/Server/src/Services/Feature/ServerFeatureReader.h
Log:
Merged revision(s) 8626 from trunk/MgDev:
Merged revision(s) 8625 from sandbox/adsk/3.0m:
Fix ticket: ReadNext method loops when using SqLite database
http://trac.osgeo.org/mapguide/ticket/1996
........

Also fix tab/space formatting as part of this merge
........



Property changes on: branches/3.0/MgDev
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/2.4/MgDev:6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/branches/2.6/MgDev:8276-8286,8288-8292,8297,8299,8301,8303,8314-8315,8318,8335,8340,8354-8355,8365,8373
/sandbox/adsk/3.0m:8563,8584,8607
/sandbox/jng/convenience_apis:8262-8268,8271-8363
/sandbox/jng/createruntimemap:7486-7555
/sandbox/jng/dwftk:8321-8324,8328-8329,8331,8352
/sandbox/jng/geos34x:8256-8259
/sandbox/jng/tiling:8174-8208
/sandbox/jng/v30:8212-8227
/sandbox/rfc94:5099-5163
/trunk/MgDev:8595,8616-8618
   + /branches/2.4/MgDev:6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/branches/2.6/MgDev:8276-8286,8288-8292,8297,8299,8301,8303,8314-8315,8318,8335,8340,8354-8355,8365,8373
/sandbox/adsk/3.0m:8563,8584,8607,8625
/sandbox/jng/convenience_apis:8262-8268,8271-8363
/sandbox/jng/createruntimemap:7486-7555
/sandbox/jng/dwftk:8321-8324,8328-8329,8331,8352
/sandbox/jng/geos34x:8256-8259
/sandbox/jng/tiling:8174-8208
/sandbox/jng/v30:8212-8227
/sandbox/rfc94:5099-5163
/trunk/MgDev:8595,8616-8618,8626

Modified: branches/3.0/MgDev/Server/src/Services/Feature/ServerFeatureReader.cpp
===================================================================
--- branches/3.0/MgDev/Server/src/Services/Feature/ServerFeatureReader.cpp	2015-04-29 13:18:45 UTC (rev 8626)
+++ branches/3.0/MgDev/Server/src/Services/Feature/ServerFeatureReader.cpp	2015-04-29 13:21:03 UTC (rev 8627)
@@ -38,6 +38,7 @@
     m_fdoReader = FDO_SAFE_ADDREF(fdoReader);
     m_forceIdProps = SAFE_ADDREF(forceIdProps); //This is only passed in for select queries that involve the FDO Join APIs
     m_removeFromPoolOnDestruction = false;
+    m_readerDepleted = false;
 
     // The reader takes ownership of the FDO connection
     m_connection->OwnReader();
@@ -57,6 +58,7 @@
     m_connection = NULL;
     m_fdoReader = NULL;
     m_removeFromPoolOnDestruction = false;
+    m_readerDepleted = false;
 }
 
 //////////////////////////////////////////////////////////////////
@@ -96,6 +98,9 @@
 {
     CHECKNULL(m_fdoReader, L"MgServerFeatureReader.ReadNext");
 
+    if (m_readerDepleted)
+        return false;
+
     bool retVal = false;
 
     MG_FEATURE_SERVICE_TRY()
@@ -104,6 +109,9 @@
 
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgServerFeatureReader.ReadNext")
 
+    if (!retVal)
+        m_readerDepleted = true;
+
     return retVal;
 }
 
@@ -1157,6 +1165,9 @@
     CHECKNULL((FdoIFeatureReader*)m_fdoReader, L"MgServerFeatureReader.AddFeatures");
     CHECKNULL((MgFeatureSet*)m_featureSet, L"MgServerFeatureReader.AddFeatures");
 
+    if (m_readerDepleted)
+        return;
+
     INT32 desiredFeatures = 0;
 
     // Access the class definition
@@ -1184,6 +1195,7 @@
                 if (++desiredFeatures == count)
                     break;
             }
+            m_readerDepleted = true;
         }
         //some providers will throw if ReadNext is called more than once
         catch (FdoException* e)

Modified: branches/3.0/MgDev/Server/src/Services/Feature/ServerFeatureReader.h
===================================================================
--- branches/3.0/MgDev/Server/src/Services/Feature/ServerFeatureReader.h	2015-04-29 13:18:45 UTC (rev 8626)
+++ branches/3.0/MgDev/Server/src/Services/Feature/ServerFeatureReader.h	2015-04-29 13:21:03 UTC (rev 8627)
@@ -575,6 +575,7 @@
     FdoIFeatureReader* m_fdoReader;
     bool m_removeFromPoolOnDestruction;
     Ptr<MgStringCollection> m_forceIdProps;
+    FdoBoolean m_readerDepleted;
 
 CLASS_ID:
     static const INT32 m_cls_id = PlatformBase_FeatureService_FeatureReader;



More information about the mapguide-commits mailing list