[fdo-trac] #812: SDF Provider: cannot drop a newly created class

FDO trac_fdo at osgeo.org
Tue Jan 24 11:08:36 EST 2012


#812: SDF Provider: cannot drop a newly created class
----------------------------+-----------------------------------------------
   Reporter:  danstoica     |       Owner:  gregboone
       Type:  defect        |      Status:  new      
   Priority:  major         |   Milestone:  3.7.0    
  Component:  SDF Provider  |     Version:  3.7.0    
   Severity:  2             |    Keywords:           
External_id:                |  
----------------------------+-----------------------------------------------
 The error thrown is "database table is locked". This message is misleading
 since the real cause is the existence of an open cursor on the table as
 shown below:

 // \TRUNK\fdo\Thirdparty\Sqlite3.3.13\Src\btree.c

 int sqlite3BtreeDropTable(Btree *p, int iTable, int *piMoved){
 [...]

   /* It is illegal to drop a table if any cursors are open on the
   ** database. ...
   */
   if( pBt->pCursor ){
     return SQLITE_LOCKED;
   }

 Note a cursor is created at table creation time.

 The proposed solution is to ensure the cursor on the table is closed at
 flush time, where currently this condition is not checked and flush bails
 out.

-- 
Ticket URL: <http://trac.osgeo.org/fdo/ticket/812>
FDO <http://fdo.osgeo.org/>
Feature Data Objects


More information about the fdo-trac mailing list