From 5cec7e1a5fdde96c2386a6c40e488e58ebc2b78a Mon Sep 17 00:00:00 2001 From: drh <> Date: Sat, 25 Dec 2021 00:19:46 +0000 Subject: [PATCH] One minor change for an exceptional case in sqlite3_error_offset(). FossilOrigin-Name: c93609a8b9dc2e656bb4360138606e269fd323469f7666dbc3bbc699e431313e --- manifest | 15 ++++++--------- manifest.uuid | 2 +- src/main.c | 2 +- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/manifest b/manifest index 086b4676d3..6cd01d0137 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\sthe\ssqlite3_error_offset()\sinterface.\s\sUse\sit\sin\sthe\sCLI\sto\sprovide\nbetter\scontext\sfor\serror\smessages. -D 2021-12-24T20:22:13.535 +C One\sminor\schange\sfor\san\sexceptional\scase\sin\ssqlite3_error_offset(). +D 2021-12-25T00:19:46.998 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -514,7 +514,7 @@ F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71 F src/insert.c e0293a6f686e18cb2c9dd0619a731518e0109d7e1f1db1932974659e7843cfd1 F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa F src/loadext.c 95db1fe62c5973f1c5d9c53f6083e21a73ece14cdd47eeca0639691332e85c4d -F src/main.c d7719ea81cc8ea81253cb2af0603d089407ea70dd5742f53a81ee3c168186344 +F src/main.c aa24539f6c26460543d51027ea14b79cad35e34bc9d4907bc349b52b71066644 F src/malloc.c ef796bcc0e81d845d59a469f1cf235056caf9024172fd524e32136e65593647b F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645 F src/mem1.c c12a42539b1ba105e3707d0e628ad70e611040d8f5e38cf942cee30c867083de @@ -1934,11 +1934,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 37e6e10f4364f556c7503c80408fc62895cdccdd0372fb2b63aaca02c3a1ee30 -R dc8a0d1713a6a184c2032656b8115b23 -T *branch * improved-error-context -T *sym-improved-error-context * -T -sym-trunk * +P b518ce77439852759bc0901071f36d622b1314c9bf3d29c279dfcc405188b975 +R 8f03bf9f6f19504237d0970665f639d4 U drh -Z 3c3faf346f54edef0799304c35a23ad2 +Z 4eae18cf6b28cc5b2fc2672ed68ce869 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 4479c72102..45b61f562d 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -b518ce77439852759bc0901071f36d622b1314c9bf3d29c279dfcc405188b975 \ No newline at end of file +c93609a8b9dc2e656bb4360138606e269fd323469f7666dbc3bbc699e431313e \ No newline at end of file diff --git a/src/main.c b/src/main.c index 07c67d33d7..be73f6df65 100644 --- a/src/main.c +++ b/src/main.c @@ -2602,7 +2602,7 @@ const char *sqlite3_errmsg(sqlite3 *db){ */ int sqlite3_error_offset(sqlite3 *db){ int iOffset = -1; - if( db && sqlite3SafetyCheckSickOrOk(db) ){ + if( db && sqlite3SafetyCheckSickOrOk(db) && db->errCode ){ sqlite3_mutex_enter(db->mutex); iOffset = db->errByteOffset; sqlite3_mutex_leave(db->mutex);