From: drh <> Date: Mon, 28 Feb 2022 13:38:28 +0000 (+0000) Subject: Expand the comment on the definition of the Mem object to better explain the X-Git-Tag: version-3.39.0~359 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=74a12dd6fd1cd358d1cd264132096d1302ddcad0;p=thirdparty%2Fsqlite.git Expand the comment on the definition of the Mem object to better explain the meanings of the various flag bits. FossilOrigin-Name: f2f0426035d4e0334be000a3eb62bbd7d61fdab7c2ef9ba13cfdf6482396dd13 --- diff --git a/manifest b/manifest index 280478ad3f..cf4cae4a5a 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Performance\soptimization\sin\sinitMemArray()\ssaves\sabout\s750K\scycles\swith\sonly\na\s4-byte\sincrease\sin\scode\ssize. -D 2022-02-28T12:16:51.464 +C Expand\sthe\scomment\son\sthe\sdefinition\sof\sthe\sMem\sobject\sto\sbetter\sexplain\sthe\nmeanings\sof\sthe\svarious\sflag\sbits. +D 2022-02-28T13:38:28.184 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -626,7 +626,7 @@ F src/util.c 602fe229f32a96ceccae4f40824129669582096f7c355f53dbac156c9fecef23 F src/vacuum.c 6c38ddc52f0619865c91dae9c441d4d48bf3040d7dc1bc5b22da1e45547ed0b3 F src/vdbe.c 4b969ebe6b61f87a90aebf817bc6ebda5075fe56987591091a9bf22556262484 F src/vdbe.h a1d0e3b934e835e73edd146f2e7c4eadb711b5c9875c18159a57483fd78e550e -F src/vdbeInt.h 2ff02995d153d30d362c99d27248b8a3bf825617a8e0d4d8d1e0231eca3bc4f7 +F src/vdbeInt.h d23573156379d0666dc3f04f0305ea50385ecaf7c788413a530a2523dbaf2c54 F src/vdbeapi.c 1c80efbe51118bbecc7279023e75d18edcfa4b3dc441287e1718ee70ad594f58 F src/vdbeaux.c 0f3ce77dabb1f897cc7d3812ed162ec5d31d2298d1aa41b606f8048a742c4b9e F src/vdbeblob.c 5e61ce31aca17db8fb60395407457a8c1c7fb471dde405e0cd675974611dcfcd @@ -1944,9 +1944,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 bb520293d8c11518ba153b986662f081ebfd781d38eb624c509605fa9148f6e9 d74aa979530d4236f5900d2ef998b27065d352d7c18bcd822e5c8f1041a1a81c -R 0cbe8ba68087a6c2d38d406f08a0fa0f -T +closed d74aa979530d4236f5900d2ef998b27065d352d7c18bcd822e5c8f1041a1a81c +P c3e9cd5e7430be0653a96a2097a695447549980e08cc8bd8d8097a50c954908e +R 1afa8d37576887b173d9bf5fb651f41d U drh -Z 9bc2a643cc2decfa66e7a766c34e11ae +Z dd0779de4c53c5ff450355df311fc955 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 26a86980c5..158dfc4444 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -c3e9cd5e7430be0653a96a2097a695447549980e08cc8bd8d8097a50c954908e \ No newline at end of file +f2f0426035d4e0334be000a3eb62bbd7d61fdab7c2ef9ba13cfdf6482396dd13 \ No newline at end of file diff --git a/src/vdbeInt.h b/src/vdbeInt.h index 657c6f8cf6..26a7bc0def 100644 --- a/src/vdbeInt.h +++ b/src/vdbeInt.h @@ -231,9 +231,44 @@ struct sqlite3_value { */ #define MEMCELLSIZE offsetof(Mem,db) -/* One or more of the following flags are set to indicate the validOK +/* One or more of the following flags are set to indicate the ** representations of the value stored in the Mem struct. ** +** * MEM_Null An SQL NULL value +** +** * MEM_Null|MEM_Zero An SQL NULL with the virtual table +** UPDATE no-change flag set +** +** * MEM_Null|MEM_Term| An SQL NULL, but also contains a +** MEM_Subtype pointer accessible using +** sqlite3_value_pointer(). +** +** * MEM_Null|MEM_Cleared Special SQL NULL that compares non-equal +** to other NULLs even using the IS operator. +** +** * MEM_Str A string, stored in Mem.z with +** length Mem.n. Zero-terminated if +** MEM_Term is set. This flag is +** incompatible with MEM_Blob and +** MEM_Null, but can appear with MEM_Int, +** MEM_Real, and MEM_IntReal. +** +** * MEM_Blob A blob, stored in Mem.z length Mem.n. +** Incompatible with MEM_Str, MEM_Null, +** MEM_Int, MEM_Real, and MEM_IntReal. +** +** * MEM_Blob|MEM_Zero A blob in Mem.z of length Mem.n plus +** MEM.u.i extra 0x00 bytes at the end. +** +** * MEM_Int Integer stored in Mem.u.i. +** +** * MEM_Real Real stored in Mem.u.r. +** +** * MEM_IntReal Real stored as an integer in Mem.u.i. +** +** * MEM_Undefined An undefined and/or uninitialized value. +** Trying to use an Undefined value is an error. +** ** If the MEM_Null flag is set, then the value is an SQL NULL value. ** For a pointer type created using sqlite3_bind_pointer() or ** sqlite3_result_pointer() the MEM_Term and MEM_Subtype flags are also set.