**
** SQLITE_OK is returned if the call completes without error. Or, if an error
** occurs, an SQLite error code (e.g. SQLITE_NOMEM) is returned.
+**
+** <h3>Special sqlite_stat1 Handling</h3>
+**
+** The "sqlite_stat1" table is an exception to some of the rules above. In
+** SQLite, the schema of sqlite_stat1 is:
+** <pre>
+** CREATE TABLE sqlite_stat1(tbl,idx,stat)
+** </pre>
+**
+** Even though sqlite_stat1 does not have a PRIMARY KEY, changes are
+** recorded for it as if the PRIMARY KEY is (tbl,idx). Additionally, changes
+** are recorded for rows for which (idx IS NULL) is true. However, for such
+** rows a zero-length blob (SQL value X'') is stored in the changeset or
+** patchset instead of a NULL value. This allows such changesets to be
+** manipulated by legacy implementations of sqlite3changeset_invert(),
+** concat() and similar.
+**
+** The sqlite3changeset_apply() function automatically converts the
+** zero-length blob back to a NULL value when updating the sqlite_stat1
+** table. However, if the application calls sqlite3changeset_new(),
+** sqlite3changeset_old() or sqlite3changeset_conflict on a changeset
+** iterator directly (including on a changeset iterator passed to a
+** conflict-handler callback) then the X'' value is returned. The application
+** must translate X'' to NULL itself if required.
*/
int sqlite3session_attach(
sqlite3_session *pSession, /* Session object */
-C Fix\ssessions\smodule\sconflict\shandling\sfor\sthe\ssqlite_stat1\stable.
-D 2018-01-18T16:42:11.152
+C Add\scomments\sdescribing\sthe\sspecial\ssqlite_stat1\shandling\sto\ssqlite3session.h.
+D 2018-01-18T16:53:41.289
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F Makefile.in 38f84f301cbef443b2d269f67a74b8cc536469831f70df7c3e912acc04932cc2
F ext/session/sessionstat1.test 41cd97c2e48619a41cdf8ae749e1b25f34719de638689221aa43971be693bf4e
F ext/session/sessionwor.test 2f3744236dc8b170a695b7d8ddc8c743c7e79fdc
F ext/session/sqlite3session.c 989466bba4dff0ede8d4c450b1fc65ca222b87e31193eddbf3931b88bf898a57
-F ext/session/sqlite3session.h cb4d860101ba6d3ac810f18684539b766d24d668fa2436cdde90d711af9464fb
+F ext/session/sqlite3session.h 1bf32a9598ae4288bf7ecbda032a0479d6225ab8d2283fd252056a26b1046946
F ext/session/test_session.c eb0bd6c1ea791c1d66ee4ef94c16500dad936386
F ext/userauth/sqlite3userauth.h 7f3ea8c4686db8e40b0a0e7a8e0b00fac13aa7a3
F ext/userauth/user-auth.txt e6641021a9210364665fe625d067617d03f27b04
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 089d7cecaaa47db58320b216a111a5e56123d022008be6c81bc0746148bbdb58
-R b26168110a43028fdb5773dcda862810
+P f05ee74e05c401eb075a1ba65179662a08a5c3d5b55fc81f2acc841e841dd055
+R 62c81de92f4cf24f6460f153aeb30b06
U dan
-Z 3667003c7f66cdcf6e4cbccaf82894fb
+Z 4f9e979274bbe8dc16dfd6dd12c05029
-f05ee74e05c401eb075a1ba65179662a08a5c3d5b55fc81f2acc841e841dd055
\ No newline at end of file
+4431a3256f7436e34b3c33edc1f3e53df7eb3c87daec9bac8d038895d93ca7f2
\ No newline at end of file