Hello,
You should try executing a PRAGMA with no result such as:
PRAGMA table_info('no_such_table');

Before 3.16,
sqlite3_step returns SQLITE_DONE
and
sqlite3_column_count returns 0

After 3.16,
sqlite3_step returns SQLITE_DONE
and
sqlite3_column_count does not return 0 but 6

Regards.

On Fri, Jan 6, 2017 at 1:50 AM, Richard Hipp <d...@sqlite.org> wrote:
> On 1/5/17, Richard Hipp <d...@sqlite.org> wrote:
>> But apparently, many people are looking at the result of
>> sqlite3_column_count() and if it is zero, they never bother to
>> sqlite3_finalize() their PRAGMA statements.
>
> Or maybe not.
>
> I just did an analysis of the sqlite3_column_count() changes between
> 3.15.2 and 3.16.0.  All changes involve PRAGMAs that used to return 0
> but now return a positive number.
>
> So if applications were using a zero sqlite3_column_count() return to
> indicate that the pragma returned no rows, that still works.
>
> In the cases where sqlite3_column_count() used to return 0 but now
> returns positive, that would induce the application to call
> sqlite3_step() on the pragma, which would then return SQLITE_DONE.
>
> Everything should still work.
>
> So now I don't really understand what is going wrong.
>
> --
> D. Richard Hipp
> d...@sqlite.org
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to