Debian Codegraph @

www/rescode.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>Result and Error Codes</title>
7 <!-- path= -->
8 </head>
9 <body>
10 <div class=nosearch>
11 <a href="index.html">
12 <img class="logo" src="images/sqlite370_banner.svg" 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 Result and Error Codes
122 </div>
123 <details class="fancy_toc">
124 <summary>Table Of Contents</summary>
125 <div id="toc_sub"><div class="fancy-toc1"><a href="#result_codes_versus_error_codes">1. Result Codes versus Error Codes</a></div>
126 <div class="fancy-toc1"><a href="#primary_result_codes_versus_extended_result_codes">2. Primary Result Codes versus Extended Result Codes</a></div>
127 <div class="fancy-toc1"><a href="#definitions">3. Definitions</a></div>
128 <div class="fancy-toc1"><a href="#primary_result_code_list">4. Primary Result Code List</a></div>
129 <div class="fancy-toc1"><a href="#extended_result_code_list">5. Extended Result Code List</a></div>
130 <div class="fancy-toc1"><a href="#result_code_meanings">6. Result Code Meanings</a></div>
131 </div>
132 </details>
133 </div>
134
135
136
137
138
139 <h2 style="margin-left:1.0em" notoc="1" id="overview"> Overview</h2>
140
141 <p>
142 Many of the routines in the SQLite <a href="c3ref/intro.html">C-language Interface</a> return
143 numeric result codes indicating either success or failure, and
144 in the event of a failure, providing some idea of the cause of
145 the failure. This document strives to explain what each
146 of those numeric result codes means.
147
148 </p><h1 id="result_codes_versus_error_codes"><span>1. </span>Result Codes versus Error Codes</h1>
149
150 <p>
151 "Error codes" are a subset of "result codes" that indicate that
152 something has gone wrong. There are only a few non-error result
153 codes: <a href="rescode.html#ok">SQLITE_OK</a>, <a href="rescode.html#row">SQLITE_ROW</a>, and <a href="rescode.html#done">SQLITE_DONE</a>. The term
154 "error code" means any result code other than these three.
155
156 <a name="pve"></a>
157
158 </p><h1 id="primary_result_codes_versus_extended_result_codes"><span>2. </span>Primary Result Codes versus Extended Result Codes</h1>
159
160 <p>
161 Result codes are signed 32-bit integers.
162 The least significant 8 bits of the result code define a broad category
163 and are called the "primary result code". More significant bits provide
164 more detailed information about the error and are called the
165 "extended result code."
166
167 </p><p>
168 Note that the primary result code is always a part of the extended
169 result code. Given a full 32-bit extended result code, the application
170 can always find the corresponding primary result code merely by extracting
171 the least significant 8 bits of the extended result code.
172
173 </p><p>
174 All extended result codes are also error codes. Hence the terms
175 "extended result code" and "extended error code" are interchangeable.
176
177 </p><p>
178 For historic compatibility, the C-language interfaces return
179 primary result codes by default.
180 The extended result code for the most recent error can be
181 retrieved using the <a href="c3ref/errcode.html">sqlite3_extended_errcode()</a> interface.
182 The <a href="c3ref/extended_result_codes.html">sqlite3_extended_result_codes()</a> interface can be used to put
183 a <a href="c3ref/sqlite3.html">database connection</a> into a mode where it returns the
184 extended result codes instead of the primary result codes.
185
186 </p><h1 id="definitions"><span>3. </span>Definitions</h1>
187
188 <p>
189 All result codes are integers.
190 Symbolic names for all result codes are created using
191 "#define" macros in the sqlite3.h header file.
192 There are separate sections in the sqlite3.h header file for
193 the <a href="c3ref/c_abort.html">result code definitions</a> and the <a href="c3ref/c_abort_rollback.html">extended result code definitions</a>.
194
195 </p><p>
196 Primary result code symbolic names are of the form "SQLITE_XXXXXX" where
197 XXXXXX is a sequence of uppercase alphabetic characters. Extended
198 result code names are of the form "SQLITE_XXXXXX_YYYYYYY" where
199 the XXXXXX part is the corresponding primary result code and the
200 YYYYYYY is an extension that further classifies the result code.
201
202 </p><p>
203 The names and numeric values for existing result codes are fixed
204 and unchanging. However, new result codes, and especially new extended
205 result codes, might appear in future releases of SQLite.
206
207
208 </p><h1 id="primary_result_code_list"><span>4. </span>Primary Result Code List</h1>
209 <p>The 31 result codes are
210 <a href="c3ref/c_abort.html">defined in sqlite3.h</a> and are listed in
211 alphabetical order below:
212 <div class='columns' style='columns: 16em auto;'>
213 <ul style='padding-top:0;'>
214 <li><a href='rescode.html#abort'>SQLITE_ABORT&nbsp;(4)</a></li>
215 <li><a href='rescode.html#auth'>SQLITE_AUTH&nbsp;(23)</a></li>
216 <li><a href='rescode.html#busy'>SQLITE_BUSY&nbsp;(5)</a></li>
217 <li><a href='rescode.html#cantopen'>SQLITE_CANTOPEN&nbsp;(14)</a></li>
218 <li><a href='rescode.html#constraint'>SQLITE_CONSTRAINT&nbsp;(19)</a></li>
219 <li><a href='rescode.html#corrupt'>SQLITE_CORRUPT&nbsp;(11)</a></li>
220 <li><a href='rescode.html#done'>SQLITE_DONE&nbsp;(101)</a></li>
221 <li><a href='rescode.html#empty'>SQLITE_EMPTY&nbsp;(16)</a></li>
222 <li><a href='rescode.html#error'>SQLITE_ERROR&nbsp;(1)</a></li>
223 <li><a href='rescode.html#format'>SQLITE_FORMAT&nbsp;(24)</a></li>
224 <li><a href='rescode.html#full'>SQLITE_FULL&nbsp;(13)</a></li>
225 <li><a href='rescode.html#internal'>SQLITE_INTERNAL&nbsp;(2)</a></li>
226 <li><a href='rescode.html#interrupt'>SQLITE_INTERRUPT&nbsp;(9)</a></li>
227 <li><a href='rescode.html#ioerr'>SQLITE_IOERR&nbsp;(10)</a></li>
228 <li><a href='rescode.html#locked'>SQLITE_LOCKED&nbsp;(6)</a></li>
229 <li><a href='rescode.html#mismatch'>SQLITE_MISMATCH&nbsp;(20)</a></li>
230 <li><a href='rescode.html#misuse'>SQLITE_MISUSE&nbsp;(21)</a></li>
231 <li><a href='rescode.html#nolfs'>SQLITE_NOLFS&nbsp;(22)</a></li>
232 <li><a href='rescode.html#nomem'>SQLITE_NOMEM&nbsp;(7)</a></li>
233 <li><a href='rescode.html#notadb'>SQLITE_NOTADB&nbsp;(26)</a></li>
234 <li><a href='rescode.html#notfound'>SQLITE_NOTFOUND&nbsp;(12)</a></li>
235 <li><a href='rescode.html#notice'>SQLITE_NOTICE&nbsp;(27)</a></li>
236 <li><a href='rescode.html#ok'>SQLITE_OK&nbsp;(0)</a></li>
237 <li><a href='rescode.html#perm'>SQLITE_PERM&nbsp;(3)</a></li>
238 <li><a href='rescode.html#protocol'>SQLITE_PROTOCOL&nbsp;(15)</a></li>
239 <li><a href='rescode.html#range'>SQLITE_RANGE&nbsp;(25)</a></li>
240 <li><a href='rescode.html#readonly'>SQLITE_READONLY&nbsp;(8)</a></li>
241 <li><a href='rescode.html#row'>SQLITE_ROW&nbsp;(100)</a></li>
242 <li><a href='rescode.html#schema'>SQLITE_SCHEMA&nbsp;(17)</a></li>
243 <li><a href='rescode.html#toobig'>SQLITE_TOOBIG&nbsp;(18)</a></li>
244 <li><a href='rescode.html#warning'>SQLITE_WARNING&nbsp;(28)</a></li>
245 </ul>
246 </div>
247 <a name="extrc"></a>
248
249 </p><h1 id="extended_result_code_list"><span>5. </span>Extended Result Code List</h1>
250 <p>The 74 extended result codes
251 are <a href="c3ref/c_abort_rollback.html">defined in sqlite3.h</a> and are
252 listed in alphabetical order below:
253 <div class='columns' style='columns: 22em auto;'>
254 <ul style='padding-top:0;'>
255 <li><a href='rescode.html#abort_rollback'>SQLITE_ABORT_ROLLBACK&nbsp;(516)</a></li>
256 <li><a href='rescode.html#auth_user'>SQLITE_AUTH_USER&nbsp;(279)</a></li>
257 <li><a href='rescode.html#busy_recovery'>SQLITE_BUSY_RECOVERY&nbsp;(261)</a></li>
258 <li><a href='rescode.html#busy_snapshot'>SQLITE_BUSY_SNAPSHOT&nbsp;(517)</a></li>
259 <li><a href='rescode.html#busy_timeout'>SQLITE_BUSY_TIMEOUT&nbsp;(773)</a></li>
260 <li><a href='rescode.html#cantopen_convpath'>SQLITE_CANTOPEN_CONVPATH&nbsp;(1038)</a></li>
261 <li><a href='rescode.html#cantopen_dirtywal'>SQLITE_CANTOPEN_DIRTYWAL&nbsp;(1294)</a></li>
262 <li><a href='rescode.html#cantopen_fullpath'>SQLITE_CANTOPEN_FULLPATH&nbsp;(782)</a></li>
263 <li><a href='rescode.html#cantopen_isdir'>SQLITE_CANTOPEN_ISDIR&nbsp;(526)</a></li>
264 <li><a href='rescode.html#cantopen_notempdir'>SQLITE_CANTOPEN_NOTEMPDIR&nbsp;(270)</a></li>
265 <li><a href='rescode.html#cantopen_symlink'>SQLITE_CANTOPEN_SYMLINK&nbsp;(1550)</a></li>
266 <li><a href='rescode.html#constraint_check'>SQLITE_CONSTRAINT_CHECK&nbsp;(275)</a></li>
267 <li><a href='rescode.html#constraint_commithook'>SQLITE_CONSTRAINT_COMMITHOOK&nbsp;(531)</a></li>
268 <li><a href='rescode.html#constraint_datatype'>SQLITE_CONSTRAINT_DATATYPE&nbsp;(3091)</a></li>
269 <li><a href='rescode.html#constraint_foreignkey'>SQLITE_CONSTRAINT_FOREIGNKEY&nbsp;(787)</a></li>
270 <li><a href='rescode.html#constraint_function'>SQLITE_CONSTRAINT_FUNCTION&nbsp;(1043)</a></li>
271 <li><a href='rescode.html#constraint_notnull'>SQLITE_CONSTRAINT_NOTNULL&nbsp;(1299)</a></li>
272 <li><a href='rescode.html#constraint_pinned'>SQLITE_CONSTRAINT_PINNED&nbsp;(2835)</a></li>
273 <li><a href='rescode.html#constraint_primarykey'>SQLITE_CONSTRAINT_PRIMARYKEY&nbsp;(1555)</a></li>
274 <li><a href='rescode.html#constraint_rowid'>SQLITE_CONSTRAINT_ROWID&nbsp;(2579)</a></li>
275 <li><a href='rescode.html#constraint_trigger'>SQLITE_CONSTRAINT_TRIGGER&nbsp;(1811)</a></li>
276 <li><a href='rescode.html#constraint_unique'>SQLITE_CONSTRAINT_UNIQUE&nbsp;(2067)</a></li>
277 <li><a href='rescode.html#constraint_vtab'>SQLITE_CONSTRAINT_VTAB&nbsp;(2323)</a></li>
278 <li><a href='rescode.html#corrupt_index'>SQLITE_CORRUPT_INDEX&nbsp;(779)</a></li>
279 <li><a href='rescode.html#corrupt_sequence'>SQLITE_CORRUPT_SEQUENCE&nbsp;(523)</a></li>
280 <li><a href='rescode.html#corrupt_vtab'>SQLITE_CORRUPT_VTAB&nbsp;(267)</a></li>
281 <li><a href='rescode.html#error_missing_collseq'>SQLITE_ERROR_MISSING_COLLSEQ&nbsp;(257)</a></li>
282 <li><a href='rescode.html#error_retry'>SQLITE_ERROR_RETRY&nbsp;(513)</a></li>
283 <li><a href='rescode.html#error_snapshot'>SQLITE_ERROR_SNAPSHOT&nbsp;(769)</a></li>
284 <li><a href='rescode.html#ioerr_access'>SQLITE_IOERR_ACCESS&nbsp;(3338)</a></li>
285 <li><a href='rescode.html#ioerr_auth'>SQLITE_IOERR_AUTH&nbsp;(7178)</a></li>
286 <li><a href='rescode.html#ioerr_begin_atomic'>SQLITE_IOERR_BEGIN_ATOMIC&nbsp;(7434)</a></li>
287 <li><a href='rescode.html#ioerr_blocked'>SQLITE_IOERR_BLOCKED&nbsp;(2826)</a></li>
288 <li><a href='rescode.html#ioerr_checkreservedlock'>SQLITE_IOERR_CHECKRESERVEDLOCK&nbsp;(3594)</a></li>
289 <li><a href='rescode.html#ioerr_close'>SQLITE_IOERR_CLOSE&nbsp;(4106)</a></li>
290 <li><a href='rescode.html#ioerr_commit_atomic'>SQLITE_IOERR_COMMIT_ATOMIC&nbsp;(7690)</a></li>
291 <li><a href='rescode.html#ioerr_convpath'>SQLITE_IOERR_CONVPATH&nbsp;(6666)</a></li>
292 <li><a href='rescode.html#ioerr_corruptfs'>SQLITE_IOERR_CORRUPTFS&nbsp;(8458)</a></li>
293 <li><a href='rescode.html#ioerr_data'>SQLITE_IOERR_DATA&nbsp;(8202)</a></li>
294 <li><a href='rescode.html#ioerr_delete'>SQLITE_IOERR_DELETE&nbsp;(2570)</a></li>
295 <li><a href='rescode.html#ioerr_delete_noent'>SQLITE_IOERR_DELETE_NOENT&nbsp;(5898)</a></li>
296 <li><a href='rescode.html#ioerr_dir_close'>SQLITE_IOERR_DIR_CLOSE&nbsp;(4362)</a></li>
297 <li><a href='rescode.html#ioerr_dir_fsync'>SQLITE_IOERR_DIR_FSYNC&nbsp;(1290)</a></li>
298 <li><a href='rescode.html#ioerr_fstat'>SQLITE_IOERR_FSTAT&nbsp;(1802)</a></li>
299 <li><a href='rescode.html#ioerr_fsync'>SQLITE_IOERR_FSYNC&nbsp;(1034)</a></li>
300 <li><a href='rescode.html#ioerr_gettemppath'>SQLITE_IOERR_GETTEMPPATH&nbsp;(6410)</a></li>
301 <li><a href='rescode.html#ioerr_lock'>SQLITE_IOERR_LOCK&nbsp;(3850)</a></li>
302 <li><a href='rescode.html#ioerr_mmap'>SQLITE_IOERR_MMAP&nbsp;(6154)</a></li>
303 <li><a href='rescode.html#ioerr_nomem'>SQLITE_IOERR_NOMEM&nbsp;(3082)</a></li>
304 <li><a href='rescode.html#ioerr_rdlock'>SQLITE_IOERR_RDLOCK&nbsp;(2314)</a></li>
305 <li><a href='rescode.html#ioerr_read'>SQLITE_IOERR_READ&nbsp;(266)</a></li>
306 <li><a href='rescode.html#ioerr_rollback_atomic'>SQLITE_IOERR_ROLLBACK_ATOMIC&nbsp;(7946)</a></li>
307 <li><a href='rescode.html#ioerr_seek'>SQLITE_IOERR_SEEK&nbsp;(5642)</a></li>
308 <li><a href='rescode.html#ioerr_shmlock'>SQLITE_IOERR_SHMLOCK&nbsp;(5130)</a></li>
309 <li><a href='rescode.html#ioerr_shmmap'>SQLITE_IOERR_SHMMAP&nbsp;(5386)</a></li>
310 <li><a href='rescode.html#ioerr_shmopen'>SQLITE_IOERR_SHMOPEN&nbsp;(4618)</a></li>
311 <li><a href='rescode.html#ioerr_shmsize'>SQLITE_IOERR_SHMSIZE&nbsp;(4874)</a></li>
312 <li><a href='rescode.html#ioerr_short_read'>SQLITE_IOERR_SHORT_READ&nbsp;(522)</a></li>
313 <li><a href='rescode.html#ioerr_truncate'>SQLITE_IOERR_TRUNCATE&nbsp;(1546)</a></li>
314 <li><a href='rescode.html#ioerr_unlock'>SQLITE_IOERR_UNLOCK&nbsp;(2058)</a></li>
315 <li><a href='rescode.html#ioerr_vnode'>SQLITE_IOERR_VNODE&nbsp;(6922)</a></li>
316 <li><a href='rescode.html#ioerr_write'>SQLITE_IOERR_WRITE&nbsp;(778)</a></li>
317 <li><a href='rescode.html#locked_sharedcache'>SQLITE_LOCKED_SHAREDCACHE&nbsp;(262)</a></li>
318 <li><a href='rescode.html#locked_vtab'>SQLITE_LOCKED_VTAB&nbsp;(518)</a></li>
319 <li><a href='rescode.html#notice_recover_rollback'>SQLITE_NOTICE_RECOVER_ROLLBACK&nbsp;(539)</a></li>
320 <li><a href='rescode.html#notice_recover_wal'>SQLITE_NOTICE_RECOVER_WAL&nbsp;(283)</a></li>
321 <li><a href='rescode.html#ok_load_permanently'>SQLITE_OK_LOAD_PERMANENTLY&nbsp;(256)</a></li>
322 <li><a href='rescode.html#readonly_cantinit'>SQLITE_READONLY_CANTINIT&nbsp;(1288)</a></li>
323 <li><a href='rescode.html#readonly_cantlock'>SQLITE_READONLY_CANTLOCK&nbsp;(520)</a></li>
324 <li><a href='rescode.html#readonly_dbmoved'>SQLITE_READONLY_DBMOVED&nbsp;(1032)</a></li>
325 <li><a href='rescode.html#readonly_directory'>SQLITE_READONLY_DIRECTORY&nbsp;(1544)</a></li>
326 <li><a href='rescode.html#readonly_recovery'>SQLITE_READONLY_RECOVERY&nbsp;(264)</a></li>
327 <li><a href='rescode.html#readonly_rollback'>SQLITE_READONLY_ROLLBACK&nbsp;(776)</a></li>
328 <li><a href='rescode.html#warning_autoindex'>SQLITE_WARNING_AUTOINDEX&nbsp;(284)</a></li>
329 </ul>
330 </div>
331
332 </p><h1 id="result_code_meanings"><span>6. </span>Result Code Meanings</h1>
333 <p>
334 The meanings for all 105
335 result code values are shown below,
336 in numeric order.
337
338 <!--------------------------------------------------------------->
339 <a name="ok"></a>
340 <h3>(0) SQLITE_OK</h3>
341 <p>
342 The SQLITE_OK result code means that the operation was successful and
343 that there were no errors. Most other result codes indicate an error.
344
345
346 <!--------------------------------------------------------------->
347 <a name="error"></a>
348 <h3>(1) SQLITE_ERROR</h3>
349 <p>
350 The SQLITE_ERROR result code is a generic error code that is used when
351 no other more specific error code is available.
352
353
354 <!--------------------------------------------------------------->
355 <a name="internal"></a>
356 <h3>(2) SQLITE_INTERNAL</h3>
357 <p>
358 The SQLITE_INTERNAL result code indicates an internal malfunction.
359 In a working version of SQLite, an application should never see this
360 result code. If application does encounter this result code, it shows
361 that there is a bug in the database engine.
362 <p>
363 This result code might be caused by a bug in SQLite.
364 However, <a href="appfunc.html">application-defined SQL functions</a> or
365 <a href="vtab.html">virtual tables</a>, or <a href="vfs.html">VFSes</a>, or other extensions can also cause this
366 result code to be returned, so the problem might not be the fault
367 of the core SQLite.
368
369
370 <!--------------------------------------------------------------->
371 <a name="perm"></a>
372 <h3>(3) SQLITE_PERM</h3>
373 <p>
374 The SQLITE_PERM result code indicates that the requested access mode
375 for a newly created database could not be provided.
376
377
378 <!--------------------------------------------------------------->
379 <a name="abort"></a>
380 <h3>(4) SQLITE_ABORT</h3>
381 <p>
382 The SQLITE_ABORT result code indicates that an operation was aborted
383 prior to completion, usually by application request.
384 See also: <a href="rescode.html#interrupt">SQLITE_INTERRUPT</a>.
385 <p>
386 If the callback function to <a href="c3ref/exec.html">sqlite3_exec()</a> returns non-zero, then
387 sqlite3_exec() will return SQLITE_ABORT.
388 <p>
389 If a <a href="lang_transaction.html">ROLLBACK</a> operation occurs on the same <a href="c3ref/sqlite3.html">database connection</a> as
390 a pending read or write, then the pending read or write may fail with
391 an SQLITE_ABORT or <a href="rescode.html#abort_rollback">SQLITE_ABORT_ROLLBACK</a> error.
392 <p>
393 In addition to being a result code,
394 the SQLITE_ABORT value is also used as a <a href="c3ref/c_fail.html">conflict resolution mode</a>
395 returned from the <a href="c3ref/vtab_on_conflict.html">sqlite3_vtab_on_conflict()</a> interface.
396
397
398 <!--------------------------------------------------------------->
399 <a name="busy"></a>
400 <h3>(5) SQLITE_BUSY</h3>
401 <p>
402 The SQLITE_BUSY result code indicates that the database file could not
403 be written (or in some cases read) because of concurrent activity by
404 some other <a href="c3ref/sqlite3.html">database connection</a>, usually a database connection in a
405 separate process.
406 <p>
407 For example, if process A is in the middle of a large write transaction
408 and at the same time process B attempts to start a new write transaction,
409 process B will get back an SQLITE_BUSY result because SQLite only supports
410 one writer at a time. Process B will need to wait for process A to finish
411 its transaction before starting a new transaction. The
412 <a href="c3ref/busy_timeout.html">sqlite3_busy_timeout()</a> and <a href="c3ref/busy_handler.html">sqlite3_busy_handler()</a> interfaces and
413 the <a href="pragma.html#pragma_busy_timeout">busy_timeout pragma</a> are available to process B to help it deal
414 with SQLITE_BUSY errors.
415 <p>
416 An SQLITE_BUSY error can occur at any point in a transaction: when the
417 transaction is first started, during any write or update operations, or
418 when the transaction commits.
419 To avoid encountering SQLITE_BUSY errors in the middle of a transaction,
420 the application can use <a href="lang_transaction.html#immediate">BEGIN IMMEDIATE</a> instead of just <a href="lang_transaction.html">BEGIN</a> to
421 start a transaction. The <a href="lang_transaction.html#immediate">BEGIN IMMEDIATE</a> command might itself return
422 SQLITE_BUSY, but if it succeeds, then SQLite guarantees that no
423 subsequent operations on the same database through the next <a href="lang_transaction.html">COMMIT</a>
424 will return SQLITE_BUSY.
425 <p>
426 See also: <a href="rescode.html#busy_recovery">SQLITE_BUSY_RECOVERY</a> and <a href="rescode.html#busy_snapshot">SQLITE_BUSY_SNAPSHOT</a>.
427 <p>
428 The SQLITE_BUSY result code differs from <a href="rescode.html#locked">SQLITE_LOCKED</a> in that
429 SQLITE_BUSY indicates a conflict with a
430 separate <a href="c3ref/sqlite3.html">database connection</a>, probably in a separate process,
431 whereas <a href="rescode.html#locked">SQLITE_LOCKED</a>
432 indicates a conflict within the same <a href="c3ref/sqlite3.html">database connection</a> (or sometimes
433 a database connection with a <a href="sharedcache.html">shared cache</a>).
434
435
436 <!--------------------------------------------------------------->
437 <a name="locked"></a>
438 <h3>(6) SQLITE_LOCKED</h3>
439 <p>
440 The SQLITE_LOCKED result code indicates that a write operation could not
441 continue because of a conflict within the same <a href="c3ref/sqlite3.html">database connection</a> or
442 a conflict with a different database connection that uses a <a href="sharedcache.html">shared cache</a>.
443 <p>
444 For example, a <a href="lang_droptable.html">DROP TABLE</a> statement cannot be run while another thread
445 is reading from that table on the same <a href="c3ref/sqlite3.html">database connection</a> because
446 dropping the table would delete the table out from under the concurrent
447 reader.
448 <p>
449 The SQLITE_LOCKED result code differs from <a href="rescode.html#busy">SQLITE_BUSY</a> in that
450 SQLITE_LOCKED indicates a conflict on the same <a href="c3ref/sqlite3.html">database connection</a>
451 (or on a connection with a <a href="sharedcache.html">shared cache</a>) whereas <a href="rescode.html#busy">SQLITE_BUSY</a> indicates
452 a conflict with a different database connection, probably in a different
453 process.
454
455
456 <!--------------------------------------------------------------->
457 <a name="nomem"></a>
458 <h3>(7) SQLITE_NOMEM</h3>
459 <p>
460 The SQLITE_NOMEM result code indicates that SQLite was unable to allocate
461 all the memory it needed to complete the operation. In other words, an
462 internal call to <a href="c3ref/free.html">sqlite3_malloc()</a> or <a href="c3ref/free.html">sqlite3_realloc()</a> has failed in
463 a case where the memory being allocated was required in order to continue
464 the operation.
465
466
467 <!--------------------------------------------------------------->
468 <a name="readonly"></a>
469 <h3>(8) SQLITE_READONLY</h3>
470 <p>
471 The SQLITE_READONLY result code is returned when an attempt is made to
472 alter some data for which the current database connection does not have
473 write permission.
474
475
476 <!--------------------------------------------------------------->
477 <a name="interrupt"></a>
478 <h3>(9) SQLITE_INTERRUPT</h3>
479 <p>
480 The SQLITE_INTERRUPT result code indicates that an operation was
481 interrupted by the <a href="c3ref/interrupt.html">sqlite3_interrupt()</a> interface.
482 See also: <a href="rescode.html#abort">SQLITE_ABORT</a>
483
484
485 <!--------------------------------------------------------------->
486 <a name="ioerr"></a>
487 <h3>(10) SQLITE_IOERR</h3>
488 <p>
489 The SQLITE_IOERR result code says that the operation could not finish
490 because the operating system reported an I/O error.
491 <p>
492 A full disk drive will normally give an <a href="rescode.html#full">SQLITE_FULL</a> error rather than
493 an SQLITE_IOERR error.
494 <p>
495 There are many different extended result codes for I/O errors that
496 identify the specific I/O operation that failed.
497
498
499 <!--------------------------------------------------------------->
500 <a name="corrupt"></a>
501 <h3>(11) SQLITE_CORRUPT</h3>
502 <p>
503 The SQLITE_CORRUPT result code indicates that the database file has
504 been corrupted. See the <a href="lockingv3.html#how_to_corrupt">How To Corrupt Your Database Files</a> for
505 further discussion on how corruption can occur.
506
507
508 <!--------------------------------------------------------------->
509 <a name="notfound"></a>
510 <h3>(12) SQLITE_NOTFOUND</h3>
511 <p>
512 The SQLITE_NOTFOUND result code is exposed in three ways:
513 <ol>
514 <li><p>
515 SQLITE_NOTFOUND can be returned by the <a href="c3ref/file_control.html">sqlite3_file_control()</a> interface
516 to indicate that the <a href="c3ref/c_fcntl_begin_atomic_write.html">file control opcode</a> passed as the third argument
517 was not recognized by the underlying <a href="vfs.html">VFS</a>.
518 <li><p>
519 SQLITE_NOTFOUND can also be returned by the xSetSystemCall() method of
520 an <a href="c3ref/vfs.html">sqlite3_vfs</a> object.
521 <li><p>
522 SQLITE_NOTFOUND can be returned by <a href="c3ref/vtab_rhs_value.html">sqlite3_vtab_rhs_value()</a> to indicate
523 that the right-hand operand of a constraint is not available to the
524 <a href="vtab.html#xbestindex">xBestIndex method</a> that made the call.
525 </ol>
526 <p>
527 The SQLITE_NOTFOUND result code is also used
528 internally by the SQLite implementation, but those internal uses are
529 not exposed to the application.
530
531
532 <!--------------------------------------------------------------->
533 <a name="full"></a>
534 <h3>(13) SQLITE_FULL</h3>
535 <p>
536 The SQLITE_FULL result code indicates that a write could not complete
537 because the disk is full. Note that this error can occur when trying
538 to write information into the main database file, or it can also
539 occur when writing into <a href="tempfiles.html">temporary disk files</a>.
540 <p>
541 Sometimes applications encounter this error even though there is an
542 abundance of primary disk space because the error occurs when writing
543 into <a href="tempfiles.html">temporary disk files</a> on a system where temporary files are stored
544 on a separate partition with much less space than the primary disk.
545
546
547 <!--------------------------------------------------------------->
548 <a name="cantopen"></a>
549 <h3>(14) SQLITE_CANTOPEN</h3>
550 <p>
551 The SQLITE_CANTOPEN result code indicates that SQLite was unable to
552 open a file. The file in question might be a primary database file
553 or one of several <a href="tempfiles.html">temporary disk files</a>.
554
555
556 <!--------------------------------------------------------------->
557 <a name="protocol"></a>
558 <h3>(15) SQLITE_PROTOCOL</h3>
559 <p>
560 The SQLITE_PROTOCOL result code indicates a problem with the file locking
561 protocol used by SQLite. The SQLITE_PROTOCOL error is currently only
562 returned when using <a href="wal.html">WAL mode</a> and attempting to start a new transaction.
563 There is a race condition that can occur when two separate
564 <a href="c3ref/sqlite3.html">database connections</a> both try to start a transaction at the same time
565 in <a href="wal.html">WAL mode</a>. The loser of the race backs off and tries again, after
566 a brief delay. If the same connection loses the locking race dozens
567 of times over a span of multiple seconds, it will eventually give up and
568 return SQLITE_PROTOCOL. The SQLITE_PROTOCOL error should appear in practice
569 very, very rarely, and only when there are many separate processes all
570 competing intensely to write to the same database.
571
572
573 <!--------------------------------------------------------------->
574 <a name="empty"></a>
575 <h3>(16) SQLITE_EMPTY</h3>
576 <p>
577 The SQLITE_EMPTY result code is not currently used.
578
579
580 <!--------------------------------------------------------------->
581 <a name="schema"></a>
582 <h3>(17) SQLITE_SCHEMA</h3>
583 <p>
584 The SQLITE_SCHEMA result code indicates that the database schema
585 has changed. This result code can be returned from <a href="c3ref/step.html">sqlite3_step()</a> for
586 a <a href="c3ref/stmt.html">prepared statement</a> that was generated using <a href="c3ref/prepare.html">sqlite3_prepare()</a> or
587 <a href="c3ref/prepare.html">sqlite3_prepare16()</a>. If the database schema was changed by some other
588 process in between the time that the statement was prepared and the time
589 the statement was run, this error can result.
590 <p>
591 If a <a href="c3ref/stmt.html">prepared statement</a> is generated from <a href="c3ref/prepare.html">sqlite3_prepare_v2()</a> then
592 the statement is automatically re-prepared if the schema changes, up to
593 <a href="compile.html#max_schema_retry">SQLITE_MAX_SCHEMA_RETRY</a> times (default: 50). The <a href="c3ref/step.html">sqlite3_step()</a>
594 interface will only return SQLITE_SCHEMA back to the application if
595 the failure persists after this many retries.
596
597
598 <!--------------------------------------------------------------->
599 <a name="toobig"></a>
600 <h3>(18) SQLITE_TOOBIG</h3>
601 <p>
602 The SQLITE_TOOBIG error code indicates that a string or BLOB was
603 too large. The default maximum length of a string or BLOB in SQLite is
604 1,000,000,000 bytes. This maximum length can be changed at compile-time
605 using the <a href="limits.html#max_length">SQLITE_MAX_LENGTH</a> compile-time option, or at run-time using
606 the <a href="c3ref/limit.html">sqlite3_limit</a>(db,<a href="c3ref/c_limit_attached.html#sqlitelimitlength">SQLITE_LIMIT_LENGTH</a>,...) interface. The
607 SQLITE_TOOBIG error results when SQLite encounters a string or BLOB
608 that exceeds the compile-time or run-time limit.
609 <p>
610 The SQLITE_TOOBIG error code can also result when an oversized SQL
611 statement is passed into one of the <a href="c3ref/prepare.html">sqlite3_prepare_v2()</a> interfaces.
612 The maximum length of an SQL statement defaults to a similar
613 value of 1,000,000,000 bytes. The maximum SQL statement length can be
614 set at compile-time using <a href="limits.html#max_sql_length">SQLITE_MAX_SQL_LENGTH</a> or at run-time
615 using <a href="c3ref/limit.html">sqlite3_limit</a>(db,<a href="c3ref/c_limit_attached.html#sqlitelimitsqllength">SQLITE_LIMIT_SQL_LENGTH</a>,...).
616
617
618 <!--------------------------------------------------------------->
619 <a name="constraint"></a>
620 <h3>(19) SQLITE_CONSTRAINT</h3>
621 <p>
622 The SQLITE_CONSTRAINT error code means that an SQL constraint violation
623 occurred while trying to process an SQL statement. Additional information
624 about the failed constraint can be found by consulting the
625 accompanying error message (returned via <a href="c3ref/errcode.html">sqlite3_errmsg()</a> or
626 <a href="c3ref/errcode.html">sqlite3_errmsg16()</a>) or by looking at the <a href="rescode.html#extrc">extended error code</a>.
627 <p>
628 The SQLITE_CONSTRAINT code can also be used as the return value from
629 the <a href="vtab.html#xbestindex">xBestIndex()</a> method of a <a href="vtab.html">virtual table</a> implementation. When
630 xBestIndex() returns SQLITE_CONSTRAINT, that indicates that the particular
631 combination of inputs submitted to xBestIndex() cannot result in a
632 usable query plan and should not be given further consideration.
633
634
635 <!--------------------------------------------------------------->
636 <a name="mismatch"></a>
637 <h3>(20) SQLITE_MISMATCH</h3>
638 <p>
639 The SQLITE_MISMATCH error code indicates a datatype mismatch.
640 <p>
641 SQLite is normally very forgiving about mismatches between the type of
642 a value and the declared type of the container in which that value is
643 to be stored. For example, SQLite allows the application to store
644 a large BLOB in a column with a declared type of BOOLEAN. But in a few
645 cases, SQLite is strict about types. The SQLITE_MISMATCH error is
646 returned in those few cases when the types do not match.
647 <p>
648 The <a href="lang_createtable.html#rowid">rowid</a> of a table must be an integer. Attempt to set the <a href="lang_createtable.html#rowid">rowid</a>
649 to anything other than an integer (or a NULL which will be automatically
650 converted into the next available integer rowid) results in an
651 SQLITE_MISMATCH error.
652
653
654 <!--------------------------------------------------------------->
655 <a name="misuse"></a>
656 <h3>(21) SQLITE_MISUSE</h3>
657 <p>
658 The SQLITE_MISUSE return code might be returned if the application uses
659 any SQLite interface in a way that is undefined or unsupported. For
660 example, using a <a href="c3ref/stmt.html">prepared statement</a> after that prepared statement has
661 been <a href="c3ref/finalize.html">finalized</a> might result in an SQLITE_MISUSE error.
662 <p>
663 SQLite tries to detect misuse and report the misuse using this result code.
664 However, there is no guarantee that the detection of misuse will be
665 successful. Misuse detection is probabilistic. Applications should
666 never depend on an SQLITE_MISUSE return value.
667 <p>
668 If SQLite ever returns SQLITE_MISUSE from any interface, that means that
669 the application is incorrectly coded and needs to be fixed. Do not ship
670 an application that sometimes returns SQLITE_MISUSE from a standard
671 SQLite interface because that application contains potentially serious bugs.
672
673
674 <!--------------------------------------------------------------->
675 <a name="nolfs"></a>
676 <h3>(22) SQLITE_NOLFS</h3>
677 <p>
678 The SQLITE_NOLFS error can be returned on systems that do not support
679 large files when the database grows to be larger than what the filesystem
680 can handle. "NOLFS" stands for "NO Large File Support".
681
682
683 <!--------------------------------------------------------------->
684 <a name="auth"></a>
685 <h3>(23) SQLITE_AUTH</h3>
686 <p>
687 The SQLITE_AUTH error is returned when the
688 <a href="c3ref/set_authorizer.html">authorizer callback</a> indicates that an
689 SQL statement being prepared is not authorized.
690
691
692 <!--------------------------------------------------------------->
693 <a name="format"></a>
694 <h3>(24) SQLITE_FORMAT</h3>
695 <p>
696 The SQLITE_FORMAT error code is not currently used by SQLite.
697
698
699 <!--------------------------------------------------------------->
700 <a name="range"></a>
701 <h3>(25) SQLITE_RANGE</h3>
702 <p>
703 The SQLITE_RANGE error indices that the parameter number argument
704 to one of the <a href="c3ref/bind_blob.html">sqlite3_bind</a> routines or the
705 column number in one of the <a href="c3ref/column_blob.html">sqlite3_column</a>
706 routines is out of range.
707
708
709 <!--------------------------------------------------------------->
710 <a name="notadb"></a>
711 <h3>(26) SQLITE_NOTADB</h3>
712 <p>
713 When attempting to open a file, the SQLITE_NOTADB error indicates that
714 the file being opened does not appear to be an SQLite database file.
715
716
717 <!--------------------------------------------------------------->
718 <a name="notice"></a>
719 <h3>(27) SQLITE_NOTICE</h3>
720 <p>
721 The SQLITE_NOTICE result code is not returned by any C/C++ interface.
722 However, SQLITE_NOTICE (or rather one of its <a href="rescode.html#extrc">extended error codes</a>)
723 is sometimes used as the first argument in an <a href="c3ref/log.html">sqlite3_log()</a> callback
724 to indicate that an unusual operation is taking place.
725
726
727 <!--------------------------------------------------------------->
728 <a name="warning"></a>
729 <h3>(28) SQLITE_WARNING</h3>
730 <p>
731 The SQLITE_WARNING result code is not returned by any C/C++ interface.
732 However, SQLITE_WARNING (or rather one of its <a href="rescode.html#extrc">extended error codes</a>)
733 is sometimes used as the first argument in an <a href="c3ref/log.html">sqlite3_log()</a> callback
734 to indicate that an unusual and possibly ill-advised operation is
735 taking place.
736
737
738 <!--------------------------------------------------------------->
739 <a name="row"></a>
740 <h3>(100) SQLITE_ROW</h3>
741 <p>
742 The SQLITE_ROW result code returned by
743 <a href="c3ref/step.html">sqlite3_step()</a> indicates that another row of output is available.
744
745
746 <!--------------------------------------------------------------->
747 <a name="done"></a>
748 <h3>(101) SQLITE_DONE</h3>
749 <p>
750 The SQLITE_DONE result code indicates that an operation has completed.
751 The SQLITE_DONE result code is most commonly seen as a return value
752 from <a href="c3ref/step.html">sqlite3_step()</a> indicating that the SQL statement has run to
753 completion. But SQLITE_DONE can also be returned by other multi-step
754 interfaces such as <a href="c3ref/backup_finish.html#sqlite3backupstep">sqlite3_backup_step()</a>.
755
756
757 <!--------------------------------------------------------------->
758 <a name="ok_load_permanently"></a>
759 <h3>(256) SQLITE_OK_LOAD_PERMANENTLY</h3>
760 <p>
761 The <a href="c3ref/load_extension.html">sqlite3_load_extension()</a> interface loads an
762 <a href="loadext.html">extension</a> into a single
763 database connection. The default behavior is for that extension to be
764 automatically unloaded when the database connection closes. However,
765 if the extension entry point returns SQLITE_OK_LOAD_PERMANENTLY instead
766 of SQLITE_OK, then the extension remains loaded into the process address
767 space after the database connection closes. In other words, the
768 xDlClose method of the <a href="c3ref/vfs.html">sqlite3_vfs</a> object is not called for the
769 extension when the database connection closes.
770 <p>
771 The SQLITE_OK_LOAD_PERMANENTLY return code is useful to
772 <a href="loadext.html">loadable extensions</a> that register new <a href="vfs.html">VFSes</a>, for example.
773
774
775 <!--------------------------------------------------------------->
776 <a name="error_missing_collseq"></a>
777 <h3>(257) SQLITE_ERROR_MISSING_COLLSEQ</h3>
778 <p>
779 The SQLITE_ERROR_MISSING_COLLSEQ result code means that an SQL
780 statement could not be prepared because a collating sequence named
781 in that SQL statement could not be located.
782 <p>
783 Sometimes when this error code is encountered, the
784 <a href="c3ref/prepare.html">sqlite3_prepare_v2()</a> routine will convert the error into
785 <a href="rescode.html#error_retry">SQLITE_ERROR_RETRY</a> and try again to prepare the SQL statement
786 using a different query plan that does not require the use of
787 the unknown collating sequence.
788
789
790 <!--------------------------------------------------------------->
791 <a name="busy_recovery"></a>
792 <h3>(261) SQLITE_BUSY_RECOVERY</h3>
793 <p>
794 The SQLITE_BUSY_RECOVERY error code is an <a href="rescode.html#pve">extended error code</a>
795 for <a href="rescode.html#busy">SQLITE_BUSY</a> that indicates that an operation could not continue
796 because another process is busy recovering a <a href="wal.html">WAL mode</a> database file
797 following a crash. The SQLITE_BUSY_RECOVERY error code only occurs
798 on <a href="wal.html">WAL mode</a> databases.
799
800
801 <!--------------------------------------------------------------->
802 <a name="locked_sharedcache"></a>
803 <h3>(262) SQLITE_LOCKED_SHAREDCACHE</h3>
804 <p>
805 The SQLITE_LOCKED_SHAREDCACHE result code indicates that access to
806 an SQLite data record is blocked by another database connection that
807 is using the same record in <a href="sharedcache.html">shared cache mode</a>. When two or more
808 database connections share the same cache and one of the connections is
809 in the middle of modifying a record in that cache, then other connections
810 are blocked from accessing that data while the modifications are on-going
811 in order to prevent the readers from seeing a corrupt or partially
812 completed change.
813
814
815 <!--------------------------------------------------------------->
816 <a name="readonly_recovery"></a>
817 <h3>(264) SQLITE_READONLY_RECOVERY</h3>
818 <p>
819 The SQLITE_READONLY_RECOVERY error code is an <a href="rescode.html#pve">extended error code</a>
820 for <a href="rescode.html#readonly">SQLITE_READONLY</a>. The SQLITE_READONLY_RECOVERY error code indicates
821 that a <a href="wal.html">WAL mode</a> database cannot be opened because the database file
822 needs to be recovered and recovery requires write access but only
823 read access is available.
824
825
826 <!--------------------------------------------------------------->
827 <a name="ioerr_read"></a>
828 <h3>(266) SQLITE_IOERR_READ</h3>
829 <p>
830 The SQLITE_IOERR_READ error code is an <a href="rescode.html#pve">extended error code</a>
831 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error in the <a href="vfs.html">VFS</a> layer
832 while trying to read from a file on disk. This error might result
833 from a hardware malfunction or because a filesystem became unmounted
834 while the file was open.
835
836
837 <!--------------------------------------------------------------->
838 <a name="corrupt_vtab"></a>
839 <h3>(267) SQLITE_CORRUPT_VTAB</h3>
840 <p>
841 The SQLITE_CORRUPT_VTAB error code is an <a href="rescode.html#pve">extended error code</a>
842 for <a href="rescode.html#corrupt">SQLITE_CORRUPT</a> used by <a href="vtab.html">virtual tables</a>. A <a href="vtab.html">virtual table</a> might
843 return SQLITE_CORRUPT_VTAB to indicate that content in the virtual table
844 is corrupt.
845
846
847 <!--------------------------------------------------------------->
848 <a name="cantopen_notempdir"></a>
849 <h3>(270) SQLITE_CANTOPEN_NOTEMPDIR</h3>
850 <p>
851 The SQLITE_CANTOPEN_NOTEMPDIR error code is no longer used.
852
853
854 <!--------------------------------------------------------------->
855 <a name="constraint_check"></a>
856 <h3>(275) SQLITE_CONSTRAINT_CHECK</h3>
857 <p>
858 The SQLITE_CONSTRAINT_CHECK error code is an <a href="rescode.html#pve">extended error code</a>
859 for <a href="rescode.html#constraint">SQLITE_CONSTRAINT</a> indicating that a <a href="lang_createtable.html#ckconst">CHECK constraint</a> failed.
860
861
862 <!--------------------------------------------------------------->
863 <a name="auth_user"></a>
864 <h3>(279) SQLITE_AUTH_USER</h3>
865 <p>
866 The SQLITE_AUTH_USER error code is an <a href="rescode.html#pve">extended error code</a>
867 for <a href="rescode.html#auth">SQLITE_AUTH</a> indicating that an operation was attempted on a
868 database for which the logged in user lacks sufficient authorization.
869
870
871 <!--------------------------------------------------------------->
872 <a name="notice_recover_wal"></a>
873 <h3>(283) SQLITE_NOTICE_RECOVER_WAL</h3>
874 <p>
875 The SQLITE_NOTICE_RECOVER_WAL result code is
876 passed to the callback of
877 <a href="c3ref/log.html">sqlite3_log()</a> when a <a href="wal.html">WAL mode</a> database file is recovered.
878
879
880 <!--------------------------------------------------------------->
881 <a name="warning_autoindex"></a>
882 <h3>(284) SQLITE_WARNING_AUTOINDEX</h3>
883 <p>
884 The SQLITE_WARNING_AUTOINDEX result code is
885 passed to the callback of
886 <a href="c3ref/log.html">sqlite3_log()</a> whenever <a href="optoverview.html#autoindex">automatic indexing</a> is used.
887 This can serve as a warning to application designers that the
888 database might benefit from additional indexes.
889
890
891 <!--------------------------------------------------------------->
892 <a name="error_retry"></a>
893 <h3>(513) SQLITE_ERROR_RETRY</h3>
894 <p>
895 The SQLITE_ERROR_RETRY is used internally to provoke <a href="c3ref/prepare.html">sqlite3_prepare_v2()</a>
896 (or one of its sibling routines for creating prepared statements) to
897 try again to prepare a statement that failed with an error on the
898 previous attempt.
899
900
901 <!--------------------------------------------------------------->
902 <a name="abort_rollback"></a>
903 <h3>(516) SQLITE_ABORT_ROLLBACK</h3>
904 <p>
905 The SQLITE_ABORT_ROLLBACK error code is an <a href="rescode.html#pve">extended error code</a>
906 for <a href="rescode.html#abort">SQLITE_ABORT</a> indicating that an SQL statement aborted because
907 the transaction that was active when the SQL statement first started
908 was rolled back. Pending write operations always fail with this error
909 when a rollback occurs. A <a href="lang_transaction.html">ROLLBACK</a> will cause a pending read operation
910 to fail only if the schema was changed within the transaction being rolled
911 back.
912
913
914 <!--------------------------------------------------------------->
915 <a name="busy_snapshot"></a>
916 <h3>(517) SQLITE_BUSY_SNAPSHOT</h3>
917 <p>
918 The SQLITE_BUSY_SNAPSHOT error code is an <a href="rescode.html#pve">extended error code</a>
919 for <a href="rescode.html#busy">SQLITE_BUSY</a> that occurs on <a href="wal.html">WAL mode</a> databases when a database
920 connection tries to promote a read transaction into a write transaction
921 but finds that another <a href="c3ref/sqlite3.html">database connection</a> has already written to the
922 database and thus invalidated prior reads.
923 <p>
924 The following scenario illustrates how an SQLITE_BUSY_SNAPSHOT error
925 might arise:
926 <ol>
927 <li> Process A starts a read transaction on the database and does one
928 or more SELECT statements. Process A keeps the transaction open.
929 <li> Process B updates the database, changing values previous read by
930 process A.
931 <li> Process A now tries to write to the database. But process A's view
932 of the database content is now obsolete because process B has
933 modified the database file after process A read from it. Hence
934 process A gets an SQLITE_BUSY_SNAPSHOT error.
935 </ol>
936
937
938 <!--------------------------------------------------------------->
939 <a name="locked_vtab"></a>
940 <h3>(518) SQLITE_LOCKED_VTAB</h3>
941 <p>
942 The SQLITE_LOCKED_VTAB result code is not used by the SQLite core, but
943 it is available for use by extensions. Virtual table implementations
944 can return this result code to indicate that they cannot complete the
945 current operation because of locks held by other threads or processes.
946 <p>
947 The <a href="rtree.html">R-Tree extension</a> returns this result code when an attempt is made
948 to update the R-Tree while another prepared statement is actively reading
949 the R-Tree. The update cannot proceed because any change to an R-Tree
950 might involve reshuffling and rebalancing of nodes, which would disrupt
951 read cursors, causing some rows to be repeated and other rows to be
952 omitted.
953
954
955 <!--------------------------------------------------------------->
956 <a name="readonly_cantlock"></a>
957 <h3>(520) SQLITE_READONLY_CANTLOCK</h3>
958 <p>
959 The SQLITE_READONLY_CANTLOCK error code is an <a href="rescode.html#pve">extended error code</a>
960 for <a href="rescode.html#readonly">SQLITE_READONLY</a>. The SQLITE_READONLY_CANTLOCK error code indicates
961 that SQLite is unable to obtain a read lock on a <a href="wal.html">WAL mode</a> database
962 because the shared-memory file associated with that database is read-only.
963
964
965 <!--------------------------------------------------------------->
966 <a name="ioerr_short_read"></a>
967 <h3>(522) SQLITE_IOERR_SHORT_READ</h3>
968 <p>
969 The SQLITE_IOERR_SHORT_READ error code is an <a href="rescode.html#pve">extended error code</a>
970 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating that a read attempt in the <a href="vfs.html">VFS</a> layer
971 was unable to obtain as many bytes as was requested. This might be
972 due to a truncated file.
973
974
975 <!--------------------------------------------------------------->
976 <a name="corrupt_sequence"></a>
977 <h3>(523) SQLITE_CORRUPT_SEQUENCE</h3>
978 <p>
979 The SQLITE_CORRUPT_SEQUENCE result code means that the schema of
980 the sqlite_sequence table is corrupt. The sqlite_sequence table
981 is used to help implement the <a href="autoinc.html">AUTOINCREMENT</a> feature. The
982 sqlite_sequence table should have the following format:
983 <blockquote><pre>
984 CREATE TABLE sqlite_sequence(name,seq);
985 </pre></blockquote>
986 <p>If SQLite discovers that the sqlite_sequence table has any other
987 format, it returns the SQLITE_CORRUPT_SEQUENCE error.
988
989
990 <!--------------------------------------------------------------->
991 <a name="cantopen_isdir"></a>
992 <h3>(526) SQLITE_CANTOPEN_ISDIR</h3>
993 <p>
994 The SQLITE_CANTOPEN_ISDIR error code is an <a href="rescode.html#pve">extended error code</a>
995 for <a href="rescode.html#cantopen">SQLITE_CANTOPEN</a> indicating that a file open operation failed because
996 the file is really a directory.
997
998
999 <!--------------------------------------------------------------->
1000 <a name="constraint_commithook"></a>
1001 <h3>(531) SQLITE_CONSTRAINT_COMMITHOOK</h3>
1002 <p>
1003 The SQLITE_CONSTRAINT_COMMITHOOK error code
1004 is an <a href="rescode.html#pve">extended error code</a>
1005 for <a href="rescode.html#constraint">SQLITE_CONSTRAINT</a> indicating that a
1006 <a href="c3ref/commit_hook.html">commit hook callback</a> returned non-zero that thus
1007 caused the SQL statement to be rolled back.
1008
1009
1010 <!--------------------------------------------------------------->
1011 <a name="notice_recover_rollback"></a>
1012 <h3>(539) SQLITE_NOTICE_RECOVER_ROLLBACK</h3>
1013 <p>
1014 The SQLITE_NOTICE_RECOVER_ROLLBACK result code is
1015 passed to the callback of
1016 <a href="c3ref/log.html">sqlite3_log()</a> when a <a href="fileformat2.html#hotjrnl">hot journal</a> is rolled back.
1017
1018
1019 <!--------------------------------------------------------------->
1020 <a name="error_snapshot"></a>
1021 <h3>(769) SQLITE_ERROR_SNAPSHOT</h3>
1022 <p>
1023 The SQLITE_ERROR_SNAPSHOT result code might be returned when attempting
1024 to start a read transaction on an historical version of the database
1025 by using the <a href="c3ref/snapshot_open.html">sqlite3_snapshot_open()</a> interface. If the historical
1026 snapshot is no longer available, then the read transaction will fail
1027 with the SQLITE_ERROR_SNAPSHOT. This error code is only possible if
1028 SQLite is compiled with <a href="compile.html#enable_snapshot">-DSQLITE_ENABLE_SNAPSHOT</a>.
1029
1030
1031 <!--------------------------------------------------------------->
1032 <a name="busy_timeout"></a>
1033 <h3>(773) SQLITE_BUSY_TIMEOUT</h3>
1034 <p>
1035 The SQLITE_BUSY_TIMEOUT error code indicates that a blocking Posix
1036 advisory file lock request in the VFS layer failed due to a timeout.
1037 Blocking Posix advisory locks are only
1038 available as a proprietary SQLite extension and even then are only
1039 supported if SQLite is compiled with the SQLITE_ENABLE_SETLK_TIMEOUT
1040 compile-time option.
1041
1042
1043 <!--------------------------------------------------------------->
1044 <a name="readonly_rollback"></a>
1045 <h3>(776) SQLITE_READONLY_ROLLBACK</h3>
1046 <p>
1047 The SQLITE_READONLY_ROLLBACK error code is an <a href="rescode.html#pve">extended error code</a>
1048 for <a href="rescode.html#readonly">SQLITE_READONLY</a>. The SQLITE_READONLY_ROLLBACK error code indicates
1049 that a database cannot be opened because it has a <a href="fileformat2.html#hotjrnl">hot journal</a> that
1050 needs to be rolled back but cannot because the database is readonly.
1051
1052
1053 <!--------------------------------------------------------------->
1054 <a name="ioerr_write"></a>
1055 <h3>(778) SQLITE_IOERR_WRITE</h3>
1056 <p>
1057 The SQLITE_IOERR_WRITE error code is an <a href="rescode.html#pve">extended error code</a>
1058 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error in the <a href="vfs.html">VFS</a> layer
1059 while trying to write into a file on disk. This error might result
1060 from a hardware malfunction or because a filesystem became unmounted
1061 while the file was open. This error should not occur if the filesystem
1062 is full as there is a separate error code (SQLITE_FULL) for that purpose.
1063
1064
1065 <!--------------------------------------------------------------->
1066 <a name="corrupt_index"></a>
1067 <h3>(779) SQLITE_CORRUPT_INDEX</h3>
1068 <p>
1069 The SQLITE_CORRUPT_INDEX result code means that SQLite detected
1070 an entry is or was missing from an index. This is a special case of
1071 the <a href="rescode.html#corrupt">SQLITE_CORRUPT</a> error code that suggests that the problem might
1072 be resolved by running the <a href="lang_reindex.html">REINDEX</a> command, assuming no other
1073 problems exist elsewhere in the database file.
1074
1075
1076 <!--------------------------------------------------------------->
1077 <a name="cantopen_fullpath"></a>
1078 <h3>(782) SQLITE_CANTOPEN_FULLPATH</h3>
1079 <p>
1080 The SQLITE_CANTOPEN_FULLPATH error code is an <a href="rescode.html#pve">extended error code</a>
1081 for <a href="rescode.html#cantopen">SQLITE_CANTOPEN</a> indicating that a file open operation failed because
1082 the operating system was unable to convert the filename into a full pathname.
1083
1084
1085 <!--------------------------------------------------------------->
1086 <a name="constraint_foreignkey"></a>
1087 <h3>(787) SQLITE_CONSTRAINT_FOREIGNKEY</h3>
1088 <p>
1089 The SQLITE_CONSTRAINT_FOREIGNKEY error code
1090 is an <a href="rescode.html#pve">extended error code</a>
1091 for <a href="rescode.html#constraint">SQLITE_CONSTRAINT</a> indicating that a <a href="foreignkeys.html">foreign key constraint</a> failed.
1092
1093
1094 <!--------------------------------------------------------------->
1095 <a name="readonly_dbmoved"></a>
1096 <h3>(1032) SQLITE_READONLY_DBMOVED</h3>
1097 <p>
1098 The SQLITE_READONLY_DBMOVED error code is an <a href="rescode.html#pve">extended error code</a>
1099 for <a href="rescode.html#readonly">SQLITE_READONLY</a>. The SQLITE_READONLY_DBMOVED error code indicates
1100 that a database cannot be modified because the database file has been
1101 moved since it was opened, and so any attempt to modify the database
1102 might result in database corruption if the processes crashes because the
1103 <a href="lockingv3.html#rollback">rollback journal</a> would not be correctly named.
1104
1105
1106 <!--------------------------------------------------------------->
1107 <a name="ioerr_fsync"></a>
1108 <h3>(1034) SQLITE_IOERR_FSYNC</h3>
1109 <p>
1110 The SQLITE_IOERR_FSYNC error code is an <a href="rescode.html#pve">extended error code</a>
1111 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error in the <a href="vfs.html">VFS</a> layer
1112 while trying to flush previously written content out of OS and/or
1113 disk-control buffers and into persistent storage. In other words,
1114 this code indicates a problem with the fsync() system call in unix
1115 or the FlushFileBuffers() system call in windows.
1116
1117
1118 <!--------------------------------------------------------------->
1119 <a name="cantopen_convpath"></a>
1120 <h3>(1038) SQLITE_CANTOPEN_CONVPATH</h3>
1121 <p>
1122 The SQLITE_CANTOPEN_CONVPATH error code is an <a href="rescode.html#pve">extended error code</a>
1123 for <a href="rescode.html#cantopen">SQLITE_CANTOPEN</a> used only by Cygwin <a href="vfs.html">VFS</a> and indicating that
1124 the cygwin_conv_path() system call failed while trying to open a file.
1125 See also: <a href="rescode.html#ioerr_convpath">SQLITE_IOERR_CONVPATH</a>
1126
1127
1128 <!--------------------------------------------------------------->
1129 <a name="constraint_function"></a>
1130 <h3>(1043) SQLITE_CONSTRAINT_FUNCTION</h3>
1131 <p>
1132 The SQLITE_CONSTRAINT_FUNCTION error code is not currently used
1133 by the SQLite core. However, this error code is available for use
1134 by extension functions.
1135
1136
1137 <!--------------------------------------------------------------->
1138 <a name="readonly_cantinit"></a>
1139 <h3>(1288) SQLITE_READONLY_CANTINIT</h3>
1140 <p>
1141 The SQLITE_READONLY_CANTINIT result code originates in the xShmMap method
1142 of a <a href="vfs.html">VFS</a> to indicate that the shared memory region used by <a href="wal.html">WAL mode</a>
1143 exists buts its content is unreliable and unusable by the current process
1144 since the current process does not have write permission on the shared
1145 memory region. (The shared memory region for WAL mode is normally a
1146 file with a "-wal" suffix that is mmapped into the process space. If
1147 the current process does not have write permission on that file, then it
1148 cannot write into shared memory.)
1149 <p>
1150 Higher level logic within SQLite will normally intercept the error code
1151 and create a temporary in-memory shared memory region so that the current
1152 process can at least read the content of the database. This result code
1153 should not reach the application interface layer.
1154
1155
1156 <!--------------------------------------------------------------->
1157 <a name="ioerr_dir_fsync"></a>
1158 <h3>(1290) SQLITE_IOERR_DIR_FSYNC</h3>
1159 <p>
1160 The SQLITE_IOERR_DIR_FSYNC error code is an <a href="rescode.html#pve">extended error code</a>
1161 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error in the <a href="vfs.html">VFS</a> layer
1162 while trying to invoke fsync() on a directory. The unix <a href="vfs.html">VFS</a> attempts
1163 to fsync() directories after creating or deleting certain files to
1164 ensure that those files will still appear in the filesystem following
1165 a power loss or system crash. This error code indicates a problem
1166 attempting to perform that fsync().
1167
1168
1169 <!--------------------------------------------------------------->
1170 <a name="cantopen_dirtywal"></a>
1171 <h3>(1294) SQLITE_CANTOPEN_DIRTYWAL</h3>
1172 <p>
1173 The SQLITE_CANTOPEN_DIRTYWAL result code is not used at this time.
1174
1175
1176 <!--------------------------------------------------------------->
1177 <a name="constraint_notnull"></a>
1178 <h3>(1299) SQLITE_CONSTRAINT_NOTNULL</h3>
1179 <p>
1180 The SQLITE_CONSTRAINT_NOTNULL error code
1181 is an <a href="rescode.html#pve">extended error code</a>
1182 for <a href="rescode.html#constraint">SQLITE_CONSTRAINT</a> indicating that a <a href="lang_createtable.html#notnullconst">NOT NULL constraint</a> failed.
1183
1184
1185 <!--------------------------------------------------------------->
1186 <a name="readonly_directory"></a>
1187 <h3>(1544) SQLITE_READONLY_DIRECTORY</h3>
1188 <p>
1189 The SQLITE_READONLY_DIRECTORY result code indicates that the database
1190 is read-only because process does not have permission to create
1191 a journal file in the same directory as the database and the creation of
1192 a journal file is a prerequisite for writing.
1193
1194
1195 <!--------------------------------------------------------------->
1196 <a name="ioerr_truncate"></a>
1197 <h3>(1546) SQLITE_IOERR_TRUNCATE</h3>
1198 <p>
1199 The SQLITE_IOERR_TRUNCATE error code is an <a href="rescode.html#pve">extended error code</a>
1200 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error in the <a href="vfs.html">VFS</a> layer
1201 while trying to changes the size of a file using the xTruncate
1202 method of the <a href="c3ref/io_methods.html">sqlite3_io_methods</a> object.
1203
1204
1205 <!--------------------------------------------------------------->
1206 <a name="cantopen_symlink"></a>
1207 <h3>(1550) SQLITE_CANTOPEN_SYMLINK</h3>
1208 <p>
1209 The SQLITE_CANTOPEN_SYMLINK result code is returned by the
1210 <a href="c3ref/open.html">sqlite3_open()</a> interface and its siblings when the
1211 <a href="c3ref/c_open_autoproxy.html">SQLITE_OPEN_NOFOLLOW</a> flag is used and the database file is
1212 a symbolic link.
1213
1214
1215 <!--------------------------------------------------------------->
1216 <a name="constraint_primarykey"></a>
1217 <h3>(1555) SQLITE_CONSTRAINT_PRIMARYKEY</h3>
1218 <p>
1219 The SQLITE_CONSTRAINT_PRIMARYKEY error code
1220 is an <a href="rescode.html#pve">extended error code</a>
1221 for <a href="rescode.html#constraint">SQLITE_CONSTRAINT</a> indicating that a <a href="lang_createtable.html#primkeyconst">PRIMARY KEY constraint</a> failed.
1222
1223
1224 <!--------------------------------------------------------------->
1225 <a name="ioerr_fstat"></a>
1226 <h3>(1802) SQLITE_IOERR_FSTAT</h3>
1227 <p>
1228 The SQLITE_IOERR_FSTAT error code is an <a href="rescode.html#pve">extended error code</a>
1229 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error in the <a href="vfs.html">VFS</a> layer
1230 while trying to invoke fstat() (or the equivalent) on a file in order
1231 to determine information such as the file size or access permissions.
1232
1233
1234 <!--------------------------------------------------------------->
1235 <a name="constraint_trigger"></a>
1236 <h3>(1811) SQLITE_CONSTRAINT_TRIGGER</h3>
1237 <p>
1238 The SQLITE_CONSTRAINT_TRIGGER error code
1239 is an <a href="rescode.html#pve">extended error code</a>
1240 for <a href="rescode.html#constraint">SQLITE_CONSTRAINT</a> indicating that a <a href="lang_createtrigger.html#raise">RAISE function</a> within
1241 a <a href="lang_createtrigger.html">trigger</a> fired, causing the SQL statement to abort.
1242
1243
1244 <!--------------------------------------------------------------->
1245 <a name="ioerr_unlock"></a>
1246 <h3>(2058) SQLITE_IOERR_UNLOCK</h3>
1247 <p>
1248 The SQLITE_IOERR_UNLOCK error code is an <a href="rescode.html#pve">extended error code</a>
1249 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error
1250 within the xUnlock method on the <a href="c3ref/io_methods.html">sqlite3_io_methods</a> object.
1251
1252
1253 <!--------------------------------------------------------------->
1254 <a name="constraint_unique"></a>
1255 <h3>(2067) SQLITE_CONSTRAINT_UNIQUE</h3>
1256 <p>
1257 The SQLITE_CONSTRAINT_UNIQUE error code
1258 is an <a href="rescode.html#pve">extended error code</a>
1259 for <a href="rescode.html#constraint">SQLITE_CONSTRAINT</a> indicating that a <a href="lang_createtable.html#uniqueconst">UNIQUE constraint</a> failed.
1260
1261
1262 <!--------------------------------------------------------------->
1263 <a name="ioerr_rdlock"></a>
1264 <h3>(2314) SQLITE_IOERR_RDLOCK</h3>
1265 <p>
1266 The SQLITE_IOERR_RDLOCK error code is an <a href="rescode.html#pve">extended error code</a>
1267 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error
1268 within the xLock method on the <a href="c3ref/io_methods.html">sqlite3_io_methods</a> object while trying
1269 to obtain a read lock.
1270
1271
1272 <!--------------------------------------------------------------->
1273 <a name="constraint_vtab"></a>
1274 <h3>(2323) SQLITE_CONSTRAINT_VTAB</h3>
1275 <p>
1276 The SQLITE_CONSTRAINT_VTAB error code is not currently used
1277 by the SQLite core. However, this error code is available for use
1278 by application-defined <a href="vtab.html">virtual tables</a>.
1279
1280
1281 <!--------------------------------------------------------------->
1282 <a name="ioerr_delete"></a>
1283 <h3>(2570) SQLITE_IOERR_DELETE</h3>
1284 <p>
1285 The SQLITE_IOERR_DELETE error code is an <a href="rescode.html#pve">extended error code</a>
1286 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error
1287 within the xDelete method on the <a href="c3ref/vfs.html">sqlite3_vfs</a> object.
1288
1289
1290 <!--------------------------------------------------------------->
1291 <a name="constraint_rowid"></a>
1292 <h3>(2579) SQLITE_CONSTRAINT_ROWID</h3>
1293 <p>
1294 The SQLITE_CONSTRAINT_ROWID error code
1295 is an <a href="rescode.html#pve">extended error code</a>
1296 for <a href="rescode.html#constraint">SQLITE_CONSTRAINT</a> indicating that a <a href="lang_createtable.html#rowid">rowid</a> is not unique.
1297
1298
1299 <!--------------------------------------------------------------->
1300 <a name="ioerr_blocked"></a>
1301 <h3>(2826) SQLITE_IOERR_BLOCKED</h3>
1302 <p>
1303 The SQLITE_IOERR_BLOCKED error code is no longer used.
1304
1305
1306 <!--------------------------------------------------------------->
1307 <a name="constraint_pinned"></a>
1308 <h3>(2835) SQLITE_CONSTRAINT_PINNED</h3>
1309 <p>
1310 The SQLITE_CONSTRAINT_PINNED error code
1311 is an <a href="rescode.html#pve">extended error code</a>
1312 for <a href="rescode.html#constraint">SQLITE_CONSTRAINT</a> indicating that an <a href="lang_createtrigger.html">UPDATE trigger</a> attempted
1313 to delete the row that was being updated in the middle of the update.
1314
1315
1316 <!--------------------------------------------------------------->
1317 <a name="ioerr_nomem"></a>
1318 <h3>(3082) SQLITE_IOERR_NOMEM</h3>
1319 <p>
1320 The SQLITE_IOERR_NOMEM error code is sometimes returned by the <a href="vfs.html">VFS</a>
1321 layer to indicate that an operation could not be completed due to the
1322 inability to allocate sufficient memory. This error code is normally
1323 converted into <a href="rescode.html#nomem">SQLITE_NOMEM</a> by the higher layers of SQLite before
1324 being returned to the application.
1325
1326
1327 <!--------------------------------------------------------------->
1328 <a name="constraint_datatype"></a>
1329 <h3>(3091) SQLITE_CONSTRAINT_DATATYPE</h3>
1330 <p>
1331 The SQLITE_CONSTRAINT_DATATYPE error code
1332 is an <a href="rescode.html#pve">extended error code</a>
1333 for <a href="rescode.html#constraint">SQLITE_CONSTRAINT</a> indicating that an insert or update attempted
1334 to store a value inconsistent with the column's declared type
1335 in a table defined as STRICT.
1336
1337
1338 <!--------------------------------------------------------------->
1339 <a name="ioerr_access"></a>
1340 <h3>(3338) SQLITE_IOERR_ACCESS</h3>
1341 <p>
1342 The SQLITE_IOERR_ACCESS error code is an <a href="rescode.html#pve">extended error code</a>
1343 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error
1344 within the xAccess method on the <a href="c3ref/vfs.html">sqlite3_vfs</a> object.
1345
1346
1347 <!--------------------------------------------------------------->
1348 <a name="ioerr_checkreservedlock"></a>
1349 <h3>(3594) SQLITE_IOERR_CHECKRESERVEDLOCK</h3>
1350 <p>
1351 The SQLITE_IOERR_CHECKRESERVEDLOCK error code is
1352 an <a href="rescode.html#pve">extended error code</a>
1353 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error
1354 within the xCheckReservedLock method on the <a href="c3ref/io_methods.html">sqlite3_io_methods</a> object.
1355
1356
1357 <!--------------------------------------------------------------->
1358 <a name="ioerr_lock"></a>
1359 <h3>(3850) SQLITE_IOERR_LOCK</h3>
1360 <p>
1361 The SQLITE_IOERR_LOCK error code is an <a href="rescode.html#pve">extended error code</a>
1362 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error in the
1363 advisory file locking logic.
1364 Usually an SQLITE_IOERR_LOCK error indicates a problem obtaining
1365 a <a href="lockingv3.html#pending_lock">PENDING lock</a>. However it can also indicate miscellaneous
1366 locking errors on some of the specialized <a href="vfs.html">VFSes</a> used on Macs.
1367
1368
1369 <!--------------------------------------------------------------->
1370 <a name="ioerr_close"></a>
1371 <h3>(4106) SQLITE_IOERR_CLOSE</h3>
1372 <p>
1373 The SQLITE_IOERR_CLOSE error code is an <a href="rescode.html#pve">extended error code</a>
1374 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error
1375 within the xClose method on the <a href="c3ref/io_methods.html">sqlite3_io_methods</a> object.
1376
1377
1378 <!--------------------------------------------------------------->
1379 <a name="ioerr_dir_close"></a>
1380 <h3>(4362) SQLITE_IOERR_DIR_CLOSE</h3>
1381 <p>
1382 The SQLITE_IOERR_DIR_CLOSE error code is no longer used.
1383
1384
1385 <!--------------------------------------------------------------->
1386 <a name="ioerr_shmopen"></a>
1387 <h3>(4618) SQLITE_IOERR_SHMOPEN</h3>
1388 <p>
1389 The SQLITE_IOERR_SHMOPEN error code is an <a href="rescode.html#pve">extended error code</a>
1390 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error
1391 within the xShmMap method on the <a href="c3ref/io_methods.html">sqlite3_io_methods</a> object
1392 while trying to open a new shared memory segment.
1393
1394
1395 <!--------------------------------------------------------------->
1396 <a name="ioerr_shmsize"></a>
1397 <h3>(4874) SQLITE_IOERR_SHMSIZE</h3>
1398 <p>
1399 The SQLITE_IOERR_SHMSIZE error code is an <a href="rescode.html#pve">extended error code</a>
1400 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error
1401 within the xShmMap method on the <a href="c3ref/io_methods.html">sqlite3_io_methods</a> object
1402 while trying to enlarge a <a href="walformat.html#shm">"shm" file</a> as part of
1403 <a href="wal.html">WAL mode</a> transaction processing. This error may indicate that
1404 the underlying filesystem volume is out of space.
1405
1406
1407 <!--------------------------------------------------------------->
1408 <a name="ioerr_shmlock"></a>
1409 <h3>(5130) SQLITE_IOERR_SHMLOCK</h3>
1410 <p>
1411 The SQLITE_IOERR_SHMLOCK error code is no longer used.
1412
1413
1414 <!--------------------------------------------------------------->
1415 <a name="ioerr_shmmap"></a>
1416 <h3>(5386) SQLITE_IOERR_SHMMAP</h3>
1417 <p>
1418 The SQLITE_IOERR_SHMMAP error code is an <a href="rescode.html#pve">extended error code</a>
1419 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error
1420 within the xShmMap method on the <a href="c3ref/io_methods.html">sqlite3_io_methods</a> object
1421 while trying to map a shared memory segment into the process address space.
1422
1423
1424 <!--------------------------------------------------------------->
1425 <a name="ioerr_seek"></a>
1426 <h3>(5642) SQLITE_IOERR_SEEK</h3>
1427 <p>
1428 The SQLITE_IOERR_SEEK error code is an <a href="rescode.html#pve">extended error code</a>
1429 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error
1430 within the xRead or xWrite methods on the <a href="c3ref/io_methods.html">sqlite3_io_methods</a> object
1431 while trying to seek a file descriptor to the beginning point of the
1432 file where the read or write is to occur.
1433
1434
1435 <!--------------------------------------------------------------->
1436 <a name="ioerr_delete_noent"></a>
1437 <h3>(5898) SQLITE_IOERR_DELETE_NOENT</h3>
1438 <p>
1439 The SQLITE_IOERR_DELETE_NOENT error code
1440 is an <a href="rescode.html#pve">extended error code</a>
1441 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating that the
1442 xDelete method on the <a href="c3ref/vfs.html">sqlite3_vfs</a> object failed because the
1443 file being deleted does not exist.
1444
1445
1446 <!--------------------------------------------------------------->
1447 <a name="ioerr_mmap"></a>
1448 <h3>(6154) SQLITE_IOERR_MMAP</h3>
1449 <p>
1450 The SQLITE_IOERR_MMAP error code is an <a href="rescode.html#pve">extended error code</a>
1451 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error
1452 within the xFetch or xUnfetch methods on the <a href="c3ref/io_methods.html">sqlite3_io_methods</a> object
1453 while trying to map or unmap part of the database file into the
1454 process address space.
1455
1456
1457 <!--------------------------------------------------------------->
1458 <a name="ioerr_gettemppath"></a>
1459 <h3>(6410) SQLITE_IOERR_GETTEMPPATH</h3>
1460 <p>
1461 The SQLITE_IOERR_GETTEMPPATH error code is an <a href="rescode.html#pve">extended error code</a>
1462 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating that the <a href="vfs.html">VFS</a> is unable to determine
1463 a suitable directory in which to place temporary files.
1464
1465
1466 <!--------------------------------------------------------------->
1467 <a name="ioerr_convpath"></a>
1468 <h3>(6666) SQLITE_IOERR_CONVPATH</h3>
1469 <p>
1470 The SQLITE_IOERR_CONVPATH error code is an <a href="rescode.html#pve">extended error code</a>
1471 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> used only by Cygwin <a href="vfs.html">VFS</a> and indicating that
1472 the cygwin_conv_path() system call failed.
1473 See also: <a href="rescode.html#cantopen_convpath">SQLITE_CANTOPEN_CONVPATH</a>
1474
1475
1476 <!--------------------------------------------------------------->
1477 <a name="ioerr_vnode"></a>
1478 <h3>(6922) SQLITE_IOERR_VNODE</h3>
1479 <p>
1480 The SQLITE_IOERR_VNODE error code is a code reserved for use
1481 by extensions. It is not used by the SQLite core.
1482
1483
1484 <!--------------------------------------------------------------->
1485 <a name="ioerr_auth"></a>
1486 <h3>(7178) SQLITE_IOERR_AUTH</h3>
1487 <p>
1488 The SQLITE_IOERR_AUTH error code is a code reserved for use
1489 by extensions. It is not used by the SQLite core.
1490
1491
1492 <!--------------------------------------------------------------->
1493 <a name="ioerr_begin_atomic"></a>
1494 <h3>(7434) SQLITE_IOERR_BEGIN_ATOMIC</h3>
1495 <p>
1496 The SQLITE_IOERR_BEGIN_ATOMIC error code indicates that the
1497 underlying operating system reported an error on the
1498 <a href="c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlbeginatomicwrite">SQLITE_FCNTL_BEGIN_ATOMIC_WRITE</a> file-control. This only comes
1499 up when <a href="compile.html#enable_atomic_write">SQLITE_ENABLE_ATOMIC_WRITE</a> is enabled and the database
1500 is hosted on a filesystem that supports atomic writes.
1501
1502
1503 <!--------------------------------------------------------------->
1504 <a name="ioerr_commit_atomic"></a>
1505 <h3>(7690) SQLITE_IOERR_COMMIT_ATOMIC</h3>
1506 <p>
1507 The SQLITE_IOERR_COMMIT_ATOMIC error code indicates that the
1508 underlying operating system reported an error on the
1509 <a href="c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlcommitatomicwrite">SQLITE_FCNTL_COMMIT_ATOMIC_WRITE</a> file-control. This only comes
1510 up when <a href="compile.html#enable_atomic_write">SQLITE_ENABLE_ATOMIC_WRITE</a> is enabled and the database
1511 is hosted on a filesystem that supports atomic writes.
1512
1513
1514 <!--------------------------------------------------------------->
1515 <a name="ioerr_rollback_atomic"></a>
1516 <h3>(7946) SQLITE_IOERR_ROLLBACK_ATOMIC</h3>
1517 <p>
1518 The SQLITE_IOERR_ROLLBACK_ATOMIC error code indicates that the
1519 underlying operating system reported an error on the
1520 <a href="c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlrollbackatomicwrite">SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE</a> file-control. This only comes
1521 up when <a href="compile.html#enable_atomic_write">SQLITE_ENABLE_ATOMIC_WRITE</a> is enabled and the database
1522 is hosted on a filesystem that supports atomic writes.
1523
1524
1525 <!--------------------------------------------------------------->
1526 <a name="ioerr_data"></a>
1527 <h3>(8202) SQLITE_IOERR_DATA</h3>
1528 <p>
1529 The SQLITE_IOERR_DATA error code is an <a href="rescode.html#pve">extended error code</a>
1530 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> used only by the <a href="cksumvfs.html">checksum VFS shim</a> to indicate that
1531 the checksum on a page of the database file is incorrect.
1532
1533
1534 <!--------------------------------------------------------------->
1535 <a name="ioerr_corruptfs"></a>
1536 <h3>(8458) SQLITE_IOERR_CORRUPTFS</h3>
1537 <p>
1538 The SQLITE_IOERR_CORRUPTFS error code is an <a href="rescode.html#pve">extended error code</a>
1539 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> used only by a VFS to indicate that a seek or read
1540 failure was due to the request not falling within the file's boundary
1541 rather than an ordinary device failure. This often indicates a
1542 corrupt filesystem.
1543
1544
1545
1546 </p><p align="center"><small><i>This page was last updated on 2026-02-18 11:56:50Z </small></i></p>
1547