Opened 13 years ago
Closed 13 years ago
#812 closed defect (fixed)
SDF Provider: cannot drop a newly created class
Reported by: | danstoica | Owned by: | gregboone |
---|---|---|---|
Priority: | major | Milestone: | 3.7.0 |
Component: | SDF Provider | Version: | 3.7.0 |
Severity: | 2 | Keywords: | |
Cc: | External ID: |
Description
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.