The official documentation states:
SQLITE_OMIT_AUTOINIT
For backwards compatibility with older versions of SQLite that lack
the sqlite3_initialize() interface, the sqlite3_initialize() interface
is called automatically upon entry to certain key interfaces such as
sqlite3_open(), sqlite3_vfs_register(), and sqlite3_mprintf(). The
overhead of invoking sqlite3_initialize() automatically in this way
may be omitted by building SQLite with the SQLITE_OMIT_AUTOINIT
C-preprocessor macro. When built using SQLITE_OMIT_AUTOINIT, SQLite
will not automatically initialize itself and the application is
required to invoke sqlite3_initialize() directly prior to beginning
use of the SQLite library.
Therefore:
- By default, this conditional is not defined;
- You can define it if you are sure that
sqlite3_initialize()
is called;
- It does not cost anything about performance to run
sqlite3_initialize()
or not, since initialization check will be performed on "upon entry to certain key interfaces", i.e. at opening the DB.
The fact that everything works even if sqlite3_initialize()
is not called clearly shows it.
In our SQLite3 wrapper (allowing static or external linking), we enable this conditional, since we explicitly call sqlite3_initialize()
. But in the official dll, this conditional is not defined.