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;
memset(p, 0, sizeof(*p));
pSubFile = ORIGFILE(pFile);
p->base.pMethods = &apnd_io_methods;
pFile->pMethods = &apnd_io_methods;
rc = pSubVfs->xOpen(pSubVfs, zName, pSubFile, flags, pOutFlags);
if( rc ) goto apnd_open_done;
rc = pSubFile->pMethods->xFileSize(pSubFile, &sz);

View File

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

@@ -100,7 +100,7 @@ static int (*const sqlite3BuiltinExtensions[])(sqlite3*) = {
#ifndef SQLITE_AMALGAMATION
/* IMPLEMENTATION-OF: R-46656-45156 The sqlite3_version[] string constant
** contains the text of SQLITE_VERSION macro.
** contains the text of SQLITE_VERSION macro.
*/
const char sqlite3_version[] = SQLITE_VERSION;
#endif

View File

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

View File

@@ -366,7 +366,7 @@ int sqlite3JournalOpen(
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->flags = flags;
p->zJournal = zName;
@@ -392,7 +392,7 @@ void sqlite3MemJournalOpen(sqlite3_file *pJfd){
int sqlite3JournalCreate(sqlite3_file *pJfd){
int rc = SQLITE_OK;
MemJournal *p = (MemJournal*)pJfd;
if( p->pMethod==&MemJournalMethods && (
if( pJfd->pMethods==&MemJournalMethods && (
#ifdef SQLITE_ENABLE_ATOMIC_WRITE
p->nSpill>0
#else

View File

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

View File

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

View File

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

View File

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