Initial changes to allow database up to 281TB in size.

FossilOrigin-Name: 9cb7da9bdb666ea40771513b89591dca275f1e92092b39190df747e3797178a3
This commit is contained in:
drh 2020-07-20 12:47:32 +00:00
parent 51da8daf82
commit e9261dbd53
8 changed files with 29 additions and 17 deletions

View File

@ -1,6 +1,6 @@
B 7a876209a678a34c198b54ceef9e3c041f128a14dc73357f6a57cadadaa6cf7b
C Fix\stest\scase\sresult\son\sa\sDELETE\swith\san\sINDEXED\sBY\sclause\sdue\sto\nimprovements\sin\sthe\squery\splanner\sat\s[d901837fea1ed54d]
D 2020-07-18T18:59:11.167
C Initial\schanges\sto\sallow\sdatabase\sup\sto\s281TB\sin\ssize.
D 2020-07-20T12:47:32.233
F Makefile.in 19374a5db06c3199ec1bab71ab74a103d8abf21053c05e9389255dc58083f806
F Makefile.msc 48f5a3fc32672c09ad73795749f6253e406a31526935fbbffd8f021108d54574
F autoconf/Makefile.am a8d1d24affe52ebf8d7ddcf91aa973fa0316618ab95bb68c87cabf8faf527dc8
@ -17,20 +17,23 @@ F ext/misc/ieee754.c 5c7ca326361c7368f95f5743972eade3b8b24f60359ed7cba4706668a56
F main.mk b1cd0bc6aedad7ebb667b7f74f835f932f60ee33be2a5c3051fd93eb465f5c75
F src/alter.c 4bc16666a0df99d49658ec66f00ca36e541ec6cb39673ccc51be6a981fb9b2ce
F src/attach.c 0b11e00c166b622c84ec176773b1d691c61ad07d247809e3e1635d4e99e71d30
F src/btree.c b8b0e80c8bbe4e1fb35ae559e9e9aa009799c20cf12f159ebb503b05be1fab9b
F src/btree.c 21984273a63f2a82685aa5b53f9da7275a34398f7e3ceb5f9e23efc7613af75d
F src/btree.h 0a37709ba908fd1d52201b21a61d040922ca9c219ae6f4b44f24a8fca6ffe885
F src/btreeInt.h 19267385aa3bc00067d48e0e4ba83ae82dc08b0c15a3b3df20ea653cb462b5bf
F src/build.c 45d912640987426442eb9eeec695c4dd45dd440b4cd27e8c13a42eed2fa87dcd
F src/delete.c 410c771c25afc113c273d9efad6ab6881bda28c75a1838b9d2c52ba20d1dc704
F src/expr.c 90039a043658ce78c3237ba5064c0934b7294120f6adc387f8d0fba306028154
F src/malloc.c 22d5bdd9fe88ae4fad1b91a1b9735104b82853ffef868f1f05517d60dc1875f5
F src/mem2.c b93b8762ab999a29ae7751532dadf0a1ac78040308a5fb1d17fcc365171d67eb
F src/pager.c 602b664e62c8e7fe5e8ebc953de3ee002db64e8c902ef314a88c0c4ac9d54a72
F src/pager.h 4bf9b3213a4b2bebbced5eaa8b219cf25d4a82f385d093cd64b7e93e5285f66f
F src/parse.y 5bdb760a29c0b25caf7e80e82210b81cd2ea3066d5199ca29e6eac40b34bc184
F src/pragma.c ae499b5ab8f4e833f67e28bf2322500e9aa612aadf12581d1324333f848d8b51
F src/pragma.c 13c627fb145dda23b61e8d75592423406241c23ec88ebf5d8dc1a4c50de41dd9
F src/pragma.h 8dc78ab7e9ec6ce3ded8332810a2066f1ef6267e2e03cd7356ee00276125c6cf
F src/resolve.c 2dd6821aac2cd27de9fcf6aa6d1f8c41b4b5841c9bc58bf1c9109008009a3a2e
F src/select.c ee84981a346ddddf5669db441a68fac763f4266fe83a9cb27e43c67fbcf1b215
F src/shell.c.in 81fa23ac1a3d6ac9ed13e9ae711a3d8806396ca7cc12c5d6a2e2536f70b0c7ad
F src/sqliteInt.h 9682c3ce6b970b3a997d65c140bdb5b286a04188e4e1c8489b64a525161ecb30
F src/sqliteInt.h 8c43ad1408b55e538565bd4fb947cdd4e2488c322cfe733c9a4a90305c97c75e
F src/test1.c fe56c4bcaa2685ca9aa25d817a0ee9345e189aff4a5a71a3d8ba946c7776feb8
F src/test_malloc.c 21121ea85b49ec0bdb69995847cef9036ef9beca3ce63bbb776e4ea2ecc44b97
F src/trigger.c ef67bde309a831515dc3c2173d792574309f2f42d45f8c078743fae9f7f98c75
@ -70,7 +73,10 @@ F tool/mksqlite3c.tcl f4ef476510eca4124c874a72029f1e01bc54a896b1724e8f9eef0d8bfa
F tool/mksqlite3h.tcl 1f5e4a1dbbbc43c83cc6e74fe32c6c620502240b66c7c0f33a51378e78fc4edf
F tool/showlocks.c 9cc5e66d4ebbf2d194f39db2527ece92077e86ae627ddd233ee48e16e8142564
F tool/speed-check.sh 615cbdf50f1409ef3bbf9f682e396df80f49d97ed93ed3e61c8e91fae6afde58
P 4c0d208c455abb983217a6dfea7634f677f8360fb57857e1421334fe7a5a23e2
R 61a02552087d7d7a36de6e291a7a443b
P 020dbfa2aef20e5872cc3e785d99f45903843401292114b5092b9c8aa829b9c3
R ab2ebf91e53f6501695c6ee9adc86286
T *branch * larger-databases
T *sym-larger-databases *
T -sym-trunk *
U drh
Z bcc70f031a6dba86e55b60ee851e59f9
Z 75b6d7d462ec8aff5320b5004ad4c7b9

View File

@ -1 +1 @@
020dbfa2aef20e5872cc3e785d99f45903843401292114b5092b9c8aa829b9c3
9cb7da9bdb666ea40771513b89591dca275f1e92092b39190df747e3797178a3

View File

@ -2932,8 +2932,8 @@ int sqlite3BtreeGetRequestedReserve(Btree *p){
** No changes are made if mxPage is 0 or negative.
** Regardless of the value of mxPage, return the maximum page count.
*/
int sqlite3BtreeMaxPageCount(Btree *p, int mxPage){
int n;
Pgno sqlite3BtreeMaxPageCount(Btree *p, Pgno mxPage){
Pgno n;
sqlite3BtreeEnter(p);
n = sqlite3PagerMaxPageCount(p->pBt->pPager, mxPage);
sqlite3BtreeLeave(p);

View File

@ -71,7 +71,7 @@ int sqlite3BtreeSetSpillSize(Btree*,int);
int sqlite3BtreeSetPagerFlags(Btree*,unsigned);
int sqlite3BtreeSetPageSize(Btree *p, int nPagesize, int nReserve, int eFix);
int sqlite3BtreeGetPageSize(Btree*);
int sqlite3BtreeMaxPageCount(Btree*,int);
Pgno sqlite3BtreeMaxPageCount(Btree*,Pgno);
u32 sqlite3BtreeLastPage(Btree*);
int sqlite3BtreeSecureDelete(Btree*,int);
int sqlite3BtreeGetRequestedReserve(Btree*);

View File

@ -3763,7 +3763,7 @@ void *sqlite3PagerTempSpace(Pager *pPager){
**
** Regardless of mxPage, return the current maximum page count.
*/
int sqlite3PagerMaxPageCount(Pager *pPager, int mxPage){
Pgno sqlite3PagerMaxPageCount(Pager *pPager, Pgno mxPage){
if( mxPage>0 ){
pPager->mxPgno = mxPage;
}

View File

@ -128,7 +128,7 @@ int sqlite3PagerReadFileheader(Pager*, int, unsigned char*);
/* Functions used to configure a Pager object. */
void sqlite3PagerSetBusyHandler(Pager*, int(*)(void *), void *);
int sqlite3PagerSetPagesize(Pager*, u32*, int);
int sqlite3PagerMaxPageCount(Pager*, int);
Pgno sqlite3PagerMaxPageCount(Pager*, Pgno);
void sqlite3PagerSetCachesize(Pager*, int);
int sqlite3PagerSetSpillsize(Pager*, int);
void sqlite3PagerSetMmapLimit(Pager *, sqlite3_int64);

View File

@ -611,13 +611,19 @@ void sqlite3Pragma(
*/
case PragTyp_PAGE_COUNT: {
int iReg;
i64 x = 0;
sqlite3CodeVerifySchema(pParse, iDb);
iReg = ++pParse->nMem;
if( sqlite3Tolower(zLeft[0])=='p' ){
sqlite3VdbeAddOp2(v, OP_Pagecount, iDb, iReg);
}else{
sqlite3VdbeAddOp3(v, OP_MaxPgcnt, iDb, iReg,
sqlite3AbsInt32(sqlite3Atoi(zRight)));
if( zRight && sqlite3DecOrHexToI64(zRight,&x)==0 ){
if( x<0 ) x = 0;
else if( x>0xfffffffe ) x = 0xfffffffe;
}else{
x = 0;
}
sqlite3VdbeAddOp3(v, OP_MaxPgcnt, iDb, iReg, (int)x);
}
sqlite3VdbeAddOp2(v, OP_ResultRow, iReg, 1);
break;

View File

@ -1186,9 +1186,9 @@ typedef int VList;
** "BusyHandler" typedefs. vdbe.h also requires a few of the opaque
** pointer types (i.e. FuncDef) defined above.
*/
#include "pager.h"
#include "btree.h"
#include "vdbe.h"
#include "pager.h"
#include "pcache.h"
#include "os.h"
#include "mutex.h"