Hi all, I'm using sqlite 3.6.22-1 in ubuntu 10.04.
If a precompiled statement become expired, and sqlite3_step() is called, documentation says that it will fail with a SQLITE_SCHEMA error. /* Opcode: Expire P1 * * * * ** ** Cause precompiled statements to become expired. An expired statement ** fails with an error code of SQLITE_SCHEMA if it is ever executed ** (via sqlite3_step()). ** ** If P1 is 0, then all SQL statements become expired. If P1 is non-zero, ** then only the currently executing statement is affected. */ case OP_Expire: { if( !pOp->p1 ){ sqlite3ExpirePreparedStatements(db); }else{ p->expired = 1; } break; } Above, p->expired is set to 1 for the current statement. But when opening a read-only or read-write cursor for the database table during a sqlite3_step() with that statement, if the expired flag is found set, SQLITE_ABORT is set as error code, instead of SQLITE_SCHEMA, as the documentation says, which seems an error: case OP_OpenRead: case OP_OpenWrite: { int nField; KeyInfo *pKeyInfo; int p2; int iDb; int wrFlag; Btree *pX; VdbeCursor *pCur; Db *pDb; if( p->expired ){ -- rc = SQLITE_ABORT; ++ rc = SQLITE_SCHEMA; break; } Now, apart from the issue above, is there any other method to know if a precompiled statement expired? I see that sqlite3_expired() is marked as deprecated, so what would be the equivalent? Cheers, -- Aleksander _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users