Is it expected that the following program should run without asserting?
-----------------------
#include <sqlite3.h>
#include <stdlib.h>
#include <assert.h>
int main() {
sqlite3 *db = NULL;
int rc;
rc = sqlite3_open("test.db", &db);
assert(rc == SQLITE_OK);
assert(db);
sqlite3_stmt *stmt = NULL;
rc = sqlite3_prepare_v2(db, "/* foobar", -1, &stmt, NULL);
assert(rc == SQLITE_OK);
assert(stmt == NULL);
return 0;
}
-----------------------
I was expecting sqlite3_prepare_v2 to return an error code since the
comment is not terminated. Even if it was, the documentation is only
clear that a string with no SQL produces a NULL stmt, not what the
return code is in that situation.
Cheers,
Rafael
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users