As a continuation of [1f66a85b7757754f], ensure that an OOM that occurs

while checking the validity of the schema is reported out as SQLITE_NOMEM
and not as SQLITE_SCHEMA.

FossilOrigin-Name: 5045c8a748f0065638d0ff4f6e3ccd124183fbc518cb9b0418d125b04dbc1491
This commit is contained in:
drh 2021-04-05 11:39:55 +00:00
parent 319deefdb9
commit 2389048f29
3 changed files with 8 additions and 7 deletions

View File

@ -1,5 +1,5 @@
C Fix\san\sassert()\sin\ssqlite3BtreeLast()\sthat\sneeds\san\s"||\sCORRUPT_DB"\sterm.\nDbsqlfuzz\scase\sb92b72e4de80b5140c30ab71372ca719b8feb618.
D 2021-04-04T23:56:15.323
C As\sa\scontinuation\sof\s[1f66a85b7757754f],\sensure\sthat\san\sOOM\sthat\soccurs\nwhile\schecking\sthe\svalidity\sof\sthe\sschema\sis\sreported\sout\sas\sSQLITE_NOMEM\nand\snot\sas\sSQLITE_SCHEMA.
D 2021-04-05T11:39:55.507
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -537,7 +537,7 @@ F src/pcache.h 4f87acd914cef5016fae3030343540d75f5b85a1877eed1a2a19b9f284248586
F src/pcache1.c 388304fd2d91c39591080b5e0f3c62cfba87db20370e7e0554062bfb29740e9f
F src/pragma.c eb42cb9bec189cf18cef5d8fcae56e13bb73ef2b019b198fb48740ced81bce95
F src/pragma.h 8dc78ab7e9ec6ce3ded8332810a2066f1ef6267e2e03cd7356ee00276125c6cf
F src/prepare.c dd46de641753035c8a62a83c1886929afd068a786164384fb687ec6df1d03957
F src/prepare.c 7a0fc6866748541af55e59f950f3461aa419f137d6e6a16c6246c115b9198287
F src/printf.c 78fabb49b9ac9a12dd1c89d744abdc9b67fd3205e62967e158f78b965a29ec4b
F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
F src/resolve.c fc136d935f19966747663bed605ad7f06f84f9fe7bf7bf79e9bf844ef5c7556d
@ -1912,7 +1912,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P 0ee0ef476ba9e17794c088a1347a136df3eb1ef864da884cfe81e3b2e94e9719
R c27ae00d825ef839160a92e48eb8a7fc
P ad718388a1f6e25ceba43a40160fac0d9d9d3f26888e98d7b9db478c0b1780be
R 4d3b70fed2c5b14861d4ecb85ec58007
U drh
Z 5e6d1cfae67dfc3863e867ea82b9ca5f
Z 70c8a0408ada34ebc0490f884dfe18c7

View File

@ -1 +1 @@
ad718388a1f6e25ceba43a40160fac0d9d9d3f26888e98d7b9db478c0b1780be
5045c8a748f0065638d0ff4f6e3ccd124183fbc518cb9b0418d125b04dbc1491

View File

@ -498,6 +498,7 @@ static void schemaIsValid(Parse *pParse){
rc = sqlite3BtreeBeginTrans(pBt, 0, 0);
if( rc==SQLITE_NOMEM || rc==SQLITE_IOERR_NOMEM ){
sqlite3OomFault(db);
pParse->rc = SQLITE_NOMEM;
}
if( rc!=SQLITE_OK ) return;
openedTransaction = 1;