mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Remove many redundant checks for sqlite3.mallocFailed now that any OOM should
cause Parse.nErr to be non-zero. FossilOrigin-Name: 1f7fa46126ea33ed30e93186aff3df51068aeb4be6f79a102bfe8c4e44941d71
This commit is contained in:
40
manifest
40
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Make\sit\sso\sthat\sany\sParse\sobject\sis\salways\slinked\sinto\sthe\sdatabase\sconenction\nwhile\sit\sis\sactive.\s\sHence,\san\sOOM\swill\scause\sParse.nErr\sto\sbe\sset.
|
C Remove\smany\sredundant\schecks\sfor\ssqlite3.mallocFailed\snow\sthat\sany\sOOM\sshould\ncause\sParse.nErr\sto\sbe\snon-zero.
|
||||||
D 2022-01-24T15:34:55.523
|
D 2022-01-24T16:47:12.063
|
||||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||||
@@ -485,7 +485,7 @@ F spec.template 86a4a43b99ebb3e75e6b9a735d5fd293a24e90ca
|
|||||||
F sqlite.pc.in 42b7bf0d02e08b9e77734a47798d1a55a9e0716b
|
F sqlite.pc.in 42b7bf0d02e08b9e77734a47798d1a55a9e0716b
|
||||||
F sqlite3.1 fc7ad8990fc8409983309bb80de8c811a7506786
|
F sqlite3.1 fc7ad8990fc8409983309bb80de8c811a7506786
|
||||||
F sqlite3.pc.in 48fed132e7cb71ab676105d2a4dc77127d8c1f3a
|
F sqlite3.pc.in 48fed132e7cb71ab676105d2a4dc77127d8c1f3a
|
||||||
F src/alter.c d5b1083127d4e1c5b0a50155d6b15c009db81d1fab17e39d28a9268922c2f752
|
F src/alter.c e8ac1df663bf4ec74920edd1299435f2a616d2404de0ac4013c151ea4e7a11f2
|
||||||
F src/analyze.c 7518b99e07c5494111fe3bd867f28f804b6c5c1ad0703ec3d116de9bab3fa516
|
F src/analyze.c 7518b99e07c5494111fe3bd867f28f804b6c5c1ad0703ec3d116de9bab3fa516
|
||||||
F src/attach.c e3f9d9a2a4a844750f3f348f37afb244535f21382cbfcd840152cb21cb41cfaf
|
F src/attach.c e3f9d9a2a4a844750f3f348f37afb244535f21382cbfcd840152cb21cb41cfaf
|
||||||
F src/auth.c f4fa91b6a90bbc8e0d0f738aa284551739c9543a367071f55574681e0f24f8cf
|
F src/auth.c f4fa91b6a90bbc8e0d0f738aa284551739c9543a367071f55574681e0f24f8cf
|
||||||
@@ -495,15 +495,15 @@ F src/btmutex.c 8acc2f464ee76324bf13310df5692a262b801808984c1b79defb2503bbafadb6
|
|||||||
F src/btree.c ddab31c38d5f16114bc68392430556b1063fe14e0020f9a56d2c35ddd58ba7e3
|
F src/btree.c ddab31c38d5f16114bc68392430556b1063fe14e0020f9a56d2c35ddd58ba7e3
|
||||||
F src/btree.h 74d64b8f28cfa4a894d14d4ed64fa432cd697b98b61708d4351482ae15913e22
|
F src/btree.h 74d64b8f28cfa4a894d14d4ed64fa432cd697b98b61708d4351482ae15913e22
|
||||||
F src/btreeInt.h ee9348c4cb9077243b049edc93a82c1f32ca48baeabf2140d41362b9f9139ff7
|
F src/btreeInt.h ee9348c4cb9077243b049edc93a82c1f32ca48baeabf2140d41362b9f9139ff7
|
||||||
F src/build.c cd208d7f69318455267f1860f4af30aab459263dd789dcf934dff2107fa2564b
|
F src/build.c db3d3e6fa32cec976142b13c8ecd2d923016c59a5d4c3142b59749174c452748
|
||||||
F src/callback.c 4c19af69835787bfe790ac560f3071a824eb629f34e41f97b52ce5235c77de1c
|
F src/callback.c 4c19af69835787bfe790ac560f3071a824eb629f34e41f97b52ce5235c77de1c
|
||||||
F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e
|
F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e
|
||||||
F src/ctime.c 2cce39df1a13e05b7633e6d21b651f21492471f991dd7b323a4ee4e7b7f0b7f1
|
F src/ctime.c 2cce39df1a13e05b7633e6d21b651f21492471f991dd7b323a4ee4e7b7f0b7f1
|
||||||
F src/date.c e25773f06a8f9043bfa1e5fa0bee93483c41933adfff0891752f00eadd12ab1c
|
F src/date.c e25773f06a8f9043bfa1e5fa0bee93483c41933adfff0891752f00eadd12ab1c
|
||||||
F src/dbpage.c 8a01e865bf8bc6d7b1844b4314443a6436c07c3efe1d488ed89e81719047833a
|
F src/dbpage.c 8a01e865bf8bc6d7b1844b4314443a6436c07c3efe1d488ed89e81719047833a
|
||||||
F src/dbstat.c 861e08690fcb0f2ee1165eff0060ea8d4f3e2ea10f80dab7d32ad70443a6ff2d
|
F src/dbstat.c 861e08690fcb0f2ee1165eff0060ea8d4f3e2ea10f80dab7d32ad70443a6ff2d
|
||||||
F src/delete.c 19814f621cde10b1771a0dea7fe25d3d7d39975b8d4be4888537d30860e7c08c
|
F src/delete.c 52897a8516dc40753503c25eed0e305f09cc50ae474f22b0b4fd31d3b879cc08
|
||||||
F src/expr.c 827179c78d2ca7cc318392811de8151c60eacf7ce804b13e61bb7ef38f954846
|
F src/expr.c da0ba8a4cf142dbd595d40bc09663994b9ae6b1ea7b85fa2c84e4951bce7b054
|
||||||
F src/fault.c 460f3e55994363812d9d60844b2a6de88826e007
|
F src/fault.c 460f3e55994363812d9d60844b2a6de88826e007
|
||||||
F src/fkey.c 5b73f7a7c00f06017531a5bd258cbc2c7a294e55a7f84a729fe27aa525242560
|
F src/fkey.c 5b73f7a7c00f06017531a5bd258cbc2c7a294e55a7f84a729fe27aa525242560
|
||||||
F src/func.c 8fddc42bce95d17938252a543f86fe29e479366e80fbd112a1822913b6247776
|
F src/func.c 8fddc42bce95d17938252a543f86fe29e479366e80fbd112a1822913b6247776
|
||||||
@@ -512,7 +512,7 @@ F src/hash.c 8d7dda241d0ebdafb6ffdeda3149a412d7df75102cecfc1021c98d6219823b19
|
|||||||
F src/hash.h 3340ab6e1d13e725571d7cee6d3e3135f0779a7d8e76a9ce0a85971fa3953c51
|
F src/hash.h 3340ab6e1d13e725571d7cee6d3e3135f0779a7d8e76a9ce0a85971fa3953c51
|
||||||
F src/hwtime.h cb1d7e3e1ed94b7aa6fde95ae2c2daccc3df826be26fc9ed7fd90d1750ae6144
|
F src/hwtime.h cb1d7e3e1ed94b7aa6fde95ae2c2daccc3df826be26fc9ed7fd90d1750ae6144
|
||||||
F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
|
F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
|
||||||
F src/insert.c e528416ff5d86fc5d656ea6a26f03fde39836b6175f93048c32a03cb2ee16743
|
F src/insert.c 1eea44389de3768ac98588c1410171cd53e7c6ad1af74049983dcbac82093de0
|
||||||
F src/json.c 78fdec9af3a8bfb5ae685707b2701276fec1942b8f5f26689b2701debe32bcd2
|
F src/json.c 78fdec9af3a8bfb5ae685707b2701276fec1942b8f5f26689b2701debe32bcd2
|
||||||
F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa
|
F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa
|
||||||
F src/loadext.c 657534339585ac234839e5187aa51d8802f292e0771c4f874b3af1f1223f81e2
|
F src/loadext.c 657534339585ac234839e5187aa51d8802f292e0771c4f874b3af1f1223f81e2
|
||||||
@@ -545,14 +545,14 @@ F src/parse.y 04f61db1cdd7036c6d74baad1c342d3e3110cb0765c48fcfd3bdf4e974a1e5bb
|
|||||||
F src/pcache.c 084e638432c610f95aea72b8509f0845d2791293f39d1b82f0c0a7e089c3bb6b
|
F src/pcache.c 084e638432c610f95aea72b8509f0845d2791293f39d1b82f0c0a7e089c3bb6b
|
||||||
F src/pcache.h 4f87acd914cef5016fae3030343540d75f5b85a1877eed1a2a19b9f284248586
|
F src/pcache.h 4f87acd914cef5016fae3030343540d75f5b85a1877eed1a2a19b9f284248586
|
||||||
F src/pcache1.c 54881292a9a5db202b2c0ac541c5e3ef9a5e8c4f1c1383adb2601d5499a60e65
|
F src/pcache1.c 54881292a9a5db202b2c0ac541c5e3ef9a5e8c4f1c1383adb2601d5499a60e65
|
||||||
F src/pragma.c c536665ce8431c8b1efbf7e0a5c01852f49f7bf28f1954f8118b2d28e4a3797f
|
F src/pragma.c 7c024d690a3dc93f61830f11f900e4af2357f31d081b0c79099ca5e28919cba7
|
||||||
F src/pragma.h 87330ed2fbfa2a1274de93ca0ab850fba336189228cb256089202c3b52766fad
|
F src/pragma.h 87330ed2fbfa2a1274de93ca0ab850fba336189228cb256089202c3b52766fad
|
||||||
F src/prepare.c 4ab9c3c716aaaa98b7985870e0b7631045dff1cea6ce814165ba8f4363dd43f7
|
F src/prepare.c da7d26f51a86d09e46ecad3b656dc8e135abfcc2cf7c26b048646464606a1cf4
|
||||||
F src/printf.c 975f1f5417f2526365b6e6d7f22332e3e11806dad844701d92846292b654ba9a
|
F src/printf.c 975f1f5417f2526365b6e6d7f22332e3e11806dad844701d92846292b654ba9a
|
||||||
F src/random.c 097dc8b31b8fba5a9aca1697aeb9fd82078ec91be734c16bffda620ced7ab83c
|
F src/random.c 097dc8b31b8fba5a9aca1697aeb9fd82078ec91be734c16bffda620ced7ab83c
|
||||||
F src/resolve.c 359bc0e445d427583d2ab6110433a5dc777f64a0ecdf8d24826d8b475233ead9
|
F src/resolve.c 24032ae57aec10df2f3fa2e20be0aae7d256bc704124b76c52d763440c7c0fe9
|
||||||
F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
|
F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
|
||||||
F src/select.c 70cdf84cdc17ebbe52422bd541593e09fcc56b2774b6b187bcf1d1feb93777a9
|
F src/select.c 5799f5b15e27bcb8262caec7821f3ef89575e539237db3141be0d26cf8efd22c
|
||||||
F src/shell.c.in e80a140e92e342e2f92d405a77155c8e3a67c9b1d0bdbacb92885960cd4fc8f2
|
F src/shell.c.in e80a140e92e342e2f92d405a77155c8e3a67c9b1d0bdbacb92885960cd4fc8f2
|
||||||
F src/sqlite.h.in 31c2c8d737814369bd3b71f3849c4a97ef7ede0aa3ce976ecb11632fa5f1f863
|
F src/sqlite.h.in 31c2c8d737814369bd3b71f3849c4a97ef7ede0aa3ce976ecb11632fa5f1f863
|
||||||
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
||||||
@@ -618,17 +618,17 @@ F src/test_wsd.c 41cadfd9d97fe8e3e4e44f61a4a8ccd6f7ca8fe9
|
|||||||
F src/threads.c 4ae07fa022a3dc7c5beb373cf744a85d3c5c6c3c
|
F src/threads.c 4ae07fa022a3dc7c5beb373cf744a85d3c5c6c3c
|
||||||
F src/tokenize.c b74d878aa7c82ec8460779468061a96185e22257f68ab785b69abce354b70446
|
F src/tokenize.c b74d878aa7c82ec8460779468061a96185e22257f68ab785b69abce354b70446
|
||||||
F src/treeview.c 9dfdb7ff7f6645d0a6458dbdf4ffac041c071c4533a6db8bb6e502b979ac67bc
|
F src/treeview.c 9dfdb7ff7f6645d0a6458dbdf4ffac041c071c4533a6db8bb6e502b979ac67bc
|
||||||
F src/trigger.c 6732a95d132e5fe30e02f87fe94fdb245840c2a870d8ce08c37aab3a2f13f387
|
F src/trigger.c a17cf451b8fbf6e924cb472362ef1141c0cab84db05f33b2d8bfb1c6c565ee45
|
||||||
F src/update.c d6f5c7b9e072660757ac7d58175aca11c07cb95ebbb297ae7f38853700f52328
|
F src/update.c 7dfa3866cdfb28bf952c38054c1722720d8ff64750dea421790aecc91f640516
|
||||||
F src/upsert.c 8789047a8f0a601ea42fa0256d1ba3190c13746b6ba940fe2d25643a7e991937
|
F src/upsert.c 8789047a8f0a601ea42fa0256d1ba3190c13746b6ba940fe2d25643a7e991937
|
||||||
F src/utf.c ee39565f0843775cc2c81135751ddd93eceb91a673ea2c57f61c76f288b041a0
|
F src/utf.c ee39565f0843775cc2c81135751ddd93eceb91a673ea2c57f61c76f288b041a0
|
||||||
F src/util.c 0d0b9c58f117fa98192c6d340c20fd73ce58ae33687e3a133b1fb623b96e0cbd
|
F src/util.c 602fe229f32a96ceccae4f40824129669582096f7c355f53dbac156c9fecef23
|
||||||
F src/vacuum.c 6c38ddc52f0619865c91dae9c441d4d48bf3040d7dc1bc5b22da1e45547ed0b3
|
F src/vacuum.c 6c38ddc52f0619865c91dae9c441d4d48bf3040d7dc1bc5b22da1e45547ed0b3
|
||||||
F src/vdbe.c cfe1980fbeb87eb35297b4a41808034761f26277cf45c9cf3e4eac20edcba1d5
|
F src/vdbe.c cfe1980fbeb87eb35297b4a41808034761f26277cf45c9cf3e4eac20edcba1d5
|
||||||
F src/vdbe.h 25dabb25c7e157b84e59260cfb5b466c3ac103ede9f36f4db371332c47601abe
|
F src/vdbe.h 25dabb25c7e157b84e59260cfb5b466c3ac103ede9f36f4db371332c47601abe
|
||||||
F src/vdbeInt.h d89d5d2150500cfb08615329fd20aea9d746bba5f2c3ecb8a17e2d2d9be029e5
|
F src/vdbeInt.h d89d5d2150500cfb08615329fd20aea9d746bba5f2c3ecb8a17e2d2d9be029e5
|
||||||
F src/vdbeapi.c 22c79072ae7d8a01e9bcae8ba16e918d60d202eaa9553b5fda38f99f7464d99a
|
F src/vdbeapi.c 22c79072ae7d8a01e9bcae8ba16e918d60d202eaa9553b5fda38f99f7464d99a
|
||||||
F src/vdbeaux.c c1b452cc17f5887b3d36bc277a2181914d6bed508ea45827b5f348160491e6a6
|
F src/vdbeaux.c e761b8011baec7a4773f0a7594783f2cd71f699ab187c4aad917529ab8acd3fe
|
||||||
F src/vdbeblob.c 5e61ce31aca17db8fb60395407457a8c1c7fb471dde405e0cd675974611dcfcd
|
F src/vdbeblob.c 5e61ce31aca17db8fb60395407457a8c1c7fb471dde405e0cd675974611dcfcd
|
||||||
F src/vdbemem.c da4d594084d581be6436582bb44bb128feeb138a3e6c313eda6749ebdc3a65ec
|
F src/vdbemem.c da4d594084d581be6436582bb44bb128feeb138a3e6c313eda6749ebdc3a65ec
|
||||||
F src/vdbesort.c 43756031ca7430f7aec3ef904824a7883c4ede783e51f280d99b9b65c0796e35
|
F src/vdbesort.c 43756031ca7430f7aec3ef904824a7883c4ede783e51f280d99b9b65c0796e35
|
||||||
@@ -639,9 +639,9 @@ F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9
|
|||||||
F src/wal.c b9df133a705093da8977da5eb202eaadb844839f1c7297c08d33471f5491843d
|
F src/wal.c b9df133a705093da8977da5eb202eaadb844839f1c7297c08d33471f5491843d
|
||||||
F src/wal.h c3aa7825bfa2fe0d85bef2db94655f99870a285778baa36307c0a16da32b226a
|
F src/wal.h c3aa7825bfa2fe0d85bef2db94655f99870a285778baa36307c0a16da32b226a
|
||||||
F src/walker.c f890a3298418d7cba3b69b8803594fdc484ea241206a8dfa99db6dd36f8cbb3b
|
F src/walker.c f890a3298418d7cba3b69b8803594fdc484ea241206a8dfa99db6dd36f8cbb3b
|
||||||
F src/where.c 9824d15f2a92cbe4d6566e2a97fa4466ce6297e68693322e64281db5e942fa92
|
F src/where.c a14990c7b35e95f8f9cb0dc0d6d2e32fa99135a716a04027cefa48138d280ecb
|
||||||
F src/whereInt.h 8a215acde0f833a4dea3d30a7bbed9f48b4b547b5d5e34cd02acee366476ab80
|
F src/whereInt.h 8a215acde0f833a4dea3d30a7bbed9f48b4b547b5d5e34cd02acee366476ab80
|
||||||
F src/wherecode.c a0a5138b28550dd95916435283c507aa6bf24607ef38a0a18011e6626684330a
|
F src/wherecode.c 8da0f873278ed6aad42bf2028404d7178dd9cfcdc7179ecc61a87591a15a07d2
|
||||||
F src/whereexpr.c 9f64c39e53070584e99e4d20c1dd3397e125fabbae8fd414ffec574c410ac7d3
|
F src/whereexpr.c 9f64c39e53070584e99e4d20c1dd3397e125fabbae8fd414ffec574c410ac7d3
|
||||||
F src/window.c 5d3b397b0c026d0ff5890244ac41359e524c01ae31e78782e1ff418c3e271a9e
|
F src/window.c 5d3b397b0c026d0ff5890244ac41359e524c01ae31e78782e1ff418c3e271a9e
|
||||||
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
|
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
|
||||||
@@ -1941,8 +1941,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
|||||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||||
P 53d4404458fb6f0b6b2b69c2225d66b39f09099c356ba3c3e990474f14aba31a
|
P 6a45d8fe8bfbc11a5b86d25237e1f8bccfb0f22f3dcaf004ba797aeb57b365ec
|
||||||
R db714556249a893e75568fc6543a6157
|
R c6a1e6f8a20313848dd96ff038c5eea1
|
||||||
U drh
|
U drh
|
||||||
Z 5562b6696e73f05014591d4075c2e3ff
|
Z 9cd720c9eb51a2f1a38e40423c81c52f
|
||||||
# Remove this line to create a well-formed Fossil manifest.
|
# Remove this line to create a well-formed Fossil manifest.
|
||||||
|
@@ -1 +1 @@
|
|||||||
6a45d8fe8bfbc11a5b86d25237e1f8bccfb0f22f3dcaf004ba797aeb57b365ec
|
1f7fa46126ea33ed30e93186aff3df51068aeb4be6f79a102bfe8c4e44941d71
|
@@ -324,7 +324,9 @@ void sqlite3AlterFinishAddColumn(Parse *pParse, Token *pColDef){
|
|||||||
int r1; /* Temporary registers */
|
int r1; /* Temporary registers */
|
||||||
|
|
||||||
db = pParse->db;
|
db = pParse->db;
|
||||||
if( pParse->nErr || db->mallocFailed ) return;
|
assert( db->pParse==pParse );
|
||||||
|
if( pParse->nErr ) return;
|
||||||
|
assert( db->mallocFailed==0 );
|
||||||
pNew = pParse->pNewTable;
|
pNew = pParse->pNewTable;
|
||||||
assert( pNew );
|
assert( pNew );
|
||||||
|
|
||||||
@@ -735,7 +737,9 @@ struct RenameCtx {
|
|||||||
** following a valid object, it may not be used in comparison operations.
|
** following a valid object, it may not be used in comparison operations.
|
||||||
*/
|
*/
|
||||||
static void renameTokenCheckAll(Parse *pParse, const void *pPtr){
|
static void renameTokenCheckAll(Parse *pParse, const void *pPtr){
|
||||||
if( pParse->nErr==0 && pParse->db->mallocFailed==0 ){
|
assert( pParse==pParse->db->pParse );
|
||||||
|
assert( pParse->db->mallocFailed==0 || pParse->nErr!=0 );
|
||||||
|
if( pParse->nErr==0 ){
|
||||||
const RenameToken *p;
|
const RenameToken *p;
|
||||||
u8 i = 0;
|
u8 i = 0;
|
||||||
for(p=pParse->pRename; p; p=p->pNext){
|
for(p=pParse->pRename; p; p=p->pNext){
|
||||||
|
19
src/build.c
19
src/build.c
@@ -143,11 +143,13 @@ void sqlite3FinishCoding(Parse *pParse){
|
|||||||
|
|
||||||
assert( pParse->pToplevel==0 );
|
assert( pParse->pToplevel==0 );
|
||||||
db = pParse->db;
|
db = pParse->db;
|
||||||
|
assert( db->pParse==pParse );
|
||||||
if( pParse->nested ) return;
|
if( pParse->nested ) return;
|
||||||
if( db->mallocFailed || pParse->nErr ){
|
if( pParse->nErr ){
|
||||||
if( pParse->rc==SQLITE_OK ) pParse->rc = SQLITE_ERROR;
|
if( pParse->rc==SQLITE_OK ) pParse->rc = SQLITE_ERROR;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
assert( db->mallocFailed==0 );
|
||||||
|
|
||||||
/* Begin by generating some termination code at the end of the
|
/* Begin by generating some termination code at the end of the
|
||||||
** vdbe program
|
** vdbe program
|
||||||
@@ -280,7 +282,7 @@ void sqlite3FinishCoding(Parse *pParse){
|
|||||||
|
|
||||||
/* Get the VDBE program ready for execution
|
/* Get the VDBE program ready for execution
|
||||||
*/
|
*/
|
||||||
if( v && pParse->nErr==0 && !db->mallocFailed ){
|
if( pParse->nErr==0 && ALWAYS(v) && ALWAYS(!db->mallocFailed) ){
|
||||||
/* A minimum of one cursor is required if autoincrement is used
|
/* A minimum of one cursor is required if autoincrement is used
|
||||||
* See ticket [a696379c1f08866] */
|
* See ticket [a696379c1f08866] */
|
||||||
assert( pParse->pAinc==0 || pParse->nTab>0 );
|
assert( pParse->pAinc==0 || pParse->nTab>0 );
|
||||||
@@ -2384,10 +2386,11 @@ static void convertToWithoutRowidTable(Parse *pParse, Table *pTab){
|
|||||||
pTab->iPKey = -1;
|
pTab->iPKey = -1;
|
||||||
sqlite3CreateIndex(pParse, 0, 0, 0, pList, pTab->keyConf, 0, 0, 0, 0,
|
sqlite3CreateIndex(pParse, 0, 0, 0, pList, pTab->keyConf, 0, 0, 0, 0,
|
||||||
SQLITE_IDXTYPE_PRIMARYKEY);
|
SQLITE_IDXTYPE_PRIMARYKEY);
|
||||||
if( db->mallocFailed || pParse->nErr ){
|
if( pParse->nErr ){
|
||||||
pTab->tabFlags &= ~TF_WithoutRowid;
|
pTab->tabFlags &= ~TF_WithoutRowid;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
assert( db->mallocFailed==0 );
|
||||||
pPk = sqlite3PrimaryKeyIndex(pTab);
|
pPk = sqlite3PrimaryKeyIndex(pTab);
|
||||||
assert( pPk->nKeyCol==1 );
|
assert( pPk->nKeyCol==1 );
|
||||||
}else{
|
}else{
|
||||||
@@ -3128,10 +3131,10 @@ int sqlite3ViewGetColumnNames(Parse *pParse, Table *pTable){
|
|||||||
*/
|
*/
|
||||||
sqlite3ColumnsFromExprList(pParse, pTable->pCheck,
|
sqlite3ColumnsFromExprList(pParse, pTable->pCheck,
|
||||||
&pTable->nCol, &pTable->aCol);
|
&pTable->nCol, &pTable->aCol);
|
||||||
if( db->mallocFailed==0
|
if( pParse->nErr==0
|
||||||
&& pParse->nErr==0
|
|
||||||
&& pTable->nCol==pSel->pEList->nExpr
|
&& pTable->nCol==pSel->pEList->nExpr
|
||||||
){
|
){
|
||||||
|
assert( db->mallocFailed==0 );
|
||||||
sqlite3SelectAddColumnTypeAndCollation(pParse, pTable, pSel,
|
sqlite3SelectAddColumnTypeAndCollation(pParse, pTable, pSel,
|
||||||
SQLITE_AFF_NONE);
|
SQLITE_AFF_NONE);
|
||||||
}
|
}
|
||||||
@@ -3750,7 +3753,7 @@ static void sqlite3RefillIndex(Parse *pParse, Index *pIndex, int memRootPage){
|
|||||||
tnum = pIndex->tnum;
|
tnum = pIndex->tnum;
|
||||||
}
|
}
|
||||||
pKey = sqlite3KeyInfoOfIndex(pParse, pIndex);
|
pKey = sqlite3KeyInfoOfIndex(pParse, pIndex);
|
||||||
assert( pKey!=0 || db->mallocFailed || pParse->nErr );
|
assert( pKey!=0 || pParse->nErr );
|
||||||
|
|
||||||
/* Open the sorter cursor if we are to use one. */
|
/* Open the sorter cursor if we are to use one. */
|
||||||
iSorter = pParse->nTab++;
|
iSorter = pParse->nTab++;
|
||||||
@@ -3914,9 +3917,11 @@ void sqlite3CreateIndex(
|
|||||||
char *zExtra = 0; /* Extra space after the Index object */
|
char *zExtra = 0; /* Extra space after the Index object */
|
||||||
Index *pPk = 0; /* PRIMARY KEY index for WITHOUT ROWID tables */
|
Index *pPk = 0; /* PRIMARY KEY index for WITHOUT ROWID tables */
|
||||||
|
|
||||||
if( db->mallocFailed || pParse->nErr>0 ){
|
assert( db->pParse==pParse );
|
||||||
|
if( pParse->nErr ){
|
||||||
goto exit_create_index;
|
goto exit_create_index;
|
||||||
}
|
}
|
||||||
|
assert( db->mallocFailed==0 );
|
||||||
if( IN_DECLARE_VTAB && idxType!=SQLITE_IDXTYPE_PRIMARYKEY ){
|
if( IN_DECLARE_VTAB && idxType!=SQLITE_IDXTYPE_PRIMARYKEY ){
|
||||||
goto exit_create_index;
|
goto exit_create_index;
|
||||||
}
|
}
|
||||||
|
@@ -293,9 +293,11 @@ void sqlite3DeleteFrom(
|
|||||||
|
|
||||||
memset(&sContext, 0, sizeof(sContext));
|
memset(&sContext, 0, sizeof(sContext));
|
||||||
db = pParse->db;
|
db = pParse->db;
|
||||||
if( pParse->nErr || db->mallocFailed ){
|
assert( db->pParse==pParse );
|
||||||
|
if( pParse->nErr ){
|
||||||
goto delete_from_cleanup;
|
goto delete_from_cleanup;
|
||||||
}
|
}
|
||||||
|
assert( db->mallocFailed==0 );
|
||||||
assert( pTabList->nSrc==1 );
|
assert( pTabList->nSrc==1 );
|
||||||
|
|
||||||
|
|
||||||
|
@@ -2803,8 +2803,7 @@ int sqlite3FindInIndex(
|
|||||||
CollSeq *pReq = sqlite3BinaryCompareCollSeq(pParse, pLhs, pRhs);
|
CollSeq *pReq = sqlite3BinaryCompareCollSeq(pParse, pLhs, pRhs);
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
assert( pReq!=0 || pRhs->iColumn==XN_ROWID
|
assert( pReq!=0 || pRhs->iColumn==XN_ROWID || pParse->nErr );
|
||||||
|| pParse->nErr || db->mallocFailed );
|
|
||||||
for(j=0; j<nExpr; j++){
|
for(j=0; j<nExpr; j++){
|
||||||
if( pIdx->aiColumn[j]!=pRhs->iColumn ) continue;
|
if( pIdx->aiColumn[j]!=pRhs->iColumn ) continue;
|
||||||
assert( pIdx->azColl[j] );
|
assert( pIdx->azColl[j] );
|
||||||
|
@@ -715,9 +715,11 @@ void sqlite3Insert(
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
db = pParse->db;
|
db = pParse->db;
|
||||||
if( pParse->nErr || db->mallocFailed ){
|
assert( db->pParse==pParse );
|
||||||
|
if( pParse->nErr ){
|
||||||
goto insert_cleanup;
|
goto insert_cleanup;
|
||||||
}
|
}
|
||||||
|
assert( db->mallocFailed==0 );
|
||||||
dest.iSDParm = 0; /* Suppress a harmless compiler warning */
|
dest.iSDParm = 0; /* Suppress a harmless compiler warning */
|
||||||
|
|
||||||
/* If the Select object is really just a simple VALUES() list with a
|
/* If the Select object is really just a simple VALUES() list with a
|
||||||
@@ -893,7 +895,9 @@ void sqlite3Insert(
|
|||||||
dest.nSdst = pTab->nCol;
|
dest.nSdst = pTab->nCol;
|
||||||
rc = sqlite3Select(pParse, pSelect, &dest);
|
rc = sqlite3Select(pParse, pSelect, &dest);
|
||||||
regFromSelect = dest.iSdst;
|
regFromSelect = dest.iSdst;
|
||||||
if( rc || db->mallocFailed || pParse->nErr ) goto insert_cleanup;
|
assert( db->pParse==pParse );
|
||||||
|
if( rc || pParse->nErr ) goto insert_cleanup;
|
||||||
|
assert( db->mallocFailed==0 );
|
||||||
sqlite3VdbeEndCoroutine(v, regYield);
|
sqlite3VdbeEndCoroutine(v, regYield);
|
||||||
sqlite3VdbeJumpHere(v, addrTop - 1); /* label B: */
|
sqlite3VdbeJumpHere(v, addrTop - 1); /* label B: */
|
||||||
assert( pSelect->pEList );
|
assert( pSelect->pEList );
|
||||||
|
@@ -1250,6 +1250,10 @@ void sqlite3Pragma(
|
|||||||
(void)sqlite3_finalize(pDummy);
|
(void)sqlite3_finalize(pDummy);
|
||||||
sqlite3DbFree(db, zSql);
|
sqlite3DbFree(db, zSql);
|
||||||
}
|
}
|
||||||
|
if( db->mallocFailed ){
|
||||||
|
sqlite3ErrorMsg(db->pParse, "out of memory");
|
||||||
|
db->pParse->rc = SQLITE_NOMEM_BKPT;
|
||||||
|
}
|
||||||
pHash = &db->aDb[ii].pSchema->tblHash;
|
pHash = &db->aDb[ii].pSchema->tblHash;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -589,7 +589,7 @@ void sqlite3ParseObjectReset(Parse *pParse){
|
|||||||
db->lookaside.bDisable -= pParse->disableLookaside;
|
db->lookaside.bDisable -= pParse->disableLookaside;
|
||||||
db->lookaside.sz = db->lookaside.bDisable ? 0 : db->lookaside.szTrue;
|
db->lookaside.sz = db->lookaside.bDisable ? 0 : db->lookaside.szTrue;
|
||||||
assert( pParse->db->pParse==pParse );
|
assert( pParse->db->pParse==pParse );
|
||||||
pParse->db->pParse = pParse->pOuterParse;
|
db->pParse = pParse->pOuterParse;
|
||||||
pParse->db = 0;
|
pParse->db = 0;
|
||||||
}
|
}
|
||||||
pParse->disableLookaside = 0;
|
pParse->disableLookaside = 0;
|
||||||
|
@@ -1214,7 +1214,8 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (pParse->nErr || pParse->db->mallocFailed) ? WRC_Abort : WRC_Continue;
|
assert( pParse->db->mallocFailed==0 || pParse->nErr!=0 );
|
||||||
|
return pParse->nErr ? WRC_Abort : WRC_Continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1628,7 +1629,7 @@ static int resolveSelectStep(Walker *pWalker, Select *p){
|
|||||||
*/
|
*/
|
||||||
if( (p->selFlags & SF_Expanded)==0 ){
|
if( (p->selFlags & SF_Expanded)==0 ){
|
||||||
sqlite3SelectPrep(pParse, p, pOuterNC);
|
sqlite3SelectPrep(pParse, p, pOuterNC);
|
||||||
return (pParse->nErr || db->mallocFailed) ? WRC_Abort : WRC_Prune;
|
return pParse->nErr ? WRC_Abort : WRC_Prune;
|
||||||
}
|
}
|
||||||
|
|
||||||
isCompound = p->pPrior!=0;
|
isCompound = p->pPrior!=0;
|
||||||
@@ -1676,7 +1677,8 @@ static int resolveSelectStep(Walker *pWalker, Select *p){
|
|||||||
if( pItem->zName ) pParse->zAuthContext = pItem->zName;
|
if( pItem->zName ) pParse->zAuthContext = pItem->zName;
|
||||||
sqlite3ResolveSelectNames(pParse, pItem->pSelect, pOuterNC);
|
sqlite3ResolveSelectNames(pParse, pItem->pSelect, pOuterNC);
|
||||||
pParse->zAuthContext = zSavedContext;
|
pParse->zAuthContext = zSavedContext;
|
||||||
if( pParse->nErr || db->mallocFailed ) return WRC_Abort;
|
if( pParse->nErr ) return WRC_Abort;
|
||||||
|
assert( db->mallocFailed==0 );
|
||||||
|
|
||||||
/* If the number of references to the outer context changed when
|
/* If the number of references to the outer context changed when
|
||||||
** expressions in the sub-select were resolved, the sub-select
|
** expressions in the sub-select were resolved, the sub-select
|
||||||
|
23
src/select.c
23
src/select.c
@@ -5588,7 +5588,8 @@ static int selectExpander(Walker *pWalker, Select *p){
|
|||||||
|
|
||||||
/* Process NATURAL keywords, and ON and USING clauses of joins.
|
/* Process NATURAL keywords, and ON and USING clauses of joins.
|
||||||
*/
|
*/
|
||||||
if( pParse->nErr || db->mallocFailed || sqliteProcessJoin(pParse, p) ){
|
assert( db->mallocFailed==0 || pParse->nErr!=0 );
|
||||||
|
if( pParse->nErr || sqliteProcessJoin(pParse, p) ){
|
||||||
return WRC_Abort;
|
return WRC_Abort;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5885,12 +5886,13 @@ void sqlite3SelectPrep(
|
|||||||
NameContext *pOuterNC /* Name context for container */
|
NameContext *pOuterNC /* Name context for container */
|
||||||
){
|
){
|
||||||
assert( p!=0 || pParse->db->mallocFailed );
|
assert( p!=0 || pParse->db->mallocFailed );
|
||||||
|
assert( pParse->db->pParse==pParse );
|
||||||
if( pParse->db->mallocFailed ) return;
|
if( pParse->db->mallocFailed ) return;
|
||||||
if( p->selFlags & SF_HasTypeInfo ) return;
|
if( p->selFlags & SF_HasTypeInfo ) return;
|
||||||
sqlite3SelectExpand(pParse, p);
|
sqlite3SelectExpand(pParse, p);
|
||||||
if( pParse->nErr || pParse->db->mallocFailed ) return;
|
if( pParse->nErr ) return;
|
||||||
sqlite3ResolveSelectNames(pParse, p, pOuterNC);
|
sqlite3ResolveSelectNames(pParse, p, pOuterNC);
|
||||||
if( pParse->nErr || pParse->db->mallocFailed ) return;
|
if( pParse->nErr ) return;
|
||||||
sqlite3SelectAddTypeInfo(pParse, p);
|
sqlite3SelectAddTypeInfo(pParse, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5907,8 +5909,10 @@ static void resetAccumulator(Parse *pParse, AggInfo *pAggInfo){
|
|||||||
int i;
|
int i;
|
||||||
struct AggInfo_func *pFunc;
|
struct AggInfo_func *pFunc;
|
||||||
int nReg = pAggInfo->nFunc + pAggInfo->nColumn;
|
int nReg = pAggInfo->nFunc + pAggInfo->nColumn;
|
||||||
|
assert( pParse->db->pParse==pParse );
|
||||||
|
assert( pParse->db->mallocFailed==0 || pParse->nErr!=0 );
|
||||||
if( nReg==0 ) return;
|
if( nReg==0 ) return;
|
||||||
if( pParse->nErr || pParse->db->mallocFailed ) return;
|
if( pParse->nErr ) return;
|
||||||
#ifdef SQLITE_DEBUG
|
#ifdef SQLITE_DEBUG
|
||||||
/* Verify that all AggInfo registers are within the range specified by
|
/* Verify that all AggInfo registers are within the range specified by
|
||||||
** AggInfo.mnReg..AggInfo.mxReg */
|
** AggInfo.mnReg..AggInfo.mxReg */
|
||||||
@@ -6331,10 +6335,12 @@ int sqlite3Select(
|
|||||||
u8 minMaxFlag; /* Flag for min/max queries */
|
u8 minMaxFlag; /* Flag for min/max queries */
|
||||||
|
|
||||||
db = pParse->db;
|
db = pParse->db;
|
||||||
|
assert( pParse==db->pParse );
|
||||||
v = sqlite3GetVdbe(pParse);
|
v = sqlite3GetVdbe(pParse);
|
||||||
if( p==0 || db->mallocFailed || pParse->nErr ){
|
if( p==0 || pParse->nErr ){
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
assert( db->mallocFailed==0 );
|
||||||
if( sqlite3AuthCheck(pParse, SQLITE_SELECT, 0, 0, 0) ) return 1;
|
if( sqlite3AuthCheck(pParse, SQLITE_SELECT, 0, 0, 0) ) return 1;
|
||||||
#if SELECTTRACE_ENABLED
|
#if SELECTTRACE_ENABLED
|
||||||
SELECTTRACE(1,pParse,p, ("begin processing:\n", pParse->addrExplain));
|
SELECTTRACE(1,pParse,p, ("begin processing:\n", pParse->addrExplain));
|
||||||
@@ -6369,9 +6375,10 @@ int sqlite3Select(
|
|||||||
p->selFlags |= SF_NoopOrderBy;
|
p->selFlags |= SF_NoopOrderBy;
|
||||||
}
|
}
|
||||||
sqlite3SelectPrep(pParse, p, 0);
|
sqlite3SelectPrep(pParse, p, 0);
|
||||||
if( pParse->nErr || db->mallocFailed ){
|
if( pParse->nErr ){
|
||||||
goto select_end;
|
goto select_end;
|
||||||
}
|
}
|
||||||
|
assert( db->mallocFailed==0 );
|
||||||
assert( p->pEList!=0 );
|
assert( p->pEList!=0 );
|
||||||
#if SELECTTRACE_ENABLED
|
#if SELECTTRACE_ENABLED
|
||||||
if( sqlite3SelectTrace & 0x104 ){
|
if( sqlite3SelectTrace & 0x104 ){
|
||||||
@@ -6415,7 +6422,7 @@ int sqlite3Select(
|
|||||||
|
|
||||||
#ifndef SQLITE_OMIT_WINDOWFUNC
|
#ifndef SQLITE_OMIT_WINDOWFUNC
|
||||||
if( sqlite3WindowRewrite(pParse, p) ){
|
if( sqlite3WindowRewrite(pParse, p) ){
|
||||||
assert( db->mallocFailed || pParse->nErr>0 );
|
assert( pParse->nErr );
|
||||||
goto select_end;
|
goto select_end;
|
||||||
}
|
}
|
||||||
#if SELECTTRACE_ENABLED
|
#if SELECTTRACE_ENABLED
|
||||||
@@ -7510,7 +7517,7 @@ int sqlite3Select(
|
|||||||
*/
|
*/
|
||||||
select_end:
|
select_end:
|
||||||
assert( db->mallocFailed==0 || db->mallocFailed==1 );
|
assert( db->mallocFailed==0 || db->mallocFailed==1 );
|
||||||
pParse->nErr += db->mallocFailed;
|
assert( db->mallocFailed==0 || pParse->nErr!=0 );
|
||||||
sqlite3ExprListDelete(db, pMinMaxOrderBy);
|
sqlite3ExprListDelete(db, pMinMaxOrderBy);
|
||||||
#ifdef SQLITE_DEBUG
|
#ifdef SQLITE_DEBUG
|
||||||
if( pAggInfo && !db->mallocFailed ){
|
if( pAggInfo && !db->mallocFailed ){
|
||||||
|
@@ -918,6 +918,7 @@ static void codeReturningTrigger(
|
|||||||
|
|
||||||
assert( v!=0 );
|
assert( v!=0 );
|
||||||
assert( pParse->bReturning );
|
assert( pParse->bReturning );
|
||||||
|
assert( db->pParse==pParse );
|
||||||
pReturning = pParse->u1.pReturning;
|
pReturning = pParse->u1.pReturning;
|
||||||
assert( pTrigger == &(pReturning->retTrig) );
|
assert( pTrigger == &(pReturning->retTrig) );
|
||||||
memset(&sSelect, 0, sizeof(sSelect));
|
memset(&sSelect, 0, sizeof(sSelect));
|
||||||
@@ -928,7 +929,8 @@ static void codeReturningTrigger(
|
|||||||
sFrom.a[0].pTab = pTab;
|
sFrom.a[0].pTab = pTab;
|
||||||
sFrom.a[0].iCursor = -1;
|
sFrom.a[0].iCursor = -1;
|
||||||
sqlite3SelectPrep(pParse, &sSelect, 0);
|
sqlite3SelectPrep(pParse, &sSelect, 0);
|
||||||
if( db->mallocFailed==0 && pParse->nErr==0 ){
|
if( pParse->nErr==0 ){
|
||||||
|
assert( db->mallocFailed==0 );
|
||||||
sqlite3GenerateColumnNames(pParse, &sSelect);
|
sqlite3GenerateColumnNames(pParse, &sSelect);
|
||||||
}
|
}
|
||||||
sqlite3ExprListDelete(db, sSelect.pEList);
|
sqlite3ExprListDelete(db, sSelect.pEList);
|
||||||
@@ -1186,7 +1188,8 @@ static TriggerPrg *codeRowTrigger(
|
|||||||
VdbeComment((v, "End: %s.%s", pTrigger->zName, onErrorText(orconf)));
|
VdbeComment((v, "End: %s.%s", pTrigger->zName, onErrorText(orconf)));
|
||||||
transferParseError(pParse, &sSubParse);
|
transferParseError(pParse, &sSubParse);
|
||||||
|
|
||||||
if( db->mallocFailed==0 && pParse->nErr==0 ){
|
if( pParse->nErr==0 ){
|
||||||
|
assert( db->mallocFailed==0 );
|
||||||
pProgram->aOp = sqlite3VdbeTakeOpArray(v, &pProgram->nOp, &pTop->nMaxArg);
|
pProgram->aOp = sqlite3VdbeTakeOpArray(v, &pProgram->nOp, &pTop->nMaxArg);
|
||||||
}
|
}
|
||||||
pProgram->nMem = sSubParse.nMem;
|
pProgram->nMem = sSubParse.nMem;
|
||||||
@@ -1195,6 +1198,8 @@ static TriggerPrg *codeRowTrigger(
|
|||||||
pPrg->aColmask[0] = sSubParse.oldmask;
|
pPrg->aColmask[0] = sSubParse.oldmask;
|
||||||
pPrg->aColmask[1] = sSubParse.newmask;
|
pPrg->aColmask[1] = sSubParse.newmask;
|
||||||
sqlite3VdbeDelete(v);
|
sqlite3VdbeDelete(v);
|
||||||
|
}else{
|
||||||
|
transferParseError(pParse, &sSubParse);
|
||||||
}
|
}
|
||||||
|
|
||||||
assert( !sSubParse.pTriggerPrg && !sSubParse.nMaxArg );
|
assert( !sSubParse.pTriggerPrg && !sSubParse.nMaxArg );
|
||||||
@@ -1253,7 +1258,7 @@ void sqlite3CodeRowTriggerDirect(
|
|||||||
Vdbe *v = sqlite3GetVdbe(pParse); /* Main VM */
|
Vdbe *v = sqlite3GetVdbe(pParse); /* Main VM */
|
||||||
TriggerPrg *pPrg;
|
TriggerPrg *pPrg;
|
||||||
pPrg = getRowTrigger(pParse, p, pTab, orconf);
|
pPrg = getRowTrigger(pParse, p, pTab, orconf);
|
||||||
assert( pPrg || pParse->nErr || pParse->db->mallocFailed );
|
assert( pPrg || pParse->nErr );
|
||||||
|
|
||||||
/* Code the OP_Program opcode in the parent VDBE. P4 of the OP_Program
|
/* Code the OP_Program opcode in the parent VDBE. P4 of the OP_Program
|
||||||
** is a pointer to the sub-vdbe containing the trigger program. */
|
** is a pointer to the sub-vdbe containing the trigger program. */
|
||||||
|
@@ -347,9 +347,11 @@ void sqlite3Update(
|
|||||||
|
|
||||||
memset(&sContext, 0, sizeof(sContext));
|
memset(&sContext, 0, sizeof(sContext));
|
||||||
db = pParse->db;
|
db = pParse->db;
|
||||||
if( pParse->nErr || db->mallocFailed ){
|
assert( db->pParse==pParse );
|
||||||
|
if( pParse->nErr ){
|
||||||
goto update_cleanup;
|
goto update_cleanup;
|
||||||
}
|
}
|
||||||
|
assert( db->mallocFailed==0 );
|
||||||
|
|
||||||
/* Locate the table which we want to update.
|
/* Locate the table which we want to update.
|
||||||
*/
|
*/
|
||||||
|
@@ -198,6 +198,10 @@ void sqlite3ErrorMsg(Parse *pParse, const char *zFormat, ...){
|
|||||||
if( db->errByteOffset<-1 ) db->errByteOffset = -1;
|
if( db->errByteOffset<-1 ) db->errByteOffset = -1;
|
||||||
if( db->suppressErr ){
|
if( db->suppressErr ){
|
||||||
sqlite3DbFree(db, zMsg);
|
sqlite3DbFree(db, zMsg);
|
||||||
|
if( db->mallocFailed ){
|
||||||
|
pParse->nErr++;
|
||||||
|
pParse->rc = SQLITE_NOMEM;
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
pParse->nErr++;
|
pParse->nErr++;
|
||||||
sqlite3DbFree(db, pParse->zErrMsg);
|
sqlite3DbFree(db, pParse->zErrMsg);
|
||||||
|
@@ -1378,8 +1378,7 @@ void sqlite3VdbeSetP4KeyInfo(Parse *pParse, Index *pIdx){
|
|||||||
*/
|
*/
|
||||||
static void vdbeVComment(Vdbe *p, const char *zFormat, va_list ap){
|
static void vdbeVComment(Vdbe *p, const char *zFormat, va_list ap){
|
||||||
assert( p->nOp>0 || p->aOp==0 );
|
assert( p->nOp>0 || p->aOp==0 );
|
||||||
assert( p->aOp==0 || p->aOp[p->nOp-1].zComment==0 || p->db->mallocFailed
|
assert( p->aOp==0 || p->aOp[p->nOp-1].zComment==0 || p->pParse->nErr>0 );
|
||||||
|| p->pParse->nErr>0 );
|
|
||||||
if( p->nOp ){
|
if( p->nOp ){
|
||||||
assert( p->aOp );
|
assert( p->aOp );
|
||||||
sqlite3DbFree(p->db, p->aOp[p->nOp-1].zComment);
|
sqlite3DbFree(p->db, p->aOp[p->nOp-1].zComment);
|
||||||
|
@@ -5491,9 +5491,10 @@ WhereInfo *sqlite3WhereBegin(
|
|||||||
if( pWInfo->pOrderBy==0 && (db->flags & SQLITE_ReverseOrder)!=0 ){
|
if( pWInfo->pOrderBy==0 && (db->flags & SQLITE_ReverseOrder)!=0 ){
|
||||||
pWInfo->revMask = ALLBITS;
|
pWInfo->revMask = ALLBITS;
|
||||||
}
|
}
|
||||||
if( pParse->nErr || db->mallocFailed ){
|
if( pParse->nErr ){
|
||||||
goto whereBeginError;
|
goto whereBeginError;
|
||||||
}
|
}
|
||||||
|
assert( db->mallocFailed==0 );
|
||||||
#ifdef WHERETRACE_ENABLED
|
#ifdef WHERETRACE_ENABLED
|
||||||
if( sqlite3WhereTrace ){
|
if( sqlite3WhereTrace ){
|
||||||
sqlite3DebugPrintf("---- Solution nRow=%d", pWInfo->nRowOut);
|
sqlite3DebugPrintf("---- Solution nRow=%d", pWInfo->nRowOut);
|
||||||
|
@@ -841,7 +841,8 @@ static int codeAllEqualityTerms(
|
|||||||
sqlite3VdbeAddOp2(v, OP_IsNull, regBase+j, pLevel->addrBrk);
|
sqlite3VdbeAddOp2(v, OP_IsNull, regBase+j, pLevel->addrBrk);
|
||||||
VdbeCoverage(v);
|
VdbeCoverage(v);
|
||||||
}
|
}
|
||||||
if( pParse->db->mallocFailed==0 && pParse->nErr==0 ){
|
if( pParse->nErr==0 ){
|
||||||
|
assert( pParse->db->mallocFailed==0 );
|
||||||
if( sqlite3CompareAffinity(pRight, zAff[j])==SQLITE_AFF_BLOB ){
|
if( sqlite3CompareAffinity(pRight, zAff[j])==SQLITE_AFF_BLOB ){
|
||||||
zAff[j] = SQLITE_AFF_BLOB;
|
zAff[j] = SQLITE_AFF_BLOB;
|
||||||
}
|
}
|
||||||
@@ -2359,7 +2360,7 @@ Bitmask sqlite3WhereCodeOneLoopStart(
|
|||||||
WHERETRACE(0xffff, ("Subplan for OR-clause:\n"));
|
WHERETRACE(0xffff, ("Subplan for OR-clause:\n"));
|
||||||
pSubWInfo = sqlite3WhereBegin(pParse, pOrTab, pOrExpr, 0, 0,
|
pSubWInfo = sqlite3WhereBegin(pParse, pOrTab, pOrExpr, 0, 0,
|
||||||
WHERE_OR_SUBCLAUSE, iCovCur);
|
WHERE_OR_SUBCLAUSE, iCovCur);
|
||||||
assert( pSubWInfo || pParse->nErr || db->mallocFailed );
|
assert( pSubWInfo || pParse->nErr );
|
||||||
if( pSubWInfo ){
|
if( pSubWInfo ){
|
||||||
WhereLoop *pSubLoop;
|
WhereLoop *pSubLoop;
|
||||||
int addrExplain = sqlite3WhereExplainOneScan(
|
int addrExplain = sqlite3WhereExplainOneScan(
|
||||||
|
Reference in New Issue
Block a user