[mapguide-trac] #1996: ReadNext method loops when using SqLite database

MapGuide Open Source trac_mapguide at osgeo.org
Tue May 8 22:15:41 EDT 2012


#1996: ReadNext method loops when using SqLite database
-------------------------------+--------------------------------------------
   Reporter:  zhanga           |       Owner:                 
       Type:  defect           |      Status:  new            
   Priority:  medium           |   Milestone:  2.3            
  Component:  Feature Service  |     Version:  2.1.0          
   Severity:  trivial          |    Keywords:  ReadNext Sqlite
External_id:  1456425          |  
-------------------------------+--------------------------------------------

Comment(by zhanga):

 When call ReadNext() in from web-tier side, it actually doesn’t send a
 ReadNext() operation request to Map Server. Instead, it sends a GetRows
 operation request to get a lot of records, then cache the records. If the
 GetRows operation returns an empty collection, then we think we have
 reached the end of the reader.
 But there is no specification in the FDO API about what we should do in
 case an application calls again ReadNext after reader is depleted. In
 SQLite the sqlite engine resets the statement automatically and start it
 over again. Therefore, the GetRows method will never return an empty
 collection for Sqlite database. Then the ReadNext() method in the web app
 would be an endless loop.
 This submission fixes ServerDataReader and ServerSqlDataReader to make IM
 Server runs correctly when using SQLite database.

 MG Open Source:
 Server/src/Services/Feature/ServerDataReader.cpp
 Server/src/Services/Feature/ServerDataReader.h
 Server/src/Services/Feature/ServerSqlDataReader.cpp
 Server/src/Services/Feature/ServerSqlDataReader.h

-- 
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/1996#comment:1>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list