/ Check-in [858fc52b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Documentation update: clarify that sqlite3_errcode() and related interfaces do not themselves modify the error code.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 858fc52b237702b5e0381eebf5c158bffd7371ff0053a8583b8c175f8f691c82
User & Date: drh 2018-06-12 19:35:51
Context
2018-06-13
02:20
Add the unused SQLITE_CANTOPEN_DIRTYWAL result code. This code was used in some historical versions on the apple-osx branch but was removed by check-in [27e20d699872b2b8]. Restore it so that old code that actually references that result code will still compile. check-in: 9f40383e user: drh tags: trunk
2018-06-12
19:35
Documentation update: clarify that sqlite3_errcode() and related interfaces do not themselves modify the error code. check-in: 858fc52b user: drh tags: trunk
19:22
Documentation updates: clarify the behavior of sqlite3_column and sqlite3_value interfaces following an OOM error. check-in: 428c581e user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/sqlite.h.in.

  3350   3350   ** CAPI3REF: Error Codes And Messages
  3351   3351   ** METHOD: sqlite3
  3352   3352   **
  3353   3353   ** ^If the most recent sqlite3_* API call associated with 
  3354   3354   ** [database connection] D failed, then the sqlite3_errcode(D) interface
  3355   3355   ** returns the numeric [result code] or [extended result code] for that
  3356   3356   ** API call.
  3357         -** If the most recent API call was successful,
  3358         -** then the return value from sqlite3_errcode() is undefined.
  3359   3357   ** ^The sqlite3_extended_errcode()
  3360   3358   ** interface is the same except that it always returns the 
  3361   3359   ** [extended result code] even when extended result codes are
  3362   3360   ** disabled.
         3361  +**
         3362  +** The values returned by sqlite3_errcode() and/or
         3363  +** sqlite3_extended_errcode() might change with each API call.
         3364  +** Except, there are some interfaces that are guaranteed to never
         3365  +** change the value of the error code.  The error-code preserving
         3366  +** interfaces are:
         3367  +**
         3368  +** <ul>
         3369  +** <li> sqlite3_errcode()
         3370  +** <li> sqlite3_extended_errcode()
         3371  +** <li> sqlite3_errmsg()
         3372  +** <li> sqlite3_errmsg16()
         3373  +** </ul>
  3363   3374   **
  3364   3375   ** ^The sqlite3_errmsg() and sqlite3_errmsg16() return English-language
  3365   3376   ** text that describes the error, as either UTF-8 or UTF-16 respectively.
  3366   3377   ** ^(Memory to hold the error message string is managed internally.
  3367   3378   ** The application does not need to worry about freeing the result.
  3368   3379   ** However, the error string might be overwritten or deallocated by
  3369   3380   ** subsequent calls to other SQLite interface functions.)^