1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Merge recent changes from trunk.

FossilOrigin-Name: 22e8e6901a119698de831ede6d8b03c4fd6576eaa8686a97a0b8aeea7593688a
This commit is contained in:
drh
2020-07-24 13:49:38 +00:00
11 changed files with 1875 additions and 18 deletions

View File

@@ -439,7 +439,7 @@ static int apndOpen(
p = (ApndFile*)pFile; p = (ApndFile*)pFile;
memset(p, 0, sizeof(*p)); memset(p, 0, sizeof(*p));
pSubFile = ORIGFILE(pFile); pSubFile = ORIGFILE(pFile);
p->base.pMethods = &apnd_io_methods; pFile->pMethods = &apnd_io_methods;
rc = pSubVfs->xOpen(pSubVfs, zName, pSubFile, flags, pOutFlags); rc = pSubVfs->xOpen(pSubVfs, zName, pSubFile, flags, pOutFlags);
if( rc ) goto apnd_open_done; if( rc ) goto apnd_open_done;
rc = pSubFile->pMethods->xFileSize(pSubFile, &sz); rc = pSubFile->pMethods->xFileSize(pSubFile, &sz);

View File

@@ -634,7 +634,7 @@ static int cksmOpen(
p = (CksmFile*)pFile; p = (CksmFile*)pFile;
memset(p, 0, sizeof(*p)); memset(p, 0, sizeof(*p));
pSubFile = ORIGFILE(pFile); pSubFile = ORIGFILE(pFile);
p->base.pMethods = &cksm_io_methods; pFile->pMethods = &cksm_io_methods;
rc = pSubVfs->xOpen(pSubVfs, zName, pSubFile, flags, pOutFlags); rc = pSubVfs->xOpen(pSubVfs, zName, pSubFile, flags, pOutFlags);
if( rc ) goto cksm_open_done; if( rc ) goto cksm_open_done;
if( flags & SQLITE_OPEN_WAL ){ if( flags & SQLITE_OPEN_WAL ){

1865
manifest

File diff suppressed because it is too large Load Diff

View File

@@ -1 +1 @@
849b03d8de62251707ee0d31c9f1cd98cbd296c70c1a2c8d7c1658840a930fe4 22e8e6901a119698de831ede6d8b03c4fd6576eaa8686a97a0b8aeea7593688a

View File

@@ -339,7 +339,7 @@ static int memdbOpen(
p->mFlags = SQLITE_DESERIALIZE_RESIZEABLE | SQLITE_DESERIALIZE_FREEONCLOSE; p->mFlags = SQLITE_DESERIALIZE_RESIZEABLE | SQLITE_DESERIALIZE_FREEONCLOSE;
assert( pOutFlags!=0 ); /* True because flags==SQLITE_OPEN_MAIN_DB */ assert( pOutFlags!=0 ); /* True because flags==SQLITE_OPEN_MAIN_DB */
*pOutFlags = flags | SQLITE_OPEN_MEMORY; *pOutFlags = flags | SQLITE_OPEN_MEMORY;
p->base.pMethods = &memdb_io_methods; pFile->pMethods = &memdb_io_methods;
p->szMax = sqlite3GlobalConfig.mxMemdbSize; p->szMax = sqlite3GlobalConfig.mxMemdbSize;
return SQLITE_OK; return SQLITE_OK;
} }

View File

@@ -366,7 +366,7 @@ int sqlite3JournalOpen(
assert( MEMJOURNAL_DFLT_FILECHUNKSIZE==fileChunkSize(p->nChunkSize) ); assert( MEMJOURNAL_DFLT_FILECHUNKSIZE==fileChunkSize(p->nChunkSize) );
} }
p->pMethod = (const sqlite3_io_methods*)&MemJournalMethods; pJfd->pMethods = (const sqlite3_io_methods*)&MemJournalMethods;
p->nSpill = nSpill; p->nSpill = nSpill;
p->flags = flags; p->flags = flags;
p->zJournal = zName; p->zJournal = zName;
@@ -392,7 +392,7 @@ void sqlite3MemJournalOpen(sqlite3_file *pJfd){
int sqlite3JournalCreate(sqlite3_file *pJfd){ int sqlite3JournalCreate(sqlite3_file *pJfd){
int rc = SQLITE_OK; int rc = SQLITE_OK;
MemJournal *p = (MemJournal*)pJfd; MemJournal *p = (MemJournal*)pJfd;
if( p->pMethod==&MemJournalMethods && ( if( pJfd->pMethods==&MemJournalMethods && (
#ifdef SQLITE_ENABLE_ATOMIC_WRITE #ifdef SQLITE_ENABLE_ATOMIC_WRITE
p->nSpill>0 p->nSpill>0
#else #else

View File

@@ -5692,7 +5692,7 @@ static int fillInUnixFile(
if( rc!=SQLITE_OK ){ if( rc!=SQLITE_OK ){
if( h>=0 ) robust_close(pNew, h, __LINE__); if( h>=0 ) robust_close(pNew, h, __LINE__);
}else{ }else{
pNew->pMethod = pLockingStyle; pId->pMethods = pLockingStyle;
OpenCounter(+1); OpenCounter(+1);
verifyDbFile(pNew); verifyDbFile(pNew);
} }

View File

@@ -5266,7 +5266,7 @@ static int winOpen(
} }
sqlite3_free(zTmpname); sqlite3_free(zTmpname);
pFile->pMethod = pAppData ? pAppData->pMethod : &winIoMethod; id->pMethods = pAppData ? pAppData->pMethod : &winIoMethod;
pFile->pVfs = pVfs; pFile->pVfs = pVfs;
pFile->h = h; pFile->h = h;
if( isReadonly ){ if( isReadonly ){

View File

@@ -591,9 +591,9 @@ static int multiplexOpen(
if( rc==SQLITE_OK ){ if( rc==SQLITE_OK ){
if( pSubOpen->pMethods->iVersion==1 ){ if( pSubOpen->pMethods->iVersion==1 ){
pMultiplexOpen->base.pMethods = &gMultiplex.sIoMethodsV1; pConn->pMethods = &gMultiplex.sIoMethodsV1;
}else{ }else{
pMultiplexOpen->base.pMethods = &gMultiplex.sIoMethodsV2; pConn->pMethods = &gMultiplex.sIoMethodsV2;
} }
}else{ }else{
multiplexFreeComponents(pGroup); multiplexFreeComponents(pGroup);

View File

@@ -698,7 +698,9 @@ static const char zHelp[] =
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>
#ifndef OMIT_ZLIB
#include "zlib.h" #include "zlib.h"
#endif
/* /*
** Implementation of the "sqlar_uncompress(X,SZ)" SQL function ** Implementation of the "sqlar_uncompress(X,SZ)" SQL function
@@ -715,6 +717,9 @@ static void sqlarUncompressFunc(
int argc, int argc,
sqlite3_value **argv sqlite3_value **argv
){ ){
#ifdef OMIT_ZLIB
sqlite3_result_value(context, argv[0]);
#else
uLong nData; uLong nData;
uLongf sz; uLongf sz;
@@ -733,6 +738,7 @@ static void sqlarUncompressFunc(
} }
sqlite3_free(pOut); sqlite3_free(pOut);
} }
#endif
} }