On Feb 27, 2009, at 2:30 PM, Lukhnos D. Liu wrote:
>
> Some casual search in SQLite's source code revealed that it was about
> some safety check mechanism (sqlite->magic), but it still didn't tell
> me when and what constitues a misuse.
>
This is usually an indication that you passed in a database connection
pointer to sqlite3_prepare() that had previously been closed. For
example:
sqlite3_close(db);
sqlite3_prepare(db, zSql, -1, &pStmt, 0);
SQLite does *not* return SQLITE_MISUSE when the schema expires. When
the schema expires, it returns SQLITE_SCHEMA - a very different
error. SQLite will only return SQLITE_MISUSE if you attempt to use
the SQLite interface in some way that it was not designed to operate.
SQLITE_MISUSE errors are often probabilistically detected; in other
words detection of misuse is not guaranteed.
D. Richard Hipp
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users