SQLite Forum

Compile error when symbols SQLITE_OMIT_SHARED_CACHE and SQLITE_USER_AUTHENTICATION=1 are both defined
I'm building from the amalgamation. I'm aware of the fact that not all `_OMIT_` options work as expected when building from the amalgamation. However, the option `SQLITE_OMIT_SHARED_CACHE` has no influence on the lemon-generated parser. Therefore I suppose that building from the amalgamation with this option enabled should work.

In the light of [DRH's comment](https://www.sqlite.org/forum/forumpost/1f291cdca460abf3?t=h) regarding shared cache mode about a year ago I would almost call it _good practice_ to **omit** shared cache mode.

As far as I can tell using option `SQLITE_OMIT_SHARED_CACHE` seems to work properly when compiling from the amalgamation.

However, it's not a question of _working at runtime_. If the combination of the options `SQLITE_OMIT_SHARED_CACHE` and `SQLITE_USER_AUTHENTICATION` is used the code does not compile, because the compiler complains about the missing definition for `nTableLock` (in line 188 of `build.c`). That is, the problem exists also when building from canonical sources. The reason is simply that the use of the member `nTableLock` is not guarded by some `#ifndef SQLITE_OMIT_SHARED_CACHE` preprocessor instruction, as it most likeley should.