On Tue, 15 Jan 2013 16:07:16 -0600, Eric Sink <e...@sourcegear.com>
wrote:

>
>So it appears that if the very first SQLite function you call is 
>sqlite3_randomness(), it crashes.
>
>And if you call sqlite3_initialize() first, it does not crash.
>
>Just thought I should let somebody know...

It's documented:

http://sqlite.org/c3ref/initialize.html

" The sqlite3_initialize() routine is called internally by many other
SQLite interfaces so that an application usually does not need to invoke
sqlite3_initialize() directly. For example, sqlite3_open() calls
sqlite3_initialize() so the SQLite library will be automatically
initialized when sqlite3_open() is called if it has not be initialized
already. However, if SQLite is compiled with the SQLITE_OMIT_AUTOINIT
compile-time option, then the automatic calls to sqlite3_initialize()
are omitted and the application must call sqlite3_initialize() directly
prior to using any other SQLite interface. For maximum portability, it
is recommended that applications always invoke sqlite3_initialize()
directly prior to using any other SQLite interface. Future releases of
SQLite may require this. In other words, the behavior exhibited when
SQLite is compiled with SQLITE_OMIT_AUTOINIT might become the default
behavior in some future release of SQLite. "

Usually the first thing an application does is call sqlite3_open*() and
by default SQLITE_OMIT_AUTOINIT is not defined (yet).

-- 
Groet, Cordialement, Pozdrawiam, Regards,

Kees Nuyt

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to