In the documentation for sqlite3_prepare_v2, it says:

*ppStmt is left pointing to a compiled prepared 
statement<https://www.sqlite.org/c3ref/stmt.html> that can be executed using 
sqlite3_step()<https://www.sqlite.org/c3ref/step.html>. If there is an error, 
*ppStmt is set to NULL. If the input text contains no SQL (if the input is an 
empty string or a comment) then *ppStmt is set to NULL. The calling procedure 
is responsible for deleting the compiled SQL statement using 
sqlite3_finalize()<https://www.sqlite.org/c3ref/finalize.html> after it has 
finished with it. ppStmt may not be NULL.

Is an empty SQL statement always an error, i.e. is it possible for 
sqlite3_prepare_v2 to return SQLITE_OK while leaving *ppStmt NULL? I have been 
assuming not, but I’m tracking down a hard-to-find bug and double-checking all 
my assumptions.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to