>Look at the source for sqlite3_blob_open().
From stepping through the code I
have learned that blob read/write fails and returns SQLITE_ABORT because in
the blob handle structure
structIncrblob {
int flags; /*
Copy of "flags" passed to qlite3_blob_open() */
int nByte; /*
Size of open blob, in bytes */
int iOffset; /* Byte
offset of blob in cursor data */
BtCursor *pCsr; /* Cursor pointing at blob row */
sqlite3_stmt *pStmt; /* Statement holding cursor open */
sqlite3 *db; /* The associated database */
};
pCstr->estate is turned to 0
(CURSOR_INVALID) by some previous Sqlite operation.
This forces invalidation of the statement ‘pStmt’ variable and subsequent
return of the
SQLITE_ABORT code when first sqlite3BtreeData
is called by the blob_read:
SQLITE_PRIVATE int sqlite3BtreeData(BtCursor *pCur, u32 offset, u32
amt, void *pBuf){
int rc;
#ifndefSQLITE_OMIT_INCRBLOB
if (
pCur->eState==CURSOR_INVALID ){ //
<-----------------------------------------------------|
return SQLITE_ABORT; //
<----------------------------------------------------|
}
#endif
//…
}
Now, if only I could guess what can force cursor eState to
CURSOR_INVALID value!?
Thank you,
Samuel
__________________________________________________________________
The new Internet Explorer® 8 - Faster, safer, easier. Optimized for Yahoo!
Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users