I just discovered that malformed pragma's statements return SQLITE_DONE. For instance "pragma table_info (foo);" if table "foo" does not exist, SQLITE_DONE is returned. Also occurs in completely malformed pragma's like "pragma x;".
Also verified in v.2.8.13 One question: I'm returning a recordset to the user, and I'm assuming that if the return error code is SQLITE_OK and sqlite3_column_count () == 0 then it is not a select. But the pragma "bug" above fails with this assumption. Is there any way to know the type of the current statement, i.e.: select, insert, delete, etc? I would like to know it to retrieve the sqlite3_changes() value after the statement has finished to return that value to the user.