Debian Codegraph @

www/compile.html

raw
1 <!DOCTYPE html>
2 <html><head>
3 <meta name="viewport" content="width=device-width, initial-scale=1.0">
4 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
5 <link href="sqlite.css" rel="stylesheet">
6 <title>Compile-time Options</title>
7 <!-- path= -->
8 </head>
9 <body>
10 <div class=nosearch>
11 <a href="index.html">
12 <img class="logo" src="images/sqlite370_banner.gif" alt="SQLite" border="0">
13 </a>
14 <div><!-- IE hack to prevent disappearing logo --></div>
15 <div class="tagline desktoponly">
16 Small. Fast. Reliable.<br>Choose any three.
17 </div>
18 <div class="menu mainmenu">
19 <ul>
20 <li><a href="index.html">Home</a>
21 <li class='mobileonly'><a href="javascript:void(0)" onclick='toggle_div("submenu")'>Menu</a>
22 <li class='wideonly'><a href='about.html'>About</a>
23 <li class='desktoponly'><a href="docs.html">Documentation</a>
24 <li class='desktoponly'><a href="download.html">Download</a>
25 <li class='wideonly'><a href='copyright.html'>License</a>
26 <li class='desktoponly'><a href="support.html">Support</a>
27 <li class='desktoponly'><a href="prosupport.html">Purchase</a>
28 <li class='search' id='search_menubutton'>
29 <a href="javascript:void(0)" onclick='toggle_search()'>Search</a>
30 </ul>
31 </div>
32 <div class="menu submenu" id="submenu">
33 <ul>
34 <li><a href='about.html'>About</a>
35 <li><a href='docs.html'>Documentation</a>
36 <li><a href='download.html'>Download</a>
37 <li><a href='support.html'>Support</a>
38 <li><a href='prosupport.html'>Purchase</a>
39 </ul>
40 </div>
41 <div class="searchmenu" id="searchmenu">
42 <form method="GET" action="search">
43 <select name="s" id="searchtype">
44 <option value="d">Search Documentation</option>
45 <option value="c">Search Changelog</option>
46 </select>
47 <input type="text" name="q" id="searchbox" value="">
48 <input type="submit" value="Go">
49 </form>
50 </div>
51 </div>
52 <script>
53 function toggle_div(nm) {
54 var w = document.getElementById(nm);
55 if( w.style.display=="block" ){
56 w.style.display = "none";
57 }else{
58 w.style.display = "block";
59 }
60 }
61 function toggle_search() {
62 var w = document.getElementById("searchmenu");
63 if( w.style.display=="block" ){
64 w.style.display = "none";
65 } else {
66 w.style.display = "block";
67 setTimeout(function(){
68 document.getElementById("searchbox").focus()
69 }, 30);
70 }
71 }
72 function div_off(nm){document.getElementById(nm).style.display="none";}
73 window.onbeforeunload = function(e){div_off("submenu");}
74 /* Disable the Search feature if we are not operating from CGI, since */
75 /* Search is accomplished using CGI and will not work without it. */
76 if( !location.origin || !location.origin.match || !location.origin.match(/http/) ){
77 document.getElementById("search_menubutton").style.display = "none";
78 }
79 /* Used by the Hide/Show button beside syntax diagrams, to toggle the */
80 function hideorshow(btn,obj){
81 var x = document.getElementById(obj);
82 var b = document.getElementById(btn);
83 if( x.style.display!='none' ){
84 x.style.display = 'none';
85 b.innerHTML='show';
86 }else{
87 x.style.display = '';
88 b.innerHTML='hide';
89 }
90 return false;
91 }
92 var antiRobot = 0;
93 function antiRobotGo(){
94 if( antiRobot!=3 ) return;
95 antiRobot = 7;
96 var j = document.getElementById("mtimelink");
97 if(j && j.hasAttribute("data-href")) j.href=j.getAttribute("data-href");
98 }
99 function antiRobotDefense(){
100 document.body.onmousedown=function(){
101 antiRobot |= 2;
102 antiRobotGo();
103 document.body.onmousedown=null;
104 }
105 document.body.onmousemove=function(){
106 antiRobot |= 2;
107 antiRobotGo();
108 document.body.onmousemove=null;
109 }
110 setTimeout(function(){
111 antiRobot |= 1;
112 antiRobotGo();
113 }, 100)
114 antiRobotGo();
115 }
116 antiRobotDefense();
117 </script>
118 <div class=fancy>
119 <div class=nosearch>
120 <div class="fancy_title">
121 Compile-time Options
122 </div>
123 <div class="fancy_toc">
124 <a onclick="toggle_toc()">
125 <span class="fancy_toc_mark" id="toc_mk">&#x25ba;</span>
126 Table Of Contents
127 </a>
128 <div id="toc_sub"><div class="fancy-toc1"><a href="#overview">1. Overview</a></div>
129 <div class="fancy-toc1"><a href="#recommended_compile_time_options">2. Recommended Compile-time Options</a></div>
130 <div class="fancy-toc1"><a href="#_platform_configuration">3. Platform Configuration</a></div>
131 <div class="fancy-toc1"><a href="#_options_to_set_default_parameter_values">4. Options To Set Default Parameter Values</a></div>
132 <div class="fancy-toc1"><a href="#_options_to_set_size_limits">5. Options To Set Size Limits</a></div>
133 <div class="fancy-toc1"><a href="#_options_to_control_operating_characteristics">6. Options To Control Operating Characteristics</a></div>
134 <div class="fancy-toc1"><a href="#_options_to_enable_features_normally_turned_off">7. Options To Enable Features Normally Turned Off</a></div>
135 <div class="fancy-toc1"><a href="#_options_to_disable_features_normally_turned_on">8. Options To Disable Features Normally Turned On</a></div>
136 <div class="fancy-toc1"><a href="#_options_to_omit_features">9. Options To Omit Features</a></div>
137 <div class="fancy-toc1"><a href="#_analysis_and_debugging_options">10. Analysis and Debugging Options</a></div>
138 <div class="fancy-toc1"><a href="#_windows_specific_options">11. Windows-Specific Options</a></div>
139 <div class="fancy-toc1"><a href="#compiler_linkage_and_calling_convention_control">12. Compiler Linkage and Calling Convention Control</a></div>
140 </div>
141 </div>
142 <script>
143 function toggle_toc(){
144 var sub = document.getElementById("toc_sub")
145 var mk = document.getElementById("toc_mk")
146 if( sub.style.display!="block" ){
147 sub.style.display = "block";
148 mk.innerHTML = "&#x25bc;";
149 } else {
150 sub.style.display = "none";
151 mk.innerHTML = "&#x25ba;";
152 }
153 }
154 </script>
155 </div>
156
157
158
159
160
161 <h1 id="overview"><span>1. </span>Overview</h1>
162
163 <p>
164 For most purposes, SQLite can be built just fine using the default
165 compilation options. However, if required, the compile-time options
166 documented below can be used to
167 <a href="#omitfeatures">omit SQLite features</a> (resulting in
168 a <a href="footprint.html">smaller compiled library size</a>) or to change the
169 <a href="#defaults">default values</a> of some parameters.
170 </p>
171
172 <p>
173 Every effort has been made to ensure that the various combinations
174 of compilation options work harmoniously and produce a working library.
175 Nevertheless, it is strongly recommended that the SQLite test-suite
176 be executed to check for errors before using an SQLite library built
177 with non-standard compilation options.
178 </p>
179
180 <a name="rcmd"></a>
181
182
183 <h1 id="recommended_compile_time_options"><span>2. </span>Recommended Compile-time Options</h1>
184
185 <p>The following compile-time options are recommended for applications that
186 are able to use them, in order to minimized the number of CPU cycles and
187 the bytes of memory used by SQLite.
188 Not all of these compile-time options are usable by every application.
189 For example, the SQLITE_THREADSAFE=0 option is only usable by applications
190 that never access SQLite from more than one thread at a time. And the
191 SQLITE_OMIT_PROGRESS_CALLBACK option is only usable by applications that
192 do not use the <a href="c3ref/progress_handler.html">sqlite3_progress_handler()</a> interface. And so forth.
193
194 </p><p>It is impossible to test every possible combination of compile-time
195 options for SQLite. But the following set of compile-time options is
196 one configuration that is always fully tested.
197
198 </p><ol>
199 <li><p><b><a href="compile.html#dqs">SQLITE_DQS=0</a></b>.
200 This setting disables the <a href="quirks.html#dblquote">double-quoted string literal</a> misfeature.
201
202 </p></li><li><p><b><a href="compile.html#threadsafe">SQLITE_THREADSAFE=0</a></b>.
203 Setting -DSQLITE_THREADSAFE=0 causes all of the mutex and thread-safety logic
204 in SQLite to be omitted. This is the single compile-time option causes SQLite
205 to run about 2% faster and also reduces the size of the library by about 2%.
206 But the downside is that using the compile-time option means that SQLite can never
207 be used by more than a single thread at a time, even if each thread has its own
208 database connection.
209
210 </p></li><li><p><b><a href="compile.html#default_memstatus">SQLITE_DEFAULT_MEMSTATUS=0</a></b>.
211 This setting causes the <a href="c3ref/status.html">sqlite3_status()</a> interfaces that track memory usage
212 to be disabled. This helps the <a href="c3ref/free.html">sqlite3_malloc()</a> routines run much faster,
213 and since SQLite uses <a href="c3ref/free.html">sqlite3_malloc()</a> internally, this helps to make the
214 entire library faster.
215
216 </p></li><li><p><b><a href="compile.html#default_wal_synchronous">SQLITE_DEFAULT_WAL_SYNCHRONOUS=1</a></b>.
217 For maximum database safety following a power loss, the setting of
218 <a href="pragma.html#pragma_synchronous">PRAGMA synchronous=FULL</a> is recommended. However, in <a href="wal.html">WAL mode</a>, complete
219 database integrity is guaranteed with <a href="pragma.html#pragma_synchronous">PRAGMA synchronous=NORMAL</a>. With
220 <a href="pragma.html#pragma_synchronous">PRAGMA synchronous=NORMAL</a> in <a href="wal.html">WAL mode</a>, recent changes to the database might
221 be rolled back by a power loss, but the database will not be corrupted.
222 Furthermore, transaction commit is much faster in WAL mode using
223 synchronous=NORMAL than with the default synchronous=FULL. For these
224 reasons, it is recommended that the synchronous setting be changed from
225 FULL to NORMAL when switching to WAL mode. This compile-time option will
226 accomplish that.
227
228 </p></li><li><p><b><a href="compile.html#like_doesnt_match_blobs">SQLITE_LIKE_DOESNT_MATCH_BLOBS</a></b>.
229 Historically, SQLite has allowed BLOB operands to the <a href="lang_expr.html#like">LIKE</a> and <a href="lang_expr.html#glob">GLOB</a>
230 operators. But having a BLOB as an operand of <a href="lang_expr.html#like">LIKE</a> or <a href="lang_expr.html#glob">GLOB</a> complicates
231 and slows the <a href="optoverview.html#like_opt">LIKE optimization</a>. When this option is set, it means that
232 the LIKE and GLOB operators always return FALSE if either operand is a BLOB.
233 That simplifies the implementation of the <a href="optoverview.html#like_opt">LIKE optimization</a> and allows
234 queries that use the <a href="optoverview.html#like_opt">LIKE optimization</a> to run faster.
235
236 </p></li><li><p><b><a href="limits.html#max_expr_depth">SQLITE_MAX_EXPR_DEPTH=0</a></b>.
237 Setting the maximum expression parse-tree depth to zero disables all checking
238 of the expression parse-tree depth, which simplifies the code resulting in
239 faster execution, and helps the parse tree to use less memory.
240
241 </p></li><li><p><b><a href="compile.html#omit_decltype">SQLITE_OMIT_DECLTYPE</a></b>.
242 By omitting the (seldom-needed) ability to return the declared type of
243 columns from the result set of query, <a href="c3ref/stmt.html">prepared statements</a> can be made
244 to consume less memory.
245
246 </p></li><li><p><b><a href="compile.html#omit_deprecated">SQLITE_OMIT_DEPRECATED</a></b>.
247 Omitting deprecated interfaces and features will not help SQLite to
248 run any faster. It will reduce the library footprint, however. And
249 it is the right thing to do.
250
251 </p></li><li><p><b><a href="compile.html#omit_progress_callback">SQLITE_OMIT_PROGRESS_CALLBACK</a></b>.
252 The progress handler callback counter must be checked in the inner loop
253 of the <a href="opcode.html">bytecode engine</a>. By omitting this interface, a single conditional
254 is removed from the inner loop of the <a href="opcode.html">bytecode engine</a>, helping SQL statements
255 to run slightly faster.
256
257 </p></li><li><p><b><a href="compile.html#omit_shared_cache">SQLITE_OMIT_SHARED_CACHE</a></b>.
258 Omitting the possibility of using <a href="sharedcache.html">shared cache</a> allows many conditionals
259 in performance-critical sections of the code to be eliminated. This can
260 give a noticeable improvement in performance.
261
262 </p></li><li><p><b><a href="compile.html#use_alloca">SQLITE_USE_ALLOCA</a></b>.
263 Make use of alloca() for dynamically allocating temporary stack space for
264 use within a single function, on systems that support alloca(). Without
265 this option, temporary space is allocated from the heap.
266
267 </p></li><li><p><b><a href="compile.html#omit_autoinit">SQLITE_OMIT_AUTOINIT</a></b>.
268 The SQLite library needs to be initialized using a call to
269 <a href="c3ref/initialize.html">sqlite3_initialize()</a> before certain interfaces are used.
270 This initialization normally happens automatically the first time
271 it is needed. However, with the SQLITE_OMIT_AUTOINIT option, the automatic
272 initialization is omitted. This helps many API calls to run a little faster
273 (since they do not have to check to see if initialization has already occurred
274 and then run initialization if it has not previously been invoked) but it
275 also means that the application must call <a href="c3ref/initialize.html">sqlite3_initialize()</a> manually.
276 If SQLite is compiled with -DSQLITE_OMIT_AUTOINIT and a routine like
277 <a href="c3ref/free.html">sqlite3_malloc()</a> or <a href="c3ref/vfs_find.html">sqlite3_vfs_find()</a> or <a href="c3ref/open.html">sqlite3_open()</a> is invoked
278 without first calling <a href="c3ref/initialize.html">sqlite3_initialize()</a>, the likely result will be
279 a segfault.
280
281 </p></li><li><p><b><a href="compile.html#strict_subtype">SQLITE_STRICT_SUBTYPE=1</a></b>.
282 This option causes an error to be raised if an application defined
283 function that does not have the <a href="c3ref/c_deterministic.html#sqliteresultsubtype">SQLITE_RESULT_SUBTYPE</a> property
284 invokes the <a href="c3ref/result_subtype.html">sqlite3_result_subtype()</a> interface. The sqlite3_result_subtype()
285 interface does not work reliably unless the function is registered
286 with the SQLITE_RESULT_SUBTYPE property. This compile-time option
287 is designed to bring this problem to the attention of developers
288 early.
289 </p></li></ol>
290
291 <p>When all of the recommended compile-time options above are used,
292 the SQLite library will be approximately 3% smaller and use about 5% fewer
293 CPU cycles. So these options do not make a huge difference. But in
294 some design situations, every little bit helps.
295
296 </p><p>Library-level configuration options, such as those listed above,
297 may optionally be defined in a client-side header file. Defining
298 SQLITE_CUSTOM_INCLUDE=myconfig.h (with no quotes) will cause sqlite3.c
299 to include myconfig.h early on in the compilation process, enabling
300 the client to customize the flags without having to explicitly pass
301 all of them to the compiler.
302
303 <a name="osconfig"></a>
304 </p><h1 id="_platform_configuration"><span>3. </span> Platform Configuration</h1>
305
306 <a name="sqlite_config_h"></a>
307 <p><b>_HAVE_SQLITE_CONFIG_H</b></p><blockquote><p>
308 If the _HAVE_SQLITE_CONFIG_H macro is defined
309 then the SQLite source code will attempt to #include a file named "sqlite_cfg.h".
310 The "sqlite_cfg.h" file usually contains other configuration options, especially
311 "HAVE_<i>INTERFACE</i>" type options generated by autoconf scripts. Note that this
312 header is intended only for use for platform-level configuration, not library-level
313 configuration. To set SQLite-level configuration flags in a custom header, define
314 SQLITE_CUSTOM_INCLUDE=myconfig.h, as described in the previous section.
315 </p></blockquote><a name="fdatasync"></a>
316 <p><b>HAVE_FDATASYNC</b></p><blockquote><p>
317 If the HAVE_FDATASYNC compile-time option is true, then the default <a href="vfs.html">VFS</a>
318 for unix systems will attempt to use fdatasync() instead of fsync() where
319 appropriate. If this flag is missing or false, then fsync() is always used.
320 </p></blockquote><a name="gmtime_r"></a>
321 <p><b>HAVE_GMTIME_R</b></p><blockquote><p>
322 If the HAVE_GMTIME_R option is true and if <a href="compile.html#omit_datetime_funcs">SQLITE_OMIT_DATETIME_FUNCS</a> is true,
323 then the CURRENT_TIME, CURRENT_DATE, and CURRENT_TIMESTAMP keywords will use
324 the threadsafe "gmtime_r()" interface rather than "gmtime()". In the usual case
325 where <a href="compile.html#omit_datetime_funcs">SQLITE_OMIT_DATETIME_FUNCS</a> is not defined or is false, then the
326 built-in <a href="lang_datefunc.html">date and time functions</a> are used to implement the CURRENT_TIME,
327 CURRENT_DATE, and CURRENT_TIMESTAMP keywords and neither gmtime_r() nor
328 gmtime() is ever called.
329 </p></blockquote><a name="isnan"></a>
330 <p><b>HAVE_ISNAN</b></p><blockquote><p>
331 If the HAVE_ISNAN option is true, then SQLite invokes the system library isnan()
332 function to determine if a double-precision floating point value is a NaN.
333 If HAVE_ISNAN is undefined or false, then SQLite substitutes its own home-grown
334 implementation of isnan().
335 </p></blockquote><a name="localtime_r"></a>
336 <p><b>HAVE_LOCALTIME_R</b></p><blockquote><p>
337 If the HAVE_LOCALTIME_R option is true, then SQLite uses the threadsafe
338 localtime_r() library routine instead of localtime()
339 to help implement the <a href="lang_datefunc.html#localtime">localtime modifier</a>
340 to the built-in <a href="lang_datefunc.html">date and time functions</a>.
341 </p></blockquote><a name="localtime_s"></a>
342 <p><b>HAVE_LOCALTIME_S</b></p><blockquote><p>
343 If the HAVE_LOCALTIME_S option is true, then SQLite uses the threadsafe
344 localtime_s() library routine instead of localtime()
345 to help implement the <a href="lang_datefunc.html#localtime">localtime modifier</a>
346 to the built-in <a href="lang_datefunc.html">date and time functions</a>.
347 </p></blockquote><a name="malloc_usable_size"></a>
348 <p><b>HAVE_MALLOC_USABLE_SIZE</b></p><blockquote><p>
349 If the HAVE_MALLOC_USABLE_SIZE option is true, then SQLite tries uses the
350 malloc_usable_size() interface to find the size of a memory allocation obtained
351 from the standard-library malloc() or realloc() routines. This option is only
352 applicable if the standard-library malloc() is used. On Apple systems,
353 "zone malloc" is used instead, and so this option is not applicable. And, of
354 course, if the application supplies its own malloc implementation using
355 <a href="c3ref/c_config_covering_index_scan.html#sqliteconfigmalloc">SQLITE_CONFIG_MALLOC</a> then this option has no effect.
356 <p>
357 If the HAVE_MALLOC_USABLE_SIZE option is omitted or is false, then SQLite
358 uses a wrapper around system malloc() and realloc() that enlarges each allocation
359 by 8 bytes and writes the size of the allocation in the initial 8 bytes, and
360 then SQLite also implements its own home-grown version of malloc_usable_size()
361 that consults that 8-byte prefix to find the allocation size. This approach
362 works but it is suboptimal. Applications are encouraged to use
363 HAVE_MALLOC_USABLE_SIZE whenever possible.
364 </p></blockquote><a name="strchrnul"></a>
365 <p><b>HAVE_STRCHRNUL</b></p><blockquote><p>
366 If the HAVE_STRCHRNUL option is true, then SQLite uses the strchrnul() library
367 function. If this option is missing or false, then SQLite substitutes its own
368 home-grown implementation of strchrnul().
369 </p></blockquote><a name="utime"></a>
370 <p><b>HAVE_UTIME</b></p><blockquote><p>
371 If the HAVE_UTIME option is true, then the built-in but non-standard
372 "unix-dotfile" VFS will use the utime() system call, instead of utimes(),
373 to set the last access time on the lock file.
374 </p></blockquote><a name="byteorder"></a>
375 <p><b>SQLITE_BYTEORDER=<i>(0|1234|4321)</i></b></p><blockquote><p>
376 SQLite needs to know if the native byte order of the target CPU is
377 big-endian or little-ending. The SQLITE_BYTEORDER preprocessor is set
378 to 4321 for big-endian machines and 1234 for little-endian machines, or
379 it can be 0 to mean that the byte order must be determined at run-time.
380 There are #ifdefs in the code that set SQLITE_BYTEORDER automatically
381 for all common platforms and compilers. However, it may be advantageous
382 to set SQLITE_BYTEORDER appropriately when compiling SQLite for obscure
383 targets. If the target byte order cannot be determined at compile-time,
384 then SQLite falls back to doing run-time checks, which always work, though
385 with a small performance penalty.
386 </p></blockquote>
387
388 <a name="defaults"></a>
389 <h1 id="_options_to_set_default_parameter_values"><span>4. </span> Options To Set Default Parameter Values</h1>
390
391 <a name="default_automatic_index"></a>
392 <p><b>SQLITE_DEFAULT_AUTOMATIC_INDEX=<i>&lt;0 or 1&gt;</i></b></p><blockquote><p>
393 This macro determines the initial setting for <a href="pragma.html#pragma_automatic_index">PRAGMA automatic_index</a>
394 for newly opened <a href="c3ref/sqlite3.html">database connections</a>.
395 For all versions of SQLite through 3.7.17,
396 automatic indices are normally enabled for new database connections if
397 this compile-time option is omitted.
398 However, that might change in future releases of SQLite.
399 <p>See also: <a href="compile.html#omit_automatic_index">SQLITE_OMIT_AUTOMATIC_INDEX</a>
400 </p></blockquote><a name="default_autovacuum"></a>
401 <p><b>SQLITE_DEFAULT_AUTOVACUUM=<i>&lt;0 or 1 or 2&gt;</i></b></p><blockquote><p>
402 This macro determines if SQLite creates databases with the
403 <a href="pragma.html#pragma_auto_vacuum">auto_vacuum</a> flag set by default to OFF (0), FULL (1), or
404 INCREMENTAL (2). The default value is 0 meaning that databases
405 are created with auto-vacuum turned off.
406 In any case the compile-time default may be overridden by the
407 <a href="pragma.html#pragma_auto_vacuum">PRAGMA auto_vacuum</a> command.
408 </p></blockquote><a name="default_cache_size"></a>
409 <p><b>SQLITE_DEFAULT_CACHE_SIZE=<i>&lt;N&gt;</i></b></p><blockquote><p>
410 This macro sets the default maximum size of the page-cache for each attached
411 database. A positive value means that the limit is N page. If N is negative
412 that means to limit the cache size to -N*1024 bytes.
413 The suggested maximum cache size can be overridden by the
414 <a href="pragma.html#pragma_cache_size">PRAGMA cache_size</a> command. The default value is -2000, which translates
415 into a maximum of 2048000 bytes per cache.
416 </p></blockquote><a name="default_file_format"></a>
417 <p><b>SQLITE_DEFAULT_FILE_FORMAT=<i>&lt;1 or 4&gt;</i></b></p><blockquote><p>
418 The default <a href="fileformat2.html#schemaformat">schema format number</a> used by SQLite when creating
419 new database files is set by this macro. The schema formats are all
420 very similar. The difference between formats 1 and 4 is that format
421 4 understands <a href="lang_createindex.html#descidx">descending indices</a> and has a tighter encoding for
422 boolean values.</p>
423
424 <p> All versions of SQLite since 3.3.0 (2006-01-10)
425 can read and write any schema format
426 between 1 and 4. But older versions of SQLite might not be able to
427 read formats greater than 1. So that older versions of SQLite will
428 be able to read and write database files created by newer versions
429 of SQLite, the default schema format was set to 1 for SQLite versions
430 through 3.7.9 (2011-11-01). Beginning with
431 <a href="releaselog/3_7_10.html">version 3.7.10</a> (2012-01-16), the default
432 schema format is 4.</p>
433
434 <p> The schema format number for a new database can be set at runtime using
435 the <a href="pragma.html#pragma_legacy_file_format">PRAGMA legacy_file_format</a> command.
436 </p></blockquote><a name="default_file_permissions"></a>
437 <p><b>SQLITE_DEFAULT_FILE_PERMISSIONS=<i>N</i></b></p><blockquote><p>
438 The default numeric file permissions for newly created database files
439 under unix. If not specified, the default is 0644 which means that
440 the files is globally readable but only writable by the creator.
441 </p></blockquote><a name="default_foreign_keys"></a>
442 <p><b>SQLITE_DEFAULT_FOREIGN_KEYS=<i>&lt;0 or 1&gt;</i></b></p><blockquote><p>
443 This macro determines whether enforcement of
444 <a href="foreignkeys.html">foreign key constraints</a> is enabled or disabled by default for
445 new database connections. Each database connection can always turn
446 enforcement of foreign key constraints on and off and run-time using
447 the <a href="pragma.html#pragma_foreign_keys">foreign_keys pragma</a>. Enforcement of foreign key constraints
448 is normally off by default, but if this compile-time parameter is
449 set to 1, enforcement of foreign key constraints will be on by default.
450 </p></blockquote><a name="default_mmap_size"></a>
451 <p><b>SQLITE_DEFAULT_MMAP_SIZE=<i>N</i></b></p><blockquote><p>
452 This macro sets the default limit on the amount of memory that
453 will be used for memory-mapped I/O
454 for each open database file. If the <i>N</i>
455 is zero, then memory mapped I/O is disabled by default. This
456 compile-time limit and the <a href="compile.html#max_mmap_size">SQLITE_MAX_MMAP_SIZE</a> can be modified
457 at start-time using the
458 <a href="c3ref/config.html">sqlite3_config</a>(<a href="c3ref/c_config_covering_index_scan.html#sqliteconfigmmapsize">SQLITE_CONFIG_MMAP_SIZE</a>) call, or at run-time
459 using the <a href="pragma.html#pragma_mmap_size">mmap_size pragma</a>.
460 </p></blockquote><a name="default_journal_size_limit"></a>
461 <p><b>SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=<i>&lt;bytes&gt;</i></b></p><blockquote><p>
462 This option sets the size limit on <a href="lockingv3.html#rollback">rollback journal</a> files in
463 <a href="pragma.html#pragma_journal_mode">persistent journal mode</a> and
464 <a href="pragma.html#pragma_locking_mode">exclusive locking mode</a> and on the size of the
465 write-ahead log file in <a href="wal.html">WAL mode</a>. When this
466 compile-time option is omitted there is no upper bound on the
467 size of the rollback journals or write-ahead logs.
468 The journal file size limit
469 can be changed at run-time using the <a href="pragma.html#pragma_journal_size_limit">journal_size_limit pragma</a>.
470 </p></blockquote><a name="default_locking_mode"></a>
471 <p><b>SQLITE_DEFAULT_LOCKING_MODE=<i>&lt;1 or 0&gt;</i></b></p><blockquote><p>
472 If set to 1, then the default <a href="pragma.html#pragma_locking_mode">locking_mode</a> is set to EXCLUSIVE.
473 If omitted or set to 0 then the default <a href="pragma.html#pragma_locking_mode">locking_mode</a> is NORMAL.
474 </p></blockquote><a name="default_lookaside"></a>
475 <p><b>SQLITE_DEFAULT_LOOKASIDE=<i>SZ,N</i></b></p><blockquote><p>
476 Sets the default size of the <a href="malloc.html#lookaside">lookaside memory allocator</a> memory pool
477 to N entries of SZ bytes each. This setting can be modified at
478 start-time using <a href="c3ref/config.html">sqlite3_config</a>(<a href="c3ref/c_config_covering_index_scan.html#sqliteconfiglookaside">SQLITE_CONFIG_LOOKASIDE</a>) and/or
479 as each <a href="c3ref/sqlite3.html">database connection</a> is opened using
480 <a href="c3ref/db_config.html">sqlite3_db_config</a>(db, <a href="c3ref/c_dbconfig_defensive.html#sqlitedbconfiglookaside">SQLITE_DBCONFIG_LOOKASIDE</a>).
481 </p></blockquote><a name="default_memstatus"></a>
482 <p><b>SQLITE_DEFAULT_MEMSTATUS=<i>&lt;1 or 0&gt;</i></b></p><blockquote><p>
483 This macro is used to determine whether or not the features enabled and
484 disabled using the SQLITE_CONFIG_MEMSTATUS argument to <a href="c3ref/config.html">sqlite3_config()</a>
485 are available by default. The default value is 1 (<a href="c3ref/c_config_covering_index_scan.html#sqliteconfigmemstatus">SQLITE_CONFIG_MEMSTATUS</a>
486 related features enabled).
487 <p>
488 The <a href="c3ref/memory_highwater.html">sqlite3_memory_used()</a> and <a href="c3ref/memory_highwater.html">sqlite3_memory_highwater()</a> interfaces,
489 the <a href="c3ref/status.html">sqlite3_status64</a>(<a href="c3ref/c_status_malloc_count.html#sqlitestatusmemoryused">SQLITE_STATUS_MEMORY_USED</a>) interface,
490 and the <a href="compile.html#max_memory">SQLITE_MAX_MEMORY</a> compile-time option are all non-functional
491 when memory usage tracking is disabled.
492 </p></blockquote><a name="default_pcache_initsz"></a>
493 <p><b>SQLITE_DEFAULT_PCACHE_INITSZ=<i>N</i></b></p><blockquote><p>
494 This macro determines the number of pages initially allocated by the
495 page cache module when <a href="c3ref/c_config_covering_index_scan.html#sqliteconfigpagecache">SQLITE_CONFIG_PAGECACHE</a> configuration option is
496 not use and memory for the page cache is obtained from <a href="c3ref/free.html">sqlite3_malloc()</a>
497 instead. The number of pages set by this macro are allocated in a single
498 allocation, which reduces the load on the memory allocator.
499 </p></blockquote><a name="default_page_size"></a>
500 <p><b>SQLITE_DEFAULT_PAGE_SIZE=<i>&lt;bytes&gt;</i></b></p><blockquote><p>
501 This macro is used to set the default page-size used when a
502 database is created. The value assigned must be a power of 2. The
503 default value is 4096. The compile-time default may be overridden at
504 runtime by the <a href="pragma.html#pragma_page_size">PRAGMA page_size</a> command.
505 </p></blockquote><a name="default_synchronous"></a>
506 <p><b>SQLITE_DEFAULT_SYNCHRONOUS=<i>&lt;0-3&gt;</i></b></p><blockquote><p>
507 This macro determines the default value of the
508 <a href="pragma.html#pragma_synchronous">PRAGMA synchronous</a> setting. If not overridden at compile-time,
509 the default setting is 2 (FULL).
510 </p></blockquote><a name="default_wal_synchronous"></a>
511 <p><b>SQLITE_DEFAULT_WAL_SYNCHRONOUS=<i>&lt;0-3&gt;</i></b></p><blockquote><p>
512 This macro determines the default value of the
513 <a href="pragma.html#pragma_synchronous">PRAGMA synchronous</a> setting for database files that open in
514 <a href="wal.html">WAL mode</a>. If not overridden at compile-time, this value is the
515 same as <a href="compile.html#default_synchronous">SQLITE_DEFAULT_SYNCHRONOUS</a>.
516 <p>
517 If SQLITE_DEFAULT_WAL_SYNCHRONOUS differs from SQLITE_DEFAULT_SYNCHRONOUS,
518 and if the application has not modified the synchronous setting for
519 the database file using the <a href="pragma.html#pragma_synchronous">PRAGMA synchronous</a> statement, then
520 the synchronous setting is changed to value defined by
521 SQLITE_DEFAULT_WAL_SYNCHRONOUS when the database connection switches
522 into WAL mode for the first time.
523 If the SQLITE_DEFAULT_WAL_SYNCHRONOUS value is not overridden at
524 compile-time, then it will always be the same as
525 <a href="compile.html#default_synchronous">SQLITE_DEFAULT_SYNCHRONOUS</a> and so no automatic synchronous setting
526 changes will ever occur.
527 </p></blockquote><a name="default_wal_autocheckpoint"></a>
528 <p><b>SQLITE_DEFAULT_WAL_AUTOCHECKPOINT=<i>&lt;pages&gt;</i></b></p><blockquote><p>
529 This macro sets the default page count for the <a href="wal.html">WAL</a>
530 <a href="wal.html#ckpt">automatic checkpointing</a> feature. If unspecified,
531 the default page count is 1000.
532 </p></blockquote><a name="default_worker_threads"></a>
533 <p><b>SQLITE_DEFAULT_WORKER_THREADS=<i>N</i></b></p><blockquote><p>
534 This macro sets the default value for
535 the <a href="c3ref/c_limit_attached.html#sqlitelimitworkerthreads">SQLITE_LIMIT_WORKER_THREADS</a> parameter. The <a href="c3ref/c_limit_attached.html#sqlitelimitworkerthreads">SQLITE_LIMIT_WORKER_THREADS</a>
536 parameter sets the maximum number of auxiliary threads that a single
537 <a href="c3ref/stmt.html">prepared statement</a> will launch to assist it with a query. If not specified,
538 the default maximum is 0.
539 The value set here cannot be more than <a href="compile.html#max_worker_threads">SQLITE_MAX_WORKER_THREADS</a>.
540 </p></blockquote><a name="dqs"></a>
541 <p><b>SQLITE_DQS=<i>N</i></b></p><blockquote><p>
542 This macro determines the default values for
543 <a href="c3ref/c_dbconfig_defensive.html#sqlitedbconfigdqsddl">SQLITE_DBCONFIG_DQS_DDL</a> and <a href="c3ref/c_dbconfig_defensive.html#sqlitedbconfigdqsdml">SQLITE_DBCONFIG_DQS_DML</a>, which
544 in turn determine how SQLite handles each <a href="quirks.html#dblquote">double-quoted string literal</a>.
545 The "DQS" name stands for
546 "<u>D</u>ouble-<u>Q</u>uoted <u>S</u>tring".
547 The <i>N</i> argument should be an integer 0, 1, 2, or 3.
548 <blockquote><table border=1 cellpadding="0" cellspacing="0">
549 <tr><th rowspan="2">SQLITE_DQS<th colspan="2">Double-Quoted Strings Allowed
550 <th rowspan="2">Remarks
551 <tr><th>In DDL<th>In DML
552 <tr><td>3<td>yes<td>yes<td>default
553 <tr><td>2<td>yes<td>no<td>&nbsp;
554 <tr><td>1<td>no<td>yes<td>&nbsp;
555 <tr><td>0<td>no<td>no<td>recommended
556 </table></blockquote>
557 <p>The recommended setting is 0, meaning that double-quoted
558 strings are disallowed in all contexts. However, the default
559 setting is 3 for maximum compatibility with legacy applications.
560 </p></blockquote><a name="extra_durable"></a>
561 <p><b>SQLITE_EXTRA_DURABLE</b></p><blockquote><p>
562 The SQLITE_EXTRA_DURABLE compile-time option that used to cause the default
563 <a href="pragma.html#pragma_synchronous">PRAGMA synchronous</a> setting to be EXTRA, rather than FULL. This option
564 is no longer supported. Use
565 <a href="compile.html#default_synchronous">SQLITE_DEFAULT_SYNCHRONOUS=3</a> instead.
566 </p></blockquote><a name="fts3_max_expr_depth"></a>
567 <p><b>SQLITE_FTS3_MAX_EXPR_DEPTH=<i>N</i></b></p><blockquote><p>
568 This macro sets the maximum depth of the search tree that corresponds to
569 the right-hand side of the MATCH operator in an <a href="fts3.html">FTS3</a> or <a href="fts3.html#fts4">FTS4</a> full-text
570 index. The full-text search uses a recursive algorithm, so the depth of
571 the tree is limited to prevent using too much stack space. The default
572 limit is 12. This limit is sufficient for up to 4095 search terms on the
573 right-hand side of the MATCH operator and it holds stack space usage to
574 less than 2000 bytes.
575 <p>
576 For ordinary FTS3/FTS4 queries, the search tree depth is approximately
577 the base-2 logarithm of the number of terms in the right-hand side of the
578 MATCH operator. However, for <a href="fts3.html#phrase">phrase queries</a> and <a href="fts3.html#near">NEAR queries</a> the
579 search tree depth is linear in the number of right-hand side terms.
580 So the default depth limit of 12 is sufficient for up to 4095 ordinary
581 terms on a MATCH, it is only sufficient for 11 or 12 phrase or NEAR
582 terms. Even so, the default is more than enough for most application.
583 </p></blockquote><a name="json_max_depth"></a>
584 <p><b>SQLITE_JSON_MAX_DEPTH=<i>N</i></b></p><blockquote><p>
585 This macro sets the maximum nesting depth for JSON objects and arrays.
586 The default value is 1000.
587 <p>
588 The <a href="json1.html">JSON SQL functions</a> use a
589 <a href="https://en.wikipedia.org/wiki/Recursive_descent_parser">recursive decent parser</a>.
590 This means that deeply nested JSON might require a lot of stack space to
591 parse. On systems with limited stack space, SQLite can be compiled with
592 a greatly reduced maximum JSON nesting depth to avoid the possibility of
593 a stack overflow, even from hostile inputs. A value of 10 or 20 is normally
594 sufficient even for the most complex real-world JSON.
595 </p></blockquote><a name="like_doesnt_match_blobs"></a>
596 <p><b>SQLITE_LIKE_DOESNT_MATCH_BLOBS</b></p><blockquote><p>
597 This compile-time option causes the <a href="lang_expr.html#like">LIKE</a> operator to always return
598 False if either operand is a BLOB. The default behavior of <a href="lang_expr.html#like">LIKE</a>
599 is that BLOB operands are cast to TEXT before the comparison is done.
600 <p>
601 This compile-time option makes SQLite run more efficiently when processing
602 queries that use the <a href="lang_expr.html#like">LIKE</a> operator, at the expense of breaking backwards
603 compatibility. However, the backwards compatibility break may be only
604 a technicality. There was a long-standing bug in the <a href="lang_expr.html#like">LIKE</a> processing logic
605 (see <a href="https://www.sqlite.org/src/info/05f43be8fdda9f">https://www.sqlite.org/src/info/05f43be8fdda9f</a>) that caused it to
606 misbehavior for BLOB operands and nobody observed that bug in nearly
607 10 years of active use. So for more users, it is probably safe to
608 enable this compile-time option and thereby save a little CPU time
609 on LIKE queries.
610 <p>
611 This compile-time option affects the SQL <a href="lang_expr.html#like">LIKE</a> operator only and has
612 no impact on the <a href="c3ref/strlike.html">sqlite3_strlike()</a> C-language interface.
613 </p></blockquote><a name="max_memory"></a>
614 <p><b>SQLITE_MAX_MEMORY=<i>N</i></b></p><blockquote><p>
615 This option limits the total amount of memory that SQLite will request
616 from malloc() to <i>N</i> bytes. Any attempt by SQLite to allocate
617 new memory that would cause the sum of all allocations held by SQLite to exceed
618 <i>N</i> bytes will result in an out-of-memory error.
619 This is a hard upper limit. See also the <a href="c3ref/soft_heap_limit.html">sqlite3_soft_heap_limit()</a>
620 interface.
621 <p>
622 This option is a limit on the <i>total</i> amount of memory allocated.
623 See the <a href="compile.html#max_allocation_size">SQLITE_MAX_ALLOCATION_SIZE</a> option for a limitation on the amount
624 of memory allowed in any single memory allocation.
625 <p>
626 This limit is only functional if memory usage statistics are available via
627 the <a href="c3ref/memory_highwater.html">sqlite3_memory_used()</a> and <a href="c3ref/status.html">sqlite3_status64</a>(<a href="c3ref/c_status_malloc_count.html#sqlitestatusmemoryused">SQLITE_STATUS_MEMORY_USED</a>)
628 interfaces. Without that memory usage information, SQLite has no way of
629 knowing when it is about to go over the limit, and thus is unable to prevent
630 the excess memory allocation. Memory usage tracking is turned on by default,
631 but can be disabled at compile-time using the <a href="compile.html#default_memstatus">SQLITE_DEFAULT_MEMSTATUS</a> option,
632 or at start-time using <a href="c3ref/config.html">sqlite3_config</a>(<a href="c3ref/c_config_covering_index_scan.html#sqliteconfigmemstatus">SQLITE_CONFIG_MEMSTATUS</a>).
633 </p></blockquote><a name="max_mmap_size"></a>
634 <p><b>SQLITE_MAX_MMAP_SIZE=<i>N</i></b></p><blockquote><p>
635 This macro sets a hard upper bound on the amount of address space that
636 can be used by any single database for memory-mapped I/O.
637 Setting this value to 0 completely disables memory-mapped I/O and
638 causes logic associated with memory-mapped I/O to be omitted from the
639 build. This option does change the default memory-mapped I/O address
640 space size (set by <a href="compile.html#default_mmap_size">SQLITE_DEFAULT_MMAP_SIZE</a> or
641 sqlite3_config(<a href="c3ref/c_config_covering_index_scan.html#sqliteconfigmmapsize">SQLITE_CONFIG_MMAP_SIZE</a>) or the
642 run-time memory-mapped I/O address space size (set by
643 sqlite3_file_control(<a href="c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlmmapsize">SQLITE_FCNTL_MMAP_SIZE</a>) or
644 <a href="pragma.html#pragma_mmap_size">PRAGMA mmap_size</a>) as long as those other settings are less than the
645 maximum value defined here.
646 </p></blockquote><a name="max_schema_retry"></a>
647 <p><b>SQLITE_MAX_SCHEMA_RETRY=<i>N</i></b></p><blockquote><p>
648 Whenever the database schema changes, prepared statements are automatically
649 reprepared to accommodate the new schema. There is a race condition here
650 in that if one thread is constantly changing the schema, another thread
651 might spin on reparses and repreparations of a prepared statement and
652 never get any real work done. This parameter prevents an infinite loop
653 by forcing the spinning thread to give up after a fixed number of attempts
654 at recompiling the prepared statement. The default setting is 50 which is
655 more than adequate for most applications.
656 </p></blockquote><a name="max_worker_threads"></a>
657 <p><b>SQLITE_MAX_WORKER_THREADS=<i>N</i></b></p><blockquote><p>
658 Set an upper bound on the <a href="c3ref/limit.html">sqlite3_limit</a>(db,<a href="c3ref/c_limit_attached.html#sqlitelimitworkerthreads">SQLITE_LIMIT_WORKER_THREADS</a>,N)
659 setting that determines the maximum number of auxiliary threads that a single
660 <a href="c3ref/stmt.html">prepared statement</a> will use to aid with CPU-intensive computations
661 (mostly sorting). See also the <a href="compile.html#default_worker_threads">SQLITE_DEFAULT_WORKER_THREADS</a> options.
662 </p></blockquote><a name="memdb_default_maxsize"></a>
663 <p><b>SQLITE_MEMDB_DEFAULT_MAXSIZE=<i>N</i></b></p><blockquote><p>
664 Set the default size limit (in bytes) for in-memory databases created using
665 <a href="c3ref/deserialize.html">sqlite3_deserialize()</a>. This is just the default. The limit can be
666 changed at start-time using
667 <a href="c3ref/config.html">sqlite3_config</a>(<a href="c3ref/c_config_covering_index_scan.html#sqliteconfigmemdbmaxsize">SQLITE_CONFIG_MEMDB_MAXSIZE</a>,N)
668 or at run-time for individual databases using the
669 <a href="c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlsizelimit">SQLITE_FCNTL_SIZE_LIMIT</a> <a href="c3ref/file_control.html">file-control</a>.
670 If no default is specified, 1073741824 is used.
671 </p></blockquote><a name="minimum_file_descriptor"></a>
672 <p><b>SQLITE_MINIMUM_FILE_DESCRIPTOR=<i>N</i></b></p><blockquote><p>
673 The unix <a href="vfs.html">VFS</a> will never use a file descriptor less than <i>N</i>. The
674 default value of <i>N</i> is 3.
675 <p>
676 Avoiding the use of low-numbered file descriptors is a defense against
677 accidental database corruption. If a database file was opened using
678 file descriptor 2, for example, and then an assert() failed and invoked
679 write(2,...), that would likely cause database corruption by overwriting
680 part of the database file with the assertion error message. Using only
681 higher-valued file descriptors avoids this potential problem. The
682 protection against
683 using low-numbered file descriptors can be disabled by setting this
684 compile-time option to 0.
685 </p></blockquote><a name="powersafe_overwrite"></a>
686 <p><b>SQLITE_POWERSAFE_OVERWRITE=<i>&lt;0 or 1&gt;</i></b></p><blockquote><p>
687 This option changes the default assumption about <a href="psow.html">powersafe overwrite</a>
688 for the underlying filesystems for the unix and windows <a href="vfs.html">VFSes</a>.
689 Setting SQLITE_POWERSAFE_OVERWRITE to 1 causes SQLite to assume that
690 application-level writes cannot changes bytes outside the range of
691 bytes written even if the write occurs just before a power loss.
692 With SQLITE_POWERSAFE_OVERWRITE set to 0, SQLite assumes that other
693 bytes in the same sector with a written byte might be changed or
694 damaged by a power loss.
695 </p></blockquote><a name="printf_precision_limit"></a>
696 <p><b>SQLITE_PRINTF_PRECISION_LIMIT=<i>N</i></b></p><blockquote><p>
697 This option limits the maximum width and precision of substitutions
698 for the <a href="lang_corefunc.html#printf">printf() SQL function</a> and the other C-language string
699 formatting functions such as <a href="c3ref/mprintf.html">sqlite3_mprintf()</a> and
700 <a href="c3ref/str_append.html">sqlite3_str_appendf()</a>. This is turn can prevent a hostile or
701 malfunctioning script from using excessive memory by invoking
702 a format such as: "<tt>printf('%*s',2147483647,'hi')</tt>".
703 A value for <i>N</i> of around 100000 is normally sufficient.
704 <p>
705 The <a href="lang_corefunc.html#printf">printf() SQL function</a> is subject to the <a href="c3ref/c_limit_attached.html#sqlitelimitlength">SQLITE_LIMIT_LENGTH</a>
706 limit of <a href="c3ref/limit.html">sqlite3_limit()</a>. Hence any printf() result with a
707 width or precision more than the SQLITE_LIMIT_LENGTH will cause
708 an <a href="rescode.html#toobig">SQLITE_TOOBIG</a> error. However, the low-level formatting
709 for the printf() function is done by a subroutine that does not
710 have access to SQLITE_LIMIT_LENGTH. So the low-level formatting
711 is done into a memory allocation that might be considerably larger
712 than SQLITE_LIMIT_LENGTH and the SQLITE_LIMIT_LENGTH check is only
713 performed after all formatting is complete. Thus there might be a
714 transient buffer that exceeds SQLITE_LIMIT_LENGTH. The
715 SQLITE_PRINTF_PRECISION_LIMIT option is an additional check
716 that prevents excess sizes for the transient buffer used inside
717 the low-level formatting subroutine, prior to the
718 SQLITE_LIMIT_LENGTH check.
719 <p>
720 Be careful not to set SQLITE_PRINTF_PRECISION_LIMIT too low.
721 SQLite uses its <a href="printf.html">built-in printf()</a> functionality to format the text
722 of CREATE statements stored in the <a href="schematab.html">sqlite_schema table</a>. So
723 SQLITE_PRINTF_PRECISION_LIMIT should be at least as big as the largest
724 table, index, view, or trigger definition that you are likely to
725 encounter.
726 <p>
727 No error is raised if a width or precision exceeds
728 SQLITE_PRINTF_PRECISION_LIMIT. Instead, the large width or
729 precision is silently truncated.
730 <p>
731 The default value for SQLITE_PRINTF_PRECISION_LIMIT is 2147483647
732 (0x7fffffff).</p>
733
734 <p></p></blockquote><a name="query_planner_limit"></a>
735 <p><b>SQLITE_QUERY_PLANNER_LIMIT=<i>N</i></b></p><blockquote><p>
736 As part of the query planning process, SQLite enumerates all usable
737 combinations of indexes and WHERE-clause constraints. For certain
738 pathological queries, the number of these index-and-constraint combinations
739 can be very large, resulting in slow performance by the query planner.
740 The SQLITE_QUERY_PLANNER_LIMIT value (in conjunction with the
741 related <a href="compile.html#query_planner_limit_incr">SQLITE_QUERY_PLANNER_LIMIT_INCR</a> setting) limits the number
742 of index-and-constraint combinations that the query planner will
743 consider, in order to prevent the query planner from using excess
744 CPU time. The default value for SQLITE_QUERY_PLANNER_LIMIT is set
745 high enough so that is never reached for real-world queries. The
746 query planner search limit only applies to queries that are deliberately
747 crafted to use excess planning time.
748 </p></blockquote><a name="query_planner_limit_incr"></a>
749 <p><b>SQLITE_QUERY_PLANNER_LIMIT_INCR=<i>N</i></b></p><blockquote><p>
750 The <a href="compile.html#query_planner_limit">SQLITE_QUERY_PLANNER_LIMIT</a> option sets an initial baseline value
751 for the maximum number of index-and-constraint combinations that the
752 query planner consider. The baseline query planner limit is increased
753 by SQLITE_QUERY_PLANNER_LIMIT_INCR prior to processing each table of a
754 join so that each table is guaranteed to be able to propose at least
755 some index-and-constraint combinations to the optimizer even if prior
756 tables of the join have exhausted the baseline limit. The default
757 value for both this compile-time option and the
758 <a href="compile.html#query_planner_limit">SQLITE_QUERY_PLANNER_LIMIT</a> option are set high enough so that they should
759 never be reached for real-world queries.
760 </p></blockquote><a name="reverse_unordered_selects"></a>
761 <p><b>SQLITE_REVERSE_UNORDERED_SELECTS</b></p><blockquote><p>
762 This option causes the <a href="pragma.html#pragma_reverse_unordered_selects">PRAGMA reverse_unordered_selects</a> setting to be
763 enabled by default. When enabled, <a href="lang_select.html">SELECT</a> statements that lack an
764 ORDER BY clause will run in reverse order.<p>
765 This option is useful for detecting when applications (incorrectly)
766 assume that the order of rows in a SELECT without an ORDER BY clause
767 will always be the same.
768 </p></blockquote><a name="sorter_pmasz"></a>
769 <p><b>SQLITE_SORTER_PMASZ=<i>N</i></b></p><blockquote><p>
770 If multi-threaded processing is enabled via the
771 <a href="pragma.html#pragma_threads">PRAGMA threads</a> setting, then sort operations will
772 attempt to start helper threads when the amount of content
773 to be sorted exceeds the minimum of the <a href="pragma.html#pragma_cache_size">cache_size</a> and PMA Size
774 determined by the <a href="c3ref/c_config_covering_index_scan.html#sqliteconfigpmasz">SQLITE_CONFIG_PMASZ</a> start-time option.
775 This compile-time option sets the default value for the
776 <a href="c3ref/c_config_covering_index_scan.html#sqliteconfigpmasz">SQLITE_CONFIG_PMASZ</a> start-time option.
777 The default value is 250.
778 </p></blockquote><a name="stmtjrnl_spill"></a>
779 <p><b>SQLITE_STMTJRNL_SPILL=<i>N</i></b></p><blockquote><p>
780 The SQLITE_STMTJRNL_SPILL compile-time option determines the
781 default setting of the <a href="c3ref/c_config_covering_index_scan.html#sqliteconfigstmtjrnlspill">SQLITE_CONFIG_STMTJRNL_SPILL</a> start-time
782 setting. That setting determines the size threshold above which
783 <a href="tempfiles.html#stmtjrnl">statement journals</a> are moved from memory to disk.
784 </p></blockquote><a name="win32_malloc"></a>
785 <p><b>SQLITE_WIN32_MALLOC</b></p><blockquote><p>
786 This option enables the use of the Windows Heap API functions for memory
787 allocation instead of the standard library malloc() and free() routines.
788 </p></blockquote><a name="yystackdepth"></a>
789 <p><b>YYSTACKDEPTH=<i>&lt;max_depth&gt;</i></b></p><blockquote><p>
790 This macro sets the maximum depth of the LALR(1) stack used by
791 the SQL parser within SQLite. The default value is 100. A typical
792 application will use less than about 20 levels of the stack.
793 Developers whose applications contain SQL statements that
794 need more than 100 LALR(1) stack entries should seriously
795 consider refactoring their SQL as it is likely to be well beyond
796 the ability of any human to comprehend.
797 </p></blockquote>
798
799 <h1 id="_options_to_set_size_limits"><span>5. </span> Options To Set Size Limits</h1>
800
801 <p>There are compile-time options that will set upper bounds
802 on the sizes of various structures in SQLite. The compile-time
803 options normally set a hard upper bound that can be changed
804 at run-time on individual <a href="c3ref/sqlite3.html">database connections</a> using the
805 <a href="c3ref/limit.html">sqlite3_limit()</a> interface.</p>
806
807 <p>The compile-time options for setting upper bounds are
808 <a href="limits.html">documented separately</a>. The following is a list of
809 the available settings:</p>
810
811 <ul>
812 <li> <a href="limits.html#max_attached">SQLITE_MAX_ATTACHED</a> </li>
813 <li> <a href="limits.html#max_column">SQLITE_MAX_COLUMN</a> </li>
814 <li> <a href="limits.html#max_compound_select">SQLITE_MAX_COMPOUND_SELECT</a> </li>
815 <li> <a href="limits.html#max_expr_depth">SQLITE_MAX_EXPR_DEPTH</a> </li>
816 <li> <a href="limits.html#max_function_arg">SQLITE_MAX_FUNCTION_ARG</a> </li>
817 <li> <a href="limits.html#max_length">SQLITE_MAX_LENGTH</a> </li>
818 <li> <a href="limits.html#max_like_pattern_length">SQLITE_MAX_LIKE_PATTERN_LENGTH</a> </li>
819 <li> <a href="limits.html#max_page_count">SQLITE_MAX_PAGE_COUNT</a> </li>
820 <li> <a href="limits.html#max_sql_length">SQLITE_MAX_SQL_LENGTH</a> </li>
821 <li> <a href="limits.html#max_variable_number">SQLITE_MAX_VARIABLE_NUMBER</a> </li>
822 </ul>
823
824 <p>There are also some size limits that cannot be modified using
825 <a href="c3ref/limit.html">sqlite3_limit()</a>. See, for example:
826
827 </p><ul>
828 <li> <a href="compile.html#fts3_max_expr_depth">SQLITE_FTS3_MAX_EXPR_DEPTH</a> </li>
829 <li> <a href="compile.html#json_max_depth">SQLITE_JSON_MAX_DEPTH</a> </li>
830 <li> <a href="compile.html#max_allocation_size">SQLITE_MAX_ALLOCATION_SIZE</a> </li>
831 <li> <a href="compile.html#max_memory">SQLITE_MAX_MEMORY</a> </li>
832 <li> <a href="compile.html#max_mmap_size">SQLITE_MAX_MMAP_SIZE</a> </li>
833 <li> <a href="compile.html#printf_precision_limit">SQLITE_PRINTF_PRECISION_LIMIT</a> </li>
834 <li> <a href="compile.html#trace_size_limit">SQLITE_TRACE_SIZE_LIMIT</a> </li>
835 <li> <a href="compile.html#yystackdepth">YYSTACKDEPTH</a> </li>
836 </ul>
837
838 <a name="controlfeatures"></a>
839 <h1 id="_options_to_control_operating_characteristics"><span>6. </span> Options To Control Operating Characteristics</h1>
840
841 <a name="4_byte_aligned_malloc"></a>
842 <p><b>SQLITE_4_BYTE_ALIGNED_MALLOC</b></p><blockquote><p>
843 On most systems, the malloc() system call returns a buffer that is
844 aligned to an 8-byte boundary. But on some systems (ex: windows) malloc()
845 returns 4-byte aligned pointer. This compile-time option must be used
846 on systems that return 4-byte aligned pointers from malloc().
847 </p></blockquote><a name="case_sensitive_like"></a>
848 <p><b>SQLITE_CASE_SENSITIVE_LIKE</b></p><blockquote><p>
849 If this option is present, then the built-in <a href="lang_expr.html#like">LIKE</a> operator will be
850 case sensitive. This same effect can be achieved at run-time using
851 the <a href="pragma.html#pragma_case_sensitive_like">case_sensitive_like pragma</a>.
852 </p></blockquote><a name="direct_overflow_read"></a>
853 <p><b>SQLITE_DIRECT_OVERFLOW_READ</b></p><blockquote><p>
854 When this option is present, content contained in
855 <a href="fileformat2.html#ovflpgs">overflow pages</a> of the database file is read directly from disk,
856 bypassing the <a href="c3ref/pcache_methods2.html">page cache</a>, during read transactions. In applications
857 that do a lot of reads of large BLOBs or strings, this option improves
858 read performance.
859 <p>
860 As of version 3.45.0 (2024-01-15), this option is enabled by
861 default. To disable it, using -DSQLITE_DIRECT_OVERFLOW_READ=0.
862 </p></blockquote><a name="have_isnan"></a>
863 <p><b>SQLITE_HAVE_ISNAN</b></p><blockquote><p>
864 If this option is present, then SQLite will use the isnan() function from
865 the system math library. This is an alias for the <a href="compile.html#isnan">HAVE_ISNAN</a> configuration
866 option.
867 </p></blockquote><a name="max_allocation_size"></a>
868 <p><b>SQLITE_MAX_ALLOCATION_SIZE=<i>N</i></b></p><blockquote><p>
869 This compile-time option sets an upper bound on the size of memory
870 allocations that can be requested using <a href="c3ref/free.html">sqlite3_malloc64()</a>,
871 <a href="c3ref/free.html">sqlite3_realloc64()</a>, and similar. The default value is
872 2,147,483,391 (0x7ffffeff) and this should be considered an
873 upper bound. Most applications can get by with a maximum allocation
874 size of a few million bytes.
875 <p>
876 This is a limit on the maximum size of any single memory allocation.
877 It is <i>not</i> a limit on the total amount of memory allocated.
878 See <a href="compile.html#max_memory">SQLITE_MAX_MEMORY</a> for a limitation on the total amount of memory
879 allocated.
880 <p>
881 Reducing the maximum size of individual memory allocations provides
882 extra defense against denial-of-service attacks that attempt to exhaust
883 system memory by doing many large allocations. It is also an extra layer
884 of defense against application bugs where the size of a memory allocation
885 is computed using a signed 32-bit integer that could overflow &rarr;
886 with a small maximum allocation size, such buggy memory allocation size
887 computations are likely to be spotted sooner due to out-of-memory errors
888 and before the integer actually overflows.
889 </p></blockquote><a name="os_other"></a>
890 <p><b>SQLITE_OS_OTHER=<i>&lt;0 or 1&gt;</i></b></p><blockquote><p>
891 The option causes SQLite to omit its built-in operating system interfaces
892 for Unix, Windows, and OS/2. The resulting library will have no default
893 <a href="c3ref/vfs.html">operating system interface</a>. Applications must use
894 <a href="c3ref/vfs_find.html">sqlite3_vfs_register()</a> to register an appropriate interface before
895 using SQLite. Applications must also supply implementations for the
896 <a href="c3ref/initialize.html">sqlite3_os_init()</a> and <a href="c3ref/initialize.html">sqlite3_os_end()</a> interfaces. The usual practice
897 is for the supplied <a href="c3ref/initialize.html">sqlite3_os_init()</a> to invoke <a href="c3ref/vfs_find.html">sqlite3_vfs_register()</a>.
898 SQLite will automatically invoke <a href="c3ref/initialize.html">sqlite3_os_init()</a> when it initializes.</p>
899
900 <p> This option is typically used when building SQLite for an embedded
901 platform with a custom operating system.
902 </p></blockquote><a name="secure_delete"></a>
903 <p><b>SQLITE_SECURE_DELETE</b></p><blockquote><p>
904 This compile-time option changes the default setting of the
905 <a href="pragma.html#pragma_secure_delete">secure_delete pragma</a>. When this option is not used, secure_delete defaults
906 to off. When this option is present, secure_delete defaults to on.</p>
907
908 <p> The secure_delete setting causes deleted content to be overwritten with
909 zeros. There is a small performance penalty since additional I/O
910 must occur. On the other hand, secure_delete can prevent fragments of
911 sensitive information from lingering in unused parts of the database file
912 after it has been deleted. See the documentation on the
913 <a href="pragma.html#pragma_secure_delete">secure_delete pragma</a> for additional information.
914 </p></blockquote><a name="threadsafe"></a>
915 <p><b>SQLITE_THREADSAFE=<i>&lt;0 or 1 or 2&gt;</i></b></p><blockquote><p>
916 This option controls whether or not code is included in SQLite to
917 enable it to operate safely in a multithreaded environment. The
918 default is SQLITE_THREADSAFE=1 which is safe for use in a multithreaded
919 environment. When compiled with SQLITE_THREADSAFE=0 all mutexing code
920 is omitted and it is unsafe to use SQLite in a multithreaded program.
921 When compiled with SQLITE_THREADSAFE=2, SQLite can be used in a multithreaded
922 program so long as no two threads attempt to use the same
923 <a href="c3ref/sqlite3.html">database connection</a> (or any <a href="c3ref/stmt.html">prepared statements</a> derived from
924 that database connection) at the same time.</p>
925
926 <p> To put it another way, SQLITE_THREADSAFE=1 sets the default
927 <a href="threadsafe.html">threading mode</a> to Serialized. SQLITE_THREADSAFE=2 sets the default
928 <a href="threadsafe.html">threading mode</a> to Multi-threaded. And SQLITE_THREADSAFE=0 sets the
929 <a href="threadsafe.html">threading mode</a> to Single-threaded.</p>
930
931 <p> The value of SQLITE_THREADSAFE can be determined at run-time
932 using the <a href="c3ref/threadsafe.html">sqlite3_threadsafe()</a> interface.</p>
933
934 <p> When SQLite has been compiled with SQLITE_THREADSAFE=1 or
935 SQLITE_THREADSAFE=2 then the <a href="threadsafe.html">threading mode</a>
936 can be altered at run-time using the <a href="c3ref/config.html">sqlite3_config()</a> interface together
937 with one of these verbs:</p>
938
939 <p> <ul>
940 <li><a href="c3ref/c_config_covering_index_scan.html#sqliteconfigsinglethread">SQLITE_CONFIG_SINGLETHREAD</a>
941 <li><a href="c3ref/c_config_covering_index_scan.html#sqliteconfigmultithread">SQLITE_CONFIG_MULTITHREAD</a>
942 <li><a href="c3ref/c_config_covering_index_scan.html#sqliteconfigserialized">SQLITE_CONFIG_SERIALIZED</a>
943 </ul></p>
944
945 <p> The <a href="c3ref/c_open_autoproxy.html">SQLITE_OPEN_NOMUTEX</a> and
946 <a href="c3ref/c_open_autoproxy.html">SQLITE_OPEN_FULLMUTEX</a> flags to <a href="c3ref/open.html">sqlite3_open_v2()</a> can also be used
947 to adjust the <a href="threadsafe.html">threading mode</a> of individual <a href="c3ref/sqlite3.html">database connections</a>
948 at run-time.</p>
949
950 <p> Note that when SQLite is compiled with SQLITE_THREADSAFE=0, the code
951 to make SQLite threadsafe is omitted from the build. When this occurs,
952 it is impossible to change the <a href="threadsafe.html">threading mode</a> at start-time or run-time.</p>
953
954 <p> See the <a href="threadsafe.html">threading mode</a> documentation for additional information
955 on aspects of using SQLite in a multithreaded environment.
956 </p></blockquote><a name="temp_store"></a>
957 <p><b>SQLITE_TEMP_STORE=<i>&lt;0 through 3&gt;</i></b></p><blockquote><p>
958 This option controls whether temporary files are stored on disk or
959 in memory. The meanings for various settings of this compile-time
960 option are as follows:</p>
961
962 <p> <table cellpadding="2" border="1">
963 <tr><th>SQLITE_TEMP_STORE</th><th>Meaning</th></tr>
964 <tr><td align="center">0</td><td>Always use temporary files</td></tr>
965 <tr><td align="center">1</td><td>Use files by default but allow the
966 <a href="pragma.html#pragma_temp_store">PRAGMA temp_store</a> command to override</td></tr>
967 <tr><td align="center">2</td><td>Use memory by default but allow the
968 <a href="pragma.html#pragma_temp_store">PRAGMA temp_store</a> command to override</td></tr>
969 <tr><td align="center">3</td><td>Always use memory</td></tr>
970 </table></p>
971
972 <p> The default setting is 1.
973 Additional information can be found in <a href="tempfiles.html#tempstore">tempfiles.html</a>.
974 </p></blockquote><a name="trace_size_limit"></a>
975 <p><b>SQLITE_TRACE_SIZE_LIMIT=<i>N</i></b></p><blockquote><p>
976 If this macro is defined to a positive integer <i>N</i>, then the length of
977 strings and BLOB that are expanded into parameters in the output of
978 <a href="c3ref/profile.html">sqlite3_trace()</a> is limited to <i>N</i> bytes.
979 </p></blockquote><a name="trusted_schema"></a>
980 <p><b>SQLITE_TRUSTED_SCHEMA=<i>&lt;0 or 1&gt;</i></b></p><blockquote><p>
981 This macro determines the default value for the
982 <a href="c3ref/c_dbconfig_defensive.html#sqlitedbconfigtrustedschema">SQLITE_DBCONFIG_TRUSTED_SCHEMA</a> and <a href="pragma.html#pragma_trusted_schema">PRAGMA trusted_schema</a> setting.
983 If no alternative is specified, the trusted-schema setting defaults
984 to ON (a value of 1) for legacy compatibility. However, for best
985 security, systems that implement
986 <a href="appfunc.html">application-defined SQL functions</a> and/or <a href="vtab.html">virtual tables</a> should
987 consider changing the default to OFF.
988 </p></blockquote><a name="use_uri"></a>
989 <p><b>SQLITE_USE_URI</b></p><blockquote><p>
990 This option causes the <a href="uri.html">URI filename</a> process logic to be enabled by
991 default.
992 </p></blockquote>
993
994 <a name="enablefeatures"></a>
995 <h1 id="_options_to_enable_features_normally_turned_off"><span>7. </span> Options To Enable Features Normally Turned Off</h1>
996
997 <a name="allow_uri_authority"></a>
998 <p><b>SQLITE_ALLOW_URI_AUTHORITY</b></p><blockquote><p>
999 <a href="uri.html">URI filenames</a> normally throws an error if the authority section is
1000 not either empty or "localhost". However, if SQLite is compiled with
1001 the SQLITE_ALLOW_URI_AUTHORITY compile-time option, then the URI is
1002 converted into a Uniform Naming Convention (UNC) filename and passed
1003 down to the underlying operating system that way.
1004 <p>
1005 Some future versions of SQLite may change to enable this feature
1006 by default.
1007 </p></blockquote><a name="allow_covering_index_scan"></a>
1008 <p><b>SQLITE_ALLOW_COVERING_INDEX_SCAN=<i>&lt;0 or 1&gt;</i></b></p><blockquote><p>
1009 This C-preprocess macro determines the default setting of the
1010 <a href="c3ref/c_config_covering_index_scan.html#sqliteconfigcoveringindexscan">SQLITE_CONFIG_COVERING_INDEX_SCAN</a> configuration setting. It defaults
1011 to 1 (on) which means that covering indices are used for full table
1012 scans where possible, in order to reduce I/O and improve performance.
1013 However, the use of a covering index for a full scan will cause results
1014 to appear in a different order from legacy, which could cause some
1015 (incorrectly-coded) legacy applications to break. Hence, the covering
1016 index scan option can be disabled at compile-time on systems that what
1017 to minimize their risk of exposing errors in legacy applications.
1018 </p></blockquote><a name="enable_8_3_names"></a>
1019 <p><b>SQLITE_ENABLE_8_3_NAMES=<i>&lt;1 or 2&gt;</i></b></p><blockquote><p>
1020 If this C-preprocessor macro is defined, then extra code is
1021 included that allows SQLite to function on a filesystem that
1022 only support 8+3 filenames. If the value of this macro is 1,
1023 then the default behavior is to continue to use long filenames and
1024 to only use 8+3 filenames if the
1025 database connection is opened using <a href="uri.html">URI filenames</a> with
1026 the "<tt>8_3_names=1</tt>" query parameter. If the value of
1027 this macro is 2, then the use of 8+3 filenames becomes the default
1028 but may be disabled on using the <tt>8_3_names=0</tt> query parameter.
1029 </p></blockquote><a name="enable_api_armor"></a>
1030 <p><b>SQLITE_ENABLE_API_ARMOR</b></p><blockquote><p>
1031 When defined, this C-preprocessor macro activates extra code that
1032 attempts to detect misuse of the SQLite API, such as passing in NULL
1033 pointers to required parameters or using objects after they have been
1034 destroyed. When this option is enabled and an illegal API usage
1035 is detected, the interface will typically return SQLITE_MISUSE.
1036 <p>
1037 The SQLITE_ENABLE_API_ARMOR option does not guarantee that all
1038 illegal API usages will be detected. Even when
1039 SQLITE_ENABLE_API_ARMOR is enabled, passing incorrect values
1040 into the C-language APIs can cause a process crash due to segmentation
1041 fault or null-pointer deference or other reasons. The
1042 SQLITE_ENABLE_API_ARMOR compile-time option is intended as an aid
1043 for application testing and debugging option. Applications
1044 should not depend SQLITE_ENABLE_API_ARMOR for safety.
1045 SQLITE_ENABLE_API_ARMOR is appropriate as a second line of
1046 defense against application bugs, but it should not be the only
1047 defense. If any SQLite interface returns SQLITE_MISUSE, that
1048 indicates that the application is using SQLite contrary to
1049 the spec and that the application contains a bug. The SQLITE_MISUSE
1050 return provides the application with the opportunity to respond
1051 gracefully to that bug, rather than simply crashing the process or
1052 invoking undefined behavior, but nothing more. Applications should
1053 neither make use of nor depend upon SQLITE_MISUSE for routine processing.
1054 </p></blockquote><a name="enable_atomic_write"></a>
1055 <p><b>SQLITE_ENABLE_ATOMIC_WRITE</b></p><blockquote><p>
1056 If this C-preprocessor macro is defined and if the
1057 xDeviceCharacteristics method of <a href="c3ref/io_methods.html">sqlite3_io_methods</a> object for
1058 a database file reports (via one of the <a href="c3ref/c_iocap_atomic.html">SQLITE_IOCAP_ATOMIC</a> bits)
1059 that the filesystem supports atomic writes and if a transaction
1060 involves a change to only a single page of the database file,
1061 then the transaction commits with just a single write request of
1062 a single page of the database and no rollback journal is created
1063 or written. On filesystems that support atomic writes, this
1064 optimization can result in significant speed improvements for
1065 small updates. However, few filesystems support this capability
1066 and the code paths that check for this capability slow down write
1067 performance on systems that lack atomic write capability, so this
1068 feature is disabled by default.
1069 </p></blockquote><a name="enable_batch_atomic_write"></a>
1070 <p><b>SQLITE_ENABLE_BATCH_ATOMIC_WRITE</b></p><blockquote><p>
1071 This compile-time option enables SQLite to take advantage batch
1072 atomic write capabilities in the underlying filesystem. As of
1073 SQLite version 3.21.0 (2017-10-24) this is only supported on
1074 <a href="https://en.wikipedia.org/wiki/F2FS">F2FS</a>. However, the interface
1075 is implemented generically, using <a href="c3ref/file_control.html">sqlite3_file_control()</a> with
1076 <a href="c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlbeginatomicwrite">SQLITE_FCNTL_BEGIN_ATOMIC_WRITE</a> and <a href="c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlcommitatomicwrite">SQLITE_FCNTL_COMMIT_ATOMIC_WRITE</a>
1077 so the capability can be added to other filesystem times in the
1078 future. When this option is enabled, SQLite automatically detects
1079 that the underlying filesystem supports batch atomic writes, and
1080 when it does so it avoids writing the <a href="lockingv3.html#rollback">rollback journal</a> for transaction
1081 control. This can make transactions over twice as fast, while
1082 simultaneously reducing wear on SSD storage devices.
1083 <p>
1084 Future versions of SQLite might enable the batch-atomic-write
1085 capability by default, at which point this compile-time option
1086 will become superfluous.
1087 </p></blockquote><a name="enable_bytecode_vtab"></a>
1088 <p><b>SQLITE_ENABLE_BYTECODE_VTAB</b></p><blockquote><p>
1089 This option enables the <a href="bytecodevtab.html">bytecode and tables_used virtual tables</a>.
1090 </p></blockquote><a name="enable_column_metadata"></a>
1091 <p><b>SQLITE_ENABLE_COLUMN_METADATA</b></p><blockquote><p>
1092 When this C-preprocessor macro is defined, SQLite includes some
1093 additional APIs that provide convenient access to meta-data about
1094 tables and queries. The APIs that are enabled by this option are:</p>
1095
1096 <p> <ul>
1097 <li> <a href="c3ref/column_database_name.html">sqlite3_column_database_name()</a> </li>
1098 <li> <a href="c3ref/column_database_name.html">sqlite3_column_database_name16()</a> </li>
1099 <li> <a href="c3ref/column_database_name.html">sqlite3_column_table_name()</a> </li>
1100 <li> <a href="c3ref/column_database_name.html">sqlite3_column_table_name16()</a> </li>
1101 <li> <a href="c3ref/column_database_name.html">sqlite3_column_origin_name()</a> </li>
1102 <li> <a href="c3ref/column_database_name.html">sqlite3_column_origin_name16()</a> </li>
1103 </ul>
1104 </p></blockquote><a name="enable_dbpage_vtab"></a>
1105 <p><b>SQLITE_ENABLE_DBPAGE_VTAB</b></p><blockquote><p>
1106 This option enables the <a href="dbpage.html">SQLITE_DBPAGE virtual table</a>.
1107 </p></blockquote><a name="enable_dbstat_vtab"></a>
1108 <p><b>SQLITE_ENABLE_DBSTAT_VTAB</b></p><blockquote><p>
1109 This option enables the <a href="dbstat.html">dbstat virtual table</a>.
1110 </p></blockquote><a name="enable_deserialize"></a>
1111 <p><b>SQLITE_ENABLE_DESERIALIZE</b></p><blockquote><p>
1112 This option was formerly used to enable
1113 the <a href="c3ref/serialize.html">sqlite3_serialize()</a> and <a href="c3ref/deserialize.html">sqlite3_deserialize()</a>
1114 interfaces. However, as of SQLite 3.36.0 (2021-06-18)
1115 those interfaces are enabled by default and a new
1116 compile-time option <a href="compile.html#omit_deserialize">SQLITE_OMIT_DESERIALIZE</a> is added
1117 to omit them.
1118 </p></blockquote><a name="enable_explain_comments"></a>
1119 <p><b>SQLITE_ENABLE_EXPLAIN_COMMENTS</b></p><blockquote><p>
1120 This option adds extra logic to SQLite that inserts comment text into the
1121 output of <a href="lang_explain.html">EXPLAIN</a>. These extra comments use extra memory, thus
1122 making <a href="c3ref/stmt.html">prepared statements</a> larger and very slightly slower, and so they are
1123 turned off by default and in most application. But some applications, such
1124 as the <a href="cli.html">command-line shell</a> for SQLite, value clarity of EXPLAIN output
1125 over raw performance and so this compile-time option is available to them.
1126 The SQLITE_ENABLE_EXPLAIN_COMMENTS compile-time option is also enabled
1127 automatically if <a href="compile.html#debug">SQLITE_DEBUG</a> is enabled.
1128 </p></blockquote><a name="enable_fts3"></a>
1129 <p><b>SQLITE_ENABLE_FTS3</b></p><blockquote><p>
1130 When this option is defined in the <a href="amalgamation.html">amalgamation</a>, versions 3 and 4
1131 of the full-text search engine are added to the build automatically.
1132 </p></blockquote><a name="enable_fts3_parenthesis"></a>
1133 <p><b>SQLITE_ENABLE_FTS3_PARENTHESIS</b></p><blockquote><p>
1134 This option modifies the query pattern parser in FTS3 such that it
1135 supports operators AND and NOT (in addition to the usual OR and NEAR)
1136 and also allows query expressions to contain nested parenthesis.
1137 </p></blockquote><a name="enable_fts3_tokenizer"></a>
1138 <p><b>SQLITE_ENABLE_FTS3_TOKENIZER</b></p><blockquote><p>
1139 This option enables the two-argument version of the <a href="fts3.html#f3tknzr">fts3_tokenizer()</a>
1140 interface. The second argument to fts3_tokenizer() is suppose to be a
1141 pointer to a function (encoded as a BLOB) that implements an
1142 application defined tokenizer. If hostile actors are able to run
1143 the two-argument version of fts3_tokenizer() with an arbitrary second
1144 argument, they could use crash or take control of the process.
1145 <p>
1146 Because of security concerns, the two-argument fts3_tokenizer() feature
1147 was disabled beginning with <a href="releaselog/3_11_0.html">Version 3.11.0</a> (2016-02-15)
1148 unless this compile-time option is used.
1149 <a href="releaselog/3_12_0.html">Version 3.12.0</a> (2016-03-29) added the
1150 <a href="c3ref/db_config.html">sqlite3_db_config</a>(db,<a href="c3ref/c_dbconfig_defensive.html#sqlitedbconfigenablefts3tokenizer">SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER</a>,1,0) interface
1151 that activates the two-argument version of <a href="fts3.html#f3tknzr">fts3_tokenizer()</a>
1152 for a specific <a href="c3ref/sqlite3.html">database connection</a> at run-time.
1153 </p></blockquote><a name="enable_fts4"></a>
1154 <p><b>SQLITE_ENABLE_FTS4</b></p><blockquote><p>
1155 When this option is defined in the <a href="amalgamation.html">amalgamation</a>, versions 3 and 4
1156 of the full-text search engine are added to the build automatically.
1157 </p></blockquote><a name="enable_fts5"></a>
1158 <p><b>SQLITE_ENABLE_FTS5</b></p><blockquote><p>
1159 When this option is defined in the <a href="amalgamation.html">amalgamation</a>, versions 5
1160 of the full-text search engine (<a href="fts5.html">fts5</a>) is added to the build automatically.
1161 </p></blockquote><a name="enable_geopoly"></a>
1162 <p><b>SQLITE_ENABLE_GEOPOLY</b></p><blockquote><p>
1163 When this option is defined in the <a href="amalgamation.html">amalgamation</a>, the <a href="geopoly.html">Geopoly extension</a>
1164 is included in the build.
1165 </p></blockquote><a name="enable_hidden_columns"></a>
1166 <p><b>SQLITE_ENABLE_HIDDEN_COLUMNS</b></p><blockquote><p>
1167 When this option is defined in the <a href="amalgamation.html">amalgamation</a>,
1168 The <a href="vtab.html#hiddencol">hidden columns</a> feature is enabled for virtual tables.
1169 </p></blockquote><a name="enable_icu"></a>
1170 <p><b>SQLITE_ENABLE_ICU</b></p><blockquote><p>
1171 This option causes the
1172 <a href="https://icu.unicode.org">International Components for Unicode</a>
1173 or "ICU" extension to SQLite to be added to the build.
1174 </p></blockquote><a name="enable_iotrace"></a>
1175 <p><b>SQLITE_ENABLE_IOTRACE</b></p><blockquote><p>
1176 When both the SQLite core and the <a href="cli.html">Command Line Interface</a> (CLI) are both
1177 compiled with this option, then the CLI provides an extra command
1178 named ".iotrace" that provides a low-level log of I/O activity.
1179 This option is experimental and may be discontinued in a future release.
1180 </p></blockquote><a name="enable_math_functions"></a>
1181 <p><b>SQLITE_ENABLE_MATH_FUNCTIONS</b></p><blockquote><p>
1182 This macro enables the <a href="lang_mathfunc.html">built-in SQL math functions</a>. This option
1183 is automatically added to the Makefile by the configure script on unix platforms,
1184 unless the --disable-math option is used.
1185 This option is also included on Windows builds using the
1186 "Makefile.msc" makefile for nmake.
1187 </p></blockquote><a name="enable_json1"></a>
1188 <p><b>SQLITE_ENABLE_JSON1</b></p><blockquote><p>
1189 This compile-time option is a no-op. Prior to SQLite version 3.38.0
1190 (2022-02-22), it was necessary to compile with this option in order
1191 to include the <a href="json1.html">JSON SQL functions</a> in the build. However, beginning
1192 with SQLite version 3.38.0, those functions are included by default.
1193 Use the <a href="compile.html#omit_json">-DSQLITE_OMIT_JSON</a> option to omit them.
1194 </p></blockquote><a name="enable_locking_style"></a>
1195 <p><b>SQLITE_ENABLE_LOCKING_STYLE</b></p><blockquote><p>
1196 This option enables additional logic in the OS interface layer for
1197 Mac OS X. The additional logic attempts to determine the type of the
1198 underlying filesystem and choose and alternative locking strategy
1199 that works correctly for that filesystem type. Five locking strategies
1200 are available:</p>
1201
1202 <p> <ul>
1203 <li> POSIX locking style. This is the default locking style and the
1204 style used by other (non Mac OS X) Unixes. Locks are obtained and
1205 released using the fcntl() system call.</p>
1206
1207 <p> <li> AFP locking style. This locking style is used for network file
1208 systems that use the AFP (Apple Filing Protocol) protocol. Locks
1209 are obtained by calling the library function _AFPFSSetLock().</p>
1210
1211 <p> <li> Flock locking style. This is used for file-systems that do not
1212 support POSIX locking style. Locks are obtained and released using
1213 the flock() system call.</p>
1214
1215 <p> <li> Dot-file locking style. This locking style is used when neither
1216 flock nor POSIX locking styles are supported by the file system.
1217 Database locks are obtained by creating and entry in the file-system
1218 at a well-known location relative to the database file (a "dot-file")
1219 and relinquished by deleting the same file.</p>
1220
1221 <p> <li> No locking style. If none of the above can be supported, this
1222 locking style is used. No database locking mechanism is used. When
1223 this system is used it is not safe for a single database to be
1224 accessed by multiple clients.
1225 </ul></p>
1226
1227 <p> Additionally, five extra <a href="vfs.html">VFS</a> implementations are provided as well as the
1228 default. By specifying one of the extra VFS implementations
1229 when calling <a href="c3ref/open.html">sqlite3_open_v2()</a>, an application may bypass the file-system
1230 detection logic and explicitly select one of the above locking styles. The
1231 five extra <a href="vfs.html">VFS</a> implementations are called "unix-posix", "unix-afp",
1232 "unix-flock", "unix-dotfile" and "unix-none".
1233 </p></blockquote><a name="enable_memory_management"></a>
1234 <p><b>SQLITE_ENABLE_MEMORY_MANAGEMENT</b></p><blockquote><p>
1235 This option adds extra logic to SQLite that allows it to release unused
1236 memory upon request. This option must be enabled in order for the
1237 <a href="c3ref/release_memory.html">sqlite3_release_memory()</a> interface to work. If this compile-time
1238 option is not used, the <a href="c3ref/release_memory.html">sqlite3_release_memory()</a> interface is a
1239 no-op.
1240 </p></blockquote><a name="enable_memsys3"></a>
1241 <p><b>SQLITE_ENABLE_MEMSYS3</b></p><blockquote><p>
1242 This option includes code in SQLite that implements an alternative
1243 memory allocator. This alternative memory allocator is only engaged
1244 when the <a href="c3ref/c_config_covering_index_scan.html#sqliteconfigheap">SQLITE_CONFIG_HEAP</a> option to <a href="c3ref/config.html">sqlite3_config()</a> is used to
1245 supply a large chunk of memory from which all memory allocations are
1246 taken.
1247 The MEMSYS3 memory allocator uses a hybrid allocation algorithm
1248 patterned after dlmalloc(). Only one of SQLITE_ENABLE_MEMSYS3 and
1249 SQLITE_ENABLE_MEMSYS5 may be enabled at once.
1250 </p></blockquote><a name="enable_memsys5"></a>
1251 <p><b>SQLITE_ENABLE_MEMSYS5</b></p><blockquote><p>
1252 This option includes code in SQLite that implements an alternative
1253 memory allocator. This alternative memory allocator is only engaged
1254 when the <a href="c3ref/c_config_covering_index_scan.html#sqliteconfigheap">SQLITE_CONFIG_HEAP</a> option to <a href="c3ref/config.html">sqlite3_config()</a> is used to
1255 supply a large chunk of memory from which all memory allocations are
1256 taken.
1257 The MEMSYS5 module rounds all allocations up to the next power
1258 of two and uses a first-fit, buddy-allocator algorithm
1259 that provides strong guarantees against fragmentation and breakdown
1260 subject to certain operating constraints.
1261 </p></blockquote><a name="enable_normalize"></a>
1262 <p><b>SQLITE_ENABLE_NORMALIZE</b></p><blockquote><p>
1263 This option includes the <a href="c3ref/expanded_sql.html">sqlite3_normalized_sql()</a> API.
1264 </p></blockquote><a name="enable_null_trim"></a>
1265 <p><b>SQLITE_ENABLE_NULL_TRIM</b></p><blockquote><p>
1266 This option enables an optimization that omits NULL columns at
1267 the ends of rows, for a space savings on disk.
1268 <p>
1269 Databases generated with this option enabled are not readable
1270 by SQLite version 3.1.6 (2005-03-17) and earlier. Also,
1271 databases generated with this option enabled are prone to
1272 triggering the
1273 <a href="https://www.sqlite.org/src/info/e6e962d6b0f06f46e">e6e962d6b0f06f46</a>
1274 bug in the <a href="c3ref/blob_reopen.html">sqlite3_blob_reopen()</a> interface. For those reasons,
1275 this optimization is disabled by default. However, this optimization
1276 may be enabled by default in a future release of SQLite.
1277 </p></blockquote><a name="enable_offset_sql_func"></a>
1278 <p><b>SQLITE_ENABLE_OFFSET_SQL_FUNC</b></p><blockquote><p>
1279 This option enables support for the <a href="lang_corefunc.html#sqlite_offset">sqlite_offset(X)</a> SQL function.
1280 <p>
1281 The <a href="lang_corefunc.html#sqlite_offset">sqlite_offset(X)</a> SQL function requires a new interface on the
1282 B-tree storage engine, a new opcode in the <a href="opcode.html">virtual machine</a> that
1283 runs SQL statements, and a new conditional in a critical path of the
1284 code generator. To avoid that overhead in applications that do not
1285 need the utility of sqlite_offset(X), the function is disabled by
1286 default.
1287 </p></blockquote><a name="enable_preupdate_hook"></a>
1288 <p><b>SQLITE_ENABLE_PREUPDATE_HOOK</b></p><blockquote><p>
1289 This option enables
1290 <a href="c3ref/preupdate_blobwrite.html">several new APIs</a> that provide callbacks
1291 prior to any change to a <a href="rowidtable.html">rowid table</a>. The callbacks can be used
1292 to record the state of the row before the change occurs.
1293 <p>The action of the preupdate hook is similar to the
1294 <a href="c3ref/update_hook.html">update hook</a> except that the callback is
1295 invoked before the change, not afterwards, and the preupdate
1296 hook interfaces are omitted unless this compile-time option is
1297 used.
1298 <p>The preupdate hook interfaces were originally added to
1299 support the <a href="sessionintro.html">session</a> extension.
1300 </p></blockquote><a name="enable_qpsg"></a>
1301 <p><b>SQLITE_ENABLE_QPSG</b></p><blockquote><p>
1302 This option causes the <a href="queryplanner-ng.html#qpstab">query planner stability guarantee</a> (QPSG) to
1303 be on by default. Normally the QPSG is off and must be activated
1304 at run-time using the <a href="c3ref/c_dbconfig_defensive.html#sqlitedbconfigenableqpsg">SQLITE_DBCONFIG_ENABLE_QPSG</a> option to the
1305 <a href="c3ref/db_config.html">sqlite3_db_config()</a> interface.
1306 </p></blockquote><a name="enable_rbu"></a>
1307 <p><b>SQLITE_ENABLE_RBU</b></p><blockquote><p>
1308 Enable the code the implements the <a href="rbu.html">RBU extension</a>.
1309 </p></blockquote><a name="enable_rtree"></a>
1310 <p><b>SQLITE_ENABLE_RTREE</b></p><blockquote><p>
1311 This option causes SQLite to include support for the
1312 <a href="rtree.html">R*Tree index extension</a>.
1313 </p></blockquote><a name="enable_session"></a>
1314 <p><b>SQLITE_ENABLE_SESSION</b></p><blockquote><p>
1315 This option enables the <a href="sessionintro.html">session extension</a>.
1316 </p></blockquote><a name="enable_snapshot"></a>
1317 <p><b>SQLITE_ENABLE_SNAPSHOT</b></p><blockquote><p>
1318 This option enables the code to support the <a href="c3ref/snapshot.html">sqlite3_snapshot</a> object
1319 and its related interfaces:
1320 <ul>
1321 <li> <a href="c3ref/snapshot_get.html">sqlite3_snapshot_get()</a> (constructor)
1322 <li> <a href="c3ref/snapshot_free.html">sqlite3_snapshot_free()</a> (destructor)
1323 <li> <a href="c3ref/snapshot_open.html">sqlite3_snapshot_open()</a>
1324 <li> <a href="c3ref/snapshot_cmp.html">sqlite3_snapshot_cmp()</a>
1325 <li> <a href="c3ref/snapshot_recover.html">sqlite3_snapshot_recover()</a>
1326 </ul>
1327 </p></blockquote><a name="enable_sorter_references"></a>
1328 <p><b>SQLITE_ENABLE_SORTER_REFERENCES</b></p><blockquote><p>
1329 This option activates an optimization that reduces the memory required
1330 by the sorter at the cost of doing additional B-tree lookups after
1331 the sort has occurred.
1332 <p>
1333 The default sorting procedure is to gather all information that will
1334 ultimately be output into a "record" and pass that complete record
1335 to the sorter. But in some cases, for example if some of the output
1336 columns consists of large BLOB values, the size of the each record
1337 can be large, which means that the sorter has to either use more memory,
1338 and/or write more content to temporary storage.
1339 <p>
1340 When SQLITE_ENABLE_SORTER_REFERENCES is enabled, the records passed to
1341 the sorter often contain only a <a href="lang_createtable.html#rowid">ROWID</a> value. Such records are much
1342 smaller. This means the sorter has much less "payload" to deal with and
1343 can run faster. After sorting has occurred, the ROWID is used to look up
1344 the output column values in the original table. That requires another
1345 search into the table, and could potentially result in a slowdown. Or,
1346 it might be a performance win, depending on how large the values are.
1347 <p>
1348 Even when the SQLITE_ENABLE_SORTER_REFERENCES compile-time option is on,
1349 sorter references are still disabled by default. To use sorter references,
1350 the application must set a sorter reference size threshold using the
1351 <a href="c3ref/config.html">sqlite3_config</a>(<a href="c3ref/c_config_covering_index_scan.html#sqliteconfigsorterrefsize">SQLITE_CONFIG_SORTERREF_SIZE</a>) interface at start-time.
1352 <p>
1353 Because the SQLite developers do not know whether the
1354 SQLITE_ENABLE_SORTER_REFERENCES option will help or hurt performance,
1355 it is disabled by default at this time (2018-05-04). It might be enabled
1356 by default in some future release, depending on what is learned about its
1357 impact on performance.
1358 </p></blockquote><a name="enable_stmt_scanstatus"></a>
1359 <p><b>SQLITE_ENABLE_STMT_SCANSTATUS</b></p><blockquote><p>
1360 This option enables the <a href="c3ref/stmt_scanstatus.html">sqlite3_stmt_scanstatus()</a> and
1361 <a href="c3ref/stmt_scanstatus.html">sqlite3_stmt_scanstatus_v2()</a> interfaces. Those
1362 interfaces are normally omitted from the build
1363 because they imposes a performance penalty, even on statements that
1364 do not use the feature.
1365 </p></blockquote><a name="enable_stmtvtab"></a>
1366 <p><b>SQLITE_ENABLE_STMTVTAB</b></p><blockquote><p>
1367 This compile-time option enables the <a href="stmt.html">SQLITE_STMT virtual table</a> logic.
1368 </p></blockquote><a name="rtree_int_only"></a>
1369 <p><b>SQLITE_RTREE_INT_ONLY</b></p><blockquote><p>
1370 This compile-time option is deprecated and untested.
1371 </p></blockquote><a name="enable_sqllog"></a>
1372 <p><b>SQLITE_ENABLE_SQLLOG</b></p><blockquote><p>
1373 This option enables extra code (especially the <a href="c3ref/c_config_covering_index_scan.html#sqliteconfigsqllog">SQLITE_CONFIG_SQLLOG</a>
1374 option to <a href="c3ref/config.html">sqlite3_config()</a>) that can be used to create logs of all
1375 SQLite processing performed by an application. These logs can be useful
1376 in doing off-line analysis of the behavior of an application, and especially
1377 for performance analysis. In order for the SQLITE_ENABLE_SQLLOG option to
1378 be useful, some extra code is required. The
1379 <a href="https://www.sqlite.org/src/doc/trunk/src/test_sqllog.c">"test_sqllog.c"</a>
1380 source code
1381 file in the SQLite source tree is a working example of the required extra
1382 code. On unix and windows systems, a developer can append the text of the
1383 "test_sqllog.c" source code file to the end of an "sqlite3.c" amalgamation,
1384 recompile the application using the -DSQLITE_ENABLE_SQLLOG option, then
1385 control logging using environment variables. See the header comment on
1386 the "test_sqllog.c" source file for additional detail.
1387 </p></blockquote><a name="enable_stat2"></a>
1388 <p><b>SQLITE_ENABLE_STAT2</b></p><blockquote><p>
1389 This option used to cause the <a href="lang_analyze.html">ANALYZE</a> command to collect
1390 index histogram data in the <b>sqlite_stat2</b> table. But that
1391 functionality was superseded by <a href="compile.html#enable_stat3">SQLITE_ENABLE_STAT3</a> as of
1392 SQLite <a href="releaselog/3_7_9.html">version 3.7.9</a> (2011-11-01).
1393 The SQLITE_ENABLE_STAT2 compile-time option
1394 is now a no-op.
1395 </p></blockquote><a name="enable_stat3"></a>
1396 <p><b>SQLITE_ENABLE_STAT3</b></p><blockquote><p>
1397 This option used to cause the <a href="lang_analyze.html">ANALYZE</a> command to collect
1398 index histogram data in the <b>sqlite_stat3</b> table. But that
1399 functionality was superseded by <a href="compile.html#enable_stat4">SQLITE_ENABLE_STAT4</a> as of
1400 SQLite <a href="releaselog/3_8_1.html">version 3.8.1</a> (2013-10-17).
1401 The SQLITE_ENABLE_STAT3 compile-time option
1402 continued to be supported through <a href="releaselog/3_29_0.html">version 3.29.0</a> (2019-07-10)
1403 but has now become a no-op.
1404 <p>
1405 </p></blockquote><a name="enable_stat4"></a>
1406 <p><b>SQLITE_ENABLE_STAT4</b></p><blockquote><p>
1407 This option adds additional logic to the <a href="lang_analyze.html">ANALYZE</a> command and to
1408 the <a href="optoverview.html">query planner</a> that can help SQLite to chose a better query plan
1409 under certain situations. The <a href="lang_analyze.html">ANALYZE</a> command is enhanced to collect
1410 histogram data from all columns of every index and store that data
1411 in the <a href="fileformat2.html#stat4tab">sqlite_stat4</a> table. The query planner will then use the
1412 histogram data to help it make better index choices. The downside of
1413 this compile-time option is that it violates the
1414 <a href="queryplanner-ng.html#qpstab">query planner stability guarantee</a> making it more difficult to ensure
1415 consistent performance in mass-produced applications.
1416 <p>
1417 SQLITE_ENABLE_STAT4 is an enhancement of <a href="compile.html#enable_stat3">SQLITE_ENABLE_STAT3</a>. STAT3
1418 only recorded histogram data for the left-most column of each index
1419 whereas the STAT4 enhancement records histogram data from all columns
1420 of each index.
1421 The <a href="compile.html#enable_stat3">SQLITE_ENABLE_STAT3</a> compile-time option has become a no-op.
1422 </p></blockquote><a name="enable_tree_explain"></a>
1423 <p><b>SQLITE_ENABLE_TREE_EXPLAIN</b></p><blockquote><p>
1424 This compile-time option is no longer used.
1425 </p></blockquote><a name="enable_update_delete_limit"></a>
1426 <p><b>SQLITE_ENABLE_UPDATE_DELETE_LIMIT</b></p><blockquote><p>
1427 This option enables an optional ORDER BY and LIMIT clause on
1428 <a href="lang_update.html">UPDATE</a> and <a href="lang_delete.html">DELETE</a> statements.</p>
1429
1430 <p> <p>If this option is defined, then it must also be
1431 defined when using the <a href="lemon.html">Lemon parser generator</a> tool to generate a parse.c
1432 file. Because of this, this option may only be used when the library is built
1433 from source, not from the <a href="amalgamation.html">amalgamation</a> or from the collection of
1434 pre-packaged C files provided for non-Unix like platforms on the website.
1435 </p>
1436 </p></blockquote><a name="enable_unknown_sql_function"></a>
1437 <p><b>SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION</b></p><blockquote><p>
1438 When the SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION compile-time option is
1439 activated, SQLite will suppress "unknown function" errors when running
1440 an <a href="lang_explain.html">EXPLAIN</a> or <a href="eqp.html">EXPLAIN QUERY PLAN</a>. Instead of throwing an error,
1441 SQLite will insert a substitute no-op function named "unknown()".
1442 The substitution of "unknown()" in place of unrecognized functions
1443 only occurs on <a href="lang_explain.html">EXPLAIN</a> and <a href="eqp.html">EXPLAIN QUERY PLAN</a>, not on ordinary
1444 statements.
1445 <p>
1446 When used in the <a href="cli.html">command-line shell</a>, the
1447 SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION feature allows SQL text that contains
1448 application-defined functions to be pasted into the shell for
1449 analysis and debugging without having to create and load an
1450 extension that implements the application-defined functions.
1451 </p></blockquote><a name="enable_unlock_notify"></a>
1452 <p><b>SQLITE_ENABLE_UNLOCK_NOTIFY</b></p><blockquote><p>
1453 This option enables the <a href="c3ref/unlock_notify.html">sqlite3_unlock_notify()</a> interface and
1454 its associated functionality. See the documentation titled
1455 <a href="unlock_notify.html">Using the SQLite Unlock Notification Feature</a> for additional
1456 information.
1457 </p></blockquote><a name="introspection_pragmas"></a>
1458 <p><b>SQLITE_INTROSPECTION_PRAGMAS</b></p><blockquote><p>
1459 This option is obsolete. It used to enable some extra
1460 some extra PRAGMA statements such as
1461 <a href="pragma.html#pragma_function_list">PRAGMA function_list</a>, <a href="pragma.html#pragma_module_list">PRAGMA module_list</a>, and
1462 <a href="pragma.html#pragma_pragma_list">PRAGMA pragma_list</a>, but those pragmas are now all
1463 enabled by default. See <a href="compile.html#omit_introspection_pragmas">SQLITE_OMIT_INTROSPECTION_PRAGMAS</a>.
1464 </p></blockquote><a name="soundex"></a>
1465 <p><b>SQLITE_SOUNDEX</b></p><blockquote><p>
1466 This option enables the <a href="lang_corefunc.html#soundex">soundex() SQL function</a>.
1467 </p></blockquote><a name="strict_subtype"></a>
1468 <p><b>SQLITE_STRICT_SUBTYPE=1</b></p><blockquote><p>
1469 This option causes <a href="appfunc.html">application-defined SQL functions</a> to raise an SQL
1470 error if they invoke the <a href="c3ref/result_subtype.html">sqlite3_result_subtype()</a> interface but
1471 where not registered with the <a href="c3ref/c_deterministic.html#sqliteresultsubtype">SQLITE_RESULT_SUBTYPE</a> property.
1472 This recommended option helps to identify problems in the
1473 implementation of application-defined SQL functions early in the
1474 development cycle.
1475 </p></blockquote><a name="use_alloca"></a>
1476 <p><b>SQLITE_USE_ALLOCA</b></p><blockquote><p>
1477 If this option is enabled, then the alloca() memory allocator will be
1478 used in a few situations where it is appropriate. This results in a slightly
1479 smaller and faster binary. The SQLITE_USE_ALLOCA compile-time only
1480 works, of course, on systems that support alloca().
1481 </p></blockquote><a name="use_fcntl_trace"></a>
1482 <p><b>SQLITE_USE_FCNTL_TRACE</b></p><blockquote><p>
1483 This option causes SQLite to issue extra <a href="c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntltrace">SQLITE_FCNTL_TRACE</a> file controls
1484 to provide supplementary information to the VFS. The "vfslog.c" extension
1485 makes use of this to provide enhanced logs of VFS activity.
1486 </p></blockquote><a name="use_seh"></a>
1487 <p><b>SQLITE_USE_SEH</b></p><blockquote><p>
1488 This option used to be a toggle to enable what is now controlled
1489 by <a href="compile.html#omit_seh">SQLITE_OMIT_SEH</a>. Client code should not use this define,
1490 as it is used internally by the library.
1491 </p></blockquote><a name="have_zlib"></a>
1492 <p><b>SQLITE_HAVE_ZLIB</b></p><blockquote><p>
1493 This option causes some extensions to link against the
1494 <a href="https://zlib.net">zlib compression library</a>.
1495 <p>
1496 This option has no effect on the SQLite core. It is only used by extensions.
1497 This is option is necessary for the compression and decompression
1498 functions that are part of <a href="sqlar.html">SQL Archive</a> support in the
1499 <a href="cli.html">command-line shell</a>.
1500 <p>
1501 When compiling with this option, it will normally
1502 be necessary to add a linker option to include the zlib library in the
1503 build. Normal this option is "-lz" but might be different on different
1504 systems.
1505 <p>
1506 When building with MSVC on Windows systems, one can put the zlib source
1507 code in the compat/zlib subdirectory of the source tree and then add
1508 the USE_ZLIB=1 option to the nmake command to cause the Makefile.msc
1509 to automatically build and use an appropriate zlib library implementation.
1510 </p></blockquote><a name="yytrackmaxstackdepth"></a>
1511 <p><b>YYTRACKMAXSTACKDEPTH</b></p><blockquote><p>
1512 This option causes the LALR(1) parser stack depth to be tracked
1513 and reported using the <a href="c3ref/status.html">sqlite3_status</a>(<a href="c3ref/c_status_malloc_count.html#sqlitestatusparserstack">SQLITE_STATUS_PARSER_STACK</a>,...)
1514 interface. SQLite's LALR(1) parser has a fixed stack depth
1515 (determined at compile-time using the <a href="compile.html#yystackdepth">YYSTACKDEPTH</a> options).
1516 This option can be used to help determine if an application is
1517 getting close to exceeding the maximum LALR(1) stack depth.
1518 </p></blockquote>
1519
1520 <a name="disablefeatures"></a>
1521 <h1 id="_options_to_disable_features_normally_turned_on"><span>8. </span> Options To Disable Features Normally Turned On</h1>
1522
1523 <a name="disable_lfs"></a>
1524 <p><b>SQLITE_DISABLE_LFS</b></p><blockquote><p>
1525 If this C-preprocessor macro is defined, large file support
1526 is disabled.
1527 </p></blockquote><a name="disable_dirsync"></a>
1528 <p><b>SQLITE_DISABLE_DIRSYNC</b></p><blockquote><p>
1529 If this C-preprocessor macro is defined, directory syncs
1530 are disabled. SQLite typically attempts to sync the parent
1531 directory when a file is deleted to ensure the directory
1532 entries are updated immediately on disk.
1533 </p></blockquote><a name="disable_fts3_unicode"></a>
1534 <p><b>SQLITE_DISABLE_FTS3_UNICODE</b></p><blockquote><p>
1535 If this C-preprocessor macro is defined, the <a href="fts3.html#unicode61">unicode61</a> tokenizer
1536 in <a href="fts3.html">FTS3</a> is omitted from the build and is unavailable to
1537 applications.
1538 </p></blockquote><a name="disable_fts4_deferred"></a>
1539 <p><b>SQLITE_DISABLE_FTS4_DEFERRED</b></p><blockquote><p>
1540 If this C-preprocessor macro disables the "deferred token" optimization
1541 in <a href="fts3.html#fts4">FTS4</a>. The "deferred token" optimization avoids loading massive
1542 posting lists for terms that are in most documents of the collection
1543 and instead simply scans for those tokens in the document source. <a href="fts3.html#fts4">FTS4</a>
1544 should get exactly the same answer both with and without this optimization.
1545 </p></blockquote><a name="disable_intrinsic"></a>
1546 <p><b>SQLITE_DISABLE_INTRINSIC</b></p><blockquote><p>
1547 This option disables the use of compiler-specific built-in functions
1548 such as __builtin_bswap32() and __builtin_add_overflow() in GCC and Clang,
1549 or _byteswap_ulong() and _ReadWriteBarrier() with MSVC.
1550 </p></blockquote><a name="disable_pagecache_overflow_stats"></a>
1551 <p><b>SQLITE_DISABLE_PAGECACHE_OVERFLOW_STATS</b></p><blockquote><p>
1552 This option disables the collection of the <a href="c3ref/status.html">sqlite3_status()</a>
1553 <a href="c3ref/c_status_malloc_count.html#sqlitestatuspagecacheoverflow">SQLITE_STATUS_PAGECACHE_OVERFLOW</a> and <a href="c3ref/c_status_malloc_count.html#sqlitestatuspagecachesize">SQLITE_STATUS_PAGECACHE_SIZE</a>
1554 statistics. Setting this option has been shown to increase performance in
1555 high concurrency multi-threaded applications.
1556 </p></blockquote>
1557
1558 <a name="omitfeatures"></a>
1559
1560 <h1 id="_options_to_omit_features"><span>9. </span> Options To Omit Features</h1>
1561
1562 <p>The following options can be used to
1563 <a href="footprint.html">reduce the size of the compiled library</a>
1564 by omitting unused features. This is probably only useful
1565 in embedded systems where space is especially tight, as even with all
1566 features included the SQLite library is relatively small. Don't forget
1567 to tell your compiler to optimize for binary size! (the -Os option if
1568 using GCC). Telling your compiler to optimize for size usually has
1569 a much larger impact on library footprint than employing any of these
1570 compile-time options. You should also verify that
1571 <a href="#debugoptions">debugging options</a> are disabled.</p>
1572
1573 <p>The macros in this section do not require values. The following
1574 compilation switches all have the same effect:<br>
1575 -DSQLITE_OMIT_ALTERTABLE<br>
1576 -DSQLITE_OMIT_ALTERTABLE=1<br>
1577 -DSQLITE_OMIT_ALTERTABLE=0
1578 </p>
1579
1580 <p>If any of these options are defined, then the same set of SQLITE_OMIT_*
1581 options must also be defined when using the <a href="lemon.html">Lemon parser generator</a>
1582 tool to generate the
1583 parse.c file and when compiling the 'mkkeywordhash' tool which generates
1584 the keywordhash.h file.
1585 Because of this, these options may only be used when the library is built
1586 from canonical source, not from the <a href="amalgamation.html">amalgamation</a>.
1587 Some SQLITE_OMIT_* options might work, or appear to work, when used with
1588 the <a href="amalgamation.html">amalgamation</a>. But this is not guaranteed. In general, always compile
1589 from canonical sources in order to take advantage of SQLITE_OMIT_* options.
1590 </p>
1591
1592 <blockquote>
1593 <i><b>Important Note:</b> The SQLITE_OMIT_* options may not work with the
1594 <a href="amalgamation.html">amalgamation</a>. SQLITE_OMIT_* compile-time
1595 options usually work correctly only when SQLite is built from canonical
1596 source files.
1597 </i>
1598 </blockquote>
1599
1600
1601 <p>Special versions of the SQLite amalgamation that do work with a
1602 predetermined set of SQLITE_OMIT_* options can be generated. To do so,
1603 make a copy of the Makefile.linux-gcc makefile template in the canonical
1604 source code distribution. Change the name of your copy to simply "Makefile".
1605 Then edit "Makefile" to set up appropriate compile-time options. Then
1606 type:
1607 </p><div class="codeblock"><pre>make clean; make sqlite3.c
1608 </pre></div>
1609 <p>The resulting "sqlite3.c" amalgamation code file (and its associated
1610 header file "sqlite3.h") can then be moved to a non-unix platform
1611 for final compilation using a native compiler.</p>
1612
1613 <p>The SQLITE_OMIT_* options are unsupported. By this we mean that
1614 an SQLITE_OMIT_* option that omits code from the build in the current
1615 release might become a no-op in the next release. Or the other way around:
1616 an SQLITE_OMIT_* that is a no-op in the current release might cause code
1617 to be excluded in the next release. Also, not all SQLITE_OMIT_* options
1618 are tested. Some SQLITE_OMIT_* options might cause SQLite to malfunction
1619 and/or provide incorrect answers.
1620
1621 </p><blockquote>
1622 <i><b>Important Note:</b>
1623 The SQLITE_OMIT_* compile-time options are mostly unsupported.
1624 </i></blockquote>
1625
1626 <p>The following are the available OMIT options:
1627
1628 <a name="omit_altertable"></a>
1629 <p><b>SQLITE_OMIT_ALTERTABLE</b></p><blockquote><p>
1630 When this option is defined, the
1631 <a href="lang_altertable.html">ALTER TABLE</a> command is not included in the
1632 library. Executing an <a href="lang_altertable.html">ALTER TABLE</a> statement causes a parse error.
1633 </p></blockquote><a name="omit_analyze"></a>
1634 <p><b>SQLITE_OMIT_ANALYZE</b></p><blockquote><p>
1635 When this option is defined, the <a href="lang_analyze.html">ANALYZE</a> command is omitted from
1636 the build.
1637 </p></blockquote><a name="omit_attach"></a>
1638 <p><b>SQLITE_OMIT_ATTACH</b></p><blockquote><p>
1639 When this option is defined, the <a href="lang_attach.html">ATTACH</a> and <a href="lang_detach.html">DETACH</a> commands are
1640 omitted from the build.
1641 </p></blockquote><a name="omit_authorization"></a>
1642 <p><b>SQLITE_OMIT_AUTHORIZATION</b></p><blockquote><p>
1643 Defining this option omits the authorization callback feature from the
1644 library. The <a href="c3ref/set_authorizer.html">sqlite3_set_authorizer()</a> API function is not present
1645 in the library.
1646 </p></blockquote><a name="omit_autoincrement"></a>
1647 <p><b>SQLITE_OMIT_AUTOINCREMENT</b></p><blockquote><p>
1648 This option is omits the <a href="autoinc.html">AUTOINCREMENT</a> feature.
1649 When this is macro is defined, columns declared as
1650 "<a href="lang_createtable.html#rowid">INTEGER PRIMARY KEY</a> AUTOINCREMENT"
1651 behave in the same way as columns declared as "<a href="lang_createtable.html#rowid">INTEGER PRIMARY KEY</a>" when a
1652 NULL is inserted. The sqlite_sequence system table is neither created, nor
1653 respected if it already exists.
1654 </p></blockquote><a name="omit_autoinit"></a>
1655 <p><b>SQLITE_OMIT_AUTOINIT</b></p><blockquote><p>
1656 For backwards compatibility with older versions of SQLite that lack
1657 the <a href="c3ref/initialize.html">sqlite3_initialize()</a> interface, the <a href="c3ref/initialize.html">sqlite3_initialize()</a> interface
1658 is called automatically upon entry to certain key interfaces such as
1659 <a href="c3ref/open.html">sqlite3_open()</a>, <a href="c3ref/vfs_find.html">sqlite3_vfs_register()</a>, and <a href="c3ref/mprintf.html">sqlite3_mprintf()</a>.
1660 The overhead of invoking <a href="c3ref/initialize.html">sqlite3_initialize()</a> automatically in this
1661 way may be omitted by building SQLite with the SQLITE_OMIT_AUTOINIT
1662 C-preprocessor macro. When built using SQLITE_OMIT_AUTOINIT, SQLite
1663 will not automatically initialize itself and the application is required
1664 to invoke <a href="c3ref/initialize.html">sqlite3_initialize()</a> directly prior to beginning use of the
1665 SQLite library.
1666 </p></blockquote><a name="omit_automatic_index"></a>
1667 <p><b>SQLITE_OMIT_AUTOMATIC_INDEX</b></p><blockquote><p>
1668 This option is used to omit the
1669 <a href="optoverview.html#autoindex">automatic indexing</a> functionality.
1670 See also: <a href="compile.html#default_automatic_index">SQLITE_DEFAULT_AUTOMATIC_INDEX</a>.
1671 </p></blockquote><a name="omit_autoreset"></a>
1672 <p><b>SQLITE_OMIT_AUTORESET</b></p><blockquote><p>
1673 By default, the <a href="c3ref/step.html">sqlite3_step()</a> interface will automatically invoke
1674 <a href="c3ref/reset.html">sqlite3_reset()</a> to reset the <a href="c3ref/stmt.html">prepared statement</a> if necessary. This
1675 compile-time option changes that behavior so that <a href="c3ref/step.html">sqlite3_step()</a> will
1676 return <a href="rescode.html#misuse">SQLITE_MISUSE</a> if it called again after returning anything other
1677 than <a href="rescode.html#row">SQLITE_ROW</a>, <a href="rescode.html#busy">SQLITE_BUSY</a>, or <a href="rescode.html#locked">SQLITE_LOCKED</a> unless there was an
1678 intervening call to <a href="c3ref/reset.html">sqlite3_reset()</a>.</p>
1679
1680 <p> In SQLite <a href="releaselog/3_6_23_1.html">version 3.6.23.1</a> (2010-03-26)
1681 and earlier, <a href="c3ref/step.html">sqlite3_step()</a> used to always
1682 return <a href="rescode.html#misuse">SQLITE_MISUSE</a> if it was invoked again after returning anything
1683 other than <a href="rescode.html#row">SQLITE_ROW</a> without an intervening call to <a href="c3ref/reset.html">sqlite3_reset()</a>.
1684 This caused problems on some poorly written smartphone applications which
1685 did not correctly handle the <a href="rescode.html#locked">SQLITE_LOCKED</a> and <a href="rescode.html#busy">SQLITE_BUSY</a> error
1686 returns. Rather than fix the many defective smartphone applications,
1687 the behavior of SQLite was changed in 3.6.23.2 to automatically reset
1688 the prepared statement. But that changed caused issues in other
1689 improperly implemented applications that were actually looking
1690 for an <a href="rescode.html#misuse">SQLITE_MISUSE</a> return to terminate their query loops. (Anytime
1691 an application gets an SQLITE_MISUSE error code from SQLite, that means the
1692 application is misusing the SQLite interface and is thus incorrectly
1693 implemented.) The SQLITE_OMIT_AUTORESET interface was added to SQLite
1694 <a href="releaselog/3_7_5.html">version 3.7.5</a> (2011-02-01) in an effort to get all of the (broken)
1695 applications to work again without having to actually fix the applications.
1696 </p></blockquote><a name="omit_autovacuum"></a>
1697 <p><b>SQLITE_OMIT_AUTOVACUUM</b></p><blockquote><p>
1698 If this option is defined, the library cannot create or write to
1699 databases that support <a href="pragma.html#pragma_auto_vacuum">auto_vacuum</a>.
1700 Executing a <a href="pragma.html#pragma_auto_vacuum">PRAGMA auto_vacuum</a> statement is not an error
1701 (since unknown PRAGMAs are silently ignored), but does not return a value
1702 or modify the auto-vacuum flag in the database file. If a database that
1703 supports auto-vacuum is opened by a library compiled with this option, it
1704 is automatically opened in read-only mode.
1705 </p></blockquote><a name="omit_between_optimization"></a>
1706 <p><b>SQLITE_OMIT_BETWEEN_OPTIMIZATION</b></p><blockquote><p>
1707 This option disables the use of indices with WHERE clause terms
1708 that employ the BETWEEN operator.
1709 </p></blockquote><a name="omit_blob_literal"></a>
1710 <p><b>SQLITE_OMIT_BLOB_LITERAL</b></p><blockquote><p>
1711 When this option is defined, it is not possible to specify a blob in
1712 an SQL statement using the X'ABCD' syntax.
1713 </p></blockquote><a name="omit_btreecount"></a>
1714 <p><b>SQLITE_OMIT_BTREECOUNT</b></p><blockquote><p>
1715 This option is no longer used for anything. It is a no-op.
1716 </p></blockquote><a name="omit_builtin_test"></a>
1717 <p><b>SQLITE_OMIT_BUILTIN_TEST</b></p><blockquote><p>
1718 This compile-time option has been renamed to <a href="compile.html#untestable">SQLITE_UNTESTABLE</a>.
1719 </p></blockquote><a name="omit_case_sensitive_like_pragma"></a>
1720 <p><b>SQLITE_OMIT_CASE_SENSITIVE_LIKE_PRAGMA</b></p><blockquote><p>
1721 This compile-time option disables the <a href="pragma.html#pragma_case_sensitive_like">PRAGMA case_sensitive_like</a>
1722 command.
1723 </p></blockquote><a name="omit_cast"></a>
1724 <p><b>SQLITE_OMIT_CAST</b></p><blockquote><p>
1725 This option causes SQLite to omit support for the CAST operator.
1726 </p></blockquote><a name="omit_check"></a>
1727 <p><b>SQLITE_OMIT_CHECK</b></p><blockquote><p>
1728 This option causes SQLite to omit support for CHECK constraints.
1729 The parser will still accept CHECK constraints in SQL statements,
1730 they will just not be enforced.
1731 </p></blockquote><a name="omit_compileoption_diags"></a>
1732 <p><b>SQLITE_OMIT_COMPILEOPTION_DIAGS</b></p><blockquote><p>
1733 This option is used to omit the compile-time option diagnostics available
1734 in SQLite, including the <a href="c3ref/compileoption_get.html">sqlite3_compileoption_used()</a> and
1735 <a href="c3ref/compileoption_get.html">sqlite3_compileoption_get()</a> C/C++ functions, the
1736 <a href="lang_corefunc.html#sqlite_compileoption_used">sqlite_compileoption_used()</a> and <a href="lang_corefunc.html#sqlite_compileoption_get">sqlite_compileoption_get()</a> SQL functions,
1737 and the <a href="pragma.html#pragma_compile_options">compile_options pragma</a>.
1738 </p></blockquote><a name="omit_complete"></a>
1739 <p><b>SQLITE_OMIT_COMPLETE</b></p><blockquote><p>
1740 This option causes the <a href="c3ref/complete.html">sqlite3_complete()</a> and <a href="c3ref/complete.html">sqlite3_complete16()</a>
1741 interfaces to be omitted.
1742 </p></blockquote><a name="omit_compound_select"></a>
1743 <p><b>SQLITE_OMIT_COMPOUND_SELECT</b></p><blockquote><p>
1744 This option is used to omit the compound <a href="lang_select.html">SELECT</a> functionality.
1745 <a href="lang_select.html">SELECT</a> statements that use the
1746 UNION, UNION ALL, INTERSECT or EXCEPT compound SELECT operators will
1747 cause a parse error.</p>
1748
1749 <p> An <a href="lang_insert.html">INSERT</a> statement with multiple values in the VALUES clause is
1750 implemented internally as a compound SELECT. Hence, this option also
1751 disables the ability to insert more than a single row using an
1752 INSERT INTO ... VALUES ... statement.
1753 </p></blockquote><a name="omit_cte"></a>
1754 <p><b>SQLITE_OMIT_CTE</b></p><blockquote><p>
1755 This option causes support for <a href="lang_with.html">common table expressions</a> to be omitted.
1756 </p></blockquote><a name="omit_datetime_funcs"></a>
1757 <p><b>SQLITE_OMIT_DATETIME_FUNCS</b></p><blockquote><p>
1758 If this option is defined, SQLite's built-in date and time manipulation
1759 functions are omitted. Specifically, the SQL functions julianday(), date(),
1760 time(), datetime() and strftime() are not available. The default column
1761 values CURRENT_TIME, CURRENT_DATE and CURRENT_TIMESTAMP are still available.
1762 </p></blockquote><a name="omit_decltype"></a>
1763 <p><b>SQLITE_OMIT_DECLTYPE</b></p><blockquote><p>
1764 This option causes SQLite to omit support for the
1765 <a href="c3ref/column_decltype.html">sqlite3_column_decltype()</a> and <a href="c3ref/column_decltype.html">sqlite3_column_decltype16()</a>
1766 interfaces.
1767 </p></blockquote><a name="omit_deprecated"></a>
1768 <p><b>SQLITE_OMIT_DEPRECATED</b></p><blockquote><p>
1769 This option causes SQLite to omit support for interfaces
1770 marked as deprecated. This includes
1771 <a href="c3ref/aggregate_count.html">sqlite3_aggregate_count()</a>,
1772 <a href="c3ref/aggregate_count.html">sqlite3_expired()</a>,
1773 <a href="c3ref/aggregate_count.html">sqlite3_transfer_bindings()</a>,
1774 <a href="c3ref/aggregate_count.html">sqlite3_global_recover()</a>,
1775 <a href="c3ref/aggregate_count.html">sqlite3_thread_cleanup()</a> and
1776 <a href="c3ref/aggregate_count.html">sqlite3_memory_alarm()</a> interfaces and
1777 <a href="pragma.html#syntax">PRAGMA</a> statements <a href="pragma.html#pragma_count_changes">PRAGMA count_changes</a>,
1778 <a href="pragma.html#pragma_data_store_directory">PRAGMA data_store_directory</a>,
1779 <a href="pragma.html#pragma_default_cache_size">PRAGMA default_cache_size</a>,
1780 <a href="pragma.html#pragma_empty_result_callbacks">PRAGMA empty_result_callbacks</a>,
1781 <a href="pragma.html#pragma_full_column_names">PRAGMA full_column_names</a>,
1782 <a href="pragma.html#pragma_short_column_names">PRAGMA short_column_names</a>, and
1783 <a href="pragma.html#pragma_temp_store_directory">PRAGMA temp_store_directory</a>.
1784 </p></blockquote><a name="omit_deserialize"></a>
1785 <p><b>SQLITE_OMIT_DESERIALIZE</b></p><blockquote><p>
1786 This option causes the
1787 <a href="c3ref/serialize.html">sqlite3_serialize()</a> and <a href="c3ref/deserialize.html">sqlite3_deserialize()</a>
1788 interfaces to be omitted from the build.
1789 </p></blockquote><a name="omit_diskio"></a>
1790 <p><b>SQLITE_OMIT_DISKIO</b></p><blockquote><p>
1791 This option omits all support for writing to the disk and forces
1792 databases to exist in memory only. This option has not been
1793 maintained and probably does not work with newer versions of SQLite.
1794 </p></blockquote><a name="omit_explain"></a>
1795 <p><b>SQLITE_OMIT_EXPLAIN</b></p><blockquote><p>
1796 Defining this option causes the <a href="lang_explain.html">EXPLAIN</a> command to be omitted from the
1797 library. Attempting to execute an <a href="lang_explain.html">EXPLAIN</a> statement will cause a parse
1798 error.
1799 </p></blockquote><a name="omit_flag_pragmas"></a>
1800 <p><b>SQLITE_OMIT_FLAG_PRAGMAS</b></p><blockquote><p>
1801 This option omits support for a subset of <a href="pragma.html#syntax">PRAGMA</a> commands that
1802 query and set boolean properties.
1803 </p></blockquote><a name="omit_floating_point"></a>
1804 <p><b>SQLITE_OMIT_FLOATING_POINT</b></p><blockquote><p>
1805 This option is used to omit floating-point number support from the SQLite
1806 library. When specified, specifying a floating point number as a literal
1807 (i.e. "1.01") results in a parse error.</p>
1808
1809 <p> <p>In the future, this option may also disable other floating point
1810 functionality, for example the <a href="c3ref/result_blob.html">sqlite3_result_double()</a>,
1811 <a href="c3ref/bind_blob.html">sqlite3_bind_double()</a>, <a href="c3ref/value_blob.html">sqlite3_value_double()</a> and
1812 <a href="c3ref/column_blob.html">sqlite3_column_double()</a> API functions.
1813 </p>
1814 </p></blockquote><a name="omit_foreign_key"></a>
1815 <p><b>SQLITE_OMIT_FOREIGN_KEY</b></p><blockquote><p>
1816 If this option is defined, then <a href="foreignkeys.html">foreign key constraint</a> syntax is
1817 not recognized.
1818 </p></blockquote><a name="omit_generated_columns"></a>
1819 <p><b>SQLITE_OMIT_GENERATED_COLUMNS</b></p><blockquote><p>
1820 If this option is defined, then <a href="gencol.html">generated column</a> syntax is
1821 not recognized.
1822 </p></blockquote><a name="omit_get_table"></a>
1823 <p><b>SQLITE_OMIT_GET_TABLE</b></p><blockquote><p>
1824 This option causes support for <a href="c3ref/free_table.html">sqlite3_get_table()</a> and
1825 <a href="c3ref/free_table.html">sqlite3_free_table()</a> to be omitted.
1826 </p></blockquote><a name="omit_hex_integer"></a>
1827 <p><b>SQLITE_OMIT_HEX_INTEGER</b></p><blockquote><p>
1828 This option omits support for <a href="lang_expr.html#hexint">hexadecimal integer literals</a>.
1829 </p></blockquote><a name="omit_incrblob"></a>
1830 <p><b>SQLITE_OMIT_INCRBLOB</b></p><blockquote><p>
1831 This option causes support for <a href="c3ref/blob.html">incremental BLOB I/O</a>
1832 to be omitted.
1833 </p></blockquote><a name="omit_integrity_check"></a>
1834 <p><b>SQLITE_OMIT_INTEGRITY_CHECK</b></p><blockquote><p>
1835 This option omits support for the <a href="pragma.html#pragma_integrity_check">integrity_check pragma</a>.
1836 </p></blockquote><a name="omit_introspection_pragmas"></a>
1837 <p><b>SQLITE_OMIT_INTROSPECTION_PRAGMAS</b></p><blockquote><p>
1838 This option omits support for
1839 <a href="pragma.html#pragma_function_list">PRAGMA function_list</a>, <a href="pragma.html#pragma_module_list">PRAGMA module_list</a>, and
1840 <a href="pragma.html#pragma_pragma_list">PRAGMA pragma_list</a>.
1841 </p></blockquote><a name="omit_json"></a>
1842 <p><b>SQLITE_OMIT_JSON</b></p><blockquote><p>
1843 This option omits the <a href="json1.html">JSON SQL functions</a> from the build.
1844 </p></blockquote><a name="omit_like_optimization"></a>
1845 <p><b>SQLITE_OMIT_LIKE_OPTIMIZATION</b></p><blockquote><p>
1846 This option disables the ability of SQLite to use indices to help
1847 resolve <a href="lang_expr.html#like">LIKE</a> and <a href="lang_expr.html#glob">GLOB</a> operators in a WHERE clause.
1848 </p></blockquote><a name="omit_load_extension"></a>
1849 <p><b>SQLITE_OMIT_LOAD_EXTENSION</b></p><blockquote><p>
1850 This option omits the entire extension loading mechanism from
1851 SQLite, including <a href="c3ref/enable_load_extension.html">sqlite3_enable_load_extension()</a> and
1852 <a href="c3ref/load_extension.html">sqlite3_load_extension()</a> interfaces.
1853 </p></blockquote><a name="omit_localtime"></a>
1854 <p><b>SQLITE_OMIT_LOCALTIME</b></p><blockquote><p>
1855 This option omits the "localtime" modifier from the date and time
1856 functions. This option is sometimes useful when trying to compile
1857 the date and time functions on a platform that does not support the
1858 concept of local time.
1859 </p></blockquote><a name="omit_lookaside"></a>
1860 <p><b>SQLITE_OMIT_LOOKASIDE</b></p><blockquote><p>
1861 This option omits the <a href="malloc.html#lookaside">lookaside memory allocator</a>.
1862 </p></blockquote><a name="omit_memorydb"></a>
1863 <p><b>SQLITE_OMIT_MEMORYDB</b></p><blockquote><p>
1864 When this is defined, the library does not respect the special database
1865 name ":memory:" (normally used to create an <a href="inmemorydb.html">in-memory database</a>). If
1866 ":memory:" is passed to <a href="c3ref/open.html">sqlite3_open()</a>, <a href="c3ref/open.html">sqlite3_open16()</a>, or
1867 <a href="c3ref/open.html">sqlite3_open_v2()</a>, a file with this name will be
1868 opened or created.
1869 </p></blockquote><a name="omit_or_optimization"></a>
1870 <p><b>SQLITE_OMIT_OR_OPTIMIZATION</b></p><blockquote><p>
1871 This option disables the ability of SQLite to use an index together
1872 with terms of a WHERE clause connected by the OR operator.
1873 </p></blockquote><a name="omit_pager_pragmas"></a>
1874 <p><b>SQLITE_OMIT_PAGER_PRAGMAS</b></p><blockquote><p>
1875 Defining this option omits pragmas related to the pager subsystem from
1876 the build.
1877 </p></blockquote><a name="omit_pragma"></a>
1878 <p><b>SQLITE_OMIT_PRAGMA</b></p><blockquote><p>
1879 This option is used to omit the <a href="pragma.html#syntax">PRAGMA</a> command
1880 from the library. Note that it is useful to define the macros that omit
1881 specific pragmas in addition to this, as they may also remove supporting code
1882 in other sub-systems. This macro removes the <a href="pragma.html#syntax">PRAGMA</a> command only.
1883 </p></blockquote><a name="omit_progress_callback"></a>
1884 <p><b>SQLITE_OMIT_PROGRESS_CALLBACK</b></p><blockquote><p>
1885 This option may be defined to omit the capability to issue "progress"
1886 callbacks during long-running SQL statements. The
1887 <a href="c3ref/progress_handler.html">sqlite3_progress_handler()</a>
1888 API function is not present in the library.
1889 </p></blockquote><a name="omit_quickbalance"></a>
1890 <p><b>SQLITE_OMIT_QUICKBALANCE</b></p><blockquote><p>
1891 This option omits an alternative, faster B-Tree balancing routine.
1892 Using this option makes SQLite slightly smaller at the expense of
1893 making it run slightly slower.
1894 </p></blockquote><a name="omit_reindex"></a>
1895 <p><b>SQLITE_OMIT_REINDEX</b></p><blockquote><p>
1896 When this option is defined, the <a href="lang_reindex.html">REINDEX</a>
1897 command is not included in the library.
1898 Executing a <a href="lang_reindex.html">REINDEX</a> statement causes
1899 a parse error.
1900 </p></blockquote><a name="omit_schema_pragmas"></a>
1901 <p><b>SQLITE_OMIT_SCHEMA_PRAGMAS</b></p><blockquote><p>
1902 Defining this option omits pragmas for querying the database schema from
1903 the build.
1904 </p></blockquote><a name="omit_schema_version_pragmas"></a>
1905 <p><b>SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS</b></p><blockquote><p>
1906 Defining this option omits pragmas for querying and modifying the
1907 database schema version and user version from the build. Specifically, the
1908 <a href="pragma.html#pragma_schema_version">schema_version</a> and <a href="pragma.html#pragma_user_version">user_version</a> PRAGMAs are omitted.
1909 </p></blockquote><a name="omit_shared_cache"></a>
1910 <p><b>SQLITE_OMIT_SHARED_CACHE</b></p><blockquote><p>
1911 This option builds SQLite without support for <a href="sharedcache.html">shared cache mode</a>.
1912 The <a href="c3ref/enable_shared_cache.html">sqlite3_enable_shared_cache()</a> is omitted along with a fair
1913 amount of logic within the B-Tree subsystem associated with shared
1914 cache management.</p>
1915
1916 <p> This compile-time option is recommended most applications as it
1917 results in improved performance and reduced library footprint.
1918 </p></blockquote><a name="omit_seh"></a>
1919 <p><b>SQLITE_OMIT_SEH</b></p><blockquote><p>
1920 If defined, Structured Exception Handling (SEH) is disabled on
1921 Windows builds. SEH is a Windows-specific technique for catching
1922 exceptions raised while accessing a memory-mapped file. SEH is used
1923 to intercept errors that might occur while accessing the
1924 memory-mapped <a href="walformat.html#shm">shm file</a> that are part of <a href="wal.html">WAL mode</a> processing. If
1925 the operating system raised errors while SQLite is trying to access
1926 the shm file, this option causes those errors to be caught and dealt
1927 with by SQLite, rather than aborting the whole process.
1928 <p>
1929 This has no effect except when compiling on Windows using MSVC.
1930 </p></blockquote><a name="omit_subquery"></a>
1931 <p><b>SQLITE_OMIT_SUBQUERY</b></p><blockquote><p>
1932 If defined, support for sub-selects and the IN() operator are omitted.
1933 </p></blockquote><a name="omit_tcl_variable"></a>
1934 <p><b>SQLITE_OMIT_TCL_VARIABLE</b></p><blockquote><p>
1935 If this macro is defined, then the special "$<variable-name>" syntax
1936 used to automatically bind SQL variables to TCL variables is omitted.
1937 </p></blockquote><a name="omit_tempdb"></a>
1938 <p><b>SQLITE_OMIT_TEMPDB</b></p><blockquote><p>
1939 This option omits support for TEMP or TEMPORARY tables.
1940 </p></blockquote><a name="omit_trace"></a>
1941 <p><b>SQLITE_OMIT_TRACE</b></p><blockquote><p>
1942 This option omits support for the <a href="c3ref/profile.html">sqlite3_profile()</a> and
1943 <a href="c3ref/profile.html">sqlite3_trace()</a> interfaces and their associated logic.
1944 </p></blockquote><a name="omit_trigger"></a>
1945 <p><b>SQLITE_OMIT_TRIGGER</b></p><blockquote><p>
1946 Defining this option omits support for TRIGGER objects. Neither the
1947 <a href="lang_createtrigger.html">CREATE TRIGGER</a> or <a href="lang_droptrigger.html">DROP TRIGGER</a>
1948 commands are available in this case, and attempting to execute
1949 either will result in a parse error.
1950 This option also disables enforcement of <a href="foreignkeys.html">foreign key constraints</a>,
1951 since the code that implements triggers and which is omitted by this
1952 option is also used to implement <a href="foreignkeys.html#fk_actions">foreign key actions</a>.
1953 </p></blockquote><a name="omit_truncate_optimization"></a>
1954 <p><b>SQLITE_OMIT_TRUNCATE_OPTIMIZATION</b></p><blockquote><p>
1955 A default build of SQLite, if a <a href="lang_delete.html">DELETE</a> statement has no WHERE clause
1956 and operates on a table with no triggers, an optimization occurs that
1957 causes the DELETE to occur by dropping and recreating the table.
1958 Dropping and recreating a table is usually much faster than deleting
1959 the table content row by row. This is the "truncate optimization".
1960 </p></blockquote><a name="omit_utf16"></a>
1961 <p><b>SQLITE_OMIT_UTF16</b></p><blockquote><p>
1962 This macro is used to omit support for UTF16 text encoding. When this is
1963 defined all API functions that return or accept UTF16 encoded text are
1964 unavailable. These functions can be identified by the fact that they end
1965 with '16', for example <a href="c3ref/prepare.html">sqlite3_prepare16()</a>, <a href="c3ref/column_blob.html">sqlite3_column_text16()</a> and
1966 <a href="c3ref/bind_blob.html">sqlite3_bind_text16()</a>.
1967 </p></blockquote><a name="omit_vacuum"></a>
1968 <p><b>SQLITE_OMIT_VACUUM</b></p><blockquote><p>
1969 When this option is defined, the <a href="lang_vacuum.html">VACUUM</a>
1970 command is not included in the library.
1971 Executing a <a href="lang_vacuum.html">VACUUM</a> statement causes
1972 a parse error.
1973 </p></blockquote><a name="omit_view"></a>
1974 <p><b>SQLITE_OMIT_VIEW</b></p><blockquote><p>
1975 Defining this option omits support for VIEW objects. Neither the
1976 <a href="lang_createview.html">CREATE VIEW</a> nor the <a href="lang_dropview.html">DROP VIEW</a>
1977 commands are available in this case, and
1978 attempting to execute either will result in a parse error.</p>
1979
1980 <p> WARNING: If this macro is defined, it will not be possible to open a database
1981 for which the schema contains VIEW objects.
1982 </p></blockquote><a name="omit_virtualtable"></a>
1983 <p><b>SQLITE_OMIT_VIRTUALTABLE</b></p><blockquote><p>
1984 This option omits support for the <a href="c3ref/vtab.html">Virtual Table</a>
1985 mechanism in SQLite.
1986 </p></blockquote><a name="omit_wal"></a>
1987 <p><b>SQLITE_OMIT_WAL</b></p><blockquote><p>
1988 This option omits the "<a href="wal.html">write-ahead log</a>" (a.k.a. "<a href="wal.html">WAL</a>") capability.
1989 </p></blockquote><a name="omit_windowfunc"></a>
1990 <p><b>SQLITE_OMIT_WINDOWFUNC</b></p><blockquote><p>
1991 This option omits <a href="windowfunctions.html">window functions</a> from the build.
1992 </p></blockquote><a name="omit_wsd"></a>
1993 <p><b>SQLITE_OMIT_WSD</b></p><blockquote><p>
1994 This option builds a version of the SQLite library that contains no
1995 Writable Static Data (WSD). WSD is global variables and/or static
1996 variables. Some platforms do not support WSD, and this option is necessary
1997 in order for SQLite to work those platforms.</p>
1998
1999 <p> Unlike other OMIT options which make the SQLite library smaller,
2000 this option actually increases the size of SQLite and makes it run
2001 a little slower. Only use this option if SQLite is being built for an
2002 embedded target that does not support WSD.
2003 </p></blockquote><a name="omit_xfer_opt"></a>
2004 <p><b>SQLITE_OMIT_XFER_OPT</b></p><blockquote><p>
2005 This option omits support for optimizations that help statements
2006 of the form "INSERT INTO ... SELECT ..." run faster.
2007 </p></blockquote><a name="untestable"></a>
2008 <p><b>SQLITE_UNTESTABLE</b></p><blockquote><p>
2009 A standard SQLite build includes a small amount of logic associated
2010 with <a href="c3ref/test_control.html">sqlite3_test_control()</a> to exercise
2011 parts of the SQLite core that are otherwise difficult to validate.
2012 This compile-time option omits that extra testing logic. This
2013 compile-time option was called "SQLITE_OMIT_BUILTIN_TEST" prior
2014 to SQLite version 3.16.0 (2017-01-02). The name was changed
2015 to better describe the implications of using it.
2016 <p>
2017 Setting this compile-time option prevents SQLite from being fully
2018 testable. Branch test coverage drops from 100% down to about 95%.
2019 <p>
2020 SQLite developers follow the NASA principle of
2021 "fly what you test and test what you fly". This principle is violated
2022 if this option is enabled for delivery but disabled for testing.
2023 But if this option is enabled during testing, not all branches are
2024 reachable. Therefore, the use of this compile-time option is discouraged.
2025 </p></blockquote><a name="zero_malloc"></a>
2026 <p><b>SQLITE_ZERO_MALLOC</b></p><blockquote><p>
2027 This option omits both the <a href="malloc.html#defaultalloc">default memory allocator</a> and the
2028 <a href="malloc.html#memdebug">debugging memory allocator</a> from the build and substitutes a stub
2029 memory allocator that always fails. SQLite will not run with this
2030 stub memory allocator since it will be unable to allocate memory. But
2031 this stub can be replaced at start-time using
2032 <a href="c3ref/config.html">sqlite3_config</a>(<a href="c3ref/c_config_covering_index_scan.html#sqliteconfigmalloc">SQLITE_CONFIG_MALLOC</a>,...) or
2033 <a href="c3ref/config.html">sqlite3_config</a>(<a href="c3ref/c_config_covering_index_scan.html#sqliteconfigheap">SQLITE_CONFIG_HEAP</a>,...).
2034 So the net effect of this compile-time option is that it allows SQLite
2035 to be compiled and linked against a system library that does not support
2036 malloc(), free(), and/or realloc().
2037 </p></blockquote>
2038 <a name="debugoptions"></a>
2039 </p><h1 id="_analysis_and_debugging_options"><span>10. </span> Analysis and Debugging Options</h1>
2040 <a name="debug"></a>
2041 <p><b>SQLITE_DEBUG</b></p><blockquote><p>
2042 The SQLite source code contains literally thousands of assert() statements
2043 used to verify internal assumptions and subroutine preconditions and
2044 postconditions. These assert() statements are normally turned off
2045 (they generate no code) since turning them on makes SQLite run approximately
2046 three times slower. But for testing and analysis, it is useful to turn
2047 the assert() statements on. The SQLITE_DEBUG compile-time option does this.
2048 <p>SQLITE_DEBUG also enables some other debugging features, such as
2049 special <a href="pragma.html#syntax">PRAGMA</a> statements that turn on tracing and listing features
2050 used for troubleshooting and analysis of the <a href="opcode.html">VDBE</a> and code generator.
2051 </p></blockquote><a name="memdebug"></a>
2052 <p><b>SQLITE_MEMDEBUG</b></p><blockquote><p>
2053 The SQLITE_MEMDEBUG option causes an instrumented
2054 <a href="malloc.html#memdebug">debugging memory allocator</a>
2055 to be used as the default memory allocator within SQLite. The
2056 instrumented memory allocator checks for misuse of dynamically allocated
2057 memory. Examples of misuse include using memory after it is freed,
2058 writing off the ends of a memory allocation, freeing memory not previously
2059 obtained from the memory allocator, or failing to initialize newly
2060 allocated memory.
2061 </p></blockquote>
2062 <a name="win32options"></a>
2063 <h1 id="_windows_specific_options"><span>11. </span> Windows-Specific Options</h1>
2064 <a name="win32_heap_create"></a>
2065 <p><b>SQLITE_WIN32_HEAP_CREATE</b></p><blockquote><p>
2066 This option forces the Win32 native memory allocator, when enabled, to
2067 create a private heap to hold all memory allocations.
2068 </p></blockquote><a name="win32_malloc_validate"></a>
2069 <p><b>SQLITE_WIN32_MALLOC_VALIDATE</b></p><blockquote><p>
2070 This option forces the Win32 native memory allocator, when enabled, to
2071 make strategic calls into the HeapValidate() function if assert() is also
2072 enabled.
2073 </p></blockquote>
2074 <a name="linkage"></a>
2075 <h1 id="compiler_linkage_and_calling_convention_control"><span>12. </span>Compiler Linkage and Calling Convention Control</h1>
2076
2077 <p>The following macros specify interface details
2078 for certain kinds of SQLite builds. The Makefiles will normally
2079 handle setting these macros automatically. Application developers should
2080 not need to worry with these macros. The following documentation about these
2081 macros is included for completeness.</p>
2082
2083 <a name="api"></a>
2084 <p><b>SQLITE_API</b></p><blockquote><p>
2085 This macro identifies an externally visible interface for SQLite.
2086 This macro is sometimes set to "extern". But the definition is
2087 compiler-specific.
2088 </p></blockquote><a name="apicall"></a>
2089 <p><b>SQLITE_APICALL</b></p><blockquote><p>
2090 This macro identifies the calling convention used by public interface
2091 routines in SQLite which accept a fixed number of arguments.
2092 This macro is normally defined to be nothing,
2093 though on Windows builds it can sometimes be set to "__cdecl" or "__stdcall".
2094 The "__cdecl" setting is the default, but "__stdcall" is used when SQLite
2095 is intended to be compiled as a Windows system library.
2096 <p>
2097 A single function declaration should contain no more than one of
2098 the following: <a href="compile.html#apicall">SQLITE_APICALL</a>, <a href="compile.html#cdecl">SQLITE_CDECL</a>, or <a href="compile.html#sysapi">SQLITE_SYSAPI</a>.
2099 </p></blockquote><a name="callback"></a>
2100 <p><b>SQLITE_CALLBACK</b></p><blockquote><p>
2101 This macro specifies the calling convention used with callback pointers
2102 in SQLite. This macro is normally defined to be nothing, though on Windows
2103 builds it can sometimes be set to "__cdecl" or "__stdcall". The
2104 "__cdecl" setting is the default, but "__stdcall" is used when SQLite
2105 is intended to be compiled as a Windows system library.
2106 </p></blockquote><a name="cdecl"></a>
2107 <p><b>SQLITE_CDECL</b></p><blockquote><p>
2108 This macro specifies the calling convention used by varargs interface
2109 routines in SQLite. This macro is normally defined to be nothing,
2110 though on Windows builds it can sometimes be set to "__cdecl". This
2111 macro is used on varargs routines and so cannot be set to "__stdcall"
2112 since the __stdcall calling convention does not support varargs functions.
2113 <p>
2114 A single function declaration should contain no more than one of
2115 the following: <a href="compile.html#apicall">SQLITE_APICALL</a>, <a href="compile.html#cdecl">SQLITE_CDECL</a>, or <a href="compile.html#sysapi">SQLITE_SYSAPI</a>.
2116 </p></blockquote><a name="extern"></a>
2117 <p><b>SQLITE_EXTERN</b></p><blockquote><p>
2118 This macro specifies linkage for public interface variables in SQLite.
2119 It should normally be allowed to default to "extern".
2120 </p></blockquote><a name="stdcall"></a>
2121 <p><b>SQLITE_STDCALL</b></p><blockquote><p>
2122 This macro is no longer used and is now deprecated.
2123 </p></blockquote><a name="sysapi"></a>
2124 <p><b>SQLITE_SYSAPI</b></p><blockquote><p>
2125 This macro identifies the calling convention used by operating system
2126 interfaces for the target platform for an SQLite build.
2127 This macro is normally defined to be nothing,
2128 though on Windows builds it can sometimes be set to "__stdcall".
2129 <p>
2130 A single function declaration should contain no more than one of
2131 the following: <a href="compile.html#apicall">SQLITE_APICALL</a>, <a href="compile.html#cdecl">SQLITE_CDECL</a>, or <a href="compile.html#sysapi">SQLITE_SYSAPI</a>.
2132 </p></blockquote><a name="tclapi"></a>
2133 <p><b>SQLITE_TCLAPI</b></p><blockquote><p>
2134 This macro specifies the calling convention used by the
2135 <a href="http://www.tcl.tk">TCL</a> library interface routines.
2136 This macro is not used by the SQLite core, but only by the <a href="tclsqlite.html">TCL Interface</a>
2137 and <a href="testing.html#tcl">TCL test suite</a>.
2138 This macro is normally defined to be nothing,
2139 though on Windows builds it can sometimes be set to "__cdecl". This
2140 macro is used on TCL library interface routines which are always compiled
2141 as __cdecl, even on platforms that prefer to use __stdcall, so this
2142 macro should not be set to __stdcall unless the platform has a custom
2143 TCL library build that supports __stdcall.
2144 <p>
2145 This macro may not be used in combination with any of <a href="compile.html#apicall">SQLITE_APICALL</a>,
2146 <a href="compile.html#callback">SQLITE_CALLBACK</a>, <a href="compile.html#cdecl">SQLITE_CDECL</a> or <a href="compile.html#sysapi">SQLITE_SYSAPI</a>.
2147 </p></blockquote>
2148 <p align="center"><small><i>This page last modified on <a href="https://sqlite.org/docsrc/honeypot" id="mtimelink" data-href="https://sqlite.org/docsrc/finfo/pages/compile.in?m=7430df7cc8">2024-06-05 13:57:35</a> UTC </small></i></p>
2149