Alarming side effect of SQLITE_OMIT_BUILTIN_TEST: It renders the fix
[005d5b87] for ticket [da784137] useless.
Ticket: http://www.sqlite.org/src/info/da7841375186386c
Fix, trunk: http://www.sqlite.org/src/info/005d5b870625d175
Fix, 3.15.2: http://www.sqlite.org/src/info/27438fb43db4eae9
Reason is that select.c#flattenSubquery() exits early
http://www.sqlite.org/src/artifact/672b1af237ad2571?ln=3386
based on the OptimizationDisabled() macro
http://www.sqlite.org/src/artifact/c471d791b10c0f21?ln=1464-1470
However, with SQLITE_OMIT_BUILTIN_TEST #defined, OptimizationDisabled()
always results in 1 and never evaluates db->dbOptFlags. As a
consequence, selects are always flattened. This causes test
http://www.sqlite.org/src/artifact/3068f508753af698?ln=209-217
to fail if SQLite is compiled with SQLITE_OMIT_BUILTIN_TEST even with
fix [005d5b87] in place.
Side note: I notice that the SQLite binaries (Windows, at least) are not
compiled with SQLITE_OMIT_BUILTIN_TEST and not affected by the problem.
Is there a reason to omit SQLITE_OMIT_BUILTIN_TEST from the builds, as
it adds at least some overhead?
Ralf
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users